@floegence/floe-webapp-core 0.36.59 → 0.36.61

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