@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,23 +1,25 @@
|
|
|
1
|
-
import { createComponent as n, Portal as
|
|
2
|
-
import { createUniqueId as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { X as
|
|
6
|
-
import { useResolvedFloeConfig as
|
|
7
|
-
import { useOverlayMask as
|
|
8
|
-
import {
|
|
9
|
-
import { LOCAL_INTERACTION_SURFACE_ATTR as
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
const o =
|
|
13
|
-
let
|
|
14
|
-
const
|
|
1
|
+
import { createComponent as n, Portal as D, setAttribute as u, spread as x, mergeProps as $, memo as C, insert as l, effect as S, template as c, use as E } from "solid-js/web";
|
|
2
|
+
import { createUniqueId as M, createMemo as T, Show as s } from "solid-js";
|
|
3
|
+
import { cn as _ } from "../../utils/cn.js";
|
|
4
|
+
import { Button as y } from "./Button.js";
|
|
5
|
+
import { X as P } from "../icons/index.js";
|
|
6
|
+
import { useResolvedFloeConfig as j } from "../../context/FloeConfigContext.js";
|
|
7
|
+
import { useOverlayMask as z } from "../../hooks/useOverlayMask.js";
|
|
8
|
+
import { resolveSurfacePortalHost as F, projectSurfacePortalRect as H, resolveSurfacePortalBoundaryRect as N, DIALOG_SURFACE_BOUNDARY_ATTR as h, isSurfacePortalMode as U, resolveSurfacePortalMount as L } from "./dialogSurfaceScope.js";
|
|
9
|
+
import { LOCAL_INTERACTION_SURFACE_ATTR as W } from "./localInteractionSurface.js";
|
|
10
|
+
var q = /* @__PURE__ */ c('<h2 class="text-sm font-semibold">'), G = /* @__PURE__ */ c('<p class="mt-0.5 text-xs text-muted-foreground">'), X = /* @__PURE__ */ c('<div class="flex items-start justify-between p-3 border-b border-border"><div>'), Y = /* @__PURE__ */ c('<div class="flex items-center justify-end gap-2 p-3 border-t border-border">'), J = /* @__PURE__ */ c('<div><div></div><div class="relative z-[1] flex h-full w-full items-center justify-center"><div><div class="flex-1 overflow-auto overscroll-contain p-3">'), K = /* @__PURE__ */ c("<div>");
|
|
11
|
+
function Q(e) {
|
|
12
|
+
const o = M(), w = () => `dialog-${o}-title`, k = () => `dialog-${o}-description`;
|
|
13
|
+
let b;
|
|
14
|
+
const f = T(() => e.open ? F() : {
|
|
15
15
|
host: null,
|
|
16
|
+
boundaryHost: null,
|
|
17
|
+
mountHost: null,
|
|
16
18
|
mode: "global"
|
|
17
|
-
}),
|
|
18
|
-
return
|
|
19
|
+
}), g = () => `dialog-boundary-${o}`, t = () => U(f()), A = () => L(f()), m = T(() => H(N(f()), f())), B = (r) => typeof Element < "u" && r instanceof Element ? !!r.closest(`[${h}="${g()}"]`) : typeof Node < "u" && r instanceof Node ? !!r.parentElement?.closest(`[${h}="${g()}"]`) : !1;
|
|
20
|
+
return z({
|
|
19
21
|
open: () => e.open,
|
|
20
|
-
root: () =>
|
|
22
|
+
root: () => b,
|
|
21
23
|
containsTarget: (r) => t() && B(r),
|
|
22
24
|
onClose: () => e.onOpenChange(!1),
|
|
23
25
|
lockBodyScroll: () => !t(),
|
|
@@ -28,94 +30,102 @@ function G(e) {
|
|
|
28
30
|
blockWheel: () => t() ? "none" : "outside",
|
|
29
31
|
blockTouchMove: () => t() ? "none" : "outside",
|
|
30
32
|
restoreFocus: !0
|
|
31
|
-
}), n(
|
|
33
|
+
}), n(s, {
|
|
32
34
|
get when() {
|
|
33
35
|
return e.open;
|
|
34
36
|
},
|
|
35
37
|
get children() {
|
|
36
|
-
return n(
|
|
38
|
+
return n(D, {
|
|
37
39
|
get mount() {
|
|
38
|
-
return
|
|
40
|
+
return A();
|
|
39
41
|
},
|
|
40
42
|
get children() {
|
|
41
|
-
var r =
|
|
42
|
-
|
|
43
|
+
var r = J(), v = r.firstChild, I = v.nextSibling, i = I.firstChild, p = i.firstChild;
|
|
44
|
+
u(r, "data-floe-dialog-overlay-root", o), x(r, $({
|
|
43
45
|
get "data-floe-dialog-mode"() {
|
|
44
46
|
return t() ? "surface" : "global";
|
|
45
47
|
}
|
|
46
48
|
}, () => ({
|
|
47
|
-
[
|
|
49
|
+
[W]: t() ? "true" : void 0
|
|
48
50
|
}), {
|
|
49
51
|
get class() {
|
|
50
|
-
return
|
|
52
|
+
return _(t() ? "absolute z-20 box-border p-3" : "fixed inset-0 box-border z-50 p-4");
|
|
53
|
+
},
|
|
54
|
+
get style() {
|
|
55
|
+
return C(() => !!t())() ? {
|
|
56
|
+
left: `${m().left}px`,
|
|
57
|
+
top: `${m().top}px`,
|
|
58
|
+
width: `${m().width}px`,
|
|
59
|
+
height: `${m().height}px`
|
|
60
|
+
} : void 0;
|
|
51
61
|
}
|
|
52
|
-
}), !1, !0),
|
|
53
|
-
[
|
|
62
|
+
}), !1, !0), u(v, "data-floe-dialog-backdrop", o), x(v, $(() => ({
|
|
63
|
+
[h]: g()
|
|
54
64
|
}), {
|
|
55
65
|
get class() {
|
|
56
|
-
return
|
|
66
|
+
return _("absolute inset-0 cursor-pointer animate-in fade-in", t() ? "bg-background/72 backdrop-blur-[2px]" : "bg-background/80 backdrop-blur-sm");
|
|
57
67
|
},
|
|
58
68
|
onClick: () => e.onOpenChange(!1)
|
|
59
69
|
}), !1, !1);
|
|
60
|
-
var
|
|
61
|
-
return typeof
|
|
62
|
-
[
|
|
70
|
+
var O = b;
|
|
71
|
+
return typeof O == "function" ? E(O, i) : b = i, u(i, "data-floe-dialog-panel", o), x(i, $(() => ({
|
|
72
|
+
[h]: g()
|
|
63
73
|
}), {
|
|
64
74
|
get class() {
|
|
65
|
-
return
|
|
75
|
+
return _(t() ? "flex max-h-[calc(100%-1rem)] w-[min(32rem,calc(100%-1rem))] max-w-[calc(100%-1rem)] flex-col" : "w-full max-w-md max-h-[85vh]", "bg-card text-card-foreground rounded-md shadow-lg", "border border-border", "animate-in fade-in zoom-in-95", "flex flex-col", e.class);
|
|
66
76
|
},
|
|
67
77
|
role: "dialog",
|
|
68
78
|
get "aria-modal"() {
|
|
69
79
|
return t() ? void 0 : "true";
|
|
70
80
|
},
|
|
71
81
|
get "aria-labelledby"() {
|
|
72
|
-
return
|
|
82
|
+
return C(() => !!e.title)() ? w() : void 0;
|
|
73
83
|
},
|
|
74
84
|
get "aria-describedby"() {
|
|
75
|
-
return
|
|
85
|
+
return C(() => !!e.description)() ? k() : void 0;
|
|
76
86
|
},
|
|
77
87
|
tabIndex: -1
|
|
78
|
-
}), !1, !0), l(i, n(
|
|
88
|
+
}), !1, !0), l(i, n(s, {
|
|
79
89
|
get when() {
|
|
80
90
|
return e.title || e.description;
|
|
81
91
|
},
|
|
82
92
|
get children() {
|
|
83
|
-
var d =
|
|
84
|
-
return l(
|
|
93
|
+
var d = X(), R = d.firstChild;
|
|
94
|
+
return l(R, n(s, {
|
|
85
95
|
get when() {
|
|
86
96
|
return e.title;
|
|
87
97
|
},
|
|
88
98
|
get children() {
|
|
89
|
-
var a =
|
|
90
|
-
return l(a, () => e.title),
|
|
99
|
+
var a = q();
|
|
100
|
+
return l(a, () => e.title), S(() => u(a, "id", w())), a;
|
|
91
101
|
}
|
|
92
|
-
}), null), l(
|
|
102
|
+
}), null), l(R, n(s, {
|
|
93
103
|
get when() {
|
|
94
104
|
return e.description;
|
|
95
105
|
},
|
|
96
106
|
get children() {
|
|
97
|
-
var a =
|
|
98
|
-
return l(a, () => e.description),
|
|
107
|
+
var a = G();
|
|
108
|
+
return l(a, () => e.description), S(() => u(a, "id", k())), a;
|
|
99
109
|
}
|
|
100
|
-
}), null), l(d, n(
|
|
110
|
+
}), null), l(d, n(y, {
|
|
101
111
|
variant: "ghost-destructive",
|
|
102
112
|
size: "icon",
|
|
103
113
|
class: "h-6 w-6 -mr-1",
|
|
104
114
|
onClick: () => e.onOpenChange(!1),
|
|
105
115
|
"aria-label": "Close",
|
|
106
116
|
get children() {
|
|
107
|
-
return n(
|
|
117
|
+
return n(P, {
|
|
108
118
|
class: "w-3.5 h-3.5"
|
|
109
119
|
});
|
|
110
120
|
}
|
|
111
121
|
}), null), d;
|
|
112
122
|
}
|
|
113
|
-
}),
|
|
123
|
+
}), p), l(p, () => e.children), l(i, n(s, {
|
|
114
124
|
get when() {
|
|
115
125
|
return e.footer;
|
|
116
126
|
},
|
|
117
127
|
get children() {
|
|
118
|
-
var d =
|
|
128
|
+
var d = Y();
|
|
119
129
|
return l(d, () => e.footer), d;
|
|
120
130
|
}
|
|
121
131
|
}), null), r;
|
|
@@ -124,9 +134,9 @@ function G(e) {
|
|
|
124
134
|
}
|
|
125
135
|
});
|
|
126
136
|
}
|
|
127
|
-
function
|
|
128
|
-
const o =
|
|
129
|
-
return n(
|
|
137
|
+
function ae(e) {
|
|
138
|
+
const o = j();
|
|
139
|
+
return n(Q, {
|
|
130
140
|
get open() {
|
|
131
141
|
return e.open;
|
|
132
142
|
},
|
|
@@ -140,7 +150,7 @@ function re(e) {
|
|
|
140
150
|
return e.description;
|
|
141
151
|
},
|
|
142
152
|
get footer() {
|
|
143
|
-
return [n(
|
|
153
|
+
return [n(y, {
|
|
144
154
|
variant: "ghost",
|
|
145
155
|
onClick: () => e.onOpenChange(!1),
|
|
146
156
|
get disabled() {
|
|
@@ -149,7 +159,7 @@ function re(e) {
|
|
|
149
159
|
get children() {
|
|
150
160
|
return e.cancelText ?? o.config.strings.confirmDialog.cancel;
|
|
151
161
|
}
|
|
152
|
-
}), n(
|
|
162
|
+
}), n(y, {
|
|
153
163
|
get variant() {
|
|
154
164
|
return e.variant === "destructive" ? "destructive" : "primary";
|
|
155
165
|
},
|
|
@@ -165,11 +175,11 @@ function re(e) {
|
|
|
165
175
|
})];
|
|
166
176
|
},
|
|
167
177
|
get children() {
|
|
168
|
-
return e.children ??
|
|
178
|
+
return e.children ?? K();
|
|
169
179
|
}
|
|
170
180
|
});
|
|
171
181
|
}
|
|
172
182
|
export {
|
|
173
|
-
|
|
174
|
-
|
|
183
|
+
ae as ConfirmDialog,
|
|
184
|
+
Q as Dialog
|
|
175
185
|
};
|