vlite3 1.4.24 → 1.4.25

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.
Files changed (29) hide show
  1. package/components/AppShell/AppShell.vue.d.ts +2 -0
  2. package/components/AppShell/AppShell.vue.js +11 -9
  3. package/components/AppShell/AppShellLayoutClassic.vue.js +34 -32
  4. package/components/AppShell/AppShellLayoutDashboard.vue.js +51 -49
  5. package/components/AppShell/AppShellLayoutDock.vue.js +52 -50
  6. package/components/AppShell/AppShellLayoutHeaderShell.vue.js +56 -54
  7. package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +51 -49
  8. package/components/AppShell/AppShellLayoutStorefront.vue.js +40 -38
  9. package/components/AppShell/useAppShell.js +1 -1
  10. package/components/CategoryManager/CategoryManager.vue2.js +2 -2
  11. package/components/Chart/GanttChart.vue.js +1 -1
  12. package/components/Chart/GanttChart.vue2.js +367 -364
  13. package/components/Chart/types.d.ts +2 -0
  14. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  15. package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
  16. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  17. package/components/Form/Form.vue.js +1 -1
  18. package/components/Form/Form.vue2.js +131 -127
  19. package/components/NavbarCommandPalette.vue.js +1 -1
  20. package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
  21. package/components/RichTextEditor/RichTextLinkPopover.vue3.js +2 -2
  22. package/components/RichTextEditor/RichTextToolbar.vue3.js +2 -2
  23. package/components/Screen/ScreenFilter.vue.js +2 -2
  24. package/package.json +1 -1
  25. package/style.css +1 -1
  26. package/types/appshell.type.d.ts +2 -0
  27. /package/components/Dropdown/{DropdownMenu.vue2.js → DropdownMenu.vue3.js} +0 -0
  28. /package/components/RichTextEditor/{RichTextLinkPopover.vue.js → RichTextLinkPopover.vue2.js} +0 -0
  29. /package/components/RichTextEditor/{RichTextToolbar.vue.js → RichTextToolbar.vue2.js} +0 -0
