@floegence/floe-webapp-core 0.45.0 → 0.46.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/workbench/WorkbenchFilterBar.d.ts +15 -1
- package/dist/components/workbench/WorkbenchFilterBar.js +366 -315
- package/dist/components/workbench/WorkbenchSurface.d.ts +6 -1
- package/dist/components/workbench/WorkbenchSurface.js +415 -323
- package/dist/components/workbench/index.d.ts +1 -1
- package/dist/components/workbench/workbenchDockFocusCycle.d.ts +30 -0
- package/dist/components/workbench/workbenchDockFocusCycle.js +39 -0
- package/dist/styles.css +1 -1
- package/dist/workbench.css +1 -0
- package/package.json +1 -1
|
@@ -1,579 +1,671 @@
|
|
|
1
|
-
import { use as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { clientToCanvasWorld as
|
|
4
|
-
import { createUIFirstSelection as
|
|
5
|
-
import { WorkbenchCanvas as
|
|
6
|
-
import { WorkbenchContextMenu as
|
|
7
|
-
import { WorkbenchDock as
|
|
8
|
-
import { WorkbenchHud as
|
|
9
|
-
import { WorkbenchLockButton as
|
|
10
|
-
import { installWorkbenchContextMenuDismissListeners as
|
|
11
|
-
import { createContextMenuPosition as
|
|
12
|
-
import { resolveWorkbenchWidgetPlacementPreview as
|
|
13
|
-
import { useWorkbenchModel as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { use as ct, spread as at, mergeProps as dt, insert as C, createComponent as f, Portal as st, addEventListener as ut, template as X, delegateEvents as lt } from "solid-js/web";
|
|
2
|
+
import { createSignal as I, createMemo as m, untrack as b, createEffect as h, onCleanup as W, Show as gt } from "solid-js";
|
|
3
|
+
import { clientToCanvasWorld as O } from "../ui/canvasGeometry.js";
|
|
4
|
+
import { createUIFirstSelection as wt } from "../../utils/uiFirstSelection.js";
|
|
5
|
+
import { WorkbenchCanvas as ft } from "./WorkbenchCanvas.js";
|
|
6
|
+
import { WorkbenchContextMenu as kt } from "./WorkbenchContextMenu.js";
|
|
7
|
+
import { WorkbenchDock as mt } from "./WorkbenchFilterBar.js";
|
|
8
|
+
import { WorkbenchHud as vt } from "./WorkbenchHud.js";
|
|
9
|
+
import { WorkbenchLockButton as yt } from "./WorkbenchLockButton.js";
|
|
10
|
+
import { installWorkbenchContextMenuDismissListeners as At } from "./workbenchContextMenuDismiss.js";
|
|
11
|
+
import { createContextMenuPosition as Ct, WORKBENCH_CONTEXT_MENU_WIDTH_PX as ht, estimateContextMenuHeight as bt } from "./workbenchHelpers.js";
|
|
12
|
+
import { resolveWorkbenchWidgetPlacementPreview as Wt, resolveWorkbenchToolPlacementPreview as St } from "./workbenchPlacement.js";
|
|
13
|
+
import { useWorkbenchModel as pt } from "./useWorkbenchModel.js";
|
|
14
|
+
import { sortWorkbenchDockFocusCandidates as xt, workbenchDockFocusCandidateKey as R, resolveWorkbenchDockFocusCycle as It } from "./workbenchDockFocusCycle.js";
|
|
15
|
+
import { resolveWorkbenchInteractionAdapter as Dt } from "./workbenchInteractionAdapter.js";
|
|
16
|
+
import { SURFACE_PORTAL_LAYER_ATTR as Mt, DIALOG_SURFACE_HOST_ATTR as Lt } from "../ui/dialogSurfaceScope.js";
|
|
17
|
+
var Tt = /* @__PURE__ */ X("<div class=workbench-menu-backdrop data-floe-workbench-boundary=true>"), Ft = /* @__PURE__ */ X("<div><div class=workbench-surface__body data-floe-workbench-canvas-frame=true>");
|
|
18
|
+
const Bt = "F1";
|
|
19
|
+
function N(c) {
|
|
20
|
+
if (c)
|
|
20
21
|
try {
|
|
21
|
-
|
|
22
|
+
c.focus({
|
|
22
23
|
preventScroll: !0
|
|
23
24
|
});
|
|
24
25
|
} catch {
|
|
25
|
-
|
|
26
|
+
c.focus();
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
-
const
|
|
30
|
-
state: () =>
|
|
31
|
-
setState: (
|
|
32
|
-
widgetDefinitions: () =>
|
|
33
|
-
textAnnotationDefaults: () =>
|
|
34
|
-
backgroundLayerDefaults: () =>
|
|
29
|
+
function Zt(c) {
|
|
30
|
+
const e = pt({
|
|
31
|
+
state: () => c.state(),
|
|
32
|
+
setState: (t) => c.setState(t),
|
|
33
|
+
widgetDefinitions: () => c.widgetDefinitions,
|
|
34
|
+
textAnnotationDefaults: () => c.textAnnotationDefaults,
|
|
35
|
+
backgroundLayerDefaults: () => c.backgroundLayerDefaults,
|
|
35
36
|
onClose: () => {
|
|
36
37
|
}
|
|
37
|
-
}), u =
|
|
38
|
-
committed:
|
|
38
|
+
}), u = wt({
|
|
39
|
+
committed: e.selectedWidgetId,
|
|
39
40
|
commitEqualRequests: !0,
|
|
40
|
-
commit: (
|
|
41
|
-
if (!
|
|
42
|
-
|
|
41
|
+
commit: (t, n) => {
|
|
42
|
+
if (!t) {
|
|
43
|
+
e.canvas.clearSelection();
|
|
43
44
|
return;
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
+
e.canvas.selectWidget(t), n?.bringToFront && e.canvas.commitFront(t);
|
|
46
47
|
},
|
|
47
|
-
onEvent: (
|
|
48
|
-
}),
|
|
49
|
-
if (
|
|
50
|
-
return
|
|
51
|
-
const
|
|
52
|
-
return
|
|
48
|
+
onEvent: (t) => c.onWidgetActivationEvent?.(t)
|
|
49
|
+
}), Y = () => c.widgetActivationMode === "after-paint" ? u.visual() : e.selectedWidgetId(), S = () => {
|
|
50
|
+
if (c.widgetActivationMode !== "after-paint" || !u.pending())
|
|
51
|
+
return e.selectedObject();
|
|
52
|
+
const t = u.visual();
|
|
53
|
+
return t ? {
|
|
53
54
|
kind: "widget",
|
|
54
|
-
id:
|
|
55
|
+
id: t
|
|
55
56
|
} : null;
|
|
56
|
-
},
|
|
57
|
-
if (
|
|
58
|
-
if (u.pending() && u.visual() ===
|
|
59
|
-
u.request(
|
|
57
|
+
}, q = (t) => {
|
|
58
|
+
if (c.widgetActivationMode === "after-paint") {
|
|
59
|
+
if (u.pending() && u.visual() === t) return;
|
|
60
|
+
u.request(t, {
|
|
60
61
|
bringToFront: !1
|
|
61
62
|
});
|
|
62
63
|
return;
|
|
63
64
|
}
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
if (
|
|
67
|
-
if (u.pending() && u.visual() ===
|
|
68
|
-
u.request(
|
|
65
|
+
e.canvas.selectWidget(t);
|
|
66
|
+
}, D = (t) => {
|
|
67
|
+
if (c.widgetActivationMode === "after-paint") {
|
|
68
|
+
if (u.pending() && u.visual() === t) return;
|
|
69
|
+
u.request(t, {
|
|
69
70
|
bringToFront: !0
|
|
70
71
|
});
|
|
71
72
|
return;
|
|
72
73
|
}
|
|
73
|
-
|
|
74
|
-
}, [
|
|
75
|
-
const
|
|
76
|
-
return !
|
|
77
|
-
}),
|
|
78
|
-
const
|
|
79
|
-
return n ?
|
|
80
|
-
}),
|
|
81
|
-
const
|
|
82
|
-
if (
|
|
74
|
+
e.canvas.selectWidget(t), e.canvas.commitFront(t);
|
|
75
|
+
}, [l, P] = I(null), [z, V] = I(null), d = m(() => Dt(c.interactionAdapter)), [M, w] = I(b(() => d().createInitialInputOwner())), L = m(() => {
|
|
76
|
+
const t = c.launcherWidgetTypes;
|
|
77
|
+
return !t || t.length <= 0 ? null : new Set(t);
|
|
78
|
+
}), H = m(() => {
|
|
79
|
+
const t = e.widgetDefinitions(), n = L();
|
|
80
|
+
return n ? t.filter((o) => n.has(o.type)) : t;
|
|
81
|
+
}), T = m(() => {
|
|
82
|
+
const t = e.contextMenu.state(), n = e.contextMenu.items(), o = L(), r = o ? n.filter((s) => {
|
|
83
|
+
if (s.kind !== "action")
|
|
83
84
|
return !0;
|
|
84
|
-
const
|
|
85
|
-
return
|
|
85
|
+
const A = /^add-(.+)$/.exec(String(s.id ?? ""));
|
|
86
|
+
return A ? o.has(A[1]) : !0;
|
|
86
87
|
}) : n;
|
|
87
|
-
if (!
|
|
88
|
+
if (!t || !c.resolveContextMenuItems)
|
|
88
89
|
return r;
|
|
89
|
-
const
|
|
90
|
-
return
|
|
91
|
-
menu:
|
|
90
|
+
const i = t.target?.kind === "widget" ? t.target.id : !t.target && t.widgetId ? t.widgetId : null, a = i ? e.queries.findWidgetById(i) : null;
|
|
91
|
+
return c.resolveContextMenuItems({
|
|
92
|
+
menu: t,
|
|
92
93
|
items: r,
|
|
93
|
-
widgets:
|
|
94
|
-
widget:
|
|
95
|
-
closeMenu:
|
|
94
|
+
widgets: e.widgets(),
|
|
95
|
+
widget: a,
|
|
96
|
+
closeMenu: e.contextMenu.close
|
|
96
97
|
});
|
|
97
|
-
}),
|
|
98
|
-
const
|
|
99
|
-
if (!
|
|
100
|
-
const n =
|
|
101
|
-
return
|
|
102
|
-
clientX:
|
|
103
|
-
clientY:
|
|
104
|
-
menuWidth:
|
|
105
|
-
menuHeight:
|
|
98
|
+
}), F = m(() => {
|
|
99
|
+
const t = e.contextMenu.state();
|
|
100
|
+
if (!t) return;
|
|
101
|
+
const n = T(), o = n.filter((i) => i.kind === "action").length, r = n.filter((i) => i.kind === "separator").length;
|
|
102
|
+
return Ct({
|
|
103
|
+
clientX: t.clientX,
|
|
104
|
+
clientY: t.clientY,
|
|
105
|
+
menuWidth: ht,
|
|
106
|
+
menuHeight: bt(o, r)
|
|
106
107
|
});
|
|
107
|
-
}),
|
|
108
|
-
const r =
|
|
109
|
-
if (
|
|
110
|
-
if (
|
|
111
|
-
|
|
108
|
+
}), B = (t, n, o) => {
|
|
109
|
+
const r = d(), i = r.findWidgetRoot(t), a = r.readWidgetId(i);
|
|
110
|
+
if (a) {
|
|
111
|
+
if (e.queries.findStickyNoteById(a)) {
|
|
112
|
+
w(r.createCanvasInputOwner(n === "focus" ? "background_focus" : "background_pointer"));
|
|
112
113
|
return;
|
|
113
114
|
}
|
|
114
|
-
|
|
115
|
+
w(r.createWidgetInputOwner(a, n));
|
|
115
116
|
return;
|
|
116
117
|
}
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
},
|
|
120
|
-
const n =
|
|
121
|
-
|
|
118
|
+
const s = l();
|
|
119
|
+
s && t instanceof Node && s.contains(t) && w(r.createCanvasInputOwner(o));
|
|
120
|
+
}, _ = (t = "selection_cleared") => {
|
|
121
|
+
const n = d(), o = l();
|
|
122
|
+
e.selection.clear(), w(n.createCanvasInputOwner(t)), queueMicrotask(() => {
|
|
122
123
|
if (!o || typeof document > "u") return;
|
|
123
124
|
const r = document.activeElement;
|
|
124
125
|
if (!(r instanceof HTMLElement) || !o.contains(r)) {
|
|
125
|
-
|
|
126
|
+
N(o);
|
|
126
127
|
return;
|
|
127
128
|
}
|
|
128
|
-
const
|
|
129
|
-
|
|
129
|
+
const i = n.findWidgetRoot(r);
|
|
130
|
+
N(o), i && document.activeElement === r && r.isConnected && r.blur();
|
|
130
131
|
});
|
|
131
|
-
},
|
|
132
|
-
const
|
|
132
|
+
}, v = () => {
|
|
133
|
+
const t = l()?.querySelector('[data-floe-workbench-canvas-frame="true"]'), n = e.viewport(), o = t?.getBoundingClientRect(), r = o?.width ?? 0, i = o?.height ?? 0;
|
|
133
134
|
return {
|
|
134
135
|
worldX: r > 0 ? (r / 2 - n.x) / n.scale : 240,
|
|
135
|
-
worldY:
|
|
136
|
+
worldY: i > 0 ? (i / 2 - n.y) / n.scale : 180
|
|
136
137
|
};
|
|
137
|
-
},
|
|
138
|
-
const n =
|
|
138
|
+
}, k = (t) => {
|
|
139
|
+
const n = b(d), o = b(l);
|
|
139
140
|
queueMicrotask(() => {
|
|
140
|
-
n.focusWidgetElement(o,
|
|
141
|
+
n.focusWidgetElement(o, t), w(n.createWidgetInputOwner(t, "activation"));
|
|
142
|
+
});
|
|
143
|
+
};
|
|
144
|
+
let y = null;
|
|
145
|
+
const U = (t) => `${t.kind}:${String(t.id)}`, g = (t, n) => ({
|
|
146
|
+
kind: t,
|
|
147
|
+
id: n.id,
|
|
148
|
+
x: n.x,
|
|
149
|
+
y: n.y,
|
|
150
|
+
width: n.width,
|
|
151
|
+
height: n.height,
|
|
152
|
+
createdAtUnixMs: n.created_at_unix_ms
|
|
153
|
+
}), p = (t) => t.kind === "widget" ? e.widgets().filter((n) => n.type === t.id).map((n) => g("widget", n)) : t.id === "sticky-note" ? e.stickyNotes().map((n) => g("sticky_note", n)) : t.id === "text" ? e.annotations().map((n) => g("annotation", n)) : t.id === "background-region" ? e.backgroundLayers().map((n) => g("background_layer", n)) : [], $ = (t) => {
|
|
154
|
+
const n = b(l);
|
|
155
|
+
queueMicrotask(() => {
|
|
156
|
+
if (!n) return;
|
|
157
|
+
const o = t.kind === "sticky_note" ? "sticky" : t.kind === "annotation" ? "text" : t.kind === "background_layer" ? "region" : null;
|
|
158
|
+
if (!o) return;
|
|
159
|
+
const r = [...n.querySelectorAll("[data-wb-object-id]")].find((A) => A.getAttribute("data-wb-object-kind") === o && A.getAttribute("data-wb-object-id") === t.id);
|
|
160
|
+
if (!(r instanceof HTMLElement)) return;
|
|
161
|
+
const i = r.querySelector('[data-wb-part="content"]'), s = i instanceof HTMLElement && i.getAttribute("contenteditable") !== null && i.getAttribute("contenteditable") !== "false" ? i : r;
|
|
162
|
+
s.hasAttribute("tabindex") || (s.tabIndex = -1);
|
|
163
|
+
try {
|
|
164
|
+
s.focus({
|
|
165
|
+
preventScroll: !0
|
|
166
|
+
});
|
|
167
|
+
} catch {
|
|
168
|
+
s.focus();
|
|
169
|
+
}
|
|
170
|
+
w(d().createCanvasInputOwner("background_focus"));
|
|
171
|
+
});
|
|
172
|
+
}, j = (t) => {
|
|
173
|
+
e.navigation.centerOnWidget({
|
|
174
|
+
id: t.id,
|
|
175
|
+
type: "dock-focus-target",
|
|
176
|
+
title: "",
|
|
177
|
+
x: t.x,
|
|
178
|
+
y: t.y,
|
|
179
|
+
width: t.width,
|
|
180
|
+
height: t.height,
|
|
181
|
+
z_index: 0,
|
|
182
|
+
created_at_unix_ms: t.createdAtUnixMs
|
|
183
|
+
});
|
|
184
|
+
}, K = (t) => {
|
|
185
|
+
if (t.kind === "widget") {
|
|
186
|
+
const n = e.queries.findWidgetById(t.id);
|
|
187
|
+
if (!n) return;
|
|
188
|
+
D(n.id), e.navigation.centerOnWidget(n), k(n.id);
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
t.kind === "sticky_note" ? e.canvas.selectStickyNote(t.id) : t.kind === "annotation" ? e.canvas.selectAnnotation(t.id) : e.canvas.selectBackgroundLayer(t.id), j(t), $(t);
|
|
192
|
+
}, G = (t) => {
|
|
193
|
+
const n = v();
|
|
194
|
+
if (t.kind === "widget") {
|
|
195
|
+
const o = e.widgetActions.addWidgetAtWorldCenter(t.id, n.worldX, n.worldY);
|
|
196
|
+
return o ? g("widget", o) : null;
|
|
197
|
+
}
|
|
198
|
+
return t.id === "sticky-note" ? g("sticky_note", e.widgetActions.addStickyNoteAtCursor(n.worldX, n.worldY)) : t.id === "text" ? g("annotation", e.widgetActions.addTextAnnotationAtCursor(n.worldX, n.worldY)) : t.id === "background-region" ? g("background_layer", e.widgetActions.addBackgroundLayerAtCursor(n.worldX, n.worldY)) : null;
|
|
199
|
+
}, Z = (t) => {
|
|
200
|
+
let n = p(t), o = S();
|
|
201
|
+
if (n.length === 0) {
|
|
202
|
+
const i = G(t);
|
|
203
|
+
if (!i) {
|
|
204
|
+
y = null;
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
n = p(t), o = {
|
|
208
|
+
kind: i.kind,
|
|
209
|
+
id: i.id
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
const r = It({
|
|
213
|
+
dockItemKey: U(t),
|
|
214
|
+
candidates: n,
|
|
215
|
+
selectedObject: o,
|
|
216
|
+
session: y
|
|
141
217
|
});
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
218
|
+
y = r.session, r.target && K(r.target);
|
|
219
|
+
}, J = (t) => {
|
|
220
|
+
const n = xt(p(t)), o = S(), r = o ? R(o) : null, i = r ? n.findIndex((a) => R(a) === r) : -1;
|
|
221
|
+
return {
|
|
222
|
+
count: n.length,
|
|
223
|
+
currentIndex: i >= 0 ? i : null,
|
|
224
|
+
active: i >= 0
|
|
225
|
+
};
|
|
226
|
+
}, Q = (t) => {
|
|
227
|
+
y?.dockItemKey !== `${t.kind}:${t.id}` && (y = null);
|
|
228
|
+
}, tt = (t) => {
|
|
229
|
+
const n = e.navigation.fitWidget(t);
|
|
230
|
+
k(n.id);
|
|
231
|
+
}, et = (t) => {
|
|
232
|
+
const n = e.navigation.overviewWidget(t);
|
|
233
|
+
k(n.id);
|
|
148
234
|
};
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
ensureWidget: (
|
|
152
|
-
createWidget: (
|
|
153
|
-
const o =
|
|
154
|
-
return r && n?.centerViewport !== !1 &&
|
|
155
|
-
},
|
|
156
|
-
createTextAnnotation: (
|
|
157
|
-
const n =
|
|
158
|
-
return
|
|
159
|
-
},
|
|
160
|
-
createStickyNote: (
|
|
161
|
-
const n =
|
|
162
|
-
return
|
|
163
|
-
},
|
|
164
|
-
createBackgroundLayer: (
|
|
165
|
-
const n =
|
|
166
|
-
return
|
|
167
|
-
},
|
|
168
|
-
clearSelection: () =>
|
|
169
|
-
focusWidget: (
|
|
170
|
-
const o =
|
|
171
|
-
return
|
|
172
|
-
},
|
|
173
|
-
fitWidget: (
|
|
174
|
-
const n =
|
|
175
|
-
return
|
|
176
|
-
},
|
|
177
|
-
overviewWidget: (
|
|
178
|
-
const n =
|
|
179
|
-
return
|
|
180
|
-
},
|
|
181
|
-
findWidgetByType: (
|
|
182
|
-
findWidgetById: (
|
|
183
|
-
findStickyNoteById: (
|
|
184
|
-
findAnnotationById: (
|
|
185
|
-
findBackgroundLayerById: (
|
|
186
|
-
updateWidgetTitle: (
|
|
187
|
-
const o = String(
|
|
188
|
-
!o || !r ||
|
|
189
|
-
...
|
|
190
|
-
widgets:
|
|
191
|
-
...
|
|
235
|
+
h(() => {
|
|
236
|
+
c.onApiReady?.({
|
|
237
|
+
ensureWidget: (t, n) => e.widgetActions.ensureWidget(t, n) ?? null,
|
|
238
|
+
createWidget: (t, n) => {
|
|
239
|
+
const o = v(), r = e.widgetActions.addWidgetAtWorldCenter(t, n?.worldX ?? o.worldX, n?.worldY ?? o.worldY) ?? null;
|
|
240
|
+
return r && n?.centerViewport !== !1 && e.navigation.centerOnWidget(r), r;
|
|
241
|
+
},
|
|
242
|
+
createTextAnnotation: (t) => {
|
|
243
|
+
const n = v();
|
|
244
|
+
return e.widgetActions.addTextAnnotationAtCursor(t?.worldX ?? n.worldX, t?.worldY ?? n.worldY) ?? null;
|
|
245
|
+
},
|
|
246
|
+
createStickyNote: (t) => {
|
|
247
|
+
const n = v();
|
|
248
|
+
return e.widgetActions.addStickyNoteAtCursor(t?.worldX ?? n.worldX, t?.worldY ?? n.worldY) ?? null;
|
|
249
|
+
},
|
|
250
|
+
createBackgroundLayer: (t) => {
|
|
251
|
+
const n = v();
|
|
252
|
+
return e.widgetActions.addBackgroundLayerAtCursor(t?.worldX ?? n.worldX, t?.worldY ?? n.worldY) ?? null;
|
|
253
|
+
},
|
|
254
|
+
clearSelection: () => _("selection_cleared"),
|
|
255
|
+
focusWidget: (t, n) => {
|
|
256
|
+
const o = e.navigation.focusWidget(t, n);
|
|
257
|
+
return k(o.id), o;
|
|
258
|
+
},
|
|
259
|
+
fitWidget: (t) => {
|
|
260
|
+
const n = e.navigation.fitWidget(t);
|
|
261
|
+
return k(n.id), n;
|
|
262
|
+
},
|
|
263
|
+
overviewWidget: (t) => {
|
|
264
|
+
const n = e.navigation.overviewWidget(t);
|
|
265
|
+
return k(n.id), n;
|
|
266
|
+
},
|
|
267
|
+
findWidgetByType: (t) => e.queries.findWidgetByType(t),
|
|
268
|
+
findWidgetById: (t) => e.queries.findWidgetById(t),
|
|
269
|
+
findStickyNoteById: (t) => e.queries.findStickyNoteById(t),
|
|
270
|
+
findAnnotationById: (t) => e.queries.findAnnotationById(t),
|
|
271
|
+
findBackgroundLayerById: (t) => e.queries.findBackgroundLayerById(t),
|
|
272
|
+
updateWidgetTitle: (t, n) => {
|
|
273
|
+
const o = String(t ?? "").trim(), r = String(n ?? "").trim();
|
|
274
|
+
!o || !r || c.setState((i) => ({
|
|
275
|
+
...i,
|
|
276
|
+
widgets: i.widgets.map((a) => a.id === o && a.title !== r ? {
|
|
277
|
+
...a,
|
|
192
278
|
title: r
|
|
193
|
-
} :
|
|
279
|
+
} : a)
|
|
194
280
|
}));
|
|
195
281
|
},
|
|
196
|
-
updateStickyNote: (
|
|
197
|
-
updateTextAnnotation: (
|
|
198
|
-
updateBackgroundLayer: (
|
|
199
|
-
deleteStickyNote: (
|
|
200
|
-
deleteAnnotation: (
|
|
201
|
-
deleteBackgroundLayer: (
|
|
202
|
-
}),
|
|
203
|
-
|
|
282
|
+
updateStickyNote: (t, n) => e.widgetActions.updateStickyNote(t, n),
|
|
283
|
+
updateTextAnnotation: (t, n) => e.widgetActions.updateTextAnnotation(t, n),
|
|
284
|
+
updateBackgroundLayer: (t, n) => e.widgetActions.updateBackgroundLayer(t, n),
|
|
285
|
+
deleteStickyNote: (t) => e.widgetActions.deleteStickyNote(t),
|
|
286
|
+
deleteAnnotation: (t) => e.widgetActions.deleteAnnotation(t),
|
|
287
|
+
deleteBackgroundLayer: (t) => e.widgetActions.deleteBackgroundLayer(t)
|
|
288
|
+
}), W(() => {
|
|
289
|
+
c.onApiReady?.(null);
|
|
204
290
|
});
|
|
205
291
|
});
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
if (typeof window > "u" || !
|
|
209
|
-
const
|
|
292
|
+
const E = () => c.lockShortcut === void 0 ? Bt : c.lockShortcut;
|
|
293
|
+
h(() => {
|
|
294
|
+
if (typeof window > "u" || !e.contextMenu.state()) return;
|
|
295
|
+
const t = At({
|
|
210
296
|
ownerWindow: window,
|
|
211
|
-
onDismiss:
|
|
297
|
+
onDismiss: e.contextMenu.close
|
|
212
298
|
});
|
|
213
|
-
|
|
214
|
-
}),
|
|
215
|
-
const
|
|
216
|
-
if (
|
|
217
|
-
|
|
218
|
-
}),
|
|
219
|
-
const
|
|
220
|
-
if (!
|
|
299
|
+
W(() => t());
|
|
300
|
+
}), h(() => {
|
|
301
|
+
const t = M();
|
|
302
|
+
if (t.kind !== "widget") return;
|
|
303
|
+
e.widgets().some((o) => o.id === t.widgetId) || w(d().createCanvasInputOwner("widget_removed"));
|
|
304
|
+
}), h(() => {
|
|
305
|
+
const t = l();
|
|
306
|
+
if (!t) return;
|
|
221
307
|
const n = (r) => {
|
|
222
|
-
|
|
308
|
+
B(r.target, "pointer", "background_pointer");
|
|
223
309
|
}, o = (r) => {
|
|
224
|
-
|
|
310
|
+
B(r.target, "focus", "background_focus");
|
|
225
311
|
};
|
|
226
|
-
|
|
227
|
-
|
|
312
|
+
t.addEventListener("pointerdown", n, !0), t.addEventListener("focusin", o), W(() => {
|
|
313
|
+
t.removeEventListener("pointerdown", n, !0), t.removeEventListener("focusin", o);
|
|
228
314
|
});
|
|
229
|
-
}),
|
|
230
|
-
if (
|
|
231
|
-
const
|
|
315
|
+
}), h(() => {
|
|
316
|
+
if (c.enableKeyboard === !1 || typeof document > "u") return;
|
|
317
|
+
const t = E(), n = (o) => {
|
|
232
318
|
if (!(o.defaultPrevented || o.isComposing)) {
|
|
233
|
-
if (
|
|
234
|
-
o.preventDefault(),
|
|
319
|
+
if (t !== null && o.key === t) {
|
|
320
|
+
o.preventDefault(), e.lock.toggle();
|
|
235
321
|
return;
|
|
236
322
|
}
|
|
237
|
-
if (!
|
|
238
|
-
root:
|
|
323
|
+
if (!d().shouldBypassGlobalHotkeys({
|
|
324
|
+
root: l(),
|
|
239
325
|
target: o.target,
|
|
240
|
-
owner:
|
|
241
|
-
interactiveSelector:
|
|
326
|
+
owner: M(),
|
|
327
|
+
interactiveSelector: d().interactiveSelector
|
|
242
328
|
}))
|
|
243
329
|
switch (o.key) {
|
|
244
330
|
case "ArrowUp":
|
|
245
|
-
o.preventDefault(),
|
|
331
|
+
o.preventDefault(), e.navigation.handleArrowNavigation("up");
|
|
246
332
|
break;
|
|
247
333
|
case "ArrowDown":
|
|
248
|
-
o.preventDefault(),
|
|
334
|
+
o.preventDefault(), e.navigation.handleArrowNavigation("down");
|
|
249
335
|
break;
|
|
250
336
|
case "ArrowLeft":
|
|
251
|
-
o.preventDefault(),
|
|
337
|
+
o.preventDefault(), e.navigation.handleArrowNavigation("left");
|
|
252
338
|
break;
|
|
253
339
|
case "ArrowRight":
|
|
254
|
-
o.preventDefault(),
|
|
340
|
+
o.preventDefault(), e.navigation.handleArrowNavigation("right");
|
|
255
341
|
break;
|
|
256
342
|
case "Delete":
|
|
257
343
|
case "Backspace":
|
|
258
|
-
|
|
344
|
+
e.selectedObject() && (o.preventDefault(), e.widgetActions.deleteSelected());
|
|
259
345
|
break;
|
|
260
346
|
}
|
|
261
347
|
}
|
|
262
348
|
};
|
|
263
|
-
document.addEventListener("keydown", n, !0),
|
|
349
|
+
document.addEventListener("keydown", n, !0), W(() => document.removeEventListener("keydown", n, !0));
|
|
264
350
|
});
|
|
265
|
-
const
|
|
351
|
+
const x = (t, n, o) => {
|
|
266
352
|
if (o?.worldPoint)
|
|
267
353
|
return o.worldPoint;
|
|
268
354
|
if (o?.canvasFrame)
|
|
269
|
-
return
|
|
270
|
-
clientX:
|
|
355
|
+
return O(o.canvasFrame, e.viewport(), {
|
|
356
|
+
clientX: t,
|
|
271
357
|
clientY: n
|
|
272
358
|
});
|
|
273
|
-
const r =
|
|
359
|
+
const r = l()?.querySelector('[data-floe-workbench-canvas-frame="true"]');
|
|
274
360
|
if (!r) return null;
|
|
275
|
-
const
|
|
276
|
-
return
|
|
277
|
-
clientX:
|
|
361
|
+
const i = r.getBoundingClientRect();
|
|
362
|
+
return O(i, e.viewport(), {
|
|
363
|
+
clientX: t,
|
|
278
364
|
clientY: n
|
|
279
365
|
});
|
|
280
|
-
},
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
},
|
|
284
|
-
const
|
|
285
|
-
if (
|
|
286
|
-
if (
|
|
287
|
-
|
|
366
|
+
}, nt = (t, n, o, r) => {
|
|
367
|
+
const i = x(n, o, r);
|
|
368
|
+
i && e.widgetActions.addWidgetAtWorldCenter(t, i.worldX, i.worldY);
|
|
369
|
+
}, ot = (t, n, o, r) => {
|
|
370
|
+
const i = x(n, o, r);
|
|
371
|
+
if (i) {
|
|
372
|
+
if (t === "sticky-note") {
|
|
373
|
+
e.widgetActions.addStickyNoteAtCursor(i.worldX, i.worldY);
|
|
288
374
|
return;
|
|
289
375
|
}
|
|
290
|
-
if (
|
|
291
|
-
|
|
376
|
+
if (t === "text") {
|
|
377
|
+
e.widgetActions.addTextAnnotationAtCursor(i.worldX, i.worldY);
|
|
292
378
|
return;
|
|
293
379
|
}
|
|
294
|
-
|
|
380
|
+
t === "background-region" && e.widgetActions.addBackgroundLayerAtCursor(i.worldX, i.worldY);
|
|
295
381
|
}
|
|
296
|
-
},
|
|
297
|
-
|
|
298
|
-
},
|
|
299
|
-
const
|
|
300
|
-
if (!
|
|
301
|
-
const n =
|
|
302
|
-
return n ?
|
|
303
|
-
type:
|
|
304
|
-
widgetDefinitions:
|
|
382
|
+
}, rt = (t) => {
|
|
383
|
+
t.button === 0 && (d().findWidgetRoot(t.target) || _("background_pointer"));
|
|
384
|
+
}, it = m(() => {
|
|
385
|
+
const t = z();
|
|
386
|
+
if (!t) return null;
|
|
387
|
+
const n = x(t.clientX, t.clientY, t);
|
|
388
|
+
return n ? t.kind === "widget" ? Wt({
|
|
389
|
+
type: t.id,
|
|
390
|
+
widgetDefinitions: e.widgetDefinitions(),
|
|
305
391
|
worldX: n.worldX,
|
|
306
392
|
worldY: n.worldY,
|
|
307
|
-
dropAllowed:
|
|
308
|
-
}) :
|
|
309
|
-
tool:
|
|
310
|
-
label:
|
|
393
|
+
dropAllowed: t.dropAllowed
|
|
394
|
+
}) : St({
|
|
395
|
+
tool: t.id,
|
|
396
|
+
label: t.label,
|
|
311
397
|
worldX: n.worldX,
|
|
312
398
|
worldY: n.worldY,
|
|
313
|
-
dropAllowed:
|
|
314
|
-
textDefaults:
|
|
315
|
-
backgroundDefaults:
|
|
399
|
+
dropAllowed: t.dropAllowed,
|
|
400
|
+
textDefaults: c.textAnnotationDefaults,
|
|
401
|
+
backgroundDefaults: c.backgroundLayerDefaults
|
|
316
402
|
}) : null;
|
|
317
403
|
});
|
|
318
404
|
return (() => {
|
|
319
|
-
var
|
|
320
|
-
return
|
|
405
|
+
var t = Ft(), n = t.firstChild;
|
|
406
|
+
return ct(P, t), at(t, dt({
|
|
321
407
|
get class() {
|
|
322
|
-
return `workbench-surface${
|
|
408
|
+
return `workbench-surface${c.class ? ` ${c.class}` : ""}`;
|
|
323
409
|
}
|
|
324
410
|
}, () => ({
|
|
325
|
-
[
|
|
326
|
-
[
|
|
327
|
-
[
|
|
328
|
-
[
|
|
411
|
+
[d().surfaceRootAttr]: "true",
|
|
412
|
+
[d().dialogSurfaceHostAttr]: "true",
|
|
413
|
+
[Lt]: "true",
|
|
414
|
+
[Mt]: "true"
|
|
329
415
|
}), {
|
|
330
416
|
get "data-workbench-theme"() {
|
|
331
|
-
return
|
|
417
|
+
return e.theme();
|
|
332
418
|
},
|
|
333
419
|
get "data-workbench-mode"() {
|
|
334
|
-
return
|
|
420
|
+
return e.mode();
|
|
335
421
|
},
|
|
336
422
|
tabIndex: -1
|
|
337
|
-
}), !1, !0),
|
|
423
|
+
}), !1, !0), C(n, f(ft, {
|
|
338
424
|
get widgetDefinitions() {
|
|
339
|
-
return
|
|
425
|
+
return e.widgetDefinitions();
|
|
340
426
|
},
|
|
341
427
|
get widgets() {
|
|
342
|
-
return
|
|
428
|
+
return e.widgets();
|
|
343
429
|
},
|
|
344
430
|
get stickyNotes() {
|
|
345
|
-
return
|
|
431
|
+
return e.stickyNotes();
|
|
346
432
|
},
|
|
347
433
|
get annotations() {
|
|
348
|
-
return
|
|
434
|
+
return e.annotations();
|
|
349
435
|
},
|
|
350
436
|
get backgroundLayers() {
|
|
351
|
-
return
|
|
437
|
+
return e.backgroundLayers();
|
|
352
438
|
},
|
|
353
439
|
get placementPreview() {
|
|
354
|
-
return
|
|
440
|
+
return it();
|
|
355
441
|
},
|
|
356
442
|
get viewport() {
|
|
357
|
-
return
|
|
443
|
+
return e.viewport();
|
|
358
444
|
},
|
|
359
445
|
get canvasFrameSize() {
|
|
360
|
-
return
|
|
446
|
+
return e.canvasFrameSize();
|
|
361
447
|
},
|
|
362
448
|
get selectedWidgetId() {
|
|
363
|
-
return
|
|
449
|
+
return Y();
|
|
364
450
|
},
|
|
365
451
|
get selectedObject() {
|
|
366
|
-
return
|
|
452
|
+
return S();
|
|
367
453
|
},
|
|
368
454
|
get mode() {
|
|
369
|
-
return
|
|
455
|
+
return e.mode();
|
|
370
456
|
},
|
|
371
457
|
get visualFrontOwnerId() {
|
|
372
|
-
return
|
|
458
|
+
return e.visualFrontOwnerId();
|
|
373
459
|
},
|
|
374
460
|
get locked() {
|
|
375
|
-
return
|
|
461
|
+
return e.locked();
|
|
376
462
|
},
|
|
377
463
|
get filters() {
|
|
378
|
-
return
|
|
464
|
+
return e.filters();
|
|
379
465
|
},
|
|
380
466
|
get interactionAdapter() {
|
|
381
|
-
return
|
|
467
|
+
return d();
|
|
382
468
|
},
|
|
383
469
|
get setCanvasFrameRef() {
|
|
384
|
-
return
|
|
470
|
+
return e.setCanvasFrameRef;
|
|
385
471
|
},
|
|
386
472
|
get onViewportCommit() {
|
|
387
|
-
return
|
|
473
|
+
return e.canvas.commitViewport;
|
|
388
474
|
},
|
|
389
475
|
get onViewportInteractionStart() {
|
|
390
|
-
return
|
|
476
|
+
return e.canvas.cancelViewportNavigation;
|
|
391
477
|
},
|
|
392
478
|
get onCanvasContextMenu() {
|
|
393
|
-
return
|
|
479
|
+
return e.canvas.openCanvasContextMenu;
|
|
394
480
|
},
|
|
395
|
-
onCanvasPointerDown:
|
|
396
|
-
onSelectWidget:
|
|
397
|
-
onActivateWidget:
|
|
481
|
+
onCanvasPointerDown: rt,
|
|
482
|
+
onSelectWidget: q,
|
|
483
|
+
onActivateWidget: D,
|
|
398
484
|
get onWidgetContextMenu() {
|
|
399
|
-
return
|
|
485
|
+
return e.canvas.openWidgetContextMenu;
|
|
400
486
|
},
|
|
401
487
|
get onClaimVisualFrontOwner() {
|
|
402
|
-
return
|
|
488
|
+
return e.canvas.claimVisualFrontOwner;
|
|
403
489
|
},
|
|
404
490
|
get onCommitFront() {
|
|
405
|
-
return
|
|
491
|
+
return e.canvas.commitFront;
|
|
406
492
|
},
|
|
407
493
|
get onCommitMove() {
|
|
408
|
-
return
|
|
494
|
+
return e.canvas.commitMove;
|
|
409
495
|
},
|
|
410
496
|
get onCommitResize() {
|
|
411
|
-
return
|
|
497
|
+
return e.canvas.commitResize;
|
|
412
498
|
},
|
|
413
499
|
get onSelectStickyNote() {
|
|
414
|
-
return
|
|
500
|
+
return e.canvas.selectStickyNote;
|
|
415
501
|
},
|
|
416
502
|
get onStickyNoteContextMenu() {
|
|
417
|
-
return
|
|
503
|
+
return e.canvas.openStickyNoteContextMenu;
|
|
418
504
|
},
|
|
419
505
|
get onClaimStickyVisualFrontOwner() {
|
|
420
|
-
return
|
|
506
|
+
return e.canvas.claimVisualFrontOwner;
|
|
421
507
|
},
|
|
422
508
|
get onCommitStickyFront() {
|
|
423
|
-
return
|
|
509
|
+
return e.canvas.commitStickyFront;
|
|
424
510
|
},
|
|
425
511
|
get onCommitStickyMove() {
|
|
426
|
-
return
|
|
512
|
+
return e.canvas.commitStickyMove;
|
|
427
513
|
},
|
|
428
514
|
get onCommitStickyResize() {
|
|
429
|
-
return
|
|
515
|
+
return e.canvas.commitStickyResize;
|
|
430
516
|
},
|
|
431
517
|
get onUpdateStickyNote() {
|
|
432
|
-
return
|
|
518
|
+
return e.widgetActions.updateStickyNote;
|
|
433
519
|
},
|
|
434
520
|
get onDeleteStickyNote() {
|
|
435
|
-
return
|
|
521
|
+
return e.widgetActions.deleteStickyNote;
|
|
436
522
|
},
|
|
437
523
|
get onSelectAnnotation() {
|
|
438
|
-
return
|
|
524
|
+
return e.canvas.selectAnnotation;
|
|
439
525
|
},
|
|
440
526
|
get onAnnotationContextMenu() {
|
|
441
|
-
return
|
|
527
|
+
return e.canvas.openAnnotationContextMenu;
|
|
442
528
|
},
|
|
443
529
|
get onCommitAnnotationMove() {
|
|
444
|
-
return
|
|
530
|
+
return e.canvas.commitAnnotationMove;
|
|
445
531
|
},
|
|
446
532
|
get onCommitAnnotationResize() {
|
|
447
|
-
return
|
|
533
|
+
return e.canvas.commitAnnotationResize;
|
|
448
534
|
},
|
|
449
535
|
get onUpdateTextAnnotation() {
|
|
450
|
-
return
|
|
536
|
+
return e.widgetActions.updateTextAnnotation;
|
|
451
537
|
},
|
|
452
538
|
get onDeleteAnnotation() {
|
|
453
|
-
return
|
|
539
|
+
return e.widgetActions.deleteAnnotation;
|
|
454
540
|
},
|
|
455
541
|
get onSelectBackgroundLayer() {
|
|
456
|
-
return
|
|
542
|
+
return e.canvas.selectBackgroundLayer;
|
|
457
543
|
},
|
|
458
544
|
get onBackgroundLayerContextMenu() {
|
|
459
|
-
return
|
|
545
|
+
return e.canvas.openBackgroundLayerContextMenu;
|
|
460
546
|
},
|
|
461
547
|
get onCommitBackgroundMove() {
|
|
462
|
-
return
|
|
548
|
+
return e.canvas.commitBackgroundMove;
|
|
463
549
|
},
|
|
464
550
|
get onCommitBackgroundResize() {
|
|
465
|
-
return
|
|
551
|
+
return e.canvas.commitBackgroundResize;
|
|
466
552
|
},
|
|
467
553
|
get onUpdateBackgroundLayer() {
|
|
468
|
-
return
|
|
554
|
+
return e.widgetActions.updateBackgroundLayer;
|
|
469
555
|
},
|
|
470
556
|
get onDeleteBackgroundLayer() {
|
|
471
|
-
return
|
|
557
|
+
return e.widgetActions.deleteBackgroundLayer;
|
|
472
558
|
},
|
|
473
|
-
onRequestOverview:
|
|
474
|
-
onRequestFit:
|
|
559
|
+
onRequestOverview: et,
|
|
560
|
+
onRequestFit: tt,
|
|
475
561
|
get onRequestDelete() {
|
|
476
|
-
return
|
|
562
|
+
return c.onRequestDelete ?? e.widgetActions.deleteWidget;
|
|
477
563
|
},
|
|
478
564
|
get onLayoutInteractionStart() {
|
|
479
|
-
return
|
|
565
|
+
return c.onLayoutInteractionStart;
|
|
480
566
|
},
|
|
481
567
|
get onLayoutInteractionEnd() {
|
|
482
|
-
return
|
|
568
|
+
return c.onLayoutInteractionEnd;
|
|
483
569
|
}
|
|
484
|
-
})),
|
|
570
|
+
})), C(t, f(yt, {
|
|
485
571
|
get locked() {
|
|
486
|
-
return
|
|
572
|
+
return e.locked();
|
|
487
573
|
},
|
|
488
574
|
get onToggle() {
|
|
489
|
-
return
|
|
575
|
+
return e.lock.toggle;
|
|
490
576
|
},
|
|
491
577
|
get shortcutLabel() {
|
|
492
|
-
return
|
|
578
|
+
return E() ?? void 0;
|
|
493
579
|
}
|
|
494
|
-
}), null),
|
|
580
|
+
}), null), C(t, f(mt, {
|
|
495
581
|
get widgetDefinitions() {
|
|
496
|
-
return
|
|
582
|
+
return H();
|
|
497
583
|
},
|
|
498
584
|
get widgets() {
|
|
499
|
-
return
|
|
585
|
+
return e.widgets();
|
|
500
586
|
},
|
|
501
587
|
get filters() {
|
|
502
|
-
return
|
|
588
|
+
return e.filters();
|
|
503
589
|
},
|
|
504
590
|
get mode() {
|
|
505
|
-
return
|
|
591
|
+
return e.mode();
|
|
592
|
+
},
|
|
593
|
+
get activationMode() {
|
|
594
|
+
return c.dockItemActivationMode;
|
|
506
595
|
},
|
|
507
596
|
get viewport() {
|
|
508
|
-
return
|
|
597
|
+
return e.viewport();
|
|
509
598
|
},
|
|
510
599
|
get onSoloFilter() {
|
|
511
|
-
return
|
|
600
|
+
return e.filter.solo;
|
|
512
601
|
},
|
|
602
|
+
onFocusCycleItem: Z,
|
|
603
|
+
resolveItemPresentation: J,
|
|
604
|
+
onDockActivation: Q,
|
|
513
605
|
get onSelectMode() {
|
|
514
|
-
return
|
|
606
|
+
return e.modes.setMode;
|
|
515
607
|
},
|
|
516
608
|
get onViewportCommit() {
|
|
517
|
-
return
|
|
609
|
+
return e.canvas.commitViewport;
|
|
518
610
|
},
|
|
519
|
-
onViewportInteractionStart: () =>
|
|
520
|
-
onCreateAt:
|
|
521
|
-
onCreateToolAt:
|
|
611
|
+
onViewportInteractionStart: () => e.canvas.cancelViewportNavigation(),
|
|
612
|
+
onCreateAt: nt,
|
|
613
|
+
onCreateToolAt: ot,
|
|
522
614
|
get onItemClick() {
|
|
523
|
-
return
|
|
615
|
+
return c.onDockItemClick;
|
|
524
616
|
},
|
|
525
617
|
get dockActions() {
|
|
526
|
-
return
|
|
618
|
+
return c.dockActions;
|
|
527
619
|
},
|
|
528
620
|
get dockItems() {
|
|
529
|
-
return
|
|
621
|
+
return c.dockItems;
|
|
530
622
|
},
|
|
531
623
|
get registerExternalDockDragController() {
|
|
532
|
-
return
|
|
624
|
+
return c.registerExternalDockDragController;
|
|
533
625
|
},
|
|
534
|
-
onDragPreviewChange:
|
|
535
|
-
}), null),
|
|
626
|
+
onDragPreviewChange: V
|
|
627
|
+
}), null), C(t, f(vt, {
|
|
536
628
|
get scaleLabel() {
|
|
537
|
-
return
|
|
629
|
+
return e.scaleLabel();
|
|
538
630
|
},
|
|
539
631
|
get onZoomOut() {
|
|
540
|
-
return
|
|
632
|
+
return e.hud.zoomOut;
|
|
541
633
|
},
|
|
542
634
|
get onZoomIn() {
|
|
543
|
-
return
|
|
635
|
+
return e.hud.zoomIn;
|
|
544
636
|
},
|
|
545
637
|
get activeTheme() {
|
|
546
|
-
return
|
|
638
|
+
return e.theme();
|
|
547
639
|
},
|
|
548
|
-
onSelectTheme: (o) =>
|
|
549
|
-
}), null),
|
|
640
|
+
onSelectTheme: (o) => e.appearance.setTheme(o)
|
|
641
|
+
}), null), C(t, f(gt, {
|
|
550
642
|
get when() {
|
|
551
|
-
return
|
|
643
|
+
return e.contextMenu.state();
|
|
552
644
|
},
|
|
553
645
|
get children() {
|
|
554
|
-
return
|
|
646
|
+
return f(st, {
|
|
555
647
|
get children() {
|
|
556
648
|
return [(() => {
|
|
557
|
-
var o =
|
|
558
|
-
return
|
|
559
|
-
})(),
|
|
649
|
+
var o = Tt();
|
|
650
|
+
return ut(o, "contextmenu", e.contextMenu.retarget, !0), o;
|
|
651
|
+
})(), f(kt, {
|
|
560
652
|
get x() {
|
|
561
|
-
return
|
|
653
|
+
return F()?.left ?? 0;
|
|
562
654
|
},
|
|
563
655
|
get y() {
|
|
564
|
-
return
|
|
656
|
+
return F()?.top ?? 0;
|
|
565
657
|
},
|
|
566
658
|
get items() {
|
|
567
|
-
return
|
|
659
|
+
return T();
|
|
568
660
|
}
|
|
569
661
|
})];
|
|
570
662
|
}
|
|
571
663
|
});
|
|
572
664
|
}
|
|
573
|
-
}), null),
|
|
665
|
+
}), null), t;
|
|
574
666
|
})();
|
|
575
667
|
}
|
|
576
|
-
|
|
668
|
+
lt(["contextmenu"]);
|
|
577
669
|
export {
|
|
578
|
-
|
|
670
|
+
Zt as WorkbenchSurface
|
|
579
671
|
};
|