import { c as Value } from "./summary-D8UEQXYr.js"; import { n as Format } from "./format-Dq02z5ZL.js"; import { t as QuantileStrings } from "./strings-quantile-DZDgt6TO.js"; import { CSSProperties, ReactNode } from "react"; //#region src/charts/percentile-ladder/geometry.d.ts interface LadderTick { p: number; value: number; x: number; /** 0..k-1, tail highest — drives graduated emphasis (height + color). */ emphasis: number; /** Half-height of this tick around the track (taller = more emphasis). */ half: number; } interface PercentileLadderGeometry { track: { x0: number; x1: number; y: number; }; ticks: LadderTick[]; /** The sample's median — what "× the median" measures against, in both entries. Unrounded. */ median: number; /** last tick value / the median, 2-dp; 0 when the median is 0. */ ratio: number; /** Log scale actually applied (falls back to linear on any value ≤ 0). */ log: boolean; /** Placement of the in-chart `log` tag (left gutter), or null. */ logTag: { x: number; y: number; } | null; /** All tick values coincide → render one tick. */ collapsed: boolean; labelY: number; /** Plot box (viewBox y): the reach of the tallest tick either side of the * track. Fixed by `height` alone — never the drawn ticks, whose halves vary * with the percentile count. */ y0: number; y1: number; } //#endregion //#region src/charts/percentile-ladder/index.d.ts declare function ladderSummary(geo: PercentileLadderGeometry, fmt: (n: number) => string, ratioFmt: (n: number) => string, strings: QuantileStrings, /** Percent formatter (FRACTION in) for the tail share. Two fraction digits so * a p99.5 ladder still reads "0.5%"; a literal `${n}%` was an en-US percent. */ tailFmt?: (fraction: number) => string): string; interface PercentileLadderProps { /** Raw sample; the component derives the quantiles. */ data: readonly Value[]; /** * Percentiles to mark (default `[50, 90, 99]`, 2–4 entries). Each must sit * strictly between 0 and 100; anything else drops, and a `ps` with nothing * left falls back to the default rather than rendering an empty chart. */ ps?: readonly number[] | undefined; /** `"linear"` (default) | `"log"` for long tails (falls back on any value ≤ 0). */ scale?: "linear" | "log" | undefined; /** What the tick labels state (default `"ps"`). */ label?: "values" | "ps" | "both" | "none" | undefined; /** Tick marks (default) or dot marks — dots read calmer over dense text. */ marks?: "tick" | "dot" | undefined; domain?: readonly [number, number] | undefined; width?: number | undefined; height?: number | undefined; color?: string | undefined; format?: Format | undefined; locale?: string | string[] | undefined; strings?: QuantileStrings | 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 const ladderFont: (height: number, min?: number | undefined) => number; /** Seats the tick labels, SPREAD FIRST: at most four rungs share the row, so * nudging the labels apart to a minimum pitch keeps all of them rather than * losing one to its neighbour. A spread stands only while every label stays no * nearer another tick than the one it names; past that the reader matches the * label to the wrong rung, which is a misread, not a layout. Where the spread * fails, step two seats each label at its own tick, clamped inside the frame, * under that same rule — interiors first, dropping (→ null) whatever still * collides. A dropped end still reads: the tail tick is the tallest and carries * the flag ink, p50 is the floor. A dropped interior reads as nothing, so it * goes last. * * Step two, run endpoints-first, used to be the whole layout, and the interior * was structurally the loser: at the default 80×12 the chart dropped p90 and * showed two of its own three default percentiles. * */ declare function ladderLabelLayout(geo: PercentileLadderGeometry, texts: readonly string[], width: number, font: number): (number | null)[]; declare function PercentileLadder(props: PercentileLadderProps): ReactNode; //#endregion export { ladderSummary as a, ladderLabelLayout as i, PercentileLadderProps as n, ladderFont as r, PercentileLadder as t };