import type { Human } from "@/api/types"; 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 human = networkHumans?.find((h) => h.id === u.humanId); const name = human?.email_prefix ?? u.humanId; const modeLabel = u.mode === "typing" ? "typing" : "recording"; return (
{name} {modeLabel}
); })}
); }