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-streak-spark.d.ts type StreakSparkStrings = Pick; //#endregion //#region src/charts/streak-spark/geometry.d.ts /** One trial: a boolean/number outcome, or `null` (a gap that breaks runs). */ type StreakDatum = number | boolean | null | undefined; /** Count-label placement: the current run, the record too, or neither. */ type StreakLabel = "current" | "both" | "none"; /** One placed run. `on` = a streak-outcome (ok) run; `!on` = a break (fail) run. */ interface StreakRun { x: number; y: number; width: number; height: number; /** true = streak outcome (ok) run; false = break (fail) run. */ on: boolean; /** number of trials collapsed into this run. */ len: number; /** first data index in the run (annotations, focus mapping). */ start: number; /** run position after capping (0-based). */ index: number; /** the most recent run. */ current: boolean; /** the longest streak-outcome run among those shown. */ record: boolean; } /** Faint placeholder for runs merged off the left when the cap is exceeded. */ interface StreakEllipsis { x: number; y: number; width: number; height: number; } interface StreakSparkGeometry { runs: StreakRun[]; ellipsis: StreakEllipsis | null; /** length of the last (current) run; 0 when there are none. */ currentLen: number; /** whether the current run is a streak-outcome (ok) run. */ currentOn: boolean; /** longest streak-outcome run shown; 0 = no completed streak. */ recordLen: number; /** number of break (fail) runs shown. */ breaks: number; /** the cap was exceeded and the oldest runs were merged. */ truncated: boolean; /** Run-band top edge (viewBox units) — the box floor of the reserved label * room, NOT the viewBox top. Runs centre on this band. */ y0: number; /** Run-band bottom edge (viewBox units). */ y1: number; } //#endregion //#region src/charts/streak-spark/index.d.ts interface StreakSparkProps { data: readonly StreakDatum[]; /** With numeric data, `v >= threshold` passes; without it, `v > 0` passes. */ threshold?: number | undefined; /** Which outcome is the streak: `"up"` (pass, default) or `"down"` (fail). */ positive?: "up" | "down" | undefined; /** Count labels: the current run (`"current"`, default), the record too * (`"both"`), or neither (`"none"`). Seat-gated — they drop at small sizes. */ label?: StreakLabel | undefined; width?: number | undefined; height?: number | undefined; /** Tints the current (accent) bar; valence runs keep their tokens. */ color?: string | 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; format?: Format | undefined; locale?: string | string[] | undefined; strings?: StreakSparkStrings | undefined; id?: string | undefined; className?: string | undefined; style?: CSSProperties | undefined; children?: ReactNode | undefined; } /** Shared summary — current run, record streak, and how often it broke. */ declare function streakSparkSummary(geo: StreakSparkGeometry, strings: StreakSparkStrings, fmt: (n: number) => string): string; declare function StreakSpark(props: StreakSparkProps): ReactNode; //#endregion export { StreakSparkProps as n, streakSparkSummary as r, StreakSpark as t };