import { WorkflowTableColumnFormat, WorkflowRenderedTableData, WorkflowTableColumnFormatKind } from '../../types/memory.js'; type NumericCellValue = number | null; type RecordCellValue = string | number | null; type RecordTableRow = Record; type MatrixTable = Record>; type ParsedMatrixFormula = { raw: string; target: string; type: "col_sum"; args: string[]; } | { raw: string; target: string; type: "row_sum"; args: string[]; } | { raw: string; target: string; type: "row_share"; args: [string, string]; } | { raw: string; target: string; type: "row_ratio"; args: [string, string]; } | { raw: string; target: string; type: "row_delta" | "row_rate" | "row_growth"; args: [string, string]; } | { raw: string; target: string; type: "col_share"; args: [string, string]; } | { raw: string; target: string; type: "col_ratio"; args: [string, string]; } | { raw: string; target: string; type: "col_delta" | "col_rate" | "col_growth"; args: [string, string]; }; type RecordExpressionOperand = { kind: "column"; name: string; } | { kind: "number"; value: number; }; type ParsedRecordFormula = { raw: string; type: "expression"; target: string; operands: RecordExpressionOperand[]; operators: Array<"+" | "-" | "*" | "/">; } | { raw: string; type: "sum"; target: string; columns: string[]; } | { raw: string; type: "total"; columns: string[]; }; type MatrixDefinition = { layout: "matrix"; rowHeader: string; rows: string[]; visibleRows: string[]; columns: string[]; visibleColumns: string[]; columnFormats: Record; rowFormats: Record; sourceRows: string[]; sourceColumns: string[]; computedRowTargets: Set; computedColumnTargets: Set; comparisonRowTargets: Set; comparisonColumnTargets: Set; percentRows: Set; percentColumns: Set; formulas: ParsedMatrixFormula[]; }; type RecordDefinition = { layout: "records"; columns: string[]; visibleColumns: string[]; columnFormats: Record; sourceColumns: string[]; computedColumns: Set; percentColumns: Set; formulas: ParsedRecordFormula[]; totalFormula?: Extract; }; type WorkflowTableDefinition = MatrixDefinition | RecordDefinition; type WorkflowTableRenderResult = { content: string; data: WorkflowRenderedTableData; }; type ResolvedColumnFormat = { kind: WorkflowTableColumnFormatKind; grouping: boolean; /** undefined = preserve the value's own decimal precision (capped). */ decimals: number | undefined; prefix: string; suffix: string; nullDisplay: string; }; type MatrixCellRef = `${string}::${string}`; declare function isFiniteNumber(value: unknown): value is number; declare function parseNumberish(value: unknown): NumericCellValue; declare function parseRecordCell(value: unknown, format?: WorkflowTableColumnFormat): RecordCellValue; declare function formatNumber(value: number, options: { grouping: boolean; decimals: number | undefined; }): string; declare function safeDivide(numerator: NumericCellValue, denominator: NumericCellValue, warnings: string[], context: string, multiplier?: number): NumericCellValue; declare function looksPercentLike(value: string): boolean; export { type MatrixCellRef, type MatrixDefinition, type MatrixTable, type NumericCellValue, type ParsedMatrixFormula, type ParsedRecordFormula, type RecordCellValue, type RecordDefinition, type RecordExpressionOperand, type RecordTableRow, type ResolvedColumnFormat, type WorkflowTableDefinition, type WorkflowTableRenderResult, formatNumber, isFiniteNumber, looksPercentLike, parseNumberish, parseRecordCell, safeDivide };