vlite3 1.4.30 → 1.4.32

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 (79) hide show
  1. package/components/Accordion/Accordion.vue.js +19 -16
  2. package/components/Accordion/AccordionContent.vue.js +2 -2
  3. package/components/Accordion/AccordionItem.vue.js +38 -36
  4. package/components/CategoryManager/CategoryManager.vue2.js +3 -2
  5. package/components/Chart/GanttChart.vue.d.ts +13 -1
  6. package/components/Chart/GanttChart.vue.js +2 -2
  7. package/components/Chart/GanttChart.vue2.js +1185 -607
  8. package/components/Chart/GanttChartDateUtils.d.ts +38 -0
  9. package/components/Chart/GanttChartDateUtils.js +79 -0
  10. package/components/Chart/GanttChartDependencyUtils.d.ts +92 -0
  11. package/components/Chart/GanttChartDependencyUtils.js +113 -0
  12. package/components/Chart/GanttChartResizePreviewUtils.d.ts +52 -0
  13. package/components/Chart/GanttChartResizePreviewUtils.js +53 -0
  14. package/components/Chart/GanttChartTooltipUtils.d.ts +41 -0
  15. package/components/Chart/GanttChartTooltipUtils.js +63 -0
  16. package/components/Chart/index.d.ts +3 -1
  17. package/components/Chart/types.d.ts +76 -1
  18. package/components/Chart/types.js +8 -0
  19. package/components/FilePicker/FilePickerDropzone.vue.js +1 -1
  20. package/components/FilePicker/index.vue.js +2 -4
  21. package/components/Form/AccordionView.vue2.js +5 -2
  22. package/components/Form/AccordionView.vue3.js +250 -0
  23. package/components/Form/Form.vue.d.ts +0 -2
  24. package/components/Form/Form.vue.js +1 -1
  25. package/components/Form/Form.vue2.js +415 -354
  26. package/components/Form/FormField.vue.js +175 -196
  27. package/components/Form/FormFields.vue.js +1 -1
  28. package/components/Form/FormFields.vue2.js +60 -60
  29. package/components/Form/FormSkeleton.vue.js +50 -35
  30. package/components/Form/TableView.vue.js +59 -43
  31. package/components/Form/composables/useForm.js +159 -148
  32. package/components/Form/index.vue2.js +8 -8
  33. package/components/Form/utils/form.utils.d.ts +2 -0
  34. package/components/Form/utils/form.utils.js +17 -13
  35. package/components/GoogleMap.vue.d.ts +1 -1
  36. package/components/PanZoomViewport/PanZoomViewport.vue.d.ts +189 -0
  37. package/components/PanZoomViewport/PanZoomViewport.vue.js +7 -0
  38. package/components/PanZoomViewport/PanZoomViewport.vue2.js +536 -0
  39. package/components/PanZoomViewport/index.d.ts +2 -0
  40. package/components/PanZoomViewport/types.d.ts +121 -0
  41. package/components/ScaleGenerator/ScaleGenerator.vue.d.ts +3 -0
  42. package/components/ScaleGenerator/ScaleGenerator.vue.js +5 -108
  43. package/components/ScaleGenerator/ScaleGenerator.vue2.js +143 -2
  44. package/components/ScaleGenerator/types.d.ts +2 -0
  45. package/components/Screen/ScreenFilter.vue.js +18 -17
  46. package/components/SeoProvider/SeoProvider.vue.d.ts +4 -1
  47. package/components/SeoProvider/SeoProvider.vue.js +39 -33
  48. package/components/SeoProvider/domAdapter.d.ts +1 -4
  49. package/components/SeoProvider/domAdapter.js +71 -58
  50. package/components/SeoProvider/index.d.ts +5 -2
  51. package/components/SeoProvider/normalizeSeo.d.ts +10 -49
  52. package/components/SeoProvider/normalizeSeo.js +246 -182
  53. package/components/SeoProvider/plainText.d.ts +8 -0
  54. package/components/SeoProvider/plainText.js +117 -0
  55. package/components/SeoProvider/seoUrl.d.ts +13 -0
  56. package/components/SeoProvider/seoUrl.js +25 -0
  57. package/components/SeoProvider/structuredData.d.ts +100 -0
  58. package/components/SeoProvider/structuredData.js +33 -0
  59. package/components/SeoProvider/types.d.ts +47 -109
  60. package/components/Tabes/Tabes.vue.d.ts +10 -1
  61. package/components/Tabes/Tabes.vue.js +1 -1
  62. package/components/Tabes/Tabes.vue2.js +271 -170
  63. package/components/Tabes/TabesMarkerGeometry.d.ts +34 -0
  64. package/components/Tabes/TabesMarkerGeometry.js +21 -0
  65. package/components/Tabes/tabes.utils.d.ts +14 -0
  66. package/components/Tabes/tabes.utils.js +26 -0
  67. package/components/Tabes/types.d.ts +32 -0
  68. package/components/ThemeProvider/ThemeProvider.vue.d.ts +2 -0
  69. package/components/ThemeProvider/ThemeProvider.vue.js +29 -23
  70. package/components/ThemeProvider/index.d.ts +1 -1
  71. package/components/ThemeProvider/themeVars.d.ts +9 -13
  72. package/components/ThemeProvider/themeVars.js +173 -125
  73. package/components/ThemeProvider/types.d.ts +10 -0
  74. package/components/index.d.ts +2 -1
  75. package/index.d.ts +1 -0
  76. package/index.js +415 -387
  77. package/package.json +3 -2
  78. package/style.css +1 -1
  79. package/components/Form/AccordionView.vue.js +0 -222
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Pure calendar-date helpers for GanttChart layout and interaction.
3
+ *
4
+ * Task dates are treated as local calendar days (not UTC instants).
5
+ * Date-only ISO strings (`YYYY-MM-DD`) are parsed as local midnight so
6
+ * bars align with timeline column boundaries in every timezone.
7
+ */
8
+ export type GanttDateViewMode = 'day' | 'week' | 'month';
9
+ /** Local calendar midnight for a date */
10
+ export declare function ganttStartOfLocalDay(d: Date): Date;
11
+ /**
12
+ * Parse a Gantt task date as a local calendar day at 00:00:00.
13
+ * - `YYYY-MM-DD` → local midnight (never UTC)
14
+ * - Datetime strings / Date → normalized to local start of that calendar day
15
+ */
16
+ export declare function parseGanttDate(d: Date | string): Date;
17
+ /** Whole calendar days between local dates (time-of-day ignored). */
18
+ export declare function ganttCalendarDaysBetween(a: Date, b: Date): number;
19
+ export declare function ganttAddDays(d: Date, n: number): Date;
20
+ /** Monday-based week start at local midnight */
21
+ export declare function ganttStartOfWeek(d: Date): Date;
22
+ export declare function ganttStartOfMonth(d: Date): Date;
23
+ /** Format a local calendar date as `YYYY-MM-DD` (not UTC via toISOString). */
24
+ export declare function formatGanttLocalDate(d: Date): string;
25
+ /**
26
+ * Convert a calendar date to timeline X.
27
+ * A date that equals a column's start boundary maps to that column's left edge.
28
+ */
29
+ export declare function ganttDateToX(d: Date, rangeStart: Date, viewMode: GanttDateViewMode, columnWidth: number): number;
30
+ /** Pixel delta → calendar-day delta for the active view mode */
31
+ export declare function ganttPxToDays(px: number, viewMode: GanttDateViewMode, columnWidth: number): number;
32
+ /** Calendar-day delta → pixel delta for the active view mode */
33
+ export declare function ganttDaysToPx(days: number, viewMode: GanttDateViewMode, columnWidth: number): number;
34
+ /**
35
+ * X of the left edge of the column that contains `d` (or starts at `d`
36
+ * when `d` is exactly on a column boundary).
37
+ */
38
+ export declare function ganttColumnBoundaryX(d: Date, rangeStart: Date, viewMode: GanttDateViewMode, columnWidth: number): number;
@@ -0,0 +1,79 @@
1
+ const s = /^(\d{4})-(\d{2})-(\d{2})$/, f = /^(\d{4})-(\d{2})-(\d{2})/;
2
+ function u(t) {
3
+ return new Date(t.getFullYear(), t.getMonth(), t.getDate(), 0, 0, 0, 0);
4
+ }
5
+ function i(t) {
6
+ if (t instanceof Date)
7
+ return Number.isNaN(t.getTime()) ? /* @__PURE__ */ new Date(NaN) : u(t);
8
+ const e = String(t).trim();
9
+ if (!e) return /* @__PURE__ */ new Date(NaN);
10
+ const n = s.exec(e);
11
+ if (n)
12
+ return new Date(
13
+ Number(n[1]),
14
+ Number(n[2]) - 1,
15
+ Number(n[3]),
16
+ 0,
17
+ 0,
18
+ 0,
19
+ 0
20
+ );
21
+ const r = f.exec(e);
22
+ if (r && (e.includes("T") || e.includes(" ")))
23
+ return new Date(
24
+ Number(r[1]),
25
+ Number(r[2]) - 1,
26
+ Number(r[3]),
27
+ 0,
28
+ 0,
29
+ 0,
30
+ 0
31
+ );
32
+ const a = new Date(e);
33
+ return Number.isNaN(a.getTime()) ? a : u(a);
34
+ }
35
+ function o(t, e) {
36
+ const n = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
37
+ return (Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()) - n) / 864e5;
38
+ }
39
+ function N(t, e) {
40
+ const n = u(t);
41
+ return n.setDate(n.getDate() + e), n;
42
+ }
43
+ function l(t) {
44
+ const e = u(t), n = e.getDay();
45
+ return e.setDate(e.getDate() - (n === 0 ? 6 : n - 1)), e;
46
+ }
47
+ function y(t) {
48
+ return new Date(t.getFullYear(), t.getMonth(), 1, 0, 0, 0, 0);
49
+ }
50
+ function w(t) {
51
+ const e = t.getFullYear(), n = String(t.getMonth() + 1).padStart(2, "0"), r = String(t.getDate()).padStart(2, "0");
52
+ return `${e}-${n}-${r}`;
53
+ }
54
+ function T(t, e, n, r) {
55
+ if (n === "day")
56
+ return o(e, t) * r;
57
+ if (n === "week")
58
+ return o(e, t) / 7 * r;
59
+ const a = e, g = (t.getFullYear() - a.getFullYear()) * 12 + (t.getMonth() - a.getMonth()), c = new Date(t.getFullYear(), t.getMonth() + 1, 0).getDate(), D = (t.getDate() - 1) / c;
60
+ return (g + D) * r;
61
+ }
62
+ function F(t, e, n) {
63
+ return e === "day" ? t / n : e === "week" ? t / n * 7 : t / n * 30.44;
64
+ }
65
+ function Y(t, e, n) {
66
+ return e === "day" ? t * n : e === "week" ? t / 7 * n : t / 30.44 * n;
67
+ }
68
+ export {
69
+ w as formatGanttLocalDate,
70
+ N as ganttAddDays,
71
+ o as ganttCalendarDaysBetween,
72
+ T as ganttDateToX,
73
+ Y as ganttDaysToPx,
74
+ F as ganttPxToDays,
75
+ u as ganttStartOfLocalDay,
76
+ y as ganttStartOfMonth,
77
+ l as ganttStartOfWeek,
78
+ i as parseGanttDate
79
+ };
@@ -0,0 +1,92 @@
1
+ import { GanttDependencyType, GanttTask, GanttTaskDependencyLink } from './types';
2
+ /** Why a proposed predecessor → successor link was rejected */
3
+ export type GanttDependencyLinkRejectReason = 'self' | 'duplicate' | 'circular' | 'missing-predecessor' | 'missing-successor';
4
+ export type GanttDependencyLinkValidation = {
5
+ valid: true;
6
+ } | {
7
+ valid: false;
8
+ reason: GanttDependencyLinkRejectReason;
9
+ };
10
+ export type GanttDependencyTaskRef = Pick<GanttTask, 'id' | 'dependencies' | 'dependencyLinks' | 'milestone'> & {
11
+ name?: string;
12
+ };
13
+ /** Canonical schedule edge used for Gantt arrows (finish-to-start) */
14
+ export type GanttScheduleDependencyEdge = {
15
+ predecessorId: string;
16
+ successorId: string;
17
+ };
18
+ /** Minimal bar geometry needed for connector / hit-testing */
19
+ export interface GanttDependencyBarGeometry {
20
+ id: string;
21
+ x: number;
22
+ y: number;
23
+ fullW: number;
24
+ milestone?: boolean;
25
+ }
26
+ /** User-facing label for a dependency type (Type | Task selector) */
27
+ export declare function ganttDependencyTypeLabel(type: GanttDependencyType): string;
28
+ /**
29
+ * Normalize UI / API strings into a canonical `GanttDependencyType`.
30
+ * Accepts labels ("Waiting on"), kebab/snake/enum forms.
31
+ */
32
+ export declare function normalizeGanttDependencyType(input: string): GanttDependencyType | null;
33
+ /**
34
+ * Reverse user-facing view of a schedule edge.
35
+ * Waiting on ↔ Blocking; Related to is symmetrical.
36
+ */
37
+ export declare function invertGanttDependencyType(type: GanttDependencyType): GanttDependencyType;
38
+ /**
39
+ * Resolve all schedule (arrow-drawing) edges from `dependencies[]` and
40
+ * typed `dependencyLinks`. `related-to` never produces an edge.
41
+ *
42
+ * Waiting-on / blocking from either endpoint collapse to one
43
+ * predecessor → successor direction.
44
+ */
45
+ export declare function resolveGanttScheduleDependencyEdges(tasks: GanttDependencyTaskRef[]): GanttScheduleDependencyEdge[];
46
+ /** Predecessor IDs this task is waiting on (for arrows / cascade) */
47
+ export declare function getGanttWaitingOnTaskIds(task: GanttDependencyTaskRef): string[];
48
+ /** Whether a schedule edge already exists between predecessor and successor */
49
+ export declare function hasGanttScheduleDependency(tasks: GanttDependencyTaskRef[], predecessorId: string, successorId: string): boolean;
50
+ /**
51
+ * Connector sits just past the dependency *output* edge so it does not
52
+ * cover resize handles or bar labels. Milestones use the diamond's right tip.
53
+ */
54
+ export declare function getGanttDependencyConnectorPosition(bar: GanttDependencyBarGeometry, barHeight: number, offset?: number): {
55
+ cx: number;
56
+ cy: number;
57
+ };
58
+ /** Find the visible bar under an SVG-space pointer, if any. */
59
+ export declare function findGanttDependencyBarAtPoint(bars: GanttDependencyBarGeometry[], x: number, y: number, barHeight: number, hitPadding?: number): GanttDependencyBarGeometry | null;
60
+ /**
61
+ * Walk the schedule graph starting at `fromId`, following edges toward
62
+ * predecessors (from waiting-on / blocking-resolved edges).
63
+ */
64
+ export declare function ganttDependencyReachable(tasks: GanttDependencyTaskRef[], fromId: string, targetId: string): boolean;
65
+ /**
66
+ * Validate adding a schedule edge: successor waiting on predecessor.
67
+ * Does not mutate any task data. Related-to is out of scope here.
68
+ */
69
+ export declare function validateGanttDependencyLink(tasks: GanttDependencyTaskRef[], predecessorId: string, successorId: string): GanttDependencyLinkValidation;
70
+ /** Human-readable status for aria-live announcements */
71
+ export declare function describeGanttDependencyLinkValidation(validation: GanttDependencyLinkValidation, predecessorName: string, successorName: string): string;
72
+ /** Stable key for a predecessor → successor dependency edge */
73
+ export declare function ganttDependencyEdgeKey(predecessorId: string, successorId: string): string;
74
+ /** Midpoint used to place the delete control on a dependency edge */
75
+ export declare function getGanttDependencyEdgeMidpoint(fX: number, fY: number, tX: number, tY: number): {
76
+ x: number;
77
+ y: number;
78
+ };
79
+ /** Edge scroll: return scroll deltas when the pointer is near a viewport edge */
80
+ export declare function getGanttDependencyEdgeScrollDelta(clientX: number, clientY: number, viewport: {
81
+ left: number;
82
+ top: number;
83
+ right: number;
84
+ bottom: number;
85
+ }, edge?: number, speed?: number): {
86
+ dx: number;
87
+ dy: number;
88
+ };
89
+ /** Format "Type | Task" for selectors / announcements */
90
+ export declare function formatGanttDependencySelectorLabel(type: GanttDependencyType, taskName: string): string;
91
+ /** Build a typed waiting-on link for parent state updates */
92
+ export declare function createGanttWaitingOnLink(taskId: string): GanttTaskDependencyLink;
@@ -0,0 +1,113 @@
1
+ import { GANTT_DEPENDENCY_TYPE_LABELS as f } from "./types.js";
2
+ function D(e) {
3
+ return f[e];
4
+ }
5
+ function l(e) {
6
+ const t = /* @__PURE__ */ new Map(), i = (n, r) => {
7
+ !n || !r || n === r || t.set(p(n, r), {
8
+ predecessorId: n,
9
+ successorId: r
10
+ });
11
+ };
12
+ for (const n of e) {
13
+ for (const r of n.dependencies ?? [])
14
+ i(r, n.id);
15
+ for (const r of n.dependencyLinks ?? [])
16
+ r.type !== "related-to" && (r.type === "waiting-on" ? i(r.taskId, n.id) : r.type === "blocking" && i(n.id, r.taskId));
17
+ }
18
+ return [...t.values()];
19
+ }
20
+ function d(e, t, i) {
21
+ return l(e).some(
22
+ (n) => n.predecessorId === t && n.successorId === i
23
+ );
24
+ }
25
+ function h(e, t, i = 8) {
26
+ const n = e.y + t / 2;
27
+ if (e.milestone) {
28
+ const r = t * 0.4;
29
+ return { cx: e.x + e.fullW / 2 + r + i * 0.5, cy: n };
30
+ }
31
+ return { cx: e.x + e.fullW + i, cy: n };
32
+ }
33
+ function v(e, t, i, n, r = 4) {
34
+ for (let c = e.length - 1; c >= 0; c--) {
35
+ const o = e[c];
36
+ if (o.milestone) {
37
+ const s = o.x + o.fullW / 2, u = o.y + n / 2, a = n * 0.4 + r;
38
+ if (Math.abs(t - s) <= a && Math.abs(i - u) <= a) return o;
39
+ continue;
40
+ }
41
+ if (t >= o.x - r && t <= o.x + o.fullW + r && i >= o.y - r && i <= o.y + n + r)
42
+ return o;
43
+ }
44
+ return null;
45
+ }
46
+ function y(e, t, i) {
47
+ if (t === i) return !0;
48
+ const n = /* @__PURE__ */ new Map();
49
+ for (const o of l(e)) {
50
+ const s = n.get(o.successorId) ?? [];
51
+ s.push(o.predecessorId), n.set(o.successorId, s);
52
+ }
53
+ const r = /* @__PURE__ */ new Set(), c = [t];
54
+ for (; c.length; ) {
55
+ const o = c.shift();
56
+ if (r.has(o)) continue;
57
+ r.add(o);
58
+ const s = n.get(o);
59
+ if (s?.length)
60
+ for (const u of s) {
61
+ if (u === i) return !0;
62
+ r.has(u) || c.push(u);
63
+ }
64
+ }
65
+ return !1;
66
+ }
67
+ function x(e, t, i) {
68
+ if (t === i)
69
+ return { valid: !1, reason: "self" };
70
+ const n = e.find((c) => c.id === t), r = e.find((c) => c.id === i);
71
+ return n ? r ? d(e, t, i) ? { valid: !1, reason: "duplicate" } : y(e, t, i) ? { valid: !1, reason: "circular" } : { valid: !0 } : { valid: !1, reason: "missing-successor" } : { valid: !1, reason: "missing-predecessor" };
72
+ }
73
+ function E(e, t, i) {
74
+ if (e.valid === !0)
75
+ return `Dependency requested: ${i} waiting on ${t}`;
76
+ switch ("reason" in e ? e.reason : void 0) {
77
+ case "self":
78
+ return `Cannot create a dependency from ${t} to itself`;
79
+ case "duplicate":
80
+ return `${i} is already waiting on ${t}`;
81
+ case "circular":
82
+ return `Cannot link ${t} to ${i}: would create a circular dependency`;
83
+ case "missing-predecessor":
84
+ return "Predecessor task is not available";
85
+ case "missing-successor":
86
+ return "Successor task is not available";
87
+ default:
88
+ return "Invalid dependency target";
89
+ }
90
+ }
91
+ function p(e, t) {
92
+ return `${e}\0${t}`;
93
+ }
94
+ function G(e, t, i, n) {
95
+ return { x: (e + i) / 2, y: (t + n) / 2 };
96
+ }
97
+ function $(e, t, i, n = 40, r = 14) {
98
+ let c = 0, o = 0;
99
+ return e < i.left + n ? c = -r : e > i.right - n && (c = r), t < i.top + n ? o = -r : t > i.bottom - n && (o = r), { dx: c, dy: o };
100
+ }
101
+ export {
102
+ E as describeGanttDependencyLinkValidation,
103
+ v as findGanttDependencyBarAtPoint,
104
+ p as ganttDependencyEdgeKey,
105
+ y as ganttDependencyReachable,
106
+ D as ganttDependencyTypeLabel,
107
+ h as getGanttDependencyConnectorPosition,
108
+ G as getGanttDependencyEdgeMidpoint,
109
+ $ as getGanttDependencyEdgeScrollDelta,
110
+ d as hasGanttScheduleDependency,
111
+ l as resolveGanttScheduleDependencyEdges,
112
+ x as validateGanttDependencyLink
113
+ };
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Pure resize/move preview math for GanttChart.
3
+ * Preview snapping must match the values emitted on pointer release.
4
+ */
5
+ export type GanttInteractionMode = 'move' | 'resize-left' | 'resize-right';
6
+ export type GanttInteractionPreview = {
7
+ /** Half-day-snapped day delta applied to the interaction */
8
+ snappedDays: number;
9
+ /** Pixel delta after min-duration clamp (pre-snap) */
10
+ clampedPxDelta: number;
11
+ start: Date;
12
+ end: Date;
13
+ };
14
+ /** Same snap used on drag end — half-day increments */
15
+ export declare function snapGanttDayDelta(daysDelta: number): number;
16
+ /**
17
+ * Clamp a resize pixel delta so the task never shrinks below min duration.
18
+ */
19
+ export declare function clampGanttResizePxDelta(input: {
20
+ mode: 'resize-left' | 'resize-right';
21
+ pxDelta: number;
22
+ origDurationDays: number;
23
+ pxToDays: (px: number) => number;
24
+ daysToPx: (days: number) => number;
25
+ minDurationDays?: number;
26
+ }): number;
27
+ /**
28
+ * Compute temporary preview dates for move/resize.
29
+ * Uses the same half-day snap and min-duration rules as the final emission.
30
+ */
31
+ export declare function computeGanttInteractionPreview(input: {
32
+ mode: GanttInteractionMode;
33
+ pxDelta: number;
34
+ origStart: Date;
35
+ origEnd: Date;
36
+ origDurationDays: number;
37
+ pxToDays: (px: number) => number;
38
+ daysToPx: (days: number) => number;
39
+ addDays: (d: Date, n: number) => Date;
40
+ minDurationDays?: number;
41
+ }): GanttInteractionPreview;
42
+ /** Pixel geometry for a temporary preview bar derived from preview dates */
43
+ export declare function ganttPreviewBarGeometry(input: {
44
+ start: Date;
45
+ end: Date;
46
+ dateToX: (d: Date) => number;
47
+ minWidthPx?: number;
48
+ }): {
49
+ x: number;
50
+ fullW: number;
51
+ xEnd: number;
52
+ };
@@ -0,0 +1,53 @@
1
+ function D(a) {
2
+ return Math.round(a * 2) / 2;
3
+ }
4
+ function d(a) {
5
+ const o = a.minDurationDays ?? 0.5, r = a.pxToDays(a.pxDelta), e = a.origDurationDays;
6
+ return a.mode === "resize-left" && r >= e - o ? a.daysToPx(e - o) : a.mode === "resize-right" && -r >= e - o ? -a.daysToPx(e - o) : a.pxDelta;
7
+ }
8
+ function n(a) {
9
+ const o = a.minDurationDays ?? 0.5;
10
+ let r = a.pxDelta;
11
+ (a.mode === "resize-left" || a.mode === "resize-right") && (r = d({
12
+ mode: a.mode,
13
+ pxDelta: a.pxDelta,
14
+ origDurationDays: a.origDurationDays,
15
+ pxToDays: a.pxToDays,
16
+ daysToPx: a.daysToPx,
17
+ minDurationDays: o
18
+ }));
19
+ let e = D(a.pxToDays(r));
20
+ if (a.mode === "move")
21
+ return {
22
+ snappedDays: e,
23
+ clampedPxDelta: r,
24
+ start: a.addDays(a.origStart, e),
25
+ end: a.addDays(a.origEnd, e)
26
+ };
27
+ if (a.mode === "resize-left") {
28
+ const s = a.origDurationDays - o;
29
+ return e = Math.min(e, s), {
30
+ snappedDays: e,
31
+ clampedPxDelta: r,
32
+ start: a.addDays(a.origStart, e),
33
+ end: new Date(a.origEnd.getTime())
34
+ };
35
+ }
36
+ const t = -(a.origDurationDays - o);
37
+ return e = Math.max(e, t), {
38
+ snappedDays: e,
39
+ clampedPxDelta: r,
40
+ start: new Date(a.origStart.getTime()),
41
+ end: a.addDays(a.origEnd, e)
42
+ };
43
+ }
44
+ function m(a) {
45
+ const o = a.dateToX(a.start), r = a.dateToX(a.end), e = Math.max(a.minWidthPx ?? 8, r - o);
46
+ return { x: o, fullW: e, xEnd: o + e };
47
+ }
48
+ export {
49
+ d as clampGanttResizePxDelta,
50
+ n as computeGanttInteractionPreview,
51
+ m as ganttPreviewBarGeometry,
52
+ D as snapGanttDayDelta
53
+ };
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Pure tooltip placement helpers for GanttChart.
3
+ * Keeps task tooltips clear of the dependency connector and viewport edges.
4
+ */
5
+ /** Axis-aligned screen rect to steer the tooltip away from */
6
+ export type GanttTooltipAvoidRect = {
7
+ left: number;
8
+ top: number;
9
+ right: number;
10
+ bottom: number;
11
+ };
12
+ export type GanttTooltipPlaceInput = {
13
+ pointerX: number;
14
+ pointerY: number;
15
+ viewportWidth: number;
16
+ viewportHeight: number;
17
+ /** Estimated tooltip box — used only for collision / clamping */
18
+ estimatedWidth?: number;
19
+ estimatedHeight?: number;
20
+ /** Optional region to avoid (e.g. dependency connector hit area in screen space) */
21
+ avoid?: GanttTooltipAvoidRect | null;
22
+ gap?: number;
23
+ /** Extra shift below the pointer (positive moves tooltip down) */
24
+ offsetBottom?: number;
25
+ margin?: number;
26
+ };
27
+ export type GanttTooltipPlaceResult = {
28
+ left: number;
29
+ top: number;
30
+ };
31
+ /**
32
+ * Place a Gantt task tooltip near the pointer while avoiding an optional
33
+ * connector rect and staying inside the viewport.
34
+ * Prefers sitting just below the task/pointer so it does not cover the connector.
35
+ */
36
+ export declare function placeGanttTaskTooltip(input: GanttTooltipPlaceInput): GanttTooltipPlaceResult;
37
+ /**
38
+ * Whether a pointer in SVG space is inside the connector clear zone
39
+ * (hide tooltip rather than fighting overlap).
40
+ */
41
+ export declare function isGanttPointerNearConnector(pointerSvgX: number, pointerSvgY: number, connectorSvgX: number, connectorSvgY: number, radius?: number): boolean;
@@ -0,0 +1,63 @@
1
+ function d(f, t, a, s, p) {
2
+ const o = f + a, e = t + s;
3
+ return !(o < p.left || f > p.right || e < p.top || t > p.bottom);
4
+ }
5
+ function m(f, t, a, s, p, o, e) {
6
+ return {
7
+ left: Math.max(e, Math.min(f, Math.max(e, p - a - e))),
8
+ top: Math.max(e, Math.min(t, Math.max(e, o - s - e)))
9
+ };
10
+ }
11
+ function x(f) {
12
+ const {
13
+ pointerX: t,
14
+ pointerY: a,
15
+ viewportWidth: s,
16
+ viewportHeight: p,
17
+ estimatedWidth: o = 200,
18
+ estimatedHeight: e = 120,
19
+ avoid: i = null,
20
+ gap: n = 12,
21
+ offsetBottom: M = 16,
22
+ margin: u = 8
23
+ } = f, l = a + M, h = [];
24
+ i && (h.push({
25
+ left: t + n,
26
+ top: Math.max(l, i.bottom + n)
27
+ }), h.push({
28
+ left: i.left - o - n,
29
+ top: Math.max(l, i.bottom + n)
30
+ }), h.push({
31
+ left: Math.min(t, i.left) - o - n,
32
+ top: l
33
+ })), h.push({ left: t + n, top: l }), h.push({ left: t - o - n, top: l }), h.push({ left: t - o / 2, top: l }), h.push({ left: t + n, top: a - n }), h.push({ left: t - o / 2, top: a - e - n });
34
+ for (const c of h) {
35
+ const r = m(
36
+ c.left,
37
+ c.top,
38
+ o,
39
+ e,
40
+ s,
41
+ p,
42
+ u
43
+ );
44
+ if (!i || !d(r.left, r.top, o, e, i))
45
+ return r;
46
+ }
47
+ return m(
48
+ t - o - n,
49
+ l,
50
+ o,
51
+ e,
52
+ s,
53
+ p,
54
+ u
55
+ );
56
+ }
57
+ function b(f, t, a, s, p = 16) {
58
+ return Math.hypot(f - a, t - s) <= p;
59
+ }
60
+ export {
61
+ b as isGanttPointerNearConnector,
62
+ x as placeGanttTaskTooltip
63
+ };
@@ -9,5 +9,7 @@ export { default as SegmentBarChart } from './SegmentBarChart.vue';
9
9
  export { default as StatCardChart } from './StatCardChart.vue';
