/** * @oxpulse/chat-widget — Thread panel (#126). * * Shows a thread view: root message + reply list + inline composer. * Opens as an overlay panel within the widget container. * * Zero-third-party-dep — plain DOM, matching the widget's existing pattern. * * Lifecycle: * open(rootMsgId) — fetches thread via getThread(), renders panel * close() — removes panel from DOM, restores focus * * The panel calls back to the consumer for: * - sendReply(text) — consumer sends via SDK with threadRootMsgId * - resolveName(uid) — display name lookup from roster */ /** Minimal row shape needed by the thread panel. */ export interface ThreadRow { msgId: string; senderUid: string; text?: string; createdAt: string; threadRootMsgId?: string | null; } export interface ThreadPanelOptions { /** Container element to render the panel inside. */ container: HTMLElement; /** Fetch thread replies from the SDK. */ getThread: (rootMsgId: string) => Promise; /** Send a reply in the thread. */ sendReply: (text: string, rootMsgId: string) => Promise; /** Resolve userId → display name. */ resolveName?: (userId: string) => string | undefined; /** The current user's ID — for "You" label. */ selfUid: string; /** Optional abort signal. */ signal?: AbortSignal; /** BCP-47 tag or resolved Locale. */ lang?: string; /** Called when the panel closes. */ onClose?: () => void; } export declare class ThreadPanel { #private; constructor(opts: ThreadPanelOptions); get isOpen(): boolean; /** Open the thread panel for the given root message. */ open(rootRow: ThreadRow): Promise; /** Close the panel. */ close(): void; /** Add a reply to the panel (called when a new SSE message arrives in this thread). */ addReply(row: ThreadRow): void; } //# sourceMappingURL=thread-panel.d.ts.map