@libxai/board 1.5.15 → 1.5.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -38,6 +38,15 @@ interface Task {
38
38
  isExpanded?: boolean;
39
39
  isMilestone?: boolean;
40
40
  isCriticalPath?: boolean;
41
+ cpmData?: {
42
+ earlyStart: number;
43
+ earlyFinish: number;
44
+ lateStart: number;
45
+ lateFinish: number;
46
+ totalFloat: number;
47
+ freeFloat: number;
48
+ isCritical: boolean;
49
+ };
41
50
  color?: string;
42
51
  priority?: 'low' | 'medium' | 'high' | 'urgent';
43
52
  tags?: TaskTag[];
@@ -2752,12 +2761,13 @@ interface GanttToolbarProps {
2752
2761
  showBaseline?: boolean;
2753
2762
  onShowBaselineChange?: (show: boolean) => void;
2754
2763
  onCopySnapshotLink?: () => void;
2764
+ hasDependencies?: boolean;
2755
2765
  }
2756
2766
  declare function GanttToolbar({ theme, timeScale, onTimeScaleChange, zoom, onZoomChange, currentTheme, onThemeChange, rowDensity, onRowDensityChange, showThemeSelector, // v0.17.29: Default to false - themes should be in app settings
2757
2767
  showCreateTaskButton, createTaskLabel, // v0.15.0: Will use translations if not provided
2758
2768
  onCreateTask, taskFilter, // v0.17.300: Task filter
2759
2769
  onTaskFilterChange, hideCompleted, // v0.18.0: Hide completed toggle
2760
- onHideCompletedChange, toolbarRightContent, wbsLevel, onWbsLevelChange, maxWbsDepth, viewMode, onViewModeChange, projectForecast, onExportPNG, onExportPDF, onExportExcel, onExportCSV, onExportJSON, onExportMSProject, showCriticalPath, onShowCriticalPathChange, showDependencies, onShowDependenciesChange, highlightWeekends, onHighlightWeekendsChange, showBaseline, onShowBaselineChange, onCopySnapshotLink, }: GanttToolbarProps): react_jsx_runtime.JSX.Element;
2770
+ onHideCompletedChange, toolbarRightContent, wbsLevel, onWbsLevelChange, maxWbsDepth, viewMode, onViewModeChange, projectForecast, onExportPNG, onExportPDF, onExportExcel, onExportCSV, onExportJSON, onExportMSProject, showCriticalPath, onShowCriticalPathChange, showDependencies, onShowDependenciesChange, highlightWeekends, onHighlightWeekendsChange, showBaseline, onShowBaselineChange, onCopySnapshotLink, hasDependencies, }: GanttToolbarProps): react_jsx_runtime.JSX.Element;
2761
2771
 
2762
2772
  interface TaskGridProps {
2763
2773
  tasks: Task[];
@@ -2791,13 +2801,15 @@ interface TaskGridProps {
2791
2801
  onDeleteRequest?: (taskId: string, taskName: string) => void;
2792
2802
  onTaskReparent?: (taskId: string, newParentId: string | null, position?: number) => void;
2793
2803
  scrollContainerRef?: React.RefObject<HTMLElement>;
2804
+ showCriticalPath?: boolean;
2794
2805
  }
2795
2806
  declare function TaskGrid({ tasks, theme, rowHeight: ROW_HEIGHT, availableUsers, templates: _templates, // TODO: Use templates for custom rendering
2796
2807
  onTaskClick, onTaskDblClick, // v0.8.0
2797
2808
  onTaskContextMenu, // v0.8.0
2798
2809
  onTaskToggle, scrollTop: _scrollTop, columns, onToggleColumn, onColumnResize, onTaskUpdate, onTaskIndent, onTaskOutdent, onTaskMove, onMultiTaskDelete, onTaskDuplicate, onTaskCreate, onTaskRename, onCreateSubtask, onOpenTaskModal, onDeleteRequest, // v0.17.34
2799
2810
  onTaskReparent, // v0.17.68
2800
- scrollContainerRef, }: TaskGridProps): react_jsx_runtime.JSX.Element;
2811
+ scrollContainerRef, // v0.18.15
2812
+ showCriticalPath, }: TaskGridProps): react_jsx_runtime.JSX.Element;
2801
2813
 
