/** * Per-page coverage heatmap for Markdown reports. * * buildPageHeatmap() is a pure function — no I/O, no side-effects. * It derives a rows × dimensions matrix from GapAnalysis.gaps and sorts * rows worst-first (most critical coverage problems bubble to the top). * * Dimensions map to the GapSchema.category enum values so the heatmap * always stays in sync with what the scanner can produce. */ import type { Gap } from '../schemas/gap-analysis.schema.js'; /** The ordered set of gap categories that appear as heatmap columns. */ export declare const HEATMAP_DIMENSIONS: readonly ["untested-route", "a11y", "console-error", "broken-link", "coverage", "untested-api-endpoint", "auth-surface", "prompt-leakage"]; export type HeatmapDimension = (typeof HEATMAP_DIMENSIONS)[number]; /** Display labels for each dimension column header. */ export declare const DIMENSION_LABELS: Record; /** One cell in the heatmap: the worst severity for that page × dimension. */ export type HeatmapCell = { /** Worst Gap severity found, or null when no gap exists. */ worstSeverity: Gap['severity'] | null; /** Glyph to render in Markdown. */ glyph: string; /** Count of gaps contributing to this cell. */ count: number; }; /** One row in the heatmap: a page path and its per-dimension cells. */ export type HeatmapRow = { path: string; /** Map from dimension to cell. Guaranteed to contain every HEATMAP_DIMENSION key. */ cells: Record; /** Sum of severity scores across all cells — used for worst-first sort. */ worstScore: number; }; /** The full heatmap structure returned by buildPageHeatmap(). */ export type PageHeatmap = { /** Rows sorted worst-first (highest total severity score first). */ rows: HeatmapRow[]; /** Ordered dimension labels for use as column headers. */ dimensions: typeof HEATMAP_DIMENSIONS; /** Total number of gaps that fed into the heatmap. */ totalGaps: number; }; /** * Build a per-page coverage heatmap from a flat list of gaps. * * @param gaps The gaps array from GapAnalysis. * @returns A PageHeatmap with rows sorted worst-first. */ export declare function buildPageHeatmap(gaps: Gap[]): PageHeatmap; /** * Render a PageHeatmap as a Markdown section string. * Returns an empty string when there are no rows (nothing scanned). */ export declare function renderHeatmapSection(heatmap: PageHeatmap): string; //# sourceMappingURL=heatmap.d.ts.map