@floegence/floe-webapp-core 0.101.16 → 0.101.19

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,73 +1,73 @@
1
- import { insert as k, createComponent as s, effect as K, setAttribute as L, memo as B, className as qe, template as $, Portal as ze, setStyleProperty as je, Dynamic as Je, use as Qe, delegateEvents as Ze } from "solid-js/web";
2
- import { createSignal as se, onCleanup as p, createEffect as ee, createMemo as A, Show as R, For as te, Index as ye } from "solid-js";
1
+ import { insert as m, createComponent as s, effect as K, setAttribute as L, memo as R, className as ze, template as $, Portal as je, setStyleProperty as Je, use as Te, Dynamic as Qe, delegateEvents as Ze } from "solid-js/web";
2
+ import { createSignal as se, onCleanup as q, createEffect as ee, createMemo as A, Show as B, For as te, Index as ye, onMount as pe } from "solid-js";
3
3
  import { Motion as N } from "../../node_modules/.pnpm/solid-motionone@1.0.4_solid-js@1.9.17/node_modules/solid-motionone/dist/index.js";
4
4
  import { easing as W, duration as G } from "../../utils/animations.js";
5
- import { Plus as pe } from "../icons/index.js";
6
- import { startHotInteraction as et } from "../../utils/hotInteraction.js";
7
- import { startPointerSession as tt } from "../ui/pointerSession.js";
8
- import { clientToCanvasWorld as nt } from "../ui/canvasGeometry.js";
9
- import { isBarItemContextMenuKey as ot, keyboardBarItemContextMenuRequest as rt } from "../layout/barItemContextMenu.js";
10
- import { createWorkbenchWidgetFrame as it } from "./workbenchHelpers.js";
11
- import { getWidgetEntry as at } from "./widgets/widgetRegistry.js";
12
- import { WORKBENCH_EDGE_AUTO_PAN_FRAME_SELECTOR as Te, frameFromElement as $e, createWorkbenchEdgeAutoPanController as ct } from "./workbenchEdgeAutoPan.js";
13
- import { DockLayoutDashboard as lt, DockLayers as st, DockRegion as dt, DockText as ut, DockMessageSquare as gt } from "../icons/DockIcons.js";
14
- var vt = /* @__PURE__ */ $("<button type=button class=workbench-dock__item>"), ft = /* @__PURE__ */ $('<button type=button class="workbench-dock__item workbench-dock__action">'), kt = /* @__PURE__ */ $("<span class=workbench-dock__external-placeholder aria-hidden=true>"), mt = /* @__PURE__ */ $('<div class=workbench-dock__mode-popover role=menu aria-label="Canvas mode">'), ht = /* @__PURE__ */ $("<span class=workbench-dock__divider aria-hidden=true>"), bt = /* @__PURE__ */ $('<div 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>'), wt = /* @__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>"), _t = /* @__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>");
15
- const Se = 5, Et = 1e3, Dt = ".workbench-dock", Ct = [{
5
+ import { Plus as et } from "../icons/index.js";
6
+ import { startHotInteraction as tt } from "../../utils/hotInteraction.js";
7
+ import { startPointerSession as nt } from "../ui/pointerSession.js";
8
+ import { clientToCanvasWorld as ot } from "../ui/canvasGeometry.js";
9
+ import { isBarItemContextMenuKey as rt, keyboardBarItemContextMenuRequest as it } from "../layout/barItemContextMenu.js";
10
+ import { createWorkbenchWidgetFrame as at } from "./workbenchHelpers.js";
11
+ import { getWidgetEntry as ct } from "./widgets/widgetRegistry.js";
12
+ import { WORKBENCH_EDGE_AUTO_PAN_FRAME_SELECTOR as $e, frameFromElement as Xe, createWorkbenchEdgeAutoPanController as lt } from "./workbenchEdgeAutoPan.js";
13
+ import { DockLayoutDashboard as st, DockLayers as dt, DockRegion as ut, DockText as gt, DockMessageSquare as vt } from "../icons/DockIcons.js";
14
+ var ft = /* @__PURE__ */ $("<button type=button class=workbench-dock__item>"), kt = /* @__PURE__ */ $('<button type=button class="workbench-dock__item workbench-dock__action">'), mt = /* @__PURE__ */ $("<span class=workbench-dock__external-placeholder aria-hidden=true>"), ht = /* @__PURE__ */ $('<div class=workbench-dock__mode-popover role=menu aria-label="Canvas mode">'), bt = /* @__PURE__ */ $("<span class=workbench-dock__divider aria-hidden=true>"), wt = /* @__PURE__ */ $('<div 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>'), _t = /* @__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>"), Et = /* @__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>");
15
+ const Se = 5, Dt = 1e3, Ct = ".workbench-dock", Mt = [{
16
16
  mode: "work",
17
17
  label: "Work Mode",
18
18
  description: "Operate windows and sticky notes",
19
- icon: lt
19
+ icon: st
20
20
  }, {
21
21
  mode: "background",
22
22
  label: "Composition Mode",
23
23
  description: "Arrange regions and canvas text",
24
- icon: st
24
+ icon: dt
25
25
  }], Pt = [{
26
26
  tool: "sticky-note",
27
27
  label: "Sticky",
28
- icon: gt
29
- }], Mt = [{
28
+ icon: vt
29
+ }], xt = [{
30
30
  tool: "background-region",
31
31
  label: "Region",
32
- icon: dt
32
+ icon: ut
33
33
  }, {
34
34
  tool: "text",
35
35
  label: "Text",
36
- icon: ut
36
+ icon: gt
37
37
  }];
38
- function xt(e) {
39
- const l = e?.closest(".workbench-surface")?.querySelector(Te);
40
- return l instanceof HTMLElement ? $e(l) : null;
38
+ function It(e) {
39
+ const c = e?.closest(".workbench-surface")?.querySelector($e);
40
+ return c instanceof HTMLElement ? Xe(c) : null;
41
41
  }
42
- function ue(e, g, l) {
43
- return e >= l.left && e <= l.right && g >= l.top && g <= l.bottom;
42
+ function ue(e, v, c) {
43
+ return e >= c.left && e <= c.right && v >= c.top && v <= c.bottom;
44
44
  }
45
- function It(e, g, l) {
46
- return l ? ue(e, g, l) : !1;
45
+ function Lt(e, v, c) {
46
+ return c ? ue(e, v, c) : !1;
47
47
  }
48
- function Ae(e, g, l) {
49
- return Math.min(l, Math.max(g, e));
48
+ function Ae(e, v, c) {
49
+ return Math.min(c, Math.max(v, e));
50
50
  }
51
- function Lt(e, g, l, i, d) {
51
+ function yt(e, v, c, l, d) {
52
52
  if (!e) return !1;
53
- if (ue(g, l, e) || ue(i, d, e))
53
+ if (ue(v, c, e) || ue(l, d, e))
54
54
  return !0;
55
- const E = i - g, P = d - l;
56
- let b = 0, r = 1;
57
- const a = (D, M) => {
58
- if (D === 0) return M >= 0;
59
- const v = M / D;
60
- return D < 0 ? v > r ? !1 : (v > b && (b = v), !0) : v < b ? !1 : (v < r && (r = v), !0);
55
+ const M = l - v, u = d - c;
56
+ let w = 0, r = 1;
57
+ const i = (E, C) => {
58
+ if (E === 0) return C >= 0;
59
+ const f = C / E;
60
+ return E < 0 ? f > r ? !1 : (f > w && (w = f), !0) : f < w ? !1 : (f < r && (r = f), !0);
61
61
  };
62
- return a(-E, g - e.left) && a(E, e.right - g) && a(-P, l - e.top) && a(P, e.bottom - l);
62
+ return i(-M, v - e.left) && i(M, e.right - v) && i(-u, c - e.top) && i(u, e.bottom - c);
63
63
  }
64
- function Oe(e, g, l) {
65
- if (!l || typeof document.elementFromPoint != "function") return !1;
66
- const i = document.elementFromPoint(e, g);
67
- return i instanceof Element && i.closest(Dt) === l;
64
+ function Oe(e, v, c) {
65
+ if (!c || typeof document.elementFromPoint != "function") return !1;
66
+ const l = document.elementFromPoint(e, v);
67
+ return l instanceof Element && l.closest(Ct) === c;
68
68
  }
69
69
  function de(e) {
70
- const g = () => e.hoverOffset === -1 ? {
70
+ const v = () => e.hoverOffset === -1 ? {
71
71
  scale: 1.26,
72
72
  y: -6,
73
73
  x: 0
@@ -83,7 +83,7 @@ function de(e) {
83
83
  scale: 1,
84
84
  y: 0,
85
85
  x: 0
86
- }, l = () => e.hoverOffset === -1, i = (r) => {
86
+ }, c = () => e.hoverOffset === -1, l = (r) => {
87
87
  r.button === 0 && e.onDragBegin(r, e.kind, e.id, e.label, e.icon, r.currentTarget, e.canvasPlacement, null);
88
88
  }, d = (r) => {
89
89
  e.onContextMenu && (r.preventDefault(), r.stopPropagation(), e.onContextMenu({
@@ -92,20 +92,20 @@ function de(e) {
92
92
  clientY: r.clientY,
93
93
  source: "pointer"
94
94
  }));
95
- }, E = (r) => {
96
- !e.onContextMenu || !ot(r) || (r.preventDefault(), r.stopPropagation(), e.onContextMenu(rt(r.currentTarget)));
97
- }, P = (r) => {
95
+ }, M = (r) => {
96
+ !e.onContextMenu || !rt(r) || (r.preventDefault(), r.stopPropagation(), e.onContextMenu(it(r.currentTarget)));
97
+ }, u = (r) => {
98
98
  r.detail === 0 && e.onKeyboardActivate(r.currentTarget);
99
- }, b = () => {
99
+ }, w = () => {
100
100
  const r = e.presentation;
101
101
  return r ? r.count === 0 ? `${e.label} +` : r.active && r.currentIndex !== null ? `${e.label} ${r.currentIndex + 1}/${r.count}` : r.count > 1 ? `${e.label} ${r.count}` : e.label : e.label;
102
102
  };
103
103
  return (() => {
104
- var r = vt();
105
- return r.$$keydown = E, r.$$contextmenu = d, r.$$click = P, r.$$pointerdown = i, r.addEventListener("pointerleave", () => e.onLeave()), r.addEventListener("pointerenter", () => e.onEnter()), k(r, s(N.span, {
104
+ var r = ft();
105
+ return r.$$keydown = M, r.$$contextmenu = d, r.$$click = u, r.$$pointerdown = l, r.addEventListener("pointerleave", () => e.onLeave()), r.addEventListener("pointerenter", () => e.onEnter()), m(r, s(N.span, {
106
106
  class: "workbench-dock__tile",
107
107
  get animate() {
108
- return g();
108
+ return v();
109
109
  },
110
110
  get transition() {
111
111
  return {
@@ -115,18 +115,18 @@ function de(e) {
115
115
  },
116
116
  get children() {
117
117
  return (() => {
118
- const a = e.icon;
119
- return s(a, {
118
+ const i = e.icon;
119
+ return s(i, {
120
120
  class: "workbench-dock__icon"
121
121
  });
122
122
  })();
123
123
  }
124
- }), null), k(r, s(N.span, {
124
+ }), null), m(r, s(N.span, {
125
125
  class: "workbench-dock__tooltip",
126
126
  get animate() {
127
127
  return {
128
- opacity: l() ? 1 : 0,
129
- y: l() ? -6 : 0
128
+ opacity: c() ? 1 : 0,
129
+ y: c() ? -6 : 0
130
130
  };
131
131
  },
132
132
  get transition() {
@@ -136,11 +136,11 @@ function de(e) {
136
136
  };
137
137
  },
138
138
  get children() {
139
- return B(() => e.activationMode === "focus-cycle")() ? b() : e.label;
139
+ return R(() => e.activationMode === "focus-cycle")() ? w() : e.label;
140
140
  }
141
- }), null), K((a) => {
142
- var D = e.kind === "host" ? e.id : void 0, M = e.kind === "widget" || e.kind === "tool" ? e.id : void 0, v = !!e.active, x = !!(e.filterable && !e.visible), X = !!l(), q = !!e.isDragging, F = e.activationMode === "focus-cycle" && e.presentation ? b() : e.filterable ? `${e.label} — click to solo, drag to canvas to create` : `${e.label} — drag to canvas to create`, z = e.activationMode === "focus-cycle" ? e.presentation?.active : e.active, Y = e.onContextMenu ? "menu" : void 0;
143
- return D !== a.e && L(r, "data-workbench-dock-item", a.e = D), M !== a.t && L(r, "data-workbench-dock-component", a.t = M), v !== a.a && r.classList.toggle("is-active", a.a = v), x !== a.o && r.classList.toggle("is-filter-muted", a.o = x), X !== a.i && r.classList.toggle("is-hovered", a.i = X), q !== a.n && r.classList.toggle("is-source-dragging", a.n = q), F !== a.s && L(r, "aria-label", a.s = F), z !== a.h && L(r, "aria-pressed", a.h = z), Y !== a.r && L(r, "aria-haspopup", a.r = Y), a;
141
+ }), null), K((i) => {
142
+ var E = e.kind === "host" ? e.id : void 0, C = e.kind === "widget" || e.kind === "tool" ? e.id : void 0, f = !!e.active, x = !!(e.filterable && !e.visible), X = !!c(), z = !!e.isDragging, F = e.activationMode === "focus-cycle" && e.presentation ? w() : e.filterable ? `${e.label} — click to solo, drag to canvas to create` : `${e.label} — drag to canvas to create`, j = e.activationMode === "focus-cycle" ? e.presentation?.active : e.active, Y = e.onContextMenu ? "menu" : void 0;
143
+ return E !== i.e && L(r, "data-workbench-dock-item", i.e = E), C !== i.t && L(r, "data-workbench-dock-component", i.t = C), f !== i.a && r.classList.toggle("is-active", i.a = f), x !== i.o && r.classList.toggle("is-filter-muted", i.o = x), X !== i.i && r.classList.toggle("is-hovered", i.i = X), z !== i.n && r.classList.toggle("is-source-dragging", i.n = z), F !== i.s && L(r, "aria-label", i.s = F), j !== i.h && L(r, "aria-pressed", i.h = j), Y !== i.r && L(r, "aria-haspopup", i.r = Y), i;
144
144
  }, {
145
145
  e: void 0,
146
146
  t: void 0,
@@ -154,18 +154,21 @@ function de(e) {
154
154
  }), r;
155
155
  })();
156
156
  }
157
- function yt(e) {
158
- const g = () => e.hoverOffset === -1, l = () => ({
157
+ function St(e) {
158
+ const v = () => e.hoverOffset === -1, c = () => ({
159
159
  scale: 1,
160
160
  y: 0,
161
161
  x: 0
162
162
  });
163
- return (() => {
164
- var i = ft();
165
- return i.$$click = (d) => e.onActivate(d.currentTarget), i.addEventListener("dragstart", (d) => d.preventDefault()), i.addEventListener("pointerleave", () => e.onLeave()), i.addEventListener("pointerenter", () => e.onEnter()), L(i, "draggable", !1), k(i, s(N.span, {
163
+ let l;
164
+ return pe(() => e.action.buttonRef?.(l ?? null)), q(() => e.action.buttonRef?.(null)), (() => {
165
+ var d = kt();
166
+ d.$$click = (u) => e.onActivate(u.currentTarget), d.addEventListener("dragstart", (u) => u.preventDefault()), d.addEventListener("pointerleave", () => e.onLeave()), d.addEventListener("pointerenter", () => e.onEnter());
167
+ var M = l;
168
+ return typeof M == "function" ? Te(M, d) : l = d, L(d, "draggable", !1), m(d, s(N.span, {
166
169
  class: "workbench-dock__tile",
167
170
  get animate() {
168
- return l();
171
+ return c();
169
172
  },
170
173
  get transition() {
171
174
  return {
@@ -174,19 +177,19 @@ function yt(e) {
174
177
  };
175
178
  },
176
179
  get children() {
177
- return s(Je, {
180
+ return s(Qe, {
178
181
  get component() {
179
182
  return e.action.icon;
180
183
  },
181
184
  class: "workbench-dock__icon"
182
185
  });
183
186
  }
184
- }), null), k(i, s(N.span, {
187
+ }), null), m(d, s(N.span, {
185
188
  class: "workbench-dock__tooltip",
186
189
  get animate() {
187
190
  return {
188
- opacity: g() ? 1 : 0,
189
- y: g() ? -6 : 0
191
+ opacity: v() ? 1 : 0,
192
+ y: v() ? -6 : 0
190
193
  };
191
194
  },
192
195
  get transition() {
@@ -198,96 +201,96 @@ function yt(e) {
198
201
  get children() {
199
202
  return e.action.label;
200
203
  }
201
- }), null), K((d) => {
202
- var E = e.action.id, P = !!e.action.active, b = !!g(), r = e.action.label, a = e.action.active;
203
- return E !== d.e && L(i, "data-workbench-dock-action", d.e = E), P !== d.t && i.classList.toggle("is-active", d.t = P), b !== d.a && i.classList.toggle("is-hovered", d.a = b), r !== d.o && L(i, "aria-label", d.o = r), a !== d.i && L(i, "aria-pressed", d.i = a), d;
204
+ }), null), K((u) => {
205
+ var w = e.action.id, r = !!e.action.active, i = !!v(), E = e.action.label, C = e.action.active;
206
+ return w !== u.e && L(d, "data-workbench-dock-action", u.e = w), r !== u.t && d.classList.toggle("is-active", u.t = r), i !== u.a && d.classList.toggle("is-hovered", u.a = i), E !== u.o && L(d, "aria-label", u.o = E), C !== u.i && L(d, "aria-pressed", u.i = C), u;
204
207
  }, {
205
208
  e: void 0,
206
209
  t: void 0,
207
210
  a: void 0,
208
211
  o: void 0,
209
212
  i: void 0
210
- }), i;
213
+ }), d;
211
214
  })();
212
215
  }
213
- function Gt(e) {
214
- const [g, l] = se(null), [i, d] = se(null), [E, P] = se(!1);
215
- let b, r, a, D, M = null;
216
- const v = () => e.activationMode === "focus-cycle" ? "focus-cycle" : "solo-filter";
217
- p(() => {
218
- D?.stop(), r?.stop({
216
+ function Vt(e) {
217
+ const [v, c] = se(null), [l, d] = se(null), [M, u] = se(!1);
218
+ let w, r, i, E, C = null;
219
+ const f = () => e.activationMode === "focus-cycle" ? "focus-cycle" : "solo-filter";
220
+ q(() => {
221
+ E?.stop(), r?.stop({
219
222
  reason: "manual_stop",
220
223
  commit: !1
221
- }), r = void 0, a?.clear(), a = void 0, i()?.stopInteraction(), e.onDragPreviewChange?.(null), e.registerExternalDockDragController?.(null);
224
+ }), r = void 0, i?.clear(), i = void 0, l()?.stopInteraction(), e.onDragPreviewChange?.(null), e.registerExternalDockDragController?.(null);
222
225
  }), ee(() => {
223
- e.onDragPreviewChange?.(i()?.preview ?? null);
226
+ e.onDragPreviewChange?.(l()?.preview ?? null);
224
227
  }), ee(() => {
225
228
  const t = (n) => {
226
- n.key !== "Escape" || !i() || (n.preventDefault(), r?.stop({
229
+ n.key !== "Escape" || !l() || (n.preventDefault(), r?.stop({
227
230
  reason: "manual_stop",
228
231
  commit: !1
229
232
  }));
230
233
  };
231
- window.addEventListener("keydown", t, !0), p(() => window.removeEventListener("keydown", t, !0));
234
+ window.addEventListener("keydown", t, !0), q(() => window.removeEventListener("keydown", t, !0));
232
235
  }), ee(() => {
233
- if (!E() || typeof window > "u") return;
234
- const t = (c) => {
235
- b && c.target instanceof Node && b.contains(c.target) || P(!1);
236
- }, n = (c) => {
237
- c.key === "Escape" && P(!1);
236
+ if (!M() || typeof window > "u") return;
237
+ const t = (a) => {
238
+ w && a.target instanceof Node && w.contains(a.target) || u(!1);
239
+ }, n = (a) => {
240
+ a.key === "Escape" && u(!1);
238
241
  };
239
- window.addEventListener("pointerdown", t, !0), window.addEventListener("keydown", n, !0), p(() => {
242
+ window.addEventListener("pointerdown", t, !0), window.addEventListener("keydown", n, !0), q(() => {
240
243
  window.removeEventListener("pointerdown", t, !0), window.removeEventListener("keydown", n, !0);
241
244
  });
242
245
  });
243
246
  const x = (t) => {
244
- const n = g();
245
- return n === null || n <= j().length || n >= ie() && n < we() ? 0 : n === t ? -1 : n === t + 1 ? -2 : n === t - 1 ? 1 : 0;
247
+ const n = v();
248
+ return n === null || n <= J().length || n >= ie() && n < we() ? 0 : n === t ? -1 : n === t + 1 ? -2 : n === t - 1 ? 1 : 0;
246
249
  }, X = () => {
247
- D?.stop(), D = void 0, M = null;
248
- }, q = () => {
249
- !e.viewport || !e.onViewportCommit || (M = e.viewport, D?.stop(), D = ct({
250
+ E?.stop(), E = void 0, C = null;
251
+ }, z = () => {
252
+ !e.viewport || !e.onViewportCommit || (C = e.viewport, E?.stop(), E = lt({
250
253
  readFrame: () => {
251
- const n = b?.closest(".workbench-surface")?.querySelector(Te);
252
- return n instanceof HTMLElement ? $e(n) : null;
254
+ const n = w?.closest(".workbench-surface")?.querySelector($e);
255
+ return n instanceof HTMLElement ? Xe(n) : null;
253
256
  },
254
- readViewport: () => M ?? e.viewport ?? null,
257
+ readViewport: () => C ?? e.viewport ?? null,
255
258
  commitViewport: (t) => {
256
- M = t, e.onViewportCommit?.(t);
259
+ C = t, e.onViewportCommit?.(t);
257
260
  },
258
261
  onPanStart: () => e.onViewportInteractionStart?.("pan"),
259
262
  shouldPan: () => {
260
- const t = i();
261
- return !!(t?.moved && t.hasEnteredCanvas && !Oe(t.clientX, t.clientY, b));
263
+ const t = l();
264
+ return !!(t?.moved && t.hasEnteredCanvas && !Oe(t.clientX, t.clientY, w));
262
265
  }
263
266
  }));
264
- }, F = (t, n, c, w) => {
267
+ }, F = (t, n, a, _) => {
265
268
  if (e.onDockActivation?.({
266
269
  kind: t,
267
270
  id: String(n)
268
271
  }), t === "external") return;
269
272
  if (t === "host") {
270
- e.dockItems?.find((o) => o.id === n)?.onActivate?.(w);
273
+ e.dockItems?.find((o) => o.id === n)?.onActivate?.(_);
271
274
  return;
272
275
  }
273
276
  const I = {
274
277
  kind: t,
275
278
  id: n,
276
- label: c,
277
- trigger: w
279
+ label: a,
280
+ trigger: _
278
281
  };
279
282
  if (!e.onItemClick?.(I)) {
280
- if (v() === "focus-cycle") {
283
+ if (f() === "focus-cycle") {
281
284
  e.onFocusCycleItem?.(I);
282
285
  return;
283
286
  }
284
287
  y() !== "background" && e.onSoloFilter(String(n), Ee());
285
288
  }
286
- }, z = (t) => {
287
- const n = i();
289
+ }, j = (t) => {
290
+ const n = l();
288
291
  if (!n) return;
289
- const c = !n.moved, w = M ?? e.viewport;
290
- if (n.stopInteraction(), X(), d(null), r = void 0, n.kind === "external" && n.moved && a?.expire(), c) {
292
+ const a = !n.moved, _ = C ?? e.viewport;
293
+ if (n.stopInteraction(), X(), d(null), r = void 0, n.kind === "external" && n.moved && i?.expire(), a) {
291
294
  if (n.kind === "external" || !(n.trigger instanceof HTMLButtonElement)) return;
292
295
  F(n.kind, n.id, n.label, n.trigger);
293
296
  return;
@@ -297,7 +300,7 @@ function Gt(e) {
297
300
  return;
298
301
  }
299
302
  if (t && n.overCanvas && n.canvasPlacement) {
300
- const I = n.canvasFrame && w ? nt(n.canvasFrame, w, {
303
+ const I = n.canvasFrame && _ ? ot(n.canvasFrame, _, {
301
304
  clientX: n.clientX,
302
305
  clientY: n.clientY
303
306
  }) : null, o = n.canvasFrame ? {
@@ -309,16 +312,16 @@ function Gt(e) {
309
312
  } : void 0;
310
313
  n.canvasPlacement.onDrop(n.clientX, n.clientY, o);
311
314
  }
312
- }, Y = (t, n, c, w, I, o, h, _, m = "before-components") => {
315
+ }, Y = (t, n, a, _, I, o, b, D, h = "before-components") => {
313
316
  t.preventDefault(), r?.stop({
314
317
  reason: "manual_stop",
315
318
  commit: !1
316
- }), q();
317
- const C = xt(b);
319
+ }), z();
320
+ const P = It(w);
318
321
  d({
319
322
  kind: n,
320
- id: c,
321
- label: w,
323
+ id: a,
324
+ label: _,
322
325
  icon: I,
323
326
  pointerId: t.pointerId,
324
327
  startClientX: t.clientX,
@@ -328,73 +331,73 @@ function Gt(e) {
328
331
  moved: !1,
329
332
  overCanvas: !1,
330
333
  hasEnteredCanvas: !1,
331
- canvasFrame: C,
334
+ canvasFrame: P,
332
335
  preview: null,
333
- canvasPlacement: h,
334
- dockDrop: _,
335
- dockPlacement: m,
336
- stopInteraction: et({
336
+ canvasPlacement: b,
337
+ dockDrop: D,
338
+ dockPlacement: h,
339
+ stopInteraction: tt({
337
340
  kind: "drag",
338
341
  cursor: "grabbing"
339
342
  }),
340
343
  trigger: o,
341
344
  overDock: !1
342
345
  });
343
- const O = (u) => {
346
+ const O = (g) => {
344
347
  let T = !1;
345
- d((f) => {
346
- if (!f || f.pointerId !== u.pointerId) return f;
347
- const J = u.clientX - f.startClientX, Q = u.clientY - f.startClientY, H = f.moved || Math.abs(J) > Se || Math.abs(Q) > Se;
348
- if (f.kind === "external" && H && !f.moved) {
348
+ d((k) => {
349
+ if (!k || k.pointerId !== g.pointerId) return k;
350
+ const Q = g.clientX - k.startClientX, Z = g.clientY - k.startClientY, H = k.moved || Math.abs(Q) > Se || Math.abs(Z) > Se;
351
+ if (k.kind === "external" && H && !k.moved) {
349
352
  let V;
350
353
  const U = () => {
351
- V !== void 0 && window.clearTimeout(V), f.trigger.removeEventListener("click", xe, !0), window.removeEventListener("pointerdown", Ie, !0), a?.clear === U && (a = void 0);
354
+ V !== void 0 && window.clearTimeout(V), k.trigger.removeEventListener("click", xe, !0), window.removeEventListener("pointerdown", Ie, !0), i?.clear === U && (i = void 0);
352
355
  }, xe = (Le) => {
353
356
  Le.preventDefault(), Le.stopImmediatePropagation(), U();
354
- }, Ie = () => U(), Ue = () => {
355
- V !== void 0 && window.clearTimeout(V), V = window.setTimeout(U, Et);
357
+ }, Ie = () => U(), qe = () => {
358
+ V !== void 0 && window.clearTimeout(V), V = window.setTimeout(U, Dt);
356
359
  };
357
- f.trigger.addEventListener("click", xe, !0), window.addEventListener("pointerdown", Ie, !0), a = {
360
+ k.trigger.addEventListener("click", xe, !0), window.addEventListener("pointerdown", Ie, !0), i = {
358
361
  clear: U,
359
- expire: Ue
362
+ expire: qe
360
363
  };
361
364
  }
362
- const Z = Oe(u.clientX, u.clientY, b), S = f.canvasFrame, Ce = H && It(u.clientX, u.clientY, S), Pe = Ce && !Z, We = H && !Z && Lt(S, f.clientX, f.clientY, u.clientX, u.clientY), Me = f.hasEnteredCanvas || Ce || We;
363
- T = H && Me && !Z;
364
- const Ge = S ? Ae(u.clientX, S.left, S.right) : u.clientX, Ve = S ? Ae(u.clientY, S.top, S.bottom) : u.clientY;
365
+ const p = Oe(g.clientX, g.clientY, w), S = k.canvasFrame, Ce = H && Lt(g.clientX, g.clientY, S), Me = Ce && !p, Ge = H && !p && yt(S, k.clientX, k.clientY, g.clientX, g.clientY), Pe = k.hasEnteredCanvas || Ce || Ge;
366
+ T = H && Pe && !p;
367
+ const Ve = S ? Ae(g.clientX, S.left, S.right) : g.clientX, Ue = S ? Ae(g.clientY, S.top, S.bottom) : g.clientY;
365
368
  return {
366
- ...f,
367
- clientX: u.clientX,
368
- clientY: u.clientY,
369
+ ...k,
370
+ clientX: g.clientX,
371
+ clientY: g.clientY,
369
372
  moved: H,
370
- overDock: Z,
371
- overCanvas: Pe,
372
- hasEnteredCanvas: Me,
373
- preview: H && S && f.canvasPlacement?.preview ? {
374
- kind: f.canvasPlacement.preview.kind,
375
- id: f.canvasPlacement.preview.id,
376
- label: f.label,
377
- clientX: Ge,
378
- clientY: Ve,
379
- dropAllowed: Pe,
373
+ overDock: p,
374
+ overCanvas: Me,
375
+ hasEnteredCanvas: Pe,
376
+ preview: H && S && k.canvasPlacement?.preview ? {
377
+ kind: k.canvasPlacement.preview.kind,
378
+ id: k.canvasPlacement.preview.id,
379
+ label: k.label,
380
+ clientX: Ve,
381
+ clientY: Ue,
382
+ dropAllowed: Me,
380
383
  canvasFrame: S
381
384
  } : null
382
385
  };
383
- }), T && D?.updatePointer(u.clientX, u.clientY);
386
+ }), T && E?.updatePointer(g.clientX, g.clientY);
384
387
  };
385
- r = tt({
388
+ r = nt({
386
389
  pointerEvent: t,
387
390
  captureEl: t.currentTarget,
388
391
  onMove: O,
389
392
  onEnd: ({
390
- commit: u,
393
+ commit: g,
391
394
  snapshot: T
392
395
  }) => {
393
396
  O({
394
397
  pointerId: T.pointerId,
395
398
  clientX: T.latestClientX,
396
399
  clientY: T.latestClientY
397
- }), z(u);
400
+ }), j(g);
398
401
  }
399
402
  });
400
403
  }, ne = (t) => t ? {
@@ -402,107 +405,107 @@ function Gt(e) {
402
405
  kind: "widget",
403
406
  id: t.widgetType
404
407
  },
405
- onDrop: (n, c, w) => {
406
- if (!w?.worldPoint) return;
407
- const I = at(t.widgetType, e.widgetDefinitions);
408
+ onDrop: (n, a, _) => {
409
+ if (!_?.worldPoint) return;
410
+ const I = ct(t.widgetType, e.widgetDefinitions);
408
411
  t.onDrop({
409
412
  widgetType: t.widgetType,
410
- centerWorld: w.worldPoint,
411
- frame: it(I, {
413
+ centerWorld: _.worldPoint,
414
+ frame: at(I, {
412
415
  anchor: "center",
413
- worldX: w.worldPoint.worldX,
414
- worldY: w.worldPoint.worldY
416
+ worldX: _.worldPoint.worldX,
417
+ worldY: _.worldPoint.worldY
415
418
  })
416
419
  });
417
420
  }
418
- } : null, Xe = (t, n) => {
419
- t.button !== 0 || !(t.currentTarget instanceof HTMLElement) || (a?.clear(), a = void 0, Y(t, "external", n.id, n.label, n.icon, t.currentTarget, ne(n.canvasPlacement), n.onDropToDock ?? null, n.dockPlacement ?? "before-components"));
421
+ } : null, Fe = (t, n) => {
422
+ t.button !== 0 || !(t.currentTarget instanceof HTMLElement) || (i?.clear(), i = void 0, Y(t, "external", n.id, n.label, n.icon, t.currentTarget, ne(n.canvasPlacement), n.onDropToDock ?? null, n.dockPlacement ?? "before-components"));
420
423
  };
421
424
  ee(() => {
422
425
  e.registerExternalDockDragController?.({
423
- begin: Xe
424
- }), p(() => e.registerExternalDockDragController?.(null));
426
+ begin: Fe
427
+ }), q(() => e.registerExternalDockDragController?.(null));
425
428
  });
426
- const Fe = () => i()?.kind === "widget" ? i().id : null, Ye = () => i()?.kind === "tool" ? i().id : null, Be = () => i()?.kind === "external" ? i()?.icon : void 0, y = () => e.mode === "background" || e.mode === "annotation" ? "background" : "work", oe = A(() => Ct.map((t) => ({
429
+ const Ye = () => l()?.kind === "widget" ? l().id : null, Re = () => l()?.kind === "tool" ? l().id : null, Be = () => l()?.kind === "external" ? l()?.icon : void 0, y = () => e.mode === "background" || e.mode === "annotation" ? "background" : "work", oe = A(() => Mt.map((t) => ({
427
430
  ...t,
428
431
  icon: e.modeIcons?.[t.mode] ?? t.icon
429
432
  }))), ge = A(() => oe().find((t) => t.mode === y()) ?? oe()[0]), re = A(() => {
430
433
  if (y() === "background")
431
- return Mt.map((c) => ({
432
- id: c.tool,
434
+ return xt.map((a) => ({
435
+ id: a.tool,
433
436
  kind: "tool",
434
- label: c.label,
435
- icon: c.icon
437
+ label: a.label,
438
+ icon: a.icon
436
439
  }));
437
- const t = [...Pt.map((c) => ({
438
- id: c.tool,
440
+ const t = [...Pt.map((a) => ({
441
+ id: a.tool,
439
442
  kind: "tool",
440
- label: c.label,
441
- icon: c.icon
442
- })), ...e.widgetDefinitions.map((c) => ({
443
- id: c.type,
443
+ label: a.label,
444
+ icon: a.icon
445
+ })), ...e.widgetDefinitions.map((a) => ({
446
+ id: a.type,
444
447
  kind: "widget",
445
- label: c.label,
446
- icon: c.icon
447
- }))], n = new Map(e.componentOrder?.map((c, w) => [c, w]));
448
- return t.sort((c, w) => (n.get(c.id) ?? Number.MAX_SAFE_INTEGER) - (n.get(w.id) ?? Number.MAX_SAFE_INTEGER));
449
- }), ve = A(() => y() === "background" ? [] : [...e.dockItems ?? []]), fe = A(() => ve().filter((t) => t.dockPlacement !== "after-components")), ke = A(() => ve().filter((t) => t.dockPlacement === "after-components")), me = A(() => y() === "background" ? [] : [...e.dockActions ?? []]), j = A(() => me().filter((t) => t.dockPlacement !== "after-components")), he = A(() => me().filter((t) => t.dockPlacement === "after-components")), be = () => j().length + fe().length + 1, ie = () => be() + re().length, we = () => ie() + he().length, _e = (t) => s(yt, {
448
+ label: a.label,
449
+ icon: a.icon
450
+ }))], n = new Map(e.componentOrder?.map((a, _) => [a, _]));
451
+ return t.sort((a, _) => (n.get(a.id) ?? Number.MAX_SAFE_INTEGER) - (n.get(_.id) ?? Number.MAX_SAFE_INTEGER));
452
+ }), ve = A(() => y() === "background" ? [] : [...e.dockItems ?? []]), fe = A(() => ve().filter((t) => t.dockPlacement !== "after-components")), ke = A(() => ve().filter((t) => t.dockPlacement === "after-components")), me = A(() => y() === "background" ? [] : [...e.dockActions ?? []]), J = A(() => me().filter((t) => t.dockPlacement !== "after-components")), he = A(() => me().filter((t) => t.dockPlacement === "after-components")), be = () => J().length + fe().length + 1, ie = () => be() + re().length, we = () => ie() + he().length, _e = (t) => s(St, {
450
453
  get action() {
451
454
  return t.action;
452
455
  },
453
456
  get hoverOffset() {
454
457
  return x(t.slot);
455
458
  },
456
- onEnter: () => l(t.slot),
457
- onLeave: () => l((n) => n === t.slot ? null : n),
459
+ onEnter: () => c(t.slot),
460
+ onLeave: () => c((n) => n === t.slot ? null : n),
458
461
  onActivate: (n) => {
459
462
  e.onDockActivation?.({
460
463
  kind: "action",
461
464
  id: t.action.id
462
465
  }), t.action.onActivate(n);
463
466
  }
464
- }), Ee = A(() => re().map((t) => String(t.id))), ae = () => y() !== "background", Re = (t) => !ae() || e.filters[t] !== !1, He = (t) => {
467
+ }), Ee = A(() => re().map((t) => String(t.id))), ae = () => y() !== "background", He = (t) => !ae() || e.filters[t] !== !1, Ke = (t) => {
465
468
  if (!ae())
466
469
  return !1;
467
470
  const n = Ee();
468
- return n.length > 1 && n.every((c) => e.filters[c] !== !1 == (c === t));
469
- }, Ke = (t, n) => v() === "focus-cycle" ? e.resolveItemPresentation?.({
471
+ return n.length > 1 && n.every((a) => e.filters[a] !== !1 == (a === t));
472
+ }, Ne = (t, n) => f() === "focus-cycle" ? e.resolveItemPresentation?.({
470
473
  kind: t,
471
474
  id: n
472
- }) : void 0, ce = () => g() === 0, Ne = () => ({
475
+ }) : void 0, ce = () => v() === 0, We = () => ({
473
476
  scale: 1,
474
477
  y: 0,
475
478
  x: 0
476
479
  }), le = (t) => {
477
- const n = i();
480
+ const n = l();
478
481
  return !!(n?.kind === "external" && n.moved && n.dockPlacement === t);
479
482
  }, De = () => (() => {
480
- var t = kt();
481
- return k(t, s(R, {
483
+ var t = mt();
484
+ return m(t, s(B, {
482
485
  get when() {
483
486
  return Be();
484
487
  },
485
488
  children: (n) => {
486
- const c = n();
487
- return s(c, {
489
+ const a = n();
490
+ return s(a, {
488
491
  class: "workbench-dock__icon"
489
492
  });
490
493
  }
491
- })), K(() => t.classList.toggle("is-drop-allowed", !!i()?.overDock)), t;
494
+ })), K(() => t.classList.toggle("is-drop-allowed", !!l()?.overDock)), t;
492
495
  })();
493
496
  return [(() => {
494
- var t = bt(), n = t.firstChild, c = n.firstChild, w = n.nextSibling;
495
- t.addEventListener("pointerleave", () => l(null));
496
- var I = b;
497
- return typeof I == "function" ? Qe(I, t) : b = t, c.$$click = () => {
497
+ var t = wt(), n = t.firstChild, a = n.firstChild, _ = n.nextSibling;
498
+ t.addEventListener("pointerleave", () => c(null));
499
+ var I = w;
500
+ return typeof I == "function" ? Te(I, t) : w = t, a.$$click = () => {
498
501
  e.onDockActivation?.({
499
502
  kind: "mode",
500
503
  id: y()
501
- }), P((o) => !o);
502
- }, c.addEventListener("pointerleave", () => l((o) => o === 0 ? null : o)), c.addEventListener("pointerenter", () => l(0)), k(c, s(N.span, {
504
+ }), u((o) => !o);
505
+ }, a.addEventListener("pointerleave", () => c((o) => o === 0 ? null : o)), a.addEventListener("pointerenter", () => c(0)), m(a, s(N.span, {
503
506
  class: "workbench-dock__tile",
504
507
  get animate() {
505
- return Ne();
508
+ return We();
506
509
  },
507
510
  get transition() {
508
511
  return {
@@ -518,12 +521,12 @@ function Gt(e) {
518
521
  });
519
522
  })();
520
523
  }
521
- }), null), k(c, s(N.span, {
524
+ }), null), m(a, s(N.span, {
522
525
  class: "workbench-dock__tooltip",
523
526
  get animate() {
524
527
  return {
525
- opacity: ce() && !E() ? 1 : 0,
526
- y: ce() && !E() ? -6 : 0
528
+ opacity: ce() && !M() ? 1 : 0,
529
+ y: ce() && !M() ? -6 : 0
527
530
  };
528
531
  },
529
532
  get transition() {
@@ -535,61 +538,61 @@ function Gt(e) {
535
538
  get children() {
536
539
  return ge().label;
537
540
  }
538
- }), null), k(n, s(R, {
541
+ }), null), m(n, s(B, {
539
542
  get when() {
540
- return E();
543
+ return M();
541
544
  },
542
545
  get children() {
543
- var o = mt();
544
- return k(o, s(te, {
546
+ var o = ht();
547
+ return m(o, s(te, {
545
548
  get each() {
546
549
  return oe();
547
550
  },
548
- children: (h) => {
549
- const _ = h.icon;
551
+ children: (b) => {
552
+ const D = b.icon;
550
553
  return (() => {
551
- var m = wt(), C = m.firstChild, O = C.nextSibling, u = O.firstChild, T = u.nextSibling;
552
- return m.$$click = () => {
554
+ var h = _t(), P = h.firstChild, O = P.nextSibling, g = O.firstChild, T = g.nextSibling;
555
+ return h.$$click = () => {
553
556
  e.onDockActivation?.({
554
557
  kind: "mode",
555
- id: h.mode
556
- }), e.onSelectMode?.(h.mode), P(!1);
557
- }, k(C, s(_, {
558
+ id: b.mode
559
+ }), e.onSelectMode?.(b.mode), u(!1);
560
+ }, m(P, s(D, {
558
561
  class: "workbench-dock__mode-icon"
559
- })), k(u, () => h.label), k(T, () => h.description), K((f) => {
560
- var J = y() === h.mode, Q = y() === h.mode;
561
- return J !== f.e && m.classList.toggle("is-active", f.e = J), Q !== f.t && L(m, "aria-checked", f.t = Q), f;
562
+ })), m(g, () => b.label), m(T, () => b.description), K((k) => {
563
+ var Q = y() === b.mode, Z = y() === b.mode;
564
+ return Q !== k.e && h.classList.toggle("is-active", k.e = Q), Z !== k.t && L(h, "aria-checked", k.t = Z), k;
562
565
  }, {
563
566
  e: void 0,
564
567
  t: void 0
565
- }), m;
568
+ }), h;
566
569
  })();
567
570
  }
568
571
  })), o;
569
572
  }
570
- }), null), k(t, s(ye, {
573
+ }), null), m(t, s(ye, {
571
574
  get each() {
572
- return j();
575
+ return J();
573
576
  },
574
- children: (o, h) => s(_e, {
577
+ children: (o, b) => s(_e, {
575
578
  get action() {
576
579
  return o();
577
580
  },
578
- slot: h + 1
581
+ slot: b + 1
579
582
  })
580
- }), w), k(t, s(R, {
583
+ }), _), m(t, s(B, {
581
584
  get when() {
582
585
  return le("before-components");
583
586
  },
584
587
  get children() {
585
588
  return s(De, {});
586
589
  }
587
- }), w), k(t, s(te, {
590
+ }), _), m(t, s(te, {
588
591
  get each() {
589
592
  return fe();
590
593
  },
591
- children: (o, h) => {
592
- const _ = () => h() + j().length + 1;
594
+ children: (o, b) => {
595
+ const D = () => b() + J().length + 1;
593
596
  return s(de, {
594
597
  get id() {
595
598
  return o.id;
@@ -607,13 +610,13 @@ function Gt(e) {
607
610
  visible: !0,
608
611
  filterable: !1,
609
612
  get activationMode() {
610
- return v();
613
+ return f();
611
614
  },
612
615
  get hoverOffset() {
613
- return x(_());
616
+ return x(D());
614
617
  },
615
618
  get isDragging() {
616
- return B(() => i()?.kind === "host")() && i()?.id === o.id;
619
+ return R(() => l()?.kind === "host")() && l()?.id === o.id;
617
620
  },
618
621
  get canvasPlacement() {
619
622
  return ne(o.canvasPlacement);
@@ -621,18 +624,18 @@ function Gt(e) {
621
624
  get onContextMenu() {
622
625
  return o.onContextMenu;
623
626
  },
624
- onKeyboardActivate: (m) => F("host", o.id, o.label, m),
625
- onEnter: () => l(_()),
626
- onLeave: () => l((m) => m === _() ? null : m),
627
+ onKeyboardActivate: (h) => F("host", o.id, o.label, h),
628
+ onEnter: () => c(D()),
629
+ onLeave: () => c((h) => h === D() ? null : h),
627
630
  onDragBegin: Y
628
631
  });
629
632
  }
630
- }), w), k(t, s(te, {
633
+ }), _), m(t, s(te, {
631
634
  get each() {
632
635
  return re();
633
636
  },
634
- children: (o, h) => {
635
- const _ = () => h() + be(), m = () => Ke(o.kind, o.id);
637
+ children: (o, b) => {
638
+ const D = () => b() + be(), h = () => Ne(o.kind, o.id);
636
639
  return s(de, {
637
640
  get id() {
638
641
  return String(o.id);
@@ -647,72 +650,72 @@ function Gt(e) {
647
650
  return o.icon;
648
651
  },
649
652
  get active() {
650
- return m()?.active ?? He(String(o.id));
653
+ return h()?.active ?? Ke(String(o.id));
651
654
  },
652
655
  get visible() {
653
- return B(() => v() === "focus-cycle")() ? !0 : Re(String(o.id));
656
+ return R(() => f() === "focus-cycle")() ? !0 : He(String(o.id));
654
657
  },
655
658
  get filterable() {
656
- return B(() => v() === "solo-filter")() && ae();
659
+ return R(() => f() === "solo-filter")() && ae();
657
660
  },
658
661
  get activationMode() {
659
- return v();
662
+ return f();
660
663
  },
661
664
  get presentation() {
662
- return m();
665
+ return h();
663
666
  },
664
667
  get hoverOffset() {
665
- return x(_());
668
+ return x(D());
666
669
  },
667
670
  get isDragging() {
668
- return B(() => o.kind === "widget")() ? Fe() === o.id : Ye() === o.id;
671
+ return R(() => o.kind === "widget")() ? Ye() === o.id : Re() === o.id;
669
672
  },
670
673
  get canvasPlacement() {
671
- return B(() => o.kind === "widget")() ? {
674
+ return R(() => o.kind === "widget")() ? {
672
675
  preview: {
673
676
  kind: "widget",
674
677
  id: o.id
675
678
  },
676
- onDrop: (C, O, u) => e.onCreateAt?.(o.id, C, O, u)
679
+ onDrop: (P, O, g) => e.onCreateAt?.(o.id, P, O, g)
677
680
  } : {
678
681
  preview: {
679
682
  kind: "tool",
680
683
  id: o.id
681
684
  },
682
- onDrop: (C, O, u) => e.onCreateToolAt?.(o.id, C, O, u)
685
+ onDrop: (P, O, g) => e.onCreateToolAt?.(o.id, P, O, g)
683
686
  };
684
687
  },
685
- onEnter: () => l(_()),
686
- onLeave: () => l((C) => C === _() ? null : C),
687
- onKeyboardActivate: (C) => F(o.kind, o.id, o.label, C),
688
+ onEnter: () => c(D()),
689
+ onLeave: () => c((P) => P === D() ? null : P),
690
+ onKeyboardActivate: (P) => F(o.kind, o.id, o.label, P),
688
691
  onDragBegin: Y
689
692
  });
690
693
  }
691
- }), null), k(t, s(ye, {
694
+ }), null), m(t, s(ye, {
692
695
  get each() {
693
696
  return he();
694
697
  },
695
- children: (o, h) => s(_e, {
698
+ children: (o, b) => s(_e, {
696
699
  get action() {
697
700
  return o();
698
701
  },
699
702
  get slot() {
700
- return h + ie();
703
+ return b + ie();
701
704
  }
702
705
  })
703
- }), null), k(t, s(R, {
706
+ }), null), m(t, s(B, {
704
707
  get when() {
705
708
  return ke().length > 0 || le("after-components");
706
709
  },
707
710
  get children() {
708
- return ht();
711
+ return bt();
709
712
  }
710
- }), null), k(t, s(te, {
713
+ }), null), m(t, s(te, {
711
714
  get each() {
712
715
  return ke();
713
716
  },
714
- children: (o, h) => {
715
- const _ = () => h() + we();
717
+ children: (o, b) => {
718
+ const D = () => b() + we();
716
719
  return s(de, {
717
720
  get id() {
718
721
  return o.id;
@@ -730,13 +733,13 @@ function Gt(e) {
730
733
  visible: !0,
731
734
  filterable: !1,
732
735
  get activationMode() {
733
- return v();
736
+ return f();
734
737
  },
735
738
  get hoverOffset() {
736
- return x(_());
739
+ return x(D());
737
740
  },
738
741
  get isDragging() {
739
- return B(() => i()?.kind === "host")() && i()?.id === o.id;
742
+ return R(() => l()?.kind === "host")() && l()?.id === o.id;
740
743
  },
741
744
  get canvasPlacement() {
742
745
  return ne(o.canvasPlacement);
@@ -744,13 +747,13 @@ function Gt(e) {
744
747
  get onContextMenu() {
745
748
  return o.onContextMenu;
746
749
  },
747
- onKeyboardActivate: (m) => F("host", o.id, o.label, m),
748
- onEnter: () => l(_()),
749
- onLeave: () => l((m) => m === _() ? null : m),
750
+ onKeyboardActivate: (h) => F("host", o.id, o.label, h),
751
+ onEnter: () => c(D()),
752
+ onLeave: () => c((h) => h === D() ? null : h),
750
753
  onDragBegin: Y
751
754
  });
752
755
  }
753
- }), null), k(t, s(R, {
756
+ }), null), m(t, s(B, {
754
757
  get when() {
755
758
  return le("after-components");
756
759
  },
@@ -758,48 +761,48 @@ function Gt(e) {
758
761
  return s(De, {});
759
762
  }
760
763
  }), null), K((o) => {
761
- var h = `workbench-dock workbench-dock-material${i()?.kind === "external" && i()?.moved ? " is-external-drop-target" : ""}${i()?.kind === "external" && i()?.overDock ? " is-external-drop-allowed" : ""}`, _ = y() === "background", m = !!(ce() || E()), C = E();
762
- return h !== o.e && qe(t, o.e = h), _ !== o.t && c.classList.toggle("is-active", o.t = _), m !== o.a && c.classList.toggle("is-hovered", o.a = m), C !== o.o && L(c, "aria-expanded", o.o = C), o;
764
+ var b = `workbench-dock workbench-dock-material${l()?.kind === "external" && l()?.moved ? " is-external-drop-target" : ""}${l()?.kind === "external" && l()?.overDock ? " is-external-drop-allowed" : ""}`, D = y() === "background", h = !!(ce() || M()), P = M();
765
+ return b !== o.e && ze(t, o.e = b), D !== o.t && a.classList.toggle("is-active", o.t = D), h !== o.a && a.classList.toggle("is-hovered", o.a = h), P !== o.o && L(a, "aria-expanded", o.o = P), o;
763
766
  }, {
764
767
  e: void 0,
765
768
  t: void 0,
766
769
  a: void 0,
767
770
  o: void 0
768
771
  }), t;
769
- })(), s(R, {
772
+ })(), s(B, {
770
773
  get when() {
771
- return !!(i()?.moved && !i()?.preview);
774
+ return !!(l()?.moved && !l()?.preview);
772
775
  },
773
776
  get children() {
774
- return s(St, {
775
- state: i
777
+ return s(At, {
778
+ state: l
776
779
  });
777
780
  }
778
781
  })];
779
782
  }
780
- function St(e) {
781
- const g = () => {
783
+ function At(e) {
784
+ const v = () => {
782
785
  const d = e.state();
783
786
  return d ? `translate3d(${d.clientX + 14}px, ${d.clientY - 56}px, 0)` : "translate3d(0px, 0px, 0)";
784
- }, l = () => e.state()?.label ?? "", i = () => e.state()?.icon;
785
- return s(ze, {
787
+ }, c = () => e.state()?.label ?? "", l = () => e.state()?.icon;
788
+ return s(je, {
786
789
  get children() {
787
- var d = _t(), E = d.firstChild, P = E.nextSibling, b = P.firstChild, r = b.nextSibling, a = r.firstChild, D = a.nextSibling, M = D.firstChild;
788
- return k(b, s(R, {
790
+ var d = Et(), M = d.firstChild, u = M.nextSibling, w = u.firstChild, r = w.nextSibling, i = r.firstChild, E = i.nextSibling, C = E.firstChild;
791
+ return m(w, s(B, {
789
792
  get when() {
790
- return i();
793
+ return l();
791
794
  },
792
- children: (v) => {
793
- const x = v();
795
+ children: (f) => {
796
+ const x = f();
794
797
  return s(x, {
795
798
  class: "w-4 h-4"
796
799
  });
797
800
  }
798
- })), k(a, l), k(D, s(pe, {
801
+ })), m(i, c), m(E, s(et, {
799
802
  class: "w-3 h-3"
800
- }), M), k(M, () => e.state()?.kind === "external" ? "Pin to Dock" : "Drag onto canvas"), K((v) => {
801
- var x = !!(e.state()?.kind === "external" && e.state()?.overDock), X = g();
802
- return x !== v.e && d.classList.toggle("is-over-dock", v.e = x), X !== v.t && je(d, "transform", v.t = X), v;
803
+ }), C), m(C, () => e.state()?.kind === "external" ? "Pin to Dock" : "Drag onto canvas"), K((f) => {
804
+ var x = !!(e.state()?.kind === "external" && e.state()?.overDock), X = v();
805
+ return x !== f.e && d.classList.toggle("is-over-dock", f.e = x), X !== f.t && Je(d, "transform", f.t = X), f;
803
806
  }, {
804
807
  e: void 0,
805
808
  t: void 0
@@ -809,5 +812,5 @@ function St(e) {
809
812
  }
810
813
  Ze(["pointerdown", "click", "contextmenu", "keydown"]);
811
814
  export {
812
- Gt as WorkbenchDock
815
+ Vt as WorkbenchDock
813
816
  };