@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.
@@ -17,7 +17,7 @@ export interface WorkbenchCanvasProps {
17
17
  selectedWidgetId: string | null;
18
18
  selectedObject?: WorkbenchSelection | null;
19
19
  mode?: WorkbenchInteractionMode;
20
- optimisticFrontWidgetId: string | null;
20
+ visualFrontOwnerId: string | null;
21
21
  locked: boolean;
22
22
  filters: Record<string, boolean>;
23
23
  widgetMotionById?: Record<string, WorkbenchWidgetMotionIntent | null | undefined>;
@@ -29,7 +29,7 @@ export interface WorkbenchCanvasProps {
29
29
  onCanvasPointerDown?: (event: PointerEvent) => void;
30
30
  onSelectWidget: (widgetId: string) => void;
31
31
  onWidgetContextMenu: (event: MouseEvent, item: WorkbenchWidgetItem) => void;
32
- onStartOptimisticFront: (widgetId: string) => void;
32
+ onClaimVisualFrontOwner: (widgetId: string) => void;
33
33
  onCommitFront: (widgetId: string) => void;
34
34
  onCommitMove: (widgetId: string, position: {
35
35
  x: number;
@@ -41,7 +41,7 @@ export interface WorkbenchCanvasProps {
41
41
  }) => void;
42
42
  onSelectStickyNote?: (noteId: string) => void;
43
43
  onStickyNoteContextMenu?: (event: MouseEvent, item: WorkbenchStickyNoteItem) => void;
44
- onStartStickyOptimisticFront?: (noteId: string) => void;
44
+ onClaimStickyVisualFrontOwner?: (noteId: string) => void;
45
45
  onCommitStickyFront?: (noteId: string) => void;
46
46
  onCommitStickyMove?: (noteId: string, position: {
47
47
  x: number;
@@ -1,7 +1,7 @@
1
- import { use as _, insert as S, createComponent as g, memo as y, effect as F, template as B } from "solid-js/web";
2
- import { createMemo as d, createSignal as z, Show as O, For as j } from "solid-js";
3
- import { resolveWorkbenchInteractionAdapter as P } from "./workbenchInteractionAdapter.js";
4
- import { WORKBENCH_BACKGROUND_REGION_FILTER_ID as V, WORKBENCH_TEXT_FILTER_ID as q, WORKBENCH_STICKY_FILTER_ID as T } from "./types.js";
1
+ import { use as E, insert as w, createComponent as g, memo as y, effect as O, template as B } from "solid-js/web";
2
+ import { createMemo as u, createSignal as _, Show as W, For as j } from "solid-js";
3
+ import { resolveWorkbenchInteractionAdapter as z } from "./workbenchInteractionAdapter.js";
4
+ import { WORKBENCH_BACKGROUND_REGION_FILTER_ID as P, WORKBENCH_TEXT_FILTER_ID as q, WORKBENCH_STICKY_FILTER_ID as T } from "./types.js";
5
5
  import { WorkbenchCanvasField as U } from "./WorkbenchCanvasField.js";
6
6
  import { WorkbenchPlacementPreview as G } from "./WorkbenchPlacementPreview.js";
7
7
  import { WorkbenchBackgroundLayerView as $, WorkbenchAnnotationLayerView as K, WorkbenchLayerControlOverlayView as H, createWorkbenchTextEditorRegistry as Z, WorkbenchStickyNote as X } from "./WorkbenchLayerObjects.js";
@@ -12,12 +12,12 @@ import { getWidgetEntry as R } from "./widgets/widgetRegistry.js";
12
12
  import { InfiniteCanvas as ee } from "../ui/InfiniteCanvas.js";
13
13
  var te = /* @__PURE__ */ B("<div class=workbench-canvas><div class=workbench-canvas__atmosphere aria-hidden=true>"), ne = /* @__PURE__ */ B("<div class=workbench-canvas__projected-layer><div class=workbench-canvas__projected-work-layer>");
14
14
  function re(e) {
15
- const a = d((c) => {
16
- const C = e.widgetById().get(e.widgetId);
17
- if (C) return C;
15
+ const a = u((c) => {
16
+ const v = e.widgetById().get(e.widgetId);
17
+ if (v) return v;
18
18
  if (c) return c;
19
19
  throw new Error(`Workbench widget ${e.widgetId} is missing from the projected render map.`);
20
- }), r = d(() => R(a().type, e.widgetDefinitions));
20
+ }), r = u(() => R(a().type, e.widgetDefinitions));
21
21
  return g(Y, {
22
22
  get definition() {
23
23
  return r();
@@ -50,8 +50,8 @@ function re(e) {
50
50
  get selected() {
51
51
  return e.selectedWidgetId === e.widgetId;
52
52
  },
53
- get optimisticFront() {
54
- return e.optimisticFrontWidgetId === e.widgetId;
53
+ get visualFront() {
54
+ return e.visualFrontOwnerId === e.widgetId;
55
55
  },
56
56
  get motion() {
57
57
  return e.widgetMotionById?.[e.widgetId] ?? null;
@@ -87,8 +87,8 @@ function re(e) {
87
87
  get onContextMenu() {
88
88
  return e.onWidgetContextMenu;
89
89
  },
90
- get onStartOptimisticFront() {
91
- return e.onStartOptimisticFront;
90
+ get onClaimVisualFrontOwner() {
91
+ return e.onClaimVisualFrontOwner;
92
92
  },
93
93
  get onCommitFront() {
94
94
  return e.onCommitFront;
@@ -123,7 +123,7 @@ function re(e) {
123
123
  });
124
124
  }
125
125
  function oe(e) {
126
- const a = d((r) => {
126
+ const a = u((r) => {
127
127
  const c = e.stickyNoteById().get(e.noteId);
128
128
  if (c) return c;
129
129
  if (r) return r;
@@ -157,12 +157,12 @@ function oe(e) {
157
157
  get filtered() {
158
158
  return e.filtered;
159
159
  },
160
- get optimisticFront() {
161
- return e.optimisticFrontWidgetId === e.noteId;
160
+ get visualFront() {
161
+ return e.visualFrontOwnerId === e.noteId;
162
162
  },
163
163
  onSelect: (r) => e.onSelectStickyNote?.(r),
164
164
  onContextMenu: (r, c) => e.onStickyNoteContextMenu?.(r, c),
165
- onStartOptimisticFront: (r) => e.onStartStickyOptimisticFront?.(r),
165
+ onClaimVisualFrontOwner: (r) => e.onClaimStickyVisualFrontOwner?.(r),
166
166
  onCommitFront: (r) => e.onCommitStickyFront?.(r),
167
167
  onCommitMove: (r, c) => e.onCommitStickyMove?.(r, c),
168
168
  onCommitResize: (r, c) => e.onCommitStickyResize?.(r, c),
@@ -176,29 +176,29 @@ function oe(e) {
176
176
  }
177
177
  });
178
178
  }
179
- function Ce(e) {
180
- const a = d(() => P(e.interactionAdapter)), r = p(() => e.widgets.map((n) => n.id)), c = d(() => {
179
+ function ve(e) {
180
+ const a = u(() => z(e.interactionAdapter)), r = p(() => e.widgets.map((n) => n.id)), c = u(() => {
181
181
  const n = e.widgetMotionById;
182
182
  if (!n)
183
183
  return r();
184
- const m = {
184
+ const l = {
185
185
  ...r()
186
186
  };
187
- for (const [o, u] of Object.entries(n))
188
- u !== void 0 && (m[o] = u);
189
- return m;
190
- }), C = d(() => new Map(e.widgets.map((n) => [n.id, n]))), N = d(() => (e.stickyNotes ?? []).map((n) => n.id)), A = d(() => new Map((e.stickyNotes ?? []).map((n) => [n.id, n]))), b = d(() => J([...e.widgets, ...e.stickyNotes ?? []])), I = Z(), [v, f] = z(null), s = d(() => Q(e.mode)), w = d(() => s().workLayerLocked), l = d(() => s().layerEditingEnabled), D = d(() => e.widgets.filter((n) => {
191
- const m = R(n.type, e.widgetDefinitions);
192
- return x(m) === "canvas_scaled";
193
- })), h = d(() => e.widgets.filter((n) => {
194
- const m = R(n.type, e.widgetDefinitions);
195
- return x(m) === "projected_surface";
196
- }).map((n) => n.id)), M = d(() => h().length > 0), E = d(() => M() ? [] : e.stickyNotes ?? []), W = () => e.canvasFrameSize.width > 0 && e.canvasFrameSize.height > 0, L = M;
187
+ for (const [o, d] of Object.entries(n))
188
+ d !== void 0 && (l[o] = d);
189
+ return l;
190
+ }), v = u(() => new Map(e.widgets.map((n) => [n.id, n]))), N = u(() => (e.stickyNotes ?? []).map((n) => n.id)), A = u(() => new Map((e.stickyNotes ?? []).map((n) => [n.id, n]))), b = u(() => J([...e.widgets, ...e.stickyNotes ?? []])), I = Z(), [S, f] = _(null), s = u(() => Q(e.mode)), C = u(() => s().workLayerLocked), m = u(() => s().layerEditingEnabled), D = u(() => e.widgets.filter((n) => {
191
+ const l = R(n.type, e.widgetDefinitions);
192
+ return x(l) === "canvas_scaled";
193
+ })), h = u(() => e.widgets.filter((n) => {
194
+ const l = R(n.type, e.widgetDefinitions);
195
+ return x(l) === "projected_surface";
196
+ }).map((n) => n.id)), M = u(() => h().length > 0), V = u(() => M() ? [] : e.stickyNotes ?? []), F = () => e.canvasFrameSize.width > 0 && e.canvasFrameSize.height > 0, L = M;
197
197
  return (() => {
198
198
  var n = te();
199
199
  n.firstChild;
200
- var m = e.setCanvasFrameRef;
201
- return typeof m == "function" ? _(m, n) : e.setCanvasFrameRef = n, S(n, g(ee, {
200
+ var l = e.setCanvasFrameRef;
201
+ return typeof l == "function" ? E(l, n) : e.setCanvasFrameRef = n, w(n, g(ee, {
202
202
  ariaLabel: "Workbench canvas",
203
203
  class: "workbench-canvas__infinite",
204
204
  get viewport() {
@@ -233,13 +233,13 @@ function Ce(e) {
233
233
  get disablePanZoom() {
234
234
  return e.locked;
235
235
  },
236
- overlay: (o) => [g(O, {
236
+ overlay: (o) => [g(W, {
237
237
  get when() {
238
238
  return L();
239
239
  },
240
240
  get children() {
241
- var u = ne(), k = u.firstChild;
242
- return S(u, g($, {
241
+ var d = ne(), k = d.firstChild;
242
+ return w(d, g($, {
243
243
  get items() {
244
244
  return e.backgroundLayers ?? [];
245
245
  },
@@ -247,14 +247,14 @@ function Ce(e) {
247
247
  return e.selectedObject ?? null;
248
248
  },
249
249
  get editable() {
250
- return y(() => !!l())() && !e.locked;
250
+ return y(() => !!m())() && !e.locked;
251
251
  },
252
252
  get filtered() {
253
- return e.filters[V] === !1;
253
+ return e.filters[P] === !1;
254
254
  },
255
255
  projection: "screen",
256
256
  get preview() {
257
- return v();
257
+ return S();
258
258
  },
259
259
  onPreviewGeometry: f,
260
260
  get viewport() {
@@ -263,7 +263,7 @@ function Ce(e) {
263
263
  onSelect: (t) => e.onSelectBackgroundLayer?.(t),
264
264
  onContextMenu: (t, i) => e.onBackgroundLayerContextMenu?.(t, i),
265
265
  onCommitMove: (t, i) => e.onCommitBackgroundMove?.(t, i)
266
- }), k), S(u, g(K, {
266
+ }), k), w(d, g(K, {
267
267
  get items() {
268
268
  return e.annotations ?? [];
269
269
  },
@@ -271,14 +271,14 @@ function Ce(e) {
271
271
  return e.selectedObject ?? null;
272
272
  },
273
273
  get editable() {
274
- return y(() => !!l())() && !e.locked;
274
+ return y(() => !!m())() && !e.locked;
275
275
  },
276
276
  get filtered() {
277
277
  return e.filters[q] === !1;
278
278
  },
279
279
  projection: "screen",
280
280
  get preview() {
281
- return v();
281
+ return S();
282
282
  },
283
283
  onPreviewGeometry: f,
284
284
  textEditorRegistry: I,
@@ -289,7 +289,7 @@ function Ce(e) {
289
289
  onContextMenu: (t, i) => e.onAnnotationContextMenu?.(t, i),
290
290
  onCommitMove: (t, i) => e.onCommitAnnotationMove?.(t, i),
291
291
  onUpdate: (t, i) => e.onUpdateTextAnnotation?.(t, i)
292
- }), k), S(k, g(j, {
292
+ }), k), w(k, g(j, {
293
293
  get each() {
294
294
  return h();
295
295
  },
@@ -301,7 +301,7 @@ function Ce(e) {
301
301
  get canvasFrameSize() {
302
302
  return e.canvasFrameSize;
303
303
  },
304
- widgetById: C,
304
+ widgetById: v,
305
305
  renderLayers: b,
306
306
  get widgetMotionById() {
307
307
  return c();
@@ -309,11 +309,11 @@ function Ce(e) {
309
309
  get selectedWidgetId() {
310
310
  return y(() => e.selectedObject?.kind === "widget")() ? e.selectedObject.id : e.selectedWidgetId;
311
311
  },
312
- get optimisticFrontWidgetId() {
313
- return e.optimisticFrontWidgetId;
312
+ get visualFrontOwnerId() {
313
+ return e.visualFrontOwnerId;
314
314
  },
315
315
  get locked() {
316
- return e.locked || w();
316
+ return e.locked || C();
317
317
  },
318
318
  get filters() {
319
319
  return e.filters;
@@ -336,8 +336,8 @@ function Ce(e) {
336
336
  get onWidgetContextMenu() {
337
337
  return e.onWidgetContextMenu;
338
338
  },
339
- get onStartOptimisticFront() {
340
- return e.onStartOptimisticFront;
339
+ get onClaimVisualFrontOwner() {
340
+ return e.onClaimVisualFrontOwner;
341
341
  },
342
342
  get onCommitFront() {
343
343
  return e.onCommitFront;
@@ -365,10 +365,10 @@ function Ce(e) {
365
365
  },
366
366
  projectedViewport: o,
367
367
  get surfaceReady() {
368
- return W();
368
+ return F();
369
369
  }
370
370
  })
371
- }), null), S(k, g(j, {
371
+ }), null), w(k, g(j, {
372
372
  get each() {
373
373
  return N();
374
374
  },
@@ -380,14 +380,14 @@ function Ce(e) {
380
380
  },
381
381
  renderLayers: b,
382
382
  projectedViewport: o,
383
- get optimisticFrontWidgetId() {
384
- return e.optimisticFrontWidgetId;
383
+ get visualFrontOwnerId() {
384
+ return e.visualFrontOwnerId;
385
385
  },
386
386
  get locked() {
387
- return e.locked || w();
387
+ return e.locked || C();
388
388
  },
389
389
  get filtered() {
390
- return y(() => !w())() && e.filters[T] === !1;
390
+ return y(() => !C())() && e.filters[T] === !1;
391
391
  },
392
392
  get onSelectStickyNote() {
393
393
  return e.onSelectStickyNote;
@@ -395,8 +395,8 @@ function Ce(e) {
395
395
  get onStickyNoteContextMenu() {
396
396
  return e.onStickyNoteContextMenu;
397
397
  },
398
- get onStartStickyOptimisticFront() {
399
- return e.onStartStickyOptimisticFront;
398
+ get onClaimStickyVisualFrontOwner() {
399
+ return e.onClaimStickyVisualFrontOwner;
400
400
  },
401
401
  get onCommitStickyFront() {
402
402
  return e.onCommitStickyFront;
@@ -420,10 +420,10 @@ function Ce(e) {
420
420
  return e.onLayoutInteractionEnd;
421
421
  },
422
422
  get surfaceReady() {
423
- return W();
423
+ return F();
424
424
  }
425
425
  })
426
- }), null), S(u, g(H, {
426
+ }), null), w(d, g(H, {
427
427
  get annotations() {
428
428
  return e.annotations ?? [];
429
429
  },
@@ -434,17 +434,17 @@ function Ce(e) {
434
434
  return e.selectedObject ?? null;
435
435
  },
436
436
  get editable() {
437
- return y(() => !!l())() && !e.locked;
437
+ return y(() => !!m())() && !e.locked;
438
438
  },
439
439
  get showRegionOutlines() {
440
- return l();
440
+ return m();
441
441
  },
442
442
  projection: "screen",
443
443
  get viewport() {
444
444
  return o();
445
445
  },
446
446
  get preview() {
447
- return v();
447
+ return S();
448
448
  },
449
449
  onPreviewGeometry: f,
450
450
  textEditorRegistry: I,
@@ -455,15 +455,15 @@ function Ce(e) {
455
455
  onCommitBackgroundResize: (t, i) => e.onCommitBackgroundResize?.(t, i),
456
456
  onUpdateBackgroundLayer: (t, i) => e.onUpdateBackgroundLayer?.(t, i),
457
457
  onDeleteBackgroundLayer: (t) => e.onDeleteBackgroundLayer?.(t)
458
- }), null), F(() => u.classList.toggle("is-work-layer-locked", !!w())), u;
458
+ }), null), O(() => d.classList.toggle("is-work-layer-locked", !!C())), d;
459
459
  }
460
- }), g(O, {
460
+ }), g(W, {
461
461
  get when() {
462
462
  return y(() => !!L())() ? e.placementPreview : null;
463
463
  },
464
- children: (u) => g(G, {
464
+ children: (d) => g(G, {
465
465
  get preview() {
466
- return u();
466
+ return d();
467
467
  },
468
468
  projection: "screen",
469
469
  get viewport() {
@@ -480,7 +480,7 @@ function Ce(e) {
480
480
  return D();
481
481
  },
482
482
  get stickyNotes() {
483
- return E();
483
+ return V();
484
484
  },
485
485
  get annotations() {
486
486
  return e.annotations ?? [];
@@ -500,20 +500,20 @@ function Ce(e) {
500
500
  get selectedObject() {
501
501
  return e.selectedObject;
502
502
  },
503
- get optimisticFrontWidgetId() {
504
- return e.optimisticFrontWidgetId;
503
+ get visualFrontOwnerId() {
504
+ return e.visualFrontOwnerId;
505
505
  },
506
506
  get workLayerLocked() {
507
- return w();
507
+ return C();
508
508
  },
509
509
  get annotationLayerEditable() {
510
- return l();
510
+ return m();
511
511
  },
512
512
  get backgroundLayerEditable() {
513
- return l();
513
+ return m();
514
514
  },
515
515
  get showRegionOutlines() {
516
- return l();
516
+ return m();
517
517
  },
518
518
  get renderFreeformLayers() {
519
519
  return !L();
@@ -539,8 +539,8 @@ function Ce(e) {
539
539
  get onWidgetContextMenu() {
540
540
  return e.onWidgetContextMenu;
541
541
  },
542
- get onStartOptimisticFront() {
543
- return e.onStartOptimisticFront;
542
+ get onClaimVisualFrontOwner() {
543
+ return e.onClaimVisualFrontOwner;
544
544
  },
545
545
  get onCommitFront() {
546
546
  return e.onCommitFront;
@@ -557,8 +557,8 @@ function Ce(e) {
557
557
  get onStickyNoteContextMenu() {
558
558
  return e.onStickyNoteContextMenu;
559
559
  },
560
- get onStartStickyOptimisticFront() {
561
- return e.onStartStickyOptimisticFront;
560
+ get onClaimStickyVisualFrontOwner() {
561
+ return e.onClaimStickyVisualFrontOwner;
562
562
  },
563
563
  get onCommitStickyFront() {
564
564
  return e.onCommitStickyFront;
@@ -633,15 +633,15 @@ function Ce(e) {
633
633
  return e.onLayoutInteractionEnd;
634
634
  },
635
635
  get layerGeometryPreview() {
636
- return v();
636
+ return S();
637
637
  },
638
638
  onLayerGeometryPreview: f,
639
639
  textEditorRegistry: I
640
640
  });
641
641
  }
642
- }), null), F((o) => {
643
- var u = !!e.locked, k = !!l();
644
- return u !== o.e && n.classList.toggle("is-locked", o.e = u), k !== o.t && n.classList.toggle("is-composition-mode", o.t = k), o;
642
+ }), null), O((o) => {
643
+ var d = !!e.locked, k = !!m();
644
+ return d !== o.e && n.classList.toggle("is-locked", o.e = d), k !== o.t && n.classList.toggle("is-composition-mode", o.t = k), o;
645
645
  }, {
646
646
  e: void 0,
647
647
  t: void 0
@@ -649,5 +649,5 @@ function Ce(e) {
649
649
  })();
650
650
  }
651
651
  export {
652
- Ce as WorkbenchCanvas
652
+ ve as WorkbenchCanvas
653
653
  };
@@ -12,7 +12,7 @@ export interface WorkbenchCanvasFieldProps {
12
12
  viewport: WorkbenchViewport;
13
13
  selectedObject?: WorkbenchSelection | null;
14
14
  selectedWidgetId: string | null;
15
- optimisticFrontWidgetId: string | null;
15
+ visualFrontOwnerId: string | null;
16
16
  workLayerLocked?: boolean;
17
17
  annotationLayerEditable?: boolean;
18
18
  backgroundLayerEditable?: boolean;
@@ -25,7 +25,7 @@ export interface WorkbenchCanvasFieldProps {
25
25
  interactionAdapter?: WorkbenchInteractionAdapter | ResolvedWorkbenchInteractionAdapter;
26
26
  onSelectWidget: (widgetId: string) => void;
27
27
  onWidgetContextMenu: (event: MouseEvent, item: WorkbenchWidgetItem) => void;
28
- onStartOptimisticFront: (widgetId: string) => void;
28
+ onClaimVisualFrontOwner: (widgetId: string) => void;
29
29
  onCommitFront: (widgetId: string) => void;
30
30
  onCommitMove: (widgetId: string, position: {
31
31
  x: number;
@@ -37,7 +37,7 @@ export interface WorkbenchCanvasFieldProps {
37
37
  }) => void;
38
38
  onSelectStickyNote?: (noteId: string) => void;
39
39
  onStickyNoteContextMenu?: (event: MouseEvent, item: WorkbenchStickyNoteItem) => void;
40
- onStartStickyOptimisticFront?: (noteId: string) => void;
40
+ onClaimStickyVisualFrontOwner?: (noteId: string) => void;
41
41
  onCommitStickyFront?: (noteId: string) => void;
42
42
  onCommitStickyMove?: (noteId: string, position: {
43
43
  x: number;