@floegence/floe-webapp-core 0.36.50 → 0.36.53

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 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
- 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
- import { easing as H, duration as Y } from "../../utils/animations.js";
5
- import { LayoutDashboard as me, Layers as ee, Region as he, TextTool as ke, MessageSquare as be, Plus as _e } from "../icons/index.js";
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";
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 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 = [{
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 = [{
11
11
  mode: "work",
12
12
  label: "Work Mode",
13
13
  description: "Operate windows and sticky notes",
@@ -16,12 +16,12 @@ const Q = 5, Ie = ".workbench-dock", N = [{
16
16
  mode: "background",
17
17
  label: "Composition Mode",
18
18
  description: "Arrange regions and canvas text",
19
- icon: ee
20
- }], $e = [{
19
+ icon: te
20
+ }], Pe = [{
21
21
  tool: "sticky-note",
22
22
  label: "Sticky",
23
23
  icon: be
24
- }], pe = [{
24
+ }], $e = [{
25
25
  tool: "background-region",
26
26
  label: "Region",
27
27
  icon: he
@@ -30,32 +30,32 @@ const Q = 5, Ie = ".workbench-dock", N = [{
30
30
  label: "Text",
31
31
  icon: ke
32
32
  }];
33
- function ne() {
34
- const e = document.querySelector(te);
33
+ function oe() {
34
+ const e = document.querySelector(ne);
35
35
  return e instanceof HTMLElement ? e.getBoundingClientRect() : null;
36
36
  }
37
37
  function G(e, s, a) {
38
38
  return e >= a.left && e <= a.right && s >= a.top && s <= a.bottom;
39
39
  }
40
- function Pe(e, s) {
41
- const a = ne();
40
+ function Te(e, s) {
41
+ const a = oe();
42
42
  return a ? G(e, s, a) : !1;
43
43
  }
44
- function Te(e, s, a, u) {
45
- const o = ne();
44
+ function pe(e, s, a, d) {
45
+ const o = oe();
46
46
  if (!o) return !1;
47
- if (G(e, s, o) || G(a, u, o))
47
+ if (G(e, s, o) || G(a, d, o))
48
48
  return !0;
49
- const n = a - e, w = u - s;
50
- let k = 0, v = 1;
51
- const g = (f, C) => {
52
- if (f === 0) return C >= 0;
53
- const E = C / f;
54
- return f < 0 ? E > v ? !1 : (E > k && (k = E), !0) : E < k ? !1 : (E < v && (v = E), !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);
55
55
  };
56
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 Z(e, s) {
58
+ function ee(e, s) {
59
59
  if (typeof document.elementFromPoint != "function") return !1;
60
60
  const a = document.elementFromPoint(e, s);
61
61
  return a instanceof Element && a.closest(Ie) !== null;
@@ -77,31 +77,31 @@ function Re(e) {
77
77
  scale: 1,
78
78
  y: 0,
79
79
  x: 0
80
- }, a = () => e.hoverOffset === -1, u = (o) => {
80
+ }, a = () => e.hoverOffset === -1, d = (o) => {
81
81
  o.button === 0 && e.onDragBegin(o, e.kind, e.id, e.label, e.icon);
82
82
  };
83
83
  return (() => {
84
84
  var o = Oe();
85
- return o.$$pointerdown = u, o.addEventListener("pointerleave", () => e.onLeave()), o.addEventListener("pointerenter", () => e.onEnter()), h(o, d(X.span, {
85
+ return o.$$pointerdown = d, o.addEventListener("pointerleave", () => e.onLeave()), o.addEventListener("pointerenter", () => e.onEnter()), k(o, u(Y.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: Y.fast,
93
- easing: H.easeOut
92
+ duration: H.fast,
93
+ easing: x.easeOut
94
94
  };
95
95
  },
96
96
  get children() {
97
97
  return (() => {
98
98
  const n = e.icon;
99
- return d(n, {
99
+ return u(n, {
100
100
  class: "workbench-dock__icon"
101
101
  });
102
102
  })();
103
103
  }
104
- }), null), h(o, d(X.span, {
104
+ }), null), k(o, u(Y.span, {
105
105
  class: "workbench-dock__tooltip",
106
106
  get animate() {
107
107
  return {
@@ -111,16 +111,16 @@ function Re(e) {
111
111
  },
112
112
  get transition() {
113
113
  return {
114
- duration: Y.fast,
115
- easing: H.easeOut
114
+ duration: H.fast,
115
+ easing: x.easeOut
116
116
  };
117
117
  },
118
118
  get children() {
119
119
  return e.label;
120
120
  }
121
121
  }), null), A((n) => {
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
- 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;
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;
124
124
  }, {
125
125
  e: void 0,
126
126
  t: void 0,
@@ -132,19 +132,21 @@ function Re(e) {
132
132
  })();
133
133
  }
134
134
  function Ne(e) {
135
- const [s, a] = W(null), [u, o] = W(null), [n, w] = W(!1);
136
- let k, v, g, f = null;
135
+ const [s, a] = W(null), [d, o] = W(null), [n, w] = W(!1);
136
+ let b, f, g, m = null;
137
137
  j(() => {
138
- g?.stop(), v?.stop({
138
+ g?.stop(), f?.stop({
139
139
  reason: "manual_stop",
140
140
  commit: !1
141
- }), v = void 0, u()?.stopInteraction();
142
- }), fe(() => {
141
+ }), f = void 0, d()?.stopInteraction(), e.onDragPreviewChange?.(null);
142
+ }), J(() => {
143
+ e.onDragPreviewChange?.(d()?.preview ?? null);
144
+ }), J(() => {
143
145
  if (!n() || typeof window > "u") return;
144
- const t = (l) => {
145
- k && l.target instanceof Node && k.contains(l.target) || w(!1);
146
- }, i = (l) => {
147
- l.key === "Escape" && w(!1);
146
+ const t = (c) => {
147
+ b && c.target instanceof Node && b.contains(c.target) || w(!1);
148
+ }, i = (c) => {
149
+ c.key === "Escape" && w(!1);
148
150
  };
149
151
  window.addEventListener("pointerdown", t, !0), window.addEventListener("keydown", i, !0), j(() => {
150
152
  window.removeEventListener("pointerdown", t, !0), window.removeEventListener("keydown", i, !0);
@@ -154,40 +156,40 @@ function Ne(e) {
154
156
  const i = s();
155
157
  return i === null ? 0 : i === t ? -1 : i === t + 1 ? -2 : i === t - 1 ? 1 : 0;
156
158
  }, E = () => {
157
- g?.stop(), g = void 0, f = null;
159
+ g?.stop(), g = void 0, m = null;
158
160
  }, S = () => {
159
- !e.viewport || !e.onViewportCommit || (f = e.viewport, g?.stop(), g = Ce({
161
+ !e.viewport || !e.onViewportCommit || (m = e.viewport, g?.stop(), g = Ce({
160
162
  readFrame: () => {
161
- const t = document.querySelector(te);
163
+ const t = document.querySelector(ne);
162
164
  return t instanceof HTMLElement ? Se(t) : null;
163
165
  },
164
- readViewport: () => f ?? e.viewport ?? null,
166
+ readViewport: () => m ?? e.viewport ?? null,
165
167
  commitViewport: (t) => {
166
- f = t, e.onViewportCommit?.(t);
168
+ m = t, e.onViewportCommit?.(t);
167
169
  },
168
170
  onPanStart: () => e.onViewportInteractionStart?.("pan"),
169
171
  shouldPan: () => {
170
- const t = u();
171
- return !!(t?.moved && t.hasEnteredCanvas && !Z(t.clientX, t.clientY));
172
+ const t = d();
173
+ return !!(t?.moved && t.hasEnteredCanvas && !ee(t.clientX, t.clientY));
172
174
  }
173
175
  }));
174
- }, D = (t) => {
175
- const i = u();
176
+ }, L = (t) => {
177
+ const i = d();
176
178
  if (!i) return;
177
- const l = !i.moved;
178
- if (i.stopInteraction(), E(), o(null), v = void 0, l) {
179
- L() !== "background" && e.onSoloFilter(String(i.id), q());
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
182
  return;
181
183
  }
182
184
  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
+ }, $ = (t, i, c, T, r) => {
186
+ t.preventDefault(), f?.stop({
185
187
  reason: "manual_stop",
186
188
  commit: !1
187
189
  }), S(), o({
188
190
  kind: i,
189
- id: l,
190
- label: P,
191
+ id: c,
192
+ label: T,
191
193
  icon: r,
192
194
  pointerId: t.pointerId,
193
195
  startClientX: t.clientX,
@@ -197,40 +199,48 @@ function Ne(e) {
197
199
  moved: !1,
198
200
  overCanvas: !1,
199
201
  hasEnteredCanvas: !1,
202
+ preview: null,
200
203
  stopInteraction: we({
201
204
  kind: "drag",
202
205
  cursor: "grabbing"
203
206
  })
204
207
  });
205
- const b = (c) => {
206
- let m = !1;
207
- o((_) => {
208
- if (!_ || _.pointerId !== c.pointerId) return _;
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
- ..._,
212
- clientX: c.clientX,
213
- clientY: c.clientY,
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, {
214
+ ...v,
215
+ clientX: l.clientX,
216
+ clientY: l.clientY,
214
217
  moved: M,
215
- overCanvas: I,
216
- hasEnteredCanvas: z
218
+ overCanvas: y,
219
+ hasEnteredCanvas: z,
220
+ preview: y ? {
221
+ kind: v.kind,
222
+ id: v.id,
223
+ label: v.label,
224
+ clientX: l.clientX,
225
+ clientY: l.clientY
226
+ } : null
217
227
  };
218
- }), m && g?.updatePointer(c.clientX, c.clientY);
228
+ }), h && g?.updatePointer(l.clientX, l.clientY);
219
229
  };
220
- v = Ee({
230
+ f = Ee({
221
231
  pointerEvent: t,
222
232
  captureEl: t.currentTarget,
223
- onMove: b,
233
+ onMove: _,
224
234
  onEnd: ({
225
- commit: c
226
- }) => D(c)
235
+ commit: l
236
+ }) => L(l)
227
237
  });
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) => ({
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) => ({
229
239
  id: t.tool,
230
240
  kind: "tool",
231
241
  label: t.label,
232
242
  icon: t.icon
233
- })) : [...$e.map((t) => ({
243
+ })) : [...Pe.map((t) => ({
234
244
  id: t.tool,
235
245
  kind: "tool",
236
246
  label: t.label,
@@ -240,87 +250,87 @@ function Ne(e) {
240
250
  kind: "widget",
241
251
  label: t.label,
242
252
  icon: t.icon
243
- }))]), q = K(() => U().map((t) => String(t.id))), F = () => L() !== "background", ae = (t) => !F() || e.filters[t] !== !1, ce = (t) => {
253
+ }))]), q = K(() => U().map((t) => String(t.id))), F = () => D() !== "background", le = (t) => !F() || e.filters[t] !== !1, ce = (t) => {
244
254
  if (!F())
245
255
  return !1;
246
256
  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,
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,
251
261
  x: s() === 1 ? -5 : 0
252
262
  });
253
263
  return [(() => {
254
- var t = De(), i = t.firstChild, l = i.firstChild;
264
+ var t = Le(), i = t.firstChild, c = i.firstChild;
255
265
  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, {
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, {
258
268
  class: "workbench-dock__tile",
259
269
  get animate() {
260
- return le();
270
+ return se();
261
271
  },
262
272
  get transition() {
263
273
  return {
264
- duration: Y.fast,
265
- easing: H.easeOut
274
+ duration: H.fast,
275
+ easing: x.easeOut
266
276
  };
267
277
  },
268
278
  get children() {
269
- return d(ee, {
279
+ return u(te, {
270
280
  class: "workbench-dock__icon"
271
281
  });
272
282
  }
273
- }), null), h(l, d(X.span, {
283
+ }), null), k(c, u(Y.span, {
274
284
  class: "workbench-dock__tooltip",
275
285
  get animate() {
276
286
  return {
277
- opacity: y() && !n() ? 1 : 0,
278
- y: y() && !n() ? -6 : 0
287
+ opacity: I() && !n() ? 1 : 0,
288
+ y: I() && !n() ? -6 : 0
279
289
  };
280
290
  },
281
291
  get transition() {
282
292
  return {
283
- duration: Y.fast,
284
- easing: H.easeOut
293
+ duration: H.fast,
294
+ easing: x.easeOut
285
295
  };
286
296
  },
287
297
  get children() {
288
- return re().label;
298
+ return ae().label;
289
299
  }
290
- }), null), h(i, d(V, {
300
+ }), null), k(i, u(V, {
291
301
  get when() {
292
302
  return n();
293
303
  },
294
304
  get children() {
295
- var r = Le();
296
- return h(r, d(J, {
305
+ var r = De();
306
+ return k(r, u(Q, {
297
307
  each: N,
298
- children: (b) => {
299
- const c = b.icon;
308
+ children: (_) => {
309
+ const l = _.icon;
300
310
  return (() => {
301
- var m = Me(), _ = m.firstChild, B = _.nextSibling, T = B.firstChild, M = T.nextSibling;
302
- return m.$$click = () => {
303
- e.onSelectMode?.(b.mode), w(!1);
304
- }, h(_, d(c, {
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, {
305
315
  class: "workbench-dock__mode-icon"
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;
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;
309
319
  }, {
310
320
  e: void 0,
311
321
  t: void 0
312
- }), m;
322
+ }), h;
313
323
  })();
314
324
  }
315
325
  })), r;
316
326
  }
317
- }), null), h(t, d(J, {
327
+ }), null), k(t, u(Q, {
318
328
  get each() {
319
329
  return U();
320
330
  },
321
- children: (r, b) => {
322
- const c = () => b() + 1;
323
- return d(Re, {
331
+ children: (r, _) => {
332
+ const l = () => _() + 1;
333
+ return u(Re, {
324
334
  get id() {
325
335
  return String(r.id);
326
336
  },
@@ -337,37 +347,37 @@ function Ne(e) {
337
347
  return ce(String(r.id));
338
348
  },
339
349
  get visible() {
340
- return ae(String(r.id));
350
+ return le(String(r.id));
341
351
  },
342
352
  get filterable() {
343
353
  return F();
344
354
  },
345
355
  get hoverOffset() {
346
- return C(c());
356
+ return C(l());
347
357
  },
348
358
  get isDragging() {
349
- return se(() => r.kind === "widget")() ? oe() === r.id : ie() === r.id;
359
+ return de(() => r.kind === "widget")() ? ie() === r.id : re() === r.id;
350
360
  },
351
- onEnter: () => a(c()),
352
- onLeave: () => a((m) => m === c() ? null : m),
353
- onDragBegin: p
361
+ onEnter: () => a(l()),
362
+ onLeave: () => a((h) => h === l() ? null : h),
363
+ onDragBegin: $
354
364
  });
355
365
  }
356
366
  }), null), A((r) => {
357
- var b = L() === "background", c = !!(y() || n()), m = n();
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;
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;
359
369
  }, {
360
370
  e: void 0,
361
371
  t: void 0,
362
372
  a: void 0
363
373
  }), t;
364
- })(), d(V, {
374
+ })(), u(V, {
365
375
  get when() {
366
- return u()?.moved ?? !1;
376
+ return d()?.moved ?? !1;
367
377
  },
368
378
  get children() {
369
- return d(Ae, {
370
- state: u
379
+ return u(Ae, {
380
+ state: d
371
381
  });
372
382
  }
373
383
  })];
@@ -376,25 +386,25 @@ function Ae(e) {
376
386
  const s = () => {
377
387
  const n = e.state();
378
388
  return n ? `translate3d(${n.clientX + 14}px, ${n.clientY - 56}px, 0)` : "translate3d(0px, 0px, 0)";
379
- }, a = () => e.state()?.overCanvas ?? !1, u = () => e.state()?.label ?? "", o = () => e.state()?.icon;
380
- return d(de, {
389
+ }, a = () => e.state()?.overCanvas ?? !1, d = () => e.state()?.label ?? "", o = () => e.state()?.icon;
390
+ return u(ue, {
381
391
  get children() {
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, {
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, {
384
394
  get when() {
385
395
  return o();
386
396
  },
387
397
  children: (S) => {
388
- const D = S();
389
- return d(D, {
398
+ const L = S();
399
+ return u(L, {
390
400
  class: "w-4 h-4"
391
401
  });
392
402
  }
393
- })), h(f, u), h(C, d(_e, {
403
+ })), k(m, d), k(C, u(_e, {
394
404
  class: "w-3 h-3"
395
- }), E), h(E, () => a() ? "Drop to create" : "Drag onto canvas"), A((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;
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;
398
408
  }, {
399
409
  e: void 0,
400
410
  t: void 0
@@ -402,7 +412,7 @@ function Ae(e) {
402
412
  }
403
413
  });
404
414
  }
405
- ve(["pointerdown", "click"]);
415
+ fe(["pointerdown", "click"]);
406
416
  export {
407
417
  Ne as WorkbenchDock
408
418
  };