10
10
  export { default as WaffleChart } from './WaffleChart.vue';
11
11
  export { default as GanttChart } from './GanttChart.vue';
12
- export type { ChartDataPoint, ChartDataset, ChartLegendsVariant, LegendPosition, LineChartProps, BarChartProps, PieChartProps, CircleChartProps, GaugeChartProps, GaugeVariant, GaugeZone, SpeedometerChartProps, SpeedometerVariant, TimelineChartProps, TimelineTask, SegmentBarChartProps, StatCardChartProps, StatCardItem, WaffleChartProps, GanttChartProps, GanttTask, GanttViewMode, } from './types';
12
+ export type { ChartDataPoint, ChartDataset, ChartLegendsVariant, LegendPosition, LineChartProps, BarChartProps, PieChartProps, CircleChartProps, GaugeChartProps, GaugeVariant, GaugeZone, SpeedometerChartProps, SpeedometerVariant, TimelineChartProps, TimelineTask, SegmentBarChartProps, StatCardChartProps, StatCardItem, WaffleChartProps, GanttChartProps, GanttTask, GanttViewMode, GanttDependencyType, GanttTaskDependencyLink, GanttDependencyCreatePayload, GanttDependencyDeletePayload, } from './types';
13
+ export { GANTT_DEPENDENCY_TYPE_LABELS } from './types';
14
+ export { formatGanttLocalDate, parseGanttDate, ganttDateToX, ganttCalendarDaysBetween, } from './GanttChartDateUtils';
13
15
  export { default as ChartLegend } from './ChartLegend.vue';
