import { firstTabbable, getTabbable, isTabbable, lastTabbable } from "./focusable.mjs"; export interface FocusTrapOptions { /** * Element to receive focus when the trap is activated. * If omitted the first tabbable descendant is used. */ initialFocus?: HTMLElement | (() => HTMLElement | null); /** * When deactivating, restore focus to the element that was active * before activation. Defaults to true. */ returnFocus?: boolean; } /** * Minimal, spec-aligned focus trap. * * - Moves focus into `root` on activate(). * - Wraps Tab / Shift+Tab so focus cannot escape. * - On deactivate(), restores focus to the element that had it * before activation. * - Does not depend on `inert` — callers should apply `inert` to * siblings separately to hide them from AT. */ export declare class FocusTrap { private readonly root; private readonly opts; private previouslyFocused; private active; private readonly onKeyDown; constructor(root: HTMLElement, opts?: FocusTrapOptions); activate(): void; deactivate(): void; get isActive(): boolean; private resolveInitialFocus; } export { firstTabbable, getTabbable, isTabbable, lastTabbable };