@floegence/floe-webapp-core 0.42.2 → 0.42.4
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,4 +1,4 @@
|
|
|
1
|
-
import { use as E, insert as w, createComponent as g, memo as
|
|
1
|
+
import { use as E, insert as w, createComponent as g, memo as y, effect as F, template as x } from "solid-js/web";
|
|
2
2
|
import { createMemo as u, createSignal as _, Show as O, For as j } from "solid-js";
|
|
3
3
|
import { resolveWorkbenchInteractionAdapter as z } from "./workbenchInteractionAdapter.js";
|
|
4
4
|
import { WORKBENCH_BACKGROUND_REGION_FILTER_ID as P, WORKBENCH_TEXT_FILTER_ID as q, WORKBENCH_STICKY_FILTER_ID as T } from "./types.js";
|
|
@@ -137,7 +137,7 @@ function oe(e) {
|
|
|
137
137
|
return a();
|
|
138
138
|
},
|
|
139
139
|
get selected() {
|
|
140
|
-
return
|
|
140
|
+
return y(() => e.selectedObject?.kind === "sticky_note")() && e.selectedObject.id === e.noteId;
|
|
141
141
|
},
|
|
142
142
|
get viewportScale() {
|
|
143
143
|
return e.projectedViewport().scale;
|
|
@@ -190,13 +190,13 @@ function Ce(e) {
|
|
|
190
190
|
for (const [o, d] of Object.entries(n))
|
|
191
191
|
d !== void 0 && (l[o] = d);
|
|
192
192
|
return l;
|
|
193
|
-
}), C = u(() => new Map(e.widgets.map((n) => [n.id, n]))), B = u(() => (e.stickyNotes ?? []).map((n) => n.id)), N = u(() => new Map((e.stickyNotes ?? []).map((n) => [n.id, n]))), b = u(() => J([...e.widgets, ...e.stickyNotes ?? []])),
|
|
193
|
+
}), C = u(() => new Map(e.widgets.map((n) => [n.id, n]))), B = u(() => (e.stickyNotes ?? []).map((n) => n.id)), N = u(() => new Map((e.stickyNotes ?? []).map((n) => [n.id, n]))), b = u(() => J([...e.widgets, ...e.stickyNotes ?? []])), s = Z(), [S, f] = _(null), L = u(() => Q(e.mode)), v = u(() => L().workLayerLocked), m = u(() => L().layerEditingEnabled), D = u(() => e.widgets.filter((n) => {
|
|
194
194
|
const l = R(n.type, e.widgetDefinitions);
|
|
195
195
|
return A(l) === "canvas_scaled";
|
|
196
196
|
})), h = u(() => e.widgets.filter((n) => {
|
|
197
197
|
const l = R(n.type, e.widgetDefinitions);
|
|
198
198
|
return A(l) === "projected_surface";
|
|
199
|
-
}).map((n) => n.id)), M = u(() => h().length > 0), V = u(() => M() ? [] : e.stickyNotes ?? []), W = () => e.canvasFrameSize.width > 0 && e.canvasFrameSize.height > 0,
|
|
199
|
+
}).map((n) => n.id)), M = u(() => h().length > 0), V = u(() => M() ? [] : e.stickyNotes ?? []), W = () => e.canvasFrameSize.width > 0 && e.canvasFrameSize.height > 0, I = M;
|
|
200
200
|
return (() => {
|
|
201
201
|
var n = te();
|
|
202
202
|
n.firstChild;
|
|
@@ -208,7 +208,7 @@ function Ce(e) {
|
|
|
208
208
|
return e.viewport;
|
|
209
209
|
},
|
|
210
210
|
get minScale() {
|
|
211
|
-
return
|
|
211
|
+
return L().minScale;
|
|
212
212
|
},
|
|
213
213
|
get onViewportChange() {
|
|
214
214
|
return e.onViewportCommit;
|
|
@@ -238,10 +238,10 @@ function Ce(e) {
|
|
|
238
238
|
},
|
|
239
239
|
overlay: (o) => [g(O, {
|
|
240
240
|
get when() {
|
|
241
|
-
return
|
|
241
|
+
return I();
|
|
242
242
|
},
|
|
243
243
|
get children() {
|
|
244
|
-
var d = ne(),
|
|
244
|
+
var d = ne(), k = d.firstChild;
|
|
245
245
|
return w(d, g($, {
|
|
246
246
|
get items() {
|
|
247
247
|
return e.backgroundLayers ?? [];
|
|
@@ -250,7 +250,7 @@ function Ce(e) {
|
|
|
250
250
|
return e.selectedObject ?? null;
|
|
251
251
|
},
|
|
252
252
|
get editable() {
|
|
253
|
-
return
|
|
253
|
+
return y(() => !!m())() && !e.locked;
|
|
254
254
|
},
|
|
255
255
|
get filtered() {
|
|
256
256
|
return e.filters[P] === !1;
|
|
@@ -266,7 +266,7 @@ function Ce(e) {
|
|
|
266
266
|
onSelect: (t) => e.onSelectBackgroundLayer?.(t),
|
|
267
267
|
onContextMenu: (t, i) => e.onBackgroundLayerContextMenu?.(t, i),
|
|
268
268
|
onCommitMove: (t, i) => e.onCommitBackgroundMove?.(t, i)
|
|
269
|
-
}),
|
|
269
|
+
}), k), w(d, g(K, {
|
|
270
270
|
get items() {
|
|
271
271
|
return e.annotations ?? [];
|
|
272
272
|
},
|
|
@@ -274,7 +274,7 @@ function Ce(e) {
|
|
|
274
274
|
return e.selectedObject ?? null;
|
|
275
275
|
},
|
|
276
276
|
get editable() {
|
|
277
|
-
return
|
|
277
|
+
return y(() => !!m())() && !e.locked;
|
|
278
278
|
},
|
|
279
279
|
get filtered() {
|
|
280
280
|
return e.filters[q] === !1;
|
|
@@ -284,7 +284,7 @@ function Ce(e) {
|
|
|
284
284
|
return S();
|
|
285
285
|
},
|
|
286
286
|
onPreviewGeometry: f,
|
|
287
|
-
textEditorRegistry:
|
|
287
|
+
textEditorRegistry: s,
|
|
288
288
|
get viewport() {
|
|
289
289
|
return o();
|
|
290
290
|
},
|
|
@@ -292,7 +292,7 @@ function Ce(e) {
|
|
|
292
292
|
onContextMenu: (t, i) => e.onAnnotationContextMenu?.(t, i),
|
|
293
293
|
onCommitMove: (t, i) => e.onCommitAnnotationMove?.(t, i),
|
|
294
294
|
onUpdate: (t, i) => e.onUpdateTextAnnotation?.(t, i)
|
|
295
|
-
}),
|
|
295
|
+
}), k), w(k, g(j, {
|
|
296
296
|
get each() {
|
|
297
297
|
return h();
|
|
298
298
|
},
|
|
@@ -310,7 +310,7 @@ function Ce(e) {
|
|
|
310
310
|
return c();
|
|
311
311
|
},
|
|
312
312
|
get selectedWidgetId() {
|
|
313
|
-
return
|
|
313
|
+
return y(() => e.selectedObject?.kind === "widget")() ? e.selectedObject.id : e.selectedWidgetId;
|
|
314
314
|
},
|
|
315
315
|
get visualFrontOwnerId() {
|
|
316
316
|
return e.visualFrontOwnerId;
|
|
@@ -374,7 +374,7 @@ function Ce(e) {
|
|
|
374
374
|
return W();
|
|
375
375
|
}
|
|
376
376
|
})
|
|
377
|
-
}), null), w(
|
|
377
|
+
}), null), w(k, g(j, {
|
|
378
378
|
get each() {
|
|
379
379
|
return B();
|
|
380
380
|
},
|
|
@@ -393,7 +393,7 @@ function Ce(e) {
|
|
|
393
393
|
return e.locked || v();
|
|
394
394
|
},
|
|
395
395
|
get filtered() {
|
|
396
|
-
return
|
|
396
|
+
return y(() => !v())() && e.filters[T] === !1;
|
|
397
397
|
},
|
|
398
398
|
get onSelectStickyNote() {
|
|
399
399
|
return e.onSelectStickyNote;
|
|
@@ -440,7 +440,7 @@ function Ce(e) {
|
|
|
440
440
|
return e.selectedObject ?? null;
|
|
441
441
|
},
|
|
442
442
|
get editable() {
|
|
443
|
-
return
|
|
443
|
+
return y(() => !!m())() && !e.locked;
|
|
444
444
|
},
|
|
445
445
|
get showRegionOutlines() {
|
|
446
446
|
return m();
|
|
@@ -453,7 +453,7 @@ function Ce(e) {
|
|
|
453
453
|
return S();
|
|
454
454
|
},
|
|
455
455
|
onPreviewGeometry: f,
|
|
456
|
-
textEditorRegistry:
|
|
456
|
+
textEditorRegistry: s,
|
|
457
457
|
onCommitAnnotationMove: (t, i) => e.onCommitAnnotationMove?.(t, i),
|
|
458
458
|
onCommitAnnotationResize: (t, i) => e.onCommitAnnotationResize?.(t, i),
|
|
459
459
|
onUpdateTextAnnotation: (t, i) => e.onUpdateTextAnnotation?.(t, i),
|
|
@@ -465,7 +465,7 @@ function Ce(e) {
|
|
|
465
465
|
}
|
|
466
466
|
}), g(O, {
|
|
467
467
|
get when() {
|
|
468
|
-
return
|
|
468
|
+
return y(() => !!I())() ? e.placementPreview : null;
|
|
469
469
|
},
|
|
470
470
|
children: (d) => g(G, {
|
|
471
471
|
get preview() {
|
|
@@ -495,7 +495,7 @@ function Ce(e) {
|
|
|
495
495
|
return e.backgroundLayers ?? [];
|
|
496
496
|
},
|
|
497
497
|
get placementPreview() {
|
|
498
|
-
return e.placementPreview;
|
|
498
|
+
return y(() => !!I())() ? null : e.placementPreview;
|
|
499
499
|
},
|
|
500
500
|
get viewport() {
|
|
501
501
|
return e.viewport;
|
|
@@ -522,7 +522,7 @@ function Ce(e) {
|
|
|
522
522
|
return m();
|
|
523
523
|
},
|
|
524
524
|
get renderFreeformLayers() {
|
|
525
|
-
return !
|
|
525
|
+
return !I();
|
|
526
526
|
},
|
|
527
527
|
get viewportScale() {
|
|
528
528
|
return e.viewport.scale;
|
|
@@ -645,12 +645,12 @@ function Ce(e) {
|
|
|
645
645
|
return S();
|
|
646
646
|
},
|
|
647
647
|
onLayerGeometryPreview: f,
|
|
648
|
-
textEditorRegistry:
|
|
648
|
+
textEditorRegistry: s
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
651
|
}), null), F((o) => {
|
|
652
|
-
var d = !!e.locked,
|
|
653
|
-
return d !== o.e && n.classList.toggle("is-locked", o.e = d),
|
|
652
|
+
var d = !!e.locked, k = !!m();
|
|
653
|
+
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;
|
|
654
654
|
}, {
|
|
655
655
|
e: void 0,
|
|
656
656
|
t: void 0
|