@floegence/floe-webapp-core 0.106.1 → 0.107.1
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/chat/blocks/SvgBlock.js +1 -1
- package/dist/components/workbench/WorkbenchWidget.js +148 -148
- package/dist/components/workbench/types.d.ts +1 -1
- package/dist/diagrams/render.js +1 -1
- package/dist/node_modules/.pnpm/dompurify@3.5.1/node_modules/dompurify/dist/purify.es.js +1583 -0
- package/dist/pptx.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/workbench-composition.css +2 -1
- package/package.json +2 -2
- package/dist/node_modules/.pnpm/dompurify@3.4.17/node_modules/dompurify/dist/purify.es.js +0 -1520
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { effect as s, className as a, template as c } from "solid-js/web";
|
|
2
2
|
import "solid-js";
|
|
3
|
-
import v from "../../../node_modules/.pnpm/dompurify@3.
|
|
3
|
+
import v from "../../../node_modules/.pnpm/dompurify@3.5.1/node_modules/dompurify/dist/purify.es.js";
|
|
4
4
|
import { cn as m } from "../../../utils/cn.js";
|
|
5
5
|
var l = /* @__PURE__ */ c("<div>");
|
|
6
6
|
const S = (r) => {
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { spread as
|
|
2
|
-
import { createSignal as k, 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 { createWorkbenchEdgeAutoPanController as
|
|
9
|
-
import { resolveWorkbenchInteractionAdapter as
|
|
1
|
+
import { spread as Rt, mergeProps as ye, insert as u, createComponent as p, memo as Pe, effect as We, style as xe, setAttribute as Ce, template as dt, use as Te, delegateEvents as Ie } from "solid-js/web";
|
|
2
|
+
import { createSignal as k, createMemo as w, onCleanup as zt, untrack as v, createEffect as st, Show as Me } from "solid-js";
|
|
3
|
+
import { startHotInteraction as Ee } from "../../utils/hotInteraction.js";
|
|
4
|
+
import { X as Xt, Minus as Yt, Maximize as Dt, GripVertical as Ae } from "../icons/index.js";
|
|
5
|
+
import { CANVAS_WHEEL_INTERACTIVE_ATTR as Le, WORKBENCH_WIDGET_SHELL_ATTR as Re, resolveWorkbenchWidgetLocalTypingTarget as ze, resolveWorkbenchWidgetTextSelectionTarget as Xe, shouldActivateWorkbenchWidgetLocalTarget as Ye } from "../ui/localInteractionSurface.js";
|
|
6
|
+
import { startPointerSession as Ft } from "../ui/pointerSession.js";
|
|
7
|
+
import { createWorkbenchWidgetSurfaceMetrics as De, resolveWorkbenchProjectedSurfaceScaleBehavior as Fe } from "./workbenchHelpers.js";
|
|
8
|
+
import { createWorkbenchEdgeAutoPanController as He, WORKBENCH_EDGE_AUTO_PAN_FRAME_SELECTOR as je, frameFromElement as Oe } from "./workbenchEdgeAutoPan.js";
|
|
9
|
+
import { resolveWorkbenchInteractionAdapter as Ve } from "./workbenchInteractionAdapter.js";
|
|
10
10
|
import { createOwnerSafePropAccessor as c } from "./workbenchOwnerSafeAccessors.js";
|
|
11
|
-
import { WorkbenchWidgetHeaderContext as
|
|
12
|
-
var
|
|
13
|
-
const Ge = 220,
|
|
14
|
-
function
|
|
15
|
-
const [W, ut] = k(),
|
|
11
|
+
import { WorkbenchWidgetHeaderContext as qe } from "./WorkbenchWidgetHeader.js";
|
|
12
|
+
var Be = /* @__PURE__ */ dt("<div class=workbench-widget__header-actions data-floe-workbench-header-actions=true data-floe-canvas-interactive=true>"), Ne = /* @__PURE__ */ dt('<article class=workbench-widget data-floe-surface=floating><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__ */ dt('<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">');
|
|
13
|
+
const Ge = 220, Ke = 160, Ue = 160;
|
|
14
|
+
function so(r) {
|
|
15
|
+
const [W, ut] = k(), Ht = (t) => {
|
|
16
16
|
if (v(W)) throw new Error("A Workbench widget supports one header contribution");
|
|
17
17
|
return ut(t), () => {
|
|
18
18
|
v(W) === t && ut(void 0);
|
|
19
19
|
};
|
|
20
|
-
},
|
|
20
|
+
}, K = c(() => r.definition), g = c(() => r.widgetId), U = c(() => r.widgetTitle), wt = c(() => r.widgetType), z = c(() => r.itemSnapshot), gt = c(() => r.renderLayer), jt = c(() => r.visualFront), ht = c(() => r.motion ?? null), ft = c(() => r.topRenderLayer), Ot = c(() => r.viewport), J = c(() => r.onSelect), Vt = c(() => r.onActivate), qt = c(() => r.onContextMenu), Q = c(() => r.onClaimVisualFrontOwner), tt = c(() => r.onCommitFront), Bt = c(() => r.onCommitMove), Nt = c(() => r.onCommitResize), Zt = c(() => r.onViewportCommit), Gt = c(() => r.onViewportInteractionStart), Kt = c(() => r.onRequestOverview), Ut = c(() => r.onRequestFit), Jt = c(() => r.onRequestDelete), Qt = c(() => r.onLayoutInteractionStart), te = c(() => r.onLayoutInteractionEnd), f = w(() => Ve(r.interactionAdapter)), x = c(() => r.selected), $ = c(() => r.locked), et = c(() => r.filtered), S = c(() => r.layoutMode ?? "canvas_scaled"), ee = c(() => r.projectedViewport), oe = c(() => r.surfaceReady ?? !0), pt = c(() => ({
|
|
21
21
|
x: r.x,
|
|
22
22
|
y: r.y
|
|
23
23
|
})), mt = c(() => ({
|
|
24
24
|
width: r.width,
|
|
25
25
|
height: r.height
|
|
26
|
-
})),
|
|
26
|
+
})), ot = c(() => Math.max(r.viewportScale, 1e-3)), [C, X] = k(null), [Y, nt] = k(null), [ne, re] = k(), [rt, T] = k(!1), [_t, bt] = k(!1), [vt, D] = k({
|
|
27
27
|
enabled: !1,
|
|
28
28
|
scale: 1
|
|
29
29
|
});
|
|
30
|
-
let I, M, E, F = null,
|
|
30
|
+
let I, M, E, F = null, ie = 0, ae = 0, y = null, A;
|
|
31
31
|
const L = /* @__PURE__ */ new Map();
|
|
32
|
-
let
|
|
32
|
+
let h;
|
|
33
33
|
const H = () => {
|
|
34
34
|
typeof window > "u" || A === void 0 || (window.clearTimeout(A), A = void 0);
|
|
35
35
|
}, St = (t, e) => {
|
|
36
|
-
const n =
|
|
36
|
+
const n = Ee({
|
|
37
37
|
kind: t,
|
|
38
38
|
cursor: e
|
|
39
39
|
});
|
|
40
40
|
let o = !1;
|
|
41
|
-
return v(() =>
|
|
42
|
-
o || (o = !0, n(), v(() =>
|
|
41
|
+
return v(() => Qt()?.()), () => {
|
|
42
|
+
o || (o = !0, n(), v(() => te()?.()));
|
|
43
43
|
};
|
|
44
44
|
}, kt = () => {
|
|
45
45
|
E?.stop(), E = void 0, F = null;
|
|
46
|
-
},
|
|
47
|
-
const t =
|
|
48
|
-
!t || !e || (F = t, E?.stop(), E =
|
|
46
|
+
}, ce = () => {
|
|
47
|
+
const t = Ot(), e = Zt(), n = Gt();
|
|
48
|
+
!t || !e || (F = t, E?.stop(), E = He({
|
|
49
49
|
readFrame: () => {
|
|
50
|
-
const o =
|
|
51
|
-
return o instanceof HTMLElement ?
|
|
50
|
+
const o = h?.closest(je);
|
|
51
|
+
return o instanceof HTMLElement ? Oe(o) : null;
|
|
52
52
|
},
|
|
53
53
|
readViewport: () => F ?? t,
|
|
54
54
|
commitViewport: (o) => {
|
|
@@ -68,7 +68,7 @@ function lo(r) {
|
|
|
68
68
|
shouldPan: () => C() !== null
|
|
69
69
|
}));
|
|
70
70
|
};
|
|
71
|
-
|
|
71
|
+
zt(() => {
|
|
72
72
|
kt(), I?.stop({
|
|
73
73
|
reason: "manual_stop",
|
|
74
74
|
commit: !1
|
|
@@ -78,76 +78,76 @@ function lo(r) {
|
|
|
78
78
|
}), M = void 0, v(C)?.stopInteraction(), v(Y)?.stopInteraction(), H();
|
|
79
79
|
});
|
|
80
80
|
const j = () => {
|
|
81
|
-
const t =
|
|
81
|
+
const t = g(), e = Vt();
|
|
82
82
|
if (e) {
|
|
83
83
|
T(!0), bt(!0), e(t);
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
|
-
T(!1),
|
|
87
|
-
},
|
|
86
|
+
T(!1), J()(t), tt()(t);
|
|
87
|
+
}, le = () => {
|
|
88
88
|
if (gt() >= ft()) {
|
|
89
|
-
|
|
89
|
+
Q()(g());
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
|
-
|
|
93
|
-
},
|
|
92
|
+
tt()(g());
|
|
93
|
+
}, it = () => {
|
|
94
94
|
T(!1);
|
|
95
|
-
}, R =
|
|
95
|
+
}, R = w(() => x() || rt());
|
|
96
96
|
st(() => {
|
|
97
97
|
!_t() || !x() || (bt(!1), T(!1));
|
|
98
98
|
});
|
|
99
|
-
const
|
|
99
|
+
const se = (t, e, n) => {
|
|
100
100
|
const o = {
|
|
101
|
-
token: ++
|
|
101
|
+
token: ++ae,
|
|
102
102
|
wasSelected: e,
|
|
103
103
|
ownership: n
|
|
104
104
|
};
|
|
105
105
|
L.set(t, o), !e && n === "widget_local" && T(!0), queueMicrotask(() => {
|
|
106
106
|
L.get(t)?.token === o.token && L.delete(t);
|
|
107
107
|
});
|
|
108
|
-
},
|
|
108
|
+
}, de = (t) => {
|
|
109
109
|
const e = L.get(t) ?? null;
|
|
110
110
|
return e && L.delete(t), e;
|
|
111
111
|
};
|
|
112
112
|
st(() => {
|
|
113
|
-
const t =
|
|
113
|
+
const t = h;
|
|
114
114
|
if (!t) return;
|
|
115
115
|
const e = (i) => {
|
|
116
|
-
i.button === 0 &&
|
|
116
|
+
i.button === 0 && se(i.pointerId, R(), q(i.target));
|
|
117
117
|
}, n = (i) => {
|
|
118
118
|
if (i.button === 0 && q(i.target) === "widget_local") {
|
|
119
|
-
if (
|
|
119
|
+
if (rt()) {
|
|
120
120
|
j();
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
|
-
x() &&
|
|
123
|
+
x() && le();
|
|
124
124
|
}
|
|
125
125
|
}, o = () => {
|
|
126
126
|
setTimeout(() => {
|
|
127
|
-
x() ||
|
|
127
|
+
x() || it();
|
|
128
128
|
}, 0);
|
|
129
129
|
};
|
|
130
|
-
t.addEventListener("pointerdown", e, !0), t.addEventListener("click", n, !0), t.addEventListener("pointerup", o), t.addEventListener("pointercancel",
|
|
131
|
-
t.removeEventListener("pointerdown", e, !0), t.removeEventListener("click", n, !0), t.removeEventListener("pointerup", o), t.removeEventListener("pointercancel",
|
|
130
|
+
t.addEventListener("pointerdown", e, !0), t.addEventListener("click", n, !0), t.addEventListener("pointerup", o), t.addEventListener("pointercancel", it), zt(() => {
|
|
131
|
+
t.removeEventListener("pointerdown", e, !0), t.removeEventListener("click", n, !0), t.removeEventListener("pointerup", o), t.removeEventListener("pointercancel", it);
|
|
132
132
|
});
|
|
133
133
|
});
|
|
134
|
-
const O = () => C() !== null, V = () => Y() !== null,
|
|
134
|
+
const O = () => C() !== null, V = () => Y() !== null, ue = w(() => et() ? "cold" : R() ? "hot" : $() ? "cold" : "warm"), q = (t) => f().resolveWidgetEventOwnership({
|
|
135
135
|
target: t,
|
|
136
|
-
widgetRoot:
|
|
136
|
+
widgetRoot: h ?? null,
|
|
137
137
|
interactiveSelector: f().interactiveSelector,
|
|
138
138
|
panSurfaceSelector: f().panSurfaceSelector
|
|
139
|
-
}),
|
|
140
|
-
j(), t?.focus !== !1 &&
|
|
139
|
+
}), we = (t) => {
|
|
140
|
+
j(), t?.focus !== !1 && h?.focus({
|
|
141
141
|
preventScroll: !0
|
|
142
142
|
});
|
|
143
143
|
}, $t = (t) => {
|
|
144
|
-
|
|
144
|
+
re((e) => ({
|
|
145
145
|
seq: (e?.seq ?? 0) + 1,
|
|
146
146
|
source: "local_pointer",
|
|
147
147
|
pointerType: t
|
|
148
148
|
}));
|
|
149
|
-
},
|
|
150
|
-
if (!(!
|
|
149
|
+
}, ge = (t) => {
|
|
150
|
+
if (!(!h || !t.isConnected || !h.contains(t)))
|
|
151
151
|
try {
|
|
152
152
|
t.focus({
|
|
153
153
|
preventScroll: !0
|
|
@@ -155,9 +155,9 @@ function lo(r) {
|
|
|
155
155
|
} catch {
|
|
156
156
|
t.focus();
|
|
157
157
|
}
|
|
158
|
-
},
|
|
158
|
+
}, he = (t, e) => {
|
|
159
159
|
y = {
|
|
160
|
-
token: ++
|
|
160
|
+
token: ++ie,
|
|
161
161
|
pointerId: t,
|
|
162
162
|
target: e,
|
|
163
163
|
timestamp: Date.now()
|
|
@@ -165,7 +165,7 @@ function lo(r) {
|
|
|
165
165
|
const n = y;
|
|
166
166
|
queueMicrotask(() => {
|
|
167
167
|
const o = () => {
|
|
168
|
-
!n || y?.token !== n.token || (
|
|
168
|
+
!n || y?.token !== n.token || (ge(n.target), y = null);
|
|
169
169
|
};
|
|
170
170
|
if (typeof requestAnimationFrame == "function") {
|
|
171
171
|
requestAnimationFrame(() => o());
|
|
@@ -173,33 +173,33 @@ function lo(r) {
|
|
|
173
173
|
}
|
|
174
174
|
o();
|
|
175
175
|
});
|
|
176
|
-
},
|
|
176
|
+
}, fe = (t) => {
|
|
177
177
|
if (t.button !== 0 || $()) return;
|
|
178
|
-
const e =
|
|
178
|
+
const e = de(t.pointerId), n = e?.wasSelected ?? x(), o = e?.ownership ?? q(t.target), i = o === "widget_local" ? ze({
|
|
179
179
|
target: t.target,
|
|
180
|
-
widgetRoot:
|
|
180
|
+
widgetRoot: h ?? null,
|
|
181
181
|
interactiveSelector: f().interactiveSelector,
|
|
182
182
|
panSurfaceSelector: f().panSurfaceSelector
|
|
183
|
-
}) : null, s = o === "widget_local" ?
|
|
183
|
+
}) : null, s = o === "widget_local" ? Xe({
|
|
184
184
|
target: t.target,
|
|
185
|
-
widgetRoot:
|
|
185
|
+
widgetRoot: h ?? null,
|
|
186
186
|
interactiveSelector: f().interactiveSelector,
|
|
187
187
|
panSurfaceSelector: f().panSurfaceSelector
|
|
188
|
-
}) : null, l = o === "widget_local" && !i && !s &&
|
|
188
|
+
}) : null, l = o === "widget_local" && !i && !s && Ye({
|
|
189
189
|
target: t.target,
|
|
190
|
-
widgetRoot:
|
|
190
|
+
widgetRoot: h ?? null,
|
|
191
191
|
interactiveSelector: f().interactiveSelector,
|
|
192
192
|
panSurfaceSelector: f().panSurfaceSelector
|
|
193
193
|
});
|
|
194
194
|
if (o === "widget_shell") {
|
|
195
|
-
j(),
|
|
195
|
+
j(), h?.focus({
|
|
196
196
|
preventScroll: !0
|
|
197
197
|
});
|
|
198
198
|
return;
|
|
199
199
|
}
|
|
200
200
|
if (o === "widget_local") {
|
|
201
201
|
if (i) {
|
|
202
|
-
n ||
|
|
202
|
+
n || he(t.pointerId, i);
|
|
203
203
|
return;
|
|
204
204
|
}
|
|
205
205
|
if (s) {
|
|
@@ -214,35 +214,35 @@ function lo(r) {
|
|
|
214
214
|
j(), $t(t.pointerType || void 0);
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
}, B =
|
|
217
|
+
}, B = w(() => {
|
|
218
218
|
const t = C();
|
|
219
219
|
return t ? {
|
|
220
220
|
x: t.worldX,
|
|
221
221
|
y: t.worldY
|
|
222
222
|
} : pt();
|
|
223
|
-
}), m =
|
|
223
|
+
}), m = w(() => {
|
|
224
224
|
const t = Y();
|
|
225
225
|
return t ? {
|
|
226
226
|
width: t.width,
|
|
227
227
|
height: t.height
|
|
228
228
|
} : mt();
|
|
229
|
-
}),
|
|
230
|
-
const t =
|
|
229
|
+
}), at = w(() => {
|
|
230
|
+
const t = ee();
|
|
231
231
|
if (!(S() !== "projected_surface" || !t))
|
|
232
|
-
return
|
|
233
|
-
widgetId:
|
|
232
|
+
return De({
|
|
233
|
+
widgetId: g(),
|
|
234
234
|
worldX: B().x,
|
|
235
235
|
worldY: B().y,
|
|
236
236
|
worldWidth: m().width,
|
|
237
237
|
worldHeight: m().height,
|
|
238
238
|
viewport: t(),
|
|
239
|
-
ready:
|
|
239
|
+
ready: oe()
|
|
240
240
|
});
|
|
241
|
-
}),
|
|
241
|
+
}), N = w(() => at()?.rect.viewportScale ?? ot()), yt = w(() => Fe(K())), Pt = w(() => S() === "projected_surface" && yt() === "settle_sharp_zoom"), Wt = w(() => S() === "projected_surface" && (yt() === "compact_zoom" && N() < 1 || Pt() && vt().enabled && vt().scale > 1.001)), pe = w(() => {
|
|
242
242
|
if (S() !== "projected_surface")
|
|
243
243
|
return;
|
|
244
|
-
const t =
|
|
245
|
-
return
|
|
244
|
+
const t = N();
|
|
245
|
+
return Wt() ? {
|
|
246
246
|
width: `${m().width}px`,
|
|
247
247
|
height: `${m().height}px`,
|
|
248
248
|
zoom: `${t}`
|
|
@@ -251,21 +251,21 @@ function lo(r) {
|
|
|
251
251
|
height: "100%",
|
|
252
252
|
zoom: "1"
|
|
253
253
|
};
|
|
254
|
-
}),
|
|
254
|
+
}), me = w(() => {
|
|
255
255
|
const t = z()().z_index, e = Number.isFinite(t) ? Math.max(1, Math.min(99, Math.round(t))) : 1;
|
|
256
256
|
return String(e).padStart(2, "0");
|
|
257
|
-
}),
|
|
258
|
-
t.preventDefault(), t.stopPropagation(), Zt()(z()());
|
|
259
|
-
}, xt = (t) => {
|
|
257
|
+
}), xt = (t) => {
|
|
260
258
|
t.preventDefault(), t.stopPropagation(), Kt()(z()());
|
|
261
259
|
}, Ct = (t) => {
|
|
262
|
-
t.preventDefault(), t.stopPropagation(), Ut()(
|
|
263
|
-
},
|
|
260
|
+
t.preventDefault(), t.stopPropagation(), Ut()(z()());
|
|
261
|
+
}, Tt = (t) => {
|
|
262
|
+
t.preventDefault(), t.stopPropagation(), Jt()(g());
|
|
263
|
+
}, _e = w(() => {
|
|
264
264
|
const t = {
|
|
265
|
-
"z-index": O() || V() ||
|
|
265
|
+
"z-index": O() || V() || jt() ? `${ft() + 1}` : `${gt()}`
|
|
266
266
|
};
|
|
267
267
|
if (S() === "projected_surface") {
|
|
268
|
-
const e =
|
|
268
|
+
const e = at()?.rect, n = N(), o = Wt(), i = o ? e?.screenWidth ?? m().width * n : m().width, s = o ? e?.screenHeight ?? m().height * n : m().height;
|
|
269
269
|
return {
|
|
270
270
|
...t,
|
|
271
271
|
width: `${i}px`,
|
|
@@ -280,16 +280,16 @@ function lo(r) {
|
|
|
280
280
|
height: `${m().height}px`,
|
|
281
281
|
transform: `translate(${B().x}px, ${B().y}px)`
|
|
282
282
|
};
|
|
283
|
-
}),
|
|
283
|
+
}), It = w(() => ht()?.phase === "enter");
|
|
284
284
|
st(() => {
|
|
285
|
-
if (!
|
|
285
|
+
if (!Pt()) {
|
|
286
286
|
H(), D({
|
|
287
287
|
enabled: !1,
|
|
288
288
|
scale: 1
|
|
289
289
|
});
|
|
290
290
|
return;
|
|
291
291
|
}
|
|
292
|
-
const t =
|
|
292
|
+
const t = N();
|
|
293
293
|
if (t <= 1.001 || O() || V()) {
|
|
294
294
|
H(), D({
|
|
295
295
|
enabled: !1,
|
|
@@ -309,9 +309,9 @@ function lo(r) {
|
|
|
309
309
|
enabled: !0,
|
|
310
310
|
scale: e
|
|
311
311
|
} : n);
|
|
312
|
-
},
|
|
312
|
+
}, Ue);
|
|
313
313
|
});
|
|
314
|
-
const
|
|
314
|
+
const be = (t) => {
|
|
315
315
|
const e = v(C);
|
|
316
316
|
if (!e) return;
|
|
317
317
|
const n = {
|
|
@@ -320,19 +320,19 @@ function lo(r) {
|
|
|
320
320
|
}, o = {
|
|
321
321
|
x: e.startWorldX,
|
|
322
322
|
y: e.startWorldY
|
|
323
|
-
}, i = t && (Math.abs(n.x - o.x) > 1 || Math.abs(n.y - o.y) > 1), s =
|
|
324
|
-
|
|
325
|
-
},
|
|
323
|
+
}, i = t && (Math.abs(n.x - o.x) > 1 || Math.abs(n.y - o.y) > 1), s = g();
|
|
324
|
+
tt()(s), i && Bt()(s, n), e.stopInteraction(), kt(), X(null), I = void 0;
|
|
325
|
+
}, Mt = (t) => {
|
|
326
326
|
if (t.button !== 0 || $()) return;
|
|
327
327
|
t.preventDefault(), t.stopPropagation(), I?.stop({
|
|
328
328
|
reason: "manual_stop",
|
|
329
329
|
commit: !1
|
|
330
330
|
});
|
|
331
|
-
const e =
|
|
332
|
-
|
|
331
|
+
const e = g();
|
|
332
|
+
J()(e), h?.focus({
|
|
333
333
|
preventScroll: !0
|
|
334
|
-
}),
|
|
335
|
-
const n = St("drag", "grabbing"), o =
|
|
334
|
+
}), Q()(e);
|
|
335
|
+
const n = St("drag", "grabbing"), o = ot(), i = pt();
|
|
336
336
|
X({
|
|
337
337
|
pointerId: t.pointerId,
|
|
338
338
|
startClientX: t.clientX,
|
|
@@ -346,7 +346,7 @@ function lo(r) {
|
|
|
346
346
|
moved: !1,
|
|
347
347
|
scale: o,
|
|
348
348
|
stopInteraction: n
|
|
349
|
-
}),
|
|
349
|
+
}), ce();
|
|
350
350
|
const s = (l) => {
|
|
351
351
|
E?.updatePointer(l.clientX, l.clientY), X((d) => {
|
|
352
352
|
if (!d || d.pointerId !== l.pointerId) return d;
|
|
@@ -359,30 +359,30 @@ function lo(r) {
|
|
|
359
359
|
};
|
|
360
360
|
});
|
|
361
361
|
};
|
|
362
|
-
I =
|
|
362
|
+
I = Ft({
|
|
363
363
|
pointerEvent: t,
|
|
364
364
|
captureEl: t.currentTarget,
|
|
365
365
|
onMove: s,
|
|
366
366
|
onEnd: ({
|
|
367
367
|
commit: l
|
|
368
|
-
}) =>
|
|
368
|
+
}) => be(l)
|
|
369
369
|
});
|
|
370
|
-
},
|
|
370
|
+
}, ve = (t) => {
|
|
371
371
|
const e = v(Y);
|
|
372
372
|
if (!e) return;
|
|
373
373
|
const n = {
|
|
374
374
|
width: e.width,
|
|
375
375
|
height: e.height
|
|
376
376
|
}, o = Math.abs(e.width - e.startWidth) > 1 || Math.abs(e.height - e.startHeight) > 1;
|
|
377
|
-
t && o &&
|
|
378
|
-
},
|
|
377
|
+
t && o && Nt()(g(), n), e.stopInteraction(), nt(null), M = void 0;
|
|
378
|
+
}, Se = (t) => {
|
|
379
379
|
if (t.button !== 0 || $()) return;
|
|
380
380
|
t.preventDefault(), t.stopPropagation(), M?.stop({
|
|
381
381
|
reason: "manual_stop",
|
|
382
382
|
commit: !1
|
|
383
|
-
}),
|
|
384
|
-
const e = St("resize", "nwse-resize"), n =
|
|
385
|
-
|
|
383
|
+
}), Q()(g());
|
|
384
|
+
const e = St("resize", "nwse-resize"), n = ot(), o = mt();
|
|
385
|
+
nt({
|
|
386
386
|
pointerId: t.pointerId,
|
|
387
387
|
startClientX: t.clientX,
|
|
388
388
|
startClientY: t.clientY,
|
|
@@ -394,9 +394,9 @@ function lo(r) {
|
|
|
394
394
|
stopInteraction: e
|
|
395
395
|
});
|
|
396
396
|
const i = (s) => {
|
|
397
|
-
|
|
397
|
+
nt((l) => {
|
|
398
398
|
if (!l || l.pointerId !== s.pointerId) return l;
|
|
399
|
-
const d = Math.max(Ge, l.startWidth + (s.clientX - l.startClientX) / l.scale), _ = Math.max(
|
|
399
|
+
const d = Math.max(Ge, l.startWidth + (s.clientX - l.startClientX) / l.scale), _ = Math.max(Ke, l.startHeight + (s.clientY - l.startClientY) / l.scale);
|
|
400
400
|
return {
|
|
401
401
|
...l,
|
|
402
402
|
width: d,
|
|
@@ -404,18 +404,18 @@ function lo(r) {
|
|
|
404
404
|
};
|
|
405
405
|
});
|
|
406
406
|
};
|
|
407
|
-
M =
|
|
407
|
+
M = Ft({
|
|
408
408
|
pointerEvent: t,
|
|
409
409
|
captureEl: t.currentTarget,
|
|
410
410
|
onMove: i,
|
|
411
411
|
onEnd: ({
|
|
412
412
|
commit: s
|
|
413
|
-
}) =>
|
|
413
|
+
}) => ve(s)
|
|
414
414
|
});
|
|
415
415
|
};
|
|
416
416
|
return (() => {
|
|
417
|
-
var t =
|
|
418
|
-
return typeof
|
|
417
|
+
var t = Ne(), e = t.firstChild, n = e.firstChild, o = n.firstChild, i = o.firstChild, s = i.nextSibling, l = s.nextSibling, d = o.nextSibling, _ = d.nextSibling, P = _.nextSibling, ke = P.firstChild, ct = ke.nextSibling, Et = P.nextSibling, Z = Et.firstChild, G = Z.nextSibling, lt = G.nextSibling, $e = n.nextSibling, At = h;
|
|
418
|
+
return typeof At == "function" ? Te(At, t) : h = t, Rt(t, ye({
|
|
419
419
|
get "data-floe-surface-interacting"() {
|
|
420
420
|
return O() || V() ? "true" : void 0;
|
|
421
421
|
},
|
|
@@ -424,22 +424,22 @@ function lo(r) {
|
|
|
424
424
|
"is-selected": R(),
|
|
425
425
|
"is-dragging": O(),
|
|
426
426
|
"is-resizing": V(),
|
|
427
|
-
"is-filtered-out":
|
|
427
|
+
"is-filtered-out": et(),
|
|
428
428
|
"is-projected-surface": S() === "projected_surface",
|
|
429
429
|
"is-locked": $(),
|
|
430
|
-
"is-entering":
|
|
430
|
+
"is-entering": It()
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
433
|
}, () => ({
|
|
434
434
|
[f().dialogSurfaceHostAttr]: "true"
|
|
435
435
|
}), {
|
|
436
436
|
get "data-floe-workbench-widget-id"() {
|
|
437
|
-
return
|
|
437
|
+
return g();
|
|
438
438
|
}
|
|
439
439
|
}, () => ({
|
|
440
440
|
[f().widgetRootAttr]: "true"
|
|
441
441
|
}), () => ({
|
|
442
|
-
[f().widgetIdAttr]:
|
|
442
|
+
[f().widgetIdAttr]: g()
|
|
443
443
|
}), {
|
|
444
444
|
get "data-workbench-widget-type"() {
|
|
445
445
|
return wt();
|
|
@@ -448,78 +448,78 @@ function lo(r) {
|
|
|
448
448
|
return S();
|
|
449
449
|
},
|
|
450
450
|
get "data-workbench-widget-motion"() {
|
|
451
|
-
return
|
|
451
|
+
return It() ? "enter" : void 0;
|
|
452
452
|
}
|
|
453
453
|
}, () => ({
|
|
454
|
-
[
|
|
454
|
+
[Le]: R() ? "true" : void 0
|
|
455
455
|
}), {
|
|
456
456
|
tabIndex: 0,
|
|
457
|
-
onPointerDown:
|
|
457
|
+
onPointerDown: fe,
|
|
458
458
|
onFocus: () => {
|
|
459
|
-
|
|
459
|
+
rt() || _t() || J()(g());
|
|
460
460
|
},
|
|
461
461
|
onContextMenu: (a) => {
|
|
462
|
-
q(a.target) === "widget_shell" && (a.preventDefault(), a.stopPropagation(),
|
|
462
|
+
q(a.target) === "widget_shell" && (a.preventDefault(), a.stopPropagation(), qt()(a, z()()));
|
|
463
463
|
},
|
|
464
464
|
get style() {
|
|
465
|
-
return
|
|
465
|
+
return _e();
|
|
466
466
|
}
|
|
467
|
-
}), !1, !0), n.$$pointerdown =
|
|
468
|
-
[
|
|
469
|
-
}, !1, !0), i.$$click =
|
|
467
|
+
}), !1, !0), n.$$pointerdown = Mt, Rt(n, {
|
|
468
|
+
[Re]: "true"
|
|
469
|
+
}, !1, !0), i.$$click = Tt, i.$$pointerdown = (a) => a.stopPropagation(), u(i, p(Xt, {
|
|
470
470
|
class: "workbench-widget__traffic-icon",
|
|
471
471
|
"aria-hidden": "true"
|
|
472
|
-
})), s.$$click =
|
|
472
|
+
})), s.$$click = xt, s.$$pointerdown = (a) => a.stopPropagation(), u(s, p(Yt, {
|
|
473
473
|
class: "workbench-widget__traffic-icon",
|
|
474
474
|
"aria-hidden": "true"
|
|
475
|
-
})), l.$$click =
|
|
475
|
+
})), l.$$click = Ct, l.$$pointerdown = (a) => a.stopPropagation(), u(l, p(Dt, {
|
|
476
476
|
class: "workbench-widget__traffic-icon",
|
|
477
477
|
"aria-hidden": "true"
|
|
478
|
-
})), u(d,
|
|
478
|
+
})), u(d, me), _.$$pointerdown = Mt, u(_, p(Ae, {
|
|
479
479
|
class: "w-3.5 h-3.5"
|
|
480
480
|
})), u(P, () => {
|
|
481
|
-
const a =
|
|
481
|
+
const a = K().icon;
|
|
482
482
|
return p(a, {
|
|
483
483
|
class: "w-3.5 h-3.5"
|
|
484
484
|
});
|
|
485
|
-
}, ct), u(ct,
|
|
485
|
+
}, ct), u(ct, U), u(n, p(Me, {
|
|
486
486
|
get when() {
|
|
487
487
|
return W()?.actions;
|
|
488
488
|
},
|
|
489
489
|
get children() {
|
|
490
|
-
var a =
|
|
490
|
+
var a = Be();
|
|
491
491
|
return a.$$dblclick = (b) => b.stopPropagation(), a.$$pointerdown = (b) => b.stopPropagation(), u(a, () => W()?.actions), a;
|
|
492
492
|
}
|
|
493
|
-
}),
|
|
493
|
+
}), Et), Z.$$click = xt, Z.$$pointerdown = (a) => a.stopPropagation(), u(Z, p(Yt, {
|
|
494
494
|
class: "workbench-widget__window-control-icon",
|
|
495
495
|
"aria-hidden": "true"
|
|
496
|
-
})), G.$$click =
|
|
496
|
+
})), G.$$click = Ct, G.$$pointerdown = (a) => a.stopPropagation(), u(G, p(Dt, {
|
|
497
497
|
class: "workbench-widget__window-control-icon",
|
|
498
498
|
"aria-hidden": "true"
|
|
499
|
-
})), lt.$$click =
|
|
499
|
+
})), lt.$$click = Tt, lt.$$pointerdown = (a) => a.stopPropagation(), u(lt, p(Xt, {
|
|
500
500
|
class: "workbench-widget__window-control-icon",
|
|
501
501
|
"aria-hidden": "true"
|
|
502
|
-
})), u(
|
|
503
|
-
value:
|
|
502
|
+
})), u($e, p(qe.Provider, {
|
|
503
|
+
value: Ht,
|
|
504
504
|
get children() {
|
|
505
505
|
return (() => {
|
|
506
|
-
const a =
|
|
506
|
+
const a = K().body;
|
|
507
507
|
return p(a, {
|
|
508
508
|
get widgetId() {
|
|
509
|
-
return
|
|
509
|
+
return g();
|
|
510
510
|
},
|
|
511
511
|
get title() {
|
|
512
|
-
return
|
|
512
|
+
return U();
|
|
513
513
|
},
|
|
514
514
|
get type() {
|
|
515
515
|
return wt();
|
|
516
516
|
},
|
|
517
|
-
surfaceMetrics:
|
|
517
|
+
surfaceMetrics: at,
|
|
518
518
|
get activation() {
|
|
519
|
-
return
|
|
519
|
+
return ne();
|
|
520
520
|
},
|
|
521
521
|
get lifecycle() {
|
|
522
|
-
return
|
|
522
|
+
return ue();
|
|
523
523
|
},
|
|
524
524
|
get motion() {
|
|
525
525
|
return ht();
|
|
@@ -528,28 +528,28 @@ function lo(r) {
|
|
|
528
528
|
return R();
|
|
529
529
|
},
|
|
530
530
|
get filtered() {
|
|
531
|
-
return
|
|
531
|
+
return et();
|
|
532
532
|
},
|
|
533
|
-
requestActivate:
|
|
533
|
+
requestActivate: we
|
|
534
534
|
});
|
|
535
535
|
})();
|
|
536
536
|
}
|
|
537
537
|
})), u(e, (() => {
|
|
538
|
-
var a =
|
|
538
|
+
var a = Pe(() => !!$());
|
|
539
539
|
return () => a() ? null : (() => {
|
|
540
|
-
var b =
|
|
541
|
-
return b.$$pointerdown =
|
|
540
|
+
var b = Ze();
|
|
541
|
+
return b.$$pointerdown = Se, b;
|
|
542
542
|
})();
|
|
543
|
-
})(), null),
|
|
544
|
-
var b =
|
|
545
|
-
return a.e =
|
|
543
|
+
})(), null), We((a) => {
|
|
544
|
+
var b = pe(), Lt = W()?.titleTooltip || U();
|
|
545
|
+
return a.e = xe(e, b, a.e), Lt !== a.t && Ce(ct, "title", a.t = Lt), a;
|
|
546
546
|
}, {
|
|
547
547
|
e: void 0,
|
|
548
548
|
t: void 0
|
|
549
549
|
}), t;
|
|
550
550
|
})();
|
|
551
551
|
}
|
|
552
|
-
|
|
552
|
+
Ie(["pointerdown", "click", "dblclick"]);
|
|
553
553
|
export {
|
|
554
|
-
|
|
554
|
+
so as WorkbenchWidget
|
|
555
555
|
};
|