import { r as SummaryStrings } from "./summary-D8UEQXYr.js"; import { CSSProperties, ReactNode } from "react"; //#region src/core/strings-pareto.d.ts type ParetoStrings = Pick; //#endregion //#region src/charts/pareto-strip/geometry.d.ts interface ParetoBar { x: number; width: number; y: number; height: number; label: string; /** Raw magnitude for this bar (the rolled-up sum for "Other"). */ value: number; share: number; cum: number; vital: boolean; } interface ParetoGeometry { bars: ParetoBar[]; /** * Indices of the bars that actually paint (height > 0). A zero-magnitude * category — or every category, on an all-zero dataset — draws nothing, so * this is also the set of navigable units: hover must not outline a bar the * reader cannot see. */ painted: number[]; line: { d: string; }; thresholdY: number | null; /** First bar whose cumulative share ≥ threshold. */ crossing: { index: number; x: number; } | null; other: { count: number; share: number; } | null; /** Categories reaching the threshold + original category count. */ vitalCount: number; n: number; cumAtCrossing: number; topLabel: string; topShare: number; degenerate: boolean; labelX: number; totalWidth: number; } //#endregion //#region src/charts/pareto-strip/index.d.ts /** Cumulative + per-bar shares go through `Intl`'s own percent style. The old * `${Math.round(frac * 100)}%` was an en-US percent (fr-FR wants a NBSP before * the sign, tr-TR puts it first). `locale` is the chart's own prop, threaded so * a server render and its client hydration resolve the same string instead of * each taking its host default. Trailing and optional: callers that never * localized keep compiling. */ declare const paretoPercent: (locale?: string | string[] | undefined) => ((fraction: number) => string); declare function paretoSummary(geo: ParetoGeometry, opts: { unit: string; metric: string; }, strings: ParetoStrings, pct?: (fraction: number) => string): string; interface ParetoStripProps { /** Categories with magnitudes (a composition — values ≥ 0). */ data: readonly { label: string; value: number; }[]; /** Cumulative reference line % (default 80; `false` turns it off). */ threshold?: number | false | undefined; /** Categories beyond `maxItems` roll up into Other (default 8). */ maxItems?: number | undefined; /** Category noun for the summary (default "causes"). */ unit?: string | undefined; /** Total-metric noun for the summary (default "the total"). */ metric?: string | undefined; /** `"count"` states "K of N → cum%" in a gutter. */ label?: "count" | "none" | undefined; width?: number | undefined; height?: number | undefined; color?: string | undefined; locale?: string | string[] | undefined; strings?: ParetoStrings | undefined; /** Minimum in-chart label size, in viewBox units. Geometry sizes labels from * the mark and floors them at 7; this raises that floor and moves the * reserved gutter with it. A label the box cannot seat at the raised floor * drops rather than shrinking back under it. */ labelSize?: number | undefined; title?: string | undefined; summary?: string | false | undefined; id?: string | undefined; className?: string | undefined; style?: CSSProperties | undefined; children?: ReactNode | undefined; } declare function ParetoStrip(props: ParetoStripProps): ReactNode; //#endregion export { ParetoStrings as a, paretoSummary as i, ParetoStripProps as n, paretoPercent as r, ParetoStrip as t };