@objectifthunes/whiteboard 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +707 -604
- package/dist/whiteboard.css +26 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as r, jsxs as d, Fragment as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import { create as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
const
|
|
1
|
+
import { jsx as r, jsxs as d, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as F, useRef as P, useCallback as j, memo as Re, useId as De, useState as we, useLayoutEffect as Ie, Component as Xe, useMemo as be, forwardRef as de, createElement as I } from "react";
|
|
3
|
+
import { create as Ye } from "zustand";
|
|
4
|
+
import { createPortal as Fe } from "react-dom";
|
|
5
|
+
const E = (e = 14) => ({
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
width: e,
|
|
8
8
|
height: e,
|
|
@@ -13,17 +13,17 @@ const D = (e = 14) => ({
|
|
|
13
13
|
strokeLinecap: "round",
|
|
14
14
|
strokeLinejoin: "round"
|
|
15
15
|
});
|
|
16
|
-
function
|
|
17
|
-
return /* @__PURE__ */ r("svg", { ...
|
|
16
|
+
function We({ size: e, ...t }) {
|
|
17
|
+
return /* @__PURE__ */ r("svg", { ...E(e), ...t, children: /* @__PURE__ */ r("path", { d: "M5 12h14" }) });
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return /* @__PURE__ */ d("svg", { ...
|
|
19
|
+
function Ge({ size: e, ...t }) {
|
|
20
|
+
return /* @__PURE__ */ d("svg", { ...E(e), ...t, children: [
|
|
21
21
|
/* @__PURE__ */ r("path", { d: "M5 12h14" }),
|
|
22
22
|
/* @__PURE__ */ r("path", { d: "M12 5v14" })
|
|
23
23
|
] });
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return /* @__PURE__ */ d("svg", { ...
|
|
25
|
+
function Ee({ size: e, ...t }) {
|
|
26
|
+
return /* @__PURE__ */ d("svg", { ...E(e), ...t, children: [
|
|
27
27
|
/* @__PURE__ */ r("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }),
|
|
28
28
|
/* @__PURE__ */ r("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }),
|
|
29
29
|
/* @__PURE__ */ r("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }),
|
|
@@ -32,14 +32,14 @@ function Ie({ size: e, ...t }) {
|
|
|
32
32
|
/* @__PURE__ */ r("path", { d: "m16 16-1.9-1.9" })
|
|
33
33
|
] });
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return /* @__PURE__ */ d("svg", { ...
|
|
35
|
+
function Le({ size: e, ...t }) {
|
|
36
|
+
return /* @__PURE__ */ d("svg", { ...E(e), ...t, children: [
|
|
37
37
|
/* @__PURE__ */ r("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
38
38
|
/* @__PURE__ */ r("path", { d: "M3 3v5h5" })
|
|
39
39
|
] });
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return /* @__PURE__ */ d("svg", { ...
|
|
41
|
+
function Oe({ size: e, ...t }) {
|
|
42
|
+
return /* @__PURE__ */ d("svg", { ...E(e), ...t, children: [
|
|
43
43
|
/* @__PURE__ */ r("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
44
44
|
/* @__PURE__ */ r("path", { d: "M3 9h18" }),
|
|
45
45
|
/* @__PURE__ */ r("path", { d: "M3 15h18" }),
|
|
@@ -47,8 +47,8 @@ function Ee({ size: e, ...t }) {
|
|
|
47
47
|
/* @__PURE__ */ r("path", { d: "M15 3v18" })
|
|
48
48
|
] });
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
return /* @__PURE__ */ d("svg", { ...
|
|
50
|
+
function $e({ size: e, ...t }) {
|
|
51
|
+
return /* @__PURE__ */ d("svg", { ...E(e), ...t, children: [
|
|
52
52
|
/* @__PURE__ */ r("polyline", { points: "15 3 21 3 21 9" }),
|
|
53
53
|
/* @__PURE__ */ r("polyline", { points: "9 21 3 21 3 15" }),
|
|
54
54
|
/* @__PURE__ */ r("line", { x1: "21", x2: "14", y1: "3", y2: "10" }),
|
|
@@ -56,29 +56,29 @@ function Le({ size: e, ...t }) {
|
|
|
56
56
|
] });
|
|
57
57
|
}
|
|
58
58
|
function he({ size: e, ...t }) {
|
|
59
|
-
return /* @__PURE__ */ r("svg", { ...
|
|
59
|
+
return /* @__PURE__ */ r("svg", { ...E(e), ...t, children: /* @__PURE__ */ r("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) });
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
return /* @__PURE__ */ d("svg", { ...
|
|
61
|
+
function Ae({ size: e, ...t }) {
|
|
62
|
+
return /* @__PURE__ */ d("svg", { ...E(e), ...t, children: [
|
|
63
63
|
/* @__PURE__ */ r("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
|
|
64
64
|
/* @__PURE__ */ r("path", { d: "M12 9v4" }),
|
|
65
65
|
/* @__PURE__ */ r("path", { d: "M12 17h.01" })
|
|
66
66
|
] });
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
return /* @__PURE__ */ r("svg", { ...
|
|
68
|
+
function Be({ size: e, ...t }) {
|
|
69
|
+
return /* @__PURE__ */ r("svg", { ...E(e), ...t, children: /* @__PURE__ */ r("path", { d: "M20 6 9 17l-5-5" }) });
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
return /* @__PURE__ */ d("svg", { ...
|
|
71
|
+
function Se({ size: e, ...t }) {
|
|
72
|
+
return /* @__PURE__ */ d("svg", { ...E(e), ...t, children: [
|
|
73
73
|
/* @__PURE__ */ r("path", { d: "M18 6 6 18" }),
|
|
74
74
|
/* @__PURE__ */ r("path", { d: "m6 6 12 12" })
|
|
75
75
|
] });
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
return /* @__PURE__ */ r("svg", { ...
|
|
77
|
+
function He({ size: e, ...t }) {
|
|
78
|
+
return /* @__PURE__ */ r("svg", { ...E(e), ...t, children: /* @__PURE__ */ r("path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" }) });
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
return /* @__PURE__ */ d("svg", { ...
|
|
80
|
+
function Ve({ size: e, ...t }) {
|
|
81
|
+
return /* @__PURE__ */ d("svg", { ...E(e), ...t, children: [
|
|
82
82
|
/* @__PURE__ */ r("circle", { cx: "12", cy: "12", r: "4" }),
|
|
83
83
|
/* @__PURE__ */ r("path", { d: "M12 2v2" }),
|
|
84
84
|
/* @__PURE__ */ r("path", { d: "M12 20v2" }),
|
|
@@ -90,44 +90,44 @@ function Be({ size: e, ...t }) {
|
|
|
90
90
|
/* @__PURE__ */ r("path", { d: "m19.07 4.93-1.41 1.41" })
|
|
91
91
|
] });
|
|
92
92
|
}
|
|
93
|
-
const
|
|
94
|
-
function
|
|
95
|
-
return Math.round(e /
|
|
93
|
+
const G = 20;
|
|
94
|
+
function le(e) {
|
|
95
|
+
return Math.round(e / G) * G;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function ve(e, t, n = 60) {
|
|
98
98
|
if (e.size === 0) return null;
|
|
99
|
-
let a = 1 / 0, s = 1 / 0,
|
|
99
|
+
let a = 1 / 0, s = 1 / 0, c = -1 / 0, m = -1 / 0;
|
|
100
100
|
for (const x of e.values())
|
|
101
|
-
a = Math.min(a, x.x), s = Math.min(s, x.y),
|
|
102
|
-
const p =
|
|
101
|
+
a = Math.min(a, x.x), s = Math.min(s, x.y), c = Math.max(c, x.x + x.width), m = Math.max(m, x.y + x.height);
|
|
102
|
+
const p = c - a + n * 2, f = m - s + n * 2, b = t.width || window.innerWidth, h = t.height || window.innerHeight, w = Math.min(b / p, h / f, 1.5), y = (a + c) / 2, z = (s + m) / 2;
|
|
103
103
|
return {
|
|
104
|
-
scale: Math.min(3, Math.max(0.2,
|
|
104
|
+
scale: Math.min(3, Math.max(0.2, w)),
|
|
105
105
|
offset: {
|
|
106
|
-
x:
|
|
107
|
-
y:
|
|
106
|
+
x: b / 2 - y * w,
|
|
107
|
+
y: h / 2 - z * w
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
const s = t.width || window.innerWidth,
|
|
113
|
-
(s - n * 2) /
|
|
114
|
-
(
|
|
111
|
+
function je(e, t, n = 40, a = 1.5) {
|
|
112
|
+
const s = t.width || window.innerWidth, c = t.height || window.innerHeight, m = Math.max(1, e.width), p = Math.max(1, e.height), f = Math.min(
|
|
113
|
+
(s - n * 2) / m,
|
|
114
|
+
(c - n * 2) / p,
|
|
115
115
|
a
|
|
116
|
-
),
|
|
116
|
+
), b = Math.min(3, Math.max(0.2, f));
|
|
117
117
|
return {
|
|
118
|
-
scale:
|
|
118
|
+
scale: b,
|
|
119
119
|
offset: {
|
|
120
|
-
x: s / 2 - (e.x +
|
|
121
|
-
y:
|
|
120
|
+
x: s / 2 - (e.x + m / 2) * b,
|
|
121
|
+
y: c / 2 - (e.y + p / 2) * b
|
|
122
122
|
}
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
const
|
|
125
|
+
const g = Ye((e, t) => ({
|
|
126
126
|
offset: { x: 0, y: 0 },
|
|
127
127
|
scale: 1,
|
|
128
128
|
viewportSize: { width: 0, height: 0 },
|
|
129
129
|
snapToGrid: !1,
|
|
130
|
-
snapGridSize:
|
|
130
|
+
snapGridSize: G,
|
|
131
131
|
panels: /* @__PURE__ */ new Map(),
|
|
132
132
|
resetFns: /* @__PURE__ */ new Map(),
|
|
133
133
|
registryVersion: 0,
|
|
@@ -148,24 +148,24 @@ const b = Xe((e, t) => ({
|
|
|
148
148
|
t().resetFns.delete(n);
|
|
149
149
|
},
|
|
150
150
|
fitToContent: () => {
|
|
151
|
-
const { panels: n, viewportSize: a } = t(), s =
|
|
151
|
+
const { panels: n, viewportSize: a } = t(), s = ve(n, a);
|
|
152
152
|
s && e({ scale: s.scale, offset: s.offset });
|
|
153
153
|
},
|
|
154
154
|
focusPanel: (n, a) => {
|
|
155
|
-
const { viewportSize: s } = t(),
|
|
155
|
+
const { viewportSize: s } = t(), c = je(
|
|
156
156
|
n,
|
|
157
157
|
s,
|
|
158
158
|
(a == null ? void 0 : a.padding) ?? 40,
|
|
159
159
|
(a == null ? void 0 : a.maxScale) ?? 1.5
|
|
160
160
|
);
|
|
161
|
-
e({ scale:
|
|
161
|
+
e({ scale: c.scale, offset: c.offset });
|
|
162
162
|
},
|
|
163
163
|
resetWidgets: () => {
|
|
164
164
|
for (const a of t().resetFns.values()) a();
|
|
165
165
|
const n = (a = 0) => {
|
|
166
|
-
const { panels: s, viewportSize:
|
|
167
|
-
if (
|
|
168
|
-
e({ scale:
|
|
166
|
+
const { panels: s, viewportSize: c } = t(), m = ve(s, c);
|
|
167
|
+
if (m) {
|
|
168
|
+
e({ scale: m.scale, offset: m.offset });
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
171
|
a < 6 && requestAnimationFrame(() => n(a + 1));
|
|
@@ -182,42 +182,42 @@ const b = Xe((e, t) => ({
|
|
|
182
182
|
resetFns: /* @__PURE__ */ new Map()
|
|
183
183
|
})
|
|
184
184
|
}));
|
|
185
|
-
function
|
|
186
|
-
const t =
|
|
187
|
-
|
|
185
|
+
function Ze({ extraActions: e }) {
|
|
186
|
+
const t = g((h) => h.scale), n = g((h) => h.viewportSize), a = g((h) => h.snapToGrid), s = g((h) => h.setScale), c = g((h) => h.setOffset), m = g((h) => h.setSnapToGrid), p = g((h) => h.fitToContent), f = g((h) => h.resetWidgets);
|
|
187
|
+
F(() => {
|
|
188
188
|
a && window.dispatchEvent(new Event("whiteboard-snap-now"));
|
|
189
189
|
}, [a]);
|
|
190
|
-
const
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
x:
|
|
194
|
-
y: x - (x -
|
|
195
|
-
})), s(
|
|
190
|
+
const b = (h) => {
|
|
191
|
+
const w = Math.min(3, Math.max(0.2, h)), y = w / t, z = (n.width || window.innerWidth) / 2, x = (n.height || window.innerHeight) / 2;
|
|
192
|
+
c((C) => ({
|
|
193
|
+
x: z - (z - C.x) * y,
|
|
194
|
+
y: x - (x - C.y) * y
|
|
195
|
+
})), s(w);
|
|
196
196
|
};
|
|
197
197
|
return /* @__PURE__ */ d(
|
|
198
198
|
"div",
|
|
199
199
|
{
|
|
200
200
|
className: "zoom-bar",
|
|
201
|
-
onPointerDown: (
|
|
202
|
-
onWheel: (
|
|
201
|
+
onPointerDown: (h) => h.stopPropagation(),
|
|
202
|
+
onWheel: (h) => h.stopPropagation(),
|
|
203
203
|
children: [
|
|
204
|
-
/* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--secondary wb-btn--icon-only zoom-bar__icon", onClick: () =>
|
|
204
|
+
/* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--secondary wb-btn--icon-only zoom-bar__icon", onClick: () => b(t * 0.8), title: "Zoom out", "aria-label": "Zoom out", children: /* @__PURE__ */ r(We, { size: 14 }) }),
|
|
205
205
|
/* @__PURE__ */ d("span", { className: "zoom-bar__value", children: [
|
|
206
206
|
Math.round(t * 100),
|
|
207
207
|
"%"
|
|
208
208
|
] }),
|
|
209
|
-
/* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--secondary wb-btn--icon-only zoom-bar__icon", onClick: () =>
|
|
210
|
-
/* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--secondary wb-btn--icon-only zoom-bar__action", onClick: p, title: "Fit camera to all panels", "aria-label": "Fit camera to all panels", children: /* @__PURE__ */ r(
|
|
211
|
-
/* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--secondary wb-btn--icon-only zoom-bar__action", onClick: f, title: "Reset panel positions", "aria-label": "Reset panel positions", children: /* @__PURE__ */ r(
|
|
209
|
+
/* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--secondary wb-btn--icon-only zoom-bar__icon", onClick: () => b(t * 1.2), title: "Zoom in", "aria-label": "Zoom in", children: /* @__PURE__ */ r(Ge, { size: 14 }) }),
|
|
210
|
+
/* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--secondary wb-btn--icon-only zoom-bar__action", onClick: p, title: "Fit camera to all panels", "aria-label": "Fit camera to all panels", children: /* @__PURE__ */ r(Ee, { size: 14 }) }),
|
|
211
|
+
/* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--secondary wb-btn--icon-only zoom-bar__action", onClick: f, title: "Reset panel positions", "aria-label": "Reset panel positions", children: /* @__PURE__ */ r(Le, { size: 14 }) }),
|
|
212
212
|
/* @__PURE__ */ r(
|
|
213
213
|
"button",
|
|
214
214
|
{
|
|
215
215
|
type: "button",
|
|
216
216
|
className: `wb-btn wb-btn--secondary wb-btn--icon-only zoom-bar__action${a ? " is-active" : ""}`,
|
|
217
|
-
onClick: () =>
|
|
217
|
+
onClick: () => m((h) => !h),
|
|
218
218
|
title: a ? "Disable snap to grid" : "Enable snap to grid",
|
|
219
219
|
"aria-label": a ? "Disable snap to grid" : "Enable snap to grid",
|
|
220
|
-
children: /* @__PURE__ */ r(
|
|
220
|
+
children: /* @__PURE__ */ r(Oe, { size: 14 })
|
|
221
221
|
}
|
|
222
222
|
),
|
|
223
223
|
e
|
|
@@ -225,95 +225,95 @@ function Ve({ extraActions: e }) {
|
|
|
225
225
|
}
|
|
226
226
|
);
|
|
227
227
|
}
|
|
228
|
-
const
|
|
229
|
-
function
|
|
230
|
-
|
|
231
|
-
const t =
|
|
232
|
-
if (e ||
|
|
233
|
-
return /* @__PURE__ */ r("div", { className: "minimap minimap--loading", style: { width:
|
|
234
|
-
const x = a.width || window.innerWidth,
|
|
235
|
-
let
|
|
236
|
-
for (const
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
const
|
|
228
|
+
const ee = 200, te = 150, ue = 40, Ne = 1;
|
|
229
|
+
function Ue({ loading: e = !1 }) {
|
|
230
|
+
g((o) => o.registryVersion);
|
|
231
|
+
const t = g((o) => o.offset), n = g((o) => o.scale), a = g((o) => o.viewportSize), s = g((o) => o.panels), c = g((o) => o.setOffset), m = g((o) => o.setScale), p = g((o) => o.focusPanel), f = P(null), b = P(!1), h = P(null), y = Array.from(s.entries()).filter(([, o]) => Number.isFinite(o.width) && Number.isFinite(o.height)), z = y.map(([, o]) => o);
|
|
232
|
+
if (e || z.length === 0)
|
|
233
|
+
return /* @__PURE__ */ r("div", { className: "minimap minimap--loading", style: { width: ee, height: te }, children: /* @__PURE__ */ r("div", { className: "minimap__loading", children: /* @__PURE__ */ r(he, { size: 14, className: "icon-spin" }) }) });
|
|
234
|
+
const x = a.width || window.innerWidth, C = a.height || window.innerHeight, L = x / n, N = C / n, v = -t.x / n, T = -t.y / n;
|
|
235
|
+
let O = 1 / 0, u = 1 / 0, X = -1 / 0, Y = -1 / 0;
|
|
236
|
+
for (const o of z)
|
|
237
|
+
O = Math.min(O, o.x), u = Math.min(u, o.y), X = Math.max(X, o.x + o.width), Y = Math.max(Y, o.y + o.height);
|
|
238
|
+
O -= ue, u -= ue, X += ue, Y += ue;
|
|
239
|
+
const R = Math.max(Ne, X - O), V = Math.max(Ne, Y - u), D = Math.min(ee / R, te / V), B = R * D, U = V * D, q = (ee - B) / 2, W = (te - U) / 2, J = (o) => q + (o - O) * D, Z = (o) => W + (o - u) * D, Q = (o, k) => {
|
|
240
240
|
if (!f.current) return;
|
|
241
|
-
const
|
|
242
|
-
return { worldX:
|
|
243
|
-
}, K = (
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
x: x / 2 -
|
|
247
|
-
y:
|
|
241
|
+
const _ = f.current.getBoundingClientRect(), $ = Math.min(ee, Math.max(0, o - _.left)), H = Math.min(te, Math.max(0, k - _.top)), ae = Math.min(B + q, Math.max(q, $)), se = Math.min(U + W, Math.max(W, H)), oe = (ae - q) / D + O, ie = (se - W) / D + u;
|
|
242
|
+
return { worldX: oe, worldY: ie };
|
|
243
|
+
}, K = (o, k, _) => {
|
|
244
|
+
const $ = Math.min(3, Math.max(0.2, _));
|
|
245
|
+
m($), c({
|
|
246
|
+
x: x / 2 - o * $,
|
|
247
|
+
y: C / 2 - k * $
|
|
248
248
|
});
|
|
249
|
-
},
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
},
|
|
253
|
-
|
|
254
|
-
},
|
|
255
|
-
|
|
256
|
-
},
|
|
257
|
-
|
|
249
|
+
}, re = (o, k) => {
|
|
250
|
+
const _ = Q(o, k);
|
|
251
|
+
_ && K(_.worldX, _.worldY, n);
|
|
252
|
+
}, pe = (o) => {
|
|
253
|
+
o.stopPropagation(), o.preventDefault(), b.current = !0, o.currentTarget.setPointerCapture(o.pointerId), re(o.clientX, o.clientY);
|
|
254
|
+
}, l = (o) => {
|
|
255
|
+
b.current && re(o.clientX, o.clientY);
|
|
256
|
+
}, S = () => {
|
|
257
|
+
b.current = !1;
|
|
258
258
|
};
|
|
259
259
|
return /* @__PURE__ */ d(
|
|
260
260
|
"div",
|
|
261
261
|
{
|
|
262
262
|
ref: f,
|
|
263
|
-
onPointerDown:
|
|
264
|
-
onPointerMove:
|
|
265
|
-
onPointerUp:
|
|
266
|
-
onPointerCancel:
|
|
267
|
-
onWheel: (
|
|
268
|
-
|
|
269
|
-
const
|
|
270
|
-
if (!
|
|
271
|
-
const
|
|
272
|
-
K(
|
|
263
|
+
onPointerDown: pe,
|
|
264
|
+
onPointerMove: l,
|
|
265
|
+
onPointerUp: S,
|
|
266
|
+
onPointerCancel: S,
|
|
267
|
+
onWheel: (o) => {
|
|
268
|
+
o.preventDefault(), o.stopPropagation();
|
|
269
|
+
const k = Q(o.clientX, o.clientY);
|
|
270
|
+
if (!k) return;
|
|
271
|
+
const _ = o.deltaY > 0 ? 0.9 : 1.1;
|
|
272
|
+
K(k.worldX, k.worldY, n * _);
|
|
273
273
|
},
|
|
274
274
|
className: "minimap",
|
|
275
275
|
style: {
|
|
276
|
-
width:
|
|
277
|
-
height:
|
|
276
|
+
width: ee,
|
|
277
|
+
height: te
|
|
278
278
|
},
|
|
279
279
|
children: [
|
|
280
|
-
|
|
280
|
+
y.map(([o, k]) => /* @__PURE__ */ r(
|
|
281
281
|
"div",
|
|
282
282
|
{
|
|
283
283
|
className: "minimap__panel",
|
|
284
|
-
onPointerDown: (
|
|
285
|
-
|
|
284
|
+
onPointerDown: (_) => {
|
|
285
|
+
_.stopPropagation();
|
|
286
286
|
},
|
|
287
|
-
onPointerUp: (
|
|
288
|
-
|
|
289
|
-
const
|
|
290
|
-
if (
|
|
291
|
-
|
|
287
|
+
onPointerUp: (_) => {
|
|
288
|
+
_.stopPropagation();
|
|
289
|
+
const $ = Date.now(), H = h.current;
|
|
290
|
+
if (H && H.id === o && $ - H.time < 300) {
|
|
291
|
+
_.preventDefault(), p(k, { padding: k.focusPadding, maxScale: k.focusMaxScale }), h.current = null;
|
|
292
292
|
return;
|
|
293
293
|
}
|
|
294
|
-
|
|
294
|
+
h.current = { id: o, time: $ };
|
|
295
295
|
},
|
|
296
|
-
onDoubleClick: (
|
|
297
|
-
|
|
296
|
+
onDoubleClick: (_) => {
|
|
297
|
+
_.preventDefault(), _.stopPropagation(), p(k, { padding: k.focusPadding, maxScale: k.focusMaxScale });
|
|
298
298
|
},
|
|
299
299
|
style: {
|
|
300
|
-
left:
|
|
301
|
-
top:
|
|
302
|
-
width: Math.max(1,
|
|
303
|
-
height: Math.max(1,
|
|
300
|
+
left: J(k.x),
|
|
301
|
+
top: Z(k.y),
|
|
302
|
+
width: Math.max(1, k.width * D),
|
|
303
|
+
height: Math.max(1, k.height * D)
|
|
304
304
|
}
|
|
305
305
|
},
|
|
306
|
-
|
|
306
|
+
o
|
|
307
307
|
)),
|
|
308
308
|
/* @__PURE__ */ r(
|
|
309
309
|
"div",
|
|
310
310
|
{
|
|
311
311
|
className: "minimap__viewport",
|
|
312
312
|
style: {
|
|
313
|
-
left:
|
|
314
|
-
top:
|
|
315
|
-
width:
|
|
316
|
-
height:
|
|
313
|
+
left: J(v),
|
|
314
|
+
top: Z(T),
|
|
315
|
+
width: L * D,
|
|
316
|
+
height: N * D
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
)
|
|
@@ -321,69 +321,69 @@ function je({ loading: e = !1 }) {
|
|
|
321
321
|
}
|
|
322
322
|
);
|
|
323
323
|
}
|
|
324
|
-
function
|
|
325
|
-
const s =
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
}, []),
|
|
329
|
-
|
|
330
|
-
}, [
|
|
331
|
-
const u =
|
|
324
|
+
function vt({ children: e, showMinimap: t = !0, minimapLoading: n = !1, extraActions: a }) {
|
|
325
|
+
const s = g((u) => u.offset), c = g((u) => u.scale), m = g((u) => u.registryVersion), p = g((u) => u.viewportSize), f = g((u) => u.setOffset), b = g((u) => u.setScale), h = g((u) => u.setViewportSize), w = P(null), y = P(!1), z = P({ x: 0, y: 0 }), x = P(null), C = P(c), L = P(!1);
|
|
326
|
+
F(() => () => {
|
|
327
|
+
g.getState().resetSession();
|
|
328
|
+
}, []), F(() => {
|
|
329
|
+
C.current = c;
|
|
330
|
+
}, [c]), F(() => {
|
|
331
|
+
const u = w.current;
|
|
332
332
|
if (!u) return;
|
|
333
|
-
const
|
|
334
|
-
const
|
|
335
|
-
|
|
336
|
-
width: Math.max(0,
|
|
337
|
-
height: Math.max(0,
|
|
333
|
+
const X = () => {
|
|
334
|
+
const R = u.getBoundingClientRect();
|
|
335
|
+
h({
|
|
336
|
+
width: Math.max(0, R.width),
|
|
337
|
+
height: Math.max(0, R.height)
|
|
338
338
|
});
|
|
339
339
|
};
|
|
340
|
-
if (
|
|
341
|
-
const
|
|
342
|
-
return
|
|
343
|
-
}, [
|
|
344
|
-
if (
|
|
345
|
-
const { panels: u } =
|
|
346
|
-
u.size === 0 || p.width <= 0 || p.height <= 0 || (
|
|
347
|
-
|
|
340
|
+
if (X(), typeof ResizeObserver > "u") return;
|
|
341
|
+
const Y = new ResizeObserver(X);
|
|
342
|
+
return Y.observe(u), () => Y.disconnect();
|
|
343
|
+
}, [h]), F(() => {
|
|
344
|
+
if (L.current) return;
|
|
345
|
+
const { panels: u } = g.getState();
|
|
346
|
+
u.size === 0 || p.width <= 0 || p.height <= 0 || (L.current = !0, requestAnimationFrame(() => {
|
|
347
|
+
g.getState().fitToContent();
|
|
348
348
|
}));
|
|
349
|
-
}, [
|
|
350
|
-
const
|
|
351
|
-
u.target === u.currentTarget && (u.button === 0 || u.button === 1) && (
|
|
352
|
-
}, []),
|
|
353
|
-
if (!
|
|
354
|
-
const
|
|
355
|
-
f((
|
|
356
|
-
}, [f]),
|
|
349
|
+
}, [m, p]);
|
|
350
|
+
const N = j((u) => {
|
|
351
|
+
u.target === u.currentTarget && (u.button === 0 || u.button === 1) && (y.current = !0, x.current = u.pointerId, z.current = { x: u.clientX, y: u.clientY }, u.currentTarget.setPointerCapture(u.pointerId), u.preventDefault());
|
|
352
|
+
}, []), v = j((u) => {
|
|
353
|
+
if (!y.current || x.current !== u.pointerId) return;
|
|
354
|
+
const X = u.movementX ?? u.clientX - z.current.x, Y = u.movementY ?? u.clientY - z.current.y;
|
|
355
|
+
f((R) => ({ x: R.x + X, y: R.y + Y })), z.current = { x: u.clientX, y: u.clientY };
|
|
356
|
+
}, [f]), T = j((u) => {
|
|
357
357
|
if (x.current !== null)
|
|
358
358
|
try {
|
|
359
359
|
u.currentTarget.releasePointerCapture(x.current);
|
|
360
360
|
} catch {
|
|
361
361
|
}
|
|
362
|
-
|
|
363
|
-
}, []),
|
|
364
|
-
const
|
|
365
|
-
f((
|
|
366
|
-
x:
|
|
367
|
-
y:
|
|
368
|
-
})),
|
|
369
|
-
}, [f,
|
|
370
|
-
return /* @__PURE__ */ d(
|
|
362
|
+
y.current = !1, x.current = null;
|
|
363
|
+
}, []), O = j((u) => {
|
|
364
|
+
const X = C.current, Y = u.currentTarget.getBoundingClientRect(), R = { x: u.clientX - Y.left, y: u.clientY - Y.top }, V = Math.min(3, Math.max(0.2, X * (u.deltaY > 0 ? 0.9 : 1.1))), D = V / X;
|
|
365
|
+
f((B) => ({
|
|
366
|
+
x: R.x - (R.x - B.x) * D,
|
|
367
|
+
y: R.y - (R.y - B.y) * D
|
|
368
|
+
})), b(V);
|
|
369
|
+
}, [f, b]);
|
|
370
|
+
return /* @__PURE__ */ d(ne, { children: [
|
|
371
371
|
/* @__PURE__ */ r(
|
|
372
372
|
"div",
|
|
373
373
|
{
|
|
374
|
-
ref:
|
|
375
|
-
onPointerDown:
|
|
376
|
-
onPointerMove:
|
|
377
|
-
onPointerUp:
|
|
378
|
-
onPointerCancel:
|
|
379
|
-
onWheel:
|
|
374
|
+
ref: w,
|
|
375
|
+
onPointerDown: N,
|
|
376
|
+
onPointerMove: v,
|
|
377
|
+
onPointerUp: T,
|
|
378
|
+
onPointerCancel: T,
|
|
379
|
+
onWheel: O,
|
|
380
380
|
onContextMenu: (u) => u.preventDefault(),
|
|
381
381
|
className: "whiteboard-shell",
|
|
382
382
|
children: /* @__PURE__ */ d(
|
|
383
383
|
"div",
|
|
384
384
|
{
|
|
385
385
|
className: "whiteboard-canvas",
|
|
386
|
-
style: { transform: `translate(${s.x}px, ${s.y}px) scale(${
|
|
386
|
+
style: { transform: `translate(${s.x}px, ${s.y}px) scale(${c})` },
|
|
387
387
|
children: [
|
|
388
388
|
/* @__PURE__ */ r("div", { className: "whiteboard-grid", "aria-hidden": !0 }),
|
|
389
389
|
e
|
|
@@ -392,168 +392,168 @@ function wt({ children: e, showMinimap: t = !0, minimapLoading: n = !1, extraAct
|
|
|
392
392
|
)
|
|
393
393
|
}
|
|
394
394
|
),
|
|
395
|
-
/* @__PURE__ */ r(
|
|
396
|
-
t ? /* @__PURE__ */ r(
|
|
395
|
+
/* @__PURE__ */ r(Ze, { extraActions: a }),
|
|
396
|
+
t ? /* @__PURE__ */ r(Ue, { loading: n }) : null
|
|
397
397
|
] });
|
|
398
398
|
}
|
|
399
|
-
const
|
|
399
|
+
const Nt = Re(function({
|
|
400
400
|
title: t,
|
|
401
401
|
defaultPosition: n,
|
|
402
402
|
width: a = 300,
|
|
403
403
|
className: s,
|
|
404
|
-
trackRect:
|
|
405
|
-
focusable:
|
|
404
|
+
trackRect: c,
|
|
405
|
+
focusable: m,
|
|
406
406
|
focusPadding: p = 40,
|
|
407
407
|
focusMaxScale: f = 1.5,
|
|
408
|
-
headerActions:
|
|
409
|
-
children:
|
|
408
|
+
headerActions: b,
|
|
409
|
+
children: h
|
|
410
410
|
}) {
|
|
411
|
-
const
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
}, [
|
|
415
|
-
|
|
416
|
-
}, [
|
|
417
|
-
const
|
|
418
|
-
const
|
|
419
|
-
|
|
420
|
-
const
|
|
421
|
-
x: Math.round(
|
|
422
|
-
y: Math.round(
|
|
411
|
+
const w = De(), [y, z] = we(n), x = P(!1), C = P(y), L = P(null), N = P(null), v = g((l) => l.scale), T = g((l) => l.snapToGrid), O = g((l) => l.snapGridSize), u = g((l) => l.register), X = g((l) => l.unregister), Y = g((l) => l.registerReset), R = g((l) => l.unregisterReset), V = g((l) => l.focusPanel), D = P(v), B = P(!1), U = P(20), q = P(n), W = P(null), J = P(null);
|
|
412
|
+
F(() => {
|
|
413
|
+
D.current = v;
|
|
414
|
+
}, [v]), F(() => {
|
|
415
|
+
B.current = T, U.current = O;
|
|
416
|
+
}, [T, O]), F(() => {
|
|
417
|
+
const l = () => {
|
|
418
|
+
const S = U.current;
|
|
419
|
+
z((M) => {
|
|
420
|
+
const o = {
|
|
421
|
+
x: Math.round(M.x / S) * S,
|
|
422
|
+
y: Math.round(M.y / S) * S
|
|
423
423
|
};
|
|
424
|
-
return
|
|
424
|
+
return o.x === M.x && o.y === M.y ? M : o;
|
|
425
425
|
});
|
|
426
426
|
};
|
|
427
|
-
return window.addEventListener("whiteboard-snap-now",
|
|
428
|
-
}, []),
|
|
429
|
-
|
|
430
|
-
}, [
|
|
431
|
-
const
|
|
432
|
-
const
|
|
433
|
-
if (!
|
|
434
|
-
const
|
|
435
|
-
x:
|
|
436
|
-
y:
|
|
437
|
-
width:
|
|
438
|
-
height:
|
|
427
|
+
return window.addEventListener("whiteboard-snap-now", l), () => window.removeEventListener("whiteboard-snap-now", l);
|
|
428
|
+
}, []), F(() => {
|
|
429
|
+
C.current = y;
|
|
430
|
+
}, [y]);
|
|
431
|
+
const Z = j(() => {
|
|
432
|
+
const l = L.current;
|
|
433
|
+
if (!l) return;
|
|
434
|
+
const S = {
|
|
435
|
+
x: C.current.x,
|
|
436
|
+
y: C.current.y,
|
|
437
|
+
width: l.offsetWidth,
|
|
438
|
+
height: l.offsetHeight,
|
|
439
439
|
focusPadding: p,
|
|
440
440
|
focusMaxScale: f
|
|
441
|
-
},
|
|
442
|
-
|
|
443
|
-
}, [f, p,
|
|
444
|
-
const
|
|
445
|
-
return
|
|
446
|
-
x:
|
|
447
|
-
y:
|
|
448
|
-
width:
|
|
449
|
-
height:
|
|
441
|
+
}, M = N.current;
|
|
442
|
+
M && M.x === S.x && M.y === S.y && M.width === S.width && M.height === S.height && M.focusPadding === S.focusPadding && M.focusMaxScale === S.focusMaxScale || (N.current = S, u(w, S), c && (c.current = S));
|
|
443
|
+
}, [f, p, w, u, c]), Q = j(() => {
|
|
444
|
+
const l = L.current;
|
|
445
|
+
return l ? {
|
|
446
|
+
x: C.current.x,
|
|
447
|
+
y: C.current.y,
|
|
448
|
+
width: l.offsetWidth,
|
|
449
|
+
height: l.offsetHeight,
|
|
450
450
|
focusPadding: p,
|
|
451
451
|
focusMaxScale: f
|
|
452
452
|
} : null;
|
|
453
|
-
}, [f, p]), K =
|
|
454
|
-
const
|
|
455
|
-
|
|
456
|
-
}, [
|
|
457
|
-
|
|
458
|
-
var
|
|
459
|
-
(
|
|
460
|
-
}), [
|
|
461
|
-
|
|
462
|
-
}, [
|
|
463
|
-
const
|
|
464
|
-
if (!
|
|
465
|
-
const
|
|
466
|
-
|
|
453
|
+
}, [f, p]), K = j(() => {
|
|
454
|
+
const l = Q();
|
|
455
|
+
l && V(l, { padding: p, maxScale: f });
|
|
456
|
+
}, [V, p, f, Q]);
|
|
457
|
+
F(() => (Y(w, () => z(q.current)), () => {
|
|
458
|
+
var l;
|
|
459
|
+
(l = W.current) == null || l.call(W), X(w), R(w), N.current = null;
|
|
460
|
+
}), [w, Y, X, R]), Ie(() => {
|
|
461
|
+
Z();
|
|
462
|
+
}, [y.x, y.y, a, Z]), F(() => {
|
|
463
|
+
const l = L.current;
|
|
464
|
+
if (!l || typeof ResizeObserver > "u") return;
|
|
465
|
+
const S = new ResizeObserver(() => {
|
|
466
|
+
Z();
|
|
467
467
|
});
|
|
468
|
-
return
|
|
469
|
-
}, [
|
|
470
|
-
const
|
|
471
|
-
var
|
|
472
|
-
if (
|
|
468
|
+
return S.observe(l), () => S.disconnect();
|
|
469
|
+
}, [Z]);
|
|
470
|
+
const re = j((l) => {
|
|
471
|
+
var ae;
|
|
472
|
+
if (l.button !== 0) return;
|
|
473
473
|
x.current = !0;
|
|
474
|
-
const
|
|
475
|
-
|
|
476
|
-
const
|
|
474
|
+
const S = l.clientX, M = l.clientY, o = C.current.x, k = C.current.y, _ = D.current;
|
|
475
|
+
l.preventDefault(), l.stopPropagation(), l.target.setPointerCapture(l.pointerId);
|
|
476
|
+
const $ = (se) => {
|
|
477
477
|
if (!x.current) return;
|
|
478
|
-
const
|
|
479
|
-
|
|
480
|
-
x:
|
|
481
|
-
y:
|
|
478
|
+
const oe = o + (se.clientX - S) / _, ie = k + (se.clientY - M) / _, ce = U.current, ze = B.current ? Math.round(oe / ce) * ce : oe, Te = B.current ? Math.round(ie / ce) * ce : ie;
|
|
479
|
+
z({
|
|
480
|
+
x: ze,
|
|
481
|
+
y: Te
|
|
482
482
|
});
|
|
483
|
-
},
|
|
484
|
-
x.current = !1, window.removeEventListener("pointermove",
|
|
483
|
+
}, H = () => {
|
|
484
|
+
x.current = !1, window.removeEventListener("pointermove", $), window.removeEventListener("pointerup", H), W.current = null;
|
|
485
485
|
};
|
|
486
|
-
(
|
|
487
|
-
}, []),
|
|
486
|
+
(ae = W.current) == null || ae.call(W), window.addEventListener("pointermove", $), window.addEventListener("pointerup", H), W.current = H;
|
|
487
|
+
}, []), pe = s ? `floating-panel ${s}` : "floating-panel";
|
|
488
488
|
return /* @__PURE__ */ d(
|
|
489
489
|
"div",
|
|
490
490
|
{
|
|
491
|
-
ref:
|
|
492
|
-
className:
|
|
493
|
-
style: { left:
|
|
494
|
-
onPointerDown: (
|
|
495
|
-
onPointerUp: (
|
|
491
|
+
ref: L,
|
|
492
|
+
className: pe,
|
|
493
|
+
style: { left: y.x, top: y.y, width: a },
|
|
494
|
+
onPointerDown: (l) => l.stopPropagation(),
|
|
495
|
+
onPointerUp: (l) => {
|
|
496
496
|
if (x.current) return;
|
|
497
|
-
const
|
|
498
|
-
if (
|
|
499
|
-
const
|
|
500
|
-
if (
|
|
501
|
-
|
|
497
|
+
const S = Date.now(), M = J.current;
|
|
498
|
+
if (M && S - M.time < 300) {
|
|
499
|
+
const o = l.clientX - M.x, k = l.clientY - M.y;
|
|
500
|
+
if (o * o + k * k < 100) {
|
|
501
|
+
l.stopPropagation(), K(), J.current = null;
|
|
502
502
|
return;
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
|
|
505
|
+
J.current = { time: S, x: l.clientX, y: l.clientY };
|
|
506
506
|
},
|
|
507
|
-
onWheel: (
|
|
508
|
-
onDoubleClick: (
|
|
509
|
-
|
|
507
|
+
onWheel: (l) => l.stopPropagation(),
|
|
508
|
+
onDoubleClick: (l) => {
|
|
509
|
+
l.stopPropagation(), K();
|
|
510
510
|
},
|
|
511
511
|
children: [
|
|
512
|
-
/* @__PURE__ */ d("div", { onPointerDown:
|
|
512
|
+
/* @__PURE__ */ d("div", { onPointerDown: re, className: "floating-panel__header", children: [
|
|
513
513
|
/* @__PURE__ */ r("strong", { className: "floating-panel__title", children: t }),
|
|
514
|
-
|
|
515
|
-
|
|
514
|
+
b,
|
|
515
|
+
m && /* @__PURE__ */ r(
|
|
516
516
|
"button",
|
|
517
517
|
{
|
|
518
518
|
type: "button",
|
|
519
519
|
className: "wb-btn wb-btn--secondary wb-btn--icon-only floating-panel__focus",
|
|
520
520
|
onClick: K,
|
|
521
|
-
onPointerDown: (
|
|
521
|
+
onPointerDown: (l) => l.stopPropagation(),
|
|
522
522
|
title: "Focus on this panel",
|
|
523
523
|
"aria-label": "Focus on this panel",
|
|
524
|
-
children: /* @__PURE__ */ r(
|
|
524
|
+
children: /* @__PURE__ */ r($e, { size: 14 })
|
|
525
525
|
}
|
|
526
526
|
)
|
|
527
527
|
] }),
|
|
528
|
-
/* @__PURE__ */ r("div", { className: "floating-panel__body", children:
|
|
528
|
+
/* @__PURE__ */ r("div", { className: "floating-panel__body", children: h })
|
|
529
529
|
]
|
|
530
530
|
}
|
|
531
531
|
);
|
|
532
532
|
});
|
|
533
|
-
function
|
|
534
|
-
return
|
|
533
|
+
function xt(e) {
|
|
534
|
+
return P({ ...e, width: 0, height: 0 });
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function St(e, t = G) {
|
|
537
537
|
return { x: e.x, y: e.y + e.height + t };
|
|
538
538
|
}
|
|
539
|
-
function
|
|
539
|
+
function kt({
|
|
540
540
|
open: e,
|
|
541
541
|
title: t,
|
|
542
542
|
message: n,
|
|
543
543
|
onConfirm: a,
|
|
544
544
|
onCancel: s,
|
|
545
|
-
confirmLabel:
|
|
546
|
-
loadingLabel:
|
|
545
|
+
confirmLabel: c = "Confirm",
|
|
546
|
+
loadingLabel: m,
|
|
547
547
|
loading: p,
|
|
548
548
|
error: f
|
|
549
549
|
}) {
|
|
550
|
-
return
|
|
550
|
+
return F(() => {
|
|
551
551
|
if (!e) return;
|
|
552
|
-
const
|
|
553
|
-
|
|
552
|
+
const b = (h) => {
|
|
553
|
+
h.key === "Escape" && s();
|
|
554
554
|
};
|
|
555
|
-
return window.addEventListener("keydown",
|
|
556
|
-
}, [e, s]), !e || typeof document > "u" ? null :
|
|
555
|
+
return window.addEventListener("keydown", b), () => window.removeEventListener("keydown", b);
|
|
556
|
+
}, [e, s]), !e || typeof document > "u" ? null : Fe(
|
|
557
557
|
/* @__PURE__ */ r("div", { className: "confirm-modal-overlay", onMouseDown: s, children: /* @__PURE__ */ d(
|
|
558
558
|
"div",
|
|
559
559
|
{
|
|
@@ -561,22 +561,22 @@ function Nt({
|
|
|
561
561
|
role: "dialog",
|
|
562
562
|
"aria-modal": "true",
|
|
563
563
|
"aria-label": t,
|
|
564
|
-
onMouseDown: (
|
|
564
|
+
onMouseDown: (b) => b.stopPropagation(),
|
|
565
565
|
children: [
|
|
566
566
|
/* @__PURE__ */ d("div", { className: "confirm-modal__header", children: [
|
|
567
567
|
/* @__PURE__ */ d("span", { className: "confirm-modal__title", children: [
|
|
568
|
-
/* @__PURE__ */ r(
|
|
568
|
+
/* @__PURE__ */ r(Ae, { size: 16 }),
|
|
569
569
|
t
|
|
570
570
|
] }),
|
|
571
|
-
/* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--secondary wb-btn--icon-only", onClick: s, "aria-label": "Close dialog", children: /* @__PURE__ */ r(
|
|
571
|
+
/* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--secondary wb-btn--icon-only", onClick: s, "aria-label": "Close dialog", children: /* @__PURE__ */ r(Se, { size: 14 }) })
|
|
572
572
|
] }),
|
|
573
573
|
/* @__PURE__ */ r("p", { className: "confirm-modal__message", children: n }),
|
|
574
574
|
f && /* @__PURE__ */ r("div", { className: "wb-alert wb-alert--error", children: f }),
|
|
575
575
|
/* @__PURE__ */ d("div", { className: "wb-btn-row", children: [
|
|
576
576
|
/* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--secondary", onClick: s, children: "Cancel" }),
|
|
577
|
-
/* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--danger", onClick: a, disabled: p, children: p ?
|
|
578
|
-
/* @__PURE__ */ r(
|
|
579
|
-
|
|
577
|
+
/* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--danger", onClick: a, disabled: p, children: p ? m ?? `${c}…` : /* @__PURE__ */ d(ne, { children: [
|
|
578
|
+
/* @__PURE__ */ r(Be, { size: 14 }),
|
|
579
|
+
c
|
|
580
580
|
] }) })
|
|
581
581
|
] })
|
|
582
582
|
]
|
|
@@ -585,7 +585,7 @@ function Nt({
|
|
|
585
585
|
document.body
|
|
586
586
|
);
|
|
587
587
|
}
|
|
588
|
-
class
|
|
588
|
+
class Mt extends Xe {
|
|
589
589
|
constructor() {
|
|
590
590
|
super(...arguments), this.state = { error: null };
|
|
591
591
|
}
|
|
@@ -607,7 +607,7 @@ class xt extends We {
|
|
|
607
607
|
] }) : this.props.children;
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function _t({
|
|
611
611
|
widths: e,
|
|
612
612
|
startX: t = 20,
|
|
613
613
|
y: n = 40,
|
|
@@ -615,85 +615,85 @@ function kt({
|
|
|
615
615
|
}) {
|
|
616
616
|
const s = be(() => {
|
|
617
617
|
const p = {};
|
|
618
|
-
for (const [f,
|
|
619
|
-
p[f] =
|
|
618
|
+
for (const [f, b] of Object.entries(e))
|
|
619
|
+
p[f] = le(b);
|
|
620
620
|
return p;
|
|
621
|
-
}, [e]),
|
|
621
|
+
}, [e]), c = be(
|
|
622
622
|
() => ({
|
|
623
|
-
startX:
|
|
624
|
-
y:
|
|
625
|
-
gap:
|
|
623
|
+
startX: le(t),
|
|
624
|
+
y: le(n),
|
|
625
|
+
gap: le(a)
|
|
626
626
|
}),
|
|
627
627
|
[t, n, a]
|
|
628
|
-
),
|
|
628
|
+
), m = be(() => {
|
|
629
629
|
const p = {};
|
|
630
|
-
let f =
|
|
631
|
-
for (const [
|
|
632
|
-
p[
|
|
630
|
+
let f = c.startX;
|
|
631
|
+
for (const [b, h] of Object.entries(s))
|
|
632
|
+
p[b] = { x: f, y: c.y }, f += h + c.gap;
|
|
633
633
|
return p;
|
|
634
|
-
}, [
|
|
635
|
-
return { layout:
|
|
634
|
+
}, [c.gap, c.startX, c.y, s]);
|
|
635
|
+
return { layout: c, panelWidth: s, positions: m };
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function i(...e) {
|
|
638
638
|
return e.filter(Boolean).join(" ");
|
|
639
639
|
}
|
|
640
|
-
const
|
|
640
|
+
const qe = {
|
|
641
641
|
error: "wb-alert wb-alert--error",
|
|
642
642
|
muted: "wb-alert wb-alert--muted",
|
|
643
643
|
info: "wb-alert wb-alert--info",
|
|
644
644
|
success: "wb-alert wb-alert--success"
|
|
645
645
|
};
|
|
646
|
-
function
|
|
647
|
-
return /* @__PURE__ */ r("p", { className:
|
|
646
|
+
function Pt({ tone: e = "info", className: t, ...n }) {
|
|
647
|
+
return /* @__PURE__ */ r("p", { className: i(qe[e], t), ...n });
|
|
648
648
|
}
|
|
649
|
-
function
|
|
650
|
-
return /* @__PURE__ */ r("span", { className:
|
|
649
|
+
function Ct({ className: e, ...t }) {
|
|
650
|
+
return /* @__PURE__ */ r("span", { className: i("avatar-badge", e), ...t });
|
|
651
651
|
}
|
|
652
|
-
const
|
|
652
|
+
const Je = {
|
|
653
653
|
primary: "",
|
|
654
654
|
secondary: "wb-btn--secondary",
|
|
655
655
|
danger: "wb-btn--danger"
|
|
656
|
-
},
|
|
656
|
+
}, ke = de(function({
|
|
657
657
|
variant: t = "primary",
|
|
658
658
|
fullWidth: n = !1,
|
|
659
659
|
iconOnly: a = !1,
|
|
660
660
|
loading: s = !1,
|
|
661
|
-
type:
|
|
662
|
-
disabled:
|
|
661
|
+
type: c = "button",
|
|
662
|
+
disabled: m,
|
|
663
663
|
className: p,
|
|
664
664
|
children: f,
|
|
665
|
-
loadingText:
|
|
666
|
-
...
|
|
667
|
-
},
|
|
665
|
+
loadingText: b,
|
|
666
|
+
...h
|
|
667
|
+
}, w) {
|
|
668
668
|
return /* @__PURE__ */ r(
|
|
669
669
|
"button",
|
|
670
670
|
{
|
|
671
|
-
ref:
|
|
672
|
-
type:
|
|
673
|
-
className:
|
|
674
|
-
disabled:
|
|
675
|
-
...
|
|
676
|
-
children: s ? /* @__PURE__ */ d(
|
|
671
|
+
ref: w,
|
|
672
|
+
type: c,
|
|
673
|
+
className: i("wb-btn", Je[t], n && "wb-btn--full-width", a && "wb-btn--icon-only", p),
|
|
674
|
+
disabled: m || s,
|
|
675
|
+
...h,
|
|
676
|
+
children: s ? /* @__PURE__ */ d(ne, { children: [
|
|
677
677
|
/* @__PURE__ */ r(he, { size: 14, className: "icon-spin" }),
|
|
678
|
-
|
|
678
|
+
b || f
|
|
679
679
|
] }) : f
|
|
680
680
|
}
|
|
681
681
|
);
|
|
682
682
|
});
|
|
683
|
-
function
|
|
684
|
-
return
|
|
685
|
-
className:
|
|
683
|
+
function Ke({ as: e = "div", className: t, ...n }) {
|
|
684
|
+
return I(e, {
|
|
685
|
+
className: i("button-row", t),
|
|
686
686
|
...n
|
|
687
687
|
});
|
|
688
688
|
}
|
|
689
|
-
function
|
|
690
|
-
return /* @__PURE__ */ r("div", { className: "canvas-wrap", children: /* @__PURE__ */ d("div", { className:
|
|
689
|
+
function zt({ children: e, hint: t, className: n, ...a }) {
|
|
690
|
+
return /* @__PURE__ */ r("div", { className: "canvas-wrap", children: /* @__PURE__ */ d("div", { className: i("canvas-stage", n), ...a, children: [
|
|
691
691
|
e,
|
|
692
692
|
t && /* @__PURE__ */ r("p", { className: "canvas-hint", children: t })
|
|
693
693
|
] }) });
|
|
694
694
|
}
|
|
695
|
-
function
|
|
696
|
-
return /* @__PURE__ */ d("label", { className:
|
|
695
|
+
function Tt({ label: e, hint: t, className: n, ...a }) {
|
|
696
|
+
return /* @__PURE__ */ d("label", { className: i("checkbox", n), children: [
|
|
697
697
|
/* @__PURE__ */ r("input", { type: "checkbox", className: "checkbox__input", ...a }),
|
|
698
698
|
e != null && /* @__PURE__ */ d("span", { className: "checkbox__text", children: [
|
|
699
699
|
e,
|
|
@@ -704,8 +704,8 @@ function Pt({ label: e, hint: t, className: n, ...a }) {
|
|
|
704
704
|
] })
|
|
705
705
|
] });
|
|
706
706
|
}
|
|
707
|
-
function
|
|
708
|
-
return /* @__PURE__ */ d("label", { className:
|
|
707
|
+
function Rt({ label: e, hint: t, className: n, ...a }) {
|
|
708
|
+
return /* @__PURE__ */ d("label", { className: i("checkbox", "switch", n), children: [
|
|
709
709
|
/* @__PURE__ */ r("input", { type: "checkbox", role: "switch", className: "switch__input", ...a }),
|
|
710
710
|
/* @__PURE__ */ r("span", { className: "switch__track", "aria-hidden": "true", children: /* @__PURE__ */ r("span", { className: "switch__thumb" }) }),
|
|
711
711
|
e != null && /* @__PURE__ */ d("span", { className: "checkbox__text", children: [
|
|
@@ -717,89 +717,89 @@ function Ct({ label: e, hint: t, className: n, ...a }) {
|
|
|
717
717
|
] })
|
|
718
718
|
] });
|
|
719
719
|
}
|
|
720
|
-
function
|
|
721
|
-
return /* @__PURE__ */ r("span", { className:
|
|
720
|
+
function Dt({ className: e, ...t }) {
|
|
721
|
+
return /* @__PURE__ */ r("span", { className: i("chip", e), ...t });
|
|
722
722
|
}
|
|
723
|
-
function
|
|
723
|
+
function Qe({ active: e = !1, className: t, ...n }) {
|
|
724
724
|
return /* @__PURE__ */ r(
|
|
725
725
|
"button",
|
|
726
726
|
{
|
|
727
727
|
type: "button",
|
|
728
|
-
className:
|
|
728
|
+
className: i("choice-card", t),
|
|
729
729
|
"data-active": e,
|
|
730
730
|
...n
|
|
731
731
|
}
|
|
732
732
|
);
|
|
733
733
|
}
|
|
734
734
|
function me({ as: e = "ul", reset: t = !0, className: n, ...a }) {
|
|
735
|
-
return
|
|
736
|
-
className:
|
|
735
|
+
return I(e, {
|
|
736
|
+
className: i(t && "list-reset", n),
|
|
737
737
|
...a
|
|
738
738
|
});
|
|
739
739
|
}
|
|
740
|
-
const
|
|
740
|
+
const et = {
|
|
741
741
|
sm: "",
|
|
742
742
|
md: "skeleton--md",
|
|
743
743
|
pill: "skeleton--pill"
|
|
744
744
|
};
|
|
745
|
-
function
|
|
746
|
-
return
|
|
747
|
-
className:
|
|
745
|
+
function A({ as: e = "div", radius: t = "sm", className: n, ...a }) {
|
|
746
|
+
return I(e, {
|
|
747
|
+
className: i("skeleton", et[t], n),
|
|
748
748
|
"aria-hidden": !0,
|
|
749
749
|
...a
|
|
750
750
|
});
|
|
751
751
|
}
|
|
752
|
-
function
|
|
752
|
+
function tt(e) {
|
|
753
753
|
const { className: t, ...n } = e;
|
|
754
|
-
return /* @__PURE__ */ r(
|
|
754
|
+
return /* @__PURE__ */ r(A, { className: i("skeleton-input", t), ...n });
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function Me(e) {
|
|
757
757
|
const { className: t, ...n } = e;
|
|
758
|
-
return /* @__PURE__ */ r(
|
|
758
|
+
return /* @__PURE__ */ r(A, { className: i("skeleton-btn", t), ...n });
|
|
759
759
|
}
|
|
760
|
-
function
|
|
760
|
+
function It(e) {
|
|
761
761
|
const { className: t, ...n } = e;
|
|
762
|
-
return /* @__PURE__ */ r(
|
|
762
|
+
return /* @__PURE__ */ r(A, { className: i("skeleton-icon-btn", t), ...n });
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function Xt(e) {
|
|
765
765
|
const { className: t, ...n } = e;
|
|
766
|
-
return /* @__PURE__ */ r(
|
|
766
|
+
return /* @__PURE__ */ r(A, { className: i("skeleton-select", t), ...n });
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function Yt(e) {
|
|
769
769
|
const { className: t, ...n } = e;
|
|
770
|
-
return /* @__PURE__ */ r(
|
|
770
|
+
return /* @__PURE__ */ r(A, { className: i("skeleton-textarea", t), ...n });
|
|
771
771
|
}
|
|
772
|
-
function
|
|
772
|
+
function _e(e) {
|
|
773
773
|
const { className: t, ...n } = e;
|
|
774
|
-
return /* @__PURE__ */ r(
|
|
774
|
+
return /* @__PURE__ */ r(A, { className: i("skeleton-thumb", t), ...n });
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function nt(e) {
|
|
777
777
|
const { className: t, ...n } = e;
|
|
778
|
-
return /* @__PURE__ */ r(
|
|
778
|
+
return /* @__PURE__ */ r(A, { radius: "pill", className: i("skeleton-chip", t), ...n });
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function Pe(e) {
|
|
781
781
|
const { className: t, ...n } = e;
|
|
782
|
-
return /* @__PURE__ */ r(
|
|
782
|
+
return /* @__PURE__ */ r(A, { className: i("skeleton-title", t), ...n });
|
|
783
783
|
}
|
|
784
|
-
function
|
|
785
|
-
return /* @__PURE__ */ r(
|
|
784
|
+
function ye({ short: e = !1, className: t, ...n }) {
|
|
785
|
+
return /* @__PURE__ */ r(A, { className: i("skeleton-line", e && "skeleton-line--short", t), ...n });
|
|
786
786
|
}
|
|
787
|
-
function
|
|
787
|
+
function Ft(e) {
|
|
788
788
|
const { className: t, ...n } = e;
|
|
789
|
-
return /* @__PURE__ */ r(
|
|
789
|
+
return /* @__PURE__ */ r(A, { radius: "pill", className: i("skeleton-avatar", t), ...n });
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function Wt(e) {
|
|
792
792
|
const { className: t, ...n } = e;
|
|
793
|
-
return /* @__PURE__ */ r(
|
|
793
|
+
return /* @__PURE__ */ r(A, { className: i("skeleton-canvas", t), ...n });
|
|
794
794
|
}
|
|
795
|
-
function
|
|
795
|
+
function Gt({
|
|
796
796
|
options: e,
|
|
797
797
|
value: t,
|
|
798
798
|
onChange: n,
|
|
799
799
|
className: a
|
|
800
800
|
}) {
|
|
801
|
-
return /* @__PURE__ */ r(me, { className:
|
|
802
|
-
|
|
801
|
+
return /* @__PURE__ */ r(me, { className: i("choice-list", a), children: e.map((s) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
|
|
802
|
+
Qe,
|
|
803
803
|
{
|
|
804
804
|
active: t === s.value,
|
|
805
805
|
onClick: () => n(s.value),
|
|
@@ -812,115 +812,215 @@ function Dt({
|
|
|
812
812
|
}
|
|
813
813
|
) }, s.value)) });
|
|
814
814
|
}
|
|
815
|
-
function
|
|
816
|
-
return /* @__PURE__ */ r(me, { className:
|
|
817
|
-
/* @__PURE__ */ r(
|
|
818
|
-
n ? /* @__PURE__ */ r(
|
|
815
|
+
function Et({ count: e = 4, className: t, withDescription: n = !1 }) {
|
|
816
|
+
return /* @__PURE__ */ r(me, { className: i("choice-list", t), "aria-hidden": !0, children: Array.from({ length: e }).map((a, s) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ d("div", { className: "choice-card", children: [
|
|
817
|
+
/* @__PURE__ */ r(Pe, { className: i("skeleton-title--sm", !n && "skeleton-choice-label") }),
|
|
818
|
+
n ? /* @__PURE__ */ r(ye, { short: !0 }) : null
|
|
819
819
|
] }) }, `choice-skeleton-${s}`)) });
|
|
820
820
|
}
|
|
821
|
-
function
|
|
822
|
-
return /* @__PURE__ */ r("div", { className:
|
|
821
|
+
function Lt({ className: e, ...t }) {
|
|
822
|
+
return /* @__PURE__ */ r("div", { className: i("coord-grid", e), ...t });
|
|
823
823
|
}
|
|
824
|
-
function
|
|
825
|
-
return /* @__PURE__ */ d("label", { className:
|
|
824
|
+
function Ot({ axis: e, className: t, ...n }) {
|
|
825
|
+
return /* @__PURE__ */ d("label", { className: i("coord-input", t), children: [
|
|
826
826
|
e,
|
|
827
827
|
" ",
|
|
828
828
|
/* @__PURE__ */ r("input", { type: "number", step: "0.01", ...n })
|
|
829
829
|
] });
|
|
830
830
|
}
|
|
831
|
-
function
|
|
831
|
+
function $t({ orientation: e = "horizontal", className: t, ...n }) {
|
|
832
832
|
return e === "vertical" ? /* @__PURE__ */ r(
|
|
833
833
|
"span",
|
|
834
834
|
{
|
|
835
835
|
role: "separator",
|
|
836
836
|
"aria-orientation": "vertical",
|
|
837
|
-
className:
|
|
837
|
+
className: i("divider", "divider--vertical", t),
|
|
838
838
|
...n
|
|
839
839
|
}
|
|
840
|
-
) : /* @__PURE__ */ r("hr", { className:
|
|
840
|
+
) : /* @__PURE__ */ r("hr", { className: i("divider", t), ...n });
|
|
841
841
|
}
|
|
842
|
-
|
|
842
|
+
const xe = "button, input, select, textarea, canvas, a, label, audio, video, [contenteditable], [data-wb-nodrag]", ge = /* @__PURE__ */ new Map();
|
|
843
|
+
function At() {
|
|
844
|
+
for (const e of ge.values()) e();
|
|
845
|
+
}
|
|
846
|
+
function rt({
|
|
847
|
+
id: e,
|
|
848
|
+
snap: t = !0,
|
|
849
|
+
persist: n = !0,
|
|
850
|
+
disabled: a = !1,
|
|
851
|
+
className: s,
|
|
852
|
+
style: c,
|
|
853
|
+
children: m,
|
|
854
|
+
...p
|
|
855
|
+
}) {
|
|
856
|
+
const [f, b] = we({ x: 0, y: 0 }), h = P(null), w = `wb-draggable:${e}`;
|
|
857
|
+
F(() => {
|
|
858
|
+
if (n)
|
|
859
|
+
try {
|
|
860
|
+
const N = localStorage.getItem(w);
|
|
861
|
+
if (N) {
|
|
862
|
+
const v = JSON.parse(N);
|
|
863
|
+
Number.isFinite(v == null ? void 0 : v.x) && Number.isFinite(v == null ? void 0 : v.y) && b(v);
|
|
864
|
+
}
|
|
865
|
+
} catch {
|
|
866
|
+
}
|
|
867
|
+
}, [w, n]);
|
|
868
|
+
const y = (N) => {
|
|
869
|
+
if (b(N), !!n)
|
|
870
|
+
try {
|
|
871
|
+
N.x === 0 && N.y === 0 ? localStorage.removeItem(w) : localStorage.setItem(w, JSON.stringify(N));
|
|
872
|
+
} catch {
|
|
873
|
+
}
|
|
874
|
+
};
|
|
875
|
+
F(() => {
|
|
876
|
+
const N = () => y({ x: 0, y: 0 });
|
|
877
|
+
ge.set(e, N);
|
|
878
|
+
const v = () => {
|
|
879
|
+
b((T) => ({
|
|
880
|
+
x: Math.round(T.x / G) * G,
|
|
881
|
+
y: Math.round(T.y / G) * G
|
|
882
|
+
}));
|
|
883
|
+
};
|
|
884
|
+
return window.addEventListener("whiteboard-snap-now", v), () => {
|
|
885
|
+
ge.delete(e), window.removeEventListener("whiteboard-snap-now", v);
|
|
886
|
+
};
|
|
887
|
+
}, [e, w]);
|
|
888
|
+
const z = (N) => {
|
|
889
|
+
var v, T;
|
|
890
|
+
a || N.button !== 0 || N.target.closest(xe) || (h.current = { sx: N.clientX, sy: N.clientY, bx: f.x, by: f.y }, (T = (v = N.currentTarget).setPointerCapture) == null || T.call(v, N.pointerId));
|
|
891
|
+
}, x = (N) => {
|
|
892
|
+
const v = h.current;
|
|
893
|
+
v && b({ x: v.bx + (N.clientX - v.sx), y: v.by + (N.clientY - v.sy) });
|
|
894
|
+
}, C = () => {
|
|
895
|
+
h.current && (h.current = null, b((v) => {
|
|
896
|
+
const T = t ? {
|
|
897
|
+
x: Math.round(v.x / G) * G,
|
|
898
|
+
y: Math.round(v.y / G) * G
|
|
899
|
+
} : v;
|
|
900
|
+
if (n)
|
|
901
|
+
try {
|
|
902
|
+
T.x === 0 && T.y === 0 ? localStorage.removeItem(w) : localStorage.setItem(w, JSON.stringify(T));
|
|
903
|
+
} catch {
|
|
904
|
+
}
|
|
905
|
+
return T;
|
|
906
|
+
}));
|
|
907
|
+
}, L = (N) => {
|
|
908
|
+
N.target.closest(xe) || y({ x: 0, y: 0 });
|
|
909
|
+
};
|
|
910
|
+
return /* @__PURE__ */ r(
|
|
911
|
+
"div",
|
|
912
|
+
{
|
|
913
|
+
className: i("draggable", a && "draggable--disabled", s),
|
|
914
|
+
style: {
|
|
915
|
+
...c,
|
|
916
|
+
transform: `translate(${f.x}px, ${f.y}px)`
|
|
917
|
+
},
|
|
918
|
+
onPointerDown: z,
|
|
919
|
+
onPointerMove: x,
|
|
920
|
+
onPointerUp: C,
|
|
921
|
+
onPointerCancel: C,
|
|
922
|
+
onDoubleClick: L,
|
|
923
|
+
...p,
|
|
924
|
+
children: m
|
|
925
|
+
}
|
|
926
|
+
);
|
|
927
|
+
}
|
|
928
|
+
function Bt({ padding: e = "md", className: t, ...n }) {
|
|
929
|
+
return /* @__PURE__ */ r(
|
|
930
|
+
rt,
|
|
931
|
+
{
|
|
932
|
+
className: i(
|
|
933
|
+
"surface",
|
|
934
|
+
e === "sm" && "surface--pad-sm",
|
|
935
|
+
e === "none" && "surface--pad-none",
|
|
936
|
+
t
|
|
937
|
+
),
|
|
938
|
+
...n
|
|
939
|
+
}
|
|
940
|
+
);
|
|
941
|
+
}
|
|
942
|
+
function fe({
|
|
843
943
|
as: e,
|
|
844
944
|
size: t = "md",
|
|
845
945
|
className: n,
|
|
846
946
|
...a
|
|
847
947
|
}) {
|
|
848
|
-
return
|
|
849
|
-
className:
|
|
948
|
+
return I(e ?? "div", {
|
|
949
|
+
className: i(t === "sm" ? "panel-stack-sm" : "panel-stack", n),
|
|
850
950
|
...a
|
|
851
951
|
});
|
|
852
952
|
}
|
|
853
|
-
const
|
|
953
|
+
const at = {
|
|
854
954
|
xs: "text-xs",
|
|
855
955
|
sm: "text-sm",
|
|
856
956
|
md: ""
|
|
857
957
|
};
|
|
858
|
-
function
|
|
859
|
-
return
|
|
860
|
-
className:
|
|
958
|
+
function st({ as: e = "p", clamp: t = !1, className: n, ...a }) {
|
|
959
|
+
return I(e, {
|
|
960
|
+
className: i("card-title", t && "card-title--clamp", n),
|
|
861
961
|
...a
|
|
862
962
|
});
|
|
863
963
|
}
|
|
864
|
-
function
|
|
865
|
-
return
|
|
866
|
-
className:
|
|
964
|
+
function Ht({ as: e = "h1", className: t, ...n }) {
|
|
965
|
+
return I(e, {
|
|
966
|
+
className: i("page-title", t),
|
|
867
967
|
...n
|
|
868
968
|
});
|
|
869
969
|
}
|
|
870
|
-
function
|
|
871
|
-
return
|
|
872
|
-
className:
|
|
970
|
+
function ot({ as: e = "span", className: t, ...n }) {
|
|
971
|
+
return I(e, {
|
|
972
|
+
className: i("widget-section__title", t),
|
|
873
973
|
...n
|
|
874
974
|
});
|
|
875
975
|
}
|
|
876
|
-
function
|
|
877
|
-
return
|
|
878
|
-
className:
|
|
976
|
+
function it({ as: e = "p", className: t, ...n }) {
|
|
977
|
+
return I(e, {
|
|
978
|
+
className: i("widget-section__description", t),
|
|
879
979
|
...n
|
|
880
980
|
});
|
|
881
981
|
}
|
|
882
|
-
function
|
|
883
|
-
return
|
|
884
|
-
className:
|
|
982
|
+
function Ce({ as: e = "p", size: t = "sm", className: n, ...a }) {
|
|
983
|
+
return I(e, {
|
|
984
|
+
className: i(at[t], "text-muted", n),
|
|
885
985
|
...a
|
|
886
986
|
});
|
|
887
987
|
}
|
|
888
|
-
function
|
|
889
|
-
return /* @__PURE__ */ d(
|
|
890
|
-
/* @__PURE__ */ r(
|
|
891
|
-
t ? /* @__PURE__ */ r(
|
|
988
|
+
function Vt({ title: e, description: t, action: n }) {
|
|
989
|
+
return /* @__PURE__ */ d(fe, { size: "sm", children: [
|
|
990
|
+
/* @__PURE__ */ r(st, { children: e }),
|
|
991
|
+
t ? /* @__PURE__ */ r(Ce, { children: t }) : null,
|
|
892
992
|
n
|
|
893
993
|
] });
|
|
894
994
|
}
|
|
895
|
-
function
|
|
896
|
-
return /* @__PURE__ */ r("label", { className:
|
|
995
|
+
function ct({ className: e, ...t }) {
|
|
996
|
+
return /* @__PURE__ */ r("label", { className: i("widget-label", e), ...t });
|
|
897
997
|
}
|
|
898
|
-
function
|
|
998
|
+
function lt({
|
|
899
999
|
as: e,
|
|
900
1000
|
label: t,
|
|
901
1001
|
htmlFor: n,
|
|
902
1002
|
hint: a,
|
|
903
1003
|
error: s,
|
|
904
|
-
layout:
|
|
905
|
-
className:
|
|
1004
|
+
layout: c = "stack",
|
|
1005
|
+
className: m,
|
|
906
1006
|
children: p,
|
|
907
1007
|
...f
|
|
908
1008
|
}) {
|
|
909
|
-
return
|
|
1009
|
+
return I(
|
|
910
1010
|
e ?? "div",
|
|
911
1011
|
{
|
|
912
|
-
className:
|
|
1012
|
+
className: i(c === "control" ? "widget-control" : "panel-stack-sm", m),
|
|
913
1013
|
...f
|
|
914
1014
|
},
|
|
915
|
-
/* @__PURE__ */ d(
|
|
916
|
-
t ? /* @__PURE__ */ r(
|
|
1015
|
+
/* @__PURE__ */ d(ne, { children: [
|
|
1016
|
+
t ? /* @__PURE__ */ r(ct, { htmlFor: n, children: t }) : null,
|
|
917
1017
|
p,
|
|
918
|
-
a ? /* @__PURE__ */ r(
|
|
1018
|
+
a ? /* @__PURE__ */ r(Ce, { size: "xs", children: a }) : null,
|
|
919
1019
|
s ? /* @__PURE__ */ r("p", { className: "field-error", children: s }) : null
|
|
920
1020
|
] })
|
|
921
1021
|
);
|
|
922
1022
|
}
|
|
923
|
-
function
|
|
1023
|
+
function jt({ isGenerating: e, children: t, message: n }) {
|
|
924
1024
|
return /* @__PURE__ */ d("div", { className: "generating-overlay-wrap", children: [
|
|
925
1025
|
t,
|
|
926
1026
|
e && /* @__PURE__ */ d("div", { className: "generating-overlay", "aria-live": "polite", children: [
|
|
@@ -929,31 +1029,31 @@ function At({ isGenerating: e, children: t, message: n }) {
|
|
|
929
1029
|
] })
|
|
930
1030
|
] });
|
|
931
1031
|
}
|
|
932
|
-
function
|
|
933
|
-
return
|
|
1032
|
+
function Zt({ as: e = "span", icon: t, className: n, children: a, ...s }) {
|
|
1033
|
+
return I(
|
|
934
1034
|
e,
|
|
935
1035
|
{
|
|
936
|
-
className:
|
|
1036
|
+
className: i("inline-row", n),
|
|
937
1037
|
...s
|
|
938
1038
|
},
|
|
939
|
-
/* @__PURE__ */ d(
|
|
1039
|
+
/* @__PURE__ */ d(ne, { children: [
|
|
940
1040
|
t,
|
|
941
1041
|
a
|
|
942
1042
|
] })
|
|
943
1043
|
);
|
|
944
1044
|
}
|
|
945
|
-
function
|
|
1045
|
+
function Ut({
|
|
946
1046
|
src: e,
|
|
947
1047
|
alt: t,
|
|
948
1048
|
placeholder: n = "No image",
|
|
949
1049
|
size: a = "md",
|
|
950
1050
|
fit: s = "contain",
|
|
951
|
-
onImageError:
|
|
952
|
-
className:
|
|
1051
|
+
onImageError: c,
|
|
1052
|
+
className: m,
|
|
953
1053
|
...p
|
|
954
1054
|
}) {
|
|
955
|
-
const [f,
|
|
956
|
-
return /* @__PURE__ */ r("div", { className:
|
|
1055
|
+
const [f, b] = we(null), h = !!(e && f === e), w = i("image-thumb", `image-thumb--${a}`, `image-thumb--fit-${s}`, m);
|
|
1056
|
+
return /* @__PURE__ */ r("div", { className: w, ...p, children: e && !h ? /* @__PURE__ */ r(
|
|
957
1057
|
"img",
|
|
958
1058
|
{
|
|
959
1059
|
src: e,
|
|
@@ -961,162 +1061,162 @@ function Bt({
|
|
|
961
1061
|
className: "image-thumb__img",
|
|
962
1062
|
style: { objectFit: s, objectPosition: "center" },
|
|
963
1063
|
onError: () => {
|
|
964
|
-
|
|
1064
|
+
b(e), c == null || c();
|
|
965
1065
|
}
|
|
966
1066
|
}
|
|
967
1067
|
) : /* @__PURE__ */ r("span", { className: "image-thumb__placeholder", children: n }) });
|
|
968
1068
|
}
|
|
969
|
-
function
|
|
1069
|
+
function qt({
|
|
970
1070
|
as: e,
|
|
971
1071
|
justify: t = "start",
|
|
972
1072
|
className: n,
|
|
973
1073
|
...a
|
|
974
1074
|
}) {
|
|
975
|
-
return
|
|
976
|
-
className:
|
|
1075
|
+
return I(e ?? "div", {
|
|
1076
|
+
className: i(t === "between" ? "space-between" : t === "end" ? "space-end" : "inline-row", n),
|
|
977
1077
|
...a
|
|
978
1078
|
});
|
|
979
1079
|
}
|
|
980
|
-
const
|
|
981
|
-
return /* @__PURE__ */ r("input", { ref: a, className:
|
|
1080
|
+
const ut = de(function({ className: t, ...n }, a) {
|
|
1081
|
+
return /* @__PURE__ */ r("input", { ref: a, className: i(t), ...n });
|
|
982
1082
|
});
|
|
983
|
-
function
|
|
984
|
-
return
|
|
985
|
-
className:
|
|
1083
|
+
function dt({ as: e = "div", className: t, ...n }) {
|
|
1084
|
+
return I(e, {
|
|
1085
|
+
className: i("item-card", t),
|
|
986
1086
|
...n
|
|
987
1087
|
});
|
|
988
1088
|
}
|
|
989
|
-
function
|
|
990
|
-
return /* @__PURE__ */ r("kbd", { className:
|
|
1089
|
+
function Jt({ className: e, ...t }) {
|
|
1090
|
+
return /* @__PURE__ */ r("kbd", { className: i("kbd", e), ...t });
|
|
991
1091
|
}
|
|
992
|
-
function
|
|
993
|
-
return
|
|
994
|
-
className:
|
|
1092
|
+
function Kt({ as: e = "div", className: t, ...n }) {
|
|
1093
|
+
return I(e, {
|
|
1094
|
+
className: i("item-list", t),
|
|
995
1095
|
...n
|
|
996
1096
|
});
|
|
997
1097
|
}
|
|
998
|
-
function
|
|
999
|
-
return /* @__PURE__ */ d("span", { className:
|
|
1098
|
+
function Qt({ label: e = "Loading...", className: t }) {
|
|
1099
|
+
return /* @__PURE__ */ d("span", { className: i("status-inline", t), children: [
|
|
1000
1100
|
/* @__PURE__ */ r(he, { size: 14, className: "icon-spin" }),
|
|
1001
1101
|
e
|
|
1002
1102
|
] });
|
|
1003
1103
|
}
|
|
1004
|
-
function
|
|
1104
|
+
function en({
|
|
1005
1105
|
label: e,
|
|
1006
1106
|
hint: t,
|
|
1007
1107
|
value: n,
|
|
1008
1108
|
onChange: a,
|
|
1009
1109
|
min: s,
|
|
1010
|
-
max:
|
|
1011
|
-
step:
|
|
1110
|
+
max: c,
|
|
1111
|
+
step: m,
|
|
1012
1112
|
id: p,
|
|
1013
1113
|
className: f,
|
|
1014
|
-
...
|
|
1114
|
+
...b
|
|
1015
1115
|
}) {
|
|
1016
|
-
const
|
|
1017
|
-
let
|
|
1018
|
-
return s !== void 0 && (
|
|
1116
|
+
const h = (w) => {
|
|
1117
|
+
let y = w;
|
|
1118
|
+
return s !== void 0 && (y = Math.max(Number(s), y)), c !== void 0 && (y = Math.min(Number(c), y)), y;
|
|
1019
1119
|
};
|
|
1020
|
-
return /* @__PURE__ */ r(
|
|
1021
|
-
|
|
1120
|
+
return /* @__PURE__ */ r(lt, { label: e, hint: t, htmlFor: p, className: i(f), children: /* @__PURE__ */ r(
|
|
1121
|
+
ut,
|
|
1022
1122
|
{
|
|
1023
1123
|
id: p,
|
|
1024
1124
|
type: "number",
|
|
1025
1125
|
inputMode: "decimal",
|
|
1026
1126
|
min: s,
|
|
1027
|
-
max:
|
|
1028
|
-
step:
|
|
1127
|
+
max: c,
|
|
1128
|
+
step: m,
|
|
1029
1129
|
value: n,
|
|
1030
|
-
onChange: (
|
|
1031
|
-
const
|
|
1032
|
-
Number.isFinite(
|
|
1130
|
+
onChange: (w) => {
|
|
1131
|
+
const y = Number(w.target.value);
|
|
1132
|
+
Number.isFinite(y) && a(h(y));
|
|
1033
1133
|
},
|
|
1034
|
-
...
|
|
1134
|
+
...b
|
|
1035
1135
|
}
|
|
1036
1136
|
) });
|
|
1037
1137
|
}
|
|
1038
|
-
function
|
|
1138
|
+
function tn({
|
|
1039
1139
|
className: e,
|
|
1040
1140
|
placement: t,
|
|
1041
1141
|
onPointerDown: n,
|
|
1042
1142
|
onWheel: a,
|
|
1043
1143
|
onContextMenu: s,
|
|
1044
|
-
...
|
|
1144
|
+
...c
|
|
1045
1145
|
}) {
|
|
1046
1146
|
return /* @__PURE__ */ r(
|
|
1047
|
-
|
|
1147
|
+
ke,
|
|
1048
1148
|
{
|
|
1049
1149
|
variant: "secondary",
|
|
1050
1150
|
iconOnly: !0,
|
|
1051
|
-
className:
|
|
1052
|
-
onPointerDown: (
|
|
1053
|
-
|
|
1151
|
+
className: i("overlay-icon-btn", t && `overlay-icon-btn--${t}`, e),
|
|
1152
|
+
onPointerDown: (m) => {
|
|
1153
|
+
m.stopPropagation(), n == null || n(m);
|
|
1054
1154
|
},
|
|
1055
|
-
onWheel: (
|
|
1056
|
-
|
|
1155
|
+
onWheel: (m) => {
|
|
1156
|
+
m.stopPropagation(), a == null || a(m);
|
|
1057
1157
|
},
|
|
1058
|
-
onContextMenu: (
|
|
1059
|
-
|
|
1158
|
+
onContextMenu: (m) => {
|
|
1159
|
+
m.stopPropagation(), s == null || s(m);
|
|
1060
1160
|
},
|
|
1061
|
-
...
|
|
1161
|
+
...c
|
|
1062
1162
|
}
|
|
1063
1163
|
);
|
|
1064
1164
|
}
|
|
1065
|
-
function
|
|
1066
|
-
return /* @__PURE__ */ r("main", { className:
|
|
1165
|
+
function nn({ children: e, className: t, ...n }) {
|
|
1166
|
+
return /* @__PURE__ */ r("main", { className: i("page-shell", t), ...n, children: e });
|
|
1067
1167
|
}
|
|
1068
|
-
function
|
|
1069
|
-
return /* @__PURE__ */ r("div", { className:
|
|
1168
|
+
function rn({ children: e, className: t, ...n }) {
|
|
1169
|
+
return /* @__PURE__ */ r("div", { className: i("page-card", t), ...n, children: e });
|
|
1070
1170
|
}
|
|
1071
|
-
function
|
|
1072
|
-
return /* @__PURE__ */ d(
|
|
1073
|
-
/* @__PURE__ */ r(
|
|
1171
|
+
function an({ onClick: e, label: t = "Close" }) {
|
|
1172
|
+
return /* @__PURE__ */ d(ke, { variant: "secondary", className: "panel-close-btn", onClick: e, children: [
|
|
1173
|
+
/* @__PURE__ */ r(Se, { size: 14 }),
|
|
1074
1174
|
t
|
|
1075
1175
|
] });
|
|
1076
1176
|
}
|
|
1077
|
-
function
|
|
1078
|
-
return /* @__PURE__ */ d("section", { className:
|
|
1177
|
+
function sn({ heading: e, description: t, actions: n, className: a, children: s, ...c }) {
|
|
1178
|
+
return /* @__PURE__ */ d("section", { className: i("widget-section", a), ...c, children: [
|
|
1079
1179
|
e || n ? /* @__PURE__ */ d("header", { className: n ? "title-row" : void 0, children: [
|
|
1080
|
-
e ? /* @__PURE__ */ r(
|
|
1180
|
+
e ? /* @__PURE__ */ r(ot, { children: e }) : null,
|
|
1081
1181
|
n
|
|
1082
1182
|
] }) : null,
|
|
1083
|
-
t ? /* @__PURE__ */ r(
|
|
1183
|
+
t ? /* @__PURE__ */ r(it, { children: t }) : null,
|
|
1084
1184
|
s
|
|
1085
1185
|
] });
|
|
1086
1186
|
}
|
|
1087
|
-
function
|
|
1187
|
+
function on({ icon: e, label: t }) {
|
|
1088
1188
|
return /* @__PURE__ */ d("span", { className: "panel-title-with-icon", children: [
|
|
1089
1189
|
/* @__PURE__ */ r(e, { size: 13, className: "panel-title-icon" }),
|
|
1090
1190
|
/* @__PURE__ */ r("span", { children: t })
|
|
1091
1191
|
] });
|
|
1092
1192
|
}
|
|
1093
|
-
function
|
|
1094
|
-
return
|
|
1095
|
-
className:
|
|
1193
|
+
function ht({ as: e = "button", className: t, ...n }) {
|
|
1194
|
+
return I(e, {
|
|
1195
|
+
className: i("picker-card", t),
|
|
1096
1196
|
...n
|
|
1097
1197
|
});
|
|
1098
1198
|
}
|
|
1099
|
-
function
|
|
1199
|
+
function cn({ minItemWidth: e = 120, className: t, style: n, ...a }) {
|
|
1100
1200
|
const s = {
|
|
1101
1201
|
gridTemplateColumns: `repeat(auto-fill, minmax(${e}px, 1fr))`,
|
|
1102
1202
|
...n
|
|
1103
1203
|
};
|
|
1104
|
-
return /* @__PURE__ */ r(me, { className:
|
|
1204
|
+
return /* @__PURE__ */ r(me, { className: i("picker-grid", t), style: s, ...a });
|
|
1105
1205
|
}
|
|
1106
|
-
const
|
|
1206
|
+
const mt = {
|
|
1107
1207
|
default: "",
|
|
1108
1208
|
success: "success",
|
|
1109
1209
|
warning: "warning",
|
|
1110
1210
|
danger: "danger"
|
|
1111
1211
|
};
|
|
1112
|
-
function
|
|
1113
|
-
return /* @__PURE__ */ r("span", { className:
|
|
1212
|
+
function ln({ tone: e = "default", className: t, ...n }) {
|
|
1213
|
+
return /* @__PURE__ */ r("span", { className: i("pill", mt[e], t), ...n });
|
|
1114
1214
|
}
|
|
1115
|
-
const
|
|
1116
|
-
return /* @__PURE__ */ r("select", { ref: a, className:
|
|
1215
|
+
const un = de(function({ className: t, ...n }, a) {
|
|
1216
|
+
return /* @__PURE__ */ r("select", { ref: a, className: i(t), ...n });
|
|
1117
1217
|
});
|
|
1118
|
-
function
|
|
1119
|
-
return /* @__PURE__ */ d("div", { className:
|
|
1218
|
+
function dn({ label: e, display: t, value: n, onChange: a, className: s, ...c }) {
|
|
1219
|
+
return /* @__PURE__ */ d("div", { className: i("slider", s), children: [
|
|
1120
1220
|
(e != null || t != null) && /* @__PURE__ */ d("div", { className: "slider__head", children: [
|
|
1121
1221
|
/* @__PURE__ */ r("span", { className: "widget-label", children: e }),
|
|
1122
1222
|
/* @__PURE__ */ r("span", { className: "slider__value", children: t ?? n })
|
|
@@ -1127,23 +1227,23 @@ function sn({ label: e, display: t, value: n, onChange: a, className: s, ...l })
|
|
|
1127
1227
|
type: "range",
|
|
1128
1228
|
className: "slider__input",
|
|
1129
1229
|
value: n,
|
|
1130
|
-
onChange: (
|
|
1131
|
-
...
|
|
1230
|
+
onChange: (m) => a(Number(m.target.value)),
|
|
1231
|
+
...c
|
|
1132
1232
|
}
|
|
1133
1233
|
)
|
|
1134
1234
|
] });
|
|
1135
1235
|
}
|
|
1136
|
-
const
|
|
1236
|
+
const ft = {
|
|
1137
1237
|
"media-content": "split-layout--media-content",
|
|
1138
1238
|
single: "split-layout--single",
|
|
1139
1239
|
"media-content-actions": "split-layout--media-content-actions"
|
|
1140
1240
|
};
|
|
1141
|
-
function
|
|
1142
|
-
return /* @__PURE__ */ r("div", { className:
|
|
1241
|
+
function hn({ variant: e, className: t, ...n }) {
|
|
1242
|
+
return /* @__PURE__ */ r("div", { className: i("split-layout", ft[e], t), ...n });
|
|
1143
1243
|
}
|
|
1144
|
-
function
|
|
1145
|
-
return
|
|
1146
|
-
className:
|
|
1244
|
+
function mn({ as: e, padding: t = "md", className: n, ...a }) {
|
|
1245
|
+
return I(e ?? "div", {
|
|
1246
|
+
className: i(
|
|
1147
1247
|
"surface",
|
|
1148
1248
|
t === "sm" && "surface--pad-sm",
|
|
1149
1249
|
t === "none" && "surface--pad-none",
|
|
@@ -1152,30 +1252,30 @@ function cn({ as: e, padding: t = "md", className: n, ...a }) {
|
|
|
1152
1252
|
...a
|
|
1153
1253
|
});
|
|
1154
1254
|
}
|
|
1155
|
-
function
|
|
1156
|
-
return /* @__PURE__ */ r("div", { className:
|
|
1255
|
+
function pt({ className: e, ...t }) {
|
|
1256
|
+
return /* @__PURE__ */ r("div", { className: i("tag-row", e), ...t });
|
|
1157
1257
|
}
|
|
1158
|
-
const
|
|
1159
|
-
return /* @__PURE__ */ r("textarea", { ref: a, className:
|
|
1258
|
+
const fn = de(function({ className: t, ...n }, a) {
|
|
1259
|
+
return /* @__PURE__ */ r("textarea", { ref: a, className: i(t), ...n });
|
|
1160
1260
|
});
|
|
1161
|
-
function
|
|
1261
|
+
function pn({ className: e, theme: t = "light", onToggle: n, lightIcon: a, darkIcon: s }) {
|
|
1162
1262
|
return /* @__PURE__ */ r(
|
|
1163
1263
|
"button",
|
|
1164
1264
|
{
|
|
1165
1265
|
type: "button",
|
|
1166
|
-
className:
|
|
1266
|
+
className: i("wb-btn", "wb-btn--secondary", "wb-btn--icon-only", e),
|
|
1167
1267
|
onClick: n,
|
|
1168
1268
|
title: `Switch to ${t === "light" ? "dark" : "light"} mode`,
|
|
1169
1269
|
"aria-label": "Toggle theme",
|
|
1170
|
-
children: t === "light" ? s ?? /* @__PURE__ */ r(
|
|
1270
|
+
children: t === "light" ? s ?? /* @__PURE__ */ r(He, { size: 14 }) : a ?? /* @__PURE__ */ r(Ve, { size: 14 })
|
|
1171
1271
|
}
|
|
1172
1272
|
);
|
|
1173
1273
|
}
|
|
1174
|
-
function
|
|
1274
|
+
function bn({ children: e, end: t, position: n = "top", className: a, ...s }) {
|
|
1175
1275
|
return /* @__PURE__ */ d(
|
|
1176
1276
|
"nav",
|
|
1177
1277
|
{
|
|
1178
|
-
className:
|
|
1278
|
+
className: i(
|
|
1179
1279
|
"toolbar",
|
|
1180
1280
|
n === "bottom" && "toolbar--bottom",
|
|
1181
1281
|
n === "static" && "toolbar--static",
|
|
@@ -1189,11 +1289,11 @@ function dn({ children: e, end: t, position: n = "top", className: a, ...s }) {
|
|
|
1189
1289
|
}
|
|
1190
1290
|
);
|
|
1191
1291
|
}
|
|
1192
|
-
function
|
|
1292
|
+
function gn({ label: e, placement: t = "top", className: n, children: a, ...s }) {
|
|
1193
1293
|
return /* @__PURE__ */ d(
|
|
1194
1294
|
"span",
|
|
1195
1295
|
{
|
|
1196
|
-
className:
|
|
1296
|
+
className: i("tooltip", t === "bottom" && "tooltip--bottom", n),
|
|
1197
1297
|
...s,
|
|
1198
1298
|
children: [
|
|
1199
1299
|
a,
|
|
@@ -1202,10 +1302,10 @@ function hn({ label: e, placement: t = "top", className: n, children: a, ...s })
|
|
|
1202
1302
|
}
|
|
1203
1303
|
);
|
|
1204
1304
|
}
|
|
1205
|
-
function
|
|
1206
|
-
return /* @__PURE__ */ r("div", { className:
|
|
1305
|
+
function wn({ className: e, ...t }) {
|
|
1306
|
+
return /* @__PURE__ */ r("div", { className: i("title-row", e), ...t });
|
|
1207
1307
|
}
|
|
1208
|
-
function
|
|
1308
|
+
function yn({
|
|
1209
1309
|
children: e,
|
|
1210
1310
|
bottom: t,
|
|
1211
1311
|
position: n = "left",
|
|
@@ -1215,7 +1315,7 @@ function pn({
|
|
|
1215
1315
|
return /* @__PURE__ */ d(
|
|
1216
1316
|
"nav",
|
|
1217
1317
|
{
|
|
1218
|
-
className:
|
|
1318
|
+
className: i(
|
|
1219
1319
|
"vertical-toolbar",
|
|
1220
1320
|
n === "right" && "vertical-toolbar--right",
|
|
1221
1321
|
n === "static" && "vertical-toolbar--static",
|
|
@@ -1229,125 +1329,128 @@ function pn({
|
|
|
1229
1329
|
}
|
|
1230
1330
|
);
|
|
1231
1331
|
}
|
|
1232
|
-
function
|
|
1233
|
-
return /* @__PURE__ */ d(
|
|
1234
|
-
Array.from({ length: e }).map((s,
|
|
1235
|
-
t && /* @__PURE__ */ r(
|
|
1332
|
+
function vn({ inputs: e = 1, showButton: t = !0, className: n, ...a }) {
|
|
1333
|
+
return /* @__PURE__ */ d(fe, { className: n, ...a, children: [
|
|
1334
|
+
Array.from({ length: e }).map((s, c) => /* @__PURE__ */ r(tt, {}, `panel-form-input-${c}`)),
|
|
1335
|
+
t && /* @__PURE__ */ r(Me, {})
|
|
1236
1336
|
] });
|
|
1237
1337
|
}
|
|
1238
|
-
function
|
|
1338
|
+
function Nn({
|
|
1239
1339
|
withThumb: e = !0,
|
|
1240
1340
|
chipCount: t = 0,
|
|
1241
1341
|
actionCount: n = 0,
|
|
1242
1342
|
className: a,
|
|
1243
1343
|
...s
|
|
1244
1344
|
}) {
|
|
1245
|
-
return /* @__PURE__ */ d(
|
|
1246
|
-
/* @__PURE__ */ d(
|
|
1247
|
-
e ? /* @__PURE__ */ r(
|
|
1248
|
-
t > 0 ? /* @__PURE__ */ r(
|
|
1249
|
-
/* @__PURE__ */ r(
|
|
1250
|
-
/* @__PURE__ */ r(
|
|
1345
|
+
return /* @__PURE__ */ d(dt, { as: "li", className: a, ...s, children: [
|
|
1346
|
+
/* @__PURE__ */ d(fe, { size: "sm", children: [
|
|
1347
|
+
e ? /* @__PURE__ */ r(_e, {}) : null,
|
|
1348
|
+
t > 0 ? /* @__PURE__ */ r(pt, { children: Array.from({ length: t }).map((c, m) => /* @__PURE__ */ r(nt, {}, `card-skeleton-chip-${m}`)) }) : null,
|
|
1349
|
+
/* @__PURE__ */ r(Pe, {}),
|
|
1350
|
+
/* @__PURE__ */ r(ye, { short: !0 })
|
|
1251
1351
|
] }),
|
|
1252
|
-
n > 0 ? /* @__PURE__ */ r(
|
|
1352
|
+
n > 0 ? /* @__PURE__ */ r(Ke, { children: Array.from({ length: n }).map((c, m) => /* @__PURE__ */ r(Me, {}, `card-skeleton-btn-${m}`)) }) : null
|
|
1253
1353
|
] });
|
|
1254
1354
|
}
|
|
1255
|
-
function
|
|
1355
|
+
function xn({ count: e = 8, minItemWidth: t = 120 }) {
|
|
1256
1356
|
return /* @__PURE__ */ r(
|
|
1257
1357
|
me,
|
|
1258
1358
|
{
|
|
1259
1359
|
className: "picker-grid",
|
|
1260
1360
|
style: { gridTemplateColumns: `repeat(auto-fill, minmax(${t}px, 1fr))` },
|
|
1261
|
-
children: Array.from({ length: e }).map((n, a) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
|
|
1262
|
-
/* @__PURE__ */ r(
|
|
1263
|
-
/* @__PURE__ */ r(
|
|
1361
|
+
children: Array.from({ length: e }).map((n, a) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(ht, { as: "div", className: "picker-card--skeleton", children: /* @__PURE__ */ d(fe, { size: "sm", children: [
|
|
1362
|
+
/* @__PURE__ */ r(_e, {}),
|
|
1363
|
+
/* @__PURE__ */ r(ye, { short: !0 })
|
|
1264
1364
|
] }) }) }, `picker-skeleton-${a}`))
|
|
1265
1365
|
}
|
|
1266
1366
|
);
|
|
1267
1367
|
}
|
|
1268
1368
|
export {
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1369
|
+
Pt as Alert,
|
|
1370
|
+
Ct as AvatarBadge,
|
|
1371
|
+
Ft as AvatarSkeleton,
|
|
1372
|
+
ke as Button,
|
|
1373
|
+
Ke as ButtonRow,
|
|
1374
|
+
Me as ButtonSkeleton,
|
|
1375
|
+
Wt as CanvasSkeleton,
|
|
1376
|
+
zt as CanvasStage,
|
|
1377
|
+
Nn as CardSkeleton,
|
|
1378
|
+
st as CardTitle,
|
|
1379
|
+
Tt as Checkbox,
|
|
1380
|
+
Dt as Chip,
|
|
1381
|
+
nt as ChipSkeleton,
|
|
1382
|
+
Qe as ChoiceCard,
|
|
1383
|
+
Gt as ChoiceGroup,
|
|
1384
|
+
Et as ChoiceGroupSkeleton,
|
|
1385
|
+
kt as ConfirmDialog,
|
|
1386
|
+
Lt as CoordGrid,
|
|
1387
|
+
Ot as CoordInput,
|
|
1388
|
+
$t as Divider,
|
|
1389
|
+
rt as Draggable,
|
|
1390
|
+
Bt as DraggableSurface,
|
|
1391
|
+
Vt as EmptyState,
|
|
1392
|
+
lt as Field,
|
|
1393
|
+
Nt as FloatingPanel,
|
|
1394
|
+
jt as GeneratingOverlay,
|
|
1395
|
+
It as IconButtonSkeleton,
|
|
1396
|
+
Zt as IconText,
|
|
1397
|
+
Ut as ImageThumb,
|
|
1398
|
+
qt as Inline,
|
|
1399
|
+
ut as Input,
|
|
1400
|
+
tt as InputSkeleton,
|
|
1401
|
+
dt as ItemCard,
|
|
1402
|
+
Kt as ItemList,
|
|
1403
|
+
Jt as Kbd,
|
|
1404
|
+
ct as Label,
|
|
1405
|
+
ye as LineSkeleton,
|
|
1304
1406
|
me as List,
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1407
|
+
Qt as LoadingState,
|
|
1408
|
+
Ue as Minimap,
|
|
1409
|
+
Ce as MutedText,
|
|
1410
|
+
en as NumberField,
|
|
1411
|
+
tn as OverlayIconButton,
|
|
1412
|
+
rn as PageCard,
|
|
1413
|
+
nn as PageShell,
|
|
1414
|
+
Ht as PageTitle,
|
|
1415
|
+
an as PanelCloseButton,
|
|
1416
|
+
Mt as PanelErrorBoundary,
|
|
1417
|
+
vn as PanelFormSkeleton,
|
|
1418
|
+
sn as PanelSection,
|
|
1419
|
+
on as PanelTitle,
|
|
1420
|
+
ht as PickerCard,
|
|
1421
|
+
cn as PickerGrid,
|
|
1422
|
+
xn as PickerGridSkeleton,
|
|
1423
|
+
ln as Pill,
|
|
1424
|
+
it as SectionDescription,
|
|
1425
|
+
ot as SectionTitle,
|
|
1426
|
+
un as Select,
|
|
1427
|
+
Xt as SelectSkeleton,
|
|
1428
|
+
A as Skeleton,
|
|
1429
|
+
dn as Slider,
|
|
1430
|
+
hn as SplitLayout,
|
|
1431
|
+
fe as Stack,
|
|
1432
|
+
mn as Surface,
|
|
1433
|
+
Rt as Switch,
|
|
1434
|
+
pt as TagRow,
|
|
1435
|
+
fn as Textarea,
|
|
1436
|
+
Yt as TextareaSkeleton,
|
|
1437
|
+
pn as ThemeToggle,
|
|
1438
|
+
_e as ThumbSkeleton,
|
|
1439
|
+
wn as TitleRow,
|
|
1440
|
+
Pe as TitleSkeleton,
|
|
1441
|
+
bn as Toolbar,
|
|
1442
|
+
gn as Tooltip,
|
|
1443
|
+
yn as VerticalToolbar,
|
|
1444
|
+
G as WHITEBOARD_GRID,
|
|
1445
|
+
vt as WhiteboardShell,
|
|
1446
|
+
Ze as ZoomBar,
|
|
1447
|
+
St as belowPanel,
|
|
1448
|
+
i as cn,
|
|
1449
|
+
ve as computeWhiteboardFit,
|
|
1450
|
+
je as computeWhiteboardRectFocus,
|
|
1451
|
+
At as resetDraggables,
|
|
1452
|
+
le as snapToWhiteboardGrid,
|
|
1453
|
+
xt as usePanelRect,
|
|
1454
|
+
_t as useWhiteboardLayout,
|
|
1455
|
+
g as useWhiteboardStore
|
|
1353
1456
|
};
|