@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/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { jsx as r, jsxs as m, Fragment as et } from "react/jsx-runtime";
2
- import { useEffect as Y, useRef as M, useCallback as $, memo as Ct, useId as Tt, useState as vt, useLayoutEffect as Rt, Component as Wt, useMemo as bt, forwardRef as dt, createElement as W } from "react";
3
- import { create as Xt } from "zustand";
4
- import { createPortal as Yt } from "react-dom";
5
- const D = (t = 14) => ({
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: t,
8
- height: t,
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 Dt({ size: t, ...e }) {
17
- return /* @__PURE__ */ r("svg", { ...D(t), ...e, children: /* @__PURE__ */ r("path", { d: "M5 12h14" }) });
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 It({ size: t, ...e }) {
20
- return /* @__PURE__ */ m("svg", { ...D(t), ...e, children: [
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 Ft({ size: t, ...e }) {
26
- return /* @__PURE__ */ m("svg", { ...D(t), ...e, children: [
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 Gt({ size: t, ...e }) {
36
- return /* @__PURE__ */ m("svg", { ...D(t), ...e, children: [
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 Et({ size: t, ...e }) {
42
- return /* @__PURE__ */ m("svg", { ...D(t), ...e, children: [
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 Lt({ size: t, ...e }) {
51
- return /* @__PURE__ */ m("svg", { ...D(t), ...e, children: [
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 ht({ size: t, ...e }) {
59
- return /* @__PURE__ */ r("svg", { ...D(t), ...e, children: /* @__PURE__ */ r("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) });
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 Ot({ size: t, ...e }) {
62
- return /* @__PURE__ */ m("svg", { ...D(t), ...e, children: [
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 At({ size: t, ...e }) {
69
- return /* @__PURE__ */ r("svg", { ...D(t), ...e, children: /* @__PURE__ */ r("path", { d: "M20 6 9 17l-5-5" }) });
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 Nt({ size: t, ...e }) {
72
- return /* @__PURE__ */ m("svg", { ...D(t), ...e, children: [
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 $t({ size: t, ...e }) {
78
- return /* @__PURE__ */ r("svg", { ...D(t), ...e, children: /* @__PURE__ */ r("path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" }) });
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 Bt({ size: t, ...e }) {
81
- return /* @__PURE__ */ m("svg", { ...D(t), ...e, children: [
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 ut = 20;
94
- function ct(t) {
95
- return Math.round(t / ut) * ut;
93
+ const ue = 20;
94
+ function ce(e) {
95
+ return Math.round(e / ue) * ue;
96
96
  }
97
- function gt(t, e, n = 60) {
98
- if (t.size === 0) return null;
99
- let s = 1 / 0, a = 1 / 0, u = -1 / 0, h = -1 / 0;
100
- for (const v of t.values())
101
- s = Math.min(s, v.x), a = Math.min(a, v.y), u = Math.max(u, v.x + v.width), h = Math.max(h, v.y + v.height);
102
- const f = u - s + n * 2, p = h - a + n * 2, w = e.width || window.innerWidth, d = e.height || window.innerHeight, N = Math.min(w / f, d / p, 1.5), k = (s + u) / 2, P = (a + h) / 2;
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, N)),
104
+ scale: Math.min(3, Math.max(0.2, v)),
105
105
  offset: {
106
- x: w / 2 - k * N,
107
- y: d / 2 - P * N
106
+ x: w / 2 - g * v,
107
+ y: m / 2 - _ * v
108
108
  }
109
109
  };
110
110
  }
111
- function Ht(t, e, n = 40, s = 1.5) {
112
- const a = e.width || window.innerWidth, u = e.height || window.innerHeight, h = Math.max(1, t.width), f = Math.max(1, t.height), p = Math.min(
113
- (a - n * 2) / h,
114
- (u - n * 2) / f,
115
- s
116
- ), w = Math.min(3, Math.max(0.2, p));
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: a / 2 - (t.x + h / 2) * w,
121
- y: u / 2 - (t.y + f / 2) * w
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 = Xt((t, e) => ({
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: ut,
130
+ snapGridSize: ue,
131
131
  panels: /* @__PURE__ */ new Map(),
132
132
  resetFns: /* @__PURE__ */ new Map(),
133
133
  registryVersion: 0,
134
- setOffset: (n) => t((s) => ({ offset: typeof n == "function" ? n(s.offset) : n })),
135
- setScale: (n) => t((s) => ({ scale: typeof n == "function" ? n(s.scale) : n })),
136
- setViewportSize: (n) => t({ viewportSize: n }),
137
- setSnapToGrid: (n) => t((s) => ({ snapToGrid: typeof n == "function" ? n(s.snapToGrid) : n })),
138
- register: (n, s) => {
139
- e().panels.set(n, s), t((a) => ({ registryVersion: a.registryVersion + 1 }));
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
- e().panels.delete(n), t((s) => ({ registryVersion: s.registryVersion + 1 }));
142
+ t().panels.delete(n), e((a) => ({ registryVersion: a.registryVersion + 1 }));
143
143
  },
144
- registerReset: (n, s) => {
145
- e().resetFns.set(n, s);
144
+ registerReset: (n, a) => {
145
+ t().resetFns.set(n, a);
146
146
  },
147
147
  unregisterReset: (n) => {
148
- e().resetFns.delete(n);
148
+ t().resetFns.delete(n);
149
149
  },
150
150
  fitToContent: () => {
151
- const { panels: n, viewportSize: s } = e(), a = gt(n, s);
152
- a && t({ scale: a.scale, offset: a.offset });
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, s) => {
155
- const { viewportSize: a } = e(), u = Ht(
154
+ focusPanel: (n, a) => {
155
+ const { viewportSize: s } = t(), l = He(
156
156
  n,
157
- a,
158
- (s == null ? void 0 : s.padding) ?? 40,
159
- (s == null ? void 0 : s.maxScale) ?? 1.5
157
+ s,
158
+ (a == null ? void 0 : a.padding) ?? 40,
159
+ (a == null ? void 0 : a.maxScale) ?? 1.5
160
160
  );
161
- t({ scale: u.scale, offset: u.offset });
161
+ e({ scale: l.scale, offset: l.offset });
162
162
  },
163
163
  resetWidgets: () => {
164
- for (const s of e().resetFns.values()) s();
165
- const n = (s = 0) => {
166
- const { panels: a, viewportSize: u } = e(), h = gt(a, u);
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
- t({ scale: h.scale, offset: h.offset });
168
+ e({ scale: h.scale, offset: h.offset });
169
169
  return;
170
170
  }
171
- s < 6 && requestAnimationFrame(() => n(s + 1));
171
+ a < 6 && requestAnimationFrame(() => n(a + 1));
172
172
  };
173
173
  requestAnimationFrame(() => requestAnimationFrame(() => n()));
174
174
  },
175
- resetSession: () => t({
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 Vt({ extraActions: t }) {
186
- const e = b((d) => d.scale), n = b((d) => d.viewportSize), s = b((d) => d.snapToGrid), a = b((d) => d.setScale), u = b((d) => d.setOffset), h = b((d) => d.setSnapToGrid), f = b((d) => d.fitToContent), p = b((d) => d.resetWidgets);
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
- s && window.dispatchEvent(new Event("whiteboard-snap-now"));
189
- }, [s]);
190
- const w = (d) => {
191
- const N = Math.min(3, Math.max(0.2, d)), k = N / e, P = (n.width || window.innerWidth) / 2, v = (n.height || window.innerHeight) / 2;
192
- u((_) => ({
193
- x: P - (P - _.x) * k,
194
- y: v - (v - _.y) * k
195
- })), a(N);
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__ */ m(
197
+ return /* @__PURE__ */ d(
198
198
  "div",
199
199
  {
200
200
  className: "zoom-bar",
201
- onPointerDown: (d) => d.stopPropagation(),
202
- onWheel: (d) => d.stopPropagation(),
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(e * 0.8), title: "Zoom out", "aria-label": "Zoom out", children: /* @__PURE__ */ r(Dt, { size: 14 }) }),
205
- /* @__PURE__ */ m("span", { className: "zoom-bar__value", children: [
206
- Math.round(e * 100),
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(e * 1.2), title: "Zoom in", "aria-label": "Zoom in", children: /* @__PURE__ */ r(It, { size: 14 }) }),
210
- /* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--secondary wb-btn--icon-only zoom-bar__action", onClick: f, title: "Fit camera to all panels", "aria-label": "Fit camera to all panels", children: /* @__PURE__ */ r(Ft, { size: 14 }) }),
211
- /* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--secondary wb-btn--icon-only zoom-bar__action", onClick: p, title: "Reset panel positions", "aria-label": "Reset panel positions", children: /* @__PURE__ */ r(Gt, { size: 14 }) }),
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${s ? " is-active" : ""}`,
217
- onClick: () => h((d) => !d),
218
- title: s ? "Disable snap to grid" : "Enable snap to grid",
219
- "aria-label": s ? "Disable snap to grid" : "Enable snap to grid",
220
- children: /* @__PURE__ */ r(Et, { size: 14 })
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
- t
223
+ e
224
224
  ]
225
225
  }
226
226
  );
227
227
  }
228
- const Q = 200, tt = 150, lt = 40, yt = 1;
229
- function jt({ loading: t = !1 }) {
228
+ const Q = 200, ee = 150, le = 40, ve = 1;
229
+ function je({ loading: e = !1 }) {
230
230
  b((i) => i.registryVersion);
231
- const e = b((i) => i.offset), n = b((i) => i.scale), s = b((i) => i.viewportSize), a = b((i) => i.panels), u = b((i) => i.setOffset), h = b((i) => i.setScale), f = b((i) => i.focusPanel), p = M(null), w = M(!1), d = M(null), k = Array.from(a.entries()).filter(([, i]) => Number.isFinite(i.width) && Number.isFinite(i.height)), P = k.map(([, i]) => i);
232
- if (t || P.length === 0)
233
- return /* @__PURE__ */ r("div", { className: "minimap minimap--loading", style: { width: Q, height: tt }, children: /* @__PURE__ */ r("div", { className: "minimap__loading", children: /* @__PURE__ */ r(ht, { size: 14, className: "icon-spin" }) }) });
234
- const v = s.width || window.innerWidth, _ = s.height || window.innerHeight, E = v / n, B = _ / n, H = -e.x / n, V = -e.y / n;
235
- let I = 1 / 0, c = 1 / 0, T = -1 / 0, R = -1 / 0;
236
- for (const i of P)
237
- I = Math.min(I, i.x), c = Math.min(c, i.y), T = Math.max(T, i.x + i.width), R = Math.max(R, i.y + i.height);
238
- I -= lt, c -= lt, T += lt, R += lt;
239
- const z = Math.max(yt, T - I), A = Math.max(yt, R - c), C = Math.min(Q / z, tt / A), L = z * C, Z = A * C, U = (Q - L) / 2, X = (tt - Z) / 2, q = (i) => U + (i - I) * C, j = (i) => X + (i - c) * C, J = (i, y) => {
240
- if (!p.current) return;
241
- const S = p.current.getBoundingClientRect(), F = Math.min(Q, Math.max(0, i - S.left)), O = Math.min(tt, Math.max(0, y - S.top)), rt = Math.min(L + U, Math.max(U, F)), st = Math.min(Z + X, Math.max(X, O)), at = (rt - U) / C + I, it = (st - X) / C + c;
242
- return { worldX: at, worldY: it };
243
- }, K = (i, y, S) => {
244
- const F = Math.min(3, Math.max(0.2, S));
245
- h(F), u({
246
- x: v / 2 - i * F,
247
- y: _ / 2 - y * F
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
- }, nt = (i, y) => {
250
- const S = J(i, y);
249
+ }, ne = (i, N) => {
250
+ const S = J(i, N);
251
251
  S && K(S.worldX, S.worldY, n);
252
- }, ft = (i) => {
253
- i.stopPropagation(), i.preventDefault(), w.current = !0, i.currentTarget.setPointerCapture(i.pointerId), nt(i.clientX, i.clientY);
254
- }, o = (i) => {
255
- w.current && nt(i.clientX, i.clientY);
256
- }, g = () => {
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__ */ m(
259
+ return /* @__PURE__ */ d(
260
260
  "div",
261
261
  {
262
- ref: p,
263
- onPointerDown: ft,
264
- onPointerMove: o,
265
- onPointerUp: g,
266
- onPointerCancel: g,
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 y = J(i.clientX, i.clientY);
270
- if (!y) return;
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(y.worldX, y.worldY, n * S);
272
+ K(N.worldX, N.worldY, n * S);
273
273
  },
274
274
  className: "minimap",
275
275
  style: {
276
276
  width: Q,
277
- height: tt
277
+ height: ee
278
278
  },
279
279
  children: [
280
- k.map(([i, y]) => /* @__PURE__ */ r(
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 F = Date.now(), O = d.current;
290
- if (O && O.id === i && F - O.time < 300) {
291
- S.preventDefault(), f(y, { padding: y.focusPadding, maxScale: y.focusMaxScale }), d.current = null;
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
- d.current = { id: i, time: F };
294
+ m.current = { id: i, time: I };
295
295
  },
296
296
  onDoubleClick: (S) => {
297
- S.preventDefault(), S.stopPropagation(), f(y, { padding: y.focusPadding, maxScale: y.focusMaxScale });
297
+ S.preventDefault(), S.stopPropagation(), p(N, { padding: N.focusPadding, maxScale: N.focusMaxScale });
298
298
  },
299
299
  style: {
300
- left: q(y.x),
301
- top: j(y.y),
302
- width: Math.max(1, y.width * C),
303
- height: Math.max(1, y.height * C)
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 * C,
316
- height: B * C
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 fe({ children: t, showMinimap: e = !0, minimapLoading: n = !1, extraActions: s }) {
325
- const a = b((c) => c.offset), u = b((c) => c.scale), h = b((c) => c.registryVersion), f = b((c) => c.viewportSize), p = b((c) => c.setOffset), w = b((c) => c.setScale), d = b((c) => c.setViewportSize), N = M(null), k = M(!1), P = M({ x: 0, y: 0 }), v = M(null), _ = M(u), E = M(!1);
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
- _.current = u;
330
- }, [u]), Y(() => {
331
- const c = N.current;
332
- if (!c) return;
333
- const T = () => {
334
- const z = c.getBoundingClientRect();
335
- d({
336
- width: Math.max(0, z.width),
337
- height: Math.max(0, z.height)
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 (T(), typeof ResizeObserver > "u") return;
341
- const R = new ResizeObserver(T);
342
- return R.observe(c), () => R.disconnect();
343
- }, [d]), Y(() => {
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: c } = b.getState();
346
- c.size === 0 || f.width <= 0 || f.height <= 0 || (E.current = !0, requestAnimationFrame(() => {
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, f]);
350
- const B = $((c) => {
351
- c.target === c.currentTarget && (c.button === 0 || c.button === 1) && (k.current = !0, v.current = c.pointerId, P.current = { x: c.clientX, y: c.clientY }, c.currentTarget.setPointerCapture(c.pointerId), c.preventDefault());
352
- }, []), H = $((c) => {
353
- if (!k.current || v.current !== c.pointerId) return;
354
- const T = c.movementX ?? c.clientX - P.current.x, R = c.movementY ?? c.clientY - P.current.y;
355
- p((z) => ({ x: z.x + T, y: z.y + R })), P.current = { x: c.clientX, y: c.clientY };
356
- }, [p]), V = $((c) => {
357
- if (v.current !== null)
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
- c.currentTarget.releasePointerCapture(v.current);
359
+ u.currentTarget.releasePointerCapture(x.current);
360
360
  } catch {
361
361
  }
362
- k.current = !1, v.current = null;
363
- }, []), I = $((c) => {
364
- const T = _.current, R = c.currentTarget.getBoundingClientRect(), z = { x: c.clientX - R.left, y: c.clientY - R.top }, A = Math.min(3, Math.max(0.2, T * (c.deltaY > 0 ? 0.9 : 1.1))), C = A / T;
365
- p((L) => ({
366
- x: z.x - (z.x - L.x) * C,
367
- y: z.y - (z.y - L.y) * C
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
- }, [p, w]);
370
- return /* @__PURE__ */ m(et, { children: [
369
+ }, [f, w]);
370
+ return /* @__PURE__ */ d(te, { children: [
371
371
  /* @__PURE__ */ r(
372
372
  "div",
373
373
  {
374
- ref: N,
374
+ ref: v,
375
375
  onPointerDown: B,
376
376
  onPointerMove: H,
377
377
  onPointerUp: V,
378
378
  onPointerCancel: V,
379
- onWheel: I,
380
- onContextMenu: (c) => c.preventDefault(),
379
+ onWheel: F,
380
+ onContextMenu: (u) => u.preventDefault(),
381
381
  className: "whiteboard-shell",
382
- children: /* @__PURE__ */ m(
382
+ children: /* @__PURE__ */ d(
383
383
  "div",
384
384
  {
385
385
  className: "whiteboard-canvas",
386
- style: { transform: `translate(${a.x}px, ${a.y}px) scale(${u})` },
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
- t
389
+ e
390
390
  ]
391
391
  }
392
392
  )
393
393
  }
394
394
  ),
395
- /* @__PURE__ */ r(Vt, { extraActions: s }),
396
- e ? /* @__PURE__ */ r(jt, { loading: n }) : null
395
+ /* @__PURE__ */ r(Ve, { extraActions: a }),
396
+ t ? /* @__PURE__ */ r(je, { loading: n }) : null
397
397
  ] });
398
398
  }
399
- const be = Ct(function({
400
- title: e,
399
+ const gt = ze(function({
400
+ title: t,
401
401
  defaultPosition: n,
402
- width: s = 300,
403
- className: a,
404
- trackRect: u,
402
+ width: a = 300,
403
+ className: s,
404
+ trackRect: l,
405
405
  focusable: h,
406
- focusPadding: f = 40,
407
- focusMaxScale: p = 1.5,
406
+ focusPadding: p = 40,
407
+ focusMaxScale: f = 1.5,
408
408
  headerActions: w,
409
- children: d
409
+ children: m
410
410
  }) {
411
- const N = Tt(), [k, P] = vt(n), v = M(!1), _ = M(k), E = M(null), B = M(null), H = b((o) => o.scale), V = b((o) => o.snapToGrid), I = b((o) => o.snapGridSize), c = b((o) => o.register), T = b((o) => o.unregister), R = b((o) => o.registerReset), z = b((o) => o.unregisterReset), A = b((o) => o.focusPanel), C = M(H), L = M(!1), Z = M(20), U = M(n), X = M(null), q = M(null);
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
- C.current = H;
413
+ z.current = H;
414
414
  }, [H]), Y(() => {
415
- L.current = V, Z.current = I;
416
- }, [V, I]), Y(() => {
417
- const o = () => {
418
- const g = Z.current;
419
- P((x) => {
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(x.x / g) * g,
422
- y: Math.round(x.y / g) * g
421
+ x: Math.round(k.x / y) * y,
422
+ y: Math.round(k.y / y) * y
423
423
  };
424
- return i.x === x.x && i.y === x.y ? x : i;
424
+ return i.x === k.x && i.y === k.y ? k : i;
425
425
  });
426
426
  };
427
- return window.addEventListener("whiteboard-snap-now", o), () => window.removeEventListener("whiteboard-snap-now", o);
427
+ return window.addEventListener("whiteboard-snap-now", c), () => window.removeEventListener("whiteboard-snap-now", c);
428
428
  }, []), Y(() => {
429
- _.current = k;
430
- }, [k]);
429
+ P.current = g;
430
+ }, [g]);
431
431
  const j = $(() => {
432
- const o = E.current;
433
- if (!o) return;
434
- const g = {
435
- x: _.current.x,
436
- y: _.current.y,
437
- width: o.offsetWidth,
438
- height: o.offsetHeight,
439
- focusPadding: f,
440
- focusMaxScale: p
441
- }, x = B.current;
442
- x && x.x === g.x && x.y === g.y && x.width === g.width && x.height === g.height && x.focusPadding === g.focusPadding && x.focusMaxScale === g.focusMaxScale || (B.current = g, c(N, g), u && (u.current = g));
443
- }, [p, f, N, c, u]), J = $(() => {
444
- const o = E.current;
445
- return o ? {
446
- x: _.current.x,
447
- y: _.current.y,
448
- width: o.offsetWidth,
449
- height: o.offsetHeight,
450
- focusPadding: f,
451
- focusMaxScale: p
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
- }, [p, f]), K = $(() => {
454
- const o = J();
455
- o && A(o, { padding: f, maxScale: p });
456
- }, [A, f, p, J]);
457
- Y(() => (R(N, () => P(U.current)), () => {
458
- var o;
459
- (o = X.current) == null || o.call(X), T(N), z(N), B.current = null;
460
- }), [N, R, T, z]), Rt(() => {
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
- }, [k.x, k.y, s, j]), Y(() => {
463
- const o = E.current;
464
- if (!o || typeof ResizeObserver > "u") return;
465
- const g = new ResizeObserver(() => {
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 g.observe(o), () => g.disconnect();
468
+ return y.observe(c), () => y.disconnect();
469
469
  }, [j]);
470
- const nt = $((o) => {
471
- var rt;
472
- if (o.button !== 0) return;
473
- v.current = !0;
474
- const g = o.clientX, x = o.clientY, i = _.current.x, y = _.current.y, S = C.current;
475
- o.preventDefault(), o.stopPropagation(), o.target.setPointerCapture(o.pointerId);
476
- const F = (st) => {
477
- if (!v.current) return;
478
- const at = i + (st.clientX - g) / S, it = y + (st.clientY - x) / S, ot = Z.current, _t = L.current ? Math.round(at / ot) * ot : at, zt = L.current ? Math.round(it / ot) * ot : it;
479
- P({
480
- x: _t,
481
- y: zt
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
- v.current = !1, window.removeEventListener("pointermove", F), window.removeEventListener("pointerup", O), X.current = null;
484
+ x.current = !1, window.removeEventListener("pointermove", I), window.removeEventListener("pointerup", O), X.current = null;
485
485
  };
486
- (rt = X.current) == null || rt.call(X), window.addEventListener("pointermove", F), window.addEventListener("pointerup", O), X.current = O;
487
- }, []), ft = a ? `floating-panel ${a}` : "floating-panel";
488
- return /* @__PURE__ */ m(
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: ft,
493
- style: { left: k.x, top: k.y, width: s },
494
- onPointerDown: (o) => o.stopPropagation(),
495
- onPointerUp: (o) => {
496
- if (v.current) return;
497
- const g = Date.now(), x = q.current;
498
- if (x && g - x.time < 300) {
499
- const i = o.clientX - x.x, y = o.clientY - x.y;
500
- if (i * i + y * y < 100) {
501
- o.stopPropagation(), K(), q.current = null;
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: g, x: o.clientX, y: o.clientY };
505
+ q.current = { time: y, x: c.clientX, y: c.clientY };
506
506
  },
507
- onWheel: (o) => o.stopPropagation(),
508
- onDoubleClick: (o) => {
509
- o.stopPropagation(), K();
507
+ onWheel: (c) => c.stopPropagation(),
508
+ onDoubleClick: (c) => {
509
+ c.stopPropagation(), K();
510
510
  },
511
511
  children: [
512
- /* @__PURE__ */ m("div", { onPointerDown: nt, className: "floating-panel__header", children: [
513
- /* @__PURE__ */ r("strong", { className: "floating-panel__title", children: e }),
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: (o) => o.stopPropagation(),
521
+ onPointerDown: (c) => c.stopPropagation(),
522
522
  title: "Focus on this panel",
523
523
  "aria-label": "Focus on this panel",
524
- children: /* @__PURE__ */ r(Lt, { size: 14 })
524
+ children: /* @__PURE__ */ r(Le, { size: 14 })
525
525
  }
526
526
  )
527
527
  ] }),
528
- /* @__PURE__ */ r("div", { className: "floating-panel__body", children: d })
528
+ /* @__PURE__ */ r("div", { className: "floating-panel__body", children: m })
529
529
  ]
530
530
  }
531
531
  );
532
532
  });
533
- function we(t) {
534
- return M({ ...t, width: 0, height: 0 });
533
+ function vt(e) {
534
+ return M({ ...e, width: 0, height: 0 });
535
535
  }
536
- function ge(t, e = ut) {
537
- return { x: t.x, y: t.y + t.height + e };
536
+ function yt(e, t = ue) {
537
+ return { x: e.x, y: e.y + e.height + t };
538
538
  }
539
- function ye({
540
- open: t,
541
- title: e,
539
+ function Nt({
540
+ open: e,
541
+ title: t,
542
542
  message: n,
543
- onConfirm: s,
544
- onCancel: a,
545
- confirmLabel: u = "Confirm",
543
+ onConfirm: a,
544
+ onCancel: s,
545
+ confirmLabel: l = "Confirm",
546
546
  loadingLabel: h,
547
- loading: f,
548
- error: p
547
+ loading: p,
548
+ error: f
549
549
  }) {
550
550
  return Y(() => {
551
- if (!t) return;
552
- const w = (d) => {
553
- d.key === "Escape" && a();
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
- }, [t, a]), !t || typeof document > "u" ? null : Yt(
557
- /* @__PURE__ */ r("div", { className: "confirm-modal-overlay", onMouseDown: a, children: /* @__PURE__ */ m(
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": e,
563
+ "aria-label": t,
564
564
  onMouseDown: (w) => w.stopPropagation(),
565
565
  children: [
566
- /* @__PURE__ */ m("div", { className: "confirm-modal__header", children: [
567
- /* @__PURE__ */ m("span", { className: "confirm-modal__title", children: [
568
- /* @__PURE__ */ r(Ot, { size: 16 }),
569
- e
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: a, "aria-label": "Close dialog", children: /* @__PURE__ */ r(Nt, { size: 14 }) })
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
- p && /* @__PURE__ */ r("div", { className: "wb-alert wb-alert--error", children: p }),
575
- /* @__PURE__ */ m("div", { className: "wb-btn-row", children: [
576
- /* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--secondary", onClick: a, children: "Cancel" }),
577
- /* @__PURE__ */ r("button", { type: "button", className: "wb-btn wb-btn--danger", onClick: s, disabled: f, children: f ? h ?? `${u}…` : /* @__PURE__ */ m(et, { children: [
578
- /* @__PURE__ */ r(At, { size: 14 }),
579
- u
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 ve extends Wt {
588
+ class xt extends We {
589
589
  constructor() {
590
590
  super(...arguments), this.state = { error: null };
591
591
  }
592
- static getDerivedStateFromError(e) {
593
- return { error: e };
592
+ static getDerivedStateFromError(t) {
593
+ return { error: t };
594
594
  }
595
595
  render() {
596
- return this.state.error ? /* @__PURE__ */ m("div", { className: "wb-stack wb-stack--sm", children: [
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 Ne({
611
- widths: t,
612
- startX: e = 20,
610
+ function kt({
611
+ widths: e,
612
+ startX: t = 20,
613
613
  y: n = 40,
614
- gap: s = 20
614
+ gap: a = 20
615
615
  }) {
616
- const a = bt(() => {
617
- const f = {};
618
- for (const [p, w] of Object.entries(t))
619
- f[p] = ct(w);
620
- return f;
621
- }, [t]), u = bt(
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: ct(e),
624
- y: ct(n),
625
- gap: ct(s)
623
+ startX: ce(t),
624
+ y: ce(n),
625
+ gap: ce(a)
626
626
  }),
627
- [e, n, s]
628
- ), h = bt(() => {
629
- const f = {};
630
- let p = u.startX;
631
- for (const [w, d] of Object.entries(a))
632
- f[w] = { x: p, y: u.y }, p += d + u.gap;
633
- return f;
634
- }, [u.gap, u.startX, u.y, a]);
635
- return { layout: u, panelWidth: a, positions: h };
636
- }
637
- function l(...t) {
638
- return t.filter(Boolean).join(" ");
639
- }
640
- const Zt = {
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 xe({ tone: t = "info", className: e, ...n }) {
647
- return /* @__PURE__ */ r("p", { className: l(Zt[t], e), ...n });
646
+ function St({ tone: e = "info", className: t, ...n }) {
647
+ return /* @__PURE__ */ r("p", { className: o(Ze[e], t), ...n });
648
648
  }
649
- function Se({ className: t, ...e }) {
650
- return /* @__PURE__ */ r("span", { className: l("avatar-badge", t), ...e });
649
+ function Mt({ className: e, ...t }) {
650
+ return /* @__PURE__ */ r("span", { className: o("avatar-badge", e), ...t });
651
651
  }
652
- const Ut = {
652
+ const Ue = {
653
653
  primary: "",
654
654
  secondary: "wb-btn--secondary",
655
655
  danger: "wb-btn--danger"
656
- }, xt = dt(function({
657
- variant: e = "primary",
656
+ }, xe = de(function({
657
+ variant: t = "primary",
658
658
  fullWidth: n = !1,
659
- iconOnly: s = !1,
660
- loading: a = !1,
661
- type: u = "button",
659
+ iconOnly: a = !1,
660
+ loading: s = !1,
661
+ type: l = "button",
662
662
  disabled: h,
663
- className: f,
664
- children: p,
663
+ className: p,
664
+ children: f,
665
665
  loadingText: w,
666
- ...d
667
- }, N) {
666
+ ...m
667
+ }, v) {
668
668
  return /* @__PURE__ */ r(
669
669
  "button",
670
670
  {
671
- ref: N,
672
- type: u,
673
- className: l("wb-btn", Ut[e], n && "wb-btn--full-width", s && "wb-btn--icon-only", f),
674
- disabled: h || a,
675
- ...d,
676
- children: a ? /* @__PURE__ */ m(et, { children: [
677
- /* @__PURE__ */ r(ht, { size: 14, className: "icon-spin" }),
678
- w || p
679
- ] }) : p
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 qt({ as: t = "div", className: e, ...n }) {
684
- return W(t, {
685
- className: l("button-row", e),
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 Me({ children: t, hint: e, className: n, ...s }) {
690
- return /* @__PURE__ */ r("div", { className: "canvas-wrap", children: /* @__PURE__ */ m("div", { className: l("canvas-stage", n), ...s, children: [
691
- t,
692
- e && /* @__PURE__ */ r("p", { className: "canvas-hint", children: e })
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 ke({ className: t, ...e }) {
696
- return /* @__PURE__ */ r("span", { className: l("chip", t), ...e });
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 Kt({ active: t = !1, className: e, ...n }) {
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: l("choice-card", e),
704
- "data-active": t,
728
+ className: o("choice-card", t),
729
+ "data-active": e,
705
730
  ...n
706
731
  }
707
732
  );
708
733
  }
709
- function mt({ as: t = "ul", reset: e = !0, className: n, ...s }) {
710
- return W(t, {
711
- className: l(e && "list-reset", n),
712
- ...s
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 Jt = {
740
+ const Je = {
716
741
  sm: "",
717
742
  md: "skeleton--md",
718
743
  pill: "skeleton--pill"
719
744
  };
720
- function G({ as: t = "div", radius: e = "sm", className: n, ...s }) {
721
- return W(t, {
722
- className: l("skeleton", Jt[e], n),
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
- ...s
749
+ ...a
725
750
  });
726
751
  }
727
- function Qt(t) {
728
- const { className: e, ...n } = t;
729
- return /* @__PURE__ */ r(G, { className: l("skeleton-input", e), ...n });
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 St(t) {
732
- const { className: e, ...n } = t;
733
- return /* @__PURE__ */ r(G, { className: l("skeleton-btn", e), ...n });
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 Pe(t) {
736
- const { className: e, ...n } = t;
737
- return /* @__PURE__ */ r(G, { className: l("skeleton-icon-btn", e), ...n });
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 _e(t) {
740
- const { className: e, ...n } = t;
741
- return /* @__PURE__ */ r(G, { className: l("skeleton-select", e), ...n });
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 ze(t) {
744
- const { className: e, ...n } = t;
745
- return /* @__PURE__ */ r(G, { className: l("skeleton-textarea", e), ...n });
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 Mt(t) {
748
- const { className: e, ...n } = t;
749
- return /* @__PURE__ */ r(G, { className: l("skeleton-thumb", e), ...n });
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 te(t) {
752
- const { className: e, ...n } = t;
753
- return /* @__PURE__ */ r(G, { radius: "pill", className: l("skeleton-chip", e), ...n });
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 kt(t) {
756
- const { className: e, ...n } = t;
757
- return /* @__PURE__ */ r(G, { className: l("skeleton-title", e), ...n });
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 wt({ short: t = !1, className: e, ...n }) {
760
- return /* @__PURE__ */ r(G, { className: l("skeleton-line", t && "skeleton-line--short", e), ...n });
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 Ce(t) {
763
- const { className: e, ...n } = t;
764
- return /* @__PURE__ */ r(G, { radius: "pill", className: l("skeleton-avatar", e), ...n });
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 Te(t) {
767
- const { className: e, ...n } = t;
768
- return /* @__PURE__ */ r(G, { className: l("skeleton-canvas", e), ...n });
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 Re({
771
- options: t,
772
- value: e,
795
+ function Dt({
796
+ options: e,
797
+ value: t,
773
798
  onChange: n,
774
- className: s
799
+ className: a
775
800
  }) {
776
- return /* @__PURE__ */ r(mt, { className: l("choice-list", s), children: t.map((a) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
777
- Kt,
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: e === a.value,
780
- onClick: () => n(a.value),
781
- disabled: a.disabled,
782
- "data-has-description": a.description ? "true" : "false",
783
- children: a.description ? /* @__PURE__ */ m("span", { className: "choice-card__row", children: [
784
- /* @__PURE__ */ r("span", { className: "choice-card__label", children: a.label }),
785
- /* @__PURE__ */ r("span", { className: "choice-card__description", children: a.description })
786
- ] }) : /* @__PURE__ */ r("span", { className: "choice-card__label", children: a.label })
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
- ) }, a.value)) });
813
+ ) }, s.value)) });
789
814
  }
790
- function We({ count: t = 4, className: e, withDescription: n = !1 }) {
791
- return /* @__PURE__ */ r(mt, { className: l("choice-list", e), "aria-hidden": !0, children: Array.from({ length: t }).map((s, a) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ m("div", { className: "choice-card", children: [
792
- /* @__PURE__ */ r(kt, { className: l("skeleton-title--sm", !n && "skeleton-choice-label") }),
793
- n ? /* @__PURE__ */ r(wt, { short: !0 }) : null
794
- ] }) }, `choice-skeleton-${a}`)) });
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 Xe({ className: t, ...e }) {
797
- return /* @__PURE__ */ r("div", { className: l("coord-grid", t), ...e });
821
+ function It({ className: e, ...t }) {
822
+ return /* @__PURE__ */ r("div", { className: o("coord-grid", e), ...t });
798
823
  }
799
- function Ye({ axis: t, className: e, ...n }) {
800
- return /* @__PURE__ */ m("label", { className: l("coord-input", e), children: [
801
- t,
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 pt({
807
- as: t,
808
- size: e = "md",
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
- ...s
846
+ ...a
811
847
  }) {
812
- return W(t ?? "div", {
813
- className: l(e === "sm" ? "panel-stack-sm" : "panel-stack", n),
814
- ...s
848
+ return T(e ?? "div", {
849
+ className: o(t === "sm" ? "panel-stack-sm" : "panel-stack", n),
850
+ ...a
815
851
  });
816
852
  }
817
- const ee = {
853
+ const tt = {
818
854
  xs: "text-xs",
819
855
  sm: "text-sm",
820
856
  md: ""
821
857
  };
822
- function ne({ as: t = "p", clamp: e = !1, className: n, ...s }) {
823
- return W(t, {
824
- className: l("card-title", e && "card-title--clamp", n),
825
- ...s
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 De({ as: t = "h1", className: e, ...n }) {
829
- return W(t, {
830
- className: l("page-title", e),
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 re({ as: t = "span", className: e, ...n }) {
835
- return W(t, {
836
- className: l("widget-section__title", e),
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 se({ as: t = "p", className: e, ...n }) {
841
- return W(t, {
842
- className: l("widget-section__description", e),
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 Pt({ as: t = "p", size: e = "sm", className: n, ...s }) {
847
- return W(t, {
848
- className: l(ee[e], "text-muted", n),
849
- ...s
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 Ie({ title: t, description: e, action: n }) {
853
- return /* @__PURE__ */ m(pt, { size: "sm", children: [
854
- /* @__PURE__ */ r(ne, { children: t }),
855
- e ? /* @__PURE__ */ r(Pt, { children: e }) : null,
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 ae({ className: t, ...e }) {
860
- return /* @__PURE__ */ r("label", { className: l("widget-label", t), ...e });
895
+ function st({ className: e, ...t }) {
896
+ return /* @__PURE__ */ r("label", { className: o("widget-label", e), ...t });
861
897
  }
862
- function Fe({
863
- as: t,
864
- label: e,
898
+ function it({
899
+ as: e,
900
+ label: t,
865
901
  htmlFor: n,
866
- hint: s,
867
- error: a,
868
- layout: u = "stack",
902
+ hint: a,
903
+ error: s,
904
+ layout: l = "stack",
869
905
  className: h,
870
- children: f,
871
- ...p
906
+ children: p,
907
+ ...f
872
908
  }) {
873
- return W(
874
- t ?? "div",
909
+ return T(
910
+ e ?? "div",
875
911
  {
876
- className: l(u === "control" ? "widget-control" : "panel-stack-sm", h),
877
- ...p
912
+ className: o(l === "control" ? "widget-control" : "panel-stack-sm", h),
913
+ ...f
878
914
  },
879
- /* @__PURE__ */ m(et, { children: [
880
- e ? /* @__PURE__ */ r(ae, { htmlFor: n, children: e }) : null,
881
- f,
882
- s ? /* @__PURE__ */ r(Pt, { size: "xs", children: s }) : null,
883
- a ? /* @__PURE__ */ r("p", { className: "field-error", children: a }) : null
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 Ge({ isGenerating: t, children: e, message: n }) {
888
- return /* @__PURE__ */ m("div", { className: "generating-overlay-wrap", children: [
889
- e,
890
- t && /* @__PURE__ */ m("div", { className: "generating-overlay", "aria-live": "polite", children: [
891
- /* @__PURE__ */ r(ht, { size: 20, className: "icon-spin" }),
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 Ee({ as: t = "span", icon: e, className: n, children: s, ...a }) {
897
- return W(
898
- t,
932
+ function $t({ as: e = "span", icon: t, className: n, children: a, ...s }) {
933
+ return T(
934
+ e,
899
935
  {
900
- className: l("inline-row", n),
901
- ...a
936
+ className: o("inline-row", n),
937
+ ...s
902
938
  },
903
- /* @__PURE__ */ m(et, { children: [
904
- e,
905
- s
939
+ /* @__PURE__ */ d(te, { children: [
940
+ t,
941
+ a
906
942
  ] })
907
943
  );
908
944
  }
909
- function Le({
910
- src: t,
911
- alt: e,
945
+ function Bt({
946
+ src: e,
947
+ alt: t,
912
948
  placeholder: n = "No image",
913
- size: s = "md",
914
- fit: a = "contain",
915
- onImageError: u,
949
+ size: a = "md",
950
+ fit: s = "contain",
951
+ onImageError: l,
916
952
  className: h,
917
- ...f
953
+ ...p
918
954
  }) {
919
- const [p, w] = vt(null), d = !!(t && p === t), N = l("image-thumb", `image-thumb--${s}`, `image-thumb--fit-${a}`, h);
920
- return /* @__PURE__ */ r("div", { className: N, ...f, children: t && !d ? /* @__PURE__ */ r(
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: t,
924
- alt: e,
959
+ src: e,
960
+ alt: t,
925
961
  className: "image-thumb__img",
926
- style: { objectFit: a, objectPosition: "center" },
962
+ style: { objectFit: s, objectPosition: "center" },
927
963
  onError: () => {
928
- w(t), u == null || u();
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 Oe({
934
- as: t,
935
- justify: e = "start",
969
+ function Ht({
970
+ as: e,
971
+ justify: t = "start",
936
972
  className: n,
937
- ...s
973
+ ...a
938
974
  }) {
939
- return W(t ?? "div", {
940
- className: l(e === "between" ? "space-between" : e === "end" ? "space-end" : "inline-row", n),
941
- ...s
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 Ae = dt(function({ className: e, ...n }, s) {
945
- return /* @__PURE__ */ r("input", { ref: s, className: l(e), ...n });
980
+ const ot = de(function({ className: t, ...n }, a) {
981
+ return /* @__PURE__ */ r("input", { ref: a, className: o(t), ...n });
946
982
  });
947
- function ie({ as: t = "div", className: e, ...n }) {
948
- return W(t, {
949
- className: l("item-card", e),
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 $e({ as: t = "div", className: e, ...n }) {
954
- return W(t, {
955
- className: l("item-list", e),
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 Be({ label: t = "Loading...", className: e }) {
960
- return /* @__PURE__ */ m("span", { className: l("status-inline", e), children: [
961
- /* @__PURE__ */ r(ht, { size: 14, className: "icon-spin" }),
962
- t
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 He({
966
- className: t,
967
- placement: e,
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: s,
970
- onContextMenu: a,
971
- ...u
1042
+ onWheel: a,
1043
+ onContextMenu: s,
1044
+ ...l
972
1045
  }) {
973
1046
  return /* @__PURE__ */ r(
974
- xt,
1047
+ xe,
975
1048
  {
976
1049
  variant: "secondary",
977
1050
  iconOnly: !0,
978
- className: l("overlay-icon-btn", e && `overlay-icon-btn--${e}`, t),
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(), s == null || s(h);
1056
+ h.stopPropagation(), a == null || a(h);
984
1057
  },
985
1058
  onContextMenu: (h) => {
986
- h.stopPropagation(), a == null || a(h);
1059
+ h.stopPropagation(), s == null || s(h);
987
1060
  },
988
- ...u
1061
+ ...l
989
1062
  }
990
1063
  );
991
1064
  }
992
- function Ve({ children: t, className: e, ...n }) {
993
- return /* @__PURE__ */ r("main", { className: l("page-shell", e), ...n, children: t });
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 je({ children: t, className: e, ...n }) {
996
- return /* @__PURE__ */ r("div", { className: l("page-card", e), ...n, children: t });
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 Ze({ onClick: t, label: e = "Close" }) {
999
- return /* @__PURE__ */ m(xt, { variant: "secondary", className: "panel-close-btn", onClick: t, children: [
1000
- /* @__PURE__ */ r(Nt, { size: 14 }),
1001
- e
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 Ue({ heading: t, description: e, actions: n, className: s, children: a, ...u }) {
1005
- return /* @__PURE__ */ m("section", { className: l("widget-section", s), ...u, children: [
1006
- t || n ? /* @__PURE__ */ m("header", { className: n ? "title-row" : void 0, children: [
1007
- t ? /* @__PURE__ */ r(re, { children: t }) : null,
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
- e ? /* @__PURE__ */ r(se, { children: e }) : null,
1011
- a
1083
+ t ? /* @__PURE__ */ r(at, { children: t }) : null,
1084
+ s
1012
1085
  ] });
1013
1086
  }
1014
- function qe({ icon: t, label: e }) {
1015
- return /* @__PURE__ */ m("span", { className: "panel-title-with-icon", children: [
1016
- /* @__PURE__ */ r(t, { size: 13, className: "panel-title-icon" }),
1017
- /* @__PURE__ */ r("span", { children: e })
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 oe({ as: t = "button", className: e, ...n }) {
1021
- return W(t, {
1022
- className: l("picker-card", e),
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 Ke({ minItemWidth: t = 120, className: e, style: n, ...s }) {
1027
- const a = {
1028
- gridTemplateColumns: `repeat(auto-fill, minmax(${t}px, 1fr))`,
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(mt, { className: l("picker-grid", e), style: a, ...s });
1104
+ return /* @__PURE__ */ r(me, { className: o("picker-grid", t), style: s, ...a });
1032
1105
  }
1033
- const ce = {
1106
+ const ut = {
1034
1107
  default: "",
1035
1108
  success: "success",
1036
1109
  warning: "warning",
1037
1110
  danger: "danger"
1038
1111
  };
1039
- function Je({ tone: t = "default", className: e, ...n }) {
1040
- return /* @__PURE__ */ r("span", { className: l("pill", ce[t], e), ...n });
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 Qe = dt(function({ className: e, ...n }, s) {
1043
- return /* @__PURE__ */ r("select", { ref: s, className: l(e), ...n });
1044
- }), le = {
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 tn({ variant: t, className: e, ...n }) {
1050
- return /* @__PURE__ */ r("div", { className: l("split-layout", le[t], e), ...n });
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 ue({ className: t, ...e }) {
1053
- return /* @__PURE__ */ r("div", { className: l("tag-row", t), ...e });
1155
+ function ht({ className: e, ...t }) {
1156
+ return /* @__PURE__ */ r("div", { className: o("tag-row", e), ...t });
1054
1157
  }
1055
- const en = dt(function({ className: e, ...n }, s) {
1056
- return /* @__PURE__ */ r("textarea", { ref: s, className: l(e), ...n });
1158
+ const ln = de(function({ className: t, ...n }, a) {
1159
+ return /* @__PURE__ */ r("textarea", { ref: a, className: o(t), ...n });
1057
1160
  });
1058
- function nn({ className: t, theme: e = "light", onToggle: n, lightIcon: s, darkIcon: a }) {
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: l("wb-btn", "wb-btn--secondary", "wb-btn--icon-only", t),
1166
+ className: o("wb-btn", "wb-btn--secondary", "wb-btn--icon-only", e),
1064
1167
  onClick: n,
1065
- title: `Switch to ${e === "light" ? "dark" : "light"} mode`,
1168
+ title: `Switch to ${t === "light" ? "dark" : "light"} mode`,
1066
1169
  "aria-label": "Toggle theme",
1067
- children: e === "light" ? a ?? /* @__PURE__ */ r($t, { size: 14 }) : s ?? /* @__PURE__ */ r(Bt, { size: 14 })
1170
+ children: t === "light" ? s ?? /* @__PURE__ */ r($e, { size: 14 }) : a ?? /* @__PURE__ */ r(Be, { size: 14 })
1068
1171
  }
1069
1172
  );
1070
1173
  }
1071
- function rn({ className: t, ...e }) {
1072
- return /* @__PURE__ */ r("div", { className: l("title-row", t), ...e });
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 sn({
1075
- children: t,
1076
- bottom: e,
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: s,
1079
- ...a
1212
+ className: a,
1213
+ ...s
1080
1214
  }) {
1081
- return /* @__PURE__ */ m(
1215
+ return /* @__PURE__ */ d(
1082
1216
  "nav",
1083
1217
  {
1084
- className: l(
1218
+ className: o(
1085
1219
  "vertical-toolbar",
1086
1220
  n === "right" && "vertical-toolbar--right",
1087
1221
  n === "static" && "vertical-toolbar--static",
1088
- s
1222
+ a
1089
1223
  ),
1090
- ...a,
1224
+ ...s,
1091
1225
  children: [
1092
- /* @__PURE__ */ r("div", { className: "vertical-toolbar__links", children: t }),
1093
- e
1226
+ /* @__PURE__ */ r("div", { className: "vertical-toolbar__links", children: e }),
1227
+ t
1094
1228
  ]
1095
1229
  }
1096
1230
  );
1097
1231
  }
1098
- function an({ inputs: t = 1, showButton: e = !0, className: n, ...s }) {
1099
- return /* @__PURE__ */ m(pt, { className: n, ...s, children: [
1100
- Array.from({ length: t }).map((a, u) => /* @__PURE__ */ r(Qt, {}, `panel-form-input-${u}`)),
1101
- e && /* @__PURE__ */ r(St, {})
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 on({
1105
- withThumb: t = !0,
1106
- chipCount: e = 0,
1238
+ function bn({
1239
+ withThumb: e = !0,
1240
+ chipCount: t = 0,
1107
1241
  actionCount: n = 0,
1108
- className: s,
1109
- ...a
1242
+ className: a,
1243
+ ...s
1110
1244
  }) {
1111
- return /* @__PURE__ */ m(ie, { as: "li", className: s, ...a, children: [
1112
- /* @__PURE__ */ m(pt, { size: "sm", children: [
1113
- t ? /* @__PURE__ */ r(Mt, {}) : null,
1114
- e > 0 ? /* @__PURE__ */ r(ue, { children: Array.from({ length: e }).map((u, h) => /* @__PURE__ */ r(te, {}, `card-skeleton-chip-${h}`)) }) : null,
1115
- /* @__PURE__ */ r(kt, {}),
1116
- /* @__PURE__ */ r(wt, { short: !0 })
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(qt, { children: Array.from({ length: n }).map((u, h) => /* @__PURE__ */ r(St, {}, `card-skeleton-btn-${h}`)) }) : null
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 cn({ count: t = 8, minItemWidth: e = 120 }) {
1255
+ function wn({ count: e = 8, minItemWidth: t = 120 }) {
1122
1256
  return /* @__PURE__ */ r(
1123
- mt,
1257
+ me,
1124
1258
  {
1125
1259
  className: "picker-grid",
1126
- style: { gridTemplateColumns: `repeat(auto-fill, minmax(${e}px, 1fr))` },
1127
- children: Array.from({ length: t }).map((n, s) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(oe, { as: "div", className: "picker-card--skeleton", children: /* @__PURE__ */ m(pt, { size: "sm", children: [
1128
- /* @__PURE__ */ r(Mt, {}),
1129
- /* @__PURE__ */ r(wt, { short: !0 })
1130
- ] }) }) }, `picker-skeleton-${s}`))
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
- xe as Alert,
1136
- Se as AvatarBadge,
1137
- Ce as AvatarSkeleton,
1138
- xt as Button,
1139
- qt as ButtonRow,
1140
- St as ButtonSkeleton,
1141
- Te as CanvasSkeleton,
1142
- Me as CanvasStage,
1143
- on as CardSkeleton,
1144
- ne as CardTitle,
1145
- ke as Chip,
1146
- te as ChipSkeleton,
1147
- Kt as ChoiceCard,
1148
- Re as ChoiceGroup,
1149
- We as ChoiceGroupSkeleton,
1150
- ye as ConfirmDialog,
1151
- Xe as CoordGrid,
1152
- Ye as CoordInput,
1153
- Ie as EmptyState,
1154
- Fe as Field,
1155
- be as FloatingPanel,
1156
- Ge as GeneratingOverlay,
1157
- Pe as IconButtonSkeleton,
1158
- Ee as IconText,
1159
- Le as ImageThumb,
1160
- Oe as Inline,
1161
- Ae as Input,
1162
- Qt as InputSkeleton,
1163
- ie as ItemCard,
1164
- $e as ItemList,
1165
- ae as Label,
1166
- wt as LineSkeleton,
1167
- mt as List,
1168
- Be as LoadingState,
1169
- jt as Minimap,
1170
- Pt as MutedText,
1171
- He as OverlayIconButton,
1172
- je as PageCard,
1173
- Ve as PageShell,
1174
- De as PageTitle,
1175
- Ze as PanelCloseButton,
1176
- ve as PanelErrorBoundary,
1177
- an as PanelFormSkeleton,
1178
- Ue as PanelSection,
1179
- qe as PanelTitle,
1180
- oe as PickerCard,
1181
- Ke as PickerGrid,
1182
- cn as PickerGridSkeleton,
1183
- Je as Pill,
1184
- se as SectionDescription,
1185
- re as SectionTitle,
1186
- Qe as Select,
1187
- _e as SelectSkeleton,
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
- tn as SplitLayout,
1190
- pt as Stack,
1191
- ue as TagRow,
1192
- en as Textarea,
1193
- ze as TextareaSkeleton,
1194
- nn as ThemeToggle,
1195
- Mt as ThumbSkeleton,
1196
- rn as TitleRow,
1197
- kt as TitleSkeleton,
1198
- sn as VerticalToolbar,
1199
- ut as WHITEBOARD_GRID,
1200
- fe as WhiteboardShell,
1201
- Vt as ZoomBar,
1202
- ge as belowPanel,
1203
- l as cn,
1204
- gt as computeWhiteboardFit,
1205
- Ht as computeWhiteboardRectFocus,
1206
- ct as snapToWhiteboardGrid,
1207
- we as usePanelRect,
1208
- Ne as useWhiteboardLayout,
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
  };