@floegence/floe-webapp-core 0.36.25 → 0.36.27
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/ui/SurfaceFloatingLayer.d.ts +22 -0
- package/dist/components/ui/SurfaceFloatingLayer.js +48 -0
- package/dist/components/ui/dialogSurfaceScope.js +40 -37
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/workbench/WorkbenchWidget.js +159 -161
- package/dist/full.js +191 -189
- package/dist/ui.js +41 -39
- package/package.json +1 -1
|
@@ -1,77 +1,86 @@
|
|
|
1
|
-
import { spread as
|
|
2
|
-
import { createMemo as
|
|
3
|
-
import { startHotInteraction as
|
|
4
|
-
import { X as
|
|
5
|
-
import { CANVAS_WHEEL_INTERACTIVE_ATTR as
|
|
6
|
-
import { startPointerSession as
|
|
7
|
-
import { createWorkbenchWidgetSurfaceMetrics as
|
|
8
|
-
import { resolveWorkbenchInteractionAdapter as
|
|
9
|
-
var
|
|
10
|
-
const At = 220,
|
|
11
|
-
function
|
|
12
|
-
const s =
|
|
13
|
-
let m, _,
|
|
14
|
-
const
|
|
1
|
+
import { spread as G, mergeProps as kt, insert as l, createComponent as w, memo as $t, template as et, use as yt, delegateEvents as pt } from "solid-js/web";
|
|
2
|
+
import { createMemo as g, createSignal as T, onCleanup as K, untrack as f, createEffect as It } from "solid-js";
|
|
3
|
+
import { startHotInteraction as xt } from "../../utils/hotInteraction.js";
|
|
4
|
+
import { X as U, Minus as J, Maximize as Q, GripVertical as Mt } from "../icons/index.js";
|
|
5
|
+
import { CANVAS_WHEEL_INTERACTIVE_ATTR as Ct, WORKBENCH_WIDGET_SHELL_ATTR as Tt, resolveWorkbenchWidgetLocalTypingTarget as Wt, shouldActivateWorkbenchWidgetLocalTarget as Lt } from "../ui/localInteractionSurface.js";
|
|
6
|
+
import { startPointerSession as tt } from "../ui/pointerSession.js";
|
|
7
|
+
import { createWorkbenchWidgetSurfaceMetrics as Pt } from "./workbenchHelpers.js";
|
|
8
|
+
import { resolveWorkbenchInteractionAdapter as zt } from "./workbenchInteractionAdapter.js";
|
|
9
|
+
var Et = /* @__PURE__ */ et('<article class=workbench-widget><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>'), Rt = /* @__PURE__ */ et('<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">');
|
|
10
|
+
const At = 220, Dt = 160;
|
|
11
|
+
function Nt(e) {
|
|
12
|
+
const s = g(() => zt(e.interactionAdapter)), [k, W] = T(null), [$, L] = T(null), [it, nt] = T(), [P, z] = T(!1);
|
|
13
|
+
let m, _, ot = 0, rt = 0, b = null;
|
|
14
|
+
const v = /* @__PURE__ */ new Map();
|
|
15
15
|
let d;
|
|
16
|
-
const
|
|
17
|
-
const
|
|
16
|
+
const D = (t, i) => {
|
|
17
|
+
const a = xt({
|
|
18
18
|
kind: t,
|
|
19
19
|
cursor: i
|
|
20
20
|
});
|
|
21
|
-
let
|
|
21
|
+
let n = !1;
|
|
22
22
|
return f(() => e.onLayoutInteractionStart?.()), () => {
|
|
23
|
-
|
|
23
|
+
n || (n = !0, a(), f(() => e.onLayoutInteractionEnd?.()));
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
K(() => {
|
|
27
27
|
m?.stop({
|
|
28
28
|
reason: "manual_stop",
|
|
29
29
|
commit: !1
|
|
30
30
|
}), m = void 0, _?.stop({
|
|
31
31
|
reason: "manual_stop",
|
|
32
32
|
commit: !1
|
|
33
|
-
}), _ = void 0, f(
|
|
33
|
+
}), _ = void 0, f(k)?.stopInteraction(), f($)?.stopInteraction();
|
|
34
34
|
});
|
|
35
|
-
const
|
|
36
|
-
e.onSelect(e.widgetId), e.onCommitFront(e.widgetId);
|
|
37
|
-
},
|
|
35
|
+
const y = () => {
|
|
36
|
+
z(!1), e.onSelect(e.widgetId), e.onCommitFront(e.widgetId);
|
|
37
|
+
}, E = () => {
|
|
38
|
+
z(!1);
|
|
39
|
+
}, S = g(() => e.selected || P()), at = (t, i, a) => {
|
|
38
40
|
const n = {
|
|
39
|
-
token: ++
|
|
40
|
-
wasSelected: i
|
|
41
|
+
token: ++rt,
|
|
42
|
+
wasSelected: i,
|
|
43
|
+
ownership: a
|
|
41
44
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
})
|
|
45
|
-
},
|
|
46
|
-
const i =
|
|
47
|
-
return i &&
|
|
45
|
+
v.set(t, n), !i && a === "widget_local" && z(!0), queueMicrotask(() => {
|
|
46
|
+
v.get(t)?.token === n.token && v.delete(t);
|
|
47
|
+
});
|
|
48
|
+
}, ct = (t) => {
|
|
49
|
+
const i = v.get(t) ?? null;
|
|
50
|
+
return i && v.delete(t), i;
|
|
48
51
|
};
|
|
49
|
-
|
|
52
|
+
It(() => {
|
|
50
53
|
const t = d;
|
|
51
54
|
if (!t) return;
|
|
52
|
-
const i = (
|
|
53
|
-
|
|
55
|
+
const i = (o) => {
|
|
56
|
+
o.button === 0 && at(o.pointerId, S(), p(o.target));
|
|
57
|
+
}, a = (o) => {
|
|
58
|
+
o.button === 0 && P() && p(o.target) === "widget_local" && y();
|
|
59
|
+
}, n = () => {
|
|
60
|
+
setTimeout(() => {
|
|
61
|
+
e.selected || E();
|
|
62
|
+
}, 0);
|
|
54
63
|
};
|
|
55
|
-
t.addEventListener("pointerdown", i, !0),
|
|
56
|
-
t.removeEventListener("pointerdown", i, !0);
|
|
64
|
+
t.addEventListener("pointerdown", i, !0), t.addEventListener("click", a, !0), t.addEventListener("pointerup", n), t.addEventListener("pointercancel", E), K(() => {
|
|
65
|
+
t.removeEventListener("pointerdown", i, !0), t.removeEventListener("click", a, !0), t.removeEventListener("pointerup", n), t.removeEventListener("pointercancel", E);
|
|
57
66
|
});
|
|
58
67
|
});
|
|
59
|
-
const
|
|
68
|
+
const X = () => k() !== null, Y = () => $() !== null, lt = g(() => e.filtered ? "cold" : S() ? "hot" : "warm"), p = (t) => s().resolveWidgetEventOwnership({
|
|
60
69
|
target: t,
|
|
61
70
|
widgetRoot: d ?? null,
|
|
62
71
|
interactiveSelector: s().interactiveSelector,
|
|
63
72
|
panSurfaceSelector: s().panSurfaceSelector
|
|
64
|
-
}),
|
|
65
|
-
|
|
73
|
+
}), dt = () => {
|
|
74
|
+
y(), d?.focus({
|
|
66
75
|
preventScroll: !0
|
|
67
76
|
});
|
|
68
|
-
},
|
|
69
|
-
|
|
77
|
+
}, F = (t) => {
|
|
78
|
+
nt((i) => ({
|
|
70
79
|
seq: (i?.seq ?? 0) + 1,
|
|
71
80
|
source: "local_pointer",
|
|
72
81
|
pointerType: t
|
|
73
82
|
}));
|
|
74
|
-
},
|
|
83
|
+
}, st = (t) => {
|
|
75
84
|
if (!(!d || !t.isConnected || !d.contains(t)))
|
|
76
85
|
try {
|
|
77
86
|
t.focus({
|
|
@@ -80,69 +89,58 @@ function Bt(e) {
|
|
|
80
89
|
} catch {
|
|
81
90
|
t.focus();
|
|
82
91
|
}
|
|
83
|
-
},
|
|
92
|
+
}, wt = (t, i) => {
|
|
84
93
|
b = {
|
|
85
|
-
token: ++
|
|
86
|
-
pointerId: t,
|
|
87
|
-
pointerType: i,
|
|
88
|
-
timestamp: Date.now()
|
|
89
|
-
};
|
|
90
|
-
const n = b;
|
|
91
|
-
queueMicrotask(() => {
|
|
92
|
-
!n || b?.token !== n.token || (E(n.pointerType), b = null);
|
|
93
|
-
});
|
|
94
|
-
}, dt = (t, i) => {
|
|
95
|
-
v = {
|
|
96
|
-
token: ++R,
|
|
94
|
+
token: ++ot,
|
|
97
95
|
pointerId: t,
|
|
98
96
|
target: i,
|
|
99
97
|
timestamp: Date.now()
|
|
100
98
|
};
|
|
101
|
-
const
|
|
99
|
+
const a = b;
|
|
102
100
|
queueMicrotask(() => {
|
|
103
|
-
const
|
|
104
|
-
!
|
|
101
|
+
const n = () => {
|
|
102
|
+
!a || b?.token !== a.token || (st(a.target), b = null);
|
|
105
103
|
};
|
|
106
104
|
if (typeof requestAnimationFrame == "function") {
|
|
107
|
-
requestAnimationFrame(() =>
|
|
105
|
+
requestAnimationFrame(() => n());
|
|
108
106
|
return;
|
|
109
107
|
}
|
|
110
|
-
|
|
108
|
+
n();
|
|
111
109
|
});
|
|
112
|
-
},
|
|
110
|
+
}, ut = (t) => {
|
|
113
111
|
if (t.button !== 0) return;
|
|
114
|
-
const i =
|
|
112
|
+
const i = ct(t.pointerId), a = i?.wasSelected ?? e.selected, n = i?.ownership ?? p(t.target), o = n === "widget_local" ? Wt({
|
|
115
113
|
target: t.target,
|
|
116
114
|
widgetRoot: d ?? null,
|
|
117
115
|
interactiveSelector: s().interactiveSelector,
|
|
118
116
|
panSurfaceSelector: s().panSurfaceSelector
|
|
119
|
-
}) : null,
|
|
117
|
+
}) : null, r = n === "widget_local" && !o && Lt({
|
|
120
118
|
target: t.target,
|
|
121
119
|
widgetRoot: d ?? null,
|
|
122
120
|
interactiveSelector: s().interactiveSelector,
|
|
123
121
|
panSurfaceSelector: s().panSurfaceSelector
|
|
124
122
|
});
|
|
125
|
-
if (
|
|
126
|
-
d?.focus({
|
|
123
|
+
if (n === "widget_shell") {
|
|
124
|
+
y(), d?.focus({
|
|
127
125
|
preventScroll: !0
|
|
128
126
|
});
|
|
129
127
|
return;
|
|
130
128
|
}
|
|
131
|
-
if (
|
|
132
|
-
if (
|
|
133
|
-
|
|
129
|
+
if (n === "widget_local") {
|
|
130
|
+
if (o) {
|
|
131
|
+
a || wt(t.pointerId, o);
|
|
134
132
|
return;
|
|
135
133
|
}
|
|
136
|
-
if (
|
|
137
|
-
if (
|
|
138
|
-
|
|
134
|
+
if (r) {
|
|
135
|
+
if (b = null, a) {
|
|
136
|
+
F(t.pointerType || void 0);
|
|
139
137
|
return;
|
|
140
138
|
}
|
|
141
|
-
|
|
139
|
+
y(), F(t.pointerType || void 0);
|
|
142
140
|
}
|
|
143
141
|
}
|
|
144
|
-
},
|
|
145
|
-
const t =
|
|
142
|
+
}, I = g(() => {
|
|
143
|
+
const t = k();
|
|
146
144
|
return t ? {
|
|
147
145
|
x: t.worldX,
|
|
148
146
|
y: t.worldY
|
|
@@ -150,7 +148,7 @@ function Bt(e) {
|
|
|
150
148
|
x: e.x,
|
|
151
149
|
y: e.y
|
|
152
150
|
};
|
|
153
|
-
}),
|
|
151
|
+
}), x = g(() => {
|
|
154
152
|
const t = $();
|
|
155
153
|
return t ? {
|
|
156
154
|
width: t.width,
|
|
@@ -159,34 +157,34 @@ function Bt(e) {
|
|
|
159
157
|
width: e.width,
|
|
160
158
|
height: e.height
|
|
161
159
|
};
|
|
162
|
-
}),
|
|
160
|
+
}), H = g(() => {
|
|
163
161
|
if (!(e.layoutMode !== "projected_surface" || !e.projectedViewport))
|
|
164
|
-
return
|
|
162
|
+
return Pt({
|
|
165
163
|
widgetId: e.widgetId,
|
|
166
|
-
worldX:
|
|
167
|
-
worldY:
|
|
168
|
-
worldWidth:
|
|
169
|
-
worldHeight:
|
|
164
|
+
worldX: I().x,
|
|
165
|
+
worldY: I().y,
|
|
166
|
+
worldWidth: x().width,
|
|
167
|
+
worldHeight: x().height,
|
|
170
168
|
viewport: e.projectedViewport(),
|
|
171
169
|
ready: e.surfaceReady ?? !0
|
|
172
170
|
});
|
|
173
|
-
}),
|
|
171
|
+
}), gt = g(() => {
|
|
174
172
|
const t = e.itemSnapshot().z_index, i = Number.isFinite(t) ? Math.max(1, Math.min(99, Math.round(t))) : 1;
|
|
175
173
|
return String(i).padStart(2, "0");
|
|
176
|
-
}),
|
|
174
|
+
}), O = (t) => {
|
|
177
175
|
t.preventDefault(), t.stopPropagation(), e.onRequestOverview(e.itemSnapshot());
|
|
178
|
-
},
|
|
176
|
+
}, q = (t) => {
|
|
179
177
|
t.preventDefault(), t.stopPropagation(), e.onRequestFit(e.itemSnapshot());
|
|
180
|
-
},
|
|
178
|
+
}, j = (t) => {
|
|
181
179
|
t.preventDefault(), t.stopPropagation(), e.onRequestDelete(e.widgetId);
|
|
182
|
-
},
|
|
180
|
+
}, ht = g(() => {
|
|
183
181
|
const t = {
|
|
184
|
-
width: `${
|
|
185
|
-
height: `${
|
|
186
|
-
"z-index":
|
|
182
|
+
width: `${x().width}px`,
|
|
183
|
+
height: `${x().height}px`,
|
|
184
|
+
"z-index": X() || Y() || e.optimisticFront ? `${e.topRenderLayer + 1}` : `${e.renderLayer}`
|
|
187
185
|
};
|
|
188
186
|
if (e.layoutMode === "projected_surface") {
|
|
189
|
-
const i =
|
|
187
|
+
const i = H()?.rect;
|
|
190
188
|
return {
|
|
191
189
|
...t,
|
|
192
190
|
transform: `translate3d(${i?.screenX ?? 0}px, ${i?.screenY ?? 0}px, 0) scale(${i?.viewportScale ?? Math.max(e.viewportScale, 1e-3)})`
|
|
@@ -194,20 +192,20 @@ function Bt(e) {
|
|
|
194
192
|
}
|
|
195
193
|
return {
|
|
196
194
|
...t,
|
|
197
|
-
transform: `translate(${
|
|
195
|
+
transform: `translate(${I().x}px, ${I().y}px)`
|
|
198
196
|
};
|
|
199
|
-
}),
|
|
200
|
-
const i = f(
|
|
197
|
+
}), ft = (t) => {
|
|
198
|
+
const i = f(k);
|
|
201
199
|
if (!i) return;
|
|
202
|
-
const
|
|
200
|
+
const a = {
|
|
203
201
|
x: i.worldX,
|
|
204
202
|
y: i.worldY
|
|
205
|
-
},
|
|
203
|
+
}, n = {
|
|
206
204
|
x: i.startWorldX,
|
|
207
205
|
y: i.startWorldY
|
|
208
|
-
},
|
|
209
|
-
e.onCommitFront(e.widgetId),
|
|
210
|
-
},
|
|
206
|
+
}, o = t && (Math.abs(a.x - n.x) > 1 || Math.abs(a.y - n.y) > 1);
|
|
207
|
+
e.onCommitFront(e.widgetId), o && e.onCommitMove(e.widgetId, a), i.stopInteraction(), W(null), m = void 0;
|
|
208
|
+
}, B = (t) => {
|
|
211
209
|
if (t.button !== 0 || e.locked) return;
|
|
212
210
|
t.preventDefault(), t.stopPropagation(), m?.stop({
|
|
213
211
|
reason: "manual_stop",
|
|
@@ -215,8 +213,8 @@ function Bt(e) {
|
|
|
215
213
|
}), e.onSelect(e.widgetId), d?.focus({
|
|
216
214
|
preventScroll: !0
|
|
217
215
|
}), e.onStartOptimisticFront(e.widgetId);
|
|
218
|
-
const i =
|
|
219
|
-
|
|
216
|
+
const i = D("drag", "grabbing"), a = Math.max(e.viewportScale, 1e-3);
|
|
217
|
+
W({
|
|
220
218
|
pointerId: t.pointerId,
|
|
221
219
|
startClientX: t.clientX,
|
|
222
220
|
startClientY: t.clientY,
|
|
@@ -225,45 +223,45 @@ function Bt(e) {
|
|
|
225
223
|
worldX: e.x,
|
|
226
224
|
worldY: e.y,
|
|
227
225
|
moved: !1,
|
|
228
|
-
scale:
|
|
226
|
+
scale: a,
|
|
229
227
|
stopInteraction: i
|
|
230
228
|
});
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
if (!
|
|
234
|
-
const
|
|
229
|
+
const n = (o) => {
|
|
230
|
+
W((r) => {
|
|
231
|
+
if (!r || r.pointerId !== o.pointerId) return r;
|
|
232
|
+
const h = r.startWorldX + (o.clientX - r.startClientX) / r.scale, u = r.startWorldY + (o.clientY - r.startClientY) / r.scale;
|
|
235
233
|
return {
|
|
236
|
-
...
|
|
237
|
-
worldX:
|
|
234
|
+
...r,
|
|
235
|
+
worldX: h,
|
|
238
236
|
worldY: u,
|
|
239
|
-
moved:
|
|
237
|
+
moved: r.moved || Math.abs(h - r.startWorldX) > 2 || Math.abs(u - r.startWorldY) > 2
|
|
240
238
|
};
|
|
241
239
|
});
|
|
242
240
|
};
|
|
243
|
-
m =
|
|
241
|
+
m = tt({
|
|
244
242
|
pointerEvent: t,
|
|
245
243
|
captureEl: t.currentTarget,
|
|
246
|
-
onMove:
|
|
244
|
+
onMove: n,
|
|
247
245
|
onEnd: ({
|
|
248
|
-
commit:
|
|
249
|
-
}) =>
|
|
246
|
+
commit: o
|
|
247
|
+
}) => ft(o)
|
|
250
248
|
});
|
|
251
|
-
},
|
|
249
|
+
}, mt = (t) => {
|
|
252
250
|
const i = f($);
|
|
253
251
|
if (!i) return;
|
|
254
|
-
const
|
|
252
|
+
const a = {
|
|
255
253
|
width: i.width,
|
|
256
254
|
height: i.height
|
|
257
|
-
},
|
|
258
|
-
t &&
|
|
259
|
-
},
|
|
255
|
+
}, n = Math.abs(i.width - i.startWidth) > 1 || Math.abs(i.height - i.startHeight) > 1;
|
|
256
|
+
t && n && e.onCommitResize(e.widgetId, a), i.stopInteraction(), L(null), _ = void 0;
|
|
257
|
+
}, _t = (t) => {
|
|
260
258
|
if (t.button !== 0 || e.locked) return;
|
|
261
259
|
t.preventDefault(), t.stopPropagation(), _?.stop({
|
|
262
260
|
reason: "manual_stop",
|
|
263
261
|
commit: !1
|
|
264
262
|
}), e.onStartOptimisticFront(e.widgetId);
|
|
265
|
-
const i =
|
|
266
|
-
|
|
263
|
+
const i = D("resize", "nwse-resize"), a = Math.max(e.viewportScale, 1e-3);
|
|
264
|
+
L({
|
|
267
265
|
pointerId: t.pointerId,
|
|
268
266
|
startClientX: t.clientX,
|
|
269
267
|
startClientY: t.clientY,
|
|
@@ -271,37 +269,37 @@ function Bt(e) {
|
|
|
271
269
|
startHeight: e.height,
|
|
272
270
|
width: e.width,
|
|
273
271
|
height: e.height,
|
|
274
|
-
scale:
|
|
272
|
+
scale: a,
|
|
275
273
|
stopInteraction: i
|
|
276
274
|
});
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
if (!
|
|
280
|
-
const
|
|
275
|
+
const n = (o) => {
|
|
276
|
+
L((r) => {
|
|
277
|
+
if (!r || r.pointerId !== o.pointerId) return r;
|
|
278
|
+
const h = Math.max(At, r.startWidth + (o.clientX - r.startClientX) / r.scale), u = Math.max(Dt, r.startHeight + (o.clientY - r.startClientY) / r.scale);
|
|
281
279
|
return {
|
|
282
|
-
...
|
|
283
|
-
width:
|
|
280
|
+
...r,
|
|
281
|
+
width: h,
|
|
284
282
|
height: u
|
|
285
283
|
};
|
|
286
284
|
});
|
|
287
285
|
};
|
|
288
|
-
_ =
|
|
286
|
+
_ = tt({
|
|
289
287
|
pointerEvent: t,
|
|
290
288
|
captureEl: t.currentTarget,
|
|
291
|
-
onMove:
|
|
289
|
+
onMove: n,
|
|
292
290
|
onEnd: ({
|
|
293
|
-
commit:
|
|
294
|
-
}) =>
|
|
291
|
+
commit: o
|
|
292
|
+
}) => mt(o)
|
|
295
293
|
});
|
|
296
294
|
};
|
|
297
295
|
return (() => {
|
|
298
|
-
var t =
|
|
299
|
-
return typeof
|
|
296
|
+
var t = Et(), i = t.firstChild, a = i.firstChild, n = a.firstChild, o = n.nextSibling, r = o.nextSibling, h = a.nextSibling, u = h.nextSibling, R = u.nextSibling, bt = R.firstChild, N = bt.nextSibling, vt = R.nextSibling, M = vt.firstChild, C = M.nextSibling, A = C.nextSibling, St = i.nextSibling, V = d;
|
|
297
|
+
return typeof V == "function" ? yt(V, t) : d = t, G(t, kt({
|
|
300
298
|
get classList() {
|
|
301
299
|
return {
|
|
302
|
-
"is-selected":
|
|
303
|
-
"is-dragging":
|
|
304
|
-
"is-resizing":
|
|
300
|
+
"is-selected": S(),
|
|
301
|
+
"is-dragging": X(),
|
|
302
|
+
"is-resizing": Y(),
|
|
305
303
|
"is-filtered-out": e.filtered,
|
|
306
304
|
"is-projected-surface": e.layoutMode === "projected_surface",
|
|
307
305
|
"is-locked": e.locked
|
|
@@ -325,47 +323,47 @@ function Bt(e) {
|
|
|
325
323
|
return e.layoutMode ?? "canvas_scaled";
|
|
326
324
|
}
|
|
327
325
|
}, () => ({
|
|
328
|
-
[
|
|
326
|
+
[Ct]: S() ? "true" : void 0
|
|
329
327
|
}), {
|
|
330
328
|
tabIndex: 0,
|
|
331
|
-
onPointerDown:
|
|
329
|
+
onPointerDown: ut,
|
|
332
330
|
onFocus: () => {
|
|
333
|
-
e.onSelect(e.widgetId);
|
|
331
|
+
P() || e.onSelect(e.widgetId);
|
|
334
332
|
},
|
|
335
333
|
onContextMenu: (c) => {
|
|
336
|
-
|
|
334
|
+
p(c.target) === "widget_shell" && (c.preventDefault(), c.stopPropagation(), e.onContextMenu(c, e.itemSnapshot()));
|
|
337
335
|
},
|
|
338
336
|
get style() {
|
|
339
|
-
return
|
|
337
|
+
return ht();
|
|
340
338
|
}
|
|
341
|
-
}), !1, !0), i.$$pointerdown =
|
|
342
|
-
[
|
|
343
|
-
}, !1, !0),
|
|
339
|
+
}), !1, !0), i.$$pointerdown = B, G(i, {
|
|
340
|
+
[Tt]: "true"
|
|
341
|
+
}, !1, !0), n.$$click = j, n.$$pointerdown = (c) => c.stopPropagation(), l(n, w(U, {
|
|
344
342
|
class: "workbench-widget__traffic-icon",
|
|
345
343
|
"aria-hidden": "true"
|
|
346
|
-
})),
|
|
344
|
+
})), o.$$click = O, o.$$pointerdown = (c) => c.stopPropagation(), l(o, w(J, {
|
|
347
345
|
class: "workbench-widget__traffic-icon",
|
|
348
346
|
"aria-hidden": "true"
|
|
349
|
-
})),
|
|
347
|
+
})), r.$$click = q, r.$$pointerdown = (c) => c.stopPropagation(), l(r, w(Q, {
|
|
350
348
|
class: "workbench-widget__traffic-icon",
|
|
351
349
|
"aria-hidden": "true"
|
|
352
|
-
})), l(
|
|
350
|
+
})), l(h, gt), u.$$pointerdown = B, l(u, w(Mt, {
|
|
353
351
|
class: "w-3.5 h-3.5"
|
|
354
|
-
})), l(
|
|
352
|
+
})), l(R, () => {
|
|
355
353
|
const c = e.definition.icon;
|
|
356
354
|
return w(c, {
|
|
357
355
|
class: "w-3.5 h-3.5"
|
|
358
356
|
});
|
|
359
|
-
},
|
|
357
|
+
}, N), l(N, () => e.widgetTitle), M.$$click = O, M.$$pointerdown = (c) => c.stopPropagation(), l(M, w(J, {
|
|
360
358
|
class: "workbench-widget__window-control-icon",
|
|
361
359
|
"aria-hidden": "true"
|
|
362
|
-
})),
|
|
360
|
+
})), C.$$click = q, C.$$pointerdown = (c) => c.stopPropagation(), l(C, w(Q, {
|
|
363
361
|
class: "workbench-widget__window-control-icon",
|
|
364
362
|
"aria-hidden": "true"
|
|
365
|
-
})),
|
|
363
|
+
})), A.$$click = j, A.$$pointerdown = (c) => c.stopPropagation(), l(A, w(U, {
|
|
366
364
|
class: "workbench-widget__window-control-icon",
|
|
367
365
|
"aria-hidden": "true"
|
|
368
|
-
})), l(
|
|
366
|
+
})), l(St, () => {
|
|
369
367
|
const c = e.definition.body;
|
|
370
368
|
return w(c, {
|
|
371
369
|
get widgetId() {
|
|
@@ -377,31 +375,31 @@ function Bt(e) {
|
|
|
377
375
|
get type() {
|
|
378
376
|
return e.widgetType;
|
|
379
377
|
},
|
|
380
|
-
surfaceMetrics:
|
|
378
|
+
surfaceMetrics: H,
|
|
381
379
|
get activation() {
|
|
382
|
-
return
|
|
380
|
+
return it();
|
|
383
381
|
},
|
|
384
382
|
get lifecycle() {
|
|
385
|
-
return
|
|
383
|
+
return lt();
|
|
386
384
|
},
|
|
387
385
|
get selected() {
|
|
388
|
-
return
|
|
386
|
+
return S();
|
|
389
387
|
},
|
|
390
388
|
get filtered() {
|
|
391
389
|
return e.filtered;
|
|
392
390
|
},
|
|
393
|
-
requestActivate:
|
|
391
|
+
requestActivate: dt
|
|
394
392
|
});
|
|
395
393
|
}), l(t, (() => {
|
|
396
|
-
var c =
|
|
394
|
+
var c = $t(() => !!e.locked);
|
|
397
395
|
return () => c() ? null : (() => {
|
|
398
|
-
var
|
|
399
|
-
return
|
|
396
|
+
var Z = Rt();
|
|
397
|
+
return Z.$$pointerdown = _t, Z;
|
|
400
398
|
})();
|
|
401
399
|
})(), null), t;
|
|
402
400
|
})();
|
|
403
401
|
}
|
|
404
|
-
|
|
402
|
+
pt(["pointerdown", "click"]);
|
|
405
403
|
export {
|
|
406
|
-
|
|
404
|
+
Nt as WorkbenchWidget
|
|
407
405
|
};
|