@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.
Files changed (33) hide show
  1. package/dist/chat.css +33 -7
  2. package/dist/components/chat/blocks/FileBlock.js +42 -27
  3. package/dist/components/chat/blocks/ToolCallBlock.js +150 -149
  4. package/dist/components/file-browser/Breadcrumb.js +73 -72
  5. package/dist/components/file-browser/DragPreview.d.ts +2 -2
  6. package/dist/components/file-browser/DragPreview.js +15 -15
  7. package/dist/components/file-browser/FileBrowser.js +13 -13
  8. package/dist/components/file-browser/index.d.ts +1 -0
  9. package/dist/components/layout/ActivityBar.d.ts +1 -0
  10. package/dist/components/layout/ActivityBar.js +51 -45
  11. package/dist/components/layout/MobileTabBar.d.ts +1 -0
  12. package/dist/components/layout/MobileTabBar.js +109 -65
  13. package/dist/components/layout/Shell.js +190 -158
  14. package/dist/components/layout/Sidebar.d.ts +1 -0
  15. package/dist/components/layout/Sidebar.js +33 -31
  16. package/dist/components/layout/SidebarPane.d.ts +1 -0
  17. package/dist/components/layout/SidebarPane.js +40 -37
  18. package/dist/components/layout/TopBar.d.ts +1 -0
  19. package/dist/components/layout/TopBar.js +23 -22
  20. package/dist/components/ui/Dropdown.d.ts +13 -0
  21. package/dist/components/ui/Dropdown.js +263 -145
  22. package/dist/components/ui/Tabs.d.ts +4 -0
  23. package/dist/components/ui/Tabs.js +207 -149
  24. package/dist/context/FloeConfigContext.d.ts +17 -0
  25. package/dist/context/FloeConfigContext.js +34 -25
  26. package/dist/context/NotificationContext.js +76 -69
  27. package/dist/file-browser.js +19 -17
  28. package/dist/full.js +302 -300
  29. package/dist/styles/tokens.d.ts +4 -4
  30. package/dist/styles/tokens.js +55 -14
  31. package/dist/styles.css +1 -1
  32. package/dist/themes/light.css +2 -2
  33. package/package.json +1 -1
