export type CardAggregate = 'sum' | 'mean' | 'last' | 'max'; /** Observed values of a field, skipping gaps. */ export declare function valuesOf(rows: readonly Row[], key: string): number[]; /** One number for a period. `null` when nothing was observed, never zero. */ export declare function summarize(values: readonly number[], aggregate: CardAggregate): number | null; export interface CardFormatOptions { valueFormat?: Intl.NumberFormatOptions; locale?: string; formatValue?: (value: number) => string; formatAxisValue?: (value: number) => string; } export interface CardFormatters { /** Full value text for headlines, tiles, and pills. */ value: (value: number) => string; /** Compact text for axis labels. */ axis: (value: number) => string; /** Stable wrappers that always call the latest formatter, for memoized chart config. */ stable: { value: (value: number) => string; axis: (value: number) => string; }; /** Changes only when the format itself changes. */ key: string; } export declare function numberFormatters(locale: string, valueFormat?: Intl.NumberFormatOptions): { full: (value: number) => string; compact: (value: number) => string; plain: (value: number) => string; }; /** * Card number formatting: `valueFormat` options, or full control with `formatValue`. Inline * formatters are read through a ref so they never rebuild the chart model. */ export declare function useCardFormat({ valueFormat, locale, formatValue, formatAxisValue, }: CardFormatOptions): CardFormatters; /** Signed change text: +$1,200 or −$300. */ export declare function signedFormat(format: (value: number) => string): (value: number) => string;