@floegence/floe-webapp-core 0.36.4 → 0.36.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,52 +1,53 @@
1
- import { createComponent as s, Portal as Oe, insert as w, effect as u, setAttribute as Y, addEventListener as g, className as a, memo as Xe, setStyleProperty as I, template as E, use as Ye, delegateEvents as qe } from "solid-js/web";
2
- import { createUniqueId as Te, createSignal as x, onMount as Be, onCleanup as q, createEffect as $, Show as p, batch as Ue } from "solid-js";
3
- import { cn as C } from "../../utils/cn.js";
4
- import { useLayout as Ne } from "../../context/LayoutContext.js";
5
- import { Button as ze } from "./Button.js";
6
- import { Restore as je, Maximize as Ge, X as Ve } from "../icons/index.js";
7
- import { startHotInteraction as Ze } from "../../utils/hotInteraction.js";
8
- import { normalizeFloatingWindowRect as pe, resolveFloatingWindowRect as Je } from "./floatingWindowGeometry.js";
9
- var Ke = /* @__PURE__ */ E('<h2 class="text-sm font-medium truncate select-none">'), Qe = /* @__PURE__ */ E('<div class="flex items-center justify-end gap-2 p-3 border-t border-border">'), m = /* @__PURE__ */ E("<div style=touch-action:none>"), et = /* @__PURE__ */ E('<div data-floe-geometry-surface=floating-window role=dialog tabindex=-1><div data-floe-dialog-surface-host=true data-floe-floating-window-surface=true><div data-floe-floating-window-titlebar=true style=touch-action:none><div class="flex-1 min-w-0"></div><div class="flex items-center gap-0.5 -mr-1"></div></div><div class="flex-1 overflow-auto p-3">');
1
+ import { createComponent as a, Portal as Ee, spread as ae, mergeProps as se, memo as de, insert as g, effect as u, setAttribute as Ae, addEventListener as m, className as c, template as s, use as Me, delegateEvents as Fe } from "solid-js/web";
2
+ import { createUniqueId as Le, createSignal as v, onMount as De, onCleanup as T, createEffect as S, Show as y, batch as ke } from "solid-js";
3
+ import { cn as _ } from "../../utils/cn.js";
4
+ import { useLayout as We } from "../../context/LayoutContext.js";
5
+ import { Button as ue } from "./Button.js";
6
+ import { Restore as Oe, Maximize as Te, X as He } from "../icons/index.js";
7
+ import { startHotInteraction as Xe } from "../../utils/hotInteraction.js";
8
+ import { normalizeFloatingWindowRect as ce, resolveFloatingWindowRect as Ue } from "./floatingWindowGeometry.js";
9
+ import { LOCAL_INTERACTION_SURFACE_ATTR as fe } from "./localInteractionSurface.js";
10
+ var Ye = /* @__PURE__ */ s('<h2 class="text-sm font-medium truncate select-none">'), qe = /* @__PURE__ */ s('<div class="flex items-center justify-end gap-2 p-3 border-t border-border">'), Ne = /* @__PURE__ */ s("<div data-floe-floating-window-resize-handle=n style=touch-action:none>"), Be = /* @__PURE__ */ s("<div data-floe-floating-window-resize-handle=s style=touch-action:none>"), je = /* @__PURE__ */ s("<div data-floe-floating-window-resize-handle=e style=touch-action:none>"), Ge = /* @__PURE__ */ s("<div data-floe-floating-window-resize-handle=w style=touch-action:none>"), Ve = /* @__PURE__ */ s("<div data-floe-floating-window-resize-handle=ne style=touch-action:none>"), Ze = /* @__PURE__ */ s("<div data-floe-floating-window-resize-handle=nw style=touch-action:none>"), Je = /* @__PURE__ */ s("<div data-floe-floating-window-resize-handle=se style=touch-action:none>"), Ke = /* @__PURE__ */ s("<div data-floe-floating-window-resize-handle=sw style=touch-action:none>"), Qe = /* @__PURE__ */ s('<div data-floe-geometry-surface=floating-window><div data-floe-dialog-surface-host=true data-floe-floating-window-surface=true><div data-floe-floating-window-titlebar=true style=touch-action:none><div class="flex-1 min-w-0"></div><div class="flex items-center gap-0.5 -mr-1"></div></div><div class="flex-1 overflow-auto p-3">');
10
11
  function dt(i) {
11
- const T = () => i.resizable ?? !0, B = () => i.draggable ?? !0, M = () => i.minSize ?? {
12
+ const H = () => i.resizable ?? !0, X = () => i.draggable ?? !0, R = () => i.minSize ?? {
12
13
  width: 200,
13
14
  height: 150
14
- }, F = () => i.maxSize ?? {
15
+ }, C = () => i.maxSize ?? {
15
16
  width: 1 / 0,
16
17
  height: 1 / 0
17
- }, be = () => i.zIndex ?? 100, Pe = Te(), Se = Ne(), b = () => Se.isMobile(), L = 16, U = () => `floating-window-${Pe}-title`, [_, Ie] = x(i.defaultPosition ?? {
18
+ }, he = () => i.zIndex ?? 100, we = Le(), ge = We(), b = () => ge.isMobile(), E = 16, U = () => `floating-window-${we}-title`, [A, me] = v(i.defaultPosition ?? {
18
19
  x: 0,
19
20
  y: 0
20
- }), [A, $e] = x(i.defaultSize ?? {
21
+ }), [M, pe] = v(i.defaultSize ?? {
21
22
  width: 400,
22
23
  height: 300
23
- }), [d, N] = x(!1), [j, G] = x(!1), [V, Z] = x(!1), [Re, D] = x(!1), [Ce, Ee] = x(null);
24
- let J = {
24
+ }), [d, Y] = v(!1), [q, N] = v(!1), [B, j] = v(!1), [ve, F] = v(!1), [xe, ze] = v(null);
25
+ let G = {
25
26
  x: 0,
26
27
  y: 0
27
- }, K = {
28
+ }, V = {
28
29
  x: 0,
29
30
  y: 0,
30
31
  width: 0,
31
32
  height: 0
32
- }, Q = {
33
+ }, Z = {
33
34
  x: 0,
34
35
  y: 0
35
- }, ee = {
36
+ }, J = {
36
37
  x: 0,
37
38
  y: 0,
38
39
  width: 0,
39
40
  height: 0
40
- }, te = "se", r, l = null, v = null, P = {
41
+ }, K = "se", r, l = null, p = null, P = {
41
42
  x: 0,
42
43
  y: 0
43
- }, y = null, R = null, ne = !1, z = {
44
+ }, x = null, I = null, Q = !1, z = {
44
45
  x: i.defaultPosition?.x ?? 0,
45
46
  y: i.defaultPosition?.y ?? 0,
46
47
  width: i.defaultSize?.width ?? 400,
47
48
  height: i.defaultSize?.height ?? 300
48
49
  };
49
- const Me = {
50
+ const ye = {
50
51
  n: "ns-resize",
51
52
  s: "ns-resize",
52
53
  e: "ew-resize",
@@ -55,45 +56,45 @@ function dt(i) {
55
56
  nw: "nwse-resize",
56
57
  se: "nwse-resize",
57
58
  sw: "nesw-resize"
58
- }, k = (e, n) => {
59
+ }, L = (e, t) => {
59
60
  if (!e) {
60
- R?.(), R = null;
61
+ I?.(), I = null;
61
62
  return;
62
63
  }
63
- R?.(), R = Ze({
64
- kind: v === "resize" ? "resize" : "drag",
65
- cursor: n,
64
+ I?.(), I = Xe({
65
+ kind: p === "resize" ? "resize" : "drag",
66
+ cursor: t,
66
67
  lockUserSelect: !0
67
68
  });
68
- }, ie = (e) => {
69
+ }, ee = (e) => {
69
70
  z = e, r && (r.style.transform = `translate3d(${e.x}px, ${e.y}px, 0)`, r.style.width = `${e.width}px`, r.style.height = `${e.height}px`);
70
- }, W = () => {
71
- const e = _(), n = A();
71
+ }, D = () => {
72
+ const e = A(), t = M();
72
73
  return {
73
74
  x: e.x,
74
75
  y: e.y,
75
- width: n.width,
76
- height: n.height
76
+ width: t.width,
77
+ height: t.height
77
78
  };
78
- }, S = (e) => {
79
- z = e, Ie({
79
+ }, $ = (e) => {
80
+ z = e, me({
80
81
  x: e.x,
81
82
  y: e.y
82
- }), $e({
83
+ }), pe({
83
84
  width: e.width,
84
85
  height: e.height
85
86
  });
86
- }, Fe = () => {
87
+ }, be = () => {
87
88
  try {
88
89
  r?.focus({
89
90
  preventScroll: !0
90
91
  });
91
92
  } catch {
92
93
  }
93
- }, Le = (e) => {
94
- const n = e instanceof Element ? e : null;
95
- return n ? n.closest('button, input, select, textarea, a, [role="button"], [tabindex]:not([tabindex="-1"])') === null : !0;
96
- }, H = (e) => !!r && e instanceof Node && r.contains(e), _e = () => {
94
+ }, Pe = (e) => {
95
+ const t = e instanceof Element ? e : null;
96
+ return t ? t.closest('button, input, select, textarea, a, [role="button"], [tabindex]:not([tabindex="-1"])') === null : !0;
97
+ }, k = (e) => !!r && e instanceof Node && r.contains(e), $e = () => {
97
98
  if (!r) return null;
98
99
  const e = r.getBoundingClientRect();
99
100
  return {
@@ -102,176 +103,176 @@ function dt(i) {
102
103
  width: e.width,
103
104
  height: e.height
104
105
  };
105
- }, re = () => {
106
- i.open && (l === null || v === null || typeof window > "u" || ie(Je({
107
- mode: v,
106
+ }, te = () => {
107
+ i.open && (l === null || p === null || typeof window > "u" || ee(Ue({
108
+ mode: p,
108
109
  pointer: P,
109
- dragStartPos: J,
110
- dragStartRect: K,
111
- resizeStartPos: Q,
112
- resizeStartRect: ee,
113
- resizeHandle: te,
114
- minSize: M(),
115
- maxSize: F(),
110
+ dragStartPos: G,
111
+ dragStartRect: V,
112
+ resizeStartPos: Z,
113
+ resizeStartRect: J,
114
+ resizeHandle: K,
115
+ minSize: R(),
116
+ maxSize: C(),
116
117
  viewport: {
117
118
  width: window.innerWidth,
118
119
  height: window.innerHeight
119
120
  },
120
121
  mobile: b(),
121
- mobilePadding: L
122
+ mobilePadding: E
122
123
  })));
123
- }, O = (e) => {
124
+ }, W = (e) => {
124
125
  if (typeof window > "u") return;
125
- const n = {
126
+ const t = {
126
127
  width: window.innerWidth,
127
128
  height: window.innerHeight
128
129
  };
129
130
  if (d()) {
130
- S({
131
+ $({
131
132
  x: 0,
132
133
  y: 0,
133
- width: n.width,
134
- height: n.height
134
+ width: t.width,
135
+ height: t.height
135
136
  });
136
137
  return;
137
138
  }
138
- S(pe({
139
- rect: W(),
140
- minSize: M(),
141
- maxSize: F(),
142
- viewport: n,
139
+ $(ce({
140
+ rect: D(),
141
+ minSize: R(),
142
+ maxSize: C(),
143
+ viewport: t,
143
144
  mobile: b(),
144
- mobilePadding: L,
145
+ mobilePadding: E,
145
146
  center: e?.center ?? !1
146
147
  }));
147
- }, X = (e, n = !0) => {
148
- y !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(y), y = null), n && re();
149
- const o = n ? _e() ?? z : null;
148
+ }, O = (e, t = !0) => {
149
+ x !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(x), x = null), t && te();
150
+ const o = t ? $e() ?? z : null;
150
151
  if (e !== void 0)
151
152
  try {
152
153
  typeof r?.releasePointerCapture == "function" && r.releasePointerCapture(e);
153
154
  } catch {
154
155
  }
155
- Ue(() => {
156
- o && S(o), l = null, v = null, G(!1), Z(!1);
157
- }), k(!1, "");
156
+ ke(() => {
157
+ o && $(o), l = null, p = null, N(!1), j(!1);
158
+ }), L(!1, "");
158
159
  };
159
- Be(() => {
160
- i.open || O({
160
+ De(() => {
161
+ i.open || W({
161
162
  center: !i.defaultPosition
162
163
  });
163
164
  const e = () => {
164
- l === null && O({
165
+ l === null && W({
165
166
  center: !1
166
167
  });
167
168
  };
168
- window.addEventListener("resize", e), q(() => window.removeEventListener("resize", e));
169
- }), $(() => {
169
+ window.addEventListener("resize", e), T(() => window.removeEventListener("resize", e));
170
+ }), S(() => {
170
171
  if (!i.open) return;
171
172
  b();
172
- const e = !ne && !i.defaultPosition, n = () => {
173
- O({
173
+ const e = !Q && !i.defaultPosition, t = () => {
174
+ W({
174
175
  center: e
175
- }), ne = !0;
176
+ }), Q = !0;
176
177
  };
177
178
  if (typeof requestAnimationFrame > "u") {
178
- n();
179
+ t();
179
180
  return;
180
181
  }
181
- requestAnimationFrame(n);
182
- }), $(() => {
182
+ requestAnimationFrame(t);
183
+ }), S(() => {
183
184
  if (!i.open) return;
184
- const e = (n) => {
185
- if (n.key !== "Escape") return;
185
+ const e = (t) => {
186
+ if (t.key !== "Escape") return;
186
187
  const o = typeof document < "u" ? document.activeElement : null;
187
- !H(n.target) && !H(o) || (n.preventDefault(), typeof n.stopImmediatePropagation == "function" ? n.stopImmediatePropagation() : n.stopPropagation(), i.onOpenChange(!1));
188
+ !k(t.target) && !k(o) || (t.preventDefault(), typeof t.stopImmediatePropagation == "function" ? t.stopImmediatePropagation() : t.stopPropagation(), i.onOpenChange(!1));
188
189
  };
189
- document.addEventListener("keydown", e, !0), q(() => document.removeEventListener("keydown", e, !0));
190
- }), $(() => {
190
+ document.addEventListener("keydown", e, !0), T(() => document.removeEventListener("keydown", e, !0));
191
+ }), S(() => {
191
192
  if (!i.open) {
192
- D(!1), X(l ?? void 0, !1);
193
+ F(!1), O(l ?? void 0, !1);
193
194
  return;
194
195
  }
195
- D(!0);
196
- }), $(() => {
196
+ F(!0);
197
+ }), S(() => {
197
198
  if (!i.open) return;
198
- const e = (h) => {
199
- D(H(h));
200
- }, n = (h) => {
201
- e(h.target);
202
- }, o = (h) => {
203
- e(h.target);
199
+ const e = (w) => {
200
+ F(k(w));
201
+ }, t = (w) => {
202
+ e(w.target);
203
+ }, o = (w) => {
204
+ e(w.target);
204
205
  };
205
- document.addEventListener("pointerdown", n), document.addEventListener("focusin", o), q(() => {
206
- document.removeEventListener("pointerdown", n), document.removeEventListener("focusin", o);
206
+ document.addEventListener("pointerdown", t), document.addEventListener("focusin", o), T(() => {
207
+ document.removeEventListener("pointerdown", t), document.removeEventListener("focusin", o);
207
208
  });
208
- }), $(() => {
209
+ }), S(() => {
209
210
  if (!i.open) return;
210
- const e = W();
211
- l === null ? ie(e) : z = e;
211
+ const e = D();
212
+ l === null ? ee(e) : z = e;
212
213
  });
213
- const Ae = (e) => {
214
- !B() || d() || e.pointerType === "mouse" && e.button !== 0 || e.target?.closest('button, input, select, textarea, a, [role="button"]') || (e.preventDefault(), l = e.pointerId, v = "drag", G(!0), J = {
214
+ const Se = (e) => {
215
+ !X() || d() || e.pointerType === "mouse" && e.button !== 0 || e.target?.closest('button, input, select, textarea, a, [role="button"]') || (e.preventDefault(), l = e.pointerId, p = "drag", N(!0), G = {
215
216
  x: e.clientX,
216
217
  y: e.clientY
217
- }, K = {
218
+ }, V = {
218
219
  ...z
219
220
  }, P = {
220
221
  x: e.clientX,
221
222
  y: e.clientY
222
- }, k(!0, "grabbing"), typeof r?.setPointerCapture == "function" && r.setPointerCapture(e.pointerId));
223
- }, c = (e) => (n) => {
224
- !T() || d() || n.pointerType === "mouse" && n.button !== 0 || (n.preventDefault(), n.stopPropagation(), l = n.pointerId, v = "resize", Z(!0), te = e, Q = {
225
- x: n.clientX,
226
- y: n.clientY
227
- }, ee = {
223
+ }, L(!0, "grabbing"), typeof r?.setPointerCapture == "function" && r.setPointerCapture(e.pointerId));
224
+ }, f = (e) => (t) => {
225
+ !H() || d() || t.pointerType === "mouse" && t.button !== 0 || (t.preventDefault(), t.stopPropagation(), l = t.pointerId, p = "resize", j(!0), K = e, Z = {
226
+ x: t.clientX,
227
+ y: t.clientY
228
+ }, J = {
228
229
  ...z
229
230
  }, P = {
230
- x: n.clientX,
231
- y: n.clientY
232
- }, k(!0, Me[e]), typeof r?.setPointerCapture == "function" && r.setPointerCapture(n.pointerId));
233
- }, oe = () => {
234
- y = null, re();
235
- }, De = (e) => {
236
- if (!(l === null || e.pointerId !== l) && v !== null && (P = {
231
+ x: t.clientX,
232
+ y: t.clientY
233
+ }, L(!0, ye[e]), typeof r?.setPointerCapture == "function" && r.setPointerCapture(t.pointerId));
234
+ }, ne = () => {
235
+ x = null, te();
236
+ }, Ie = (e) => {
237
+ if (!(l === null || e.pointerId !== l) && p !== null && (P = {
237
238
  x: e.clientX,
238
239
  y: e.clientY
239
- }, y === null)) {
240
+ }, x === null)) {
240
241
  if (typeof requestAnimationFrame > "u") {
241
- oe();
242
+ ne();
242
243
  return;
243
244
  }
244
- y = requestAnimationFrame(oe);
245
+ x = requestAnimationFrame(ne);
245
246
  }
246
- }, le = (e) => {
247
+ }, ie = (e) => {
247
248
  l === null || e.pointerId !== l || (P = {
248
249
  x: e.clientX,
249
250
  y: e.clientY
250
- }, X(e.pointerId));
251
- }, se = () => {
252
- if (l !== null && X(l, !0), d()) {
253
- const n = Ce();
254
- n && S(pe({
251
+ }, O(e.pointerId));
252
+ }, re = () => {
253
+ if (l !== null && O(l, !0), d()) {
254
+ const t = xe();
255
+ t && $(ce({
255
256
  rect: {
256
- x: n.position.x,
257
- y: n.position.y,
258
- width: n.size.width,
259
- height: n.size.height
257
+ x: t.position.x,
258
+ y: t.position.y,
259
+ width: t.size.width,
260
+ height: t.size.height
260
261
  },
261
- minSize: M(),
262
- maxSize: F(),
262
+ minSize: R(),
263
+ maxSize: C(),
263
264
  viewport: {
264
265
  width: window.innerWidth,
265
266
  height: window.innerHeight
266
267
  },
267
268
  mobile: b(),
268
- mobilePadding: L,
269
+ mobilePadding: E,
269
270
  center: !1
270
- })), N(!1);
271
+ })), Y(!1);
271
272
  return;
272
273
  }
273
- const e = W();
274
- Ee({
274
+ const e = D();
275
+ ze({
275
276
  position: {
276
277
  x: e.x,
277
278
  y: e.y
@@ -280,17 +281,17 @@ function dt(i) {
280
281
  width: e.width,
281
282
  height: e.height
282
283
  }
283
- }), S({
284
+ }), $({
284
285
  x: 0,
285
286
  y: 0,
286
287
  width: window.innerWidth,
287
288
  height: window.innerHeight
288
- }), N(!0);
289
- }, ke = () => {
290
- se();
291
- }, We = (e) => {
292
- Le(e.target) && Fe();
293
- }, f = (e) => C("absolute z-10", {
289
+ }), Y(!0);
290
+ }, _e = () => {
291
+ re();
292
+ }, Re = (e) => {
293
+ Pe(e.target) && be();
294
+ }, h = (e) => _("absolute z-10", {
294
295
  n: "cursor-ns-resize top-0 left-2 right-2 h-1",
295
296
  s: "cursor-ns-resize bottom-0 left-2 right-2 h-1",
296
297
  e: "cursor-ew-resize right-0 top-2 bottom-2 w-1",
@@ -300,131 +301,149 @@ function dt(i) {
300
301
  se: "cursor-nwse-resize bottom-0 right-0 w-2 h-2",
301
302
  sw: "cursor-nesw-resize bottom-0 left-0 w-2 h-2"
302
303
  }[e]);
303
- return s(p, {
304
+ return a(y, {
304
305
  get when() {
305
306
  return i.open;
306
307
  },
307
308
  get children() {
308
- return s(Oe, {
309
+ return a(Ee, {
309
310
  get children() {
310
- var e = et(), n = e.firstChild, o = n.firstChild, h = o.firstChild, ae = h.nextSibling, He = o.nextSibling;
311
- e.$$pointerdown = We, e.addEventListener("pointercancel", le), e.$$pointerup = le, e.$$pointermove = De;
312
- var de = r;
313
- return typeof de == "function" ? Ye(de, e) : r = e, o.$$dblclick = ke, o.$$pointerdown = Ae, w(h, s(p, {
311
+ var e = Qe(), t = e.firstChild, o = t.firstChild, w = o.firstChild, oe = w.nextSibling, Ce = o.nextSibling, le = r;
312
+ return typeof le == "function" ? Me(le, e) : r = e, ae(e, se({
313
+ [fe]: "true"
314
+ }, {
315
+ get class() {
316
+ return _("fixed left-0 top-0 z-[100] flex flex-col", (q() || B()) && "select-none");
317
+ },
318
+ get style() {
319
+ return {
320
+ width: `${M().width}px`,
321
+ height: `${M().height}px`,
322
+ transform: `translate3d(${A().x}px, ${A().y}px, 0)`,
323
+ "z-index": he(),
324
+ "will-change": q() ? "transform" : B() ? "transform, width, height" : void 0
325
+ };
326
+ },
327
+ onPointerMove: Ie,
328
+ onPointerUp: ie,
329
+ onPointerCancel: ie,
330
+ role: "dialog",
331
+ get "aria-labelledby"() {
332
+ return de(() => !!i.title)() ? U() : void 0;
333
+ },
334
+ tabIndex: -1,
335
+ onPointerDown: Re
336
+ }), !1, !0), ae(t, se({
337
+ get "data-floe-floating-window-state"() {
338
+ return ve() ? "active" : "inactive";
339
+ }
340
+ }, {
341
+ [fe]: "true"
342
+ }, {
343
+ get class() {
344
+ return _("relative flex h-full w-full flex-col overflow-hidden", "text-card-foreground rounded-md", "border", "animate-in fade-in duration-150", d() && "rounded-none", i.class);
345
+ }
346
+ }), !1, !0), o.$$dblclick = _e, o.$$pointerdown = Se, g(w, a(y, {
314
347
  get when() {
315
348
  return i.title;
316
349
  },
317
350
  get children() {
318
- var t = Ke();
319
- return w(t, () => i.title), u(() => Y(t, "id", U())), t;
351
+ var n = Ye();
352
+ return g(n, () => i.title), u(() => Ae(n, "id", U())), n;
320
353
  }
321
- })), w(ae, s(ze, {
354
+ })), g(oe, a(ue, {
322
355
  variant: "ghost",
323
356
  size: "icon",
324
357
  class: "h-6 w-6",
325
- onClick: (t) => {
326
- t.stopPropagation(), se();
358
+ onClick: (n) => {
359
+ n.stopPropagation(), re();
327
360
  },
328
361
  get "aria-label"() {
329
362
  return d() ? "Restore" : "Maximize";
330
363
  },
331
364
  get children() {
332
- return s(p, {
365
+ return a(y, {
333
366
  get when() {
334
367
  return d();
335
368
  },
336
369
  get fallback() {
337
- return s(Ge, {
370
+ return a(Te, {
338
371
  class: "w-3 h-3"
339
372
  });
340
373
  },
341
374
  get children() {
342
- return s(je, {
375
+ return a(Oe, {
343
376
  class: "w-3 h-3"
344
377
  });
345
378
  }
346
379
  });
347
380
  }
348
- }), null), w(ae, s(ze, {
381
+ }), null), g(oe, a(ue, {
349
382
  variant: "ghost-destructive",
350
383
  size: "icon",
351
384
  class: "h-6 w-6",
352
- onClick: (t) => {
353
- t.stopPropagation(), i.onOpenChange(!1);
385
+ onClick: (n) => {
386
+ n.stopPropagation(), i.onOpenChange(!1);
354
387
  },
355
388
  "aria-label": "Close",
356
389
  get children() {
357
- return s(Ve, {
390
+ return a(He, {
358
391
  class: "w-3.5 h-3.5"
359
392
  });
360
393
  }
361
- }), null), w(He, () => i.children), w(n, s(p, {
394
+ }), null), g(Ce, () => i.children), g(t, a(y, {
362
395
  get when() {
363
396
  return i.footer;
364
397
  },
365
398
  get children() {
366
- var t = Qe();
367
- return w(t, () => i.footer), t;
399
+ var n = qe();
400
+ return g(n, () => i.footer), n;
368
401
  }
369
- }), null), w(n, s(p, {
402
+ }), null), g(t, a(y, {
370
403
  get when() {
371
- return Xe(() => !!T())() && !d();
404
+ return de(() => !!H())() && !d();
372
405
  },
373
406
  get children() {
374
407
  return [(() => {
375
- var t = m();
376
- return g(t, "pointerdown", c("n"), !0), u(() => a(t, f("n"))), t;
408
+ var n = Ne();
409
+ return m(n, "pointerdown", f("n"), !0), u(() => c(n, h("n"))), n;
377
410
  })(), (() => {
378
- var t = m();
379
- return g(t, "pointerdown", c("s"), !0), u(() => a(t, f("s"))), t;
380
- })(), s(p, {
411
+ var n = Be();
412
+ return m(n, "pointerdown", f("s"), !0), u(() => c(n, h("s"))), n;
413
+ })(), a(y, {
381
414
  get when() {
382
415
  return !b();
383
416
  },
384
417
  get children() {
385
418
  return [(() => {
386
- var t = m();
387
- return g(t, "pointerdown", c("e"), !0), u(() => a(t, f("e"))), t;
419
+ var n = je();
420
+ return m(n, "pointerdown", f("e"), !0), u(() => c(n, h("e"))), n;
388
421
  })(), (() => {
389
- var t = m();
390
- return g(t, "pointerdown", c("w"), !0), u(() => a(t, f("w"))), t;
422
+ var n = Ge();
423
+ return m(n, "pointerdown", f("w"), !0), u(() => c(n, h("w"))), n;
391
424
  })(), (() => {
392
- var t = m();
393
- return g(t, "pointerdown", c("ne"), !0), u(() => a(t, f("ne"))), t;
425
+ var n = Ve();
426
+ return m(n, "pointerdown", f("ne"), !0), u(() => c(n, h("ne"))), n;
394
427
  })(), (() => {
395
- var t = m();
396
- return g(t, "pointerdown", c("nw"), !0), u(() => a(t, f("nw"))), t;
428
+ var n = Ze();
429
+ return m(n, "pointerdown", f("nw"), !0), u(() => c(n, h("nw"))), n;
397
430
  })(), (() => {
398
- var t = m();
399
- return g(t, "pointerdown", c("se"), !0), u(() => a(t, f("se"))), t;
431
+ var n = Je();
432
+ return m(n, "pointerdown", f("se"), !0), u(() => c(n, h("se"))), n;
400
433
  })(), (() => {
401
- var t = m();
402
- return g(t, "pointerdown", c("sw"), !0), u(() => a(t, f("sw"))), t;
434
+ var n = Ke();
435
+ return m(n, "pointerdown", f("sw"), !0), u(() => c(n, h("sw"))), n;
403
436
  })()];
404
437
  }
405
438
  })];
406
439
  }
407
- }), null), u((t) => {
408
- var ue = C("fixed left-0 top-0 z-[100] flex flex-col", (j() || V()) && "select-none"), ce = `${A().width}px`, fe = `${A().height}px`, he = `translate3d(${_().x}px, ${_().y}px, 0)`, we = be(), ge = j() ? "transform" : V() ? "transform, width, height" : void 0, me = i.title ? U() : void 0, ve = Re() ? "active" : "inactive", xe = C("relative flex h-full w-full flex-col overflow-hidden", "text-card-foreground rounded-md", "border", "animate-in fade-in duration-150", d() && "rounded-none", i.class), ye = C("flex items-center justify-between h-9 px-3", "border-b", d() ? "rounded-none" : "rounded-t-md", B() && !d() && "cursor-move");
409
- return ue !== t.e && a(e, t.e = ue), ce !== t.t && I(e, "width", t.t = ce), fe !== t.a && I(e, "height", t.a = fe), he !== t.o && I(e, "transform", t.o = he), we !== t.i && I(e, "z-index", t.i = we), ge !== t.n && I(e, "will-change", t.n = ge), me !== t.s && Y(e, "aria-labelledby", t.s = me), ve !== t.h && Y(n, "data-floe-floating-window-state", t.h = ve), xe !== t.r && a(n, t.r = xe), ye !== t.d && a(o, t.d = ye), t;
410
- }, {
411
- e: void 0,
412
- t: void 0,
413
- a: void 0,
414
- o: void 0,
415
- i: void 0,
416
- n: void 0,
417
- s: void 0,
418
- h: void 0,
419
- r: void 0,
420
- d: void 0
421
- }), e;
440
+ }), null), u(() => c(o, _("flex items-center justify-between h-9 px-3", "border-b", d() ? "rounded-none" : "rounded-t-md", X() && !d() && "cursor-move"))), e;
422
441
  }
423
442
  });
424
443
  }
425
444
  });
426
445
  }
427
- qe(["pointermove", "pointerup", "pointerdown", "dblclick"]);
446
+ Fe(["pointerdown", "dblclick"]);
428
447
  export {
429
448
  dt as FloatingWindow
430
449
  };
@@ -1,208 +1,229 @@
1
- import { createSignal as _, createMemo as s } from "solid-js";
2
- import { ArrowUp as gt, Copy as ut, Trash as ht } from "../icons/index.js";
3
- import { getTopZIndex as ft, createContextMenuPosition as wt, createWorkbenchId as mt, findNearestWidget as Wt, clampScale as xt, WORKBENCH_CANVAS_ZOOM_STEP as R, WORKBENCH_CONTEXT_MENU_WIDTH_PX as St, estimateContextMenuHeight as pt } from "./workbenchHelpers.js";
4
- import { resolveWorkbenchWidgetDefinitions as Ct, getWidgetEntry as q, createWorkbenchFilterState as kt } from "./widgets/widgetRegistry.js";
5
- function At(c) {
6
- const [f, w] = _(null), [B, A] = _(null), [S, P] = _({ width: 0, height: 0 }), l = c.state, u = s(() => l().widgets), a = s(() => l().viewport), v = s(() => l().locked), D = s(() => l().filters), p = s(() => l().selectedWidgetId), C = s(() => ft(u())), Z = s(() => `${Math.round(a().scale * 100)}%`), $ = () => typeof c.widgetDefinitions == "function" ? c.widgetDefinitions() : c.widgetDefinitions, h = s(
7
- () => Ct($())
8
- ), j = (t) => {
9
- t && P({ width: t.clientWidth, height: t.clientHeight });
10
- }, K = (t) => {
11
- w({
1
+ import { createSignal as _, createMemo as d, onCleanup as mt } from "solid-js";
2
+ import { ArrowUp as Wt, Copy as xt, Trash as St } from "../icons/index.js";
3
+ import { getTopZIndex as Ct, createContextMenuPosition as pt, createWorkbenchId as kt, findNearestWidget as Ft, clampScale as Xt, WORKBENCH_CANVAS_ZOOM_STEP as P, WORKBENCH_CONTEXT_MENU_WIDTH_PX as bt, estimateContextMenuHeight as Mt } from "./workbenchHelpers.js";
4
+ import { resolveWorkbenchWidgetDefinitions as Yt, getWidgetEntry as Z, createWorkbenchFilterState as yt } from "./widgets/widgetRegistry.js";
5
+ function Nt(s) {
6
+ const [m, W] = _(null), [$, A] = _(null), [j, K] = _({ width: 0, height: 0 });
7
+ let r = null, x = null;
8
+ const a = s.state, h = d(() => a().widgets), u = d(() => a().viewport), L = d(() => a().locked), D = d(() => a().filters), k = d(() => a().selectedWidgetId), F = d(() => Ct(h())), U = d(() => `${Math.round(u().scale * 100)}%`), G = () => typeof s.widgetDefinitions == "function" ? s.widgetDefinitions() : s.widgetDefinitions, f = d(
9
+ () => Yt(G())
10
+ ), X = (t, e) => {
11
+ const n = Number.isFinite(t) && t > 0 ? t : 0, i = Number.isFinite(e) && e > 0 ? e : 0, o = { width: n, height: i }, c = j();
12
+ return c.width === n && c.height === i ? c : (K(o), o);
13
+ }, T = () => {
14
+ x?.disconnect(), x = null;
15
+ }, w = () => r ? X(r.clientWidth, r.clientHeight) : X(0, 0), J = (t) => {
16
+ if (r === (t ?? null)) {
17
+ w();
18
+ return;
19
+ }
20
+ T(), r = t ?? null, w(), !(!r || typeof ResizeObserver > "u") && (x = new ResizeObserver((e) => {
21
+ const n = e[0];
22
+ X(
23
+ n?.contentRect.width ?? r?.clientWidth ?? 0,
24
+ n?.contentRect.height ?? r?.clientHeight ?? 0
25
+ );
26
+ }), x.observe(r));
27
+ };
28
+ mt(() => {
29
+ T(), r = null;
30
+ });
31
+ const Q = (t) => {
32
+ W({
12
33
  clientX: t.clientX,
13
34
  clientY: t.clientY,
14
35
  worldX: t.worldX,
15
36
  worldY: t.worldY
16
37
  });
17
- }, L = (t, e) => {
18
- m(e.id), w({
38
+ }, tt = (t, e) => {
39
+ S(e.id), W({
19
40
  clientX: t.clientX,
20
41
  clientY: t.clientY,
21
42
  worldX: e.x,
22
43
  worldY: e.y,
23
44
  widgetId: e.id
24
45
  });
25
- }, g = () => w(null), U = (t) => l().widgets.find((e) => e.id === t) ?? null, k = (t) => l().widgets.find((e) => e.type === t) ?? null, T = s(() => {
26
- const t = f();
46
+ }, g = () => W(null), et = (t) => a().widgets.find((e) => e.id === t) ?? null, b = (t) => a().widgets.find((e) => e.type === t) ?? null, N = d(() => {
47
+ const t = m();
27
48
  if (!t) return [];
28
49
  if (t.widgetId) {
29
- const e = u().find((i) => i.id === t.widgetId), n = [];
50
+ const e = h().find((i) => i.id === t.widgetId), n = [];
30
51
  return e && (n.push({
31
52
  id: "bring-to-front",
32
53
  kind: "action",
33
54
  label: "Bring to Front",
34
- icon: gt,
55
+ icon: Wt,
35
56
  onSelect: () => {
36
- m(e.id), g();
57
+ S(e.id), g();
37
58
  }
38
59
  }), n.push({
39
60
  id: "duplicate",
40
61
  kind: "action",
41
62
  label: "Duplicate",
42
- icon: ut,
63
+ icon: xt,
43
64
  onSelect: () => {
44
- z(e.type, e.x + 32, e.y + 32), g();
65
+ R(e.type, e.x + 32, e.y + 32), g();
45
66
  }
46
67
  })), n.push({ id: "separator-delete", kind: "separator" }), n.push({
47
68
  id: "delete",
48
69
  kind: "action",
49
70
  label: "Delete",
50
- icon: ht,
71
+ icon: St,
51
72
  destructive: !0,
52
73
  onSelect: () => {
53
- t.widgetId && Y(t.widgetId), g();
74
+ t.widgetId && y(t.widgetId), g();
54
75
  }
55
76
  }), n;
56
77
  }
57
- return h().map((e) => ({
78
+ return f().map((e) => ({
58
79
  id: `add-${e.type}`,
59
80
  kind: "action",
60
81
  label: `Add ${e.label}`,
61
82
  icon: e.icon,
62
83
  onSelect: () => {
63
- M(e.type, t.worldX, t.worldY), g();
84
+ Y(e.type, t.worldX, t.worldY), g();
64
85
  }
65
86
  }));
66
- }), G = s(() => {
67
- const t = f();
87
+ }), nt = d(() => {
88
+ const t = m();
68
89
  if (!t) return;
69
- const e = T(), n = e.filter((o) => o.kind === "action").length, i = e.filter((o) => o.kind === "separator").length;
70
- return wt({
90
+ const e = N(), n = e.filter((o) => o.kind === "action").length, i = e.filter((o) => o.kind === "separator").length;
91
+ return pt({
71
92
  clientX: t.clientX,
72
93
  clientY: t.clientY,
73
- menuWidth: St,
74
- menuHeight: pt(n, i)
94
+ menuWidth: bt,
95
+ menuHeight: Mt(n, i)
75
96
  });
76
- }), X = (t, e, n) => {
77
- const i = q(t, h()), o = i.singleton ? k(t) : null;
97
+ }), M = (t, e, n) => {
98
+ const i = Z(t, f()), o = i.singleton ? b(t) : null;
78
99
  if (o)
79
- return W(o, { centerViewport: !0 });
80
- const d = i.defaultSize, r = {
81
- id: mt(),
100
+ return C(o, { centerViewport: !0 });
101
+ const c = i.defaultSize, l = {
102
+ id: kt(),
82
103
  type: t,
83
104
  title: i.defaultTitle,
84
105
  x: e,
85
106
  y: n,
86
- width: d.width,
87
- height: d.height,
88
- z_index: C() + 1,
107
+ width: c.width,
108
+ height: c.height,
109
+ z_index: F() + 1,
89
110
  created_at_unix_ms: Date.now()
90
111
  };
91
- return c.setState((x) => ({
92
- ...x,
93
- widgets: [...x.widgets, r],
94
- selectedWidgetId: r.id
95
- })), r;
96
- }, M = (t, e, n) => {
97
- const i = q(t, h()).defaultSize;
98
- return X(t, e - i.width / 2, n - i.height / 2);
99
- }, z = (t, e, n) => X(t, e, n), Y = (t) => {
100
- c.setState((e) => ({
112
+ return s.setState((p) => ({
113
+ ...p,
114
+ widgets: [...p.widgets, l],
115
+ selectedWidgetId: l.id
116
+ })), l;
117
+ }, Y = (t, e, n) => {
118
+ const i = Z(t, f()).defaultSize;
119
+ return M(t, e - i.width / 2, n - i.height / 2);
120
+ }, R = (t, e, n) => M(t, e, n), y = (t) => {
121
+ s.setState((e) => ({
101
122
  ...e,
102
123
  widgets: e.widgets.filter((n) => n.id !== t),
103
124
  selectedWidgetId: e.selectedWidgetId === t ? null : e.selectedWidgetId
104
125
  }));
105
- }, J = (t) => {
126
+ }, it = (t) => {
106
127
  A(t);
107
- }, m = (t) => {
128
+ }, S = (t) => {
108
129
  A(t);
109
- const e = C(), n = u().find((i) => i.id === t);
110
- n && n.z_index < e && c.setState((i) => ({
130
+ const e = F(), n = h().find((i) => i.id === t);
131
+ n && n.z_index < e && s.setState((i) => ({
111
132
  ...i,
112
133
  widgets: i.widgets.map(
113
134
  (o) => o.id === t ? { ...o, z_index: e + 1 } : o
114
135
  )
115
136
  }));
116
- }, Q = (t, e) => {
117
- c.setState((n) => ({
137
+ }, ot = (t, e) => {
138
+ s.setState((n) => ({
118
139
  ...n,
119
140
  widgets: n.widgets.map(
120
141
  (i) => i.id === t ? { ...i, x: e.x, y: e.y } : i
121
142
  )
122
143
  }));
123
- }, tt = (t, e) => {
124
- c.setState((n) => ({
144
+ }, st = (t, e) => {
145
+ s.setState((n) => ({
125
146
  ...n,
126
147
  widgets: n.widgets.map(
127
148
  (i) => i.id === t ? { ...i, width: e.width, height: e.height } : i
128
149
  )
129
150
  }));
130
151
  }, I = (t) => {
131
- c.setState((e) => ({ ...e, viewport: t }));
132
- }, O = (t) => {
133
- const e = a(), n = S(), i = (n.width / 2 - e.x) / e.scale, o = (n.height / 2 - e.y) / e.scale, d = xt(
134
- t === "in" ? e.scale * R : e.scale / R
135
- ), r = {
136
- x: n.width / 2 - i * d,
137
- y: n.height / 2 - o * d,
138
- scale: d
152
+ s.setState((e) => ({ ...e, viewport: t }));
153
+ }, V = (t) => {
154
+ const e = u(), n = w(), i = (n.width / 2 - e.x) / e.scale, o = (n.height / 2 - e.y) / e.scale, c = Xt(
155
+ t === "in" ? e.scale * P : e.scale / P
156
+ ), l = {
157
+ x: n.width / 2 - i * c,
158
+ y: n.height / 2 - o * c,
159
+ scale: c
139
160
  };
140
- I(r);
141
- }, et = () => {
142
- c.setState((t) => ({ ...t, locked: !t.locked }));
143
- }, nt = (t) => {
144
- c.setState((e) => ({
161
+ I(l);
162
+ }, ct = () => {
163
+ s.setState((t) => ({ ...t, locked: !t.locked }));
164
+ }, rt = (t) => {
165
+ s.setState((e) => ({
145
166
  ...e,
146
167
  filters: { ...e.filters, [t]: !e.filters[t] }
147
168
  }));
148
- }, it = (t) => {
149
- c.setState((e) => {
169
+ }, dt = (t) => {
170
+ s.setState((e) => {
150
171
  const n = { ...e.filters };
151
172
  for (const i of Object.keys(n))
152
173
  n[i] = i === t;
153
174
  return { ...e, filters: n };
154
175
  });
155
- }, ot = () => {
156
- const t = kt(h());
157
- c.setState((e) => ({
176
+ }, lt = () => {
177
+ const t = yt(f());
178
+ s.setState((e) => ({
158
179
  ...e,
159
180
  filters: t
160
181
  }));
161
- }, V = (t) => {
162
- c.setState((e) => ({ ...e, selectedWidgetId: t }));
163
- }, ct = () => {
164
- const t = S(), e = a();
182
+ }, H = (t) => {
183
+ s.setState((e) => ({ ...e, selectedWidgetId: t }));
184
+ }, at = () => {
185
+ const t = w(), e = u();
165
186
  return {
166
187
  worldX: t.width > 0 ? (t.width / 2 - e.x) / e.scale : 240,
167
188
  worldY: t.height > 0 ? (t.height / 2 - e.y) / e.scale : 180
168
189
  };
169
190
  };
170
- let N = 0;
171
- const st = (t, e, n) => {
172
- const i = a(), o = i.x, d = i.y, r = i.scale, x = performance.now(), dt = 360, rt = ++N, lt = (F) => 1 - Math.pow(1 - F, 3), E = (F) => {
173
- if (rt !== N) return;
174
- const at = F - x, H = Math.min(Math.max(at / dt, 0), 1), b = lt(H);
191
+ let E = 0;
192
+ const ut = (t, e, n) => {
193
+ const i = u(), o = i.x, c = i.y, l = i.scale, p = performance.now(), gt = 360, ht = ++E, ft = (v) => 1 - Math.pow(1 - v, 3), q = (v) => {
194
+ if (ht !== E) return;
195
+ const wt = v - p, B = Math.min(Math.max(wt / gt, 0), 1), O = ft(B);
175
196
  I({
176
- x: o + (t - o) * b,
177
- y: d + (e - d) * b,
178
- scale: r + (n - r) * b
179
- }), H < 1 && requestAnimationFrame(E);
197
+ x: o + (t - o) * O,
198
+ y: c + (e - c) * O,
199
+ scale: l + (n - l) * O
200
+ }), B < 1 && requestAnimationFrame(q);
180
201
  };
181
- requestAnimationFrame(E);
182
- }, y = (t) => {
183
- const e = S();
202
+ requestAnimationFrame(q);
203
+ }, z = (t) => {
204
+ const e = w();
184
205
  if (e.width === 0 || e.height === 0) return;
185
- const n = a(), i = e.width / 2 - (t.x + t.width / 2) * n.scale, o = e.height / 2 - (t.y + t.height / 2) * n.scale;
186
- st(i, o, n.scale);
187
- }, W = (t, e = {}) => (V(t.id), m(t.id), e.centerViewport !== !1 && y(t), t);
206
+ const n = u(), i = e.width / 2 - (t.x + t.width / 2) * n.scale, o = e.height / 2 - (t.y + t.height / 2) * n.scale;
207
+ ut(i, o, n.scale);
208
+ }, C = (t, e = {}) => (H(t.id), S(t.id), e.centerViewport !== !1 && z(t), t);
188
209
  return {
189
- widgets: u,
190
- viewport: a,
191
- locked: v,
210
+ widgets: h,
211
+ viewport: u,
212
+ locked: L,
192
213
  filters: D,
193
- selectedWidgetId: p,
194
- topZIndex: C,
195
- scaleLabel: Z,
196
- optimisticFrontWidgetId: B,
197
- widgetDefinitions: h,
198
- setCanvasFrameRef: j,
214
+ selectedWidgetId: k,
215
+ topZIndex: F,
216
+ scaleLabel: U,
217
+ optimisticFrontWidgetId: $,
218
+ widgetDefinitions: f,
219
+ setCanvasFrameRef: J,
199
220
  contextMenu: {
200
- state: f,
201
- items: T,
202
- position: G,
221
+ state: m,
222
+ items: N,
223
+ position: nt,
203
224
  close: g,
204
225
  retarget: (t) => {
205
- t.preventDefault(), t.stopPropagation(), w({
226
+ t.preventDefault(), t.stopPropagation(), W({
206
227
  clientX: t.clientX,
207
228
  clientY: t.clientY,
208
229
  worldX: 0,
@@ -211,74 +232,74 @@ function At(c) {
211
232
  }
212
233
  },
213
234
  canvas: {
214
- openCanvasContextMenu: K,
215
- openWidgetContextMenu: L,
216
- selectWidget: V,
217
- startOptimisticFront: J,
218
- commitFront: m,
219
- commitMove: Q,
220
- commitResize: tt,
235
+ openCanvasContextMenu: Q,
236
+ openWidgetContextMenu: tt,
237
+ selectWidget: H,
238
+ startOptimisticFront: it,
239
+ commitFront: S,
240
+ commitMove: ot,
241
+ commitResize: st,
221
242
  commitViewport: I
222
243
  },
223
244
  hud: {
224
- zoomIn: () => O("in"),
225
- zoomOut: () => O("out")
245
+ zoomIn: () => V("in"),
246
+ zoomOut: () => V("out")
226
247
  },
227
248
  lock: {
228
- toggle: et
249
+ toggle: ct
229
250
  },
230
251
  filter: {
231
- toggle: nt,
232
- solo: it,
233
- showAll: ot
252
+ toggle: rt,
253
+ solo: dt,
254
+ showAll: lt
234
255
  },
235
256
  navigation: {
236
257
  handleArrowNavigation: (t) => {
237
- const e = Wt(
238
- u(),
239
- p(),
258
+ const e = Ft(
259
+ h(),
260
+ k(),
240
261
  t,
241
262
  D()
242
263
  );
243
- e && W(e);
264
+ e && C(e);
244
265
  },
245
- centerOnWidget: y,
246
- focusWidget: W
266
+ centerOnWidget: z,
267
+ focusWidget: C
247
268
  },
248
269
  widgetActions: {
249
270
  deleteSelected: () => {
250
- const t = p();
251
- t && Y(t);
271
+ const t = k();
272
+ t && y(t);
252
273
  },
253
- deleteWidget: Y,
254
- addWidget: X,
255
- addWidgetAtCursor: M,
256
- addWidgetCentered: z,
274
+ deleteWidget: y,
275
+ addWidget: M,
276
+ addWidgetAtCursor: Y,
277
+ addWidgetCentered: R,
257
278
  ensureWidget: (t, e) => {
258
- const n = k(t);
279
+ const n = b(t);
259
280
  if (n)
260
- return W(n, { centerViewport: e?.centerViewport ?? !0 });
261
- const i = ct(), o = M(
281
+ return C(n, { centerViewport: e?.centerViewport ?? !0 });
282
+ const i = at(), o = Y(
262
283
  t,
263
284
  e?.worldX ?? i.worldX,
264
285
  e?.worldY ?? i.worldY
265
286
  );
266
- return (e?.centerViewport ?? !0) && o && y(o), o;
287
+ return (e?.centerViewport ?? !0) && o && z(o), o;
267
288
  }
268
289
  },
269
290
  queries: {
270
- findWidgetByType: k,
271
- findWidgetById: U
291
+ findWidgetByType: b,
292
+ findWidgetById: et
272
293
  },
273
294
  handleCloseRequest: () => {
274
- if (f()) {
295
+ if (m()) {
275
296
  g();
276
297
  return;
277
298
  }
278
- c.onClose();
299
+ s.onClose();
279
300
  }
280
301
  };
281
302
  }
282
303
  export {
283
- At as useWorkbenchModel
304
+ Nt as useWorkbenchModel
284
305
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floegence/floe-webapp-core",
3
- "version": "0.36.4",
3
+ "version": "0.36.5",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",