import { o as ColumnDef } from "./types-Cqk1_BXq.cjs"; import { ReactElement, ReactNode } from "react"; //#region src/columns/sparkline.d.ts /** The three marks this entry draws. */ type SparklineKind = "bar" | "line" | "area"; /** Props for {@link Sparkline}. */ interface SparklineProps { /** The series, oldest first. Non-finite values are dropped. */ values: readonly number[]; /** Default `"line"`. */ kind?: SparklineKind; /** SVG width in CSS pixels. Default 80. */ width?: number; /** SVG height in CSS pixels. Default 28. */ height?: number; /** Stroke / bar fill. Default `currentColor` so the kit theme wins. */ color?: string; /** Accessible summary. Defaults to {@link sparklineSummary}. */ label?: string; } /** How {@link sparklineColumn} is declared. */ interface SparklineColumnSpec { key: string; header?: ReactNode; /** The series on this row. */ values: (row: TRow) => readonly number[]; kind?: SparklineKind; width?: number; height?: number; color?: string; /** Override the default numeric summary. */ label?: (values: readonly number[], row: TRow) => string; /** Extra ColumnDef fields. Accessor / sort / export from this helper win. */ column?: Partial>; } /** Drop NaN / Infinity so a bad point cannot collapse the scale. */ declare function finiteSparklineValues(values: readonly number[]): number[]; /** Default accessible summary — numbers only, so it is locale-neutral. */ declare function sparklineSummary(values: readonly number[]): string; /** CSV / xlsx fallback — the numbers, not the SVG. */ declare function sparklineExportValue(values: readonly number[]): string; /** * A mini chart sized to a cell. Fixed width/height — no observers — so a * virtualized row can mount and unmount it without measuring. */ declare function Sparkline({ values, kind, width, height, color, label }: Readonly): ReactElement; /** * A column whose cell is a sparkline. * * Sort and export read the numbers, never the SVG. */ declare function sparklineColumn(spec: SparklineColumnSpec): ColumnDef; //#endregion export { Sparkline, type SparklineColumnSpec, type SparklineKind, type SparklineProps, finiteSparklineValues, sparklineColumn, sparklineExportValue, sparklineSummary }; //# sourceMappingURL=sparkline.d.cts.map