@floegence/floe-webapp-core 0.36.59 → 0.36.61
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/components/workbench/WorkbenchFilterBar.js +177 -172
- package/dist/components/workbench/WorkbenchLayerObjects.js +354 -354
- package/dist/components/workbench/WorkbenchWidget.js +184 -176
- package/dist/components/workbench/useWorkbenchModel.js +236 -239
- package/dist/components/workbench/workbenchHelpers.d.ts +9 -2
- package/dist/components/workbench/workbenchHelpers.js +157 -139
- package/package.json +1 -1
|
@@ -1,66 +1,69 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { createSignal as
|
|
1
|
+
import { insert as w, createComponent as g, effect as P, setAttribute as T, memo as me, template as $, Portal as he, setStyleProperty as ke, use as be, delegateEvents as we } from "solid-js/web";
|
|
2
|
+
import { createSignal as H, onCleanup as J, createEffect as Q, createMemo as B, Show as K, For as Z } from "solid-js";
|
|
3
3
|
import { Motion as F } from "../../node_modules/.pnpm/solid-motionone@1.0.4_solid-js@1.9.11/node_modules/solid-motionone/dist/index.js";
|
|
4
4
|
import { easing as A, duration as X } from "../../utils/animations.js";
|
|
5
|
-
import { Plus as
|
|
6
|
-
import { startHotInteraction as
|
|
7
|
-
import { startPointerSession as
|
|
8
|
-
import { WORKBENCH_EDGE_AUTO_PAN_FRAME_SELECTOR as
|
|
9
|
-
import { DockLayoutDashboard as
|
|
10
|
-
var
|
|
11
|
-
const ee = 5,
|
|
5
|
+
import { Plus as _e } from "../icons/index.js";
|
|
6
|
+
import { startHotInteraction as Ee } from "../../utils/hotInteraction.js";
|
|
7
|
+
import { startPointerSession as Ce } from "../ui/pointerSession.js";
|
|
8
|
+
import { WORKBENCH_EDGE_AUTO_PAN_FRAME_SELECTOR as oe, frameFromElement as ie, createWorkbenchEdgeAutoPanController as Se } from "./workbenchEdgeAutoPan.js";
|
|
9
|
+
import { DockLayoutDashboard as pe, DockLayers as De, DockRegion as Oe, DockText as Me, DockMessageSquare as Le } from "../icons/DockIcons.js";
|
|
10
|
+
var ye = /* @__PURE__ */ $("<button type=button class=workbench-dock__item>"), $e = /* @__PURE__ */ $('<div class=workbench-dock__mode-popover role=menu aria-label="Canvas mode">'), Ie = /* @__PURE__ */ $('<div class=workbench-dock 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>'), Pe = /* @__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>"), Te = /* @__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>Drag onto canvas");
|
|
11
|
+
const ee = 5, Fe = ".workbench-dock", W = [{
|
|
12
12
|
mode: "work",
|
|
13
13
|
label: "Work Mode",
|
|
14
14
|
description: "Operate windows and sticky notes",
|
|
15
|
-
icon:
|
|
15
|
+
icon: pe
|
|
16
16
|
}, {
|
|
17
17
|
mode: "background",
|
|
18
18
|
label: "Composition Mode",
|
|
19
19
|
description: "Arrange regions and canvas text",
|
|
20
|
-
icon:
|
|
21
|
-
}],
|
|
20
|
+
icon: De
|
|
21
|
+
}], Ae = [{
|
|
22
22
|
tool: "sticky-note",
|
|
23
23
|
label: "Sticky",
|
|
24
|
-
icon:
|
|
25
|
-
}],
|
|
24
|
+
icon: Le
|
|
25
|
+
}], Xe = [{
|
|
26
26
|
tool: "background-region",
|
|
27
27
|
label: "Region",
|
|
28
|
-
icon:
|
|
28
|
+
icon: Oe
|
|
29
29
|
}, {
|
|
30
30
|
tool: "text",
|
|
31
31
|
label: "Text",
|
|
32
|
-
icon:
|
|
32
|
+
icon: Me
|
|
33
33
|
}];
|
|
34
|
-
function
|
|
35
|
-
const e = document.querySelector(
|
|
36
|
-
return e instanceof HTMLElement ?
|
|
34
|
+
function Ye() {
|
|
35
|
+
const e = document.querySelector(oe);
|
|
36
|
+
return e instanceof HTMLElement ? ie(e) : null;
|
|
37
|
+
}
|
|
38
|
+
function N(e, c, r) {
|
|
39
|
+
return e >= r.left && e <= r.right && c >= r.top && c <= r.bottom;
|
|
37
40
|
}
|
|
38
|
-
function
|
|
39
|
-
return
|
|
41
|
+
function Re(e, c, r) {
|
|
42
|
+
return r ? N(e, c, r) : !1;
|
|
40
43
|
}
|
|
41
|
-
function
|
|
42
|
-
return
|
|
44
|
+
function te(e, c, r) {
|
|
45
|
+
return Math.min(r, Math.max(c, e));
|
|
43
46
|
}
|
|
44
|
-
function
|
|
47
|
+
function xe(e, c, r, d, i) {
|
|
45
48
|
if (!e) return !1;
|
|
46
|
-
if (
|
|
49
|
+
if (N(c, r, e) || N(d, i, e))
|
|
47
50
|
return !0;
|
|
48
|
-
const
|
|
51
|
+
const a = d - c, _ = i - r;
|
|
49
52
|
let f = 0, m = 1;
|
|
50
|
-
const u = (
|
|
51
|
-
if (
|
|
52
|
-
const
|
|
53
|
-
return
|
|
53
|
+
const u = (h, p) => {
|
|
54
|
+
if (h === 0) return p >= 0;
|
|
55
|
+
const E = p / h;
|
|
56
|
+
return h < 0 ? E > m ? !1 : (E > f && (f = E), !0) : E < f ? !1 : (E < m && (m = E), !0);
|
|
54
57
|
};
|
|
55
|
-
return u(-
|
|
58
|
+
return u(-a, c - e.left) && u(a, e.right - c) && u(-_, r - e.top) && u(_, e.bottom - r);
|
|
56
59
|
}
|
|
57
|
-
function
|
|
60
|
+
function ne(e, c) {
|
|
58
61
|
if (typeof document.elementFromPoint != "function") return !1;
|
|
59
|
-
const
|
|
60
|
-
return
|
|
62
|
+
const r = document.elementFromPoint(e, c);
|
|
63
|
+
return r instanceof Element && r.closest(Fe) !== null;
|
|
61
64
|
}
|
|
62
|
-
function
|
|
63
|
-
const
|
|
65
|
+
function He(e) {
|
|
66
|
+
const c = () => e.hoverOffset === -1 ? {
|
|
64
67
|
scale: 1.26,
|
|
65
68
|
y: -6,
|
|
66
69
|
x: 0
|
|
@@ -76,15 +79,15 @@ function Re(e) {
|
|
|
76
79
|
scale: 1,
|
|
77
80
|
y: 0,
|
|
78
81
|
x: 0
|
|
79
|
-
},
|
|
80
|
-
|
|
82
|
+
}, r = () => e.hoverOffset === -1, d = (i) => {
|
|
83
|
+
i.button === 0 && e.onDragBegin(i, e.kind, e.id, e.label, e.icon);
|
|
81
84
|
};
|
|
82
85
|
return (() => {
|
|
83
|
-
var
|
|
84
|
-
return
|
|
86
|
+
var i = ye();
|
|
87
|
+
return i.$$pointerdown = d, i.addEventListener("pointerleave", () => e.onLeave()), i.addEventListener("pointerenter", () => e.onEnter()), w(i, g(F.span, {
|
|
85
88
|
class: "workbench-dock__tile",
|
|
86
89
|
get animate() {
|
|
87
|
-
return
|
|
90
|
+
return c();
|
|
88
91
|
},
|
|
89
92
|
get transition() {
|
|
90
93
|
return {
|
|
@@ -94,18 +97,18 @@ function Re(e) {
|
|
|
94
97
|
},
|
|
95
98
|
get children() {
|
|
96
99
|
return (() => {
|
|
97
|
-
const
|
|
98
|
-
return g(
|
|
100
|
+
const a = e.icon;
|
|
101
|
+
return g(a, {
|
|
99
102
|
class: "workbench-dock__icon"
|
|
100
103
|
});
|
|
101
104
|
})();
|
|
102
105
|
}
|
|
103
|
-
}), null),
|
|
106
|
+
}), null), w(i, g(F.span, {
|
|
104
107
|
class: "workbench-dock__tooltip",
|
|
105
108
|
get animate() {
|
|
106
109
|
return {
|
|
107
|
-
opacity:
|
|
108
|
-
y:
|
|
110
|
+
opacity: r() ? 1 : 0,
|
|
111
|
+
y: r() ? -6 : 0
|
|
109
112
|
};
|
|
110
113
|
},
|
|
111
114
|
get transition() {
|
|
@@ -117,9 +120,9 @@ function Re(e) {
|
|
|
117
120
|
get children() {
|
|
118
121
|
return e.label;
|
|
119
122
|
}
|
|
120
|
-
}), null), P((
|
|
121
|
-
var _ = !!e.active, f = !!(e.filterable && !e.visible), m = !!
|
|
122
|
-
return _ !==
|
|
123
|
+
}), null), P((a) => {
|
|
124
|
+
var _ = !!e.active, f = !!(e.filterable && !e.visible), m = !!r(), u = !!e.isDragging, h = e.filterable ? `${e.label} — click to solo, drag to canvas to create` : `${e.label} — drag to canvas to create`, p = e.active;
|
|
125
|
+
return _ !== a.e && i.classList.toggle("is-active", a.e = _), f !== a.t && i.classList.toggle("is-filter-muted", a.t = f), m !== a.a && i.classList.toggle("is-hovered", a.a = m), u !== a.o && i.classList.toggle("is-source-dragging", a.o = u), h !== a.i && T(i, "aria-label", a.i = h), p !== a.n && T(i, "aria-pressed", a.n = p), a;
|
|
123
126
|
}, {
|
|
124
127
|
e: void 0,
|
|
125
128
|
t: void 0,
|
|
@@ -127,12 +130,12 @@ function Re(e) {
|
|
|
127
130
|
o: void 0,
|
|
128
131
|
i: void 0,
|
|
129
132
|
n: void 0
|
|
130
|
-
}),
|
|
133
|
+
}), i;
|
|
131
134
|
})();
|
|
132
135
|
}
|
|
133
|
-
function
|
|
134
|
-
const [
|
|
135
|
-
let f, m, u,
|
|
136
|
+
function Je(e) {
|
|
137
|
+
const [c, r] = H(null), [d, i] = H(null), [a, _] = H(!1);
|
|
138
|
+
let f, m, u, h = null;
|
|
136
139
|
J(() => {
|
|
137
140
|
u?.stop(), m?.stop({
|
|
138
141
|
reason: "manual_stop",
|
|
@@ -141,43 +144,43 @@ function qe(e) {
|
|
|
141
144
|
}), Q(() => {
|
|
142
145
|
e.onDragPreviewChange?.(d()?.preview ?? null);
|
|
143
146
|
}), Q(() => {
|
|
144
|
-
if (!
|
|
145
|
-
const t = (
|
|
146
|
-
f &&
|
|
147
|
-
}, n = (
|
|
148
|
-
|
|
147
|
+
if (!a() || typeof window > "u") return;
|
|
148
|
+
const t = (s) => {
|
|
149
|
+
f && s.target instanceof Node && f.contains(s.target) || _(!1);
|
|
150
|
+
}, n = (s) => {
|
|
151
|
+
s.key === "Escape" && _(!1);
|
|
149
152
|
};
|
|
150
153
|
window.addEventListener("pointerdown", t, !0), window.addEventListener("keydown", n, !0), J(() => {
|
|
151
154
|
window.removeEventListener("pointerdown", t, !0), window.removeEventListener("keydown", n, !0);
|
|
152
155
|
});
|
|
153
156
|
});
|
|
154
|
-
const
|
|
155
|
-
const n =
|
|
157
|
+
const p = (t) => {
|
|
158
|
+
const n = c();
|
|
156
159
|
return n === null ? 0 : n === t ? -1 : n === t + 1 ? -2 : n === t - 1 ? 1 : 0;
|
|
157
|
-
},
|
|
158
|
-
u?.stop(), u = void 0,
|
|
159
|
-
},
|
|
160
|
-
!e.viewport || !e.onViewportCommit || (
|
|
160
|
+
}, E = () => {
|
|
161
|
+
u?.stop(), u = void 0, h = null;
|
|
162
|
+
}, Y = () => {
|
|
163
|
+
!e.viewport || !e.onViewportCommit || (h = e.viewport, u?.stop(), u = Se({
|
|
161
164
|
readFrame: () => {
|
|
162
|
-
const t = document.querySelector(
|
|
163
|
-
return t instanceof HTMLElement ?
|
|
165
|
+
const t = document.querySelector(oe);
|
|
166
|
+
return t instanceof HTMLElement ? ie(t) : null;
|
|
164
167
|
},
|
|
165
|
-
readViewport: () =>
|
|
168
|
+
readViewport: () => h ?? e.viewport ?? null,
|
|
166
169
|
commitViewport: (t) => {
|
|
167
|
-
|
|
170
|
+
h = t, e.onViewportCommit?.(t);
|
|
168
171
|
},
|
|
169
172
|
onPanStart: () => e.onViewportInteractionStart?.("pan"),
|
|
170
173
|
shouldPan: () => {
|
|
171
174
|
const t = d();
|
|
172
|
-
return !!(t?.moved && t.hasEnteredCanvas && !
|
|
175
|
+
return !!(t?.moved && t.hasEnteredCanvas && !ne(t.clientX, t.clientY));
|
|
173
176
|
}
|
|
174
177
|
}));
|
|
175
|
-
},
|
|
178
|
+
}, re = (t) => {
|
|
176
179
|
const n = d();
|
|
177
180
|
if (!n) return;
|
|
178
|
-
const
|
|
179
|
-
if (n.stopInteraction(),
|
|
180
|
-
D() !== "background" && e.onSoloFilter(String(n.id),
|
|
181
|
+
const s = !n.moved;
|
|
182
|
+
if (n.stopInteraction(), E(), i(null), m = void 0, s) {
|
|
183
|
+
D() !== "background" && e.onSoloFilter(String(n.id), U());
|
|
181
184
|
return;
|
|
182
185
|
}
|
|
183
186
|
if (t && n.overCanvas) {
|
|
@@ -187,17 +190,17 @@ function qe(e) {
|
|
|
187
190
|
} : void 0;
|
|
188
191
|
n.kind === "widget" ? e.onCreateAt?.(n.id, n.clientX, n.clientY, O) : e.onCreateToolAt?.(n.id, n.clientX, n.clientY, O);
|
|
189
192
|
}
|
|
190
|
-
},
|
|
193
|
+
}, ae = (t, n, s, O, l) => {
|
|
191
194
|
t.preventDefault(), m?.stop({
|
|
192
195
|
reason: "manual_stop",
|
|
193
196
|
commit: !1
|
|
194
|
-
}),
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
+
}), Y();
|
|
198
|
+
const k = Ye();
|
|
199
|
+
i({
|
|
197
200
|
kind: n,
|
|
198
|
-
id:
|
|
201
|
+
id: s,
|
|
199
202
|
label: O,
|
|
200
|
-
icon:
|
|
203
|
+
icon: l,
|
|
201
204
|
pointerId: t.pointerId,
|
|
202
205
|
startClientX: t.clientX,
|
|
203
206
|
startClientY: t.clientY,
|
|
@@ -206,51 +209,53 @@ function qe(e) {
|
|
|
206
209
|
moved: !1,
|
|
207
210
|
overCanvas: !1,
|
|
208
211
|
hasEnteredCanvas: !1,
|
|
209
|
-
canvasFrame:
|
|
212
|
+
canvasFrame: k,
|
|
210
213
|
preview: null,
|
|
211
|
-
stopInteraction:
|
|
214
|
+
stopInteraction: Ee({
|
|
212
215
|
kind: "drag",
|
|
213
216
|
cursor: "grabbing"
|
|
214
217
|
})
|
|
215
218
|
});
|
|
216
|
-
const
|
|
219
|
+
const S = (o) => {
|
|
217
220
|
let y = !1;
|
|
218
|
-
|
|
219
|
-
if (!v || v.pointerId !==
|
|
220
|
-
const I =
|
|
221
|
-
|
|
221
|
+
i((v) => {
|
|
222
|
+
if (!v || v.pointerId !== o.pointerId) return v;
|
|
223
|
+
const I = o.clientX - v.startClientX, x = o.clientY - v.startClientY, C = v.moved || Math.abs(I) > ee || Math.abs(x) > ee, M = ne(o.clientX, o.clientY), b = v.canvasFrame, q = C && Re(o.clientX, o.clientY, b), z = q && !M, ge = C && !M && xe(b, v.clientX, v.clientY, o.clientX, o.clientY), j = v.hasEnteredCanvas || q || ge;
|
|
224
|
+
y = C && j && !M;
|
|
225
|
+
const ve = b ? te(o.clientX, b.left, b.right) : o.clientX, fe = b ? te(o.clientY, b.top, b.bottom) : o.clientY;
|
|
226
|
+
return {
|
|
222
227
|
...v,
|
|
223
|
-
clientX:
|
|
224
|
-
clientY:
|
|
228
|
+
clientX: o.clientX,
|
|
229
|
+
clientY: o.clientY,
|
|
225
230
|
moved: C,
|
|
226
|
-
overCanvas:
|
|
231
|
+
overCanvas: z,
|
|
227
232
|
hasEnteredCanvas: j,
|
|
228
|
-
preview:
|
|
233
|
+
preview: C && b ? {
|
|
229
234
|
kind: v.kind,
|
|
230
235
|
id: v.id,
|
|
231
236
|
label: v.label,
|
|
232
|
-
clientX:
|
|
233
|
-
clientY:
|
|
234
|
-
dropAllowed:
|
|
235
|
-
canvasFrame:
|
|
237
|
+
clientX: ve,
|
|
238
|
+
clientY: fe,
|
|
239
|
+
dropAllowed: z,
|
|
240
|
+
canvasFrame: b
|
|
236
241
|
} : null
|
|
237
242
|
};
|
|
238
|
-
}), y && u?.updatePointer(
|
|
243
|
+
}), y && u?.updatePointer(o.clientX, o.clientY);
|
|
239
244
|
};
|
|
240
|
-
m =
|
|
245
|
+
m = Ce({
|
|
241
246
|
pointerEvent: t,
|
|
242
247
|
captureEl: t.currentTarget,
|
|
243
|
-
onMove:
|
|
248
|
+
onMove: S,
|
|
244
249
|
onEnd: ({
|
|
245
|
-
commit:
|
|
246
|
-
}) =>
|
|
250
|
+
commit: o
|
|
251
|
+
}) => re(o)
|
|
247
252
|
});
|
|
248
|
-
},
|
|
253
|
+
}, le = () => d()?.kind === "widget" ? d().id : null, ce = () => d()?.kind === "tool" ? d().id : null, D = () => e.mode === "background" || e.mode === "annotation" ? "background" : "work", V = B(() => W.find((t) => t.mode === D()) ?? W[0]), G = B(() => D() === "background" ? Xe.map((t) => ({
|
|
249
254
|
id: t.tool,
|
|
250
255
|
kind: "tool",
|
|
251
256
|
label: t.label,
|
|
252
257
|
icon: t.icon
|
|
253
|
-
})) : [...
|
|
258
|
+
})) : [...Ae.map((t) => ({
|
|
254
259
|
id: t.tool,
|
|
255
260
|
kind: "tool",
|
|
256
261
|
label: t.label,
|
|
@@ -260,24 +265,24 @@ function qe(e) {
|
|
|
260
265
|
kind: "widget",
|
|
261
266
|
label: t.label,
|
|
262
267
|
icon: t.icon
|
|
263
|
-
}))]),
|
|
264
|
-
if (!
|
|
268
|
+
}))]), U = B(() => G().map((t) => String(t.id))), R = () => D() !== "background", se = (t) => !R() || e.filters[t] !== !1, de = (t) => {
|
|
269
|
+
if (!R())
|
|
265
270
|
return !1;
|
|
266
|
-
const n =
|
|
267
|
-
return n.length > 1 && n.every((
|
|
268
|
-
},
|
|
269
|
-
scale:
|
|
270
|
-
y:
|
|
271
|
-
x:
|
|
271
|
+
const n = U();
|
|
272
|
+
return n.length > 1 && n.every((s) => e.filters[s] !== !1 == (s === t));
|
|
273
|
+
}, L = () => c() === 0, ue = () => ({
|
|
274
|
+
scale: L() || a() ? 1.26 : 1,
|
|
275
|
+
y: L() || a() ? -6 : 0,
|
|
276
|
+
x: c() === 1 ? -5 : 0
|
|
272
277
|
});
|
|
273
278
|
return [(() => {
|
|
274
|
-
var t =
|
|
275
|
-
n.nextSibling, t.addEventListener("pointerleave", () =>
|
|
279
|
+
var t = Ie(), n = t.firstChild, s = n.firstChild;
|
|
280
|
+
n.nextSibling, t.addEventListener("pointerleave", () => r(null));
|
|
276
281
|
var O = f;
|
|
277
|
-
return typeof O == "function" ?
|
|
282
|
+
return typeof O == "function" ? be(O, t) : f = t, s.$$click = () => _((l) => !l), s.addEventListener("pointerleave", () => r((l) => l === 0 ? null : l)), s.addEventListener("pointerenter", () => r(0)), w(s, g(F.span, {
|
|
278
283
|
class: "workbench-dock__tile",
|
|
279
284
|
get animate() {
|
|
280
|
-
return
|
|
285
|
+
return ue();
|
|
281
286
|
},
|
|
282
287
|
get transition() {
|
|
283
288
|
return {
|
|
@@ -287,18 +292,18 @@ function qe(e) {
|
|
|
287
292
|
},
|
|
288
293
|
get children() {
|
|
289
294
|
return (() => {
|
|
290
|
-
const
|
|
291
|
-
return g(
|
|
295
|
+
const l = V().icon;
|
|
296
|
+
return g(l, {
|
|
292
297
|
class: "workbench-dock__icon"
|
|
293
298
|
});
|
|
294
299
|
})();
|
|
295
300
|
}
|
|
296
|
-
}), null),
|
|
301
|
+
}), null), w(s, g(F.span, {
|
|
297
302
|
class: "workbench-dock__tooltip",
|
|
298
303
|
get animate() {
|
|
299
304
|
return {
|
|
300
|
-
opacity:
|
|
301
|
-
y:
|
|
305
|
+
opacity: L() && !a() ? 1 : 0,
|
|
306
|
+
y: L() && !a() ? -6 : 0
|
|
302
307
|
};
|
|
303
308
|
},
|
|
304
309
|
get transition() {
|
|
@@ -308,118 +313,118 @@ function qe(e) {
|
|
|
308
313
|
};
|
|
309
314
|
},
|
|
310
315
|
get children() {
|
|
311
|
-
return
|
|
316
|
+
return V().label;
|
|
312
317
|
}
|
|
313
|
-
}), null),
|
|
318
|
+
}), null), w(n, g(K, {
|
|
314
319
|
get when() {
|
|
315
|
-
return
|
|
320
|
+
return a();
|
|
316
321
|
},
|
|
317
322
|
get children() {
|
|
318
|
-
var
|
|
319
|
-
return
|
|
320
|
-
each:
|
|
321
|
-
children: (
|
|
322
|
-
const
|
|
323
|
+
var l = $e();
|
|
324
|
+
return w(l, g(Z, {
|
|
325
|
+
each: W,
|
|
326
|
+
children: (k) => {
|
|
327
|
+
const S = k.icon;
|
|
323
328
|
return (() => {
|
|
324
|
-
var
|
|
325
|
-
return
|
|
326
|
-
e.onSelectMode?.(
|
|
327
|
-
},
|
|
329
|
+
var o = Pe(), y = o.firstChild, v = y.nextSibling, I = v.firstChild, x = I.nextSibling;
|
|
330
|
+
return o.$$click = () => {
|
|
331
|
+
e.onSelectMode?.(k.mode), _(!1);
|
|
332
|
+
}, w(y, g(S, {
|
|
328
333
|
class: "workbench-dock__mode-icon"
|
|
329
|
-
})),
|
|
330
|
-
var
|
|
331
|
-
return
|
|
334
|
+
})), w(I, () => k.label), w(x, () => k.description), P((C) => {
|
|
335
|
+
var M = D() === k.mode, b = D() === k.mode;
|
|
336
|
+
return M !== C.e && o.classList.toggle("is-active", C.e = M), b !== C.t && T(o, "aria-checked", C.t = b), C;
|
|
332
337
|
}, {
|
|
333
338
|
e: void 0,
|
|
334
339
|
t: void 0
|
|
335
|
-
}),
|
|
340
|
+
}), o;
|
|
336
341
|
})();
|
|
337
342
|
}
|
|
338
|
-
})),
|
|
343
|
+
})), l;
|
|
339
344
|
}
|
|
340
|
-
}), null),
|
|
345
|
+
}), null), w(t, g(Z, {
|
|
341
346
|
get each() {
|
|
342
|
-
return
|
|
347
|
+
return G();
|
|
343
348
|
},
|
|
344
|
-
children: (
|
|
345
|
-
const
|
|
346
|
-
return g(
|
|
349
|
+
children: (l, k) => {
|
|
350
|
+
const S = () => k() + 1;
|
|
351
|
+
return g(He, {
|
|
347
352
|
get id() {
|
|
348
|
-
return String(
|
|
353
|
+
return String(l.id);
|
|
349
354
|
},
|
|
350
355
|
get kind() {
|
|
351
|
-
return
|
|
356
|
+
return l.kind;
|
|
352
357
|
},
|
|
353
358
|
get label() {
|
|
354
|
-
return
|
|
359
|
+
return l.label;
|
|
355
360
|
},
|
|
356
361
|
get icon() {
|
|
357
|
-
return
|
|
362
|
+
return l.icon;
|
|
358
363
|
},
|
|
359
364
|
get active() {
|
|
360
|
-
return
|
|
365
|
+
return de(String(l.id));
|
|
361
366
|
},
|
|
362
367
|
get visible() {
|
|
363
|
-
return
|
|
368
|
+
return se(String(l.id));
|
|
364
369
|
},
|
|
365
370
|
get filterable() {
|
|
366
|
-
return
|
|
371
|
+
return R();
|
|
367
372
|
},
|
|
368
373
|
get hoverOffset() {
|
|
369
|
-
return S(
|
|
374
|
+
return p(S());
|
|
370
375
|
},
|
|
371
376
|
get isDragging() {
|
|
372
|
-
return
|
|
377
|
+
return me(() => l.kind === "widget")() ? le() === l.id : ce() === l.id;
|
|
373
378
|
},
|
|
374
|
-
onEnter: () =>
|
|
375
|
-
onLeave: () =>
|
|
376
|
-
onDragBegin:
|
|
379
|
+
onEnter: () => r(S()),
|
|
380
|
+
onLeave: () => r((o) => o === S() ? null : o),
|
|
381
|
+
onDragBegin: ae
|
|
377
382
|
});
|
|
378
383
|
}
|
|
379
|
-
}), null), P((
|
|
380
|
-
var
|
|
381
|
-
return
|
|
384
|
+
}), null), P((l) => {
|
|
385
|
+
var k = D() === "background", S = !!(L() || a()), o = a();
|
|
386
|
+
return k !== l.e && s.classList.toggle("is-active", l.e = k), S !== l.t && s.classList.toggle("is-hovered", l.t = S), o !== l.a && T(s, "aria-expanded", l.a = o), l;
|
|
382
387
|
}, {
|
|
383
388
|
e: void 0,
|
|
384
389
|
t: void 0,
|
|
385
390
|
a: void 0
|
|
386
391
|
}), t;
|
|
387
|
-
})(), g(
|
|
392
|
+
})(), g(K, {
|
|
388
393
|
get when() {
|
|
389
394
|
return !!(d()?.moved && !d()?.preview);
|
|
390
395
|
},
|
|
391
396
|
get children() {
|
|
392
|
-
return g(
|
|
397
|
+
return g(Be, {
|
|
393
398
|
state: d
|
|
394
399
|
});
|
|
395
400
|
}
|
|
396
401
|
})];
|
|
397
402
|
}
|
|
398
|
-
function
|
|
399
|
-
const
|
|
400
|
-
const
|
|
401
|
-
return
|
|
402
|
-
},
|
|
403
|
-
return g(
|
|
403
|
+
function Be(e) {
|
|
404
|
+
const c = () => {
|
|
405
|
+
const i = e.state();
|
|
406
|
+
return i ? `translate3d(${i.clientX + 14}px, ${i.clientY - 56}px, 0)` : "translate3d(0px, 0px, 0)";
|
|
407
|
+
}, r = () => e.state()?.label ?? "", d = () => e.state()?.icon;
|
|
408
|
+
return g(he, {
|
|
404
409
|
get children() {
|
|
405
|
-
var
|
|
406
|
-
return
|
|
410
|
+
var i = Te(), a = i.firstChild, _ = a.nextSibling, f = _.firstChild, m = f.nextSibling, u = m.firstChild, h = u.nextSibling, p = h.firstChild;
|
|
411
|
+
return w(f, g(K, {
|
|
407
412
|
get when() {
|
|
408
413
|
return d();
|
|
409
414
|
},
|
|
410
|
-
children: (
|
|
411
|
-
const
|
|
412
|
-
return g(
|
|
415
|
+
children: (E) => {
|
|
416
|
+
const Y = E();
|
|
417
|
+
return g(Y, {
|
|
413
418
|
class: "w-4 h-4"
|
|
414
419
|
});
|
|
415
420
|
}
|
|
416
|
-
})),
|
|
421
|
+
})), w(u, r), w(h, g(_e, {
|
|
417
422
|
class: "w-3 h-3"
|
|
418
|
-
}),
|
|
423
|
+
}), p), P((E) => ke(i, "transform", c())), i;
|
|
419
424
|
}
|
|
420
425
|
});
|
|
421
426
|
}
|
|
422
|
-
|
|
427
|
+
we(["pointerdown", "click"]);
|
|
423
428
|
export {
|
|
424
|
-
|
|
429
|
+
Je as WorkbenchDock
|
|
425
430
|
};
|