/** * Accessibility live-region announcer helpers. * * @module bquery/platform */ import { type Signal } from '../reactive/signal'; /** Options for creating an announcer. */ export interface UseAnnouncerOptions { /** Live region politeness. */ politeness?: 'polite' | 'assertive'; /** Whether the live region should be atomic. */ atomic?: boolean; /** Delay before applying the message. */ delay?: number; /** Delay after which the message is cleared automatically. */ clearDelay?: number; /** Optional element id for the live region. */ id?: string; /** Optional CSS class name. */ className?: string; /** Optional container used to append the live region. */ container?: HTMLElement; } /** Runtime options for a single announcement. */ export interface AnnounceOptions { /** Override politeness for this specific announcement. */ politeness?: 'polite' | 'assertive'; /** Override the message delay for this specific announcement. */ delay?: number; /** Override the auto-clear delay for this specific announcement. */ clearDelay?: number; } /** Returned announcer API. */ export interface AnnouncerHandle { /** The live region element or null outside the DOM. */ element: HTMLElement | null; /** Reactive message signal. */ message: Signal; /** Announce a message to assistive technologies. */ announce: (value: string, options?: AnnounceOptions) => void; /** Clear the current announcement. */ clear: () => void; /** Remove the live region if it was created by this announcer. */ destroy: () => void; } /** * Create or reuse an accessible live region. * * @param options - Live region configuration * @returns An announcer handle with announce(), clear(), and destroy() * * @example * ```ts * const announcer = useAnnouncer(); * announcer.announce('Saved successfully'); * ``` */ export declare const useAnnouncer: (options?: UseAnnouncerOptions) => AnnouncerHandle; //# sourceMappingURL=announcer.d.ts.map