import { type CellRead } from '../../core/grid/index.js'; import { type ColumnState, type RowNode } from '../../core/types/index.js'; import type { FormatRule, FormatTarget, PivotCrossing } from './conditional-formatting.types.js'; export interface ScaleStats { kind: 'scale'; min: number; max: number; } export interface KeyStats { kind: 'keys'; keys: Set; } export interface ThresholdStats { kind: 'threshold'; value: number | null; } interface ExpressionStats { kind: 'expression'; cache: Map; } export type RuleStats = ScaleStats | KeyStats | ThresholdStats | ExpressionStats | null; export declare function columnMap(columns: readonly ColumnState[]): ReadonlyMap>; export interface StatSource { nodesFor: (target: FormatTarget | undefined) => readonly RowNode[]; columnsFor: (target: FormatTarget | undefined) => readonly ColumnState[]; } export interface StatSourceInput { columns: ReadonlyMap>; rows: readonly RowNode[]; gathered?: readonly RowNode[]; measureOf?: (columnId: string) => number | undefined; } export declare const aimedAtACrossing: (target: FormatTarget | undefined) => target is PivotCrossing; export declare function statSource(input: StatSourceInput): StatSource; export declare function computeStats(rules: readonly FormatRule[], source: StatSource, read?: CellRead): RuleStats[]; export declare const NUMERIC_KINDS: readonly FormatRule['kind'][]; export declare function hasNumbers(nodes: readonly RowNode[], column: ColumnState | undefined, read?: CellRead, sample?: number): boolean; export declare function sampleDataRows(nodes: readonly RowNode[], limit: number): RowNode[]; export declare function dataRowsOf(nodes: readonly RowNode[], isData: (node: RowNode) => boolean): RowNode[]; export {};