import { A11yStrategyResolution, A11yTreeStrategy } from './a11y-tree.types'; /** * All registered strategies. The resolver picks from this list; callers that * need exhaustive enumeration (e.g. tests, Storybook knobs) can import this * constant directly. */ export declare const ALL_A11Y_STRATEGIES: A11yTreeStrategy[]; /** * Picks an `A11yTreeStrategy` from the runtime environment and returns the * full `A11yStrategyResolution` including confidence and a reason string. * * ## Browser-engine detection * * AT cannot be detected from JS (user privacy). We branch on *browser engine* * as a coarse proxy for the most likely AT pairing on each platform: * * | Engine | Assumed AT | Confidence | * |-----------|------------------------------|-------------------------| * | WebKit | VoiceOver (macOS/iOS) | medium on Apple, low elsewhere | * | Gecko | NVDA (Win), Orca (Linux) | medium on Win32, low elsewhere | * | Chromium | JAWS / NVDA / TalkBack | high on non-Apple, medium on Apple | * * An explicit `data-a11y-strategy` attribute on the host element is always * treated as `high` confidence (known override). If the override value does * not match any registered strategy name, the resolver falls back to baseline * with `low` confidence and logs an actionable warning. * * @param {HTMLElement} [host] - The component host element. When provided, its * `data-a11y-strategy` attribute is checked first. * @returns {A11yStrategyResolution} The resolved strategy with confidence and reason. */ export declare function resolveStrategyDetailed(host?: HTMLElement): A11yStrategyResolution; /** * Pure UA→strategy mapping. Separated from `resolveStrategyDetailed` so the * browser-engine detection table can be unit tested deterministically by * passing explicit `userAgent` / `platform` values instead of mocking the * global `navigator` (which build/test tooling may sandbox). * * @param {string | undefined} userAgent - The `navigator.userAgent` string, or * `undefined` for an SSR / non-browser environment. * @param {string} platform - The `navigator.platform` string (empty string when * unavailable). * @returns {A11yStrategyResolution} The resolved strategy with confidence and reason. */ export declare function resolveStrategyFromEnv(userAgent: string | undefined, platform: string): A11yStrategyResolution; /** * Convenience wrapper for callers that only need the resolved strategy. * Equivalent to `resolveStrategyDetailed(host).strategy` but additionally * emits a **dev-mode console warning** for `low`-confidence resolutions, * pointing engineers at the `data-a11y-strategy` override mechanism. * * The warning is rate-limited per `(strategyName, reason)` tuple to avoid * log spam on every render cycle. * * @param {HTMLElement} [host] - The component host element (optional). Used for * the `data-a11y-strategy` override check. * @returns {A11yTreeStrategy} The resolved strategy. */ export declare function resolveStrategy(host?: HTMLElement): A11yTreeStrategy;