export interface OverlayStackEntry { /** The overlay's outermost rendered element (its portal root). */ el: HTMLElement; /** The parent overlay's element, if this overlay was opened from inside another. */ parent: HTMLElement | null; } /** * Subscribe to register/unregister changes. Used by the background-inert pass * so an open dialog re-reconciles when a sibling overlay (e.g. a stacked modal * or an in-modal popup) opens or closes, and is never left inert. * Returns an unsubscribe function. */ export declare function subscribeOverlayStack(listener: () => void): () => void; /** * Register an open overlay. Returns an unregister function. * `parent` is the element of the overlay this one was opened from (or null for * a top-level overlay) — typically resolved via {@link findOverlayContaining} * on the new overlay's anchor/trigger. */ export declare function registerOverlay(el: HTMLElement, parent?: HTMLElement | null): () => void; export declare function unregisterOverlay(el: HTMLElement): void; /** Every currently-open overlay root element. Used to exclude them from background inert. */ export declare function getActiveOverlayPortals(): HTMLElement[]; /** * The innermost registered overlay whose element contains `node`, or null. * Used to resolve a new overlay's parent from its anchor/trigger element. */ export declare function findOverlayContaining(node: Node | null): HTMLElement | null; /** * True if `target` is inside `rootEl` OR inside any overlay that descends from * `rootEl` through the registered parent chain. This is the "family" test for * close-on-click-outside: a click in a child/grandchild popup is inside the * family of its ancestor, even though the DOM portals make them body siblings. */ export declare function isInOverlayFamily(target: Node, rootEl: HTMLElement): boolean; /** All focusable-relevant descendant overlay roots of `rootEl` (direct + transitive children). */ export declare function getDescendantOverlays(rootEl: HTMLElement): HTMLElement[]; /** test cleanup */ export declare function resetOverlayStack(): void;