type Focusable = { focus: () => void; }; type VisuallyHiddenStyle = { position: "absolute"; width: string; height: string; padding: number; margin: string; overflow: "hidden"; clip: string; whiteSpace: "nowrap"; border: number; }; type TrapFocusOptions = { initialFocus?: HTMLElement | "first"; restoreFocus?: boolean; allowOutsideClick?: boolean; }; type RovingTabIndexOptions = { itemCount: number; getId?: (index: number) => string; orientation?: "horizontal" | "vertical" | "both"; loop?: boolean; initialIndex?: number; /** Called when the active index changes so consumers can re-render. */ onActiveIndexChange?: (index: number) => void; }; /** Screen-reader-only styles (no external CSS required). */ declare const visuallyHiddenStyle: VisuallyHiddenStyle; type FocusContainer = { querySelector(selectors: string): T | null; }; declare function prefersReducedMotion(): boolean; /** One-shot read of the prefers-reduced-motion media query. */ declare function getPrefersReducedMotionSnapshot(): boolean; /** Subscribe to OS reduced-motion preference changes; returns an unsubscribe function. */ declare function subscribeReducedMotion(listener: (reduce: boolean) => void): () => void; declare function getReducedMotionPreference(): "reduce" | "no-preference" | "unknown"; declare function shouldAnimate(opts?: { default?: boolean; }): boolean; declare function focusFirst(container: FocusContainer | null): boolean; declare function getFocusableElements(container: Element): HTMLElement[]; declare function trapFocus(container: HTMLElement, opts?: TrapFocusOptions): { activate: () => void; deactivate: () => void; }; declare function createRovingTabIndex(opts: RovingTabIndexOptions): { get activeIndex(): number; setActiveIndex: (next: number) => void; getItemProps: (index: number) => { tabIndex: 0 | -1; onKeyDown: (e: KeyboardEvent | { key: string; preventDefault: () => void; }) => void; onFocus: () => void; id?: string; }; }; export { type FocusContainer, type Focusable, type RovingTabIndexOptions, type TrapFocusOptions, type VisuallyHiddenStyle, createRovingTabIndex, focusFirst, getFocusableElements, getPrefersReducedMotionSnapshot, getReducedMotionPreference, prefersReducedMotion, shouldAnimate, subscribeReducedMotion, trapFocus, visuallyHiddenStyle };