@@ -1,24 +1,24 @@
1
- import { defineComponent as Ye, ref as k, computed as p, onMounted as et, watch as He, onUnmounted as tt, openBlock as r, createElementBlock as i, createElementVNode as s, createStaticVNode as ot, createCommentVNode as h, normalizeStyle as D, Fragment as $, renderList as L, normalizeClass as xe, toDisplayString as b, unref as E, withDirectives as nt, vShow as lt, createBlock as at, Teleport as st, createTextVNode as ze, nextTick as ke } from "vue";
2
- import { CHART_COLORS as rt, getColor as it, animateProgress as ut } from "./utils.js";
1
+ import { defineComponent as et, ref as x, computed as p, onMounted as tt, watch as ze, onUnmounted as ot, openBlock as u, createElementBlock as d, createElementVNode as r, createStaticVNode as nt, createCommentVNode as h, normalizeStyle as D, Fragment as $, renderList as C, normalizeClass as me, toDisplayString as b, unref as z, withDirectives as lt, vShow as at, createBlock as st, Teleport as rt, createTextVNode as We, nextTick as ke } from "vue";
2
+ import { CHART_COLORS as it, getColor as ut, animateProgress as dt } from "./utils.js";
3
3
  const ct = {
4
4
  key: 0,
5
5
  class: "vlite-gantt-toolbar"
6
- }, dt = {
6
+ }, vt = {
7
7
  key: 0,
8
8
  class: "vlite-gantt-zoom-controls"
9
- }, vt = ["disabled"], ft = ["disabled"], gt = { class: "vlite-gantt-wrapper" }, ht = ["onClick"], yt = { class: "text-xs font-bold text-foreground uppercase tracking-wide" }, mt = { class: "vlite-gantt-group-count" }, xt = ["onClick"], kt = { class: "truncate text-xs font-medium text-foreground" }, pt = {
9
+ }, ft = ["disabled"], gt = ["disabled"], ht = { class: "vlite-gantt-wrapper" }, yt = ["onClick"], mt = { class: "text-xs font-bold text-foreground uppercase tracking-wide" }, kt = { class: "vlite-gantt-group-count" }, xt = ["onClick"], pt = { class: "truncate text-xs font-medium text-foreground" }, wt = {
10
10
  key: 0,
11
11
  class: "vlite-gantt-progress-badge"
12
- }, wt = ["width", "height"], bt = ["x1", "x2", "y2"], $t = ["x", "y"], Dt = ["x", "y"], Mt = ["width", "height"], St = ["id"], Lt = ["stop-color"], Ct = ["stop-color"], _t = ["id"], Ht = ["stop-color"], zt = ["stop-color"], Et = ["x1", "x2", "y2"], Tt = ["y1", "x2", "y2"], Wt = ["y", "width", "height"], It = ["d"], Bt = ["d"], Rt = ["d", "fill", "stroke", "opacity", "onMouseenter", "onMousemove", "onClick"], At = ["d", "fill"], Pt = ["d", "fill"], Zt = ["d", "fill"], Ot = ["x", "y", "width", "height", "onMouseenter", "onMousemove", "onMousedown", "onClick"], Ft = ["x", "y", "width", "height", "rx", "ry"], Gt = ["x", "y", "height"], qt = ["x", "y", "height"], Xt = ["x", "y", "fill", "opacity"], jt = { key: 1 }, Nt = ["x1", "x2", "y2", "stroke"], Vt = ["cx", "fill"], Kt = ["x", "fill"], Ut = { class: "font-semibold text-xs mb-1.5" }, Qt = { class: "flex items-center gap-1.5 text-[11px] text-muted-foreground mb-1" }, Jt = { class: "text-[10px] text-muted-foreground" }, Yt = {
12
+ }, bt = ["width", "height"], $t = ["x1", "x2", "y2"], Mt = ["x", "y"], Dt = ["x", "y"], St = ["width", "height"], Ct = ["id"], Lt = ["stop-color"], _t = ["stop-color"], Ht = ["id"], zt = ["stop-color"], Wt = ["stop-color"], Tt = ["x1", "x2", "y2"], Et = ["y1", "x2", "y2"], It = ["y", "width", "height"], Bt = ["d"], Rt = ["d"], At = ["d", "fill", "stroke", "opacity", "onMouseenter", "onMousemove", "onClick"], Pt = ["d", "fill"], Ft = ["d", "fill"], Zt = ["d", "fill"], Ot = ["x", "y", "width", "height", "onMouseenter", "onMousemove", "onMousedown", "onClick"], Gt = ["x", "y", "width", "height", "rx", "ry"], qt = ["x", "y", "height"], Xt = ["x", "y", "height"], jt = ["x", "y", "fill", "opacity"], Nt = { key: 1 }, Vt = ["x1", "x2", "y2", "stroke"], Ut = ["cx", "fill"], Kt = ["x", "fill"], Qt = { class: "font-semibold text-xs mb-1.5" }, Jt = { class: "flex items-center gap-1.5 text-[11px] text-muted-foreground mb-1" }, Yt = { class: "text-[10px] text-muted-foreground" }, eo = {
13
13
  key: 0,
14
14
  class: "mt-1.5 flex items-center gap-2"
15
- }, eo = { class: "vlite-gantt-tooltip-progress-track" }, to = { class: "text-[10px] font-semibold" }, oo = {
15
+ }, to = { class: "vlite-gantt-tooltip-progress-track" }, oo = { class: "text-[10px] font-semibold" }, no = {
16
16
  key: 1,
17
17
  class: "text-[10px] text-muted-foreground mt-1 opacity-60"
18
- }, no = {
18
+ }, lo = {
19
19
  key: 2,
20
20
  class: "text-[9px] text-muted-foreground mt-1.5 opacity-40"
21
- }, lo = 16, Y = 5, ao = 4, Ee = 8, io = /* @__PURE__ */ Ye({
21
+ }, ao = 16, Y = 5, so = 4, Te = 8, uo = /* @__PURE__ */ et({
22
22
  __name: "GanttChart",
23
23
  props: {
24
24
  tasks: {},
@@ -36,7 +36,7 @@ const ct = {
36
36
  showTodayLine: { type: Boolean, default: !0 },
37
37
  showHeader: { type: Boolean, default: !0 },
38
38
  animate: { type: Boolean, default: !0 },
39
- colors: { default: () => rt },
39
+ colors: { default: () => it },
40
40
  todayColor: { default: "var(--color-danger)" },
41
41
  locale: { default: "en-US" },
42
42
  draggable: { type: Boolean, default: !0 },
@@ -44,85 +44,88 @@ const ct = {
44
44
  zoom: { type: Boolean, default: !0 }
45
45
  },
46
46
  emits: ["task-click", "task-hover", "task-update"],
47
- setup(u, { emit: Te }) {
48
- const c = u, P = Te;
49
- function pe(t) {
47
+ setup(c, { emit: Ee }) {
48
+ const s = c, A = Ee;
49
+ function xe(t) {
50
50
  return t instanceof Date ? new Date(t.getTime()) : new Date(t);
51
51
  }
52
- function q(t, o) {
53
- return (o.getTime() - t.getTime()) / 864e5;
52
+ function X(t, o) {
53
+ const e = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds());
54
+ return (Date.UTC(o.getFullYear(), o.getMonth(), o.getDate(), o.getHours(), o.getMinutes(), o.getSeconds()) - e) / 864e5;
54
55
  }
55
56
  function y(t, o) {
56
57
  const e = new Date(t);
57
58
  return e.setDate(e.getDate() + o), e;
58
59
  }
59
- function We(t) {
60
+ function Ie(t) {
60
61
  const o = new Date(t), e = o.getDay();
61
62
  return o.setDate(o.getDate() - (e === 0 ? 6 : e - 1)), o.setHours(0, 0, 0, 0), o;
62
63
  }
63
- function Ie(t) {
64
+ function Be(t) {
64
65
  return new Date(t.getFullYear(), t.getMonth(), 1);
65
66
  }
66
- const X = k(), C = k(), ee = k(800);
67
- let te = null;
68
- function Be() {
69
- X.value && (te = new ResizeObserver((t) => {
70
- ee.value = t[0].contentRect.width || 800;
71
- }), te.observe(X.value), ee.value = X.value.clientWidth || 800);
67
+ const j = x(), L = x(), P = x(800);
68
+ let ee = null;
69
+ function Re() {
70
+ j.value && (ee = new ResizeObserver((t) => {
71
+ const o = Math.round(t[0].contentRect.width || 800);
72
+ Math.abs(P.value - o) > 0.5 && (P.value = o);
73
+ }), ee.observe(j.value), P.value = Math.round(j.value.clientWidth || 800));
72
74
  }
73
75
  const _ = p(
74
- () => c.tasks.map((t, o) => ({
76
+ () => s.tasks.map((t, o) => ({
75
77
  ...t,
76
- _start: pe(t.start),
77
- _end: pe(t.end),
78
- _color: t.color ?? it(c.colors, o),
78
+ _start: xe(t.start),
79
+ _end: xe(t.end),
80
+ _color: t.color ?? ut(s.colors, o),
79
81
  _index: o
80
82
  }))
81
- ), j = k(/* @__PURE__ */ new Set());
82
- function Re(t) {
83
- const o = new Set(j.value);
84
- o.has(t) ? o.delete(t) : o.add(t), j.value = o;
83
+ ), N = x(/* @__PURE__ */ new Set());
84
+ function Ae(t) {
85
+ const o = new Set(N.value);
86
+ o.has(t) ? o.delete(t) : o.add(t), N.value = o;
85
87
  }
86
- const oe = p(() => {
88
+ const te = p(() => {
87
89
  const t = /* @__PURE__ */ new Map(), o = [];
88
90
  for (const e of _.value)
89
91
  e.group ? (t.has(e.group) || t.set(e.group, []), t.get(e.group).push(e)) : o.push(e);
90
92
  return { grouped: t, ungrouped: o };
91
- }), Z = p(() => {
93
+ }), F = p(() => {
92
94
  const t = [];
93
- for (const [o, e] of oe.value.grouped)
94
- if (t.push({ type: "group-header", group: o }), !j.value.has(o)) for (const n of e) t.push({ type: "task", group: o, task: n });
95
- for (const o of oe.value.ungrouped) t.push({ type: "task", task: o });
95
+ for (const [o, e] of te.value.grouped)
96
+ if (t.push({ type: "group-header", group: o }), !N.value.has(o)) for (const n of e) t.push({ type: "task", group: o, task: n });
97
+ for (const o of te.value.ungrouped) t.push({ type: "task", task: o });
96
98
  return t;
97
- }), T = p(() => {
99
+ }), W = p(() => {
98
100
  if (!_.value.length) {
99
- const n = /* @__PURE__ */ new Date();
100
- return { start: y(n, -7), end: y(n, 30) };
101
+ const i = /* @__PURE__ */ new Date();
102
+ return { start: y(i, -7), end: y(i, 30) };
101
103
  }
102
104
  let t = _.value[0]._start, o = _.value[0]._end;
103
- for (const n of _.value)
104
- n._start < t && (t = n._start), n._end > o && (o = n._end);
105
- const e = c.viewMode === "day" ? 2 : c.viewMode === "week" ? 5 : 15;
106
- return { start: y(t, -e), end: y(o, e) };
107
- }), N = p(() => Math.max(1, q(T.value.start, T.value.end))), m = k(1);
108
- let W = null;
109
- function Ae(t) {
110
- if (c.zoom && (t.ctrlKey || t.metaKey)) {
105
+ for (const i of _.value)
106
+ i._start < t && (t = i._start), i._end > o && (o = i._end);
107
+ const e = s.viewMode === "day" ? 2 : s.viewMode === "week" ? 5 : 15;
108
+ let n = y(t, -e), a = y(o, e);
109
+ return s.viewMode === "week" ? n = Ie(n) : s.viewMode === "month" ? n = Be(n) : n.setHours(0, 0, 0, 0), { start: n, end: a };
110
+ }), m = x(1);
111
+ let T = null;
112
+ function Pe(t) {
113
+ if (s.zoom && (t.ctrlKey || t.metaKey)) {
111
114
  t.preventDefault();
112
- const o = C.value;
115
+ const o = L.value;
113
116
  if (!o) return;
114
- const e = o.getBoundingClientRect(), n = t.clientX - e.left, d = (W !== null ? W : o.scrollLeft) + n, f = m.value;
117
+ const e = o.getBoundingClientRect(), n = t.clientX - e.left, i = (T !== null ? T : o.scrollLeft) + n, f = m.value;
115
118
  let v = f * Math.exp(-t.deltaY * 5e-3);
116
119
  if (v = Math.max(0.2, Math.min(v, 5)), v === f) return;
117
120
  m.value = v;
118
- const x = v / f;
119
- W = d * x - n, ke(() => {
120
- C.value && W !== null && (C.value.scrollLeft = W, W = null);
121
+ const k = v / f;
122
+ T = i * k - n, ke(() => {
123
+ L.value && T !== null && (L.value.scrollLeft = T, T = null);
121
124
  });
122
125
  }
123
126
  }
124
- function Pe() {
125
- const t = C.value;
127
+ function Fe() {
128
+ const t = L.value;
126
129
  if (!t) {
127
130
  m.value = Math.min(m.value + 0.2, 5);
128
131
  return;
@@ -133,7 +136,7 @@ const ct = {
133
136
  ke(() => t.scrollLeft = e * a - o);
134
137
  }
135
138
  function Ze() {
136
- const t = C.value;
139
+ const t = L.value;
137
140
  if (!t) {
138
141
  m.value = Math.max(m.value - 0.2, 0.2);
139
142
  return;
@@ -143,39 +146,29 @@ const ct = {
143
146
  const a = m.value / n;
144
147
  ke(() => t.scrollLeft = e * a - o);
145
148
  }
146
- const H = p(() => ({ day: 40, week: 120, month: 180 })[c.viewMode] * m.value), ne = p(() => {
147
- const t = [], { start: o, end: e } = T.value;
148
- if (c.viewMode === "day") {
149
- let n = new Date(o);
150
- n.setHours(0, 0, 0, 0);
151
- let a = 0;
149
+ const oe = p(() => {
150
+ const t = [], { start: o, end: e } = W.value;
151
+ let n = new Date(o);
152
+ if (s.viewMode === "day")
152
153
  for (; n <= e; )
153
- t.push({
154
- label: n.toLocaleDateString(c.locale, { day: "numeric" }),
155
- sublabel: n.toLocaleDateString(c.locale, { weekday: "short" }),
156
- x: a * H.value,
157
- width: H.value
158
- }), n = y(n, 1), a++;
159
- } else if (c.viewMode === "week") {
160
- let n = We(o), a = 0;
154
+ t.push(n), n = y(n, 1);
155
+ else if (s.viewMode === "week")
161
156
  for (; n <= e; )
162
- t.push({
163
- label: n.toLocaleDateString(c.locale, { month: "short", day: "numeric" }),
164
- sublabel: `W${Oe(n)}`,
165
- x: a * H.value,
166
- width: H.value
167
- }), n = y(n, 7), a++;
168
- } else {
169
- let n = Ie(o), a = 0;
157
+ t.push(n), n = y(n, 7);
158
+ else
170
159
  for (; n <= e; )
171
- t.push({
172
- label: n.toLocaleDateString(c.locale, { month: "long" }),
173
- sublabel: String(n.getFullYear()),
174
- x: a * H.value,
175
- width: H.value
176
- }), n = new Date(n.getFullYear(), n.getMonth() + 1, 1), a++;
177
- }
160
+ t.push(n), n = new Date(n.getFullYear(), n.getMonth() + 1, 1);
178
161
  return t;
162
+ }), M = p(() => {
163
+ let o = { day: 40, week: 120, month: 180 }[s.viewMode] * m.value;
164
+ const e = Math.max(0, P.value - s.sidebarWidth), n = oe.value.length;
165
+ return n > 0 && o * n < e && (o = e / n), o;
166
+ }), pe = p(() => {
167
+ const t = M.value;
168
+ return oe.value.map((o, e) => {
169
+ let n = "", a = "";
170
+ return s.viewMode === "day" ? (n = o.toLocaleDateString(s.locale, { day: "numeric" }), a = o.toLocaleDateString(s.locale, { weekday: "short" })) : s.viewMode === "week" ? (n = o.toLocaleDateString(s.locale, { month: "short", day: "numeric" }), a = `W${Oe(o)}`) : (n = o.toLocaleDateString(s.locale, { month: "long" }), a = String(o.getFullYear())), { label: n, sublabel: a, x: e * t, width: t };
171
+ });
179
172
  });
180
173
  function Oe(t) {
181
174
  const o = new Date(t.getTime());
@@ -183,25 +176,35 @@ const ct = {
183
176
  const e = new Date(o.getFullYear(), 0, 4);
184
177
  return 1 + Math.round(((o.getTime() - e.getTime()) / 864e5 - 3 + (e.getDay() + 6) % 7) / 7);
185
178
  }
186
- const M = p(() => ne.value.length * H.value), I = p(() => c.showHeader ? 56 : 0), O = p(() => {
187
- const t = Z.value.length * c.rowHeight;
188
- return Math.max(c.height || t, t);
179
+ const Z = p(() => oe.value.length * M.value), E = p(() => s.showHeader ? 56 : 0), O = p(() => {
180
+ const t = F.value.length * s.rowHeight;
181
+ return Math.max(s.height || t, t);
189
182
  });
183
+ function ne(t) {
184
+ if (s.viewMode === "day")
185
+ return X(W.value.start, t) * M.value;
186
+ if (s.viewMode === "week")
187
+ return X(W.value.start, t) / 7 * M.value;
188
+ {
189
+ const o = W.value.start, e = (t.getFullYear() - o.getFullYear()) * 12 + (t.getMonth() - o.getMonth()), n = new Date(t.getFullYear(), t.getMonth() + 1, 0).getDate(), a = (t.getDate() - 1 + t.getHours() / 24 + t.getMinutes() / 1440) / n;
190
+ return (e + a) * M.value;
191
+ }
192
+ }
190
193
  function le(t) {
191
- return q(T.value.start, t) / N.value * M.value;
194
+ return s.viewMode === "day" ? t / M.value : s.viewMode === "week" ? t / M.value * 7 : t / M.value * 30.44;
192
195
  }
193
- function ae(t) {
194
- return t / M.value * N.value;
196
+ function we(t) {
197
+ return s.viewMode === "day" ? t * M.value : s.viewMode === "week" ? t / 7 * M.value : t / 30.44 * M.value;
195
198
  }
196
199
  const w = p(() => {
197
200
  const t = Q.value;
198
- return Z.value.reduce((o, e, n) => {
201
+ return F.value.reduce((o, e, n) => {
199
202
  if (e.type !== "task" || !e.task) return o;
200
- const a = e.task, d = le(a._start), f = le(a._end), v = Math.max(8, f - d), x = v * t, S = n * c.rowHeight + (c.rowHeight - c.barHeight) / 2, he = a.progress != null ? v * Math.min(100, a.progress) / 100 * t : 0;
201
- return o.push({ task: a, x: d, y: S, fullW: v, w: x, progressW: he, rowIndex: n }), o;
203
+ const a = e.task, i = ne(a._start), f = ne(a._end), v = Math.max(8, f - i), k = v * t, S = n * s.rowHeight + (s.rowHeight - s.barHeight) / 2, ge = a.progress != null ? v * Math.min(100, a.progress) / 100 * t : 0;
204
+ return o.push({ task: a, x: i, y: S, fullW: v, w: k, progressW: ge, rowIndex: n }), o;
202
205
  }, []);
203
- }), Fe = p(() => {
204
- if (!c.showDependencies) return [];
206
+ }), Ge = p(() => {
207
+ if (!s.showDependencies) return [];
205
208
  const t = /* @__PURE__ */ new Map();
206
209
  for (const e of w.value) t.set(e.task.id, e);
207
210
  const o = [];
@@ -210,48 +213,48 @@ const ct = {
210
213
  for (const n of e.task.dependencies) {
211
214
  const a = t.get(n);
212
215
  if (!a) continue;
213
- const d = a.x + a.fullW, f = a.y + c.barHeight / 2, v = e.x, x = e.y + c.barHeight / 2;
214
- o.push({ d: Ge(d, f, v, x), ad: qe(v, x) });
216
+ const i = a.x + a.fullW, f = a.y + s.barHeight / 2, v = e.x, k = e.y + s.barHeight / 2;
217
+ o.push({ d: qe(i, f, v, k), ad: Xe(v, k) });
215
218
  }
216
219
  return o;
217
220
  });
218
- function Ge(t, o, e, n) {
219
- const a = lo, d = ao;
221
+ function qe(t, o, e, n) {
222
+ const a = ao, i = so;
220
223
  if (e > t + a * 2) {
221
224
  if (Math.abs(o - n) < 2) return `M ${t} ${o} L ${e} ${n}`;
222
225
  const v = t + (e - t) / 2;
223
- return se([[t, o], [v, o], [v, n], [e, n]], d);
226
+ return ae([[t, o], [v, o], [v, n], [e, n]], i);
224
227
  }
225
228
  const f = t + a;
226
- if (Math.abs(o - n) < c.rowHeight * 0.5) {
227
- const v = Math.max(o, n) + c.barHeight / 2 + a;
228
- return se([[t, o], [f, o], [f, v], [e - a, v], [e - a, n], [e, n]], d);
229
+ if (Math.abs(o - n) < s.rowHeight * 0.5) {
230
+ const v = Math.max(o, n) + s.barHeight / 2 + a;
231
+ return ae([[t, o], [f, o], [f, v], [e - a, v], [e - a, n], [e, n]], i);
229
232
  }
230
- return se([[t, o], [f, o], [f, n], [e, n]], d);
233
+ return ae([[t, o], [f, o], [f, n], [e, n]], i);
231
234
  }
232
- function se(t, o) {
235
+ function ae(t, o) {
233
236
  if (t.length < 2) return "";
234
237
  if (t.length === 2) return `M ${t[0][0]} ${t[0][1]} L ${t[1][0]} ${t[1][1]}`;
235
238
  const e = [`M ${t[0][0]} ${t[0][1]}`];
236
239
  for (let a = 1; a < t.length - 1; a++) {
237
- const [d, f] = t[a - 1], [v, x] = t[a], [S, he] = t[a + 1], Se = v - d, Le = x - f, Ce = S - v, _e = he - x, ye = Math.hypot(Se, Le), me = Math.hypot(Ce, _e), J = Math.min(o, ye / 2, me / 2);
238
- e.push(`L ${v - Se / ye * J} ${x - Le / ye * J}`), e.push(`Q ${v} ${x} ${v + Ce / me * J} ${x + _e / me * J}`);
240
+ const [i, f] = t[a - 1], [v, k] = t[a], [S, ge] = t[a + 1], Ce = v - i, Le = k - f, _e = S - v, He = ge - k, he = Math.hypot(Ce, Le), ye = Math.hypot(_e, He), J = Math.min(o, he / 2, ye / 2);
241
+ e.push(`L ${v - Ce / he * J} ${k - Le / he * J}`), e.push(`Q ${v} ${k} ${v + _e / ye * J} ${k + He / ye * J}`);
239
242
  }
240
243
  const n = t[t.length - 1];
241
244
  return e.push(`L ${n[0]} ${n[1]}`), e.join(" ");
242
245
  }
243
- function qe(t, o) {
246
+ function Xe(t, o) {
244
247
  return `M ${t} ${o} L ${t - Y} ${o - Y * 0.6} L ${t - Y} ${o + Y * 0.6} Z`;
245
248
  }
246
- const F = p(() => {
249
+ const G = p(() => {
247
250
  const t = /* @__PURE__ */ new Date();
248
- return t.setHours(12, 0, 0, 0), le(t);
251
+ return t.setHours(12, 0, 0, 0), ne(t);
249
252
  }), V = p(() => {
250
253
  const t = /* @__PURE__ */ new Date();
251
- return t >= T.value.start && t <= T.value.end;
254
+ return t >= W.value.start && t <= W.value.end;
252
255
  });
253
- function Xe() {
254
- !C.value || !V.value || C.value.scrollTo({ left: Math.max(0, F.value - (ee.value - c.sidebarWidth) / 2), behavior: "smooth" });
256
+ function je() {
257
+ !L.value || !V.value || L.value.scrollTo({ left: Math.max(0, G.value - (P.value - s.sidebarWidth) / 2), behavior: "smooth" });
255
258
  }
256
259
  let l = {
257
260
  active: !1,
@@ -266,13 +269,13 @@ const ct = {
266
269
  // cascade set
267
270
  rafId: 0
268
271
  };
269
- const B = k(!1), G = k(""), re = k(null), K = k("default"), U = k([]), z = k(null);
270
- function je(t, o) {
271
- U.value[o] = t;
272
+ const I = x(!1), q = x(""), se = x(null), U = x("default"), K = x([]), H = x(null);
273
+ function Ne(t, o) {
274
+ K.value[o] = t;
272
275
  }
273
- function Ne(t) {
276
+ function Ve(t) {
274
277
  const o = /* @__PURE__ */ new Set();
275
- if (!c.cascadeDependencies) return o;
278
+ if (!s.cascadeDependencies) return o;
276
279
  const e = [t];
277
280
  for (; e.length; ) {
278
281
  const n = e.shift();
@@ -281,159 +284,159 @@ const ct = {
281
284
  }
282
285
  return o;
283
286
  }
284
- function we(t, o) {
285
- if (!c.draggable || o.task.milestone) return "move";
287
+ function be(t, o) {
288
+ if (!s.draggable || o.task.milestone) return "move";
286
289
  const e = t.currentTarget.closest("svg");
287
290
  if (!e) return "move";
288
291
  const n = t.clientX - e.getBoundingClientRect().left;
289
- return n < o.x + Ee ? "resize-left" : n > o.x + o.fullW - Ee ? "resize-right" : "move";
292
+ return n < o.x + Te ? "resize-left" : n > o.x + o.fullW - Te ? "resize-right" : "move";
290
293
  }
291
- function Ve(t, o) {
292
- if (!c.draggable) return;
294
+ function Ue(t, o) {
295
+ if (!s.draggable) return;
293
296
  const e = w.value[o];
294
297
  if (!e || e.task.milestone) return;
295
298
  t.preventDefault(), t.stopPropagation();
296
- const n = we(t, e);
297
- l.active = !0, l.barIndex = o, l.taskId = e.task.id, l.mode = n, l.startMouseX = t.clientX, l.pxDelta = 0, l.origStart = new Date(e.task._start), l.origEnd = new Date(e.task._end), l.affectedIds = n === "move" ? Ne(e.task.id) : /* @__PURE__ */ new Set(), B.value = !0, G.value = e.task.id, g.value = null, R.value = o, document.addEventListener("mousemove", ie), document.addEventListener("mouseup", ue), document.body.style.cursor = n === "move" ? "grabbing" : "ew-resize", document.body.style.userSelect = "none";
299
+ const n = be(t, e);
300
+ l.active = !0, l.barIndex = o, l.taskId = e.task.id, l.mode = n, l.startMouseX = t.clientX, l.pxDelta = 0, l.origStart = new Date(e.task._start), l.origEnd = new Date(e.task._end), l.affectedIds = n === "move" ? Ve(e.task.id) : /* @__PURE__ */ new Set(), I.value = !0, q.value = e.task.id, g.value = null, B.value = o, document.addEventListener("mousemove", re), document.addEventListener("mouseup", ie), document.body.style.cursor = n === "move" ? "grabbing" : "ew-resize", document.body.style.userSelect = "none";
298
301
  }
299
- function ie(t) {
302
+ function re(t) {
300
303
  if (l.active) {
301
304
  if (l.pxDelta = t.clientX - l.startMouseX, l.mode !== "move" && l.origStart && l.origEnd) {
302
- const o = q(l.origStart, l.origEnd), e = ae(l.pxDelta);
303
- l.mode === "resize-left" && e >= o - 0.5 && (l.pxDelta = (o - 0.5) / N.value * M.value), l.mode === "resize-right" && -e >= o - 0.5 && (l.pxDelta = -(o - 0.5) / N.value * M.value);
305
+ const o = X(l.origStart, l.origEnd), e = le(l.pxDelta);
306
+ l.mode === "resize-left" && e >= o - 0.5 && (l.pxDelta = we(o - 0.5)), l.mode === "resize-right" && -e >= o - 0.5 && (l.pxDelta = -we(o - 0.5));
304
307
  }
305
308
  cancelAnimationFrame(l.rafId), l.rafId = requestAnimationFrame(Ke);
306
309
  }
307
310
  }
308
311
  function Ke() {
309
- const t = l.pxDelta, o = U.value[l.barIndex];
312
+ const t = l.pxDelta, o = K.value[l.barIndex];
310
313
  if (o) {
311
314
  if (l.mode === "move") {
312
315
  if (o.style.transform = `translateX(${t}px)`, l.affectedIds.size > 0) {
313
316
  for (let e = 0; e < w.value.length; e++)
314
317
  if (l.affectedIds.has(w.value[e].task.id)) {
315
- const n = U.value[e];
318
+ const n = K.value[e];
316
319
  n && (n.style.transform = `translateX(${t}px)`);
317
320
  }
318
321
  }
319
322
  } else l.mode === "resize-right" ? (o.style.transform = "translateX(0px)", w.value[l.barIndex] && o.setAttribute("data-resize-px", String(t))) : l.mode === "resize-left" && (o.style.transform = `translateX(${t}px)`, w.value[l.barIndex] && o.setAttribute("data-resize-px", String(-t)));
320
- if (z.value && l.origStart && l.origEnd) {
321
- const e = ae(t), n = { month: "short", day: "numeric" };
322
- let a, d;
323
- l.mode === "move" ? (a = y(l.origStart, e), d = y(l.origEnd, e)) : l.mode === "resize-left" ? (a = y(l.origStart, e), d = l.origEnd) : (a = l.origStart, d = y(l.origEnd, e));
323
+ if (H.value && l.origStart && l.origEnd) {
324
+ const e = le(t), n = { month: "short", day: "numeric" };
325
+ let a, i;
326
+ l.mode === "move" ? (a = y(l.origStart, e), i = y(l.origEnd, e)) : l.mode === "resize-left" ? (a = y(l.origStart, e), i = l.origEnd) : (a = l.origStart, i = y(l.origEnd, e));
324
327
  const f = w.value[l.barIndex];
325
328
  if (f) {
326
329
  const v = l.mode === "move" ? f.x + f.fullW / 2 + t : f.x + f.fullW / 2;
327
- z.value.style.display = "";
328
- const x = z.value.querySelector("rect"), S = z.value.querySelector("text");
329
- x && (x.setAttribute("x", String(v - 62)), x.setAttribute("y", String(f.y - 20))), S && (S.setAttribute("x", String(v)), S.setAttribute("y", String(f.y - 10)), S.textContent = `${a.toLocaleDateString(c.locale, n)} — ${d.toLocaleDateString(c.locale, n)}`);
330
+ H.value.style.display = "";
331
+ const k = H.value.querySelector("rect"), S = H.value.querySelector("text");
332
+ k && (k.setAttribute("x", String(v - 62)), k.setAttribute("y", String(f.y - 20))), S && (S.setAttribute("x", String(v)), S.setAttribute("y", String(f.y - 10)), S.textContent = `${a.toLocaleDateString(s.locale, n)} — ${i.toLocaleDateString(s.locale, n)}`);
330
333
  }
331
334
  }
332
335
  }
333
336
  }
334
- function ue() {
337
+ function ie() {
335
338
  if (!l.active) return;
336
- document.removeEventListener("mousemove", ie), document.removeEventListener("mouseup", ue), document.body.style.cursor = "", document.body.style.userSelect = "", cancelAnimationFrame(l.rafId);
337
- const t = ae(l.pxDelta), o = Math.round(t * 2) / 2;
339
+ document.removeEventListener("mousemove", re), document.removeEventListener("mouseup", ie), document.body.style.cursor = "", document.body.style.userSelect = "", cancelAnimationFrame(l.rafId);
340
+ const t = le(l.pxDelta), o = Math.round(t * 2) / 2;
338
341
  if (Math.abs(o) > 0.1 && l.origStart && l.origEnd) {
339
342
  const e = _.value.find((n) => n.id === l.taskId);
340
343
  if (e) {
341
344
  let n, a;
342
- if (l.mode === "move" ? (n = y(l.origStart, o), a = y(l.origEnd, o)) : l.mode === "resize-left" ? (n = y(l.origStart, o), a = new Date(l.origEnd)) : (n = new Date(l.origStart), a = y(l.origEnd, o)), P("task-update", e, { start: n, end: a }), l.mode === "move" && l.affectedIds.size > 0)
343
- for (const d of l.affectedIds) {
344
- const f = _.value.find((v) => v.id === d);
345
- f && P("task-update", f, {
345
+ if (l.mode === "move" ? (n = y(l.origStart, o), a = y(l.origEnd, o)) : l.mode === "resize-left" ? (n = y(l.origStart, o), a = new Date(l.origEnd)) : (n = new Date(l.origStart), a = y(l.origEnd, o)), A("task-update", e, { start: n, end: a }), l.mode === "move" && l.affectedIds.size > 0)
346
+ for (const i of l.affectedIds) {
347
+ const f = _.value.find((v) => v.id === i);
348
+ f && A("task-update", f, {
346
349
  start: y(f._start, o),
347
350
  end: y(f._end, o)
348
351
  });
349
352
  }
350
353
  }
351
354
  }
352
- for (const e of U.value)
355
+ for (const e of K.value)
353
356
  e && (e.style.transform = "", e.removeAttribute("data-resize-px"));
354
- z.value && (z.value.style.display = "none"), l.active = !1, l.barIndex = -1, l.taskId = "", l.pxDelta = 0, l.origStart = null, l.origEnd = null, l.affectedIds.clear(), B.value = !1, G.value = "", R.value = null;
357
+ H.value && (H.value.style.display = "none"), l.active = !1, l.barIndex = -1, l.taskId = "", l.pxDelta = 0, l.origStart = null, l.origEnd = null, l.affectedIds.clear(), I.value = !1, q.value = "", B.value = null;
355
358
  }
356
- function be(t, o) {
357
- if (l.active || !c.draggable || o.task.milestone) {
358
- K.value = l.active ? "grabbing" : "pointer";
359
+ function $e(t, o) {
360
+ if (l.active || !s.draggable || o.task.milestone) {
361
+ U.value = l.active ? "grabbing" : "pointer";
359
362
  return;
360
363
  }
361
- K.value = we(t, o) === "move" ? "grab" : "ew-resize";
364
+ U.value = be(t, o) === "move" ? "grab" : "ew-resize";
362
365
  }
363
- const Q = k(c.animate ? 0 : 1);
364
- let ce = null;
366
+ const Q = x(s.animate ? 0 : 1);
367
+ let ue = null;
365
368
  function de() {
366
- ce?.(), Q.value = 0, ce = ut(900, (t) => Q.value = t);
367
- }
368
- et(() => {
369
- Be(), c.animate && de();
370
- }), He(() => c.viewMode, () => {
371
- m.value = 1, c.animate && de();
372
- }), He(() => c.tasks.length, () => {
373
- c.animate && de();
374
- }), tt(() => {
375
- ce?.(), te?.disconnect(), document.removeEventListener("mousemove", ie), document.removeEventListener("mouseup", ue), cancelAnimationFrame(l.rafId);
369
+ ue?.(), Q.value = 0, ue = dt(900, (t) => Q.value = t);
370
+ }
371
+ tt(() => {
372
+ Re(), s.animate && de();
373
+ }), ze(() => s.viewMode, () => {
374
+ m.value = 1, s.animate && de();
375
+ }), ze(() => s.tasks.length, () => {
376
+ s.animate && de();
377
+ }), ot(() => {
378
+ ue?.(), ee?.disconnect(), document.removeEventListener("mousemove", re), document.removeEventListener("mouseup", ie), cancelAnimationFrame(l.rafId);
376
379
  });
377
- function ve(t, o, e, n, a) {
378
- const d = Math.min(a, e / 2, n / 2);
379
- return d <= 0 || e <= 0 ? `M${t},${o}h${e}v${n}h${-e}Z` : `M${t + d},${o}h${e - 2 * d}q${d},0 ${d},${d}v${n - 2 * d}q0,${d} ${-d},${d}h${-(e - 2 * d)}q${-d},0 ${-d},${-d}v${-(n - 2 * d)}q0,${-d} ${d},${-d}Z`;
380
+ function ce(t, o, e, n, a) {
381
+ const i = Math.min(a, e / 2, n / 2);
382
+ return i <= 0 || e <= 0 ? `M${t},${o}h${e}v${n}h${-e}Z` : `M${t + i},${o}h${e - 2 * i}q${i},0 ${i},${i}v${n - 2 * i}q0,${i} ${-i},${i}h${-(e - 2 * i)}q${-i},0 ${-i},${-i}v${-(n - 2 * i)}q0,${-i} ${i},${-i}Z`;
380
383
  }
381
- function Ue(t, o, e) {
384
+ function Qe(t, o, e) {
382
385
  return `M${t},${o - e}L${t + e},${o}L${t},${o + e}L${t - e},${o}Z`;
383
386
  }
384
- const g = k(null), R = k(null);
385
- function $e(t, o) {
386
- if (!c.showTooltip || l.active) return;
387
- re.value = o, R.value = o;
387
+ const g = x(null), B = x(null);
388
+ function Me(t, o) {
389
+ if (!s.showTooltip || l.active) return;
390
+ se.value = o, B.value = o;
388
391
  const e = w.value[o];
389
392
  if (!e) return;
390
- P("task-hover", e.task);
393
+ A("task-hover", e.task);
391
394
  const n = e.task;
392
395
  g.value = {
393
396
  x: t.clientX,
394
397
  y: t.clientY,
395
398
  task: n,
396
- startStr: n._start.toLocaleDateString(c.locale, { month: "short", day: "numeric", year: "numeric" }),
397
- endStr: n._end.toLocaleDateString(c.locale, { month: "short", day: "numeric", year: "numeric" })
398
- }, be(t, e);
399
+ startStr: n._start.toLocaleDateString(s.locale, { month: "short", day: "numeric", year: "numeric" }),
400
+ endStr: n._end.toLocaleDateString(s.locale, { month: "short", day: "numeric", year: "numeric" })
401
+ }, $e(t, e);
399
402
  }
400
403
  function De(t, o) {
401
404
  if (l.active) return;
402
405
  g.value && (g.value = { ...g.value, x: t.clientX, y: t.clientY });
403
406
  const e = w.value[o];
404
- e && be(t, e);
407
+ e && $e(t, e);
405
408
  }
406
- function Me() {
407
- l.active || (g.value = null, R.value = null, re.value = null, K.value = "default", P("task-hover", null));
409
+ function Se() {
410
+ l.active || (g.value = null, B.value = null, se.value = null, U.value = "default", A("task-hover", null));
408
411
  }
409
- function fe(t) {
410
- l.active || P("task-click", t);
412
+ function ve(t) {
413
+ l.active || A("task-click", t);
411
414
  }
412
- const ge = k();
413
- function Qe(t) {
414
- ge.value && (ge.value.scrollTop = t.target.scrollTop);
415
+ const fe = x();
416
+ function Je(t) {
417
+ fe.value && (fe.value.scrollTop = t.target.scrollTop);
415
418
  }
416
- const A = Math.random().toString(36).slice(2, 7);
417
- function Je(t, o) {
418
- const e = Math.ceil(q(t, o));
419
+ const R = Math.random().toString(36).slice(2, 7);
420
+ function Ye(t, o) {
421
+ const e = Math.ceil(X(t, o));
419
422
  if (e <= 1) return "1 day";
420
423
  if (e < 7) return `${e} days`;
421
424
  const n = Math.floor(e / 7), a = e % 7;
422
425
  return a === 0 ? `${n} week${n > 1 ? "s" : ""}` : `${n}w ${a}d`;
423
426
  }
424
- return (t, o) => (r(), i("div", {
427
+ return (t, o) => (u(), d("div", {
425
428
  ref_key: "containerRef",
426
- ref: X,
429
+ ref: j,
427
430
  class: "vlite-gantt-chart w-full select-none"
428
431
  }, [
429
- u.showTodayLine && V.value || u.zoom ? (r(), i("div", ct, [
430
- u.zoom ? (r(), i("div", dt, [
431
- s("button", {
432
+ c.showTodayLine && V.value || c.zoom ? (u(), d("div", ct, [
433
+ c.zoom ? (u(), d("div", vt, [
434
+ r("button", {
432
435
  class: "vlite-gantt-btn",
433
436
  onClick: Ze,
434
437
  disabled: m.value <= 0.4
435
438
  }, [...o[0] || (o[0] = [
436
- s("svg", {
439
+ r("svg", {
437
440
  width: "12",
438
441
  height: "12",
439
442
  viewBox: "0 0 24 24",
@@ -443,40 +446,40 @@ const ct = {
443
446
  "stroke-linecap": "round",
444
447
  "stroke-linejoin": "round"
445
448
  }, [
446
- s("circle", {
449
+ r("circle", {
447
450
  cx: "11",
448
451
  cy: "11",
449
452
  r: "8"
450
453
  }),
451
- s("line", {
454
+ r("line", {
452
455
  x1: "21",
453
456
  y1: "21",
454
457
  x2: "16.65",
455
458
  y2: "16.65"
456
459
  }),
457
- s("line", {
460
+ r("line", {
458
461
  x1: "8",
459
462
  y1: "11",
460
463
  x2: "14",
461
464
  y2: "11"
462
465
  })
463
466
  ], -1),
464
- s("span", null, "Zoom Out", -1)
465
- ])], 8, vt),
466
- s("button", {
467
+ r("span", null, "Zoom Out", -1)
468
+ ])], 8, ft),
469
+ r("button", {
467
470
  class: "vlite-gantt-btn",
468
- onClick: Pe,
471
+ onClick: Fe,
469
472
  disabled: m.value >= 3
470
473
  }, [...o[1] || (o[1] = [
471
- ot('<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" data-v-91cc2885><circle cx="11" cy="11" r="8" data-v-91cc2885></circle><line x1="21" y1="21" x2="16.65" y2="16.65" data-v-91cc2885></line><line x1="11" y1="8" x2="11" y2="14" data-v-91cc2885></line><line x1="8" y1="11" x2="14" y2="11" data-v-91cc2885></line></svg><span data-v-91cc2885>Zoom In</span>', 2)
472
- ])], 8, ft)
474
+ nt('<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" data-v-ebb84e3d><circle cx="11" cy="11" r="8" data-v-ebb84e3d></circle><line x1="21" y1="21" x2="16.65" y2="16.65" data-v-ebb84e3d></line><line x1="11" y1="8" x2="11" y2="14" data-v-ebb84e3d></line><line x1="8" y1="11" x2="14" y2="11" data-v-ebb84e3d></line></svg><span data-v-ebb84e3d>Zoom In</span>', 2)
475
+ ])], 8, gt)
473
476
  ])) : h("", !0),
474
- u.showTodayLine && V.value ? (r(), i("button", {
477
+ c.showTodayLine && V.value ? (u(), d("button", {
475
478
  key: 1,
476
479
  class: "vlite-gantt-btn",
477
- onClick: Xe
480
+ onClick: je
478
481
  }, [...o[2] || (o[2] = [
479
- s("svg", {
482
+ r("svg", {
480
483
  width: "12",
481
484
  height: "12",
482
485
  viewBox: "0 0 24 24",
@@ -486,57 +489,57 @@ const ct = {
486
489
  "stroke-linecap": "round",
487
490
  "stroke-linejoin": "round"
488
491
  }, [
489
- s("circle", {
492
+ r("circle", {
490
493
  cx: "12",
491
494
  cy: "12",
492
495
  r: "10"
493
496
  }),
494
- s("line", {
497
+ r("line", {
495
498
  x1: "12",
496
499
  y1: "8",
497
500
  x2: "12",
498
501
  y2: "12"
499
502
  }),
500
- s("line", {
503
+ r("line", {
501
504
  x1: "12",
502
505
  y1: "16",
503
506
  x2: "12.01",
504
507
  y2: "16"
505
508
  })
506
509
  ], -1),
507
- s("span", null, "Today", -1)
510
+ r("span", null, "Today", -1)
508
511
  ])])) : h("", !0)
509
512
  ])) : h("", !0),
510
- s("div", gt, [
511
- s("div", {
513
+ r("div", ht, [
514
+ r("div", {
512
515
  class: "vlite-gantt-sidebar",
513
- style: D({ width: `${u.sidebarWidth}px`, minWidth: `${u.sidebarWidth}px` })
516
+ style: D({ width: `${c.sidebarWidth}px`, minWidth: `${c.sidebarWidth}px` })
514
517
  }, [
515
- u.showHeader ? (r(), i("div", {
518
+ c.showHeader ? (u(), d("div", {
516
519
  key: 0,
517
520
  class: "vlite-gantt-sidebar-header",
518
- style: D({ height: `${I.value}px` })
521
+ style: D({ height: `${E.value}px` })
519
522
  }, [...o[3] || (o[3] = [
520
- s("span", { class: "text-xs font-semibold text-muted-foreground uppercase tracking-wider" }, "Tasks", -1)
523
+ r("span", { class: "text-xs font-semibold text-muted-foreground uppercase tracking-wider" }, "Tasks", -1)
521
524
  ])], 4)) : h("", !0),
522
- s("div", {
525
+ r("div", {
523
526
  ref_key: "sidebarRef",
524
- ref: ge,
527
+ ref: fe,
525
528
  class: "vlite-gantt-sidebar-body",
526
529
  style: D({ height: `${O.value}px` })
527
530
  }, [
528
- (r(!0), i($, null, L(Z.value, (e, n) => (r(), i("div", {
531
+ (u(!0), d($, null, C(F.value, (e, n) => (u(), d("div", {
529
532
  key: `s-${n}`,
530
533
  class: "vlite-gantt-sidebar-row",
531
- style: D({ height: `${u.rowHeight}px` })
534
+ style: D({ height: `${c.rowHeight}px` })
532
535
  }, [
533
- e.type === "group-header" ? (r(), i("button", {
536
+ e.type === "group-header" ? (u(), d("button", {
534
537
  key: 0,
535
538
  class: "vlite-gantt-group-toggle",
536
- onClick: (a) => Re(e.group)
539
+ onClick: (a) => Ae(e.group)
537
540
  }, [
538
- (r(), i("svg", {
539
- class: xe(["vlite-gantt-chevron", { "vlite-gantt-chevron-collapsed": j.value.has(e.group) }]),
541
+ (u(), d("svg", {
542
+ class: me(["vlite-gantt-chevron", { "vlite-gantt-chevron-collapsed": N.value.has(e.group) }]),
540
543
  width: "14",
541
544
  height: "14",
542
545
  viewBox: "0 0 24 24",
@@ -546,127 +549,127 @@ const ct = {
546
549
  "stroke-linecap": "round",
547
550
  "stroke-linejoin": "round"
548
551
  }, [...o[4] || (o[4] = [
549
- s("polyline", { points: "6 9 12 15 18 9" }, null, -1)
552
+ r("polyline", { points: "6 9 12 15 18 9" }, null, -1)
550
553
  ])], 2)),
551
- s("span", yt, b(e.group), 1),
552
- s("span", mt, b(oe.value.grouped.get(e.group)?.length ?? 0), 1)
553
- ], 8, ht)) : (r(), i("div", {
554
+ r("span", mt, b(e.group), 1),
555
+ r("span", kt, b(te.value.grouped.get(e.group)?.length ?? 0), 1)
556
+ ], 8, yt)) : (u(), d("div", {
554
557
  key: 1,
555
- class: xe(["vlite-gantt-task-name", {
558
+ class: me(["vlite-gantt-task-name", {
556
559
  "vlite-gantt-task-name-grouped": !!e.group,
557
- "vlite-gantt-task-name-dragging": B.value && G.value === e.task?.id
560
+ "vlite-gantt-task-name-dragging": I.value && q.value === e.task?.id
558
561
  }]),
559
- onClick: (a) => e.task && fe(e.task)
562
+ onClick: (a) => e.task && ve(e.task)
560
563
  }, [
561
- s("span", {
564
+ r("span", {
562
565
  class: "vlite-gantt-task-dot",
563
566
  style: D({ backgroundColor: e.task?._color })
564
567
  }, null, 4),
565
- s("span", kt, b(e.task?.name), 1),
566
- u.showProgress && e.task?.progress != null ? (r(), i("span", pt, b(e.task.progress) + "%", 1)) : h("", !0)
568
+ r("span", pt, b(e.task?.name), 1),
569
+ c.showProgress && e.task?.progress != null ? (u(), d("span", wt, b(e.task.progress) + "%", 1)) : h("", !0)
567
570
  ], 10, xt))
568
571
  ], 4))), 128))
569
572
  ], 4)
570
573
  ], 4),
571
- s("div", {
574
+ r("div", {
572
575
  ref_key: "timelineRef",
573
- ref: C,
576
+ ref: L,
574
577
  class: "vlite-gantt-timeline",
575
- onScroll: Qe,
576
- onWheel: Ae
578
+ onScroll: Je,
579
+ onWheel: Pe
577
580
  }, [
578
- u.showHeader ? (r(), i("div", {
581
+ c.showHeader ? (u(), d("div", {
579
582
  key: 0,
580
583
  class: "vlite-gantt-timeline-header",
581
- style: D({ height: `${I.value}px`, width: `${M.value}px` })
584
+ style: D({ height: `${E.value}px`, width: `${Z.value}px` })
582
585
  }, [
583
- (r(), i("svg", {
584
- width: M.value,
585
- height: I.value,
586
+ (u(), d("svg", {
587
+ width: Z.value,
588
+ height: E.value,
586
589
  class: "overflow-visible"
587
590
  }, [
588
- (r(!0), i($, null, L(ne.value, (e, n) => (r(), i("g", { key: n }, [
589
- s("line", {
591
+ (u(!0), d($, null, C(pe.value, (e, n) => (u(), d("g", { key: n }, [
592
+ r("line", {
590
593
  x1: e.x,
591
594
  y1: 0,
592
595
  x2: e.x,
593
- y2: I.value,
596
+ y2: E.value,
594
597
  stroke: "currentColor",
595
598
  "stroke-opacity": "0.06"
596
- }, null, 8, bt),
597
- s("text", {
599
+ }, null, 8, $t),
600
+ r("text", {
598
601
  x: e.x + e.width / 2,
599
- y: I.value / 2 - 5,
602
+ y: E.value / 2 - 5,
600
603
  "text-anchor": "middle",
601
604
  "dominant-baseline": "middle",
602
605
  "font-size": "11",
603
606
  "font-weight": "600",
604
607
  class: "fill-foreground"
605
- }, b(e.label), 9, $t),
606
- e.sublabel ? (r(), i("text", {
608
+ }, b(e.label), 9, Mt),
609
+ e.sublabel ? (u(), d("text", {
607
610
  key: 0,
608
611
  x: e.x + e.width / 2,
609
- y: I.value / 2 + 11,
612
+ y: E.value / 2 + 11,
610
613
  "text-anchor": "middle",
611
614
  "dominant-baseline": "middle",
612
615
  "font-size": "10",
613
616
  class: "fill-muted-foreground"
614
617
  }, b(e.sublabel), 9, Dt)) : h("", !0)
615
618
  ]))), 128))
616
- ], 8, wt))
619
+ ], 8, bt))
617
620
  ], 4)) : h("", !0),
618
- s("div", {
621
+ r("div", {
619
622
  class: "vlite-gantt-timeline-body",
620
623
  style: D({ height: `${O.value}px` })
621
624
  }, [
622
- (r(), i("svg", {
623
- width: M.value,
625
+ (u(), d("svg", {
626
+ width: Z.value,
624
627
  height: O.value,
625
628
  role: "img",
626
629
  "aria-label": "Gantt chart",
627
630
  class: "overflow-visible"
628
631
  }, [
629
- s("defs", null, [
630
- (r(!0), i($, null, L(w.value, (e, n) => (r(), i("linearGradient", {
632
+ r("defs", null, [
633
+ (u(!0), d($, null, C(w.value, (e, n) => (u(), d("linearGradient", {
631
634
  key: `g${n}`,
632
- id: `gg-${E(A)}-${n}`,
635
+ id: `gg-${z(R)}-${n}`,
633
636
  x1: "0",
634
637
  y1: "0",
635
638
  x2: "1",
636
639
  y2: "0"
637
640
  }, [
638
- s("stop", {
641
+ r("stop", {
639
642
  offset: "0%",
640
643
  "stop-color": e.task._color,
641
644
  "stop-opacity": "1"
642
645
  }, null, 8, Lt),
643
- s("stop", {
646
+ r("stop", {
644
647
  offset: "100%",
645
648
  "stop-color": e.task._color,
646
649
  "stop-opacity": "0.75"
647
- }, null, 8, Ct)
648
- ], 8, St))), 128)),
649
- (r(!0), i($, null, L(w.value, (e, n) => (r(), i("linearGradient", {
650
+ }, null, 8, _t)
651
+ ], 8, Ct))), 128)),
652
+ (u(!0), d($, null, C(w.value, (e, n) => (u(), d("linearGradient", {
650
653
  key: `p${n}`,
651
- id: `gp-${E(A)}-${n}`,
654
+ id: `gp-${z(R)}-${n}`,
652
655
  x1: "0",
653
656
  y1: "0",
654
657
  x2: "1",
655
658
  y2: "0"
656
659
  }, [
657
- s("stop", {
660
+ r("stop", {
658
661
  offset: "0%",
659
662
  "stop-color": e.task._color,
660
663
  "stop-opacity": "0.35"
661
- }, null, 8, Ht),
662
- s("stop", {
664
+ }, null, 8, zt),
665
+ r("stop", {
663
666
  offset: "100%",
664
667
  "stop-color": e.task._color,
665
668
  "stop-opacity": "0.15"
666
- }, null, 8, zt)
667
- ], 8, _t))), 128))
669
+ }, null, 8, Wt)
670
+ ], 8, Ht))), 128))
668
671
  ]),
669
- u.showGrid ? (r(!0), i($, { key: 0 }, L(ne.value, (e, n) => (r(), i("line", {
672
+ c.showGrid ? (u(!0), d($, { key: 0 }, C(pe.value, (e, n) => (u(), d("line", {
670
673
  key: n,
671
674
  x1: e.x,
672
675
  y1: 0,
@@ -675,148 +678,148 @@ const ct = {
675
678
  stroke: "currentColor",
676
679
  "stroke-opacity": "0.06",
677
680
  "stroke-dasharray": "4 4"
678
- }, null, 8, Et))), 128)) : h("", !0),
679
- (r(!0), i($, null, L(Z.value, (e, n) => (r(), i("line", {
681
+ }, null, 8, Tt))), 128)) : h("", !0),
682
+ (u(!0), d($, null, C(F.value, (e, n) => (u(), d("line", {
680
683
  key: n,
681
684
  x1: 0,
682
- y1: (n + 1) * u.rowHeight,
683
- x2: M.value,
684
- y2: (n + 1) * u.rowHeight,
685
+ y1: (n + 1) * c.rowHeight,
686
+ x2: Z.value,
687
+ y2: (n + 1) * c.rowHeight,
685
688
  stroke: "currentColor",
686
689
  "stroke-opacity": "0.04"
687
- }, null, 8, Tt))), 128)),
688
- (r(!0), i($, null, L(Z.value, (e, n) => nt((r(), i("rect", {
690
+ }, null, 8, Et))), 128)),
691
+ (u(!0), d($, null, C(F.value, (e, n) => lt((u(), d("rect", {
689
692
  key: `bg${n}`,
690
693
  x: 0,
691
- y: n * u.rowHeight,
692
- width: M.value,
693
- height: u.rowHeight,
694
+ y: n * c.rowHeight,
695
+ width: Z.value,
696
+ height: c.rowHeight,
694
697
  fill: "currentColor",
695
698
  "fill-opacity": "0.02"
696
- }, null, 8, Wt)), [
697
- [lt, e.type === "group-header"]
699
+ }, null, 8, It)), [
700
+ [at, e.type === "group-header"]
698
701
  ])), 128)),
699
- (r(!0), i($, null, L(Fe.value, (e, n) => (r(), i("g", {
702
+ (u(!0), d($, null, C(Ge.value, (e, n) => (u(), d("g", {
700
703
  key: n,
701
704
  class: "vlite-gantt-dep-group"
702
705
  }, [
703
- s("path", {
706
+ r("path", {
704
707
  d: e.d,
705
708
  stroke: "var(--color-muted-foreground)",
706
709
  "stroke-width": "1.5",
707
710
  "stroke-opacity": "0.35",
708
711
  fill: "none",
709
712
  "stroke-linejoin": "round"
710
- }, null, 8, It),
711
- s("path", {
713
+ }, null, 8, Bt),
714
+ r("path", {
712
715
  d: e.ad,
713
716
  fill: "var(--color-muted-foreground)",
714
717
  "fill-opacity": "0.5"
715
- }, null, 8, Bt)
718
+ }, null, 8, Rt)
716
719
  ]))), 128)),
717
- (r(!0), i($, null, L(w.value, (e, n) => (r(), i("g", {
720
+ (u(!0), d($, null, C(w.value, (e, n) => (u(), d("g", {
718
721
  key: e.task.id,
719
722
  ref_for: !0,
720
- ref: (a) => je(a, n),
721
- class: xe({ "vlite-gantt-bar-dragging": B.value && (G.value === e.task.id || E(l).affectedIds.has(e.task.id)) })
723
+ ref: (a) => Ne(a, n),
724
+ class: me({ "vlite-gantt-bar-dragging": I.value && (q.value === e.task.id || z(l).affectedIds.has(e.task.id)) })
722
725
  }, [
723
- e.task.milestone ? (r(), i("path", {
726
+ e.task.milestone ? (u(), d("path", {
724
727
  key: 0,
725
- d: Ue(e.x + e.fullW / 2, e.y + u.barHeight / 2, u.barHeight * 0.4),
726
- fill: `url(#gg-${E(A)}-${n})`,
728
+ d: Qe(e.x + e.fullW / 2, e.y + c.barHeight / 2, c.barHeight * 0.4),
729
+ fill: `url(#gg-${z(R)}-${n})`,
727
730
  stroke: e.task._color,
728
731
  "stroke-width": "1.5",
729
732
  "stroke-opacity": "0.6",
730
733
  class: "cursor-pointer",
731
- opacity: R.value === n ? 0.9 : 1,
732
- onMouseenter: (a) => $e(a, n),
734
+ opacity: B.value === n ? 0.9 : 1,
735
+ onMouseenter: (a) => Me(a, n),
733
736
  onMousemove: (a) => De(a, n),
734
- onMouseleave: Me,
735
- onClick: (a) => fe(e.task)
736
- }, null, 40, Rt)) : (r(), i($, { key: 1 }, [
737
- s("path", {
738
- d: ve(e.x, e.y, e.fullW, u.barHeight, u.barRadius),
739
- fill: `url(#gp-${E(A)}-${n})`,
737
+ onMouseleave: Se,
738
+ onClick: (a) => ve(e.task)
739
+ }, null, 40, At)) : (u(), d($, { key: 1 }, [
740
+ r("path", {
741
+ d: ce(e.x, e.y, e.fullW, c.barHeight, c.barRadius),
742
+ fill: `url(#gp-${z(R)}-${n})`,
740
743
  class: "pointer-events-none"
741
- }, null, 8, At),
742
- u.showProgress && e.progressW > 0 ? (r(), i("path", {
744
+ }, null, 8, Pt),
745
+ c.showProgress && e.progressW > 0 ? (u(), d("path", {
743
746
  key: 0,
744
- d: ve(e.x, e.y, Math.min(e.progressW, e.fullW), u.barHeight, u.barRadius),
745
- fill: `url(#gg-${E(A)}-${n})`,
747
+ d: ce(e.x, e.y, Math.min(e.progressW, e.fullW), c.barHeight, c.barRadius),
748
+ fill: `url(#gg-${z(R)}-${n})`,
746
749
  class: "pointer-events-none"
747
- }, null, 8, Pt)) : h("", !0),
748
- u.showProgress ? h("", !0) : (r(), i("path", {
750
+ }, null, 8, Ft)) : h("", !0),
751
+ c.showProgress ? h("", !0) : (u(), d("path", {
749
752
  key: 1,
750
- d: ve(e.x, e.y, e.w, u.barHeight, u.barRadius),
751
- fill: `url(#gg-${E(A)}-${n})`,
753
+ d: ce(e.x, e.y, e.w, c.barHeight, c.barRadius),
754
+ fill: `url(#gg-${z(R)}-${n})`,
752
755
  class: "pointer-events-none"
753
756
  }, null, 8, Zt)),
754
- s("rect", {
757
+ r("rect", {
755
758
  x: e.x,
756
759
  y: e.y,
757
760
  width: e.fullW,
758
- height: u.barHeight,
761
+ height: c.barHeight,
759
762
  fill: "transparent",
760
- style: D({ cursor: K.value }),
761
- onMouseenter: (a) => $e(a, n),
763
+ style: D({ cursor: U.value }),
764
+ onMouseenter: (a) => Me(a, n),
762
765
  onMousemove: (a) => De(a, n),
763
- onMouseleave: Me,
764
- onMousedown: (a) => Ve(a, n),
765
- onClick: (a) => fe(e.task)
766
+ onMouseleave: Se,
767
+ onMousedown: (a) => Ue(a, n),
768
+ onClick: (a) => ve(e.task)
766
769
  }, null, 44, Ot),
767
- R.value === n ? (r(), i("rect", {
770
+ B.value === n ? (u(), d("rect", {
768
771
  key: 2,
769
772
  x: e.x,
770
773
  y: e.y,
771
774
  width: e.fullW,
772
- height: u.barHeight,
773
- rx: u.barRadius,
774
- ry: u.barRadius,
775
+ height: c.barHeight,
776
+ rx: c.barRadius,
777
+ ry: c.barRadius,
775
778
  fill: "currentColor",
776
779
  "fill-opacity": "0.06",
777
780
  class: "pointer-events-none"
778
- }, null, 8, Ft)) : h("", !0),
779
- u.draggable && !e.task.milestone && (re.value === n || B.value && G.value === e.task.id) ? (r(), i($, { key: 3 }, [
780
- s("rect", {
781
+ }, null, 8, Gt)) : h("", !0),
782
+ c.draggable && !e.task.milestone && (se.value === n || I.value && q.value === e.task.id) ? (u(), d($, { key: 3 }, [
783
+ r("rect", {
781
784
  x: e.x,
782
785
  y: e.y + 4,
783
786
  width: "4",
784
- height: u.barHeight - 8,
787
+ height: c.barHeight - 8,
785
788
  rx: "2",
786
789
  fill: "currentColor",
787
790
  "fill-opacity": "0.4",
788
791
  class: "pointer-events-none"
789
- }, null, 8, Gt),
790
- s("rect", {
792
+ }, null, 8, qt),
793
+ r("rect", {
791
794
  x: e.x + e.fullW - 4,
792
795
  y: e.y + 4,
793
796
  width: "4",
794
- height: u.barHeight - 8,
797
+ height: c.barHeight - 8,
795
798
  rx: "2",
796
799
  fill: "currentColor",
797
800
  "fill-opacity": "0.4",
798
801
  class: "pointer-events-none"
799
- }, null, 8, qt)
802
+ }, null, 8, Xt)
800
803
  ], 64)) : h("", !0),
801
- u.showLabels && e.fullW > 60 ? (r(), i("text", {
804
+ c.showLabels && e.fullW > 60 ? (u(), d("text", {
802
805
  key: 4,
803
806
  x: e.x + 12,
804
- y: e.y + u.barHeight / 2,
807
+ y: e.y + c.barHeight / 2,
805
808
  "dominant-baseline": "middle",
806
809
  "font-size": "11",
807
810
  "font-weight": "600",
808
- fill: u.showProgress ? "currentColor" : "white",
811
+ fill: c.showProgress ? "currentColor" : "white",
809
812
  opacity: Q.value > 0.3 ? 0.85 : 0,
810
813
  class: "pointer-events-none"
811
- }, b(e.task.name), 9, Xt)) : h("", !0)
814
+ }, b(e.task.name), 9, jt)) : h("", !0)
812
815
  ], 64))
813
816
  ], 2))), 128)),
814
- s("g", {
817
+ r("g", {
815
818
  ref_key: "dragLabelRef",
816
- ref: z,
819
+ ref: H,
817
820
  style: { display: "none" }
818
821
  }, [...o[5] || (o[5] = [
819
- s("rect", {
822
+ r("rect", {
820
823
  x: "0",
821
824
  y: "0",
822
825
  width: "124",
@@ -825,7 +828,7 @@ const ct = {
825
828
  fill: "var(--color-foreground)",
826
829
  "fill-opacity": "0.85"
827
830
  }, null, -1),
828
- s("text", {
831
+ r("text", {
829
832
  x: "0",
830
833
  y: "0",
831
834
  "text-anchor": "middle",
@@ -835,56 +838,56 @@ const ct = {
835
838
  fill: "var(--color-background)"
836
839
  }, null, -1)
837
840
  ])], 512),
838
- u.showTodayLine && V.value ? (r(), i("g", jt, [
839
- s("line", {
840
- x1: F.value,
841
+ c.showTodayLine && V.value ? (u(), d("g", Nt, [
842
+ r("line", {
843
+ x1: G.value,
841
844
  y1: 0,
842
- x2: F.value,
845
+ x2: G.value,
843
846
  y2: O.value,
844
- stroke: u.todayColor,
847
+ stroke: c.todayColor,
845
848
  "stroke-width": "2",
846
849
  "stroke-opacity": "0.7",
847
850
  "stroke-dasharray": "6 3"
848
- }, null, 8, Nt),
849
- s("circle", {
850
- cx: F.value,
851
+ }, null, 8, Vt),
852
+ r("circle", {
853
+ cx: G.value,
851
854
  cy: 0,
852
855
  r: "4",
853
- fill: u.todayColor,
856
+ fill: c.todayColor,
854
857
  "fill-opacity": "0.9"
855
- }, null, 8, Vt),
856
- s("text", {
857
- x: F.value,
858
+ }, null, 8, Ut),
859
+ r("text", {
860
+ x: G.value,
858
861
  y: -8,
859
862
  "text-anchor": "middle",
860
863
  "font-size": "9",
861
864
  "font-weight": "700",
862
- fill: u.todayColor,
865
+ fill: c.todayColor,
863
866
  "fill-opacity": "0.9"
864
867
  }, "TODAY", 8, Kt)
865
868
  ])) : h("", !0)
866
- ], 8, Mt))
869
+ ], 8, St))
867
870
  ], 4)
868
871
  ], 544)
869
872
  ]),
870
- (r(), at(st, { to: "body" }, [
871
- g.value && !B.value ? (r(), i("div", {
873
+ (u(), st(rt, { to: "body" }, [
874
+ g.value && !I.value ? (u(), d("div", {
872
875
  key: 0,
873
876
  class: "vlite-chart-tooltip",
874
877
  style: D({ left: `${g.value.x + 14}px`, top: `${g.value.y - 12}px` })
875
878
  }, [
876
- s("div", Ut, b(g.value.task.name), 1),
877
- s("div", Qt, [
878
- s("span", {
879
+ r("div", Qt, b(g.value.task.name), 1),
880
+ r("div", Jt, [
881
+ r("span", {
879
882
  class: "w-2 h-2 rounded-sm shrink-0",
880
883
  style: D({ backgroundColor: g.value.task._color ?? g.value.task.color })
881
884
  }, null, 4),
882
- s("span", null, b(g.value.startStr) + " — " + b(g.value.endStr), 1)
885
+ r("span", null, b(g.value.startStr) + " — " + b(g.value.endStr), 1)
883
886
  ]),
884
- s("div", Jt, b(Je(g.value.task._start, g.value.task._end)), 1),
885
- u.showProgress && g.value.task.progress != null ? (r(), i("div", Yt, [
886
- s("div", eo, [
887
- s("div", {
887
+ r("div", Yt, b(Ye(g.value.task._start, g.value.task._end)), 1),
888
+ c.showProgress && g.value.task.progress != null ? (u(), d("div", eo, [
889
+ r("div", to, [
890
+ r("div", {
888
891
  class: "vlite-gantt-tooltip-progress-fill",
889
892
  style: D({
890
893
  width: `${g.value.task.progress}%`,
@@ -892,13 +895,13 @@ const ct = {
892
895
  })
893
896
  }, null, 4)
894
897
  ]),
895
- s("span", to, b(g.value.task.progress) + "%", 1)
898
+ r("span", oo, b(g.value.task.progress) + "%", 1)
896
899
  ])) : h("", !0),
897
- g.value.task.group ? (r(), i("div", oo, b(g.value.task.group), 1)) : h("", !0),
898
- u.draggable && !g.value.task.milestone ? (r(), i("div", no, [
899
- o[6] || (o[6] = ze(" Drag to move · Edges to resize ", -1)),
900
- u.cascadeDependencies ? (r(), i($, { key: 0 }, [
901
- ze(" · Dependents follow")
900
+ g.value.task.group ? (u(), d("div", no, b(g.value.task.group), 1)) : h("", !0),
901
+ c.draggable && !g.value.task.milestone ? (u(), d("div", lo, [
902
+ o[6] || (o[6] = We(" Drag to move · Edges to resize ", -1)),
903
+ c.cascadeDependencies ? (u(), d($, { key: 0 }, [
904
+ We(" · Dependents follow")
902
905
  ], 64)) : h("", !0)
903
906
  ])) : h("", !0)
904
907
  ], 4)) : h("", !0)
@@ -907,5 +910,5 @@ const ct = {
907
910
  }
908
911
  });
909
912
  export {
910
- io as default
913
+ uo as default
911
914
  };