export declare const APP_SHELL_ID = "fika-shell"; export declare const APP_PORTALS_ID = "fika-portals"; export declare const EMBED_ROOT_CLASS = "fika-embed-root"; export declare function setFikaPortalTarget(target: HTMLElement | null): void; export declare function clearFikaPortalTarget(target: HTMLElement): void; /** Overlay mount for the standalone app. Never document.body — that is the page, not Fika. */ export declare function ensureAppPortalRoot(): HTMLElement; /** * Parent for offscreen work nodes (MathLive probes, raster stages). The embed * stylesheet is scoped under `.fika-embed-root`, so a node hung off * `document.body` would paint without MathLive/ProseMirror rules (fractions * collapse to a flat run). Mount inside the embed root when there is one. */ export declare function resolveOffscreenHost(): HTMLElement; export declare function getFikaPortalTarget(): HTMLElement; /** * Resolve the portal target for a *specific* embed instance. * * The module-level `portalTarget` only tracks the last-mounted embed, so when * several embeds coexist (e.g. multiple decks force-mounted side by side in a * host app) it points at the wrong one — overlays then render into a sibling * embed's portal, which the host may have hidden (`display:none`), so they * never appear. Resolving from the interacted element keeps each overlay in * its own embed. Falls back to the standalone portal root. */ export declare function resolveFikaPortalTarget(el?: Element | null): HTMLElement; /** * Pointer position and available space in the portal's own box. Menus are * absolutely positioned inside the portal (which spans the Fika root), so * viewport coordinates are translated into it. */ export declare function menuAxisFromEvent(event: MouseEvent, portal: HTMLElement): { x: number; y: number; width: number; height: number; }; export declare function queryFika(selector: string): T | null; export declare function queryFikaAll(selector: string): NodeListOf; /** * True when the event belongs to Fika (shell / embed), not a host overlay. * * Canvas clicks set editorAreaFocus but do not move DOM focus, so keydown/paste * land on document.body. Those document-level events are app-owned while Fika * is mounted. Foreign overlays (react-scan) focus their own nodes and stay out. */ export declare function isAppOwnedEvent(event: Event): boolean;