/** * @oxpulse/chat-widget — Shared floating-picker dismiss + focus-trap wiring. * * Deduplicated from EmojiPicker and ProductPicker (#203) — the two had * byte-identical ~60-line clones of the outside-pointerdown dismiss, the * Escape + Tab focus-trap (same `'input, button:not([disabled])'` selector * + shift-tab wrap), and the abort-signal wiring, alongside the * already-shared `computeFloatingPosition`. This single helper serves both. * * Behavior is identical to the inlined originals — every existing * emoji-picker AND product-picker test (dismiss / focus-trap / escape / * outside-click / abort) stays green. */ export interface FloatingDismissOptions { /** Called when an outside pointerdown / Escape / abort dismisses the picker. */ onHide: () => void; /** Element to restore focus to on Escape (read at dismiss time, before * onHide nulls the picker's internal reference). */ getRestoreFocusEl: () => HTMLElement | null; /** Optional abort signal — when aborted, the picker is dismissed via onHide. */ signal?: AbortSignal; } /** * Install outside-pointerdown dismiss + Escape/Tab focus-trap + abort * listener on a floating picker element anchored to `anchorEl`. * * @returns A teardown function that removes every installed listener — * call it from the picker's hide/remove path. */ export declare function useFloatingDismiss(pickerEl: HTMLElement, anchorEl: HTMLElement, opts: FloatingDismissOptions): () => void; //# sourceMappingURL=floating-dismiss.d.ts.map