@floegence/floe-webapp-core 0.36.53 → 0.36.54

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