import type { LayerEntry, PortalLayerRoot } from '../../contracts/preferences.js'; export interface LayerItem extends LayerEntry { id: string; /** Return `false` to leave the native Escape event to the caller's own handler (transitional: overlays whose root has not wired the stack-close action yet). Any other return value consumes the key. */ onEscape: () => void | boolean; /** Element focus returns to on pop; false disables restore. Defaults to the element focused when the layer opened (captured by useLayer). */ restoreFocusTo?: Element | false | null; /** false = inert only, no scroll lock (non-blocking modal surfaces). */ lockScroll?: boolean; /** Inert below this layer without a scroll lock (DismissableLayer's disableOutsidePointerEvents — the replacement for body inline styles). */ pointerLockOutside?: boolean; /** Outside pointerdown, delivered only while this is the topmost open entry. */ onPointerDownOutside?: (event: Event) => void; /** Outside focusin, delivered only while this is the topmost open entry. */ onFocusOutside?: (event: FocusEvent) => void; } export type LayerItemInput = Omit; export interface LayerStack { push(entry: LayerItemInput): string; update(id: string, entry: Partial): void; pop(id: string): void; top(): LayerItem | undefined; depth(id: string): number; isTop(id: string): boolean; subscribe(listener: () => void): () => void; dispose(): void; } export declare const createLayerStack: (doc: Document) => LayerStack; export declare const layerRootForKind: (kind: LayerEntry["kind"]) => PortalLayerRoot; export declare const layerStackFor: (doc: Document) => LayerStack; //# sourceMappingURL=LayerStack.d.ts.map