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