2802
2814
  interface TimelineProps {
2803
2815
  tasks: Task[];
@@ -2889,6 +2901,9 @@ interface DependencyLineProps {
2889
2901
  isHoverLayer?: boolean;
2890
2902
  onHoverChange?: (isHovered: boolean) => void;
2891
2903
  hoverOverlayOnly?: boolean;
2904
+ colorOverride?: string;
2905
+ strokeWidthOverride?: number;
2906
+ glowFilter?: string;
2892
2907
  }
2893
2908
  /**
2894
2909
  * v0.17.364: TRUE ClickUp-style dependency line routing
@@ -2908,7 +2923,7 @@ interface DependencyLineProps {
2908
2923
  * The vertical segment must still be LEFT of destination: turnX = x2 - OFFSET
2909
2924
  * Path: right → horizontal past source → down/up → LEFT back to destination
2910
2925
  */
2911
- declare function DependencyLine({ x1, y1, x2, y2, theme, onDelete, lineStyle, isHoverLayer, onHoverChange, hoverOverlayOnly, }: DependencyLineProps): react_jsx_runtime.JSX.Element;
2926
+ declare function DependencyLine({ x1, y1, x2, y2, theme, onDelete, lineStyle, isHoverLayer, onHoverChange, hoverOverlayOnly, colorOverride, strokeWidthOverride, glowFilter, }: DependencyLineProps): react_jsx_runtime.JSX.Element;
2912
2927
 
2913
2928
  interface MilestoneProps {
2914
2929
  task: Task;
@@ -3348,6 +3363,19 @@ declare const ganttUtils: {
3348
3363
  * @returns Array of task IDs on the critical path
3349
3364
  */
3350
3365
  calculateCriticalPath: (tasks: Task[]) => string[];
3366
+ /**
3367
+ * v5.1.0: Full CPM calculation — returns ES/EF/LS/LF/TF/FF per task
3368
+ * Used by GanttBoard to enrich tasks with cpmData for visual rendering
3369
+ */
3370
+ calculateCriticalPathFull: (tasks: Task[]) => Map<string, {
3371
+ earlyStart: number;
3372
+ earlyFinish: number;
3373
+ lateStart: number;
3374
+ lateFinish: number;
3375
+ totalFloat: number;
3376
+ freeFloat: number;
3377
+ isCritical: boolean;
3378
+ }>;
3351
3379
  /**
3352
3380
  * Calculate slack (float) time for a task
3353
3381
  * @param tasks - All tasks
package/dist/index.d.ts CHANGED
@@ -38,6 +38,15 @@ interface Task {
38
38
  isExpanded?: boolean;
39
39
  isMilestone?: boolean;
40
40
  isCriticalPath?: boolean;
41
+ cpmData?: {
42
+ earlyStart: number;
43
+ earlyFinish: number;
44
+ lateStart: number;
45
+ lateFinish: number;
46
+ totalFloat: number;
47
+ freeFloat: number;
48
+ isCritical: boolean;
49
+ };
41
50
  color?: string;
42
51
  priority?: 'low' | 'medium' | 'high' | 'urgent';
43
52
  tags?: TaskTag[];
@@ -2752,12 +2761,13 @@ interface GanttToolbarProps {
2752
2761
  showBaseline?: boolean;
2753
2762
  onShowBaselineChange?: (show: boolean) => void;
2754
2763
  onCopySnapshotLink?: () => void;
2764
+ hasDependencies?: boolean;
2755
2765
  }
2756
2766
  declare function GanttToolbar({ theme, timeScale, onTimeScaleChange, zoom, onZoomChange, currentTheme, onThemeChange, rowDensity, onRowDensityChange, showThemeSelector, // v0.17.29: Default to false - themes should be in app settings
2757
2767
  showCreateTaskButton, createTaskLabel, // v0.15.0: Will use translations if not provided
2758
2768
  onCreateTask, taskFilter, // v0.17.300: Task filter
2759
2769
  onTaskFilterChange, hideCompleted, // v0.18.0: Hide completed toggle
2760
- onHideCompletedChange, toolbarRightContent, wbsLevel, onWbsLevelChange, maxWbsDepth, viewMode, onViewModeChange, projectForecast, onExportPNG, onExportPDF, onExportExcel, onExportCSV, onExportJSON, onExportMSProject, showCriticalPath, onShowCriticalPathChange, showDependencies, onShowDependenciesChange, highlightWeekends, onHighlightWeekendsChange, showBaseline, onShowBaselineChange, onCopySnapshotLink, }: GanttToolbarProps): react_jsx_runtime.JSX.Element;
2770
+ onHideCompletedChange, toolbarRightContent, wbsLevel, onWbsLevelChange, maxWbsDepth, viewMode, onViewModeChange, projectForecast, onExportPNG, onExportPDF, onExportExcel, onExportCSV, onExportJSON, onExportMSProject, showCriticalPath, onShowCriticalPathChange, showDependencies, onShowDependenciesChange, highlightWeekends, onHighlightWeekendsChange, showBaseline, onShowBaselineChange, onCopySnapshotLink, hasDependencies, }: GanttToolbarProps): react_jsx_runtime.JSX.Element;
2761
2771
 
2762
2772
  interface TaskGridProps {
2763
2773
  tasks: Task[];
@@ -2791,13 +2801,15 @@ interface TaskGridProps {
2791
2801
  onDeleteRequest?: (taskId: string, taskName: string) => void;
2792
2802
  onTaskReparent?: (taskId: string, newParentId: string | null, position?: number) => void;
2793
2803
  scrollContainerRef?: React.RefObject<HTMLElement>;
2804
+ showCriticalPath?: boolean;
2794
2805
  }
2795
2806
  declare function TaskGrid({ tasks, theme, rowHeight: ROW_HEIGHT, availableUsers, templates: _templates, // TODO: Use templates for custom rendering
2796
2807
  onTaskClick, onTaskDblClick, // v0.8.0
2797
2808
  onTaskContextMenu, // v0.8.0
2798
2809
  onTaskToggle, scrollTop: _scrollTop, columns, onToggleColumn, onColumnResize, onTaskUpdate, onTaskIndent, onTaskOutdent, onTaskMove, onMultiTaskDelete, onTaskDuplicate, onTaskCreate, onTaskRename, onCreateSubtask, onOpenTaskModal, onDeleteRequest, // v0.17.34
2799
2810
  onTaskReparent, // v0.17.68
2800
- scrollContainerRef, }: TaskGridProps): react_jsx_runtime.JSX.Element;
2811
+ scrollContainerRef, // v0.18.15
2812
+ showCriticalPath, }: TaskGridProps): react_jsx_runtime.JSX.Element;
2801
2813
 
2802
2814
  interface TimelineProps {
2803
2815
  tasks: Task[];
@@ -2889,6 +2901,9 @@ interface DependencyLineProps {
2889
2901
  isHoverLayer?: boolean;
2890
2902
  onHoverChange?: (isHovered: boolean) => void;
2891
2903
  hoverOverlayOnly?: boolean;
2904
+ colorOverride?: string;
2905
+ strokeWidthOverride?: number;
2906
+ glowFilter?: string;
2892
2907
  }
2893
2908
  /**
2894
2909
  * v0.17.364: TRUE ClickUp-style dependency line routing
@@ -2908,7 +2923,7 @@ interface DependencyLineProps {
2908
2923
  * The vertical segment must still be LEFT of destination: turnX = x2 - OFFSET
2909
2924
  * Path: right → horizontal past source → down/up → LEFT back to destination
2910
2925
  */
2911
- declare function DependencyLine({ x1, y1, x2, y2, theme, onDelete, lineStyle, isHoverLayer, onHoverChange, hoverOverlayOnly, }: DependencyLineProps): react_jsx_runtime.JSX.Element;
2926
+ declare function DependencyLine({ x1, y1, x2, y2, theme, onDelete, lineStyle, isHoverLayer, onHoverChange, hoverOverlayOnly, colorOverride, strokeWidthOverride, glowFilter, }: DependencyLineProps): react_jsx_runtime.JSX.Element;
2912
2927
 
2913
2928
  interface MilestoneProps {
2914
2929
  task: Task;
@@ -3348,6 +3363,19 @@ declare const ganttUtils: {
3348
3363
  * @returns Array of task IDs on the critical path
3349
3364
  */
3350
3365
  calculateCriticalPath: (tasks: Task[]) => string[];
3366
+ /**
3367
+ * v5.1.0: Full CPM calculation — returns ES/EF/LS/LF/TF/FF per task
3368
+ * Used by GanttBoard to enrich tasks with cpmData for visual rendering
3369
+ */
3370
+ calculateCriticalPathFull: (tasks: Task[]) => Map<string, {
3371
+ earlyStart: number;
3372
+ earlyFinish: number;
3373
+ lateStart: number;
3374
+ lateFinish: number;
3375
+ totalFloat: number;
3376
+ freeFloat: number;
3377
+ isCritical: boolean;
3378
+ }>;
3351
3379
  /**
3352
3380
  * Calculate slack (float) time for a task
3353
3381
  * @param tasks - All tasks