import { default as React } from 'react'; import { CategoryDef } from '../types'; /** Filter key for events with no team accent (use with `TimelineFilter.teams`). */ export declare const TIMELINE_FILTER_TEAM_NONE = "__zendir_team_none__"; /** Filter key for legacy accent color only (no structured `team.id`). */ export declare const TIMELINE_FILTER_TEAM_LEGACY = "__zendir_team_legacy__"; export type TimelineViewMode = "list" | "chart" | "scatter"; /** * Team / category identity on the timeline. * * Extends the SDK-level `CategoryDef` with `label` kept optional for * backward compatibility — existing code that passes `{ id, color }` without * a label continues to compile and run unchanged. * * Because it extends `CategoryDef`, a `TimelineTeam` value can be used * anywhere a `CategoryDef` is expected (e.g. `CategoryPalette` constructor). */ export interface TimelineTeam extends Omit { /** Human-readable name (tooltips, search, filter pills). Optional for backward compat. */ label?: string; } export interface TimelineEvent { /** Unique identifier */ id: string; /** Event title */ title: string; /** Start time */ start: Date; /** End time (optional for point events) */ end?: Date; /** Track/category this event belongs to */ track?: string; /** Status for coloring */ status?: "off" | "standby" | "normal" | "caution" | "serious" | "critical"; /** Badge text */ badge?: string; /** Badge variant - uses AstroUXDS status terms */ badgeVariant?: "default" | "primary" | "normal" | "caution" | "serious" | "critical"; /** Subtitle/description */ subtitle?: string; /** Additional timestamps to display in list view */ timestamps?: { label: string; value: string; status?: "normal" | "standby" | "caution" | "serious" | "critical" | "off"; }[]; /** Arguments/metadata */ arguments?: Record; /** Custom metadata */ metadata?: Record; /** * Team assignment (preferred): id + accent color (+ optional label). * List: thin top stripe. Chart/Gantt: thin top stripe; status via Astro shape + hover. * Scatter: outer ring. Does NOT override status fill. */ team?: TimelineTeam; /** * @deprecated Prefer `team: { id, color, label? }`. If set without `team`, still used as the accent color (legacy). */ color?: string; } /** Resolved team accent for rendering (from `event.team` or legacy `event.color`). */ export declare function getTimelineTeamAccent(event: TimelineEvent): { color: string; id?: string | number; label?: string; } | null; /** Label for team row in tooltips (id / label / arguments.Team / badge). */ export declare function getTimelineTeamDisplayLabel(event: TimelineEvent, accent: NonNullable>): string; /** Stable key for team filter pills (`TimelineFilter.teams`). */ export declare function getTimelineTeamFilterKey(event: TimelineEvent): string; export interface TimelineTrackDef { /** Track identifier */ id: string; /** Display label */ label: string; /** Track height in pixels */ height?: number; } export type TimeFormat = "relative" | "absolute" | "utc"; export interface TimelineFilter { /** Filter by track IDs (empty / omitted = all tracks) */ tracks?: string[]; /** Filter by display status (multi-select; empty / omitted = all) */ status?: TimelineEvent["status"][]; /** Case-insensitive match on title, subtitle, badge, track, argument values */ search?: string; /** Duration shape: point (no end or zero length), range (has end after start), all */ eventShape?: "all" | "point" | "range"; /** * Filter by team keys from `getTimelineTeamFilterKey` (e.g. `"42"`, `"alpha"`). * Include `TIMELINE_FILTER_TEAM_NONE` / `TIMELINE_FILTER_TEAM_LEGACY` when those buckets exist in data. */ teams?: string[]; /** * @deprecated Use `teams` with explicit keys. When true (and `teams` is empty), only events with a team accent match. */ teamColoredOnly?: boolean; } /** Display status used for filtering and markers (badgeVariant overrides raw status when set). */ export declare function getTimelineEventDisplayStatus(event: TimelineEvent): TimelineEvent["status"]; export declare function isTimelineFilterActive(filter: TimelineFilter): boolean; export declare function matchesTimelineFilter(event: TimelineEvent, filter: TimelineFilter): boolean; export interface UnifiedTimelineProps { /** Timeline title */ title?: string; /** Events to display */ events: TimelineEvent[]; /** Track definitions for chart view */ tracks?: TimelineTrackDef[]; /** Start time for chart view (auto-calculated if not provided) */ start?: Date; /** End time for chart view (auto-calculated if not provided) */ end?: Date; /** Default view mode */ defaultView?: TimelineViewMode; /** Controlled view mode */ viewMode?: TimelineViewMode; /** View mode change handler */ onViewModeChange?: (mode: TimelineViewMode) => void; /** Event click handler */ onEventClick?: (event: TimelineEvent) => void; /** Show view toggle */ showViewToggle?: boolean; /** Max height for scrollable container */ maxHeight?: string | number; /** Track height for chart view */ trackHeight?: number; /** Custom className */ className?: string; /** Time format for axis labels */ timeFormat?: TimeFormat; /** Enable zoom controls */ zoomable?: boolean; /** Initial zoom level (1 = 100%) */ initialZoom?: number; /** Show filter & search controls in header (default true) */ showFilters?: boolean; /** Start with the filter panel expanded (default false) */ filtersDefaultExpanded?: boolean; /** When any filter is active, hide chart/scatter track rows that have no matching events */ hideEmptyTracksWhenFiltered?: boolean; /** Controlled filter state */ filter?: TimelineFilter; /** Filter change handler (receives normalized filter object) */ onFilterChange?: (filter: TimelineFilter) => void; /** Show event count badge */ showCount?: boolean; /** Loading state */ loading?: boolean; /** Reference time for relative format (defaults to start of range) */ referenceTime?: Date; /** Show playhead indicator at current time */ showPlayhead?: boolean; /** Custom playhead time (for simulation mode) */ playheadTime?: Date; /** Callback when playhead time changes (for interactive playhead) */ onPlayheadChange?: (time: Date) => void; /** Show day markers at midnight */ showDayMarkers?: boolean; /** * Override the label used for the "Teams" secondary-category filter section. * Useful when the `team` field on events represents squads, categories, groups, etc. * Defaults to `"Teams"`. The value is also used for ARIA labels and tooltip text. * @example teamLabel="Squads" * @example teamLabel="Categories" */ teamLabel?: string; } export declare const UnifiedTimeline: React.NamedExoticComponent; export default UnifiedTimeline;