import { type AnnouncePoliteness } from './announcer.js'; export { ANNOUNCE_DEBOUNCE_MS, type AnnouncePoliteness } from './announcer.js'; /** * Announces to screen readers via a process-wide `aria-live` region, debounced to the last message of a burst; a repeat is re-announced, empty/whitespace is skipped, and SSR is a no-op. * * @example * ```ts * announce(`${results.length} results available`); * announce('Upload failed', 'assertive'); * ``` */ export declare function announce(message: string, politeness?: AnnouncePoliteness): void; /** Clears live region(s); pass politeness to clear one only. */ export declare function clearAnnouncements(politeness?: AnnouncePoliteness): void; /** Stable `announce` and `clear` for dependency arrays. */ export interface LiveAnnouncerApi { announce: (message: string, politeness?: AnnouncePoliteness) => void; clear: (politeness?: AnnouncePoliteness) => void; } /** * Hook form; returns stable pair for dependency arrays. * * @example * ```tsx * const { announce } = useLiveAnnouncer(); * React.useEffect(() => announce(`${count} results available`), [count, announce]); * ``` */ export declare function useLiveAnnouncer(): LiveAnnouncerApi; /** Props for LiveAnnouncer. */ export interface LiveAnnouncerProps { /** Announced when changed; empty string announces nothing. */ message: string; /** * Which live region to use. * @default 'polite' */ politeness?: AnnouncePoliteness | undefined; } /** * Declarative announcer; announces message on change. * * @example * ```tsx * * ``` */ export declare function LiveAnnouncer({ message, politeness }: LiveAnnouncerProps): null; export declare namespace LiveAnnouncer { var displayName: string; }