@floegence/floe-webapp-core 0.46.0 → 0.46.2

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