# Gantt
URL: https://pro.rv-grid.com/api/gantt/
Source: src/content/docs/api/gantt.md
## Module Extensions

### `ColumnRegular` (Extended from `@revolist/revogrid`)

```ts
interface ColumnRegular {
  /** Runtime context for Gantt predecessor/successor dependency dropdown columns. */
      ganttDependencyDropdown?: GanttDependencyDropdownConfig
}
```

---

### `HTMLRevoGridElementEventMap` (Extended from `global`)

```ts
interface HTMLRevoGridElementEventMap {
  [GANTT_DEPENDENCY_HOVER_EVENT]: GanttDependencyInteractionDetail;
  [GANTT_DEPENDENCY_SELECT_EVENT]: GanttDependencyInteractionDetail;
  [GANTT_TASK_CREATE_EVENT]: GanttCreateTaskOptions | undefined;
  [GANTT_TASK_CREATED_EVENT]: GanttTaskCreatedEventDetail;
  [GANTT_TASK_EDIT_EVENT]: GanttTaskEditEventDetail;
  [GANTT_TASK_INDENT_EVENT]: GanttTaskHierarchyActionDetail | undefined;
  [GANTT_TASK_OUTDENT_EVENT]: GanttTaskHierarchyActionDetail | undefined;
  [GANTT_TASK_DELETE_EVENT]: GanttTaskHierarchyActionDetail | undefined;
  [GANTT_TASK_CONVERT_TO_MILESTONE_EVENT]: GanttTaskHierarchyActionDetail | undefined;
  [GANTT_ZOOM_IN_EVENT]: undefined;
  [GANTT_ZOOM_OUT_EVENT]: undefined;
  [GANTT_ZOOM_SET_LEVEL_EVENT]: GanttZoomSetLevelDetail;
  [GANTT_SEARCH_EVENT]: GanttSearchEventDetail;
  [GANTT_PANEL_RESIZE_EVENT]: GanttPanelResizeEventDetail;
  [GANTT_BEFORE_TASK_CHANGE_EVENT]: GanttBeforeTaskChangeDetail;
  [GANTT_BEFORE_DEPENDENCY_CHANGE_EVENT]: GanttBeforeDependencyChangeDetail;
  [GANTT_BEFORE_ASSIGNMENT_CHANGE_EVENT]: GanttBeforeAssignmentChangeDetail
}
```

---

### `HTMLRevoGridElement` (Extended from `global`)

```ts
interface HTMLRevoGridElement {
  gantt?: GanttPluginConfig;
  ganttDependencies?: readonly DependencyEntity[];
  ganttCalendars?: readonly CalendarEntity[];
  ganttResources?: readonly ResourceEntity[];
  ganttAssignments?: readonly AssignmentEntity[];
  ganttBaselines?: readonly BaselineSnapshot[]
}
```

## Plugin API

### `ISODateString`

```ts
export type ISODateString = `${number}-${number}-${number}` | `${number}-${number}-${number}T${string}`;
```

---

### `ISODateTimeString`

```ts
export type ISODateTimeString = `${number}-${number}-${number}T${string}`;
```

---

### `DEFAULT_CALENDAR`

Default Monday-Friday calendar shared by Gantt and Event Scheduler.

```ts
DEFAULT_CALENDAR: {
  id: string;
  name: string;
  timeZone: string;
  workingDays: number[];
  holidays: never[];
  workingHours: { start: string; end: string; };
  hoursPerDay: number;
};
```

---

### `CalendarEntity`

Defines the working schedule for tasks, events, and resources.
Working days use ISO weekday numbers: 1 = Monday ... 7 = Sunday.

```ts
interface CalendarEntity {
  /** Unique calendar identifier. */
    readonly id: CalendarId;
  /** Display name, for example `"Standard"` or `"Night Shift"`. */
    readonly name: string;
  /** IANA time zone, for example `"America/New_York"`. */
    readonly timeZone: string;
  /** ISO weekday numbers that are working days. */
    readonly workingDays: readonly number[];
  /** Specific dates that are non-working regardless of weekday. */
    readonly holidays: readonly ISODateString[];
  /** Optional working time windows inside a working day. */
    readonly workingHours?: CalendarWorkingTimeRange | readonly CalendarWorkingTimeRange[];
  /** Number of working hours per day, used for effort/capacity calculations. */
    readonly hoursPerDay: number
}
```

---

### `CalendarId`

Unique identifier for a working calendar.

```ts
/** Unique identifier for a working calendar. */
export type CalendarId = string | number;
```

---

### `CalendarWorkingTimeRange`

Time-of-day working window for calendar-aware schedulers.

```ts
interface CalendarWorkingTimeRange {
  /** Start time in `HH:mm` or AM/PM format. */
    readonly start: string;
  /** End time in `HH:mm` or AM/PM format. */
    readonly end: string
}
```

---

### `EntityId`

Opaque string identifier used across Gantt entities.

```ts
/** Opaque string identifier used across Gantt entities. */
export type EntityId = string;
```

---

### `TaskId`

Unique identifier for a task within a project.

```ts
/** Unique identifier for a task within a project. */
export type TaskId = EntityId;
```

---

### `DependencyId`

Unique identifier for a dependency link between two tasks.

```ts
/** Unique identifier for a dependency link between two tasks. */
export type DependencyId = EntityId;
```

---

### `ResourceId`

Unique identifier for a resource (person or equipment).

```ts
/** Unique identifier for a resource (person or equipment). */
export type ResourceId = EntityId;
```

---

### `AssignmentId`

Unique identifier for a task–resource assignment.

```ts
/** Unique identifier for a task–resource assignment. */
export type AssignmentId = EntityId;
```

---

### `BaselineId`

Unique identifier for a baseline snapshot.

```ts
/** Unique identifier for a baseline snapshot. */
export type BaselineId = EntityId;
```

---

### `TaskType`

Determines how a task is treated by the scheduling engine.
- `'summary'` — a parent task whose dates roll up from its children.
- `'task'` — a regular schedulable work item with its own duration.
- `'milestone'` — a zero-duration marker for a key date or deliverable.

```ts
/**
 * Determines how a task is treated by the scheduling engine.
 * - `'summary'` — a parent task whose dates roll up from its children.
 * - `'task'` — a regular schedulable work item with its own duration.
 * - `'milestone'` — a zero-duration marker for a key date or deliverable.
 */
export type TaskType = 'summary' | 'task' | 'milestone';
```

---

### `TaskStatus`

Tracks the current execution state of a task.
- `'not-started'` — work has not begun.
- `'in-progress'` — work is actively underway.
- `'done'` — work is complete.
- `'blocked'` — work is stalled by an external factor.

```ts
/**
 * Tracks the current execution state of a task.
 * - `'not-started'` — work has not begun.
 * - `'in-progress'` — work is actively underway.
 * - `'done'` — work is complete.
 * - `'blocked'` — work is stalled by an external factor.
 */
export type TaskStatus = 'not-started' | 'in-progress' | 'done' | 'blocked';
```

---

### `TaskEffortMode`

Determines which task variable remains fixed when work, duration, or units change.
Mirrors the common Microsoft Project task type model.

RevoGrid applies the model during schedule calculation and task/assignment
mutation. The edit matrix is deterministic and formula-based; it intentionally
does not mirror every Microsoft Project prompt or per-assignment side-effect.

```ts
/**
 * Determines which task variable remains fixed when work, duration, or units change.
 * Mirrors the common Microsoft Project task type model.
 *
 * RevoGrid applies the model during schedule calculation and task/assignment
 * mutation. The edit matrix is deterministic and formula-based; it intentionally
 * does not mirror every Microsoft Project prompt or per-assignment side-effect.
 */
export type TaskEffortMode = 'fixed-duration' | 'fixed-work' | 'fixed-units';
```

---

### `TaskSplitRange`

Date range where work is intentionally split and the task should not consume work.
Split ranges extend the computed finish because the same work is spread over
more calendar time.

```ts
interface TaskSplitRange {
  /** Split start date (inclusive). */
    readonly startDate: ISODateString;
  /** Split end date (inclusive). */
    readonly endDate: ISODateString
}
```

---

### `DependencyType`

Defines the logical relationship between a predecessor and successor task.
- `'finish-to-start'` (FS) — successor starts after predecessor finishes.
- `'start-to-start'` (SS) — successor starts when predecessor starts.
- `'finish-to-finish'` (FF) — successor finishes when predecessor finishes.
- `'start-to-finish'` (SF) — successor finishes when predecessor starts.

```ts
/**
 * Defines the logical relationship between a predecessor and successor task.
 * - `'finish-to-start'` (FS) — successor starts after predecessor finishes.
 * - `'start-to-start'` (SS) — successor starts when predecessor starts.
 * - `'finish-to-finish'` (FF) — successor finishes when predecessor finishes.
 * - `'start-to-finish'` (SF) — successor finishes when predecessor starts.
 */
export type DependencyType =
  | 'finish-to-start'
  | 'start-to-start'
  | 'finish-to-finish'
  | 'start-to-finish';
```

---

### `TaskConstraintType`

Scheduling constraint applied to a task's start or finish date.
The scheduler engine honours these constraints when computing the schedule.

```ts
/**
 * Scheduling constraint applied to a task's start or finish date.
 * The scheduler engine honours these constraints when computing the schedule.
 */
export type TaskConstraintType =
  | 'start-no-earlier-than'
  | 'start-no-later-than'
  | 'finish-no-earlier-than'
  | 'finish-no-later-than'
  | 'must-start-on'
  | 'must-finish-on';
```

---

### `TaskEntity`

Represents a single task (work item) in the Gantt project.
Tasks form a tree structure via {@link parentId} and are the primary
data source for the Gantt timeline.

```ts
interface TaskEntity {
  /** Unique task identifier. */
    readonly id: TaskId;
  /** Project this task belongs to. */
    readonly projectId: EntityId;
  /** Parent task id, or `null` for root-level tasks. */
    readonly parentId: TaskId | null;
  /** Work Breakdown Structure code (e.g. `"1.2.3"`). */
    readonly wbsCode: string;
  /** Human-readable task name. */
    readonly name: string;
  /** Determines scheduling behaviour — see {@link TaskType}. */
    readonly type: TaskType;
  /** Current execution state — see {@link TaskStatus}. */
    readonly status: TaskStatus;
  /** Planned start date (inclusive). */
    readonly startDate: ISODateString;
  /** Planned end date (inclusive). */
    readonly endDate: ISODateString;
  /** Duration in calendar days between start and end (inclusive). */
    readonly durationDays: number;
  /** Task type used for work/duration/unit calculations. Defaults to `fixed-duration`. */
    readonly effortMode?: TaskEffortMode;
  /** Whether resource changes should preserve total work where the task type allows it. */
    readonly effortDriven?: boolean;
  /** Planned work for the task, in hours. */
    readonly workHours?: number;
  /** Remaining duration for in-progress scheduling, in days; used when progress rescheduling is enabled. */
    readonly remainingDurationDays?: number;
  /** Date work actually started; anchors the schedule only under progress-aware rescheduling. */
    readonly actualStartDate?: ISODateString;
  /** Date work actually finished; always pins completed work to the recorded finish. */
    readonly actualFinishDate?: ISODateString;
  /** Non-working gaps inside the task span. */
    readonly splitRanges?: readonly TaskSplitRange[];
  /** When `true`, authored dates are preserved and dependency violations become diagnostics. */
    readonly manuallyScheduled?: boolean;
  /** When `true`, the task is excluded from scheduling and critical-path analysis. */
    readonly inactive?: boolean;
  /** Leveling priority from 0 to 1000. Higher priority tasks are protected first. Defaults to 500. */
    readonly priority?: number;
  /** Whether automatic resource leveling may delay this task. Defaults to true. */
    readonly canLevel?: boolean;
  /** When `true`, packaged Gantt task mutations are rejected for this task. */
    readonly locked?: boolean;
  /** Existing resource leveling delay in calendar days. Defaults to 0. */
    readonly levelingDelayDays?: number;
  /** Optional scheduling constraint type — see {@link TaskConstraintType}. */
    readonly constraintType?: TaskConstraintType;
  /** Date associated with the scheduling constraint. */
    readonly constraintDate?: ISODateString;
  /** Deadline date — tasks finishing after this date are flagged. */
    readonly deadlineDate?: ISODateString;
  /** Completion percentage (0–100). */
    readonly progressPercent: number;
  /** Calendar governing working days and holidays for this task. */
    readonly calendarId: CalendarId;
  /** Whether this task lies on the critical path. */
    readonly isCritical: boolean;
  /** Optional free-text notes attached to the task. */
    readonly notes?: string;
  /** Arbitrary tags for categorisation or filtering. */
    readonly tags: readonly string[]
}
```

---

### `DependencyEntity`

A directed link between two tasks that constrains their scheduling order.
The scheduler uses dependencies to compute task start/end dates.

```ts
interface DependencyEntity {
  /** Unique dependency identifier. */
    readonly id: DependencyId;
  /** The task that must complete (or start) first. */
    readonly predecessorTaskId: TaskId;
  /** The task whose schedule depends on the predecessor. */
    readonly successorTaskId: TaskId;
  /** Relationship type — see {@link DependencyType}. */
    readonly type: DependencyType;
  /** Lead (negative) or lag (positive) applied to the link; calendar basis is controlled by scheduling options. */
    readonly lagDays: number
}
```

---

### `ResourceEntity`

A person, team, or piece of equipment that can be assigned to tasks.

```ts
interface ResourceEntity {
  /** Unique resource identifier. */
    readonly id: ResourceId;
  /** Display name of the resource. */
    readonly name: string;
  /** Role or job title. */
    readonly role: string;
  /** Working calendar for this resource. */
    readonly calendarId: CalendarId;
  /** Maximum allocation capacity. Accepts either `100` or `1.0` for 100 %. */
    readonly allocationCapacity: number;
  /** Cost per hour in the project currency. */
    readonly hourlyCost: number
}
```

---

### `AssignmentEntity`

Links a {@link ResourceEntity} to a {@link TaskEntity}, representing
the resource's involvement in that task.

```ts
interface AssignmentEntity {
  /** Unique assignment identifier. */
    readonly id: AssignmentId;
  /** The task this assignment belongs to. */
    readonly taskId: TaskId;
  /** The resource assigned to the task. */
    readonly resourceId: ResourceId;
  /** Allocation units. Accepts either `100` or `1.0` for 100 % of the resource capacity. */
    readonly allocationUnits: number;
  /** Assignment work, in hours. */
    readonly workHours?: number;
  /** Description of what the resource is responsible for. */
    readonly responsibility: string
}
```

---

### `BaselineTaskSnapshot`

A snapshot of a single task's dates at the time a baseline was captured.
Used to compare planned vs. actual progress.

```ts
interface BaselineTaskSnapshot {
  /** The task this snapshot refers to. */
    readonly taskId: TaskId;
  /** Baseline start date. */
    readonly startDate: ISODateString;
  /** Baseline end date. */
    readonly endDate: ISODateString;
  /** Baseline duration in days. */
    readonly durationDays: number;
  /** Baseline completion percentage. */
    readonly progressPercent: number
}
```

---

### `BaselineSnapshot`

A point-in-time snapshot of the entire project schedule.
Baselines allow users to track schedule drift over time.

```ts
interface BaselineSnapshot {
  /** Unique baseline identifier. */
    readonly id: BaselineId;
  /** Human-readable baseline name (e.g. `"Sprint 1 Plan"`). */
    readonly name: string;
  /** When this baseline was captured. */
    readonly capturedAt: ISODateTimeString;
  /** Per-task snapshots at capture time. */
    readonly tasks: readonly BaselineTaskSnapshot[]
}
```

---

### `ProjectSnapshot`

Complete state of the Gantt project at a single point in time.
This is the primary input to the {@link GanttPlugin} — pass it via
the grid's `gantt`, `ganttDependencies`, `ganttCalendars`, etc. properties.

```ts
interface ProjectSnapshot {
  /** Project identifier. */
    readonly id: EntityId;
  /** Project name. */
    readonly name: string;
  /** Semantic version of the project data schema. */
    readonly version: string;
  /** Currency code used for cost calculations (e.g. `"USD"`). */
    readonly currency: string;
  /** Default IANA time zone for the project. */
    readonly timeZone: string;
  /** Calendar used by default for new tasks. */
    readonly primaryCalendarId: CalendarId;
  /** Timestamp of the last modification. */
    readonly updatedAt: ISODateTimeString;
  /** All tasks in the project. */
    readonly tasks: readonly TaskEntity[];
  /** All dependency links between tasks. */
    readonly dependencies: readonly DependencyEntity[];
  /** All available resources. */
    readonly resources: readonly ResourceEntity[];
  /** All task–resource assignments. */
    readonly assignments: readonly AssignmentEntity[];
  /** All working calendars. */
    readonly calendars: readonly CalendarEntity[];
  /** Historical baseline snapshots. */
    readonly baselines: readonly BaselineSnapshot[]
}
```

---

### `cloneProjectSnapshot`

Creates a JSON-safe deep copy of a project snapshot.

```ts
export function cloneProjectSnapshot(project: ProjectSnapshot): ProjectSnapshot;
```

---

### `exportProjectSnapshot`

Serializes a project snapshot into JSON without adding persistence semantics.

```ts
export function exportProjectSnapshot(project: ProjectSnapshot, options: ProjectSnapshotJsonOptions =;
```

---

### `parseProjectSnapshotJson`

Parses and lightly validates a JSON project snapshot.

```ts
export function parseProjectSnapshotJson(json: string): ProjectSnapshotParseResult;
```

---

### `ProjectSnapshotJsonOptions`

```ts
interface ProjectSnapshotJsonOptions {
  /** Indentation passed to `JSON.stringify` for readable exports. */
    readonly space?: number | string
}
```

---

### `ProjectSnapshotParseSuccess`

```ts
interface ProjectSnapshotParseSuccess {
  readonly ok: true;
  readonly project: ProjectSnapshot
}
```

---

### `ProjectSnapshotParseFailure`

```ts
interface ProjectSnapshotParseFailure {
  readonly ok: false;
  readonly error: string
}
```

---

### `ProjectSnapshotParseResult`

```ts
export type ProjectSnapshotParseResult = ProjectSnapshotParseSuccess | ProjectSnapshotParseFailure;
```

---

### `ResourceStore`

Read/write store for {@link ResourceEntity} instances.
Provides lookup by id and bulk replacement.

```ts
interface ResourceStore {
  /** Returns all resources. */
    getAll(): readonly ResourceEntity[];
  /** Looks up a resource by its id. */
    getById(resourceId: ResourceId): ResourceEntity | undefined;
  /** Replaces the entire resource list. */
    replaceAll(resources: readonly ResourceEntity[]): void
}
```

---

### `AssignmentStore`

Read/write store for {@link AssignmentEntity} instances.
Maintains indexes for fast lookup by task or resource.

```ts
interface AssignmentStore {
  /** Returns all assignments. */
    getAll(): readonly AssignmentEntity[];
  /** Looks up an assignment by its id. */
    getById(assignmentId: AssignmentId): AssignmentEntity | undefined;
  /** Returns all assignments for a given task. */
    getByTaskId(taskId: TaskId): readonly AssignmentEntity[];
  /** Returns all assignments for a given resource. */
    getByResourceId(resourceId: ResourceId): readonly AssignmentEntity[];
  /** Replaces the entire assignment list, rebuilding all indexes. */
    replaceAll(assignments: readonly AssignmentEntity[]): void;
  /** Replaces only the assignments for a specific task, keeping others intact. */
    replaceTaskAssignments(taskId: TaskId, assignments: readonly AssignmentEntity[]): void
}
```

---

### `InMemoryResourceStore`

Default in-memory implementation of {@link ResourceStore}.

```ts
class InMemoryResourceStore {
  getAll(): readonly ResourceEntity[];

  getById(resourceId: ResourceId): ResourceEntity | undefined;

  replaceAll(resources: readonly ResourceEntity[]): void;
}
```

---

### `InMemoryAssignmentStore`

Default in-memory implementation of {@link AssignmentStore}.
Maintains by-id, by-task, and by-resource indexes that are
rebuilt on every write operation.

```ts
class InMemoryAssignmentStore {
  getAll(): readonly AssignmentEntity[];

  getById(assignmentId: AssignmentId): AssignmentEntity | undefined;

  getByTaskId(taskId: TaskId): readonly AssignmentEntity[];

  getByResourceId(resourceId: ResourceId): readonly AssignmentEntity[];

  replaceAll(assignments: readonly AssignmentEntity[]): void;

  replaceTaskAssignments(taskId: TaskId, assignments: readonly AssignmentEntity[]): void;
}
```

---

### `TaskUpdate`

Partial update payload for mutable fields of a {@link TaskEntity}.
Only the listed properties may be changed via {@link TaskStore.updateTask}.

```ts
/**
 * Partial update payload for mutable fields of a {@link TaskEntity}.
 * Only the listed properties may be changed via {@link TaskStore.updateTask}.
 */
export type TaskUpdate = Partial<
  Pick<
    TaskEntity,
    | 'name'
    | 'status'
    | 'type'
    | 'startDate'
    | 'endDate'
    | 'durationDays'
    | 'workHours'
    | 'remainingDurationDays'
    | 'actualStartDate'
    | 'actualFinishDate'
    | 'splitRanges'
    | 'effortMode'
    | 'effortDriven'
    | 'progressPercent'
    | 'manuallyScheduled'
    | 'inactive'
    | 'priority'
    | 'canLevel'
    | 'levelingDelayDays'
    | 'constraintType'
    | 'constraintDate'
    | 'deadlineDate'
    | 'notes'
  >
>;
```

---

### `TaskTreeRow`

A task together with its canonical position in the authored tree.
Grid visibility, expansion, sorting, filtering, and selection live in the
RevoGrid runtime layer, not in this domain store.

```ts
interface TaskTreeRow {
  /** The underlying task entity. */
    readonly task: TaskEntity;
  /** Nesting depth (0 for root tasks). */
    readonly depth: number;
  /** Whether the task has child tasks. */
    readonly hasChildren: boolean;
  /** Zero-based index in the canonical flattened tree. */
    readonly index: number
}
```

---

### `TaskStore`

Read/write store that manages the hierarchical task list.
Handles parent–child relationships and incremental task updates.

```ts
interface TaskStore {
  /** Returns all tasks in insertion order. */
    getAll(): readonly TaskEntity[];
  /** Monotonically increasing revision counter bumped on every task data change. */
    getTaskRevision(): number;
  /** Returns every task as a {@link TaskTreeRow} in canonical authored tree order. */
    getOrderedRows(): readonly TaskTreeRow[];
  /** Looks up a task by its id. */
    getById(taskId: TaskId): TaskEntity | undefined;
  /** Returns top-level (root) tasks. */
    getRoots(): readonly TaskEntity[];
  /** Returns direct children of the given parent task. */
    getChildren(parentId: TaskId): readonly TaskEntity[];
  /** Returns the parent task, or `undefined` for root tasks. */
    getParent(taskId: TaskId): TaskEntity | undefined;
  /** Returns `true` if the task has at least one child. */
    hasChildren(taskId: TaskId): boolean;
  /** Returns the nesting depth of a task in the tree hierarchy. */
    getIndentLevel(taskId: TaskId): number;
  /** Applies a partial update to a task and returns the updated entity. */
    updateTask(taskId: TaskId, patch: TaskUpdate): TaskEntity;
  /** Replaces the entire task list, rebuilding internal indexes. */
    replaceAll(tasks: readonly TaskEntity[]): void
}
```

---

### `InMemoryTaskStore`

Default in-memory implementation of {@link TaskStore}.
Maintains parent–child indexes and task mutation state.

```ts
class InMemoryTaskStore {
  getAll(): readonly TaskEntity[];

  getTaskRevision(): number;

  getById(taskId: TaskId): TaskEntity | undefined;

  getOrderedRows(): readonly TaskTreeRow[];

  getRoots(): readonly TaskEntity[];

  getChildren(parentId: TaskId): readonly TaskEntity[];

  getParent(taskId: TaskId): TaskEntity | undefined;

  hasChildren(taskId: TaskId): boolean;

  getIndentLevel(taskId: TaskId): number;

  updateTask(taskId: TaskId, patch: TaskUpdate): TaskEntity;

  replaceAll(tasks: readonly TaskEntity[]): void;
}
```

---

### `createDependencyGraph`

Builds a {@link DependencyGraph} from the given tasks and dependencies.
Dependencies that reference tasks not in `taskIds` are silently ignored.

**@param** taskIds - All task ids to include in the graph.
 *
**@param** dependencies - Dependency links to process.
 *
**@returns** A new dependency graph ready for topological sorting.

```ts
export function createDependencyGraph(
  taskIds: readonly TaskId[],
  dependencies: readonly DependencyEntity[],
): DependencyGraph;
```

---

### `topologicallySortDependencyGraph`

Performs a topological sort on the dependency graph using Kahn's algorithm.
If a cycle is detected, returns `ok: false` with the involved task ids.

**@param** graph - The dependency graph to sort.
 *
**@returns** Sorted task order on success, or cycle information on failure.

```ts
export function topologicallySortDependencyGraph(graph: DependencyGraph): TopologicalSortResult;
```

---

### `DependencyGraph`

A directed acyclic graph of task dependencies.
Maps each task to its outgoing dependencies and tracks in-degree counts
for topological sorting.

```ts
interface DependencyGraph {
  /** All task ids participating in the graph. */
    readonly taskIds: readonly TaskId[];
  /** Outgoing dependencies keyed by predecessor task id. */
    readonly outgoingByTaskId: ReadonlyMap<TaskId, readonly DependencyEntity[]>;
  /** Number of incoming dependencies for each task. */
    readonly incomingCountByTaskId: ReadonlyMap<TaskId, number>
}
```

---

### `DependencyCycle`

Represents a cycle detected in the dependency graph.
Contains the task ids that form the cycle.

```ts
interface DependencyCycle {
  /** Task ids involved in the cycle. */
    readonly taskIds: readonly TaskId[];
  /** Dependency ids that form the detected cycle path. */
    readonly dependencyIds: readonly DependencyId[]
}
```

---

### `TopologicalSortResult`

Result of a topological sort on a {@link DependencyGraph}.
When `ok` is `true`, `order` contains all tasks in dependency order.
When `ok` is `false`, `cycle` identifies the offending tasks.

```ts
/**
 * Result of a topological sort on a {@link DependencyGraph}.
 * When `ok` is `true`, `order` contains all tasks in dependency order.
 * When `ok` is `false`, `cycle` identifies the offending tasks.
 */
export type TopologicalSortResult =
  | {
      readonly ok: true;
      readonly order: readonly TaskId[];
      readonly cycle: null;
    }
  | {
      readonly ok: false;
      readonly order: readonly TaskId[];
      readonly cycle: DependencyCycle;
    };
```

---

### `createSchedulerEngine`

Creates the scheduler engine facade used by grid state, mutation services, tests, and demos.

```ts
export function createSchedulerEngine(): SchedulerEngine;
```

---

### `ScheduledTaskKind`

Classification of a scheduled task's type after engine processing.

```ts
/** Classification of a scheduled task's type after engine processing. */
export type ScheduledTaskKind = 'task' | 'summary' | 'milestone';
```

---

### `ScheduleOrigin`

Indicates how the scheduler determined a task's dates.
This is intentionally user-facing: row/tooling code can explain whether a
task moved because of dependencies, a hard constraint, manual scheduling,
entered actuals, or optional resource leveling.

```ts
/**
 * Indicates how the scheduler determined a task's dates.
 * This is intentionally user-facing: row/tooling code can explain whether a
 * task moved because of dependencies, a hard constraint, manual scheduling,
 * entered actuals, or optional resource leveling.
 */
export type ScheduleOrigin = 'normalized' | 'dependency' | 'constraint' | 'manual' | 'rollup' | 'actual' | 'leveling';
```

---

### `ScheduledTask` (Extended from `index.ts`)

A task after being processed by the scheduling engine.
Extends the raw {@link TaskEntity} with computed scheduling metadata.

```ts
interface ScheduledTask {
  /** Resolved task type. */
    readonly type: ScheduledTaskKind;
  /** Whether the task was manually scheduled (bypassing auto-scheduling). */
    readonly manuallyScheduled: boolean;
  /** Whether the task is excluded from scheduling. */
    readonly inactive: boolean;
  /** How the scheduler determined this task's dates. */
    readonly scheduleOrigin: ScheduleOrigin;
  /** Earliest scheduled start after dependencies, constraints, actuals, and leveling are applied. */
    readonly earlyStartDate: ISODateString;
  /** Earliest scheduled finish after dependencies, constraints, actuals, and leveling are applied. */
    readonly earlyFinishDate: ISODateString;
  /** Latest start that preserves the computed project finish. */
    readonly lateStartDate: ISODateString;
  /** Latest finish that preserves the computed project finish. */
    readonly lateFinishDate: ISODateString;
  /** Total slack (float) in calendar days before the task delays the project end. */
    readonly totalSlackDays: number
}
```

---

### `SchedulerCycleIssue`

A dependency cycle was detected during scheduling.

```ts
interface SchedulerCycleIssue {
  readonly code: 'dependency-cycle';
  /** Human-readable description of the cycle. */
    readonly message: string;
  /** Task ids involved in the cycle. */
    readonly taskIds: readonly TaskId[];
  /** Dependency ids that form the detected cycle path. */
    readonly dependencyIds: readonly string[]
}
```

---

### `MissingDependencyTaskIssue`

A dependency references a task that does not exist in the project.

```ts
interface MissingDependencyTaskIssue {
  readonly code: 'missing-dependency-task';
  readonly message: string;
  readonly taskIds: readonly TaskId[];
  readonly dependencyIds: readonly string[]
}
```

---

### `InvalidTaskConstraintIssue`

A task constraint could not be satisfied as specified.

```ts
interface InvalidTaskConstraintIssue {
  readonly code: 'invalid-task-constraint';
  readonly message: string;
  readonly taskIds: readonly TaskId[]
}
```

---

### `SchedulerDataValidationCode`

```ts
export type SchedulerDataValidationCode =
  | 'duplicate-task-id'
  | 'duplicate-dependency-id'
  | 'duplicate-resource-id'
  | 'duplicate-assignment-id'
  | 'missing-task-calendar'
  | 'missing-resource-calendar'
  | 'missing-assignment-task'
  | 'missing-assignment-resource'
  | 'invalid-working-calendar'
  | 'invalid-task-date-range'
  | 'invalid-task-progress'
  | 'invalid-task-work'
  | 'invalid-task-units'
  | 'invalid-assignment-work'
  | 'invalid-assignment-units'
  | 'invalid-resource-units'
  | 'invalid-resource-cost';
```

---

### `SchedulerDataValidationIssue`

Data is structurally invalid but can usually still be rendered for correction.

```ts
interface SchedulerDataValidationIssue {
  readonly code: SchedulerDataValidationCode;
  readonly message: string;
  readonly taskIds: readonly TaskId[];
  readonly dependencyIds: readonly string[];
  readonly resourceIds: readonly ResourceId[];
  readonly assignmentIds: readonly string[];
  readonly calendarIds: readonly CalendarId[]
}
```

---

### `SchedulerIssue`

Union of all issue types the scheduler can report.

```ts
/** Union of all issue types the scheduler can report. */
export type SchedulerIssue =
  | SchedulerCycleIssue
  | MissingDependencyTaskIssue
  | InvalidTaskConstraintIssue
  | SchedulerDataValidationIssue;
```

---

### `ConstraintWindowConflict`

A soft constraint (window-based) conflicted with a dependency requirement.

```ts
interface ConstraintWindowConflict {
  readonly code: 'constraint-window-conflict';
  readonly taskId: TaskId;
  readonly constraintType: Exclude<
      TaskConstraintType,
      'must-start-on' | 'must-finish-on'
    >;
  readonly constraintDate: ISODateString;
  readonly requiredStartDate: ISODateString;
  readonly attemptedStartDate: ISODateString;
  readonly resolvedStartDate: ISODateString;
  readonly message: string
}
```

---

### `DependencyConstraintConflict`

A dependency requirement conflicted with an explicit constraint on the same task.

```ts
interface DependencyConstraintConflict {
  readonly code: 'dependency-constraint-conflict';
  readonly taskId: TaskId;
  readonly dependencyId: string;
  readonly dependencyType: DependencyEntity['type'];
  readonly constraintType: TaskConstraintType;
  readonly requiredStartDate: ISODateString;
  readonly resolvedStartDate: ISODateString;
  readonly message: string
}
```

---

### `HardConstraintConflict`

A hard constraint (`must-start-on` / `must-finish-on`) could not be honoured.

```ts
interface HardConstraintConflict {
  readonly code: 'hard-constraint-conflict';
  readonly taskId: TaskId;
  readonly constraintType: Extract<TaskConstraintType, 'must-start-on' | 'must-finish-on'>;
  readonly constraintDate: ISODateString;
  readonly resolvedStartDate: ISODateString;
  readonly message: string
}
```

---

### `FinishConstraintConflict`

Final resolved finish violates a finish-based constraint (commonly due to splits).

```ts
interface FinishConstraintConflict {
  readonly code: 'finish-constraint-conflict';
  readonly taskId: TaskId;
  readonly constraintType: Extract<TaskConstraintType, 'must-finish-on' | 'finish-no-earlier-than' | 'finish-no-later-than'>;
  readonly constraintDate: ISODateString;
  readonly resolvedStartDate: ISODateString;
  readonly resolvedFinishDate: ISODateString;
  readonly message: string
}
```

---

### `ManualDependencyViolation`

A manually scheduled task violates an active dependency requirement.

```ts
interface ManualDependencyViolation {
  readonly code: 'manual-dependency-violation';
  readonly taskId: TaskId;
  readonly dependencyId: string;
  readonly dependencyType: DependencyEntity['type'];
  readonly requiredStartDate: ISODateString;
  readonly authoredStartDate: ISODateString;
  readonly resolvedStartDate: ISODateString;
  readonly message: string
}
```

---

### `AutoDependencyAdjustment`

An auto-scheduled task was moved by dependencies while warning mode is enabled.

```ts
interface AutoDependencyAdjustment {
  readonly code: 'auto-dependency-adjustment';
  readonly taskId: TaskId;
  readonly dependencyId: string;
  readonly dependencyType: DependencyEntity['type'];
  readonly requiredStartDate: ISODateString;
  readonly authoredStartDate: ISODateString;
  readonly resolvedStartDate: ISODateString;
  readonly message: string
}
```

---

### `DeadlineMissedConflict`

A task finishes after its deadline date.

```ts
interface DeadlineMissedConflict {
  readonly code: 'deadline-missed';
  readonly taskId: TaskId;
  readonly deadlineDate: ISODateString;
  readonly resolvedFinishDate: ISODateString;
  readonly message: string
}
```

---

### `ResourceOverallocationConflict`

One resource is assigned above capacity on a scheduled date.

```ts
interface ResourceOverallocationConflict {
  readonly code: 'resource-overallocation';
  readonly taskId: TaskId;
  readonly resourceId: ResourceId;
  readonly date: ISODateString;
  readonly allocatedUnits: number;
  readonly capacityUnits: number;
  readonly taskIds: readonly TaskId[];
  readonly message: string
}
```

---

### `ResourceLevelingAdjustmentConflict`

Optional resource leveling shifted a task from its dependency/constraint date.

```ts
interface ResourceLevelingAdjustmentConflict {
  readonly code: 'resource-leveling-adjustment';
  readonly taskId: TaskId;
  readonly resourceId?: ResourceId;
  readonly previousStartDate: ISODateString;
  readonly previousEndDate: ISODateString;
  readonly resolvedStartDate: ISODateString;
  readonly resolvedEndDate: ISODateString;
  readonly message: string
}
```

---

### `SchedulerConflict`

Union of all conflict types the scheduler can report.

```ts
/** Union of all conflict types the scheduler can report. */
export type SchedulerConflict =
  | ConstraintWindowConflict
  | DependencyConstraintConflict
  | HardConstraintConflict
  | FinishConstraintConflict
  | ManualDependencyViolation
  | AutoDependencyAdjustment
  | DeadlineMissedConflict
  | ResourceOverallocationConflict
  | ResourceLevelingAdjustmentConflict;
```

---

### `SchedulingResult`

Result of running the scheduler on a project.
Contains the computed task list, detected issues, conflicts,
and the set of dependency ids on the critical path.

