/** * Pure helpers that turn chart data into a localized screen-reader text * alternative (WCAG 1.1.1). No JSX — filename pascal is intentionally NOT * exported, so this is not a catalog primitive. */ import type { ChartDatum, ChartSeriesProp, HeatmapCategory, HeatmapDatum } from "../../props/components/charts.prop.js"; type Formatter = Intl.NumberFormat; export type ChartSummary = { rows: string[]; img: string; }; /** Build the per-category rows + a one-line summary for a cartesian chart. */ export declare function buildCartesianSummary(data: ChartDatum[], series: ChartSeriesProp[], categoryKey: string, fmt: Formatter, list: Intl.ListFormat, summaryLine: (counts: { series: number; points: number; }) => string): ChartSummary; /** * Build the "category: value" rows for a SINGLE-series chart (pie slices, a * compact bar trend…). `annotate` decorates the row of a highlighted datum — * a text alternative for an emphasis that is otherwise colour-only (WCAG 1.4.1). */ export declare function buildSeriesRows(data: ChartDatum[], categoryKey: string, valueKey: string, fmt: Formatter, annotate?: (index: number) => string | undefined): string[]; /** Build the per-slice rows + a one-line summary for a pie chart. */ export declare function buildPieSummary(data: ChartDatum[], dataKey: string, nameKey: string, fmt: Formatter, summaryLine: (counts: { slices: number; }) => string): ChartSummary; /** Build the per-category rows + a one-line summary for a single-series trend. */ export declare function buildTrendSummary(data: ChartDatum[], categoryKey: string, valueKey: string, fmt: Formatter, summaryLine: (counts: { points: number; }) => string, annotate?: (index: number) => string | undefined): ChartSummary; /** * Normalize raw values to 0..1 bar ratios against the largest magnitude. * Negative values plot at the baseline (a compact trend has no negative axis) but * still read their true figure in the text alternative. */ export declare function trendRatios(data: ChartDatum[], valueKey: string): number[]; /** * Resolve `emphasizedIndex` against a row count. Negative counts from the end (`-1` = the latest * datum). */ export declare function resolveEmphasizedIndex(index: number | undefined, length: number): number; /** Number of steps in the `--chart-heat-1..N` ramp. */ export declare const HEAT_STEPS = 5; /** The lookup key of one heatmap cell. */ export declare function heatmapCellKey(row: string | number, column: string | number): string; export type HeatmapModel = { /** Finite values by cell key. A key that is absent is an EMPTY cell, never a zero. */ values: Map; /** Ramp step 1..HEAT_STEPS by cell key. */ steps: Map; /** 1-based rank of the top-N cells by cell key. */ ranks: Map; /** Scale domain: `min(0, smallest)` .. largest. */ min: number; max: number; /** Count of cells with a value inside the rows × columns matrix. */ present: number; /** Count of matrix cells with no value. */ empty: number; /** The highest cell, for the one-line summary. */ highest: { row: HeatmapCategory; column: HeatmapCategory; value: number; } | null; }; /** * Bin a heatmap's cells onto the sequential ramp. The domain starts at zero (or the smallest value, * when that is negative) so the fill encodes MAGNITUDE — a heatmap of 900..1000 whose 900 painted * as "empty-light" would read as a quiet hour. Cells outside `rows` × `columns` are ignored. */ export declare function buildHeatmapModel(rows: HeatmapCategory[], columns: HeatmapCategory[], data: HeatmapDatum[], topN?: number): HeatmapModel; export {};