/** Semantic focus regions. The managed panel and Viewport are structural containers, not regions. */ export type NavigationRegionKind = 'search' | 'categories' | 'grid' | 'preview-skin-tone' | 'reactions'; export interface RegisteredRegion { readonly id: number; readonly kind: NavigationRegionKind; readonly element: Element; } export declare class NavigationRegistry { private nextId; private regions; private singletons; private generation; private disposed; /** * Register a region root. Returns an unregister function for unmount. * Duplicate singleton validation lives in the primitive layer; * the registry keeps every registration so that layer can adjudicate. */ register(kind: NavigationRegionKind, element: Element): () => void; /** Registrations in mount order; traversal follows DOM document order instead. */ getRegions(): readonly RegisteredRegion[]; getRegionsByKind(kind: NavigationRegionKind): readonly RegisteredRegion[]; /** * First registration wins. Later * duplicates are ignored by picker behavior. */ getAuthoritativeRegion(kind: NavigationRegionKind): RegisteredRegion | undefined; /** Current navigation generation. Pending async focus work captures this value. */ currentGeneration(): number; /** * Invalidate pending materialize/scroll/focus work. Called on accepted * search change, data/category change, geometry change, reactions * transition and Root unmount. Completions holding a stale token MUST NOT * move focus or scroll. */ invalidate(): void; isCurrent(token: number): boolean; /** * Revive a disposed registry when its Root remounts. The registry object * persists across remounts (held in a ref), but the unmount cleanup * disposes it — without a revive, every generation-guarded focus stays * dead after any remount (StrictMode double-mount included). Bumps the * generation so pre-unmount completions cannot fire post-remount. */ revive(): void; dispose(): void; /** * Claim a singleton primitive slot. * Returns true for the first claimant; later claimants are ignored by * picker behavior (dev throws, production warns once via * reportDuplicateRegion). */ claimSingleton(kind: string): boolean; releaseSingleton(kind: string): void; } export type DuplicateRegionPolicy = 'throw' | 'warn-once'; export declare function duplicateRegionPolicy(): DuplicateRegionPolicy; export declare function reportDuplicateRegion(kind: string): void; export declare function reportPortalRegion(kind: NavigationRegionKind): void; /** Test-only: reset warn-once sets between cases. */ export declare function __resetNavigationWarningsForTest(): void;