@floegence/floe-webapp-core 0.36.48 → 0.36.49
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/WorkbenchContextMenu.d.ts +6 -1
- package/dist/components/workbench/WorkbenchContextMenu.js +31 -25
- package/dist/components/workbench/WorkbenchSurface.js +177 -177
- package/dist/components/workbench/index.d.ts +1 -1
- package/dist/components/workbench/useWorkbenchModel.d.ts +2 -2
- package/dist/components/workbench/useWorkbenchModel.js +247 -220
- package/dist/components/workbench/workbenchHelpers.d.ts +12 -0
- package/dist/components/workbench/workbenchHelpers.js +68 -48
- package/dist/workbench.js +23 -22
- package/package.json +1 -1
|
@@ -1,43 +1,44 @@
|
|
|
1
|
-
import { createSignal as et, createMemo as u, onCleanup as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { createSignal as et, createMemo as u, onCleanup as Oe } from "solid-js";
|
|
2
|
+
import { clientToCanvasWorld as Ce } from "../ui/canvasGeometry.js";
|
|
3
|
+
import { ArrowUp as xt, Copy as M, Trash as j, MessageSquare as bt, Region as St, TextTool as Te } from "../icons/index.js";
|
|
4
|
+
import { WORKBENCH_STICKY_FILTER_ID as Ne } from "./types.js";
|
|
5
|
+
import { WORKBENCH_DEFAULT_STICKY_NOTE_COLOR as Ae, WORKBENCH_DEFAULT_TEXT_COLOR as Ie, WORKBENCH_DEFAULT_TEXT_FONT as Wt, WORKBENCH_BACKGROUND_MATERIALS as It, WORKBENCH_REGION_FILL_OPTIONS as Le, WORKBENCH_STICKY_NOTE_COLORS as De, WORKBENCH_DEFAULT_BACKGROUND_MATERIAL as pe, WORKBENCH_DEFAULT_REGION_FILL as Me } from "./workbenchOptions.js";
|
|
6
|
+
import { resolveWorkbenchModeStrategy as Ot, createContextMenuPosition as je, createWorkbenchWidgetFrame as Fe, createWorkbenchId as S, createWorkbenchViewportCenteredOnWidget as Ct, findNearestWidget as Re, sanitizeFilters as ze, WORKBENCH_CONTEXT_MENU_WIDTH_PX as Be, estimateContextMenuHeight as Xe, clampScale as Ee, WORKBENCH_MAX_SCALE as Ye, WORKBENCH_CANVAS_ZOOM_STEP as Tt, normalizeWorkbenchInteractionMode as He, createWorkbenchViewportAtScale as Ke, WORKBENCH_WORK_MIN_SCALE as Ve, createWorkbenchViewportFitForWidget as Ue } from "./workbenchHelpers.js";
|
|
7
|
+
import { resolveWorkbenchWidgetDefinitions as Pe, getWidgetEntry as qe } from "./widgets/widgetRegistry.js";
|
|
8
|
+
function Lt(o, d) {
|
|
9
|
+
const s = o.findIndex((a) => a === d);
|
|
9
10
|
return o[(s + 1) % o.length] ?? o[0];
|
|
10
11
|
}
|
|
11
|
-
function F(o,
|
|
12
|
-
return Number.isFinite(o) && o > 0 ? o :
|
|
12
|
+
function F(o, d) {
|
|
13
|
+
return Number.isFinite(o) && o > 0 ? o : d;
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
-
const a = String(
|
|
15
|
+
function Nt(o, d, s) {
|
|
16
|
+
const a = String(d ?? "").trim();
|
|
16
17
|
return o.includes(a) ? a : s;
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
+
function Ge(o, d) {
|
|
19
20
|
const s = Number(o);
|
|
20
|
-
return Number.isFinite(s) ? Math.max(0.08, Math.min(1, s)) :
|
|
21
|
+
return Number.isFinite(s) ? Math.max(0.08, Math.min(1, s)) : d;
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
return
|
|
23
|
+
function $e(o) {
|
|
24
|
+
return Lt(De, o);
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
-
return
|
|
26
|
+
function ve(o) {
|
|
27
|
+
return Lt(It, o);
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
+
function At(o) {
|
|
29
30
|
return !("kind" in o);
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
return o.z_index !==
|
|
32
|
+
function Ze(o, d) {
|
|
33
|
+
return o.z_index !== d.z_index ? o.z_index - d.z_index : o.created_at_unix_ms !== d.created_at_unix_ms ? o.created_at_unix_ms - d.created_at_unix_ms : o.id.localeCompare(d.id);
|
|
33
34
|
}
|
|
34
35
|
function nt(o) {
|
|
35
|
-
return o.reduce((
|
|
36
|
+
return o.reduce((d, s) => Math.max(d, s.z_index), 1);
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
-
return nt([...o, ...
|
|
38
|
+
function Je(o, d) {
|
|
39
|
+
return nt([...o, ...d]);
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
+
function Qe(o) {
|
|
41
42
|
return {
|
|
42
43
|
id: o.id,
|
|
43
44
|
type: "sticky_note",
|
|
@@ -50,15 +51,15 @@ function $e(o) {
|
|
|
50
51
|
created_at_unix_ms: o.created_at_unix_ms
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
+
function tn(o, d, s) {
|
|
54
55
|
const a = Date.now();
|
|
55
56
|
return {
|
|
56
57
|
id: S(),
|
|
57
58
|
kind: "sticky_note",
|
|
58
59
|
body: "Capture the thought, decision, or next step here.",
|
|
59
|
-
color:
|
|
60
|
+
color: Ae,
|
|
60
61
|
x: o - 130,
|
|
61
|
-
y:
|
|
62
|
+
y: d - 92,
|
|
62
63
|
width: 260,
|
|
63
64
|
height: 184,
|
|
64
65
|
z_index: s,
|
|
@@ -66,8 +67,8 @@ function Ze(o, c, s) {
|
|
|
66
67
|
updated_at_unix_ms: a
|
|
67
68
|
};
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
-
const _ = Date.now(), y = F(a?.width, 360),
|
|
70
|
+
function en(o, d, s, a) {
|
|
71
|
+
const _ = Date.now(), y = F(a?.width, 360), h = F(a?.height, 96);
|
|
71
72
|
return {
|
|
72
73
|
id: S(),
|
|
73
74
|
kind: "text",
|
|
@@ -75,48 +76,48 @@ function ve(o, c, s, a) {
|
|
|
75
76
|
font_family: a?.font_family ?? Wt.fontFamily,
|
|
76
77
|
font_size: a?.font_size ?? 30,
|
|
77
78
|
font_weight: a?.font_weight ?? Wt.fontWeight,
|
|
78
|
-
color: a?.color ??
|
|
79
|
+
color: a?.color ?? Ie,
|
|
79
80
|
align: a?.align ?? "left",
|
|
80
81
|
x: o - y / 2,
|
|
81
|
-
y:
|
|
82
|
+
y: d - h / 2,
|
|
82
83
|
width: y,
|
|
83
|
-
height:
|
|
84
|
+
height: h,
|
|
84
85
|
z_index: s,
|
|
85
86
|
created_at_unix_ms: _,
|
|
86
87
|
updated_at_unix_ms: _
|
|
87
88
|
};
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
-
const
|
|
90
|
+
function nn(o) {
|
|
91
|
+
const d = Date.now();
|
|
91
92
|
return {
|
|
92
93
|
...o,
|
|
93
94
|
id: S(),
|
|
94
95
|
x: o.x + 28,
|
|
95
96
|
y: o.y + 28,
|
|
96
97
|
z_index: o.z_index + 1,
|
|
97
|
-
created_at_unix_ms:
|
|
98
|
-
updated_at_unix_ms:
|
|
98
|
+
created_at_unix_ms: d,
|
|
99
|
+
updated_at_unix_ms: d
|
|
99
100
|
};
|
|
100
101
|
}
|
|
101
|
-
function
|
|
102
|
-
const _ = Date.now(), y = F(a?.width, 560),
|
|
102
|
+
function on(o, d, s, a) {
|
|
103
|
+
const _ = Date.now(), y = F(a?.width, 560), h = F(a?.height, 360), f = String(a?.name ?? "").trim() || "Focus area";
|
|
103
104
|
return {
|
|
104
105
|
id: S(),
|
|
105
106
|
name: f,
|
|
106
|
-
fill:
|
|
107
|
-
opacity:
|
|
108
|
-
material:
|
|
107
|
+
fill: Nt(Le, a?.fill, Me),
|
|
108
|
+
opacity: Ge(a?.opacity, 0.72),
|
|
109
|
+
material: Nt(It, a?.material, pe),
|
|
109
110
|
x: o - y / 2,
|
|
110
|
-
y:
|
|
111
|
+
y: d - h / 2,
|
|
111
112
|
width: y,
|
|
112
|
-
height:
|
|
113
|
+
height: h,
|
|
113
114
|
z_index: s,
|
|
114
115
|
created_at_unix_ms: _,
|
|
115
116
|
updated_at_unix_ms: _
|
|
116
117
|
};
|
|
117
118
|
}
|
|
118
|
-
function
|
|
119
|
-
const
|
|
119
|
+
function cn(o) {
|
|
120
|
+
const d = Date.now();
|
|
120
121
|
return {
|
|
121
122
|
...o,
|
|
122
123
|
id: S(),
|
|
@@ -124,45 +125,45 @@ function tn(o) {
|
|
|
124
125
|
x: o.x + 36,
|
|
125
126
|
y: o.y + 36,
|
|
126
127
|
z_index: o.z_index + 1,
|
|
127
|
-
created_at_unix_ms:
|
|
128
|
-
updated_at_unix_ms:
|
|
128
|
+
created_at_unix_ms: d,
|
|
129
|
+
updated_at_unix_ms: d
|
|
129
130
|
};
|
|
130
131
|
}
|
|
131
|
-
function
|
|
132
|
-
const [
|
|
133
|
-
let f = null,
|
|
134
|
-
const r = o.state, x = u(() => r().widgets), R = u(() => r().stickyNotes ?? []), it = u(() => r().annotations ?? []), ot = u(() => r().backgroundLayers ?? []),
|
|
135
|
-
() =>
|
|
136
|
-
),
|
|
137
|
-
const n = Number.isFinite(e) && e > 0 ? e : 0, i = Number.isFinite(t) && t > 0 ? t : 0,
|
|
138
|
-
return
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
},
|
|
132
|
+
function xn(o) {
|
|
133
|
+
const [d, s] = et(null), [a, _] = et(null), [y, h] = et({ width: 0, height: 0 });
|
|
134
|
+
let f = null, C = null;
|
|
135
|
+
const r = o.state, x = u(() => r().widgets), R = u(() => r().stickyNotes ?? []), it = u(() => r().annotations ?? []), ot = u(() => r().backgroundLayers ?? []), m = u(() => r().viewport), Dt = u(() => r().locked), z = u(() => r().filters), pt = u(() => r().selectedWidgetId), B = u(() => r().selectedObject ?? (r().selectedWidgetId ? { kind: "widget", id: r().selectedWidgetId } : null)), T = u(() => r().mode ?? "work"), Mt = u(() => Ot(T())), ct = u(() => r().activeTool ?? "select"), jt = u(() => r().theme), W = u(() => Je(x(), R())), Ft = u(() => `${Math.round(m().scale * 100)}%`), Rt = () => typeof o.widgetDefinitions == "function" ? o.widgetDefinitions() : o.widgetDefinitions, zt = () => typeof o.textAnnotationDefaults == "function" ? o.textAnnotationDefaults() : o.textAnnotationDefaults, Bt = () => typeof o.backgroundLayerDefaults == "function" ? o.backgroundLayerDefaults() : o.backgroundLayerDefaults, N = u(
|
|
136
|
+
() => Pe(Rt())
|
|
137
|
+
), X = (e, t) => {
|
|
138
|
+
const n = Number.isFinite(e) && e > 0 ? e : 0, i = Number.isFinite(t) && t > 0 ? t : 0, c = { width: n, height: i }, g = y();
|
|
139
|
+
return g.width === n && g.height === i ? g : (h(c), c);
|
|
140
|
+
}, dt = () => {
|
|
141
|
+
C?.disconnect(), C = null;
|
|
142
|
+
}, w = () => f ? X(f.clientWidth, f.clientHeight) : X(0, 0), Xt = (e) => {
|
|
142
143
|
if (f === (e ?? null)) {
|
|
143
|
-
|
|
144
|
+
w();
|
|
144
145
|
return;
|
|
145
146
|
}
|
|
146
|
-
|
|
147
|
+
dt(), f = e ?? null, w(), !(!f || typeof ResizeObserver > "u") && (C = new ResizeObserver((t) => {
|
|
147
148
|
const n = t[0];
|
|
148
|
-
|
|
149
|
+
X(
|
|
149
150
|
n?.contentRect.width ?? f?.clientWidth ?? 0,
|
|
150
151
|
n?.contentRect.height ?? f?.clientHeight ?? 0
|
|
151
152
|
);
|
|
152
|
-
}),
|
|
153
|
+
}), C.observe(f));
|
|
153
154
|
};
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
Oe(() => {
|
|
156
|
+
dt(), f = null;
|
|
156
157
|
});
|
|
157
|
-
const
|
|
158
|
+
const Et = (e) => {
|
|
158
159
|
s({
|
|
159
160
|
clientX: e.clientX,
|
|
160
161
|
clientY: e.clientY,
|
|
161
162
|
worldX: e.worldX,
|
|
162
163
|
worldY: e.worldY,
|
|
163
|
-
target: { kind: "canvas", mode:
|
|
164
|
+
target: { kind: "canvas", mode: T() }
|
|
164
165
|
});
|
|
165
|
-
},
|
|
166
|
+
}, Yt = (e, t) => {
|
|
166
167
|
b(t.id), s({
|
|
167
168
|
clientX: e.clientX,
|
|
168
169
|
clientY: e.clientY,
|
|
@@ -171,8 +172,8 @@ function _n(o) {
|
|
|
171
172
|
target: { kind: "widget", id: t.id },
|
|
172
173
|
widgetId: t.id
|
|
173
174
|
});
|
|
174
|
-
},
|
|
175
|
-
|
|
175
|
+
}, Ht = (e, t) => {
|
|
176
|
+
L(t.id), s({
|
|
176
177
|
clientX: e.clientX,
|
|
177
178
|
clientY: e.clientY,
|
|
178
179
|
worldX: t.x,
|
|
@@ -180,7 +181,7 @@ function _n(o) {
|
|
|
180
181
|
target: { kind: "sticky_note", id: t.id },
|
|
181
182
|
widgetId: t.id
|
|
182
183
|
});
|
|
183
|
-
},
|
|
184
|
+
}, Kt = (e, t) => {
|
|
184
185
|
s({
|
|
185
186
|
clientX: e.clientX,
|
|
186
187
|
clientY: e.clientY,
|
|
@@ -188,7 +189,7 @@ function _n(o) {
|
|
|
188
189
|
worldY: t.y,
|
|
189
190
|
target: { kind: "annotation", id: t.id }
|
|
190
191
|
});
|
|
191
|
-
},
|
|
192
|
+
}, Vt = (e, t) => {
|
|
192
193
|
s({
|
|
193
194
|
clientX: e.clientX,
|
|
194
195
|
clientY: e.clientY,
|
|
@@ -196,7 +197,20 @@ function _n(o) {
|
|
|
196
197
|
worldY: t.y,
|
|
197
198
|
target: { kind: "background_layer", id: t.id }
|
|
198
199
|
});
|
|
199
|
-
}, l = () => s(null),
|
|
200
|
+
}, l = () => s(null), Ut = (e) => r().widgets.find((t) => t.id === e) ?? null, A = (e) => r().widgets.find((t) => t.type === e) ?? null, E = (e) => r().stickyNotes?.find((t) => t.id === e) ?? null, at = (e) => r().annotations?.find((t) => t.id === e) ?? null, st = (e) => r().backgroundLayers?.find((t) => t.id === e) ?? null, Pt = (e) => e.target ? e.target : e.widgetId ? E(e.widgetId) ? { kind: "sticky_note", id: e.widgetId } : { kind: "widget", id: e.widgetId } : { kind: "canvas", mode: T() }, I = (e, t) => {
|
|
201
|
+
if (t?.source === "pointer") {
|
|
202
|
+
const n = f?.getBoundingClientRect(), i = n ? Ce(n, m(), {
|
|
203
|
+
clientX: t.clientX,
|
|
204
|
+
clientY: t.clientY
|
|
205
|
+
}) : null;
|
|
206
|
+
if (i)
|
|
207
|
+
return i;
|
|
208
|
+
}
|
|
209
|
+
return {
|
|
210
|
+
worldX: e.worldX,
|
|
211
|
+
worldY: e.worldY
|
|
212
|
+
};
|
|
213
|
+
}, qt = (e, t) => {
|
|
200
214
|
const n = e.singleton ? A(e.type) : null;
|
|
201
215
|
return n ? {
|
|
202
216
|
id: `goto-${e.type}`,
|
|
@@ -207,7 +221,7 @@ function _n(o) {
|
|
|
207
221
|
icon: e.icon,
|
|
208
222
|
existingWidgetId: n.id,
|
|
209
223
|
onSelect: () => {
|
|
210
|
-
|
|
224
|
+
O(n, { centerViewport: !0 }), l();
|
|
211
225
|
}
|
|
212
226
|
} : {
|
|
213
227
|
id: `add-${e.type}`,
|
|
@@ -216,16 +230,17 @@ function _n(o) {
|
|
|
216
230
|
widgetType: e.type,
|
|
217
231
|
label: `Add ${e.label}`,
|
|
218
232
|
icon: e.icon,
|
|
219
|
-
onSelect: () => {
|
|
220
|
-
|
|
233
|
+
onSelect: (i) => {
|
|
234
|
+
const c = I(t, i);
|
|
235
|
+
H(e.type, c.worldX, c.worldY), l();
|
|
221
236
|
}
|
|
222
237
|
};
|
|
223
238
|
}, rt = u(() => {
|
|
224
|
-
const e =
|
|
239
|
+
const e = d();
|
|
225
240
|
if (!e) return [];
|
|
226
241
|
const t = Pt(e);
|
|
227
242
|
if (t.kind === "widget") {
|
|
228
|
-
const n = x().find((
|
|
243
|
+
const n = x().find((c) => c.id === t.id), i = [];
|
|
229
244
|
return n && (i.push({
|
|
230
245
|
id: "bring-to-front",
|
|
231
246
|
kind: "action",
|
|
@@ -246,7 +261,7 @@ function _n(o) {
|
|
|
246
261
|
id: "delete",
|
|
247
262
|
kind: "action",
|
|
248
263
|
label: "Delete",
|
|
249
|
-
icon:
|
|
264
|
+
icon: j,
|
|
250
265
|
destructive: !0,
|
|
251
266
|
onSelect: () => {
|
|
252
267
|
K(t.id), l();
|
|
@@ -254,14 +269,14 @@ function _n(o) {
|
|
|
254
269
|
}), i;
|
|
255
270
|
}
|
|
256
271
|
if (t.kind === "sticky_note") {
|
|
257
|
-
const n =
|
|
272
|
+
const n = E(t.id), i = [];
|
|
258
273
|
return n && (i.push({
|
|
259
274
|
id: "bring-to-front",
|
|
260
275
|
kind: "action",
|
|
261
276
|
label: "Bring to Front",
|
|
262
277
|
icon: xt,
|
|
263
278
|
onSelect: () => {
|
|
264
|
-
|
|
279
|
+
L(n.id), l();
|
|
265
280
|
}
|
|
266
281
|
}), i.push({
|
|
267
282
|
id: "copy-content",
|
|
@@ -277,16 +292,16 @@ function _n(o) {
|
|
|
277
292
|
label: "Change Color",
|
|
278
293
|
icon: bt,
|
|
279
294
|
onSelect: () => {
|
|
280
|
-
kt(n.id, { color:
|
|
295
|
+
kt(n.id, { color: $e(n.color) }), l();
|
|
281
296
|
}
|
|
282
297
|
})), i.push({ id: "separator-delete", kind: "separator" }), i.push({
|
|
283
298
|
id: "delete",
|
|
284
299
|
kind: "action",
|
|
285
300
|
label: "Delete",
|
|
286
|
-
icon:
|
|
301
|
+
icon: j,
|
|
287
302
|
destructive: !0,
|
|
288
303
|
onSelect: () => {
|
|
289
|
-
|
|
304
|
+
q(t.id), l();
|
|
290
305
|
}
|
|
291
306
|
}), i;
|
|
292
307
|
}
|
|
@@ -304,7 +319,7 @@ function _n(o) {
|
|
|
304
319
|
id: "delete",
|
|
305
320
|
kind: "action",
|
|
306
321
|
label: "Delete Text",
|
|
307
|
-
icon:
|
|
322
|
+
icon: j,
|
|
308
323
|
destructive: !0,
|
|
309
324
|
onSelect: () => {
|
|
310
325
|
G(t.id), l();
|
|
@@ -327,13 +342,13 @@ function _n(o) {
|
|
|
327
342
|
label: "Change Material",
|
|
328
343
|
icon: St,
|
|
329
344
|
onSelect: () => {
|
|
330
|
-
ft(n.id, { material:
|
|
345
|
+
ft(n.id, { material: ve(n.material) }), l();
|
|
331
346
|
}
|
|
332
347
|
})), i.push({ id: "separator-delete", kind: "separator" }), i.push({
|
|
333
348
|
id: "delete",
|
|
334
349
|
kind: "action",
|
|
335
350
|
label: "Delete Region",
|
|
336
|
-
icon:
|
|
351
|
+
icon: j,
|
|
337
352
|
destructive: !0,
|
|
338
353
|
onSelect: () => {
|
|
339
354
|
$(t.id), l();
|
|
@@ -346,17 +361,19 @@ function _n(o) {
|
|
|
346
361
|
kind: "action",
|
|
347
362
|
label: "Add Region",
|
|
348
363
|
icon: St,
|
|
349
|
-
onSelect: () => {
|
|
350
|
-
|
|
364
|
+
onSelect: (n) => {
|
|
365
|
+
const i = I(e, n);
|
|
366
|
+
P(i.worldX, i.worldY), l();
|
|
351
367
|
}
|
|
352
368
|
},
|
|
353
369
|
{
|
|
354
370
|
id: "create-text",
|
|
355
371
|
kind: "action",
|
|
356
372
|
label: "Add Text",
|
|
357
|
-
icon:
|
|
358
|
-
onSelect: () => {
|
|
359
|
-
|
|
373
|
+
icon: Te,
|
|
374
|
+
onSelect: (n) => {
|
|
375
|
+
const i = I(e, n);
|
|
376
|
+
U(i.worldX, i.worldY), l();
|
|
360
377
|
}
|
|
361
378
|
}
|
|
362
379
|
] : [
|
|
@@ -365,49 +382,59 @@ function _n(o) {
|
|
|
365
382
|
kind: "action",
|
|
366
383
|
label: "Add Sticky",
|
|
367
384
|
icon: bt,
|
|
368
|
-
onSelect: () => {
|
|
369
|
-
|
|
385
|
+
onSelect: (n) => {
|
|
386
|
+
const i = I(e, n);
|
|
387
|
+
V(i.worldX, i.worldY), l();
|
|
370
388
|
}
|
|
371
389
|
},
|
|
372
|
-
...
|
|
390
|
+
...N().map((n) => qt(n, e))
|
|
373
391
|
];
|
|
374
|
-
}),
|
|
375
|
-
const e =
|
|
392
|
+
}), Gt = u(() => {
|
|
393
|
+
const e = d();
|
|
376
394
|
if (!e) return;
|
|
377
|
-
const t = rt(), n = t.filter((
|
|
395
|
+
const t = rt(), n = t.filter((c) => c.kind === "action").length, i = t.filter((c) => c.kind === "separator").length;
|
|
378
396
|
return je({
|
|
379
397
|
clientX: e.clientX,
|
|
380
398
|
clientY: e.clientY,
|
|
381
|
-
menuWidth:
|
|
382
|
-
menuHeight:
|
|
399
|
+
menuWidth: Be,
|
|
400
|
+
menuHeight: Xe(n, i)
|
|
383
401
|
});
|
|
384
|
-
}), Y = (e, t
|
|
385
|
-
const
|
|
386
|
-
if (
|
|
387
|
-
return
|
|
388
|
-
const
|
|
402
|
+
}), Y = (e, t) => {
|
|
403
|
+
const n = qe(e, N()), i = n.singleton ? A(e) : null;
|
|
404
|
+
if (i)
|
|
405
|
+
return O(i, { centerViewport: !0 });
|
|
406
|
+
const c = Fe(n, t), g = {
|
|
389
407
|
id: S(),
|
|
390
408
|
type: e,
|
|
391
|
-
title:
|
|
392
|
-
x:
|
|
393
|
-
y:
|
|
394
|
-
width:
|
|
395
|
-
height:
|
|
409
|
+
title: n.defaultTitle,
|
|
410
|
+
x: c.x,
|
|
411
|
+
y: c.y,
|
|
412
|
+
width: c.width,
|
|
413
|
+
height: c.height,
|
|
396
414
|
z_index: W() + 1,
|
|
397
415
|
created_at_unix_ms: Date.now()
|
|
398
416
|
};
|
|
399
|
-
return o.setState((
|
|
400
|
-
...
|
|
401
|
-
widgets: [...
|
|
417
|
+
return o.setState((k) => ({
|
|
418
|
+
...k,
|
|
419
|
+
widgets: [...k.widgets, g],
|
|
402
420
|
selectedWidgetId: g.id,
|
|
403
421
|
selectedObject: { kind: "widget", id: g.id },
|
|
404
422
|
mode: "work",
|
|
405
423
|
activeTool: "select"
|
|
406
424
|
})), g;
|
|
407
|
-
},
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
425
|
+
}, $t = (e, t, n) => Y(e, {
|
|
426
|
+
anchor: "top_left",
|
|
427
|
+
worldX: t,
|
|
428
|
+
worldY: n
|
|
429
|
+
}), lt = (e, t, n) => Y(e, {
|
|
430
|
+
anchor: "top_left",
|
|
431
|
+
worldX: t,
|
|
432
|
+
worldY: n
|
|
433
|
+
}), H = (e, t, n) => Y(e, {
|
|
434
|
+
anchor: "center",
|
|
435
|
+
worldX: t,
|
|
436
|
+
worldY: n
|
|
437
|
+
}), K = (e) => {
|
|
411
438
|
o.setState((t) => ({
|
|
412
439
|
...t,
|
|
413
440
|
widgets: t.widgets.filter((n) => n.id !== e),
|
|
@@ -415,7 +442,7 @@ function _n(o) {
|
|
|
415
442
|
selectedObject: t.selectedObject?.kind === "widget" && t.selectedObject.id === e ? null : t.selectedObject ?? null
|
|
416
443
|
}));
|
|
417
444
|
}, V = (e, t) => {
|
|
418
|
-
const n =
|
|
445
|
+
const n = tn(e, t, W() + 1);
|
|
419
446
|
return o.setState((i) => ({
|
|
420
447
|
...i,
|
|
421
448
|
stickyNotes: [...i.stickyNotes ?? [], n],
|
|
@@ -425,11 +452,11 @@ function _n(o) {
|
|
|
425
452
|
activeTool: "select"
|
|
426
453
|
})), n;
|
|
427
454
|
}, U = (e, t) => {
|
|
428
|
-
const n =
|
|
455
|
+
const n = en(
|
|
429
456
|
e,
|
|
430
457
|
t,
|
|
431
458
|
nt(it()) + 1,
|
|
432
|
-
|
|
459
|
+
zt()
|
|
433
460
|
);
|
|
434
461
|
return o.setState((i) => ({
|
|
435
462
|
...i,
|
|
@@ -440,7 +467,7 @@ function _n(o) {
|
|
|
440
467
|
activeTool: "select"
|
|
441
468
|
})), n;
|
|
442
469
|
}, ut = (e) => {
|
|
443
|
-
const t =
|
|
470
|
+
const t = nn(e);
|
|
444
471
|
return o.setState((n) => ({
|
|
445
472
|
...n,
|
|
446
473
|
annotations: [...n.annotations ?? [], t],
|
|
@@ -449,12 +476,12 @@ function _n(o) {
|
|
|
449
476
|
mode: "background",
|
|
450
477
|
activeTool: "select"
|
|
451
478
|
})), t;
|
|
452
|
-
},
|
|
453
|
-
const n =
|
|
479
|
+
}, P = (e, t) => {
|
|
480
|
+
const n = on(
|
|
454
481
|
e,
|
|
455
482
|
t,
|
|
456
483
|
nt(ot()) + 1,
|
|
457
|
-
|
|
484
|
+
Bt()
|
|
458
485
|
);
|
|
459
486
|
return o.setState((i) => ({
|
|
460
487
|
...i,
|
|
@@ -465,7 +492,7 @@ function _n(o) {
|
|
|
465
492
|
activeTool: "select"
|
|
466
493
|
})), n;
|
|
467
494
|
}, gt = (e) => {
|
|
468
|
-
const t =
|
|
495
|
+
const t = cn(e);
|
|
469
496
|
return o.setState((n) => ({
|
|
470
497
|
...n,
|
|
471
498
|
backgroundLayers: [...n.backgroundLayers ?? [], t],
|
|
@@ -474,7 +501,7 @@ function _n(o) {
|
|
|
474
501
|
mode: "background",
|
|
475
502
|
activeTool: "select"
|
|
476
503
|
})), t;
|
|
477
|
-
},
|
|
504
|
+
}, vt = (e) => {
|
|
478
505
|
_(e);
|
|
479
506
|
}, b = (e) => {
|
|
480
507
|
_(e);
|
|
@@ -482,10 +509,10 @@ function _n(o) {
|
|
|
482
509
|
n && n.z_index < t && o.setState((i) => ({
|
|
483
510
|
...i,
|
|
484
511
|
widgets: i.widgets.map(
|
|
485
|
-
(
|
|
512
|
+
(c) => c.id === e ? { ...c, z_index: t + 1 } : c
|
|
486
513
|
)
|
|
487
514
|
}));
|
|
488
|
-
},
|
|
515
|
+
}, L = (e) => {
|
|
489
516
|
_(e);
|
|
490
517
|
const t = W();
|
|
491
518
|
o.setState((n) => ({
|
|
@@ -494,7 +521,7 @@ function _n(o) {
|
|
|
494
521
|
(i) => i.id === e && i.z_index < t ? { ...i, z_index: t + 1, updated_at_unix_ms: Date.now() } : i
|
|
495
522
|
)
|
|
496
523
|
}));
|
|
497
|
-
},
|
|
524
|
+
}, Zt = (e, t) => {
|
|
498
525
|
o.setState((n) => ({
|
|
499
526
|
...n,
|
|
500
527
|
widgets: n.widgets.map(
|
|
@@ -534,7 +561,7 @@ function _n(o) {
|
|
|
534
561
|
} : i
|
|
535
562
|
)
|
|
536
563
|
}));
|
|
537
|
-
},
|
|
564
|
+
}, q = (e) => {
|
|
538
565
|
o.setState((t) => ({
|
|
539
566
|
...t,
|
|
540
567
|
stickyNotes: (t.stickyNotes ?? []).filter((n) => n.id !== e),
|
|
@@ -583,7 +610,7 @@ function _n(o) {
|
|
|
583
610
|
(i) => i.id === e ? { ...i, x: t.x, y: t.y, updated_at_unix_ms: Date.now() } : i
|
|
584
611
|
)
|
|
585
612
|
}));
|
|
586
|
-
},
|
|
613
|
+
}, ce = (e, t) => {
|
|
587
614
|
o.setState((n) => ({
|
|
588
615
|
...n,
|
|
589
616
|
backgroundLayers: (n.backgroundLayers ?? []).map(
|
|
@@ -611,27 +638,27 @@ function _n(o) {
|
|
|
611
638
|
selectedObject: t.selectedObject?.kind === "background_layer" && t.selectedObject.id === e ? null : t.selectedObject ?? null
|
|
612
639
|
}));
|
|
613
640
|
};
|
|
614
|
-
let
|
|
615
|
-
const
|
|
641
|
+
let v = 0;
|
|
642
|
+
const Z = (e) => {
|
|
616
643
|
o.setState((t) => ({ ...t, viewport: e }));
|
|
617
|
-
},
|
|
618
|
-
|
|
619
|
-
},
|
|
620
|
-
const t =
|
|
621
|
-
if (
|
|
622
|
-
const
|
|
623
|
-
|
|
644
|
+
}, de = () => {
|
|
645
|
+
v += 1;
|
|
646
|
+
}, D = (e) => {
|
|
647
|
+
const t = m(), n = t.x, i = t.y, c = t.scale, g = performance.now(), k = 360, be = ++v, Se = (Q) => 1 - Math.pow(1 - Q, 3), wt = (Q) => {
|
|
648
|
+
if (be !== v) return;
|
|
649
|
+
const We = Q - g, ht = Math.min(Math.max(We / k, 0), 1), tt = Se(ht);
|
|
650
|
+
Z({
|
|
624
651
|
x: n + (e.x - n) * tt,
|
|
625
652
|
y: i + (e.y - i) * tt,
|
|
626
|
-
scale:
|
|
653
|
+
scale: c + (e.scale - c) * tt
|
|
627
654
|
}), ht < 1 && requestAnimationFrame(wt);
|
|
628
655
|
};
|
|
629
656
|
requestAnimationFrame(wt);
|
|
630
657
|
}, ae = (e) => {
|
|
631
|
-
const t = Ot(e), n =
|
|
658
|
+
const t = Ot(e), n = m();
|
|
632
659
|
if (n.scale >= t.minScale) return;
|
|
633
|
-
const i =
|
|
634
|
-
|
|
660
|
+
const i = w();
|
|
661
|
+
D(Ke({
|
|
635
662
|
viewport: n,
|
|
636
663
|
scale: t.minScale,
|
|
637
664
|
minScale: t.minScale,
|
|
@@ -639,16 +666,16 @@ function _n(o) {
|
|
|
639
666
|
frameHeight: i.height
|
|
640
667
|
}));
|
|
641
668
|
}, _t = (e) => {
|
|
642
|
-
const t =
|
|
669
|
+
const t = m(), n = w(), i = (n.width / 2 - t.x) / t.scale, c = (n.height / 2 - t.y) / t.scale, g = Ee(
|
|
643
670
|
e === "in" ? t.scale * Tt : t.scale / Tt,
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
),
|
|
647
|
-
x: n.width / 2 - i *
|
|
648
|
-
y: n.height / 2 -
|
|
649
|
-
scale:
|
|
671
|
+
Mt().minScale,
|
|
672
|
+
Ye
|
|
673
|
+
), k = {
|
|
674
|
+
x: n.width / 2 - i * g,
|
|
675
|
+
y: n.height / 2 - c * g,
|
|
676
|
+
scale: g
|
|
650
677
|
};
|
|
651
|
-
|
|
678
|
+
Z(k);
|
|
652
679
|
}, se = () => {
|
|
653
680
|
o.setState((e) => ({ ...e, locked: !e.locked }));
|
|
654
681
|
}, re = (e) => {
|
|
@@ -658,20 +685,20 @@ function _n(o) {
|
|
|
658
685
|
}));
|
|
659
686
|
}, le = (e, t) => {
|
|
660
687
|
o.setState((n) => {
|
|
661
|
-
const i = { ...n.filters },
|
|
662
|
-
(
|
|
688
|
+
const i = { ...n.filters }, c = [...new Set(t.map((k) => String(k)).filter(Boolean))], g = c.length > 1 && c.every(
|
|
689
|
+
(k) => i[k] !== !1 == (k === e)
|
|
663
690
|
);
|
|
664
|
-
for (const
|
|
665
|
-
i[
|
|
691
|
+
for (const k of c)
|
|
692
|
+
i[k] = g ? !0 : k === e;
|
|
666
693
|
return { ...n, filters: i };
|
|
667
694
|
});
|
|
668
695
|
}, ue = () => {
|
|
669
|
-
const e =
|
|
696
|
+
const e = N();
|
|
670
697
|
o.setState((t) => ({
|
|
671
698
|
...t,
|
|
672
699
|
filters: ze(void 0, e)
|
|
673
700
|
}));
|
|
674
|
-
},
|
|
701
|
+
}, p = (e) => {
|
|
675
702
|
o.setState((t) => ({
|
|
676
703
|
...t,
|
|
677
704
|
selectedWidgetId: e,
|
|
@@ -697,7 +724,7 @@ function _n(o) {
|
|
|
697
724
|
selectedObject: { kind: "sticky_note", id: e },
|
|
698
725
|
mode: "work",
|
|
699
726
|
activeTool: "select"
|
|
700
|
-
})),
|
|
727
|
+
})), L(e);
|
|
701
728
|
}, ke = (e) => {
|
|
702
729
|
o.setState((t) => ({
|
|
703
730
|
...t,
|
|
@@ -715,7 +742,7 @@ function _n(o) {
|
|
|
715
742
|
activeTool: "select"
|
|
716
743
|
}));
|
|
717
744
|
}, _e = (e) => {
|
|
718
|
-
const t =
|
|
745
|
+
const t = He(e);
|
|
719
746
|
o.setState((n) => ({
|
|
720
747
|
...n,
|
|
721
748
|
mode: t,
|
|
@@ -730,61 +757,61 @@ function _n(o) {
|
|
|
730
757
|
mode: e === "text" || e === "background-region" ? "background" : e === "sticky-note" ? "work" : t.mode ?? "work"
|
|
731
758
|
}));
|
|
732
759
|
}, me = (e, t) => {
|
|
733
|
-
const n =
|
|
734
|
-
return n === "sticky-note" ? V(e, t) : n === "text" ? U(e, t) : n === "background-region" ?
|
|
760
|
+
const n = ct();
|
|
761
|
+
return n === "sticky-note" ? V(e, t) : n === "text" ? U(e, t) : n === "background-region" ? P(e, t) : null;
|
|
735
762
|
}, we = () => {
|
|
736
|
-
const e =
|
|
763
|
+
const e = w(), t = m();
|
|
737
764
|
return {
|
|
738
765
|
worldX: e.width > 0 ? (e.width / 2 - t.x) / t.scale : 240,
|
|
739
766
|
worldY: e.height > 0 ? (e.height / 2 - t.y) / t.scale : 180
|
|
740
767
|
};
|
|
741
768
|
}, J = (e) => {
|
|
742
|
-
const t =
|
|
743
|
-
t.width === 0 || t.height === 0 ||
|
|
769
|
+
const t = w();
|
|
770
|
+
t.width === 0 || t.height === 0 || D(Ct({
|
|
744
771
|
widget: e,
|
|
745
|
-
scale:
|
|
772
|
+
scale: m().scale,
|
|
746
773
|
frameWidth: t.width,
|
|
747
774
|
frameHeight: t.height
|
|
748
775
|
}));
|
|
749
776
|
}, he = (e) => {
|
|
750
|
-
const t =
|
|
751
|
-
t.width === 0 || t.height === 0 ||
|
|
777
|
+
const t = w();
|
|
778
|
+
t.width === 0 || t.height === 0 || D(Ue({
|
|
752
779
|
widget: e,
|
|
753
780
|
frameWidth: t.width,
|
|
754
781
|
frameHeight: t.height
|
|
755
782
|
}));
|
|
756
783
|
}, xe = (e) => {
|
|
757
|
-
const t =
|
|
758
|
-
t.width === 0 || t.height === 0 ||
|
|
784
|
+
const t = w();
|
|
785
|
+
t.width === 0 || t.height === 0 || D(Ct({
|
|
759
786
|
widget: e,
|
|
760
|
-
scale:
|
|
787
|
+
scale: Ve,
|
|
761
788
|
frameWidth: t.width,
|
|
762
789
|
frameHeight: t.height
|
|
763
790
|
}));
|
|
764
|
-
},
|
|
791
|
+
}, O = (e, t = {}) => (p(e.id), b(e.id), t.centerViewport !== !1 && J(e), e);
|
|
765
792
|
return {
|
|
766
793
|
widgets: x,
|
|
767
794
|
stickyNotes: R,
|
|
768
795
|
annotations: it,
|
|
769
796
|
backgroundLayers: ot,
|
|
770
|
-
viewport:
|
|
797
|
+
viewport: m,
|
|
771
798
|
canvasFrameSize: y,
|
|
772
|
-
locked:
|
|
773
|
-
filters:
|
|
774
|
-
selectedWidgetId:
|
|
775
|
-
selectedObject:
|
|
776
|
-
mode:
|
|
777
|
-
activeTool:
|
|
778
|
-
theme:
|
|
799
|
+
locked: Dt,
|
|
800
|
+
filters: z,
|
|
801
|
+
selectedWidgetId: pt,
|
|
802
|
+
selectedObject: B,
|
|
803
|
+
mode: T,
|
|
804
|
+
activeTool: ct,
|
|
805
|
+
theme: jt,
|
|
779
806
|
topZIndex: W,
|
|
780
|
-
scaleLabel:
|
|
807
|
+
scaleLabel: Ft,
|
|
781
808
|
optimisticFrontWidgetId: a,
|
|
782
|
-
widgetDefinitions:
|
|
809
|
+
widgetDefinitions: N,
|
|
783
810
|
setCanvasFrameRef: Xt,
|
|
784
811
|
contextMenu: {
|
|
785
|
-
state:
|
|
812
|
+
state: d,
|
|
786
813
|
items: rt,
|
|
787
|
-
position:
|
|
814
|
+
position: Gt,
|
|
788
815
|
close: l,
|
|
789
816
|
retarget: (e) => {
|
|
790
817
|
e.preventDefault(), e.stopPropagation(), s({
|
|
@@ -796,30 +823,30 @@ function _n(o) {
|
|
|
796
823
|
}
|
|
797
824
|
},
|
|
798
825
|
canvas: {
|
|
799
|
-
openCanvasContextMenu:
|
|
800
|
-
openWidgetContextMenu:
|
|
801
|
-
openStickyNoteContextMenu:
|
|
802
|
-
openAnnotationContextMenu:
|
|
803
|
-
openBackgroundLayerContextMenu:
|
|
804
|
-
selectWidget:
|
|
826
|
+
openCanvasContextMenu: Et,
|
|
827
|
+
openWidgetContextMenu: Yt,
|
|
828
|
+
openStickyNoteContextMenu: Ht,
|
|
829
|
+
openAnnotationContextMenu: Kt,
|
|
830
|
+
openBackgroundLayerContextMenu: Vt,
|
|
831
|
+
selectWidget: p,
|
|
805
832
|
selectObject: ge,
|
|
806
833
|
selectStickyNote: mt,
|
|
807
834
|
selectAnnotation: ke,
|
|
808
835
|
selectBackgroundLayer: fe,
|
|
809
836
|
clearSelection: yt,
|
|
810
|
-
startOptimisticFront:
|
|
837
|
+
startOptimisticFront: vt,
|
|
811
838
|
commitFront: b,
|
|
812
|
-
commitMove:
|
|
839
|
+
commitMove: Zt,
|
|
813
840
|
commitResize: Jt,
|
|
814
|
-
commitStickyFront:
|
|
841
|
+
commitStickyFront: L,
|
|
815
842
|
commitStickyMove: Qt,
|
|
816
843
|
commitStickyResize: te,
|
|
817
844
|
commitAnnotationMove: ee,
|
|
818
845
|
commitAnnotationResize: ne,
|
|
819
846
|
commitBackgroundMove: oe,
|
|
820
|
-
commitBackgroundResize:
|
|
821
|
-
commitViewport:
|
|
822
|
-
cancelViewportNavigation:
|
|
847
|
+
commitBackgroundResize: ce,
|
|
848
|
+
commitViewport: Z,
|
|
849
|
+
cancelViewportNavigation: de
|
|
823
850
|
},
|
|
824
851
|
hud: {
|
|
825
852
|
zoomIn: () => _t("in"),
|
|
@@ -835,58 +862,58 @@ function _n(o) {
|
|
|
835
862
|
},
|
|
836
863
|
navigation: {
|
|
837
864
|
handleArrowNavigation: (e) => {
|
|
838
|
-
const t =
|
|
865
|
+
const t = B(), n = [
|
|
839
866
|
...x(),
|
|
840
|
-
...R().map((
|
|
841
|
-
].sort(
|
|
867
|
+
...R().map((c) => Qe(c))
|
|
868
|
+
].sort(Ze), i = Re(
|
|
842
869
|
n,
|
|
843
870
|
t?.kind === "widget" || t?.kind === "sticky_note" ? t.id : null,
|
|
844
871
|
e,
|
|
845
872
|
Object.fromEntries(
|
|
846
|
-
n.map((
|
|
847
|
-
|
|
848
|
-
|
|
873
|
+
n.map((c) => [
|
|
874
|
+
At(c) ? c.type : "sticky_note",
|
|
875
|
+
At(c) ? z()[c.type] !== !1 : z()[Ne] !== !1
|
|
849
876
|
])
|
|
850
877
|
)
|
|
851
878
|
);
|
|
852
|
-
i && (x().some((
|
|
879
|
+
i && (x().some((c) => c.id === i.id) ? O(i) : mt(i.id));
|
|
853
880
|
},
|
|
854
881
|
centerOnWidget: J,
|
|
855
|
-
focusWidget:
|
|
856
|
-
fitWidget: (e) => (
|
|
857
|
-
overviewWidget: (e) => (
|
|
882
|
+
focusWidget: O,
|
|
883
|
+
fitWidget: (e) => (p(e.id), b(e.id), he(e), e),
|
|
884
|
+
overviewWidget: (e) => (p(e.id), b(e.id), xe(e), e)
|
|
858
885
|
},
|
|
859
886
|
selection: {
|
|
860
887
|
clear: yt
|
|
861
888
|
},
|
|
862
889
|
widgetActions: {
|
|
863
890
|
deleteSelected: () => {
|
|
864
|
-
const e =
|
|
865
|
-
e && (e.kind === "widget" && K(e.id), e.kind === "sticky_note" &&
|
|
891
|
+
const e = B();
|
|
892
|
+
e && (e.kind === "widget" && K(e.id), e.kind === "sticky_note" && q(e.id), e.kind === "annotation" && G(e.id), e.kind === "background_layer" && $(e.id));
|
|
866
893
|
},
|
|
867
894
|
deleteWidget: K,
|
|
868
|
-
deleteStickyNote:
|
|
895
|
+
deleteStickyNote: q,
|
|
869
896
|
deleteAnnotation: G,
|
|
870
897
|
deleteBackgroundLayer: $,
|
|
871
|
-
addWidget:
|
|
872
|
-
|
|
873
|
-
|
|
898
|
+
addWidget: $t,
|
|
899
|
+
addWidgetAtWorldTopLeft: lt,
|
|
900
|
+
addWidgetAtWorldCenter: H,
|
|
874
901
|
addStickyNoteAtCursor: V,
|
|
875
902
|
addTextAnnotationAtCursor: U,
|
|
876
903
|
duplicateTextAnnotationFrom: ut,
|
|
877
|
-
addBackgroundLayerAtCursor:
|
|
904
|
+
addBackgroundLayerAtCursor: P,
|
|
878
905
|
duplicateBackgroundLayerFrom: gt,
|
|
879
906
|
createActiveToolAt: me,
|
|
880
907
|
ensureWidget: (e, t) => {
|
|
881
908
|
const n = A(e);
|
|
882
909
|
if (n)
|
|
883
|
-
return
|
|
884
|
-
const i = we(),
|
|
910
|
+
return O(n, { centerViewport: t?.centerViewport ?? !0 });
|
|
911
|
+
const i = we(), c = H(
|
|
885
912
|
e,
|
|
886
913
|
t?.worldX ?? i.worldX,
|
|
887
914
|
t?.worldY ?? i.worldY
|
|
888
915
|
);
|
|
889
|
-
return (t?.centerViewport ?? !0) &&
|
|
916
|
+
return (t?.centerViewport ?? !0) && c && J(c), c;
|
|
890
917
|
},
|
|
891
918
|
updateStickyNote: kt,
|
|
892
919
|
updateTextAnnotation: ie,
|
|
@@ -894,8 +921,8 @@ function _n(o) {
|
|
|
894
921
|
},
|
|
895
922
|
queries: {
|
|
896
923
|
findWidgetByType: A,
|
|
897
|
-
findWidgetById:
|
|
898
|
-
findStickyNoteById:
|
|
924
|
+
findWidgetById: Ut,
|
|
925
|
+
findStickyNoteById: E,
|
|
899
926
|
findAnnotationById: at,
|
|
900
927
|
findBackgroundLayerById: st
|
|
901
928
|
},
|
|
@@ -909,7 +936,7 @@ function _n(o) {
|
|
|
909
936
|
setActiveTool: ye
|
|
910
937
|
},
|
|
911
938
|
handleCloseRequest: () => {
|
|
912
|
-
if (
|
|
939
|
+
if (d()) {
|
|
913
940
|
l();
|
|
914
941
|
return;
|
|
915
942
|
}
|
|
@@ -918,5 +945,5 @@ function _n(o) {
|
|
|
918
945
|
};
|
|
919
946
|
}
|
|
920
947
|
export {
|
|
921
|
-
|
|
948
|
+
xn as useWorkbenchModel
|
|
922
949
|
};
|