```ts
/**
 * Result of running the scheduler on a project.
 * Contains the computed task list, detected issues, conflicts,
 * and the set of dependency ids on the critical path.
 */
export type SchedulingResult =
  | {
      readonly ok: true;
      readonly tasks: readonly ScheduledTask[];
      readonly tasksById: ReadonlyMap<TaskId, ScheduledTask>;
      readonly issues: readonly SchedulerIssue[];
      readonly conflicts: readonly SchedulerConflict[];
      readonly criticalDependencyIds: ReadonlySet<string>;
    }
  | {
      readonly ok: false;
      readonly tasks: readonly ScheduledTask[];
      readonly tasksById: ReadonlyMap<TaskId, ScheduledTask>;
      readonly issues: readonly SchedulerIssue[];
      readonly conflicts: readonly SchedulerConflict[];
      readonly criticalDependencyIds: ReadonlySet<string>;
    };
```

---

### `SchedulerEngine`

The scheduling engine recalculates task dates based on dependencies,
constraints, and calendar rules. It also performs validation and
computes the critical path.

```ts
interface SchedulerEngine {
  /**
     * Recalculates the full project schedule.
     * @param project - Complete project snapshot.
     * @param options - Optional scheduling parameters.
     * @returns Computed schedule with issues and conflicts.
     */
    recalculate(project: ProjectSnapshot, options?: SchedulerOptions): SchedulingResult;
  /**
     * Validates task/dependency data without running a full schedule.
     * @returns Any structural issues found.
     */
    validate(
      tasks: readonly TaskEntity[],
      dependencies: readonly DependencyEntity[],
      calendars: readonly CalendarEntity[],
      resources?: readonly ResourceEntity[],
      assignments?: readonly AssignmentEntity[],
    ): readonly SchedulerIssue[]
}
```

---

### `SchedulerOptions`

Options passed to {@link SchedulerEngine.recalculate}.

```ts
interface SchedulerOptions {
  /** When true, duration calculations skip holidays and non-working weekdays. */
    readonly excludeHolidaysFromDuration?: boolean;
  /** Default task mode when a source row does not explicitly set `taskMode`. */
    readonly taskModeDefault?: 'auto' | 'manual';
  /** Policy for auto dependency violations. Both modes keep effective dates dependency-valid; `warn` also emits adjustment conflicts. */
    readonly autoDependencyViolationBehavior?: 'clamp' | 'warn';
  /** Whether manually scheduled dependency violations should be reported. */
    readonly manualDependencyViolationBehavior?: 'warn' | 'ignore';
  /** Calendar basis used for dependency lag/lead. */
    readonly lagCalendar?: 'calendar-days' | 'working-days';
  /** Direction of scheduling. */
    readonly scheduleFrom?: 'project-start' | 'project-finish';
  /** Optional project start anchor used by forward scheduling policies. */
    readonly projectStartDate?: ISODateString;
  /** Optional project finish anchor used by backward scheduling policies. */
    readonly projectFinishDate?: ISODateString;
  /** Resource capacity policy. `warn` reports over-allocation; `auto` shifts eligible forward-scheduled auto tasks. */
    readonly resourceLeveling?: 'off' | 'warn' | 'auto';
  /** When true, auto-leveling only delays tasks up to their pre-leveling total slack. */
    readonly resourceLevelingWithinSlack?: boolean;
  /** Default task type used for effort calculations. */
    readonly effortModeDefault?: TaskEffortMode;
  /** Progress-aware scheduling policy for actual start and remaining work. Actual finish is always authoritative. */
    readonly progressRescheduling?: 'off' | 'remaining-duration'
}
```

---

### `ResolvedSchedulerOptions`

```ts
interface ResolvedSchedulerOptions {
  readonly excludeHolidaysFromDuration: boolean;
  readonly taskModeDefault: 'auto' | 'manual';
  readonly autoDependencyViolationBehavior: 'clamp' | 'warn';
  readonly manualDependencyViolationBehavior: 'warn' | 'ignore';
  readonly lagCalendar: 'calendar-days' | 'working-days';
  readonly scheduleFrom: 'project-start' | 'project-finish';
  readonly projectStartDate?: ISODateString;
  readonly projectFinishDate?: ISODateString;
  readonly resourceLeveling: 'off' | 'warn' | 'auto';
  readonly resourceLevelingWithinSlack: boolean;
  readonly effortModeDefault: TaskEffortMode;
  readonly progressRescheduling: 'off' | 'remaining-duration'
}
```

---

### `parseTaskStatusEditValue`

```ts
export function parseTaskStatusEditValue(
  value: unknown,
  labels?: TaskEditLabelOverrides['status'],
): TaskStatus | null;
```

---

### `resolveTaskEdit`

Validates and resolves a user-initiated inline edit on a task field.
Handles date parsing, duration recalculation, constraint checking,
and prevents edits on derived fields (e.g. summary task dates).

**@param** _task - The original task entity (before the edit).
 *
**@param** scheduledTask - The scheduled version of the task (with computed fields).
 *
**@param** field - The column property name being edited.
 *
**@param** value - The raw value entered by the user.
 *
**@returns** A {@link TaskEditResult} with a validated patch or an error.

```ts
export function resolveTaskEdit(
  _task: TaskEntity,
  scheduledTask: ScheduledTask,
  field: string,
  value: unknown,
  options: TaskEditOptions =;
```

---

### `TaskModeEditValue`

```ts
export type TaskModeEditValue = keyof typeof TASK_MODE_LABELS;
```

---

### `TaskConstraintTypeEditValue`

```ts
export type TaskConstraintTypeEditValue = '' | TaskConstraintType;
```

---

### `TaskEditLabelOverrides`

```ts
interface TaskEditLabelOverrides {
  readonly status?: Partial<Record<TaskStatus, string>>;
  readonly taskMode?: Partial<Record<TaskModeEditValue, string>>;
  readonly effortMode?: Partial<Record<TaskEffortMode, string>>;
  readonly constraintType?: Partial<Record<TaskConstraintTypeEditValue, string>>
}
```

---

### `TaskEditOptions`

```ts
interface TaskEditOptions {
  readonly labels?: TaskEditLabelOverrides
}
```

---

### `TaskEditSuccess`

Successful task edit — contains the validated patch to apply.

```ts
interface TaskEditSuccess {
  readonly ok: true;
  /** Validated partial update ready to be applied to the task. */
    readonly patch: TaskUpdate
}
```

---

### `TaskEditFailure`

Failed task edit — contains the error code and a human-readable message.

```ts
interface TaskEditFailure {
  readonly ok: false;
  /** Error classification: invalid field name, invalid value, or readonly derived field. */
    readonly code: 'invalid-field' | 'invalid-value' | 'readonly-derived-field';
  /** Explanation of why the edit was rejected. */
    readonly message: string
}
```

---

### `TaskEditResult`

Discriminated union returned by {@link resolveTaskEdit}.
Check the `ok` property to determine success or failure.

```ts
/**
 * Discriminated union returned by {@link resolveTaskEdit}.
 * Check the `ok` property to determine success or failure.
 */
export type TaskEditResult = TaskEditSuccess | TaskEditFailure;
```

---

### `getGanttColumnPresetProps`

```ts
export function getGanttColumnPresetProps(preset: GanttColumnPresetName): GanttColumnPresetProp[];
```

---

### `createGanttColumnPreset`

```ts
export function createGanttColumnPreset(preset: GanttColumnPresetName, options: GanttColumnPresetOptions =;
```

---

### `createGanttColumnPresets`

```ts
export function createGanttColumnPresets(options: GanttColumnPresetOptions =;
```

---

### `GanttColumnPresetName`

```ts
export type GanttColumnPresetName =
  | 'core'
  | 'schedule'
  | 'dependencies'
  | 'resources'
  | 'baseline'
  | 'cost'
  | 'progress'
  | 'all';
```

---

### `GanttColumnPresetProp`

```ts
export type GanttColumnPresetProp = Extract<TaskTableColumnProp, TaskGridColumnProp>;
```

---

### `GanttColumnPresetOptions`

```ts
interface GanttColumnPresetOptions {
  /** Built-in Gantt option label overrides applied to generated default columns. */
    readonly labels?: GanttLabelsConfig
}
```

---

### `ganttColumnPresetProps`

```ts
ganttColumnPresetProps: { readonly core: readonly ["wbs", "name", "startDate", "endDate", "duration", "percentDone"]; readonly schedule: readonly ["wbs", "name", "taskMode", "scheduleOrigin", "startDate", "endDate", "duration", "constraintType", "constraintDate", "deadlineDate", "schedulingWarning", "totalSlackDays"]; readonly dependencies: readonly ["wbs", "name", "predecessors", "successors", "totalSlackDays"]; readonly resources: readonly ["wbs", "name", "assignees", "workHours", "effortMode", "effortDriven", "resourceRole", "resourceCapacity", "resourceLoadSummary", "canLevel", "levelingDelayDays"]; readonly baseline: readonly ["wbs", "name", "startDate", "endDate", "actualStartDate", "actualFinishDate", "startVarianceDays", "finishVarianceDays", "durationVarianceDays", "progressVariancePercent"]; readonly cost: readonly ["wbs", "name", "cost", "workHours", "assignees"]; readonly progress: readonly ["wbs", "name", "status", "percentDone", "remainingDurationDays", "actualStartDate", "actualFinishDate", "progressVariancePercent"]; readonly all: readonly ["wbs", "name", "cost", "startDate", "endDate", "duration", "workHours", "remainingDurationDays", "actualStartDate", "actualFinishDate", "effortMode", "effortDriven", "inactive", "priority", "canLevel", "levelingDelayDays", "earlyStartDate", "earlyFinishDate", "lateStartDate", "lateFinishDate", "totalSlackDays", "startVarianceDays", "finishVarianceDays", "durationVarianceDays", "progressVariancePercent", "taskMode", "scheduleOrigin", "constraintType", "constraintDate", "deadlineDate", "schedulingWarning", "percentDone", "predecessors", "successors", "status", "assignees", "resourceRole", "resourceCapacity", "resourceLoadSummary"]; };
```

---

### `createGanttDateFormatContext`

```ts
export function createGanttDateFormatContext(
  project: Pick<GanttPluginConfig, 'timeZone' | 'dateFormats'> | null | undefined,
  surface: GanttDateFormatSurface,
  field?: string,
  fallbackLocale = 'en-US',
): GanttDateFormatContext;
```

---

### `formatGanttDateWithOption`

```ts
export function formatGanttDateWithOption(
  value: string | null | undefined,
  option: GanttDateFormatOption | undefined,
  context: GanttDateFormatContext,
): string;
```

---

### `formatGanttTableDate`

```ts
export function formatGanttTableDate(
  value: string | null | undefined,
  project: Pick<GanttPluginConfig, 'timeZone' | 'dateFormats'> | null | undefined,
  field?: string,
): string;
```

---

### `formatGanttTooltipDate`

```ts
export function formatGanttTooltipDate(
  value: string,
  project: Pick<GanttPluginConfig, 'timeZone' | 'dateFormats'> | null | undefined,
  field?: string,
): string;
```

---

### `hasCustomGanttEditorDateFormat`

```ts
export function hasCustomGanttEditorDateFormat(
  project: Pick<GanttPluginConfig, 'dateFormats'> | null | undefined,
): boolean;
```

---

### `formatGanttEditorDate`

```ts
export function formatGanttEditorDate(
  value: string | null | undefined,
  project: Pick<GanttPluginConfig, 'timeZone' | 'dateFormats'> | null | undefined,
  field?: string,
): string;
```

---

### `parseGanttDateInput`

```ts
export function parseGanttDateInput(
  value: unknown,
  project: Pick<GanttPluginConfig, 'timeZone' | 'dateFormats'> | null | undefined,
  surface: GanttDateFormatSurface,
  field?: string,
): ISODateString | ISODateTimeString | null;
```

---

### `resolveGanttTimelineDateFormatter`

```ts
export function resolveGanttTimelineDateFormatter(
  project: Pick<GanttPluginConfig, 'timeZone' | 'dateFormats'> | null | undefined,
  fallbackLocale: string,
  fallbackFormatter?: TimelineDateFormatter,
): TimelineDateFormatter | undefined;
```

---

### `createTimelineDateFormatContext`

```ts
export function createTimelineDateFormatContext(
  project: Pick<GanttPluginConfig, 'timeZone' | 'dateFormats'> | null | undefined,
  timelineContext: TimelineDateFormatterContext,
): GanttDateFormatContext;
```

---

### `DEFAULT_GANTT_DEPENDENCY_TYPES`

```ts
DEFAULT_GANTT_DEPENDENCY_TYPES: readonly ["finish-to-start", "start-to-start", "finish-to-finish", "start-to-finish"];
```

---

### `dependencyEndpointsToType`

```ts
export function dependencyEndpointsToType(
  predecessor: GanttDependencyEndpoint,
  successor: GanttDependencyEndpoint,
): DependencyType;
```

---

### `dependencyTypeToEndpoints`

```ts
export function dependencyTypeToEndpoints(type: DependencyType): DependencyEndpointPair;
```

---

### `getDefaultDependencyDropdownType`

```ts
export function getDefaultDependencyDropdownType(
  allowedTypes: readonly DependencyType[] = DEFAULT_GANTT_DEPENDENCY_TYPES,
): DependencyType | null;
```

---

### `getGanttDependencyDropdownCellBadges`

```ts
export function getGanttDependencyDropdownCellBadges(
  value: unknown,
  config: GanttDependencyDropdownConfig,
): string[];
```

---

### `normalizeGanttDependencyDropdownAllowedTypes`

```ts
export function normalizeGanttDependencyDropdownAllowedTypes(
  allowedTypes: readonly DependencyType[] | undefined,
): readonly DependencyType[];
```

---

### `parseDependencyDropdownDisplayValue`

```ts
export function parseDependencyDropdownDisplayValue(
  displayValue: unknown,
  options: readonly GanttDependencyDropdownTaskOption[],
): GanttDependencyDropdownValue[];
```

---

### `GanttDependencyDropdownConfig`

```ts
interface GanttDependencyDropdownConfig {
  readonly tasks: readonly GanttDependencyDropdownTaskOption[];
  readonly getTasks?: () => readonly GanttDependencyDropdownTaskOption[];
  readonly allowedTypes?: readonly DependencyType[]
}
```

---

### `GanttDependencyDropdownTaskOption`

```ts
interface GanttDependencyDropdownTaskOption {
  readonly taskId: TaskId;
  readonly wbs: string;
  readonly name: string;
  readonly label: string
}
```

---

### `GanttDependencyDropdownValue`

```ts
interface GanttDependencyDropdownValue {
  readonly taskId: TaskId;
  readonly type: DependencyType;
  readonly lagDays?: number
}
```

---

### `GanttDependencyEndpoint`

```ts
export type GanttDependencyEndpoint = 'start' | 'finish';
```

---

### `GANTT_DEPENDENCY_DROPDOWN_COLUMN_TYPE`

```ts
GANTT_DEPENDENCY_DROPDOWN_COLUMN_TYPE: string;
```

---

### `GanttDependencyDropdownEditor`

```ts
class GanttDependencyDropdownEditor {
  async componentDidRender(): Promise<void>;

  getValue();

  disconnectedCallback();

  render(createElement: HyperFunc<VNode>);
}
```

---

### `ganttDependencyDropdownCellTemplate`

```ts
ganttDependencyDropdownCellTemplate: CellTemplate<DataType<any, ColumnProp>> | undefined;
```

---

### `GanttDependencyDropdownColumn`

```ts
GanttDependencyDropdownColumn: {
  cellTemplate: CellTemplate<DataType<any, ColumnProp>>;
  editor: typeof GanttDependencyDropdownEditor;
  cellProperties: () => { style: { padding: string; }; class: string; };
};
```

---

### `GANTT_DEPENDENCY_HOVER_EVENT`

Fired when the user hovers over a dependency arrow.

```ts
GANTT_DEPENDENCY_HOVER_EVENT: string;
```

---

### `GANTT_DEPENDENCY_SELECT_EVENT`

Fired when the user clicks a dependency arrow.

```ts
GANTT_DEPENDENCY_SELECT_EVENT: string;
```

---

### `GANTT_TASK_CREATE_EVENT`

Dispatched to create a new task. Provide {@link GanttCreateTaskOptions} as the detail.

```ts
GANTT_TASK_CREATE_EVENT: string;
```

---

### `GANTT_TASK_CREATED_EVENT`

Fired after a task is created and selected.

```ts
GANTT_TASK_CREATED_EVENT: string;
```

---

### `GANTT_TASK_EDIT_EVENT`

Dispatched to open editing UI for a task.

```ts
GANTT_TASK_EDIT_EVENT: string;
```

---

### `GANTT_TASK_INDENT_EVENT`

Dispatched to indent (demote) the selected task one level deeper.

```ts
GANTT_TASK_INDENT_EVENT: string;
```

---

### `GANTT_TASK_OUTDENT_EVENT`

Dispatched to outdent (promote) the selected task one level up.

```ts
GANTT_TASK_OUTDENT_EVENT: string;
```

---

### `GANTT_TASK_DELETE_EVENT`

Dispatched to delete the selected task and its descendants.

```ts
GANTT_TASK_DELETE_EVENT: string;
```

---

### `GANTT_TASK_CONVERT_TO_MILESTONE_EVENT`

Dispatched to convert the selected task into a milestone.

```ts
GANTT_TASK_CONVERT_TO_MILESTONE_EVENT: string;
```

---

### `GANTT_ZOOM_IN_EVENT`

Dispatched to zoom in by one level.

```ts
GANTT_ZOOM_IN_EVENT: string;
```

---

### `GANTT_ZOOM_OUT_EVENT`

Dispatched to zoom out by one level.

```ts
GANTT_ZOOM_OUT_EVENT: string;
```

---

### `GANTT_ZOOM_SET_LEVEL_EVENT`

Dispatched to jump directly to a specific zoom level by id.

```ts
GANTT_ZOOM_SET_LEVEL_EVENT: string;
```

---

### `GANTT_SEARCH_EVENT`

Dispatched to filter visible Gantt rows by a free-text query.

```ts
GANTT_SEARCH_EVENT: string;
```

---

### `GANTT_PANEL_RESIZE_EVENT`

Fired when the user resizes the table/timeline panel divider.

```ts
GANTT_PANEL_RESIZE_EVENT: string;
```

---

### `GANTT_HISTORY_RECORD_EVENT`

Internal history marker used to record Gantt timeline mutations without replaying them immediately.

```ts
GANTT_HISTORY_RECORD_EVENT: string;
```

---

### `GANTT_BEFORE_TASK_CHANGE_EVENT`

Cancelable event fired before a task is created, moved, resized, or edited.

```ts
GANTT_BEFORE_TASK_CHANGE_EVENT: string;
```

---

### `GANTT_BEFORE_DEPENDENCY_CHANGE_EVENT`

Cancelable event fired before a dependency is created, deleted, or edited.

```ts
GANTT_BEFORE_DEPENDENCY_CHANGE_EVENT: string;
```

---

### `GANTT_BEFORE_ASSIGNMENT_CHANGE_EVENT`

Cancelable event fired before task assignments are modified.

```ts
GANTT_BEFORE_ASSIGNMENT_CHANGE_EVENT: string;
```

---

### `GanttPanelResizeEventDetail`

Detail payload for panel resize events.

```ts
interface GanttPanelResizeEventDetail {
  /** New panel width in pixels. */
    readonly width: number
}
```

---

### `GanttDependencyInteractionDetail`

Detail payload for dependency hover/select events.

```ts
interface GanttDependencyInteractionDetail {
  /** Dependency id, or `null` when the interaction is cleared. */
    readonly dependencyId: DependencyId | null;
  /** Full dependency entity, or `null` when cleared. */
    readonly dependency: DependencyEntity | null
}
```

---

### `GanttTaskHierarchyActionDetail`

Detail payload for indent/outdent events.

```ts
interface GanttTaskHierarchyActionDetail {
  /** Target task id (defaults to the currently selected task). */
    readonly taskId?: TaskId;
  /** Target task ids for bulk task actions. */
    readonly taskIds?: readonly TaskId[]
}
```

---

### `GanttTaskCreatedEventDetail`

Detail payload for the post-create task event.

```ts
interface GanttTaskCreatedEventDetail {
  /** Created task id. */
    readonly taskId: TaskId;
  /** Created task entity. */
    readonly task: TaskEntity;
  /**
     * Whether task-created listeners such as the packaged editor should open a
     * follow-up UI for the new task.
     */
    readonly openEditor?: boolean
}
```

---

### `GanttTaskEditEventDetail`

Detail payload for task edit requests.

```ts
interface GanttTaskEditEventDetail {
  /** Task id to edit. */
    readonly taskId: TaskId
}
```

---

### `GanttZoomSetLevelDetail`

Detail payload for zoom-set-level events.

```ts
interface GanttZoomSetLevelDetail {
  /** The zoom level id to jump to. */
    readonly levelId: string
}
```

---

### `GanttSearchEventDetail`

Detail payload for Gantt search events.

```ts
interface GanttSearchEventDetail {
  /** Free-text query matched against task rows, assignees, dates, status, tags, and costs. */
    readonly query: string
}
```

---

### `GanttBeforeTaskChangeAction`

Kind of task mutation that triggered the before-change event.

```ts
// Before-mutation event details (cancelable)

/** Kind of task mutation that triggered the before-change event. */
export type GanttBeforeTaskChangeAction = 'move' | 'resize' | 'create' | 'edit' | 'progress' | 'split' | 'indent' | 'outdent' | 'delete' | 'convert-to-milestone';
```

---

### `GanttBeforeTaskChangeDetail`

Detail payload for the cancelable {@link GANTT_BEFORE_TASK_CHANGE_EVENT}.
Call `event.preventDefault()` to block the change.

```ts
interface GanttBeforeTaskChangeDetail {
  readonly action: GanttBeforeTaskChangeAction;
  readonly taskId: TaskId | null;
  /** Partial task with proposed values */
    readonly changes: Partial<TaskEntity>;
  /** Previous values of fields being changed */
    readonly previousValues: Partial<TaskEntity>;
  /** Source row that will receive the task-row write, when available. */
    readonly sourceRow?: DataType;
  /** Physical source row index that will receive the mapped write, when available. */
    readonly sourceIndex?: number;
  /** Proposed flat source-row patch for this task row. */
    readonly sourcePatch?: Record<string, unknown>;
  /** Previous source values for the keys in `sourcePatch`. */
    readonly previousSourceValues?: Record<string, unknown>
}
```

---

### `GanttBeforeDependencyChangeAction`

Kind of dependency mutation that triggered the before-change event.

```ts
/** Kind of dependency mutation that triggered the before-change event. */
export type GanttBeforeDependencyChangeAction = 'create' | 'delete' | 'edit' | 'replace';
```

---

### `GanttBeforeDependencyChangeDetail`

Detail payload for the cancelable {@link GANTT_BEFORE_DEPENDENCY_CHANGE_EVENT}.
Call `event.preventDefault()` to block the change.

```ts
interface GanttBeforeDependencyChangeDetail {
  readonly action: GanttBeforeDependencyChangeAction;
  readonly dependencyId: DependencyId | null;
  readonly dependency: DependencyEntity | null;
  readonly previousDependency?: DependencyEntity | null;
  /** Full proposed dependency set for batch replacements. */
    readonly dependencies?: readonly DependencyEntity[];
  /** Full previous dependency set for batch replacements. */
    readonly previousDependencies?: readonly DependencyEntity[]
}
```

---

### `GanttBeforeAssignmentChangeAction`

Kind of assignment mutation that triggered the before-change event.

```ts
/** Kind of assignment mutation that triggered the before-change event. */
export type GanttBeforeAssignmentChangeAction = 'edit';
```

---

### `GanttBeforeAssignmentChangeDetail`

Detail payload for the cancelable {@link GANTT_BEFORE_ASSIGNMENT_CHANGE_EVENT}.
Call `event.preventDefault()` to block the change.

```ts
interface GanttBeforeAssignmentChangeDetail {
  readonly action: GanttBeforeAssignmentChangeAction;
  readonly taskId: TaskId;
  readonly assignments: readonly AssignmentEntity[];
  readonly previousAssignments: readonly AssignmentEntity[]
}
```

---

### `GanttPanelResizeDetail`

Payload emitted with each `gantt-panel-resize` event.

```ts
interface GanttPanelResizeDetail {
  /** The current width of the gantt panel in pixels. */
    readonly width: number
}
```

---

### `GanttPanelResizePluginConfig`

```ts
interface GanttPanelResizePluginConfig {
  /**
     * Initial width of the gantt (colPinEnd) panel in pixels or as a percentage
     * of the grid width (e.g. `"40%"`).
     * Defaults to the current rendered width of the panel.
     */
    initialWidth?: number | string
}
```

---

### `GanttPanelResizePlugin`

GanttPanelResizePlugin adds a drag handle on the left edge of the
pinned-end (gantt chart) viewport, allowing the user to resize the split
between the task-list columns (rgCol) and the gantt chart (colPinEnd).

Dragging the handle left expands the gantt panel; dragging right shrinks it.
An `gantt-panel-resize` event is emitted on the revogrid element during and
after each drag with `{ width: number }` in its detail.

```ts
class GanttPanelResizePlugin {
  /**
     * Programmatically set the gantt panel width.
     */
  setPanelWidth(width: number): void;

  /**
     * Returns the current gantt panel (colPinEnd) width in pixels, or null if
     * the viewport is not yet rendered.
     */
  getPanelWidth(): number | null;
}
```

---

### `GanttPlugin`

#### Dependencies

- **Auto-installed** `OverlayPlugin`, `EventManagerPlugin`, `HistoryPlugin`, `TooltipPlugin`, `ContextMenuPlugin`: Installs these Pro plugins internally when absent.
- **Auto-installed** `RowOrderPlugin`, `TreeDataPlugin`, `ColumnHidePlugin`, `GanttPanelResizePlugin`, `GanttTaskEditorDialogPlugin`: Installs these plugins internally for Gantt grid structure, row reordering, panel resizing, and task editing.
- **Auto-installed** `AdvanceFilterPlugin`: Installs advanced filtering when Gantt enables task-table filters after RevoGrid core plugin bootstrap.
- **Config integration** `direct-tree-config`, `direct-event-manager-config`, `direct-history-config`: Reads and writes direct plugin config props while synchronizing Gantt state.

```ts
class GanttPlugin {
  applyGantt(config?: GanttPluginConfig);

  clearGantt();

  zoomIn(): boolean;

  zoomOut(): boolean;

  setZoomLevel(levelId: string): boolean;

  getZoomLevel();

  canZoomIn(): boolean;

  canZoomOut(): boolean;

  getVisibleRange();

  captureBaseline(options?: CaptureBaselineOptions): BaselineSnapshot | null;

  createTask(options?: GanttCreateTaskOptions): TaskId | null;

  updateTask(taskId: TaskId, patch: TaskUpdate): boolean;

  finalizeTaskCreate(taskId: TaskId): boolean;

  discardTaskCreate(taskId: TaskId): boolean;

  indentTasks(taskIds?: readonly TaskId[]): readonly TaskId[];

  indentTask(taskId?: TaskId): TaskId | null;

  outdentTasks(taskIds?: readonly TaskId[]): readonly TaskId[];

  outdentTask(taskId?: TaskId): TaskId | null;

  convertTasksToMilestones(taskIds?: readonly TaskId[]): readonly TaskId[];

  convertTaskToMilestone(taskId?: TaskId): TaskId | null;

  deleteTasks(taskIds?: readonly TaskId[]): readonly TaskId[];

  deleteTask(taskId?: TaskId): TaskId | null;
}
```

---

### `GanttPluginConfig`

Top-level configuration for the {@link GanttPlugin}.
Pass this object to the grid element's `gantt` property.

```ts
interface GanttPluginConfig {
  // Project metadata (required)
    /** Unique project identifier. */
    readonly id: EntityId;
  /** Project display name. */
    readonly name: string;
  /** Project data schema version. */
    readonly version: string;
  /** Currency code for cost calculations (e.g. `\"USD\"`). */
    readonly currency: string;
  /** Default IANA time zone (e.g. `\"America/New_York\"`). */
    readonly timeZone: string;
  /** Calendar used by default for new tasks. */
    readonly primaryCalendarId: CalendarId;
  /** Timestamp of last project modification. */
    readonly updatedAt: ISODateTimeString;
  /** Working calendars for tasks/resources, including optional intraday `workingHours`. */
    readonly calendars?: readonly CalendarEntity[];
  // Configuration (all optional)
    /** When `true`, packaged Gantt task, dependency, and assignment mutations are rejected. */
    readonly readOnly?: boolean;
  /** Pre-defined zoom level — see {@link TimelineZoomPreset}. */
    readonly zoomPreset?: TimelineZoomPreset;
  /** Timeline precision used by default zoom and interaction snapping. Defaults to `'day'`. */
    readonly timelinePrecision?: 'day' | 'hour';
  /** Timeline interaction snapping options for task create, move, and resize. */
    readonly snap?: GanttSnapConfig;
  /** Advanced zoom configuration overriding the preset. */
    readonly zoom?: TimelineZoomConfig;
  /** First day of week for timeline week headers/ticks, where `0` is Sunday and `1` is Monday. Defaults to Sunday. */
    readonly weekStartsOn?: 0 | 1;
  /**
     * Scheduling engine options.
     * These are MSP-inspired policies, not display preferences: they decide
     * whether authored dates move, warn, or stay anchored during recalculation.
     */
    readonly scheduling?: GanttSchedulingConfig;
  /** When `true`, users can create new tasks from the timeline. */
    readonly allowTaskCreate?: boolean;
  /** When `true`, shows a pinned bottom row for typing a new task name. Requires `allowTaskCreate`. */
    readonly taskCreateRow?: boolean;
  /** When `true`, dragging empty timeline space creates a new task. Disabled by default. */
    readonly allowTaskCreateByDrag?: boolean;
  /**
     * Built-in Gantt context menu integration. Enabled by default. Set to `false`
     * to opt out of generated row, column, and timeline menu items while keeping
     * application-provided RevoGrid context menu configuration untouched.
     */
    readonly contextMenu?: GanttContextMenuConfig | false;
  /** Restricts which dependency types the user may create. */
    readonly allowedDependencyTypes?: readonly DependencyType[];
  /** Filters the resource list to only show selected resources. */
    readonly resourceFilterIds?: readonly ResourceId[];
  /** Resource planning row view and load bar options. */
    readonly resourcePlanning?: GanttResourcePlanningConfig;
  /** Project-level date display and parsing preferences. */
    readonly dateFormats?: GanttDateFormatConfig;
  /** Built-in Gantt UI label overrides for localization. */
    readonly labels?: GanttLabelsConfig;
  /** Visual appearance options — see {@link GanttVisualConfig}. */
    readonly visuals?: GanttVisualConfig
}
```

---

### `GanttSnapConfig`

```ts
interface GanttSnapConfig {
  /** Unit used for timeline interaction snapping. Defaults to `timelinePrecision`. */
    readonly unit?: 'day' | 'hour';
  /** When `true`, snapping skips calendar holidays, closed weekdays, and closed hours. Defaults to `true`. */
    readonly workingTime?: boolean
}
```

---

### `GanttTaskSourceRow` (Extended from `index.ts`)

Flat authored task row shape consumed from `grid.source` by Gantt.

```ts
/** Flat authored task row shape consumed from `grid.source` by Gantt. */
export type GanttTaskSourceRow = GanttTaskSourceBase & (
  | { readonly duration: number }
  | { readonly endDate: ISODateString | ISODateTimeString }
);
```

---

### `GanttTaskModeOption`

```ts
export type GanttTaskModeOption = 'auto' | 'manual';
```

---

### `GanttConstraintTypeOption`

```ts
export type GanttConstraintTypeOption = '' | TaskConstraintType;
```

---

### `GanttLabelsConfig`

```ts
interface GanttLabelsConfig {
  /** Labels for task mode dropdown values. */
    readonly taskMode?: Partial<Record<GanttTaskModeOption, string>>;
  /** Labels for task status select values. */
    readonly status?: Partial<Record<TaskStatus, string>>;
  /** Labels for effort mode dropdown values. */
    readonly effortMode?: Partial<Record<TaskEffortMode, string>>;
  /** Labels for constraint type dropdown values. Use `''` for the no-constraint option. */
    readonly constraintType?: Partial<Record<GanttConstraintTypeOption, string>>
}
```

---

### `GanttContextMenuItemId`

```ts
export type GanttContextMenuItemId =
  | 'edit'
  | 'add'
  | 'convertToMilestone'
  | 'indent'
  | 'outdent'
  | 'delete'
  | 'search'
  | 'sortAsc'
  | 'sortDesc'
  | 'filter'
  | 'zoomIn'
  | 'zoomOut';
```

---

### `GanttContextMenuLabels`

```ts
export type GanttContextMenuLabels = Partial<Record<GanttContextMenuItemId, string>>;
```

---

### `GanttContextMenuHiddenItems`

```ts
export type GanttContextMenuHiddenItems = Partial<Record<GanttContextMenuItemId, boolean>>;
```

---

### `GanttContextMenuConfig`

```ts
interface GanttContextMenuConfig {
  /**
     * Enables generated task row and task bar actions such as Add, Indent,
     * Outdent, and Delete. Defaults to `true`.
     */
    readonly row?: boolean;
  /**
     * Enables generated task-table column actions and pinned timeline zoom
     * actions. Defaults to `true`.
     */
    readonly column?: boolean;
  /** Label overrides for built-in Gantt context-menu items. */
    readonly labels?: GanttContextMenuLabels;
  /** Hide specific built-in Gantt context-menu items by id. */
    readonly hidden?: GanttContextMenuHiddenItems
}
```

---

### `GanttDateFormatSurface`

```ts
export type GanttDateFormatSurface = 'table' | 'tooltip' | 'editor' | 'timeline';
```

---

### `GanttDateFormatContext`

```ts
interface GanttDateFormatContext {
  readonly surface: GanttDateFormatSurface;
  readonly field?: string;
  readonly locale: string;
  readonly timeZone: string;
  readonly levelId?: string;
  readonly rowId?: string;
  readonly unit?: string;
  readonly count?: number;
  readonly rowIndex?: number;
  readonly isLeafRow?: boolean
}
```

---

### `GanttDateFormatter`

```ts
export type GanttDateFormatter = (
  value: ISODateString | ISODateTimeString | string,
  context: GanttDateFormatContext,
) => string;
```

---

### `GanttDateParser`

```ts
export type GanttDateParser = (
  value: string,
  context: GanttDateFormatContext,
) => ISODateString | ISODateTimeString | null;
```

---

### `GanttDateFormatOption`

```ts
export type GanttDateFormatOption = Intl.DateTimeFormatOptions | GanttDateFormatter;
```

---

### `GanttDateEditorFormatConfig`

```ts
interface GanttDateEditorFormatConfig {
  readonly formatter?: GanttDateFormatter;
  readonly parser?: GanttDateParser;
  readonly options?: Intl.DateTimeFormatOptions
}
```

---

### `GanttDateFormatConfig`

```ts
interface GanttDateFormatConfig {
  /** BCP 47 locale tag used by Intl-based Gantt date formatting. */
    readonly locale?: string;
  /** IANA time zone used by Intl-based Gantt date formatting. Defaults to the project time zone. */
    readonly timeZone?: string;
  /** Managed task-table date cell format. Omit to keep ISO display. */
    readonly table?: GanttDateFormatOption;
  /** Task-bar tooltip date format. Omit to keep the existing UTC tooltip labels. */
    readonly tooltip?: GanttDateFormatOption;
  /** Task editor date display/parser configuration. */
    readonly editor?: GanttDateEditorFormatConfig;
  /** Timeline header formatter. Preferred over `zoom.defaultHeaderFormatter` when set. */
    readonly timeline?: TimelineDateFormatter;
  /** Fallback parser for custom table/editor date text. */
    readonly parser?: GanttDateParser
}
```

---

### `GanttResourcePlanningConfig`

Resource planning/load view configuration.

```ts
interface GanttResourcePlanningConfig {
  /** When `true`, the grid projects one row per resource instead of one row per task. */
    readonly enabled?: boolean;
  /** Restrict the resource planning rows to these resources. */
    readonly visibleResourceIds?: readonly ResourceId[];
  /** Load bucket size. `day` shows one bar per day; `week` aggregates by calendar week. */
    readonly loadGranularity?: 'day' | 'week';
  /** Capacity threshold display. */
    readonly capacityDisplay?: 'line' | 'none';
  /** How over-allocation is shown on load bars. */
    readonly overAllocationDisplay?: 'highlight' | 'none'
}
```

---

### `GanttSchedulingConfig`

Scheduling engine configuration.

```ts
interface GanttSchedulingConfig {
  /**
     * When enabled, task duration is evaluated in working days only,
     * excluding calendar holidays and non-working weekdays.
     */
    readonly excludeHolidaysFromDuration?: boolean;
  /** Default task mode when a source row does not explicitly set `taskMode`. */
    readonly taskModeDefault?: 'auto' | 'manual';
  /**
     * Behaviour for dependency violations on auto-scheduled tasks.
     * Both modes keep effective dates dependency-valid; `warn` additionally
     * creates diagnostics so the UI can explain why the task moved.
     */
    readonly autoDependencyViolationBehavior?: 'clamp' | 'warn';
  /**
     * Behaviour for dependency violations on manually scheduled tasks.
     * Manual tasks preserve authored dates; this option controls whether the
     * violation is surfaced to users.
     */
    readonly manualDependencyViolationBehavior?: 'warn' | 'ignore';
  /** Calendar basis used for dependency lag/lead. */
    readonly lagCalendar?: 'calendar-days' | 'working-days';
  /** Direction of scheduling. */
    readonly scheduleFrom?: 'project-start' | 'project-finish';
  /** Optional project start anchor used by forward scheduling policies. */
    readonly projectStartDate?: ISODateString;
  /** Optional project finish anchor used by backward scheduling policies. */
    readonly projectFinishDate?: ISODateString;
  /**
     * Resource capacity policy.
     * `warn` reports over-allocation; `auto` shifts eligible forward-scheduled
     * auto tasks. Backward/project-finish schedules remain warning-only.
     */
    readonly resourceLeveling?: 'off' | 'warn' | 'auto';
  /** When true, auto-leveling only delays tasks up to their pre-leveling total slack. */
    readonly resourceLevelingWithinSlack?: boolean;
  /** Default task type used for work/duration/unit calculations. Defaults to `fixed-duration`. */
    readonly effortModeDefault?: TaskEffortMode;
  /** Progress-aware scheduling policy for actual start and remaining duration fields. Actual finish is always authoritative. */
    readonly progressRescheduling?: 'off' | 'remaining-duration'
}
```

---

### `GanttTimeRange`

A highlighted date range rendered as a coloured band on the timeline.
Use to mark sprints, milestones windows, or other periods of interest.

```ts
interface GanttTimeRange {
  /** Unique identifier. */
    readonly id: string;
  /** Range start date (inclusive). */
    readonly startDate: ISODateString;
  /** Range end date (inclusive). */
    readonly endDate: ISODateString;
  /** Optional label displayed inside the range band. */
    readonly label?: string;
  /** Optional CSS colour for the range band. */
    readonly color?: string
}
```

---

### `GanttTaskMarker`

A visual marker pinned to a specific date on a task bar.
Use to flag deadlines, constraints, or custom indicators.

```ts
interface GanttTaskMarker {
  /** Unique identifier. */
    readonly id: string;
  /** Date the marker is pinned to. */
    readonly date: ISODateString;
  /** Tooltip or label text. */
    readonly label?: string;
  /** Optional CSS class name for custom styling. */
    readonly className?: string
}
```

---

### `GanttTaskMarkerHook`

Callback that produces per-task markers for the timeline.
Invoked by the rendering pipeline for each visible task.

```ts
/**
 * Callback that produces per-task markers for the timeline.
 * Invoked by the rendering pipeline for each visible task.
 */
