construction-gantt 0.1.0 → 0.3.0

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.
@@ -8,7 +8,7 @@ function __insertCSS(code) {
8
8
  }
9
9
 
10
10
  import { jsPDF } from 'jspdf';
11
- import { exportPNG } from './png-DKZeKnRh.js';
11
+ import { exportPNG } from './png-C2poOLQo.js';
12
12
 
13
13
  // Pure-function image-fit math. Used by the PDF exporter to scale the
14
14
  // captured PNG onto a chosen page format with a uniform margin while
@@ -8,7 +8,7 @@ function __insertCSS(code) {
8
8
  }
9
9
 
10
10
  var jspdf = require('jspdf');
11
- var png = require('./png-C8t74695.cjs');
11
+ var png = require('./png-BloW1DDl.cjs');
12
12
 
13
13
  // Pure-function image-fit math. Used by the PDF exporter to scale the
14
14
  // captured PNG onto a chosen page format with a uniform margin while
@@ -29,6 +29,7 @@ async function renderOffscreen(args) {
29
29
  cellHeight: ganttProps.cellHeight,
30
30
  markers: ganttProps.markers,
31
31
  baselineIndex: ganttProps.baselineIndex,
32
+ baselineIndices: ganttProps.baselineIndices,
32
33
  showBaselineBars: ganttProps.showBaselineBars,
33
34
  columns: ganttProps.columns,
34
35
  visibleTaskIds: ganttProps.visibleTaskIds,
@@ -29,6 +29,7 @@ async function renderOffscreen(args) {
29
29
  cellHeight: ganttProps.cellHeight,
30
30
  markers: ganttProps.markers,
31
31
  baselineIndex: ganttProps.baselineIndex,
32
+ baselineIndices: ganttProps.baselineIndices,
32
33
  showBaselineBars: ganttProps.showBaselineBars,
33
34
  columns: ganttProps.columns,
34
35
  visibleTaskIds: ganttProps.visibleTaskIds,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "construction-gantt",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "MIT React Gantt for construction project management — PRO-equivalent scheduling engine + construction-vertical extensions on free SVAR React Gantt",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -83,4 +83,4 @@
83
83
  "typecheck": "tsc --noEmit",
84
84
  "test": "vitest run --project=unit"
85
85
  }
86
- }
86
+ }
package/src/Gantt.css CHANGED
@@ -21,3 +21,80 @@
21
21
  color: #ffffff;
22
22
  font-weight: 500;
23
23
  }
24
+
25
+ /* Phantom baseline-row styling. Each row gets `.bode-baseline-ghost`
26
+ * plus a `.bode-baseline-${N}` class identifying WHICH baseline.
27
+ * Consumers override colours by re-declaring `.bode-baseline-N` with
28
+ * higher specificity or `!important`. */
29
+ .bode-baseline-ghost {
30
+ display: flex;
31
+ align-items: center;
32
+ gap: 6px;
33
+ height: 60%;
34
+ margin-top: 15%;
35
+ padding: 0 8px;
36
+ border-radius: 3px;
37
+ font-size: 9px;
38
+ font-style: italic;
39
+ color: #ffffff;
40
+ opacity: 0.85;
41
+ white-space: nowrap;
42
+ }
43
+
44
+ /* Per-baseline palette. Picked for distinguishability + colourblind-
45
+ * friendly ordering: greys → cool blues → warm reds for higher indices.
46
+ * Consumers override by re-declaring with higher specificity or `!important`.
47
+ *
48
+ * Lighter backgrounds (amber, lime, cyan, teal, orange) override the default
49
+ * white text to slate `#0f172a` so the small italic label remains legible
50
+ * (WCAG AA 4.5:1 for small text). Darker backgrounds keep the ghost rule's
51
+ * white text. */
52
+ .bode-baseline-0 { background: #6b7280; } /* gray */
53
+ .bode-baseline-1 { background: #3b82f6; } /* blue */
54
+ .bode-baseline-2 { background: #8b5cf6; } /* violet */
55
+ .bode-baseline-3 { background: #14b8a6; color: #0f172a; } /* teal */
56
+ .bode-baseline-4 { background: #f59e0b; color: #0f172a; } /* amber */
57
+ .bode-baseline-5 { background: #ec4899; } /* pink */
58
+ .bode-baseline-6 { background: #06b6d4; color: #0f172a; } /* cyan */
59
+ .bode-baseline-7 { background: #84cc16; color: #0f172a; } /* lime */
60
+ .bode-baseline-8 { background: #f97316; color: #0f172a; } /* orange */
61
+ .bode-baseline-9 { background: #a855f7; } /* purple */
62
+ .bode-baseline-10 { background: #dc2626; } /* red */
63
+
64
+ /* Edit preview ghost bar — shows live CPM cascade preview while editing.
65
+ * Matches baseline ghost sizing (60% height, 15% top margin) so preview
66
+ * phantoms read as secondary/tentative alongside the live bar. */
67
+ .bode-edit-preview {
68
+ height: 60%;
69
+ margin-top: 15%;
70
+ background: repeating-linear-gradient(
71
+ 45deg,
72
+ rgba(59, 130, 246, 0.35) 0px,
73
+ rgba(59, 130, 246, 0.35) 6px,
74
+ rgba(59, 130, 246, 0.15) 6px,
75
+ rgba(59, 130, 246, 0.15) 12px
76
+ );
77
+ border: 1.5px dashed rgba(59, 130, 246, 0.7);
78
+ border-radius: 3px;
79
+ pointer-events: none;
80
+ }
81
+
82
+ /* Drag handle — appears at right edge of task bar in editMode */
83
+ .construction-gantt-drag-handle {
84
+ position: absolute;
85
+ right: -5px;
86
+ top: 50%;
87
+ transform: translateY(-50%);
88
+ width: 10px;
89
+ height: 10px;
90
+ border-radius: 50%;
91
+ background: rgba(59, 130, 246, 0.85);
92
+ cursor: crosshair;
93
+ opacity: 0;
94
+ transition: opacity 0.15s;
95
+ z-index: 10;
96
+ }
97
+
98
+ .wx-task:hover .construction-gantt-drag-handle {
99
+ opacity: 1;
100
+ }