import type * as React from 'react'; import type { Transparency, DomTier } from './material.js'; import type { MotionPreference } from './motion.js'; export type Scheme = 'light' | 'dark'; export type Contrast = 'standard' | 'more'; export type Density = 'compact' | 'regular' | 'spacious'; export interface PreferenceValues { transparency: 'system' | Transparency; glassOpacity: number; contrast: 'system' | Contrast; motion: 'system' | MotionPreference; scheme: 'system' | Scheme; density: Density; allowContinuous: boolean; forcedColors: boolean; reducedMotionOS: boolean; reducedTransparencyOS: boolean; contrastMoreOS: boolean; coarsePointer: boolean; } export type PreferenceKey = keyof PreferenceValues; export type UserSettableKey = 'transparency' | 'glassOpacity' | 'contrast' | 'motion' | 'scheme' | 'density' | 'allowContinuous'; export interface ResolvedPreferences { transparency: Transparency; contrast: Contrast; motion: MotionPreference; scheme: Scheme; density: Density; glassOpacity: number; tier: DomTier; allowContinuous: boolean; floors: { transparency: Transparency; motion: MotionPreference; }; } export declare const SERVER_SNAPSHOT: PreferenceValues; export declare const STORAGE_KEY: "ag:prefs:v1"; export declare const LEGACY_STORAGE_KEY: "aura-glass-accessibility-settings"; export interface PreferenceStorage { get(key: string): string | null; set(key: string, v: string): void; remove?(key: string): void; } /** S-21 hooks */ export type UsePreference = (key: K) => PreferenceValues[K]; export type UseResolvedPreferences = () => ResolvedPreferences; export type UsePreferenceActions = () => { set(key: K, value: PreferenceValues[K]): void; reset(): void; }; /** S-22 provider and pre-paint script */ export interface AuraGlassProviderProps { children: React.ReactNode; transparency?: PreferenceValues['transparency']; glassOpacity?: number; contrast?: PreferenceValues['contrast']; motion?: PreferenceValues['motion']; scheme?: PreferenceValues['scheme']; density?: Density; allowContinuous?: boolean; tier?: 'auto' | DomTier; preset?: string; brand?: string; storage?: PreferenceStorage | null; portalContainer?: HTMLElement | null; toasts?: boolean; tooltips?: boolean; deprecations?: 'warn' | 'silent'; } export interface AuraGlassScriptProps { nonce?: string; storageKey?: string; defaults?: Partial>; } /** S-23 portal root. Rendered once per document by the outermost provider. */ export type PortalLayerRoot = 'overlay' | 'transient' | 'toast'; export type UsePortalContainer = (root?: PortalLayerRoot) => HTMLElement | null; export declare const PORTAL_ROOT_MARKUP: string; /** S-25 LayerStack: the ONLY Escape, inert and scroll-lock dispatcher. */ export type LayerKind = 'dialog' | 'alert-dialog' | 'sheet' | 'popover' | 'menu' | 'select' | 'combobox' | 'tooltip' | 'toast' | 'command-palette' | 'preview-card' | 'image-viewer' | 'drawer'; export interface LayerEntry { kind: LayerKind; modal: boolean; open: boolean; onEscape: () => void; element: HTMLElement | null; lockScroll?: boolean; } export type UseLayer = (entry: LayerEntry) => { id: string; depth: number; isTop: boolean; }; /** S-26 announcer (archived A11Y-054 shape: coalesces identical messages within 500 ms; a message with the same id replaces the queued one) */ export interface AnnounceOptions { politeness?: 'polite' | 'assertive'; id?: string; } export type UseAnnouncer = () => { announce(message: string, opts?: AnnounceOptions): void; clear(): void; }; /** S-24 */ export interface GlassPreferencesPanelProps { /** Preferences the panel offers; all user-settable keys when omitted. */ keys?: readonly UserSettableKey[]; /** Called with the key and value when the user changes a preference. */ onChange?: (key: UserSettableKey, value: unknown) => void; /** Class name merged onto the root element. */ className?: string; } //# sourceMappingURL=preferences.d.ts.map