export type GanttTaskMarkerHook = (task: {
  readonly id: TaskId;
  readonly startDate: ISODateString;
  readonly endDate: ISODateString;
  readonly deadlineDate?: ISODateString;
  readonly constraintType?: string;
  readonly constraintDate?: ISODateString;
}) => readonly GanttTaskMarker[];
```

---

### `GanttTaskBarVisualContext`

```ts
interface GanttTaskBarVisualContext {
  readonly row: GanttGridRow
}
```

---

### `GanttTaskBarColor`

```ts
interface GanttTaskBarColor {
  /** Optional class name applied to the rendered bar. */
    readonly className?: string;
  /** Main bar colour. */
    readonly barColor?: string;
  /** Progress fill colour. */
    readonly progressColor?: string;
  /** Label/content text colour. */
    readonly textColor?: string;
  /** Optional outline or border colour. */
    readonly borderColor?: string
}
```

---

### `GanttTaskBarColorHook`

```ts
export type GanttTaskBarColorHook = (context: GanttTaskBarVisualContext) => GanttTaskBarColor | null | undefined;
```

---

### `GanttTaskBarContentContext` (Extended from `index.ts`)

```ts
interface GanttTaskBarContentContext {
  readonly h: GanttCellTemplateCreateElement;
  readonly defaultContent: readonly unknown[]
}
```

---

### `GanttTaskBarContentHook`

```ts
export type GanttTaskBarContentHook = (context: GanttTaskBarContentContext) => unknown;
```

---

### `GanttTaskTooltipContext` (Extended from `index.ts`)

Context supplied when building task-bar tooltip content.
The task name is rendered as the tooltip title outside hook output.

```ts
interface GanttTaskTooltipContext {
  /** Current Gantt project/config, when available. */
    readonly project?: GanttPluginConfig | null;
  /** Built-in fields used by the fallback tooltip body. */
    readonly defaultFields: readonly GanttTaskTooltipField[];
  /** Newline-delimited fallback tooltip body, excluding the task title. */
    readonly defaultTooltip: string
}
```

---

### `GanttTaskTooltipHook`

Callback that replaces the task-bar tooltip body below the always-visible task title.
Return `null` or `undefined` to fall back to `taskTooltipFields` or the default tooltip.

```ts
/**
 * Callback that replaces the task-bar tooltip body below the always-visible task title.
 * Return `null` or `undefined` to fall back to `taskTooltipFields` or the default tooltip.
 */
export type GanttTaskTooltipHook = (context: GanttTaskTooltipContext) => string | null | undefined;
```

---

### `GanttDependencyTooltipContext`

Context supplied when building dependency-arrow tooltip content.

```ts
interface GanttDependencyTooltipContext {
  /** Dependency relationship under the pointer. */
    readonly dependency: DependencyEntity;
  /** Predecessor/source task when present in the current task store. */
    readonly predecessorTask: TaskEntity | null;
  /** Successor/target task when present in the current task store. */
    readonly successorTask: TaskEntity | null;
  /** Display label used for the From row. Falls back to the predecessor task id. */
    readonly predecessorName: string;
  /** Display label used for the To row. Falls back to the successor task id. */
    readonly successorName: string;
  /** Newline-delimited default tooltip body. */
    readonly defaultTooltip: string
}
```

---

### `GanttDependencyTooltipHook`

Callback that replaces dependency-arrow tooltip content.
Return `null` or `undefined` to keep the default From/To tooltip.

```ts
/**
 * Callback that replaces dependency-arrow tooltip content.
 * Return `null` or `undefined` to keep the default From/To tooltip.
 */
export type GanttDependencyTooltipHook = (context: GanttDependencyTooltipContext) => string | null | undefined;
```

---

### `GanttTaskTooltipFieldId`

```ts
export type GanttTaskTooltipFieldId =
  /** Legacy combined line: task name and completion percent. Prefer the always-visible tooltip title. */
  | 'summary'
  /** Task name. */
  | 'name'
  /** Completion percentage. */
  | 'percentDone'
  /** Human-readable task kind, such as Task, Summary, or Milestone. */
  | 'taskType'
  /** Human-readable task status. */
  | 'status'
  /** Scheduled task start date, formatted through `gantt.dateFormats.tooltip`. */
  | 'startDate'
  /** Scheduled task end date, formatted through `gantt.dateFormats.tooltip`. */
  | 'endDate'
  /** Duration in days with a singular/plural day suffix. */
  | 'duration'
  /** Scheduling mode label, either Auto Scheduled or Manually Scheduled. */
  | 'taskMode'
  /** Scheduling warnings joined into one tooltip line. Skipped when empty. */
  | 'schedulingWarnings'
  /** Formatted task cost. Skipped when empty. */
  | 'cost'
  /** Comma-separated assignee names. Skipped when empty. */
  | 'assignees';
```

---

### `GanttTaskTooltipFieldConfig`

```ts
interface GanttTaskTooltipFieldConfig {
  /** Built-in task field to render in the task-bar tooltip at this position. */
    readonly field: GanttTaskTooltipFieldId;
  /** Optional label override. Set to an empty string to render only the value. */
    readonly label?: string
}
```

---

### `GanttTaskTooltipField`

A built-in tooltip field id, or a field descriptor with a custom label.

```ts
/**
 * A built-in tooltip field id, or a field descriptor with a custom label.
 */
