export declare const DAY = 86400000; export type GanttScale = 'day' | 'week' | 'month' | 'quarter'; /** Pixels per day for each zoom scale. */ export declare const PX_PER_DAY: Record; /** * Wall-clock "day number" (days since epoch, fractional for time of day). * Date-only ISO strings are read as local midnight. DST-proof: all gantt math * happens in this UTC-of-wall-clock space. */ export declare function toDays(v: unknown): number; /** Day numbers for years 1000..9999 are accepted; anything else is treated as invalid (NaN). */ export declare const MIN_DAY = -354285; export declare const MAX_DAY = 2932896; /** Hard cap on the timeline width in px (coarser scale / smaller px-per-day is chosen beyond it). */ export declare const MAX_TIMELINE_W = 20000; /** Bounds for the effective px-per-day. */ export declare const MIN_PPD = 0.005; export declare const MAX_PPD = 160; /** Header unit that reads well at a given px-per-day (defaults map to their own scale). */ export declare function scaleForPpd(ppd: number): GanttScale; /** Rows to render for a scroll position: `[first, last)` including overscan, clamped to `count`. */ export declare function visibleWindow(scrollRow: number, viewH: number, rowH: number, count: number, overscan?: number): { first: number; last: number; }; export interface LabeledCell extends Cell { /** px from the timeline's left edge. */ left: number; width: number; /** Label to draw (empty when thinned out to avoid overlap). */ text: string; spill: boolean; } /** Position cells, thin overlapping labels greedily, and drop cells too narrow to be worth a node. */ export declare function layoutCells(cells: Cell[], from: number, ppd: number, minUnlabeledW?: number): LabeledCell[]; /** Inverse of `toDays`: a local Date at the same wall-clock time. */ export declare function fromDays(n: number): Date; /** yyyy-MM-dd */ export declare function fmtDay(n: number): string; export declare function pickScale(spanDays: number): GanttScale; export declare function floorUnit(scale: GanttScale | 'year', n: number): number; export declare function nextUnit(scale: GanttScale | 'year', n: number): number; export interface Cell { start: number; end: number; label: string; } /** Header cells for `[from, to)`: a fine tier (the scale) and a coarse tier above it. */ export declare function buildCells(scale: GanttScale, from: number, to: number): { top: Cell[]; bottom: Cell[]; }; /** Elbow connector from a predecessor's end to a successor's start. */ export declare function depPath(x1: number, y1: number, x2: number, y2: number, rowH: number): string;