@objectifthunes/whiteboard 0.2.5 → 0.2.7

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,5 +1,5 @@
1
1
  import { jsx as n, jsxs as d, Fragment as re } from "react/jsx-runtime";
2
- import { useEffect as Y, useRef as S, useCallback as B, memo as Re, useId as We, useState as Se, useLayoutEffect as Xe, Component as Ye, useMemo as ye, forwardRef as me, createElement as T } from "react";
2
+ import { useEffect as Y, useRef as k, useCallback as B, memo as Re, useId as We, useState as Me, useLayoutEffect as Xe, Component as Ye, useMemo as ye, forwardRef as me, createElement as T } from "react";
3
3
  import { create as De } from "zustand";
4
4
  import { createPortal as Ie } from "react-dom";
5
5
  const D = (e = 14) => ({
@@ -24,7 +24,6 @@ function Ge({ size: e, ...t }) {
24
24
  }
25
25
  function Le({ size: e, ...t }) {
26
26
  return /* @__PURE__ */ d("svg", { ...D(e), ...t, children: [
27
- /* @__PURE__ */ n("path", { d: "M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z", fill: "none", stroke: "none" }),
28
27
  /* @__PURE__ */ n("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }),
29
28
  /* @__PURE__ */ n("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }),
30
29
  /* @__PURE__ */ n("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }),
@@ -69,7 +68,7 @@ function Be({ size: e, ...t }) {
69
68
  function He({ size: e, ...t }) {
70
69
  return /* @__PURE__ */ n("svg", { ...D(e), ...t, children: /* @__PURE__ */ n("path", { d: "M20 6 9 17l-5-5" }) });
71
70
  }
72
- function ke({ size: e, ...t }) {
71
+ function Pe({ size: e, ...t }) {
73
72
  return /* @__PURE__ */ d("svg", { ...D(e), ...t, children: [
74
73
  /* @__PURE__ */ n("path", { d: "M18 6 6 18" }),
75
74
  /* @__PURE__ */ n("path", { d: "m6 6 12 12" })
@@ -95,17 +94,17 @@ const he = 20;
95
94
  function ue(e) {
96
95
  return Math.round(e / he) * he;
97
96
  }
98
- function Ne(e, t, r = 60) {
97
+ function Se(e, t, r = 60) {
99
98
  if (e.size === 0) return null;
100
99
  let s = 1 / 0, a = 1 / 0, u = -1 / 0, m = -1 / 0;
101
100
  for (const v of e.values())
102
101
  s = Math.min(s, v.x), a = Math.min(a, v.y), u = Math.max(u, v.x + v.width), m = Math.max(m, v.y + v.height);
103
- const f = u - s + r * 2, p = m - a + r * 2, b = t.width || window.innerWidth, h = t.height || window.innerHeight, k = Math.min(b / f, h / p, 1.5), M = (s + u) / 2, _ = (a + m) / 2;
102
+ const f = u - s + r * 2, p = m - a + r * 2, w = t.width || window.innerWidth, h = t.height || window.innerHeight, N = Math.min(w / f, h / p, 1.5), M = (s + u) / 2, P = (a + m) / 2;
104
103
  return {
105
- scale: Math.min(3, Math.max(0.2, k)),
104
+ scale: Math.min(3, Math.max(0.2, N)),
106
105
  offset: {
107
- x: b / 2 - M * k,
108
- y: h / 2 - _ * k
106
+ x: w / 2 - M * N,
107
+ y: h / 2 - P * N
109
108
  }
110
109
  };
111
110
  }
@@ -114,16 +113,16 @@ function je(e, t, r = 40, s = 1.5) {
114
113
  (a - r * 2) / m,
115
114
  (u - r * 2) / f,
116
115
  s
117
- ), b = Math.min(3, Math.max(0.2, p));
116
+ ), w = Math.min(3, Math.max(0.2, p));
118
117
  return {
119
- scale: b,
118
+ scale: w,
120
119
  offset: {
121
- x: a / 2 - (e.x + m / 2) * b,
122
- y: u / 2 - (e.y + f / 2) * b
120
+ x: a / 2 - (e.x + m / 2) * w,
121
+ y: u / 2 - (e.y + f / 2) * w
123
122
  }
124
123
  };
125
124
  }
126
- const g = De((e, t) => ({
125
+ const b = De((e, t) => ({
127
126
  offset: { x: 0, y: 0 },
128
127
  scale: 1,
129
128
  viewportSize: { width: 0, height: 0 },
@@ -149,7 +148,7 @@ const g = De((e, t) => ({
149
148
  t().resetFns.delete(r);
150
149
  },
151
150
  fitToContent: () => {
152
- const { panels: r, viewportSize: s } = t(), a = Ne(r, s);
151
+ const { panels: r, viewportSize: s } = t(), a = Se(r, s);
153
152
  a && e({ scale: a.scale, offset: a.offset });
154
153
  },
155
154
  focusPanel: (r, s) => {
@@ -164,7 +163,7 @@ const g = De((e, t) => ({
164
163
  resetWidgets: () => {
165
164
  for (const s of t().resetFns.values()) s();
166
165
  const r = (s = 0) => {
167
- const { panels: a, viewportSize: u } = t(), m = Ne(a, u);
166
+ const { panels: a, viewportSize: u } = t(), m = Se(a, u);
168
167
  if (m) {
169
168
  e({ scale: m.scale, offset: m.offset });
170
169
  return;
@@ -184,16 +183,16 @@ const g = De((e, t) => ({
184
183
  })
185
184
  }));
186
185
  function Ue({ extraActions: e }) {
187
- const t = g((h) => h.scale), r = g((h) => h.viewportSize), s = g((h) => h.snapToGrid), a = g((h) => h.setScale), u = g((h) => h.setOffset), m = g((h) => h.setSnapToGrid), f = g((h) => h.fitToContent), p = g((h) => h.resetWidgets);
186
+ const t = b((h) => h.scale), r = b((h) => h.viewportSize), s = b((h) => h.snapToGrid), a = b((h) => h.setScale), u = b((h) => h.setOffset), m = b((h) => h.setSnapToGrid), f = b((h) => h.fitToContent), p = b((h) => h.resetWidgets);
188
187
  Y(() => {
189
188
  s && window.dispatchEvent(new Event("whiteboard-snap-now"));
190
189
  }, [s]);
191
- const b = (h) => {
192
- const k = Math.min(3, Math.max(0.2, h)), M = k / t, _ = (r.width || window.innerWidth) / 2, v = (r.height || window.innerHeight) / 2;
193
- u((P) => ({
194
- x: _ - (_ - P.x) * M,
195
- y: v - (v - P.y) * M
196
- })), a(k);
190
+ const w = (h) => {
191
+ const N = Math.min(3, Math.max(0.2, h)), M = N / t, P = (r.width || window.innerWidth) / 2, v = (r.height || window.innerHeight) / 2;
192
+ u((z) => ({
193
+ x: P - (P - z.x) * M,
194
+ y: v - (v - z.y) * M
195
+ })), a(N);
197
196
  };
198
197
  return /* @__PURE__ */ d(
199
198
  "div",
@@ -202,12 +201,12 @@ function Ue({ extraActions: e }) {
202
201
  onPointerDown: (h) => h.stopPropagation(),
203
202
  onWheel: (h) => h.stopPropagation(),
204
203
  children: [
205
- /* @__PURE__ */ n("button", { type: "button", className: "wb-btn wb-btn--secondary wb-btn--icon-only zoom-bar__icon", onClick: () => b(t * 0.8), title: "Zoom out", "aria-label": "Zoom out", children: /* @__PURE__ */ n(Fe, { size: 14 }) }),
204
+ /* @__PURE__ */ n("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__ */ n(Fe, { size: 14 }) }),
206
205
  /* @__PURE__ */ d("span", { className: "zoom-bar__value", children: [
207
206
  Math.round(t * 100),
208
207
  "%"
209
208
  ] }),
210
- /* @__PURE__ */ n("button", { type: "button", className: "wb-btn wb-btn--secondary wb-btn--icon-only zoom-bar__icon", onClick: () => b(t * 1.2), title: "Zoom in", "aria-label": "Zoom in", children: /* @__PURE__ */ n(Ge, { size: 14 }) }),
209
+ /* @__PURE__ */ n("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__ */ n(Ge, { size: 14 }) }),
211
210
  /* @__PURE__ */ n("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__ */ n(Le, { size: 14 }) }),
212
211
  /* @__PURE__ */ n("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__ */ n(Ee, { size: 14 }) }),
213
212
  /* @__PURE__ */ n(
@@ -226,51 +225,51 @@ function Ue({ extraActions: e }) {
226
225
  }
227
226
  );
228
227
  }
229
- const ee = 200, te = 150, de = 40, xe = 1;
228
+ const ee = 200, te = 150, de = 40, ke = 1;
230
229
  function Ze({ loading: e = !1 }) {
231
- g((i) => i.registryVersion);
232
- const t = g((i) => i.offset), r = g((i) => i.scale), s = g((i) => i.viewportSize), a = g((i) => i.panels), u = g((i) => i.setOffset), m = g((i) => i.setScale), f = g((i) => i.focusPanel), p = S(null), b = S(!1), h = S(null), M = Array.from(a.entries()).filter(([, i]) => Number.isFinite(i.width) && Number.isFinite(i.height)), _ = M.map(([, i]) => i);
233
- if (e || _.length === 0)
230
+ b((i) => i.registryVersion);
231
+ const t = b((i) => i.offset), r = b((i) => i.scale), s = b((i) => i.viewportSize), a = b((i) => i.panels), u = b((i) => i.setOffset), m = b((i) => i.setScale), f = b((i) => i.focusPanel), p = k(null), w = k(!1), h = k(null), M = Array.from(a.entries()).filter(([, i]) => Number.isFinite(i.width) && Number.isFinite(i.height)), P = M.map(([, i]) => i);
232
+ if (e || P.length === 0)
234
233
  return /* @__PURE__ */ n("div", { className: "minimap minimap--loading", style: { width: ee, height: te }, children: /* @__PURE__ */ n("div", { className: "minimap__loading", children: /* @__PURE__ */ n(pe, { size: 14, className: "icon-spin" }) }) });
235
- const v = s.width || window.innerWidth, P = s.height || window.innerHeight, L = v / r, H = P / r, $ = -t.x / r, V = -t.y / r;
234
+ const v = s.width || window.innerWidth, z = s.height || window.innerHeight, L = v / r, H = z / r, $ = -t.x / r, V = -t.y / r;
236
235
  let I = 1 / 0, c = 1 / 0, R = -1 / 0, W = -1 / 0;
237
- for (const i of _)
236
+ for (const i of P)
238
237
  I = Math.min(I, i.x), c = Math.min(c, i.y), R = Math.max(R, i.x + i.width), W = Math.max(W, i.y + i.height);
239
238
  I -= de, c -= de, R += de, W += de;
240
- const z = Math.max(xe, R - I), O = Math.max(xe, W - c), C = Math.min(ee / z, te / O), E = z * C, U = O * C, Z = (ee - E) / 2, X = (te - U) / 2, q = (i) => Z + (i - I) * C, j = (i) => X + (i - c) * C, Q = (i, y) => {
239
+ const _ = Math.max(ke, R - I), O = Math.max(ke, W - c), C = Math.min(ee / _, te / O), E = _ * C, Z = O * C, q = (ee - E) / 2, X = (te - Z) / 2, K = (i) => q + (i - I) * C, j = (i) => X + (i - c) * C, Q = (i, y) => {
241
240
  if (!p.current) return;
242
- const x = p.current.getBoundingClientRect(), F = Math.min(ee, Math.max(0, i - x.left)), A = Math.min(te, Math.max(0, y - x.top)), ae = Math.min(E + Z, Math.max(Z, F)), ie = Math.min(U + X, Math.max(X, A)), oe = (ae - Z) / C + I, ce = (ie - X) / C + c;
241
+ const S = p.current.getBoundingClientRect(), F = Math.min(ee, Math.max(0, i - S.left)), A = Math.min(te, Math.max(0, y - S.top)), ae = Math.min(E + q, Math.max(q, F)), ie = Math.min(Z + X, Math.max(X, A)), oe = (ae - q) / C + I, ce = (ie - X) / C + c;
243
242
  return { worldX: oe, worldY: ce };
244
- }, K = (i, y, x) => {
245
- const F = Math.min(3, Math.max(0.2, x));
243
+ }, J = (i, y, S) => {
244
+ const F = Math.min(3, Math.max(0.2, S));
246
245
  m(F), u({
247
246
  x: v / 2 - i * F,
248
- y: P / 2 - y * F
247
+ y: z / 2 - y * F
249
248
  });
250
249
  }, se = (i, y) => {
251
- const x = Q(i, y);
252
- x && K(x.worldX, x.worldY, r);
253
- }, we = (i) => {
254
- i.stopPropagation(), i.preventDefault(), b.current = !0, i.currentTarget.setPointerCapture(i.pointerId), se(i.clientX, i.clientY);
250
+ const S = Q(i, y);
251
+ S && J(S.worldX, S.worldY, r);
252
+ }, ge = (i) => {
253
+ i.stopPropagation(), i.preventDefault(), w.current = !0, i.currentTarget.setPointerCapture(i.pointerId), se(i.clientX, i.clientY);
255
254
  }, o = (i) => {
256
- b.current && se(i.clientX, i.clientY);
257
- }, w = () => {
258
- b.current = !1;
255
+ w.current && se(i.clientX, i.clientY);
256
+ }, g = () => {
257
+ w.current = !1;
259
258
  };
260
259
  return /* @__PURE__ */ d(
261
260
  "div",
262
261
  {
263
262
  ref: p,
264
- onPointerDown: we,
263
+ onPointerDown: ge,
265
264
  onPointerMove: o,
266
- onPointerUp: w,
267
- onPointerCancel: w,
265
+ onPointerUp: g,
266
+ onPointerCancel: g,
268
267
  onWheel: (i) => {
269
268
  i.preventDefault(), i.stopPropagation();
270
269
  const y = Q(i.clientX, i.clientY);
271
270
  if (!y) return;
272
- const x = i.deltaY > 0 ? 0.9 : 1.1;
273
- K(y.worldX, y.worldY, r * x);
271
+ const S = i.deltaY > 0 ? 0.9 : 1.1;
272
+ J(y.worldX, y.worldY, r * S);
274
273
  },
275
274
  className: "minimap",
276
275
  style: {
@@ -282,23 +281,23 @@ function Ze({ loading: e = !1 }) {
282
281
  "div",
283
282
  {
284
283
  className: "minimap__panel",
285
- onPointerDown: (x) => {
286
- x.stopPropagation();
284
+ onPointerDown: (S) => {
285
+ S.stopPropagation();
287
286
  },
288
- onPointerUp: (x) => {
289
- x.stopPropagation();
287
+ onPointerUp: (S) => {
288
+ S.stopPropagation();
290
289
  const F = Date.now(), A = h.current;
291
290
  if (A && A.id === i && F - A.time < 300) {
292
- x.preventDefault(), f(y, { padding: y.focusPadding, maxScale: y.focusMaxScale }), h.current = null;
291
+ S.preventDefault(), f(y, { padding: y.focusPadding, maxScale: y.focusMaxScale }), h.current = null;
293
292
  return;
294
293
  }
295
294
  h.current = { id: i, time: F };
296
295
  },
297
- onDoubleClick: (x) => {
298
- x.preventDefault(), x.stopPropagation(), f(y, { padding: y.focusPadding, maxScale: y.focusMaxScale });
296
+ onDoubleClick: (S) => {
297
+ S.preventDefault(), S.stopPropagation(), f(y, { padding: y.focusPadding, maxScale: y.focusMaxScale });
299
298
  },
300
299
  style: {
301
- left: q(y.x),
300
+ left: K(y.x),
302
301
  top: j(y.y),
303
302
  width: Math.max(1, y.width * C),
304
303
  height: Math.max(1, y.height * C)
@@ -311,7 +310,7 @@ function Ze({ loading: e = !1 }) {
311
310
  {
312
311
  className: "minimap__viewport",
313
312
  style: {
314
- left: q($),
313
+ left: K($),
315
314
  top: j(V),
316
315
  width: L * C,
317
316
  height: H * C
@@ -323,19 +322,19 @@ function Ze({ loading: e = !1 }) {
323
322
  );
324
323
  }
325
324
  function xt({ children: e, showMinimap: t = !0, minimapLoading: r = !1, extraActions: s }) {
326
- const a = g((c) => c.offset), u = g((c) => c.scale), m = g((c) => c.registryVersion), f = g((c) => c.viewportSize), p = g((c) => c.setOffset), b = g((c) => c.setScale), h = g((c) => c.setViewportSize), k = S(null), M = S(!1), _ = S({ x: 0, y: 0 }), v = S(null), P = S(u), L = S(!1);
325
+ const a = b((c) => c.offset), u = b((c) => c.scale), m = b((c) => c.registryVersion), f = b((c) => c.viewportSize), p = b((c) => c.setOffset), w = b((c) => c.setScale), h = b((c) => c.setViewportSize), N = k(null), M = k(!1), P = k({ x: 0, y: 0 }), v = k(null), z = k(u), L = k(!1);
327
326
  Y(() => () => {
328
- g.getState().resetSession();
327
+ b.getState().resetSession();
329
328
  }, []), Y(() => {
330
- P.current = u;
329
+ z.current = u;
331
330
  }, [u]), Y(() => {
332
- const c = k.current;
331
+ const c = N.current;
333
332
  if (!c) return;
334
333
  const R = () => {
335
- const z = c.getBoundingClientRect();
334
+ const _ = c.getBoundingClientRect();
336
335
  h({
337
- width: Math.max(0, z.width),
338
- height: Math.max(0, z.height)
336
+ width: Math.max(0, _.width),
337
+ height: Math.max(0, _.height)
339
338
  });
340
339
  };
341
340
  if (R(), typeof ResizeObserver > "u") return;
@@ -343,17 +342,17 @@ function xt({ children: e, showMinimap: t = !0, minimapLoading: r = !1, extraAct
343
342
  return W.observe(c), () => W.disconnect();
344
343
  }, [h]), Y(() => {
345
344
  if (L.current) return;
346
- const { panels: c } = g.getState();
345
+ const { panels: c } = b.getState();
347
346
  c.size === 0 || f.width <= 0 || f.height <= 0 || (L.current = !0, requestAnimationFrame(() => {
348
- g.getState().fitToContent();
347
+ b.getState().fitToContent();
349
348
  }));
350
349
  }, [m, f]);
351
350
  const H = B((c) => {
352
- c.target === c.currentTarget && (c.button === 0 || c.button === 1) && (M.current = !0, v.current = c.pointerId, _.current = { x: c.clientX, y: c.clientY }, c.currentTarget.setPointerCapture(c.pointerId), c.preventDefault());
351
+ c.target === c.currentTarget && (c.button === 0 || c.button === 1) && (M.current = !0, v.current = c.pointerId, P.current = { x: c.clientX, y: c.clientY }, c.currentTarget.setPointerCapture(c.pointerId), c.preventDefault());
353
352
  }, []), $ = B((c) => {
354
353
  if (!M.current || v.current !== c.pointerId) return;
355
- const R = c.movementX ?? c.clientX - _.current.x, W = c.movementY ?? c.clientY - _.current.y;
356
- p((z) => ({ x: z.x + R, y: z.y + W })), _.current = { x: c.clientX, y: c.clientY };
354
+ const R = c.movementX ?? c.clientX - P.current.x, W = c.movementY ?? c.clientY - P.current.y;
355
+ p((_) => ({ x: _.x + R, y: _.y + W })), P.current = { x: c.clientX, y: c.clientY };
357
356
  }, [p]), V = B((c) => {
358
357
  if (v.current !== null)
359
358
  try {
@@ -362,17 +361,17 @@ function xt({ children: e, showMinimap: t = !0, minimapLoading: r = !1, extraAct
362
361
  }
363
362
  M.current = !1, v.current = null;
364
363
  }, []), I = B((c) => {
365
- const R = P.current, W = c.currentTarget.getBoundingClientRect(), z = { x: c.clientX - W.left, y: c.clientY - W.top }, O = Math.min(3, Math.max(0.2, R * (c.deltaY > 0 ? 0.9 : 1.1))), C = O / R;
364
+ const R = z.current, W = c.currentTarget.getBoundingClientRect(), _ = { x: c.clientX - W.left, y: c.clientY - W.top }, O = Math.min(3, Math.max(0.2, R * (c.deltaY > 0 ? 0.9 : 1.1))), C = O / R;
366
365
  p((E) => ({
367
- x: z.x - (z.x - E.x) * C,
368
- y: z.y - (z.y - E.y) * C
369
- })), b(O);
370
- }, [p, b]);
366
+ x: _.x - (_.x - E.x) * C,
367
+ y: _.y - (_.y - E.y) * C
368
+ })), w(O);
369
+ }, [p, w]);
371
370
  return /* @__PURE__ */ d(re, { children: [
372
371
  /* @__PURE__ */ n(
373
372
  "div",
374
373
  {
375
- ref: k,
374
+ ref: N,
376
375
  onPointerDown: H,
377
376
  onPointerMove: $,
378
377
  onPointerUp: V,
@@ -406,78 +405,78 @@ const St = Re(function({
406
405
  focusable: m,
407
406
  focusPadding: f = 40,
408
407
  focusMaxScale: p = 1.5,
409
- headerActions: b,
408
+ headerActions: w,
410
409
  children: h
411
410
  }) {
412
- const k = We(), [M, _] = Se(r), v = S(!1), P = S(M), L = S(null), H = S(null), $ = g((o) => o.scale), V = g((o) => o.snapToGrid), I = g((o) => o.snapGridSize), c = g((o) => o.register), R = g((o) => o.unregister), W = g((o) => o.registerReset), z = g((o) => o.unregisterReset), O = g((o) => o.focusPanel), C = S($), E = S(!1), U = S(20), Z = S(r), X = S(null), q = S(null);
411
+ const N = We(), [M, P] = Me(r), v = k(!1), z = k(M), L = k(null), H = k(null), $ = b((o) => o.scale), V = b((o) => o.snapToGrid), I = b((o) => o.snapGridSize), c = b((o) => o.register), R = b((o) => o.unregister), W = b((o) => o.registerReset), _ = b((o) => o.unregisterReset), O = b((o) => o.focusPanel), C = k($), E = k(!1), Z = k(20), q = k(r), X = k(null), K = k(null);
413
412
  Y(() => {
414
413
  C.current = $;
415
414
  }, [$]), Y(() => {
416
- E.current = V, U.current = I;
415
+ E.current = V, Z.current = I;
417
416
  }, [V, I]), Y(() => {
418
417
  const o = () => {
419
- const w = U.current;
420
- _((N) => {
418
+ const g = Z.current;
419
+ P((x) => {
421
420
  const i = {
422
- x: Math.round(N.x / w) * w,
423
- y: Math.round(N.y / w) * w
421
+ x: Math.round(x.x / g) * g,
422
+ y: Math.round(x.y / g) * g
424
423
  };
425
- return i.x === N.x && i.y === N.y ? N : i;
424
+ return i.x === x.x && i.y === x.y ? x : i;
426
425
  });
427
426
  };
428
427
  return window.addEventListener("whiteboard-snap-now", o), () => window.removeEventListener("whiteboard-snap-now", o);
429
428
  }, []), Y(() => {
430
- P.current = M;
429
+ z.current = M;
431
430
  }, [M]);
432
431
  const j = B(() => {
433
432
  const o = L.current;
434
433
  if (!o) return;
435
- const w = {
436
- x: P.current.x,
437
- y: P.current.y,
434
+ const g = {
435
+ x: z.current.x,
436
+ y: z.current.y,
438
437
  width: o.offsetWidth,
439
438
  height: o.offsetHeight,
440
439
  focusPadding: f,
441
440
  focusMaxScale: p
442
- }, N = H.current;
443
- N && N.x === w.x && N.y === w.y && N.width === w.width && N.height === w.height && N.focusPadding === w.focusPadding && N.focusMaxScale === w.focusMaxScale || (H.current = w, c(k, w), u && (u.current = w));
444
- }, [p, f, k, c, u]), Q = B(() => {
441
+ }, x = H.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 || (H.current = g, c(N, g), u && (u.current = g));
443
+ }, [p, f, N, c, u]), Q = B(() => {
445
444
  const o = L.current;
446
445
  return o ? {
447
- x: P.current.x,
448
- y: P.current.y,
446
+ x: z.current.x,
447
+ y: z.current.y,
449
448
  width: o.offsetWidth,
450
449
  height: o.offsetHeight,
451
450
  focusPadding: f,
452
451
  focusMaxScale: p
453
452
  } : null;
454
- }, [p, f]), K = B(() => {
453
+ }, [p, f]), J = B(() => {
455
454
  const o = Q();
456
455
  o && O(o, { padding: f, maxScale: p });
457
456
  }, [O, f, p, Q]);
458
- Y(() => (W(k, () => _(Z.current)), () => {
457
+ Y(() => (W(N, () => P(q.current)), () => {
459
458
  var o;
460
- (o = X.current) == null || o.call(X), R(k), z(k), H.current = null;
461
- }), [k, W, R, z]), Xe(() => {
459
+ (o = X.current) == null || o.call(X), R(N), _(N), H.current = null;
460
+ }), [N, W, R, _]), Xe(() => {
462
461
  j();
463
462
  }, [M.x, M.y, s, j]), Y(() => {
464
463
  const o = L.current;
465
464
  if (!o || typeof ResizeObserver > "u") return;
466
- const w = new ResizeObserver(() => {
465
+ const g = new ResizeObserver(() => {
467
466
  j();
468
467
  });
469
- return w.observe(o), () => w.disconnect();
468
+ return g.observe(o), () => g.disconnect();
470
469
  }, [j]);
471
470
  const se = B((o) => {
472
471
  var ae;
473
472
  if (o.button !== 0) return;
474
473
  v.current = !0;
475
- const w = o.clientX, N = o.clientY, i = P.current.x, y = P.current.y, x = C.current;
474
+ const g = o.clientX, x = o.clientY, i = z.current.x, y = z.current.y, S = C.current;
476
475
  o.preventDefault(), o.stopPropagation(), o.target.setPointerCapture(o.pointerId);
477
476
  const F = (ie) => {
478
477
  if (!v.current) return;
479
- const oe = i + (ie.clientX - w) / x, ce = y + (ie.clientY - N) / x, le = U.current, Ce = E.current ? Math.round(oe / le) * le : oe, Te = E.current ? Math.round(ce / le) * le : ce;
480
- _({
478
+ const oe = i + (ie.clientX - g) / S, ce = y + (ie.clientY - x) / S, le = Z.current, Ce = E.current ? Math.round(oe / le) * le : oe, Te = E.current ? Math.round(ce / le) * le : ce;
479
+ P({
481
480
  x: Ce,
482
481
  y: Te
483
482
  });
@@ -485,40 +484,40 @@ const St = Re(function({
485
484
  v.current = !1, window.removeEventListener("pointermove", F), window.removeEventListener("pointerup", A), X.current = null;
486
485
  };
487
486
  (ae = X.current) == null || ae.call(X), window.addEventListener("pointermove", F), window.addEventListener("pointerup", A), X.current = A;
488
- }, []), we = a ? `floating-panel ${a}` : "floating-panel";
487
+ }, []), ge = a ? `floating-panel ${a}` : "floating-panel";
489
488
  return /* @__PURE__ */ d(
490
489
  "div",
491
490
  {
492
491
  ref: L,
493
- className: we,
492
+ className: ge,
494
493
  style: { left: M.x, top: M.y, width: s },
495
494
  onPointerDown: (o) => o.stopPropagation(),
496
495
  onPointerUp: (o) => {
497
496
  if (v.current) return;
498
- const w = Date.now(), N = q.current;
499
- if (N && w - N.time < 300) {
500
- const i = o.clientX - N.x, y = o.clientY - N.y;
497
+ const g = Date.now(), x = K.current;
498
+ if (x && g - x.time < 300) {
499
+ const i = o.clientX - x.x, y = o.clientY - x.y;
501
500
  if (i * i + y * y < 100) {
502
- o.stopPropagation(), K(), q.current = null;
501
+ o.stopPropagation(), J(), K.current = null;
503
502
  return;
504
503
  }
505
504
  }
506
- q.current = { time: w, x: o.clientX, y: o.clientY };
505
+ K.current = { time: g, x: o.clientX, y: o.clientY };
507
506
  },
508
507
  onWheel: (o) => o.stopPropagation(),
509
508
  onDoubleClick: (o) => {
510
- o.stopPropagation(), K();
509
+ o.stopPropagation(), J();
511
510
  },
512
511
  children: [
513
512
  /* @__PURE__ */ d("div", { onPointerDown: se, className: "floating-panel__header", children: [
514
513
  /* @__PURE__ */ n("strong", { className: "floating-panel__title", children: t }),
515
- b,
514
+ w,
516
515
  m && /* @__PURE__ */ n(
517
516
  "button",
518
517
  {
519
518
  type: "button",
520
519
  className: "wb-btn wb-btn--secondary wb-btn--icon-only floating-panel__focus",
521
- onClick: K,
520
+ onClick: J,
522
521
  onPointerDown: (o) => o.stopPropagation(),
523
522
  title: "Focus on this panel",
524
523
  "aria-label": "Focus on this panel",
@@ -532,27 +531,28 @@ const St = Re(function({
532
531
  );
533
532
  });
534
533
  function kt(e) {
535
- return S({ ...e, width: 0, height: 0 });
534
+ return k({ ...e, width: 0, height: 0 });
536
535
  }
537
536
  function Mt(e, t = he) {
538
537
  return { x: e.x, y: e.y + e.height + t };
539
538
  }
540
- function _t({
539
+ function Pt({
541
540
  open: e,
542
541
  title: t,
543
542
  message: r,
544
543
  onConfirm: s,
545
544
  onCancel: a,
546
545
  confirmLabel: u = "Confirm",
547
- loading: m,
548
- error: f
546
+ loadingLabel: m,
547
+ loading: f,
548
+ error: p
549
549
  }) {
550
550
  return Y(() => {
551
551
  if (!e) return;
552
- const p = (b) => {
553
- b.key === "Escape" && a();
552
+ const w = (h) => {
553
+ h.key === "Escape" && a();
554
554
  };
555
- return window.addEventListener("keydown", p), () => window.removeEventListener("keydown", p);
555
+ return window.addEventListener("keydown", w), () => window.removeEventListener("keydown", w);
556
556
  }, [e, a]), !e || typeof document > "u" ? null : Ie(
557
557
  /* @__PURE__ */ n("div", { className: "confirm-modal-overlay", onMouseDown: a, children: /* @__PURE__ */ d(
558
558
  "div",
@@ -561,20 +561,20 @@ function _t({
561
561
  role: "dialog",
562
562
  "aria-modal": "true",
563
563
  "aria-label": t,
564
- onMouseDown: (p) => p.stopPropagation(),
564
+ onMouseDown: (w) => w.stopPropagation(),
565
565
  children: [
566
566
  /* @__PURE__ */ d("div", { className: "confirm-modal__header", children: [
567
567
  /* @__PURE__ */ d("span", { className: "confirm-modal__title", children: [
568
568
  /* @__PURE__ */ n(Be, { size: 16 }),
569
569
  t
570
570
  ] }),
571
- /* @__PURE__ */ n("button", { type: "button", className: "wb-btn wb-btn--secondary wb-btn--icon-only", onClick: a, "aria-label": "Close dialog", children: /* @__PURE__ */ n(ke, { size: 14 }) })
571
+ /* @__PURE__ */ n("button", { type: "button", className: "wb-btn wb-btn--secondary wb-btn--icon-only", onClick: a, "aria-label": "Close dialog", children: /* @__PURE__ */ n(Pe, { size: 14 }) })
572
572
  ] }),
573
573
  /* @__PURE__ */ n("p", { className: "confirm-modal__message", children: r }),
574
- f && /* @__PURE__ */ n("div", { className: "wb-alert wb-alert--error", children: f }),
574
+ p && /* @__PURE__ */ n("div", { className: "wb-alert wb-alert--error", children: p }),
575
575
  /* @__PURE__ */ d("div", { className: "wb-btn-row", children: [
576
576
  /* @__PURE__ */ n("button", { type: "button", className: "wb-btn wb-btn--secondary", onClick: a, children: "Cancel" }),
577
- /* @__PURE__ */ n("button", { type: "button", className: "wb-btn wb-btn--danger", onClick: s, disabled: m, children: m ? "Deleting..." : /* @__PURE__ */ d(re, { children: [
577
+ /* @__PURE__ */ n("button", { type: "button", className: "wb-btn wb-btn--danger", onClick: s, disabled: f, children: f ? m ?? `${u}…` : /* @__PURE__ */ d(re, { children: [
578
578
  /* @__PURE__ */ n(He, { size: 14 }),
579
579
  u
580
580
  ] }) })
@@ -585,7 +585,7 @@ function _t({
585
585
  document.body
586
586
  );
587
587
  }
588
- class Pt extends Ye {
588
+ class zt extends Ye {
589
589
  constructor() {
590
590
  super(...arguments), this.state = { error: null };
591
591
  }
@@ -607,7 +607,7 @@ class Pt extends Ye {
607
607
  ] }) : this.props.children;
608
608
  }
609
609
  }
610
- function zt({
610
+ function _t({
611
611
  widths: e,
612
612
  startX: t = 20,
613
613
  y: r = 40,
@@ -615,8 +615,8 @@ function zt({
615
615
  }) {
616
616
  const a = ye(() => {
617
617
  const f = {};
618
- for (const [p, b] of Object.entries(e))
619
- f[p] = ue(b);
618
+ for (const [p, w] of Object.entries(e))
619
+ f[p] = ue(w);
620
620
  return f;
621
621
  }, [e]), u = ye(
622
622
  () => ({
@@ -628,8 +628,8 @@ function zt({
628
628
  ), m = ye(() => {
629
629
  const f = {};
630
630
  let p = u.startX;
631
- for (const [b, h] of Object.entries(a))
632
- f[b] = { x: p, y: u.y }, p += h + u.gap;
631
+ for (const [w, h] of Object.entries(a))
632
+ f[w] = { x: p, y: u.y }, p += h + u.gap;
633
633
  return f;
634
634
  }, [u.gap, u.startX, u.y, a]);
635
635
  return { layout: u, panelWidth: a, positions: m };
@@ -638,10 +638,10 @@ function l(...e) {
638
638
  return e.filter(Boolean).join(" ");
639
639
  }
640
640
  const qe = {
641
- error: "status-error",
642
- muted: "text-sm text-muted",
643
- info: "ui-alert ui-alert--info",
644
- success: "ui-alert ui-alert--success"
641
+ error: "wb-alert wb-alert--error",
642
+ muted: "wb-alert wb-alert--muted",
643
+ info: "wb-alert wb-alert--info",
644
+ success: "wb-alert wb-alert--success"
645
645
  };
646
646
  function Ct({ tone: e = "info", className: t, ...r }) {
647
647
  return /* @__PURE__ */ n("p", { className: l(qe[e], t), ...r });
@@ -651,30 +651,32 @@ function Tt({ className: e, ...t }) {
651
651
  }
652
652
  const Ke = {
653
653
  primary: "",
654
- secondary: "secondary-btn",
655
- danger: "danger-btn"
656
- }, Me = me(function({
654
+ secondary: "wb-btn--secondary",
655
+ danger: "wb-btn--danger"
656
+ }, ze = me(function({
657
657
  variant: t = "primary",
658
658
  fullWidth: r = !1,
659
659
  iconOnly: s = !1,
660
660
  loading: a = !1,
661
- disabled: u,
662
- className: m,
663
- children: f,
664
- loadingText: p,
665
- ...b
666
- }, h) {
661
+ type: u = "button",
662
+ disabled: m,
663
+ className: f,
664
+ children: p,
665
+ loadingText: w,
666
+ ...h
667
+ }, N) {
667
668
  return /* @__PURE__ */ n(
668
669
  "button",
669
670
  {
670
- ref: h,
671
- className: l(Ke[t], r && "full-width-btn", s && "icon-only-btn", m),
672
- disabled: u || a,
673
- ...b,
671
+ ref: N,
672
+ type: u,
673
+ className: l("wb-btn", Ke[t], r && "wb-btn--full-width", s && "wb-btn--icon-only", f),
674
+ disabled: m || a,
675
+ ...h,
674
676
  children: a ? /* @__PURE__ */ d(re, { children: [
675
677
  /* @__PURE__ */ n(pe, { size: 14, className: "icon-spin" }),
676
- p || f
677
- ] }) : f
678
+ w || p
679
+ ] }) : p
678
680
  }
679
681
  );
680
682
  });
@@ -742,7 +744,7 @@ function Yt(e) {
742
744
  const { className: t, ...r } = e;
743
745
  return /* @__PURE__ */ n(G, { className: l("skeleton-textarea", t), ...r });
744
746
  }
745
- function _e(e) {
747
+ function Ne(e) {
746
748
  const { className: t, ...r } = e;
747
749
  return /* @__PURE__ */ n(G, { className: l("skeleton-thumb", t), ...r });
748
750
  }
@@ -750,11 +752,11 @@ function ne(e) {
750
752
  const { className: t, ...r } = e;
751
753
  return /* @__PURE__ */ n(G, { radius: "pill", className: l("skeleton-chip", t), ...r });
752
754
  }
753
- function ge(e) {
755
+ function be(e) {
754
756
  const { className: t, ...r } = e;
755
757
  return /* @__PURE__ */ n(G, { className: l("skeleton-title", t), ...r });
756
758
  }
757
- function be({ short: e = !1, className: t, ...r }) {
759
+ function we({ short: e = !1, className: t, ...r }) {
758
760
  return /* @__PURE__ */ n(G, { className: l("skeleton-line", e && "skeleton-line--short", t), ...r });
759
761
  }
760
762
  function rt(e) {
@@ -787,8 +789,8 @@ function It({
787
789
  }
788
790
  function Ft({ count: e = 4, className: t, withDescription: r = !1 }) {
789
791
  return /* @__PURE__ */ n(fe, { className: l("choice-list", t), "aria-hidden": !0, children: Array.from({ length: e }).map((s, a) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ d("div", { className: "choice-card", children: [
790
- /* @__PURE__ */ n(ge, { className: l("skeleton-title--sm", !r && "skeleton-choice-label") }),
791
- r ? /* @__PURE__ */ n(be, { short: !0 }) : null
792
+ /* @__PURE__ */ n(be, { className: l("skeleton-title--sm", !r && "skeleton-choice-label") }),
793
+ r ? /* @__PURE__ */ n(we, { short: !0 }) : null
792
794
  ] }) }, `choice-skeleton-${a}`)) });
793
795
  }
794
796
  function Gt({ className: e, ...t }) {
@@ -801,7 +803,7 @@ function Lt({ axis: e, className: t, ...r }) {
801
803
  /* @__PURE__ */ n("input", { type: "number", step: "0.01", ...r })
802
804
  ] });
803
805
  }
804
- function J({
806
+ function U({
805
807
  as: e,
806
808
  size: t = "md",
807
809
  className: r,
@@ -829,7 +831,7 @@ function Et({ as: e = "h3", className: t, ...r }) {
829
831
  ...r
830
832
  });
831
833
  }
832
- function Pe({ as: e = "p", size: t = "sm", className: r, ...s }) {
834
+ function _e({ as: e = "p", size: t = "sm", className: r, ...s }) {
833
835
  return T(e, {
834
836
  className: l(st[t], "text-muted", r),
835
837
  ...s
@@ -854,9 +856,9 @@ function ot({ as: e = "p", className: t, ...r }) {
854
856
  });
855
857
  }
856
858
  function Ot({ title: e, description: t, action: r }) {
857
- return /* @__PURE__ */ d(J, { size: "sm", children: [
859
+ return /* @__PURE__ */ d(U, { size: "sm", children: [
858
860
  /* @__PURE__ */ n(at, { children: e }),
859
- t ? /* @__PURE__ */ n(Pe, { children: t }) : null,
861
+ t ? /* @__PURE__ */ n(_e, { children: t }) : null,
860
862
  r
861
863
  ] });
862
864
  }
@@ -883,7 +885,7 @@ function Bt({
883
885
  /* @__PURE__ */ d(re, { children: [
884
886
  t ? /* @__PURE__ */ n(ct, { htmlFor: r, children: t }) : null,
885
887
  f,
886
- s ? /* @__PURE__ */ n(Pe, { size: "xs", children: s }) : null,
888
+ s ? /* @__PURE__ */ n(_e, { size: "xs", children: s }) : null,
887
889
  a ? /* @__PURE__ */ n("p", { className: "field-error", children: a }) : null
888
890
  ] })
889
891
  );
@@ -920,8 +922,8 @@ function Vt({
920
922
  className: m,
921
923
  ...f
922
924
  }) {
923
- const [p, b] = Se(null), h = !!(e && p === e), k = l("image-thumb", `image-thumb--${s}`, `image-thumb--fit-${a}`, m);
924
- return /* @__PURE__ */ n("div", { className: k, ...f, children: e && !h ? /* @__PURE__ */ n(
925
+ const [p, w] = Me(null), h = !!(e && p === e), N = l("image-thumb", `image-thumb--${s}`, `image-thumb--fit-${a}`, m);
926
+ return /* @__PURE__ */ n("div", { className: N, ...f, children: e && !h ? /* @__PURE__ */ n(
925
927
  "img",
926
928
  {
927
929
  src: e,
@@ -929,7 +931,7 @@ function Vt({
929
931
  className: "image-thumb__img",
930
932
  style: { objectFit: a, objectPosition: "center" },
931
933
  onError: () => {
932
- b(e), u == null || u();
934
+ w(e), u == null || u();
933
935
  }
934
936
  }
935
937
  ) : /* @__PURE__ */ n("span", { className: "image-thumb__placeholder", children: r }) });
@@ -948,7 +950,7 @@ function lt({
948
950
  const jt = me(function({ className: t, ...r }, s) {
949
951
  return /* @__PURE__ */ n("input", { ref: s, className: l(t), ...r });
950
952
  });
951
- function ze({ as: e = "div", className: t, ...r }) {
953
+ function xe({ as: e = "div", className: t, ...r }) {
952
954
  return T(e, {
953
955
  className: l("item-card", t),
954
956
  ...r
@@ -975,7 +977,7 @@ function Zt({
975
977
  ...u
976
978
  }) {
977
979
  return /* @__PURE__ */ n(
978
- Me,
980
+ ze,
979
981
  {
980
982
  variant: "secondary",
981
983
  iconOnly: !0,
@@ -1000,8 +1002,8 @@ function Kt({ children: e, className: t, ...r }) {
1000
1002
  return /* @__PURE__ */ n("div", { className: l("page-card", t), ...r, children: e });
1001
1003
  }
1002
1004
  function Jt({ onClick: e, label: t = "Close" }) {
1003
- return /* @__PURE__ */ d(Me, { variant: "secondary", className: "panel-close-btn", onClick: e, children: [
1004
- /* @__PURE__ */ n(ke, { size: 14 }),
1005
+ return /* @__PURE__ */ d(ze, { variant: "secondary", className: "panel-close-btn", onClick: e, children: [
1006
+ /* @__PURE__ */ n(Pe, { size: 14 }),
1005
1007
  t
1006
1008
  ] });
1007
1009
  }
@@ -1054,14 +1056,24 @@ const rn = me(function({ className: t, ...r }, s) {
1054
1056
  function ft({ variant: e, className: t, ...r }) {
1055
1057
  return /* @__PURE__ */ n("div", { className: l("split-layout", pt[e], t), ...r });
1056
1058
  }
1057
- function gt({ className: e, ...t }) {
1059
+ function bt({ className: e, ...t }) {
1058
1060
  return /* @__PURE__ */ n("div", { className: l("tag-row", e), ...t });
1059
1061
  }
1060
1062
  const sn = me(function({ className: t, ...r }, s) {
1061
1063
  return /* @__PURE__ */ n("textarea", { ref: s, className: l(t), ...r });
1062
1064
  });
1063
1065
  function an({ className: e, theme: t = "light", onToggle: r, lightIcon: s, darkIcon: a }) {
1064
- return /* @__PURE__ */ n("button", { className: e, onClick: r, title: `Switch to ${t === "light" ? "dark" : "light"} mode`, "aria-label": "Toggle theme", children: t === "light" ? a ?? /* @__PURE__ */ n($e, {}) : s ?? /* @__PURE__ */ n(Ve, {}) });
1066
+ return /* @__PURE__ */ n(
1067
+ "button",
1068
+ {
1069
+ type: "button",
1070
+ className: l("wb-btn", "wb-btn--secondary", "wb-btn--icon-only", e),
1071
+ onClick: r,
1072
+ title: `Switch to ${t === "light" ? "dark" : "light"} mode`,
1073
+ "aria-label": "Toggle theme",
1074
+ children: t === "light" ? a ?? /* @__PURE__ */ n($e, { size: 14 }) : s ?? /* @__PURE__ */ n(Ve, { size: 14 })
1075
+ }
1076
+ );
1065
1077
  }
1066
1078
  function on({ className: e, ...t }) {
1067
1079
  return /* @__PURE__ */ n("div", { className: l("title-row", e), ...t });
@@ -1091,46 +1103,44 @@ function cn({
1091
1103
  );
1092
1104
  }
1093
1105
  function ln({ inputs: e = 1, showButton: t = !0, className: r, ...s }) {
1094
- return /* @__PURE__ */ d(J, { className: r, ...s, children: [
1106
+ return /* @__PURE__ */ d(U, { className: r, ...s, children: [
1095
1107
  Array.from({ length: e }).map((a, u) => /* @__PURE__ */ n(tt, {}, `panel-form-input-${u}`)),
1096
1108
  t && /* @__PURE__ */ n(ve, {})
1097
1109
  ] });
1098
1110
  }
1099
1111
  function un() {
1100
- return /* @__PURE__ */ d("article", { className: "story-card", children: [
1101
- /* @__PURE__ */ n("div", { className: "story-cover", children: /* @__PURE__ */ n("div", { className: "story-cover__placeholder story-cover__placeholder--skeleton" }) }),
1102
- /* @__PURE__ */ n("div", { className: "story-card__overlay story-card__overlay--skeleton", children: /* @__PURE__ */ d("div", { className: "story-card__overlay-text", children: [
1103
- /* @__PURE__ */ d(lt, { as: "header", children: [
1104
- /* @__PURE__ */ n(ne, {}),
1105
- /* @__PURE__ */ n(ne, {})
1106
- ] }),
1107
- /* @__PURE__ */ n(ge, {}),
1108
- /* @__PURE__ */ n(be, { short: !0 })
1109
- ] }) })
1110
- ] });
1112
+ return /* @__PURE__ */ n(xe, { children: /* @__PURE__ */ d(U, { size: "sm", children: [
1113
+ /* @__PURE__ */ n(Ne, {}),
1114
+ /* @__PURE__ */ d(lt, { as: "header", children: [
1115
+ /* @__PURE__ */ n(ne, {}),
1116
+ /* @__PURE__ */ n(ne, {})
1117
+ ] }),
1118
+ /* @__PURE__ */ n(be, {}),
1119
+ /* @__PURE__ */ n(we, { short: !0 })
1120
+ ] }) });
1111
1121
  }
1112
- function bt() {
1113
- return /* @__PURE__ */ n(ze, { as: "li", children: /* @__PURE__ */ d(ft, { variant: "user", children: [
1122
+ function wt() {
1123
+ return /* @__PURE__ */ n(xe, { as: "li", children: /* @__PURE__ */ d(ft, { variant: "user", children: [
1114
1124
  /* @__PURE__ */ n(rt, {}),
1115
- /* @__PURE__ */ d(J, { size: "sm", children: [
1116
- /* @__PURE__ */ n(ge, {}),
1117
- /* @__PURE__ */ n(be, { short: !0 })
1125
+ /* @__PURE__ */ d(U, { size: "sm", children: [
1126
+ /* @__PURE__ */ n(be, {}),
1127
+ /* @__PURE__ */ n(we, { short: !0 })
1118
1128
  ] }),
1119
- /* @__PURE__ */ d(J, { size: "sm", children: [
1129
+ /* @__PURE__ */ d(U, { size: "sm", children: [
1120
1130
  /* @__PURE__ */ n(ne, {}),
1121
1131
  /* @__PURE__ */ n(nt, {})
1122
1132
  ] })
1123
1133
  ] }) });
1124
1134
  }
1125
1135
  function dn({ count: e = 3 }) {
1126
- return /* @__PURE__ */ n(ut, { as: "ul", children: Array.from({ length: e }).map((t, r) => /* @__PURE__ */ n(bt, {}, `user-skeleton-${r}`)) });
1136
+ return /* @__PURE__ */ n(ut, { as: "ul", children: Array.from({ length: e }).map((t, r) => /* @__PURE__ */ n(wt, {}, `user-skeleton-${r}`)) });
1127
1137
  }
1128
1138
  function hn() {
1129
- return /* @__PURE__ */ d(ze, { as: "li", children: [
1130
- /* @__PURE__ */ d(J, { size: "sm", children: [
1131
- /* @__PURE__ */ n(_e, { className: "asset-thumb" }),
1132
- /* @__PURE__ */ n(ge, {}),
1133
- /* @__PURE__ */ d(gt, { children: [
1139
+ return /* @__PURE__ */ d(xe, { as: "li", children: [
1140
+ /* @__PURE__ */ d(U, { size: "sm", children: [
1141
+ /* @__PURE__ */ n(Ne, {}),
1142
+ /* @__PURE__ */ n(be, {}),
1143
+ /* @__PURE__ */ d(bt, { children: [
1134
1144
  /* @__PURE__ */ n(ne, {}),
1135
1145
  /* @__PURE__ */ n(ne, {})
1136
1146
  ] })
@@ -1142,9 +1152,9 @@ function hn() {
1142
1152
  ] });
1143
1153
  }
1144
1154
  function mn({ count: e = 8, gridClass: t }) {
1145
- return /* @__PURE__ */ n(fe, { className: l("picker-grid", t), children: Array.from({ length: e }).map((r, s) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(dt, { as: "div", className: "picker-card--skeleton", children: /* @__PURE__ */ d(J, { size: "sm", children: [
1146
- /* @__PURE__ */ n(_e, { className: "asset-thumb" }),
1147
- /* @__PURE__ */ n(be, { short: !0 })
1155
+ return /* @__PURE__ */ n(fe, { className: l("picker-grid", t), children: Array.from({ length: e }).map((r, s) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(dt, { as: "div", className: "picker-card--skeleton", children: /* @__PURE__ */ d(U, { size: "sm", children: [
1156
+ /* @__PURE__ */ n(Ne, {}),
1157
+ /* @__PURE__ */ n(we, { short: !0 })
1148
1158
  ] }) }) }, `picker-skeleton-${s}`)) });
1149
1159
  }
1150
1160
  export {
@@ -1153,7 +1163,7 @@ export {
1153
1163
  at as AssetTitle,
1154
1164
  Tt as AvatarBadge,
1155
1165
  rt as AvatarSkeleton,
1156
- Me as Button,
1166
+ ze as Button,
1157
1167
  Je as ButtonRow,
1158
1168
  ve as ButtonSkeleton,
1159
1169
  Dt as CanvasSkeleton,
@@ -1163,7 +1173,7 @@ export {
1163
1173
  Qe as ChoiceCard,
1164
1174
  It as ChoiceGroup,
1165
1175
  Ft as ChoiceGroupSkeleton,
1166
- _t as ConfirmDialog,
1176
+ Pt as ConfirmDialog,
1167
1177
  Gt as CoordGrid,
1168
1178
  Lt as CoordInput,
1169
1179
  Ot as EmptyState,
@@ -1176,20 +1186,20 @@ export {
1176
1186
  lt as Inline,
1177
1187
  jt as Input,
1178
1188
  tt as InputSkeleton,
1179
- ze as ItemCard,
1189
+ xe as ItemCard,
1180
1190
  ut as ItemList,
1181
1191
  ct as Label,
1182
- be as LineSkeleton,
1192
+ we as LineSkeleton,
1183
1193
  fe as List,
1184
1194
  Ut as LoadingState,
1185
1195
  Ze as Minimap,
1186
- Pe as MutedText,
1196
+ _e as MutedText,
1187
1197
  Zt as OverlayIconButton,
1188
1198
  Kt as PageCard,
1189
1199
  qt as PageShell,
1190
1200
  At as PageTitle,
1191
1201
  Jt as PanelCloseButton,
1192
- Pt as PanelErrorBoundary,
1202
+ zt as PanelErrorBoundary,
1193
1203
  ln as PanelFormSkeleton,
1194
1204
  Qt as PanelSection,
1195
1205
  en as PanelTitle,
@@ -1203,17 +1213,17 @@ export {
1203
1213
  nt as SelectSkeleton,
1204
1214
  G as Skeleton,
1205
1215
  ft as SplitLayout,
1206
- J as Stack,
1216
+ U as Stack,
1207
1217
  un as StoryCardSkeleton,
1208
1218
  Et as StoryTitle,
1209
- gt as TagRow,
1219
+ bt as TagRow,
1210
1220
  sn as Textarea,
1211
1221
  Yt as TextareaSkeleton,
1212
1222
  an as ThemeToggle,
1213
- _e as ThumbSkeleton,
1223
+ Ne as ThumbSkeleton,
1214
1224
  on as TitleRow,
1215
- ge as TitleSkeleton,
1216
- bt as UserCardSkeleton,
1225
+ be as TitleSkeleton,
1226
+ wt as UserCardSkeleton,
1217
1227
  dn as UserListSkeleton,
1218
1228
  cn as VerticalToolbar,
1219
1229
  he as WHITEBOARD_GRID,
@@ -1221,10 +1231,10 @@ export {
1221
1231
  Ue as ZoomBar,
1222
1232
  Mt as belowPanel,
1223
1233
  l as cn,
1224
- Ne as computeWhiteboardFit,
1234
+ Se as computeWhiteboardFit,
1225
1235
  je as computeWhiteboardRectFocus,
1226
1236
  ue as snapToWhiteboardGrid,
1227
1237
  kt as usePanelRect,
1228
- zt as useWhiteboardLayout,
1229
- g as useWhiteboardStore
1238
+ _t as useWhiteboardLayout,
1239
+ b as useWhiteboardStore
1230
1240
  };