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-grade-profile.d.ts type GradeProfileStrings = Pick; //#endregion //#region src/charts/grade-profile/geometry.d.ts interface GradePoint { /** Distance along the route (monotonic; any unit, shared with `elev`). */ d: number; /** Elevation (same unit as `d` so grade is a true percent). */ elev: number; } interface GradeSegment { /** Baseline-anchored quad (flat-to-baseline trapezoid). */ path: string; /** 0 = flat/descent … 3 = brutal. Quantized by `bins`. */ bin: 0 | 1 | 2 | 3; /** Signed grade %, 2-dp. */ grade: number; /** Pixel x span (hit-test + focus). */ x0: number; x1: number; /** Pixel ridge y at the two ends (focus segment). */ y0: number; y1: number; /** Raw distance at the segment end (readout). */ dEnd: number; /** Cumulative climb (summed positive rise) through this segment, raw units. */ cumGain: number; } interface GradeProfileGeometry { segments: GradeSegment[]; /** Ridge polyline path (gaps break it). */ ridge: string; /** Baseline y (bottom of the strip). */ yBase: number; /** Steepest climb grade (signed %, 0 when nothing climbs). */ maxGrade: number; /** Raw distance at the steepest climb (segment midpoint). */ maxGradeAt: number; /** Summit tick anchor (top of the ridge at the steepest segment). */ summitX: number; summitY: number; totalDistance: number; totalGain: number; /** Below 72 units wide the bins collapse to flat vs climb (documented). */ collapsed: boolean; /** Input point count. */ n: number; } declare function gradeProfileGeometry(opts: { data: readonly GradePoint[]; width: number; height: number; bins: readonly [number, number, number]; topPad: number; }): GradeProfileGeometry; //#endregion //#region src/charts/grade-profile/index.d.ts interface GradeProfileProps { data: readonly GradePoint[]; /** Grade % thresholds (ascending) that quantize the four bins. Non-finite or * out-of-order thresholds fall back to the defaults `[3, 6, 10]`. */ bins?: readonly [number, number, number] | undefined; /** `"max"` marks the steepest pitch; `"none"` renders the profile alone. */ label?: "max" | "none" | undefined; width?: number | undefined; height?: number | undefined; /** Formats distance in the summary; grade % always uses `%`. */ format?: Format | undefined; locale?: string | string[] | undefined; strings?: GradeProfileStrings | 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; } /** Percent formatter for grades — intrinsic units, so it ignores `format`. * Takes a grade in PERCENTAGE POINTS (16 → "16%"), which is how geometry * reports it, and routes it through `Intl`'s own percent style: the old * `${nf(n)}%` hardcoded the sign's position and its spacing, so a `locale` * that localized every distance on the chart left the grades in en-US. */ declare function gradePercent(locale: string | string[] | undefined): (n: number) => string; /** Shared summary — total distance, climb gain, and the steepest pitch + where. */ declare function gradeProfileSummary(geo: ReturnType, strings: GradeProfileStrings, fmt: (n: number) => string, pct: (n: number) => string): string; declare function GradeProfile(props: GradeProfileProps): ReactNode; //#endregion export { GradePoint as a, gradeProfileSummary as i, GradeProfileProps as n, gradePercent as r, GradeProfile as t };