@floegence/floe-webapp-core 0.44.1 → 0.45.0
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.
|
@@ -49,8 +49,11 @@ export type WorkbenchHostDockItem = Readonly<{
|
|
|
49
49
|
onActivate?: (trigger: HTMLButtonElement) => void;
|
|
50
50
|
/** Requests a product-owned context menu for this concrete Dock button. */
|
|
51
51
|
onContextMenu?: BarItemContextMenuHandler;
|
|
52
|
+
/** Places the host item before or after Floe's built-in component group. */
|
|
53
|
+
dockPlacement?: WorkbenchDockItemPlacement;
|
|
52
54
|
canvasPlacement?: WorkbenchDockCanvasPlacement;
|
|
53
55
|
}>;
|
|
56
|
+
export type WorkbenchDockItemPlacement = 'before-components' | 'after-components';
|
|
54
57
|
export type WorkbenchDockItemActivation = Readonly<{
|
|
55
58
|
kind: 'widget' | 'tool';
|
|
56
59
|
id: WorkbenchWidgetType | WorkbenchDockToolId;
|
|
@@ -63,6 +66,8 @@ export type WorkbenchExternalDockDragItem = Readonly<{
|
|
|
63
66
|
icon: Component<{
|
|
64
67
|
class?: string;
|
|
65
68
|
}>;
|
|
69
|
+
/** Places the Dock drop preview before or after Floe's built-in component group. */
|
|
70
|
+
dockPlacement?: WorkbenchDockItemPlacement;
|
|
66
71
|
canvasPlacement?: WorkbenchDockCanvasPlacement;
|
|
67
72
|
onDropToDock?: () => void;
|
|
68
73
|
}>;
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { Motion as
|
|
4
|
-
import { easing as
|
|
5
|
-
import { Plus as
|
|
6
|
-
import { startHotInteraction as
|
|
7
|
-
import { startPointerSession as
|
|
8
|
-
import { clientToCanvasWorld as
|
|
9
|
-
import { isBarItemContextMenuKey as
|
|
10
|
-
import { createWorkbenchWidgetFrame as
|
|
11
|
-
import { getWidgetEntry as
|
|
12
|
-
import { WORKBENCH_EDGE_AUTO_PAN_FRAME_SELECTOR as
|
|
13
|
-
import { DockLayoutDashboard as
|
|
14
|
-
var
|
|
15
|
-
const
|
|
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 = [{
|
|
16
16
|
mode: "work",
|
|
17
17
|
label: "Work Mode",
|
|
18
18
|
description: "Operate windows and sticky notes",
|
|
19
|
-
icon:
|
|
19
|
+
icon: Ze
|
|
20
20
|
}, {
|
|
21
21
|
mode: "background",
|
|
22
22
|
label: "Composition Mode",
|
|
23
23
|
description: "Arrange regions and canvas text",
|
|
24
|
-
icon:
|
|
25
|
-
}],
|
|
24
|
+
icon: et
|
|
25
|
+
}], kt = [{
|
|
26
26
|
tool: "sticky-note",
|
|
27
27
|
label: "Sticky",
|
|
28
|
-
icon:
|
|
29
|
-
}],
|
|
28
|
+
icon: ot
|
|
29
|
+
}], ft = [{
|
|
30
30
|
tool: "background-region",
|
|
31
31
|
label: "Region",
|
|
32
|
-
icon:
|
|
32
|
+
icon: tt
|
|
33
33
|
}, {
|
|
34
34
|
tool: "text",
|
|
35
35
|
label: "Text",
|
|
36
|
-
icon:
|
|
36
|
+
icon: nt
|
|
37
37
|
}];
|
|
38
|
-
function
|
|
39
|
-
const i = e?.closest(".workbench-surface")?.querySelector(
|
|
40
|
-
return i instanceof HTMLElement ?
|
|
38
|
+
function mt(e) {
|
|
39
|
+
const i = e?.closest(".workbench-surface")?.querySelector(xe);
|
|
40
|
+
return i instanceof HTMLElement ? Le(i) : null;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return e >= i.left && e <= i.right &&
|
|
42
|
+
function se(e, g, i) {
|
|
43
|
+
return e >= i.left && e <= i.right && g >= i.top && g <= i.bottom;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
return i ?
|
|
45
|
+
function ht(e, g, i) {
|
|
46
|
+
return i ? se(e, g, i) : !1;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return Math.min(i, Math.max(
|
|
48
|
+
function Ce(e, g, i) {
|
|
49
|
+
return Math.min(i, Math.max(g, e));
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function wt(e, g, i, l, s) {
|
|
52
52
|
if (!e) return !1;
|
|
53
|
-
if (
|
|
53
|
+
if (se(g, i, e) || se(l, s, e))
|
|
54
54
|
return !0;
|
|
55
|
-
const
|
|
55
|
+
const d = l - g, r = s - i;
|
|
56
56
|
let a = 0, D = 1;
|
|
57
|
-
const
|
|
57
|
+
const m = (_, C) => {
|
|
58
58
|
if (_ === 0) return C >= 0;
|
|
59
|
-
const
|
|
60
|
-
return _ < 0 ?
|
|
59
|
+
const h = C / _;
|
|
60
|
+
return _ < 0 ? h > D ? !1 : (h > a && (a = h), !0) : h < a ? !1 : (h < D && (D = h), !0);
|
|
61
61
|
};
|
|
62
|
-
return
|
|
62
|
+
return m(-d, g - e.left) && m(d, e.right - g) && m(-r, i - e.top) && m(r, e.bottom - i);
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Pe(e, g, i) {
|
|
65
65
|
if (!i || typeof document.elementFromPoint != "function") return !1;
|
|
66
|
-
const l = document.elementFromPoint(e,
|
|
67
|
-
return l instanceof Element && l.closest(
|
|
66
|
+
const l = document.elementFromPoint(e, g);
|
|
67
|
+
return l instanceof Element && l.closest(vt) === i;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
const
|
|
69
|
+
function ce(e) {
|
|
70
|
+
const g = () => e.hoverOffset === -1 ? {
|
|
71
71
|
scale: 1.26,
|
|
72
72
|
y: -6,
|
|
73
73
|
x: 0
|
|
@@ -85,38 +85,38 @@ function be(e) {
|
|
|
85
85
|
x: 0
|
|
86
86
|
}, i = () => 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
|
+
}, s = (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
|
-
},
|
|
96
|
-
!e.onContextMenu || !
|
|
95
|
+
}, d = (r) => {
|
|
96
|
+
!e.onContextMenu || !qe(r) || (r.preventDefault(), r.stopPropagation(), e.onContextMenu(ze(r.currentTarget)));
|
|
97
97
|
};
|
|
98
98
|
return (() => {
|
|
99
|
-
var r =
|
|
100
|
-
return r.$$keydown =
|
|
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, {
|
|
101
101
|
class: "workbench-dock__tile",
|
|
102
102
|
get animate() {
|
|
103
|
-
return
|
|
103
|
+
return g();
|
|
104
104
|
},
|
|
105
105
|
get transition() {
|
|
106
106
|
return {
|
|
107
|
-
duration:
|
|
108
|
-
easing:
|
|
107
|
+
duration: H.fast,
|
|
108
|
+
easing: R.easeOut
|
|
109
109
|
};
|
|
110
110
|
},
|
|
111
111
|
get children() {
|
|
112
112
|
return (() => {
|
|
113
113
|
const a = e.icon;
|
|
114
|
-
return
|
|
114
|
+
return c(a, {
|
|
115
115
|
class: "workbench-dock__icon"
|
|
116
116
|
});
|
|
117
117
|
})();
|
|
118
118
|
}
|
|
119
|
-
}), null),
|
|
119
|
+
}), null), f(r, c(B.span, {
|
|
120
120
|
class: "workbench-dock__tooltip",
|
|
121
121
|
get animate() {
|
|
122
122
|
return {
|
|
@@ -126,16 +126,16 @@ function be(e) {
|
|
|
126
126
|
},
|
|
127
127
|
get transition() {
|
|
128
128
|
return {
|
|
129
|
-
duration:
|
|
130
|
-
easing:
|
|
129
|
+
duration: H.fast,
|
|
130
|
+
easing: R.easeOut
|
|
131
131
|
};
|
|
132
132
|
},
|
|
133
133
|
get children() {
|
|
134
134
|
return e.label;
|
|
135
135
|
}
|
|
136
|
-
}), null),
|
|
137
|
-
var D = e.kind === "host" ? e.id : void 0,
|
|
138
|
-
return D !== a.e &&
|
|
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;
|
|
139
139
|
}, {
|
|
140
140
|
e: void 0,
|
|
141
141
|
t: void 0,
|
|
@@ -148,98 +148,98 @@ function be(e) {
|
|
|
148
148
|
}), r;
|
|
149
149
|
})();
|
|
150
150
|
}
|
|
151
|
-
function
|
|
152
|
-
const
|
|
151
|
+
function bt(e) {
|
|
152
|
+
const g = () => e.hoverOffset === -1, i = () => ({
|
|
153
153
|
scale: 1,
|
|
154
154
|
y: 0,
|
|
155
155
|
x: 0
|
|
156
156
|
}), l = e.action.icon;
|
|
157
157
|
return (() => {
|
|
158
|
-
var
|
|
159
|
-
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, {
|
|
160
160
|
class: "workbench-dock__tile",
|
|
161
161
|
get animate() {
|
|
162
162
|
return i();
|
|
163
163
|
},
|
|
164
164
|
get transition() {
|
|
165
165
|
return {
|
|
166
|
-
duration:
|
|
167
|
-
easing:
|
|
166
|
+
duration: H.fast,
|
|
167
|
+
easing: R.easeOut
|
|
168
168
|
};
|
|
169
169
|
},
|
|
170
170
|
get children() {
|
|
171
|
-
return
|
|
171
|
+
return c(l, {
|
|
172
172
|
class: "workbench-dock__icon"
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
|
-
}), null),
|
|
175
|
+
}), null), f(s, c(B.span, {
|
|
176
176
|
class: "workbench-dock__tooltip",
|
|
177
177
|
get animate() {
|
|
178
178
|
return {
|
|
179
|
-
opacity:
|
|
180
|
-
y:
|
|
179
|
+
opacity: g() ? 1 : 0,
|
|
180
|
+
y: g() ? -6 : 0
|
|
181
181
|
};
|
|
182
182
|
},
|
|
183
183
|
get transition() {
|
|
184
184
|
return {
|
|
185
|
-
duration:
|
|
186
|
-
easing:
|
|
185
|
+
duration: H.fast,
|
|
186
|
+
easing: R.easeOut
|
|
187
187
|
};
|
|
188
188
|
},
|
|
189
189
|
get children() {
|
|
190
190
|
return e.action.label;
|
|
191
191
|
}
|
|
192
|
-
}), null),
|
|
193
|
-
var r = e.action.id, a = !!e.action.active, D = !!
|
|
194
|
-
return r !==
|
|
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;
|
|
195
195
|
}, {
|
|
196
196
|
e: void 0,
|
|
197
197
|
t: void 0,
|
|
198
198
|
a: void 0,
|
|
199
199
|
o: void 0,
|
|
200
200
|
i: void 0
|
|
201
|
-
}),
|
|
201
|
+
}), s;
|
|
202
202
|
})();
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
const [
|
|
206
|
-
let a, D,
|
|
207
|
-
|
|
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
208
|
_?.stop(), D?.stop({
|
|
209
209
|
reason: "manual_stop",
|
|
210
210
|
commit: !1
|
|
211
|
-
}), D = void 0,
|
|
212
|
-
}),
|
|
211
|
+
}), D = void 0, m?.clear(), m = void 0, l()?.stopInteraction(), e.onDragPreviewChange?.(null), e.registerExternalDockDragController?.(null);
|
|
212
|
+
}), Q(() => {
|
|
213
213
|
e.onDragPreviewChange?.(l()?.preview ?? null);
|
|
214
|
-
}),
|
|
214
|
+
}), Q(() => {
|
|
215
215
|
const t = (n) => {
|
|
216
216
|
n.key !== "Escape" || !l() || (n.preventDefault(), D?.stop({
|
|
217
217
|
reason: "manual_stop",
|
|
218
218
|
commit: !1
|
|
219
219
|
}));
|
|
220
220
|
};
|
|
221
|
-
window.addEventListener("keydown", t, !0),
|
|
222
|
-
}),
|
|
223
|
-
if (!
|
|
224
|
-
const t = (
|
|
225
|
-
a &&
|
|
226
|
-
}, n = (
|
|
227
|
-
|
|
221
|
+
window.addEventListener("keydown", t, !0), J(() => window.removeEventListener("keydown", t, !0));
|
|
222
|
+
}), Q(() => {
|
|
223
|
+
if (!d() || typeof window > "u") return;
|
|
224
|
+
const t = (k) => {
|
|
225
|
+
a && k.target instanceof Node && a.contains(k.target) || r(!1);
|
|
226
|
+
}, n = (k) => {
|
|
227
|
+
k.key === "Escape" && r(!1);
|
|
228
228
|
};
|
|
229
|
-
window.addEventListener("pointerdown", t, !0), window.addEventListener("keydown", n, !0),
|
|
229
|
+
window.addEventListener("pointerdown", t, !0), window.addEventListener("keydown", n, !0), J(() => {
|
|
230
230
|
window.removeEventListener("pointerdown", t, !0), window.removeEventListener("keydown", n, !0);
|
|
231
231
|
});
|
|
232
232
|
});
|
|
233
|
-
const
|
|
234
|
-
const n =
|
|
235
|
-
return n === null || n <=
|
|
236
|
-
},
|
|
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
237
|
_?.stop(), _ = void 0, C = null;
|
|
238
|
-
},
|
|
239
|
-
!e.viewport || !e.onViewportCommit || (C = e.viewport, _?.stop(), _ =
|
|
238
|
+
}, $ = () => {
|
|
239
|
+
!e.viewport || !e.onViewportCommit || (C = e.viewport, _?.stop(), _ = Qe({
|
|
240
240
|
readFrame: () => {
|
|
241
|
-
const n = a?.closest(".workbench-surface")?.querySelector(
|
|
242
|
-
return n instanceof HTMLElement ?
|
|
241
|
+
const n = a?.closest(".workbench-surface")?.querySelector(xe);
|
|
242
|
+
return n instanceof HTMLElement ? Le(n) : null;
|
|
243
243
|
},
|
|
244
244
|
readViewport: () => C ?? e.viewport ?? null,
|
|
245
245
|
commitViewport: (t) => {
|
|
@@ -248,14 +248,14 @@ function St(e) {
|
|
|
248
248
|
onPanStart: () => e.onViewportInteractionStart?.("pan"),
|
|
249
249
|
shouldPan: () => {
|
|
250
250
|
const t = l();
|
|
251
|
-
return !!(t?.moved && t.hasEnteredCanvas && !
|
|
251
|
+
return !!(t?.moved && t.hasEnteredCanvas && !Pe(t.clientX, t.clientY, a));
|
|
252
252
|
}
|
|
253
253
|
}));
|
|
254
|
-
},
|
|
254
|
+
}, V = (t) => {
|
|
255
255
|
const n = l();
|
|
256
256
|
if (!n) return;
|
|
257
|
-
const
|
|
258
|
-
if (n.stopInteraction(),
|
|
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
259
|
if (n.kind === "external" || !(n.trigger instanceof HTMLButtonElement)) return;
|
|
260
260
|
if (n.kind === "host") {
|
|
261
261
|
e.dockItems?.find((o) => o.id === n.id)?.onActivate?.(n.trigger);
|
|
@@ -267,7 +267,7 @@ function St(e) {
|
|
|
267
267
|
label: n.label,
|
|
268
268
|
trigger: n.trigger
|
|
269
269
|
})) return;
|
|
270
|
-
|
|
270
|
+
O() !== "background" && e.onSoloFilter(String(n.id), ve());
|
|
271
271
|
return;
|
|
272
272
|
}
|
|
273
273
|
if (t && n.overDock && n.dockDrop) {
|
|
@@ -275,29 +275,29 @@ function St(e) {
|
|
|
275
275
|
return;
|
|
276
276
|
}
|
|
277
277
|
if (t && n.overCanvas && n.canvasPlacement) {
|
|
278
|
-
const
|
|
278
|
+
const L = n.canvasFrame && P ? Ue(n.canvasFrame, P, {
|
|
279
279
|
clientX: n.clientX,
|
|
280
280
|
clientY: n.clientY
|
|
281
281
|
}) : null, o = n.canvasFrame ? {
|
|
282
282
|
dropAllowed: n.overCanvas,
|
|
283
283
|
canvasFrame: n.canvasFrame,
|
|
284
|
-
...
|
|
285
|
-
worldPoint:
|
|
284
|
+
...L ? {
|
|
285
|
+
worldPoint: L
|
|
286
286
|
} : {}
|
|
287
287
|
} : void 0;
|
|
288
288
|
n.canvasPlacement.onDrop(n.clientX, n.clientY, o);
|
|
289
289
|
}
|
|
290
|
-
},
|
|
290
|
+
}, G = (t, n, k, P, L, o, E, w, u = "before-components") => {
|
|
291
291
|
t.preventDefault(), D?.stop({
|
|
292
292
|
reason: "manual_stop",
|
|
293
293
|
commit: !1
|
|
294
|
-
}),
|
|
295
|
-
const
|
|
296
|
-
|
|
294
|
+
}), $();
|
|
295
|
+
const x = mt(a);
|
|
296
|
+
s({
|
|
297
297
|
kind: n,
|
|
298
|
-
id:
|
|
298
|
+
id: k,
|
|
299
299
|
label: P,
|
|
300
|
-
icon:
|
|
300
|
+
icon: L,
|
|
301
301
|
pointerId: t.pointerId,
|
|
302
302
|
startClientX: t.clientX,
|
|
303
303
|
startClientY: t.clientY,
|
|
@@ -306,106 +306,107 @@ function St(e) {
|
|
|
306
306
|
moved: !1,
|
|
307
307
|
overCanvas: !1,
|
|
308
308
|
hasEnteredCanvas: !1,
|
|
309
|
-
canvasFrame:
|
|
309
|
+
canvasFrame: x,
|
|
310
310
|
preview: null,
|
|
311
311
|
canvasPlacement: E,
|
|
312
312
|
dockDrop: w,
|
|
313
|
-
|
|
313
|
+
dockPlacement: u,
|
|
314
|
+
stopInteraction: Ve({
|
|
314
315
|
kind: "drag",
|
|
315
316
|
cursor: "grabbing"
|
|
316
317
|
}),
|
|
317
318
|
trigger: o,
|
|
318
319
|
overDock: !1
|
|
319
320
|
});
|
|
320
|
-
const
|
|
321
|
+
const T = (b) => {
|
|
321
322
|
let y = !1;
|
|
322
|
-
|
|
323
|
-
if (!
|
|
324
|
-
const
|
|
325
|
-
if (
|
|
326
|
-
let
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
},
|
|
330
|
-
|
|
331
|
-
},
|
|
332
|
-
|
|
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);
|
|
333
334
|
};
|
|
334
|
-
|
|
335
|
-
clear:
|
|
336
|
-
expire:
|
|
335
|
+
v.trigger.addEventListener("click", we, !0), window.addEventListener("pointerdown", be, !0), m = {
|
|
336
|
+
clear: N,
|
|
337
|
+
expire: Ae
|
|
337
338
|
};
|
|
338
339
|
}
|
|
339
|
-
const
|
|
340
|
-
y =
|
|
341
|
-
const
|
|
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;
|
|
342
343
|
return {
|
|
343
|
-
...
|
|
344
|
-
clientX:
|
|
345
|
-
clientY:
|
|
346
|
-
moved:
|
|
347
|
-
overDock:
|
|
348
|
-
overCanvas:
|
|
349
|
-
hasEnteredCanvas:
|
|
350
|
-
preview:
|
|
351
|
-
kind:
|
|
352
|
-
id:
|
|
353
|
-
label:
|
|
354
|
-
clientX:
|
|
355
|
-
clientY:
|
|
356
|
-
dropAllowed:
|
|
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,
|
|
357
358
|
canvasFrame: M
|
|
358
359
|
} : null
|
|
359
360
|
};
|
|
360
|
-
}), y && _?.updatePointer(
|
|
361
|
+
}), y && _?.updatePointer(b.clientX, b.clientY);
|
|
361
362
|
};
|
|
362
|
-
D =
|
|
363
|
+
D = Ge({
|
|
363
364
|
pointerEvent: t,
|
|
364
365
|
captureEl: t.currentTarget,
|
|
365
|
-
onMove:
|
|
366
|
+
onMove: T,
|
|
366
367
|
onEnd: ({
|
|
367
|
-
commit:
|
|
368
|
+
commit: b,
|
|
368
369
|
snapshot: y
|
|
369
370
|
}) => {
|
|
370
|
-
|
|
371
|
+
T({
|
|
371
372
|
pointerId: y.pointerId,
|
|
372
373
|
clientX: y.latestClientX,
|
|
373
374
|
clientY: y.latestClientY
|
|
374
|
-
}),
|
|
375
|
+
}), V(b);
|
|
375
376
|
}
|
|
376
377
|
});
|
|
377
|
-
},
|
|
378
|
+
}, ee = (t) => t ? {
|
|
378
379
|
preview: {
|
|
379
380
|
kind: "widget",
|
|
380
381
|
id: t.widgetType
|
|
381
382
|
},
|
|
382
|
-
onDrop: (n,
|
|
383
|
+
onDrop: (n, k, P) => {
|
|
383
384
|
if (!P?.worldPoint) return;
|
|
384
|
-
const
|
|
385
|
+
const L = Je(t.widgetType, e.widgetDefinitions);
|
|
385
386
|
t.onDrop({
|
|
386
387
|
widgetType: t.widgetType,
|
|
387
388
|
centerWorld: P.worldPoint,
|
|
388
|
-
frame:
|
|
389
|
+
frame: je(L, {
|
|
389
390
|
anchor: "center",
|
|
390
391
|
worldX: P.worldPoint.worldX,
|
|
391
392
|
worldY: P.worldPoint.worldY
|
|
392
393
|
})
|
|
393
394
|
});
|
|
394
395
|
}
|
|
395
|
-
} : null,
|
|
396
|
-
t.button !== 0 || !(t.currentTarget instanceof HTMLElement) || (
|
|
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"));
|
|
397
398
|
};
|
|
398
|
-
|
|
399
|
+
Q(() => {
|
|
399
400
|
e.registerExternalDockDragController?.({
|
|
400
|
-
begin:
|
|
401
|
-
}),
|
|
401
|
+
begin: Me
|
|
402
|
+
}), J(() => e.registerExternalDockDragController?.(null));
|
|
402
403
|
});
|
|
403
|
-
const
|
|
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) => ({
|
|
404
405
|
id: t.tool,
|
|
405
406
|
kind: "tool",
|
|
406
407
|
label: t.label,
|
|
407
408
|
icon: t.icon
|
|
408
|
-
})) : [...
|
|
409
|
+
})) : [...kt.map((t) => ({
|
|
409
410
|
id: t.tool,
|
|
410
411
|
kind: "tool",
|
|
411
412
|
label: t.label,
|
|
@@ -415,125 +416,130 @@ function St(e) {
|
|
|
415
416
|
kind: "widget",
|
|
416
417
|
label: t.label,
|
|
417
418
|
icon: t.icon
|
|
418
|
-
}))]),
|
|
419
|
-
if (!
|
|
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())
|
|
420
421
|
return !1;
|
|
421
|
-
const n =
|
|
422
|
-
return n.length > 1 && n.every((
|
|
423
|
-
},
|
|
422
|
+
const n = ve();
|
|
423
|
+
return n.length > 1 && n.every((k) => e.filters[k] !== !1 == (k === t));
|
|
424
|
+
}, re = () => g() === 0, Xe = () => ({
|
|
424
425
|
scale: 1,
|
|
425
426
|
y: 0,
|
|
426
427
|
x: 0
|
|
427
|
-
})
|
|
428
|
+
}), ie = (t) => {
|
|
429
|
+
const n = l();
|
|
430
|
+
return !!(n?.kind === "external" && n.moved && n.dockPlacement === t);
|
|
431
|
+
}, ke = () => (() => {
|
|
432
|
+
var t = at();
|
|
433
|
+
return f(t, c(p, {
|
|
434
|
+
get when() {
|
|
435
|
+
return Oe();
|
|
436
|
+
},
|
|
437
|
+
children: (n) => {
|
|
438
|
+
const k = n();
|
|
439
|
+
return c(k, {
|
|
440
|
+
class: "workbench-dock__icon"
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
})), F(() => t.classList.toggle("is-drop-allowed", !!l()?.overDock)), t;
|
|
444
|
+
})();
|
|
428
445
|
return [(() => {
|
|
429
|
-
var t =
|
|
446
|
+
var t = st(), n = t.firstChild, k = n.firstChild, P = n.nextSibling;
|
|
430
447
|
t.addEventListener("pointerleave", () => i(null));
|
|
431
|
-
var
|
|
432
|
-
return typeof
|
|
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, {
|
|
433
450
|
class: "workbench-dock__tile",
|
|
434
451
|
get animate() {
|
|
435
|
-
return
|
|
452
|
+
return Xe();
|
|
436
453
|
},
|
|
437
454
|
get transition() {
|
|
438
455
|
return {
|
|
439
|
-
duration:
|
|
440
|
-
easing:
|
|
456
|
+
duration: H.fast,
|
|
457
|
+
easing: R.easeOut
|
|
441
458
|
};
|
|
442
459
|
},
|
|
443
460
|
get children() {
|
|
444
461
|
return (() => {
|
|
445
|
-
const o =
|
|
446
|
-
return
|
|
462
|
+
const o = de().icon;
|
|
463
|
+
return c(o, {
|
|
447
464
|
class: "workbench-dock__icon"
|
|
448
465
|
});
|
|
449
466
|
})();
|
|
450
467
|
}
|
|
451
|
-
}), null),
|
|
468
|
+
}), null), f(k, c(B.span, {
|
|
452
469
|
class: "workbench-dock__tooltip",
|
|
453
470
|
get animate() {
|
|
454
471
|
return {
|
|
455
|
-
opacity:
|
|
456
|
-
y:
|
|
472
|
+
opacity: re() && !d() ? 1 : 0,
|
|
473
|
+
y: re() && !d() ? -6 : 0
|
|
457
474
|
};
|
|
458
475
|
},
|
|
459
476
|
get transition() {
|
|
460
477
|
return {
|
|
461
|
-
duration:
|
|
462
|
-
easing:
|
|
478
|
+
duration: H.fast,
|
|
479
|
+
easing: R.easeOut
|
|
463
480
|
};
|
|
464
481
|
},
|
|
465
482
|
get children() {
|
|
466
|
-
return
|
|
483
|
+
return de().label;
|
|
467
484
|
}
|
|
468
|
-
}), null),
|
|
485
|
+
}), null), f(n, c(p, {
|
|
469
486
|
get when() {
|
|
470
|
-
return
|
|
487
|
+
return d();
|
|
471
488
|
},
|
|
472
489
|
get children() {
|
|
473
|
-
var o =
|
|
474
|
-
return
|
|
475
|
-
each:
|
|
490
|
+
var o = lt();
|
|
491
|
+
return f(o, c(Z, {
|
|
492
|
+
each: le,
|
|
476
493
|
children: (E) => {
|
|
477
494
|
const w = E.icon;
|
|
478
495
|
return (() => {
|
|
479
|
-
var
|
|
480
|
-
return
|
|
496
|
+
var u = dt(), x = u.firstChild, T = x.nextSibling, b = T.firstChild, y = b.nextSibling;
|
|
497
|
+
return u.$$click = () => {
|
|
481
498
|
e.onSelectMode?.(E.mode), r(!1);
|
|
482
|
-
},
|
|
499
|
+
}, f(x, c(w, {
|
|
483
500
|
class: "workbench-dock__mode-icon"
|
|
484
|
-
})), b
|
|
485
|
-
var
|
|
486
|
-
return
|
|
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;
|
|
487
504
|
}, {
|
|
488
505
|
e: void 0,
|
|
489
506
|
t: void 0
|
|
490
|
-
}),
|
|
507
|
+
}), u;
|
|
491
508
|
})();
|
|
492
509
|
}
|
|
493
510
|
})), o;
|
|
494
511
|
}
|
|
495
|
-
}), null),
|
|
512
|
+
}), null), f(t, c(Ke, {
|
|
496
513
|
get each() {
|
|
497
|
-
return
|
|
514
|
+
return W();
|
|
498
515
|
},
|
|
499
516
|
children: (o, E) => {
|
|
500
517
|
const w = () => E + 1;
|
|
501
|
-
return
|
|
518
|
+
return c(bt, {
|
|
502
519
|
get action() {
|
|
503
520
|
return o();
|
|
504
521
|
},
|
|
505
522
|
get hoverOffset() {
|
|
506
|
-
return
|
|
523
|
+
return h(w());
|
|
507
524
|
},
|
|
508
525
|
onEnter: () => i(w()),
|
|
509
|
-
onLeave: () => i((
|
|
526
|
+
onLeave: () => i((u) => u === w() ? null : u)
|
|
510
527
|
});
|
|
511
528
|
}
|
|
512
|
-
}), P),
|
|
529
|
+
}), P), f(t, c(p, {
|
|
513
530
|
get when() {
|
|
514
|
-
return
|
|
531
|
+
return ie("before-components");
|
|
515
532
|
},
|
|
516
533
|
get children() {
|
|
517
|
-
|
|
518
|
-
return b(o, d(K, {
|
|
519
|
-
get when() {
|
|
520
|
-
return Le();
|
|
521
|
-
},
|
|
522
|
-
children: (E) => {
|
|
523
|
-
const w = E();
|
|
524
|
-
return d(w, {
|
|
525
|
-
class: "workbench-dock__icon"
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
})), A(() => o.classList.toggle("is-drop-allowed", !!l()?.overDock)), o;
|
|
534
|
+
return c(ke, {});
|
|
529
535
|
}
|
|
530
|
-
}), P),
|
|
536
|
+
}), P), f(t, c(Z, {
|
|
531
537
|
get each() {
|
|
532
|
-
return
|
|
538
|
+
return ne();
|
|
533
539
|
},
|
|
534
540
|
children: (o, E) => {
|
|
535
|
-
const w = () => E() +
|
|
536
|
-
return
|
|
541
|
+
const w = () => E() + W().length + 1;
|
|
542
|
+
return c(ce, {
|
|
537
543
|
get id() {
|
|
538
544
|
return o.id;
|
|
539
545
|
},
|
|
@@ -550,29 +556,29 @@ function St(e) {
|
|
|
550
556
|
visible: !0,
|
|
551
557
|
filterable: !1,
|
|
552
558
|
get hoverOffset() {
|
|
553
|
-
return
|
|
559
|
+
return h(w());
|
|
554
560
|
},
|
|
555
561
|
get isDragging() {
|
|
556
|
-
return
|
|
562
|
+
return j(() => l()?.kind === "host")() && l()?.id === o.id;
|
|
557
563
|
},
|
|
558
564
|
get canvasPlacement() {
|
|
559
|
-
return
|
|
565
|
+
return ee(o.canvasPlacement);
|
|
560
566
|
},
|
|
561
567
|
get onContextMenu() {
|
|
562
568
|
return o.onContextMenu;
|
|
563
569
|
},
|
|
564
570
|
onEnter: () => i(w()),
|
|
565
|
-
onLeave: () => i((
|
|
566
|
-
onDragBegin:
|
|
571
|
+
onLeave: () => i((u) => u === w() ? null : u),
|
|
572
|
+
onDragBegin: G
|
|
567
573
|
});
|
|
568
574
|
}
|
|
569
|
-
}), P),
|
|
575
|
+
}), P), f(t, c(Z, {
|
|
570
576
|
get each() {
|
|
571
|
-
return
|
|
577
|
+
return te();
|
|
572
578
|
},
|
|
573
579
|
children: (o, E) => {
|
|
574
|
-
const w = () => E() +
|
|
575
|
-
return
|
|
580
|
+
const w = () => E() + W().length + ne().length + 1;
|
|
581
|
+
return c(ce, {
|
|
576
582
|
get id() {
|
|
577
583
|
return String(o.id);
|
|
578
584
|
},
|
|
@@ -586,91 +592,144 @@ function St(e) {
|
|
|
586
592
|
return o.icon;
|
|
587
593
|
},
|
|
588
594
|
get active() {
|
|
589
|
-
return
|
|
595
|
+
return ye(String(o.id));
|
|
590
596
|
},
|
|
591
597
|
get visible() {
|
|
592
|
-
return
|
|
598
|
+
return Te(String(o.id));
|
|
593
599
|
},
|
|
594
600
|
get filterable() {
|
|
595
|
-
return
|
|
601
|
+
return oe();
|
|
596
602
|
},
|
|
597
603
|
get hoverOffset() {
|
|
598
|
-
return
|
|
604
|
+
return h(w());
|
|
599
605
|
},
|
|
600
606
|
get isDragging() {
|
|
601
|
-
return
|
|
607
|
+
return j(() => o.kind === "widget")() ? Ie() === o.id : Se() === o.id;
|
|
602
608
|
},
|
|
603
609
|
get canvasPlacement() {
|
|
604
|
-
return
|
|
610
|
+
return j(() => o.kind === "widget")() ? {
|
|
605
611
|
preview: {
|
|
606
612
|
kind: "widget",
|
|
607
613
|
id: o.id
|
|
608
614
|
},
|
|
609
|
-
onDrop: (
|
|
615
|
+
onDrop: (u, x, T) => e.onCreateAt?.(o.id, u, x, T)
|
|
610
616
|
} : {
|
|
611
617
|
preview: {
|
|
612
618
|
kind: "tool",
|
|
613
619
|
id: o.id
|
|
614
620
|
},
|
|
615
|
-
onDrop: (
|
|
621
|
+
onDrop: (u, x, T) => e.onCreateToolAt?.(o.id, u, x, T)
|
|
616
622
|
};
|
|
617
623
|
},
|
|
618
624
|
onEnter: () => i(w()),
|
|
619
|
-
onLeave: () => i((
|
|
620
|
-
onDragBegin:
|
|
625
|
+
onLeave: () => i((u) => u === w() ? null : u),
|
|
626
|
+
onDragBegin: G
|
|
621
627
|
});
|
|
622
628
|
}
|
|
623
|
-
}), null),
|
|
624
|
-
|
|
625
|
-
|
|
629
|
+
}), null), f(t, c(p, {
|
|
630
|
+
get when() {
|
|
631
|
+
return ge().length > 0 || ie("after-components");
|
|
632
|
+
},
|
|
633
|
+
get children() {
|
|
634
|
+
return ct();
|
|
635
|
+
}
|
|
636
|
+
}), null), f(t, c(Z, {
|
|
637
|
+
get each() {
|
|
638
|
+
return ge();
|
|
639
|
+
},
|
|
640
|
+
children: (o, E) => {
|
|
641
|
+
const w = () => E() + W().length + ne().length + te().length + 1;
|
|
642
|
+
return c(ce, {
|
|
643
|
+
get id() {
|
|
644
|
+
return o.id;
|
|
645
|
+
},
|
|
646
|
+
kind: "host",
|
|
647
|
+
get label() {
|
|
648
|
+
return o.label;
|
|
649
|
+
},
|
|
650
|
+
get icon() {
|
|
651
|
+
return o.icon;
|
|
652
|
+
},
|
|
653
|
+
get active() {
|
|
654
|
+
return !!o.active;
|
|
655
|
+
},
|
|
656
|
+
visible: !0,
|
|
657
|
+
filterable: !1,
|
|
658
|
+
get hoverOffset() {
|
|
659
|
+
return h(w());
|
|
660
|
+
},
|
|
661
|
+
get isDragging() {
|
|
662
|
+
return j(() => l()?.kind === "host")() && l()?.id === o.id;
|
|
663
|
+
},
|
|
664
|
+
get canvasPlacement() {
|
|
665
|
+
return ee(o.canvasPlacement);
|
|
666
|
+
},
|
|
667
|
+
get onContextMenu() {
|
|
668
|
+
return o.onContextMenu;
|
|
669
|
+
},
|
|
670
|
+
onEnter: () => i(w()),
|
|
671
|
+
onLeave: () => i((u) => u === w() ? null : u),
|
|
672
|
+
onDragBegin: G
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
}), null), f(t, c(p, {
|
|
676
|
+
get when() {
|
|
677
|
+
return ie("after-components");
|
|
678
|
+
},
|
|
679
|
+
get children() {
|
|
680
|
+
return c(ke, {});
|
|
681
|
+
}
|
|
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;
|
|
626
685
|
}, {
|
|
627
686
|
e: void 0,
|
|
628
687
|
t: void 0,
|
|
629
688
|
a: void 0,
|
|
630
689
|
o: void 0
|
|
631
690
|
}), t;
|
|
632
|
-
})(),
|
|
691
|
+
})(), c(p, {
|
|
633
692
|
get when() {
|
|
634
693
|
return !!(l()?.moved && !l()?.preview);
|
|
635
694
|
},
|
|
636
695
|
get children() {
|
|
637
|
-
return
|
|
696
|
+
return c(_t, {
|
|
638
697
|
state: l
|
|
639
698
|
});
|
|
640
699
|
}
|
|
641
700
|
})];
|
|
642
701
|
}
|
|
643
|
-
function
|
|
644
|
-
const
|
|
645
|
-
const
|
|
646
|
-
return
|
|
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)";
|
|
647
706
|
}, i = () => e.state()?.label ?? "", l = () => e.state()?.icon;
|
|
648
|
-
return
|
|
707
|
+
return c(Be, {
|
|
649
708
|
get children() {
|
|
650
|
-
var
|
|
651
|
-
return
|
|
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, {
|
|
652
711
|
get when() {
|
|
653
712
|
return l();
|
|
654
713
|
},
|
|
655
|
-
children: (
|
|
656
|
-
const
|
|
657
|
-
return
|
|
714
|
+
children: (h) => {
|
|
715
|
+
const S = h();
|
|
716
|
+
return c(S, {
|
|
658
717
|
class: "w-4 h-4"
|
|
659
718
|
});
|
|
660
719
|
}
|
|
661
|
-
})),
|
|
720
|
+
})), f(m, i), f(_, c(Ne, {
|
|
662
721
|
class: "w-3 h-3"
|
|
663
|
-
}), C),
|
|
664
|
-
var
|
|
665
|
-
return
|
|
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;
|
|
666
725
|
}, {
|
|
667
726
|
e: void 0,
|
|
668
727
|
t: void 0
|
|
669
|
-
}),
|
|
728
|
+
}), s;
|
|
670
729
|
}
|
|
671
730
|
});
|
|
672
731
|
}
|
|
673
|
-
|
|
732
|
+
We(["pointerdown", "contextmenu", "keydown", "click"]);
|
|
674
733
|
export {
|
|
675
|
-
|
|
734
|
+
$t as WorkbenchDock
|
|
676
735
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { WorkbenchOverlay, type WorkbenchOverlayProps } from './WorkbenchOverlay';
|
|
2
2
|
export { WorkbenchDockPopoverSurface, type WorkbenchDockPopoverSurfaceProps, } from './WorkbenchDockPopoverSurface';
|
|
3
3
|
export { WorkbenchSurface, type WorkbenchSurfaceApi, type WorkbenchCreateAtOptions, type WorkbenchCreateWidgetOptions, type WorkbenchContextMenuItemsResolver, type WorkbenchSurfaceProps, } from './WorkbenchSurface';
|
|
4
|
-
export type { WorkbenchDockAction, WorkbenchCanvasWidgetPlacement, WorkbenchDockCanvasPlacement, WorkbenchDockDropContext, WorkbenchDockItemActivation, WorkbenchExternalDockDragController, WorkbenchExternalDockDragItem, WorkbenchHostDockItem, } from './WorkbenchFilterBar';
|
|
4
|
+
export type { WorkbenchDockAction, WorkbenchCanvasWidgetPlacement, WorkbenchDockCanvasPlacement, WorkbenchDockDropContext, WorkbenchDockItemPlacement, WorkbenchDockItemActivation, WorkbenchExternalDockDragController, WorkbenchExternalDockDragItem, WorkbenchHostDockItem, } from './WorkbenchFilterBar';
|
|
5
5
|
export type { BarItemContextMenuHandler, BarItemContextMenuRequest, BarItemContextMenuSource, } from '../layout/barItemContextMenu';
|
|
6
6
|
export { WorkbenchContextMenu, type WorkbenchContextMenuItem, type WorkbenchContextMenuProps, } from './WorkbenchContextMenu';
|
|
7
7
|
export { useWorkbenchModel, type UseWorkbenchModelOptions } from './useWorkbenchModel';
|