@floegence/floe-webapp-core 0.36.49 → 0.36.50

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,75 +1,75 @@
1
- import { insert as h, createComponent as d, effect as A, setAttribute as x, memo as le, template as I, Portal as se, setStyleProperty as de, use as ue, delegateEvents as ge } from "solid-js/web";
2
- import { createSignal as F, onCleanup as z, createEffect as ve, createMemo as W, Show as N, For as j } from "solid-js";
1
+ import { insert as h, createComponent as d, effect as A, setAttribute as x, memo as se, template as $, Portal as de, setStyleProperty as ue, use as ge, delegateEvents as ve } from "solid-js/web";
2
+ import { createSignal as W, onCleanup as j, createEffect as fe, createMemo as K, Show as V, For as J } from "solid-js";
3
3
  import { Motion as X } from "../../node_modules/.pnpm/solid-motionone@1.0.4_solid-js@1.9.11/node_modules/solid-motionone/dist/index.js";
4
4
  import { easing as H, duration as Y } from "../../utils/animations.js";
5
- import { LayoutDashboard as fe, Layers as Z, Region as me, TextTool as he, MessageSquare as ke, Plus as be } from "../icons/index.js";
6
- import { startHotInteraction as _e } from "../../utils/hotInteraction.js";
7
- import { startPointerSession as we } from "../ui/pointerSession.js";
8
- import { WORKBENCH_EDGE_AUTO_PAN_FRAME_SELECTOR as ee, createWorkbenchEdgeAutoPanController as Ee, frameFromElement as Ce } from "./workbenchEdgeAutoPan.js";
9
- var Se = /* @__PURE__ */ I("<button type=button class=workbench-dock__item>"), Oe = /* @__PURE__ */ I('<div class=workbench-dock__mode-popover role=menu aria-label="Canvas mode">'), Le = /* @__PURE__ */ I('<div class=workbench-dock data-floe-canvas-interactive=true><div class=workbench-dock__mode-switcher><button type=button class="workbench-dock__item workbench-dock__mode-trigger"aria-label="Switch canvas mode"aria-haspopup=menu></button></div><span class=workbench-dock__divider aria-hidden=true>'), De = /* @__PURE__ */ I("<button type=button class=workbench-dock__mode-option role=menuitemradio><span class=workbench-dock__mode-option-icon></span><span class=workbench-dock__mode-option-copy><span class=workbench-dock__mode-option-label></span><span class=workbench-dock__mode-option-description>"), Me = /* @__PURE__ */ I("<div class=workbench-dock-ghost aria-hidden=true><div class=workbench-dock-ghost__halo></div><div class=workbench-dock-ghost__card><div class=workbench-dock-ghost__icon></div><div class=workbench-dock-ghost__copy><div class=workbench-dock-ghost__title></div><div class=workbench-dock-ghost__hint><span>");
10
- const J = 5, pe = ".workbench-dock", K = [{
5
+ import { LayoutDashboard as me, Layers as ee, Region as he, TextTool as ke, MessageSquare as be, Plus as _e } from "../icons/index.js";
6
+ import { startHotInteraction as we } from "../../utils/hotInteraction.js";
7
+ import { startPointerSession as Ee } from "../ui/pointerSession.js";
8
+ import { WORKBENCH_EDGE_AUTO_PAN_FRAME_SELECTOR as te, createWorkbenchEdgeAutoPanController as Ce, frameFromElement as Se } from "./workbenchEdgeAutoPan.js";
9
+ var Oe = /* @__PURE__ */ $("<button type=button class=workbench-dock__item>"), Le = /* @__PURE__ */ $('<div class=workbench-dock__mode-popover role=menu aria-label="Canvas mode">'), De = /* @__PURE__ */ $('<div class=workbench-dock data-floe-canvas-interactive=true><div class=workbench-dock__mode-switcher><button type=button class="workbench-dock__item workbench-dock__mode-trigger"aria-label="Switch canvas mode"aria-haspopup=menu></button></div><span class=workbench-dock__divider aria-hidden=true>'), Me = /* @__PURE__ */ $("<button type=button class=workbench-dock__mode-option role=menuitemradio><span class=workbench-dock__mode-option-icon></span><span class=workbench-dock__mode-option-copy><span class=workbench-dock__mode-option-label></span><span class=workbench-dock__mode-option-description>"), ye = /* @__PURE__ */ $("<div class=workbench-dock-ghost aria-hidden=true><div class=workbench-dock-ghost__halo></div><div class=workbench-dock-ghost__card><div class=workbench-dock-ghost__icon></div><div class=workbench-dock-ghost__copy><div class=workbench-dock-ghost__title></div><div class=workbench-dock-ghost__hint><span>");
10
+ const Q = 5, Ie = ".workbench-dock", N = [{
11
11
  mode: "work",
12
12
  label: "Work Mode",
13
13
  description: "Operate windows and sticky notes",
14
- icon: fe
14
+ icon: me
15
15
  }, {
16
16
  mode: "background",
17
17
  label: "Composition Mode",
18
18
  description: "Arrange regions and canvas text",
19
- icon: Z
20
- }], ye = [{
19
+ icon: ee
20
+ }], $e = [{
21
21
  tool: "sticky-note",
22
22
  label: "Sticky",
23
- icon: ke
24
- }], Ie = [{
23
+ icon: be
24
+ }], pe = [{
25
25
  tool: "background-region",
26
26
  label: "Region",
27
- icon: me
27
+ icon: he
28
28
  }, {
29
29
  tool: "text",
30
30
  label: "Text",
31
- icon: he
31
+ icon: ke
32
32
  }];
33
- function te() {
34
- const t = document.querySelector(ee);
35
- return t instanceof HTMLElement ? t.getBoundingClientRect() : null;
33
+ function ne() {
34
+ const e = document.querySelector(te);
35
+ return e instanceof HTMLElement ? e.getBoundingClientRect() : null;
36
36
  }
37
- function V(t, s, a) {
38
- return t >= a.left && t <= a.right && s >= a.top && s <= a.bottom;
37
+ function G(e, s, a) {
38
+ return e >= a.left && e <= a.right && s >= a.top && s <= a.bottom;
39
39
  }
40
- function Pe(t, s) {
41
- const a = te();
42
- return a ? V(t, s, a) : !1;
40
+ function Pe(e, s) {
41
+ const a = ne();
42
+ return a ? G(e, s, a) : !1;
43
43
  }
44
- function Te(t, s, a, u) {
45
- const o = te();
44
+ function Te(e, s, a, u) {
45
+ const o = ne();
46
46
  if (!o) return !1;
47
- if (V(t, s, o) || V(a, u, o))
47
+ if (G(e, s, o) || G(a, u, o))
48
48
  return !0;
49
- const n = a - t, w = u - s;
49
+ const n = a - e, w = u - s;
50
50
  let k = 0, v = 1;
51
51
  const g = (f, C) => {
52
52
  if (f === 0) return C >= 0;
53
53
  const E = C / f;
54
54
  return f < 0 ? E > v ? !1 : (E > k && (k = E), !0) : E < k ? !1 : (E < v && (v = E), !0);
55
55
  };
56
- return g(-n, t - o.left) && g(n, o.right - t) && g(-w, s - o.top) && g(w, o.bottom - s);
56
+ return g(-n, e - o.left) && g(n, o.right - e) && g(-w, s - o.top) && g(w, o.bottom - s);
57
57
  }
58
- function Q(t, s) {
58
+ function Z(e, s) {
59
59
  if (typeof document.elementFromPoint != "function") return !1;
60
- const a = document.elementFromPoint(t, s);
61
- return a instanceof Element && a.closest(pe) !== null;
60
+ const a = document.elementFromPoint(e, s);
61
+ return a instanceof Element && a.closest(Ie) !== null;
62
62
  }
63
- function $e(t) {
64
- const s = () => t.hoverOffset === -1 ? {
63
+ function Re(e) {
64
+ const s = () => e.hoverOffset === -1 ? {
65
65
  scale: 1.26,
66
66
  y: -6,
67
67
  x: 0
68
- } : t.hoverOffset === 1 ? {
68
+ } : e.hoverOffset === 1 ? {
69
69
  scale: 1.08,
70
70
  y: -2,
71
71
  x: 5
72
- } : t.hoverOffset === -2 ? {
72
+ } : e.hoverOffset === -2 ? {
73
73
  scale: 1.08,
74
74
  y: -2,
75
75
  x: -5
@@ -77,12 +77,12 @@ function $e(t) {
77
77
  scale: 1,
78
78
  y: 0,
79
79
  x: 0
80
- }, a = () => t.hoverOffset === -1, u = (o) => {
81
- o.button === 0 && t.onDragBegin(o, t.kind, t.id, t.label, t.icon);
80
+ }, a = () => e.hoverOffset === -1, u = (o) => {
81
+ o.button === 0 && e.onDragBegin(o, e.kind, e.id, e.label, e.icon);
82
82
  };
83
83
  return (() => {
84
- var o = Se();
85
- return o.$$pointerdown = u, o.addEventListener("pointerleave", () => t.onLeave()), o.addEventListener("pointerenter", () => t.onEnter()), h(o, d(X.span, {
84
+ var o = Oe();
85
+ return o.$$pointerdown = u, o.addEventListener("pointerleave", () => e.onLeave()), o.addEventListener("pointerenter", () => e.onEnter()), h(o, d(X.span, {
86
86
  class: "workbench-dock__tile",
87
87
  get animate() {
88
88
  return s();
@@ -95,7 +95,7 @@ function $e(t) {
95
95
  },
96
96
  get children() {
97
97
  return (() => {
98
- const n = t.icon;
98
+ const n = e.icon;
99
99
  return d(n, {
100
100
  class: "workbench-dock__icon"
101
101
  });
@@ -116,10 +116,10 @@ function $e(t) {
116
116
  };
117
117
  },
118
118
  get children() {
119
- return t.label;
119
+ return e.label;
120
120
  }
121
121
  }), null), A((n) => {
122
- var w = !!t.active, k = !t.visible, v = !!a(), g = !!t.isDragging, f = `${t.label} — click to solo, drag to canvas to create`, C = t.active;
122
+ var w = !!e.active, k = !!(e.filterable && !e.visible), v = !!a(), g = !!e.isDragging, f = e.filterable ? `${e.label} — click to solo, drag to canvas to create` : `${e.label} — drag to canvas to create`, C = e.active;
123
123
  return w !== n.e && o.classList.toggle("is-active", n.e = w), k !== n.t && o.classList.toggle("is-filter-muted", n.t = k), v !== n.a && o.classList.toggle("is-hovered", n.a = v), g !== n.o && o.classList.toggle("is-source-dragging", n.o = g), f !== n.i && x(o, "aria-label", n.i = f), C !== n.n && x(o, "aria-pressed", n.n = C), n;
124
124
  }, {
125
125
  e: void 0,
@@ -131,73 +131,73 @@ function $e(t) {
131
131
  }), o;
132
132
  })();
133
133
  }
134
- function Ke(t) {
135
- const [s, a] = F(null), [u, o] = F(null), [n, w] = F(!1);
134
+ function Ne(e) {
135
+ const [s, a] = W(null), [u, o] = W(null), [n, w] = W(!1);
136
136
  let k, v, g, f = null;
137
- z(() => {
137
+ j(() => {
138
138
  g?.stop(), v?.stop({
139
139
  reason: "manual_stop",
140
140
  commit: !1
141
141
  }), v = void 0, u()?.stopInteraction();
142
- }), ve(() => {
142
+ }), fe(() => {
143
143
  if (!n() || typeof window > "u") return;
144
- const e = (l) => {
144
+ const t = (l) => {
145
145
  k && l.target instanceof Node && k.contains(l.target) || w(!1);
146
146
  }, i = (l) => {
147
147
  l.key === "Escape" && w(!1);
148
148
  };
149
- window.addEventListener("pointerdown", e, !0), window.addEventListener("keydown", i, !0), z(() => {
150
- window.removeEventListener("pointerdown", e, !0), window.removeEventListener("keydown", i, !0);
149
+ window.addEventListener("pointerdown", t, !0), window.addEventListener("keydown", i, !0), j(() => {
150
+ window.removeEventListener("pointerdown", t, !0), window.removeEventListener("keydown", i, !0);
151
151
  });
152
152
  });
153
- const C = (e) => {
153
+ const C = (t) => {
154
154
  const i = s();
155
- return i === null ? 0 : i === e ? -1 : i === e + 1 ? -2 : i === e - 1 ? 1 : 0;
155
+ return i === null ? 0 : i === t ? -1 : i === t + 1 ? -2 : i === t - 1 ? 1 : 0;
156
156
  }, E = () => {
157
157
  g?.stop(), g = void 0, f = null;
158
158
  }, S = () => {
159
- !t.viewport || !t.onViewportCommit || (f = t.viewport, g?.stop(), g = Ee({
159
+ !e.viewport || !e.onViewportCommit || (f = e.viewport, g?.stop(), g = Ce({
160
160
  readFrame: () => {
161
- const e = document.querySelector(ee);
162
- return e instanceof HTMLElement ? Ce(e) : null;
161
+ const t = document.querySelector(te);
162
+ return t instanceof HTMLElement ? Se(t) : null;
163
163
  },
164
- readViewport: () => f ?? t.viewport ?? null,
165
- commitViewport: (e) => {
166
- f = e, t.onViewportCommit?.(e);
164
+ readViewport: () => f ?? e.viewport ?? null,
165
+ commitViewport: (t) => {
166
+ f = t, e.onViewportCommit?.(t);
167
167
  },
168
- onPanStart: () => t.onViewportInteractionStart?.("pan"),
168
+ onPanStart: () => e.onViewportInteractionStart?.("pan"),
169
169
  shouldPan: () => {
170
- const e = u();
171
- return !!(e?.moved && e.hasEnteredCanvas && !Q(e.clientX, e.clientY));
170
+ const t = u();
171
+ return !!(t?.moved && t.hasEnteredCanvas && !Z(t.clientX, t.clientY));
172
172
  }
173
173
  }));
174
- }, L = (e) => {
174
+ }, D = (t) => {
175
175
  const i = u();
176
176
  if (!i) return;
177
177
  const l = !i.moved;
178
178
  if (i.stopInteraction(), E(), o(null), v = void 0, l) {
179
- t.onSoloFilter(String(i.id), U());
179
+ L() !== "background" && e.onSoloFilter(String(i.id), q());
180
180
  return;
181
181
  }
182
- e && i.overCanvas && (i.kind === "widget" ? t.onCreateAt?.(i.id, i.clientX, i.clientY) : t.onCreateToolAt?.(i.id, i.clientX, i.clientY));
183
- }, P = (e, i, l, T, r) => {
184
- e.preventDefault(), v?.stop({
182
+ t && i.overCanvas && (i.kind === "widget" ? e.onCreateAt?.(i.id, i.clientX, i.clientY) : e.onCreateToolAt?.(i.id, i.clientX, i.clientY));
183
+ }, p = (t, i, l, P, r) => {
184
+ t.preventDefault(), v?.stop({
185
185
  reason: "manual_stop",
186
186
  commit: !1
187
187
  }), S(), o({
188
188
  kind: i,
189
189
  id: l,
190
- label: T,
190
+ label: P,
191
191
  icon: r,
192
- pointerId: e.pointerId,
193
- startClientX: e.clientX,
194
- startClientY: e.clientY,
195
- clientX: e.clientX,
196
- clientY: e.clientY,
192
+ pointerId: t.pointerId,
193
+ startClientX: t.clientX,
194
+ startClientY: t.clientY,
195
+ clientX: t.clientX,
196
+ clientY: t.clientY,
197
197
  moved: !1,
198
198
  overCanvas: !1,
199
199
  hasEnteredCanvas: !1,
200
- stopInteraction: _e({
200
+ stopInteraction: we({
201
201
  kind: "drag",
202
202
  cursor: "grabbing"
203
203
  })
@@ -206,56 +206,58 @@ function Ke(t) {
206
206
  let m = !1;
207
207
  o((_) => {
208
208
  if (!_ || _.pointerId !== c.pointerId) return _;
209
- const B = c.clientX - _.startClientX, $ = c.clientY - _.startClientY, D = _.moved || Math.abs(B) > J || Math.abs($) > J, O = Q(c.clientX, c.clientY), y = D && Pe(c.clientX, c.clientY) && !O, R = D && !O && Te(_.clientX, _.clientY, c.clientX, c.clientY), q = _.hasEnteredCanvas || y || R;
210
- return m = D && q && !O, {
209
+ const B = c.clientX - _.startClientX, T = c.clientY - _.startClientY, M = _.moved || Math.abs(B) > Q || Math.abs(T) > Q, O = Z(c.clientX, c.clientY), I = M && Pe(c.clientX, c.clientY) && !O, R = M && !O && Te(_.clientX, _.clientY, c.clientX, c.clientY), z = _.hasEnteredCanvas || I || R;
210
+ return m = M && z && !O, {
211
211
  ..._,
212
212
  clientX: c.clientX,
213
213
  clientY: c.clientY,
214
- moved: D,
215
- overCanvas: y,
216
- hasEnteredCanvas: q
214
+ moved: M,
215
+ overCanvas: I,
216
+ hasEnteredCanvas: z
217
217
  };
218
218
  }), m && g?.updatePointer(c.clientX, c.clientY);
219
219
  };
220
- v = we({
221
- pointerEvent: e,
222
- captureEl: e.currentTarget,
220
+ v = Ee({
221
+ pointerEvent: t,
222
+ captureEl: t.currentTarget,
223
223
  onMove: b,
224
224
  onEnd: ({
225
225
  commit: c
226
- }) => L(c)
226
+ }) => D(c)
227
227
  });
228
- }, ne = () => u()?.kind === "widget" ? u().id : null, oe = () => u()?.kind === "tool" ? u().id : null, M = () => t.mode === "background" || t.mode === "annotation" ? "background" : "work", ie = W(() => K.find((e) => e.mode === M()) ?? K[0]), G = W(() => M() === "background" ? Ie.map((e) => ({
229
- id: e.tool,
228
+ }, oe = () => u()?.kind === "widget" ? u().id : null, ie = () => u()?.kind === "tool" ? u().id : null, L = () => e.mode === "background" || e.mode === "annotation" ? "background" : "work", re = K(() => N.find((t) => t.mode === L()) ?? N[0]), U = K(() => L() === "background" ? pe.map((t) => ({
229
+ id: t.tool,
230
230
  kind: "tool",
231
- label: e.label,
232
- icon: e.icon
233
- })) : [...ye.map((e) => ({
234
- id: e.tool,
231
+ label: t.label,
232
+ icon: t.icon
233
+ })) : [...$e.map((t) => ({
234
+ id: t.tool,
235
235
  kind: "tool",
236
- label: e.label,
237
- icon: e.icon
238
- })), ...t.widgetDefinitions.map((e) => ({
239
- id: e.type,
236
+ label: t.label,
237
+ icon: t.icon
238
+ })), ...e.widgetDefinitions.map((t) => ({
239
+ id: t.type,
240
240
  kind: "widget",
241
- label: e.label,
242
- icon: e.icon
243
- }))]), U = W(() => G().map((e) => String(e.id))), re = (e) => t.filters[e] !== !1, ae = (e) => {
244
- const i = U();
245
- return i.length > 1 && i.every((l) => t.filters[l] !== !1 == (l === e));
246
- }, p = () => s() === 0, ce = () => ({
247
- scale: p() || n() ? 1.26 : 1,
248
- y: p() || n() ? -6 : 0,
241
+ label: t.label,
242
+ icon: t.icon
243
+ }))]), q = K(() => U().map((t) => String(t.id))), F = () => L() !== "background", ae = (t) => !F() || e.filters[t] !== !1, ce = (t) => {
244
+ if (!F())
245
+ return !1;
246
+ const i = q();
247
+ return i.length > 1 && i.every((l) => e.filters[l] !== !1 == (l === t));
248
+ }, y = () => s() === 0, le = () => ({
249
+ scale: y() || n() ? 1.26 : 1,
250
+ y: y() || n() ? -6 : 0,
249
251
  x: s() === 1 ? -5 : 0
250
252
  });
251
253
  return [(() => {
252
- var e = Le(), i = e.firstChild, l = i.firstChild;
253
- i.nextSibling, e.addEventListener("pointerleave", () => a(null));
254
- var T = k;
255
- return typeof T == "function" ? ue(T, e) : k = e, l.$$click = () => w((r) => !r), l.addEventListener("pointerleave", () => a((r) => r === 0 ? null : r)), l.addEventListener("pointerenter", () => a(0)), h(l, d(X.span, {
254
+ var t = De(), i = t.firstChild, l = i.firstChild;
255
+ i.nextSibling, t.addEventListener("pointerleave", () => a(null));
256
+ var P = k;
257
+ return typeof P == "function" ? ge(P, t) : k = t, l.$$click = () => w((r) => !r), l.addEventListener("pointerleave", () => a((r) => r === 0 ? null : r)), l.addEventListener("pointerenter", () => a(0)), h(l, d(X.span, {
256
258
  class: "workbench-dock__tile",
257
259
  get animate() {
258
- return ce();
260
+ return le();
259
261
  },
260
262
  get transition() {
261
263
  return {
@@ -264,7 +266,7 @@ function Ke(t) {
264
266
  };
265
267
  },
266
268
  get children() {
267
- return d(Z, {
269
+ return d(ee, {
268
270
  class: "workbench-dock__icon"
269
271
  });
270
272
  }
@@ -272,8 +274,8 @@ function Ke(t) {
272
274
  class: "workbench-dock__tooltip",
273
275
  get animate() {
274
276
  return {
275
- opacity: p() && !n() ? 1 : 0,
276
- y: p() && !n() ? -6 : 0
277
+ opacity: y() && !n() ? 1 : 0,
278
+ y: y() && !n() ? -6 : 0
277
279
  };
278
280
  },
279
281
  get transition() {
@@ -283,27 +285,27 @@ function Ke(t) {
283
285
  };
284
286
  },
285
287
  get children() {
286
- return ie().label;
288
+ return re().label;
287
289
  }
288
- }), null), h(i, d(N, {
290
+ }), null), h(i, d(V, {
289
291
  get when() {
290
292
  return n();
291
293
  },
292
294
  get children() {
293
- var r = Oe();
294
- return h(r, d(j, {
295
- each: K,
295
+ var r = Le();
296
+ return h(r, d(J, {
297
+ each: N,
296
298
  children: (b) => {
297
299
  const c = b.icon;
298
300
  return (() => {
299
- var m = De(), _ = m.firstChild, B = _.nextSibling, $ = B.firstChild, D = $.nextSibling;
301
+ var m = Me(), _ = m.firstChild, B = _.nextSibling, T = B.firstChild, M = T.nextSibling;
300
302
  return m.$$click = () => {
301
- t.onSelectMode?.(b.mode), w(!1);
303
+ e.onSelectMode?.(b.mode), w(!1);
302
304
  }, h(_, d(c, {
303
305
  class: "workbench-dock__mode-icon"
304
- })), h($, () => b.label), h(D, () => b.description), A((O) => {
305
- var y = M() === b.mode, R = M() === b.mode;
306
- return y !== O.e && m.classList.toggle("is-active", O.e = y), R !== O.t && x(m, "aria-checked", O.t = R), O;
306
+ })), h(T, () => b.label), h(M, () => b.description), A((O) => {
307
+ var I = L() === b.mode, R = L() === b.mode;
308
+ return I !== O.e && m.classList.toggle("is-active", O.e = I), R !== O.t && x(m, "aria-checked", O.t = R), O;
307
309
  }, {
308
310
  e: void 0,
309
311
  t: void 0
@@ -312,13 +314,13 @@ function Ke(t) {
312
314
  }
313
315
  })), r;
314
316
  }
315
- }), null), h(e, d(j, {
317
+ }), null), h(t, d(J, {
316
318
  get each() {
317
- return G();
319
+ return U();
318
320
  },
319
321
  children: (r, b) => {
320
322
  const c = () => b() + 1;
321
- return d($e, {
323
+ return d(Re, {
322
324
  get id() {
323
325
  return String(r.id);
324
326
  },
@@ -332,64 +334,67 @@ function Ke(t) {
332
334
  return r.icon;
333
335
  },
334
336
  get active() {
335
- return ae(String(r.id));
337
+ return ce(String(r.id));
336
338
  },
337
339
  get visible() {
338
- return re(String(r.id));
340
+ return ae(String(r.id));
341
+ },
342
+ get filterable() {
343
+ return F();
339
344
  },
340
345
  get hoverOffset() {
341
346
  return C(c());
342
347
  },
343
348
  get isDragging() {
344
- return le(() => r.kind === "widget")() ? ne() === r.id : oe() === r.id;
349
+ return se(() => r.kind === "widget")() ? oe() === r.id : ie() === r.id;
345
350
  },
346
351
  onEnter: () => a(c()),
347
352
  onLeave: () => a((m) => m === c() ? null : m),
348
- onDragBegin: P
353
+ onDragBegin: p
349
354
  });
350
355
  }
351
356
  }), null), A((r) => {
352
- var b = M() === "background", c = !!(p() || n()), m = n();
357
+ var b = L() === "background", c = !!(y() || n()), m = n();
353
358
  return b !== r.e && l.classList.toggle("is-active", r.e = b), c !== r.t && l.classList.toggle("is-hovered", r.t = c), m !== r.a && x(l, "aria-expanded", r.a = m), r;
354
359
  }, {
355
360
  e: void 0,
356
361
  t: void 0,
357
362
  a: void 0
358
- }), e;
359
- })(), d(N, {
363
+ }), t;
364
+ })(), d(V, {
360
365
  get when() {
361
366
  return u()?.moved ?? !1;
362
367
  },
363
368
  get children() {
364
- return d(Re, {
369
+ return d(Ae, {
365
370
  state: u
366
371
  });
367
372
  }
368
373
  })];
369
374
  }
370
- function Re(t) {
375
+ function Ae(e) {
371
376
  const s = () => {
372
- const n = t.state();
377
+ const n = e.state();
373
378
  return n ? `translate3d(${n.clientX + 14}px, ${n.clientY - 56}px, 0)` : "translate3d(0px, 0px, 0)";
374
- }, a = () => t.state()?.overCanvas ?? !1, u = () => t.state()?.label ?? "", o = () => t.state()?.icon;
375
- return d(se, {
379
+ }, a = () => e.state()?.overCanvas ?? !1, u = () => e.state()?.label ?? "", o = () => e.state()?.icon;
380
+ return d(de, {
376
381
  get children() {
377
- var n = Me(), w = n.firstChild, k = w.nextSibling, v = k.firstChild, g = v.nextSibling, f = g.firstChild, C = f.nextSibling, E = C.firstChild;
378
- return h(v, d(N, {
382
+ var n = ye(), w = n.firstChild, k = w.nextSibling, v = k.firstChild, g = v.nextSibling, f = g.firstChild, C = f.nextSibling, E = C.firstChild;
383
+ return h(v, d(V, {
379
384
  get when() {
380
385
  return o();
381
386
  },
382
387
  children: (S) => {
383
- const L = S();
384
- return d(L, {
388
+ const D = S();
389
+ return d(D, {
385
390
  class: "w-4 h-4"
386
391
  });
387
392
  }
388
- })), h(f, u), h(C, d(be, {
393
+ })), h(f, u), h(C, d(_e, {
389
394
  class: "w-3 h-3"
390
395
  }), E), h(E, () => a() ? "Drop to create" : "Drag onto canvas"), A((S) => {
391
- var L = !!a(), P = s();
392
- return L !== S.e && n.classList.toggle("is-over-canvas", S.e = L), P !== S.t && de(n, "transform", S.t = P), S;
396
+ var D = !!a(), p = s();
397
+ return D !== S.e && n.classList.toggle("is-over-canvas", S.e = D), p !== S.t && ue(n, "transform", S.t = p), S;
393
398
  }, {
394
399
  e: void 0,
395
400
  t: void 0
@@ -397,7 +402,7 @@ function Re(t) {
397
402
  }
398
403
  });
399
404
  }
400
- ge(["pointerdown", "click"]);
405
+ ve(["pointerdown", "click"]);
401
406
  export {
402
- Ke as WorkbenchDock
407
+ Ne as WorkbenchDock
403
408
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floegence/floe-webapp-core",
3
- "version": "0.36.49",
3
+ "version": "0.36.50",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",