import type { ColorName } from "../color_tokens"; /** * Gantt / timeline primitive — data model. A task is a labelled bar spanning * [start, end] (end inclusive — a one-day task has start === end's day). `data` * carries the consumer's row for render/press callbacks. */ export interface GanttTask { id: string; label: string; start: Date; /** Inclusive end day. Null/undefined → a single-day bar. */ end?: Date | null; /** * Design-token colour, matching `CalendarEvent.color`. A TOKEN, not a hex: * the bar derives a fill, a progress overlay and a swatch from it. */ color?: ColorName; /** * Lane this task belongs to — a phase, an owner, a vehicle. Tasks sharing a * `group` render under one heading, in the order first seen; tasks without * one lead, ungrouped. */ group?: string; /** A moment rather than a span — drawn as a diamond, no width. `end` is ignored. */ milestone?: boolean; /** 0–1. Draws a solid portion inside the bar; omit for no progress overlay. */ progress?: number; data?: T; } /** Zoom level of the horizontal time axis. */ export type GanttScale = "day" | "week" | "month"; /** * User-facing chrome strings. Resolution is **prop → `LoticsLocale.gantt` → * English default**, the kit-wide rule; `labels` overrides one instance. * Axis tick labels come from `locale` via Intl. */ export interface GanttLabels { day: string; week: string; month: string; /** Frozen task-column header. */ task: string; /** Shown when there is nothing to chart. */ empty: string; } export declare const DEFAULT_GANTT_LABELS: GanttLabels; /** A header tick on the time axis. */ export interface GanttTick { date: Date; /** px offset from the axis start. */ left: number; label: string; /** Start of a new month — used to draw the heavier divider + month band. */ monthStart: boolean; } /** Pixel geometry of one task bar on the axis. */ export interface GanttBar { task: GanttTask; left: number; width: number; } /** One rendered line of the chart: a lane heading, or a task at a row index. */ export type GanttRow = { kind: "group"; group: string; index: number; } | { kind: "task"; task: GanttTask; index: number; };