@@ -1,163 +1,163 @@
1
- import { createComponent as o, Dynamic as k, insert as m, memo as p, effect as T, className as h, setStyleProperty as J, template as I, use as U, delegateEvents as X } from "solid-js/web";
2
- import { createSignal as R, createEffect as B, createMemo as g, For as N, Show as f } from "solid-js";
3
- import { useLayout as Y } from "../../context/LayoutContext.js";
4
- import { useResolvedFloeConfig as Z } from "../../context/FloeConfigContext.js";
5
- import { useMediaQuery as ee } from "../../hooks/useMediaQuery.js";
6
- import { useOverlayMask as te } from "../../hooks/useOverlayMask.js";
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 re } from "../../utils/defer.js";
9
- import { useComponentRegistry as ie } from "../../context/ComponentRegistry.js";
10
- import { Sidebar as ne } from "./Sidebar.js";
11
- import { TopBar as oe } from "./TopBar.js";
12
- import { TopBarIconButton as le } from "./TopBarIconButton.js";
13
- import { BottomBar as ae } from "./BottomBar.js";
14
- import { MobileTabBar as se } from "./MobileTabBar.js";
15
- import { ActivityBar as de } from "./ActivityBar.js";
16
- import { ResizeHandle as W } from "./ResizeHandle.js";
17
- import { resolveMobileTabActiveId as ce, resolveMobileTabSelect as ue } from "./mobileTabs.js";
18
- import { KeepAliveStack as me } from "./KeepAliveStack.js";
19
- var P = /* @__PURE__ */ I('<div class="flex items-center gap-2">'), be = /* @__PURE__ */ I("<div data-floe-shell-slot=mobile-sidebar-backdrop>"), fe = /* @__PURE__ */ I('<div data-floe-shell-slot=mobile-sidebar-drawer tabindex=-1><div class="h-full overflow-auto overscroll-contain">'), ve = /* @__PURE__ */ I("<div data-floe-shell-slot=terminal-panel style=border-top-color:var(--terminal-panel-border)>"), he = /* @__PURE__ */ I('<div data-floe-shell><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>');
20
- function Re(r) {
21
- const i = Y(), F = Z(), d = ee(F.config.layout.mobileQuery), [y, v] = R(!1), [z, A] = R(null);
22
- let M;
23
- const c = () => r.sidebarMode === "hidden", s = (() => {
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 ie();
25
+ return ue();
26
26
  } catch {
27
27
  return null;
28
28
  }
29
- })(), x = (e, a) => {
30
- const l = s?.getComponent(e)?.sidebar?.fullScreen ?? !1, n = c() ? !1 : a?.openSidebar ?? !l;
31
- i.setSidebarActiveTab(e, {
32
- openSidebar: n
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
- B(() => {
36
- c() && v(!1);
37
- }), B(() => {
38
- const e = d();
39
- i.isMobile() !== e && i.setIsMobile(e);
40
- }), B(() => {
41
- d() || v(!1);
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 C = g(() => r.activityItems ? r.activityItems : s ? s.sidebarItems().filter((e) => !!e.icon).filter((e) => !(d() && e.sidebar?.hiddenOnMobile)).map((e) => ({
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
- })) : []), H = g(() => c() ? [] : r.sidebarContent ? [] : s ? s.sidebarItems().filter((e) => !(d() && e.sidebar?.hiddenOnMobile)).filter((e) => e.sidebar?.fullScreen !== !0 && e.sidebar?.renderIn !== "main").map((e) => ({
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(k, {
51
+ render: () => o(p, {
52
52
  get component() {
53
53
  return e.component;
54
54
  }
55
55
  })
56
- })) : []), _ = (e) => {
57
- if (!c()) {
56
+ })) : []), H = (e) => {
57
+ if (!u()) {
58
58
  if (r.sidebarContent) return r.sidebarContent(e);
59
59
  if (s)
60
- return o(me, {
60
+ return o(ye, {
61
61
  get views() {
62
- return H();
62
+ return j();
63
63
  },
64
64
  activeId: e
65
65
  });
66
66
  }
67
- }, $ = g(() => c() ? !0 : s ? s.getComponent(i.sidebarActiveTab())?.sidebar?.fullScreen ?? !1 : !1), E = g(() => {
68
- if (c()) return !0;
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(i.sidebarActiveTab());
70
+ const e = s.getComponent(n.sidebarActiveTab());
71
71
  return e?.sidebar ? e.sidebar.fullScreen === !0 || e.sidebar.renderIn === "main" : !1;
72
72
  });
73
- B(() => {
74
- d() && $() && v(!1);
73
+ x(() => {
74
+ c() && R() && y(!1);
75
75
  });
76
- const D = g(() => {
76
+ const G = w(() => {
77
77
  if (r.bottomBarItems) return r.bottomBarItems;
78
78
  if (!s) return;
79
- const e = [...s.statusBarItems()].sort((n, t) => (n.order ?? 100) - (t.order ?? 100)), a = e.filter((n) => n.position === "left"), l = e.filter((n) => n.position === "right");
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 n = P();
82
- return m(n, o(N, {
83
- each: a,
84
- children: (t) => o(k, {
81
+ var i = V();
82
+ return d(i, o(W, {
83
+ each: l,
84
+ children: (v) => o(p, {
85
85
  get component() {
86
- return t.component;
86
+ return v.component;
87
87
  }
88
88
  })
89
- })), n;
89
+ })), i;
90
90
  })(), (() => {
91
- var n = P();
92
- return m(n, o(N, {
93
- each: l,
94
- children: (t) => o(k, {
91
+ var i = V();
92
+ return d(i, o(W, {
93
+ each: a,
94
+ children: (v) => o(p, {
95
95
  get component() {
96
- return t.component;
96
+ return v.component;
97
97
  }
98
98
  })
99
- })), n;
99
+ })), i;
100
100
  })()];
101
101
  });
102
- B(() => {
103
- const e = C();
102
+ x(() => {
103
+ const e = I();
104
104
  if (!e.length) return;
105
- if (!i.sidebarActiveTab()) {
106
- const l = e.find((n) => !n.onClick);
107
- if (!l) return;
108
- x(l.id);
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 O = (e) => {
112
- const a = c() ? !0 : s?.getComponent(e)?.sidebar?.fullScreen ?? !1, {
113
- nextActiveId: l,
114
- nextMobileSidebarOpen: n
115
- } = ue({
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: i.sidebarActiveTab(),
118
- mobileSidebarOpen: y(),
119
- clickedIsFullScreen: a
117
+ activeId: n.sidebarActiveTab(),
118
+ mobileSidebarOpen: M(),
119
+ clickedIsFullScreen: l
120
120
  });
121
- i.sidebarActiveTab() !== l && x(l), v(n);
122
- }, Q = (e) => {
121
+ n.sidebarActiveTab() !== a && O(a), y(i);
122
+ }, J = (e) => {
123
123
  if (e.onClick) {
124
- re(() => e.onClick());
124
+ ce(() => e.onClick());
125
125
  return;
126
126
  }
127
- O(e.id);
128
- }, K = g(() => {
127
+ E(e.id);
128
+ }, U = w(() => {
129
129
  const e = r.topBarActions;
130
- if (!d() || (r.activityBottomItemsMobileMode ?? "hidden") !== "topBar") return e;
131
- const l = r.activityBottomItems ?? [];
132
- return l.length ? [o(N, {
133
- each: l,
134
- children: (n) => o(le, {
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 n.label;
136
+ return i.label;
137
137
  },
138
- onClick: () => Q(n),
138
+ onClick: () => J(i),
139
139
  get children() {
140
- return o(k, {
140
+ return o(p, {
141
141
  get component() {
142
- return n.icon;
142
+ return i.icon;
143
143
  },
144
144
  class: "w-4 h-4"
145
145
  });
146
146
  }
147
147
  })
148
148
  }), e] : e;
149
- }), L = () => c() ? !0 : i.sidebarCollapsed(), V = () => z() ?? i.sidebarWidth(), j = () => {
150
- A(i.sidebarWidth());
151
- }, q = (e) => {
152
- A((a) => i.clampSidebarWidth((a ?? i.sidebarWidth()) + e));
153
- }, G = () => {
154
- const e = z();
155
- e !== null && (i.setSidebarWidth(e), A(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
- return te({
158
- open: () => d() && y() && !c(),
159
- root: () => M,
160
- onClose: () => v(!1),
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
- var e = he(), a = e.firstChild, l = a.firstChild, n = l.firstChild;
171
- return m(e, o(oe, {
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 K();
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), m(a, o(f, {
194
+ }), a), d(a, o(C, {
182
195
  get when() {
183
- return !d();
196
+ return !c();
184
197
  },
185
198
  get children() {
186
- return [o(f, {
199
+ return [o(C, {
187
200
  get when() {
188
- return C().length > 0;
201
+ return I().length > 0;
189
202
  },
190
203
  get children() {
191
- return o(de, {
204
+ return o(he, {
192
205
  get items() {
193
- return C();
206
+ return I();
194
207
  },
195
208
  get bottomItems() {
196
209
  return r.activityBottomItems;
197
210
  },
198
211
  get activeId() {
199
- return i.sidebarActiveTab();
212
+ return n.sidebarActiveTab();
200
213
  },
201
- onActiveChange: x,
214
+ onActiveChange: O,
202
215
  get collapsed() {
203
- return L();
216
+ return X();
204
217
  },
205
218
  get onCollapsedChange() {
206
- return p(() => !!c())() ? void 0 : i.setSidebarCollapsed;
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(f, {
229
+ }), o(C, {
214
230
  get when() {
215
- return !c();
231
+ return !u();
216
232
  },
217
233
  get children() {
218
- return o(ne, {
234
+ return o(be, {
219
235
  get width() {
220
- return V();
236
+ return Y();
221
237
  },
222
238
  get collapsed() {
223
- return i.sidebarCollapsed() || $();
239
+ return n.sidebarCollapsed() || R();
240
+ },
241
+ get ariaLabel() {
242
+ return f().sidebarLabel;
224
243
  },
225
244
  get resizer() {
226
- return o(W, {
245
+ return o(K, {
227
246
  direction: "horizontal",
228
- onResize: q,
229
- onResizeStart: j,
230
- onResizeEnd: G
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 _(i.sidebarActiveTab());
256
+ return H(n.sidebarActiveTab());
238
257
  }
239
258
  });
240
259
  }
241
260
  })];
242
261
  }
243
- }), l), m(a, o(f, {
262
+ }), i), d(a, o(C, {
244
263
  get when() {
245
- return p(() => !!(d() && y()))() && !c();
264
+ return A(() => !!(c() && M()))() && !u();
246
265
  },
247
266
  get children() {
248
267
  return [(() => {
249
- var t = be();
250
- return t.$$click = () => v(!1), T(() => h(t, S("absolute inset-0 z-40 bg-black/30 cursor-pointer", r.slotClassNames?.mobileSidebarBackdrop))), t;
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 = fe(), u = t.firstChild, b = M;
253
- return typeof b == "function" ? U(b, t) : M = t, m(u, () => _(i.sidebarActiveTab())), T(() => h(t, 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))), t;
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
- }), l), m(n, () => r.children), m(l, o(f, {
281
+ }), i), d(v, () => r.children), d(i, o(C, {
257
282
  get when() {
258
- return p(() => !!(!d() && i.terminalOpened()))() && r.terminalPanel;
283
+ return A(() => !!(!c() && n.terminalOpened()))() && r.terminalPanel;
259
284
  },
260
285
  get children() {
261
- var t = ve();
262
- return m(t, o(W, {
286
+ var t = Be();
287
+ return d(t, o(K, {
263
288
  direction: "vertical",
264
- onResize: (u) => i.setTerminalHeight(i.terminalHeight() - u)
265
- }), null), m(t, () => r.terminalPanel, null), T((u) => {
266
- var b = S("relative shrink-0 border-t border-border bg-terminal-background overflow-hidden", r.slotClassNames?.terminalPanel), w = `${i.terminalHeight()}px`;
267
- return b !== u.e && h(t, u.e = b), w !== u.t && J(t, "height", u.t = w), u;
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), m(e, o(f, {
298
+ }), null), d(e, o(C, {
274
299
  get when() {
275
- return !d();
300
+ return !c();
276
301
  },
277
302
  get children() {
278
- return o(ae, {
303
+ return o(ve, {
279
304
  get class() {
280
305
  return r.slotClassNames?.bottomBar;
281
306
  },
282
307
  get children() {
283
- return D();
308
+ return G();
284
309
  }
285
310
  });
286
311
  }
287
- }), null), m(e, o(f, {
312
+ }), null), d(e, o(C, {
288
313
  get when() {
289
- return p(() => !!d())() && C().length > 0;
314
+ return A(() => !!c())() && I().length > 0;
290
315
  },
291
316
  get children() {
292
- return o(se, {
317
+ return o(ge, {
293
318
  get items() {
294
- return C();
319
+ return I();
295
320
  },
296
321
  get activeId() {
297
- return ce({
298
- activeId: i.sidebarActiveTab(),
299
- mobileSidebarOpen: y(),
300
- activeIsFullScreen: $(),
301
- activeIsPage: E()
322
+ return Ce({
323
+ activeId: n.sidebarActiveTab(),
324
+ mobileSidebarOpen: M(),
325
+ activeIsFullScreen: R(),
326
+ activeIsPage: q()
302
327
  });
303
328
  },
304
- onSelect: O,
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), T((t) => {
311
- var u = S(
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
- ), b = S("flex-1 min-w-0 flex flex-col overflow-hidden", r.slotClassNames?.contentArea), w = S("flex-1 min-h-0 overflow-auto overscroll-contain", r.slotClassNames?.main);
320
- return u !== t.e && h(e, t.e = u), b !== t.t && h(l, t.t = b), w !== t.a && h(n, t.a = w), t;
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
- X(["click"]);
360
+ oe(["click"]);
329
361
  export {
330
- Re as Shell
362
+ Qe as Shell
331
363
  };
@@ -4,6 +4,7 @@ export interface SidebarProps {
4
4
  resizer?: JSX.Element;
5
5
  width?: number;
6
6
  collapsed?: boolean;
7
+ ariaLabel?: string;
7
8
  class?: string;
8
9
  }
9
10
  /**
@@ -1,69 +1,71 @@
1
- import { insert as l, effect as c, className as o, setStyleProperty as u, memo as x, template as d, delegateEvents as g } from "solid-js/web";
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 $ = /* @__PURE__ */ d('<aside data-floe-shell-slot=sidebar data-floe-geometry-surface=shell-sidebar><div class="flex-1 overflow-auto overscroll-contain">'), m = /* @__PURE__ */ d("<div>"), _ = /* @__PURE__ */ d("<section><div class=flex-1>"), w = /* @__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>'), y = /* @__PURE__ */ d('<button type=button><span class="flex-1 truncate text-left">'), S = /* @__PURE__ */ d('<span class="flex-shrink-0 w-4 h-4 opacity-60">');
5
- function j(e) {
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 = $(), n = i.firstChild;
9
- return l(n, () => e.children), l(i, () => e.resizer, null), c((r) => {
10
- var f = 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), v = t() ? "0px" : `${a()}px`, b = t() ? "hidden" : "visible", h = t() ? "0px" : void 0;
11
- return f !== r.e && o(i, r.e = f), v !== r.t && u(i, "width", r.t = v), b !== r.a && u(i, "visibility", r.a = b), h !== r.o && u(i, "border-right-width", r.o = h), r;
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 z(e) {
22
+ function E(e) {
21
23
  return (() => {
22
- var t = m();
23
- return l(t, () => e.children), c(() => o(t, s("p-2.5 space-y-3", e.class))), t;
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 E(e) {
28
+ function N(e) {
27
29
  return (() => {
28
- var t = m();
29
- return l(t, () => e.children), c(() => o(t, s("space-y-0.5", e.class))), t;
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 L(e) {
34
+ function P(e) {
33
35
  return (() => {
34
- var t = _(), a = t.firstChild;
36
+ var t = S(), a = t.firstChild;
35
37
  return l(t, (() => {
36
- var i = x(() => !!e.title);
38
+ var i = $(() => !!e.title);
37
39
  return () => i() && (() => {
38
- var n = w(), r = n.firstChild;
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), c(() => o(t, s("flex flex-col", e.class))), t;
43
+ })(), a), l(a, () => e.children), o(() => c(t, s("flex flex-col", e.class))), t;
42
44
  })();
43
45
  }
44
- function N(e) {
46
+ function q(e) {
45
47
  return (() => {
46
- var t = y(), a = t.firstChild;
48
+ var t = C(), a = t.firstChild;
47
49
  return t.$$click = () => e.onClick?.(), l(t, (() => {
48
- var i = x(() => !!e.icon);
50
+ var i = $(() => !!e.icon);
49
51
  return () => i() && (() => {
50
- var n = S();
52
+ var n = I();
51
53
  return l(n, () => e.icon), n;
52
54
  })();
53
- })(), a), l(a, () => e.children), c((i) => {
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 && o(t, i.e = n), r !== i.t && u(t, "padding-left", i.t = r), i;
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
- g(["click"]);
64
+ y(["click"]);
63
65
  export {
64
- j as Sidebar,
65
- z as SidebarContent,
66
- N as SidebarItem,
67
- E as SidebarItemList,
68
- L as SidebarSection
66
+ A as Sidebar,
67
+ E as SidebarContent,
68
+ q as SidebarItem,
69
+ N as SidebarItemList,
70
+ P as SidebarSection
69
71
  };
@@ -12,6 +12,7 @@ export interface SidebarPaneProps {
12
12
  onClose?: () => void;
13
13
  mobileOverlay?: boolean;
14
14
  mobileBackdrop?: boolean;
15
+ ariaLabel?: string;
15
16
  class?: string;
16
17
  innerClass?: string;
17
18
  bodyClass?: string;