@floegence/floe-webapp-core 0.53.3 → 0.54.0

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.
Files changed (32) hide show
  1. package/dist/components/ui/InfiniteCanvas.js +111 -100
  2. package/dist/components/ui/SurfaceAnchoredLayer.d.ts +10 -0
  3. package/dist/components/ui/SurfaceAnchoredLayer.js +89 -0
  4. package/dist/components/ui/index.d.ts +1 -0
  5. package/dist/components/workbench/WorkbenchCanvas.d.ts +1 -1
  6. package/dist/components/workbench/WorkbenchCanvas.js +26 -24
  7. package/dist/components/workbench/WorkbenchCanvasField.d.ts +1 -1
  8. package/dist/components/workbench/WorkbenchCanvasField.js +46 -42
  9. package/dist/components/workbench/WorkbenchLayerObjects.d.ts +9 -1
  10. package/dist/components/workbench/WorkbenchLayerObjects.js +896 -707
  11. package/dist/components/workbench/WorkbenchSurface.d.ts +2 -0
  12. package/dist/components/workbench/WorkbenchSurface.js +442 -420
  13. package/dist/components/workbench/index.d.ts +1 -0
  14. package/dist/components/workbench/types.d.ts +6 -3
  15. package/dist/components/workbench/useWorkbenchModel.js +53 -53
  16. package/dist/components/workbench/workbenchCompositionMessages.d.ts +62 -0
  17. package/dist/components/workbench/workbenchCompositionMessages.js +67 -0
  18. package/dist/components/workbench/workbenchHelpers.js +19 -6
  19. package/dist/components/workbench/workbenchOptions.d.ts +4 -4
  20. package/dist/components/workbench/workbenchOptions.js +18 -16
  21. package/dist/full.js +182 -180
  22. package/dist/input-focus.css +39 -5
  23. package/dist/styles/themes/presets.js +5 -5
  24. package/dist/styles.css +1 -1
  25. package/dist/surface.css +16 -3
  26. package/dist/themes/shell-presets.generated.css +6 -6
  27. package/dist/ui.css +4 -23
  28. package/dist/ui.js +86 -84
  29. package/dist/workbench-themes.css +60 -0
  30. package/dist/workbench.css +332 -524
  31. package/dist/workbench.js +24 -22
  32. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
1
  import { insert as l, memo as u, createComponent as c, effect as W, template as M } from "solid-js/web";
2
- import { createMemo as a, createSignal as E, For as I } from "solid-js";
2
+ import { createMemo as a, createSignal as E, For as S } 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 A } from "./types.js";
5
5
  import { createWorkbenchRenderLayerMap as _ } from "./workbenchHelpers.js";
6
6
  import { getWidgetEntry as D } from "./widgets/widgetRegistry.js";
7
7
  import { WorkbenchWidget as V } from "./WorkbenchWidget.js";
8
8
  import { WorkbenchPlacementPreview as P } from "./WorkbenchPlacementPreview.js";
