export interface DialogControllerOptions { /** * Accessible label shown to assistive technology. If omitted * the controller looks for an element inside `root` referenced * via `aria-labelledby`. */ label?: string; /** * If true (default) the controller uses `HTMLDialogElement.showModal()` * when `root` is a `` element. When false, or when the root * is not a dialog, the controller falls back to `inert` on siblings. */ useNativeDialog?: boolean; /** Lock page scroll while open (default true). */ lockScroll?: boolean; /** Called when the user dismisses via ESC / backdrop. */ onDismiss?: (reason: "escape" | "backdrop") => void; } export declare class DialogController { private readonly root; private readonly opts; private readonly trap; private readonly inertTargets; private closeWatcher; private open; private readonly onKeyDown; private readonly onDialogCancel; constructor(root: HTMLElement, opts?: DialogControllerOptions); show(): void; hide(): void; get isOpen(): boolean; destroy(): void; [Symbol.dispose](): void; private installCloseWatcher; private teardownCloseWatcher; private shouldUseNative; private applyAriaBaseline; /** * Walk from the root up toward and mark every sibling along * the way `inert`. This matches the ARIA APG Dialog (Modal) pattern * — the only element reachable to AT/keyboard is the dialog itself. * * Walking ancestors (rather than only `document.body.children`) * matters when the consumer attaches the viewer inside a custom * container: the viewer's own ancestors must stay interactive for * the root to remain focusable, while everything *beside* them at * each level becomes inert. */ private applyInertSiblings; private releaseInertSiblings; }