@floegence/floe-webapp-core 0.35.21 → 0.35.22
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/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/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,163 +1,163 @@
|
|
|
1
|
-
import { createComponent as o, Dynamic as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { useLayout as
|
|
4
|
-
import { useResolvedFloeConfig as
|
|
5
|
-
import { useMediaQuery as
|
|
6
|
-
import { useOverlayMask as
|
|
1
|
+
import { createComponent as o, Dynamic as p, insert as d, memo as A, effect as N, className as h, setAttribute as L, setStyleProperty as ie, template as T, use as ne, delegateEvents as oe } from "solid-js/web";
|
|
2
|
+
import { createSignal as Q, createEffect as x, createMemo as w, For as W, Show as C } from "solid-js";
|
|
3
|
+
import { useLayout as ae } from "../../context/LayoutContext.js";
|
|
4
|
+
import { useResolvedFloeConfig as le } from "../../context/FloeConfigContext.js";
|
|
5
|
+
import { useMediaQuery as se } from "../../hooks/useMediaQuery.js";
|
|
6
|
+
import { useOverlayMask as de } from "../../hooks/useOverlayMask.js";
|
|
7
7
|
import { cn as S } from "../../utils/cn.js";
|
|
8
|
-
import { deferNonBlocking as
|
|
9
|
-
import { useComponentRegistry as
|
|
10
|
-
import { Sidebar as
|
|
11
|
-
import { TopBar as
|
|
12
|
-
import { TopBarIconButton as
|
|
13
|
-
import { BottomBar as
|
|
14
|
-
import { MobileTabBar as
|
|
15
|
-
import { ActivityBar as
|
|
16
|
-
import { ResizeHandle as
|
|
17
|
-
import { resolveMobileTabActiveId as
|
|
18
|
-
import { KeepAliveStack as
|
|
19
|
-
var
|
|
20
|
-
function
|
|
21
|
-
const
|
|
22
|
-
let
|
|
23
|
-
const
|
|
8
|
+
import { deferNonBlocking as ce } from "../../utils/defer.js";
|
|
9
|
+
import { useComponentRegistry as ue } from "../../context/ComponentRegistry.js";
|
|
10
|
+
import { Sidebar as be } from "./Sidebar.js";
|
|
11
|
+
import { TopBar as me } from "./TopBar.js";
|
|
12
|
+
import { TopBarIconButton as fe } from "./TopBarIconButton.js";
|
|
13
|
+
import { BottomBar as ve } from "./BottomBar.js";
|
|
14
|
+
import { MobileTabBar as ge } from "./MobileTabBar.js";
|
|
15
|
+
import { ActivityBar as he } from "./ActivityBar.js";
|
|
16
|
+
import { ResizeHandle as K } from "./ResizeHandle.js";
|
|
17
|
+
import { resolveMobileTabActiveId as Ce, resolveMobileTabSelect as Se } from "./mobileTabs.js";
|
|
18
|
+
import { KeepAliveStack as ye } from "./KeepAliveStack.js";
|
|
19
|
+
var V = /* @__PURE__ */ T('<div class="flex items-center gap-2">'), we = /* @__PURE__ */ T("<div data-floe-shell-slot=mobile-sidebar-backdrop>"), Ie = /* @__PURE__ */ T('<div data-floe-shell-slot=mobile-sidebar-drawer tabindex=-1 role=dialog aria-modal=true><div class="h-full overflow-auto overscroll-contain">'), Be = /* @__PURE__ */ T("<div data-floe-shell-slot=terminal-panel style=border-top-color:var(--terminal-panel-border)>"), ke = /* @__PURE__ */ T('<div data-floe-shell><a></a><div data-floe-shell-slot=main-layout class="flex-1 min-h-0 flex overflow-hidden relative"><div data-floe-shell-slot=content-area><main data-floe-shell-slot=main tabindex=-1>');
|
|
20
|
+
function Qe(r) {
|
|
21
|
+
const n = ae(), P = le(), c = se(P.config.layout.mobileQuery), [M, y] = Q(!1), [F, z] = Q(null);
|
|
22
|
+
let $;
|
|
23
|
+
const u = () => r.sidebarMode === "hidden", s = (() => {
|
|
24
24
|
try {
|
|
25
|
-
return
|
|
25
|
+
return ue();
|
|
26
26
|
} catch {
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
29
|
-
})(),
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
openSidebar:
|
|
29
|
+
})(), O = (e, l) => {
|
|
30
|
+
const a = s?.getComponent(e)?.sidebar?.fullScreen ?? !1, i = u() ? !1 : l?.openSidebar ?? !a;
|
|
31
|
+
n.setSidebarActiveTab(e, {
|
|
32
|
+
openSidebar: i
|
|
33
33
|
});
|
|
34
34
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}),
|
|
38
|
-
const e =
|
|
39
|
-
|
|
40
|
-
}),
|
|
41
|
-
|
|
35
|
+
x(() => {
|
|
36
|
+
u() && y(!1);
|
|
37
|
+
}), x(() => {
|
|
38
|
+
const e = c();
|
|
39
|
+
n.isMobile() !== e && n.setIsMobile(e);
|
|
40
|
+
}), x(() => {
|
|
41
|
+
c() || y(!1);
|
|
42
42
|
});
|
|
43
|
-
const
|
|
43
|
+
const I = w(() => r.activityItems ? r.activityItems : s ? s.sidebarItems().filter((e) => !!e.icon).filter((e) => !(c() && e.sidebar?.hiddenOnMobile)).map((e) => ({
|
|
44
44
|
id: e.id,
|
|
45
45
|
icon: e.icon,
|
|
46
46
|
label: e.name,
|
|
47
47
|
badge: e.sidebar?.badge,
|
|
48
48
|
collapseBehavior: e.sidebar?.collapseBehavior ?? (e.sidebar?.fullScreen ? "preserve" : "toggle")
|
|
49
|
-
})) : []),
|
|
49
|
+
})) : []), j = w(() => u() ? [] : r.sidebarContent ? [] : s ? s.sidebarItems().filter((e) => !(c() && e.sidebar?.hiddenOnMobile)).filter((e) => e.sidebar?.fullScreen !== !0 && e.sidebar?.renderIn !== "main").map((e) => ({
|
|
50
50
|
id: e.id,
|
|
51
|
-
render: () => o(
|
|
51
|
+
render: () => o(p, {
|
|
52
52
|
get component() {
|
|
53
53
|
return e.component;
|
|
54
54
|
}
|
|
55
55
|
})
|
|
56
|
-
})) : []),
|
|
57
|
-
if (!
|
|
56
|
+
})) : []), H = (e) => {
|
|
57
|
+
if (!u()) {
|
|
58
58
|
if (r.sidebarContent) return r.sidebarContent(e);
|
|
59
59
|
if (s)
|
|
60
|
-
return o(
|
|
60
|
+
return o(ye, {
|
|
61
61
|
get views() {
|
|
62
|
-
return
|
|
62
|
+
return j();
|
|
63
63
|
},
|
|
64
64
|
activeId: e
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
},
|
|
68
|
-
if (
|
|
67
|
+
}, R = w(() => u() ? !0 : s ? s.getComponent(n.sidebarActiveTab())?.sidebar?.fullScreen ?? !1 : !1), q = w(() => {
|
|
68
|
+
if (u()) return !0;
|
|
69
69
|
if (!s) return !1;
|
|
70
|
-
const e = s.getComponent(
|
|
70
|
+
const e = s.getComponent(n.sidebarActiveTab());
|
|
71
71
|
return e?.sidebar ? e.sidebar.fullScreen === !0 || e.sidebar.renderIn === "main" : !1;
|
|
72
72
|
});
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
x(() => {
|
|
74
|
+
c() && R() && y(!1);
|
|
75
75
|
});
|
|
76
|
-
const
|
|
76
|
+
const G = w(() => {
|
|
77
77
|
if (r.bottomBarItems) return r.bottomBarItems;
|
|
78
78
|
if (!s) return;
|
|
79
|
-
const e = [...s.statusBarItems()].sort((
|
|
79
|
+
const e = [...s.statusBarItems()].sort((i, v) => (i.order ?? 100) - (v.order ?? 100)), l = e.filter((i) => i.position === "left"), a = e.filter((i) => i.position === "right");
|
|
80
80
|
return [(() => {
|
|
81
|
-
var
|
|
82
|
-
return
|
|
83
|
-
each:
|
|
84
|
-
children: (
|
|
81
|
+
var i = V();
|
|
82
|
+
return d(i, o(W, {
|
|
83
|
+
each: l,
|
|
84
|
+
children: (v) => o(p, {
|
|
85
85
|
get component() {
|
|
86
|
-
return
|
|
86
|
+
return v.component;
|
|
87
87
|
}
|
|
88
88
|
})
|
|
89
|
-
})),
|
|
89
|
+
})), i;
|
|
90
90
|
})(), (() => {
|
|
91
|
-
var
|
|
92
|
-
return
|
|
93
|
-
each:
|
|
94
|
-
children: (
|
|
91
|
+
var i = V();
|
|
92
|
+
return d(i, o(W, {
|
|
93
|
+
each: a,
|
|
94
|
+
children: (v) => o(p, {
|
|
95
95
|
get component() {
|
|
96
|
-
return
|
|
96
|
+
return v.component;
|
|
97
97
|
}
|
|
98
98
|
})
|
|
99
|
-
})),
|
|
99
|
+
})), i;
|
|
100
100
|
})()];
|
|
101
101
|
});
|
|
102
|
-
|
|
103
|
-
const e =
|
|
102
|
+
x(() => {
|
|
103
|
+
const e = I();
|
|
104
104
|
if (!e.length) return;
|
|
105
|
-
if (!
|
|
106
|
-
const
|
|
107
|
-
if (!
|
|
108
|
-
|
|
105
|
+
if (!n.sidebarActiveTab()) {
|
|
106
|
+
const a = e.find((i) => !i.onClick);
|
|
107
|
+
if (!a) return;
|
|
108
|
+
O(a.id);
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
nextActiveId:
|
|
114
|
-
nextMobileSidebarOpen:
|
|
115
|
-
} =
|
|
111
|
+
const E = (e) => {
|
|
112
|
+
const l = u() ? !0 : s?.getComponent(e)?.sidebar?.fullScreen ?? !1, {
|
|
113
|
+
nextActiveId: a,
|
|
114
|
+
nextMobileSidebarOpen: i
|
|
115
|
+
} = Se({
|
|
116
116
|
clickedId: e,
|
|
117
|
-
activeId:
|
|
118
|
-
mobileSidebarOpen:
|
|
119
|
-
clickedIsFullScreen:
|
|
117
|
+
activeId: n.sidebarActiveTab(),
|
|
118
|
+
mobileSidebarOpen: M(),
|
|
119
|
+
clickedIsFullScreen: l
|
|
120
120
|
});
|
|
121
|
-
|
|
122
|
-
},
|
|
121
|
+
n.sidebarActiveTab() !== a && O(a), y(i);
|
|
122
|
+
}, J = (e) => {
|
|
123
123
|
if (e.onClick) {
|
|
124
|
-
|
|
124
|
+
ce(() => e.onClick());
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
|
-
|
|
128
|
-
},
|
|
127
|
+
E(e.id);
|
|
128
|
+
}, U = w(() => {
|
|
129
129
|
const e = r.topBarActions;
|
|
130
|
-
if (!
|
|
131
|
-
const
|
|
132
|
-
return
|
|
133
|
-
each:
|
|
134
|
-
children: (
|
|
130
|
+
if (!c() || (r.activityBottomItemsMobileMode ?? "hidden") !== "topBar") return e;
|
|
131
|
+
const a = r.activityBottomItems ?? [];
|
|
132
|
+
return a.length ? [o(W, {
|
|
133
|
+
each: a,
|
|
134
|
+
children: (i) => o(fe, {
|
|
135
135
|
get label() {
|
|
136
|
-
return
|
|
136
|
+
return i.label;
|
|
137
137
|
},
|
|
138
|
-
onClick: () =>
|
|
138
|
+
onClick: () => J(i),
|
|
139
139
|
get children() {
|
|
140
|
-
return o(
|
|
140
|
+
return o(p, {
|
|
141
141
|
get component() {
|
|
142
|
-
return
|
|
142
|
+
return i.icon;
|
|
143
143
|
},
|
|
144
144
|
class: "w-4 h-4"
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
147
|
})
|
|
148
148
|
}), e] : e;
|
|
149
|
-
}),
|
|
150
|
-
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
},
|
|
154
|
-
const e =
|
|
155
|
-
e !== null && (
|
|
149
|
+
}), X = () => u() ? !0 : n.sidebarCollapsed(), Y = () => F() ?? n.sidebarWidth(), f = () => P.config.accessibility, Z = () => {
|
|
150
|
+
z(n.sidebarWidth());
|
|
151
|
+
}, ee = (e) => {
|
|
152
|
+
z((l) => n.clampSidebarWidth((l ?? n.sidebarWidth()) + e));
|
|
153
|
+
}, te = () => {
|
|
154
|
+
const e = F();
|
|
155
|
+
e !== null && (n.setSidebarWidth(e), z(null));
|
|
156
156
|
};
|
|
157
|
-
|
|
158
|
-
open: () =>
|
|
159
|
-
root: () =>
|
|
160
|
-
onClose: () =>
|
|
157
|
+
de({
|
|
158
|
+
open: () => c() && M() && !u(),
|
|
159
|
+
root: () => $,
|
|
160
|
+
onClose: () => y(!1),
|
|
161
161
|
lockBodyScroll: !0,
|
|
162
162
|
trapFocus: !0,
|
|
163
163
|
closeOnEscape: !0,
|
|
@@ -166,149 +166,177 @@ function Re(r) {
|
|
|
166
166
|
blockTouchMove: "outside",
|
|
167
167
|
autoFocus: !1,
|
|
168
168
|
restoreFocus: !0
|
|
169
|
-
})
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
});
|
|
170
|
+
const re = () => {
|
|
171
|
+
if (typeof document > "u") return;
|
|
172
|
+
const e = document.getElementById(f().mainContentId);
|
|
173
|
+
if (!(!e || !(e instanceof HTMLElement)))
|
|
174
|
+
try {
|
|
175
|
+
e.focus();
|
|
176
|
+
} catch {
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
return (() => {
|
|
180
|
+
var e = ke(), l = e.firstChild, a = l.nextSibling, i = a.firstChild, v = i.firstChild;
|
|
181
|
+
return l.$$click = () => re(), d(l, () => f().skipLinkLabel), d(e, o(me, {
|
|
172
182
|
get logo() {
|
|
173
183
|
return r.logo;
|
|
174
184
|
},
|
|
175
185
|
get actions() {
|
|
176
|
-
return
|
|
186
|
+
return U();
|
|
187
|
+
},
|
|
188
|
+
get ariaLabel() {
|
|
189
|
+
return f().topBarLabel;
|
|
177
190
|
},
|
|
178
191
|
get class() {
|
|
179
192
|
return r.slotClassNames?.topBar;
|
|
180
193
|
}
|
|
181
|
-
}), a),
|
|
194
|
+
}), a), d(a, o(C, {
|
|
182
195
|
get when() {
|
|
183
|
-
return !
|
|
196
|
+
return !c();
|
|
184
197
|
},
|
|
185
198
|
get children() {
|
|
186
|
-
return [o(
|
|
199
|
+
return [o(C, {
|
|
187
200
|
get when() {
|
|
188
|
-
return
|
|
201
|
+
return I().length > 0;
|
|
189
202
|
},
|
|
190
203
|
get children() {
|
|
191
|
-
return o(
|
|
204
|
+
return o(he, {
|
|
192
205
|
get items() {
|
|
193
|
-
return
|
|
206
|
+
return I();
|
|
194
207
|
},
|
|
195
208
|
get bottomItems() {
|
|
196
209
|
return r.activityBottomItems;
|
|
197
210
|
},
|
|
198
211
|
get activeId() {
|
|
199
|
-
return
|
|
212
|
+
return n.sidebarActiveTab();
|
|
200
213
|
},
|
|
201
|
-
onActiveChange:
|
|
214
|
+
onActiveChange: O,
|
|
202
215
|
get collapsed() {
|
|
203
|
-
return
|
|
216
|
+
return X();
|
|
204
217
|
},
|
|
205
218
|
get onCollapsedChange() {
|
|
206
|
-
return
|
|
219
|
+
return A(() => !!u())() ? void 0 : n.setSidebarCollapsed;
|
|
220
|
+
},
|
|
221
|
+
get ariaLabel() {
|
|
222
|
+
return f().primaryNavigationLabel;
|
|
207
223
|
},
|
|
208
224
|
get class() {
|
|
209
225
|
return r.slotClassNames?.activityBar;
|
|
210
226
|
}
|
|
211
227
|
});
|
|
212
228
|
}
|
|
213
|
-
}), o(
|
|
229
|
+
}), o(C, {
|
|
214
230
|
get when() {
|
|
215
|
-
return !
|
|
231
|
+
return !u();
|
|
216
232
|
},
|
|
217
233
|
get children() {
|
|
218
|
-
return o(
|
|
234
|
+
return o(be, {
|
|
219
235
|
get width() {
|
|
220
|
-
return
|
|
236
|
+
return Y();
|
|
221
237
|
},
|
|
222
238
|
get collapsed() {
|
|
223
|
-
return
|
|
239
|
+
return n.sidebarCollapsed() || R();
|
|
240
|
+
},
|
|
241
|
+
get ariaLabel() {
|
|
242
|
+
return f().sidebarLabel;
|
|
224
243
|
},
|
|
225
244
|
get resizer() {
|
|
226
|
-
return o(
|
|
245
|
+
return o(K, {
|
|
227
246
|
direction: "horizontal",
|
|
228
|
-
onResize:
|
|
229
|
-
onResizeStart:
|
|
230
|
-
onResizeEnd:
|
|
247
|
+
onResize: ee,
|
|
248
|
+
onResizeStart: Z,
|
|
249
|
+
onResizeEnd: te
|
|
231
250
|
});
|
|
232
251
|
},
|
|
233
252
|
get class() {
|
|
234
253
|
return r.slotClassNames?.sidebar;
|
|
235
254
|
},
|
|
236
255
|
get children() {
|
|
237
|
-
return
|
|
256
|
+
return H(n.sidebarActiveTab());
|
|
238
257
|
}
|
|
239
258
|
});
|
|
240
259
|
}
|
|
241
260
|
})];
|
|
242
261
|
}
|
|
243
|
-
}),
|
|
262
|
+
}), i), d(a, o(C, {
|
|
244
263
|
get when() {
|
|
245
|
-
return
|
|
264
|
+
return A(() => !!(c() && M()))() && !u();
|
|
246
265
|
},
|
|
247
266
|
get children() {
|
|
248
267
|
return [(() => {
|
|
249
|
-
var t =
|
|
250
|
-
return t.$$click = () =>
|
|
268
|
+
var t = we();
|
|
269
|
+
return t.$$click = () => y(!1), N(() => h(t, S("absolute inset-0 z-40 bg-black/30 cursor-pointer", r.slotClassNames?.mobileSidebarBackdrop))), t;
|
|
251
270
|
})(), (() => {
|
|
252
|
-
var t =
|
|
253
|
-
return typeof
|
|
271
|
+
var t = Ie(), b = t.firstChild, g = $;
|
|
272
|
+
return typeof g == "function" ? ne(g, t) : $ = t, d(b, () => H(n.sidebarActiveTab())), N((m) => {
|
|
273
|
+
var B = S("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", r.slotClassNames?.mobileSidebarDrawer), k = f().sidebarLabel;
|
|
274
|
+
return B !== m.e && h(t, m.e = B), k !== m.t && L(t, "aria-label", m.t = k), m;
|
|
275
|
+
}, {
|
|
276
|
+
e: void 0,
|
|
277
|
+
t: void 0
|
|
278
|
+
}), t;
|
|
254
279
|
})()];
|
|
255
280
|
}
|
|
256
|
-
}),
|
|
281
|
+
}), i), d(v, () => r.children), d(i, o(C, {
|
|
257
282
|
get when() {
|
|
258
|
-
return
|
|
283
|
+
return A(() => !!(!c() && n.terminalOpened()))() && r.terminalPanel;
|
|
259
284
|
},
|
|
260
285
|
get children() {
|
|
261
|
-
var t =
|
|
262
|
-
return
|
|
286
|
+
var t = Be();
|
|
287
|
+
return d(t, o(K, {
|
|
263
288
|
direction: "vertical",
|
|
264
|
-
onResize: (
|
|
265
|
-
}), null),
|
|
266
|
-
var
|
|
267
|
-
return
|
|
289
|
+
onResize: (b) => n.setTerminalHeight(n.terminalHeight() - b)
|
|
290
|
+
}), null), d(t, () => r.terminalPanel, null), N((b) => {
|
|
291
|
+
var g = S("relative shrink-0 border-t border-border bg-terminal-background overflow-hidden", r.slotClassNames?.terminalPanel), m = `${n.terminalHeight()}px`;
|
|
292
|
+
return g !== b.e && h(t, b.e = g), m !== b.t && ie(t, "height", b.t = m), b;
|
|
268
293
|
}, {
|
|
269
294
|
e: void 0,
|
|
270
295
|
t: void 0
|
|
271
296
|
}), t;
|
|
272
297
|
}
|
|
273
|
-
}), null),
|
|
298
|
+
}), null), d(e, o(C, {
|
|
274
299
|
get when() {
|
|
275
|
-
return !
|
|
300
|
+
return !c();
|
|
276
301
|
},
|
|
277
302
|
get children() {
|
|
278
|
-
return o(
|
|
303
|
+
return o(ve, {
|
|
279
304
|
get class() {
|
|
280
305
|
return r.slotClassNames?.bottomBar;
|
|
281
306
|
},
|
|
282
307
|
get children() {
|
|
283
|
-
return
|
|
308
|
+
return G();
|
|
284
309
|
}
|
|
285
310
|
});
|
|
286
311
|
}
|
|
287
|
-
}), null),
|
|
312
|
+
}), null), d(e, o(C, {
|
|
288
313
|
get when() {
|
|
289
|
-
return
|
|
314
|
+
return A(() => !!c())() && I().length > 0;
|
|
290
315
|
},
|
|
291
316
|
get children() {
|
|
292
|
-
return o(
|
|
317
|
+
return o(ge, {
|
|
293
318
|
get items() {
|
|
294
|
-
return
|
|
319
|
+
return I();
|
|
295
320
|
},
|
|
296
321
|
get activeId() {
|
|
297
|
-
return
|
|
298
|
-
activeId:
|
|
299
|
-
mobileSidebarOpen:
|
|
300
|
-
activeIsFullScreen:
|
|
301
|
-
activeIsPage:
|
|
322
|
+
return Ce({
|
|
323
|
+
activeId: n.sidebarActiveTab(),
|
|
324
|
+
mobileSidebarOpen: M(),
|
|
325
|
+
activeIsFullScreen: R(),
|
|
326
|
+
activeIsPage: q()
|
|
302
327
|
});
|
|
303
328
|
},
|
|
304
|
-
onSelect:
|
|
329
|
+
onSelect: E,
|
|
330
|
+
get ariaLabel() {
|
|
331
|
+
return f().mobileNavigationLabel;
|
|
332
|
+
},
|
|
305
333
|
get class() {
|
|
306
334
|
return r.slotClassNames?.mobileTabBar;
|
|
307
335
|
}
|
|
308
336
|
});
|
|
309
337
|
}
|
|
310
|
-
}), null),
|
|
311
|
-
var
|
|
338
|
+
}), null), N((t) => {
|
|
339
|
+
var b = S(
|
|
312
340
|
// Use dvh when supported to avoid mobile browser UI causing layout jumps.
|
|
313
341
|
"h-screen h-[100dvh] w-full flex flex-col overflow-hidden",
|
|
314
342
|
"bg-background text-foreground",
|
|
@@ -316,16 +344,20 @@ function Re(r) {
|
|
|
316
344
|
"overscroll-none",
|
|
317
345
|
r.slotClassNames?.root,
|
|
318
346
|
r.class
|
|
319
|
-
),
|
|
320
|
-
return
|
|
347
|
+
), g = `#${f().mainContentId}`, m = S("fixed left-3 top-3 z-[120] rounded-md bg-primary px-3 py-2 text-xs font-medium text-primary-foreground shadow-md", "transition-transform duration-150 motion-reduce:transition-none", "-translate-y-[200%] focus:translate-y-0"), B = S("flex-1 min-w-0 flex flex-col overflow-hidden", r.slotClassNames?.contentArea), k = S("flex-1 min-h-0 overflow-auto overscroll-contain", r.slotClassNames?.main), _ = f().mainContentId, D = f().mainLabel;
|
|
348
|
+
return b !== t.e && h(e, t.e = b), g !== t.t && L(l, "href", t.t = g), m !== t.a && h(l, t.a = m), B !== t.o && h(i, t.o = B), k !== t.i && h(v, t.i = k), _ !== t.n && L(v, "id", t.n = _), D !== t.s && L(v, "aria-label", t.s = D), t;
|
|
321
349
|
}, {
|
|
322
350
|
e: void 0,
|
|
323
351
|
t: void 0,
|
|
324
|
-
a: void 0
|
|
352
|
+
a: void 0,
|
|
353
|
+
o: void 0,
|
|
354
|
+
i: void 0,
|
|
355
|
+
n: void 0,
|
|
356
|
+
s: void 0
|
|
325
357
|
}), e;
|
|
326
358
|
})();
|
|
327
359
|
}
|
|
328
|
-
|
|
360
|
+
oe(["click"]);
|
|
329
361
|
export {
|
|
330
|
-
|
|
362
|
+
Qe as Shell
|
|
331
363
|
};
|
|
@@ -1,69 +1,71 @@
|
|
|
1
|
-
import { insert as l, effect as
|
|
1
|
+
import { insert as l, effect as o, className as c, setStyleProperty as u, setAttribute as g, memo as $, template as d, delegateEvents as y } from "solid-js/web";
|
|
2
2
|
import "solid-js";
|
|
3
3
|
import { cn as s } from "../../utils/cn.js";
|
|
4
|
-
var
|
|
5
|
-
function
|
|
4
|
+
var _ = /* @__PURE__ */ d('<aside data-floe-shell-slot=sidebar data-floe-geometry-surface=shell-sidebar><div class="flex-1 overflow-auto overscroll-contain">'), w = /* @__PURE__ */ d("<div>"), S = /* @__PURE__ */ d("<section><div class=flex-1>"), k = /* @__PURE__ */ d('<div class="flex items-center justify-between px-2.5 py-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60"><span>'), C = /* @__PURE__ */ d('<button type=button><span class="flex-1 truncate text-left">'), I = /* @__PURE__ */ d('<span class="flex-shrink-0 w-4 h-4 opacity-60">');
|
|
5
|
+
function A(e) {
|
|
6
6
|
const t = () => e.collapsed ?? !1, a = () => e.width ?? 350;
|
|
7
7
|
return (() => {
|
|
8
|
-
var i =
|
|
9
|
-
return l(n, () => e.children), l(i, () => e.resizer, null),
|
|
10
|
-
var
|
|
11
|
-
return
|
|
8
|
+
var i = _(), n = i.firstChild;
|
|
9
|
+
return l(n, () => e.children), l(i, () => e.resizer, null), o((r) => {
|
|
10
|
+
var v = s("relative h-full flex flex-col shrink-0 min-h-0", "bg-sidebar text-sidebar-foreground", "border-r border-sidebar-border", "overflow-hidden", "transition-[width] duration-150 ease-out", e.class), f = t() ? "0px" : `${a()}px`, b = t() ? "hidden" : "visible", h = t() ? "0px" : void 0, x = e.ariaLabel, m = t() ? "true" : void 0;
|
|
11
|
+
return v !== r.e && c(i, r.e = v), f !== r.t && u(i, "width", r.t = f), b !== r.a && u(i, "visibility", r.a = b), h !== r.o && u(i, "border-right-width", r.o = h), x !== r.i && g(i, "aria-label", r.i = x), m !== r.n && g(i, "aria-hidden", r.n = m), r;
|
|
12
12
|
}, {
|
|
13
13
|
e: void 0,
|
|
14
14
|
t: void 0,
|
|
15
15
|
a: void 0,
|
|
16
|
-
o: void 0
|
|
16
|
+
o: void 0,
|
|
17
|
+
i: void 0,
|
|
18
|
+
n: void 0
|
|
17
19
|
}), i;
|
|
18
20
|
})();
|
|
19
21
|
}
|
|
20
|
-
function
|
|
22
|
+
function E(e) {
|
|
21
23
|
return (() => {
|
|
22
|
-
var t =
|
|
23
|
-
return l(t, () => e.children),
|
|
24
|
+
var t = w();
|
|
25
|
+
return l(t, () => e.children), o(() => c(t, s("p-2.5 space-y-3", e.class))), t;
|
|
24
26
|
})();
|
|
25
27
|
}
|
|
26
|
-
function
|
|
28
|
+
function N(e) {
|
|
27
29
|
return (() => {
|
|
28
|
-
var t =
|
|
29
|
-
return l(t, () => e.children),
|
|
30
|
+
var t = w();
|
|
31
|
+
return l(t, () => e.children), o(() => c(t, s("space-y-0.5", e.class))), t;
|
|
30
32
|
})();
|
|
31
33
|
}
|
|
32
|
-
function
|
|
34
|
+
function P(e) {
|
|
33
35
|
return (() => {
|
|
34
|
-
var t =
|
|
36
|
+
var t = S(), a = t.firstChild;
|
|
35
37
|
return l(t, (() => {
|
|
36
|
-
var i =
|
|
38
|
+
var i = $(() => !!e.title);
|
|
37
39
|
return () => i() && (() => {
|
|
38
|
-
var n =
|
|
40
|
+
var n = k(), r = n.firstChild;
|
|
39
41
|
return l(r, () => e.title), l(n, () => e.actions, null), n;
|
|
40
42
|
})();
|
|
41
|
-
})(), a), l(a, () => e.children),
|
|
43
|
+
})(), a), l(a, () => e.children), o(() => c(t, s("flex flex-col", e.class))), t;
|
|
42
44
|
})();
|
|
43
45
|
}
|
|
44
|
-
function
|
|
46
|
+
function q(e) {
|
|
45
47
|
return (() => {
|
|
46
|
-
var t =
|
|
48
|
+
var t = C(), a = t.firstChild;
|
|
47
49
|
return t.$$click = () => e.onClick?.(), l(t, (() => {
|
|
48
|
-
var i =
|
|
50
|
+
var i = $(() => !!e.icon);
|
|
49
51
|
return () => i() && (() => {
|
|
50
|
-
var n =
|
|
52
|
+
var n = I();
|
|
51
53
|
return l(n, () => e.icon), n;
|
|
52
54
|
})();
|
|
53
|
-
})(), a), l(a, () => e.children),
|
|
55
|
+
})(), a), l(a, () => e.children), o((i) => {
|
|
54
56
|
var n = s("w-full flex items-center gap-2 px-2.5 py-1.5 text-xs cursor-pointer", "transition-colors duration-75", "hover:bg-sidebar-accent/80 hover:text-sidebar-accent-foreground", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-sidebar-ring", e.active && "bg-sidebar-accent text-sidebar-accent-foreground font-medium", e.class), r = e.indent ? `${10 + e.indent * 10}px` : void 0;
|
|
55
|
-
return n !== i.e &&
|
|
57
|
+
return n !== i.e && c(t, i.e = n), r !== i.t && u(t, "padding-left", i.t = r), i;
|
|
56
58
|
}, {
|
|
57
59
|
e: void 0,
|
|
58
60
|
t: void 0
|
|
59
61
|
}), t;
|
|
60
62
|
})();
|
|
61
63
|
}
|
|
62
|
-
|
|
64
|
+
y(["click"]);
|
|
63
65
|
export {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
A as Sidebar,
|
|
67
|
+
E as SidebarContent,
|
|
68
|
+
q as SidebarItem,
|
|
69
|
+
N as SidebarItemList,
|
|
70
|
+
P as SidebarSection
|
|
69
71
|
};
|