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