export type PageHeatmapMode = "revenue" | "clicks" | "scroll"; export type PageHeatmapClick = { selector: string; rx: number; ry: number; weight: number; }; export type PageHeatmapScrollBucket = { pct: number; views: number; }; export type PageHeatmapBadge = { selector: string; label: string; hot: boolean; }; export type PageHeatmapSetMessage = { type: "replo:heatmap:set"; protocolVersion: 1; setId: string; mode: PageHeatmapMode; clicks: PageHeatmapClick[]; scroll: PageHeatmapScrollBucket[]; badges: PageHeatmapBadge[]; fold: number | null; }; export type PageHeatmapFocusMessage = { type: "replo:heatmap:focus"; selector: string | null; }; export type PageHeatmapClearMessage = { type: "replo:heatmap:clear"; }; export type PageHeatmapRequestReadyMessage = { type: "replo:heatmap:requestReady"; }; export type PageHeatmapParentMessage = PageHeatmapSetMessage | PageHeatmapFocusMessage | PageHeatmapClearMessage | PageHeatmapRequestReadyMessage; export type PageHeatmapReadyMessage = { type: "replo:heatmap:ready"; protocolVersion: 1; }; export type PageHeatmapElementSection = { selector: string; section: string; }; export type PageHeatmapDrawnMessage = { type: "replo:heatmap:drawn"; setId: string; placedWeight: number; unplacedWeight: number; sections: PageHeatmapElementSection[]; }; export type PageHeatmapElementClickedMessage = { type: "replo:heatmap:elementClicked"; selector: string | null; }; export type PageHeatmapIframeMessage = PageHeatmapReadyMessage | PageHeatmapDrawnMessage | PageHeatmapElementClickedMessage;