@floegence/floe-webapp-core 0.36.12 → 0.36.15
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/deck/DeckCell.js +46 -38
- package/dist/components/file-browser/FileContextMenu.js +265 -225
- package/dist/components/ui/Dialog.js +63 -53
- package/dist/components/ui/Dropdown.js +209 -169
- package/dist/components/ui/FloatingWindow.js +73 -69
- package/dist/components/ui/InfiniteCanvas.d.ts +1 -0
- package/dist/components/ui/InfiniteCanvas.js +123 -105
- package/dist/components/ui/canvasGeometry.d.ts +32 -0
- package/dist/components/ui/canvasGeometry.js +33 -0
- package/dist/components/ui/dialogSurfaceScope.d.ts +26 -1
- package/dist/components/ui/dialogSurfaceScope.js +132 -33
- package/dist/components/ui/index.d.ts +2 -0
- package/dist/components/ui/menuUtils.d.ts +21 -2
- package/dist/components/ui/menuUtils.js +73 -43
- package/dist/components/ui/surfacePortalScope.d.ts +1 -0
- package/dist/components/ui/surfacePortalTypes.d.ts +8 -0
- package/dist/components/workbench/WorkbenchCanvas.d.ts +1 -0
- package/dist/components/workbench/WorkbenchCanvas.js +11 -8
- package/dist/components/workbench/WorkbenchSurface.js +56 -55
- package/dist/components/workbench/useWorkbenchModel.d.ts +1 -0
- package/dist/components/workbench/useWorkbenchModel.js +67 -64
- package/dist/full.js +611 -591
- package/dist/styles.css +1 -1
- package/dist/ui.js +120 -100
- package/package.json +1 -1
|
@@ -1,24 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createMemo as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { useDeck as
|
|
5
|
-
import { useWidgetRegistry as
|
|
6
|
-
import { WidgetStateProvider as
|
|
7
|
-
import { positionToGridArea as
|
|
8
|
-
import { WidgetFrame as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { spread as h, mergeProps as y, insert as u, createComponent as i, Dynamic as v, template as c } from "solid-js/web";
|
|
2
|
+
import { createMemo as a, Show as D } from "solid-js";
|
|
3
|
+
import { cn as R } from "../../utils/cn.js";
|
|
4
|
+
import { useDeck as S } from "../../context/DeckContext.js";
|
|
5
|
+
import { useWidgetRegistry as W } from "../../context/WidgetRegistry.js";
|
|
6
|
+
import { WidgetStateProvider as C } from "../../context/WidgetStateContext.js";
|
|
7
|
+
import { positionToGridArea as _ } from "../../utils/gridLayout.js";
|
|
8
|
+
import { WidgetFrame as b } from "./WidgetFrame.js";
|
|
9
|
+
import { SURFACE_PORTAL_LAYER_ATTR as k } from "../ui/dialogSurfaceScope.js";
|
|
10
|
+
var z = /* @__PURE__ */ c("<div data-floe-dialog-surface-host=true>"), x = /* @__PURE__ */ c('<div class="h-full flex items-center justify-center text-muted-foreground text-xs"><span>Widget: ');
|
|
11
|
+
function j(e) {
|
|
12
|
+
const t = S(), g = W(), s = () => t.editMode(), n = () => e.widget.type, d = a(() => g.getWidget(n())), l = a(() => _(e.position)), m = () => t.getWidgetState(e.widget.id), f = (r, w) => {
|
|
13
|
+
t.updateWidgetState(e.widget.id, r, w);
|
|
14
|
+
}, o = () => d()?.component;
|
|
14
15
|
return (() => {
|
|
15
|
-
var
|
|
16
|
-
return
|
|
16
|
+
var r = z();
|
|
17
|
+
return h(r, y({
|
|
18
|
+
get "data-floe-deck-widget-id"() {
|
|
19
|
+
return e.widget.id;
|
|
20
|
+
}
|
|
21
|
+
}, {
|
|
22
|
+
[k]: "true"
|
|
23
|
+
}, {
|
|
24
|
+
"data-floe-geometry-surface": "deck-widget",
|
|
25
|
+
get class() {
|
|
26
|
+
return R("deck-cell relative rounded-md overflow-hidden group", "bg-card border border-border", !e.isDragging && !e.isResizing && "transition-shadow duration-150 ease-out", e.isDragging && "shadow-2xl z-50 ring-2 ring-primary/70", e.isResizing && "shadow-lg z-50 ring-2 ring-primary", !e.isDragging && !e.isResizing && "hover:ring-1 hover:ring-primary/50", "select-none", e.isDragging && "cursor-grabbing");
|
|
27
|
+
},
|
|
28
|
+
get style() {
|
|
29
|
+
return e.dragOverlayStyle ?? {
|
|
30
|
+
"grid-area": l()
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}), !1, !0), u(r, i(b, {
|
|
17
34
|
get widget() {
|
|
18
35
|
return e.widget;
|
|
19
36
|
},
|
|
20
37
|
get widgetDef() {
|
|
21
|
-
return
|
|
38
|
+
return d();
|
|
22
39
|
},
|
|
23
40
|
get isDragging() {
|
|
24
41
|
return e.isDragging;
|
|
@@ -27,26 +44,26 @@ function B(e) {
|
|
|
27
44
|
return e.isResizing;
|
|
28
45
|
},
|
|
29
46
|
get children() {
|
|
30
|
-
return
|
|
47
|
+
return i(D, {
|
|
31
48
|
get when() {
|
|
32
49
|
return o();
|
|
33
50
|
},
|
|
34
51
|
get fallback() {
|
|
35
|
-
return
|
|
52
|
+
return i(A, {
|
|
36
53
|
get type() {
|
|
37
|
-
return
|
|
54
|
+
return n();
|
|
38
55
|
}
|
|
39
56
|
});
|
|
40
57
|
},
|
|
41
58
|
get children() {
|
|
42
|
-
return
|
|
59
|
+
return i(C, {
|
|
43
60
|
get widgetId() {
|
|
44
61
|
return e.widget.id;
|
|
45
62
|
},
|
|
46
|
-
state:
|
|
47
|
-
onStateChange:
|
|
63
|
+
state: m,
|
|
64
|
+
onStateChange: f,
|
|
48
65
|
get children() {
|
|
49
|
-
return
|
|
66
|
+
return i(v, {
|
|
50
67
|
get component() {
|
|
51
68
|
return o();
|
|
52
69
|
},
|
|
@@ -57,7 +74,7 @@ function B(e) {
|
|
|
57
74
|
return e.widget.config;
|
|
58
75
|
},
|
|
59
76
|
get isEditMode() {
|
|
60
|
-
return
|
|
77
|
+
return s();
|
|
61
78
|
}
|
|
62
79
|
});
|
|
63
80
|
}
|
|
@@ -65,24 +82,15 @@ function B(e) {
|
|
|
65
82
|
}
|
|
66
83
|
});
|
|
67
84
|
}
|
|
68
|
-
})),
|
|
69
|
-
var c = e.widget.id, u = C("deck-cell relative rounded-md overflow-hidden group", "bg-card border border-border", !e.isDragging && !e.isResizing && "transition-shadow duration-150 ease-out", e.isDragging && "shadow-2xl z-50 ring-2 ring-primary/70", e.isResizing && "shadow-lg z-50 ring-2 ring-primary", !e.isDragging && !e.isResizing && "hover:ring-1 hover:ring-primary/50", "select-none", e.isDragging && "cursor-grabbing"), y = e.dragOverlayStyle ?? {
|
|
70
|
-
"grid-area": w()
|
|
71
|
-
};
|
|
72
|
-
return c !== t.e && b(i, "data-floe-deck-widget-id", t.e = c), u !== t.t && S(i, t.t = u), t.a = k(i, y, t.a), t;
|
|
73
|
-
}, {
|
|
74
|
-
e: void 0,
|
|
75
|
-
t: void 0,
|
|
76
|
-
a: void 0
|
|
77
|
-
}), i;
|
|
85
|
+
})), r;
|
|
78
86
|
})();
|
|
79
87
|
}
|
|
80
|
-
function
|
|
88
|
+
function A(e) {
|
|
81
89
|
return (() => {
|
|
82
|
-
var
|
|
83
|
-
return
|
|
90
|
+
var t = x(), g = t.firstChild;
|
|
91
|
+
return g.firstChild, u(g, () => e.type, null), t;
|
|
84
92
|
})();
|
|
85
93
|
}
|
|
86
94
|
export {
|
|
87
|
-
|
|
95
|
+
j as DeckCell
|
|
88
96
|
};
|