@@ -362,6 +362,30 @@ export interface WaffleChartProps {
362
362
  }
363
363
  /** View granularity for the Gantt time axis */
364
364
  export type GanttViewMode = 'day' | 'week' | 'month';
365
+ /**
366
+ * User-facing dependency type from the **owning task's** perspective.
367
+ *
368
+ * - `waiting-on` — this task cannot proceed until `taskId` is completed
369
+ * - `blocking` — this task prevents `taskId` from proceeding
370
+ * - `related-to` — connected, but does not schedule-block (no Gantt arrow)
371
+ *
372
+ * `waiting-on` and `blocking` are opposite views of one schedule edge:
373
+ * "B waiting on A" === "A blocking B". Parents should persist one canonical
374
+ * record (e.g. BLOCKS with blockingTaskId=A, waitingTaskId=B).
375
+ */
376
+ export type GanttDependencyType = 'waiting-on' | 'blocking' | 'related-to';
377
+ /** Display labels for the Type | Task selector pattern */
378
+ export declare const GANTT_DEPENDENCY_TYPE_LABELS: Record<GanttDependencyType, string>;
379
+ /**
380
+ * Typed dependency link on a Gantt task.
381
+ * Only `waiting-on` / `blocking` contribute to schedule arrows; `related-to` does not.
382
+ */
383
+ export interface GanttTaskDependencyLink {
384
+ /** The other task in this relationship */
385
+ taskId: string;
386
+ /** Relationship from THIS task's perspective */
387
+ type: GanttDependencyType;
388
+ }
365
389
  /** A single task (or milestone) on the Gantt chart */
