import type { WidgetAccent, WidgetFormat } from '../dashboard-types'; export interface WidgetFormatCtx { format?: WidgetFormat; locale?: string; currency?: string; } /** * Formats a scalar/series value with the widget's declared format. `currency` * uses the org currency + locale (same fallback chain as table cells); `percent` * treats the value as a fraction (0.142 → "14.2%"); `compact` uses Intl compact * notation (1_200 → "1.2K"). */ export declare function formatWidgetValue(value: number, { format, locale, currency }: WidgetFormatCtx): string; /** Axis-tick formatter — always compact so charts stay legible. */ export declare function formatAxisTick(value: number, { format, locale, currency }: WidgetFormatCtx): string; /** Formats the compare delta fraction (0.142 → "+14.2%"). */ export declare function formatDelta(delta: number, locale?: string): string; export interface AccentClasses { /** Icon chip background + foreground. */ chip: string; /** Text color for accented labels. */ text: string; /** Solid bar/fill background (progress, list proportion). */ bar: string; /** Soft track background behind a bar. */ track: string; /** Hex-ish CSS color used for recharts stroke/fill (var-based). */ chartVar: string; } /** Resolves the accent class bundle, defaulting to `sky`. */ export declare function accentClasses(accent?: WidgetAccent): AccentClasses; /** * A categorical palette for multi-series charts (pie/donut/bar by bucket). * Cycles the accent chart vars so slices stay theme-aware + dark-mode safe. */ export declare const CHART_PALETTE: string[]; /** Picks a palette color by index, wrapping around. */ export declare function paletteColor(index: number): string; /** Grid/axis muted color from the theme (works in light + dark). */ export declare const CHART_MUTED = "var(--muted-foreground, #94a3b8)"; export declare const CHART_GRID = "var(--border, #e2e8f0)"; //# sourceMappingURL=widget-format.d.ts.map