9
- import { WorkbenchBackgroundLayerView as j, WorkbenchAnnotationLayerView as s, WorkbenchLayerControlOverlayView as G, createWorkbenchTextEditorRegistry as T, WorkbenchStickyNote as q } from "./WorkbenchLayerObjects.js";
10
- var z = /* @__PURE__ */ M("<div class=workbench-canvas__field><div class=workbench-canvas__grid aria-hidden=true></div><div class=workbench-work-layer>");
11
- function U(e) {
9
+ import { WorkbenchBackgroundLayerView as j, WorkbenchAnnotationLayerView as G, WorkbenchLayerControlOverlayView as T, createWorkbenchTextEditorRegistry as U, WorkbenchStickyNote as q } from "./WorkbenchLayerObjects.js";
10
+ var s = /* @__PURE__ */ M("<div class=workbench-canvas__field><div class=workbench-canvas__grid aria-hidden=true></div><div class=workbench-work-layer>");
11
+ function z(e) {
12
12
  const d = a((i) => {
13
13
  const m = e.widgetById().get(e.widgetId);
14
14
  if (m) return m;
@@ -164,18 +164,22 @@ function $(e) {
164
164
  });
165
165
  }
166
166
  function te(e) {
167
- 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(() => _([...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) => {
167
+ const d = a(() => B(e.interactionAdapter)), n = a(() => e.widgets.map((o) => o.id)), i = a(() => new Map(e.widgets.map((o) => [o.id, o]))), m = a(() => (e.stickyNotes ?? []).map((o) => o.id)), I = a(() => new Map((e.stickyNotes ?? []).map((o) => [o.id, o]))), f = U(), y = a(() => e.textEditorRegistry ?? f), C = a(() => _([...e.widgets, ...e.stickyNotes ?? []])), R = a(() => e.selectedObject?.kind === "widget" ? e.selectedObject.id : e.selectedWidgetId), b = a(() => e.locked || !!e.workLayerLocked), [O, h] = E(null), w = a(() => e.layerGeometryPreview === void 0 ? O() : e.layerGeometryPreview), k = (o) => {
168
168
  if (e.onLayerGeometryPreview) {
169
- e.onLayerGeometryPreview(r);
169
+ e.onLayerGeometryPreview(o);
170
170
  return;
171
171
  }
172
- h(r);
173
- }, S = a(() => e.renderFreeformLayers !== !1);
172
+ h(o);
173
+ }, L = a(() => e.renderFreeformLayers !== !1);
174
174
  return (() => {
175
- var r = z(), F = r.firstChild, k = F.nextSibling;
176
- return l(r, (() => {
177
- var g = u(() => !!S());
175
+ var o = s(), F = o.firstChild, v = F.nextSibling;
176
+ return l(o, (() => {
177
+ var g = u(() => !!L());
178
178
  return () => g() ? [c(j, {
179
+ get textEditorRegistry() {
180
+ return y();
181
+ },
182
+ onUpdate: (t, r) => e.onUpdateBackgroundLayer?.(t, r),
179
183
  get items() {
180
184
  return e.backgroundLayers ?? [];
181
185
  },
@@ -189,16 +193,16 @@ function te(e) {
189
193
  return e.filters[x] === !1;
190
194
  },
191
195
  get preview() {
192
- return y();
196
+ return w();
193
197
  },
194
- onPreviewGeometry: w,
198
+ onPreviewGeometry: k,
195
199
  get viewport() {
196
200
  return e.viewport;
197
201
  },
198
202
  onSelect: (t) => e.onSelectBackgroundLayer?.(t),
199
- onContextMenu: (t, o) => e.onBackgroundLayerContextMenu?.(t, o),
200
- onCommitMove: (t, o) => e.onCommitBackgroundMove?.(t, o)
201
- }), c(s, {
203
+ onContextMenu: (t, r) => e.onBackgroundLayerContextMenu?.(t, r),
204
+ onCommitMove: (t, r) => e.onCommitBackgroundMove?.(t, r)
205
+ }), c(G, {
202
206
  get items() {
203
207
  return e.annotations ?? [];
204
208
  },
@@ -212,25 +216,25 @@ function te(e) {
212
216
  return e.filters[N] === !1;
213
217
  },
214
218
  get preview() {
215
- return y();
219
+ return w();
216
220
  },
217
- onPreviewGeometry: w,
221
+ onPreviewGeometry: k,
218
222
  get textEditorRegistry() {
219
- return v();
223
+ return y();
220
224
  },
221
225
  get viewport() {
222
226
  return e.viewport;
223
227
  },
224
228
  onSelect: (t) => e.onSelectAnnotation?.(t),
225
- onContextMenu: (t, o) => e.onAnnotationContextMenu?.(t, o),
226
- onCommitMove: (t, o) => e.onCommitAnnotationMove?.(t, o),
227
- onUpdate: (t, o) => e.onUpdateTextAnnotation?.(t, o)
229
+ onContextMenu: (t, r) => e.onAnnotationContextMenu?.(t, r),
230
+ onCommitMove: (t, r) => e.onCommitAnnotationMove?.(t, r),
231
+ onUpdate: (t, r) => e.onUpdateTextAnnotation?.(t, r)
228
232
  })] : null;
229
- })(), k), l(k, c(I, {
233
+ })(), v), l(v, c(S, {
230
234
  get each() {
231
235
  return n();
232
236
  },
233
- children: (g) => c(U, {
237
+ children: (g) => c(z, {
234
238
  widgetId: g,
235
239
  get widgetDefinitions() {
236
240
  return e.widgetDefinitions;
@@ -244,7 +248,7 @@ function te(e) {
244
248
  return e.viewport;
245
249
  },
246
250
  get selectedWidgetId() {
247
- return b();
251
+ return R();
248
252
  },
249
253
  get visualFrontOwnerId() {
250
254
  return e.visualFrontOwnerId;
@@ -253,7 +257,7 @@ function te(e) {
253
257
  return e.viewportScale;
254
258
  },
255
259
  get locked() {
256
- return L();
260
+ return b();
257
261
  },
258
262
  get filters() {
259
263
  return e.filters;
@@ -307,13 +311,13 @@ function te(e) {
307
311
  return e.onLayoutInteractionEnd;
308
312
  }
309
313
  })
310
- }), null), l(k, c(I, {
314
+ }), null), l(v, c(S, {
311
315
  get each() {
312
316
  return m();
313
317
  },
314
318
  children: (g) => c($, {
315
319
  noteId: g,
316
- stickyNoteById: f,
320
+ stickyNoteById: I,
317
321
  get selectedObject() {
318
322
  return e.selectedObject;
319
323
  },
@@ -324,7 +328,7 @@ function te(e) {
324
328
  return e.viewportScale;
325
329
  },
326
330
  get locked() {
327
- return L();
331
+ return e.locked;
328
332
  },
329
333
  get filtered() {
330
334
  return u(() => !e.workLayerLocked)() && e.filters[A] === !1;
@@ -361,9 +365,9 @@ function te(e) {
361
365
  },
362
366
  renderLayers: C
363
367
  })
364
- }), null), l(r, (() => {
365
- var g = u(() => !!S());
366
- return () => g() ? c(G, {
368
+ }), null), l(o, (() => {
369
+ var g = u(() => !!L());
370
+ return () => g() ? c(T, {
367
371
  get annotations() {
368
372
  return e.annotations ?? [];
369
373
  },
@@ -383,21 +387,21 @@ function te(e) {
383
387
  return e.viewport;
384
388
  },
385
389
  get preview() {
386
- return y();
390
+ return w();
387
391
  },
388
- onPreviewGeometry: w,
392
+ onPreviewGeometry: k,
389
393
  get textEditorRegistry() {
390
- return v();
394
+ return y();
391
395
  },
392
- onCommitAnnotationMove: (t, o) => e.onCommitAnnotationMove?.(t, o),
393
- onCommitAnnotationResize: (t, o) => e.onCommitAnnotationResize?.(t, o),
394
- onUpdateTextAnnotation: (t, o) => e.onUpdateTextAnnotation?.(t, o),
396
+ onCommitAnnotationMove: (t, r) => e.onCommitAnnotationMove?.(t, r),
397
+ onCommitAnnotationResize: (t, r) => e.onCommitAnnotationResize?.(t, r),
398
+ onUpdateTextAnnotation: (t, r) => e.onUpdateTextAnnotation?.(t, r),
395
399
  onDeleteAnnotation: (t) => e.onDeleteAnnotation?.(t),
396
- onCommitBackgroundResize: (t, o) => e.onCommitBackgroundResize?.(t, o),
397
- onUpdateBackgroundLayer: (t, o) => e.onUpdateBackgroundLayer?.(t, o),
400
+ onCommitBackgroundResize: (t, r) => e.onCommitBackgroundResize?.(t, r),
401
+ onUpdateBackgroundLayer: (t, r) => e.onUpdateBackgroundLayer?.(t, r),
398
402
  onDeleteBackgroundLayer: (t) => e.onDeleteBackgroundLayer?.(t)
399
403
  }) : null;
400
- })(), null), l(r, c(P, {
404
+ })(), null), l(o, c(P, {
401
405
  get preview() {
402
406
  return e.placementPreview;
403
407
  },
@@ -405,7 +409,7 @@ function te(e) {
405
409
  get viewport() {
406
410
  return e.viewport;
407
411
  }
408
- }), null), W(() => r.classList.toggle("is-work-layer-muted", !!e.workLayerLocked)), r;
412
+ }), null), W(() => o.classList.toggle("is-work-layer-muted", !!e.workLayerLocked)), o;
409
413
  })();
410
414
  }
411
415
  export {
@@ -42,7 +42,7 @@ export declare function WorkbenchStickyNote(props: {
42
42
  width: number;
43
43
  height: number;
44
44
  }) => void;
45
- onUpdate: (noteId: string, patch: Partial<Pick<WorkbenchStickyNoteItem, 'body' | 'color'>>) => void;
45
+ onUpdate: (noteId: string, patch: Partial<Pick<WorkbenchStickyNoteItem, 'body' | 'color' | 'material'>>) => void;
46
46
  onDelete: (noteId: string) => void;
47
47
  onLayoutInteractionStart?: () => void;
48
48
  onLayoutInteractionEnd?: () => void;
@@ -74,6 +74,10 @@ export declare function WorkbenchBackgroundRegion(props: {
74
74
  projection?: WorkbenchLayerProjectionMode;
75
75
  preview?: WorkbenchLayerGeometryPreview | null;
76
76
  onPreviewGeometry?: (preview: WorkbenchLayerGeometryPreview | null) => void;
77
+ textEditorRegistry?: WorkbenchTextEditorRegistry;
78
+ onUpdate?: (layerId: string, patch: {
79
+ name: string;
80
+ }) => void;
77
81
  onSelect: (layerId: string) => void;
78
82
  onContextMenu?: (event: MouseEvent, item: WorkbenchBackgroundLayer) => void;
79
83
  onCommitMove: (layerId: string, position: {
@@ -90,6 +94,10 @@ export declare function WorkbenchBackgroundLayerView(props: {
90
94
  preview?: WorkbenchLayerGeometryPreview | null;
91
95
  onPreviewGeometry?: (preview: WorkbenchLayerGeometryPreview | null) => void;
92
96
  viewport: WorkbenchViewport;
97
+ textEditorRegistry?: WorkbenchTextEditorRegistry;
98
+ onUpdate?: (layerId: string, patch: {
99
+ name: string;
100
+ }) => void;
93
101
  onSelect: (layerId: string) => void;
94
102
  onContextMenu?: (event: MouseEvent, item: WorkbenchBackgroundLayer) => void;
95
103
  onCommitMove: (layerId: string, position: {