@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.
@@ -1,21 +1,21 @@
1
- import { insert as l, memo as g, createComponent as d, effect as M, template as O } from "solid-js/web";
2
- import { createMemo as a, createSignal as E, For as C } from "solid-js";
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 s } from "./WorkbenchWidget.js";
8
- import { WorkbenchPlacementPreview as P } from "./WorkbenchPlacementPreview.js";
9
- import { WorkbenchBackgroundLayerView as j, WorkbenchAnnotationLayerView as G, WorkbenchLayerControlOverlayView as T, createWorkbenchTextEditorRegistry as q, WorkbenchStickyNote as z } from "./WorkbenchLayerObjects.js";
10
- var U = /* @__PURE__ */ O("<div class=workbench-canvas__field><div class=workbench-canvas__grid aria-hidden=true></div><div class=workbench-work-layer>");
11
- function V(e) {
12
- const c = a((o) => {
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 (o) return o;
15
+ if (i) return i;
16
16
  throw new Error(`Workbench widget ${e.widgetId} is missing from the render map.`);
17
- }), n = a(() => D(c().type, e.widgetDefinitions));
18
- return d(s, {
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 c().title;
26
+ return d().title;
27
27
  },
28
28
  get widgetType() {
29
- return c().type;
29
+ return d().type;
30
30
  },
31
31
  get x() {
32
- return c().x;
32
+ return d().x;
33
33
  },
34
34
  get y() {
35
- return c().y;
35
+ return d().y;
36
36
  },
37
37
  get width() {
38
- return c().width;
38
+ return d().width;
39
39
  },
40
40
  get height() {
41
- return c().height;
41
+ return d().height;
42
42
  },
43
43
  get renderLayer() {
44
44
  return e.renderLayers().byWidgetId.get(e.widgetId) ?? 1;
45
45
  },
46
- itemSnapshot: c,
46
+ itemSnapshot: d,
47
47
  get selected() {
48
48
  return e.selectedWidgetId === e.widgetId;
49
49
  },
50
- get optimisticFront() {
51
- return e.optimisticFrontWidgetId === e.widgetId;
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 g(() => !e.workLayerLocked)() && e.filters[c().type] === !1;
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 onStartOptimisticFront() {
81
- return e.onStartOptimisticFront;
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 c = a((n) => {
117
- const o = e.stickyNoteById().get(e.noteId);
118
- if (o) return o;
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 d(z, {
122
+ return c(q, {
123
123
  get item() {
124
- return c();
124
+ return d();
125
125
  },
126
126
  get selected() {
127
- return g(() => e.selectedObject?.kind === "sticky_note")() && e.selectedObject.id === e.noteId;
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 optimisticFront() {
145
- return e.optimisticFrontWidgetId === e.noteId;
144
+ get visualFront() {
145
+ return e.visualFrontOwnerId === e.noteId;
146
146
  },
147
147
  onSelect: (n) => e.onSelectStickyNote?.(n),
148
- onContextMenu: (n, o) => e.onStickyNoteContextMenu?.(n, o),
149
- onStartOptimisticFront: (n) => e.onStartStickyOptimisticFront?.(n),
148
+ onContextMenu: (n, i) => e.onStickyNoteContextMenu?.(n, i),
149
+ onClaimVisualFrontOwner: (n) => e.onClaimStickyVisualFrontOwner?.(n),
150
150
  onCommitFront: (n) => e.onCommitStickyFront?.(n),
151
- onCommitMove: (n, o) => e.onCommitStickyMove?.(n, o),
152
- onCommitResize: (n, o) => e.onCommitStickyResize?.(n, o),
153
- onUpdate: (n, o) => e.onUpdateStickyNote?.(n, o),
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 c = a(() => B(e.interactionAdapter)), n = a(() => e.widgets.map((r) => r.id)), o = 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 = q(), v = a(() => e.textEditorRegistry ?? R), S = a(() => A([...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), w = (r) => {
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
- }, I = a(() => e.renderFreeformLayers !== !1);
170
+ }, S = a(() => e.renderFreeformLayers !== !1);
171
171
  return (() => {
172
- var r = U(), F = r.firstChild, k = F.nextSibling;
172
+ var r = z(), F = r.firstChild, k = F.nextSibling;
173
173
  return l(r, (() => {
174
- var u = g(() => !!I());
175
- return () => u() ? [d(j, {
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 g(() => !!e.backgroundLayerEditable)() && !e.locked;
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, i) => e.onBackgroundLayerContextMenu?.(t, i),
197
- onCommitMove: (t, i) => e.onCommitBackgroundMove?.(t, i)
198
- }), d(G, {
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 g(() => !!e.annotationLayerEditable)() && !e.locked;
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, i) => e.onAnnotationContextMenu?.(t, i),
223
- onCommitMove: (t, i) => e.onCommitAnnotationMove?.(t, i),
224
- onUpdate: (t, i) => e.onUpdateTextAnnotation?.(t, i)
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, d(C, {
226
+ })(), k), l(k, c(I, {
227
227
  get each() {
228
228
  return n();
229
229
  },
230
- children: (u) => d(V, {
231
- widgetId: u,
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: o,
239
- renderLayers: S,
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 optimisticFrontWidgetId() {
247
- return e.optimisticFrontWidgetId;
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 c();
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 onStartOptimisticFront() {
271
- return e.onStartOptimisticFront;
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, d(C, {
304
+ }), null), l(k, c(I, {
305
305
  get each() {
306
306
  return m();
307
307
  },
308
- children: (u) => d($, {
309
- noteId: u,
308
+ children: (g) => c($, {
309
+ noteId: g,
310
310
  stickyNoteById: f,
311
311
  get selectedObject() {
312
312
  return e.selectedObject;
313
313
  },
314
- get optimisticFrontWidgetId() {
315
- return e.optimisticFrontWidgetId;
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 g(() => !e.workLayerLocked)() && e.filters[_] === !1;
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 onStartStickyOptimisticFront() {
333
- return e.onStartStickyOptimisticFront;
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: S
356
+ renderLayers: C
357
357
  })
358
358
  }), null), l(r, (() => {
359
- var u = g(() => !!I());
360
- return () => u() ? d(T, {
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 g(() => !!(e.annotationLayerEditable || e.backgroundLayerEditable))() && !e.locked;
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, i) => e.onCommitAnnotationMove?.(t, i),
387
- onCommitAnnotationResize: (t, i) => e.onCommitAnnotationResize?.(t, i),
388
- onUpdateTextAnnotation: (t, i) => e.onUpdateTextAnnotation?.(t, i),
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, i) => e.onCommitBackgroundResize?.(t, i),
391
- onUpdateBackgroundLayer: (t, i) => e.onUpdateBackgroundLayer?.(t, i),
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, d(P, {
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
- optimisticFront?: boolean;
32
+ visualFront?: boolean;
33
33
  onSelect: (noteId: string) => void;
34
34
  onContextMenu?: (event: MouseEvent, item: WorkbenchStickyNoteItem) => void;
35
- onStartOptimisticFront?: (noteId: string) => void;
35
+ onClaimVisualFrontOwner?: (noteId: string) => void;
36
36
  onCommitFront?: (noteId: string) => void;
37
37
  onCommitMove: (noteId: string, position: {
38
38
  x: number;