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-retention.d.ts type RetentionStrings = Pick; //#endregion //#region src/charts/retention-curve/geometry.d.ts type RetentionCurveType = "step" | "smooth"; interface RetentionPoint { /** Original period index (0 = cohort start). */ period: number; x: number; y: number; value: number; /** Benchmark value + its y at this period, if a benchmark covers it. */ bench: number | null; benchY: number | null; } interface RetentionGeometry { line: { d: string; }; ghost: { d: string; } | null; /** Per-period positions — overlays + nearest-x. */ points: RetentionPoint[]; last: { x: number; y: number; value: number; }; /** Present only when the documented plateau criterion holds. `from` is a * PERIOD index (the data index a consumer knows), never a position in the * compacted finite values. */ plateau: { y: number; value: number; from: number; fromX: number; } | null; labelX: number; labelY: number; totalWidth: number; /** Top edge of the plot box — full retention on the locked frame. */ y0: number; /** Bottom edge of the plot box — zero retention. Also the inline seat's floor. */ y1: number; } //#endregion //#region src/charts/retention-curve/index.d.ts declare function retentionSummary(geo: RetentionGeometry, fmt: (n: number) => string, unit: string, n: number, strings: RetentionStrings): string; interface RetentionCurveProps { /** Fraction retained per period (period 0 typically 1.0); 0–1 or 0–100. */ data: readonly number[]; /** Peer/industry curve, rendered as a subordinate dashed ghost. */ compare?: readonly number[] | undefined; /** * @deprecated Use `compare`. The catalog word for "a second series to read * this one against" is `compare` (DualSparkline, StarSpoke) — this chart was * the only one calling it `benchmark`, and DualSparkline's own `compare` JSDoc * calls it "the benchmark series", which is how the two names drifted. Still * accepted, and it still wins over `compare` when both are passed, so no * existing caller changes behaviour by upgrading. */ benchmark?: readonly number[] | undefined; /** Detect + mark a plateau (default true). */ plateau?: boolean | undefined; /** Step (default — cohort periods are discrete) or smooth (editorial). */ curve?: RetentionCurveType | undefined; /** Period noun for the summary (default "period"). */ unit?: string | undefined; /** `"last"` states the final retention in a right gutter. */ label?: "last" | "none" | undefined; /** * Overrides the honest `[0,1]` frame — the docs say why you shouldn't. * Always in retained FRACTIONS, whichever unit `data` arrives in: `data` * accepts 0–1 or 0–100 and is normalised to fractions, so `[0, 100]` here is * a hundred-fold frame, not "percent". */ domain?: readonly [number, number] | undefined; width?: number | undefined; height?: number | undefined; color?: string | undefined; format?: Format | undefined; locale?: string | string[] | undefined; strings?: RetentionStrings | 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 formatting shared with the interactive entry. */ declare const PCT: Intl.NumberFormatOptions; declare function RetentionCurve(props: RetentionCurveProps): ReactNode; //#endregion export { RetentionStrings as a, retentionSummary as i, RetentionCurve as n, RetentionCurveProps as r, PCT as t };