@floegence/floe-webapp-core 0.45.0 → 0.46.1

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