@floegence/floe-webapp-core 0.35.21 → 0.35.23
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/chat.css +33 -7
- package/dist/components/chat/blocks/FileBlock.js +42 -27
- package/dist/components/chat/blocks/ToolCallBlock.js +150 -149
- package/dist/components/file-browser/Breadcrumb.js +73 -72
- package/dist/components/file-browser/DragPreview.d.ts +2 -2
- package/dist/components/file-browser/DragPreview.js +15 -15
- package/dist/components/file-browser/FileBrowser.js +13 -13
- package/dist/components/file-browser/index.d.ts +1 -0
- package/dist/components/layout/ActivityBar.d.ts +1 -0
- package/dist/components/layout/ActivityBar.js +51 -45
- package/dist/components/layout/MobileTabBar.d.ts +1 -0
- package/dist/components/layout/MobileTabBar.js +109 -65
- package/dist/components/layout/Shell.js +190 -158
- package/dist/components/layout/Sidebar.d.ts +1 -0
- package/dist/components/layout/Sidebar.js +33 -31
- package/dist/components/layout/SidebarPane.d.ts +1 -0
- package/dist/components/layout/SidebarPane.js +40 -37
- package/dist/components/layout/TopBar.d.ts +1 -0
- package/dist/components/layout/TopBar.js +23 -22
- package/dist/components/ui/Dropdown.d.ts +13 -0
- package/dist/components/ui/Dropdown.js +263 -145
- package/dist/components/ui/Tabs.d.ts +4 -0
- package/dist/components/ui/Tabs.js +207 -149
- package/dist/context/FloeConfigContext.d.ts +17 -0
- package/dist/context/FloeConfigContext.js +34 -25
- package/dist/context/NotificationContext.js +76 -69
- package/dist/file-browser.js +19 -17
- package/dist/full.js +302 -300
- package/dist/styles/tokens.d.ts +4 -4
- package/dist/styles/tokens.js +55 -14
- package/dist/styles.css +1 -1
- package/dist/themes/light.css +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createComponent as C } from "solid-js/web";
|
|
2
|
-
import { createContext as
|
|
2
|
+
import { createContext as L, createMemo as u, createEffect as F, onCleanup as I, useContext as v } from "solid-js";
|
|
3
3
|
const m = {
|
|
4
4
|
storage: {
|
|
5
5
|
namespace: "floe",
|
|
@@ -46,6 +46,15 @@ const m = {
|
|
|
46
46
|
storageKey: "theme",
|
|
47
47
|
defaultTheme: "system"
|
|
48
48
|
},
|
|
49
|
+
accessibility: {
|
|
50
|
+
mainContentId: "floe-main-content",
|
|
51
|
+
skipLinkLabel: "Skip to main content",
|
|
52
|
+
topBarLabel: "Application toolbar",
|
|
53
|
+
primaryNavigationLabel: "Primary navigation",
|
|
54
|
+
mobileNavigationLabel: "Primary navigation",
|
|
55
|
+
sidebarLabel: "Sidebar",
|
|
56
|
+
mainLabel: "Main content"
|
|
57
|
+
},
|
|
49
58
|
deck: {
|
|
50
59
|
storageKey: "deck"
|
|
51
60
|
},
|
|
@@ -70,7 +79,7 @@ const m = {
|
|
|
70
79
|
}
|
|
71
80
|
}
|
|
72
81
|
};
|
|
73
|
-
function
|
|
82
|
+
function k() {
|
|
74
83
|
if (!(typeof window > "u"))
|
|
75
84
|
return {
|
|
76
85
|
getItem: (e) => localStorage.getItem(e),
|
|
@@ -79,8 +88,8 @@ function S() {
|
|
|
79
88
|
keys: () => Object.keys(localStorage)
|
|
80
89
|
};
|
|
81
90
|
}
|
|
82
|
-
function
|
|
83
|
-
const t = e.adapter ??
|
|
91
|
+
function h(e) {
|
|
92
|
+
const t = e.adapter ?? k(), c = e.namespace ? `${e.namespace}-` : "", r = (o) => `${c}${o}`, n = () => e.enabled && !!t, i = /* @__PURE__ */ new Map(), d = () => {
|
|
84
93
|
if (n()) {
|
|
85
94
|
for (const [o, a] of i.entries()) {
|
|
86
95
|
clearTimeout(a.timer);
|
|
@@ -122,8 +131,8 @@ function v(e) {
|
|
|
122
131
|
i.delete(l);
|
|
123
132
|
try {
|
|
124
133
|
t.setItem(l, JSON.stringify(f.value));
|
|
125
|
-
} catch (
|
|
126
|
-
console.warn(`Failed to save ${l}:`,
|
|
134
|
+
} catch (w) {
|
|
135
|
+
console.warn(`Failed to save ${l}:`, w);
|
|
127
136
|
}
|
|
128
137
|
}
|
|
129
138
|
}, s);
|
|
@@ -157,7 +166,7 @@ function v(e) {
|
|
|
157
166
|
}
|
|
158
167
|
};
|
|
159
168
|
}
|
|
160
|
-
function
|
|
169
|
+
function S(e) {
|
|
161
170
|
if (typeof window > "u") return () => {
|
|
162
171
|
};
|
|
163
172
|
const t = () => {
|
|
@@ -184,7 +193,7 @@ function k(e) {
|
|
|
184
193
|
}
|
|
185
194
|
};
|
|
186
195
|
}
|
|
187
|
-
function
|
|
196
|
+
function b(e, t) {
|
|
188
197
|
if (!t) return e;
|
|
189
198
|
if (typeof e != "object" || e === null || Array.isArray(e)) return t ?? e;
|
|
190
199
|
const c = {
|
|
@@ -193,17 +202,17 @@ function w(e, t) {
|
|
|
193
202
|
for (const [r, n] of Object.entries(t)) {
|
|
194
203
|
if (n === void 0) continue;
|
|
195
204
|
const i = e[r];
|
|
196
|
-
typeof i == "object" && i !== null && typeof n == "object" && n !== null && !Array.isArray(n) ? c[r] =
|
|
205
|
+
typeof i == "object" && i !== null && typeof n == "object" && n !== null && !Array.isArray(n) ? c[r] = b(i, n) : c[r] = n;
|
|
197
206
|
}
|
|
198
207
|
return c;
|
|
199
208
|
}
|
|
200
|
-
const y =
|
|
201
|
-
function
|
|
202
|
-
const t = u(() =>
|
|
203
|
-
|
|
204
|
-
const n = c(), d = t().storage.enabled ?
|
|
209
|
+
const y = L();
|
|
210
|
+
function N(e) {
|
|
211
|
+
const t = u(() => b(m, e.config)), c = u(() => h(t().storage));
|
|
212
|
+
F(() => {
|
|
213
|
+
const n = c(), d = t().storage.enabled ? S(n) : () => {
|
|
205
214
|
};
|
|
206
|
-
|
|
215
|
+
I(() => {
|
|
207
216
|
d(), n.dispose?.();
|
|
208
217
|
});
|
|
209
218
|
});
|
|
@@ -220,23 +229,23 @@ function O(e) {
|
|
|
220
229
|
}
|
|
221
230
|
});
|
|
222
231
|
}
|
|
223
|
-
function
|
|
224
|
-
const e =
|
|
232
|
+
function O() {
|
|
233
|
+
const e = v(y);
|
|
225
234
|
if (!e)
|
|
226
235
|
throw new Error("FloeConfigContext not found. Make sure to wrap your app with FloeConfigProvider (or FloeProvider).");
|
|
227
236
|
return e;
|
|
228
237
|
}
|
|
229
|
-
const
|
|
238
|
+
const E = h(m.storage), T = {
|
|
230
239
|
config: m,
|
|
231
|
-
persist:
|
|
240
|
+
persist: E
|
|
232
241
|
};
|
|
233
|
-
function
|
|
234
|
-
return
|
|
242
|
+
function D() {
|
|
243
|
+
return v(y) ?? T;
|
|
235
244
|
}
|
|
236
245
|
export {
|
|
237
246
|
m as DEFAULT_FLOE_CONFIG,
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
247
|
+
N as FloeConfigProvider,
|
|
248
|
+
S as installPersistFlushListeners,
|
|
249
|
+
O as useFloeConfig,
|
|
250
|
+
D as useResolvedFloeConfig
|
|
242
251
|
};
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { For as
|
|
3
|
-
import { createStore as
|
|
4
|
-
import { createSimpleContext as
|
|
5
|
-
import { cn as
|
|
6
|
-
var
|
|
7
|
-
const
|
|
8
|
-
function
|
|
9
|
-
const [
|
|
1
|
+
import { insert as u, createComponent as d, template as l, effect as k, className as $, setAttribute as h, delegateEvents as y } from "solid-js/web";
|
|
2
|
+
import { For as _, onCleanup as C, Show as x } from "solid-js";
|
|
3
|
+
import { createStore as M, produce as w } from "solid-js/store";
|
|
4
|
+
import { createSimpleContext as S } from "./createSimpleContext.js";
|
|
5
|
+
import { cn as N } from "../utils/cn.js";
|
|
6
|
+
var T = /* @__PURE__ */ l('<div class="fixed bottom-4 right-4 z-[100] flex flex-col gap-2 max-w-sm">'), D = /* @__PURE__ */ l('<svg class="w-4 h-4 text-info"fill=none viewBox="0 0 24 24"stroke=currentColor stroke-width=2><circle cx=12 cy=12 r=10></circle><path d="M12 16v-4M12 8h.01">'), B = /* @__PURE__ */ l('<svg class="w-4 h-4 text-success"fill=none viewBox="0 0 24 24"stroke=currentColor stroke-width=2><path stroke-linecap=round stroke-linejoin=round d="M5 13l4 4L19 7">'), L = /* @__PURE__ */ l('<svg class="w-4 h-4 text-warning"fill=none viewBox="0 0 24 24"stroke=currentColor stroke-width=2><path stroke-linecap=round stroke-linejoin=round d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z">'), A = /* @__PURE__ */ l('<svg class="w-4 h-4 text-error"fill=none viewBox="0 0 24 24"stroke=currentColor stroke-width=2><circle cx=12 cy=12 r=10></circle><path stroke-linecap=round d="M15 9l-6 6M9 9l6 6">'), E = /* @__PURE__ */ l('<p class="mt-1 text-sm text-muted-foreground">'), j = /* @__PURE__ */ l('<button type=button class="mt-2 text-sm font-medium text-foreground hover:underline focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2">'), z = /* @__PURE__ */ l('<div><div class="flex items-start gap-3"><span class="flex-shrink-0 mt-0.5"></span><div class="flex-1 min-w-0"><p class="font-medium text-sm"></p></div><button type=button class="flex-shrink-0 text-muted-foreground hover:text-foreground transition-colors focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2"aria-label=Dismiss><svg class="w-4 h-4"fill=none viewBox="0 0 24 24"stroke=currentColor stroke-width=2><path stroke-linecap=round stroke-linejoin=round d="M6 18L18 6M6 6l12 12">');
|
|
7
|
+
const F = 5e3;
|
|
8
|
+
function I() {
|
|
9
|
+
const [i, a] = M({
|
|
10
10
|
notifications: []
|
|
11
|
-
}),
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
}), n = /* @__PURE__ */ new Map();
|
|
12
|
+
C(() => {
|
|
13
|
+
n.forEach((t) => clearTimeout(t)), n.clear();
|
|
14
14
|
});
|
|
15
|
-
const
|
|
16
|
-
const e =
|
|
17
|
-
e && (clearTimeout(e),
|
|
18
|
-
|
|
15
|
+
const s = (t) => {
|
|
16
|
+
const e = n.get(t);
|
|
17
|
+
e && (clearTimeout(e), n.delete(t)), a(w((c) => {
|
|
18
|
+
c.notifications = c.notifications.filter((r) => r.id !== t);
|
|
19
19
|
}));
|
|
20
|
-
},
|
|
21
|
-
const e = `notification-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
|
|
22
|
-
if (
|
|
23
|
-
|
|
20
|
+
}, f = (t) => {
|
|
21
|
+
const e = `notification-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, c = t.duration ?? F;
|
|
22
|
+
if (a(w((r) => {
|
|
23
|
+
r.notifications.push({
|
|
24
24
|
...t,
|
|
25
25
|
id: e
|
|
26
26
|
});
|
|
27
|
-
})),
|
|
28
|
-
const
|
|
29
|
-
|
|
27
|
+
})), c > 0) {
|
|
28
|
+
const r = setTimeout(() => s(e), c);
|
|
29
|
+
n.set(e, r);
|
|
30
30
|
}
|
|
31
31
|
return e;
|
|
32
32
|
};
|
|
33
33
|
return {
|
|
34
|
-
notifications: () =>
|
|
35
|
-
show:
|
|
36
|
-
dismiss:
|
|
34
|
+
notifications: () => i.notifications,
|
|
35
|
+
show: f,
|
|
36
|
+
dismiss: s,
|
|
37
37
|
dismissAll: () => {
|
|
38
|
-
|
|
38
|
+
n.forEach((t) => clearTimeout(t)), n.clear(), a("notifications", []);
|
|
39
39
|
},
|
|
40
|
-
info: (t, e) =>
|
|
40
|
+
info: (t, e) => f({
|
|
41
41
|
type: "info",
|
|
42
42
|
title: t,
|
|
43
43
|
message: e
|
|
44
44
|
}),
|
|
45
|
-
success: (t, e) =>
|
|
45
|
+
success: (t, e) => f({
|
|
46
46
|
type: "success",
|
|
47
47
|
title: t,
|
|
48
48
|
message: e
|
|
49
49
|
}),
|
|
50
|
-
warning: (t, e) =>
|
|
50
|
+
warning: (t, e) => f({
|
|
51
51
|
type: "warning",
|
|
52
52
|
title: t,
|
|
53
53
|
message: e
|
|
54
54
|
}),
|
|
55
|
-
error: (t, e) =>
|
|
55
|
+
error: (t, e) => f({
|
|
56
56
|
type: "error",
|
|
57
57
|
title: t,
|
|
58
58
|
message: e
|
|
@@ -60,67 +60,74 @@ function L() {
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
const {
|
|
63
|
-
Provider:
|
|
64
|
-
use:
|
|
65
|
-
} =
|
|
63
|
+
Provider: J,
|
|
64
|
+
use: P
|
|
65
|
+
} = S({
|
|
66
66
|
name: "Notification",
|
|
67
|
-
init:
|
|
67
|
+
init: I
|
|
68
68
|
});
|
|
69
|
-
function
|
|
69
|
+
function K() {
|
|
70
70
|
const {
|
|
71
|
-
notifications:
|
|
72
|
-
dismiss:
|
|
73
|
-
} =
|
|
71
|
+
notifications: i,
|
|
72
|
+
dismiss: a
|
|
73
|
+
} = P();
|
|
74
74
|
return (() => {
|
|
75
|
-
var
|
|
76
|
-
return
|
|
75
|
+
var n = T();
|
|
76
|
+
return u(n, d(_, {
|
|
77
77
|
get each() {
|
|
78
|
-
return
|
|
78
|
+
return i();
|
|
79
79
|
},
|
|
80
|
-
children: (
|
|
81
|
-
notification:
|
|
82
|
-
onDismiss: () => s
|
|
80
|
+
children: (s) => d(R, {
|
|
81
|
+
notification: s,
|
|
82
|
+
onDismiss: () => a(s.id)
|
|
83
83
|
})
|
|
84
|
-
})),
|
|
84
|
+
})), n;
|
|
85
85
|
})();
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
const
|
|
87
|
+
function R(i) {
|
|
88
|
+
const a = {
|
|
89
89
|
info: "border-l-info",
|
|
90
90
|
success: "border-l-success",
|
|
91
91
|
warning: "border-l-warning",
|
|
92
92
|
error: "border-l-error"
|
|
93
|
-
},
|
|
94
|
-
info: () =>
|
|
95
|
-
success: () =>
|
|
96
|
-
warning: () =>
|
|
97
|
-
error: () =>
|
|
98
|
-
};
|
|
93
|
+
}, n = {
|
|
94
|
+
info: () => D(),
|
|
95
|
+
success: () => B(),
|
|
96
|
+
warning: () => L(),
|
|
97
|
+
error: () => A()
|
|
98
|
+
}, s = () => i.notification.type === "error" || i.notification.type === "warning" ? "alert" : "status", f = () => s() === "alert" ? "assertive" : "polite";
|
|
99
99
|
return (() => {
|
|
100
|
-
var
|
|
101
|
-
return
|
|
100
|
+
var t = z(), e = t.firstChild, c = e.firstChild, r = c.nextSibling, p = r.firstChild, b = r.nextSibling;
|
|
101
|
+
return u(c, () => n[i.notification.type]()), u(p, () => i.notification.title), u(r, d(x, {
|
|
102
102
|
get when() {
|
|
103
|
-
return
|
|
103
|
+
return i.notification.message;
|
|
104
104
|
},
|
|
105
105
|
get children() {
|
|
106
|
-
var
|
|
107
|
-
return
|
|
106
|
+
var o = E();
|
|
107
|
+
return u(o, () => i.notification.message), o;
|
|
108
108
|
}
|
|
109
|
-
}), null),
|
|
109
|
+
}), null), u(r, d(x, {
|
|
110
110
|
get when() {
|
|
111
|
-
return
|
|
111
|
+
return i.notification.action;
|
|
112
112
|
},
|
|
113
113
|
get children() {
|
|
114
|
-
var
|
|
115
|
-
return
|
|
114
|
+
var o = j();
|
|
115
|
+
return o.$$click = () => i.notification.action?.onClick(), u(o, () => i.notification.action.label), o;
|
|
116
116
|
}
|
|
117
|
-
}), null),
|
|
117
|
+
}), null), b.$$click = () => i.onDismiss(), k((o) => {
|
|
118
|
+
var m = N("animate-in slide-in-from-right fade-in duration-200", "rounded-lg border border-border border-l-[3px] p-3.5", "shadow-md", "bg-card text-card-foreground", a[i.notification.type]), v = s(), g = f();
|
|
119
|
+
return m !== o.e && $(t, o.e = m), v !== o.t && h(t, "role", o.t = v), g !== o.a && h(t, "aria-live", o.a = g), o;
|
|
120
|
+
}, {
|
|
121
|
+
e: void 0,
|
|
122
|
+
t: void 0,
|
|
123
|
+
a: void 0
|
|
124
|
+
}), t;
|
|
118
125
|
})();
|
|
119
126
|
}
|
|
120
|
-
|
|
127
|
+
y(["click"]);
|
|
121
128
|
export {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
129
|
+
K as NotificationContainer,
|
|
130
|
+
J as NotificationProvider,
|
|
131
|
+
I as createNotificationService,
|
|
132
|
+
P as useNotification
|
|
126
133
|
};
|
package/dist/file-browser.js
CHANGED
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
import { Breadcrumb as r } from "./components/file-browser/Breadcrumb.js";
|
|
2
|
-
import { CodeFileIcon as l, ConfigFileIcon as t, DocumentFileIcon as F, FileIcon as c, FileItemIcon as n, FolderIcon as I, FolderOpenIcon as m, ImageFileIcon as p, JavaScriptFileIcon as f, ShellScriptFileIcon as x, StyleFileIcon as s, TypeScriptFileIcon as
|
|
2
|
+
import { CodeFileIcon as l, ConfigFileIcon as t, DocumentFileIcon as F, FileIcon as c, FileItemIcon as n, FolderIcon as I, FolderOpenIcon as m, ImageFileIcon as p, JavaScriptFileIcon as f, ShellScriptFileIcon as x, StyleFileIcon as s, TypeScriptFileIcon as w, getFileIcon as a, resolveFileItemIcon as d } from "./components/file-browser/FileIcons.js";
|
|
3
3
|
import { DirectoryTree as S } from "./components/file-browser/DirectoryTree.js";
|
|
4
|
-
import { FileBrowser as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { FileBrowser as u } from "./components/file-browser/FileBrowser.js";
|
|
5
|
+
import { FileBrowserDragPreview as y } from "./components/file-browser/DragPreview.js";
|
|
6
|
+
import { FileBrowserProvider as D, useFileBrowser as T } from "./components/file-browser/FileBrowserContext.js";
|
|
7
|
+
import { FileBrowserToolbar as P } from "./components/file-browser/FileBrowserToolbar.js";
|
|
8
|
+
import { FileContextMenu as h } from "./components/file-browser/FileContextMenu.js";
|
|
9
|
+
import { FileGridView as J } from "./components/file-browser/FileGridView.js";
|
|
10
|
+
import { FileListView as M } from "./components/file-browser/FileListView.js";
|
|
10
11
|
export {
|
|
11
12
|
r as Breadcrumb,
|
|
12
13
|
l as CodeFileIcon,
|
|
13
14
|
t as ConfigFileIcon,
|
|
14
15
|
S as DirectoryTree,
|
|
15
16
|
F as DocumentFileIcon,
|
|
16
|
-
|
|
17
|
-
y as
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
u as FileBrowser,
|
|
18
|
+
y as FileBrowserDragPreview,
|
|
19
|
+
D as FileBrowserProvider,
|
|
20
|
+
P as FileBrowserToolbar,
|
|
21
|
+
h as FileContextMenu,
|
|
22
|
+
J as FileGridView,
|
|
21
23
|
c as FileIcon,
|
|
22
24
|
n as FileItemIcon,
|
|
23
|
-
|
|
25
|
+
M as FileListView,
|
|
24
26
|
I as FolderIcon,
|
|
25
27
|
m as FolderOpenIcon,
|
|
26
28
|
p as ImageFileIcon,
|
|
27
29
|
f as JavaScriptFileIcon,
|
|
28
30
|
x as ShellScriptFileIcon,
|
|
29
31
|
s as StyleFileIcon,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
w as TypeScriptFileIcon,
|
|
33
|
+
a as getFileIcon,
|
|
34
|
+
d as resolveFileItemIcon,
|
|
35
|
+
T as useFileBrowser
|
|
34
36
|
};
|