@floegence/floe-webapp-core 0.36.61 → 0.36.62
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 +3 -3
- package/dist/components/workbench/WorkbenchCanvas.js +80 -80
- package/dist/components/workbench/WorkbenchCanvasField.d.ts +3 -3
- package/dist/components/workbench/WorkbenchCanvasField.js +77 -77
- package/dist/components/workbench/WorkbenchLayerObjects.d.ts +2 -2
- package/dist/components/workbench/WorkbenchLayerObjects.js +76 -76
- package/dist/components/workbench/WorkbenchSurface.js +19 -19
- package/dist/components/workbench/WorkbenchWidget.d.ts +2 -2
- package/dist/components/workbench/WorkbenchWidget.js +97 -93
- package/dist/components/workbench/useWorkbenchModel.d.ts +2 -2
- package/dist/components/workbench/useWorkbenchModel.js +373 -360
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ export interface WorkbenchWidgetProps {
|
|
|
13
13
|
renderLayer: number;
|
|
14
14
|
itemSnapshot: () => WorkbenchWidgetItem;
|
|
15
15
|
selected: boolean;
|
|
16
|
-
|
|
16
|
+
visualFront: boolean;
|
|
17
17
|
motion?: WorkbenchWidgetMotionIntent | null;
|
|
18
18
|
topRenderLayer: number;
|
|
19
19
|
viewportScale: number;
|
|
@@ -26,7 +26,7 @@ export interface WorkbenchWidgetProps {
|
|
|
26
26
|
viewport?: WorkbenchViewport;
|
|
27
27
|
onSelect: (widgetId: string) => void;
|
|
28
28
|
onContextMenu: (event: MouseEvent, item: WorkbenchWidgetItem) => void;
|
|
29
|
-
|
|
29
|
+
onClaimVisualFrontOwner: (widgetId: string) => void;
|
|
30
30
|
onCommitFront: (widgetId: string) => void;
|
|
31
31
|
onCommitMove: (widgetId: string, position: {
|
|
32
32
|
x: number;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { spread as xt, mergeProps as pe, insert as f, createComponent as m, memo as me, effect as _e, style as be, template as Rt, use as ve, delegateEvents as Se } from "solid-js/web";
|
|
2
|
-
import { createMemo as
|
|
2
|
+
import { createMemo as g, createSignal as T, onCleanup as Wt, untrack as $, createEffect as Ct } from "solid-js";
|
|
3
3
|
import { startHotInteraction as ke } from "../../utils/hotInteraction.js";
|
|
4
|
-
import { X as
|
|
5
|
-
import { CANVAS_WHEEL_INTERACTIVE_ATTR as ye, WORKBENCH_WIDGET_SHELL_ATTR as Pe, resolveWorkbenchWidgetLocalTypingTarget as xe, resolveWorkbenchWidgetTextSelectionTarget as We, shouldActivateWorkbenchWidgetLocalTarget as
|
|
4
|
+
import { X as It, Minus as Mt, Maximize as Tt, GripVertical as $e } from "../icons/index.js";
|
|
5
|
+
import { CANVAS_WHEEL_INTERACTIVE_ATTR as ye, WORKBENCH_WIDGET_SHELL_ATTR as Pe, resolveWorkbenchWidgetLocalTypingTarget as xe, resolveWorkbenchWidgetTextSelectionTarget as We, shouldActivateWorkbenchWidgetLocalTarget as Ce } from "../ui/localInteractionSurface.js";
|
|
6
6
|
import { startPointerSession as Et } from "../ui/pointerSession.js";
|
|
7
|
-
import { createWorkbenchWidgetSurfaceMetrics as
|
|
8
|
-
import { createWorkbenchEdgeAutoPanController as
|
|
7
|
+
import { createWorkbenchWidgetSurfaceMetrics as Ie, resolveWorkbenchProjectedSurfaceScaleBehavior as Me } from "./workbenchHelpers.js";
|
|
8
|
+
import { createWorkbenchEdgeAutoPanController as Te, WORKBENCH_EDGE_AUTO_PAN_FRAME_SELECTOR as Ee, frameFromElement as Re } from "./workbenchEdgeAutoPan.js";
|
|
9
9
|
import { resolveWorkbenchInteractionAdapter as Le } from "./workbenchInteractionAdapter.js";
|
|
10
10
|
import { createOwnerSafePropAccessor as a } from "./workbenchOwnerSafeAccessors.js";
|
|
11
11
|
var Ae = /* @__PURE__ */ Rt('<article class=workbench-widget><div class=workbench-widget__surface><header class=workbench-widget__header><span class=workbench-widget__traffic role=group aria-label="Window controls"><button type=button class="workbench-widget__traffic-dot workbench-widget__traffic-dot--close"aria-label="Close widget"title="Close widget"data-floe-canvas-interactive=true></button><button type=button class="workbench-widget__traffic-dot workbench-widget__traffic-dot--min"aria-label="Minimize widget to overview"title="Minimize widget to overview"data-floe-canvas-interactive=true></button><button type=button class="workbench-widget__traffic-dot workbench-widget__traffic-dot--max"aria-label="Zoom widget to fit viewport"title="Zoom widget to fit viewport"data-floe-canvas-interactive=true></button></span><span class=workbench-widget__badge aria-hidden=true></span><button type=button class=workbench-widget__drag aria-label="Drag widget"data-floe-canvas-interactive=true></button><div class=workbench-widget__title-area><span class=workbench-widget__title-dot aria-hidden=true></span><span class=workbench-widget__title></span></div><span class=workbench-widget__window-controls role=group aria-label="Window controls"><button type=button class="workbench-widget__window-control workbench-widget__window-control--min"aria-label="Minimize widget to overview"title="Minimize widget to overview"data-floe-canvas-interactive=true></button><button type=button class="workbench-widget__window-control workbench-widget__window-control--max"aria-label="Zoom widget to fit viewport"title="Zoom widget to fit viewport"data-floe-canvas-interactive=true></button><button type=button class="workbench-widget__window-control workbench-widget__window-control--close"aria-label="Remove widget"title="Remove widget"data-floe-canvas-interactive=true></button></span></header><div class=workbench-widget__body data-floe-canvas-interactive=true>'), ze = /* @__PURE__ */ Rt('<div class=workbench-widget__resize aria-label="Resize widget"data-floe-canvas-interactive=true><svg class=workbench-widget__resize-glyph viewBox="0 0 12 12"aria-hidden=true><path d="M12 0 L0 12"></path><path d="M12 4 L4 12"></path><path d="M12 8 L8 12">');
|
|
12
12
|
const Xe = 220, Ye = 160, De = 160;
|
|
13
13
|
function Ke(i) {
|
|
14
|
-
const V = a(() => i.definition),
|
|
14
|
+
const V = a(() => i.definition), u = a(() => i.widgetId), rt = a(() => i.widgetTitle), at = a(() => i.widgetType), E = a(() => i.itemSnapshot), ct = a(() => i.renderLayer), Lt = a(() => i.visualFront), lt = a(() => i.motion ?? null), st = a(() => i.topRenderLayer), At = a(() => i.viewport), q = a(() => i.onSelect), zt = a(() => i.onContextMenu), B = a(() => i.onClaimVisualFrontOwner), N = a(() => i.onCommitFront), Xt = a(() => i.onCommitMove), Yt = a(() => i.onCommitResize), Dt = a(() => i.onViewportCommit), Ft = a(() => i.onViewportInteractionStart), jt = a(() => i.onRequestOverview), Ot = a(() => i.onRequestFit), Ht = a(() => i.onRequestDelete), Vt = a(() => i.onLayoutInteractionStart), qt = a(() => i.onLayoutInteractionEnd), h = g(() => Le(i.interactionAdapter)), R = a(() => i.selected), v = a(() => i.locked), G = a(() => i.filtered), b = a(() => i.layoutMode ?? "canvas_scaled"), Bt = a(() => i.projectedViewport), Nt = a(() => i.surfaceReady ?? !0), dt = a(() => ({
|
|
15
15
|
x: i.x,
|
|
16
16
|
y: i.y
|
|
17
17
|
})), ut = a(() => ({
|
|
18
18
|
width: i.width,
|
|
19
19
|
height: i.height
|
|
20
|
-
})),
|
|
20
|
+
})), Z = a(() => Math.max(i.viewportScale, 1e-3)), [y, L] = T(null), [A, K] = T(null), [Gt, Zt] = T(), [U, J] = T(!1), [wt, z] = T({
|
|
21
21
|
enabled: !1,
|
|
22
22
|
scale: 1
|
|
23
23
|
});
|
|
24
|
-
let P, x, W, X = null, Kt = 0, Ut = 0, S = null,
|
|
25
|
-
const
|
|
26
|
-
let
|
|
24
|
+
let P, x, W, X = null, Kt = 0, Ut = 0, S = null, C;
|
|
25
|
+
const I = /* @__PURE__ */ new Map();
|
|
26
|
+
let w;
|
|
27
27
|
const Y = () => {
|
|
28
|
-
typeof window > "u" ||
|
|
28
|
+
typeof window > "u" || C === void 0 || (window.clearTimeout(C), C = void 0);
|
|
29
29
|
}, gt = (t, e) => {
|
|
30
30
|
const n = ke({
|
|
31
31
|
kind: t,
|
|
@@ -39,9 +39,9 @@ function Ke(i) {
|
|
|
39
39
|
W?.stop(), W = void 0, X = null;
|
|
40
40
|
}, Jt = () => {
|
|
41
41
|
const t = At(), e = Dt(), n = Ft();
|
|
42
|
-
!t || !e || (X = t, W?.stop(), W =
|
|
42
|
+
!t || !e || (X = t, W?.stop(), W = Te({
|
|
43
43
|
readFrame: () => {
|
|
44
|
-
const o =
|
|
44
|
+
const o = w?.closest(Ee);
|
|
45
45
|
return o instanceof HTMLElement ? Re(o) : null;
|
|
46
46
|
},
|
|
47
47
|
readViewport: () => X ?? t,
|
|
@@ -72,34 +72,38 @@ function Ke(i) {
|
|
|
72
72
|
}), x = void 0, $(y)?.stopInteraction(), $(A)?.stopInteraction(), Y();
|
|
73
73
|
});
|
|
74
74
|
const D = () => {
|
|
75
|
-
|
|
76
|
-
const t =
|
|
77
|
-
q()(t),
|
|
75
|
+
J(!1);
|
|
76
|
+
const t = u();
|
|
77
|
+
q()(t), N()(t);
|
|
78
78
|
}, Qt = () => {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
if (ct() >= st()) {
|
|
80
|
+
B()(u());
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
N()(u());
|
|
84
|
+
}, Q = () => {
|
|
85
|
+
J(!1);
|
|
86
|
+
}, M = g(() => R() || U()), te = (t, e, n) => {
|
|
83
87
|
const o = {
|
|
84
88
|
token: ++Ut,
|
|
85
89
|
wasSelected: e,
|
|
86
90
|
ownership: n
|
|
87
91
|
};
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
I.set(t, o), !e && n === "widget_local" && J(!0), queueMicrotask(() => {
|
|
93
|
+
I.get(t)?.token === o.token && I.delete(t);
|
|
90
94
|
});
|
|
91
95
|
}, ee = (t) => {
|
|
92
|
-
const e =
|
|
93
|
-
return e &&
|
|
96
|
+
const e = I.get(t) ?? null;
|
|
97
|
+
return e && I.delete(t), e;
|
|
94
98
|
};
|
|
95
|
-
|
|
96
|
-
const t =
|
|
99
|
+
Ct(() => {
|
|
100
|
+
const t = w;
|
|
97
101
|
if (!t) return;
|
|
98
102
|
const e = (r) => {
|
|
99
|
-
r.button === 0 && te(r.pointerId,
|
|
103
|
+
r.button === 0 && te(r.pointerId, M(), F(r.target));
|
|
100
104
|
}, n = (r) => {
|
|
101
105
|
if (r.button === 0 && F(r.target) === "widget_local") {
|
|
102
|
-
if (
|
|
106
|
+
if (U()) {
|
|
103
107
|
D();
|
|
104
108
|
return;
|
|
105
109
|
}
|
|
@@ -107,20 +111,20 @@ function Ke(i) {
|
|
|
107
111
|
}
|
|
108
112
|
}, o = () => {
|
|
109
113
|
setTimeout(() => {
|
|
110
|
-
R() ||
|
|
114
|
+
R() || Q();
|
|
111
115
|
}, 0);
|
|
112
116
|
};
|
|
113
|
-
t.addEventListener("pointerdown", e, !0), t.addEventListener("click", n, !0), t.addEventListener("pointerup", o), t.addEventListener("pointercancel",
|
|
114
|
-
t.removeEventListener("pointerdown", e, !0), t.removeEventListener("click", n, !0), t.removeEventListener("pointerup", o), t.removeEventListener("pointercancel",
|
|
117
|
+
t.addEventListener("pointerdown", e, !0), t.addEventListener("click", n, !0), t.addEventListener("pointerup", o), t.addEventListener("pointercancel", Q), Wt(() => {
|
|
118
|
+
t.removeEventListener("pointerdown", e, !0), t.removeEventListener("click", n, !0), t.removeEventListener("pointerup", o), t.removeEventListener("pointercancel", Q);
|
|
115
119
|
});
|
|
116
120
|
});
|
|
117
|
-
const
|
|
121
|
+
const tt = () => y() !== null, et = () => A() !== null, oe = g(() => G() || v() ? "cold" : M() ? "hot" : "warm"), F = (t) => h().resolveWidgetEventOwnership({
|
|
118
122
|
target: t,
|
|
119
|
-
widgetRoot:
|
|
123
|
+
widgetRoot: w ?? null,
|
|
120
124
|
interactiveSelector: h().interactiveSelector,
|
|
121
125
|
panSurfaceSelector: h().panSurfaceSelector
|
|
122
126
|
}), ne = () => {
|
|
123
|
-
D(),
|
|
127
|
+
D(), w?.focus({
|
|
124
128
|
preventScroll: !0
|
|
125
129
|
});
|
|
126
130
|
}, ft = (t) => {
|
|
@@ -130,7 +134,7 @@ function Ke(i) {
|
|
|
130
134
|
pointerType: t
|
|
131
135
|
}));
|
|
132
136
|
}, ie = (t) => {
|
|
133
|
-
if (!(!
|
|
137
|
+
if (!(!w || !t.isConnected || !w.contains(t)))
|
|
134
138
|
try {
|
|
135
139
|
t.focus({
|
|
136
140
|
preventScroll: !0
|
|
@@ -160,22 +164,22 @@ function Ke(i) {
|
|
|
160
164
|
if (t.button !== 0 || v()) return;
|
|
161
165
|
const e = ee(t.pointerId), n = e?.wasSelected ?? R(), o = e?.ownership ?? F(t.target), r = o === "widget_local" ? xe({
|
|
162
166
|
target: t.target,
|
|
163
|
-
widgetRoot:
|
|
167
|
+
widgetRoot: w ?? null,
|
|
164
168
|
interactiveSelector: h().interactiveSelector,
|
|
165
169
|
panSurfaceSelector: h().panSurfaceSelector
|
|
166
170
|
}) : null, s = o === "widget_local" ? We({
|
|
167
171
|
target: t.target,
|
|
168
|
-
widgetRoot:
|
|
172
|
+
widgetRoot: w ?? null,
|
|
169
173
|
interactiveSelector: h().interactiveSelector,
|
|
170
174
|
panSurfaceSelector: h().panSurfaceSelector
|
|
171
|
-
}) : null, c = o === "widget_local" && !r && !s &&
|
|
175
|
+
}) : null, c = o === "widget_local" && !r && !s && Ce({
|
|
172
176
|
target: t.target,
|
|
173
|
-
widgetRoot:
|
|
177
|
+
widgetRoot: w ?? null,
|
|
174
178
|
interactiveSelector: h().interactiveSelector,
|
|
175
179
|
panSurfaceSelector: h().panSurfaceSelector
|
|
176
180
|
});
|
|
177
181
|
if (o === "widget_shell") {
|
|
178
|
-
D(),
|
|
182
|
+
D(), w?.focus({
|
|
179
183
|
preventScroll: !0
|
|
180
184
|
});
|
|
181
185
|
return;
|
|
@@ -197,23 +201,23 @@ function Ke(i) {
|
|
|
197
201
|
D(), ft(t.pointerType || void 0);
|
|
198
202
|
}
|
|
199
203
|
}
|
|
200
|
-
}, j =
|
|
204
|
+
}, j = g(() => {
|
|
201
205
|
const t = y();
|
|
202
206
|
return t ? {
|
|
203
207
|
x: t.worldX,
|
|
204
208
|
y: t.worldY
|
|
205
209
|
} : dt();
|
|
206
|
-
}), p =
|
|
210
|
+
}), p = g(() => {
|
|
207
211
|
const t = A();
|
|
208
212
|
return t ? {
|
|
209
213
|
width: t.width,
|
|
210
214
|
height: t.height
|
|
211
215
|
} : ut();
|
|
212
|
-
}),
|
|
216
|
+
}), ot = g(() => {
|
|
213
217
|
const t = Bt();
|
|
214
218
|
if (!(b() !== "projected_surface" || !t))
|
|
215
|
-
return
|
|
216
|
-
widgetId:
|
|
219
|
+
return Ie({
|
|
220
|
+
widgetId: u(),
|
|
217
221
|
worldX: j().x,
|
|
218
222
|
worldY: j().y,
|
|
219
223
|
worldWidth: p().width,
|
|
@@ -221,10 +225,10 @@ function Ke(i) {
|
|
|
221
225
|
viewport: t(),
|
|
222
226
|
ready: Nt()
|
|
223
227
|
});
|
|
224
|
-
}),
|
|
228
|
+
}), nt = g(() => ot()?.rect.viewportScale ?? Z()), pt = g(() => b() === "projected_surface" && Me(V()) === "settle_sharp_zoom"), mt = g(() => b() === "projected_surface" && pt() && wt().enabled && wt().scale > 1.001), ce = g(() => {
|
|
225
229
|
if (b() !== "projected_surface")
|
|
226
230
|
return;
|
|
227
|
-
const t =
|
|
231
|
+
const t = nt();
|
|
228
232
|
return mt() ? {
|
|
229
233
|
width: `${p().width}px`,
|
|
230
234
|
height: `${p().height}px`,
|
|
@@ -234,7 +238,7 @@ function Ke(i) {
|
|
|
234
238
|
height: "100%",
|
|
235
239
|
zoom: "1"
|
|
236
240
|
};
|
|
237
|
-
}), le =
|
|
241
|
+
}), le = g(() => {
|
|
238
242
|
const t = E()().z_index, e = Number.isFinite(t) ? Math.max(1, Math.min(99, Math.round(t))) : 1;
|
|
239
243
|
return String(e).padStart(2, "0");
|
|
240
244
|
}), _t = (t) => {
|
|
@@ -242,13 +246,13 @@ function Ke(i) {
|
|
|
242
246
|
}, bt = (t) => {
|
|
243
247
|
t.preventDefault(), t.stopPropagation(), Ot()(E()());
|
|
244
248
|
}, vt = (t) => {
|
|
245
|
-
t.preventDefault(), t.stopPropagation(), Ht()(
|
|
246
|
-
}, se =
|
|
249
|
+
t.preventDefault(), t.stopPropagation(), Ht()(u());
|
|
250
|
+
}, se = g(() => {
|
|
247
251
|
const t = {
|
|
248
|
-
"z-index":
|
|
252
|
+
"z-index": tt() || et() || Lt() ? `${st() + 1}` : `${ct()}`
|
|
249
253
|
};
|
|
250
254
|
if (b() === "projected_surface") {
|
|
251
|
-
const e =
|
|
255
|
+
const e = ot()?.rect, n = nt(), o = mt(), r = o ? e?.screenWidth ?? p().width * n : p().width, s = o ? e?.screenHeight ?? p().height * n : p().height;
|
|
252
256
|
return {
|
|
253
257
|
...t,
|
|
254
258
|
width: `${r}px`,
|
|
@@ -263,8 +267,8 @@ function Ke(i) {
|
|
|
263
267
|
height: `${p().height}px`,
|
|
264
268
|
transform: `translate(${j().x}px, ${j().y}px)`
|
|
265
269
|
};
|
|
266
|
-
}), St =
|
|
267
|
-
|
|
270
|
+
}), St = g(() => lt()?.phase === "enter");
|
|
271
|
+
Ct(() => {
|
|
268
272
|
if (!pt()) {
|
|
269
273
|
Y(), z({
|
|
270
274
|
enabled: !1,
|
|
@@ -272,8 +276,8 @@ function Ke(i) {
|
|
|
272
276
|
});
|
|
273
277
|
return;
|
|
274
278
|
}
|
|
275
|
-
const t =
|
|
276
|
-
if (t <= 1.001 ||
|
|
279
|
+
const t = nt();
|
|
280
|
+
if (t <= 1.001 || tt() || et()) {
|
|
277
281
|
Y(), z({
|
|
278
282
|
enabled: !1,
|
|
279
283
|
scale: t
|
|
@@ -287,8 +291,8 @@ function Ke(i) {
|
|
|
287
291
|
return;
|
|
288
292
|
Y();
|
|
289
293
|
const e = t;
|
|
290
|
-
|
|
291
|
-
|
|
294
|
+
C = window.setTimeout(() => {
|
|
295
|
+
C = void 0, z((n) => Math.abs(n.scale - e) < 1e-3 ? {
|
|
292
296
|
enabled: !0,
|
|
293
297
|
scale: e
|
|
294
298
|
} : n);
|
|
@@ -303,19 +307,19 @@ function Ke(i) {
|
|
|
303
307
|
}, o = {
|
|
304
308
|
x: e.startWorldX,
|
|
305
309
|
y: e.startWorldY
|
|
306
|
-
}, r = t && (Math.abs(n.x - o.x) > 1 || Math.abs(n.y - o.y) > 1), s =
|
|
307
|
-
|
|
310
|
+
}, r = t && (Math.abs(n.x - o.x) > 1 || Math.abs(n.y - o.y) > 1), s = u();
|
|
311
|
+
N()(s), r && Xt()(s, n), e.stopInteraction(), ht(), L(null), P = void 0;
|
|
308
312
|
}, kt = (t) => {
|
|
309
313
|
if (t.button !== 0 || v()) return;
|
|
310
314
|
t.preventDefault(), t.stopPropagation(), P?.stop({
|
|
311
315
|
reason: "manual_stop",
|
|
312
316
|
commit: !1
|
|
313
317
|
});
|
|
314
|
-
const e =
|
|
315
|
-
q()(e),
|
|
318
|
+
const e = u();
|
|
319
|
+
q()(e), w?.focus({
|
|
316
320
|
preventScroll: !0
|
|
317
|
-
}),
|
|
318
|
-
const n = gt("drag", "grabbing"), o =
|
|
321
|
+
}), B()(e);
|
|
322
|
+
const n = gt("drag", "grabbing"), o = Z(), r = dt();
|
|
319
323
|
L({
|
|
320
324
|
pointerId: t.pointerId,
|
|
321
325
|
startClientX: t.clientX,
|
|
@@ -357,15 +361,15 @@ function Ke(i) {
|
|
|
357
361
|
width: e.width,
|
|
358
362
|
height: e.height
|
|
359
363
|
}, o = Math.abs(e.width - e.startWidth) > 1 || Math.abs(e.height - e.startHeight) > 1;
|
|
360
|
-
t && o && Yt()(
|
|
364
|
+
t && o && Yt()(u(), n), e.stopInteraction(), K(null), x = void 0;
|
|
361
365
|
}, we = (t) => {
|
|
362
366
|
if (t.button !== 0 || v()) return;
|
|
363
367
|
t.preventDefault(), t.stopPropagation(), x?.stop({
|
|
364
368
|
reason: "manual_stop",
|
|
365
369
|
commit: !1
|
|
366
|
-
}),
|
|
367
|
-
const e = gt("resize", "nwse-resize"), n =
|
|
368
|
-
|
|
370
|
+
}), B()(u());
|
|
371
|
+
const e = gt("resize", "nwse-resize"), n = Z(), o = ut();
|
|
372
|
+
K({
|
|
369
373
|
pointerId: t.pointerId,
|
|
370
374
|
startClientX: t.clientX,
|
|
371
375
|
startClientY: t.clientY,
|
|
@@ -377,7 +381,7 @@ function Ke(i) {
|
|
|
377
381
|
stopInteraction: e
|
|
378
382
|
});
|
|
379
383
|
const r = (s) => {
|
|
380
|
-
|
|
384
|
+
K((c) => {
|
|
381
385
|
if (!c || c.pointerId !== s.pointerId) return c;
|
|
382
386
|
const d = Math.max(Xe, c.startWidth + (s.clientX - c.startClientX) / c.scale), _ = Math.max(Ye, c.startHeight + (s.clientY - c.startClientY) / c.scale);
|
|
383
387
|
return {
|
|
@@ -397,14 +401,14 @@ function Ke(i) {
|
|
|
397
401
|
});
|
|
398
402
|
};
|
|
399
403
|
return (() => {
|
|
400
|
-
var t = Ae(), e = t.firstChild, n = e.firstChild, o = n.firstChild, r = o.firstChild, s = r.nextSibling, c = s.nextSibling, d = o.nextSibling, _ = d.nextSibling, k = _.nextSibling, ge = k.firstChild, $t = ge.nextSibling, he = k.nextSibling, O = he.firstChild, H = O.nextSibling,
|
|
401
|
-
return typeof yt == "function" ? ve(yt, t) :
|
|
404
|
+
var t = Ae(), e = t.firstChild, n = e.firstChild, o = n.firstChild, r = o.firstChild, s = r.nextSibling, c = s.nextSibling, d = o.nextSibling, _ = d.nextSibling, k = _.nextSibling, ge = k.firstChild, $t = ge.nextSibling, he = k.nextSibling, O = he.firstChild, H = O.nextSibling, it = H.nextSibling, fe = n.nextSibling, yt = w;
|
|
405
|
+
return typeof yt == "function" ? ve(yt, t) : w = t, xt(t, pe({
|
|
402
406
|
get classList() {
|
|
403
407
|
return {
|
|
404
|
-
"is-selected":
|
|
405
|
-
"is-dragging":
|
|
406
|
-
"is-resizing":
|
|
407
|
-
"is-filtered-out":
|
|
408
|
+
"is-selected": M(),
|
|
409
|
+
"is-dragging": tt(),
|
|
410
|
+
"is-resizing": et(),
|
|
411
|
+
"is-filtered-out": G(),
|
|
408
412
|
"is-projected-surface": b() === "projected_surface",
|
|
409
413
|
"is-locked": v(),
|
|
410
414
|
"is-entering": St()
|
|
@@ -414,15 +418,15 @@ function Ke(i) {
|
|
|
414
418
|
[h().dialogSurfaceHostAttr]: "true"
|
|
415
419
|
}), {
|
|
416
420
|
get "data-floe-workbench-widget-id"() {
|
|
417
|
-
return
|
|
421
|
+
return u();
|
|
418
422
|
}
|
|
419
423
|
}, () => ({
|
|
420
424
|
[h().widgetRootAttr]: "true"
|
|
421
425
|
}), () => ({
|
|
422
|
-
[h().widgetIdAttr]:
|
|
426
|
+
[h().widgetIdAttr]: u()
|
|
423
427
|
}), {
|
|
424
428
|
get "data-workbench-widget-type"() {
|
|
425
|
-
return
|
|
429
|
+
return at();
|
|
426
430
|
},
|
|
427
431
|
get "data-floe-workbench-render-mode"() {
|
|
428
432
|
return b();
|
|
@@ -431,12 +435,12 @@ function Ke(i) {
|
|
|
431
435
|
return St() ? "enter" : void 0;
|
|
432
436
|
}
|
|
433
437
|
}, () => ({
|
|
434
|
-
[ye]:
|
|
438
|
+
[ye]: M() ? "true" : void 0
|
|
435
439
|
}), {
|
|
436
440
|
tabIndex: 0,
|
|
437
441
|
onPointerDown: ae,
|
|
438
442
|
onFocus: () => {
|
|
439
|
-
|
|
443
|
+
U() || q()(u());
|
|
440
444
|
},
|
|
441
445
|
onContextMenu: (l) => {
|
|
442
446
|
F(l.target) === "widget_shell" && (l.preventDefault(), l.stopPropagation(), zt()(l, E()()));
|
|
@@ -446,13 +450,13 @@ function Ke(i) {
|
|
|
446
450
|
}
|
|
447
451
|
}), !1, !0), n.$$pointerdown = kt, xt(n, {
|
|
448
452
|
[Pe]: "true"
|
|
449
|
-
}, !1, !0), r.$$click = vt, r.$$pointerdown = (l) => l.stopPropagation(), f(r, m(
|
|
453
|
+
}, !1, !0), r.$$click = vt, r.$$pointerdown = (l) => l.stopPropagation(), f(r, m(It, {
|
|
450
454
|
class: "workbench-widget__traffic-icon",
|
|
451
455
|
"aria-hidden": "true"
|
|
452
|
-
})), s.$$click = _t, s.$$pointerdown = (l) => l.stopPropagation(), f(s, m(
|
|
456
|
+
})), s.$$click = _t, s.$$pointerdown = (l) => l.stopPropagation(), f(s, m(Mt, {
|
|
453
457
|
class: "workbench-widget__traffic-icon",
|
|
454
458
|
"aria-hidden": "true"
|
|
455
|
-
})), c.$$click = bt, c.$$pointerdown = (l) => l.stopPropagation(), f(c, m(
|
|
459
|
+
})), c.$$click = bt, c.$$pointerdown = (l) => l.stopPropagation(), f(c, m(Tt, {
|
|
456
460
|
class: "workbench-widget__traffic-icon",
|
|
457
461
|
"aria-hidden": "true"
|
|
458
462
|
})), f(d, le), _.$$pointerdown = kt, f(_, m($e, {
|
|
@@ -462,28 +466,28 @@ function Ke(i) {
|
|
|
462
466
|
return m(l, {
|
|
463
467
|
class: "w-3.5 h-3.5"
|
|
464
468
|
});
|
|
465
|
-
}, $t), f($t,
|
|
469
|
+
}, $t), f($t, rt), O.$$click = _t, O.$$pointerdown = (l) => l.stopPropagation(), f(O, m(Mt, {
|
|
466
470
|
class: "workbench-widget__window-control-icon",
|
|
467
471
|
"aria-hidden": "true"
|
|
468
|
-
})), H.$$click = bt, H.$$pointerdown = (l) => l.stopPropagation(), f(H, m(
|
|
472
|
+
})), H.$$click = bt, H.$$pointerdown = (l) => l.stopPropagation(), f(H, m(Tt, {
|
|
469
473
|
class: "workbench-widget__window-control-icon",
|
|
470
474
|
"aria-hidden": "true"
|
|
471
|
-
})),
|
|
475
|
+
})), it.$$click = vt, it.$$pointerdown = (l) => l.stopPropagation(), f(it, m(It, {
|
|
472
476
|
class: "workbench-widget__window-control-icon",
|
|
473
477
|
"aria-hidden": "true"
|
|
474
478
|
})), f(fe, () => {
|
|
475
479
|
const l = V().body;
|
|
476
480
|
return m(l, {
|
|
477
481
|
get widgetId() {
|
|
478
|
-
return
|
|
482
|
+
return u();
|
|
479
483
|
},
|
|
480
484
|
get title() {
|
|
481
|
-
return
|
|
485
|
+
return rt();
|
|
482
486
|
},
|
|
483
487
|
get type() {
|
|
484
|
-
return
|
|
488
|
+
return at();
|
|
485
489
|
},
|
|
486
|
-
surfaceMetrics:
|
|
490
|
+
surfaceMetrics: ot,
|
|
487
491
|
get activation() {
|
|
488
492
|
return Gt();
|
|
489
493
|
},
|
|
@@ -491,13 +495,13 @@ function Ke(i) {
|
|
|
491
495
|
return oe();
|
|
492
496
|
},
|
|
493
497
|
get motion() {
|
|
494
|
-
return
|
|
498
|
+
return lt();
|
|
495
499
|
},
|
|
496
500
|
get selected() {
|
|
497
|
-
return
|
|
501
|
+
return M();
|
|
498
502
|
},
|
|
499
503
|
get filtered() {
|
|
500
|
-
return
|
|
504
|
+
return G();
|
|
501
505
|
},
|
|
502
506
|
requestActivate: ne
|
|
503
507
|
});
|
|
@@ -29,7 +29,7 @@ export declare function useWorkbenchModel(options: UseWorkbenchModelOptions): {
|
|
|
29
29
|
theme: import("solid-js").Accessor<"terminal" | "default" | "aurora" | "vibrancy" | "mica" | "midnight">;
|
|
30
30
|
topZIndex: import("solid-js").Accessor<number>;
|
|
31
31
|
scaleLabel: import("solid-js").Accessor<string>;
|
|
32
|
-
|
|
32
|
+
visualFrontOwnerId: import("solid-js").Accessor<string | null>;
|
|
33
33
|
widgetDefinitions: import("solid-js").Accessor<readonly WorkbenchWidgetDefinition<WorkbenchWidgetType>[]>;
|
|
34
34
|
setCanvasFrameRef: (el: HTMLDivElement | undefined) => void;
|
|
35
35
|
contextMenu: {
|
|
@@ -54,7 +54,7 @@ export declare function useWorkbenchModel(options: UseWorkbenchModelOptions): {
|
|
|
54
54
|
selectAnnotation: (annotationId: string) => void;
|
|
55
55
|
selectBackgroundLayer: (layerId: string) => void;
|
|
56
56
|
clearSelection: () => void;
|
|
57
|
-
|
|
57
|
+
claimVisualFrontOwner: (itemId: string) => void;
|
|
58
58
|
commitFront: (widgetId: string) => void;
|
|
59
59
|
commitMove: (widgetId: string, position: {
|
|
60
60
|
x: number;
|