import { r as SummaryStrings } from "./summary-D8UEQXYr.js"; import { n as Format } from "./format-Dq02z5ZL.js"; import { CSSProperties, ReactNode } from "react"; //#region src/core/strings-win-prob-worm.d.ts type WinProbWormStrings = Pick; //#endregion //#region src/charts/win-prob-worm/geometry.d.ts interface WinProbWormGeometry { /** The resolved y-domain. The annotations frame reads it so a caller's * `domain` moves the thresholds with the worm instead of leaving them on * the default 0-100 axis. */ domain: readonly [number, number]; /** Leading (>50) stretches — one of accent strokes. */ aboveD: string; /** Trailing (<50) stretches — one of neutral strokes. */ belowD: string; /** y of the 50% midline (= height/2 on the default frame + symmetric pad). */ midY: number; /** Interpolated 50% crossings — the lead changes. */ crossings: { x: number; y: number; }[]; /** Endpoint ("now") marker + its clamped value, or null when no finite point. */ end: { x: number; y: number; value: number; } | null; /** Largest |Δ| between consecutive finite points (the momentum swing). */ swing: { i: number; x: number; yFrom: number; yTo: number; delta: number; } | null; /** Lead-change count (= crossings.length). */ flips: number; /** Last finite value (clamped) + its index, for the summary/readout. */ last: number | null; lastIndex: number; /** min/max of the clamped finite values (allEqual ⇒ min === max). */ minV: number; maxV: number; n: number; width: number; height: number; } /** Reserve a right gutter for the endpoint "last" label (shared with the client). */ declare function wormGutter(text: string, font: number): number; declare function winProbWormSummary(geo: WinProbWormGeometry, fmt: (v: number) => string, strings: WinProbWormStrings, sides: readonly [string, string], /** Percent formatter (FRACTION in) for the probabilities. */ pctFmt?: (fraction: number) => string): string; //#endregion //#region src/charts/win-prob-worm/index.d.ts interface WinProbWormProps { /** A single win-probability series, clamped to 0–100 (out-of-range dev-warns). */ data: readonly (number | null)[]; /** Probability extent — the y-axis. Default [0, 100], the full range. */ domain?: readonly [number, number] | undefined; /** Names for the two sides — [`>50`, `<50`]. Default `["A", "B"]`. */ sides?: readonly [string, string] | undefined; /** `"last"` prints the current leader's probability at the endpoint. */ label?: "last" | "none" | undefined; /** Mark the biggest momentum swing (default true; seat-gated). */ markSwing?: boolean | undefined; format?: Format | undefined; locale?: string | string[] | undefined; width?: number | undefined; height?: number | undefined; color?: string | undefined; strings?: WinProbWormStrings | 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 WinProbWorm(props: WinProbWormProps): ReactNode; //#endregion export { WinProbWormStrings as a, wormGutter as i, WinProbWormProps as n, winProbWormSummary as r, WinProbWorm as t };