import { c as Value, r as SummaryStrings } from "./summary-D8UEQXYr.js"; import { n as Format } from "./format-Dq02z5ZL.js"; import { CSSProperties, ReactNode } from "react"; //#region src/core/strings-cohort-triangle.d.ts type CohortTriangleStrings = Pick; //#endregion //#region src/charts/cohort-triangle/geometry.d.ts interface CohortRow { label: string; /** Retention at age i (`values[i]`); `null`/non-finite = a gap slot. */ values: readonly Value[]; } interface CohortCell { row: number; col: number; x: number; y: number; /** Normalized retention fraction 0–1, or `null` for a measured-but-missing slot. */ value: number | null; /** Discrete level 0..LEVELS-1; -1 for a gap slot. */ level: number; gap: boolean; } interface CohortLabel { row: number; label: string; x: number; y: number; } interface CohortTriangleGeometry { cells: CohortCell[]; labels: CohortLabel[]; rows: number; cols: number; gutter: number; width: number; height: number; step: number; /** The resolved `cell` / `gap` the cells were actually laid out against. * Both entries must paint from THESE, never from the raw props — see * `resolve` for what a raw value can be. */ cell: number; gap: number; fontSize: number; showLabels: boolean; /** Ring around the highlighted cohort row, if `highlight` matches a label. */ ring: { x: number; y: number; width: number; height: number; } | null; /** Deepest age observed by every cohort (contiguous from 0); -1 if none. */ commonAge: number; /** Worst-retaining cohort at `commonAge` (min value; ties → earliest input). */ worst: { label: string; age: number; value: number; } | null; /** Newest cohort's (last row's) first finite reading. */ newestFirst: { label: string; value: number; } | null; } //#endregion //#region src/charts/cohort-triangle/index.d.ts /** Opacity ramp per discrete retention level — the shared value-cell ramp * (0.25 → 1), so a real bottom-of-scale reading never vanishes into the * empty-track look reserved for gaps. */ declare const levelOpacity: (level: number) => number; /** Cohort count, worst vintage at equal maturity, newest first reading. */ declare function cohortTriangleSummary(geo: CohortTriangleGeometry, strings: CohortTriangleStrings, fmt: (n: number) => string, unit: string): string; interface CohortTriangleProps { /** One row per cohort, `values[i]` = retention at age i (0–1 or 0–100). */ data: readonly CohortRow[]; /** Cell edge length in viewBox units. */ cell?: number | undefined; gap?: number | undefined; /** Place cohort labels in a left gutter (default true; seat-gated by cell). */ labels?: boolean | undefined; /** Cohort label to ring — the equal-maturity comparison focus. */ highlight?: string | undefined; /** Age-column noun for the summary (default "period"). */ unit?: string | undefined; color?: string | undefined; format?: Format | undefined; locale?: string | string[] | undefined; strings?: CohortTriangleStrings | 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 CohortTriangle(props: CohortTriangleProps): ReactNode; //#endregion export { CohortRow as a, levelOpacity as i, CohortTriangleProps as n, CohortTriangleStrings as o, cohortTriangleSummary as r, CohortTriangle as t };