import type { Human } from '@/api/types'; import { resolveHumanDisplay } from '@/lib/humans'; import type { ComposingUser } from '@/features/particles/stream-presence-context'; interface ComposingIndicatorProps { users: ComposingUser[]; networkHumans?: Human[]; } /** * Composing indicators pinned to the left edge, text running bottom-to-top * via writing-mode so it hugs the edge without transform math issues. */ export function ComposingIndicator({ users, networkHumans, }: ComposingIndicatorProps) { if (users.length === 0) return null; return (
{users.map((u) => { const { displayName } = resolveHumanDisplay(u.humanId, networkHumans); const modeLabel = u.mode === 'typing' ? 'typing' : 'recording'; return (
{displayName} {modeLabel}
); })}
); }