/** * Data-lineage runtime that lives inside the sandboxed iframe, alongside the * element inspector. Unlike the inspector (which maps a clicked element to its * source location for AI edits and draws a crosshair overlay), this maps a * clicked element to the *query* that produced it (via the build-/render-time * `data-ld-query` stamp) and can highlight where a given query renders. * * Protocol (parent <-> iframe), all over postMessage: * iframe -> parent : lightdash:lineage:available (once the app has [data-ld-query] stamps) * parent -> iframe : lightdash:lineage:enable | :disable (click-select mode) * iframe -> parent : lightdash:lineage:selected {queryUuid} (on click, while enabled) * parent -> iframe : lightdash:lineage:highlight {queryUuid|null} (hover, any time) */ export type LineageSelectedMessage = { type: 'lightdash:lineage:selected'; queryUuid: string; }; export type LineageAvailableMessage = { type: 'lightdash:lineage:available'; /** Number of stamped elements at announce time. Always ≥ 1 — the parent * treats announces without it as legacy SDKs that announced with zero * stamps, and keeps the Inspect-data toggle disabled. */ stampCount: number; }; /** queryUuid of the nearest stamped ancestor of `el`, or null. */ export declare function resolveLineageTarget(el: Element | null): string | null; export declare function clearHighlight(): void; export declare function applyHighlight(queryUuid: string | null): void; /** * Mounts the lineage runtime. Idempotent. Mirrors `mountInspector`. */ export declare function mountLineage(parent: Window): void;