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