@koyori-app/arc-vue 0.1.0-alpha.3 → 0.1.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GanttChart.vue.d.ts +60 -2
- package/dist/arc-vue.css +1 -1
- package/dist/arc-vue.js +257 -151
- package/dist/arc-vue.umd.cjs +1 -1
- package/dist/canvasFallback.d.ts +31 -0
- package/dist/index.d.ts +3 -3
- package/dist/options.d.ts +63 -0
- package/dist/replayCommands.d.ts +7 -1
- package/dist/types.d.ts +29 -0
- package/dist/wasmContract.d.ts +6 -0
- package/package.json +2 -2
package/dist/GanttChart.vue.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { GanttTask, GanttDep } from './types.ts';
|
|
1
|
+
import { GanttTask, GanttDep, GanttRow } from './types.ts';
|
|
2
|
+
import { PaletteOverrides, ProgressLineMode, ViewRange } from './options';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
tasks: GanttTask[];
|
|
4
5
|
deps?: GanttDep[];
|
|
@@ -19,12 +20,69 @@ type __VLS_Props = {
|
|
|
19
20
|
* legend of every existing caller.
|
|
20
21
|
*/
|
|
21
22
|
legend?: 'shown' | 'hidden';
|
|
23
|
+
/**
|
|
24
|
+
* `'hidden'` leaves the title column out: the days start half a bar
|
|
25
|
+
* (`HIDDEN_LABELS_LEFT_PX`, or half of `barHeight` when it is set) in from
|
|
26
|
+
* the left edge, and a click hits only the bars and the milestones' diamonds.
|
|
27
|
+
* For a caller that lays the chart beside a list of its own. A string for the
|
|
28
|
+
* same reason as `legend`.
|
|
29
|
+
*/
|
|
30
|
+
rowLabels?: 'shown' | 'hidden';
|
|
31
|
+
/** `'hidden'` leaves out the `NN%` on every bar and milestone. */
|
|
32
|
+
percentLabels?: 'shown' | 'hidden';
|
|
33
|
+
/**
|
|
34
|
+
* The chart's rows, top to bottom, for a caller that lays them out itself
|
|
35
|
+
* beside a list of its own: task rows and group rows (a band, no bar). A
|
|
36
|
+
* task left out is not drawn. Left out, one row per task as the crate lays
|
|
37
|
+
* them out. See `docs/design/external-rows.md`.
|
|
38
|
+
*/
|
|
39
|
+
rows?: GanttRow[];
|
|
40
|
+
/** Height of a row in pixels. Left out, the crate's own. */
|
|
41
|
+
rowHeight?: number;
|
|
42
|
+
/** Height of the date header in pixels. Left out, the crate's own. */
|
|
43
|
+
headerHeight?: number;
|
|
44
|
+
/** Height of a bar in pixels. Left out, the crate's own. */
|
|
45
|
+
barHeight?: number;
|
|
46
|
+
/** `'bottom'` sets a bar low in a tall row, leaving the room above it. */
|
|
47
|
+
barAlign?: 'middle' | 'bottom';
|
|
48
|
+
/**
|
|
49
|
+
* Colours that replace the chart's own, by colour name, such as
|
|
50
|
+
* `{ HeaderBg: 'var(--koyori-color-surface)' }`. The SVG path writes
|
|
51
|
+
* `var(--…)` as it is, and the browser follows a token whenever it changes.
|
|
52
|
+
* The canvas path reads it off the canvas's computed style when it paints,
|
|
53
|
+
* and paints again when the colour scheme or an ancestor's `class`, `style`
|
|
54
|
+
* or `data-*` changes. A token changed any other way (a stylesheet swapped
|
|
55
|
+
* in, say) needs `repaint()`, or the palette passed again as a new object.
|
|
56
|
+
*/
|
|
57
|
+
palette?: PaletteOverrides;
|
|
58
|
+
/** Width of a day in pixels. Left out, the crate's own. */
|
|
59
|
+
pxPerDay?: number;
|
|
60
|
+
/**
|
|
61
|
+
* What the date header marks: `'week'` (the default), `'day'` (every day's
|
|
62
|
+
* number and weekday, and the month above the first day of each), or
|
|
63
|
+
* `'month'`. With `'day'` and no `headerHeight`, the header is 48 px, room
|
|
64
|
+
* for its three tiers. A `headerHeight` below 48 leaves the months out rather
|
|
65
|
+
* than draw them over the days.
|
|
66
|
+
*/
|
|
67
|
+
scale?: 'week' | 'day' | 'month';
|
|
68
|
+
/** Weekday numbers drawn as weekend bands, 0 for Monday to 6 for Sunday. */
|
|
69
|
+
weekendDays?: number[];
|
|
70
|
+
/** Seven labels, Monday first, for the `'day'` scale, such as `['月', …, '日']`. */
|
|
71
|
+
weekdayLabels?: string[];
|
|
72
|
+
/** The days the chart shows, both included; left out, every task's days. */
|
|
73
|
+
view?: ViewRange;
|
|
74
|
+
/** How the progress line is drawn; left out, the line as before. */
|
|
75
|
+
progressLine?: ProgressLineMode;
|
|
22
76
|
/** Render backend — default `svg` preserves existing DOM projection. */
|
|
23
77
|
backend?: 'svg' | 'canvas';
|
|
24
78
|
/** Override auto-detected device tier (VRT / Storybook should pin this). */
|
|
25
79
|
deviceTier?: 'low' | 'high';
|
|
26
80
|
};
|
|
27
|
-
|
|
81
|
+
/** Paints the canvas again, once per frame however often it is asked. */
|
|
82
|
+
declare function repaint(): void;
|
|
83
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
|
|
84
|
+
repaint: typeof repaint;
|
|
85
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
28
86
|
taskClick: (task: GanttTask) => any;
|
|
29
87
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
30
88
|
onTaskClick?: ((task: GanttTask) => any) | undefined;
|
package/dist/arc-vue.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.koyori-gantt-scroll[data-v-
|
|
1
|
+
.koyori-gantt-scroll[data-v-05f0ec3c]{width:100%;overflow:auto}.koyori-gantt-scroll--virtual[data-v-05f0ec3c]{max-height:min(70vh,600px)}.koyori-gantt-inner[data-v-05f0ec3c]{width:100%;position:relative}.koyori-gantt-error[data-v-05f0ec3c]{color:#991b1b;padding:12px}.koyori-gantt-svg[data-v-05f0ec3c]{width:100%;position:absolute;top:0;left:0}.koyori-gantt-canvas[data-v-05f0ec3c]{display:block;position:absolute;top:0;left:0}.koyori-gantt-svg[data-v-05f0ec3c] svg{display:block}.koyori-gantt-skeleton[data-v-05f0ec3c]{--koyori-skeleton-gap:4px;--koyori-skeleton-bar-min-w:8px}.koyori-gantt-skeleton-row[data-v-05f0ec3c]{height:var(--v59cd6a8e);align-items:center;gap:var(--koyori-skeleton-gap);display:flex}.koyori-gantt-skeleton-label[data-v-05f0ec3c]{width:var(--koyori-skeleton-label-w);background:#e5e7eb;border-radius:4px;flex-shrink:0;height:12px}.koyori-gantt-skeleton-bar[data-v-05f0ec3c]{height:var(--v59c5ef75);min-width:var(--koyori-skeleton-bar-min-w);max-width:calc(100% - var(--koyori-skeleton-label-w) - var(--koyori-skeleton-gap) - var(--koyori-skeleton-bar-min-w));background:#d1d5db;border-radius:4px;animation:1.4s ease-in-out infinite koyori-gantt-shimmer-05f0ec3c}@keyframes koyori-gantt-shimmer-05f0ec3c{0%,to{opacity:.6}50%{opacity:1}}
|
|
2
2
|
/*$vite$:1*/
|
package/dist/arc-vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment as e, computed as t, createElementBlock as n, createElementVNode as r, defineComponent as i, nextTick as a, normalizeClass as o, normalizeStyle as s, onBeforeUnmount as c, onMounted as l, openBlock as u, ref as d, renderList as ee, toDisplayString as te, useCssVars as ne, watch as f } from "vue";
|
|
2
|
-
import p, { empty_svg_markup as re, legend_spec_json as
|
|
2
|
+
import p, { empty_svg_markup as re, legend_spec_json as ie, render_canvas_commands as ae, render_svg as oe, render_svg_error as se } from "@koyori-app/arc";
|
|
3
3
|
//#region src/replayCommands.ts
|
|
4
|
-
var
|
|
4
|
+
var ce = [
|
|
5
5
|
"BarBg",
|
|
6
6
|
"TierLow",
|
|
7
7
|
"TierMid",
|
|
@@ -14,14 +14,47 @@ var g = [
|
|
|
14
14
|
"HeaderBg",
|
|
15
15
|
"GridLabel",
|
|
16
16
|
"ProgressTextOnFg",
|
|
17
|
-
"ProgressTextOnBg"
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
"ProgressTextOnBg",
|
|
18
|
+
"GroupRow",
|
|
19
|
+
"Weekend",
|
|
20
|
+
"BarStroke",
|
|
21
|
+
"DoneBg",
|
|
22
|
+
"DoneStroke",
|
|
23
|
+
"WarnBg",
|
|
24
|
+
"WarnStroke",
|
|
25
|
+
"HardDeadline",
|
|
26
|
+
"Note",
|
|
27
|
+
"NoteBg",
|
|
28
|
+
"ProgressLine"
|
|
29
|
+
], le = {
|
|
30
|
+
GroupRow: "HeaderBg",
|
|
31
|
+
Weekend: "HeaderBg",
|
|
32
|
+
BarStroke: "GridLabel",
|
|
33
|
+
DoneBg: "BarBg",
|
|
34
|
+
DoneStroke: "GridLabel",
|
|
35
|
+
WarnBg: "BarBg",
|
|
36
|
+
WarnStroke: "Progress",
|
|
37
|
+
HardDeadline: "Progress",
|
|
38
|
+
Note: "GridLabel",
|
|
39
|
+
NoteBg: "HeaderBg",
|
|
40
|
+
ProgressLine: "Progress"
|
|
41
|
+
};
|
|
42
|
+
function m(e, t) {
|
|
43
|
+
let n = e.palette.colors.find(([e]) => e === t);
|
|
44
|
+
if (n) return n[1];
|
|
45
|
+
let r = le[t];
|
|
46
|
+
return r ? m(e, r) : void 0;
|
|
47
|
+
}
|
|
48
|
+
function h(e, t) {
|
|
49
|
+
let n = /^var\((--[A-Za-z0-9_-]+)\)$/.exec(e);
|
|
50
|
+
return n ? !t || typeof getComputedStyle > "u" ? "#000000" : getComputedStyle(t).getPropertyValue(n[1]).trim() || "#000000" : e;
|
|
51
|
+
}
|
|
52
|
+
function g(e, t, n) {
|
|
20
53
|
if (t === 255) return "#374151";
|
|
21
|
-
let
|
|
22
|
-
return
|
|
54
|
+
let r = ce[t];
|
|
55
|
+
return r ? h(m(e, r) ?? "#000000", n) : "#000000";
|
|
23
56
|
}
|
|
24
|
-
function
|
|
57
|
+
function _(e, t, n, r, i) {
|
|
25
58
|
if (r <= 0 || i <= 0) return e;
|
|
26
59
|
let a = t + r, o = n + i;
|
|
27
60
|
if (e.w === 0 && e.h === 0) return {
|
|
@@ -38,20 +71,20 @@ function v(e, t, n, r, i) {
|
|
|
38
71
|
h: u - c
|
|
39
72
|
};
|
|
40
73
|
}
|
|
41
|
-
function
|
|
74
|
+
function v(e, t, n, r, i, a) {
|
|
42
75
|
if (a > 0 && typeof e.roundRect == "function") {
|
|
43
76
|
e.beginPath(), e.roundRect(t, n, r, i, a), e.fill();
|
|
44
77
|
return;
|
|
45
78
|
}
|
|
46
79
|
e.fillRect(t, n, r, i);
|
|
47
80
|
}
|
|
48
|
-
function
|
|
49
|
-
if (e.strokeStyle =
|
|
81
|
+
function y(e, t, n, r, i) {
|
|
82
|
+
if (e.strokeStyle = g(t, n, e.canvas), e.lineWidth = r, i) {
|
|
50
83
|
let t = i.split(",").map((e) => Number.parseFloat(e.trim()));
|
|
51
84
|
e.setLineDash(t.every(Number.isFinite) ? t : []);
|
|
52
85
|
} else e.setLineDash([]);
|
|
53
86
|
}
|
|
54
|
-
function
|
|
87
|
+
function b(e, t) {
|
|
55
88
|
let n = [], r = null, i = {
|
|
56
89
|
x: 0,
|
|
57
90
|
y: 0,
|
|
@@ -86,23 +119,23 @@ function x(e, t) {
|
|
|
86
119
|
}
|
|
87
120
|
if ("FillRect" in a) {
|
|
88
121
|
let { x: n, y: o, w: s, h: c, color_id: l, radius: u } = a.FillRect;
|
|
89
|
-
e.fillStyle =
|
|
122
|
+
e.fillStyle = g(t, l, e.canvas), v(e, n, o, s, c, u), r && (i = _(i, n, o, s, c));
|
|
90
123
|
continue;
|
|
91
124
|
}
|
|
92
125
|
if ("FillPolygon" in a) {
|
|
93
126
|
let { points: n, color_id: o } = a.FillPolygon;
|
|
94
127
|
if (n.length === 0) continue;
|
|
95
|
-
e.fillStyle =
|
|
128
|
+
e.fillStyle = g(t, o, e.canvas), e.beginPath(), e.moveTo(n[0][0], n[0][1]);
|
|
96
129
|
for (let t = 1; t < n.length; t++) e.lineTo(n[t][0], n[t][1]);
|
|
97
130
|
if (e.closePath(), e.fill(), r && n.length > 0) {
|
|
98
131
|
let e = n.map((e) => e[0]), t = n.map((e) => e[1]), r = Math.min(...e), a = Math.min(...t);
|
|
99
|
-
i =
|
|
132
|
+
i = _(i, r, a, Math.max(...e) - r, Math.max(...t) - a);
|
|
100
133
|
}
|
|
101
134
|
continue;
|
|
102
135
|
}
|
|
103
136
|
if ("StrokePath" in a) {
|
|
104
137
|
let { d: n, color_id: r, width: i } = a.StrokePath;
|
|
105
|
-
|
|
138
|
+
y(e, t, r, i, null);
|
|
106
139
|
let o = new Path2D(n);
|
|
107
140
|
e.stroke(o);
|
|
108
141
|
continue;
|
|
@@ -110,19 +143,19 @@ function x(e, t) {
|
|
|
110
143
|
if ("StrokePolyline" in a) {
|
|
111
144
|
let { points: n, color_id: r, width: i, dash: o } = a.StrokePolyline;
|
|
112
145
|
if (n.length < 2) continue;
|
|
113
|
-
|
|
146
|
+
y(e, t, r, i, o), e.beginPath(), e.moveTo(n[0][0], n[0][1]);
|
|
114
147
|
for (let t = 1; t < n.length; t++) e.lineTo(n[t][0], n[t][1]);
|
|
115
148
|
e.stroke();
|
|
116
149
|
continue;
|
|
117
150
|
}
|
|
118
151
|
if ("DrawText" in a) {
|
|
119
152
|
let { x: n, y: r, text: i, color_id: o, anchor: s, size: c, weight: l } = a.DrawText;
|
|
120
|
-
e.fillStyle =
|
|
153
|
+
e.fillStyle = g(t, o, e.canvas), e.font = `${l} ${c}px sans-serif`, e.textBaseline = "alphabetic", s === 1 ? e.textAlign = "center" : s === 2 ? e.textAlign = "end" : e.textAlign = "start", e.fillText(i, n, r), e.textAlign = "start";
|
|
121
154
|
}
|
|
122
155
|
}
|
|
123
156
|
return { hitRegions: n };
|
|
124
157
|
}
|
|
125
|
-
function
|
|
158
|
+
function ue(e) {
|
|
126
159
|
try {
|
|
127
160
|
return JSON.parse(e);
|
|
128
161
|
} catch {
|
|
@@ -135,7 +168,7 @@ function oe(e) {
|
|
|
135
168
|
};
|
|
136
169
|
}
|
|
137
170
|
}
|
|
138
|
-
function
|
|
171
|
+
function de(e, t, n) {
|
|
139
172
|
for (let r = e.length - 1; r >= 0; r--) {
|
|
140
173
|
let i = e[r];
|
|
141
174
|
if (t >= i.x && t <= i.x + i.w && n >= i.y && n <= i.y + i.h) return i.taskId;
|
|
@@ -144,34 +177,39 @@ function S(e, t, n) {
|
|
|
144
177
|
}
|
|
145
178
|
//#endregion
|
|
146
179
|
//#region src/canvasLifecycle.ts
|
|
147
|
-
function
|
|
180
|
+
function fe(e) {
|
|
148
181
|
if (!e) return;
|
|
149
182
|
let t = e.getContext("2d");
|
|
150
183
|
t && t.clearRect(0, 0, e.width, e.height), e.width = 0, e.height = 0, e.style.width = "0px", e.style.height = "0px";
|
|
151
184
|
}
|
|
152
185
|
//#endregion
|
|
153
186
|
//#region src/options.ts
|
|
154
|
-
function
|
|
187
|
+
function pe(e) {
|
|
155
188
|
let t = {};
|
|
156
|
-
return e.today != null && (t.today = e.today), e.scrollViewport != null && (t.scroll_viewport = e.scrollViewport), e.tzOffsetMinutes != null && (t.tz_offset_minutes = Number.isFinite(e.tzOffsetMinutes) ? e.tzOffsetMinutes : String(e.tzOffsetMinutes)), e.legend != null && (t.legend = e.legend),
|
|
189
|
+
return e.today != null && (t.today = e.today), e.scrollViewport != null && (t.scroll_viewport = e.scrollViewport), e.tzOffsetMinutes != null && (t.tz_offset_minutes = Number.isFinite(e.tzOffsetMinutes) ? e.tzOffsetMinutes : String(e.tzOffsetMinutes)), e.legend != null && (t.legend = e.legend), e.rowLabels != null && (t.row_labels = e.rowLabels), e.percentLabels != null && (t.percent_labels = e.percentLabels), e.rowHeightPx != null && (t.row_height_px = e.rowHeightPx), e.headerHeightPx != null && (t.header_height_px = e.headerHeightPx), e.barHeightPx != null && (t.bar_height_px = e.barHeightPx), e.barAlign != null && (t.bar_align = e.barAlign), e.palette != null && (t.palette = e.palette), e.pxPerDay != null && (t.px_per_day = e.pxPerDay), e.scale != null && (t.scale = e.scale), e.weekendDays != null && (t.weekend_days = e.weekendDays), e.weekdayLabels != null && (t.weekday_labels = e.weekdayLabels), e.view != null && (t.view = {
|
|
190
|
+
from: e.view.from,
|
|
191
|
+
to: e.view.to
|
|
192
|
+
}), e.progressLine != null && (t.progress_line = e.progressLine), Object.keys(t).length === 0 ? void 0 : JSON.stringify(t);
|
|
157
193
|
}
|
|
158
|
-
var
|
|
194
|
+
var x = {
|
|
159
195
|
CODE_CANVAS_CAPACITY: "canvas_capacity",
|
|
160
196
|
CODE_INPUT_LIMIT: "input_limit",
|
|
161
197
|
CODE_PARSE_ERROR: "parse_error",
|
|
162
198
|
CODE_SERIALIZE_ERROR: "serialize_error"
|
|
163
|
-
}.CODE_CANVAS_CAPACITY,
|
|
199
|
+
}.CODE_CANVAS_CAPACITY, me = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"0\" height=\"0\" viewBox=\"0 0 0 0\" role=\"img\" aria-label=\"Empty Gantt chart\" font-family=\"sans-serif\" font-size=\"12\"><title>Empty Gantt chart</title><desc>No tasks to display</desc></svg>", S = {
|
|
164
200
|
ROW_H: 40,
|
|
165
201
|
HEADER_H: 30,
|
|
202
|
+
DAY_SCALE_HEADER_H: 48,
|
|
166
203
|
LEGEND_H: 40,
|
|
167
204
|
CHART_BOTTOM_PADDING_PX: 10,
|
|
168
205
|
LABEL_W: 120,
|
|
169
|
-
BAR_H: 20
|
|
170
|
-
|
|
206
|
+
BAR_H: 20,
|
|
207
|
+
HIDDEN_LABELS_LEFT_PX: 10
|
|
208
|
+
}, C = {
|
|
171
209
|
MAX_CANVAS_SIDE_PX: 16384,
|
|
172
210
|
MAX_CANVAS_AREA_PX: 32 * 1024 * 1024
|
|
173
211
|
};
|
|
174
|
-
function
|
|
212
|
+
function he(e) {
|
|
175
213
|
try {
|
|
176
214
|
let t = JSON.parse(e);
|
|
177
215
|
return {
|
|
@@ -184,19 +222,19 @@ function le(e) {
|
|
|
184
222
|
}
|
|
185
223
|
//#endregion
|
|
186
224
|
//#region src/canvasScale.ts
|
|
187
|
-
function
|
|
225
|
+
function w(e, t, n) {
|
|
188
226
|
if (!(e > 0) || !(t > 0) || !(n > 0) || !Number.isFinite(n)) return 1;
|
|
189
|
-
let { MAX_CANVAS_SIDE_PX: r, MAX_CANVAS_AREA_PX: i } =
|
|
227
|
+
let { MAX_CANVAS_SIDE_PX: r, MAX_CANVAS_AREA_PX: i } = C, a = Math.min(r / e, r / t, Math.sqrt(i / (e * t)));
|
|
190
228
|
return Math.min(n, a);
|
|
191
229
|
}
|
|
192
|
-
function
|
|
193
|
-
let r =
|
|
230
|
+
function ge(e, t, n) {
|
|
231
|
+
let r = w(e, t, n);
|
|
194
232
|
return {
|
|
195
233
|
width: Math.floor(e * r),
|
|
196
234
|
height: Math.floor(t * r)
|
|
197
235
|
};
|
|
198
236
|
}
|
|
199
|
-
function
|
|
237
|
+
function _e(e, t, n, r, i) {
|
|
200
238
|
return !(n.width > 0) || !(n.height > 0) ? null : {
|
|
201
239
|
x: (e - n.left) * (r / n.width),
|
|
202
240
|
y: (t - n.top) * (i / n.height)
|
|
@@ -204,17 +242,22 @@ function de(e, t, n, r, i) {
|
|
|
204
242
|
}
|
|
205
243
|
//#endregion
|
|
206
244
|
//#region src/canvasFallback.ts
|
|
207
|
-
function
|
|
208
|
-
return e
|
|
245
|
+
function T(e = {}) {
|
|
246
|
+
return e.headerHeight == null ? e.scale === "day" ? S.DAY_SCALE_HEADER_H : S.HEADER_H : e.headerHeight;
|
|
209
247
|
}
|
|
210
|
-
function
|
|
211
|
-
|
|
248
|
+
function ve(e, t, n = "shown", r = {}) {
|
|
249
|
+
if (t === 0) return 0;
|
|
250
|
+
let i = r.rowHeight ?? S.ROW_H;
|
|
251
|
+
return (e ? e.reduce((e, t) => e + (t.height ?? i), 0) : t * i) + T(r) + (n === "hidden" ? 0 : S.LEGEND_H) + S.CHART_BOTTOM_PADDING_PX;
|
|
212
252
|
}
|
|
213
|
-
function
|
|
253
|
+
function ye(e) {
|
|
254
|
+
return e.code === x;
|
|
255
|
+
}
|
|
256
|
+
function E(e, t) {
|
|
214
257
|
return e.startsWith("<svg ") && e !== t;
|
|
215
258
|
}
|
|
216
|
-
function
|
|
217
|
-
return
|
|
259
|
+
function be(e, t, n) {
|
|
260
|
+
return ye(e) && E(t, n) ? {
|
|
218
261
|
mode: "svg",
|
|
219
262
|
svg: t
|
|
220
263
|
} : {
|
|
@@ -222,17 +265,17 @@ function pe(e, t, n) {
|
|
|
222
265
|
message: e.message
|
|
223
266
|
};
|
|
224
267
|
}
|
|
268
|
+
function xe(e, t) {
|
|
269
|
+
let n = (t ?? S.BAR_H) / 2;
|
|
270
|
+
return e === "hidden" ? n : Math.max(S.LABEL_W, n);
|
|
271
|
+
}
|
|
225
272
|
//#endregion
|
|
226
273
|
//#region src/GanttChart.vue?vue&type=script&setup=true&lang.ts
|
|
227
|
-
var
|
|
228
|
-
key: 0,
|
|
229
|
-
class: "koyori-gantt-skeleton",
|
|
230
|
-
"aria-hidden": "true"
|
|
231
|
-
}, he = {
|
|
274
|
+
var Se = {
|
|
232
275
|
key: 0,
|
|
233
276
|
class: "koyori-gantt-error",
|
|
234
277
|
role: "alert"
|
|
235
|
-
},
|
|
278
|
+
}, Ce = ["innerHTML"], D = /*#__PURE__*/ ((e, t) => {
|
|
236
279
|
let n = e.__vccOpts || e;
|
|
237
280
|
for (let [e, r] of t) n[e] = r;
|
|
238
281
|
return n;
|
|
@@ -244,191 +287,254 @@ var me = {
|
|
|
244
287
|
today: {},
|
|
245
288
|
tzOffsetMinutes: {},
|
|
246
289
|
legend: {},
|
|
290
|
+
rowLabels: {},
|
|
291
|
+
percentLabels: {},
|
|
292
|
+
rows: {},
|
|
293
|
+
rowHeight: {},
|
|
294
|
+
headerHeight: {},
|
|
295
|
+
barHeight: {},
|
|
296
|
+
barAlign: {},
|
|
297
|
+
palette: {},
|
|
298
|
+
pxPerDay: {},
|
|
299
|
+
scale: {},
|
|
300
|
+
weekendDays: {},
|
|
301
|
+
weekdayLabels: {},
|
|
302
|
+
view: {},
|
|
303
|
+
progressLine: {},
|
|
247
304
|
backend: {},
|
|
248
305
|
deviceTier: {}
|
|
249
306
|
},
|
|
250
307
|
emits: ["taskClick"],
|
|
251
|
-
setup(i, { emit:
|
|
308
|
+
setup(i, { expose: ie, emit: ce }) {
|
|
252
309
|
ne((e) => ({
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
v2293e8da: v
|
|
310
|
+
v59cd6a8e: le.value,
|
|
311
|
+
v59c5ef75: h
|
|
256
312
|
}));
|
|
257
|
-
let
|
|
313
|
+
let le = t(() => `${g.rowHeight ?? S.ROW_H}px`), m = t(() => `${xe(g.rowLabels, g.barHeight)}px`), h = `${S.BAR_H}px`, g = i, _ = ce, v = d(!1), y = d(""), x = d(0), C = d(600), w = d(null), T = d(null), E = d([]), D = d(""), O = d(""), k = d(null), A = {
|
|
258
314
|
width: 0,
|
|
259
315
|
height: 0
|
|
260
|
-
},
|
|
261
|
-
function
|
|
262
|
-
let t = e ??
|
|
263
|
-
t && (
|
|
316
|
+
}, j = d(me), M = t(() => g.backend === "canvas");
|
|
317
|
+
function N(e) {
|
|
318
|
+
let t = e ?? w.value;
|
|
319
|
+
t && (x.value = t.scrollTop, C.value = t.clientHeight);
|
|
264
320
|
}
|
|
265
321
|
l(async () => {
|
|
266
|
-
await p(),
|
|
322
|
+
await p(), j.value = re(), v.value = !0, await a(), N(), P.value && (F.value = !0);
|
|
267
323
|
});
|
|
268
|
-
function
|
|
269
|
-
if (
|
|
324
|
+
function we() {
|
|
325
|
+
if (g.deviceTier) return g.deviceTier;
|
|
270
326
|
if (typeof navigator > "u") return "low";
|
|
271
327
|
let e = navigator;
|
|
272
328
|
return e.deviceMemory === void 0 || e.deviceMemory <= 4 || navigator.hardwareConcurrency <= 4 ? "low" : "high";
|
|
273
329
|
}
|
|
274
|
-
let
|
|
275
|
-
f(
|
|
330
|
+
let Te = t(() => we()), P = t(() => Te.value === "low"), F = d(!1);
|
|
331
|
+
f(P, async (e) => {
|
|
276
332
|
if (!e) {
|
|
277
|
-
|
|
333
|
+
F.value = !1;
|
|
278
334
|
return;
|
|
279
335
|
}
|
|
280
|
-
|
|
336
|
+
F.value = !1, await a(), N(), F.value = !0;
|
|
281
337
|
}, { flush: "post" });
|
|
282
|
-
let
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
338
|
+
let Ee = t(() => z.value ? 0 : ve(g.rows, g.tasks.length, g.legend, {
|
|
339
|
+
rowHeight: g.rowHeight,
|
|
340
|
+
headerHeight: g.headerHeight,
|
|
341
|
+
scale: g.scale
|
|
342
|
+
})), De = t(() => {
|
|
343
|
+
if (!(!P.value || !F.value)) return {
|
|
344
|
+
scroll_y: x.value,
|
|
345
|
+
client_height: C.value
|
|
286
346
|
};
|
|
287
|
-
})
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
347
|
+
});
|
|
348
|
+
function Oe(e) {
|
|
349
|
+
return pe({
|
|
350
|
+
today: g.today,
|
|
351
|
+
scrollViewport: e,
|
|
352
|
+
tzOffsetMinutes: g.tzOffsetMinutes,
|
|
353
|
+
legend: g.legend,
|
|
354
|
+
rowLabels: g.rowLabels,
|
|
355
|
+
percentLabels: g.percentLabels,
|
|
356
|
+
rowHeightPx: g.rowHeight,
|
|
357
|
+
headerHeightPx: g.headerHeight,
|
|
358
|
+
barHeightPx: g.barHeight,
|
|
359
|
+
barAlign: g.barAlign,
|
|
360
|
+
palette: g.palette,
|
|
361
|
+
pxPerDay: g.pxPerDay,
|
|
362
|
+
scale: g.scale,
|
|
363
|
+
weekendDays: g.weekendDays,
|
|
364
|
+
weekdayLabels: g.weekdayLabels,
|
|
365
|
+
view: g.view,
|
|
366
|
+
progressLine: g.progressLine
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
let I = t(() => Oe(De.value)), L = t(() => g.rows ? [JSON.stringify(g.rows)] : []), ke = t(() => P.value && !F.value), Ae = t(() => !v.value || g.tasks.length === 0 || M.value ? "" : ke.value ? null : oe(JSON.stringify(g.tasks), JSON.stringify(g.deps ?? []), I.value, ...L.value)), R = t(() => !v.value || g.tasks.length === 0 || !M.value || ke.value ? "" : ae(JSON.stringify(g.tasks), JSON.stringify(g.deps ?? []), I.value, ...L.value));
|
|
370
|
+
f(Ae, (e) => {
|
|
371
|
+
e !== null && (y.value = e);
|
|
295
372
|
}, { immediate: !0 });
|
|
296
|
-
let
|
|
297
|
-
if (!
|
|
298
|
-
let e =
|
|
299
|
-
return e ?
|
|
300
|
-
}),
|
|
301
|
-
function
|
|
302
|
-
|
|
373
|
+
let je = t(() => {
|
|
374
|
+
if (!v.value || g.tasks.length === 0 || M.value || Ae.value !== j.value) return null;
|
|
375
|
+
let e = se(JSON.stringify(g.tasks), JSON.stringify(g.deps ?? []), I.value, ...L.value);
|
|
376
|
+
return e ? he(e) : null;
|
|
377
|
+
}), z = t(() => O.value || je.value?.message || "");
|
|
378
|
+
function B(e) {
|
|
379
|
+
E.value = [], fe(e);
|
|
303
380
|
}
|
|
304
|
-
function
|
|
305
|
-
|
|
381
|
+
function V() {
|
|
382
|
+
D.value = "", O.value = "", k.value = null;
|
|
306
383
|
}
|
|
307
|
-
function
|
|
308
|
-
|
|
384
|
+
function Me(e) {
|
|
385
|
+
k.value = e;
|
|
309
386
|
let t = "";
|
|
310
|
-
if (
|
|
311
|
-
t =
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
client_height: Math.min(k.value, 600)
|
|
316
|
-
},
|
|
317
|
-
tzOffsetMinutes: y.tzOffsetMinutes,
|
|
318
|
-
legend: y.legend
|
|
319
|
-
}));
|
|
387
|
+
if (ye(e)) try {
|
|
388
|
+
t = oe(JSON.stringify(g.tasks), JSON.stringify(g.deps ?? []), Oe({
|
|
389
|
+
scroll_y: x.value,
|
|
390
|
+
client_height: Math.min(C.value, 600)
|
|
391
|
+
}), ...L.value);
|
|
320
392
|
} catch {}
|
|
321
|
-
let n =
|
|
322
|
-
n.mode === "svg" ? (
|
|
393
|
+
let n = be(e, t, j.value);
|
|
394
|
+
n.mode === "svg" ? (D.value = n.svg, O.value = "") : (D.value = "", O.value = n.message);
|
|
323
395
|
}
|
|
324
|
-
f([
|
|
325
|
-
|
|
396
|
+
f([x, C], () => {
|
|
397
|
+
D.value && k.value && Me(k.value);
|
|
326
398
|
});
|
|
327
|
-
async function
|
|
328
|
-
let e =
|
|
399
|
+
async function H() {
|
|
400
|
+
let e = R.value;
|
|
329
401
|
if (!e) {
|
|
330
|
-
|
|
402
|
+
B(T.value), V();
|
|
331
403
|
return;
|
|
332
404
|
}
|
|
333
|
-
let t =
|
|
334
|
-
if (!t && (
|
|
335
|
-
let n =
|
|
405
|
+
let t = T.value;
|
|
406
|
+
if (!t && (V(), await a(), t = T.value, !t)) return;
|
|
407
|
+
let n = ue(e);
|
|
336
408
|
if (n.error) {
|
|
337
|
-
|
|
409
|
+
B(t), Me({
|
|
338
410
|
message: n.error,
|
|
339
411
|
code: n.code
|
|
340
412
|
});
|
|
341
413
|
return;
|
|
342
414
|
}
|
|
343
|
-
|
|
344
|
-
let r = n.viewport_width, i = n.viewport_height, o =
|
|
345
|
-
t.width = o.width, t.height = o.height, t.style.width = `${r}px`, t.style.height = `${i}px`,
|
|
415
|
+
V();
|
|
416
|
+
let r = n.viewport_width, i = n.viewport_height, o = ge(r, i, U.value);
|
|
417
|
+
t.width = o.width, t.height = o.height, t.style.width = `${r}px`, t.style.height = `${i}px`, A = {
|
|
346
418
|
width: r,
|
|
347
419
|
height: i
|
|
348
420
|
};
|
|
349
421
|
let s = t.getContext("2d");
|
|
350
422
|
if (!s) {
|
|
351
|
-
|
|
423
|
+
B(t);
|
|
352
424
|
return;
|
|
353
425
|
}
|
|
354
|
-
r > 0 && i > 0 && s.setTransform(o.width / r, 0, 0, o.height / i, 0, 0),
|
|
426
|
+
r > 0 && i > 0 && s.setTransform(o.width / r, 0, 0, o.height / i, 0, 0), E.value = b(s, n).hitRegions;
|
|
355
427
|
}
|
|
356
|
-
f(
|
|
357
|
-
a().then(
|
|
428
|
+
f(R, () => {
|
|
429
|
+
a().then(H);
|
|
358
430
|
}, { immediate: !0 });
|
|
359
|
-
let
|
|
360
|
-
function
|
|
431
|
+
let U = d(G()), W = null;
|
|
432
|
+
function G() {
|
|
361
433
|
return typeof window > "u" ? 1 : window.devicePixelRatio || 1;
|
|
362
434
|
}
|
|
363
|
-
function
|
|
364
|
-
|
|
435
|
+
function Ne() {
|
|
436
|
+
W?.removeEventListener("change", Fe), W = null;
|
|
365
437
|
}
|
|
366
|
-
function
|
|
367
|
-
|
|
438
|
+
function Pe() {
|
|
439
|
+
Ne(), !(typeof window > "u" || typeof window.matchMedia != "function") && (W = window.matchMedia(`(resolution: ${G()}dppx)`), W.addEventListener("change", Fe));
|
|
368
440
|
}
|
|
369
|
-
function
|
|
370
|
-
|
|
441
|
+
function Fe() {
|
|
442
|
+
U.value = G(), Pe();
|
|
371
443
|
}
|
|
372
|
-
l(
|
|
373
|
-
|
|
444
|
+
l(Pe), c(Ne), f(U, () => {
|
|
445
|
+
T.value && R.value && H();
|
|
374
446
|
});
|
|
375
|
-
|
|
376
|
-
|
|
447
|
+
let K = d(null), Ie = t(() => Object.values(g.palette ?? {}).some((e) => typeof e == "string" && e.includes("var("))), q = t(() => M.value && !D.value && Ie.value), J = null, Y = null, X = 0;
|
|
448
|
+
function Z() {
|
|
449
|
+
if (X) return;
|
|
450
|
+
let e = () => {
|
|
451
|
+
X = 0, T.value && R.value && H();
|
|
452
|
+
};
|
|
453
|
+
typeof requestAnimationFrame == "function" ? X = requestAnimationFrame(e) : e();
|
|
454
|
+
}
|
|
455
|
+
function Le(e) {
|
|
456
|
+
return e === "class" || e === "style" || (e?.startsWith("data-") ?? !1);
|
|
377
457
|
}
|
|
378
|
-
function
|
|
458
|
+
function Q() {
|
|
459
|
+
J?.removeEventListener("change", Z), J = null, Y?.disconnect(), Y = null;
|
|
460
|
+
}
|
|
461
|
+
function $() {
|
|
462
|
+
if (Q(), !(typeof window > "u" || !q.value) && (typeof window.matchMedia == "function" && (J = window.matchMedia("(prefers-color-scheme: dark)"), J.addEventListener("change", Z)), typeof MutationObserver < "u" && K.value)) {
|
|
463
|
+
Y = new MutationObserver((e) => {
|
|
464
|
+
e.some((e) => Le(e.attributeName)) && Z();
|
|
465
|
+
});
|
|
466
|
+
for (let e = K.value.parentElement; e; e = e.parentElement) Y.observe(e, { attributes: !0 });
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
l($), f(q, $), f(() => g.palette, () => {
|
|
470
|
+
$(), M.value && Z();
|
|
471
|
+
}), c(() => {
|
|
472
|
+
Q(), X && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(X), X = 0;
|
|
473
|
+
}), ie({ repaint: Z });
|
|
474
|
+
function Re(e) {
|
|
475
|
+
N(e.target);
|
|
476
|
+
}
|
|
477
|
+
function ze(e) {
|
|
379
478
|
let t = e.target.closest("[data-task-id]");
|
|
380
479
|
if (!t) return;
|
|
381
|
-
let n = t.getAttribute("data-task-id"), r =
|
|
382
|
-
r &&
|
|
480
|
+
let n = t.getAttribute("data-task-id"), r = g.tasks.find((e) => e.id === n);
|
|
481
|
+
r && _("taskClick", r);
|
|
383
482
|
}
|
|
384
|
-
function
|
|
385
|
-
let t =
|
|
483
|
+
function Be(e) {
|
|
484
|
+
let t = T.value;
|
|
386
485
|
if (!t) return;
|
|
387
|
-
let n =
|
|
486
|
+
let n = _e(e.clientX, e.clientY, t.getBoundingClientRect(), A.width, A.height);
|
|
388
487
|
if (!n) return;
|
|
389
|
-
let r =
|
|
488
|
+
let r = de(E.value, n.x, n.y);
|
|
390
489
|
if (!r) return;
|
|
391
|
-
let i =
|
|
392
|
-
i &&
|
|
490
|
+
let i = g.tasks.find((e) => e.id === r);
|
|
491
|
+
i && _("taskClick", i);
|
|
393
492
|
}
|
|
394
493
|
return (t, i) => (u(), n("div", {
|
|
494
|
+
ref_key: "rootRef",
|
|
495
|
+
ref: K,
|
|
395
496
|
class: "koyori-gantt",
|
|
396
|
-
onClick: i[0] ||= (e) => (!
|
|
397
|
-
}, [
|
|
497
|
+
onClick: i[0] ||= (e) => (!M.value || D.value) && ze(e)
|
|
498
|
+
}, [v.value ? (u(), n("div", {
|
|
398
499
|
key: 1,
|
|
399
500
|
ref_key: "scrollRef",
|
|
400
|
-
ref:
|
|
401
|
-
class: o(["koyori-gantt-scroll", { "koyori-gantt-scroll--virtual":
|
|
402
|
-
onScroll:
|
|
403
|
-
}, [
|
|
501
|
+
ref: w,
|
|
502
|
+
class: o(["koyori-gantt-scroll", { "koyori-gantt-scroll--virtual": P.value || k.value }]),
|
|
503
|
+
onScroll: Re
|
|
504
|
+
}, [z.value ? (u(), n("div", Se, " Unable to render Gantt chart: " + te(z.value), 1)) : (u(), n("div", {
|
|
404
505
|
key: 1,
|
|
405
506
|
class: "koyori-gantt-inner",
|
|
406
|
-
style: s({ height: `${
|
|
407
|
-
}, [
|
|
507
|
+
style: s({ height: `${Ee.value}px` })
|
|
508
|
+
}, [M.value && !D.value ? (u(), n("canvas", {
|
|
408
509
|
key: 0,
|
|
409
510
|
ref_key: "canvasRef",
|
|
410
|
-
ref:
|
|
511
|
+
ref: T,
|
|
411
512
|
class: "koyori-gantt-canvas",
|
|
412
513
|
role: "img",
|
|
413
514
|
"aria-label": "Gantt chart",
|
|
414
|
-
onClick:
|
|
515
|
+
onClick: Be
|
|
415
516
|
}, null, 512)) : (u(), n("div", {
|
|
416
517
|
key: 1,
|
|
417
518
|
class: "koyori-gantt-svg",
|
|
418
|
-
innerHTML:
|
|
419
|
-
}, null, 8,
|
|
519
|
+
innerHTML: D.value || y.value
|
|
520
|
+
}, null, 8, Ce))], 4))], 34)) : (u(), n("div", {
|
|
521
|
+
key: 0,
|
|
522
|
+
class: "koyori-gantt-skeleton",
|
|
523
|
+
style: s({ "--koyori-skeleton-label-w": m.value }),
|
|
524
|
+
"aria-hidden": "true"
|
|
525
|
+
}, [(u(!0), n(e, null, ee(g.tasks, (e) => (u(), n("div", {
|
|
420
526
|
key: e.id,
|
|
421
527
|
class: "koyori-gantt-skeleton-row"
|
|
422
528
|
}, [i[1] ||= r("div", { class: "koyori-gantt-skeleton-label" }, null, -1), r("div", {
|
|
423
529
|
class: "koyori-gantt-skeleton-bar",
|
|
424
530
|
style: s({ width: `${e.progress_pct}%` })
|
|
425
|
-
}, null, 4)]))), 128))]))]));
|
|
531
|
+
}, null, 4)]))), 128))], 4))], 512));
|
|
426
532
|
}
|
|
427
|
-
}), [["__scopeId", "data-v-
|
|
533
|
+
}), [["__scopeId", "data-v-05f0ec3c"]]);
|
|
428
534
|
//#endregion
|
|
429
535
|
//#region src/legend.ts
|
|
430
|
-
async function
|
|
431
|
-
return await p(), JSON.parse(
|
|
536
|
+
async function O() {
|
|
537
|
+
return await p(), JSON.parse(ie());
|
|
432
538
|
}
|
|
433
539
|
//#endregion
|
|
434
|
-
export {
|
|
540
|
+
export { D as GanttChart, de as findTaskAtPoint, O as loadLegendSpec, ue as parseCommandBuffer, b as replayCommands };
|
package/dist/arc-vue.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("vue"),require("@koyori-app/arc")):typeof define==`function`&&define.amd?define([`exports`,`vue`,`@koyori-app/arc`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.ArcVue={},e.Vue,e.KoyoriArc))})(this,function(e,t,n){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e};n=((e,t,n)=>(n=e==null?{}:r(s(e)),l(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)))(n,1);var u=[`BarBg`,`TierLow`,`TierMid`,`TierHigh`,`TierDone`,`Dep`,`Progress`,`Grid`,`Today`,`HeaderBg`,`GridLabel`,`ProgressTextOnFg`,`ProgressTextOnBg`];function d(e,t){if(t===255)return`#374151`;let n=u[t];return n?e.palette.colors.find(([e])=>e===n)?.[1]??`#000000`:`#000000`}function f(e,t,n,r,i){if(r<=0||i<=0)return e;let a=t+r,o=n+i;if(e.w===0&&e.h===0)return{x:t,y:n,w:r,h:i};let s=Math.min(e.x,t),c=Math.min(e.y,n),l=Math.max(e.x+e.w,a),u=Math.max(e.y+e.h,o);return{x:s,y:c,w:l-s,h:u-c}}function p(e,t,n,r,i,a){if(a>0&&typeof e.roundRect==`function`){e.beginPath(),e.roundRect(t,n,r,i,a),e.fill();return}e.fillRect(t,n,r,i)}function m(e,t,n,r,i){if(e.strokeStyle=d(t,n),e.lineWidth=r,i){let t=i.split(`,`).map(e=>Number.parseFloat(e.trim()));e.setLineDash(t.every(Number.isFinite)?t:[])}else e.setLineDash([])}function h(e,t){let n=[],r=null,i={x:0,y:0,w:0,h:0};e.clearRect(0,0,t.viewport_width,t.viewport_height);for(let a of t.ops){if(a===`GroupEnd`){r&&i.w>0&&i.h>0&&n.push({taskId:r,x:i.x,y:i.y,w:i.w,h:i.h}),r=null,i={x:0,y:0,w:0,h:0};continue}if(`GroupStart`in a){r=a.GroupStart.task_id,i={x:0,y:0,w:0,h:0};continue}if(`FillRect`in a){let{x:n,y:o,w:s,h:c,color_id:l,radius:u}=a.FillRect;e.fillStyle=d(t,l),p(e,n,o,s,c,u),r&&(i=f(i,n,o,s,c));continue}if(`FillPolygon`in a){let{points:n,color_id:o}=a.FillPolygon;if(n.length===0)continue;e.fillStyle=d(t,o),e.beginPath(),e.moveTo(n[0][0],n[0][1]);for(let t=1;t<n.length;t++)e.lineTo(n[t][0],n[t][1]);if(e.closePath(),e.fill(),r&&n.length>0){let e=n.map(e=>e[0]),t=n.map(e=>e[1]),r=Math.min(...e),a=Math.min(...t);i=f(i,r,a,Math.max(...e)-r,Math.max(...t)-a)}continue}if(`StrokePath`in a){let{d:n,color_id:r,width:i}=a.StrokePath;m(e,t,r,i,null);let o=new Path2D(n);e.stroke(o);continue}if(`StrokePolyline`in a){let{points:n,color_id:r,width:i,dash:o}=a.StrokePolyline;if(n.length<2)continue;m(e,t,r,i,o),e.beginPath(),e.moveTo(n[0][0],n[0][1]);for(let t=1;t<n.length;t++)e.lineTo(n[t][0],n[t][1]);e.stroke();continue}if(`DrawText`in a){let{x:n,y:r,text:i,color_id:o,anchor:s,size:c,weight:l}=a.DrawText;e.fillStyle=d(t,o),e.font=`${l} ${c}px sans-serif`,e.textBaseline=`alphabetic`,s===1?e.textAlign=`center`:s===2?e.textAlign=`end`:e.textAlign=`start`,e.fillText(i,n,r),e.textAlign=`start`}}return{hitRegions:n}}function g(e){try{return JSON.parse(e)}catch{return{viewport_width:0,viewport_height:0,ops:[],palette:{colors:[]},error:`invalid json`}}}function _(e,t,n){for(let r=e.length-1;r>=0;r--){let i=e[r];if(t>=i.x&&t<=i.x+i.w&&n>=i.y&&n<=i.y+i.h)return i.taskId}return null}function v(e){if(!e)return;let t=e.getContext(`2d`);t&&t.clearRect(0,0,e.width,e.height),e.width=0,e.height=0,e.style.width=`0px`,e.style.height=`0px`}function y(e){let t={};return e.today!=null&&(t.today=e.today),e.scrollViewport!=null&&(t.scroll_viewport=e.scrollViewport),e.tzOffsetMinutes!=null&&(t.tz_offset_minutes=Number.isFinite(e.tzOffsetMinutes)?e.tzOffsetMinutes:String(e.tzOffsetMinutes)),e.legend!=null&&(t.legend=e.legend),Object.keys(t).length===0?void 0:JSON.stringify(t)}var b={CODE_CANVAS_CAPACITY:`canvas_capacity`,CODE_INPUT_LIMIT:`input_limit`,CODE_PARSE_ERROR:`parse_error`,CODE_SERIALIZE_ERROR:`serialize_error`}.CODE_CANVAS_CAPACITY,x=`<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0" viewBox="0 0 0 0" role="img" aria-label="Empty Gantt chart" font-family="sans-serif" font-size="12"><title>Empty Gantt chart</title><desc>No tasks to display</desc></svg>`,S={ROW_H:40,HEADER_H:30,LEGEND_H:40,CHART_BOTTOM_PADDING_PX:10,LABEL_W:120,BAR_H:20},C={MAX_CANVAS_SIDE_PX:16384,MAX_CANVAS_AREA_PX:32*1024*1024};function w(e){try{let t=JSON.parse(e);return{message:typeof t.error==`string`?t.error:e,code:typeof t.code==`string`?t.code:void 0}}catch{return{message:e}}}function T(e,t,n){if(!(e>0)||!(t>0)||!(n>0)||!Number.isFinite(n))return 1;let{MAX_CANVAS_SIDE_PX:r,MAX_CANVAS_AREA_PX:i}=C,a=Math.min(r/e,r/t,Math.sqrt(i/(e*t)));return Math.min(n,a)}function E(e,t,n){let r=T(e,t,n);return{width:Math.floor(e*r),height:Math.floor(t*r)}}function ee(e,t,n,r,i){return!(n.width>0)||!(n.height>0)?null:{x:(e-n.left)*(r/n.width),y:(t-n.top)*(i/n.height)}}function te(e,t=`shown`){return e===0?0:e*S.ROW_H+S.HEADER_H+(t===`hidden`?0:S.LEGEND_H)+S.CHART_BOTTOM_PADDING_PX}function D(e){return e.code===b}function O(e,t){return e.startsWith(`<svg `)&&e!==t}function ne(e,t,n){return D(e)&&O(t,n)?{mode:`svg`,svg:t}:{mode:`error`,message:e.message}}var re={key:0,class:`koyori-gantt-skeleton`,"aria-hidden":`true`},ie={key:0,class:`koyori-gantt-error`,role:`alert`},ae=[`innerHTML`],k=((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})((0,t.defineComponent)({__name:`GanttChart`,props:{tasks:{},deps:{},today:{},tzOffsetMinutes:{},legend:{},backend:{},deviceTier:{}},emits:[`taskClick`],setup(e,{emit:r}){(0,t.useCssVars)(e=>({v229b63f3:i,v43727630:a,v2293e8da:o}));let i=`${S.ROW_H}px`,a=`${S.LABEL_W}px`,o=`${S.BAR_H}px`,s=e,c=r,l=(0,t.ref)(!1),u=(0,t.ref)(``),d=(0,t.ref)(0),f=(0,t.ref)(600),p=(0,t.ref)(null),m=(0,t.ref)(null),b=(0,t.ref)([]),C=(0,t.ref)(``),T=(0,t.ref)(``),O=(0,t.ref)(null),k={width:0,height:0},A=(0,t.ref)(x),j=(0,t.computed)(()=>s.backend===`canvas`);function M(e){let t=e??p.value;t&&(d.value=t.scrollTop,f.value=t.clientHeight)}(0,t.onMounted)(async()=>{await(0,n.default)(),A.value=(0,n.empty_svg_markup)(),l.value=!0,await(0,t.nextTick)(),M(),F.value&&(I.value=!0)});function N(){if(s.deviceTier)return s.deviceTier;if(typeof navigator>`u`)return`low`;let e=navigator;return e.deviceMemory===void 0||e.deviceMemory<=4||navigator.hardwareConcurrency<=4?`low`:`high`}let P=(0,t.computed)(()=>N()),F=(0,t.computed)(()=>P.value===`low`),I=(0,t.ref)(!1);(0,t.watch)(F,async e=>{if(!e){I.value=!1;return}I.value=!1,await(0,t.nextTick)(),M(),I.value=!0},{flush:`post`});let L=(0,t.computed)(()=>U.value?0:te(s.tasks.length,s.legend)),R=(0,t.computed)(()=>{if(!(!F.value||!I.value))return{scroll_y:d.value,client_height:f.value}}),z=(0,t.computed)(()=>y({today:s.today,scrollViewport:R.value,tzOffsetMinutes:s.tzOffsetMinutes,legend:s.legend})),B=(0,t.computed)(()=>F.value&&!I.value),V=(0,t.computed)(()=>!l.value||s.tasks.length===0||j.value?``:B.value?null:(0,n.render_svg)(JSON.stringify(s.tasks),JSON.stringify(s.deps??[]),z.value)),H=(0,t.computed)(()=>!l.value||s.tasks.length===0||!j.value||B.value?``:(0,n.render_canvas_commands)(JSON.stringify(s.tasks),JSON.stringify(s.deps??[]),z.value));(0,t.watch)(V,e=>{e!==null&&(u.value=e)},{immediate:!0});let oe=(0,t.computed)(()=>{if(!l.value||s.tasks.length===0||j.value||V.value!==A.value)return null;let e=(0,n.render_svg_error)(JSON.stringify(s.tasks),JSON.stringify(s.deps??[]),z.value);return e?w(e):null}),U=(0,t.computed)(()=>T.value||oe.value?.message||``);function W(e){b.value=[],v(e)}function G(){C.value=``,T.value=``,O.value=null}function K(e){O.value=e;let t=``;if(D(e))try{t=(0,n.render_svg)(JSON.stringify(s.tasks),JSON.stringify(s.deps??[]),y({today:s.today,scrollViewport:{scroll_y:d.value,client_height:Math.min(f.value,600)},tzOffsetMinutes:s.tzOffsetMinutes,legend:s.legend}))}catch{}let r=ne(e,t,A.value);r.mode===`svg`?(C.value=r.svg,T.value=``):(C.value=``,T.value=r.message)}(0,t.watch)([d,f],()=>{C.value&&O.value&&K(O.value)});async function q(){let e=H.value;if(!e){W(m.value),G();return}let n=m.value;if(!n&&(G(),await(0,t.nextTick)(),n=m.value,!n))return;let r=g(e);if(r.error){W(n),K({message:r.error,code:r.code});return}G();let i=r.viewport_width,a=r.viewport_height,o=E(i,a,J.value);n.width=o.width,n.height=o.height,n.style.width=`${i}px`,n.style.height=`${a}px`,k={width:i,height:a};let s=n.getContext(`2d`);if(!s){W(n);return}i>0&&a>0&&s.setTransform(o.width/i,0,0,o.height/a,0,0),b.value=h(s,r).hitRegions}(0,t.watch)(H,()=>{(0,t.nextTick)().then(q)},{immediate:!0});let J=(0,t.ref)(X()),Y=null;function X(){return typeof window>`u`?1:window.devicePixelRatio||1}function Z(){Y?.removeEventListener(`change`,$),Y=null}function Q(){Z(),!(typeof window>`u`||typeof window.matchMedia!=`function`)&&(Y=window.matchMedia(`(resolution: ${X()}dppx)`),Y.addEventListener(`change`,$))}function $(){J.value=X(),Q()}(0,t.onMounted)(Q),(0,t.onBeforeUnmount)(Z),(0,t.watch)(J,()=>{m.value&&H.value&&q()});function se(e){M(e.target)}function ce(e){let t=e.target.closest(`[data-task-id]`);if(!t)return;let n=t.getAttribute(`data-task-id`),r=s.tasks.find(e=>e.id===n);r&&c(`taskClick`,r)}function le(e){let t=m.value;if(!t)return;let n=ee(e.clientX,e.clientY,t.getBoundingClientRect(),k.width,k.height);if(!n)return;let r=_(b.value,n.x,n.y);if(!r)return;let i=s.tasks.find(e=>e.id===r);i&&c(`taskClick`,i)}return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:`koyori-gantt`,onClick:n[0]||=e=>(!j.value||C.value)&&ce(e)},[l.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,ref_key:`scrollRef`,ref:p,class:(0,t.normalizeClass)([`koyori-gantt-scroll`,{"koyori-gantt-scroll--virtual":F.value||O.value}]),onScroll:se},[U.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,ie,` Unable to render Gantt chart: `+(0,t.toDisplayString)(U.value),1)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:`koyori-gantt-inner`,style:(0,t.normalizeStyle)({height:`${L.value}px`})},[j.value&&!C.value?((0,t.openBlock)(),(0,t.createElementBlock)(`canvas`,{key:0,ref_key:`canvasRef`,ref:m,class:`koyori-gantt-canvas`,role:`img`,"aria-label":`Gantt chart`,onClick:le},null,512)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:`koyori-gantt-svg`,innerHTML:C.value||u.value},null,8,ae))],4))],34)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,re,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(s.tasks,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e.id,class:`koyori-gantt-skeleton-row`},[n[1]||=(0,t.createElementVNode)(`div`,{class:`koyori-gantt-skeleton-label`},null,-1),(0,t.createElementVNode)(`div`,{class:`koyori-gantt-skeleton-bar`,style:(0,t.normalizeStyle)({width:`${e.progress_pct}%`})},null,4)]))),128))]))]))}}),[[`__scopeId`,`data-v-73e8a554`]]);async function A(){return await(0,n.default)(),JSON.parse((0,n.legend_spec_json)())}e.GanttChart=k,e.findTaskAtPoint=_,e.loadLegendSpec=A,e.parseCommandBuffer=g,e.replayCommands=h});
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("vue"),require("@koyori-app/arc")):typeof define==`function`&&define.amd?define([`exports`,`vue`,`@koyori-app/arc`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.ArcVue={},e.Vue,e.KoyoriArc))})(this,function(e,t,n){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e};n=((e,t,n)=>(n=e==null?{}:r(s(e)),l(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)))(n,1);var u=[`BarBg`,`TierLow`,`TierMid`,`TierHigh`,`TierDone`,`Dep`,`Progress`,`Grid`,`Today`,`HeaderBg`,`GridLabel`,`ProgressTextOnFg`,`ProgressTextOnBg`,`GroupRow`,`Weekend`,`BarStroke`,`DoneBg`,`DoneStroke`,`WarnBg`,`WarnStroke`,`HardDeadline`,`Note`,`NoteBg`,`ProgressLine`],d={GroupRow:`HeaderBg`,Weekend:`HeaderBg`,BarStroke:`GridLabel`,DoneBg:`BarBg`,DoneStroke:`GridLabel`,WarnBg:`BarBg`,WarnStroke:`Progress`,HardDeadline:`Progress`,Note:`GridLabel`,NoteBg:`HeaderBg`,ProgressLine:`Progress`};function f(e,t){let n=e.palette.colors.find(([e])=>e===t);if(n)return n[1];let r=d[t];return r?f(e,r):void 0}function p(e,t){let n=/^var\((--[A-Za-z0-9_-]+)\)$/.exec(e);return n?!t||typeof getComputedStyle>`u`?`#000000`:getComputedStyle(t).getPropertyValue(n[1]).trim()||`#000000`:e}function m(e,t,n){if(t===255)return`#374151`;let r=u[t];return r?p(f(e,r)??`#000000`,n):`#000000`}function h(e,t,n,r,i){if(r<=0||i<=0)return e;let a=t+r,o=n+i;if(e.w===0&&e.h===0)return{x:t,y:n,w:r,h:i};let s=Math.min(e.x,t),c=Math.min(e.y,n),l=Math.max(e.x+e.w,a),u=Math.max(e.y+e.h,o);return{x:s,y:c,w:l-s,h:u-c}}function g(e,t,n,r,i,a){if(a>0&&typeof e.roundRect==`function`){e.beginPath(),e.roundRect(t,n,r,i,a),e.fill();return}e.fillRect(t,n,r,i)}function _(e,t,n,r,i){if(e.strokeStyle=m(t,n,e.canvas),e.lineWidth=r,i){let t=i.split(`,`).map(e=>Number.parseFloat(e.trim()));e.setLineDash(t.every(Number.isFinite)?t:[])}else e.setLineDash([])}function ee(e,t){let n=[],r=null,i={x:0,y:0,w:0,h:0};e.clearRect(0,0,t.viewport_width,t.viewport_height);for(let a of t.ops){if(a===`GroupEnd`){r&&i.w>0&&i.h>0&&n.push({taskId:r,x:i.x,y:i.y,w:i.w,h:i.h}),r=null,i={x:0,y:0,w:0,h:0};continue}if(`GroupStart`in a){r=a.GroupStart.task_id,i={x:0,y:0,w:0,h:0};continue}if(`FillRect`in a){let{x:n,y:o,w:s,h:c,color_id:l,radius:u}=a.FillRect;e.fillStyle=m(t,l,e.canvas),g(e,n,o,s,c,u),r&&(i=h(i,n,o,s,c));continue}if(`FillPolygon`in a){let{points:n,color_id:o}=a.FillPolygon;if(n.length===0)continue;e.fillStyle=m(t,o,e.canvas),e.beginPath(),e.moveTo(n[0][0],n[0][1]);for(let t=1;t<n.length;t++)e.lineTo(n[t][0],n[t][1]);if(e.closePath(),e.fill(),r&&n.length>0){let e=n.map(e=>e[0]),t=n.map(e=>e[1]),r=Math.min(...e),a=Math.min(...t);i=h(i,r,a,Math.max(...e)-r,Math.max(...t)-a)}continue}if(`StrokePath`in a){let{d:n,color_id:r,width:i}=a.StrokePath;_(e,t,r,i,null);let o=new Path2D(n);e.stroke(o);continue}if(`StrokePolyline`in a){let{points:n,color_id:r,width:i,dash:o}=a.StrokePolyline;if(n.length<2)continue;_(e,t,r,i,o),e.beginPath(),e.moveTo(n[0][0],n[0][1]);for(let t=1;t<n.length;t++)e.lineTo(n[t][0],n[t][1]);e.stroke();continue}if(`DrawText`in a){let{x:n,y:r,text:i,color_id:o,anchor:s,size:c,weight:l}=a.DrawText;e.fillStyle=m(t,o,e.canvas),e.font=`${l} ${c}px sans-serif`,e.textBaseline=`alphabetic`,s===1?e.textAlign=`center`:s===2?e.textAlign=`end`:e.textAlign=`start`,e.fillText(i,n,r),e.textAlign=`start`}}return{hitRegions:n}}function v(e){try{return JSON.parse(e)}catch{return{viewport_width:0,viewport_height:0,ops:[],palette:{colors:[]},error:`invalid json`}}}function y(e,t,n){for(let r=e.length-1;r>=0;r--){let i=e[r];if(t>=i.x&&t<=i.x+i.w&&n>=i.y&&n<=i.y+i.h)return i.taskId}return null}function te(e){if(!e)return;let t=e.getContext(`2d`);t&&t.clearRect(0,0,e.width,e.height),e.width=0,e.height=0,e.style.width=`0px`,e.style.height=`0px`}function ne(e){let t={};return e.today!=null&&(t.today=e.today),e.scrollViewport!=null&&(t.scroll_viewport=e.scrollViewport),e.tzOffsetMinutes!=null&&(t.tz_offset_minutes=Number.isFinite(e.tzOffsetMinutes)?e.tzOffsetMinutes:String(e.tzOffsetMinutes)),e.legend!=null&&(t.legend=e.legend),e.rowLabels!=null&&(t.row_labels=e.rowLabels),e.percentLabels!=null&&(t.percent_labels=e.percentLabels),e.rowHeightPx!=null&&(t.row_height_px=e.rowHeightPx),e.headerHeightPx!=null&&(t.header_height_px=e.headerHeightPx),e.barHeightPx!=null&&(t.bar_height_px=e.barHeightPx),e.barAlign!=null&&(t.bar_align=e.barAlign),e.palette!=null&&(t.palette=e.palette),e.pxPerDay!=null&&(t.px_per_day=e.pxPerDay),e.scale!=null&&(t.scale=e.scale),e.weekendDays!=null&&(t.weekend_days=e.weekendDays),e.weekdayLabels!=null&&(t.weekday_labels=e.weekdayLabels),e.view!=null&&(t.view={from:e.view.from,to:e.view.to}),e.progressLine!=null&&(t.progress_line=e.progressLine),Object.keys(t).length===0?void 0:JSON.stringify(t)}var b={CODE_CANVAS_CAPACITY:`canvas_capacity`,CODE_INPUT_LIMIT:`input_limit`,CODE_PARSE_ERROR:`parse_error`,CODE_SERIALIZE_ERROR:`serialize_error`}.CODE_CANVAS_CAPACITY,re=`<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0" viewBox="0 0 0 0" role="img" aria-label="Empty Gantt chart" font-family="sans-serif" font-size="12"><title>Empty Gantt chart</title><desc>No tasks to display</desc></svg>`,x={ROW_H:40,HEADER_H:30,DAY_SCALE_HEADER_H:48,LEGEND_H:40,CHART_BOTTOM_PADDING_PX:10,LABEL_W:120,BAR_H:20,HIDDEN_LABELS_LEFT_PX:10},S={MAX_CANVAS_SIDE_PX:16384,MAX_CANVAS_AREA_PX:32*1024*1024};function ie(e){try{let t=JSON.parse(e);return{message:typeof t.error==`string`?t.error:e,code:typeof t.code==`string`?t.code:void 0}}catch{return{message:e}}}function C(e,t,n){if(!(e>0)||!(t>0)||!(n>0)||!Number.isFinite(n))return 1;let{MAX_CANVAS_SIDE_PX:r,MAX_CANVAS_AREA_PX:i}=S,a=Math.min(r/e,r/t,Math.sqrt(i/(e*t)));return Math.min(n,a)}function ae(e,t,n){let r=C(e,t,n);return{width:Math.floor(e*r),height:Math.floor(t*r)}}function oe(e,t,n,r,i){return!(n.width>0)||!(n.height>0)?null:{x:(e-n.left)*(r/n.width),y:(t-n.top)*(i/n.height)}}function w(e={}){return e.headerHeight==null?e.scale===`day`?x.DAY_SCALE_HEADER_H:x.HEADER_H:e.headerHeight}function se(e,t,n=`shown`,r={}){if(t===0)return 0;let i=r.rowHeight??x.ROW_H;return(e?e.reduce((e,t)=>e+(t.height??i),0):t*i)+w(r)+(n===`hidden`?0:x.LEGEND_H)+x.CHART_BOTTOM_PADDING_PX}function T(e){return e.code===b}function E(e,t){return e.startsWith(`<svg `)&&e!==t}function ce(e,t,n){return T(e)&&E(t,n)?{mode:`svg`,svg:t}:{mode:`error`,message:e.message}}function le(e,t){let n=(t??x.BAR_H)/2;return e===`hidden`?n:Math.max(x.LABEL_W,n)}var ue={key:0,class:`koyori-gantt-error`,role:`alert`},de=[`innerHTML`],D=((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})((0,t.defineComponent)({__name:`GanttChart`,props:{tasks:{},deps:{},today:{},tzOffsetMinutes:{},legend:{},rowLabels:{},percentLabels:{},rows:{},rowHeight:{},headerHeight:{},barHeight:{},barAlign:{},palette:{},pxPerDay:{},scale:{},weekendDays:{},weekdayLabels:{},view:{},progressLine:{},backend:{},deviceTier:{}},emits:[`taskClick`],setup(e,{expose:r,emit:i}){(0,t.useCssVars)(e=>({v59cd6a8e:a.value,v59c5ef75:s}));let a=(0,t.computed)(()=>`${c.rowHeight??x.ROW_H}px`),o=(0,t.computed)(()=>`${le(c.rowLabels,c.barHeight)}px`),s=`${x.BAR_H}px`,c=e,l=i,u=(0,t.ref)(!1),d=(0,t.ref)(``),f=(0,t.ref)(0),p=(0,t.ref)(600),m=(0,t.ref)(null),h=(0,t.ref)(null),g=(0,t.ref)([]),_=(0,t.ref)(``),b=(0,t.ref)(``),S=(0,t.ref)(null),C={width:0,height:0},w=(0,t.ref)(re),E=(0,t.computed)(()=>c.backend===`canvas`);function D(e){let t=e??m.value;t&&(f.value=t.scrollTop,p.value=t.clientHeight)}(0,t.onMounted)(async()=>{await(0,n.default)(),w.value=(0,n.empty_svg_markup)(),u.value=!0,await(0,t.nextTick)(),D(),O.value&&(k.value=!0)});function fe(){if(c.deviceTier)return c.deviceTier;if(typeof navigator>`u`)return`low`;let e=navigator;return e.deviceMemory===void 0||e.deviceMemory<=4||navigator.hardwareConcurrency<=4?`low`:`high`}let pe=(0,t.computed)(()=>fe()),O=(0,t.computed)(()=>pe.value===`low`),k=(0,t.ref)(!1);(0,t.watch)(O,async e=>{if(!e){k.value=!1;return}k.value=!1,await(0,t.nextTick)(),D(),k.value=!0},{flush:`post`});let me=(0,t.computed)(()=>I.value?0:se(c.rows,c.tasks.length,c.legend,{rowHeight:c.rowHeight,headerHeight:c.headerHeight,scale:c.scale})),he=(0,t.computed)(()=>{if(!(!O.value||!k.value))return{scroll_y:f.value,client_height:p.value}});function A(e){return ne({today:c.today,scrollViewport:e,tzOffsetMinutes:c.tzOffsetMinutes,legend:c.legend,rowLabels:c.rowLabels,percentLabels:c.percentLabels,rowHeightPx:c.rowHeight,headerHeightPx:c.headerHeight,barHeightPx:c.barHeight,barAlign:c.barAlign,palette:c.palette,pxPerDay:c.pxPerDay,scale:c.scale,weekendDays:c.weekendDays,weekdayLabels:c.weekdayLabels,view:c.view,progressLine:c.progressLine})}let j=(0,t.computed)(()=>A(he.value)),M=(0,t.computed)(()=>c.rows?[JSON.stringify(c.rows)]:[]),N=(0,t.computed)(()=>O.value&&!k.value),P=(0,t.computed)(()=>!u.value||c.tasks.length===0||E.value?``:N.value?null:(0,n.render_svg)(JSON.stringify(c.tasks),JSON.stringify(c.deps??[]),j.value,...M.value)),F=(0,t.computed)(()=>!u.value||c.tasks.length===0||!E.value||N.value?``:(0,n.render_canvas_commands)(JSON.stringify(c.tasks),JSON.stringify(c.deps??[]),j.value,...M.value));(0,t.watch)(P,e=>{e!==null&&(d.value=e)},{immediate:!0});let ge=(0,t.computed)(()=>{if(!u.value||c.tasks.length===0||E.value||P.value!==w.value)return null;let e=(0,n.render_svg_error)(JSON.stringify(c.tasks),JSON.stringify(c.deps??[]),j.value,...M.value);return e?ie(e):null}),I=(0,t.computed)(()=>b.value||ge.value?.message||``);function L(e){g.value=[],te(e)}function R(){_.value=``,b.value=``,S.value=null}function z(e){S.value=e;let t=``;if(T(e))try{t=(0,n.render_svg)(JSON.stringify(c.tasks),JSON.stringify(c.deps??[]),A({scroll_y:f.value,client_height:Math.min(p.value,600)}),...M.value)}catch{}let r=ce(e,t,w.value);r.mode===`svg`?(_.value=r.svg,b.value=``):(_.value=``,b.value=r.message)}(0,t.watch)([f,p],()=>{_.value&&S.value&&z(S.value)});async function B(){let e=F.value;if(!e){L(h.value),R();return}let n=h.value;if(!n&&(R(),await(0,t.nextTick)(),n=h.value,!n))return;let r=v(e);if(r.error){L(n),z({message:r.error,code:r.code});return}R();let i=r.viewport_width,a=r.viewport_height,o=ae(i,a,V.value);n.width=o.width,n.height=o.height,n.style.width=`${i}px`,n.style.height=`${a}px`,C={width:i,height:a};let s=n.getContext(`2d`);if(!s){L(n);return}i>0&&a>0&&s.setTransform(o.width/i,0,0,o.height/a,0,0),g.value=ee(s,r).hitRegions}(0,t.watch)(F,()=>{(0,t.nextTick)().then(B)},{immediate:!0});let V=(0,t.ref)(U()),H=null;function U(){return typeof window>`u`?1:window.devicePixelRatio||1}function W(){H?.removeEventListener(`change`,K),H=null}function G(){W(),!(typeof window>`u`||typeof window.matchMedia!=`function`)&&(H=window.matchMedia(`(resolution: ${U()}dppx)`),H.addEventListener(`change`,K))}function K(){V.value=U(),G()}(0,t.onMounted)(G),(0,t.onBeforeUnmount)(W),(0,t.watch)(V,()=>{h.value&&F.value&&B()});let q=(0,t.ref)(null),_e=(0,t.computed)(()=>Object.values(c.palette??{}).some(e=>typeof e==`string`&&e.includes(`var(`))),ve=(0,t.computed)(()=>E.value&&!_.value&&_e.value),J=null,Y=null,X=0;function Z(){if(X)return;let e=()=>{X=0,h.value&&F.value&&B()};typeof requestAnimationFrame==`function`?X=requestAnimationFrame(e):e()}function ye(e){return e===`class`||e===`style`||(e?.startsWith(`data-`)??!1)}function Q(){J?.removeEventListener(`change`,Z),J=null,Y?.disconnect(),Y=null}function $(){if(Q(),!(typeof window>`u`||!ve.value)&&(typeof window.matchMedia==`function`&&(J=window.matchMedia(`(prefers-color-scheme: dark)`),J.addEventListener(`change`,Z)),typeof MutationObserver<`u`&&q.value)){Y=new MutationObserver(e=>{e.some(e=>ye(e.attributeName))&&Z()});for(let e=q.value.parentElement;e;e=e.parentElement)Y.observe(e,{attributes:!0})}}(0,t.onMounted)($),(0,t.watch)(ve,$),(0,t.watch)(()=>c.palette,()=>{$(),E.value&&Z()}),(0,t.onBeforeUnmount)(()=>{Q(),X&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(X),X=0}),r({repaint:Z});function be(e){D(e.target)}function xe(e){let t=e.target.closest(`[data-task-id]`);if(!t)return;let n=t.getAttribute(`data-task-id`),r=c.tasks.find(e=>e.id===n);r&&l(`taskClick`,r)}function Se(e){let t=h.value;if(!t)return;let n=oe(e.clientX,e.clientY,t.getBoundingClientRect(),C.width,C.height);if(!n)return;let r=y(g.value,n.x,n.y);if(!r)return;let i=c.tasks.find(e=>e.id===r);i&&l(`taskClick`,i)}return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`rootRef`,ref:q,class:`koyori-gantt`,onClick:n[0]||=e=>(!E.value||_.value)&&xe(e)},[u.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,ref_key:`scrollRef`,ref:m,class:(0,t.normalizeClass)([`koyori-gantt-scroll`,{"koyori-gantt-scroll--virtual":O.value||S.value}]),onScroll:be},[I.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,ue,` Unable to render Gantt chart: `+(0,t.toDisplayString)(I.value),1)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:`koyori-gantt-inner`,style:(0,t.normalizeStyle)({height:`${me.value}px`})},[E.value&&!_.value?((0,t.openBlock)(),(0,t.createElementBlock)(`canvas`,{key:0,ref_key:`canvasRef`,ref:h,class:`koyori-gantt-canvas`,role:`img`,"aria-label":`Gantt chart`,onClick:Se},null,512)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:`koyori-gantt-svg`,innerHTML:_.value||d.value},null,8,de))],4))],34)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`koyori-gantt-skeleton`,style:(0,t.normalizeStyle)({"--koyori-skeleton-label-w":o.value}),"aria-hidden":`true`},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(c.tasks,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e.id,class:`koyori-gantt-skeleton-row`},[n[1]||=(0,t.createElementVNode)(`div`,{class:`koyori-gantt-skeleton-label`},null,-1),(0,t.createElementVNode)(`div`,{class:`koyori-gantt-skeleton-bar`,style:(0,t.normalizeStyle)({width:`${e.progress_pct}%`})},null,4)]))),128))],4))],512))}}),[[`__scopeId`,`data-v-05f0ec3c`]]);async function fe(){return await(0,n.default)(),JSON.parse((0,n.legend_spec_json)())}e.GanttChart=D,e.findTaskAtPoint=y,e.loadLegendSpec=fe,e.parseCommandBuffer=v,e.replayCommands=ee});
|
package/dist/canvasFallback.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LegendMode } from './options';
|
|
2
|
+
import { GanttRow } from './types.ts';
|
|
2
3
|
import { RenderFailure } from './wasmContract';
|
|
3
4
|
export type CanvasFailureResolution = {
|
|
4
5
|
mode: 'svg';
|
|
@@ -12,6 +13,26 @@ export type CanvasFailureResolution = {
|
|
|
12
13
|
* A hidden legend takes no height, so the band it would occupy is left out.
|
|
13
14
|
*/
|
|
14
15
|
export declare function chartHeightForTaskCount(taskCount: number, legend?: LegendMode): number;
|
|
16
|
+
/** The sizes a caller may set, in pixels; each left out is the crate's own. */
|
|
17
|
+
export interface RowSizes {
|
|
18
|
+
rowHeight?: number;
|
|
19
|
+
headerHeight?: number;
|
|
20
|
+
/** The date header's scale, which decides the header's height when none is set. */
|
|
21
|
+
scale?: 'week' | 'day' | 'month';
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The header's height as the crate draws it: `headerHeight` when set, and
|
|
25
|
+
* otherwise `DAY_SCALE_HEADER_H` for the `'day'` scale, whose month, day and
|
|
26
|
+
* weekday do not fit `HEADER_H`, and `HEADER_H` for the others.
|
|
27
|
+
*/
|
|
28
|
+
export declare function headerHeightPx(sizes?: RowSizes): number;
|
|
29
|
+
/**
|
|
30
|
+
* `chartHeightForTaskCount` for a chart that may lay out its own rows: the
|
|
31
|
+
* header, every row at its own height (or `rowHeight`), and below them the
|
|
32
|
+
* legend when shown and the bottom padding. Without `rows` it is one row per
|
|
33
|
+
* task, as the crate lays them out.
|
|
34
|
+
*/
|
|
35
|
+
export declare function chartHeightForRows(rows: GanttRow[] | undefined, taskCount: number, legend?: LegendMode, sizes?: RowSizes): number;
|
|
15
36
|
/**
|
|
16
37
|
* Canvas capacity errors can use the independently bounded SVG renderer.
|
|
17
38
|
* Decided by `code` alone — the message beside it is display text and is free
|
|
@@ -27,3 +48,13 @@ export declare function isCanvasCapacityError(failure: RenderFailure): boolean;
|
|
|
27
48
|
*/
|
|
28
49
|
export declare function isRenderedSvg(svg: string, emptySvgMarkup: string): boolean;
|
|
29
50
|
export declare function resolveCanvasFailure(failure: RenderFailure, fallbackSvg: string, emptySvgMarkup: string): CanvasFailureResolution;
|
|
51
|
+
/**
|
|
52
|
+
* The width of the loading skeleton's label column, which stands in for the
|
|
53
|
+
* chart's left margin, so the skeleton's bars start where the drawn chart's
|
|
54
|
+
* do. It reads the bar the chart draws (`barHeight`, or `BAR_H`) the way the
|
|
55
|
+
* crate's `label_width` does: with the titles shown, the title column
|
|
56
|
+
* `LABEL_W` unless half the bar is wider; with them hidden, half the bar
|
|
57
|
+
* (`HIDDEN_LABELS_LEFT_PX` for the default bar). Half the bar is the room a
|
|
58
|
+
* first-day milestone's diamond needs.
|
|
59
|
+
*/
|
|
60
|
+
export declare function skeletonLabelWidthPx(rowLabels?: 'shown' | 'hidden', barHeight?: number): number;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as GanttChart } from './GanttChart.vue';
|
|
2
|
-
export type { GanttTask, GanttDep } from './types.ts';
|
|
2
|
+
export type { GanttTask, GanttDep, GanttRow, BarState, BarShape } from './types.ts';
|
|
3
3
|
export { replayCommands, parseCommandBuffer, findTaskAtPoint, } from './replayCommands';
|
|
4
|
-
export type { CommandBuffer, DrawOp, ReplayResult, TaskHitRegion } from './replayCommands';
|
|
4
|
+
export type { ColorIdName, CommandBuffer, DrawOp, ReplayResult, TaskHitRegion, } from './replayCommands';
|
|
5
5
|
export { loadLegendSpec } from './legend';
|
|
6
6
|
export type { LegendSpec, LegendTier, LegendProgressLine } from './legend';
|
|
7
|
-
export type { ChartOptions, LegendMode } from './options';
|
|
7
|
+
export type { BarAlign, ChartOptions, LabelMode, LegendMode, PaletteOverrides, ProgressLineMode, Scale, ViewRange, } from './options';
|
package/dist/options.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ColorIdName } from './replayCommands';
|
|
1
2
|
/**
|
|
2
3
|
* The `options_json` string the Wasm entry points take.
|
|
3
4
|
*
|
|
@@ -13,11 +14,60 @@ export interface ScrollViewportOption {
|
|
|
13
14
|
}
|
|
14
15
|
/** Whether the chart draws its own legend. Left out, the legend is drawn. */
|
|
15
16
|
export type LegendMode = 'shown' | 'hidden';
|
|
17
|
+
/**
|
|
18
|
+
* Whether the chart draws one kind of its own text: `rowLabels` the task titles
|
|
19
|
+
* left of the days, `percentLabels` the `NN%` on each bar. Left out, it is drawn.
|
|
20
|
+
*/
|
|
21
|
+
export type LabelMode = 'shown' | 'hidden';
|
|
22
|
+
/**
|
|
23
|
+
* Colours that replace the chart's own, by colour name. A value is a CSS
|
|
24
|
+
* colour: `#hex`, `rgb()`/`hsl()`/`oklch()`, or `var(--name)` to draw with the
|
|
25
|
+
* caller's design tokens. The crate refuses anything else.
|
|
26
|
+
*/
|
|
27
|
+
export type PaletteOverrides = Partial<Record<ColorIdName, string>>;
|
|
28
|
+
/** Where a bar sits in its row. Left out, it is centred. */
|
|
29
|
+
export type BarAlign = 'middle' | 'bottom';
|
|
30
|
+
/**
|
|
31
|
+
* What the date header marks: `'week'` a line and `M/D` at each Monday (the
|
|
32
|
+
* default), `'day'` every day's number and weekday under the month, `'month'`
|
|
33
|
+
* a line and `YYYY/M` at the first of each month.
|
|
34
|
+
*/
|
|
35
|
+
export type Scale = 'week' | 'day' | 'month';
|
|
36
|
+
/**
|
|
37
|
+
* The days a chart shows, `from` through `to` (YYYY-MM-DD, both included). A
|
|
38
|
+
* bar running past either end is cut there and marked `← M/D` or `→ M/D`; a
|
|
39
|
+
* task wholly outside is drawn as its mark alone.
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* How the chart draws the progress line: `'shown'` (the default) is the line as
|
|
43
|
+
* before, `'hidden'` draws none, and `'by_row'` bends out from the today line to
|
|
44
|
+
* each row that is late or ahead and back at its bottom edge.
|
|
45
|
+
*/
|
|
46
|
+
export type ProgressLineMode = 'shown' | 'hidden' | 'by_row';
|
|
47
|
+
export interface ViewRange {
|
|
48
|
+
from: string;
|
|
49
|
+
to: string;
|
|
50
|
+
}
|
|
16
51
|
export interface ChartOptionsInput {
|
|
17
52
|
today?: string | null;
|
|
18
53
|
scrollViewport?: ScrollViewportOption | null;
|
|
19
54
|
tzOffsetMinutes?: number | null;
|
|
20
55
|
legend?: LegendMode | null;
|
|
56
|
+
rowLabels?: LabelMode | null;
|
|
57
|
+
percentLabels?: LabelMode | null;
|
|
58
|
+
rowHeightPx?: number | null;
|
|
59
|
+
headerHeightPx?: number | null;
|
|
60
|
+
barHeightPx?: number | null;
|
|
61
|
+
barAlign?: BarAlign | null;
|
|
62
|
+
palette?: PaletteOverrides | null;
|
|
63
|
+
pxPerDay?: number | null;
|
|
64
|
+
scale?: Scale | null;
|
|
65
|
+
/** Weekday numbers drawn as weekend bands, 0 for Monday to 6 for Sunday. */
|
|
66
|
+
weekendDays?: number[] | null;
|
|
67
|
+
/** Seven labels, Monday first, for the `'day'` scale. */
|
|
68
|
+
weekdayLabels?: string[] | null;
|
|
69
|
+
view?: ViewRange | null;
|
|
70
|
+
progressLine?: ProgressLineMode | null;
|
|
21
71
|
}
|
|
22
72
|
/**
|
|
23
73
|
* The object `options_json` carries. Every key is optional, and a chart drawn
|
|
@@ -28,5 +78,18 @@ export interface ChartOptions {
|
|
|
28
78
|
scroll_viewport?: ScrollViewportOption;
|
|
29
79
|
tz_offset_minutes?: number | string;
|
|
30
80
|
legend?: LegendMode;
|
|
81
|
+
row_labels?: LabelMode;
|
|
82
|
+
percent_labels?: LabelMode;
|
|
83
|
+
row_height_px?: number;
|
|
84
|
+
header_height_px?: number;
|
|
85
|
+
bar_height_px?: number;
|
|
86
|
+
bar_align?: BarAlign;
|
|
87
|
+
palette?: PaletteOverrides;
|
|
88
|
+
px_per_day?: number;
|
|
89
|
+
scale?: Scale;
|
|
90
|
+
weekend_days?: number[];
|
|
91
|
+
weekday_labels?: string[];
|
|
92
|
+
view?: ViewRange;
|
|
93
|
+
progress_line?: ProgressLineMode;
|
|
31
94
|
}
|
|
32
95
|
export declare function buildOptionsJson(input: ChartOptionsInput): string | undefined;
|
package/dist/replayCommands.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Mirrors koyori-arc-core `CommandBuffer` JSON (serde externally-tagged `DrawOp`). */
|
|
2
|
-
export type ColorIdName = 'BarBg' | 'TierLow' | 'TierMid' | 'TierHigh' | 'TierDone' | 'Dep' | 'Progress' | 'Grid' | 'Today' | 'HeaderBg' | 'GridLabel' | 'ProgressTextOnFg' | 'ProgressTextOnBg';
|
|
2
|
+
export type ColorIdName = 'BarBg' | 'TierLow' | 'TierMid' | 'TierHigh' | 'TierDone' | 'Dep' | 'Progress' | 'Grid' | 'Today' | 'HeaderBg' | 'GridLabel' | 'ProgressTextOnFg' | 'ProgressTextOnBg' | 'GroupRow' | 'Weekend' | 'BarStroke' | 'DoneBg' | 'DoneStroke' | 'WarnBg' | 'WarnStroke' | 'HardDeadline' | 'Note' | 'NoteBg' | 'ProgressLine';
|
|
3
3
|
export interface CommandBuffer {
|
|
4
4
|
viewport_width: number;
|
|
5
5
|
viewport_height: number;
|
|
@@ -63,6 +63,12 @@ export interface TaskHitRegion {
|
|
|
63
63
|
export interface ReplayResult {
|
|
64
64
|
hitRegions: TaskHitRegion[];
|
|
65
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* A canvas cannot draw `var(--name)`, which the SVG path writes as it is. It is
|
|
68
|
+
* read off the canvas element's computed style, where the caller's tokens are
|
|
69
|
+
* in scope; a name with no value there draws black, as a missing colour does.
|
|
70
|
+
*/
|
|
71
|
+
export declare function resolveCssColor(color: string, el: Element | undefined): string;
|
|
66
72
|
/**
|
|
67
73
|
* Replay a wasm-produced `CommandBuffer` onto a Canvas2D context.
|
|
68
74
|
* Single JS loop — no per-op wasm round-trips.
|
package/dist/types.d.ts
CHANGED
|
@@ -20,6 +20,35 @@ export interface GanttTask {
|
|
|
20
20
|
*/
|
|
21
21
|
end?: string;
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* One row of a chart whose rows the caller lays out (`rows` on `GanttChart`).
|
|
25
|
+
* A task row draws that task's bar; a group row draws a band across the days
|
|
26
|
+
* and no bar. `height` is in pixels; left out, the row is `rowHeight` tall.
|
|
27
|
+
*
|
|
28
|
+
* A task row may also carry marks; a row without them draws the bar as a chart
|
|
29
|
+
* without `rows` does.
|
|
30
|
+
* - `hard_deadline` (YYYY-MM-DD): a diamond in the middle of that day.
|
|
31
|
+
* - `state`: fills and outlines the bar (`normal`, `done`, `warn`).
|
|
32
|
+
* - `note`: a line of text past the bar and the diamond (at most 200 characters).
|
|
33
|
+
* - `shape`: `point` draws a dot on the span's last day instead of a bar, with a
|
|
34
|
+
* line to the diamond when the deadline is later.
|
|
35
|
+
*/
|
|
36
|
+
export type GanttRow = {
|
|
37
|
+
kind: 'task';
|
|
38
|
+
task_id: string;
|
|
39
|
+
height?: number;
|
|
40
|
+
hard_deadline?: string | null;
|
|
41
|
+
state?: BarState | null;
|
|
42
|
+
note?: string | null;
|
|
43
|
+
shape?: BarShape;
|
|
44
|
+
} | {
|
|
45
|
+
kind: 'group';
|
|
46
|
+
height?: number;
|
|
47
|
+
};
|
|
48
|
+
/** How a task row's bar is filled and outlined. */
|
|
49
|
+
export type BarState = 'normal' | 'done' | 'warn';
|
|
50
|
+
/** A task row drawn as a bar (the default) or as a dot on its last day. */
|
|
51
|
+
export type BarShape = 'bar' | 'point';
|
|
23
52
|
/** Mirrors `task_relations` entity. */
|
|
24
53
|
export interface GanttDep {
|
|
25
54
|
/** `task_relations.blocker_task_id` */
|
package/dist/wasmContract.d.ts
CHANGED
|
@@ -38,16 +38,22 @@ export declare const EMPTY_SVG_MARKUP: string;
|
|
|
38
38
|
* Reproduced where:
|
|
39
39
|
* - `ROW_H`, `HEADER_H`, `LEGEND_H`, `CHART_BOTTOM_PADDING_PX` — the chart
|
|
40
40
|
* height `chartHeightForTaskCount()` reserves before Wasm answers.
|
|
41
|
+
* - `DAY_SCALE_HEADER_H` — the header `chartHeightForRows()` reserves for the
|
|
42
|
+
* `'day'` scale when no height is set, the one the crate draws it with.
|
|
41
43
|
* - `ROW_H`, `LABEL_W`, `BAR_H` — the loading skeleton's row metrics, which
|
|
42
44
|
* stand in for real rows and must line up with them.
|
|
45
|
+
* - `HIDDEN_LABELS_LEFT_PX` — the skeleton's left margin with the title column
|
|
46
|
+
* hidden: the chart keeps half a bar there for a first-day milestone.
|
|
43
47
|
*/
|
|
44
48
|
export declare const RUST_LAYOUT: {
|
|
45
49
|
readonly ROW_H: 40;
|
|
46
50
|
readonly HEADER_H: 30;
|
|
51
|
+
readonly DAY_SCALE_HEADER_H: 48;
|
|
47
52
|
readonly LEGEND_H: 40;
|
|
48
53
|
readonly CHART_BOTTOM_PADDING_PX: 10;
|
|
49
54
|
readonly LABEL_W: 120;
|
|
50
55
|
readonly BAR_H: 20;
|
|
56
|
+
readonly HIDDEN_LABELS_LEFT_PX: 10;
|
|
51
57
|
};
|
|
52
58
|
/**
|
|
53
59
|
* Keys are the Rust constant names in `crates/koyori-arc-core/src/render.rs`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koyori-app/arc-vue",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MPL-2.0 OR GPL-2.0-or-later",
|
|
6
6
|
"repository": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"vitest": "^4.1.10",
|
|
44
44
|
"vue": "^3.5.39",
|
|
45
45
|
"vue-tsc": "^3.3.7",
|
|
46
|
-
"@koyori-app/arc": "0.1.0-alpha.
|
|
46
|
+
"@koyori-app/arc": "0.1.0-alpha.5"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "vite build",
|