### Development Setup for gantt-lib Source: https://github.com/simon100500/gantt-lib/blob/master/README.md Clone the repository, install dependencies, and run the development server to contribute or test locally. Access the running application at http://localhost:3000. ```bash git clone https://github.com/simon100500/gantt-lib.git cd gantt-lib npm i npm run dev ``` -------------------------------- ### SS - Start-to-Start Dependency Example Source: https://github.com/simon100500/gantt-lib/blob/master/docs/reference/03-dependencies.md Demonstrates the Start-to-Start dependency, where a successor task begins only after the predecessor task has started. The lag is always non-negative, clamping to 0 if the successor is dragged to start before the predecessor. ```typescript { taskId: 'A', type: 'SS', lag: 2 } ``` -------------------------------- ### Install gantt-lib via NPM Source: https://github.com/simon100500/gantt-lib/blob/master/README.md Use this command to install the gantt-lib package using npm. ```bash npm install gantt-lib ``` -------------------------------- ### Development Commands for Monorepo Source: https://github.com/simon100500/gantt-lib/blob/master/README.md Provides essential commands for managing the monorepo using npm. Includes installation, starting the dev server, building all packages, running tests, and linting. ```bash npm install npm run dev # Запустить dev-сервер (website package) npm run build # Собрать все пакеты npm run test # Запустить unit-тесты (gantt-lib package) npm run lint # ESLint для всех пакетов ``` -------------------------------- ### FS - Finish-to-Start Dependency Example Source: https://github.com/simon100500/gantt-lib/blob/master/docs/reference/03-dependencies.md Illustrates the most common dependency type where a successor task starts only after the predecessor task finishes. Negative lag is not permitted and is automatically reset to 0. ```typescript { taskId: 'A', type: 'FS', lag: 0 } ``` -------------------------------- ### Table Matrix Mode for Budgets and Metrics Source: https://context7.com/simon100500/gantt-lib/llms.txt This example demonstrates the 'table-matrix' mode, suitable for budgets, metrics, and period-based matrices. It requires importing GanttChart and related types, defining tasks with budget data, and configuring matrix columns and groups. ```tsx import { GanttChart, type Task, type TableMatrixColumn, type TableMatrixColumnGroup, type TableMatrixCellClickContext } from 'gantt-lib'; import 'gantt-lib/styles.css'; type BudgetTask = Task & { budget: Record }; const tasks: BudgetTask[] = [ { id: '1', name: 'Дизайн', startDate: '2026-03-01', endDate: '2026-03-15', budget: { '2026-03': 50000, '2026-04': 0 } }, { id: '2', name: 'Разработка', startDate: '2026-03-10', endDate: '2026-04-20', budget: { '2026-03': 120000, '2026-04': 200000 } }, ]; const columnGroups: TableMatrixColumnGroup[] = [ { id: 'q1', header: 'Q1 2026' }, ]; const matrixColumns: TableMatrixColumn[] = [ { id: '2026-03', header: 'Март', width: 100, groupId: 'q1', align: 'right', renderCell: (task) => `${(task.budget['2026-03'] ?? 0).toLocaleString()} ₽` }, { id: '2026-04', header: 'Апрель', width: 100, groupId: 'q1', align: 'right', renderCell: (task) => `${(task.budget['2026-04'] ?? 0).toLocaleString()} ₽` }, { id: 'total', header: 'Итого', width: 120, align: 'right', renderCell: (task) => { const total = Object.values(task.budget).reduce((s, v) => s + v, 0); return {total.toLocaleString()} ₽; } }, ]; export default function BudgetMatrix() { return ( ) => { console.log(`Клик: задача=${ctx.task.id}, колонка=${ctx.column.id}`); }} /> ); } ``` -------------------------------- ### SF - Start-to-Finish Dependency Example Source: https://github.com/simon100500/gantt-lib/blob/master/docs/reference/03-dependencies.md Presents the Start-to-Finish dependency, a less common type where a successor task must finish before the predecessor task starts. The lag is capped at 0, preventing the successor from ending after the predecessor begins. ```typescript { taskId: 'A', type: 'SF', lag: 0 } ``` -------------------------------- ### Basic Gantt Chart Implementation in React Source: https://github.com/simon100500/gantt-lib/blob/master/README.md This example demonstrates how to integrate the GanttChart component into a React application. It includes initial task data and handles task changes via the onTasksChange prop. Ensure 'gantt-lib/styles.css' is imported for styling. ```tsx import { GanttChart, type Task } from 'gantt-lib'; import 'gantt-lib/styles.css'; import { useState } from 'react'; const initialTasks: Task[] = [ { id: '1', name: 'Планирование спринта', startDate: '2026-02-01', endDate: '2026-02-07', color: '#3b82f6', }, { id: '2', name: 'Разработка', startDate: '2026-02-08', endDate: '2026-02-20', }, ]; export default function App() { const [tasks, setTasks] = useState(initialTasks); return ( setTasks((prev) => { const byId = new Map(prev.map((task) => [task.id, task])); for (const task of changed) { byId.set(task.id, task); } return [...byId.values()]; }) } /> ); } ``` -------------------------------- ### View Mode Selector for Timeline Scale Source: https://context7.com/simon100500/gantt-lib/llms.txt This example shows how to control the timeline scale using the `viewMode` prop, allowing users to switch between 'day', 'week', and 'month' views. It also demonstrates adjusting `dayWidth` based on the selected view mode. ```tsx import { useState } from 'react'; import { GanttChart } from 'gantt-lib'; import 'gantt-lib/styles.css'; export default function ViewModeSelector({ tasks }) { const [viewMode, setViewMode] = useState<'day' | 'week' | 'month'>('day'); return ( <>
); } ``` -------------------------------- ### FF - Finish-to-Finish Dependency Example Source: https://github.com/simon100500/gantt-lib/blob/master/docs/reference/03-dependencies.md Shows the Finish-to-Finish dependency, where a successor task must finish after the predecessor task finishes. This type allows for negative lag, meaning the successor can finish before the predecessor. ```typescript { taskId: 'A', type: 'FF', lag: -1 } ``` -------------------------------- ### Creating a Milestone Task Source: https://github.com/simon100500/gantt-lib/blob/master/docs/reference/02-task-interface.md Example of creating a milestone task. Milestones are single-date events represented by a diamond shape. Ensure startDate and endDate are the same for milestones. ```typescript const milestone: Task = { id: 'approval', name: 'Approval complete', startDate: '2026-04-12', endDate: '2026-04-12', type: 'milestone', }; ``` -------------------------------- ### Import Existing Gantt-Lib Functionality Source: https://github.com/simon100500/gantt-lib/blob/master/docs/reference/14-headless-scheduling.md Demonstrates how existing imports from 'gantt-lib' continue to work without changes, utilizing re-exports. ```typescript import { universalCascade, calculateSuccessorDate } from 'gantt-lib'; // Работает как раньше — через re-export цепочку ``` -------------------------------- ### Resource Planner Component Implementation Source: https://context7.com/simon100500/gantt-lib/llms.txt Implement the Resource Planner mode using the GanttChart component for visualizing and managing resource schedules. This requires importing the GanttChart component and its CSS, and defining resource data structures. ```tsx import { useState } from 'react'; import { GanttChart, type ResourceTimelineResource, type ResourceTimelineMove } from 'gantt-lib'; import 'gantt-lib/styles.css'; type MyItem = { id: string; resourceId: string; title: string; subtitle?: string; startDate: string; endDate: string; color?: string }; const initialResources: ResourceTimelineResource[] = [ { id: 'team-a', name: 'Команда A', type: 'Люди', scope: 'Project', items: [ { id: 'b1', resourceId: 'team-a', title: 'Разработка', subtitle: 'Спринт 1', startDate: '2026-04-01', endDate: '2026-04-14', color: '#2563eb' }, { id: 'b2', resourceId: 'team-a', title: 'Тестирование', startDate: '2026-04-15', endDate: '2026-04-21' }, ], }, { id: 'excavator', name: 'Экскаватор #3', type: 'Оборудование', items: [ { id: 'e1', resourceId: 'excavator', title: 'Котлован', startDate: '2026-04-01', endDate: '2026-04-05', color: '#d97706' }, ], }, ]; export default function ResourceSchedule() { const [resources, setResources] = useState(initialResources); return ( ) => { // move: { item, fromResourceId, toResourceId, startDate, endDate, changeType } setResources(prev => prev.map(r => ({ ...r, items: r.id === move.fromResourceId ? r.items.filter(i => i.id !== move.item.id) : r.id === move.toResourceId ? [...r.items, { ...move.item, resourceId: r.id, startDate: move.startDate, endDate: move.endDate }] : r.items, }))); }} renderItem={(item) => (
{item.title} {item.subtitle && · {item.subtitle}}
)} onAddResource={(res) => setResources(prev => [...prev, res])} enableAddResource={true} /> ); } ``` -------------------------------- ### Direct Import of Scheduling Logic Source: https://github.com/simon100500/gantt-lib/blob/master/docs/reference/14-headless-scheduling.md Shows how downstream projects can import only the scheduling logic directly from 'gantt-lib/core/scheduling', avoiding UI dependencies. ```typescript import { calculateSuccessorDate, universalCascade, moveTaskRange, validateDependencies, } from 'gantt-lib/core/scheduling'; ``` -------------------------------- ### Scheduling API with Domain Types Source: https://github.com/simon100500/gantt-lib/blob/master/CHANGELOG.ru.md Introduces the API for command-level scheduling, including domain types for tasks, results, and options. Use this for implementing custom scheduling logic. ```typescript ScheduleTask, ScheduleCommandResult, ScheduleCommandOptions ``` -------------------------------- ### Task Context Menu and Duplication Source: https://github.com/simon100500/gantt-lib/blob/master/CHANGELOG.ru.md Implements a context menu for task actions, improves task demotion logic, and enables task duplication. Also introduces task color selection for tasks and their descendants. ```typescript Context menu for task actions ``` ```typescript Task duplication ``` ```typescript Color selection for tasks and their descendants ``` -------------------------------- ### Direct Import from core/scheduling Source: https://github.com/simon100500/gantt-lib/blob/master/docs/reference/14-headless-scheduling.md Downstream projects can import only the scheduling logic directly from 'gantt-lib/core/scheduling', avoiding UI dependencies like React and DOM. ```APIDOC ## Direct Import from core/scheduling ### Description Allows importing scheduling logic directly without UI dependencies. ### Usage ```typescript import { calculateSuccessorDate, universalCascade, moveTaskRange, validateDependencies, } from 'gantt-lib/core/scheduling'; ``` ``` -------------------------------- ### Tree-shakeable Scheduling Core Import Source: https://github.com/simon100500/gantt-lib/blob/master/CHANGELOG.ru.md Adds a subpath export for the scheduling core in package.json. This enables tree-shaking for more efficient bundle sizes when importing scheduling functionalities. ```json "./core/scheduling" ``` -------------------------------- ### TaskList Column Width Handling Source: https://github.com/simon100500/gantt-lib/blob/master/CHANGELOG.ru.md Updates the handling of task list width and default values for better responsiveness. Minimum width is now 530px, and CSS variables are used instead of fixed values. ```css Minimum task list width changed from 640px to 530px Used CSS variables for task list width instead of fixed values ``` -------------------------------- ### Ref API (GanttChartHandle) Source: https://context7.com/simon100500/gantt-lib/llms.txt Programmatic control of the Gantt chart via `useRef`. Methods include scrolling to today, to a task, to a row, collapsing/expanding all, and exporting to PDF. ```APIDOC ## Ref API (GanttChartHandle) ### Description Programmatic control of the Gantt chart via `useRef`. Methods include scrolling to today, to a task, to a row, collapsing/expanding all, and exporting to PDF. ### Methods - `scrollToToday()`: Scrolls the chart to the current date. - `scrollToTask(taskId)`: Scrolls the chart to the specified task. - `scrollToRow(taskId, options)`: Scrolls the chart to the specified row with optional clear selection after a delay. - `collapseAll()`: Collapses all expandable items in the chart. - `expandAll()`: Expands all collapsed items in the chart. - `exportToPdf(options)`: Exports the Gantt chart to a PDF file with customizable options. ### `exportToPdf` Options - `orientation` (string): 'landscape' or 'portrait'. - `includeTaskList` (boolean): Whether to include the task list in the PDF. - `includeChart` (boolean): Whether to include the chart itself in the PDF. - `title` (string): The title of the PDF document. - `fileName` (string): The name of the exported PDF file. - `header` (object): Configuration for the PDF header. - `logoUrl` (string): URL of the logo to include in the header. - `serviceName` (string): Name of the service. - `projectName` (string): Name of the project. - `exportDate` (Date): The date of the export. ``` -------------------------------- ### Import GanttChart and CSS Source: https://context7.com/simon100500/gantt-lib/llms.txt Import the GanttChart component and its required CSS styles. The CSS import is mandatory for the component's layout and functionality. ```tsx import { GanttChart, type Task } from 'gantt-lib'; import 'gantt-lib/styles.css'; // ОБЯЗАТЕЛЬНО ``` -------------------------------- ### Command-Level API Source: https://github.com/simon100500/gantt-lib/blob/master/docs/reference/14-headless-scheduling.md High-level commands that encapsulate typical scheduling operations by composing lower-level helpers. These are stable entry points. ```APIDOC ## moveTaskWithCascade ### Description Moves a task to a new start date and recalculates its schedule, including cascading changes through dependencies and lag recalculation. ### Method `moveTaskWithCascade(taskId, newStart, snapshot, options?)` ### Parameters - `taskId` (string) - The ID of the task to move. - `newStart` (Date) - The new start date for the task. - `snapshot` (object) - A snapshot of the current task data. - `options` (object, optional) - Options for the command, such as `businessDays`, `weekendPredicate`, `skipCascade`. ``` ```APIDOC ## resizeTaskWithCascade ### Description Resizes a task by adjusting its start or end date and recalculates its schedule, including cascading changes through dependencies and lag recalculation. ### Method `resizeTaskWithCascade(taskId, anchor, newDate, snapshot, options?)` ### Parameters - `taskId` (string) - The ID of the task to resize. - `anchor` (string) - The anchor point for resizing ('start' or 'end'). - `newDate` (Date) - The new date for the anchor point. - `snapshot` (object) - A snapshot of the current task data. - `options` (object, optional) - Options for the command, such as `businessDays`, `weekendPredicate`, `skipCascade`. ``` ```APIDOC ## recalculateTaskFromDependencies ### Description Recalculates the dates of a specific task based on the constraints of its predecessor tasks. ### Method `recalculateTaskFromDependencies(taskId, snapshot, options?)` ### Parameters - `taskId` (string) - The ID of the task to recalculate. - `snapshot` (object) - A snapshot of the current task data. - `options` (object, optional) - Options for the command, such as `businessDays`, `weekendPredicate`, `skipCascade`. ``` ```APIDOC ## recalculateProjectSchedule ### Description Performs a full recalculation of all tasks within a project snapshot. ### Method `recalculateProjectSchedule(snapshot, options?)` ### Parameters - `snapshot` (object) - A snapshot of the current task data for the entire project. - `options` (object, optional) - Options for the command, such as `businessDays`, `weekendPredicate`, `skipCascade`. ``` -------------------------------- ### dateMath.ts - Date Utility Functions Source: https://github.com/simon100500/gantt-lib/blob/master/docs/reference/14-headless-scheduling.md Offers pure functions for date manipulation, including constants and utilities for business day calculations. ```APIDOC ## dateMath.ts - Date Utility Functions ### Description Provides a set of pure functions for date calculations, including constants and utilities for working with business days and time. ### Constants - **DAY_MS** (`const 86400000`): Milliseconds in a day. ### Functions - **normalizeUTCDate** (`(date: Date) => Date`): Normalizes a date to UTC midnight. - **parseDateOnly** (`(date: string | Date) => Date`): Parses an ISO string or Date object into a UTC Date. - **getBusinessDayOffset** (`(from, to, weekendPredicate?) => number`): Calculates the offset in business days between two dates. - **shiftBusinessDayOffset** (`(date, offset, weekendPredicate?) => Date`): Shifts a date by a specified number of business days. - **alignToWorkingDay** (`(date, direction, weekendPredicate?) => Date`): Aligns a date to the nearest working day (forward or backward). - **getTaskDuration** (`(start, end, businessDays?, weekendPredicate?) => number`): Calculates the duration of a task in days, considering business days. ``` -------------------------------- ### Dependency Types Semantics Source: https://github.com/simon100500/gantt-lib/blob/master/docs/reference/03-dependencies.md Explains the standard project management link type semantics for task dependencies, including rules, lag formulas, and constrained edges. ```APIDOC ## Dependency Types Semantics ### Description Details the standard project management link types used for task dependencies. ### FS — Finish-to-Start - **Full name**: Finish-to-Start - **Rule**: `B.startDate >= A.endDate + lag` - **Lag formula**: `lag = startB - endA`, clamped to `0`. Negative lag is treated as invalid and reset to `0`. - **Constrained edge**: Left edge (`startDate`) of successor B. - **Example**: `{ taskId: 'A', type: 'FS', lag: 0 }` — B starts on or after A ends. ### SS — Start-to-Start - **Full name**: Start-to-Start - **Rule**: `B.startDate >= A.startDate + lag` - **Lag formula**: `lag = startB - startA` (floored at 0; SS lag is never negative). - **Constrained edge**: Left edge (`startDate`) of successor B. - **Example**: `{ taskId: 'A', type: 'SS', lag: 2 }` — B starts at least 2 days after A starts. ### FF — Finish-to-Finish - **Full name**: Finish-to-Finish - **Rule**: `B.endDate >= A.endDate + lag` (lag can be negative). - **Lag formula**: `lag = endB - endA` (can be negative). - **Constrained edge**: Right edge (`endDate`) of successor B. - **Example**: `{ taskId: 'A', type: 'FF', lag: -1 }` — B ends 1 day before A ends. ### SF — Start-to-Finish - **Full name**: Start-to-Finish - **Rule**: `B.endDate <= A.startDate + lag` (lag always <= 0). - **Lag formula**: `lag = endB - startA + 1 day` (ceiling at 0; SF lag is never positive). - **Constrained edge**: Right edge (`endDate`) of successor B — B must finish before A starts. - **Example**: `{ taskId: 'A', type: 'SF', lag: 0 }` — B ends adjacent to or before A starts. ``` -------------------------------- ### Enable Auto Scheduling with Dependencies Source: https://context7.com/simon100500/gantt-lib/llms.txt Use `enableAutoSchedule={true}` to automatically shift successor tasks when a predecessor is moved. The `onCascade` callback is used for hard-mode cascading changes, bypassing `onTasksChange`. ```tsx import { useState } from 'react'; import { GanttChart, type Task } from 'gantt-lib'; import 'gantt-lib/styles.css'; const tasks: Task[] = [ { id: 'A', name: 'Задача A', startDate: '2026-03-01', endDate: '2026-03-05' }, { id: 'B', name: 'Задача B (FS)', startDate: '2026-03-06', endDate: '2026-03-12', dependencies: [{ taskId: 'A', type: 'FS', lag: 0 }], }, { id: 'C', name: 'Задача C (SS+2)', startDate: '2026-03-03', endDate: '2026-03-10', dependencies: [{ taskId: 'A', type: 'SS', lag: 2 }], }, { id: 'D', name: 'Задача D (FF-1)', startDate: '2026-03-02', endDate: '2026-03-04', dependencies: [{ taskId: 'A', type: 'FF', lag: -1 }], }, ]; export default function AutoSchedule() { const [taskList, setTaskList] = useState(tasks); return ( { // срабатывает для некаскадных изменений (редактирование, resize листа) setTaskList(prev => { const map = new Map(changed.map(t => [t.id, t])); return prev.map(t => map.get(t.id) ?? t); }); }} onCascade={(shifted) => { // срабатывает вместо onTasksChange при каскаде setTaskList(prev => { const map = new Map(shifted.map(t => [t.id, t])); return prev.map(t => map.get(t.id) ?? t); }); }} onValidateDependencies={(result) => { if (!result.isValid) { result.errors.forEach(err => console.warn(`[${err.type}] Задача ${err.taskId}: ${err.message}`) ); } }} showTaskList={true} /> ); } ``` -------------------------------- ### Working Day Utilities Source: https://context7.com/simon100500/gantt-lib/llms.txt Public functions for calculations outside the component. ```APIDOC ## Working Day Utilities ### Description Public functions for calculations outside the component. ### Functions - `getBusinessDaysCount(startDate, endDate)`: Calculates the number of business days between two dates. - `addBusinessDays(date, daysToAdd)`: Adds a specified number of business days to a given date. - `reflowTasksOnModeSwitch(tasks, toBusinessDays, predicate)`: Recalculates task dates when switching modes (e.g., business days on/off). - `createCustomDayPredicate(options)`: Creates a predicate function for custom days based on provided options. ``` -------------------------------- ### Date Math Constants and Functions Source: https://github.com/simon100500/gantt-lib/blob/master/docs/reference/14-headless-scheduling.md Provides utility functions and constants for date manipulation, including normalization, business day calculations, and duration. ```typescript // Миллисекунд в сутках const DAY_MS = 86400000; // Приводит дату к UTC midnight function normalizeUTCDate(date: Date): Date; // Парсит ISO-строку в UTC Date function parseDateOnly(date: string | Date): Date; // Offset в рабочих днях function getBusinessDayOffset(from, to, weekendPredicate?): number; // Сдвигает дату на offset рабочих дней function shiftBusinessDayOffset(date, offset, weekendPredicate?): Date; // Приводит к рабочему дню (вперёд/назад) function alignToWorkingDay(date, direction, weekendPredicate?): Date; // Длительность задачи в днях function getTaskDuration(start, end, businessDays?, weekendPredicate?): number; ``` -------------------------------- ### Task Reflow Utility Source: https://github.com/simon100500/gantt-lib/blob/master/CHANGELOG.ru.md Introduces the `reflowTasksOnModeSwitch` utility for recalculating task dates when switching between working and calendar days. Useful for maintaining schedule integrity during mode changes. ```typescript reflowTasksOnModeSwitch ``` -------------------------------- ### dependencies.ts - Dependency Calculation Source: https://github.com/simon100500/gantt-lib/blob/master/docs/reference/14-headless-scheduling.md Handles the calculation of successor task dates based on various dependency link types (FS, SS, FF, SF) and lag values. ```APIDOC ## dependencies.ts - Dependency Calculation ### Description Manages the calculation of successor task dates based on different dependency link types (FS, SS, FF, SF) and lag values, including normalization. ### Functions - **getDependencyLag(dep)**: Returns the lag value of a dependency. - **normalizeDependencyLag(linkType, lag, predStart, predEnd, businessDays?, weekendPredicate?)**: Normalizes the lag value based on the link type. For FS links, lag is clamped to be non-negative. Other link types remain unchanged. - **calculateSuccessorDate(predStart, predEnd, linkType, lag?, businessDays?, weekendPredicate?)**: Calculates the successor date based on predecessor dates, link type, and lag. Specific calculations: FS (predEnd + lag + 1), SS (predStart + lag), FF (predEnd + lag), SF (predStart + lag - 1). - **computeLagFromDates(linkType, predStart, predEnd, succStart, succEnd, businessDays?, weekendPredicate?)**: Computes the lag value from the given dates and link type. Specific calculations: FS (lag = succStart - predEnd - 1), SS (lag = succStart - predStart), FF (lag = succEnd - predEnd), SF (lag = succEnd - predStart + 1). ``` -------------------------------- ### Configure Custom Working and Non-Working Days Source: https://context7.com/simon100500/gantt-lib/llms.txt Customize the calendar by providing specific dates as `customDays` or a predicate function for `isWeekend`. `customDays` have higher priority than `isWeekend`. This allows for defining holidays and special workdays. ```tsx import { GanttChart } from 'gantt-lib'; import 'gantt-lib/styles.css'; // Российские праздники 2026 const russianHolidays = [ { date: new Date(Date.UTC(2026, 0, 1)), type: 'weekend' as const }, // 1 января { date: new Date(Date.UTC(2026, 1, 23)), type: 'weekend' as const }, // 23 февраля { date: new Date(Date.UTC(2026, 2, 8)), type: 'weekend' as const }, // 8 марта { date: new Date(Date.UTC(2026, 4, 1)), type: 'weekend' as const }, // 1 мая { date: new Date(Date.UTC(2026, 4, 9)), type: 'weekend' as const }, // 9 мая // Рабочие субботы в счёт перенесённых праздников { date: new Date(Date.UTC(2026, 2, 14)), type: 'workday' as const }, // 14 марта (сб) — рабочий ]; export default function RussianCalendar({ tasks }) { return ( [0, 5, 6].includes(date.getUTCDay())} onTasksChange={(changed) => console.log('Изменены задачи:', changed)} /> ); } ``` -------------------------------- ### Headless Scheduling Core Extraction Source: https://github.com/simon100500/gantt-lib/blob/master/CHANGELOG.ru.md Extracts the headless scheduling module as a standalone engine. This allows for independent use and backward-compatible barrel exports. ```typescript `core/scheduling` ``` -------------------------------- ### Task Dragging UI Adapters Source: https://github.com/simon100500/gantt-lib/blob/master/CHANGELOG.ru.md Extracts UI adapters for drag-based scheduling into a dedicated module. This facilitates cleaner separation of concerns for drag interactions. ```typescript adapters/scheduling/drag.ts ``` -------------------------------- ### Cascade Behavior Source: https://github.com/simon100500/gantt-lib/blob/master/docs/reference/03-dependencies.md Describes how dependencies automatically cascade and reschedule tasks when `enableAutoSchedule` is enabled and a predecessor task is modified. ```APIDOC ## Cascade Behavior ### Description Explains the automatic rescheduling of successor tasks when a predecessor task is modified, particularly when `enableAutoSchedule` is active. ### Behavior - When `enableAutoSchedule={true}` and a predecessor task is dragged: - All successor tasks automatically shift to maintain their link constraints. - Dependency lines redraw in real-time during the drag operation. - The `onCascade` event fires instead of `onTasksChange` for cascade events, as they are mutually exclusive per drag event. ```