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