export type GanttTaskTooltipField = GanttTaskTooltipFieldId | GanttTaskTooltipFieldConfig;
```

---

### `GanttMilestoneLine`

A vertical flag line pinned to a specific date on the gantt timeline.
Shows a cap/flag at the top of the canvas and a full-height vertical line.

```ts
interface GanttMilestoneLine {
  /** Unique identifier. */
    readonly id: string;
  /** Date the line is pinned to. */
    readonly date: ISODateString;
  /** Label displayed on the flag cap. */
    readonly label?: string;
  /** Optional CSS color for the line and flag (defaults to CSS variable). */
    readonly color?: string
}
```

---

### `GanttVisualConfig`

Controls visual overlays and decorations on the Gantt timeline.

```ts
interface GanttVisualConfig {
  /** Show dependency arrows between task bars. Enabled by default. */
    readonly showDependencies?: boolean;
  /** Show baseline bars beneath task bars for comparison. */
    readonly showBaseline?: boolean;
  /** Highlight tasks on the critical path. */
    readonly showCriticalPath?: boolean;
  /**
     * Display task names as labels on timeline bars.
     * Omit for regular task/milestone labels only, set `false` to hide built-in labels,
     * and set `true` or `'all'` to include summary labels.
     */
    readonly showTaskLabels?: boolean | 'tasks' | 'all';
  /** Which baseline snapshot to display (defaults to the latest). */
    readonly baselineId?: BaselineId;
  /** Vertical "today" or status-date line on the timeline. */
    readonly projectLineDate?: ISODateString;
  /** Highlighted date ranges on the timeline background. */
    readonly timeRanges?: readonly GanttTimeRange[];
  /** Shade non-working days (weekends, holidays) on the timeline. */
    readonly shadeNonWorkingTime?: boolean;
  /**
     * Show a "today" flag line on the timeline.
     * Set to `false` to disable. Enabled by default when not specified.
     */
    readonly showTodayLine?: boolean;
  /** Custom vertical flag lines on the timeline (e.g. sprint starts, release dates). */
    readonly milestoneLines?: readonly GanttMilestoneLine[];
  /** Hook to produce custom markers on individual task bars. */
    readonly taskMarkerHook?: GanttTaskMarkerHook;
  /** Hook to provide per-task bar colours and classes. */
    readonly taskBarColorHook?: GanttTaskBarColorHook;
  /** Hook to replace or extend the inner content rendered inside task bars. */
    readonly taskBarContentHook?: GanttTaskBarContentHook;
  /**
     * Ordered list of built-in fields shown in task-bar tooltips.
     * Omit to show Start, End, Duration, and Complete under the task title.
     * An empty array intentionally renders only the task title.
     * Use `taskTooltipHook` to replace the body under the title.
     */
    readonly taskTooltipFields?: readonly GanttTaskTooltipField[];
  /** Hook to override the tooltip content shown for task bars. */
    readonly taskTooltipHook?: GanttTaskTooltipHook;
  /** Hook to override the tooltip content shown for dependency arrows. */
    readonly dependencyTooltipHook?: GanttDependencyTooltipHook
}
```

---

### `GanttCreateTaskOptions`

Options for programmatic task creation via the
{@link GANTT_TASK_CREATE_EVENT} event.

```ts
interface GanttCreateTaskOptions {
  /** Parent task id, or `null` for a root-level task. */
    readonly parentId?: TaskId | null;
  /** Insert the new task after this sibling. */
    readonly insertAfterTaskId?: TaskId | null;
  /** Initial start date. */
    readonly startDate?: ISODateString;
  /** Initial end date. */
    readonly endDate?: ISODateString;
  /** Initial task name. */
    readonly name?: string;
  /** Initial custom source-row values used when creating a task. */
    readonly initialValues?: DataType;
  /**
     * Whether task-created listeners such as the packaged editor should open a
     * follow-up UI for the new task. Defaults to `true`.
     */
    readonly openEditor?: boolean
}
```

---

### `createTaskGridScaleConfig`

Build the timeline scale configuration from a scheduling result and zoom
level.

Determines the visible date range, creates the timeline scale, and derives
the header rows, ticks, bands, and visible range for the gantt view-model.

**@param** schedulingResult - The output of the scheduling engine.
 *
**@param** zoomLevelOrPreset - A concrete zoom level descriptor or a named preset string.
 *
**@param** locale - BCP 47 locale tag used for date formatting (default `"en-US"`).
 *
**@param** defaultHeaderFormatter - Optional custom formatter for header cell labels.
 *
**@returns** A `TaskGridScaleConfig` ready for rendering.

```ts
export function createTaskGridScaleConfig(
  schedulingResult: SchedulingResult,
  zoomLevelOrPreset: TimelineZoomLevel | TimelineZoomPreset,
  locale = 'en-US',
  defaultHeaderFormatter?: TimelineDateFormatter,
  options: TaskGridScaleOptions =;
```

---

### `createTaskGridSource`

Project tasks into grid rows using a pre-built timeline scale.

**@param** project - The resolved project snapshot.
 *
**@param** taskStore - The task store providing the ordered task list.
 *
**@param** resourceStore - The resource store for resource name lookups.
 *
**@param** assignmentStore - The assignment store for task–resource links.
 *
**@param** scale - The timeline scale used for coordinate projection.
 *
**@param** schedulingResult - The scheduling engine output.
 *
**@param** projectionOptions - Optional overrides for row projection behaviour.
 *
**@returns** An array of data rows suitable for the grid source.

```ts
export function createTaskGridSource(
  project: ProjectSnapshot,
  taskStore: TaskStore,
  resourceStore: ResourceStore,
  assignmentStore: AssignmentStore,
  scale: TimelineScale,
  schedulingResult: SchedulingResult,
  projectionOptions: TaskRowProjectionOptions =;
```

---

### `createTaskGridConfig`

One-shot helper that runs the scheduling engine_and_ builds the full grid
configuration (scale + projected rows) in a single call.

**@param** project - The resolved project snapshot.
 *
**@param** taskStore - Task store instance.
 *
**@param** resourceStore - Resource store instance.
 *
**@param** assignmentStore - Assignment store instance.
 *
**@param** zoomLevel - Zoom level descriptor or named preset.
 *
**@param** schedulerEngine - Optional pre-configured scheduler engine.
 *
**@param** locale - BCP 47 locale tag (default `"en-US"`).
 *
**@param** defaultHeaderFormatter - Optional custom header formatter.
 *
**@param** projectionOptions - Optional row projection overrides.
 *
**@returns** A complete `TaskGridConfig`.

```ts
export function createTaskGridConfig(
  project: ProjectSnapshot,
  taskStore: TaskStore,
  resourceStore: ResourceStore,
  assignmentStore: AssignmentStore,
  zoomLevel: TimelineZoomLevel | TimelineZoomPreset,
  schedulerEngine: SchedulerEngine = createSchedulerEngine(),
  locale = 'en-US',
  defaultHeaderFormatter?: TimelineDateFormatter,
  projectionOptions: TaskRowProjectionOptions =;
```

---

### `TaskGridScaleConfig`

Pre-computed timeline scale and view-model for the gantt grid.

```ts
interface TaskGridScaleConfig {
  /** The timeline scale instance used for coordinate calculations. */
    readonly scale: TimelineScale;
  /** The derived view-model consumed by the gantt column type renderer. */
    readonly timeline: GanttTimelineViewModel;
  /** ISO date string of the timeline start boundary. */
    readonly startDate: ISODateString;
  /** ISO date string of the timeline end boundary. */
    readonly endDate: ISODateString
}
```

---

### `TaskGridConfig`

Complete grid configuration bundle containing projected row data, the
timeline scale config, and scheduling results.

```ts
interface TaskGridConfig {
  /** The projected grid rows (one per visible task). */
    readonly source: readonly DataType[];
  /** Timeline scale configuration for the gantt column. */
    readonly scale: TaskGridScaleConfig;
  /** Scheduling engine output. */
    readonly scheduling: SchedulingResult
}
```

---

### `TaskGridScaleOptions`

```ts
interface TaskGridScaleOptions {
  /** First day of week for weekly timeline cells. `0` is Sunday and `1` is Monday. Defaults to Sunday. */
    readonly weekStartsOn?: 0 | 1
}
```

---

### `TaskRowProjectionOptions`

Options controlling which optional data layers are included in the task row projection.

```ts
interface TaskRowProjectionOptions {
  /** Show baseline overlay bars when baseline data is available. */
    readonly showBaseline?: boolean;
  /** Highlight tasks on the critical path. */
    readonly showCriticalPath?: boolean;
  /** Render inline task name labels on Gantt bars. Defaults to regular task/milestone labels only. */
    readonly showTaskLabels?: GanttTaskLabelMode;
  /** Specific baseline snapshot to compare against. Uses the latest baseline when omitted. */
    readonly baselineId?: BaselineId;
  /** Hook to inject custom point markers onto task rows. */
    readonly taskMarkerHook?: GanttTaskMarkerHook;
  /** Resource filter ids are applied as grid trims, not during projection. */
    readonly resourceFilterIds?: readonly ResourceId[];
  /** When enabled, project resource rows and allocation load bars instead of task rows. */
    readonly resourcePlanning?: GanttResourcePlanningConfig
}
```

---

### `createGanttColumn`

Create the pinned-end gantt column definition.

This produces a single read-only column that uses the `gantt` column type
for rendering. Runtime timeline width is managed by the dimension store.

**@returns** A `ColumnRegular` pinned to `colPinEnd`.

```ts
export function createGanttColumn(_totalWidth?: number): ColumnRegular;
```

---

### `createDefaultTaskTableColumn`

Look up a default task-table column definition by property name.

**@param** prop - The column property key (e.g. `"wbs"`, `"name"`).
 *
**@returns** A cloned `ColumnRegular` if a default exists, or `null`.

```ts
export function createDefaultTaskTableColumn(prop: TaskTableColumnProp, labels?: GanttLabelsConfig): ColumnRegular;
```

---

### `createInitialTaskTableColumns`

Create the initial set of task-table columns shown before the user
supplies custom columns.

**@returns** An array containing the WBS and Name columns.

```ts
export function createInitialTaskTableColumns(labels?: GanttLabelsConfig): ColumnRegular[];
```

---

### `normalizePinnedTaskColumns`

Normalize user-supplied columns for the task-table side of the gantt grid.

Strips any existing `gantt` column (it is managed internally), fills in
missing properties from default column definitions, and falls back to the
initial columns if the array is empty.

**@param** columns - The raw column array from the grid or user config.
 *
**@returns** A cleaned array of columns ready to be combined with the gantt column.

```ts
export function normalizePinnedTaskColumns(
  columns: Array<ColumnGrouping | ColumnRegular> | undefined,
  getProject: () => GanttPluginConfig | null | undefined = () => undefined,
  getRowOrder: () => RowOrderPluginConfig | false | undefined = () => undefined,
): Array<ColumnGrouping | ColumnRegular>;
```

---

### `defaultTaskTableColumns`

```ts
defaultTaskTableColumns: Record<TaskTableColumnProp, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>>;
```

---

### `TaskTableColumnProp`

```ts
export type TaskTableColumnProp =
  | 'wbs'
  | 'name'
  | 'cost'
  | 'startDate'
  | 'endDate'
  | 'duration'
  | 'workHours'
  | 'remainingDurationDays'
  | 'actualStartDate'
  | 'actualFinishDate'
  | 'effortMode'
  | 'effortDriven'
  | 'inactive'
  | 'priority'
  | 'canLevel'
  | 'levelingDelayDays'
  | 'earlyStartDate'
  | 'earlyFinishDate'
  | 'lateStartDate'
  | 'lateFinishDate'
  | 'totalSlackDays'
  | 'startVarianceDays'
  | 'finishVarianceDays'
  | 'durationVarianceDays'
  | 'progressVariancePercent'
  | 'taskMode'
  | 'scheduleOrigin'
  | 'constraintType'
  | 'constraintDate'
  | 'deadlineDate'
  | 'schedulingWarning'
  | 'percentDone'
  | 'predecessors'
  | 'successors'
  | 'status'
  | 'assignees'
  | 'resourceRole'
  | 'resourceCapacity'
  | 'resourceLoadSummary';
```

---

### `createDuplicateTaskMenuItem`

```ts
export function createDuplicateTaskMenuItem(
  options: DuplicateTaskMenuItemOptions =;
```

---

### `createDeleteTaskMenuItem`

```ts
export function createDeleteTaskMenuItem(
  options: DeleteTaskMenuItemOptions,
): ContextMenuItem;
```

---

### `createAssignResourceMenuItem`

```ts
export function createAssignResourceMenuItem(
  options: AssignResourceMenuItemOptions,
): ContextMenuItem;
```

---

### `createExportMenuItem`

```ts
export function createExportMenuItem(
  options: ExportMenuItemOptions =;
```

---

### `createGanttContextMenuExtensionItems`

```ts
export function createGanttContextMenuExtensionItems(options:;
```

---

### `GanttContextMenuExtensionContext`

```ts
interface GanttContextMenuExtensionContext {
  readonly event: MouseEvent;
  readonly focused?: Cell | null;
  readonly range?: RangeArea | null;
  readonly close?: () => void;
  readonly revogrid: HTMLRevoGridElement;
  readonly providers: PluginProviders;
  readonly taskId: TaskId | null;
  readonly task: Partial<TaskEntity> | null
}
```

---

### `GanttContextMenuBaseItemOptions`

```ts
interface GanttContextMenuBaseItemOptions {
  readonly name?: ContextMenuItem['name'];
  readonly class?: string;
  readonly rowClass?: ContextMenuItem['rowClass'];
  readonly icon?: string;
  readonly hidden?: ContextMenuItem['hidden'];
  readonly keepOpen?: boolean
}
```

---

### `DuplicateTaskMenuItemOptions` (Extended from `index.ts`)

```ts
interface DuplicateTaskMenuItemOptions {
  readonly copyName?: (task: Partial<TaskEntity>, context: GanttContextMenuExtensionContext) => string;
  readonly createTaskOptions?: (
      context: GanttContextMenuExtensionContext,
    ) => GanttCreateTaskOptions | null | undefined
}
```

---

### `DeleteTaskMenuItemOptions` (Extended from `index.ts`)

```ts
interface DeleteTaskMenuItemOptions {
  readonly onDeleteTask: (context: GanttContextMenuExtensionContext) => void;
  readonly confirm?: (context: GanttContextMenuExtensionContext) => boolean
}
```

---

### `AssignResourceMenuItemOptions` (Extended from `index.ts`)

```ts
interface AssignResourceMenuItemOptions {
  readonly onAssignResource: (context: GanttContextMenuExtensionContext) => void
}
```

---

### `ExportMenuItemOptions` (Extended from `index.ts`)

```ts
interface ExportMenuItemOptions {
  readonly exportOptions?: ExportExcelEvent | ((context: GanttContextMenuExtensionContext) => ExportExcelEvent | undefined)
}
```

---

### `GanttDependencyDropdownControl`

```ts
export function GanttDependencyDropdownControl(;
```

---

### `DependencyEndpointPair`

```ts
interface DependencyEndpointPair {
  readonly predecessor: GanttDependencyEndpoint;
  readonly successor: GanttDependencyEndpoint
}
```

---

### `GanttDependencyDropdownControlProps`

```ts
interface GanttDependencyDropdownControlProps {
  readonly getOptions: () => readonly GanttDependencyDropdownTaskOption[];
  readonly currentTaskId: TaskId;
  readonly value: readonly GanttDependencyDropdownValue[];
  readonly rawValue?: unknown;
  readonly allowedTypes: readonly DependencyType[];
  readonly displayValue: string;
  readonly autoOpen?: boolean;
  readonly theme?: string;
  readonly onChange: (value: readonly GanttDependencyDropdownValue[]) => void;
  readonly onClose?: (focusNext?: boolean) => void
}
```

---

### `isGanttDependencyType`

```ts
export function isGanttDependencyType(value: unknown): value is DependencyType;
```

---

### `getGanttDependencyDropdownTasks`

```ts
export function getGanttDependencyDropdownTasks(
  config: GanttDependencyDropdownConfig,
): readonly GanttDependencyDropdownTaskOption[];
```

---

### `getGanttDependencyDropdownValue`

```ts
export function getGanttDependencyDropdownValue(
  value: unknown,
  config: GanttDependencyDropdownConfig,
): GanttDependencyDropdownValue[];
```

---

### `areGanttDependencyDropdownValuesEqual`

```ts
export function areGanttDependencyDropdownValuesEqual(
  left: readonly GanttDependencyDropdownValue[],
  right: readonly GanttDependencyDropdownValue[],
): boolean;
```

---

### `normalizeGanttDependencyDropdownValues`

```ts
export function normalizeGanttDependencyDropdownValues(
  value: readonly GanttDependencyDropdownValue[],
  options: readonly GanttDependencyDropdownTaskOption[],
): GanttDependencyDropdownValue[];
```

---

### `getGanttDependencyDropdownSearchText`

```ts
export function getGanttDependencyDropdownSearchText(option: GanttDependencyDropdownTaskOption): string;
```

---

### `createGanttBarLayout`

Computes the pixel layout for a scheduled task's Gantt bar.

**@param** task - The engine-scheduled task with dates, type, and progress.
 *
**@param** scale - The active timeline scale used to convert dates to pixel positions.
 *
**@param** showCriticalPath - Whether to mark the bar as critical when the task is on the critical path.
 *
**@returns** A {@link GanttBarLayout} with pixel coordinates and metadata.

```ts
export function createGanttBarLayout(
  task: ScheduledTask,
  scale: TimelineScale,
  showCriticalPath = true,
): GanttBarLayout;
```

---

### `createBaselineBarLayout`

Computes the pixel layout for a baseline bar overlay.

**@param** startDate - Baseline start date (ISO string).
 *
**@param** endDate - Baseline end date (ISO string).
 *
**@param** scale - The active timeline scale.
 *
**@returns** A {@link GanttBaselineLayout} with x and width in pixels.

```ts
export function createBaselineBarLayout(
  startDate: ISODateString,
  endDate: ISODateString,
  scale: TimelineScale,
): GanttBaselineLayout;
```

---

### `createIndicatorLayout`

Creates a layout descriptor for a point indicator on the Gantt row.

**@param** id - Unique identifier for the indicator.
 *
**@param** date - The date the indicator marks.
 *
**@param** kind - Category of the indicator (deadline, constraint, or custom).
 *
**@param** scale - The active timeline scale.
 *
**@param** label - Optional display label.
 *
**@param** className - Optional CSS class name.
 *
**@returns** A {@link GanttIndicatorLayout} positioned on the timeline.

```ts
export function createIndicatorLayout(
  id: string,
  date: ISODateString,
  kind: GanttIndicatorLayout['kind'],
  scale: TimelineScale,
  label?: string,
  className?: string,
): GanttIndicatorLayout;
```

---

### `GanttBarKind`

Discriminator for the visual shape of a Gantt bar.

```ts
/** Discriminator for the visual shape of a Gantt bar. */
export type GanttBarKind = 'task' | 'summary' | 'milestone';
```

---

### `GanttBaselineLayout`

Layout coordinates for a baseline bar overlay.

```ts
interface GanttBaselineLayout {
  /** Horizontal pixel offset from the timeline origin. */
    readonly x: number;
  /** Pixel width of the baseline bar. */
    readonly width: number
}
```

---

### `GanttIndicatorLayout`

Layout descriptor for a single-point indicator (deadline, constraint, or custom marker) on the Gantt row.

```ts
interface GanttIndicatorLayout {
  /** Unique identifier for this indicator instance. */
    readonly id: string;
  /** Category of the indicator. */
    readonly kind: 'deadline' | 'constraint' | 'custom';
  /** Horizontal pixel offset from the timeline origin. */
    readonly x: number;
  /** Optional display label shown on hover or beside the indicator. */
    readonly label?: string;
  /** Optional CSS class name applied to the indicator element. */
    readonly className?: string
}
```

---

### `GanttSplitGapLayout`

Visual gap inside a task bar where split work is paused.

```ts
interface GanttSplitGapLayout {
  /** Stable gap id. */
    readonly id: string;
  /** Split index after scheduler normalization. */
    readonly index: number;
  /** Split start date. */
    readonly startDate: ISODateString;
  /** Split end date. */
    readonly endDate: ISODateString;
  /** Left offset relative to the task bar. */
    readonly x: number;
  /** Gap width in pixels. */
    readonly width: number
}
```

---

### `GanttBarLayout`

Computed pixel layout for a single Gantt task bar, including progress and critical-path metadata.

```ts
interface GanttBarLayout {
  /** Visual shape type of the bar. */
    readonly kind: GanttBarKind;
  /** Horizontal pixel offset from the timeline origin. */
    readonly x: number;
  /** Pixel width of the bar (minimum-clamped). */
    readonly width: number;
  /** Pixel width of the filled progress portion inside the bar. */
    readonly progressWidth: number;
  /** Horizontal center X used for milestone diamond rendering. */
    readonly milestoneCenterX: number;
  /** Whether this task lies on the critical path. */
    readonly isCritical: boolean;
  /** Total slack (float) available before the task delays the project. */
    readonly totalSlackDays: number;
  /** Visual task split gaps inside the bar. */
    readonly splitGaps: readonly GanttSplitGapLayout[]
}
```

---

### `projectVisibleTaskBarAnchors`

Projects viewport-relative anchor points for every task bar visible in the current viewport.
Used to position dependency arrow endpoints.

**@param** projection - Viewport state and row data needed for the projection.
 *
**@returns** An array of {@link VisibleTaskBarAnchors} for each visible task bar.

```ts
export function projectVisibleTaskBarAnchors(
  projection: VisibleTaskBarProjection,
): readonly VisibleTaskBarAnchors[];
```

---

### `TaskBarAnchorPoint`

A 2D point in viewport-relative coordinates.

```ts
interface TaskBarAnchorPoint {
  /** Horizontal pixel coordinate. */
    readonly x: number;
  /** Vertical pixel coordinate. */
    readonly y: number
}
```

---

### `VisibleTaskBarAnchors`

Viewport-relative anchor points and bounds for a visible task bar, used for dependency line routing.

```ts
interface VisibleTaskBarAnchors {
  /** Identifier of the task this anchor set belongs to. */
    readonly taskId: TaskId;
  /** Row index of the task within the data source. */
    readonly rowIndex: number;
  /** Top edge of the row in viewport pixels. */
    readonly top: number;
  /** Bottom edge of the row in viewport pixels. */
    readonly bottom: number;
  /** Left edge of the bar in viewport pixels. */
    readonly left: number;
  /** Right edge of the bar in viewport pixels. */
    readonly right: number;
  /** Anchor point at the start (left) side of the bar, offset for dependency arrows. */
    readonly start: TaskBarAnchorPoint;
  /** Anchor point at the end (right) side of the bar, offset for dependency arrows. */
    readonly end: TaskBarAnchorPoint;
  /** Anchor point centered above the bar. */
    readonly topCenter: TaskBarAnchorPoint;
  /** Anchor point centered below the bar. */
    readonly bottomCenter: TaskBarAnchorPoint
}
```

---

### `VisibleTaskBarProjection`

Input data required to project visible task bar anchors within the current viewport.

```ts
interface VisibleTaskBarProjection {
  /** All task grid rows (full dataset). */
    readonly rows: readonly GanttGridRow[];
  /** Virtual position items describing which rows are currently visible. */
    readonly viewportRows: readonly VirtualPositionItem[];
  /** Current horizontal scroll offset in pixels. */
    readonly scrollLeft: number;
  /** Current vertical scroll offset in pixels. */
    readonly scrollTop: number;
  /** Width of the visible viewport in pixels. */
    readonly viewportWidth: number;
  /** Height of the visible viewport in pixels. */
    readonly viewportHeight: number;
  /** Optional transient task-bar geometry while a visible bar is actively moved or resized. */
    readonly activeTaskInteractionRange?: {
      readonly taskId: TaskId;
      readonly kind: 'task' | 'summary' | 'milestone';
      readonly left: number;
      readonly width: number;
    } | null
}
```

---

### `createGanttGridRows`

Projects the full project state into an ordered array of flat grid rows ready for rendering.
Combines scheduling results, WBS numbering, dependency labels, baseline overlays, resource assignments,
and Gantt bar layouts into a single row model per task.

**@param** project - The current project snapshot (tasks, resources, assignments, baselines, dependencies).
 *
**@param** scale - The active timeline scale for date-to-pixel conversion.
 *
**@param** scheduledTasksById - Map of task IDs to their engine-computed schedule results.
 *
**@param** taskStore - Task store instance (defaults to an in-memory store built from the project).
 *
**@param** resourceStore - Resource store instance (defaults to an in-memory store built from the project).
 *
**@param** assignmentStore - Assignment store instance (defaults to an in-memory store built from the project).
 *
**@param** options - Optional projection options (baseline, critical path, labels, resource planning).
 *
**@returns** An ordered array of {@link GanttGridRow} objects.

```ts
export function createGanttGridRows(
  project: ProjectSnapshot,
  scale: TimelineScale,
  scheduledTasksById: ReadonlyMap<TaskId, ScheduledTask>,
  taskStore: TaskStore = new InMemoryTaskStore(project.tasks),
  resourceStore: ResourceStore = new InMemoryResourceStore(project.resources),
  assignmentStore: AssignmentStore = new InMemoryAssignmentStore(project.assignments),
  options: TaskRowProjectionOptions =;
```

---

### `ResourceLoadSegment`

```ts
interface ResourceLoadSegment {
  readonly id: string;
  readonly startDate: string;
  readonly endDate: string;
  readonly x: number;
  readonly width: number;
  readonly allocatedUnits: number;
  readonly capacityUnits: number;
  readonly loadRatio: number;
  readonly taskIds: readonly TaskId[];
  readonly isOverallocated: boolean
}
```

---

### `ResourcePlanningRowData`

```ts
interface ResourcePlanningRowData {
  readonly capacityUnits: number;
  readonly maxAllocatedUnits: number;
  readonly capacityDisplay: 'line' | 'none';
  readonly overAllocationDisplay: 'highlight' | 'none';
  readonly loadGranularity: 'day' | 'week';
  readonly segments: readonly ResourceLoadSegment[]
}
```

---

### `TaskGridAssignee`

```ts
interface TaskGridAssignee {
  readonly id: ResourceId;
  readonly name: string;
  readonly initials: string;
  readonly role: string;
  readonly allocationUnits: number;
  readonly color: string
}
```

---

### `GanttGridRow`

Flat render row produced by projecting a scheduled task onto the Gantt grid. Contains display-ready fields and computed layout, not domain/UI state.

```ts
interface GanttGridRow {
  /** Row projection kind. Omitted task rows are treated as task rows. */
    readonly rowKind?: 'task' | 'resource';
  /** Unique task identifier. */
    readonly id: TaskId;
  /** Parent task identifier, or `null` for top-level tasks. */
    readonly parentId: TaskId | null;
  /** Work Breakdown Structure code (e.g. "1.2.3"). */
    readonly wbs: string;
  /** Display name of the task. */
    readonly name: string;
  /** Scheduler-determined kind (task, summary, milestone). */
    readonly taskKind: ScheduledTaskKind;
  /** Human-readable task type label. */
    readonly taskType: string;
  /** Human-readable status label. */
    readonly status: string;
  /** Raw task status key. */
    readonly statusKey: string;
  /** Task tags. */
    readonly tags: readonly string[];
  /** Optional scheduling constraint type. */
    readonly constraintType?: string;
  /** Optional scheduling constraint date. */
    readonly constraintDate?: string;
  /** Optional task deadline date. */
    readonly deadlineDate?: string;
  /** Scheduled start date (ISO string). */
    readonly startDate: string;
  /** Scheduled end date (ISO string). */
    readonly endDate: string;
  /** Duration in working days. */
    readonly duration: number;
  /** Planned work for the task, in hours. */
    readonly workHours?: number;
  /** Remaining duration in days for progress-aware scheduling. */
    readonly remainingDurationDays?: number;
  /** Date work actually started. */
    readonly actualStartDate?: string;
  /** Date work actually finished. */
    readonly actualFinishDate?: string;
  /** Task effort mode controlling work/duration/unit calculation. */
    readonly effortMode?: TaskEffortMode;
  /** Whether assignment changes should preserve total work where supported. */
    readonly effortDriven?: boolean;
  /** Whether this task is excluded from scheduling. */
    readonly inactive: boolean;
  /** Leveling priority from 0 to 1000. */
    readonly priority?: number;
  /** Whether automatic resource leveling may delay this task. */
    readonly canLevel?: boolean;
  /** Resource leveling delay in calendar days. */
    readonly levelingDelayDays?: number;
  /** Completion percentage (0-100). */
    readonly percentDone: number;
  /** Total slack (float) in days before the task delays the project. Present when critical-path projection is available. */
    readonly totalSlackDays?: number;
  /** Earliest scheduled start date. Present when critical-path projection is available. */
    readonly earlyStartDate?: string;
  /** Earliest scheduled finish date. Present when critical-path projection is available. */
    readonly earlyFinishDate?: string;
  /** Latest start date that preserves the project finish. Present when critical-path projection is available. */
    readonly lateStartDate?: string;
  /** Latest finish date that preserves the project finish. Present when critical-path projection is available. */
    readonly lateFinishDate?: string;
  /** Whether the task is auto- or manually scheduled. */
    readonly taskMode: 'auto' | 'manual';
  /** How the scheduler determined the rendered dates. */
    readonly scheduleOrigin: ScheduledTask['scheduleOrigin'];
  /** Scheduling warning messages associated with this task. */
    readonly schedulingWarnings: readonly string[];
  /** First scheduling warning, suitable for compact columns and tooltips. */
    readonly schedulingWarning: string;
  /** Optional inline label rendered on the Gantt bar. */
    readonly taskLabel?: string;
  /** Optional baseline bar layout for plan-vs-actual comparison. */
    readonly baselineLayout?: GanttBaselineLayout;
  /** Start variance against the selected baseline, in calendar days. */
    readonly startVarianceDays?: number;
  /** Finish variance against the selected baseline, in calendar days. */
    readonly finishVarianceDays?: number;
  /** Duration variance against the selected baseline, in days. */
    readonly durationVarianceDays?: number;
  /** Progress variance against the selected baseline, in percentage points. */
    readonly progressVariancePercent?: number;
  /** Point indicators (deadlines, constraints, custom markers) on this row. */
    readonly indicators: readonly GanttIndicatorLayout[];
  /** Assigned resource names used by the multi-select editor. */
    readonly assignees: readonly string[];
  /** Comma-separated list of assigned resource names for search and tooltips. */
    readonly assigneeLabels: string;
  /** Display-ready resource assignment metadata. */
    readonly assigneeDetails: readonly TaskGridAssignee[];
  /** Estimated task cost in the project currency. */
    readonly cost: number;
  /** Formatted estimated task cost. */
    readonly formattedCost: string;
  /** Comma-separated predecessor reference tokens. */
    readonly predecessors: string;
  /** Comma-separated successor reference tokens. */
    readonly successors: string;
  /** Computed pixel layout for the Gantt bar. */
    readonly ganttLayout: GanttBarLayout;
  /** Reserved field for the Gantt bar cell renderer. */
    readonly gantt: string;
  /** Resource identifier for resource-planning rows. */
    readonly resourceId?: ResourceId;
  /** Resource role for resource-planning rows. */
    readonly resourceRole?: string;
  /** Display-ready capacity label for resource-planning rows. */
    readonly resourceCapacity?: string;
  /** Display-ready load summary for resource-planning rows. */
    readonly resourceLoadSummary?: string;
  /** Resource planning load data rendered on the timeline. */
    readonly resourcePlanning?: ResourcePlanningRowData
}
```

---

### `TaskRowDiagnostics`

```ts
export type TaskRowDiagnostics = Pick<SchedulingResult, 'conflicts' | 'issues'>;
```

---

### `GanttTaskLabelMode`

```ts
export type GanttTaskLabelMode = 'none' | 'tasks' | 'all';
```

---

### `normalizeTimelineHeaderLabel`

Normalizes a header label to the structured {@link TimelineHeaderLabelParts} form.

**@param** label - A plain string or structured label.
 *
**@returns** The label as a `{ label, subLabel }` object.

```ts
export function normalizeTimelineHeaderLabel(label: TimelineHeaderLabel): TimelineHeaderLabelParts;
```

---

### `TimelineUnit`

```ts
export type TimelineUnit = 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
```

---

### `TimelineHeaderLabelParts`

Structured label with an optional secondary line for timeline header cells.

```ts
interface TimelineHeaderLabelParts {
  /** Primary display text. */
    readonly label: string;
  /** Optional secondary text rendered below or beside the label. */
    readonly subLabel?: string
}
```

---

### `TimelineHeaderLabel`

A header cell label — either a plain string or a structured label with sub-text.

```ts
/** A header cell label — either a plain string or a structured label with sub-text. */
export type TimelineHeaderLabel = string | TimelineHeaderLabelParts;
```

---

### `TimelineDateFormatterContext`

Context passed to a custom date formatter when rendering a timeline header cell.

```ts
interface TimelineDateFormatterContext {
  /** Zoom level identifier that owns this header. */
    readonly levelId: string;
  /** Identifier of the header row being rendered. */
    readonly rowId: string;
  /** Calendar unit of this header row. */
    readonly unit: TimelineUnit;
  /** Number of units each cell spans. */
    readonly count: number;
  /** Active locale string (e.g. "en-US"). */
    readonly locale: string;
  /** Zero-based index of this row within the header stack. */
    readonly rowIndex: number;
  /** Whether this is the bottom (leaf / tick) row. */
    readonly isLeafRow: boolean
}
```

---

### `TimelineDateFormatter`

Custom formatter function used to produce the label for a single timeline header cell.

**@param** startDate - Cell start date (ISO string).
 *
**@param** endDate - Cell end date (ISO string).
 *
**@param** context - Rendering context with unit, locale, and positional info.
 *
**@returns** A label string or structured label parts.

```ts
/**
 * Custom formatter function used to produce the label for a single timeline header cell.
 *
 * @param startDate - Cell start date (ISO string).
 * @param endDate - Cell end date (ISO string).
 * @param context - Rendering context with unit, locale, and positional info.
 * @returns A label string or structured label parts.
 */
export type TimelineDateFormatter = (
  startDate: ISODateString,
  endDate: ISODateString,
  context: TimelineDateFormatterContext,
) => TimelineHeaderLabel;
```

---

### `TimelineHeaderRowConfig`

Configuration for a single row in the timeline header stack.

```ts
interface TimelineHeaderRowConfig {
  /** Unique identifier for this header row. */
    readonly id: string;
  /** Calendar unit this row represents. */
    readonly unit: TimelineUnit;
  /** Number of units each cell spans (defaults to 1). */
    readonly count?: number;
  /** Optional custom formatter overriding the default label logic. */
    readonly formatter?: TimelineDateFormatter
}
```

---

### `TimelineHeaderCell`

A single rendered cell within a timeline header row.

```ts
interface TimelineHeaderCell {
  /** Unique key for React/framework reconciliation. */
    readonly key: string;
  /** Start date of the interval this cell covers (ISO string). */
    readonly startDate: ISODateString;
  /** End date (inclusive) of the interval this cell covers (ISO string). */
    readonly endDate: ISODateString;
  /** Horizontal pixel offset from the timeline origin. */
    readonly x: number;
  /** Pixel width of the cell. */
    readonly width: number;
  /** Primary display text. */
    readonly label: string;
  /** Secondary display text (may be empty). */
    readonly subLabel: string
}
```

---

### `TimelineHeaderRowModel`

Fully resolved model for a single header row, including its computed cells.

```ts
interface TimelineHeaderRowModel {
  /** Identifier matching the originating {@link TimelineHeaderRowConfig.id}. */
    readonly id: string;
  /** Calendar unit of this row. */
    readonly unit: TimelineUnit;
  /** Number of units each cell spans. */
    readonly count: number;
  /** Ordered array of rendered header cells. */
    readonly cells: readonly TimelineHeaderCell[]
}
```

---

### `createTimelineScale`

Creates a {@link TimelineScale} from the given configuration.

**@param** config - Scale configuration specifying date range, tick unit, and header rows.
 *
**@returns** A fully initialized timeline scale instance.

```ts
export function createTimelineScale(config: TimelineScaleConfig): TimelineScale;
```

---

### `getZoomPresetConfig`

Returns the scale configuration fields for a named zoom preset.

**@param** preset - One of the predefined zoom preset identifiers.
 *
**@returns** A partial {@link TimelineScaleConfig} with tick and header settings.

```ts
export function getZoomPresetConfig(
  preset: TimelineZoomPreset,
): Pick<TimelineScaleConfig, 'levelId' | 'tickUnit' | 'tickCount' | 'tickWidth' | 'headerRows'>;
```

---

### `getProjectTimelineRange`

Computes a start/end date range that encloses all provided dates with padding
appropriate for the given zoom level or preset.

**@param** dates - Array of ISO date strings to encompass.
 *
**@param** zoomLevelOrPreset - A zoom level object or preset identifier.
 *
**@returns** A `{ startDate, endDate }` range with timeline padding.

```ts
export function getProjectTimelineRange(
  dates: readonly ISODateString[],
  zoomLevelOrPreset: TimelineZoomLevel | TimelineZoomPreset,
  options: Pick<TimelineScaleConfig, 'weekStartsOn'> =;
```

---

### `TimelineTickUnit`

Calendar unit used for the leaf-level tick grid.

```ts
/** Calendar unit used for the leaf-level tick grid. */
export type TimelineTickUnit = TimelineUnit;
```

---

### `TimelineBandUnit`

Calendar unit used for the grouping band row (excludes 'day').

```ts
/** Calendar unit used for the grouping band row (excludes 'day'). */
export type TimelineBandUnit = Exclude<TimelineUnit, 'minute'>;
```

---

### `TimelineZoomPreset`

Named presets mapping to entries in the built-in timeline preset list.

```ts
/** Named presets mapping to entries in the built-in timeline preset list. */
export type TimelineZoomPreset =
  | 'minute-hour'
  | 'hour-day'
  | 'day-week'
  | 'week-month'
  | 'month-quarter'
  | 'quarter-year'
  | 'year-quarter'
  | 'multi-year-quarter';
```

---

### `TimelineTick`

A single tick cell on the leaf row of the timeline.

```ts
interface TimelineTick {
  /** Unique key for reconciliation. */
    readonly key: string;
  /** Start date of the tick interval (ISO string). */
    readonly startDate: ISODateString;
  /** End date of the tick interval (ISO string). */
    readonly endDate: ISODateString;
  /** Horizontal pixel offset from the timeline origin. */
    readonly x: number;
  /** Pixel width of the tick cell. */
    readonly width: number;
  /** Primary display label. */
    readonly label: string;
  /** Secondary display label. */
    readonly subLabel: string
}
```

---

### `TimelineBand`

A grouping band cell on an upper row of the timeline header.

```ts
interface TimelineBand {
  /** Unique key for reconciliation. */
    readonly key: string;
  /** Start date of the band interval (ISO string). */
    readonly startDate: ISODateString;
  /** End date of the band interval (ISO string). */
    readonly endDate: ISODateString;
  /** Horizontal pixel offset from the timeline origin. */
    readonly x: number;
  /** Pixel width of the band cell. */
    readonly width: number;
  /** Display label. */
    readonly label: string
}
```

---

### `TimelineScaleConfig`

Configuration used to construct a {@link TimelineScale} instance.

```ts
interface TimelineScaleConfig {
  /** Project timeline start date (ISO string). */
    readonly startDate: ISODateString;
  /** Project timeline end date (ISO string). */
    readonly endDate: ISODateString;
  /** Optional zoom level identifier to look up in the default levels. */
    readonly levelId?: string;
  /** Calendar unit for the leaf tick row (overrides zoom level when set). */
    readonly tickUnit?: TimelineTickUnit;
  /** Number of tick units each cell spans. */
    readonly tickCount?: number;
  /** Calendar unit for the grouping band row. */
    readonly bandUnit?: TimelineBandUnit;
  /** Pixel width of a single tick cell. */
    readonly tickWidth: number;
  /** Header row definitions (overrides zoom level rows when set). */
    readonly headerRows?: readonly TimelineHeaderRowConfig[];
  /** Per-scale highlight overrides inherited by the resolved zoom level. */
    readonly highlightVisibility?: TimelineHighlightVisibility;
  /** Locale string for date formatting (defaults to "en-US"). */
    readonly locale?: string;
  /** Fallback date formatter applied when no row-level formatter is set. */
    readonly defaultHeaderFormatter?: TimelineDateFormatter;
  /** First day of week for weekly timeline cells. `0` is Sunday and `1` is Monday. Defaults to Sunday. */
    readonly weekStartsOn?: TimelineWeekStartsOn
}
```

---

### `TimelineScale`

Core abstraction for converting between dates and pixel positions on the Gantt timeline.
Provides tick/band generation and header row models.

```ts
interface TimelineScale {
  /** First date of the timeline range (ISO string). */
    readonly startDate: ISODateString;
  /** Last date of the timeline range (ISO string). */
    readonly endDate: ISODateString;
  /** Zoom level configuration that produced this scale. */
    readonly zoomLevel: TimelineZoomLevel;
  /** Calendar unit of the leaf tick row. */
    readonly tickUnit: TimelineTickUnit;
  /** Number of calendar units per tick cell. */
    readonly tickCount: number;
  /** Pixel width of a single tick cell. */
    readonly tickWidth: number;
  /** Total pixel width of the entire timeline. */
    readonly totalWidth: number;
  /**
     * Converts a date to a horizontal pixel offset.
     * @param date - ISO date string.
     */
    dateToX(date: ISODateString): number;
  /**
     * Converts a horizontal pixel offset to the nearest date.
     * @param x - Pixel offset from the timeline origin.
     */
    xToDate(x: number): ISODateString;
  /** Returns all tick cells across the full timeline range. */
    getTicks(): readonly TimelineTick[];
  /**
     * Returns tick cells visible within the given horizontal viewport slice.
     * @param startX - Left edge pixel offset.
     * @param viewportWidth - Width of the visible area.
     */
    getVisibleTicks(startX: number, viewportWidth: number, overscanPx?: number): readonly TimelineTick[];
  /** Returns all band (grouping) cells. */
    getBands(): readonly TimelineBand[];
  /** Returns the computed header row models for rendering. */
    getHeaderRows(): readonly TimelineHeaderRowModel[];
  /**
     * Returns header row models intersecting the given viewport slice.
     * @param startX - Left edge pixel offset.
     * @param viewportWidth - Width of the visible area.
     * @param overscanPx - Extra pixels to include on both sides.
     */
    getVisibleHeaderRows(startX: number, viewportWidth: number, overscanPx?: number): readonly TimelineHeaderRowModel[];
  /**
     * Returns the date range visible within the given horizontal viewport slice.
     * @param startX - Left edge pixel offset.
     * @param viewportWidth - Width of the visible area.
     */
    getVisibleRange(startX: number, viewportWidth: number): TimelineVisibleDateRange
}
```

---

### `TimelineZoomController`

Manages the active zoom level and zoom transitions for the Gantt timeline.
Provides discrete zoom-in/out operations, level selection, and anchor-based scroll
position computation to maintain visual continuity across zoom changes.

```ts
class TimelineZoomController {
  /**
     * Replaces the zoom configuration, preserving the current level when possible.
     * @param config - New zoom configuration.
     * @param fallbackLevelId - Fallback level ID if the previous level is not in the new config.
     */
  setConfig(config?: TimelineZoomConfig, fallbackLevelId?: string);

  /** Returns the resolved zoom configuration. */
  getConfig(): ResolvedTimelineZoomConfig;

  /** Returns the currently active zoom level. */
  getZoomLevel(): TimelineZoomLevel;

  /** Returns the last computed visible date range, or `null` if not yet updated. */
  getVisibleRange():;

  /**
     * Recalculates and caches the visible date range from the current scroll position.
     * @param scale - Active timeline scale.
     * @param scrollLeft - Current horizontal scroll offset.
     * @param viewportWidth - Width of the visible area.
     * @returns The updated visible date range.
     */
  updateVisibleRange(scale: TimelineScale, scrollLeft: number, viewportWidth: number):;

  /** Returns `true` if zooming in (finer detail) is possible. */
  canZoomIn(): boolean;

  /** Returns `true` if zooming out (coarser detail) is possible. */
  canZoomOut(): boolean;

  /** Zooms in one level. Returns `true` if the level changed. */
  zoomIn(): boolean;

  /** Zooms out one level. Returns `true` if the level changed. */
  zoomOut(): boolean;

  /**
     * Jumps to a specific zoom level by ID.
     * @param levelId - Target zoom level identifier.
     * @returns `true` if the level changed.
     */
  setZoomLevel(levelId: string): boolean;

  /**
     * Prepares a zoom transition descriptor that can be applied to update the
     * scroll position so the anchor date stays visually stable.
     *
     * @param nextLevelId - Target zoom level identifier.
     * @param context - Current viewport and pointer context for anchor calculation.
     * @returns A {@link TimelineZoomTransition}, or `null` if no change occurred.
     */
  createZoomTransition(
    nextLevelId: string,
    context: TimelineZoomAnchorContext,
  ): TimelineZoomTransition | null;

  /**
     * Computes the scroll-left position that keeps an anchor date at a fixed viewport offset.
     *
     * @param scale - The timeline scale for the new zoom level.
     * @param anchorDate - The date that should remain visually anchored.
     * @param anchorOffset - Pixel offset from the viewport left edge where the anchor date should appear.
     * @returns The scroll-left value to apply.
     */
  resolveAnchoredScrollLeft(
    scale: TimelineScale,
    anchorDate: ISODateString,
    anchorOffset: number,
  ): number;
}
```

---

### `normalizeTimelineZoomConfig`

Normalizes a partial zoom config into a fully resolved configuration with defaults applied.

**@param** config - Optional user-supplied zoom configuration.
 *
**@param** fallbackLevelId - Level ID to use as the default when the config does not specify one.
 *
**@returns** A {@link ResolvedTimelineZoomConfig} with all fields populated.

```ts
export function normalizeTimelineZoomConfig(
  config: TimelineZoomConfig | undefined,
  fallbackLevelId = FALLBACK_ZOOM_LEVEL.id,
): ResolvedTimelineZoomConfig;
```

---

### `TimelineZoomMode`

Strategy for transitioning between zoom levels.

```ts
/** Strategy for transitioning between zoom levels. */
export type TimelineZoomMode = 'discrete' | 'smooth-discrete';
```

---

### `WheelZoomTrigger`

Modifier key that must be held to trigger wheel-based zoom.

```ts
/** Modifier key that must be held to trigger wheel-based zoom. */
export type WheelZoomTrigger = 'ctrlKey' | 'metaKey' | 'altKey' | 'shiftKey' | 'none';
```

---

### `ZoomAnchorMode`

Anchor strategy determining which viewport position stays fixed during zoom.

```ts
/** Anchor strategy determining which viewport position stays fixed during zoom. */
export type ZoomAnchorMode = 'pointer' | 'center' | 'start';
```

---

### `TimelineVisibleSpan`

Describes a time span used for minimum/maximum visible range constraints.

```ts
interface TimelineVisibleSpan {
  /** Calendar unit of the span. */
    readonly unit: 'minute' | 'hour' | 'day' | 'month' | 'year';
  /** Number of units. */
    readonly value: number
}
```

---

### `TimelineZoomLevel`

Definition of a single zoom level, specifying tick granularity and header layout.

```ts
interface TimelineZoomLevel {
  /** Unique level identifier (e.g. "day-week"). */
    readonly id: string;
  /** Calendar unit for the leaf tick row. */
    readonly tickUnit: TimelineUnit;
  /** Number of tick units per cell (defaults to 1). */
    readonly tickCount?: number;
  /** Pixel width of a single tick cell. */
    readonly tickWidth: number;
  /** Header row definitions for this level. */
    readonly headerRows: readonly TimelineHeaderRowConfig[];
  /** Optional minimum visible time span constraint. */
    readonly minVisibleSpan?: TimelineVisibleSpan;
  /** Optional maximum visible time span constraint. */
    readonly maxVisibleSpan?: TimelineVisibleSpan;
  /** Human-readable label for UI display. */
    readonly label?: string;
  /**
     * Per-zoom-level highlight overrides.
     */
    highlightVisibility?: TimelineHighlightVisibility
}
```

---

### `TimelineZoomConfig`

User-facing zoom configuration. All fields are optional and fall back to sensible defaults.

```ts
interface TimelineZoomConfig {
  /** Whether zoom functionality is enabled. */
    readonly enabled?: boolean;
  /** Ordered list of zoom levels from finest to coarsest. */
    readonly levels?: readonly TimelineZoomLevel[];
  /** Level ID to activate initially. */
    readonly defaultLevelId?: string;
  /** Finest (most detailed) level ID allowed. */
    readonly minLevelId?: string;
  /** Coarsest level ID allowed. */
    readonly maxLevelId?: string;
  /** Locale string for date formatting (e.g. "en-US"). */
    readonly locale?: string;
  /** Whether to shade non-working time columns. */
    readonly shadeNonWorkingTime?: boolean;
  /** Whether mouse wheel zoom is enabled. */
    readonly wheelZoomEnabled?: boolean;
  /** Modifier key required for wheel zoom. */
    readonly wheelZoomTrigger?: WheelZoomTrigger;
  /** Zoom transition mode. */
    readonly wheelZoomMode?: TimelineZoomMode;
  /** Anchor strategy during zoom transitions. */
    readonly zoomAnchorMode?: ZoomAnchorMode;
  /** Whether to invert the wheel scroll direction for zoom. */
    readonly invertWheelDirection?: boolean;
  /** Fallback date formatter for header cells. */
    readonly defaultHeaderFormatter?: TimelineDateFormatter
}
```

---

### `ResolvedTimelineZoomConfig`

Fully resolved zoom configuration with all defaults applied.

```ts
interface ResolvedTimelineZoomConfig {
  /** Whether zoom functionality is enabled. */
    readonly enabled: boolean;
  /** Ordered list of available zoom levels. */
    readonly levels: readonly TimelineZoomLevel[];
  /** Active default level ID. */
    readonly defaultLevelId: string;
  /** Finest allowed level ID. */
    readonly minLevelId: string;
  /** Coarsest allowed level ID. */
    readonly maxLevelId: string;
  /** Resolved locale string. */
    readonly locale: string;
  /** Whether non-working time shading is enabled. */
    readonly shadeNonWorkingTime: boolean | undefined;
  /** Whether wheel zoom is enabled. */
    readonly wheelZoomEnabled: boolean;
  /** Required modifier key for wheel zoom. */
    readonly wheelZoomTrigger: WheelZoomTrigger;
  /** Zoom transition mode. */
    readonly wheelZoomMode: TimelineZoomMode;
  /** Anchor strategy during zoom. */
    readonly zoomAnchorMode: ZoomAnchorMode;
  /** Whether wheel direction is inverted. */
    readonly invertWheelDirection: boolean;
  /** Default header date formatter, if any. */
    readonly defaultHeaderFormatter: TimelineDateFormatter | undefined
}
```

---

### `TimelineVisibleDateRange`

A start/end date range representing the currently visible portion of the timeline.

```ts
interface TimelineVisibleDateRange {
  /** First visible date (ISO string). */
    readonly startDate: ISODateString;
  /** Last visible date (ISO string). */
    readonly endDate: ISODateString
}
```

---

### `TimelineWheelInput`

Raw wheel event data used to determine zoom direction and trigger eligibility.

```ts
interface TimelineWheelInput {
  /** Vertical scroll delta from the wheel event. */
    readonly deltaY: number;
  /** Whether the Ctrl key was held. */
    readonly ctrlKey?: boolean;
  /** Whether the Meta (Cmd) key was held. */
    readonly metaKey?: boolean;
  /** Whether the Alt key was held. */
    readonly altKey?: boolean;
  /** Whether the Shift key was held. */
    readonly shiftKey?: boolean
}
```

---

### `TimelineZoomAnchorContext`

Viewport and pointer context used to calculate the zoom anchor position.

```ts
interface TimelineZoomAnchorContext {
  /** Active timeline scale instance. */
    readonly scale: TimelineScale;
  /** Current horizontal scroll offset in pixels. */
    readonly scrollLeft: number;
  /** Width of the visible viewport in pixels. */
    readonly viewportWidth: number;
  /** Left edge of the viewport element in client coordinates (for pointer anchor). */
    readonly viewportClientLeft?: number;
  /** Pointer X position in client coordinates (for pointer anchor). */
    readonly pointerClientX?: number
}
```

---

### `TimelineZoomTransition`

Describes a pending zoom level transition, including the anchor date used to preserve scroll position.

```ts
interface TimelineZoomTransition {
  /** Zoom level before the transition. */
    readonly previousLevel: TimelineZoomLevel;
  /** Zoom level after the transition. */
    readonly nextLevel: TimelineZoomLevel;
  /** Date that should remain at the anchor offset after zoom. */
    readonly anchorDate: ISODateString;
  /** Pixel offset from the viewport left where the anchor date should appear. */
    readonly anchorOffset: number;
  /** Scroll-left at the time the transition was initiated. */
    readonly scrollLeft: number
}
```

---

### `TimelineHighlightVisibility`

```ts
interface TimelineHighlightVisibility {
  weekends?: boolean;
  holidays?: boolean
}
```

---

### `DEFAULT_SMOOTH_WHEEL_THRESHOLD`

Pixel threshold for accumulated smooth-wheel deltas before triggering a zoom step.

```ts
DEFAULT_SMOOTH_WHEEL_THRESHOLD: 96;
```

---

### `TIMELINE_ZOOM_PRESET_LEVELS`

Built-in set of zoom presets ordered from finest (15-minute) to coarsest (multi-year).

```ts
TIMELINE_ZOOM_PRESET_LEVELS: readonly TimelineZoomLevel[];
```

---

### `DEFAULT_TIMELINE_ZOOM_LEVELS`

Default timeline zoom levels ordered from finest to coarsest. Minute-level zoom remains explicit/advanced.

```ts
DEFAULT_TIMELINE_ZOOM_LEVELS: readonly TimelineZoomLevel[];
```

---

### `FALLBACK_ZOOM_LEVEL`

Default zoom level used when no level is configured.

```ts
FALLBACK_ZOOM_LEVEL: TimelineZoomLevel;
```

---

### `getLevelById`

Finds a zoom level by its ID.

**@param** levels - Available zoom levels.
 *
**@param** levelId - ID to search for.
 *
**@returns** The matching level, or `null` if not found.

```ts
export function getLevelById(levels: readonly TimelineZoomLevel[], levelId: string | undefined): TimelineZoomLevel | null;
```

---

### `getLevelIndex`

Returns the index of a zoom level by ID, or 0 if not found.

**@param** levels - Available zoom levels.
 *
**@param** levelId - ID to search for.
 *
**@returns** Zero-based index into the levels array.

```ts
export function getLevelIndex(levels: readonly TimelineZoomLevel[], levelId: string): number;
```

---

### `clampLevelIndex`

Clamps a level index to the allowed range defined by min/max level IDs.

**@param** levels - Available zoom levels.
 *
**@param** index - Proposed level index.
 *
**@param** minLevelId - Finest allowed level ID.
 *
**@param** maxLevelId - Coarsest allowed level ID.
 *
**@returns** The clamped index.

```ts
export function clampLevelIndex(
  levels: readonly TimelineZoomLevel[],
  index: number,
  minLevelId: string,
  maxLevelId: string,
): number;
```

---

### `getAnchorOffset`

Computes the viewport-relative anchor offset based on the active anchor mode.

**@param** anchorMode - The anchor strategy ('pointer', 'center', or 'start').
 *
**@param** context - Current viewport and pointer context.
 *
**@returns** Pixel offset from the viewport left edge.

```ts
export function getAnchorOffset(
  anchorMode: string,
  context: TimelineZoomAnchorContext,
): number;
```

---

### `getZoomAnchorDate`

Resolves the nearest date-only zoom anchor while preserving existing scale
snapping semantics for non-zoom interactions.

**@param** scale - The active timeline scale.
 *
**@param** anchorX - Pixel offset from the timeline origin.
 *
**@returns** ISO date string to preserve during zoom.

```ts
export function getZoomAnchorDate(scale: TimelineScale, anchorX: number): ISODateString;
```

---

### `getNextScrollLeft`

Computes the scroll-left position that places an anchor date at a given viewport offset.

**@param** scale - The timeline scale instance.
 *
**@param** anchorDate - ISO date string to anchor.
 *
**@param** anchorOffset - Desired pixel offset from the viewport left edge.
 *
**@returns** The scroll-left value (minimum 0).

```ts
export function getNextScrollLeft(
  scale: TimelineScale,
  anchorDate: ISODateString,
  anchorOffset: number,
): number;
```

---

### `shouldHandleWheelTrigger`

Determines whether a wheel event should trigger a zoom action based on the configured modifier key.

**@param** trigger - The required modifier key.
 *
**@param** input - Raw wheel event data.
 *
**@returns** `true` if the trigger condition is met.

```ts
export function shouldHandleWheelTrigger(trigger: WheelZoomTrigger, input: TimelineWheelInput): boolean;
```

---

### `resolveHighlightVisibility`

```ts
export function resolveHighlightVisibility(
  zoom: TimelineZoomLevel,
): Required<TimelineHighlightVisibility>;
```

---

### `buildWbsMap`

Builds a map of task IDs to WBS (Work Breakdown Structure) codes based on
the canonical authored tree order and nesting depth.

**@param** rows - Ordered rows with depth and task identity.
 *
**@returns** A read-only map from task ID to its computed WBS string (e.g. "1.2.3").

```ts
export function buildWbsMap(
  rows: readonly TaskTreeRow[],
): ReadonlyMap<TaskId, string>;
```

---

### `AssignmentsTool`

Gantt feature tool responsible for managing resource assignments.

Delegates assignment mutations through the {@link AssignmentMutationService}.

```ts
class AssignmentsTool {
  /**
     * Configure the assignment mutation service with the latest resolved project state.
     * @param context - The current gantt coordinator context.
     */
  afterRender(context: GanttCoordinatorContext): void;

  /**
     * Route an assignee field edit through the assignment mutation service.
     * @param taskId - The task whose assignments are being edited.
     * @param field - The field name being edited (only `'assignees'` is handled).
     * @param value - The raw editor value.
     * @returns The mutation result, or `null` if the field is not `'assignees'`.
     */
  handleFieldEdit(taskId: string, field: string, value: unknown): AssignmentMutationResult | null;

  /**
     * Route an assignee field edit through a cancelable before-change event.
     * @param taskId - The task whose assignments are being edited.
     * @param field - The field name being edited (only `'assignees'` is handled).
     * @param value - The raw editor value.
     * @param context - The current gantt coordinator context.
     * @returns The mutation result, or `null` if the field is not `'assignees'`.
     */
  applyFieldEdit(
    taskId: string,
    field: string,
    value: unknown,
    context: GanttCoordinatorContext,
  ): AssignmentMutationResult | null;

  destroy(): void;
}
```

---

### `AssignmentMutationService`

Service contract for mutating task-to-resource assignments.
Implementations manage assignment CRUD and input parsing.

```ts
interface AssignmentMutationService {
  /**
     * Configure the service with the current project state and stores.
     * Must be called after each render cycle.
     */
    configure(
      project: ProjectSnapshot,
      taskStore: TaskStore,
      resourceStore: ResourceStore,
      assignmentStore: AssignmentStore,
      readOnly?: boolean,
    ): void;
  /**
     * Replace all assignments for a task with the given list.
     * @param taskId - The task to update.
     * @param assignments - The complete set of assignments to apply.
     * @returns Mutation result indicating success or failure.
     */
    replaceTaskAssignments(taskId: TaskId, assignments: readonly AssignmentInput[]): AssignmentMutationResult;
  /**
     * Resolve assignment entities for a raw editor value without mutating stores.
     * @param taskId - The task to preview.
     * @param value - Raw field value from the grid editor.
     */
    previewAssignmentField(taskId: TaskId, value: unknown): AssignmentMutationPreviewResult;
  /**
     * Parse a raw editor value (e.g. comma-separated resource names) and replace assignments.
     * @param taskId - The task to update.
     * @param value - Raw field value from the grid editor.
     * @returns Mutation result indicating success or failure.
     */
    updateAssignmentField(taskId: TaskId, value: unknown): AssignmentMutationResult
}
```

---

### `AssignmentMutationResult`

Discriminated union result of an assignment mutation — either success or failure.

```ts
/** Discriminated union result of an assignment mutation — either success or failure. */
export type AssignmentMutationResult = AssignmentMutationSuccess | AssignmentMutationFailure;
```

---

### `AssignmentInput`

Input payload describing a single resource assignment to a task.

```ts
interface AssignmentInput {
  /** Identifier of the resource being assigned. */
    readonly resourceId: ResourceId;
  /** Percentage of the resource's capacity allocated (0–100). */
    readonly allocationUnits: number;
  /** Optional assignment work in hours. */
    readonly workHours?: number;
  /** Optional role or responsibility label for this assignment. */
    readonly responsibility?: string
}
```

---

### `DefaultAssignmentMutationService`

Default implementation of {@link AssignmentMutationService}.
Manages in-memory assignment state and validates against resource/task stores.

```ts
class DefaultAssignmentMutationService {
  configure(
    project: ProjectSnapshot,
    taskStore: TaskStore,
    resourceStore: ResourceStore,
    assignmentStore: AssignmentStore,
    readOnly = false,
  ): void;

  replaceTaskAssignments(taskId: TaskId, assignments: readonly AssignmentInput[]): AssignmentMutationResult;

  previewAssignmentField(taskId: TaskId, value: unknown): AssignmentMutationPreviewResult;

  updateAssignmentField(taskId: TaskId, value: unknown): AssignmentMutationResult;
}
```

---

### `createAssignmentMutationService`

Factory function to create a new {@link AssignmentMutationService} instance.

**@returns** A configured {@link DefaultAssignmentMutationService}.

```ts
export function createAssignmentMutationService(): AssignmentMutationService;
```

---

### `BaselineTool`

Gantt feature tool responsible for baseline bar visibility.

Contributes a `showBaseline` projection option each render cycle based on
the visual configuration. The actual baseline rendering is handled by
the projection pipeline.

```ts
class BaselineTool {
  /**
     * Contribute baseline visibility to the projection options.
     * @param context - The current gantt coordinator context.
     * @returns Partial render contributions with the `showBaseline` flag.
     */
  beforeRender(context: GanttCoordinatorContext): Partial<any> | void;

  destroy(): void;
}
```

---

### `captureBaselineFromSchedule`

Capture a baseline snapshot from the current scheduler output.

The helper stores effective scheduled dates, duration, and progress for every
task in the result, including summaries after rollup. It is intentionally
pure so apps can decide when and where to persist the returned snapshot.

```ts
export function captureBaselineFromSchedule(
  scheduling: Pick<SchedulingResult, 'tasks'> | readonly ScheduledTask[],
  options: CaptureBaselineOptions =;
```

---

### `CaptureBaselineOptions`

```ts
interface CaptureBaselineOptions {
  /** Stable snapshot id. Generated from the capture timestamp when omitted. */
    readonly id?: BaselineId;
  /** Human-readable baseline name. */
    readonly name?: string;
  /** Capture timestamp. Defaults to the current time. */
    readonly capturedAt?: ISODateTimeString
}
```

---

### `GanttContextMenuTool`

```ts
class GanttContextMenuTool {
  setup(context: GanttCoordinatorContext): void;

  onConfigChange(): void;

  destroy(): void;
}
```

---

### `createGanttContextMenuItems`

```ts
export function createGanttContextMenuItems(
  ganttContext: GanttCoordinatorContext,
): ContextMenuItem[];
```

---

### `createGanttRowContextMenuConfig`

```ts
export function createGanttRowContextMenuConfig(
  baseConfig: Partial<ContextMenuConfig> | undefined,
  ganttContext: GanttCoordinatorContext,
): ContextMenuConfig;
```

---

### `createGanttColumnContextMenuConfig`

```ts
export function createGanttColumnContextMenuConfig(
  baseConfig: Partial<ContextMenuConfig> | undefined,
  ganttContext: GanttCoordinatorContext,
  getColumnMenuState?: () => GanttColumnMenuState,
): ContextMenuConfig;
```

---

### `CriticalPathTool`

Gantt feature tool that manages critical path highlighting.

Reads `showCriticalPath` from the visual config, contributes projection options,
and exposes the set of critical dependency IDs from the scheduling engine.

```ts
class CriticalPathTool {
  /**
     * Contribute the `showCriticalPath` flag to projection options.
     * @param context - The current gantt coordinator context.
     * @returns Partial render contributions with the critical path flag.
     */
  beforeRender(context: GanttCoordinatorContext): Partial<GanttRenderContributions> | void;

  destroy(): void;

  /**
     * Return the set of dependency IDs that lie on the critical path.
     * @param context - The current gantt coordinator context.
     * @returns A read-only set of critical dependency IDs (empty when critical path is disabled).
     */
  getCriticalDependencyIds(context: GanttCoordinatorContext): ReadonlySet<DependencyId>;
}
```

---

### `GanttDependencyOverlayPlugin`

```ts
class GanttDependencyOverlayPlugin {
  afterRender(context: GanttCoordinatorContext, _renderState: GanttRenderState): void;

  onViewportChanged(context: GanttCoordinatorContext): void;

  handleKeyDown(event: KeyboardEvent, context: GanttCoordinatorContext): boolean;

  syncSelectedDependency(dependencyId: DependencyId | null, context: GanttCoordinatorContext): void;

  destroy(): void;
}
```

---

### `DependencyTool`

Gantt feature tool that manages the full lifecycle of dependency arrows.

Responsibilities include:
- SVG overlay rendering and viewport-synchronized refresh
- Hover and selection state management with event emission
- Dependency field editing (predecessors/successors columns)
- Keyboard delete handling for selected dependencies
- Drag-to-connect controller wiring and preview management
- Cancelable before-mutation event emission

```ts
class DependencyTool {
  /**
     * Handle an inline field edit for predecessor or successor columns.
     * Parses the text reference and delegates to the mutation service.
     * @param taskId - The task being edited.
     * @param field - The field name (`'predecessors'` or `'successors'`).
     * @param value - The raw editor value.
     * @param context - The current gantt coordinator context.
     * @returns Mutation result, or `null` if the field is not a dependency field.
     */
  handleFieldEdit(taskId: TaskId, field: string, value: unknown, context: GanttCoordinatorContext): DependencyMutationResult | null;

  /**
     * Apply a successful mutation result: update the dependency list, sync selection, and re-render.
     * @param result - The mutation result to apply.
     * @param context - The current gantt coordinator context.
     * @param rerender - Whether to request a re-render (default `true`).
     * @returns `true` if the result was successful and applied.
     */
  applyMutationResult(result: DependencyMutationResult, context: GanttCoordinatorContext, rerender = true): boolean;
}
```

---

### `resolveDependencyEndpointSides`

```ts
export function resolveDependencyEndpointSides(type: DependencyType): Pick<DependencyLayerTooltip, 'fromSide' | 'toSide'>;
```

---

### `DependencyLayerFrame`

Viewport frame dimensions for the dependency SVG overlay.

```ts
interface DependencyLayerFrame {
  /** Width of the viewport in pixels. */
    readonly width: number;
  /** Height of the viewport in pixels. */
    readonly height: number
}
```

---

### `DependencyLayerRenderState`

Current visual state of the dependency overlay (hover, selection, critical path).

```ts
interface DependencyLayerRenderState {
  /** ID of the dependency currently hovered, or `null`. */
    readonly hoveredDependencyId: DependencyId | null;
  /** ID of the dependency currently selected, or `null`. */
    readonly selectedDependencyId: DependencyId | null;
  /** Set of dependency IDs on the critical path. */
    readonly criticalDependencyIds: ReadonlySet<string>
}
```

---

### `DependencyLayerDraft`

A draft dependency line drawn during a drag-to-connect interaction.

```ts
interface DependencyLayerDraft {
  /** SVG path `d` attribute for the draft line. */
    readonly path: string;
  /** Whether the draft represents a valid dependency connection. */
    readonly valid: boolean
}
```

---

### `DependencyLayerTooltip`

Tooltip content and endpoint markers for a rendered dependency link.

```ts
interface DependencyLayerTooltip {
  /** Text content consumed by TooltipPlugin. */
    readonly content: string;
  /** Source endpoint side used for the From icon. */
    readonly fromSide: DependencyEndpointSide;
  /** Target endpoint side used for the To icon. */
    readonly toSide: DependencyEndpointSide
}
```

---

### `DependencyLayerInteractionHandlers`

Callbacks for dependency overlay user interactions.

```ts
interface DependencyLayerInteractionHandlers {
  /** Called when the user hovers over or away from a dependency. */
    onHover(dependencyId: DependencyId | null): void;
  /** Called when the user clicks to select a dependency. */
    onSelect(dependencyId: DependencyId): void;
  /** Called when the user clicks the delete button on a selected dependency. */
    onDelete(dependencyId: DependencyId): void
}
```

---

### `DependencyLayer`

Preact-based SVG overlay layer that renders dependency arrows between task bars.

Supports hover/select highlighting, critical path styling, draft previews,
and inline delete buttons. Mounts into a container element and re-renders
via the {@link render} method.

```ts
class DependencyLayer {
  /**
     * Attach the overlay root element to the container DOM.
     * No-op if already mounted.
     */
  mount(): void;

  /** Remove the overlay from the DOM and clean up. */
  destroy(): void;

  /** Hide the overlay without destroying it. */
  hide(): void;

  /**
     * Update the viewport frame dimensions.
     * @param frame - New width and height.
     */
  setFrame(frame: DependencyLayerFrame): void;

  /**
     * Render dependency arrows, interaction states, and optional draft preview.
     * @param layouts - Computed layout geometries for visible dependencies.
     * @param dependenciesById - Map of dependency entities keyed by ID.
     * @param state - Current hover/select/critical visual state.
     * @param draft - Optional draft path for a dependency being drawn.
     */
  render(
    layouts: readonly DependencyLayout[],
    dependenciesById: ReadonlyMap<DependencyId, DependencyEntity>,
    state: DependencyLayerRenderState,
    draft: DependencyLayerDraft | null = null,
    tooltipsById: ReadonlyMap<DependencyId, DependencyLayerTooltip> = new Map(),
  ): void;
}
```

---

### `createDependencyLayoutService`

Factory function to create a new {@link DependencyLayoutService} instance.

**@returns** A new {@link DefaultDependencyLayoutService}.

```ts
export function createDependencyLayoutService(): DependencyLayoutService;
```

---

### `DependencyLayoutViewport`

Viewport dimensions used for dependency layout calculations.

```ts
interface DependencyLayoutViewport {
  /** Viewport width in pixels. */
    readonly width: number;
  /** Viewport height in pixels. */
    readonly height: number
}
```

---

### `DependencyLayout`

Computed geometry for a single dependency arrow path.

```ts
interface DependencyLayout {
  /** Unique dependency ID. */
    readonly dependencyId: string;
  /** Task ID of the predecessor. */
    readonly predecessorTaskId: string;
  /** Task ID of the successor. */
    readonly successorTaskId: string;
  /** SVG path `d` attribute string. */
    readonly path: string;
  /** X-coordinate of the arrow endpoint. */
    readonly endX: number;
  /** Y-coordinate of the arrow endpoint. */
    readonly endY: number;
  /** Minimum X extent of the path bounding box. */
    readonly minX: number;
  /** Maximum X extent of the path bounding box. */
    readonly maxX: number;
  /** Minimum Y extent of the path bounding box. */
    readonly minY: number;
  /** Maximum Y extent of the path bounding box. */
    readonly maxY: number
}
```

---

### `DependencyLayoutService`

Service contract for computing dependency arrow layout geometries.
Implementations handle path routing, caching, and viewport culling.

```ts
interface DependencyLayoutService {
  /** Invalidate any cached layout data. */
    invalidate(): void;
  /**
     * Compute SVG path layouts for a set of visible dependencies.
     * @param dependencies - Dependency entities to lay out.
     * @param visibleBars - Visible task bar anchor positions.
     * @param viewport - Current viewport dimensions.
     * @returns Array of computed dependency layouts.
     */
    layout(
      dependencies: readonly DependencyEntity[],
      visibleBars: readonly VisibleTaskBarAnchors[],
      viewport: DependencyLayoutViewport,
    ): readonly DependencyLayout[];
  /**
     * Compute a preview layout for a dependency being drawn or edited.
     * @param dependencyId - Temporary ID for the preview.
     * @param predecessorTaskId - Source task ID.
     * @param successorTaskId - Target task ID.
     * @param type - Dependency type.
     * @param predecessorAnchor - Pixel coordinates of the predecessor anchor.
     * @param successorAnchor - Pixel coordinates of the successor anchor.
     * @param viewport - Current viewport dimensions.
     * @returns The computed layout, or `null` if outside the viewport.
     */
    preview(
      dependencyId: string,
      predecessorTaskId: string,
      successorTaskId: string,
      type: DependencyType,
      predecessorAnchor: { x: number; y: number },
      successorAnchor: { x: number; y: number },
      viewport: DependencyLayoutViewport,
    ): DependencyLayout | null
}
```

---

### `DefaultDependencyLayoutService`

Default implementation of {@link DependencyLayoutService}.

Routes orthogonal SVG paths with rounded corners between task bar anchors.
Caches layout results and invalidates on viewport or data changes.

```ts
class DefaultDependencyLayoutService {
  invalidate(): void;

  layout(
    dependencies: readonly DependencyEntity[],
    visibleBars: readonly VisibleTaskBarAnchors[],
    viewport: DependencyLayoutViewport,
  ): readonly DependencyLayout[];

  preview(
    dependencyId: string,
    predecessorTaskId: string,
    successorTaskId: string,
    type: DependencyType,
    predecessorAnchor:;
}
```

---

### `DependencyDragPreview`

Snapshot of a dependency drag preview state during a drag-to-connect interaction.

```ts
interface DependencyDragPreview {
  /** Task ID of the drag source (predecessor). */
    readonly predecessorTaskId: TaskId;
  /** Task ID of the drag target (successor). */
    readonly successorTaskId: TaskId;
  /** Resolved dependency type based on drag sides. */
    readonly type: DependencyType;
  /** Pixel coordinates of the predecessor anchor point. */
    readonly predecessorAnchor: { x: number; y: number };
  /** Pixel coordinates of the successor anchor point. */
    readonly successorAnchor: { x: number; y: number };
  /** Whether the previewed dependency is a valid connection. */
    readonly valid: boolean
}
```

---

### `DependencyDragControllerOptions`

Callback context provided to the {@link DependencyDragController}.

```ts
interface DependencyDragControllerOptions {
  /** Return the current viewport snapshot. */
    getViewport(): GanttViewportSnapshot | null;
  /** Return task bar anchors for a given task ID. */
    getBarAnchors(taskId: TaskId): VisibleTaskBarAnchors | null;
  /** Check whether a dependency type is permitted by the config. */
    isAllowedType(type: DependencyType): boolean;
  /** Suppress hover tooltips while a pointer gesture is active. */
    suppressTooltips?(): () => void;
  /** Update the drag preview overlay. */
    setPreview(preview: DependencyDragPreview | null): void;
  /** Commit a finalized dependency after a successful drag. */
    commitDependency(
      predecessorTaskId: TaskId,
      successorTaskId: TaskId,
      type: DependencyType,
    ): void
}
```

---

### `DependencyDragController`

Pointer-event-based controller for drag-to-connect dependency creation.

Listens for pointer events on dependency handle elements within task bars,
tracks the drag state, resolves hover targets, and manages the preview overlay.
On pointer-up, commits the dependency if the connection is valid.

```ts
class DependencyDragController {
  /**
     * Remove all event listeners and clean up.
     */
  destroy(): void;
}
```

---

### `createDependencyMutationService`

```ts
export function createDependencyMutationService(): DependencyMutationService;
```

---

### `DependencyReferenceInput`

Input describing a dependency reference for batch replacement.

```ts
interface DependencyReferenceInput {
  /** Target task ID for the dependency. */
    readonly taskId: TaskId;
  /** Link type (e.g. `'finish-to-start'`). */
    readonly type: DependencyType;
  /** Optional lag in days (positive = lag, negative = lead). */
    readonly lagDays?: number
}
```

---

### `DependencyMutationSuccess`

Successful result of a dependency mutation operation.

```ts
interface DependencyMutationSuccess {
  /** Discriminant indicating success. */
    readonly ok: true;
  /** ID of the affected dependency, or `null` for batch operations. */
    readonly dependencyId: DependencyId | null;
  /** Whether a new dependency was created (vs. updated/deleted). */
    readonly created: boolean
}
```

---

### `DependencyMutationFailure`

Failed result of a dependency mutation operation.

```ts
interface DependencyMutationFailure {
  /** Discriminant indicating failure. */
    readonly ok: false;
  /** Machine-readable error code. */
    readonly code:
      | 'dependency-not-found'
      | 'invalid-task'
      | 'invalid-self-reference'
      | 'invalid-type'
      | 'duplicate-dependency'
      | 'dependency-cycle'
      | 'invalid-reference'
      | 'readonly-project';
  /** Human-readable error message. */
    readonly message: string
}
```

---

### `DependencyMutationResult`

Discriminated union result of a dependency mutation — either success or failure.

```ts
/** Discriminated union result of a dependency mutation — either success or failure. */
export type DependencyMutationResult = DependencyMutationSuccess | DependencyMutationFailure;
```

---

### `DependencyMutationService`

Service contract for mutating dependency entities.
Implementations manage dependency CRUD, validation, and batch replacement.

```ts
interface DependencyMutationService {
  /**
     * Configure the service with the current dependency set and task store.
     * @param dependencies - Current dependency entities.
     * @param taskStore - Task store for validation.
     * @param allowedTypes - Set of permitted dependency types.
     */
    configure(
      dependencies: readonly DependencyEntity[],
      taskStore: TaskStore,
      allowedTypes: readonly DependencyType[],
      readOnly?: boolean,
    ): void;
  /** Return all current dependency entities. */
    getAll(): readonly DependencyEntity[];
  /**
     * Create a new dependency between two tasks.
     * @param predecessorTaskId - Source task.
     * @param successorTaskId - Target task.
     * @param type - Link type.
     * @param lagDays - Optional lag in days.
     * @returns Mutation result.
     */
    createDependency(
      predecessorTaskId: TaskId,
      successorTaskId: TaskId,
      type: DependencyType,
      lagDays?: number,
    ): DependencyMutationResult;
  /**
     * Update an existing dependency's type or lag.
     * @param dependencyId - ID of the dependency to update.
     * @param patch - Partial update fields.
     * @returns Mutation result.
     */
    updateDependency(
      dependencyId: DependencyId,
      patch: Partial<Pick<DependencyEntity, 'type' | 'lagDays'>>,
    ): DependencyMutationResult;
  /**
     * Delete a dependency by ID.
     * @param dependencyId - ID of the dependency to remove.
     * @returns Mutation result.
     */
    deleteDependency(dependencyId: DependencyId): DependencyMutationResult;
  /**
     * Replace all dependencies for a task in one direction.
     * @param taskId - The task whose dependencies are replaced.
     * @param direction - Whether replacing predecessors or successors.
     * @param references - The new set of dependency references.
     * @returns Mutation result.
     */
    replaceTaskDependencies(
      taskId: TaskId,
      direction: 'predecessors' | 'successors',
      references: readonly DependencyReferenceInput[],
    ): DependencyMutationResult
}
```

---

### `DefaultDependencyMutationService`

Default implementation of {@link DependencyMutationService}.

Manages an in-memory list of dependency entities and validates against
the task store and allowed dependency type configuration.

```ts
class DefaultDependencyMutationService {
  configure(
    dependencies: readonly DependencyEntity[],
    taskStore: TaskStore,
    allowedTypes: readonly DependencyType[],
    readOnly = false,
  ): void;

  getAll(): readonly DependencyEntity[];

  createDependency(
    predecessorTaskId: TaskId,
    successorTaskId: TaskId,
    type: DependencyType,
    lagDays = 0,
  ): DependencyMutationResult;

  updateDependency(
    dependencyId: DependencyId,
    patch: Partial<Pick<DependencyEntity, 'type' | 'lagDays'>>,
  ): DependencyMutationResult;

  deleteDependency(dependencyId: DependencyId): DependencyMutationResult;

  replaceTaskDependencies(
    taskId: TaskId,
    direction: 'predecessors' | 'successors',
    references: readonly DependencyReferenceInput[],
  ): DependencyMutationResult;
}
```

---

### `formatDependencyTypeShort`

Format a dependency type as a short label (e.g. `'FS'`, `'SS'`).

**@param** type - The dependency type to format.
 *
**@returns** Two-letter short label.

```ts
export function formatDependencyTypeShort(type: DependencyType): string;
```

---

### `formatDependencyReference`

Format a dependency entity as a reference token for display in a grid cell.

**@param** dependency - The dependency entity.
 *
**@param** relatedTaskId - The task ID from whose perspective the reference is formatted.
 *
**@param** taskRefById - Map of task IDs to their display references (WBS codes).
 *
**@returns** A formatted reference with task ID and display token, or `null` if the task ref is missing.

```ts
export function formatDependencyReference(
  dependency: DependencyEntity,
  relatedTaskId: string,
  taskRefById: ReadonlyMap<TaskId, string>,
): FormattedDependencyReference | null;
```

---

### `parseDependencyReferences`

Parse a comma-separated string of dependency references into structured objects.

Each reference has the format `<taskRef>[±<lag>d]`, e.g. `"1FS"`, `"2.1SS+2d"`.

**@param** value - The raw dependency reference string.
 *
**@returns** Array of parsed references.
 *
**@throws** Error if any individual reference is malformed.

```ts
export function parseDependencyReferences(value: string): readonly ParsedDependencyReference[];
```

---

### `FormattedDependencyReference`

A formatted dependency reference token for display in grid cells.

```ts
interface FormattedDependencyReference {
  /** ID of the related task. */
    readonly taskId: TaskId;
  /** Human-readable reference token (e.g. `"1FS"`, `"2.1SS+2"`). */
    readonly token: string
}
```

---

### `ParsedDependencyReference`

A parsed dependency reference extracted from a user-entered text string.

```ts
interface ParsedDependencyReference {
  /** Task reference identifier (WBS code or task ID). */
    readonly taskRef: string;
  /** Dependency link type (e.g. `'finish-to-start'`). */
    readonly type: DependencyType;
  /** Lag or lead in days (positive = lag, negative = lead). */
    readonly lagDays: number
}
```

---

### `buildDependencyValidationSummary`

Convert scheduler diagnostics or projected row warnings into grouped data for
a dependency validation panel. This helper is intentionally presentation-free.

```ts
export function buildDependencyValidationSummary(
  input: DependencyValidationSummaryInput =;
```

---

### `DependencyValidationSummarySeverity`

```ts
export type DependencyValidationSummarySeverity = 'warning' | 'conflict';
```

---

### `DependencyValidationSummaryGroupId`

```ts
export type DependencyValidationSummaryGroupId =
  | 'dependencies'
  | 'constraints'
  | 'deadlines'
  | 'resources'
  | 'data'
  | 'warnings';
```

---

### `DependencyValidationSummarySource`

```ts
export type DependencyValidationSummarySource = 'conflict' | 'issue' | 'row';
```

---

### `DependencyValidationSummaryItem`

```ts
interface DependencyValidationSummaryItem {
  readonly id: string;
  readonly groupId: DependencyValidationSummaryGroupId;
  readonly severity: DependencyValidationSummarySeverity;
  readonly source: DependencyValidationSummarySource;
  readonly code: string;
  readonly message: string;
  readonly taskId?: TaskId;
  readonly taskName?: string;
  readonly relatedTaskIds: readonly TaskId[];
  readonly dependencyId?: string;
  readonly dependencyIds: readonly string[];
  readonly resourceId?: string;
  readonly date?: string
}
```

---

### `DependencyValidationSummaryGroup`

```ts
interface DependencyValidationSummaryGroup {
  readonly id: DependencyValidationSummaryGroupId;
  readonly title: string;
  readonly severity: DependencyValidationSummarySeverity;
  readonly count: number;
  readonly items: readonly DependencyValidationSummaryItem[]
}
```

---

### `DependencyValidationSummary`

```ts
interface DependencyValidationSummary {
  readonly totalCount: number;
  readonly conflictCount: number;
  readonly warningCount: number;
  readonly groups: readonly DependencyValidationSummaryGroup[]
}
```

---

### `DependencyValidationSummaryInput`

```ts
interface DependencyValidationSummaryInput {
  readonly conflicts?: readonly SchedulerConflict[];
  readonly issues?: readonly SchedulerIssue[];
  readonly rows?: readonly DependencyValidationSummaryRow[]
}
```

---

### `DependencyValidationSummaryRow`

```ts
export type DependencyValidationSummaryRow = Pick<
  GanttGridRow,
  'id' | 'name' | 'schedulingWarning' | 'schedulingWarnings'
>;
```

---

### `buildResourceOverallocationSummary`

Convert projected resource-planning rows, raw load summaries, or scheduler
over-allocation diagnostics into grouped data for an overload summary panel.
The return value is presentation-free so UI layers can render it however they need.

```ts
export function buildResourceOverallocationSummary(
  input: ResourceOverallocationSummaryInput =;
```

---

### `ResourceOverallocationSummarySource`

```ts
export type ResourceOverallocationSummarySource = 'conflict' | 'row' | 'load-summary';
```

---

### `ResourceOverallocationSummaryItem`

```ts
interface ResourceOverallocationSummaryItem {
  readonly id: string;
  readonly source: ResourceOverallocationSummarySource;
  readonly resourceId: ResourceId;
  readonly resourceName?: string;
  readonly resourceRole?: string;
  readonly startDate: string;
  readonly endDate: string;
  readonly allocatedUnits: number;
  readonly capacityUnits: number;
  readonly overloadUnits: number;
  readonly overloadRatio: number;
  readonly taskIds: readonly TaskId[];
  readonly taskId?: TaskId;
  readonly message: string
}
```

---

### `ResourceOverallocationSummaryGroup`

```ts
interface ResourceOverallocationSummaryGroup {
  readonly resourceId: ResourceId;
  readonly resourceName?: string;
  readonly resourceRole?: string;
  readonly count: number;
  readonly maxAllocatedUnits: number;
  readonly capacityUnits: number;
  readonly peakOverloadUnits: number;
  readonly items: readonly ResourceOverallocationSummaryItem[]
}
```

---

### `ResourceOverallocationSummary`

```ts
interface ResourceOverallocationSummary {
  readonly totalCount: number;
  readonly resourceCount: number;
  readonly peakOverloadUnits: number;
  readonly groups: readonly ResourceOverallocationSummaryGroup[]
}
```

---

### `ResourceOverallocationSummaryInput`

```ts
interface ResourceOverallocationSummaryInput {
  readonly conflicts?: readonly SchedulerConflict[];
  readonly rows?: readonly ResourceOverallocationSummaryRow[];
  readonly loadSummaries?: readonly ResourceOverallocationLoadSummary[]
}
```

---

### `ResourceOverallocationSummaryRow`

```ts
export type ResourceOverallocationSummaryRow = Pick<
  GanttGridRow,
  'id' | 'name' | 'resourceId' | 'resourceRole' | 'resourcePlanning'
>;
```

---

### `ResourceOverallocationLoadSummary`

```ts
interface ResourceOverallocationLoadSummary {
  readonly resourceId: ResourceId;
  readonly resourceName?: string;
  readonly resourceRole?: string;
  readonly planning?: ResourcePlanningRowData;
  readonly segments?: readonly ResourceLoadSegment[]
}
```

---

### `createTaskEditorFormValues`

```ts
export function createTaskEditorFormValues(
  task: TaskEntity,
  resources: readonly ResourceEntity[] = [],
  assignments: readonly AssignmentEntity[] = [],
): TaskEditorFormValues;
```

---

### `createTaskEditorResourceLabels`

```ts
export function createTaskEditorResourceLabels(
  task: Pick<TaskEntity, 'id'>,
  resources: readonly ResourceEntity[],
  assignments: readonly AssignmentEntity[],
): readonly TaskEditorResourceLabel[];
```

---

### `normalizeTaskEditorSubmit`

```ts
export function normalizeTaskEditorSubmit(
  task: TaskEntity,
  values: TaskEditorFormValues,
  options: NormalizeTaskEditorSubmitOptions =;
```

---

### `TaskEditorEditableFieldId`

```ts
export type TaskEditorEditableFieldId =
  | 'name'
  | 'startDate'
  | 'endDate'
  | 'durationDays'
  | 'actualStartDate'
  | 'actualFinishDate'
  | 'deadlineDate'
  | 'progressPercent'
  | 'constraintType'
  | 'constraintDate'
  | 'manuallyScheduled'
  | 'workHours'
  | 'remainingDurationDays'
  | 'notes'
  | 'effortMode'
  | 'effortDriven'
  | 'inactive'
  | 'priority'
  | 'canLevel'
  | 'levelingDelayDays';
```

---

### `TaskEditorDisplayFieldId`

```ts
export type TaskEditorDisplayFieldId = 'resourceLabels';
```

---

### `TaskEditorFieldId`

```ts
export type TaskEditorFieldId = TaskEditorEditableFieldId | TaskEditorDisplayFieldId;
```

---

### `TaskEditorFieldKind`

```ts
export type TaskEditorFieldKind =
  | 'text'
  | 'textarea'
  | 'date'
  | 'number'
  | 'percent'
  | 'select'
  | 'switch'
  | 'labels';
```

---

### `TaskEditorFieldOption`

```ts
interface TaskEditorFieldOption {
  readonly label: string;
  readonly value: TValue
}
```

---

### `TaskEditorFieldSchema`

```ts
interface TaskEditorFieldSchema {
  readonly id: TField;
  readonly label: string;
  readonly kind: TaskEditorFieldKind;
  readonly taskField?: keyof TaskEntity;
  readonly updateField?: keyof TaskUpdate;
  readonly readonly?: boolean;
  readonly min?: number;
  readonly max?: number;
  readonly step?: number;
  readonly options?: readonly TaskEditorFieldOption[]
}
```

---

### `TaskEditorResourceLabel`

```ts
interface TaskEditorResourceLabel {
  readonly resourceId: ResourceId;
  readonly label: string
}
```

---

### `TaskEditorFormValues`

```ts
export type TaskEditorFormValues = Partial<Record<TaskEditorFieldId, unknown>>;
```

---

### `TaskEditorSubmitSuccess`

```ts
interface TaskEditorSubmitSuccess {
  readonly ok: true;
  readonly patch: TaskUpdate
}
```

---

### `TaskEditorSubmitFailure`

```ts
interface TaskEditorSubmitFailure {
  readonly ok: false;
  readonly errors: readonly TaskEditorSubmitError[]
}
```

---

### `TaskEditorSubmitError`

```ts
interface TaskEditorSubmitError {
  readonly field: TaskEditorFieldId;
  readonly code: 'invalid-value';
  readonly message: string
}
```

---

### `TaskEditorSubmitResult`

```ts
export type TaskEditorSubmitResult = TaskEditorSubmitSuccess | TaskEditorSubmitFailure;
```

---

### `NormalizeTaskEditorSubmitOptions`

```ts
interface NormalizeTaskEditorSubmitOptions {
  /**
     * When false, fields equal to the current task value are omitted from the
     * returned patch. Defaults to false so forms can submit their whole state.
     */
    readonly includeUnchanged?: boolean
}
```

---

### `TASK_EDITOR_CONSTRAINT_OPTIONS`

```ts
TASK_EDITOR_CONSTRAINT_OPTIONS: readonly TaskEditorFieldOption<TaskConstraintType>[];
```

---

### `TASK_EDITOR_EFFORT_MODE_OPTIONS`

```ts
TASK_EDITOR_EFFORT_MODE_OPTIONS: readonly TaskEditorFieldOption<TaskEffortMode>[];
```

---

### `TASK_EDITOR_FIELD_SCHEMA`

```ts
TASK_EDITOR_FIELD_SCHEMA: readonly [{ readonly id: "name"; readonly label: "Task Name"; readonly kind: "text"; readonly taskField: "name"; readonly updateField: "name"; }, { readonly id: "startDate"; readonly label: "Start"; readonly kind: "date"; readonly taskField: "startDate"; readonly updateField: "startDate"; }, { readonly id: "endDate"; readonly label: "Finish"; readonly kind: "date"; readonly taskField: "endDate"; readonly updateField: "endDate"; }, { readonly id: "durationDays"; readonly label: "Duration"; readonly kind: "number"; readonly taskField: "durationDays"; readonly updateField: "durationDays"; readonly min: 0; readonly step: 1; }, { readonly id: "progressPercent"; readonly label: "Progress"; readonly kind: "percent"; readonly taskField: "progressPercent"; readonly updateField: "progressPercent"; readonly min: 0; readonly max: 100; readonly step: 1; }, { readonly id: "constraintType"; readonly label: "Constraint"; readonly kind: "select"; readonly taskField: "constraintType"; readonly updateField: "constraintType"; readonly options: readonly TaskEditorFieldOption<TaskConstraintType>[]; }, { readonly id: "constraintDate"; readonly label: "Constraint Date"; readonly kind: "date"; readonly taskField: "constraintDate"; readonly updateField: "constraintDate"; }, { readonly id: "deadlineDate"; readonly label: "Deadline"; readonly kind: "date"; readonly taskField: "deadlineDate"; readonly updateField: "deadlineDate"; }, { readonly id: "actualStartDate"; readonly label: "Actual Start"; readonly kind: "date"; readonly taskField: "actualStartDate"; readonly updateField: "actualStartDate"; }, { readonly id: "actualFinishDate"; readonly label: "Actual Finish"; readonly kind: "date"; readonly taskField: "actualFinishDate"; readonly updateField: "actualFinishDate"; }, { readonly id: "remainingDurationDays"; readonly label: "Remaining Duration"; readonly kind: "number"; readonly taskField: "remainingDurationDays"; readonly updateField: "remainingDurationDays"; readonly min: 0; }, { readonly id: "workHours"; readonly label: "Work"; readonly kind: "number"; readonly taskField: "workHours"; readonly updateField: "workHours"; readonly min: 0; }, { readonly id: "effortMode"; readonly label: "Task Type"; readonly kind: "select"; readonly taskField: "effortMode"; readonly updateField: "effortMode"; readonly options: readonly TaskEditorFieldOption<TaskEffortMode>[]; }, { readonly id: "effortDriven"; readonly label: "Effort Driven"; readonly kind: "switch"; readonly taskField: "effortDriven"; readonly updateField: "effortDriven"; }, { readonly id: "inactive"; readonly label: "Inactive"; readonly kind: "switch"; readonly taskField: "inactive"; readonly updateField: "inactive"; }, { readonly id: "priority"; readonly label: "Priority"; readonly kind: "number"; readonly taskField: "priority"; readonly updateField: "priority"; readonly min: 0; readonly max: 1000; readonly step: 1; }, { readonly id: "canLevel"; readonly label: "Can Level"; readonly kind: "switch"; readonly taskField: "canLevel"; readonly updateField: "canLevel"; }, { readonly id: "levelingDelayDays"; readonly label: "Leveling Delay"; readonly kind: "number"; readonly taskField: "levelingDelayDays"; readonly updateField: "levelingDelayDays"; readonly min: 0; readonly step: 1; }, { readonly id: "manuallyScheduled"; readonly label: "Manual Scheduling"; readonly kind: "switch"; readonly taskField: "manuallyScheduled"; readonly updateField: "manuallyScheduled"; }, { readonly id: "resourceLabels"; readonly label: "Resources"; readonly kind: "labels"; readonly readonly: true; }, { readonly id: "notes"; readonly label: "Notes"; readonly kind: "textarea"; readonly taskField: "notes"; readonly updateField: "notes"; }];
```

---

### `mapGanttRowsToExcelExport`

Maps projected Gantt task grid rows to spreadsheet-ready row objects.

This function intentionally uses an allowlist of user-facing columns instead
of spreading `GanttGridRow`, because projected rows contain renderer and
timeline layout fields that should never be serialized to Excel.

```ts
export function mapGanttRowsToExcelExport(
  rows: readonly GanttGridRow[],
  project: ProjectSnapshot,
  options: GanttExcelMappingOptions =;
```

---

### `GanttExcelCellValue`

```ts
export type GanttExcelCellValue = string | number | boolean | null;
```

---

### `GanttExcelExportRow`

```ts
interface GanttExcelExportRow {
  readonly Project: string;
  readonly WBS: string;
  readonly 'Task ID': string;
  readonly 'Parent ID': string;
  readonly Name: string;
  readonly 'Task Type': string;
  readonly Status: string;
  readonly 'Start Date': string;
  readonly 'Finish Date': string;
  readonly 'Duration (days)': number | '';
  readonly 'Work (hours)': number | '';
  readonly 'Remaining Duration (days)': number | '';
  readonly '% Complete': string;
  readonly Cost: string | number | '';
  readonly Assignees: string;
  readonly Predecessors: string;
  readonly Successors: string;
  readonly 'Task Mode': string;
  readonly 'Scheduled By': string;
  readonly Constraint: string;
  readonly 'Constraint Date': string;
  readonly Deadline: string;
  readonly 'Actual Start': string;
  readonly 'Actual Finish': string;
  readonly 'Effort Mode': string;
  readonly 'Effort Driven': string;
  readonly Inactive: string;
  readonly Priority: number | '';
  readonly 'Can Level': string;
  readonly 'Leveling Delay (days)': number | '';
  readonly 'Total Slack (days)': number | '';
  readonly Critical: string;
  readonly 'Early Start': string;
  readonly 'Early Finish': string;
  readonly 'Late Start': string;
  readonly 'Late Finish': string;
  readonly 'Start Variance (days)': number | '';
  readonly 'Finish Variance (days)': number | '';
  readonly 'Duration Variance (days)': number | '';
  readonly 'Progress Variance (%)': number | '';
  readonly Calendar: string;
  readonly Tags: string;
  readonly Notes: string;
  readonly 'Scheduling Warnings': string
}
```

---

### `GanttExcelMappingOptions`

```ts
interface GanttExcelMappingOptions {
  /**
     * Resource-planning rows contain load bar metadata rather than task data.
     * They are skipped by default so task exports do not leak timeline layout fields.
     */
    readonly includeResourceRows?: boolean
}
```

---

### `createGanttRoleEditabilityHelpers`

```ts
export function createGanttRoleEditabilityHelpers(
  policy: GanttRoleEditabilityPolicy,
): GanttRoleEditabilityHelpers;
```

---

### `GanttEditableSubject`

```ts
export type GanttEditableSubject = 'task' | 'dependency' | 'assignment';
```

---

### `GanttEditPermission`

```ts
export type GanttEditPermission =
  | '*'
  | `${GanttEditableSubject}:*`
  | `task:${GanttBeforeTaskChangeAction}`
  | `dependency:${GanttBeforeDependencyChangeAction}`
  | `assignment:${GanttBeforeAssignmentChangeAction}`;
```

---

### `GanttRoleId`

```ts
export type GanttRoleId = string;
```

---

### `GanttRoleEditabilityPolicy`

```ts
interface GanttRoleEditabilityPolicy {
  /**
     * Permission list per role. Multiple active roles are merged additively.
     */
    readonly roles: Readonly<Record<GanttRoleId, readonly GanttEditPermission[]>>;
  /**
     * Decision for users with no matching permission. Defaults to `deny`.
     */
    readonly fallback?: 'allow' | 'deny'
}
```

---

### `GanttRoleEditabilityContext`

```ts
interface GanttRoleEditabilityContext {
  readonly roles: readonly GanttRoleId[] | GanttRoleId | null | undefined
}
```

---

### `GanttBeforeChangeEventName`

```ts
export type GanttBeforeChangeEventName =
  | typeof GANTT_BEFORE_TASK_CHANGE_EVENT
  | typeof GANTT_BEFORE_DEPENDENCY_CHANGE_EVENT
  | typeof GANTT_BEFORE_ASSIGNMENT_CHANGE_EVENT;
```

---

### `GanttBeforeChangeDetailByEventName`

```ts
export type GanttBeforeChangeDetailByEventName = {
  readonly [GANTT_BEFORE_TASK_CHANGE_EVENT]: GanttBeforeTaskChangeDetail;
  readonly [GANTT_BEFORE_DEPENDENCY_CHANGE_EVENT]: GanttBeforeDependencyChangeDetail;
  readonly [GANTT_BEFORE_ASSIGNMENT_CHANGE_EVENT]: GanttBeforeAssignmentChangeDetail;
};
```

---

### `GanttRoleEditabilityHelpers`

```ts
interface GanttRoleEditabilityHelpers {
  readonly canEditTask: (
      detail: Pick<GanttBeforeTaskChangeDetail, 'action'>,
      context: GanttRoleEditabilityContext,
    ) => boolean;
  readonly canEditDependency: (
      detail: Pick<GanttBeforeDependencyChangeDetail, 'action'>,
      context: GanttRoleEditabilityContext,
    ) => boolean;
  readonly canEditAssignment: (
      detail: Pick<GanttBeforeAssignmentChangeDetail, 'action'>,
      context: GanttRoleEditabilityContext,
    ) => boolean;
  readonly decide: <TEventName extends GanttBeforeChangeEventName>(
      eventName: TEventName,
      detail: Pick<GanttBeforeChangeDetailByEventName[TEventName], 'action'>,
      context: GanttRoleEditabilityContext,
    ) => boolean
}
```

---

### `createTaskDetailPopoverModel`

Creates a framework-agnostic data model for a task detail popover.

The helper intentionally returns plain sections and fields only. Rendering,
interaction, positioning, and DOM ownership stay with the consuming UI.

```ts
export function createTaskDetailPopoverModel(
  options: CreateTaskDetailPopoverModelOptions,
): TaskDetailPopoverModel;
```

---

### `TaskDetailPopoverFieldKind`

```ts
export type TaskDetailPopoverFieldKind = 'text' | 'date' | 'number' | 'percent' | 'boolean' | 'list' | 'warning';
```

---

### `TaskDetailPopoverFieldValue`

```ts
export type TaskDetailPopoverFieldValue = string | number | boolean | readonly string[] | null;
```

---

### `TaskDetailPopoverField`

```ts
interface TaskDetailPopoverField {
  readonly id: string;
  readonly label: string;
  readonly kind: TaskDetailPopoverFieldKind;
  readonly value: TaskDetailPopoverFieldValue;
  readonly displayValue: string
}
```

---

### `TaskDetailPopoverSection`

```ts
interface TaskDetailPopoverSection {
  readonly id: string;
  readonly title: string;
  readonly fields: readonly TaskDetailPopoverField[]
}
```

---

### `TaskDetailPopoverResourceAssignment`

```ts
interface TaskDetailPopoverResourceAssignment {
  readonly assignmentId: string;
  readonly resourceId: ResourceId;
  readonly resourceName: string;
  readonly role: string;
  readonly allocationPercent: number;
  readonly workHours: number | null;
  readonly responsibility: string;
  readonly displayValue: string
}
```

---

### `TaskDetailPopoverModel`

```ts
interface TaskDetailPopoverModel {
  readonly taskId: string;
  readonly title: string;
  readonly subtitle: string;
  readonly sections: readonly TaskDetailPopoverSection[];
  readonly resourceAssignments: readonly TaskDetailPopoverResourceAssignment[]
}
```

---

### `CreateTaskDetailPopoverModelOptions`

```ts
interface CreateTaskDetailPopoverModelOptions {
  readonly row: GanttGridRow;
  readonly task?: TaskEntity;
  readonly resources?: readonly ResourceEntity[];
  readonly assignments?: readonly AssignmentEntity[]
}
```

---

### `GanttHistoryTool`

Encapsulates Gantt-specific history records that cannot be represented as
ordinary visible-cell edits, such as structural task and dependency snapshots.

```ts
class GanttHistoryTool {
  isHistoryRecord(detail: EventManagerEvent): boolean;

  getTaskSnapshot(): DataType[];

  replaySnapshot(detail: EventManagerEvent): boolean;

  emitTaskSnapshot(previousTasks: readonly DataType[], nextTasks: readonly DataType[]): void;

  emitDependencySnapshot(
    previousDependencies: readonly DependencyEntity[],
    nextDependencies: readonly DependencyEntity[],
  ): void;

  emitAssignmentSnapshot(
    previousAssignments: readonly AssignmentEntity[],
    nextAssignments: readonly AssignmentEntity[],
  ): void;

  emitBaselineSnapshot(
    previousBaselines: readonly BaselineSnapshot[],
    nextBaselines: readonly BaselineSnapshot[],
  ): void;
}
```

---

### `GanttSearchTool`

Owns Gantt free-text search state and keeps tree expansion plus row trimming
synchronized with the current projected grid rows.

```ts
class GanttSearchTool {
  applySearch(query: unknown): void;

  refreshSearch(): void;

  applySearchTrim(): void;

  applyResourceFilterTrim(resourceFilterIds: readonly ResourceId[] | undefined): void;
}
```

---

### `GanttTaskBarsPlugin`

Internal Gantt plugin that owns task-bar runtime state.

The RevoGrid column type still renders task-bar VNodes. This runtime plugin
owns the transient layer around those cells: visible geometry, drag/resize/
split/create/progress controllers, preview overlays, and rejected-state flash.

```ts
class GanttTaskBarsPlugin {
  /**
     * Return the full list of projected task grid rows.
     * @returns Array of {@link GanttGridRow} from the grid data source.
     */
  getProjectedRows(): readonly GanttGridRow[];

  /**
     * Return the projected row for a specific task.
     * @param taskId - The task to look up.
     * @returns The projected row, or `null` if not found.
     */
  getProjectedRow(taskId: TaskId): GanttGridRow | null;

  /**
     * Return projected rows filtered to only rows visible in the current grid runtime.
     * @returns Array of visible {@link GanttGridRow} entries.
     */
  getVisibleProjectedRows(): readonly GanttGridRow[];

  /**
     * Return the viewport frame (top offset and height) for a given row index.
     * @param rowIndex - Virtual row index in the viewport.
     * @returns Row frame coordinates, or `null` if the row is not visible.
     */
  getVisibleRowFrame(rowIndex: number):;

  /**
     * Compute task bar anchor positions for bars visible in the current viewport.
     * @returns Bar anchor geometry for visible task bars only.
     */
  getVisibleTaskBarAnchors(): readonly VisibleTaskBarAnchors[];

  /**
     * Compute visible task bar anchor positions for a specific task.
     * @param taskId - The task to compute anchors for.
     * @returns Bar anchor geometry, or `null` if the task is not visible.
     */
  getVisibleTaskBarAnchor(taskId: TaskId): VisibleTaskBarAnchors | null;

  /**
     * Configure the mutation service and ensure controllers are initialized.
     * @param context - The current gantt coordinator context.
     * @param renderState - The current render state with scheduling data.
     */
  afterRender(context: GanttCoordinatorContext, renderState: GanttRenderState): void;

  /**
     * Route an inline task field edit through the mutation service.
     * @param taskId - The task being edited.
     * @param field - The field name.
     * @param value - The raw editor value.
     * @returns The mutation result.
     */
  handleTaskFieldEdit(taskId: TaskId, field: string, value: unknown): TaskMutationResult;

  /**
     * Apply a task mutation with before-mutation event emission.
     * Emits a cancelable event before applying the mutation.
     * If the event is canceled, the mutation is skipped.
     */
  applyTaskMutation(
    action: GanttBeforeTaskChangeAction,
    mutationFn: () => TaskMutationResult,
    context: GanttCoordinatorContext,
    taskId: TaskId,
    proposedChanges: Partial<TaskEntity>,
  ): void;

  /**
     * Schedule an overlay refresh when the viewport scrolls or resizes.
     * @param context - The current gantt coordinator context.
     */
  onViewportChanged(context: GanttCoordinatorContext): void;

  /** Tear down all controllers, the preview layer, and interaction state. */
  destroy(): void;

  /**
     * Set the current interaction preview and refresh the overlay.
     * @param preview - The preview to display, or `null` to clear.
     * @param context - The current gantt coordinator context.
     */
  setPreview(preview: TimelineInteractionPreview | null, context: GanttCoordinatorContext): void;
}
```

---

### `GanttTaskBarsPluginOptions`

```ts
interface GanttTaskBarsPluginOptions {
  readonly overlayContainer: HTMLElement;
  readonly taskMutationService: DefaultTaskMutationService;
  readonly getSource: () => DataType[];
  readonly getProjectedGridRow: (taskId: TaskId) => DataType | null;
  readonly getVisibleGridRows: () => DataType[];
  readonly readViewport: GanttCoordinatorContext['readViewport'];
  readonly getVisibleGridTaskIds: GanttCoordinatorContext['getGridVisibleTaskIds'];
  readonly getSelectedTaskIds: GanttCoordinatorContext['getSelectedTaskIds'];
  readonly suppressTooltips?: () => () => void
}
```

---

### `GanttTaskBarsRuntime`

```ts
interface GanttTaskBarsRuntime {
  getProjectedRows(): readonly GanttGridRow[];
  getProjectedRow(taskId: TaskId): GanttGridRow | null;
  getVisibleProjectedRows(): readonly GanttGridRow[];
  getVisibleRowFrame(rowIndex: number): { top: number; height: number } | null;
  getVisibleTaskBarAnchors(): readonly VisibleTaskBarAnchors[];
  getVisibleTaskBarAnchor(taskId: TaskId): VisibleTaskBarAnchors | null
}
```

---

### `TaskCreateController`

Pointer-event-based controller for drag-to-create task interactions.

Listens for pointer events on empty gantt cells. When the user drags
beyond a threshold, a task creation preview is rendered. On pointer-up,
the task is committed through the context callback.

```ts
class TaskCreateController {
  /**
     * Remove all event listeners and clean up.
     */
  destroy(): void;
}
```

---

### `CreateControllerContext`

Callback context provided to the {@link TaskCreateController}.

```ts
interface CreateControllerContext {
  /** Whether task creation by drag is currently enabled. */
    isCreateEnabled(): boolean;
  /** Return the current timeline scale. */
    getScale(): TimelineScale | null;
  /** Return the current viewport snapshot. */
    getViewport(): GanttViewportSnapshot | null;
  /** Resolve the parent/insertion position for a new task at the given row. */
    getCreatePlacement(rowIndex: number): { parentId: TaskId | null; insertAfterTaskId: TaskId | null } | null;
  /** Update the interaction preview overlay. */
    setPreview(preview: TimelineInteractionPreview | null): void;
  /** Snap a date to the configured timeline unit. */
    snapDate?(date: string, direction: 'forward' | 'back'): string;
  /** Commit a new task after a successful drag-to-create gesture. */
    commitCreate(
      parentId: TaskId | null,
      startDate: string,
      endDate: string,
      insertAfterTaskId: TaskId | null,
    ): void;
  /** Suppress hover tooltips while a pointer gesture is active. */
    suppressTooltips?(): () => void
}
```

---

### `TaskDragController`

Pointer-event-based controller for drag-to-move task interactions.

Listens for pointer events on task bar elements (excluding resize/progress/dependency handles).
During the drag, renders a move preview. On pointer-up, commits the new start date.
Supports optional date snapping to working days.

```ts
class TaskDragController {
  /**
     * Remove all event listeners and clean up.
     */
  destroy(): void;
}
```

---

### `DragControllerContext`

Callback context provided to the {@link TaskDragController}.

```ts
interface DragControllerContext {
  /** Return the current timeline scale. */
    getScale(): TimelineScale | null;
  /** Return the current viewport snapshot. */
    getViewport(): GanttViewportSnapshot | null;
  /** Return the scheduled task data for a given task ID. */
    getScheduledTask(taskId: TaskId): ScheduledTask | null;
  /** Return the preview bar width for a task. */
    getTaskPreviewWidth(taskId: TaskId): number | null;
  /** Update the interaction preview overlay. */
    setPreview(preview: TimelineInteractionPreview | null): void;
  /** Commit a task move to a new start date. */
    commitMove(taskId: TaskId, newStartDate: string): void;
  /** Snap a date to the nearest working day (optional). */
    snapDate?(date: ISODateString, direction: 'forward' | 'back'): ISODateString;
  /** Clamp a proposed start date to dependency-valid bounds (optional). */
    clampStartDate?(taskId: TaskId, date: ISODateString): ISODateString;
  /** Validate whether a task can be moved to the proposed start date. */
    canMoveTask?(taskId: TaskId, date: ISODateString): boolean;
  /** Suppress hover tooltips while a pointer gesture is active. */
    suppressTooltips?(): () => void
}
```

---

### `TaskResizeController`

Pointer-event-based controller for drag-to-resize task interactions.

Listens for pointer events on resize handle elements within task bars.
During the drag, renders a resize preview snapped to the dragged edge.
On pointer-up, commits the new start/end dates.
Supports optional date snapping to working days.

```ts
class TaskResizeController {
  /**
     * Remove all event listeners and clean up.
     */
  destroy(): void;
}
```

---

### `ResizeControllerContext`

Callback context provided to the {@link TaskResizeController}.

```ts
interface ResizeControllerContext {
  /** Return the current timeline scale. */
    getScale(): TimelineScale | null;
  /** Return the current viewport snapshot. */
    getViewport(): GanttViewportSnapshot | null;
  /** Return the scheduled task data for a given task ID. */
    getScheduledTask(taskId: TaskId): ScheduledTask | null;
  /** Return the virtual row index for a task ID. */
    getRowIndex(taskId: TaskId): number | null;
  /** Return the viewport row frame for a virtual row index. */
    getRowFrame(rowIndex: number): { top: number; height: number } | null;
  /** Update the interaction preview overlay. */
    setPreview(preview: TimelineInteractionPreview | null): void;
  /** Commit a task resize with new start and end dates. */
    commitResize(taskId: TaskId, newStartDate: string, newEndDate: string): void;
  /** Snap a date to the nearest working day (optional). */
    snapDate?(date: ISODateString, direction: 'forward' | 'back'): ISODateString;
  /** Clamp a proposed start date to dependency-valid bounds (optional). */
    clampStartDate?(taskId: TaskId, date: ISODateString): ISODateString;
  /** Suppress hover tooltips while a pointer gesture is active. */
    suppressTooltips?(): () => void
}
```

---

### `TaskSplitController`

```ts
class TaskSplitController {
  destroy(): void;
}
```

---

### `SplitControllerContext`

```ts
interface SplitControllerContext {
  getScale(): TimelineScale | null;
  getViewport(): GanttViewportSnapshot | null;
  getScheduledTask(taskId: TaskId): ScheduledTask | null;
  setPreview(preview: TimelineInteractionPreview | null): void;
  commitCreateSplit(taskId: TaskId, startDate: ISODateString, endDate: ISODateString): void;
  commitMoveSplit(taskId: TaskId, splitIndex: number, startDate: ISODateString): void;
  commitRemoveSplit(taskId: TaskId, splitIndex: number): void;
  suppressTooltips?(): () => void
}
```

---

### `TaskProgressController`

Pointer-event-based controller for drag-to-update-progress interactions.

Listens for pointer events on progress handle elements within task bars.
During the drag, renders a progress preview. On pointer-up, commits
the computed progress percentage.

```ts
class TaskProgressController {
  /**
     * Remove all event listeners and clean up.
     */
  destroy(): void;
}
```

---

### `ProgressControllerContext`

Callback context provided to the {@link TaskProgressController}.

```ts
interface ProgressControllerContext {
  /** Return the current viewport snapshot. */
    getViewport(): GanttViewportSnapshot | null;
  /** Return the scheduled task data for a given task ID. */
    getScheduledTask(taskId: TaskId): ScheduledTask | null;
  /** Return the task bar's left offset and width in pixels. */
    getTaskBarFrame(taskId: TaskId): { left: number; width: number } | null;
  /** Return the virtual row index for a task ID. */
    getRowIndex(taskId: TaskId): number | null;
  /** Return the viewport row frame for a virtual row index. */
    getRowFrame(rowIndex: number): { top: number; height: number } | null;
  /** Update the interaction preview overlay. */
    setPreview(preview: TimelineInteractionPreview | null): void;
  /** Commit a progress update with the new percentage. */
    commitProgress(taskId: TaskId, progressPercent: number): void;
  /** Suppress hover tooltips while a pointer gesture is active. */
    suppressTooltips?(): () => void
}
```

---

### `TimelinePreviewLayer`

Preact-based overlay layer that renders a ghost preview bar during
task move, resize, create, and progress interactions.

Mounts into a container element and re-renders when the preview changes.

```ts
class TimelinePreviewLayer {
  /**
     * Attach the overlay root element to the container DOM.
     * No-op if already mounted.
     */
  mount(): void;

  /** Remove the overlay from the DOM and clean up. */
  destroy(): void;

  /**
     * Update the viewport frame dimensions.
     * @param frame - New width and height.
     */
  setFrame(frame: TimelinePreviewFrame): void;

  /**
     * Render the interaction preview, or clear if `null`.
     * @param preview - The preview to render, or `null` to hide.
     */
  render(preview: TimelineInteractionPreview | null): void;
}
```

---

### `TimelineInteractionPreview`

Snapshot of a task interaction preview (move, resize, create, or progress).

```ts
interface TimelineInteractionPreview {
  /** Task ID being interacted with, or `null` for create previews. */
    readonly taskId: string | null;
  /** Virtual row index in the grid. */
    readonly rowIndex: number;
  /** Type of interaction being previewed. */
    readonly kind: 'move' | 'resize' | 'create' | 'progress';
  /** Bar visual kind (task or milestone). */
    readonly barKind: Exclude<GanttBarKind, 'summary'>;
  /** Left offset in pixels relative to the viewport. */
    readonly left: number;
  /** Width of the preview bar in pixels. */
    readonly width: number;
  /** Top offset in pixels (row center). */
    readonly top: number;
  /** Row height in pixels. */
    readonly height: number;
  /** Width of the progress fill, for progress previews. */
    readonly progressWidth?: number;
  /** Whether the preview represents a valid state. */
    readonly valid: boolean
}
```

---

### `TimelinePreviewFrame`

Viewport frame dimensions for the preview overlay.

```ts
interface TimelinePreviewFrame {
  /** Width of the viewport in pixels. */
    readonly width: number;
  /** Height of the viewport in pixels. */
    readonly height: number
}
```

---

### `createMoveDraft`

Compute a draft range for a task move interaction.

**@param** scale - Current timeline scale.
 *
**@param** scrollLeft - Horizontal scroll offset.
 *
**@param** originalBarLeft - Original bar left position in content coordinates.
 *
**@param** originContentX - Pointer X at drag start in content coordinates.
 *
**@param** pointerContentX - Current pointer X in content coordinates.
 *
**@param** width - Bar width in pixels.
 *
**@returns** A {@link TimelineDraftRange} with the projected date range.

```ts
export function createMoveDraft(
  scale: TimelineScale,
  scrollLeft: number,
  originalBarLeft: number,
  originContentX: number,
  pointerContentX: number,
  width: number,
): TimelineDraftRange;
```

---

### `createResizeDraft`

Compute a draft range for a task resize interaction.

**@param** scale - Current timeline scale.
 *
**@param** scrollLeft - Horizontal scroll offset.
 *
**@param** edge - Which edge is being dragged (`'start'` or `'end'`).
 *
**@param** originalLeft - Original bar left in content coordinates.
 *
**@param** originalRight - Original bar right in content coordinates.
 *
**@param** pointerContentX - Current pointer X in content coordinates.
 *
**@returns** A {@link TimelineDraftRange} with the projected date range.

```ts
export function createResizeDraft(
  scale: TimelineScale,
  scrollLeft: number,
  edge: 'start' | 'end',
  originalLeft: number,
  originalRight: number,
  pointerContentX: number,
): TimelineDraftRange;
```

---

### `createTaskDraft`

Compute a draft range for a task create interaction.

**@param** scale - Current timeline scale.
 *
**@param** scrollLeft - Horizontal scroll offset.
 *
**@param** originContentX - Pointer X at drag start in content coordinates.
 *
**@param** pointerContentX - Current pointer X in content coordinates.
 *
**@returns** A {@link TimelineDraftRange} with the projected date range.

```ts
export function createTaskDraft(
  scale: TimelineScale,
  scrollLeft: number,
  originContentX: number,
  pointerContentX: number,
): TimelineDraftRange;
```

---

### `createProgressDraft`

Compute a draft state for a progress-drag interaction.

**@param** barLeft - Bar left position in content coordinates.
 *
**@param** barWidth - Bar width in pixels.
 *
**@param** scrollLeft - Horizontal scroll offset.
 *
**@param** pointerContentX - Current pointer X in content coordinates.
 *
**@returns** A {@link TimelineProgressDraft} with the computed progress.

```ts
export function createProgressDraft(
  barLeft: number,
  barWidth: number,
  scrollLeft: number,
  pointerContentX: number,
): TimelineProgressDraft;
```

---

### `TimelineDraftRange`

Draft range computed during a task move, resize, or create interaction.

```ts
interface TimelineDraftRange {
  /** Start date in ISO format. */
    readonly startDate: ISODateString;
  /** End date in ISO format. */
    readonly endDate: ISODateString;
  /** Left offset in pixels relative to the viewport. */
    readonly left: number;
  /** Width of the draft bar in pixels. */
    readonly width: number;
  /** Whether the draft represents a valid date range. */
    readonly valid: boolean
}
```

---

### `TimelineProgressDraft`

Draft state computed during a progress-drag interaction.

```ts
interface TimelineProgressDraft {
  /** Left offset of the bar in pixels relative to the viewport. */
    readonly left: number;
  /** Full bar width in pixels. */
    readonly width: number;
  /** Width of the progress fill in pixels. */
    readonly progressWidth: number;
  /** Computed progress as a 0–100 integer percentage. */
    readonly progressPercent: number;
  /** Whether the draft is valid (always `true` for progress). */
    readonly valid: boolean
}
```

---

### `GanttTaskSelectionTool`

Owns task selection state that is driven by grid focus and task-bar focus.

The main Gantt plugin keeps command routing and persistence; this tool keeps
selected task id and bar focus/click listeners synchronized with renderer state.

```ts
class GanttTaskSelectionTool {
  setup(context: GanttCoordinatorContext): void;

  afterRender(context: GanttCoordinatorContext): void;

  getSelectedTaskId(): TaskId | null;

  getSelectedTaskIds(): readonly TaskId[];

  selectTask(taskId: TaskId | null, options:;

  selectTasks(taskIds: readonly TaskId[], options:;

  clearSelection(): void;

  destroy(): void;
}
```

---

### `DefaultTaskMutationService`

Service that handles task CRUD operations, field updates, and hierarchy changes.

Manages task creation, movement, resizing, progress updates, indent/outdent,
and inline field edits. Respects calendar-aware working day constraints
when `excludeHolidaysFromDuration` is enabled.

```ts
class DefaultTaskMutationService {
  /**
     * Configure the service with the current project and scheduling state.
     * Must be called after each render cycle.
     * @param project - Current project snapshot.
     * @param taskStore - Task store for reads and writes.
     * @param scheduledTasksById - Map of scheduled task results from the engine.
     * @param options - Optional scheduling config (e.g. holiday exclusion).
     */
  configure(
    project: ProjectSnapshot,
    taskStore: TaskStore,
    scheduledTasksById: ReadonlyMap<TaskId, ScheduledTask>,
    options?: GanttPluginConfig['scheduling'],
    assignmentStore?: AssignmentStore,
    readOnly = false,
    labels?: GanttPluginConfig['labels'],
    interactionOptions?: Pick<GanttPluginConfig, 'timelinePrecision' | 'snap'>,
  ): void;

  /**
     * Snap a date to the nearest working day in the primary calendar.
     * No-op when holiday exclusion is disabled.
     * @param date - The date to snap.
     * @param direction - Search direction (`'forward'` or `'back'`).
     * @returns The snapped date, or the original if already on a working day.
     */
  snapToWorkingDate(date: ISODateString, direction: 'forward' | 'back' = 'forward'): ISODateString;

  /**
     * Snap a timeline interaction boundary using Gantt precision and calendar options.
     * Day mode keeps the historic working-day behavior; hour mode preserves UTC datetime precision.
     */
  snapTimelineDate(
    date: ISODateString,
    direction: 'forward' | 'back' = 'forward',
    defaultUnit?: NonNullable<GanttPluginConfig['snap']>['unit'],
  ): ISODateString;

  /**
     * Clamp a proposed task start to the earliest dependency-valid date.
     * Manually scheduled tasks are returned unchanged so violations can be shown
     * as warnings by the scheduler instead of silently changing authored dates.
     */
  clampTaskStartDate(taskId: TaskId, proposedStartDate: ISODateString): ISODateString;

  /**
     * Resolve a single inline grid edit into an internal task patch without
     * mutating the task store.
     * @param taskId - The task to update.
     * @param field - The field name.
     * @param value - The raw editor value.
     * @returns Resolved patch or validation failure.
     */
  resolveTaskFieldPatch(taskId: TaskId, field: string, value: unknown): TaskFieldPatchResolution;

  /**
     * Update a single task field from an inline grid editor.
     * Delegates to {@link resolveTaskEdit} for field resolution.
     * @param taskId - The task to update.
     * @param field - The field name.
     * @param value - The raw editor value.
     * @returns Mutation result.
     */
  updateTaskField(taskId: TaskId, field: string, value: unknown): TaskMutationResult;

  /**
     * Apply a partial update patch to a task.
     * Validates dates, duration, and calendar constraints.
     * @param taskId - The task to update.
     * @param patch - Partial task update fields.
     * @returns Mutation result.
     */
  updateTaskPatch(
    taskId: TaskId,
    patch: TaskUpdate,
    options: TaskPatchUpdateOptions =;

  /**
     * Convert a regular leaf task into a zero-duration milestone.
     * @param taskId - The task to convert.
     * @returns Mutation result.
     */
  convertTaskToMilestone(taskId: TaskId): TaskMutationResult;

  /**
     * Update a task's progress percentage.
     * Clamps the value to 0–100.
     * @param taskId - The task to update.
     * @param progressPercent - New progress value.
     * @returns Mutation result.
     */
  updateTaskProgress(taskId: TaskId, progressPercent: number): TaskMutationResult;

  /**
     * Create a split range inside a task span.
     * @param taskId - The task receiving the split.
     * @param splitStartDate - Split start date.
     * @param splitEndDate - Split end date.
     * @returns Mutation result.
     */
  createTaskSplit(
    taskId: TaskId,
    splitStartDate: ISODateString,
    splitEndDate: ISODateString,
  ): TaskMutationResult;

  /**
     * Move an existing split range while preserving its duration.
     * @param taskId - The task containing the split.
     * @param splitIndex - Zero-based split index after normalization.
     * @param nextStartDate - New split start date.
     * @returns Mutation result.
     */
  moveTaskSplit(
    taskId: TaskId,
    splitIndex: number,
    nextStartDate: ISODateString,
  ): TaskMutationResult;

  /**
     * Remove an existing split range.
     * @param taskId - The task containing the split.
     * @param splitIndex - Zero-based split index after normalization.
     * @returns Mutation result.
     */
  removeTaskSplit(taskId: TaskId, splitIndex: number): TaskMutationResult;

  /**
     * Move a task to a new start date on the timeline.
     * Summary tasks cannot be moved directly.
     * @param taskId - The task to move.
     * @param newStartDate - The new start date.
     * @returns Mutation result.
     */
  moveTask(
    taskId: TaskId,
    newStartDate: ISODateString,
    scheduledTasksById: ReadonlyMap<TaskId, ScheduledTask> = this.scheduledTasksById,
  ): TaskMutationResult;

  /**
     * Validate and resolve a task timeline move without mutating the task store.
     * @param taskId - The task to move.
     * @param newStartDate - Proposed new start date.
     * @param scheduledTasksById - Optional proposed schedule snapshot for bulk moves.
     * @returns A resolved patch when valid, or a mutation failure.
     */
  validateMoveTask(
    taskId: TaskId,
    newStartDate: ISODateString,
    scheduledTasksById: ReadonlyMap<TaskId, ScheduledTask> = this.scheduledTasksById,
  ): TaskMutationFailure |;

  /**
     * Resize a task by setting new start and end dates.
     * Recomputes duration using calendar-aware working days when applicable.
     * @param taskId - The task to resize.
     * @param newStartDate - The new start date.
     * @param newEndDate - The new end date.
     * @returns Mutation result.
     */
  resizeTask(
    taskId: TaskId,
    newStartDate: ISODateString,
    newEndDate: ISODateString,
  ): TaskMutationResult;

  /**
     * Create a new task with the given date range and optional parent.
     * Validates dates, calendar constraints, and parent existence.
     * @param parentId - Parent task ID for hierarchy, or `null` for root.
     * @param payload - Start/end dates and optional name.
     * @param placement - Optional insertion position.
     * @returns Mutation result with the new task ID.
     */
  createTask(
    parentId: TaskId | null,
    payload: TaskCreatePayload,
    placement?: TaskCreatePlacement,
  ): TaskMutationResult;

  /**
     * Indent a task, making it a child of the previous sibling task.
     * Moves the task and all its descendants.
     * @param taskId - The task to indent.
     * @returns Mutation result.
     */
  indentTask(taskId: TaskId): TaskMutationResult;

  /**
     * Outdent a task, promoting it to a sibling of its current parent.
     * Moves the task and all its descendants.
     * @param taskId - The task to outdent.
     * @returns Mutation result.
     */
  outdentTask(taskId: TaskId): TaskMutationResult;

  /**
     * Delete a task and all of its descendants.
     * Removes assignments for deleted tasks and normalizes WBS codes for the remaining tree.
     * @param taskId - The root task of the subtree to delete.
     * @returns Mutation result.
     */
  deleteTask(taskId: TaskId): TaskMutationResult;
}
```

---

### `createTaskMutationService`

Factory function to create a new {@link DefaultTaskMutationService} instance.

**@returns** A new task mutation service.

```ts
export function createTaskMutationService();
```

---

### `TaskMutationResult`

Discriminated union result of a task mutation — either success or failure.

```ts
/** Discriminated union result of a task mutation — either success or failure. */
export type TaskMutationResult = TaskMutationSuccess | TaskMutationFailure;
```

---

### `TaskCreatePayload`

Payload describing the date range and optional name for a new task.

```ts
interface TaskCreatePayload {
  /** Start date in ISO format. */
    readonly startDate: ISODateString;
  /** End date in ISO format. */
    readonly endDate: ISODateString;
  /** Optional task name (auto-generated if omitted). */
    readonly name?: string
}
```

---

### `resolveConvertTaskToMilestonePatch`

```ts
export function resolveConvertTaskToMilestonePatch(
  task: TaskEntity,
  taskStore: TaskStore | null,
): TaskMilestonePatchResolution;
```

---

### `TimelineTool`

Gantt feature tool that manages timeline zoom levels and visible date range.

Wraps a {@link TimelineZoomController} and provides public methods for
programmatic zoom, level queries, and anchor-preserving zoom transitions.

```ts
class TimelineTool {
  /**
     * Set up empty-timeline drag panning.
     * @param context - The current gantt coordinator context.
     */
  setup(context: GanttCoordinatorContext): void;

  /**
     * React to config changes by updating the zoom controller preset.
     * @param context - The current gantt coordinator context.
     */
  onConfigChange(context: GanttCoordinatorContext): void;

  /**
     * Synchronize the visible date range after a render cycle.
     * @param context - The current gantt coordinator context.
     * @param _renderState - The current render state (unused).
     */
  afterRender(context: GanttCoordinatorContext, _renderState: GanttRenderState): void;

  /**
     * Handle horizontal scroll events to update the visible date range.
     * @param detail - The scroll event detail from the grid.
     * @param context - The current gantt coordinator context.
     */
  onViewportScroll(detail: ViewPortScrollEvent<MultiDimensionType>, context: GanttCoordinatorContext): void;

  /** Return the current zoom level descriptor. */
  getZoomLevel();

  /** Whether zooming in is possible (not at the finest level). */
  canZoomIn();

  /** Whether zooming out is possible (not at the coarsest level). */
  canZoomOut();

  /** Return the currently visible date range. */
  getVisibleRange();

  /**
     * Whether a timeline wheel gesture matches the configured zoom trigger.
     * @param event - Native wheel event from the grid.
     * @returns `true` when the gesture should be consumed by timeline zoom handling.
     */
  shouldHandleWheel(event: WheelEvent): boolean;

  /**
     * Handle a timeline wheel gesture if it matches the configured zoom trigger.
     * @param event - Native wheel event from the grid.
     * @param context - The current gantt coordinator context.
     * @returns `true` when the gesture changed the zoom level.
     */
  handleWheel(event: WheelEvent, context: GanttCoordinatorContext): boolean;

  /**
     * Zoom in one level.
     * @param context - The current gantt coordinator context.
     * @returns `true` if zoom was applied.
     */
  zoomIn(context: GanttCoordinatorContext, pointerEvent?: Pick<MouseEvent, 'clientX'>): boolean;

  /**
     * Zoom out one level.
     * @param context - The current gantt coordinator context.
     * @returns `true` if zoom was applied.
     */
  zoomOut(context: GanttCoordinatorContext, pointerEvent?: Pick<MouseEvent, 'clientX'>): boolean;

  /**
     * Set a specific zoom level by ID.
     * @param levelId - The zoom level identifier.
     * @param context - The current gantt coordinator context.
     * @returns `true` if zoom was applied.
     */
  setZoomLevel(levelId: string, context: GanttCoordinatorContext): boolean;

  /** Return the current zoom controller configuration. */
  getConfig();

  destroy(): void;

  syncVisibleDateRange(context: GanttCoordinatorContext): boolean;
}
```

---

### `CalendarTool`

Gantt feature tool that provides calendar context to other tools.

Resolves the primary project calendar from the project snapshot.
Used by timeline background rendering to determine non-working time shading.

```ts
class CalendarTool {
  destroy(): void;

  /**
     * Return the primary project calendar entity.
     * @param context - The current gantt coordinator context.
     * @returns The primary calendar, or `null` if no project is loaded.
     */
  getPrimaryCalendar(context: GanttCoordinatorContext): CalendarEntity | null;
}
```

---

### `createGanttColumnType`

Create a RevoGrid column type that renders the gantt timeline header and task bars.

The returned column type provides a `columnTemplate` that draws the multi-row
timeline header cells and a `cellTemplate` that renders the task bar (regular,
milestone, or summary) with progress, dependency handles, and baseline overlays.

**@param** getTimeline - Accessor returning the current timeline view model, or
 *   `undefined` when no timeline has been computed yet.
 *
**@returns** A read-only `ColumnType` suitable for use in `revogrid.columnTypes`.

```ts
export function createGanttColumnType(
  getTimeline: () => GanttTimelineViewModel | undefined,
  getVisuals: () => GanttVisualConfig | undefined = () => undefined,
  getProject: () => GanttPluginConfig | null | undefined = () => undefined,
  hasTooltipPlugin: () => boolean = () => false,
  getSelectedTaskId: () => TaskId | null = () => null,
): ColumnType;
```

---

### `OverlayKind`

Discriminator for the category of overlay rendered on the gantt chart.

```ts
/** Discriminator for the category of overlay rendered on the gantt chart. */
export type OverlayKind = 'selection' | 'baseline' | 'dependency' | 'annotation';
```

---

### `OverlayDescriptor`

Describes a single overlay element rendered on top of the gantt chart.

```ts
interface OverlayDescriptor {
  /** Unique identifier for this overlay instance. */
    readonly id: string;
  /** The category of overlay (selection, baseline, dependency, or annotation). */
    readonly kind: OverlayKind;
  /** The task this overlay is associated with, if any. */
    readonly taskId?: TaskId;
  /** Whether the overlay is currently visible. */
    readonly visible: boolean;
  /** CSS z-index controlling stacking order among overlays. */
    readonly zIndex: number;
  /** Optional anchor point in viewport coordinates for positioning. */
    readonly anchor?: ViewportPoint
}
```

---

### `OverlayManager`

Registry for managing overlay elements displayed over the gantt chart.

Implementations are responsible for tracking overlay descriptors and
providing ordered access for the rendering layer.

```ts
interface OverlayManager {
  /** Return all registered overlay descriptors in display order. */
    list(): readonly OverlayDescriptor[];
  /** Register a new overlay or replace an existing one with the same id. */
    register(descriptor: OverlayDescriptor): void;
  /** Remove an overlay by its unique id. */
    unregister(overlayId: string): void;
  /** Remove all registered overlays. */
    clear(): void
}
```

---

### `GanttViewportFrame`

Dimensions and position of the gantt viewport element.

```ts
interface GanttViewportFrame {
  /** Pixel width of the viewport. */
    readonly width: number;
  /** Pixel height of the viewport. */
    readonly height: number;
  /** Left offset of the viewport content area relative to the page. */
    readonly clientLeft: number;
  /** Top offset of the viewport content area relative to the page. */
    readonly clientTop: number
}
```

---

### `GanttViewportScrollState`

Current scroll offsets of the gantt viewport.

```ts
interface GanttViewportScrollState {
  /** Horizontal scroll offset in pixels. */
    readonly scrollLeft: number;
  /** Vertical scroll offset in pixels. */
    readonly scrollTop: number
}
```

---

### `GanttViewportSnapshot`

Point-in-time snapshot of the gantt viewport's geometry, scroll position,
DOM element reference, and currently visible rows.

```ts
interface GanttViewportSnapshot {
  /** Viewport dimensions and position. */
    readonly frame: GanttViewportFrame;
  /** Current scroll offsets. */
    readonly scroll: GanttViewportScrollState;
  /** The underlying DOM element of the gantt viewport. */
    readonly element: HTMLElement;
  /** The virtual row items currently visible in the viewport. */
    readonly visibleRows: readonly VirtualPositionItem[]
}
```

---

### `GridUpdateMode`

Describes how deeply the grid must be updated after a render cycle.

- `'none'` — no grid update needed.
- `'viewport'` — only the existing gantt viewport/header needs repainting.
- `'data'` — only row data payloads changed (in-place update).
- `'structure'` — row count or order changed (full data refresh).
- `'columns'` — task-table column schema changed.

```ts
/**
 * Describes how deeply the grid must be updated after a render cycle.
 *
 * - `'none'` — no grid update needed.
 * - `'viewport'` — only the existing gantt viewport/header needs repainting.
 * - `'data'` — only row data payloads changed (in-place update).
 * - `'structure'` — row count or order changed (full data refresh).
 * - `'columns'` — task-table column schema changed.
 */
export type GridUpdateMode = 'none' | 'viewport' | 'data' | 'structure' | 'columns';
```

---

### `GanttRenderContributions`

Contributions a feature tool can provide before each render pass.

```ts
interface GanttRenderContributions {
  /** Additional options influencing how task rows are projected. */
    readonly projectionOptions: TaskRowProjectionOptions
}
```

---

### `GanttToolGridEventMap`

Map of internal grid events that feature tools can subscribe to.

```ts
interface GanttToolGridEventMap {
  readonly viewportscroll: { detail: ViewPortScrollEvent };
  readonly gridedit: { detail: EventManagerEvent };
  readonly beforecellfocus: { previousTaskId: TaskId | null; taskId: TaskId };
  readonly keydown: { event: KeyboardEvent };
  readonly wheel: { event: WheelEvent };
  readonly aftersourceset: Record<string, never>;
  readonly contentsizechanged: Record<string, never>
}
```

---

### `GanttRenderState` (Extended from `index.ts`)

Extended render result that includes the update mode indicating what
changed since the previous frame.

```ts
interface GanttRenderState {
  /** How deeply the grid was updated during this render. */
    readonly updateMode: GridUpdateMode
}
```

---

### `GanttCoordinatorContext`

Central context object passed to every gantt feature tool.

Provides read access to the gantt project state, scheduling results,
timeline model, and viewport geometry. Also exposes mutation helpers
for row data, scrolling, and event dispatch.

```ts
interface GanttCoordinatorContext {
  getConfig(): GanttPluginConfig | null;
  getResolvedProjectSnapshot(): ProjectSnapshot | null;
  getSchedulingResult(): SchedulingResult | null;
  getCurrentScale(): GanttGridRenderResult['scaleConfig']['scale'] | null;
  getTimeline(): GanttTimelineViewModel | null;
  canZoomIn(): boolean;
  canZoomOut(): boolean;
  setTimelineVisibleRange(
      visibleRange: TimelineVisibleDateRange,
      visibleHeaderRows?: GanttTimelineViewModel['visibleHeaderRows'],
    ): void;
  setTimelineFlagLines(lines: readonly TimelineFlagLine[]): void;
  setTimelineNonWorkingHeaderRanges(ranges: GanttTimelineViewModel['nonWorkingHeaderRanges']): void;
  setTimelineTaskInteractionRange(range: GanttTimelineViewModel['activeTaskInteractionRange']): void;
  getTaskStore(): TaskStore;
  getTaskRowPatchContext(taskId: TaskId | null, patch: Partial<TaskEntity>): GanttSourcePatchContext;
  getSelectedTaskId(): TaskId | null;
  getResourceStore(): ResourceStore;
  getAssignmentStore(): AssignmentStore;
  getDependencies(): readonly DependencyEntity[];
  getDependenciesById(): ReadonlyMap<DependencyId, DependencyEntity>;
  getProjectedRows(): readonly GanttGridRow[];
  getProjectedRow(taskId: TaskId): GanttGridRow | null;
  getVisibleProjectedRows(): readonly GanttGridRow[];
  getVisibleRowFrame(rowIndex: number): { top: number; height: number } | null;
  getVisibleTaskBarAnchor(taskId: TaskId): VisibleTaskBarAnchors | null;
  getGridVisibleTaskIds(): ReadonlySet<TaskId>;
  getGridVirtualRowIndex(taskId: TaskId): number | null;
  getSelectedTaskIds(): readonly TaskId[];
  selectTasks(taskIds: readonly TaskId[], options?: { refresh?: boolean; updateMode?: GridUpdateMode }): void;
  validateTaskMutation(action: GanttBulkTaskAction, taskIds: readonly TaskId[], options?: { startDate?: string }): GanttBulkActionValidation;
  readViewport(): GanttViewportSnapshot | null;
  requestRender(updateMode?: GridUpdateMode): GanttGridRenderResult | null;
  refreshTimelineColumns(totalWidth: number): void;
  refreshTimelineViewport(): void;
  applyRowData(rows: readonly DataType[]): void;
  applyRows(rows: readonly DataType[]): void;
  createTask(options?: GanttCreateTaskOptions): TaskId | null;
  indentTasks?(taskIds?: readonly TaskId[]): readonly TaskId[];
  outdentTasks?(taskIds?: readonly TaskId[]): readonly TaskId[];
  deleteTasks?(taskIds?: readonly TaskId[]): readonly TaskId[];
  convertTasksToMilestones?(taskIds?: readonly TaskId[]): readonly TaskId[];
  scrollTo(position: { x?: number; y?: number }): void;
  scrollToX(x: number): Promise<void>;
  emit<T>(eventName: string, detail: T): void;
  /**
     * Emit a cancelable event before a mutation.
     * Returns true if the mutation should proceed (event was not canceled),
     * false if the event was canceled via preventDefault().
     */
    emitCancelable<T>(eventName: string, detail: T): boolean
}
```

---

### `GanttFeatureTool`

Lifecycle interface for a gantt feature tool.

Feature tools participate in the gantt render cycle and can react to
grid events. Each tool is set up once, receives before/after render
callbacks, and is destroyed when the plugin is torn down.

```ts
interface GanttFeatureTool {
  setup?(context: GanttCoordinatorContext): void;
  beforeRender?(context: GanttCoordinatorContext): Partial<GanttRenderContributions> | void;
  afterRender?(context: GanttCoordinatorContext, renderState: GanttRenderState): void;
  onConfigChange?(context: GanttCoordinatorContext): void;
  onGridEvent?<T extends keyof GanttToolGridEventMap>(
      eventName: T,
      payload: GanttToolGridEventMap[T],
      context: GanttCoordinatorContext,
    ): boolean | void;
  destroy(): void
}
```

---

### `DependencyPreviewState`

Transient state describing in-progress dependency drawing and
hover/selection highlights.

```ts
interface DependencyPreviewState {
  /** The draft dependency being drawn by the user, if any. */
    readonly draft: DependencyDragPreview | null;
  /** The id of the dependency currently under the pointer. */
    readonly hoveredDependencyId: DependencyId | null;
  /** The id of the dependency that is actively selected. */
    readonly selectedDependencyId: DependencyId | null
}
```

---

### `readGanttViewportFrame`

Read the visible gantt data viewport frame from the rendered scroll host.

RevoGrid dimension stores describe the scrollable content size for pinned
columns and rows. Gantt overlays need the live visible panel instead,
especially when the vertical virtual scrollbar appears and changes the
flex layout after a render pass.

```ts
export function readGanttViewportFrame(viewportScroll: HTMLElement): GanttViewportSnapshot['frame'];
```

---

### `readGanttViewportScroll`

Read the live scroll offsets from the rendered gantt viewport.

Provider viewport stores can lag native scroll state because core throttles
scroll propagation. Pointer interactions need the current DOM position so
date and dependency coordinates match what is under the cursor.

```ts
export function readGanttViewportScroll(
  viewportScroll: HTMLElement,
  fallback: GanttViewportSnapshot['scroll'],
): GanttViewportSnapshot['scroll'];
```

---

### `getContentX`

Convert a pointer event's client X coordinate to a content-space X
coordinate within the gantt viewport.

Accounts for the viewport's current horizontal scroll offset and the
element's left edge position.

**@param** event - The pointer event providing the `clientX` value.
 *
**@param** viewport - A snapshot of the gantt viewport geometry and scroll state.
 *
**@returns** The X position in content (scrollable) coordinates.

```ts
export function getContentX(event: PointerEvent, viewport: GanttViewportSnapshot): number;
```

---

### `getViewportX`

Convert a pointer event's client X coordinate to viewport-relative pixels.

Use this for overlays pinned to the visible gantt viewport. Content-space
coordinates should still use {@link getContentX}.

```ts
export function getViewportX(event: PointerEvent, viewport: GanttViewportSnapshot): number;
```

---

### `getViewportRowCenterY`

Return the vertical center of a virtual row in viewport-relative pixels.

RevoGrid virtual row starts are content-space coordinates, while Gantt
overlays render in the visible viewport coordinate space.

```ts
export function getViewportRowCenterY(
  row: VirtualPositionItem,
  viewport: GanttViewportSnapshot,
): number;
```

---

### `ViewportPoint`

A point in viewport-relative coordinates.

```ts
interface ViewportPoint {
  /** Horizontal pixel coordinate. */
    readonly x: number;
  /** Vertical pixel coordinate. */
    readonly y: number
}
```

---

### `ViewportRect` (Extended from `index.ts`)

A rectangle in viewport-relative coordinates.

```ts
interface ViewportRect {
  /** Width of the rectangle in pixels. */
    readonly width: number;
  /** Height of the rectangle in pixels. */
    readonly height: number
}
```

---

### `GridViewport`

Describes the current scroll position and dimensions of the grid viewport.

```ts
interface GridViewport {
  /** Current horizontal scroll offset in pixels. */
    readonly scrollLeft: number;
  /** Current vertical scroll offset in pixels. */
    readonly scrollTop: number;
  /** Width of the visible viewport in pixels. */
    readonly width: number;
  /** Height of the visible viewport in pixels. */
    readonly height: number;
  /** Uniform row height in pixels. */
    readonly rowHeight: number
}
```

---

### `DependencyAnchorSide`

Side of a task bar where a dependency link attaches.

```ts
/** Side of a task bar where a dependency link attaches. */
export type DependencyAnchorSide = 'start' | 'end';
```

---

### `ViewportMapper`

Maps task identifiers to viewport-relative rectangles and dependency anchor points.

```ts
interface ViewportMapper {
  /**
     * Returns the viewport-relative bounding rectangle of a task bar.
     *
     * @param taskId - The task to look up.
     * @param viewport - Current grid viewport state.
     * @returns The bounding rect, or `null` if the task is not visible.
     */
    getTaskRect(taskId: TaskId, viewport: GridViewport): ViewportRect | null;
  /**
     * Returns the dependency anchor point on the specified side of a task bar.
     *
     * @param taskId - The task to look up.
     * @param side - Which side of the bar to anchor to.
     * @param viewport - Current grid viewport state.
     * @returns The anchor point, or `null` if the task is not visible.
     */
    getDependencyAnchor(
      taskId: TaskId,
      side: DependencyAnchorSide,
      viewport: GridViewport,
    ): ViewportPoint | null
}
```

---

### `formatLabel`

```ts
export function formatLabel(value: string): string;
```

---

### `getInitials`

```ts
export function getInitials(name: string): string;
```

---

### `getAssigneeColor`

```ts
export function getAssigneeColor(resourceId: ResourceId): string;
```

---

### `getAllocationPercent`

```ts
export function getAllocationPercent(allocationUnits: number): number;
```

---

### `getAllocationCostUnits`

```ts
export function getAllocationCostUnits(allocationUnits: number): number;
```

---

### `buildAssignmentsByTaskId`

```ts
export function buildAssignmentsByTaskId(
  assignmentStore: AssignmentStore,
  resourceStore: ResourceStore,
): Map<TaskId, TaskGridAssignee[]>;
```

---

### `buildDiagnosticsByTaskId`

```ts
export function buildDiagnosticsByTaskId(
  conflicts: readonly SchedulerConflict[] = [],
  issues: readonly SchedulerIssue[] = [],
): Map<TaskId, string[]>;
```

---

### `createResourcePlanningRows`

```ts
export function createResourcePlanningRows(
  project: ProjectSnapshot,
  scale: TimelineScale,
  scheduledTasksById: ReadonlyMap<TaskId, ScheduledTask>,
  resourceStore: ResourceStore,
  assignmentStore: AssignmentStore,
  options: GanttResourcePlanningConfig,
): readonly GanttGridRow[];
```

---

### `RESOURCE_ROW_PROJECT_ID`

```ts
RESOURCE_ROW_PROJECT_ID: string;
```

---

### `createCostFormatter`

```ts
export function createCostFormatter(currency: unknown): Intl.NumberFormat;
```

---

### `buildTaskCostMap`

```ts
export function buildTaskCostMap(
  taskStore: TaskStore,
  resourceStore: ResourceStore,
  assignmentStore: AssignmentStore,
  scheduledTasksById: ReadonlyMap<TaskId, ScheduledTask>,
  calendars: readonly CalendarEntity[],
): ReadonlyMap<TaskId, number>;
```

---

### `resolveBaselineSnapshot`

```ts
export function resolveBaselineSnapshot(
  project: ProjectSnapshot,
  showBaseline = true,
  baselineId?: BaselineId,
): ReadonlyMap<TaskId, BaselineTaskSnapshot>;
```

---

### `createGanttGridRow`

```ts
export function createGanttGridRow(input: CreateGanttGridRowInput): GanttGridRow;
```

---

### `OrderedTaskRow`

```ts
export type OrderedTaskRow = ReturnType<TaskStore['getOrderedRows']>[number];
```

---

### `CreateGanttGridRowInput`

```ts
interface CreateGanttGridRowInput {
  readonly row: OrderedTaskRow;
  readonly scheduledTask: ScheduledTask;
  readonly scale: TimelineScale;
  readonly options: TaskRowProjectionOptions;
  readonly wbs: string;
  readonly assigneeDetails: readonly TaskGridAssignee[];
  readonly cost: number;
  readonly formattedCost: string;
  readonly dependencyLabels: { readonly predecessors: string; readonly successors: string } | undefined;
  readonly baseline: BaselineTaskSnapshot | undefined;
  readonly schedulingWarnings: readonly string[]
}
```

---

### `createTaskStatusIndicators`

```ts
export function createTaskStatusIndicators(input: CreateTaskStatusIndicatorsInput): TaskStatusIndicatorProjection;
```

---

### `TaskStatusIndicatorKind`

```ts
export type TaskStatusIndicatorKind = 'read-only-project' | 'locked-task';
```

---

### `TaskStatusIndicator`

```ts
interface TaskStatusIndicator {
  readonly id: string;
  readonly kind: TaskStatusIndicatorKind;
  readonly label: string;
  readonly className: string
}
```

---

### `TaskStatusIndicatorProjection`

```ts
interface TaskStatusIndicatorProjection {
  readonly indicators: readonly TaskStatusIndicator[];
  readonly classNames: readonly string[];
  readonly labels: readonly string[];
  readonly label: string;
  readonly isReadOnly: boolean;
  readonly isLocked: boolean
}
```

---

### `CreateTaskStatusIndicatorsInput`

```ts
interface CreateTaskStatusIndicatorsInput {
  readonly taskId: TaskId;
  readonly projectReadOnly?: boolean;
  readonly taskLocked?: boolean;
  readonly labels?: Partial<Record<TaskStatusIndicatorKind, string>>;
  readonly classNames?: Partial<Record<TaskStatusIndicatorKind, string>>
}
```

---

### `TASK_STATUS_INDICATOR_LABELS`

```ts
TASK_STATUS_INDICATOR_LABELS: { readonly 'read-only-project': "Read-only project"; readonly 'locked-task': "Locked task"; };
```

---

### `TASK_STATUS_INDICATOR_CLASSES`

```ts
TASK_STATUS_INDICATOR_CLASSES: { readonly 'read-only-project': "gantt-task-status--read-only-project"; readonly 'locked-task': "gantt-task-status--locked-task"; };
```

---

### `getTaskRowId`

```ts
export function getTaskRowId(row: unknown): TaskId | null;
```

---

### `isSchedulerEditableTaskSourceField`

```ts
export function isSchedulerEditableTaskSourceField(field: string): boolean;
```

---

### `isSourceOnlyTaskSourceField`

```ts
export function isSourceOnlyTaskSourceField(field: string): boolean;
```

---

### `isWritableTaskSourceField`

```ts
export function isWritableTaskSourceField(field: string): boolean;
```

---

### `isReadOnlyProjectedSourceField`

```ts
export function isReadOnlyProjectedSourceField(field: string): boolean;
```

---

### `isStructuralTaskSourceField`

```ts
export function isStructuralTaskSourceField(field: string): boolean;
```

---

### `isIdentityTaskSourceField`

```ts
export function isIdentityTaskSourceField(field: string): boolean;
```

---

### `isGanttOwnedSourceField`

```ts
export function isGanttOwnedSourceField(field: string): boolean;
```

---

### `isCustomTaskSourceField`

```ts
export function isCustomTaskSourceField(field: string): boolean;
```

---

### `extractCustomTaskRowFields`

```ts
export function extractCustomTaskRowFields(row: DataType): DataType;
```

---

### `stripReadOnlyProjectedFields`

```ts
export function stripReadOnlyProjectedFields(row: DataType): DataType;
```

---

### `mergeTaskRows`

```ts
export function mergeTaskRows(
  sourceRows: readonly DataType[],
  projectedRows: readonly DataType[],
): DataType[];
```

---

### `TASK_TO_SOURCE_FIELDS`

```ts
TASK_TO_SOURCE_FIELDS: readonly ["id", "parentId", "name", "type", "status", "startDate", "endDate", "workHours", "remainingDurationDays", "actualStartDate", "actualFinishDate", "splitRanges", "effortMode", "effortDriven", "inactive", "priority", "canLevel", "locked", "levelingDelayDays", "constraintType", "constraintDate", "deadlineDate", "calendarId", "notes", "tags"];
```

---

### `taskPatchToSourcePatch`

```ts
export function taskPatchToSourcePatch(patch: Record<string, unknown>): Record<string, unknown>;
```

---

### `createTaskRowPatchContext`

```ts
export function createTaskRowPatchContext(
  sourceRows: readonly DataType[],
  taskId: TaskId | null,
  patch: Record<string, unknown>,
): GanttSourcePatchContext;
```

---

### `applyTaskSourceRowPatch`

```ts
export function applyTaskSourceRowPatch(
  sourceRows: readonly DataType[],
  taskId: TaskId,
  patch: Record<string, unknown>,
): DataType[];
```

---

### `taskToSourceRow`

```ts
export function taskToSourceRow(task: TaskEntity, existingRow: DataType | undefined): DataType;
```

---

### `tasksToSourceRows`

```ts
export function tasksToSourceRows(
  tasks: readonly TaskEntity[],
  sourceRows: readonly DataType[],
): DataType[];
```

---

### `applyTaskPatchToSourceRows`

```ts
export function applyTaskPatchToSourceRows(
  sourceRows: readonly DataType[],
  taskId: TaskId,
  existingTask: TaskEntity,
  patch: TaskUpdate,
): DataType[];
```

---

### `isCustomOnlySourcePatch`

```ts
export function isCustomOnlySourcePatch(sourcePatch: Record<string, unknown>): boolean;
```

---

### `GanttSourcePatchContext`

```ts
interface GanttSourcePatchContext {
  readonly taskId: TaskId | null;
  readonly sourceRow?: DataType;
  readonly sourceIndex?: number;
  readonly sourcePatch: Record<string, unknown>;
  readonly previousSourceValues: Record<string, unknown>
}
```

---

### `resolveDefaultEndDate`

```ts
export function resolveDefaultEndDate(startDate: ISODateString, durationDays: number): ISODateString;
```

---

### `readTaskRow`

```ts
export function readTaskRow(row: DataType, project: GanttPluginConfig): TaskEntity | null;
```

---

### `readTaskRows`

```ts
export function readTaskRows(source: readonly DataType[] | undefined, project: GanttPluginConfig): GanttTaskRowReadResult;
```

---

### `GanttTaskRowIssue`

```ts
interface GanttTaskRowIssue {
  readonly rowIndex: number;
  readonly reason: string;
  readonly row: DataType
}
```

---

### `GanttTaskRowReadResult`

```ts
interface GanttTaskRowReadResult {
  readonly tasks: TaskEntity[];
  readonly issues: GanttTaskRowIssue[];
  readonly rows: DataType[]
}
```

---

### `normalizePercentUnits`

```ts
export function normalizePercentUnits(value: number | undefined, fallback: number): number;
```

---

### `normalizeIntegerFromUnknown`

```ts
export function normalizeIntegerFromUnknown(value: unknown): number;
```

---

### `normalizeNumberFromUnknown`

```ts
export function normalizeNumberFromUnknown(value: unknown): number;
```

---

### `isValidTaskDateValue`

```ts
export function isValidTaskDateValue(value: string | undefined): value is ISODateString;
```

---

### `isValidDateRange`

```ts
export function isValidDateRange(startDate: ISODateString, endDate: ISODateString): boolean;
```

---

### `isValidTaskSplitRange`

```ts
export function isValidTaskSplitRange(range: TaskSplitRange): boolean;
```

---

### `isNonNegativeFiniteNumber`

```ts
export function isNonNegativeFiniteNumber(value: unknown): value is number;
```

---

### `isPositiveFiniteNumber`

```ts
export function isPositiveFiniteNumber(value: unknown): value is number;
```

---

### `isValidTaskProgress`

```ts
export function isValidTaskProgress(value: unknown): value is number;
```

---

### `isValidTaskPriority`

```ts
export function isValidTaskPriority(value: unknown): value is number;
```

---

### `isSupportedTaskEffortMode`

```ts
export function isSupportedTaskEffortMode(value: unknown): value is TaskEffortMode;
```

---

### `isSupportedTaskType`

```ts
export function isSupportedTaskType(value: unknown): value is TaskType;
```

---

### `TASK_EFFORT_MODES`

```ts
TASK_EFFORT_MODES: Set<TaskEffortMode>;
```

---

### `TASK_TYPES`

```ts
TASK_TYPES: Set<TaskType>;
```

---

### `eachDateInRange`

```ts
export function eachDateInRange(startDate: ISODateString, endDate: ISODateString): ISODateString[];
```

---

### `isTaskWorkingOnDate`

```ts
export function isTaskWorkingOnDate(task: ScheduledTask, date: ISODateString, calendar: CalendarEntity | null): boolean;
```

---

### `collectAssignmentWindows`

```ts
export function collectAssignmentWindows(
  scheduledTasksById: ReadonlyMap<TaskId, ScheduledTask>,
  assignments: readonly AssignmentEntity[],
): ResourceAssignmentWindow[];
```

---

### `collectResourceOverallocationConflicts`

```ts
export function collectResourceOverallocationConflicts(
  scheduledTasksById: ReadonlyMap<TaskId, ScheduledTask>,
  resources: readonly ResourceEntity[],
  assignments: readonly AssignmentEntity[],
  calendarsById: ReadonlyMap<CalendarEntity['id'], CalendarEntity>,
  primaryCalendar: CalendarEntity | null,
): readonly ResourceOverallocationConflict[];
```

---

### `ResourceAssignmentWindow`

```ts
interface ResourceAssignmentWindow {
  readonly task: ScheduledTask;
  readonly assignment: AssignmentEntity;
  readonly units: number
}
```

---

### `collectChildrenByParentId`

```ts
export function collectChildrenByParentId(tasks: readonly TaskEntity[]): Map<TaskId | null, TaskId[]>;
```

---

### `rollupSummaryTree`

```ts
export function rollupSummaryTree(
  taskId: TaskId,
  childrenByParentId: ReadonlyMap<TaskId | null, readonly TaskId[]>,
  scheduledTasksById: Map<TaskId, ScheduledTask>,
): void;
```

---

### `normalizeAllocationUnits`

```ts
export function normalizeAllocationUnits(value: number | undefined): number;
```

---

### `normalizeCapacityUnits`

```ts
export function normalizeCapacityUnits(value: number | undefined): number;
```

---

### `normalizeSplitRanges`

```ts
export function normalizeSplitRanges(
  splitRanges: TaskEntity['splitRanges'] | undefined,
): readonly NonNullable<TaskEntity['splitRanges']>[number][];
```

---

### `resolveTaskEndDateWithSplits`

```ts
export function resolveTaskEndDateWithSplits(
  task: Pick<ScheduledTask, 'splitRanges'>,
  startDate: ISODateString,
  durationDays: number,
  calendar: CalendarEntity | null,
  options: ResolvedSchedulerOptions,
): ISODateString;
```

---

### `normalizeLeafTask`

```ts
export function normalizeLeafTask(
  task: TaskEntity,
  options: ResolvedSchedulerOptions,
  assignments: readonly AssignmentEntity[],
  calendarsById: ReadonlyMap<CalendarEntity['id'], CalendarEntity>,
  primaryCalendar: CalendarEntity | null,
): ScheduledTask;
```

---

### `normalizeSummaryTask`

```ts
export function normalizeSummaryTask(task: TaskEntity, options: ResolvedSchedulerOptions): ScheduledTask;
```

---

### `commitGanttGridEditChanges`

```ts
export function commitGanttGridEditChanges(;
```

---

### `PendingGanttSourcePatch`

```ts
interface PendingGanttSourcePatch {
  readonly taskId: TaskId;
  readonly patch: Record<string, unknown>
}
```

---

### `CommitGanttGridEditChangesOptions`

```ts
interface CommitGanttGridEditChangesOptions {
  readonly mutationResults: readonly TaskMutationResult[];
  readonly pendingSourcePatches: readonly PendingGanttSourcePatch[];
  readonly commitDerivedTaskStoreToSource: () => void;
  readonly applyDirectSourcePatch: (taskId: TaskId, patch: Record<string, unknown>) => void
}
```

---

### `resolveGanttGridEditFieldRoute`

```ts
export function resolveGanttGridEditFieldRoute(field: string): GanttGridEditFieldRoute;
```

---

### `isStructuralGanttGridEditSourceField`

```ts
export function isStructuralGanttGridEditSourceField(field: string): boolean;
```

---

### `GanttGridEditFieldRoute`

```ts
export type GanttGridEditFieldRoute = 'read-only' | 'scheduler' | 'source' | 'ignored';
```

---

### `normalizeTaskRows`

Read flat Gantt source rows into valid `TaskEntity` values.

Rows missing required flat task fields (`id`, `name`, `startDate`, and
either `endDate` or `duration`) are dropped by the underlying reader.

**@param** source - The raw row data supplied to the grid.
 *
**@returns** An array of validated task entities.

```ts
export function normalizeTaskRows(
  source: readonly DataType[] | undefined,
  project: GanttPluginConfig,
): TaskEntity[];
```

---

### `GanttGridRenderResult`

Result of a full gantt grid recalculation cycle.

Contains the resolved project snapshot, scheduling output, timeline scale
configuration, whether the scale changed since the last render, and the
projected row data ready for the grid.

```ts
interface GanttGridRenderResult {
  /** The fully resolved project snapshot used for this render. */
    readonly resolvedProject: ProjectSnapshot;
  /** The scheduling engine output (scheduled dates, critical path, etc.). */
    readonly scheduling: SchedulingResult;
  /** The timeline scale and view-model derived from the scheduling result. */
    readonly scaleConfig: TaskGridScaleConfig;
  /** `true` if the timeline scale level or date range changed since the previous render. */
    readonly scaleChanged: boolean;
  /** The projected grid rows, one per visible task. */
    readonly rows: readonly DataType[]
}
```

---

### `GanttGridState`

Mutable state container for the gantt grid.

Owns authored flat task source rows plus linked project collections. Internal
task entities, task tree indexes, scheduling, scale, and projected rows are
derived into a computed cache and invalidated when authored inputs change.

```ts
class GanttGridState {
  bootstrapProject(
    project: GanttPluginConfig,
    source: readonly DataType[] | undefined,
    dependencies: readonly DependencyEntity[] | undefined,
    calendars: readonly CalendarEntity[] | undefined,
    resources: readonly ResourceEntity[] | undefined,
    assignments: readonly AssignmentEntity[] | undefined,
    baselines: readonly BaselineSnapshot[] | undefined,
  );

  replaceTasks(source: readonly DataType[] | undefined);

  replaceTaskSourceRows(sourceRows: readonly DataType[]);

  reorderTaskSourceRows(
    orderedTaskIds: readonly TaskId[],
    projectedRows: readonly DataType[] = [],
  ): boolean;

  applyTaskSourcePatch(taskId: TaskId, patch: Record<string, unknown>);

  commitTaskStore(tasks: readonly TaskEntity[]);

  commitComputedTaskStore(): boolean;

  replaceDependencies(dependencies: readonly DependencyEntity[]);

  replaceResources(resources: ProjectSnapshot['resources']);

  replaceAssignments(assignments: ProjectSnapshot['assignments']);

  replaceCalendars(calendars: readonly CalendarEntity[]);

  replaceBaselines(baselines: readonly BaselineSnapshot[]);

  recalculate(
    zoomLevel: TimelineZoomLevel | TimelineZoomPreset,
    locale = 'en-US',
    defaultHeaderFormatter?: TimelineDateFormatter,
    projectionOptions: TaskRowProjectionOptions =;

  clear();

  getResolvedProjectSnapshot(): ProjectSnapshot | null;

  getTaskStore();

  getTaskSourceRows();

  getTaskRowIssues();

  getDependencies();

  getResourceStore();

  getAssignmentStore();

  getDependenciesById();

  getSchedulingResult();

  getCurrentScale();

  getCurrentRenderResult(): GanttGridRenderResult | null;

  getProjectedRowPosition(taskId: TaskId): number | null;
}
```

---

### `GanttGridSync`

Synchronises the gantt plugin's state with the underlying RevoGrid element.

Manages the grid's column configuration, row data, column types, and
additional data to keep the task-list and gantt timeline in sync. On
initialization it captures the original grid state so it can be fully
restored when the gantt plugin is destroyed.

#### Dependencies

- **Config integration** `direct-tree-config`, `direct-event-manager-config`, `direct-history-config`: Reads and writes direct plugin config props while applying and restoring Gantt grid state.
- **Optional** `TooltipPlugin`: Detects TooltipPlugin to adjust fallback title attributes in Gantt cell rendering.
- **Config integration** `column-types`: Installs these column type contracts into grid.columnTypes for managed Gantt columns.

```ts
class GanttGridSync {
  initialize();

  getSource(): DataType[];

  applyScale(scaleConfig: TaskGridScaleConfig);

  refreshTimelineColumns(totalWidth: number);

  syncTimelineColumnDimension(): boolean;

  applyColumnStructure(totalWidth: number);

  refreshTimelineViewport();

  applyEditorResources(resources: readonly ResourceEntity[]);

  applyRowData(rows: readonly DataType[]);

  applyRows(rows: readonly DataType[]);

  getProjectedRow(taskId: TaskId): DataType | null;

  getVisibleProjectedRows(): DataType[];

  getVisualOrderedTaskIds(): TaskId[];

  isApplyingColumns(): boolean;

  captureColumns(columns: (ColumnGrouping | ColumnRegular)[] | undefined);

  getManagedColumns(): (ColumnGrouping | ColumnRegular)[];

  restore();

  getVisibleGridTaskIds(): ReadonlySet<TaskId>;

  getGridVirtualRowIndex(taskId: TaskId): number | null;
}
```

---

### `createGanttRowOrderProjectedRows`

```ts
export function createGanttRowOrderProjectedRows(;
```

---

### `GanttRowOrderProjectedRowsInput`

```ts
interface GanttRowOrderProjectedRowsInput {
  readonly detail: GanttRowOrderDropDetail;
  readonly expandedRowIds: ReadonlySet<unknown>;
  readonly sourceRows: readonly DataType[];
  readonly visibleRows: readonly DataType[]
}
```

---

### `TimelineFlagLine`

A flag line to render as a cap label inside the gantt timeline header.
Uses absolute timeline X coordinates (not scroll-adjusted).

```ts
interface TimelineFlagLine {
  readonly id: string;
  /** Absolute X position in the full timeline (px from timeline start). */
    readonly dateX: number;
  readonly label: string;
  readonly color?: string;
  readonly kind: 'today' | 'milestone'
}
```

---

### `TimelineHeaderHighlightRange`

Date interval marked as non-working for timeline header cells.

```ts
interface TimelineHeaderHighlightRange {
  readonly id: string;
  readonly startDate: ISODateString;
  readonly endDate: ISODateString;
  readonly left: number;
  readonly width: number
}
```

---

### `TimelineTaskInteractionRange`

Absolute timeline range occupied by an active task-bar focus/move/resize state.

```ts
interface TimelineTaskInteractionRange {
  readonly taskId: TaskId;
  readonly interaction: 'focus' | 'move' | 'resize';
  readonly kind: 'task' | 'summary' | 'milestone';
  readonly left: number;
  readonly width: number;
  readonly valid: boolean
}
```

---

### `GanttTimelineViewModel`

Read-only view model describing the current gantt timeline layout.

This is the primary data structure consumed by the gantt column type and
overlay renderers to position header cells, task bars, tick lines, and bands.

```ts
interface GanttTimelineViewModel {
  /** Unique identifier of the active zoom level (e.g. `"day"`, `"week"`). */
    readonly levelId: string;
  /** Human-readable label for the current zoom level. */
    readonly label?: string;
  /** Total pixel width of the entire timeline. */
    readonly totalWidth: number;
  /** Pixel width of a single tick (the smallest time unit column). */
    readonly tickWidth: number;
  /** Header row models describing multi-level date/time labels. */
    readonly headerRows: readonly TimelineHeaderRowModel[];
  /** Header row models intersecting the current horizontal viewport slice. */
    readonly visibleHeaderRows?: readonly TimelineHeaderRowModel[];
  /** Individual tick marks across the timeline. */
    readonly ticks: readonly TimelineTick[];
  /** Non-working day or custom shading bands. */
    readonly bands: readonly TimelineBand[];
  /** The currently visible date range within the viewport. */
    readonly visibleRange: TimelineVisibleDateRange;
  /** Flag cap labels to render inside the header (today line + milestone lines). */
    readonly flagLines: readonly TimelineFlagLine[];
  /** Non-working date ranges to highlight in the timeline header. */
    readonly nonWorkingHeaderRanges: readonly TimelineHeaderHighlightRange[];
  /** Active task focus or interaction range to mirror in the timeline header. */
    readonly activeTaskInteractionRange: TimelineTaskInteractionRange | null
}
```

---

### `GanttTimelineViewportController`

Internal controller that owns the Gantt timeline viewport overlay slot and
live viewport geometry reads.

```ts
class GanttTimelineViewportController {
  /**
     * Return the visible-timeline overlay mount container.
     */
  getOverlayContainer(): HTMLElement;

  /**
     * Mount the overlay slot into RevoGrid.
     */
  mount(): void;

  /**
     * Remove the overlay slot from RevoGrid without discarding the controller.
     */
  unmount(): void;

  /**
     * Sync the overlay slot dimensions and transform to the live timeline viewport.
     */
  syncFrame(): GanttViewportSnapshot | null;

  /**
     * Read a point-in-time snapshot of the rendered timeline viewport.
     */
  readViewport(): GanttViewportSnapshot | null;

  async scrollTo(position:;

  destroy(): void;
}
```

---

### `shouldSyncGanttViewportFromScrollSource`

```ts
export function shouldSyncGanttViewportFromScrollSource(
  event: CustomEvent<ViewPortScrollEvent>,
  timelineViewport: HTMLElement | null | undefined,
): boolean;
```

---

### `shouldSyncGanttViewportFromNativeScroll`

```ts
export function shouldSyncGanttViewportFromNativeScroll(
  event: Event,
  timelineViewport: HTMLElement | null | undefined,
): boolean;
```

---

### `createDefaultTaskTableColumns`

```ts
export function createDefaultTaskTableColumns(labels: GanttLabelsConfig =;
```

---

### `textEditor`

```ts
textEditor: typeof TextEditor;
```

---

### `GANTT_MANAGED_OPTION_LABELS`

```ts
GANTT_MANAGED_OPTION_LABELS: string;
```

---

### `COLUMN_DEFS`

```ts
COLUMN_DEFS: { wbs: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; name: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; cost: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; startDate: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; endDate: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; duration: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; workHours: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; remainingDurationDays: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; actualStartDate: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; actualFinishDate: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; effortMode: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; effortDriven: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; inactive: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; priority: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; canLevel: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; levelingDelayDays: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; earlyStartDate: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; earlyFinishDate: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; lateStartDate: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; lateFinishDate: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; totalSlackDays: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; startVarianceDays: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; finishVarianceDays: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; durationVarianceDays: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; progressVariancePercent: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; taskMode: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; scheduleOrigin: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; constraintType: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; constraintDate: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; deadlineDate: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; schedulingWarning: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; percentDone: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; predecessors: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; successors: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; status: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; assignees: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; resourceRole: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; resourceCapacity: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; resourceLoadSummary: Partial<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> & Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop">; };
```

---

### `getHierarchyRowTaskId`

```ts
export function getHierarchyRowTaskId(row: HierarchyRow): TaskId | null;
```

---

### `getHierarchyRowParentTaskId`

```ts
export function getHierarchyRowParentTaskId(row: HierarchyRow): TaskId | null;
```

---

### `buildParentIdByTaskId`

```ts
export function buildParentIdByTaskId(rows: readonly HierarchyRow[]): Map<TaskId, TaskId | null>;
```

---

### `isAncestorTask`

```ts
export function isAncestorTask(
  parentIdByTaskId: ReadonlyMap<TaskId, TaskId | null>,
  ancestorId: TaskId,
  taskId: TaskId,
): boolean;
```

---

### `HierarchyRow`

```ts
interface HierarchyRow {
  readonly id?: unknown;
  readonly parentId?: unknown
}
```

---

### `findTimelineViewportElement`

```ts
export function findTimelineViewportElement(root: ParentNode): TimelineViewportElement | null;
```

---

### `findTaskTableViewportElement`

```ts
export function findTaskTableViewportElement(root: ParentNode): HTMLElement | null;
```

---

### `isTimelineWheelTarget`

```ts
export function isTimelineWheelTarget(target: EventTarget | null): boolean;
```

---

### `TIMELINE_VIEWPORT_SELECTOR`

```ts
TIMELINE_VIEWPORT_SELECTOR: string;
```

---

### `TASK_TABLE_VIEWPORT_SELECTOR`

```ts
TASK_TABLE_VIEWPORT_SELECTOR: string;
```

---

### `TimelineViewportElement` (Extended from `timeline-viewport-dom.ts`)

```ts
export type TimelineViewportElement = HTMLElement & {
  setScroll?: (event: { dimension: 'rgCol'; coordinate: number }) => Promise<void>;
};
```

---

### `GanttTooltipSuppression`

Temporarily disables grid tooltips while pointer-based Gantt interactions are active.

Uses reference counting because task, split, progress, and dependency tools
have independent lifecycle controllers that can overlap during cleanup.

```ts
class GanttTooltipSuppression {
  suppress(): () => void;

  destroy(): void;
}
```

---

### `buildDependencyLabelsByTaskId`

```ts
export function buildDependencyLabelsByTaskId(
  dependencies: readonly DependencyEntity[],
  taskRefById: ReadonlyMap<TaskId, string>,
): Map<TaskId,;
```

---

### `resolveTaskConstraintSchedule`

Resolves a project-start/ASAP task against incoming dependencies and constraints.

```ts
export function resolveTaskConstraintSchedule(
  task: ScheduledTask,
  authoredStartDate: ISODateString,
  dependencyRequirements: readonly DependencyRequirement[],
  taskCalendar: CalendarEntity | null,
  options: ResolvedSchedulerOptions,
): ConstraintResolution;
```

---

### `resolveTaskBackwardConstraintSchedule`

Resolves a project-finish/ALAP task against successor latest windows and constraints.

```ts
export function resolveTaskBackwardConstraintSchedule(
  task: ScheduledTask,
  fallbackLatestStartDate: ISODateString,
  dependencyRequirements: readonly DependencyLatestRequirement[],
  taskCalendar: CalendarEntity | null,
  options: ResolvedSchedulerOptions,
): ConstraintResolution;
```

---

### `createFinishConstraintConflict`

Emits finish-based constraint conflicts after the final scheduled end is known.

```ts
export function createFinishConstraintConflict(
  task: ScheduledTask,
  startDate: ISODateString,
  endDate: ISODateString,
): SchedulerConflict | null;
```

---

### `computeCriticalPath`

Computes slack, critical flags, summary critical rollups, and critical dependency ids.

```ts
export function computeCriticalPath(
  scheduledTasksById: Map<TaskId, ScheduledTask>,
  dependencies: readonly DependencyEntity[],
  topologyOrder: readonly TaskId[],
  calendarsById: ReadonlyMap<CalendarEntity['id'], CalendarEntity>,
  primaryCalendar: CalendarEntity | null,
  options: ResolvedSchedulerOptions,
): ReadonlySet<string>;
```

---

### `collectIncomingDependenciesByTaskId`

Groups dependencies by successor so forward scheduling can read incoming constraints.

```ts
export function collectIncomingDependenciesByTaskId(
  dependencies: readonly DependencyEntity[],
): Map<TaskId, DependencyEntity[]>;
```

---

### `collectOutgoingDependenciesByTaskId`

Groups dependencies by predecessor so backward scheduling can read successor constraints.

```ts
export function collectOutgoingDependenciesByTaskId(
  dependencies: readonly DependencyEntity[],
): Map<TaskId, DependencyEntity[]>;
```

---

### `getDependencyLagDays`

Normalizes dependency lag to the day offset used by calendar math.

```ts
export function getDependencyLagDays(dependency: DependencyEntity): number;
```

---

### `resolveConstrainedStartDate`

Resolves the earliest allowed successor start implied by one dependency.

```ts
export function resolveConstrainedStartDate(
  predecessor: ScheduledTask,
  successor: ScheduledTask,
  dependency: DependencyEntity,
  successorCalendar: CalendarEntity | null,
  options: ResolvedSchedulerOptions,
): ISODateString;
```

---

### `resolveTaskLatestStartDateWithSplits`

Converts a latest finish into latest start while preserving split pause ranges.

```ts
export function resolveTaskLatestStartDateWithSplits(
  task: Pick<ScheduledTask, 'durationDays' | 'splitRanges'>,
  latestEndDate: ISODateString,
  calendar: CalendarEntity | null,
  options: Pick<ResolvedSchedulerOptions, 'excludeHolidaysFromDuration'>,
): ISODateString;
```

---

### `resolveLatestWindowFromSuccessor`

Resolves the predecessor latest-window imposed by one scheduled successor.

```ts
export function resolveLatestWindowFromSuccessor(
  predecessor: ScheduledTask,
  successor: ScheduledTask,
  dependency: DependencyEntity,
  predecessorCalendar: CalendarEntity | null,
  options: ResolvedSchedulerOptions,
): LatestWindow;
```

---

### `resolveDependencyRequirements`

Builds all forward dependency requirements for an auto/manual task.

```ts
export function resolveDependencyRequirements(
  task: ScheduledTask,
  incomingDependencies: readonly DependencyEntity[],
  scheduledTasksById: ReadonlyMap<TaskId, ScheduledTask>,
  calendarsById: ReadonlyMap<CalendarEntity['id'], CalendarEntity>,
  primaryCalendar: CalendarEntity | null,
  options: ResolvedSchedulerOptions,
): readonly DependencyRequirement[];
```

---

### `resolveDependencyLatestRequirements`

Builds all backward latest-start requirements for an ALAP task.

```ts
export function resolveDependencyLatestRequirements(
  task: ScheduledTask,
  outgoingDependencies: readonly DependencyEntity[],
  scheduledTasksById: ReadonlyMap<TaskId, ScheduledTask>,
  calendarsById: ReadonlyMap<CalendarEntity['id'], CalendarEntity>,
  primaryCalendar: CalendarEntity | null,
  options: ResolvedSchedulerOptions,
): readonly DependencyLatestRequirement[];
```

---

### `createManualDependencyViolations`

Reports project-start manual tasks that start before incoming dependencies allow.

```ts
export function createManualDependencyViolations(
  task: ScheduledTask,
  dependencyRequirements: readonly DependencyRequirement[],
  options: ResolvedSchedulerOptions,
): readonly ManualDependencyViolation[];
```

---

### `createManualDependencyLatestViolations`

Reports project-finish manual tasks that start after successor latest windows allow.

```ts
export function createManualDependencyLatestViolations(
  task: ScheduledTask,
  dependencyRequirements: readonly DependencyLatestRequirement[],
  options: ResolvedSchedulerOptions,
): readonly ManualDependencyViolation[];
```

---

### `createDeadlineMissedConflicts`

Reports tasks whose final scheduled finish exceeds their deadline.

```ts
export function createDeadlineMissedConflicts(tasks: Iterable<ScheduledTask>): readonly DeadlineMissedConflict[];
```

---

### `LatestWindow`

Latest legal start/end window used by backward scheduling and critical path.

```ts
interface LatestWindow {
  readonly latestStartDate: ISODateString;
  readonly latestEndDate: ISODateString
}
```

---

### `DependencyRequirement`

Earliest start requirement derived from an incoming predecessor dependency.

```ts
interface DependencyRequirement {
  readonly dependency: DependencyEntity;
  readonly requiredStartDate: ISODateString
}
```

---

### `DependencyLatestRequirement`

Latest start requirement derived from an outgoing successor dependency.

```ts
interface DependencyLatestRequirement {
  readonly dependency: DependencyEntity;
  readonly latestStartDate: ISODateString
}
```

---

### `ConstraintResolution`

Result of resolving authored dates against dependency and constraint bounds.

```ts
interface ConstraintResolution {
  readonly startDate: ISODateString;
  readonly origin: Extract<ScheduleOrigin, 'normalized' | 'constraint'>;
  readonly conflicts: readonly SchedulerConflict[]
}
```

---

### `isActualPinned`

Returns true when actual-progress fields own the task schedule.

```ts
export function isActualPinned(task: ScheduledTask, options: ResolvedSchedulerOptions): boolean;
```

---

### `applyResourceLeveling`

Automatically delays eligible tasks until cumulative resource load fits capacity.

```ts
export function applyResourceLeveling(
  scheduledTasksById: Map<TaskId, ScheduledTask>,
  resources: readonly ResourceEntity[],
  assignments: readonly AssignmentEntity[],
  calendarsById: ReadonlyMap<CalendarEntity['id'], CalendarEntity>,
  primaryCalendar: CalendarEntity | null,
  options: ResolvedSchedulerOptions,
): readonly ResourceLevelingAdjustmentConflict[];
```

---

### `reapplyForwardDependencyConstraints`

Re-runs forward dependency constraints after leveling shifts predecessor dates.

```ts
export function reapplyForwardDependencyConstraints(
  scheduledTasksById: Map<TaskId, ScheduledTask>,
  topologyOrder: readonly TaskId[],
  incomingDependenciesByTaskId: ReadonlyMap<TaskId, readonly DependencyEntity[]>,
  calendarsById: ReadonlyMap<CalendarEntity['id'], CalendarEntity>,
  primaryCalendar: CalendarEntity | null,
  options: ResolvedSchedulerOptions,
): readonly SchedulerConflict[];
```

---

### `createIssues`

Validates raw scheduler entities and returns non-mutating typed issues.

```ts
export function createIssues(
  tasks: readonly TaskEntity[],
  dependencies: readonly DependencyEntity[],
  calendars: readonly CalendarEntity[],
  resources: readonly ResourceEntity[] = [],
  assignments: readonly AssignmentEntity[] = [],
): readonly SchedulerIssue[];
```

---

### `AssignmentMutationSuccess`

Successful result of an assignment mutation operation.

```ts
interface AssignmentMutationSuccess {
  /** Discriminant indicating success. */
    readonly ok: true;
  /** Identifier of the task whose assignments were modified. */
    readonly taskId: TaskId
}
```

---

### `AssignmentMutationFailure`

Failed result of an assignment mutation operation.

```ts
interface AssignmentMutationFailure {
  /** Discriminant indicating failure. */
    readonly ok: false;
  /** Machine-readable error code describing the failure reason. */
    readonly code: 'task-not-found' | 'resource-not-found' | 'invalid-value' | 'readonly-project';
  /** Human-readable error message. */
    readonly message: string
}
```

---

### `AssignmentMutationPreview`

```ts
interface AssignmentMutationPreview {
  readonly ok: true;
  readonly taskId: TaskId;
  readonly assignments: readonly AssignmentEntity[];
  readonly previousAssignments: readonly AssignmentEntity[]
}
```

---

### `AssignmentMutationPreviewResult`

```ts
export type AssignmentMutationPreviewResult = AssignmentMutationPreview | AssignmentMutationFailure;
```

---

### `createGanttRowContextMenuItems`

```ts
export function createGanttRowContextMenuItems(
  ganttContext: GanttCoordinatorContext,
  openContext?: ContextMenuOpenContext,
): ContextMenuItem[];
```

---

### `createGanttColumnContextMenuItems`

```ts
export function createGanttColumnContextMenuItems(
  ganttContext: GanttCoordinatorContext,
  getColumnMenuState: () => GanttColumnMenuState = () => (;
```

---

### `createDependencyLayerTooltip`

```ts
export function createDependencyLayerTooltip(
  dependency: DependencyEntity,
  predecessorTask: TaskEntity | null,
  successorTask: TaskEntity | null,
  tooltipHook?: (context: GanttDependencyTooltipContext) => string | null | undefined,
): DependencyLayerTooltip | null;
```

---

### `GanttDependencyOverlayPluginOptions`

```ts
interface GanttDependencyOverlayPluginOptions {
  readonly overlayContainer: HTMLElement;
  readonly dependencyMutationService: DependencyMutationService;
  readonly dependencyLayoutService: DependencyLayoutService;
  readonly criticalPathTool: CriticalPathTool;
  readonly taskBars: GanttTaskBarsRuntime;
  readonly onDependenciesChange: (dependencies: readonly DependencyEntity[]) => void;
  readonly onDependencyMutation?: (previousDependencies: readonly DependencyEntity[], nextDependencies: readonly DependencyEntity[]) => void;
  readonly suppressTooltips?: () => () => void
}
```

---

### `removeHierarchyDependencyConflicts`

```ts
export function removeHierarchyDependencyConflicts<TDependency extends HierarchyDependency>(
  dependencies: readonly TDependency[],
  rows: readonly HierarchyRow[],
): TDependency[];
```

---

### `TimelinePanControllerContext`

Callback context provided to the {@link TimelinePanController}.

```ts
interface TimelinePanControllerContext {
  /** Whether empty timeline drag panning can start. */
    isPanEnabled(): boolean;
  /** Return the current viewport snapshot. */
    getViewport(): GanttViewportSnapshot | null;
  /** Scroll the gantt viewport to the requested coordinates. */
    scrollTo(position: { x?: number; y?: number }): void
}
```

---

### `TimelinePanController`

Pointer-event-based controller for drag panning from empty gantt timeline space.

```ts
class TimelinePanController {
  destroy(): void;
}
```

---

### `TimelineViewState`

Internal holder for mutable timeline view-model state.

`GanttGridState` owns project/scheduling data, while `TimelineTool` owns
interactions. This class keeps scroll/header/background state separate from
both responsibilities.

```ts
class TimelineViewState {
  getTimeline(): GanttTimelineViewModel | null;

  applyTimeline(timeline: GanttTimelineViewModel): void;

  clear(): void;

  setVisibleRange(
    visibleRange: TimelineVisibleDateRange,
    visibleHeaderRows?: GanttTimelineViewModel['visibleHeaderRows'],
  ): void;

  setFlagLines(lines: readonly TimelineFlagLine[]): void;

  setNonWorkingHeaderRanges(ranges: GanttTimelineViewModel['nonWorkingHeaderRanges']): void;

  setTaskInteractionRange(range: GanttTimelineViewModel['activeTaskInteractionRange']): void;
}
```

---

### `TimelineBackgroundFrame`

Viewport frame dimensions for the timeline background overlay.

```ts
interface TimelineBackgroundFrame {
  /** Width of the viewport in pixels. */
    readonly width: number;
  /** Height of the viewport in pixels. */
    readonly height: number
}
```

---

### `TimelineBackgroundLayer`

Preact-based overlay layer for Gantt timeline background visuals.

```ts
class TimelineBackgroundLayer {
  /**
     * Attach the overlay root element to the container DOM.
     * No-op if already mounted.
     */
  mount(): void;

  /** Remove the overlay from the DOM and clean up. */
  destroy(): void;

  /** Hide the overlay without destroying the root element. */
  hide(): void;

  /**
     * Render the background model.
     * @param model - The computed background model to render.
     * @param frame - Current viewport frame for this render.
     */
  render(model: TimelineBackgroundModel, frame: TimelineBackgroundFrame): void;
}
```

---

### `TimelineBackgroundRenderInput`

```ts
interface TimelineBackgroundRenderInput {
  readonly config: GanttPluginConfig | null | undefined;
  readonly scale: TimelineScale | null;
  readonly viewport: GanttViewportSnapshot | null;
  readonly calendar?: CalendarEntity | null
}
```

---

### `TimelineBackgroundHeaderState`

```ts
interface TimelineBackgroundHeaderState {
  readonly flagLines: readonly TimelineFlagLine[];
  readonly nonWorkingHeaderRanges: GanttTimelineViewModel['nonWorkingHeaderRanges']
}
```

---

### `TimelineBackgroundTool`

```ts
class TimelineBackgroundTool {
  render(input: TimelineBackgroundRenderInput): TimelineBackgroundHeaderState;

  destroy(): void;
}
```

---

### `isTimelineHoliday`

```ts
export function isTimelineHoliday(date: ISODateString, calendar: CalendarEntity): boolean;
```

---

### `isTimelineWeekendDay`

```ts
export function isTimelineWeekendDay(date: ISODateString, calendar: CalendarEntity): boolean;
```

---

### `shouldHighlightNonWorkingDay`

```ts
export function shouldHighlightNonWorkingDay(
  date: ISODateString,
  calendar: CalendarEntity,
  highlightVisibility:;
```

---

### `createTimelineBackgroundHeaderHighlightRanges`

```ts
export function createTimelineBackgroundHeaderHighlightRanges(
  scale: TimelineScale,
  viewport: TimelineBackgroundViewport,
  options: Pick<TimelineBackgroundVisualOptions, 'shadeNonWorkingTime' | 'calendar' | 'highlightVisibility'>,
): readonly TimelineBackgroundHeaderHighlightRange[];
```

---

### `createTimelineBackgroundHeaderFlagLines`

```ts
export function createTimelineBackgroundHeaderFlagLines(
  scale: TimelineScale,
  options: Pick<TimelineBackgroundVisualOptions, 'showTodayLine' | 'milestoneLines'>,
): readonly TimelineFlagLine[];
```

---

### `createTimelineBackgroundModel`

Build a complete timeline background model from the current scale, viewport,
and visual options.

```ts
export function createTimelineBackgroundModel(
  scale: TimelineScale,
  viewport: TimelineBackgroundViewport,
  options: TimelineBackgroundVisualOptions,
): TimelineBackgroundModel;
```

---

### `TimelineBackgroundViewport`

Viewport dimensions and scroll position for background calculations.

```ts
interface TimelineBackgroundViewport {
  /** Viewport width in pixels. */
    readonly width: number;
  /** Viewport height in pixels. */
    readonly height: number;
  /** Horizontal scroll offset in pixels. */
    readonly scrollLeft: number
}
```

---

### `TimelineBackgroundRangeVisual`

Computed visual data for a time range background segment.

```ts
interface TimelineBackgroundRangeVisual {
  /** Unique identifier for the range. */
    readonly id: string;
  /** Left pixel offset relative to the viewport. */
    readonly left: number;
  /** Width in pixels. */
    readonly width: number;
  /** Optional display label. */
    readonly label?: string;
  /** Optional CSS color override. */
    readonly color?: string
}
```

---

### `TimelineBackgroundHeaderHighlightRange`

Date interval marked as non-working for timeline header cells.

```ts
interface TimelineBackgroundHeaderHighlightRange {
  /** Unique identifier for the non-working interval. */
    readonly id: string;
  /** First date in the highlighted interval. */
    readonly startDate: ISODateString;
  /** Last date in the highlighted interval. */
    readonly endDate: ISODateString;
  /** Absolute left pixel offset from the timeline origin. */
    readonly left: number;
  /** Width in pixels. */
    readonly width: number
}
```

---

### `TimelineBackgroundLineVisual`

Computed visual data for a vertical line decoration.

```ts
interface TimelineBackgroundLineVisual {
  /** Unique identifier for the line. */
    readonly id: string;
  /** Left pixel offset relative to the viewport. */
    readonly left: number;
  /** Optional display label. */
    readonly label?: string;
  /** Optional CSS color override. */
    readonly color?: string
}
```

---

### `TimelineBackgroundModel`

Complete background model for the timeline overlay.

```ts
interface TimelineBackgroundModel {
  /** Project line visual, or `null` if not configured. */
    readonly projectLine: TimelineBackgroundLineVisual | null;
  /** Today flag line, or `null` if disabled or off-screen. */
    readonly todayLine: TimelineBackgroundLineVisual | null;
  /** User-defined milestone flag lines. */
    readonly milestoneLines: readonly TimelineBackgroundLineVisual[];
  /** User-defined time range highlights. */
    readonly timeRanges: readonly TimelineBackgroundRangeVisual[];
  /** Non-working day shading ranges. */
    readonly nonWorkingRanges: readonly TimelineBackgroundRangeVisual[]
}
```

---

### `TimelineBackgroundVisualOptions`

Visual options used to build timeline background and header state.

```ts
interface TimelineBackgroundVisualOptions {
  readonly projectLineDate?: ISODateString;
  readonly timeRanges?: readonly GanttTimeRange[];
  readonly shadeNonWorkingTime?: boolean;
  readonly calendar?: CalendarEntity;
  readonly showTodayLine?: boolean;
  readonly milestoneLines?: readonly GanttMilestoneLine[];
  readonly highlightVisibility?: { weekends?: boolean; holidays?: boolean }
}
```

---

### `readTimelinePreviewGeometry`

Read the rendered task bar geometry in preview-layer coordinates.
The preview should mirror the visible bar, not the full row lane, so width
and height come from computed bar styles while the vertical center comes
from the transformed bounding box.

```ts
export function readTimelinePreviewGeometry(
  bar: HTMLElement,
  viewport: GanttViewportSnapshot,
): TimelinePreviewGeometry;
```

---

### `TimelinePreviewGeometry`

```ts
interface TimelinePreviewGeometry {
  readonly top: number;
  readonly width: number;
  readonly height: number
}
```

---

### `TaskEditControllerContext`

```ts
interface TaskEditControllerContext {
  openTask(taskId: TaskId): void
}
```

---

### `TaskEditController`

Listens for double-click edit requests on rendered task bars.

```ts
class TaskEditController {
  destroy(): void;
}
```

---

### `shiftSplitRanges`

```ts
export function shiftSplitRanges(
  splitRanges: readonly TaskSplitRange[] | undefined,
  deltaDays: number,
): readonly TaskSplitRange[] | undefined;
```

---

### `shiftScheduledTaskDates`

```ts
export function shiftScheduledTaskDates(
  task: ScheduledTask,
  startDate: ISODateString,
): ScheduledTask;
```

---

### `createProposedScheduledTasksById`

```ts
export function createProposedScheduledTasksById(
  scheduledTasksById: ReadonlyMap<TaskId, ScheduledTask> | undefined,
  proposedStarts: ReadonlyMap<TaskId, ISODateString>,
): Map<TaskId, ScheduledTask> | undefined;
```

---

### `updateProposedScheduledTaskFromCommittedTask`

```ts
export function updateProposedScheduledTaskFromCommittedTask(
  proposedScheduledTasksById: Map<TaskId, ScheduledTask> | undefined,
  task: TaskEntity,
): void;
```

---

### `projectHasActiveDependencyCycle`

```ts
export function projectHasActiveDependencyCycle(project: ProjectSnapshot): boolean;
```

---

### `resolveDependencyConstrainedStartDate`

```ts
export function resolveDependencyConstrainedStartDate(
  context: TaskDependencyConstraintContext,
  task: TaskEntity,
  scheduledTask: ScheduledTask,
  proposedStartDate: ISODateString,
  scheduledTasksById: ReadonlyMap<TaskId, ScheduledTask> = context.scheduledTasksById,
): ISODateString;
```

---

### `clampTaskStartDate`

```ts
export function clampTaskStartDate(
  context: TaskDependencyConstraintContext,
  task: TaskEntity | undefined,
  scheduledTask: ScheduledTask | undefined,
  proposedStartDate: ISODateString,
): ISODateString;
```

---

### `TaskDependencyConstraintContext`

```ts
interface TaskDependencyConstraintContext {
  readonly project: ProjectSnapshot | null;
  readonly scheduledTasksById: ReadonlyMap<TaskId, ScheduledTask>;
  readonly workingDays: TaskWorkingDaysContext;
  readonly taskModeDefault: 'auto' | 'manual';
  readonly hasDependencyCycle: boolean
}
```

---

### `createDefaultTaskName`

```ts
export function createDefaultTaskName(existingTasks: readonly TaskEntity[]): string;
```

---

### `findTaskInsertionIndex`

```ts
export function findTaskInsertionIndex(
  tasks: readonly TaskEntity[],
  parentId: TaskId | null,
  placement?: TaskCreatePlacement,
): number;
```

---

### `collectTaskBlock`

```ts
export function collectTaskBlock(
  tasks: readonly TaskEntity[],
  taskId: TaskId,
):;
```

---

### `collectTaskSubtreeIds`

```ts
export function collectTaskSubtreeIds(tasks: readonly TaskEntity[], taskId: TaskId): Set<TaskId>;
```

---

### `findPreviousSibling`

```ts
export function findPreviousSibling(
  tasks: readonly TaskEntity[],
  taskId: TaskId,
): TaskEntity | null;
```

---

### `indentTaskHierarchy`

```ts
export function indentTaskHierarchy(
  tasks: readonly TaskEntity[],
  taskId: TaskId,
): TaskHierarchyMutationResult;
```

---

### `outdentTaskHierarchy`

```ts
export function outdentTaskHierarchy(
  tasks: readonly TaskEntity[],
  taskId: TaskId,
): TaskHierarchyMutationResult;
```

---

### `renumberTaskWbsCodes`

```ts
export function renumberTaskWbsCodes(tasks: readonly TaskEntity[]): TaskEntity[];
```

---

### `normalizeStructuralSummaryTypes`

```ts
export function normalizeStructuralSummaryTypes(tasks: readonly TaskEntity[]): TaskEntity[];
```

---

### `normalizeTaskHierarchy`

```ts
export function normalizeTaskHierarchy(tasks: readonly TaskEntity[]): TaskEntity[];
```

---

### `TaskHierarchyMutationResult`

```ts
export type TaskHierarchyMutationResult =
  | {
      ok: true;
      tasks: TaskEntity[];
      parentId?: TaskId | null;
    }
  | {
      ok: false;
      code: 'task-not-found' | 'invalid-parent';
      message: string;
    };
```

---

### `TaskMilestonePatchResolution`

```ts
export type TaskMilestonePatchResolution = TaskMutationFailure | {
  readonly ok: true;
  readonly patch: TaskUpdate;
};
```

---

### `TaskCreatePlacement`

Options controlling where a newly created task is inserted in the task list.

```ts
interface TaskCreatePlacement {
  /** Insert the new task after this task ID, or at the end of the parent's children if `null`. */
    readonly insertAfterTaskId?: TaskId | null;
  /** When inserting after a task with descendants, place the new task after the full descendant block. */
    readonly insertAfterSubtree?: boolean
}
```

---

### `TaskFieldPatchResolution`

```ts
export type TaskFieldPatchResolution = TaskMutationFailure | {
  readonly ok: true;
  readonly patch: TaskUpdate;
};
```

---

### `TaskMutationFailure`

Failed result of a task mutation operation.

```ts
interface TaskMutationFailure {
  /** Discriminant indicating failure. */
    readonly ok: false;
  /** Machine-readable error code describing the failure reason. */
    readonly code:
      | 'task-not-found'
      | 'readonly-task'
      | 'invalid-field'
      | 'invalid-date'
      | 'invalid-range'
      | 'invalid-parent'
      | 'invalid-value';
  /** Human-readable error message. */
    readonly message: string
}
```

---

### `TaskMutationSuccess`

Successful result of a task mutation operation.

```ts
interface TaskMutationSuccess {
  /** Discriminant indicating success. */
    readonly ok: true;
  /** ID of the affected task. */
    readonly taskId: TaskId;
  /** Whether a new task was created (vs. updated). */
    readonly created: boolean;
  /** Parent task ID, if the operation changed the hierarchy. */
    readonly parentId?: TaskId | null
}
```

---

### `TaskPatchUpdateOptions`

```ts
interface TaskPatchUpdateOptions {
  readonly scheduledTasksById?: ReadonlyMap<TaskId, ScheduledTask>
}
```

---

### `isIsoDate`

```ts
export function isIsoDate(value: string): value is ISODateString;
```

---

### `validateDate`

```ts
export function validateDate(date: string): TaskMutationFailure | null;
```

---

### `validateRange`

```ts
export function validateRange(startDate: ISODateString, endDate: ISODateString): TaskMutationFailure | null;
```

---

### `hasPatchField`

```ts
export function hasPatchField<K extends keyof TaskUpdate>(patch: TaskUpdate, field: K): boolean;
```

---

### `validateOptionalDatePatch`

```ts
export function validateOptionalDatePatch(
  patch: TaskUpdate,
  field: 'actualStartDate' | 'actualFinishDate',
  label: string,
): TaskMutationFailure | null;
```

---

### `validateOptionalNonNegativeNumber`

```ts
export function validateOptionalNonNegativeNumber(
  patch: TaskUpdate,
  field: 'workHours' | 'remainingDurationDays' | 'levelingDelayDays',
  label: string,
): TaskMutationFailure | null;
```

---

### `validateOptionalBoolean`

```ts
export function validateOptionalBoolean(
  patch: TaskUpdate,
  field: 'effortDriven' | 'inactive' | 'manuallyScheduled' | 'canLevel',
  label: string,
): TaskMutationFailure | null;
```

---

### `validateSummaryDerivedPatch`

```ts
export function validateSummaryDerivedPatch(
  scheduledTask: ScheduledTask | undefined,
  patch: TaskUpdate,
): TaskMutationFailure | null;
```

---

### `validateTaskPatchValues`

```ts
export function validateTaskPatchValues(patch: TaskUpdate): TaskMutationFailure | null;
```

---

### `resolveWorkMatrixEditKind`

```ts
export function resolveWorkMatrixEditKind(patch: TaskUpdate): WorkMatrixEditKind | null;
```

---

### `resolveTaskForMutation`

```ts
export function resolveTaskForMutation(
  taskStore: TaskStore | null,
  taskId: TaskId,
  action: string,
): TaskEntity | TaskMutationFailure;
```

---

### `isMutationFailure`

```ts
export function isMutationFailure(value: TaskEntity | TaskMutationFailure): value is TaskMutationFailure;
```

---

### `validateSplitRanges`

```ts
export function validateSplitRanges(patch: TaskUpdate): TaskMutationFailure | null;
```

---

### `clampSplitRangesToTask`

```ts
export function clampSplitRangesToTask(
  splitRanges: readonly TaskSplitRange[] | undefined,
  startDate: ISODateString,
  endDate: ISODateString,
): readonly TaskSplitRange[] | undefined;
```

---

### `resolveCreateTaskSplitPatch`

```ts
export function resolveCreateTaskSplitPatch(
  splitRanges: readonly TaskSplitRange[] | undefined,
  scheduledTask: ScheduledTask,
  splitStartDate: ISODateString,
  splitEndDate: ISODateString,
): TaskSplitPatchResolution;
```

---

### `resolveMoveTaskSplitPatch`

```ts
export function resolveMoveTaskSplitPatch(
  splitRanges: readonly TaskSplitRange[],
  scheduledTask: ScheduledTask,
  splitIndex: number,
  nextStartDate: ISODateString,
): TaskSplitPatchResolution;
```

---

### `resolveRemoveTaskSplitPatch`

```ts
export function resolveRemoveTaskSplitPatch(
  splitRanges: readonly TaskSplitRange[],
  splitIndex: number,
): TaskSplitPatchResolution;
```

---

### `TaskSplitPatchResolution`

```ts
export type TaskSplitPatchResolution =
  | TaskMutationFailure
  | {
      readonly ok: true;
      readonly patch: TaskUpdate;
    };
```

---

### `resolveMoveTaskPatch`

```ts
export function resolveMoveTaskPatch(
  context: TaskTimelineMutationContext,
  task: TaskEntity,
  scheduledTask: ScheduledTask,
  newStartDate: ISODateString,
  scheduledTasksById: ReadonlyMap<TaskId, ScheduledTask> = context.dependency.scheduledTasksById,
): TaskTimelinePatchResolution;
```

---

### `resolveResizeTaskPatch`

```ts
export function resolveResizeTaskPatch(
  context: TaskTimelineMutationContext,
  task: TaskEntity,
  scheduledTask: ScheduledTask,
  newStartDate: ISODateString,
  newEndDate: ISODateString,
): TaskTimelinePatchResolution;
```

---

### `TaskTimelineMutationContext`

```ts
interface TaskTimelineMutationContext {
  readonly dependency: TaskDependencyConstraintContext
}
```

---

### `TaskTimelinePatchResolution`

```ts
export type TaskTimelinePatchResolution =
  | TaskMutationFailure
  | {
      readonly ok: true;
      readonly patch: TaskUpdate | null;
    };
```

---

### `resolveTaskUpdatePatch`

```ts
export function resolveTaskUpdatePatch(
  context: TaskPatchResolveContext,
  task: TaskEntity,
  patch: TaskUpdate,
): TaskPatchResolution;
```

---

### `TaskPatchResolveContext`

```ts
interface TaskPatchResolveContext {
  readonly scheduledTask: ScheduledTask | undefined;
  readonly scheduledTasksById?: ReadonlyMap<TaskId, ScheduledTask>;
  readonly dependencyContext: TaskDependencyConstraintContext | null;
  readonly excludeHolidaysFromDuration: boolean;
  readonly isWorkingDate: (date: ISODateString, calendarId: CalendarId) => boolean;
  readonly addWorkingDays: (startDate: ISODateString, days: number, calendarId: CalendarId) => ISODateString
}
```

---

### `TaskPatchResolution`

```ts
export type TaskPatchResolution = TaskMutationFailure | {
  readonly ok: true;
  readonly patch: TaskUpdate;
  readonly editKind: WorkMatrixEditKind | null;
};
```

---

### `TaskWorkingDaysContext`

```ts
interface TaskWorkingDaysContext {
  readonly calendars: readonly CalendarEntity[];
  readonly primaryCalendarId: CalendarId;
  readonly excludeHolidaysFromDuration: boolean;
  readonly lagCalendar: NonNullable<NonNullable<GanttPluginConfig['scheduling']>['lagCalendar']>
}
```

---

### `applyWorkDurationUnitsMatrix`

```ts
export function applyWorkDurationUnitsMatrix(
  task: TaskEntity,
  previousAssignments: readonly AssignmentEntity[],
  nextAssignments: readonly AssignmentEntity[],
  project: ProjectSnapshot,
  editKind: WorkMatrixEditKind,
): WorkMatrixResult;
```

---

### `WorkMatrixEditKind`

```ts
export type WorkMatrixEditKind = 'duration' | 'work' | 'assignments';
```

---

### `WorkMatrixResult`

```ts
interface WorkMatrixResult {
  readonly taskPatch: Partial<Pick<TaskEntity, 'durationDays' | 'workHours'>>;
  readonly assignments: readonly AssignmentEntity[]
}
```

---

### `isRowInsideSelectedRange`

```ts
export function isRowInsideSelectedRange(rowIndex: number | null, range: RangeArea | null | undefined): boolean;
```

---

### `normalizeTopmostTaskIds`

```ts
export function normalizeTopmostTaskIds(taskIds: readonly TaskId[], taskStore: TaskStore): TaskId[];
```

---

### `expandSummaryTasksToLeafTaskIds`

```ts
export function expandSummaryTasksToLeafTaskIds(taskIds: readonly TaskId[], taskStore: TaskStore): TaskId[];
```

---

### `resolveGanttTaskIdsFromPhysicalRowIndexes`

```ts
export function resolveGanttTaskIdsFromPhysicalRowIndexes(
  rowIndexes: ReadonlySet<number>,
  providers: Pick<PluginProviders, 'data'>,
  taskStore: TaskStore,
): TaskId[];
```

---

### `resolveGanttTaskSelection`

```ts
export function resolveGanttTaskSelection(options:;
```

---

### `validateGanttBulkTaskAction`

```ts
export function validateGanttBulkTaskAction(
  action: GanttBulkTaskAction,
  taskIds: readonly TaskId[],
  ganttContext: GanttCoordinatorContext,
): GanttBulkActionValidation;
```

---

### `GanttBulkTaskAction`

```ts
export type GanttBulkTaskAction = 'indent' | 'outdent' | 'delete' | 'convert-to-milestone' | 'move';
```

---

### `GanttTaskSelectionResolution`

```ts
interface GanttTaskSelectionResolution {
  readonly taskIds: readonly TaskId[];
  readonly isBulk: boolean
}
```

---

### `GanttBulkActionValidation`

```ts
interface GanttBulkActionValidation {
  readonly ok: boolean;
  readonly reason?: string
}
```
