/** * @oxpulse/chat-widget — ReactionQuickBar (reactions quick-bar redesign, * heart-first amendment 2026-07-14). Renamed from ReactionPicker (W2.2 * slice 3) — same floating-popover mechanics, now reached by holding the * per-bubble heart button (≥400ms touch/pen hold, ≥400ms mouse hover-intent) * or pressing ArrowUp on it, instead of a click-triggered two-step flow (see * ui/reaction-trigger.ts and MessageList's wiring). * * Plain TS class, no framework. Renders emoji buttons inside the container, * handles keyboard navigation, outside click, and AbortSignal. */ export interface ReactionQuickBarOptions { /** Container element to render the bar inside. */ container: HTMLElement; /** Called when the user selects an emoji. */ onSelect: (emoji: string) => void; /** Optional abort signal — when aborted, show() becomes a no-op. */ signal?: AbortSignal; /** BCP-47 tag or an already-resolved Locale. Optional — defaults via resolveLocale(). */ lang?: string; /** The caller's current own reaction on this message, if any (spec 2026-07-14). * Marks the matching button aria-pressed=true + an accent ring so the bar * reflects existing state, not just a blank picker. */ ownEmoji?: string; /** Whether the message this bar is attached to is the caller's own * (reuse-update 2026-07-14) — drives right-edge vs left-edge anchoring * via computeQuickBarPosition, ported from oxpulse-chat web's * computePopoverPosition. Default false. */ isOwnMessage?: boolean; /** Called whenever the bar closes ITSELF — Escape, outside-pointerdown, * or an explicit hide()/re-show() (review fix HIGH#4, 2026-07-14). * Without this, a caller that tracks "which message currently owns the * bar" (MessageList's #quickBar/#quickBarMsgId) has no way to learn the * bar closed on its own — its state goes stale and an idempotent-reshow * guard keyed on that state blocks reopening the SAME message forever. * NOT called for a redundant hide() on an already-closed bar. */ onHide?: () => void; } /** MOTION (spec 2026-07-14): select fires a burst/scale-pop on the chosen * button before the bar dismisses — this is the visual budget for that pop * to play before DOM removal. Reduced-motion is handled entirely in CSS * (the keyframe is zeroed under `prefers-reduced-motion: reduce`); this * fixed short delay is imperceptible either way and keeps onSelect's * business-logic side effect synchronous regardless of motion preference. */ export declare const SELECT_DISMISS_DELAY_MS = 160; /** * ReactionQuickBar renders a floating emoji quick-select bar. * * Lifecycle: * show(anchorEl) — appends bar to container, positions it, focuses first emoji * hide() — removes from DOM, restores focus to anchor * * A11y: * role="dialog", first emoji focused on open, Arrow keys navigate, * Escape hides + restores focus to anchor (deferred to a microtask), * outside capture-phase pointerdown hides. */ export declare class ReactionQuickBar { #private; constructor(opts: ReactionQuickBarOptions); /** * Show the bar anchored to the given element. * * @param anchorEl — element to anchor position to * @param mountTo — element to append the bar to (default: constructor container). * Pass the ShadowRoot host element to escape overflow:hidden clip contexts. * F3 (design MAJOR-5): container has overflow:hidden which clips absolute children. * @param restoreFocusEl — element Escape restores focus to. Defaults to anchorEl. * Pass the heart button (anchorEl is the bubble, which is * not itself focusable). * @param focusFirstButton — whether to move focus into the bar on open. * Default true. Pass false for a passively-opened bar * (review fix CRITICAL#2, 2026-07-14: a mouse * hover-intent open must not steal focus from wherever * the user was, e.g. mid-typing in the composer) — * a deliberate hold/keyboard open should still focus it. */ show(anchorEl: HTMLElement, mountTo?: HTMLElement, restoreFocusEl?: HTMLElement, focusFirstButton?: boolean): void; /** Hide the bar without firing onSelect. */ hide(): void; } //# sourceMappingURL=reaction-quick-bar.d.ts.map