366
390
  export interface GanttTask {
367
391
  /** Unique identifier for this task */
@@ -378,8 +402,18 @@ export interface GanttTask {
378
402
  color?: string;
379
403
  /** Group label — tasks sharing the same group are visually grouped */
380
404
  group?: string;
381
- /** IDs of tasks this task depends on. Renders dependency arrows */
405
+ /**
406
+ * Legacy / shorthand: IDs of tasks this task is **waiting on** (predecessors).
407
+ * Renders finish-to-start dependency arrows. Equivalent to
408
+ * `dependencyLinks: [{ taskId, type: 'waiting-on' }, ...]`.
409
+ */
382
410
  dependencies?: string[];
411
+ /**
412
+ * Typed user-facing dependency links (Waiting on / Blocking / Related to).
413
+ * Schedule arrows are drawn only for waiting-on / blocking edges.
414
+ * `related-to` is retained for parent UIs and never draws an arrow.
415
+ */
416
+ dependencyLinks?: GanttTaskDependencyLink[];
383
417
  /** If true, renders as a diamond milestone marker instead of a bar */
384
418
  milestone?: boolean;
385
419
  }
@@ -422,8 +456,49 @@ export interface GanttChartProps {
422
456
  locale?: string;
423
457
  /** Allow drag-and-drop to move/resize tasks */
424
458
  draggable?: boolean;
459
+ /**
460
+ * Opt-in: show dependency connectors and allow creating links by drag
461
+ * (or keyboard). Independent of `showDependencies` (which only controls
462
+ * rendering of existing arrows). Default `false` for backward compatibility.
463
+ */
464
+ editableDependencies?: boolean;
425
465
  /** When moving a task, also shift all dependent tasks recursively */
426
466
  cascadeDependencies?: boolean;
427
467
  /** Show zoom controls and enable Ctrl/Meta + wheel zoom */
428
468
  zoom?: boolean;
429
469
  }
470
+ /**
471
+ * Payload emitted by GanttChart `@dependency-create`.
472
+ * Parent should persist one canonical schedule edge
473
+ * (successor waiting on predecessor / predecessor blocking successor)
474
+ * and pass updated `tasks` back — the chart never mutates tasks.
475
+ */
476
+ export interface GanttDependencyCreatePayload {
477
+ /** Task that must finish first (source / arrow origin) */
478
+ predecessorId: string;
479
+ /** Task that waits on the predecessor */
480
+ successorId: string;
481
+ predecessor: GanttTask;
482
+ successor: GanttTask;
483
+ /**
484
+ * User-facing type from the **successor's** perspective.
485
+ * Connector linking always emits `waiting-on`
486
+ * (successor Waiting on | predecessor).
487
+ */
488
+ type: Extract<GanttDependencyType, 'waiting-on'>;
489
+ /** Localized-ready label, e.g. "Waiting on" */
490
+ typeLabel: string;
491
+ }
492
+ /**
493
+ * Payload emitted by GanttChart `@dependency-delete`.
494
+ * Parent should remove the canonical schedule edge and update `tasks`.
495
+ */
496
+ export interface GanttDependencyDeletePayload {
497
+ predecessorId: string;
498
+ successorId: string;
499
+ predecessor: GanttTask;
500
+ successor: GanttTask;
501
+ /** Same semantics as create — schedule edge from successor's view */
502
+ type: Extract<GanttDependencyType, 'waiting-on'>;
503
+ typeLabel: string;
504
+ }
@@ -0,0 +1,8 @@
1
+ const o = {
2
+ "waiting-on": "Waiting on",
3
+ blocking: "Blocking",
4
+ "related-to": "Related to"
5
+ };
6
+ export {
7
+ o as GANTT_DEPENDENCY_TYPE_LABELS
8
+ };
@@ -11,7 +11,7 @@ const N = ["data-testid"], S = { class: "p-3 bg-muted rounded-full text-muted-fo
11
11
  class: "space-y-2"
12
12
  }, j = {
13
13
  key: 0,
14
- class: "flex gap-2"
14
+ class: "flex gap-2 mb-4!"
15
15
  }, H = /* @__PURE__ */ F({
16
16
  __name: "FilePickerDropzone",
17
17
  props: {
@@ -56,14 +56,12 @@ const j = ["multiple", "accept", "data-testid"], O = /* @__PURE__ */ V({
56
56
  if (!e.hasValue.value) return "";
57
57
  const a = e.displayFiles.value, r = a[0]?.fileName || f.value;
58
58
  return !t.multiSelect || a.length <= 1 ? r : `${r} +${a.length - 1}`;
59
- }), v = n(
60
- () => c["data-testid"] || "filepicker"
61
- ), A = n(() => {
59
+ }), v = n(() => c["data-testid"] || "filepicker"), A = n(() => {
62
60
  const a = c;
63
61
  return a["data-testid"] ? `${a["data-testid"]}-input` : a.name ? `filepicker-input-${a.name}` : "filepicker-input";
64
62
  }), o = () => e.triggerInput(p.value), T = n(() => e.acceptAttribute.value);
65
63
  return (a, r) => (u(), N("div", {
66
- class: C(["vl-file-picker mb-4! w-full min-w-0", { "vl-file-picker--input": l.variant === "input" }])
64
+ class: C(["vl-file-picker w-full min-w-0", { "vl-file-picker--input": l.variant === "input" }])
67
65
  }, [
68
66
  E("input", {
69
67
  ref_key: "fileInput",