/** * IR snapshot — the headless-testing surface. `snapshotIR(html)` resolves a * manifest to its layer IR (the same pipeline the live reconciler runs: * schema lookup, ordered attribute resolution, accessor compilation, * updateTrigger fingerprinting) WITHOUT a deck.gl instance, a WebGL context, * a network fetch, or a mounted element. Two audiences: * * - CI / unit tests: assert "this manifest produces these layers with * these props and these behavioural fingerprints" in jsdom/happy-dom — * no browser-mode runner needed. (Rendering itself still needs real * WebGL; this covers everything up to the deck.gl handoff.) * - Agent self-verification: `OmMap.validate()` says whether a manifest * is well-formed; `snapshotIR()` says what it MEANS — the resolved, * deterministic descriptor an agent can diff against its intent. * * The output is deliberately JSON-safe and deterministic: compiled accessor * functions are represented by their `${shape}|${source}` updateTrigger * fingerprint (the reconciler's own "complete behavioural specification"), * so two manifests snapshot equal iff the reconciler would treat them as * behaviourally identical. Data is summarized as a row count — inline rows * are resolved (shape detection needs them), URL data is never fetched * (snapshots are side-effect-free; a URL-backed layer shows the same empty * placeholder the live Q6 pre-fetch state has). */ import type { LayerIR, LayerMeta, LayerFilter, LayerCategoryFilter, LayerAssetState } from "./ir"; import type { Shape } from "./expr"; export interface LayerIRSnapshot { id: string; type: string; shape: Shape; /** Present when the layer declares a `data` URL — never fetched here. */ dataUrl?: string; /** A `{z}/{x}/{y}` tile URL template (TileLayer/MVTLayer `data`), passed through to deck verbatim. Part of the layer's meaning — locked here. */ tileData?: string; /** Async non-row asset state. Snapshot mode never fetches, so EXIF overlays without bounds are pending. */ asset?: LayerAssetState; /** Resolved row count: inline JSON rows, or 0 for URL-backed/absent data. */ rows: number; meta: LayerMeta; filter?: LayerFilter; categoryFilter?: LayerCategoryFilter; /** Per-layer terrain mode when authored (`terrain` attribute) — absent = the type default. */ terrain?: "drape" | "offset" | "off"; /** * Resolved deck.gl props, made JSON-safe: compiled accessors appear as * their updateTrigger fingerprint (`[accessor |]`), other * non-plain values (e.g. a DataFilterExtension instance) as * `[]`. Scalars/arrays/plain objects pass through as-is. */ props: Record; updateTriggers: Record; } /** Convert one already-resolved layer IR to the public deterministic JSON-safe form. */ export declare function snapshotLayerIR(ir: LayerIR): LayerIRSnapshot; /** * Resolves a manifest to JSON-safe layer IR snapshots. * * Accepts an HTML string (parsed via DOMParser — in node, run under a DOM * test environment like happy-dom/jsdom) or an already-parsed element: the * `` itself, or any ancestor/document containing one. Layers are * returned in manifest order — the same order the reconciler hands deck.gl. */ export declare function snapshotIR(manifest: string | Element | Document): LayerIRSnapshot[];