@floegence/floe-webapp-core 0.36.61 → 0.36.62
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/WorkbenchCanvas.d.ts +3 -3
- package/dist/components/workbench/WorkbenchCanvas.js +80 -80
- package/dist/components/workbench/WorkbenchCanvasField.d.ts +3 -3
- package/dist/components/workbench/WorkbenchCanvasField.js +77 -77
- package/dist/components/workbench/WorkbenchLayerObjects.d.ts +2 -2
- package/dist/components/workbench/WorkbenchLayerObjects.js +76 -76
- package/dist/components/workbench/WorkbenchSurface.js +19 -19
- package/dist/components/workbench/WorkbenchWidget.d.ts +2 -2
- package/dist/components/workbench/WorkbenchWidget.js +97 -93
- package/dist/components/workbench/useWorkbenchModel.d.ts +2 -2
- package/dist/components/workbench/useWorkbenchModel.js +373 -360
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { insert as l, memo as
|
|
2
|
-
import { createMemo as a, createSignal as E, For as
|
|
1
|
+
import { insert as l, memo as u, createComponent as c, effect as M, template as W } from "solid-js/web";
|
|
2
|
+
import { createMemo as a, createSignal as E, For as I } from "solid-js";
|
|
3
3
|
import { resolveWorkbenchInteractionAdapter as B } from "./workbenchInteractionAdapter.js";
|
|
4
4
|
import { WORKBENCH_BACKGROUND_REGION_FILTER_ID as x, WORKBENCH_TEXT_FILTER_ID as N, WORKBENCH_STICKY_FILTER_ID as _ } from "./types.js";
|
|
5
5
|
import { createWorkbenchRenderLayerMap as A } from "./workbenchHelpers.js";
|
|
6
6
|
import { getWidgetEntry as D } from "./widgets/widgetRegistry.js";
|
|
7
|
-
import { WorkbenchWidget as
|
|
8
|
-
import { WorkbenchPlacementPreview as
|
|
9
|
-
import { WorkbenchBackgroundLayerView as
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
const
|
|
7
|
+
import { WorkbenchWidget as V } from "./WorkbenchWidget.js";
|
|
8
|
+
import { WorkbenchPlacementPreview as s } from "./WorkbenchPlacementPreview.js";
|
|
9
|
+
import { WorkbenchBackgroundLayerView as P, WorkbenchAnnotationLayerView as j, WorkbenchLayerControlOverlayView as G, createWorkbenchTextEditorRegistry as T, WorkbenchStickyNote as q } from "./WorkbenchLayerObjects.js";
|
|
10
|
+
var z = /* @__PURE__ */ W("<div class=workbench-canvas__field><div class=workbench-canvas__grid aria-hidden=true></div><div class=workbench-work-layer>");
|
|
11
|
+
function U(e) {
|
|
12
|
+
const d = a((i) => {
|
|
13
13
|
const m = e.widgetById().get(e.widgetId);
|
|
14
14
|
if (m) return m;
|
|
15
|
-
if (
|
|
15
|
+
if (i) return i;
|
|
16
16
|
throw new Error(`Workbench widget ${e.widgetId} is missing from the render map.`);
|
|
17
|
-
}), n = a(() => D(
|
|
18
|
-
return
|
|
17
|
+
}), n = a(() => D(d().type, e.widgetDefinitions));
|
|
18
|
+
return c(V, {
|
|
19
19
|
get definition() {
|
|
20
20
|
return n();
|
|
21
21
|
},
|
|
@@ -23,32 +23,32 @@ function V(e) {
|
|
|
23
23
|
return e.widgetId;
|
|
24
24
|
},
|
|
25
25
|
get widgetTitle() {
|
|
26
|
-
return
|
|
26
|
+
return d().title;
|
|
27
27
|
},
|
|
28
28
|
get widgetType() {
|
|
29
|
-
return
|
|
29
|
+
return d().type;
|
|
30
30
|
},
|
|
31
31
|
get x() {
|
|
32
|
-
return
|
|
32
|
+
return d().x;
|
|
33
33
|
},
|
|
34
34
|
get y() {
|
|
35
|
-
return
|
|
35
|
+
return d().y;
|
|
36
36
|
},
|
|
37
37
|
get width() {
|
|
38
|
-
return
|
|
38
|
+
return d().width;
|
|
39
39
|
},
|
|
40
40
|
get height() {
|
|
41
|
-
return
|
|
41
|
+
return d().height;
|
|
42
42
|
},
|
|
43
43
|
get renderLayer() {
|
|
44
44
|
return e.renderLayers().byWidgetId.get(e.widgetId) ?? 1;
|
|
45
45
|
},
|
|
46
|
-
itemSnapshot:
|
|
46
|
+
itemSnapshot: d,
|
|
47
47
|
get selected() {
|
|
48
48
|
return e.selectedWidgetId === e.widgetId;
|
|
49
49
|
},
|
|
50
|
-
get
|
|
51
|
-
return e.
|
|
50
|
+
get visualFront() {
|
|
51
|
+
return e.visualFrontOwnerId === e.widgetId;
|
|
52
52
|
},
|
|
53
53
|
get motion() {
|
|
54
54
|
return e.widgetMotionById?.[e.widgetId] ?? null;
|
|
@@ -63,7 +63,7 @@ function V(e) {
|
|
|
63
63
|
return e.locked;
|
|
64
64
|
},
|
|
65
65
|
get filtered() {
|
|
66
|
-
return
|
|
66
|
+
return u(() => !e.workLayerLocked)() && e.filters[d().type] === !1;
|
|
67
67
|
},
|
|
68
68
|
get interactionAdapter() {
|
|
69
69
|
return e.interactionAdapter;
|
|
@@ -77,8 +77,8 @@ function V(e) {
|
|
|
77
77
|
get onContextMenu() {
|
|
78
78
|
return e.onWidgetContextMenu;
|
|
79
79
|
},
|
|
80
|
-
get
|
|
81
|
-
return e.
|
|
80
|
+
get onClaimVisualFrontOwner() {
|
|
81
|
+
return e.onClaimVisualFrontOwner;
|
|
82
82
|
},
|
|
83
83
|
get onCommitFront() {
|
|
84
84
|
return e.onCommitFront;
|
|
@@ -113,18 +113,18 @@ function V(e) {
|
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
function $(e) {
|
|
116
|
-
const
|
|
117
|
-
const
|
|
118
|
-
if (
|
|
116
|
+
const d = a((n) => {
|
|
117
|
+
const i = e.stickyNoteById().get(e.noteId);
|
|
118
|
+
if (i) return i;
|
|
119
119
|
if (n) return n;
|
|
120
120
|
throw new Error(`Workbench sticky note ${e.noteId} is missing from the render map.`);
|
|
121
121
|
});
|
|
122
|
-
return
|
|
122
|
+
return c(q, {
|
|
123
123
|
get item() {
|
|
124
|
-
return
|
|
124
|
+
return d();
|
|
125
125
|
},
|
|
126
126
|
get selected() {
|
|
127
|
-
return
|
|
127
|
+
return u(() => e.selectedObject?.kind === "sticky_note")() && e.selectedObject.id === e.noteId;
|
|
128
128
|
},
|
|
129
129
|
get viewportScale() {
|
|
130
130
|
return e.viewportScale;
|
|
@@ -141,16 +141,16 @@ function $(e) {
|
|
|
141
141
|
get filtered() {
|
|
142
142
|
return e.filtered;
|
|
143
143
|
},
|
|
144
|
-
get
|
|
145
|
-
return e.
|
|
144
|
+
get visualFront() {
|
|
145
|
+
return e.visualFrontOwnerId === e.noteId;
|
|
146
146
|
},
|
|
147
147
|
onSelect: (n) => e.onSelectStickyNote?.(n),
|
|
148
|
-
onContextMenu: (n,
|
|
149
|
-
|
|
148
|
+
onContextMenu: (n, i) => e.onStickyNoteContextMenu?.(n, i),
|
|
149
|
+
onClaimVisualFrontOwner: (n) => e.onClaimStickyVisualFrontOwner?.(n),
|
|
150
150
|
onCommitFront: (n) => e.onCommitStickyFront?.(n),
|
|
151
|
-
onCommitMove: (n,
|
|
152
|
-
onCommitResize: (n,
|
|
153
|
-
onUpdate: (n,
|
|
151
|
+
onCommitMove: (n, i) => e.onCommitStickyMove?.(n, i),
|
|
152
|
+
onCommitResize: (n, i) => e.onCommitStickyResize?.(n, i),
|
|
153
|
+
onUpdate: (n, i) => e.onUpdateStickyNote?.(n, i),
|
|
154
154
|
onDelete: (n) => e.onDeleteStickyNote?.(n),
|
|
155
155
|
get onLayoutInteractionStart() {
|
|
156
156
|
return e.onLayoutInteractionStart;
|
|
@@ -161,18 +161,18 @@ function $(e) {
|
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
function te(e) {
|
|
164
|
-
const
|
|
164
|
+
const d = a(() => B(e.interactionAdapter)), n = a(() => e.widgets.map((r) => r.id)), i = a(() => new Map(e.widgets.map((r) => [r.id, r]))), m = a(() => (e.stickyNotes ?? []).map((r) => r.id)), f = a(() => new Map((e.stickyNotes ?? []).map((r) => [r.id, r]))), R = T(), v = a(() => e.textEditorRegistry ?? R), C = a(() => A([...e.widgets, ...e.stickyNotes ?? []])), b = a(() => e.selectedObject?.kind === "widget" ? e.selectedObject.id : e.selectedWidgetId), L = a(() => e.locked || !!e.workLayerLocked), [O, h] = E(null), y = a(() => e.layerGeometryPreview === void 0 ? O() : e.layerGeometryPreview), w = (r) => {
|
|
165
165
|
if (e.onLayerGeometryPreview) {
|
|
166
166
|
e.onLayerGeometryPreview(r);
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
169
|
h(r);
|
|
170
|
-
},
|
|
170
|
+
}, S = a(() => e.renderFreeformLayers !== !1);
|
|
171
171
|
return (() => {
|
|
172
|
-
var r =
|
|
172
|
+
var r = z(), F = r.firstChild, k = F.nextSibling;
|
|
173
173
|
return l(r, (() => {
|
|
174
|
-
var
|
|
175
|
-
return () =>
|
|
174
|
+
var g = u(() => !!S());
|
|
175
|
+
return () => g() ? [c(P, {
|
|
176
176
|
get items() {
|
|
177
177
|
return e.backgroundLayers ?? [];
|
|
178
178
|
},
|
|
@@ -180,7 +180,7 @@ function te(e) {
|
|
|
180
180
|
return e.selectedObject ?? null;
|
|
181
181
|
},
|
|
182
182
|
get editable() {
|
|
183
|
-
return
|
|
183
|
+
return u(() => !!e.backgroundLayerEditable)() && !e.locked;
|
|
184
184
|
},
|
|
185
185
|
get filtered() {
|
|
186
186
|
return e.filters[x] === !1;
|
|
@@ -193,9 +193,9 @@ function te(e) {
|
|
|
193
193
|
return e.viewport;
|
|
194
194
|
},
|
|
195
195
|
onSelect: (t) => e.onSelectBackgroundLayer?.(t),
|
|
196
|
-
onContextMenu: (t,
|
|
197
|
-
onCommitMove: (t,
|
|
198
|
-
}),
|
|
196
|
+
onContextMenu: (t, o) => e.onBackgroundLayerContextMenu?.(t, o),
|
|
197
|
+
onCommitMove: (t, o) => e.onCommitBackgroundMove?.(t, o)
|
|
198
|
+
}), c(j, {
|
|
199
199
|
get items() {
|
|
200
200
|
return e.annotations ?? [];
|
|
201
201
|
},
|
|
@@ -203,7 +203,7 @@ function te(e) {
|
|
|
203
203
|
return e.selectedObject ?? null;
|
|
204
204
|
},
|
|
205
205
|
get editable() {
|
|
206
|
-
return
|
|
206
|
+
return u(() => !!e.annotationLayerEditable)() && !e.locked;
|
|
207
207
|
},
|
|
208
208
|
get filtered() {
|
|
209
209
|
return e.filters[N] === !1;
|
|
@@ -219,32 +219,32 @@ function te(e) {
|
|
|
219
219
|
return e.viewport;
|
|
220
220
|
},
|
|
221
221
|
onSelect: (t) => e.onSelectAnnotation?.(t),
|
|
222
|
-
onContextMenu: (t,
|
|
223
|
-
onCommitMove: (t,
|
|
224
|
-
onUpdate: (t,
|
|
222
|
+
onContextMenu: (t, o) => e.onAnnotationContextMenu?.(t, o),
|
|
223
|
+
onCommitMove: (t, o) => e.onCommitAnnotationMove?.(t, o),
|
|
224
|
+
onUpdate: (t, o) => e.onUpdateTextAnnotation?.(t, o)
|
|
225
225
|
})] : null;
|
|
226
|
-
})(), k), l(k,
|
|
226
|
+
})(), k), l(k, c(I, {
|
|
227
227
|
get each() {
|
|
228
228
|
return n();
|
|
229
229
|
},
|
|
230
|
-
children: (
|
|
231
|
-
widgetId:
|
|
230
|
+
children: (g) => c(U, {
|
|
231
|
+
widgetId: g,
|
|
232
232
|
get widgetDefinitions() {
|
|
233
233
|
return e.widgetDefinitions;
|
|
234
234
|
},
|
|
235
235
|
get widgets() {
|
|
236
236
|
return e.widgets;
|
|
237
237
|
},
|
|
238
|
-
widgetById:
|
|
239
|
-
renderLayers:
|
|
238
|
+
widgetById: i,
|
|
239
|
+
renderLayers: C,
|
|
240
240
|
get viewport() {
|
|
241
241
|
return e.viewport;
|
|
242
242
|
},
|
|
243
243
|
get selectedWidgetId() {
|
|
244
244
|
return b();
|
|
245
245
|
},
|
|
246
|
-
get
|
|
247
|
-
return e.
|
|
246
|
+
get visualFrontOwnerId() {
|
|
247
|
+
return e.visualFrontOwnerId;
|
|
248
248
|
},
|
|
249
249
|
get viewportScale() {
|
|
250
250
|
return e.viewportScale;
|
|
@@ -259,7 +259,7 @@ function te(e) {
|
|
|
259
259
|
return e.widgetMotionById;
|
|
260
260
|
},
|
|
261
261
|
get interactionAdapter() {
|
|
262
|
-
return
|
|
262
|
+
return d();
|
|
263
263
|
},
|
|
264
264
|
get onSelectWidget() {
|
|
265
265
|
return e.onSelectWidget;
|
|
@@ -267,8 +267,8 @@ function te(e) {
|
|
|
267
267
|
get onWidgetContextMenu() {
|
|
268
268
|
return e.onWidgetContextMenu;
|
|
269
269
|
},
|
|
270
|
-
get
|
|
271
|
-
return e.
|
|
270
|
+
get onClaimVisualFrontOwner() {
|
|
271
|
+
return e.onClaimVisualFrontOwner;
|
|
272
272
|
},
|
|
273
273
|
get onCommitFront() {
|
|
274
274
|
return e.onCommitFront;
|
|
@@ -301,18 +301,18 @@ function te(e) {
|
|
|
301
301
|
return e.onLayoutInteractionEnd;
|
|
302
302
|
}
|
|
303
303
|
})
|
|
304
|
-
}), null), l(k,
|
|
304
|
+
}), null), l(k, c(I, {
|
|
305
305
|
get each() {
|
|
306
306
|
return m();
|
|
307
307
|
},
|
|
308
|
-
children: (
|
|
309
|
-
noteId:
|
|
308
|
+
children: (g) => c($, {
|
|
309
|
+
noteId: g,
|
|
310
310
|
stickyNoteById: f,
|
|
311
311
|
get selectedObject() {
|
|
312
312
|
return e.selectedObject;
|
|
313
313
|
},
|
|
314
|
-
get
|
|
315
|
-
return e.
|
|
314
|
+
get visualFrontOwnerId() {
|
|
315
|
+
return e.visualFrontOwnerId;
|
|
316
316
|
},
|
|
317
317
|
get viewportScale() {
|
|
318
318
|
return e.viewportScale;
|
|
@@ -321,7 +321,7 @@ function te(e) {
|
|
|
321
321
|
return L();
|
|
322
322
|
},
|
|
323
323
|
get filtered() {
|
|
324
|
-
return
|
|
324
|
+
return u(() => !e.workLayerLocked)() && e.filters[_] === !1;
|
|
325
325
|
},
|
|
326
326
|
get onSelectStickyNote() {
|
|
327
327
|
return e.onSelectStickyNote;
|
|
@@ -329,8 +329,8 @@ function te(e) {
|
|
|
329
329
|
get onStickyNoteContextMenu() {
|
|
330
330
|
return e.onStickyNoteContextMenu;
|
|
331
331
|
},
|
|
332
|
-
get
|
|
333
|
-
return e.
|
|
332
|
+
get onClaimStickyVisualFrontOwner() {
|
|
333
|
+
return e.onClaimStickyVisualFrontOwner;
|
|
334
334
|
},
|
|
335
335
|
get onCommitStickyFront() {
|
|
336
336
|
return e.onCommitStickyFront;
|
|
@@ -353,11 +353,11 @@ function te(e) {
|
|
|
353
353
|
get onLayoutInteractionEnd() {
|
|
354
354
|
return e.onLayoutInteractionEnd;
|
|
355
355
|
},
|
|
356
|
-
renderLayers:
|
|
356
|
+
renderLayers: C
|
|
357
357
|
})
|
|
358
358
|
}), null), l(r, (() => {
|
|
359
|
-
var
|
|
360
|
-
return () =>
|
|
359
|
+
var g = u(() => !!S());
|
|
360
|
+
return () => g() ? c(G, {
|
|
361
361
|
get annotations() {
|
|
362
362
|
return e.annotations ?? [];
|
|
363
363
|
},
|
|
@@ -368,7 +368,7 @@ function te(e) {
|
|
|
368
368
|
return e.selectedObject ?? null;
|
|
369
369
|
},
|
|
370
370
|
get editable() {
|
|
371
|
-
return
|
|
371
|
+
return u(() => !!(e.annotationLayerEditable || e.backgroundLayerEditable))() && !e.locked;
|
|
372
372
|
},
|
|
373
373
|
get showRegionOutlines() {
|
|
374
374
|
return !!e.showRegionOutlines;
|
|
@@ -383,15 +383,15 @@ function te(e) {
|
|
|
383
383
|
get textEditorRegistry() {
|
|
384
384
|
return v();
|
|
385
385
|
},
|
|
386
|
-
onCommitAnnotationMove: (t,
|
|
387
|
-
onCommitAnnotationResize: (t,
|
|
388
|
-
onUpdateTextAnnotation: (t,
|
|
386
|
+
onCommitAnnotationMove: (t, o) => e.onCommitAnnotationMove?.(t, o),
|
|
387
|
+
onCommitAnnotationResize: (t, o) => e.onCommitAnnotationResize?.(t, o),
|
|
388
|
+
onUpdateTextAnnotation: (t, o) => e.onUpdateTextAnnotation?.(t, o),
|
|
389
389
|
onDeleteAnnotation: (t) => e.onDeleteAnnotation?.(t),
|
|
390
|
-
onCommitBackgroundResize: (t,
|
|
391
|
-
onUpdateBackgroundLayer: (t,
|
|
390
|
+
onCommitBackgroundResize: (t, o) => e.onCommitBackgroundResize?.(t, o),
|
|
391
|
+
onUpdateBackgroundLayer: (t, o) => e.onUpdateBackgroundLayer?.(t, o),
|
|
392
392
|
onDeleteBackgroundLayer: (t) => e.onDeleteBackgroundLayer?.(t)
|
|
393
393
|
}) : null;
|
|
394
|
-
})(), null), l(r,
|
|
394
|
+
})(), null), l(r, c(s, {
|
|
395
395
|
get preview() {
|
|
396
396
|
return e.placementPreview;
|
|
397
397
|
},
|
|
@@ -29,10 +29,10 @@ export declare function WorkbenchStickyNote(props: {
|
|
|
29
29
|
topRenderLayer: number;
|
|
30
30
|
locked: boolean;
|
|
31
31
|
filtered: boolean;
|
|
32
|
-
|
|
32
|
+
visualFront?: boolean;
|
|
33
33
|
onSelect: (noteId: string) => void;
|
|
34
34
|
onContextMenu?: (event: MouseEvent, item: WorkbenchStickyNoteItem) => void;
|
|
35
|
-
|
|
35
|
+
onClaimVisualFrontOwner?: (noteId: string) => void;
|
|
36
36
|
onCommitFront?: (noteId: string) => void;
|
|
37
37
|
onCommitMove: (noteId: string, position: {
|
|
38
38
|
x: number;
|