declare function hasDOM(): boolean; export interface BoundedModal { root: HTMLElement; overlay: HTMLElement; panel: HTMLElement; content: HTMLElement; iframe: HTMLIFrameElement | null; iframeOrigin: string; iframeReady: boolean; onBackdrop: (() => void) | null; onIframeMessage: ((d: Record) => void) | null; chain: Promise; fitObserver: ResizeObserver | null; generation: number; onSupersede: (() => void) | null; } export declare function getModal(): BoundedModal; export declare function modalIsMounted(): boolean; export declare function showModal(m: BoundedModal): void; export declare function hideModal(m: BoundedModal, after?: () => void): void; export declare function setPanelHeight(m: BoundedModal, px: number): void; /** * Measure the currently mounted native content and tween the panel to fit it. * Re-fits automatically when the card's intrinsic height changes - notably after * the Newsreader/Schibsted web fonts swap in (which grows line boxes a few px * after first paint) and on inline view swaps (email -> OTP code -> success). */ export declare function fitPanelToContent(m: BoundedModal): void; /** Switch the modal into NATIVE-content mode: detach any iframe, mount `node`. */ export declare function mountContent(m: BoundedModal, node: HTMLElement): void; /** Get (or lazily create) the warm iframe for signer/hosted-page mode. */ export declare function ensureIframe(m: BoundedModal, url: string, origin: string): HTMLIFrameElement; /** * Destroy the warm signer iframe if one is currently mounted for `origin`, and report * whether there was one. Logout needs this: a signing session can live in that document's * MEMORY (the signer keeps an in-memory mirror when the browser blocks its storage), and a * throwaway iframe opened by the sweep can only ever clear the shared store, never another * document's memory. Removing the iframe discards its browsing context, which takes the * mirror with it. * * Deliberately does NOT call getModal(): that would BUILD a modal just to tear it down, on * every logout of every app, most of which never mounted one. */ export declare function detachWarmSignerIframe(origin: string): boolean; export declare function detachIframe(m: BoundedModal): void; export declare function ensureFonts(): void; export { hasDOM };