@floegence/floe-webapp-core 0.25.0 → 0.26.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.
- package/dist/components/layout/ActivityBar.d.ts +11 -1
- package/dist/components/layout/ActivityBar.js +48 -44
- package/dist/components/layout/Shell.d.ts +10 -0
- package/dist/components/layout/Shell.js +148 -115
- package/dist/components/layout/TopBarIconButton.d.ts +12 -0
- package/dist/components/layout/TopBarIconButton.js +44 -0
- package/dist/components/layout/activityBarBehavior.d.ts +24 -0
- package/dist/components/layout/activityBarBehavior.js +6 -0
- package/dist/components/layout/index.d.ts +1 -0
- package/dist/full.js +158 -156
- package/dist/layout.js +16 -14
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Component } from 'solid-js';
|
|
2
|
+
import { type ActivityBarCollapseBehavior } from './activityBarBehavior';
|
|
2
3
|
export interface ActivityBarItem {
|
|
3
4
|
id: string;
|
|
4
5
|
icon: Component<{
|
|
@@ -7,12 +8,21 @@ export interface ActivityBarItem {
|
|
|
7
8
|
label: string;
|
|
8
9
|
badge?: number | string | (() => number | string | undefined);
|
|
9
10
|
onClick?: () => void;
|
|
11
|
+
/**
|
|
12
|
+
* How this item should affect the sidebar collapsed state when clicked.
|
|
13
|
+
*
|
|
14
|
+
* - `toggle` (default): VSCode-style behavior (change tab, open sidebar; click active tab to collapse).
|
|
15
|
+
* - `preserve`: change tab without mutating the collapsed state (useful for fullScreen pages).
|
|
16
|
+
*/
|
|
17
|
+
collapseBehavior?: ActivityBarCollapseBehavior;
|
|
10
18
|
}
|
|
11
19
|
export interface ActivityBarProps {
|
|
12
20
|
items: ActivityBarItem[];
|
|
13
21
|
bottomItems?: ActivityBarItem[];
|
|
14
22
|
activeId: string;
|
|
15
|
-
onActiveChange: (id: string
|
|
23
|
+
onActiveChange: (id: string, opts?: {
|
|
24
|
+
openSidebar?: boolean;
|
|
25
|
+
}) => void;
|
|
16
26
|
collapsed?: boolean;
|
|
17
27
|
onCollapsedChange?: (collapsed: boolean) => void;
|
|
18
28
|
class?: string;
|
|
@@ -1,91 +1,95 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { createMemo as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { deferNonBlocking as
|
|
5
|
-
import { Tooltip as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { insert as a, createComponent as l, effect as f, className as b, template as s, Dynamic as A, memo as k, setAttribute as x, delegateEvents as w } from "solid-js/web";
|
|
2
|
+
import { createMemo as v, For as y, Show as m } from "solid-js";
|
|
3
|
+
import { cn as g } from "../../utils/cn.js";
|
|
4
|
+
import { deferNonBlocking as I } from "../../utils/defer.js";
|
|
5
|
+
import { Tooltip as $ } from "../ui/Tooltip.js";
|
|
6
|
+
import { resolveActivityBarClick as _ } from "./activityBarBehavior.js";
|
|
7
|
+
var B = /* @__PURE__ */ s('<div class="flex flex-col">'), p = /* @__PURE__ */ s('<div><div class="flex flex-col">'), S = /* @__PURE__ */ s('<div class="absolute left-0 top-0 w-1 h-full bg-primary rounded-r">'), j = /* @__PURE__ */ s("<span>"), N = /* @__PURE__ */ s("<button type=button>");
|
|
8
|
+
function V(e) {
|
|
9
|
+
const o = v(() => e.activeId), n = v(() => e.collapsed ?? !1), t = v(() => e.onActiveChange), c = v(() => e.onCollapsedChange), u = (i) => {
|
|
9
10
|
if (i.onClick) {
|
|
10
|
-
|
|
11
|
+
I(() => i.onClick());
|
|
11
12
|
return;
|
|
12
13
|
}
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
const r = _({
|
|
15
|
+
clickedId: i.id,
|
|
16
|
+
activeId: o(),
|
|
17
|
+
collapsed: n(),
|
|
18
|
+
behavior: i.collapseBehavior
|
|
19
|
+
});
|
|
20
|
+
r.nextActiveId !== o() && (typeof r.openSidebar == "boolean" ? t()(r.nextActiveId, {
|
|
21
|
+
openSidebar: r.openSidebar
|
|
22
|
+
}) : t()(r.nextActiveId)), typeof r.nextCollapsed == "boolean" && c()?.(r.nextCollapsed);
|
|
19
23
|
};
|
|
20
24
|
return (() => {
|
|
21
|
-
var i =
|
|
22
|
-
return
|
|
25
|
+
var i = p(), r = i.firstChild;
|
|
26
|
+
return a(r, l(y, {
|
|
23
27
|
get each() {
|
|
24
28
|
return e.items;
|
|
25
29
|
},
|
|
26
|
-
children: (
|
|
27
|
-
item:
|
|
30
|
+
children: (d) => l(C, {
|
|
31
|
+
item: d,
|
|
28
32
|
get isActive() {
|
|
29
|
-
return
|
|
33
|
+
return o() === d.id;
|
|
30
34
|
},
|
|
31
|
-
onClick: () => u(
|
|
35
|
+
onClick: () => u(d)
|
|
32
36
|
})
|
|
33
|
-
})),
|
|
37
|
+
})), a(i, l(m, {
|
|
34
38
|
get when() {
|
|
35
39
|
return e.bottomItems?.length;
|
|
36
40
|
},
|
|
37
41
|
get children() {
|
|
38
|
-
var
|
|
39
|
-
return
|
|
42
|
+
var d = B();
|
|
43
|
+
return a(d, l(y, {
|
|
40
44
|
get each() {
|
|
41
45
|
return e.bottomItems;
|
|
42
46
|
},
|
|
43
|
-
children: (h) =>
|
|
47
|
+
children: (h) => l(C, {
|
|
44
48
|
item: h,
|
|
45
49
|
isActive: !1,
|
|
46
50
|
onClick: () => u(h)
|
|
47
51
|
})
|
|
48
|
-
})),
|
|
52
|
+
})), d;
|
|
49
53
|
}
|
|
50
|
-
}), null), f(() =>
|
|
54
|
+
}), null), f(() => b(i, g("w-10 md:w-12 flex flex-col justify-between shrink-0 min-h-0", "bg-activity-bar border-r border-border", e.class))), i;
|
|
51
55
|
})();
|
|
52
56
|
}
|
|
53
57
|
function C(e) {
|
|
54
|
-
const
|
|
55
|
-
return
|
|
58
|
+
const o = () => typeof e.item.badge == "function" ? e.item.badge() : e.item.badge;
|
|
59
|
+
return l($, {
|
|
56
60
|
get content() {
|
|
57
61
|
return e.item.label;
|
|
58
62
|
},
|
|
59
63
|
placement: "right",
|
|
60
64
|
delay: 0,
|
|
61
65
|
get children() {
|
|
62
|
-
var n =
|
|
63
|
-
return n.$$click = () => e.onClick(),
|
|
66
|
+
var n = N();
|
|
67
|
+
return n.$$click = () => e.onClick(), a(n, l(m, {
|
|
64
68
|
get when() {
|
|
65
69
|
return e.isActive;
|
|
66
70
|
},
|
|
67
71
|
get children() {
|
|
68
|
-
return
|
|
72
|
+
return S();
|
|
69
73
|
}
|
|
70
|
-
}), null),
|
|
74
|
+
}), null), a(n, l(A, {
|
|
71
75
|
get component() {
|
|
72
76
|
return e.item.icon;
|
|
73
77
|
},
|
|
74
78
|
class: "w-5 h-5"
|
|
75
|
-
}), null),
|
|
79
|
+
}), null), a(n, l(m, {
|
|
76
80
|
get when() {
|
|
77
|
-
return
|
|
81
|
+
return o();
|
|
78
82
|
},
|
|
79
83
|
get children() {
|
|
80
|
-
var t =
|
|
81
|
-
return
|
|
82
|
-
var
|
|
83
|
-
return () =>
|
|
84
|
-
})()), f(() =>
|
|
84
|
+
var t = j();
|
|
85
|
+
return a(t, (() => {
|
|
86
|
+
var c = k(() => typeof o() == "number" && o() > 99);
|
|
87
|
+
return () => c() ? "99+" : o();
|
|
88
|
+
})()), f(() => b(t, g("absolute top-0.5 right-0.5 min-w-3.5 h-3.5 px-1", "flex items-center justify-center", "text-[9px] font-medium rounded-full", "bg-activity-bar-badge text-activity-bar-badge-foreground"))), t;
|
|
85
89
|
}
|
|
86
90
|
}), null), f((t) => {
|
|
87
|
-
var
|
|
88
|
-
return
|
|
91
|
+
var c = g("relative w-full aspect-square flex items-center justify-center cursor-pointer", "transition-all duration-100", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset", e.isActive ? "text-activity-bar-foreground-active bg-accent/80" : "text-activity-bar-foreground hover:text-activity-bar-foreground-active hover:bg-accent/40"), u = e.item.label, i = e.isActive;
|
|
92
|
+
return c !== t.e && b(n, t.e = c), u !== t.t && x(n, "aria-label", t.t = u), i !== t.a && x(n, "aria-pressed", t.a = i), t;
|
|
89
93
|
}, {
|
|
90
94
|
e: void 0,
|
|
91
95
|
t: void 0,
|
|
@@ -94,7 +98,7 @@ function C(e) {
|
|
|
94
98
|
}
|
|
95
99
|
});
|
|
96
100
|
}
|
|
97
|
-
|
|
101
|
+
w(["click"]);
|
|
98
102
|
export {
|
|
99
|
-
|
|
103
|
+
V as ActivityBar
|
|
100
104
|
};
|
|
@@ -5,6 +5,16 @@ export interface ShellProps {
|
|
|
5
5
|
logo?: JSX.Element;
|
|
6
6
|
activityItems?: ActivityBarItem[];
|
|
7
7
|
activityBottomItems?: ActivityBarItem[];
|
|
8
|
+
/**
|
|
9
|
+
* Where to render `activityBottomItems` on mobile.
|
|
10
|
+
*
|
|
11
|
+
* The ActivityBar isn't rendered on mobile (MobileTabBar is used instead),
|
|
12
|
+
* so bottom items are hidden unless explicitly enabled.
|
|
13
|
+
*
|
|
14
|
+
* - `hidden` (default): do not render bottom items on mobile.
|
|
15
|
+
* - `topBar`: render them as icon buttons in the TopBar actions area.
|
|
16
|
+
*/
|
|
17
|
+
activityBottomItemsMobileMode?: 'hidden' | 'topBar';
|
|
8
18
|
topBarActions?: JSX.Element;
|
|
9
19
|
bottomBarItems?: JSX.Element;
|
|
10
20
|
sidebarContent?: (activeTab: string) => JSX.Element;
|
|
@@ -1,235 +1,268 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { useLayout as
|
|
4
|
-
import { useResolvedFloeConfig as
|
|
5
|
-
import { useMediaQuery as
|
|
6
|
-
import { cn as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { createComponent as t, Dynamic as S, insert as s, memo as C, effect as $, className as M, setStyleProperty as W, template as v, delegateEvents as E } from "solid-js/web";
|
|
2
|
+
import { createSignal as N, createEffect as g, createMemo as h, For as y, Show as u } from "solid-js";
|
|
3
|
+
import { useLayout as Q } from "../../context/LayoutContext.js";
|
|
4
|
+
import { useResolvedFloeConfig as D } from "../../context/FloeConfigContext.js";
|
|
5
|
+
import { useMediaQuery as K } from "../../hooks/useMediaQuery.js";
|
|
6
|
+
import { cn as x } from "../../utils/cn.js";
|
|
7
|
+
import { deferNonBlocking as L } from "../../utils/defer.js";
|
|
8
|
+
import { useComponentRegistry as V } from "../../context/ComponentRegistry.js";
|
|
9
|
+
import { Sidebar as j } from "./Sidebar.js";
|
|
10
|
+
import { TopBar as q } from "./TopBar.js";
|
|
11
|
+
import { TopBarIconButton as G } from "./TopBarIconButton.js";
|
|
12
|
+
import { BottomBar as J } from "./BottomBar.js";
|
|
13
|
+
import { MobileTabBar as U } from "./MobileTabBar.js";
|
|
14
|
+
import { ActivityBar as X } from "./ActivityBar.js";
|
|
15
|
+
import { ResizeHandle as _ } from "./ResizeHandle.js";
|
|
16
|
+
import { resolveMobileTabActiveId as Y, resolveMobileTabSelect as Z } from "./mobileTabs.js";
|
|
17
|
+
import { KeepAliveStack as ee } from "./KeepAliveStack.js";
|
|
18
|
+
var k = /* @__PURE__ */ v('<div class="flex items-center gap-2">'), te = /* @__PURE__ */ v('<div class="absolute inset-0 z-40 bg-black/30 cursor-pointer">'), re = /* @__PURE__ */ v('<div><div class="h-full overflow-auto overscroll-contain">'), ie = /* @__PURE__ */ v('<div class="relative shrink-0 border-t border-border bg-terminal-background overflow-hidden">'), ne = /* @__PURE__ */ v('<div><div class="flex-1 min-h-0 flex overflow-hidden relative"><div class="flex-1 min-w-0 flex flex-col overflow-hidden"><main class="flex-1 min-h-0 overflow-auto overscroll-contain">');
|
|
19
|
+
function Ie(o) {
|
|
20
|
+
const r = Q(), O = D(), c = K(O.config.layout.mobileQuery), [w, b] = N(!1), m = () => o.sidebarMode === "hidden", d = (() => {
|
|
21
21
|
try {
|
|
22
|
-
return
|
|
22
|
+
return V();
|
|
23
23
|
} catch {
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
|
-
})()
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
})(), I = (e, a) => {
|
|
27
|
+
const l = d?.getComponent(e)?.sidebar?.fullScreen ?? !1, i = m() ? !1 : a?.openSidebar ?? !l;
|
|
28
|
+
r.setSidebarActiveTab(e, {
|
|
29
|
+
openSidebar: i
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
g(() => {
|
|
33
|
+
m() && b(!1);
|
|
34
|
+
}), g(() => {
|
|
35
|
+
const e = c();
|
|
36
|
+
r.isMobile() !== e && r.setIsMobile(e);
|
|
37
|
+
}), g(() => {
|
|
38
|
+
c() || b(!1);
|
|
34
39
|
});
|
|
35
|
-
const f =
|
|
40
|
+
const f = h(() => o.activityItems ? o.activityItems : d ? d.sidebarItems().filter((e) => !!e.icon).filter((e) => !(c() && e.sidebar?.hiddenOnMobile)).map((e) => ({
|
|
36
41
|
id: e.id,
|
|
37
42
|
icon: e.icon,
|
|
38
43
|
label: e.name,
|
|
39
|
-
badge: e.sidebar?.badge
|
|
40
|
-
|
|
44
|
+
badge: e.sidebar?.badge,
|
|
45
|
+
collapseBehavior: e.sidebar?.fullScreen ? "preserve" : "toggle"
|
|
46
|
+
})) : []), z = h(() => m() ? [] : o.sidebarContent ? [] : d ? d.sidebarItems().filter((e) => !(c() && e.sidebar?.hiddenOnMobile)).filter((e) => !e.sidebar?.fullScreen).map((e) => ({
|
|
41
47
|
id: e.id,
|
|
42
|
-
render: () =>
|
|
48
|
+
render: () => t(S, {
|
|
43
49
|
get component() {
|
|
44
50
|
return e.component;
|
|
45
51
|
}
|
|
46
52
|
})
|
|
47
|
-
})) : []),
|
|
48
|
-
if (!
|
|
49
|
-
if (
|
|
53
|
+
})) : []), T = (e) => {
|
|
54
|
+
if (!m()) {
|
|
55
|
+
if (o.sidebarContent) return o.sidebarContent(e);
|
|
50
56
|
if (d)
|
|
51
|
-
return
|
|
57
|
+
return t(ee, {
|
|
52
58
|
get views() {
|
|
53
|
-
return
|
|
59
|
+
return z();
|
|
54
60
|
},
|
|
55
61
|
activeId: e
|
|
56
62
|
});
|
|
57
63
|
}
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
}, B = h(() => m() ? !0 : d ? d.getComponent(r.sidebarActiveTab())?.sidebar?.fullScreen ?? !1 : !1);
|
|
65
|
+
g(() => {
|
|
66
|
+
c() && B() && b(!1);
|
|
61
67
|
});
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
68
|
+
const F = h(() => {
|
|
69
|
+
if (o.bottomBarItems) return o.bottomBarItems;
|
|
64
70
|
if (!d) return;
|
|
65
|
-
const e = [...d.statusBarItems()].sort((
|
|
71
|
+
const e = [...d.statusBarItems()].sort((i, n) => (i.order ?? 100) - (n.order ?? 100)), a = e.filter((i) => i.position === "left"), l = e.filter((i) => i.position === "right");
|
|
66
72
|
return [(() => {
|
|
67
|
-
var
|
|
68
|
-
return
|
|
69
|
-
each:
|
|
70
|
-
children: (
|
|
73
|
+
var i = k();
|
|
74
|
+
return s(i, t(y, {
|
|
75
|
+
each: a,
|
|
76
|
+
children: (n) => t(S, {
|
|
71
77
|
get component() {
|
|
72
|
-
return
|
|
78
|
+
return n.component;
|
|
73
79
|
}
|
|
74
80
|
})
|
|
75
|
-
})),
|
|
81
|
+
})), i;
|
|
76
82
|
})(), (() => {
|
|
77
|
-
var
|
|
78
|
-
return
|
|
79
|
-
each:
|
|
80
|
-
children: (
|
|
83
|
+
var i = k();
|
|
84
|
+
return s(i, t(y, {
|
|
85
|
+
each: l,
|
|
86
|
+
children: (n) => t(S, {
|
|
81
87
|
get component() {
|
|
82
|
-
return
|
|
88
|
+
return n.component;
|
|
83
89
|
}
|
|
84
90
|
})
|
|
85
|
-
})),
|
|
91
|
+
})), i;
|
|
86
92
|
})()];
|
|
87
93
|
});
|
|
88
|
-
|
|
94
|
+
g(() => {
|
|
89
95
|
const e = f();
|
|
90
96
|
if (!e.length) return;
|
|
91
|
-
|
|
97
|
+
r.sidebarActiveTab() || I(e[0].id);
|
|
92
98
|
});
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
nextActiveId:
|
|
96
|
-
nextMobileSidebarOpen:
|
|
97
|
-
} =
|
|
99
|
+
const A = (e) => {
|
|
100
|
+
const a = m() ? !0 : d?.getComponent(e)?.sidebar?.fullScreen ?? !1, {
|
|
101
|
+
nextActiveId: l,
|
|
102
|
+
nextMobileSidebarOpen: i
|
|
103
|
+
} = Z({
|
|
98
104
|
clickedId: e,
|
|
99
|
-
activeId:
|
|
105
|
+
activeId: r.sidebarActiveTab(),
|
|
100
106
|
mobileSidebarOpen: w(),
|
|
101
|
-
clickedIsFullScreen:
|
|
107
|
+
clickedIsFullScreen: a
|
|
102
108
|
});
|
|
103
|
-
|
|
104
|
-
}, H = () =>
|
|
109
|
+
r.sidebarActiveTab() !== l && I(l), b(i);
|
|
110
|
+
}, H = (e) => {
|
|
111
|
+
if (e.onClick) {
|
|
112
|
+
L(() => e.onClick());
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
A(e.id);
|
|
116
|
+
}, R = h(() => {
|
|
117
|
+
const e = o.topBarActions;
|
|
118
|
+
if (!c() || (o.activityBottomItemsMobileMode ?? "hidden") !== "topBar") return e;
|
|
119
|
+
const l = o.activityBottomItems ?? [];
|
|
120
|
+
return l.length ? [t(y, {
|
|
121
|
+
each: l,
|
|
122
|
+
children: (i) => t(G, {
|
|
123
|
+
get label() {
|
|
124
|
+
return i.label;
|
|
125
|
+
},
|
|
126
|
+
onClick: () => H(i),
|
|
127
|
+
get children() {
|
|
128
|
+
return t(S, {
|
|
129
|
+
get component() {
|
|
130
|
+
return i.icon;
|
|
131
|
+
},
|
|
132
|
+
class: "w-4 h-4"
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
}), e] : e;
|
|
137
|
+
}), P = () => m() ? !0 : r.sidebarCollapsed();
|
|
105
138
|
return (() => {
|
|
106
|
-
var e =
|
|
107
|
-
return
|
|
139
|
+
var e = ne(), a = e.firstChild, l = a.firstChild, i = l.firstChild;
|
|
140
|
+
return s(e, t(q, {
|
|
108
141
|
get logo() {
|
|
109
|
-
return
|
|
142
|
+
return o.logo;
|
|
110
143
|
},
|
|
111
144
|
get actions() {
|
|
112
|
-
return
|
|
145
|
+
return R();
|
|
113
146
|
}
|
|
114
|
-
}),
|
|
147
|
+
}), a), s(a, t(u, {
|
|
115
148
|
get when() {
|
|
116
|
-
return !
|
|
149
|
+
return !c();
|
|
117
150
|
},
|
|
118
151
|
get children() {
|
|
119
|
-
return [
|
|
152
|
+
return [t(u, {
|
|
120
153
|
get when() {
|
|
121
154
|
return f().length > 0;
|
|
122
155
|
},
|
|
123
156
|
get children() {
|
|
124
|
-
return
|
|
157
|
+
return t(X, {
|
|
125
158
|
get items() {
|
|
126
159
|
return f();
|
|
127
160
|
},
|
|
128
161
|
get bottomItems() {
|
|
129
|
-
return
|
|
162
|
+
return o.activityBottomItems;
|
|
130
163
|
},
|
|
131
164
|
get activeId() {
|
|
132
|
-
return
|
|
165
|
+
return r.sidebarActiveTab();
|
|
133
166
|
},
|
|
134
|
-
onActiveChange:
|
|
167
|
+
onActiveChange: I,
|
|
135
168
|
get collapsed() {
|
|
136
|
-
return
|
|
169
|
+
return P();
|
|
137
170
|
},
|
|
138
171
|
get onCollapsedChange() {
|
|
139
|
-
return
|
|
172
|
+
return C(() => !!m())() ? void 0 : r.setSidebarCollapsed;
|
|
140
173
|
}
|
|
141
174
|
});
|
|
142
175
|
}
|
|
143
|
-
}),
|
|
176
|
+
}), t(u, {
|
|
144
177
|
get when() {
|
|
145
|
-
return !
|
|
178
|
+
return !m();
|
|
146
179
|
},
|
|
147
180
|
get children() {
|
|
148
|
-
return
|
|
181
|
+
return t(j, {
|
|
149
182
|
get width() {
|
|
150
|
-
return
|
|
183
|
+
return r.sidebarWidth();
|
|
151
184
|
},
|
|
152
185
|
get collapsed() {
|
|
153
|
-
return
|
|
186
|
+
return r.sidebarCollapsed() || B();
|
|
154
187
|
},
|
|
155
188
|
get resizer() {
|
|
156
|
-
return
|
|
189
|
+
return t(_, {
|
|
157
190
|
direction: "horizontal",
|
|
158
|
-
onResize: (
|
|
191
|
+
onResize: (n) => r.setSidebarWidth(r.sidebarWidth() + n)
|
|
159
192
|
});
|
|
160
193
|
},
|
|
161
194
|
get children() {
|
|
162
|
-
return
|
|
195
|
+
return T(r.sidebarActiveTab());
|
|
163
196
|
}
|
|
164
197
|
});
|
|
165
198
|
}
|
|
166
199
|
})];
|
|
167
200
|
}
|
|
168
|
-
}),
|
|
201
|
+
}), l), s(a, t(u, {
|
|
169
202
|
get when() {
|
|
170
|
-
return
|
|
203
|
+
return C(() => !!(c() && w()))() && !m();
|
|
171
204
|
},
|
|
172
205
|
get children() {
|
|
173
206
|
return [(() => {
|
|
174
|
-
var
|
|
175
|
-
return
|
|
207
|
+
var n = te();
|
|
208
|
+
return n.$$click = () => b(!1), n;
|
|
176
209
|
})(), (() => {
|
|
177
|
-
var
|
|
178
|
-
return
|
|
210
|
+
var n = re(), p = n.firstChild;
|
|
211
|
+
return s(p, () => T(r.sidebarActiveTab())), $(() => M(n, x("absolute left-0 top-0 bottom-0 z-50", "w-72 max-w-[80vw]", "bg-sidebar border-r border-sidebar-border", "shadow-xl", "animate-in slide-in-from-left duration-200"))), n;
|
|
179
212
|
})()];
|
|
180
213
|
}
|
|
181
|
-
}),
|
|
214
|
+
}), l), s(i, () => o.children), s(l, t(u, {
|
|
182
215
|
get when() {
|
|
183
|
-
return
|
|
216
|
+
return C(() => !!(!c() && r.terminalOpened()))() && o.terminalPanel;
|
|
184
217
|
},
|
|
185
218
|
get children() {
|
|
186
|
-
var
|
|
187
|
-
return
|
|
219
|
+
var n = ie();
|
|
220
|
+
return s(n, t(_, {
|
|
188
221
|
direction: "vertical",
|
|
189
|
-
onResize: (
|
|
190
|
-
}), null),
|
|
222
|
+
onResize: (p) => r.setTerminalHeight(r.terminalHeight() - p)
|
|
223
|
+
}), null), s(n, () => o.terminalPanel, null), $((p) => W(n, "height", `${r.terminalHeight()}px`)), n;
|
|
191
224
|
}
|
|
192
|
-
}), null),
|
|
225
|
+
}), null), s(e, t(u, {
|
|
193
226
|
get when() {
|
|
194
|
-
return !
|
|
227
|
+
return !c();
|
|
195
228
|
},
|
|
196
229
|
get children() {
|
|
197
|
-
return
|
|
230
|
+
return t(J, {
|
|
198
231
|
get children() {
|
|
199
|
-
return
|
|
232
|
+
return F();
|
|
200
233
|
}
|
|
201
234
|
});
|
|
202
235
|
}
|
|
203
|
-
}), null),
|
|
236
|
+
}), null), s(e, t(u, {
|
|
204
237
|
get when() {
|
|
205
|
-
return
|
|
238
|
+
return C(() => !!c())() && f().length > 0;
|
|
206
239
|
},
|
|
207
240
|
get children() {
|
|
208
|
-
return
|
|
241
|
+
return t(U, {
|
|
209
242
|
get items() {
|
|
210
243
|
return f();
|
|
211
244
|
},
|
|
212
245
|
get activeId() {
|
|
213
|
-
return
|
|
214
|
-
activeId:
|
|
246
|
+
return Y({
|
|
247
|
+
activeId: r.sidebarActiveTab(),
|
|
215
248
|
mobileSidebarOpen: w(),
|
|
216
|
-
activeIsFullScreen:
|
|
249
|
+
activeIsFullScreen: B()
|
|
217
250
|
});
|
|
218
251
|
},
|
|
219
|
-
onSelect:
|
|
252
|
+
onSelect: A
|
|
220
253
|
});
|
|
221
254
|
}
|
|
222
|
-
}), null),
|
|
255
|
+
}), null), $(() => M(e, x(
|
|
223
256
|
// Use dvh when supported to avoid mobile browser UI causing layout jumps.
|
|
224
257
|
"h-screen h-[100dvh] w-full flex flex-col overflow-hidden",
|
|
225
258
|
"bg-background text-foreground",
|
|
226
259
|
// Prevent overscroll on the shell container
|
|
227
260
|
"overscroll-none",
|
|
228
|
-
|
|
261
|
+
o.class
|
|
229
262
|
))), e;
|
|
230
263
|
})();
|
|
231
264
|
}
|
|
232
|
-
|
|
265
|
+
E(["click"]);
|
|
233
266
|
export {
|
|
234
|
-
|
|
267
|
+
Ie as Shell
|
|
235
268
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type JSX } from 'solid-js';
|
|
2
|
+
import { type TooltipProps } from '../ui/Tooltip';
|
|
3
|
+
export interface TopBarIconButtonProps extends Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'aria-label'> {
|
|
4
|
+
/** Used for aria-label and as the default tooltip content. */
|
|
5
|
+
label: string;
|
|
6
|
+
children: JSX.Element;
|
|
7
|
+
/** Defaults to `label`. Set to `false` to disable the tooltip wrapper. */
|
|
8
|
+
tooltip?: TooltipProps['content'] | false;
|
|
9
|
+
tooltipPlacement?: TooltipProps['placement'];
|
|
10
|
+
tooltipDelay?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function TopBarIconButton(props: TopBarIconButtonProps): JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { spread as i, mergeProps as s, insert as a, createComponent as r, template as c } from "solid-js/web";
|
|
2
|
+
import { splitProps as p, Show as u } from "solid-js";
|
|
3
|
+
import { cn as d } from "../../utils/cn.js";
|
|
4
|
+
import { Tooltip as b } from "../ui/Tooltip.js";
|
|
5
|
+
var m = /* @__PURE__ */ c("<button type=button>");
|
|
6
|
+
function y(l) {
|
|
7
|
+
const [e, n] = p(l, ["label", "children", "tooltip", "tooltipPlacement", "tooltipDelay", "class", "disabled"]), o = (() => {
|
|
8
|
+
var t = m();
|
|
9
|
+
return i(t, s({
|
|
10
|
+
get class() {
|
|
11
|
+
return d("inline-flex items-center justify-center", "w-8 h-8 rounded cursor-pointer", "hover:bg-muted/60 active:bg-muted/80 transition-colors", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset", "disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed", e.class);
|
|
12
|
+
},
|
|
13
|
+
get "aria-label"() {
|
|
14
|
+
return e.label;
|
|
15
|
+
},
|
|
16
|
+
get disabled() {
|
|
17
|
+
return e.disabled;
|
|
18
|
+
}
|
|
19
|
+
}, n), !1, !0), a(t, () => e.children), t;
|
|
20
|
+
})();
|
|
21
|
+
return r(u, {
|
|
22
|
+
get when() {
|
|
23
|
+
return e.tooltip !== !1;
|
|
24
|
+
},
|
|
25
|
+
fallback: o,
|
|
26
|
+
get children() {
|
|
27
|
+
return r(b, {
|
|
28
|
+
get content() {
|
|
29
|
+
return e.tooltip ?? e.label;
|
|
30
|
+
},
|
|
31
|
+
get placement() {
|
|
32
|
+
return e.tooltipPlacement ?? "bottom";
|
|
33
|
+
},
|
|
34
|
+
get delay() {
|
|
35
|
+
return e.tooltipDelay ?? 0;
|
|
36
|
+
},
|
|
37
|
+
children: o
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
y as TopBarIconButton
|
|
44
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type ActivityBarCollapseBehavior = 'toggle' | 'preserve';
|
|
2
|
+
export interface ResolveActivityBarClickArgs {
|
|
3
|
+
clickedId: string;
|
|
4
|
+
activeId: string;
|
|
5
|
+
collapsed: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* How the clicked item should affect the sidebar collapsed state.
|
|
8
|
+
*
|
|
9
|
+
* - `toggle` (default): VSCode-like behavior for sidebar-backed tabs.
|
|
10
|
+
* - `preserve`: navigate without mutating the collapsed state (useful for fullScreen pages).
|
|
11
|
+
*/
|
|
12
|
+
behavior?: ActivityBarCollapseBehavior;
|
|
13
|
+
}
|
|
14
|
+
export interface ResolveActivityBarClickResult {
|
|
15
|
+
nextActiveId: string;
|
|
16
|
+
/** When undefined, the click should not change the collapsed state. */
|
|
17
|
+
nextCollapsed?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Hint for LayoutContext.setSidebarActiveTab({ openSidebar }).
|
|
20
|
+
* Only meaningful when the click causes a tab change.
|
|
21
|
+
*/
|
|
22
|
+
openSidebar?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function resolveActivityBarClick(args: ResolveActivityBarClickArgs): ResolveActivityBarClickResult;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
function c(e) {
|
|
2
|
+
return (e.behavior ?? "toggle") === "preserve" ? e.clickedId === e.activeId ? { nextActiveId: e.activeId } : { nextActiveId: e.clickedId, openSidebar: !1 } : e.clickedId === e.activeId && !e.collapsed ? { nextActiveId: e.activeId, nextCollapsed: !0 } : { nextActiveId: e.clickedId, nextCollapsed: !1, openSidebar: !0 };
|
|
3
|
+
}
|
|
4
|
+
export {
|
|
5
|
+
c as resolveActivityBarClick
|
|
6
|
+
};
|
|
@@ -2,6 +2,7 @@ export { Shell, type ShellProps } from './Shell';
|
|
|
2
2
|
export { ActivityBar, type ActivityBarItem, type ActivityBarProps } from './ActivityBar';
|
|
3
3
|
export { Sidebar, SidebarContent, SidebarItemList, SidebarSection, SidebarItem, type SidebarProps, type SidebarContentProps, type SidebarItemListProps, type SidebarSectionProps, type SidebarItemProps, } from './Sidebar';
|
|
4
4
|
export { TopBar, type TopBarProps } from './TopBar';
|
|
5
|
+
export { TopBarIconButton, type TopBarIconButtonProps } from './TopBarIconButton';
|
|
5
6
|
export { BottomBar, BottomBarItem, StatusIndicator, type BottomBarProps, type BottomBarItemProps, type StatusIndicatorProps } from './BottomBar';
|
|
6
7
|
export { MobileTabBar, type MobileTabBarItem, type MobileTabBarProps } from './MobileTabBar';
|
|
7
8
|
export { ResizeHandle, type ResizeHandleProps } from './ResizeHandle';
|
package/dist/full.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FloeProvider as r } from "./app/FloeProvider.js";
|
|
2
2
|
import { applyTheme as i, builtInThemes as n, getSystemTheme as a } from "./styles/themes/index.js";
|
|
3
|
-
import { Activity as m, ActivityIcon as p, AlertCircle as l, AlertTriangle as f, ArchiveIcon as s, ArrowDown as d, ArrowLeft as x, ArrowRight as I, ArrowRightLeft as g, ArrowUp as C, AtSign as u, AwardIcon as k, BarChart as h, BatteryIcon as S, Bell as F, BellIcon as
|
|
3
|
+
import { Activity as m, ActivityIcon as p, AlertCircle as l, AlertTriangle as f, ArchiveIcon as s, ArrowDown as d, ArrowLeft as x, ArrowRight as I, ArrowRightLeft as g, ArrowUp as C, AtSign as u, AwardIcon as k, BarChart as h, BatteryIcon as S, Bell as F, BellIcon as B, Bookmark as P, BookmarkIcon as D, Bot as y, BotIcon as T, BugIcon as M, Calendar as w, CalendarIcon as v, Camera as W, CameraIcon as L, ChartIcon as b, Check as A, CheckCircle as R, CheckIcon as G, ChevronDown as H, ChevronLeft as V, ChevronRight as E, ChevronUp as O, ChevronsUpDown as U, Clock as N, ClockIcon as z, CloseIcon as K, Cloud as _, CloudIcon as Q, Code as Z, CodeIcon as X, CompassIcon as q, Copy as j, CopyCheck as J, CopyCheckIcon as Y, CopyIcon as $, Cpu as ee, CreditCardIcon as oe, Database as re, DatabaseIcon as te, DollarIcon as ie, Download as ne, DownloadIcon as ae, EditIcon as ce, ErrorIcon as me, ExternalLink as pe, Eye as le, EyeIcon as fe, EyeOff as se, FileCode as de, FilePlus as xe, FilePlusIcon as Ie, FileText as ge, Files as Ce, Filter as ue, FilterIcon as ke, FireIcon as he, Folder as Se, FolderOpen as Fe, FolderPlus as Be, FolderPlusIcon as Pe, GiftIcon as De, GitBranch as ye, GitBranchIcon as Te, Globe as Me, GlobeIcon as we, Grid as ve, Grid3x3 as We, GripVertical as Le, Hash as be, HeadphonesIcon as Ae, Heart as Re, HeartIcon as Ge, HelpIcon as He, Highlighter as Ve, History as Ee, Home as Oe, HomeIcon as Ue, Image as Ne, ImageIcon as ze, Info as Ke, InfoIcon as _e, Key as Qe, KeyIcon as Ze, Layers as Xe, LayersIcon as qe, LayoutDashboard as je, Link as Je, LinkIcon as Ye, Loader2 as $e, LoadingIcon as eo, Lock as oo, LockIcon as ro, MagicIcon as to, Mail as io, MailIcon as no, MapPinIcon as ao, Maximize as co, Menu as mo, MessageIcon as po, MessageSquare as lo, Mic as fo, MicIcon as so, MicOff as xo, Minus as Io, MinusIcon as go, Moon as Co, MoonIcon as uo, MoreHorizontal as ko, MoreVertical as ho, MuteIcon as So, Package as Fo, PackageIcon as Bo, Paperclip as Po, Paste as Do, PasteIcon as yo, Pause as To, PauseIcon as Mo, Pencil as wo, Phone as vo, PieChart as Wo, Pin as Lo, PinIcon as bo, Play as Ao, PlayIcon as Ro, Plus as Go, PlusIcon as Ho, PowerIcon as Vo, PrinterIcon as Eo, Quote as Oo, Refresh as Uo, RefreshIcon as No, Restore as zo, RocketIcon as Ko, Save as _o, SaveIcon as Qo, Search as Zo, SearchIcon as Xo, Send as qo, SendIcon as jo, Settings as Jo, SettingsIcon as Yo, ShareIcon as $o, Shield as er, ShieldCheck as or, ShieldIcon as rr, SparkleIcon as tr, Sparkles as ir, Star as nr, StarIcon as ar, Stop as cr, SuccessIcon as mr, Sun as pr, SunIcon as lr, Tag as fr, TagIcon as sr, TargetIcon as dr, Terminal as xr, TerminalIcon as Ir, ThumbsDownIcon as gr, ThumbsUpIcon as Cr, Timer as ur, Trash as kr, TrashIcon as hr, TrendingDown as Sr, TrendingUp as Fr, Unlock as Br, Upload as Pr, UploadIcon as Dr, User as yr, UserIcon as Tr, Video as Mr, VideoIcon as wr, Volume as vr, VolumeIcon as Wr, VolumeOff as Lr, Wand as br, WarningIcon as Ar, WifiIcon as Rr, WifiOffIcon as Gr, Workflow as Hr, X as Vr, XCircle as Er, Zap as Or, ZapIcon as Ur } from "./components/icons/index.js";
|
|
4
4
|
import { ActivityAppsMain as zr } from "./app/ActivityAppsMain.js";
|
|
5
5
|
import { ActivityBar as _r } from "./components/layout/ActivityBar.js";
|
|
6
6
|
import { AffixInput as Zr, Input as Xr, NumberInput as qr, Textarea as jr } from "./components/ui/Input.js";
|
|
@@ -9,9 +9,9 @@ import { AreaChart as pt, DataBarChart as lt, DataPieChart as ft, LineChart as s
|
|
|
9
9
|
import { AttachmentPreview as It } from "./components/chat/input/AttachmentPreview.js";
|
|
10
10
|
import { BlockRenderer as Ct } from "./components/chat/blocks/BlockRenderer.js";
|
|
11
11
|
import { BottomBar as kt, BottomBarItem as ht, StatusIndicator as St } from "./components/layout/BottomBar.js";
|
|
12
|
-
import { Breadcrumb as
|
|
12
|
+
import { Breadcrumb as Bt } from "./components/file-browser/Breadcrumb.js";
|
|
13
13
|
import { Button as Dt } from "./components/ui/Button.js";
|
|
14
|
-
import { ChatContainer as
|
|
14
|
+
import { ChatContainer as Tt } from "./components/chat/ChatContainer.js";
|
|
15
15
|
import { ChatInput as wt } from "./components/chat/input/ChatInput.js";
|
|
16
16
|
import { ChatProvider as Wt, useChatContext as Lt } from "./components/chat/ChatProvider.js";
|
|
17
17
|
import { Checkbox as At, CheckboxGroup as Rt, CheckboxList as Gt } from "./components/ui/Checkbox.js";
|
|
@@ -25,8 +25,8 @@ import { CommandProvider as ci, createCommandService as mi, useCommand as pi } f
|
|
|
25
25
|
import { ComponentRegistryProvider as fi, createComponentRegistry as si, useComponentContextFactory as di, useComponentRegistry as xi } from "./context/ComponentRegistry.js";
|
|
26
26
|
import { ConfirmDialog as gi, Dialog as Ci } from "./components/ui/Dialog.js";
|
|
27
27
|
import { ConnectionStatus as ki } from "./components/chat/status/ConnectionStatus.js";
|
|
28
|
-
import { DECK_GRID_CONFIG as Si, DeckGrid as Fi, getGridConfigFromElement as
|
|
29
|
-
import { DEFAULT_FLOE_CONFIG as Di, FloeConfigProvider as yi, useFloeConfig as
|
|
28
|
+
import { DECK_GRID_CONFIG as Si, DeckGrid as Fi, getGridConfigFromElement as Bi } from "./components/deck/DeckGrid.js";
|
|
29
|
+
import { DEFAULT_FLOE_CONFIG as Di, FloeConfigProvider as yi, useFloeConfig as Ti, useResolvedFloeConfig as Mi } from "./context/FloeConfigContext.js";
|
|
30
30
|
import { DEFAULT_VIRTUAL_LIST_CONFIG as vi } from "./components/chat/types.js";
|
|
31
31
|
import { DeckCell as Li } from "./components/deck/DeckCell.js";
|
|
32
32
|
import { DeckProvider as Ai, createDeckService as Ri, useDeck as Gi } from "./context/DeckContext.js";
|
|
@@ -44,9 +44,9 @@ import { FileBrowserProvider as xn, useFileBrowser as In } from "./components/fi
|
|
|
44
44
|
import { FileBrowserToolbar as Cn } from "./components/file-browser/FileBrowserToolbar.js";
|
|
45
45
|
import { FileContextMenu as kn } from "./components/file-browser/FileContextMenu.js";
|
|
46
46
|
import { FileGridView as Sn } from "./components/file-browser/FileGridView.js";
|
|
47
|
-
import { FileListView as
|
|
47
|
+
import { FileListView as Bn } from "./components/file-browser/FileListView.js";
|
|
48
48
|
import { FileSavePicker as Dn } from "./components/ui/FileSavePicker.js";
|
|
49
|
-
import { FilesSidebarWidget as
|
|
49
|
+
import { FilesSidebarWidget as Tn, SearchSidebarWidget as Mn, SettingsSidebarWidget as wn, ShowcaseSidebarWidget as vn, SidebarWidget as Wn } from "./widgets/SidebarWidget.js";
|
|
50
50
|
import { FloatingWindow as bn } from "./components/ui/FloatingWindow.js";
|
|
51
51
|
import { FloeApp as Rn } from "./app/FloeApp.js";
|
|
52
52
|
import { FloeRegistryRuntime as Hn } from "./app/FloeRegistryRuntime.js";
|
|
@@ -63,9 +63,9 @@ import { LayoutSelector as Ia } from "./components/deck/LayoutSelector.js";
|
|
|
63
63
|
import { LoadingOverlay as Ca } from "./components/loading/LoadingOverlay.js";
|
|
64
64
|
import { MarkdownBlock as ka } from "./components/chat/blocks/MarkdownBlock.js";
|
|
65
65
|
import { MermaidBlock as Sa } from "./components/chat/blocks/MermaidBlock.js";
|
|
66
|
-
import { MessageActions as
|
|
66
|
+
import { MessageActions as Ba } from "./components/chat/message/MessageActions.js";
|
|
67
67
|
import { MessageAvatar as Da } from "./components/chat/message/MessageAvatar.js";
|
|
68
|
-
import { MessageBubble as
|
|
68
|
+
import { MessageBubble as Ta } from "./components/chat/message/MessageBubble.js";
|
|
69
69
|
import { MessageItem as wa } from "./components/chat/message/MessageItem.js";
|
|
70
70
|
import { MessageMeta as Wa } from "./components/chat/message/MessageMeta.js";
|
|
71
71
|
import { MetricsWidget as ba } from "./widgets/MetricsWidget.js";
|
|
@@ -83,8 +83,8 @@ import { ShellBlock as mc } from "./components/chat/blocks/ShellBlock.js";
|
|
|
83
83
|
import { Sidebar as lc, SidebarContent as fc, SidebarItem as sc, SidebarItemList as dc, SidebarSection as xc } from "./components/layout/Sidebar.js";
|
|
84
84
|
import { Skeleton as gc, SkeletonCard as Cc, SkeletonList as uc, SkeletonText as kc } from "./components/loading/Skeleton.js";
|
|
85
85
|
import { SnakeLoader as Sc } from "./components/loading/SnakeLoader.js";
|
|
86
|
-
import { Stepper as
|
|
87
|
-
import { StreamingCursor as
|
|
86
|
+
import { Stepper as Bc, Wizard as Pc, useWizard as Dc } from "./components/ui/Stepper.js";
|
|
87
|
+
import { StreamingCursor as Tc } from "./components/chat/status/StreamingCursor.js";
|
|
88
88
|
import { SvgBlock as wc } from "./components/chat/blocks/SvgBlock.js";
|
|
89
89
|
import { Switch as Wc } from "./components/ui/Switch.js";
|
|
90
90
|
import { TabPanel as bc, Tabs as Ac } from "./components/ui/Tabs.js";
|
|
@@ -95,38 +95,39 @@ import { ThinkingBlock as Kc } from "./components/chat/blocks/ThinkingBlock.js";
|
|
|
95
95
|
import { ToolCallBlock as Qc } from "./components/chat/blocks/ToolCallBlock.js";
|
|
96
96
|
import { Tooltip as Xc } from "./components/ui/Tooltip.js";
|
|
97
97
|
import { TopBar as jc } from "./components/layout/TopBar.js";
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
116
|
-
import {
|
|
117
|
-
import {
|
|
118
|
-
import {
|
|
119
|
-
import {
|
|
120
|
-
import {
|
|
121
|
-
import {
|
|
122
|
-
import {
|
|
123
|
-
import {
|
|
124
|
-
import {
|
|
125
|
-
import {
|
|
126
|
-
import {
|
|
127
|
-
import {
|
|
128
|
-
import {
|
|
129
|
-
import {
|
|
98
|
+
import { TopBarIconButton as Yc } from "./components/layout/TopBarIconButton.js";
|
|
99
|
+
import { ViewActivationProvider as em, useViewActivation as om } from "./context/ViewActivationContext.js";
|
|
100
|
+
import { VirtualMessageList as tm } from "./components/chat/message-list/VirtualMessageList.js";
|
|
101
|
+
import { WidgetFrame as nm } from "./components/deck/WidgetFrame.js";
|
|
102
|
+
import { WidgetPalette as cm } from "./components/deck/WidgetPalette.js";
|
|
103
|
+
import { WidgetRegistryProvider as pm, createWidgetRegistry as lm, useWidgetRegistry as fm } from "./context/WidgetRegistry.js";
|
|
104
|
+
import { WidgetResizeHandle as dm } from "./components/deck/WidgetResizeHandle.js";
|
|
105
|
+
import { WidgetStateProvider as Im, useCurrentWidgetId as gm, useWidgetState as Cm, useWidgetStateContext as um } from "./context/WidgetStateContext.js";
|
|
106
|
+
import { WidgetTypeSwitcher as hm } from "./components/deck/WidgetTypeSwitcher.js";
|
|
107
|
+
import { WorkingIndicator as Fm } from "./components/chat/status/WorkingIndicator.js";
|
|
108
|
+
import { applyDragDelta as Pm, applyResizeDelta as Dm, getGridCellSize as ym, pixelDeltaToGridDelta as Tm, positionToGridArea as Mm, snapToGrid as wm } from "./utils/gridLayout.js";
|
|
109
|
+
import { checkCollision as Wm, constrainPosition as Lm, findFreePosition as bm, hasCollision as Am } from "./utils/gridCollision.js";
|
|
110
|
+
import { cn as Gm } from "./utils/cn.js";
|
|
111
|
+
import { computeCodeDiff as Vm, computeCodeDiffSync as Em, configureDiffWorker as Om, createDiffWorker as Um, hasDiffWorker as Nm, terminateDiffWorker as zm, waitForDiffWorker as Km } from "./components/chat/hooks/useCodeDiff.js";
|
|
112
|
+
import { configureMarkdownWorker as Qm, createMarkdownWorker as Zm, hasMarkdownWorker as Xm, renderMarkdown as qm, renderMarkdownSync as jm, terminateMarkdownWorker as Jm, waitForMarkdownWorker as Ym } from "./components/chat/hooks/useMarkdown.js";
|
|
113
|
+
import { configureMermaidWorker as ep, configureSyncMermaid as op, renderMermaid as rp, terminateMermaidWorker as tp, useMermaid as ip } from "./components/chat/hooks/useMermaid.js";
|
|
114
|
+
import { configureShikiWorker as ap, configureSyncHighlighter as cp, highlightCode as mp, terminateShikiWorker as pp, useCodeHighlight as lp } from "./components/chat/hooks/useCodeHighlight.js";
|
|
115
|
+
import { createSimpleContext as sp } from "./context/createSimpleContext.js";
|
|
116
|
+
import { deferAfterPaint as xp, deferNonBlocking as Ip } from "./utils/defer.js";
|
|
117
|
+
import { duration as Cp, easing as up, fadeIn as kp, listContainer as hp, listItem as Sp, panelResize as Fp, popIn as Bp, scaleIn as Pp, sidebarVariants as Dp, slideInFromBottom as yp, slideInFromLeft as Tp, slideInFromRight as Mp, slideInFromTop as wp, springConfig as vp } from "./utils/animations.js";
|
|
118
|
+
import { formatKeybind as Lp, matchKeybind as bp, parseKeybind as Ap } from "./utils/keybind.js";
|
|
119
|
+
import { isTypingElement as Gp, shouldIgnoreHotkeys as Hp } from "./utils/dom.js";
|
|
120
|
+
import { lockBodyStyle as Ep } from "./utils/bodyStyleLock.js";
|
|
121
|
+
import { useAttachments as Up } from "./components/chat/hooks/useAttachments.js";
|
|
122
|
+
import { useAutoScroll as zp } from "./components/chat/hooks/useAutoScroll.js";
|
|
123
|
+
import { useDebounce as _p } from "./hooks/useDebounce.js";
|
|
124
|
+
import { useDeckDrag as Zp } from "./hooks/useDeckDrag.js";
|
|
125
|
+
import { useFileBrowserDropTarget as qp, useFileBrowserItemDrag as jp } from "./hooks/useFileBrowserDrag.js";
|
|
126
|
+
import { useKeybind as Yp } from "./hooks/useKeybind.js";
|
|
127
|
+
import { useMediaQuery as el } from "./hooks/useMediaQuery.js";
|
|
128
|
+
import { usePersisted as rl } from "./hooks/usePersisted.js";
|
|
129
|
+
import { useResizeObserver as il } from "./hooks/useResizeObserver.js";
|
|
130
|
+
import { useVirtualList as al } from "./components/chat/hooks/useVirtualList.js";
|
|
130
131
|
export {
|
|
131
132
|
m as Activity,
|
|
132
133
|
zr as ActivityAppsMain,
|
|
@@ -149,16 +150,16 @@ export {
|
|
|
149
150
|
h as BarChart,
|
|
150
151
|
S as BatteryIcon,
|
|
151
152
|
F as Bell,
|
|
152
|
-
|
|
153
|
+
B as BellIcon,
|
|
153
154
|
Ct as BlockRenderer,
|
|
154
|
-
|
|
155
|
+
P as Bookmark,
|
|
155
156
|
D as BookmarkIcon,
|
|
156
157
|
y as Bot,
|
|
157
|
-
|
|
158
|
+
T as BotIcon,
|
|
158
159
|
kt as BottomBar,
|
|
159
160
|
ht as BottomBarItem,
|
|
160
|
-
|
|
161
|
-
|
|
161
|
+
Bt as Breadcrumb,
|
|
162
|
+
M as BugIcon,
|
|
162
163
|
Dt as Button,
|
|
163
164
|
w as Calendar,
|
|
164
165
|
v as CalendarIcon,
|
|
@@ -171,7 +172,7 @@ export {
|
|
|
171
172
|
tt as CardHeader,
|
|
172
173
|
it as CardTitle,
|
|
173
174
|
b as ChartIcon,
|
|
174
|
-
|
|
175
|
+
Tt as ChatContainer,
|
|
175
176
|
wt as ChatInput,
|
|
176
177
|
Wt as ChatProvider,
|
|
177
178
|
A as Check,
|
|
@@ -247,13 +248,13 @@ export {
|
|
|
247
248
|
kn as FileContextMenu,
|
|
248
249
|
Sn as FileGridView,
|
|
249
250
|
Yt as FileIcon,
|
|
250
|
-
|
|
251
|
+
Bn as FileListView,
|
|
251
252
|
xe as FilePlus,
|
|
252
253
|
Ie as FilePlusIcon,
|
|
253
254
|
Dn as FileSavePicker,
|
|
254
255
|
ge as FileText,
|
|
255
256
|
Ce as Files,
|
|
256
|
-
|
|
257
|
+
Tn as FilesSidebarWidget,
|
|
257
258
|
ue as Filter,
|
|
258
259
|
ke as FilterIcon,
|
|
259
260
|
he as FireIcon,
|
|
@@ -266,8 +267,8 @@ export {
|
|
|
266
267
|
$t as FolderIcon,
|
|
267
268
|
Fe as FolderOpen,
|
|
268
269
|
ei as FolderOpenIcon,
|
|
269
|
-
|
|
270
|
-
|
|
270
|
+
Be as FolderPlus,
|
|
271
|
+
Pe as FolderPlusIcon,
|
|
271
272
|
En as Form,
|
|
272
273
|
On as FormActions,
|
|
273
274
|
Un as FormControl,
|
|
@@ -280,8 +281,8 @@ export {
|
|
|
280
281
|
Xn as FormSection,
|
|
281
282
|
De as GiftIcon,
|
|
282
283
|
ye as GitBranch,
|
|
283
|
-
|
|
284
|
-
|
|
284
|
+
Te as GitBranchIcon,
|
|
285
|
+
Me as Globe,
|
|
285
286
|
we as GlobeIcon,
|
|
286
287
|
ve as Grid,
|
|
287
288
|
We as Grid3x3,
|
|
@@ -335,9 +336,9 @@ export {
|
|
|
335
336
|
co as Maximize,
|
|
336
337
|
mo as Menu,
|
|
337
338
|
Sa as MermaidBlock,
|
|
338
|
-
|
|
339
|
+
Ba as MessageActions,
|
|
339
340
|
Da as MessageAvatar,
|
|
340
|
-
|
|
341
|
+
Ta as MessageBubble,
|
|
341
342
|
po as MessageIcon,
|
|
342
343
|
wa as MessageItem,
|
|
343
344
|
Wa as MessageMeta,
|
|
@@ -362,16 +363,16 @@ export {
|
|
|
362
363
|
Va as NotificationProvider,
|
|
363
364
|
qr as NumberInput,
|
|
364
365
|
Fo as Package,
|
|
365
|
-
|
|
366
|
+
Bo as PackageIcon,
|
|
366
367
|
Na as Pagination,
|
|
367
368
|
Ka as Panel,
|
|
368
369
|
_a as PanelContent,
|
|
369
370
|
Qa as PanelHeader,
|
|
370
|
-
|
|
371
|
+
Po as Paperclip,
|
|
371
372
|
Do as Paste,
|
|
372
373
|
yo as PasteIcon,
|
|
373
|
-
|
|
374
|
-
|
|
374
|
+
To as Pause,
|
|
375
|
+
Mo as PauseIcon,
|
|
375
376
|
wo as Pencil,
|
|
376
377
|
vo as Phone,
|
|
377
378
|
Wo as PieChart,
|
|
@@ -398,7 +399,7 @@ export {
|
|
|
398
399
|
Qo as SaveIcon,
|
|
399
400
|
Zo as Search,
|
|
400
401
|
Xo as SearchIcon,
|
|
401
|
-
|
|
402
|
+
Mn as SearchSidebarWidget,
|
|
402
403
|
ic as SegmentedControl,
|
|
403
404
|
Nt as SegmentedProgress,
|
|
404
405
|
qi as Select,
|
|
@@ -430,10 +431,10 @@ export {
|
|
|
430
431
|
nr as Star,
|
|
431
432
|
ar as StarIcon,
|
|
432
433
|
St as StatusIndicator,
|
|
433
|
-
|
|
434
|
+
Bc as Stepper,
|
|
434
435
|
zt as StepsProgress,
|
|
435
436
|
cr as Stop,
|
|
436
|
-
|
|
437
|
+
Tc as StreamingCursor,
|
|
437
438
|
ri as StyleFileIcon,
|
|
438
439
|
on as SuccessBlock,
|
|
439
440
|
mr as SuccessIcon,
|
|
@@ -460,139 +461,140 @@ export {
|
|
|
460
461
|
Qc as ToolCallBlock,
|
|
461
462
|
Xc as Tooltip,
|
|
462
463
|
jc as TopBar,
|
|
464
|
+
Yc as TopBarIconButton,
|
|
463
465
|
kr as Trash,
|
|
464
466
|
hr as TrashIcon,
|
|
465
467
|
Sr as TrendingDown,
|
|
466
468
|
Fr as TrendingUp,
|
|
467
|
-
|
|
468
|
-
|
|
469
|
+
Br as Unlock,
|
|
470
|
+
Pr as Upload,
|
|
469
471
|
Dr as UploadIcon,
|
|
470
472
|
yr as User,
|
|
471
|
-
|
|
472
|
-
|
|
473
|
+
Tr as UserIcon,
|
|
474
|
+
Mr as Video,
|
|
473
475
|
wr as VideoIcon,
|
|
474
|
-
|
|
475
|
-
|
|
476
|
+
em as ViewActivationProvider,
|
|
477
|
+
tm as VirtualMessageList,
|
|
476
478
|
vr as Volume,
|
|
477
479
|
Wr as VolumeIcon,
|
|
478
480
|
Lr as VolumeOff,
|
|
479
481
|
br as Wand,
|
|
480
482
|
tn as WarningBlock,
|
|
481
483
|
Ar as WarningIcon,
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
484
|
+
nm as WidgetFrame,
|
|
485
|
+
cm as WidgetPalette,
|
|
486
|
+
pm as WidgetRegistryProvider,
|
|
487
|
+
dm as WidgetResizeHandle,
|
|
488
|
+
Im as WidgetStateProvider,
|
|
489
|
+
hm as WidgetTypeSwitcher,
|
|
488
490
|
Rr as WifiIcon,
|
|
489
491
|
Gr as WifiOffIcon,
|
|
490
|
-
|
|
492
|
+
Pc as Wizard,
|
|
491
493
|
Hr as Workflow,
|
|
492
|
-
|
|
494
|
+
Fm as WorkingIndicator,
|
|
493
495
|
Vr as X,
|
|
494
496
|
Er as XCircle,
|
|
495
497
|
Or as Zap,
|
|
496
498
|
Ur as ZapIcon,
|
|
497
|
-
|
|
498
|
-
|
|
499
|
+
Pm as applyDragDelta,
|
|
500
|
+
Dm as applyResizeDelta,
|
|
499
501
|
i as applyTheme,
|
|
500
502
|
n as builtInThemes,
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
503
|
+
Wm as checkCollision,
|
|
504
|
+
Gm as cn,
|
|
505
|
+
Vm as computeCodeDiff,
|
|
506
|
+
Em as computeCodeDiffSync,
|
|
507
|
+
Om as configureDiffWorker,
|
|
508
|
+
Qm as configureMarkdownWorker,
|
|
509
|
+
ep as configureMermaidWorker,
|
|
510
|
+
ap as configureShikiWorker,
|
|
511
|
+
cp as configureSyncHighlighter,
|
|
512
|
+
op as configureSyncMermaid,
|
|
513
|
+
Lm as constrainPosition,
|
|
512
514
|
mi as createCommandService,
|
|
513
515
|
si as createComponentRegistry,
|
|
514
516
|
Ri as createDeckService,
|
|
515
|
-
|
|
517
|
+
Um as createDiffWorker,
|
|
516
518
|
sa as createLayoutService,
|
|
517
|
-
|
|
519
|
+
Zm as createMarkdownWorker,
|
|
518
520
|
Ea as createNotificationService,
|
|
519
|
-
|
|
521
|
+
sp as createSimpleContext,
|
|
520
522
|
Uc as createThemeService,
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
523
|
+
lm as createWidgetRegistry,
|
|
524
|
+
xp as deferAfterPaint,
|
|
525
|
+
Ip as deferNonBlocking,
|
|
526
|
+
Cp as duration,
|
|
527
|
+
up as easing,
|
|
528
|
+
kp as fadeIn,
|
|
529
|
+
bm as findFreePosition,
|
|
530
|
+
Lp as formatKeybind,
|
|
529
531
|
ti as getFileIcon,
|
|
530
|
-
|
|
531
|
-
|
|
532
|
+
ym as getGridCellSize,
|
|
533
|
+
Bi as getGridConfigFromElement,
|
|
532
534
|
a as getSystemTheme,
|
|
533
|
-
|
|
534
|
-
|
|
535
|
+
Am as hasCollision,
|
|
536
|
+
Nm as hasDiffWorker,
|
|
535
537
|
fn as hasFileBrowserDragContext,
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
538
|
+
Xm as hasMarkdownWorker,
|
|
539
|
+
mp as highlightCode,
|
|
540
|
+
Gp as isTypingElement,
|
|
541
|
+
hp as listContainer,
|
|
542
|
+
Sp as listItem,
|
|
543
|
+
Ep as lockBodyStyle,
|
|
544
|
+
bp as matchKeybind,
|
|
545
|
+
Fp as panelResize,
|
|
546
|
+
Ap as parseKeybind,
|
|
547
|
+
Tm as pixelDeltaToGridDelta,
|
|
548
|
+
Bp as popIn,
|
|
549
|
+
Mm as positionToGridArea,
|
|
550
|
+
qm as renderMarkdown,
|
|
551
|
+
jm as renderMarkdownSync,
|
|
552
|
+
rp as renderMermaid,
|
|
553
|
+
Pp as scaleIn,
|
|
554
|
+
Hp as shouldIgnoreHotkeys,
|
|
555
|
+
Dp as sidebarVariants,
|
|
556
|
+
yp as slideInFromBottom,
|
|
557
|
+
Tp as slideInFromLeft,
|
|
558
|
+
Mp as slideInFromRight,
|
|
559
|
+
wp as slideInFromTop,
|
|
560
|
+
wm as snapToGrid,
|
|
561
|
+
vp as springConfig,
|
|
562
|
+
zm as terminateDiffWorker,
|
|
563
|
+
Jm as terminateMarkdownWorker,
|
|
564
|
+
tp as terminateMermaidWorker,
|
|
565
|
+
pp as terminateShikiWorker,
|
|
566
|
+
Up as useAttachments,
|
|
567
|
+
zp as useAutoScroll,
|
|
566
568
|
Lt as useChatContext,
|
|
567
|
-
|
|
569
|
+
lp as useCodeHighlight,
|
|
568
570
|
pi as useCommand,
|
|
569
571
|
di as useComponentContextFactory,
|
|
570
572
|
xi as useComponentRegistry,
|
|
571
|
-
|
|
572
|
-
|
|
573
|
+
gm as useCurrentWidgetId,
|
|
574
|
+
_p as useDebounce,
|
|
573
575
|
Gi as useDeck,
|
|
574
|
-
|
|
576
|
+
Zp as useDeckDrag,
|
|
575
577
|
In as useFileBrowser,
|
|
576
578
|
sn as useFileBrowserDrag,
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
579
|
+
qp as useFileBrowserDropTarget,
|
|
580
|
+
jp as useFileBrowserItemDrag,
|
|
581
|
+
Ti as useFloeConfig,
|
|
580
582
|
qn as useFormSubmitting,
|
|
581
|
-
|
|
583
|
+
Yp as useKeybind,
|
|
582
584
|
da as useLayout,
|
|
583
|
-
|
|
584
|
-
|
|
585
|
+
el as useMediaQuery,
|
|
586
|
+
ip as useMermaid,
|
|
585
587
|
Oa as useNotification,
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
588
|
+
rl as usePersisted,
|
|
589
|
+
il as useResizeObserver,
|
|
590
|
+
Mi as useResolvedFloeConfig,
|
|
589
591
|
Nc as useTheme,
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
592
|
+
om as useViewActivation,
|
|
593
|
+
al as useVirtualList,
|
|
594
|
+
fm as useWidgetRegistry,
|
|
595
|
+
Cm as useWidgetState,
|
|
596
|
+
um as useWidgetStateContext,
|
|
595
597
|
Dc as useWizard,
|
|
596
|
-
|
|
597
|
-
|
|
598
|
+
Km as waitForDiffWorker,
|
|
599
|
+
Ym as waitForMarkdownWorker
|
|
598
600
|
};
|
package/dist/layout.js
CHANGED
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { ActivityBar as
|
|
1
|
+
import { ActivityBar as r } from "./components/layout/ActivityBar.js";
|
|
2
2
|
import { BottomBar as a, BottomBarItem as m, StatusIndicator as i } from "./components/layout/BottomBar.js";
|
|
3
3
|
import { KeepAliveStack as n } from "./components/layout/KeepAliveStack.js";
|
|
4
4
|
import { MobileTabBar as x } from "./components/layout/MobileTabBar.js";
|
|
5
|
-
import { Panel as
|
|
5
|
+
import { Panel as S, PanelContent as d, PanelHeader as l } from "./components/layout/Panel.js";
|
|
6
6
|
import { ResizeHandle as c } from "./components/layout/ResizeHandle.js";
|
|
7
7
|
import { Shell as s } from "./components/layout/Shell.js";
|
|
8
|
-
import { Sidebar as
|
|
9
|
-
import { TopBar as
|
|
8
|
+
import { Sidebar as T, SidebarContent as u, SidebarItem as v, SidebarItemList as A, SidebarSection as C } from "./components/layout/Sidebar.js";
|
|
9
|
+
import { TopBar as h } from "./components/layout/TopBar.js";
|
|
10
|
+
import { TopBarIconButton as y } from "./components/layout/TopBarIconButton.js";
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
+
r as ActivityBar,
|
|
12
13
|
a as BottomBar,
|
|
13
14
|
m as BottomBarItem,
|
|
14
15
|
n as KeepAliveStack,
|
|
15
16
|
x as MobileTabBar,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
S as Panel,
|
|
18
|
+
d as PanelContent,
|
|
19
|
+
l as PanelHeader,
|
|
19
20
|
c as ResizeHandle,
|
|
20
21
|
s as Shell,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
T as Sidebar,
|
|
23
|
+
u as SidebarContent,
|
|
24
|
+
v as SidebarItem,
|
|
25
|
+
A as SidebarItemList,
|
|
26
|
+
C as SidebarSection,
|
|
26
27
|
i as StatusIndicator,
|
|
27
|
-
|
|
28
|
+
h as TopBar,
|
|
29
|
+
y as TopBarIconButton
|
|
28
30
|
};
|