/** Heat drawn over one document: heat canvas or scroll bands, revenue badges, focus ring and revenue clicks. */ import type { PageHeatmapElementSection, PageHeatmapSetMessage } from "../_vendor/schemas/generated/pageHeatmap"; export declare const HEAT_LAYER_HOST_ID = "replo-heat-layer"; export type HeatLayerSet = Omit; export interface HeatLayerDrawn { setId: string; placedWeight: number; unplacedWeight: number; sections: PageHeatmapElementSection[]; } export interface HeatLayer { /** Draws `set` (null clears the layer and stops observing the page). */ show: (set: HeatLayerSet | null) => void; /** Outlines one element and scrolls it into view when it's off screen; null hides the outline. */ focus: (selector: string | null) => void; destroy: () => void; } /** * Draws heat sets over `document`, which can be this page or a same-origin * iframe's. Inert until the first `show`. */ export declare function createHeatLayer({ document: doc, onDrawn, onElementClicked, shouldIgnoreClick, paintAsImage, }: { document: Document; /** Fires when what was placed changes, not on every re-measure. */ onDrawn: (drawn: HeatLayerDrawn) => void; /** Revenue mode: the innermost badged element under a page click, or null. */ onElementClicked: (selector: string | null) => void; shouldIgnoreClick?: (target: Node) => boolean; /** * A document without scripting (a sandboxed site snapshot) renders a canvas's fallback content, not * its bitmap, so the heat is drawn off-page and shown as an image. */ paintAsImage?: boolean; }): HeatLayer;