@floegence/floe-webapp-core 0.36.44 → 0.36.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/InfiniteCanvas.js +39 -39
- package/dist/components/workbench/WorkbenchCanvas.js +195 -100
- package/dist/components/workbench/WorkbenchCanvasField.d.ts +6 -0
- package/dist/components/workbench/WorkbenchCanvasField.js +142 -123
- package/dist/components/workbench/WorkbenchFilterBar.js +10 -10
- package/dist/components/workbench/WorkbenchLayerObjects.d.ts +9 -0
- package/dist/components/workbench/WorkbenchLayerObjects.js +820 -612
- package/dist/components/workbench/WorkbenchSurface.js +3 -0
- package/dist/components/workbench/WorkbenchWidget.js +299 -292
- package/dist/components/workbench/useWorkbenchModel.js +250 -237
- package/dist/components/workbench/workbenchHelpers.d.ts +21 -2
- package/dist/components/workbench/workbenchHelpers.js +305 -259
- package/dist/components/workbench/workbenchOwnerSafeAccessors.d.ts +2 -0
- package/dist/components/workbench/workbenchOwnerSafeAccessors.js +10 -0
- package/dist/styles.css +1 -1
- package/dist/workbench.css +136 -15
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ResolvedWorkbenchInteractionAdapter } from './workbenchInteractionAdapter';
|
|
2
2
|
import { type WorkbenchWidgetItem, type WorkbenchAnnotationItem, type WorkbenchBackgroundLayer, type WorkbenchInteractionAdapter, type WorkbenchSelection, type WorkbenchStickyNoteItem, type WorkbenchTextAnnotationPatch, type WorkbenchViewport, type WorkbenchWidgetDefinition } from './types';
|
|
3
|
+
import { type WorkbenchLayerGeometryPreview, type WorkbenchTextEditorRegistry } from './WorkbenchLayerObjects';
|
|
3
4
|
export interface WorkbenchCanvasFieldProps {
|
|
4
5
|
widgetDefinitions: readonly WorkbenchWidgetDefinition[];
|
|
5
6
|
widgets: readonly WorkbenchWidgetItem[];
|
|
@@ -13,6 +14,8 @@ export interface WorkbenchCanvasFieldProps {
|
|
|
13
14
|
workLayerLocked?: boolean;
|
|
14
15
|
annotationLayerEditable?: boolean;
|
|
15
16
|
backgroundLayerEditable?: boolean;
|
|
17
|
+
showRegionOutlines?: boolean;
|
|
18
|
+
renderFreeformLayers?: boolean;
|
|
16
19
|
viewportScale: number;
|
|
17
20
|
locked: boolean;
|
|
18
21
|
filters: Record<string, boolean>;
|
|
@@ -74,5 +77,8 @@ export interface WorkbenchCanvasFieldProps {
|
|
|
74
77
|
onRequestDelete: (widgetId: string) => void;
|
|
75
78
|
onLayoutInteractionStart?: () => void;
|
|
76
79
|
onLayoutInteractionEnd?: () => void;
|
|
80
|
+
layerGeometryPreview?: WorkbenchLayerGeometryPreview | null;
|
|
81
|
+
onLayerGeometryPreview?: (preview: WorkbenchLayerGeometryPreview | null) => void;
|
|
82
|
+
textEditorRegistry?: WorkbenchTextEditorRegistry;
|
|
77
83
|
}
|
|
78
84
|
export declare function WorkbenchCanvasField(props: WorkbenchCanvasFieldProps): import("solid-js").JSX.Element;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { createMemo as
|
|
3
|
-
import { resolveWorkbenchInteractionAdapter as
|
|
4
|
-
import { WORKBENCH_BACKGROUND_REGION_FILTER_ID as
|
|
5
|
-
import { createWorkbenchRenderLayerMap as
|
|
6
|
-
import { getWidgetEntry as
|
|
7
|
-
import { WorkbenchWidget as
|
|
8
|
-
import { WorkbenchBackgroundLayerView as
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
1
|
+
import { insert as m, memo as u, createComponent as d, effect as O, template as M } from "solid-js/web";
|
|
2
|
+
import { createMemo as a, createSignal as E, For as I } from "solid-js";
|
|
3
|
+
import { resolveWorkbenchInteractionAdapter as x } from "./workbenchInteractionAdapter.js";
|
|
4
|
+
import { WORKBENCH_BACKGROUND_REGION_FILTER_ID as B, WORKBENCH_TEXT_FILTER_ID as N, WORKBENCH_STICKY_FILTER_ID as _ } from "./types.js";
|
|
5
|
+
import { createWorkbenchRenderLayerMap as s } from "./workbenchHelpers.js";
|
|
6
|
+
import { getWidgetEntry as A } from "./widgets/widgetRegistry.js";
|
|
7
|
+
import { WorkbenchWidget as D } from "./WorkbenchWidget.js";
|
|
8
|
+
import { WorkbenchBackgroundLayerView as G, WorkbenchAnnotationLayerView as T, WorkbenchLayerControlOverlayView as j, createWorkbenchTextEditorRegistry as q, WorkbenchStickyNote as z } from "./WorkbenchLayerObjects.js";
|
|
9
|
+
var P = /* @__PURE__ */ M("<div class=workbench-canvas__field><div class=workbench-canvas__grid aria-hidden=true></div><div class=workbench-work-layer>");
|
|
10
|
+
function U(e) {
|
|
11
|
+
const c = a((o) => {
|
|
12
|
+
const l = e.widgetById().get(e.widgetId);
|
|
13
|
+
if (l) return l;
|
|
14
14
|
if (o) return o;
|
|
15
15
|
throw new Error(`Workbench widget ${e.widgetId} is missing from the render map.`);
|
|
16
|
-
}), n =
|
|
17
|
-
return d(
|
|
16
|
+
}), n = a(() => A(c().type, e.widgetDefinitions));
|
|
17
|
+
return d(D, {
|
|
18
18
|
get definition() {
|
|
19
19
|
return n();
|
|
20
20
|
},
|
|
@@ -22,27 +22,27 @@ function z(e) {
|
|
|
22
22
|
return e.widgetId;
|
|
23
23
|
},
|
|
24
24
|
get widgetTitle() {
|
|
25
|
-
return
|
|
25
|
+
return c().title;
|
|
26
26
|
},
|
|
27
27
|
get widgetType() {
|
|
28
|
-
return
|
|
28
|
+
return c().type;
|
|
29
29
|
},
|
|
30
30
|
get x() {
|
|
31
|
-
return
|
|
31
|
+
return c().x;
|
|
32
32
|
},
|
|
33
33
|
get y() {
|
|
34
|
-
return
|
|
34
|
+
return c().y;
|
|
35
35
|
},
|
|
36
36
|
get width() {
|
|
37
|
-
return
|
|
37
|
+
return c().width;
|
|
38
38
|
},
|
|
39
39
|
get height() {
|
|
40
|
-
return
|
|
40
|
+
return c().height;
|
|
41
41
|
},
|
|
42
42
|
get renderLayer() {
|
|
43
43
|
return e.renderLayers().byWidgetId.get(e.widgetId) ?? 1;
|
|
44
44
|
},
|
|
45
|
-
itemSnapshot:
|
|
45
|
+
itemSnapshot: c,
|
|
46
46
|
get selected() {
|
|
47
47
|
return e.selectedWidgetId === e.widgetId;
|
|
48
48
|
},
|
|
@@ -59,7 +59,7 @@ function z(e) {
|
|
|
59
59
|
return e.locked;
|
|
60
60
|
},
|
|
61
61
|
get filtered() {
|
|
62
|
-
return u(() => !e.workLayerLocked)() && e.filters[
|
|
62
|
+
return u(() => !e.workLayerLocked)() && e.filters[c().type] === !1;
|
|
63
63
|
},
|
|
64
64
|
get interactionAdapter() {
|
|
65
65
|
return e.interactionAdapter;
|
|
@@ -108,16 +108,16 @@ function z(e) {
|
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
const
|
|
111
|
+
function V(e) {
|
|
112
|
+
const c = a((n) => {
|
|
113
113
|
const o = e.stickyNoteById().get(e.noteId);
|
|
114
114
|
if (o) return o;
|
|
115
115
|
if (n) return n;
|
|
116
116
|
throw new Error(`Workbench sticky note ${e.noteId} is missing from the render map.`);
|
|
117
117
|
});
|
|
118
|
-
return d(
|
|
118
|
+
return d(z, {
|
|
119
119
|
get item() {
|
|
120
|
-
return
|
|
120
|
+
return c();
|
|
121
121
|
},
|
|
122
122
|
get selected() {
|
|
123
123
|
return u(() => e.selectedObject?.kind === "sticky_note")() && e.selectedObject.id === e.noteId;
|
|
@@ -156,64 +156,75 @@ function T(e) {
|
|
|
156
156
|
}
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
const
|
|
159
|
+
function p(e) {
|
|
160
|
+
const c = a(() => x(e.interactionAdapter)), n = a(() => e.widgets.map((i) => i.id)), o = a(() => new Map(e.widgets.map((i) => [i.id, i]))), l = a(() => (e.stickyNotes ?? []).map((i) => i.id)), f = a(() => new Map((e.stickyNotes ?? []).map((i) => [i.id, i]))), R = q(), S = a(() => e.textEditorRegistry ?? R), v = a(() => s([...e.widgets, ...e.stickyNotes ?? []])), b = a(() => e.selectedObject?.kind === "widget" ? e.selectedObject.id : e.selectedWidgetId), L = a(() => e.locked || !!e.workLayerLocked), [W, h] = E(null), y = a(() => e.layerGeometryPreview === void 0 ? W() : e.layerGeometryPreview), k = (i) => {
|
|
161
|
+
if (e.onLayerGeometryPreview) {
|
|
162
|
+
e.onLayerGeometryPreview(i);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
h(i);
|
|
166
|
+
}, C = a(() => e.renderFreeformLayers !== !1);
|
|
161
167
|
return (() => {
|
|
162
|
-
var
|
|
163
|
-
return
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
168
|
+
var i = P(), F = i.firstChild, w = F.nextSibling;
|
|
169
|
+
return m(i, (() => {
|
|
170
|
+
var g = u(() => !!C());
|
|
171
|
+
return () => g() ? [d(G, {
|
|
172
|
+
get items() {
|
|
173
|
+
return e.backgroundLayers ?? [];
|
|
174
|
+
},
|
|
175
|
+
get selectedObject() {
|
|
176
|
+
return e.selectedObject ?? null;
|
|
177
|
+
},
|
|
178
|
+
get editable() {
|
|
179
|
+
return u(() => !!e.backgroundLayerEditable)() && !e.locked;
|
|
180
|
+
},
|
|
181
|
+
get filtered() {
|
|
182
|
+
return e.filters[B] === !1;
|
|
183
|
+
},
|
|
184
|
+
get preview() {
|
|
185
|
+
return y();
|
|
186
|
+
},
|
|
187
|
+
onPreviewGeometry: k,
|
|
188
|
+
get viewport() {
|
|
189
|
+
return e.viewport;
|
|
190
|
+
},
|
|
191
|
+
onSelect: (t) => e.onSelectBackgroundLayer?.(t),
|
|
192
|
+
onContextMenu: (t, r) => e.onBackgroundLayerContextMenu?.(t, r),
|
|
193
|
+
onCommitMove: (t, r) => e.onCommitBackgroundMove?.(t, r)
|
|
194
|
+
}), d(T, {
|
|
195
|
+
get items() {
|
|
196
|
+
return e.annotations ?? [];
|
|
197
|
+
},
|
|
198
|
+
get selectedObject() {
|
|
199
|
+
return e.selectedObject ?? null;
|
|
200
|
+
},
|
|
201
|
+
get editable() {
|
|
202
|
+
return u(() => !!e.annotationLayerEditable)() && !e.locked;
|
|
203
|
+
},
|
|
204
|
+
get filtered() {
|
|
205
|
+
return e.filters[N] === !1;
|
|
206
|
+
},
|
|
207
|
+
get preview() {
|
|
208
|
+
return y();
|
|
209
|
+
},
|
|
210
|
+
onPreviewGeometry: k,
|
|
211
|
+
get textEditorRegistry() {
|
|
212
|
+
return S();
|
|
213
|
+
},
|
|
214
|
+
get viewport() {
|
|
215
|
+
return e.viewport;
|
|
216
|
+
},
|
|
217
|
+
onSelect: (t) => e.onSelectAnnotation?.(t),
|
|
218
|
+
onContextMenu: (t, r) => e.onAnnotationContextMenu?.(t, r),
|
|
219
|
+
onCommitMove: (t, r) => e.onCommitAnnotationMove?.(t, r),
|
|
220
|
+
onUpdate: (t, r) => e.onUpdateTextAnnotation?.(t, r)
|
|
221
|
+
})] : null;
|
|
222
|
+
})(), w), m(w, d(I, {
|
|
212
223
|
get each() {
|
|
213
224
|
return n();
|
|
214
225
|
},
|
|
215
|
-
children: (
|
|
216
|
-
widgetId:
|
|
226
|
+
children: (g) => d(U, {
|
|
227
|
+
widgetId: g,
|
|
217
228
|
get widgetDefinitions() {
|
|
218
229
|
return e.widgetDefinitions;
|
|
219
230
|
},
|
|
@@ -221,12 +232,12 @@ function X(e) {
|
|
|
221
232
|
return e.widgets;
|
|
222
233
|
},
|
|
223
234
|
widgetById: o,
|
|
224
|
-
renderLayers:
|
|
235
|
+
renderLayers: v,
|
|
225
236
|
get viewport() {
|
|
226
237
|
return e.viewport;
|
|
227
238
|
},
|
|
228
239
|
get selectedWidgetId() {
|
|
229
|
-
return
|
|
240
|
+
return b();
|
|
230
241
|
},
|
|
231
242
|
get optimisticFrontWidgetId() {
|
|
232
243
|
return e.optimisticFrontWidgetId;
|
|
@@ -235,13 +246,13 @@ function X(e) {
|
|
|
235
246
|
return e.viewportScale;
|
|
236
247
|
},
|
|
237
248
|
get locked() {
|
|
238
|
-
return
|
|
249
|
+
return L();
|
|
239
250
|
},
|
|
240
251
|
get filters() {
|
|
241
252
|
return e.filters;
|
|
242
253
|
},
|
|
243
254
|
get interactionAdapter() {
|
|
244
|
-
return
|
|
255
|
+
return c();
|
|
245
256
|
},
|
|
246
257
|
get onSelectWidget() {
|
|
247
258
|
return e.onSelectWidget;
|
|
@@ -283,13 +294,13 @@ function X(e) {
|
|
|
283
294
|
return e.onLayoutInteractionEnd;
|
|
284
295
|
}
|
|
285
296
|
})
|
|
286
|
-
}), null),
|
|
297
|
+
}), null), m(w, d(I, {
|
|
287
298
|
get each() {
|
|
288
|
-
return
|
|
299
|
+
return l();
|
|
289
300
|
},
|
|
290
|
-
children: (
|
|
291
|
-
noteId:
|
|
292
|
-
stickyNoteById:
|
|
301
|
+
children: (g) => d(V, {
|
|
302
|
+
noteId: g,
|
|
303
|
+
stickyNoteById: f,
|
|
293
304
|
get selectedObject() {
|
|
294
305
|
return e.selectedObject;
|
|
295
306
|
},
|
|
@@ -300,10 +311,10 @@ function X(e) {
|
|
|
300
311
|
return e.viewportScale;
|
|
301
312
|
},
|
|
302
313
|
get locked() {
|
|
303
|
-
return
|
|
314
|
+
return L();
|
|
304
315
|
},
|
|
305
316
|
get filtered() {
|
|
306
|
-
return u(() => !e.workLayerLocked)() && e.filters[
|
|
317
|
+
return u(() => !e.workLayerLocked)() && e.filters[_] === !1;
|
|
307
318
|
},
|
|
308
319
|
get onSelectStickyNote() {
|
|
309
320
|
return e.onSelectStickyNote;
|
|
@@ -335,39 +346,47 @@ function X(e) {
|
|
|
335
346
|
get onLayoutInteractionEnd() {
|
|
336
347
|
return e.onLayoutInteractionEnd;
|
|
337
348
|
},
|
|
338
|
-
renderLayers:
|
|
349
|
+
renderLayers: v
|
|
339
350
|
})
|
|
340
|
-
}), null),
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
351
|
+
}), null), m(i, (() => {
|
|
352
|
+
var g = u(() => !!C());
|
|
353
|
+
return () => g() ? d(j, {
|
|
354
|
+
get annotations() {
|
|
355
|
+
return e.annotations ?? [];
|
|
356
|
+
},
|
|
357
|
+
get backgroundLayers() {
|
|
358
|
+
return e.backgroundLayers ?? [];
|
|
359
|
+
},
|
|
360
|
+
get selectedObject() {
|
|
361
|
+
return e.selectedObject ?? null;
|
|
362
|
+
},
|
|
363
|
+
get editable() {
|
|
364
|
+
return u(() => !!(e.annotationLayerEditable || e.backgroundLayerEditable))() && !e.locked;
|
|
365
|
+
},
|
|
366
|
+
get showRegionOutlines() {
|
|
367
|
+
return !!e.showRegionOutlines;
|
|
368
|
+
},
|
|
369
|
+
get viewport() {
|
|
370
|
+
return e.viewport;
|
|
371
|
+
},
|
|
372
|
+
get preview() {
|
|
373
|
+
return y();
|
|
374
|
+
},
|
|
375
|
+
onPreviewGeometry: k,
|
|
376
|
+
get textEditorRegistry() {
|
|
377
|
+
return S();
|
|
378
|
+
},
|
|
379
|
+
onCommitAnnotationMove: (t, r) => e.onCommitAnnotationMove?.(t, r),
|
|
380
|
+
onCommitAnnotationResize: (t, r) => e.onCommitAnnotationResize?.(t, r),
|
|
381
|
+
onUpdateTextAnnotation: (t, r) => e.onUpdateTextAnnotation?.(t, r),
|
|
382
|
+
onDeleteAnnotation: (t) => e.onDeleteAnnotation?.(t),
|
|
383
|
+
onCommitBackgroundResize: (t, r) => e.onCommitBackgroundResize?.(t, r),
|
|
384
|
+
onUpdateBackgroundLayer: (t, r) => e.onUpdateBackgroundLayer?.(t, r),
|
|
385
|
+
onDeleteBackgroundLayer: (t) => e.onDeleteBackgroundLayer?.(t)
|
|
386
|
+
}) : null;
|
|
387
|
+
})(), null), O(() => i.classList.toggle("is-work-layer-muted", !!e.workLayerLocked)), i;
|
|
369
388
|
})();
|
|
370
389
|
}
|
|
371
390
|
export {
|
|
372
|
-
|
|
391
|
+
p as WorkbenchCanvasField
|
|
373
392
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { insert as h, createComponent as d, effect as
|
|
1
|
+
import { insert as h, createComponent as d, effect as A, setAttribute as x, memo as le, template as I, Portal as se, setStyleProperty as de, use as ue, delegateEvents as ge } from "solid-js/web";
|
|
2
2
|
import { createSignal as F, onCleanup as z, createEffect as ve, createMemo as W, Show as N, For as j } from "solid-js";
|
|
3
3
|
import { Motion as X } from "../../node_modules/.pnpm/solid-motionone@1.0.4_solid-js@1.9.11/node_modules/solid-motionone/dist/index.js";
|
|
4
4
|
import { easing as H, duration as Y } from "../../utils/animations.js";
|
|
@@ -14,8 +14,8 @@ const J = 5, pe = ".workbench-dock", K = [{
|
|
|
14
14
|
icon: fe
|
|
15
15
|
}, {
|
|
16
16
|
mode: "background",
|
|
17
|
-
label: "
|
|
18
|
-
description: "
|
|
17
|
+
label: "Composition Mode",
|
|
18
|
+
description: "Arrange regions and canvas text",
|
|
19
19
|
icon: Z
|
|
20
20
|
}], ye = [{
|
|
21
21
|
tool: "sticky-note",
|
|
@@ -118,9 +118,9 @@ function $e(t) {
|
|
|
118
118
|
get children() {
|
|
119
119
|
return t.label;
|
|
120
120
|
}
|
|
121
|
-
}), null),
|
|
121
|
+
}), null), A((n) => {
|
|
122
122
|
var w = !!t.active, k = !t.visible, v = !!a(), g = !!t.isDragging, f = `${t.label} — click to solo, drag to canvas to create`, C = t.active;
|
|
123
|
-
return w !== n.e && o.classList.toggle("is-active", n.e = w), k !== n.t && o.classList.toggle("is-filter-muted", n.t = k), v !== n.a && o.classList.toggle("is-hovered", n.a = v), g !== n.o && o.classList.toggle("is-source-dragging", n.o = g), f !== n.i &&
|
|
123
|
+
return w !== n.e && o.classList.toggle("is-active", n.e = w), k !== n.t && o.classList.toggle("is-filter-muted", n.t = k), v !== n.a && o.classList.toggle("is-hovered", n.a = v), g !== n.o && o.classList.toggle("is-source-dragging", n.o = g), f !== n.i && x(o, "aria-label", n.i = f), C !== n.n && x(o, "aria-pressed", n.n = C), n;
|
|
124
124
|
}, {
|
|
125
125
|
e: void 0,
|
|
126
126
|
t: void 0,
|
|
@@ -301,9 +301,9 @@ function Ke(t) {
|
|
|
301
301
|
t.onSelectMode?.(b.mode), w(!1);
|
|
302
302
|
}, h(_, d(c, {
|
|
303
303
|
class: "workbench-dock__mode-icon"
|
|
304
|
-
})), h($, () => b.label), h(D, () => b.description),
|
|
304
|
+
})), h($, () => b.label), h(D, () => b.description), A((O) => {
|
|
305
305
|
var y = M() === b.mode, R = M() === b.mode;
|
|
306
|
-
return y !== O.e && m.classList.toggle("is-active", O.e = y), R !== O.t &&
|
|
306
|
+
return y !== O.e && m.classList.toggle("is-active", O.e = y), R !== O.t && x(m, "aria-checked", O.t = R), O;
|
|
307
307
|
}, {
|
|
308
308
|
e: void 0,
|
|
309
309
|
t: void 0
|
|
@@ -348,9 +348,9 @@ function Ke(t) {
|
|
|
348
348
|
onDragBegin: P
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
|
-
}), null),
|
|
351
|
+
}), null), A((r) => {
|
|
352
352
|
var b = M() === "background", c = !!(p() || n()), m = n();
|
|
353
|
-
return b !== r.e && l.classList.toggle("is-active", r.e = b), c !== r.t && l.classList.toggle("is-hovered", r.t = c), m !== r.a &&
|
|
353
|
+
return b !== r.e && l.classList.toggle("is-active", r.e = b), c !== r.t && l.classList.toggle("is-hovered", r.t = c), m !== r.a && x(l, "aria-expanded", r.a = m), r;
|
|
354
354
|
}, {
|
|
355
355
|
e: void 0,
|
|
356
356
|
t: void 0,
|
|
@@ -387,7 +387,7 @@ function Re(t) {
|
|
|
387
387
|
}
|
|
388
388
|
})), h(f, u), h(C, d(be, {
|
|
389
389
|
class: "w-3 h-3"
|
|
390
|
-
}), E), h(E, () => a() ? "Drop to create" : "Drag onto canvas"),
|
|
390
|
+
}), E), h(E, () => a() ? "Drop to create" : "Drag onto canvas"), A((S) => {
|
|
391
391
|
var L = !!a(), P = s();
|
|
392
392
|
return L !== S.e && n.classList.toggle("is-over-canvas", S.e = L), P !== S.t && de(n, "transform", S.t = P), S;
|
|
393
393
|
}, {
|
|
@@ -8,6 +8,7 @@ export type WorkbenchLayerGeometryPreview = {
|
|
|
8
8
|
width: number;
|
|
9
9
|
height: number;
|
|
10
10
|
};
|
|
11
|
+
export type WorkbenchLayerProjectionMode = 'world' | 'screen';
|
|
11
12
|
export interface WorkbenchTextEditorHandle {
|
|
12
13
|
focus: () => void;
|
|
13
14
|
insertTextAtSelection: (text: string) => void;
|
|
@@ -51,6 +52,8 @@ export declare function WorkbenchTextAnnotation(props: {
|
|
|
51
52
|
selected: boolean;
|
|
52
53
|
editable: boolean;
|
|
53
54
|
viewportScale: number;
|
|
55
|
+
viewport?: WorkbenchViewport;
|
|
56
|
+
projection?: WorkbenchLayerProjectionMode;
|
|
54
57
|
preview?: WorkbenchLayerGeometryPreview | null;
|
|
55
58
|
onPreviewGeometry?: (preview: WorkbenchLayerGeometryPreview | null) => void;
|
|
56
59
|
textEditorRegistry?: WorkbenchTextEditorRegistry;
|
|
@@ -67,6 +70,8 @@ export declare function WorkbenchBackgroundRegion(props: {
|
|
|
67
70
|
selected: boolean;
|
|
68
71
|
editable: boolean;
|
|
69
72
|
viewportScale: number;
|
|
73
|
+
viewport?: WorkbenchViewport;
|
|
74
|
+
projection?: WorkbenchLayerProjectionMode;
|
|
70
75
|
preview?: WorkbenchLayerGeometryPreview | null;
|
|
71
76
|
onPreviewGeometry?: (preview: WorkbenchLayerGeometryPreview | null) => void;
|
|
72
77
|
onSelect: (layerId: string) => void;
|
|
@@ -81,6 +86,7 @@ export declare function WorkbenchBackgroundLayerView(props: {
|
|
|
81
86
|
selectedObject: WorkbenchSelection | null;
|
|
82
87
|
editable: boolean;
|
|
83
88
|
filtered: boolean;
|
|
89
|
+
projection?: WorkbenchLayerProjectionMode;
|
|
84
90
|
preview?: WorkbenchLayerGeometryPreview | null;
|
|
85
91
|
onPreviewGeometry?: (preview: WorkbenchLayerGeometryPreview | null) => void;
|
|
86
92
|
viewport: WorkbenchViewport;
|
|
@@ -96,6 +102,7 @@ export declare function WorkbenchAnnotationLayerView(props: {
|
|
|
96
102
|
selectedObject: WorkbenchSelection | null;
|
|
97
103
|
editable: boolean;
|
|
98
104
|
filtered: boolean;
|
|
105
|
+
projection?: WorkbenchLayerProjectionMode;
|
|
99
106
|
preview?: WorkbenchLayerGeometryPreview | null;
|
|
100
107
|
onPreviewGeometry?: (preview: WorkbenchLayerGeometryPreview | null) => void;
|
|
101
108
|
textEditorRegistry?: WorkbenchTextEditorRegistry;
|
|
@@ -113,6 +120,8 @@ export declare function WorkbenchLayerControlOverlayView(props: {
|
|
|
113
120
|
backgroundLayers: readonly WorkbenchBackgroundLayer[];
|
|
114
121
|
selectedObject: WorkbenchSelection | null;
|
|
115
122
|
editable: boolean;
|
|
123
|
+
showRegionOutlines?: boolean;
|
|
124
|
+
projection?: WorkbenchLayerProjectionMode;
|
|
116
125
|
viewport: WorkbenchViewport;
|
|
117
126
|
preview?: WorkbenchLayerGeometryPreview | null;
|
|
118
127
|
onPreviewGeometry?: (preview: WorkbenchLayerGeometryPreview | null) => void;
|