/** * Pure UTC calendar projections for the lane timeline. * * The year fold gives every month equal screen width, then divides that cell * by the month's maximum Gregorian day count. This aligns wall dates across * years and leaves an implicit Feb 29 ghost gap in common years. The accepted * trade-off is that one day is slightly wider in February than in January. */ export type FoldProjection = { rowKey: string; rowIndex: number; rowLabel: string; phase0: number; phase1: number; ghost?: boolean; }; export interface TemporalProjector { readonly id: string; project(tMs: number): FoldProjection | null; } export type CalendarPrecisionUnit = "year" | "month" | "day" | "hour" | "minute"; /** Source precision, kept distinct from the event's representative instant. */ export type TemporalPrecision = { readonly kind: "calendar"; readonly unit: CalendarPrecisionUnit; } | { readonly kind: "uncertainty"; readonly beforeYears: number; readonly afterYears: number; }; export type PrecisionEvent = { readonly tMs?: unknown; readonly precision?: TemporalPrecision; }; export type PrecisionWindow = readonly [startMs: number, endMs: number]; export type FoldWindowFragment = { rowIndex: number; phase0: number; phase1: number; full: boolean; }; export type FoldId = "millennium" | "century" | "decade" | "year" | "month" | "week" | "day" | "hour"; /** * Return an event's exact timestamp after applying ECMAScript Date's TimeClip. * Approximate `y` coordinates deliberately have no fallback here: calendar * folds must not invent a month or day from a years-before-present value. */ export declare function evTimestampMs(event: unknown): number | null; /** * Construct the half-open UTC calendar cycle containing an event's instant. * Epistemic uncertainty deliberately returns null: it remains on the * continuous axis and must not acquire invented calendar coordinates. */ export declare function precisionWindow(event: PrecisionEvent): PrecisionWindow | null; /** * UTC year fold with twelve equal-width month cells. Each cell uses the * month's maximum Gregorian day count, keeping wall dates aligned across * years and leaving a ghost Feb 29 slot in common years. */ export declare const foldYearProjector: TemporalProjector; /** Decimal year folds; rows contain 10 years, 10 decades, or 10 centuries. */ export declare const foldDecadeProjector: TemporalProjector; export declare const foldCenturyProjector: TemporalProjector; export declare const foldMillenniumProjector: TemporalProjector; /** month fold: one row per calendar month, 31 max-day slots */ export declare const foldMonthProjector: TemporalProjector; /** week fold: one row per Monday-start UTC week, 7 weekday slots. * Rows are keyed by their Monday's date (avoids ISO week-year edge cases). */ export declare const foldWeekProjector: TemporalProjector; /** day fold: one row per UTC date, 24 hour slots */ export declare const foldDayProjector: TemporalProjector; /** hour fold: one row per UTC hour, 60 minute slots */ export declare const foldHourProjector: TemporalProjector; /** * Project a half-open instant window into consecutive fold-row fragments. * The caller owns viewport clipping and must bound wide windows before using * a fine fold; this pure helper intentionally has no internal row cap. * Invalid, empty, or partially unrepresentable windows are rejected as an * empty fragment list. */ export declare function projectWindow(foldId: FoldId, startMs: number, endMs: number): FoldWindowFragment[]; /** the start instant of a fold row — inverse of project()'s rowIndex */ export declare function foldRowStartMs(foldId: string, rowIndex: number): number; /** nominal period length of a fold row (ms) — for scale-continuous mapping */ export declare const FOLD_PERIOD_MS: Record; //# sourceMappingURL=temporal.d.ts.map