@floegence/floe-webapp-core 0.34.0 → 0.35.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.
@@ -1,278 +1,307 @@
1
- import { createComponent as r, Dynamic as S, insert as c, memo as C, effect as T, className as M, setStyleProperty as E, template as h, delegateEvents as N } from "solid-js/web";
2
- import { createSignal as Q, createEffect as v, createMemo as f, For as $, Show as m } from "solid-js";
3
- import { useLayout as D } from "../../context/LayoutContext.js";
4
- import { useResolvedFloeConfig as K } from "../../context/FloeConfigContext.js";
5
- import { useMediaQuery as L } from "../../hooks/useMediaQuery.js";
6
- import { cn as x } from "../../utils/cn.js";
7
- import { deferNonBlocking as V } from "../../utils/defer.js";
8
- import { useComponentRegistry as j } from "../../context/ComponentRegistry.js";
9
- import { Sidebar as q } from "./Sidebar.js";
10
- import { TopBar as G } from "./TopBar.js";
11
- import { TopBarIconButton as J } from "./TopBarIconButton.js";
12
- import { BottomBar as U } from "./BottomBar.js";
13
- import { MobileTabBar as X } from "./MobileTabBar.js";
14
- import { ActivityBar as Y } from "./ActivityBar.js";
1
+ import { createComponent as n, Dynamic as y, insert as c, memo as T, effect as A, className as f, setStyleProperty as E, template as B, delegateEvents as Q } from "solid-js/web";
2
+ import { createSignal as K, createEffect as w, createMemo as v, For as p, Show as u } from "solid-js";
3
+ import { useLayout as L } from "../../context/LayoutContext.js";
4
+ import { useResolvedFloeConfig as V } from "../../context/FloeConfigContext.js";
5
+ import { useMediaQuery as j } from "../../hooks/useMediaQuery.js";
6
+ import { cn as g } from "../../utils/cn.js";
7
+ import { deferNonBlocking as q } from "../../utils/defer.js";
8
+ import { useComponentRegistry as G } from "../../context/ComponentRegistry.js";
9
+ import { Sidebar as J } from "./Sidebar.js";
10
+ import { TopBar as U } from "./TopBar.js";
11
+ import { TopBarIconButton as X } from "./TopBarIconButton.js";
12
+ import { BottomBar as Y } from "./BottomBar.js";
13
+ import { MobileTabBar as Z } from "./MobileTabBar.js";
14
+ import { ActivityBar as ee } from "./ActivityBar.js";
15
15
  import { ResizeHandle as _ } from "./ResizeHandle.js";
16
- import { resolveMobileTabActiveId as Z, resolveMobileTabSelect as ee } from "./mobileTabs.js";
17
- import { KeepAliveStack as te } from "./KeepAliveStack.js";
18
- var k = /* @__PURE__ */ h('<div class="flex items-center gap-2">'), re = /* @__PURE__ */ h('<div class="absolute inset-0 z-40 bg-black/30 cursor-pointer">'), ie = /* @__PURE__ */ h('<div><div class="h-full overflow-auto overscroll-contain">'), ne = /* @__PURE__ */ h('<div class="relative shrink-0 border-t border-border bg-terminal-background overflow-hidden">'), oe = /* @__PURE__ */ h('<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 Be(o) {
20
- const i = D(), O = K(), d = L(O.config.layout.mobileQuery), [I, b] = Q(!1), u = () => o.sidebarMode === "hidden", a = (() => {
16
+ import { resolveMobileTabActiveId as te, resolveMobileTabSelect as re } from "./mobileTabs.js";
17
+ import { KeepAliveStack as ie } from "./KeepAliveStack.js";
18
+ var O = /* @__PURE__ */ B('<div class="flex items-center gap-2">'), ne = /* @__PURE__ */ B("<div data-floe-shell-slot=mobile-sidebar-backdrop>"), le = /* @__PURE__ */ B('<div data-floe-shell-slot=mobile-sidebar-drawer><div class="h-full overflow-auto overscroll-contain">'), oe = /* @__PURE__ */ B("<div data-floe-shell-slot=terminal-panel style=border-top-color:var(--terminal-panel-border)>"), ae = /* @__PURE__ */ B('<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>');
19
+ function Ae(r) {
20
+ const l = L(), z = V(), m = j(z.config.layout.mobileQuery), [k, h] = K(!1), b = () => r.sidebarMode === "hidden", a = (() => {
21
21
  try {
22
- return j();
22
+ return G();
23
23
  } catch {
24
24
  return null;
25
25
  }
26
- })(), w = (e, s) => {
27
- const l = a?.getComponent(e)?.sidebar?.fullScreen ?? !1, t = u() ? !1 : s?.openSidebar ?? !l;
28
- i.setSidebarActiveTab(e, {
29
- openSidebar: t
26
+ })(), M = (e, s) => {
27
+ const o = a?.getComponent(e)?.sidebar?.fullScreen ?? !1, i = b() ? !1 : s?.openSidebar ?? !o;
28
+ l.setSidebarActiveTab(e, {
29
+ openSidebar: i
30
30
  });
31
31
  };
32
- v(() => {
33
- u() && b(!1);
34
- }), v(() => {
35
- const e = d();
36
- i.isMobile() !== e && i.setIsMobile(e);
37
- }), v(() => {
38
- d() || b(!1);
32
+ w(() => {
33
+ b() && h(!1);
34
+ }), w(() => {
35
+ const e = m();
36
+ l.isMobile() !== e && l.setIsMobile(e);
37
+ }), w(() => {
38
+ m() || h(!1);
39
39
  });
40
- const g = f(() => o.activityItems ? o.activityItems : a ? a.sidebarItems().filter((e) => !!e.icon).filter((e) => !(d() && e.sidebar?.hiddenOnMobile)).map((e) => ({
40
+ const C = v(() => r.activityItems ? r.activityItems : a ? a.sidebarItems().filter((e) => !!e.icon).filter((e) => !(m() && e.sidebar?.hiddenOnMobile)).map((e) => ({
41
41
  id: e.id,
42
42
  icon: e.icon,
43
43
  label: e.name,
44
44
  badge: e.sidebar?.badge,
45
45
  collapseBehavior: e.sidebar?.collapseBehavior ?? (e.sidebar?.fullScreen ? "preserve" : "toggle")
46
- })) : []), z = f(() => u() ? [] : o.sidebarContent ? [] : a ? a.sidebarItems().filter((e) => !(d() && e.sidebar?.hiddenOnMobile)).filter((e) => e.sidebar?.fullScreen !== !0 && e.sidebar?.renderIn !== "main").map((e) => ({
46
+ })) : []), P = v(() => b() ? [] : r.sidebarContent ? [] : a ? a.sidebarItems().filter((e) => !(m() && e.sidebar?.hiddenOnMobile)).filter((e) => e.sidebar?.fullScreen !== !0 && e.sidebar?.renderIn !== "main").map((e) => ({
47
47
  id: e.id,
48
- render: () => r(S, {
48
+ render: () => n(y, {
49
49
  get component() {
50
50
  return e.component;
51
51
  }
52
52
  })
53
- })) : []), y = (e) => {
54
- if (!u()) {
55
- if (o.sidebarContent) return o.sidebarContent(e);
53
+ })) : []), N = (e) => {
54
+ if (!b()) {
55
+ if (r.sidebarContent) return r.sidebarContent(e);
56
56
  if (a)
57
- return r(te, {
57
+ return n(ie, {
58
58
  get views() {
59
- return z();
59
+ return P();
60
60
  },
61
61
  activeId: e
62
62
  });
63
63
  }
64
- }, B = f(() => u() ? !0 : a ? a.getComponent(i.sidebarActiveTab())?.sidebar?.fullScreen ?? !1 : !1), F = f(() => {
65
- if (u()) return !0;
64
+ }, x = v(() => b() ? !0 : a ? a.getComponent(l.sidebarActiveTab())?.sidebar?.fullScreen ?? !1 : !1), F = v(() => {
65
+ if (b()) return !0;
66
66
  if (!a) return !1;
67
- const e = a.getComponent(i.sidebarActiveTab());
67
+ const e = a.getComponent(l.sidebarActiveTab());
68
68
  return e?.sidebar ? e.sidebar.fullScreen === !0 || e.sidebar.renderIn === "main" : !1;
69
69
  });
70
- v(() => {
71
- d() && B() && b(!1);
70
+ w(() => {
71
+ m() && x() && h(!1);
72
72
  });
73
- const H = f(() => {
74
- if (o.bottomBarItems) return o.bottomBarItems;
73
+ const H = v(() => {
74
+ if (r.bottomBarItems) return r.bottomBarItems;
75
75
  if (!a) return;
76
- const e = [...a.statusBarItems()].sort((t, n) => (t.order ?? 100) - (n.order ?? 100)), s = e.filter((t) => t.position === "left"), l = e.filter((t) => t.position === "right");
76
+ const e = [...a.statusBarItems()].sort((i, t) => (i.order ?? 100) - (t.order ?? 100)), s = e.filter((i) => i.position === "left"), o = e.filter((i) => i.position === "right");
77
77
  return [(() => {
78
- var t = k();
79
- return c(t, r($, {
78
+ var i = O();
79
+ return c(i, n(p, {
80
80
  each: s,
81
- children: (n) => r(S, {
81
+ children: (t) => n(y, {
82
82
  get component() {
83
- return n.component;
83
+ return t.component;
84
84
  }
85
85
  })
86
- })), t;
86
+ })), i;
87
87
  })(), (() => {
88
- var t = k();
89
- return c(t, r($, {
90
- each: l,
91
- children: (n) => r(S, {
88
+ var i = O();
89
+ return c(i, n(p, {
90
+ each: o,
91
+ children: (t) => n(y, {
92
92
  get component() {
93
- return n.component;
93
+ return t.component;
94
94
  }
95
95
  })
96
- })), t;
96
+ })), i;
97
97
  })()];
98
98
  });
99
- v(() => {
100
- const e = g();
99
+ w(() => {
100
+ const e = C();
101
101
  if (!e.length) return;
102
- if (!i.sidebarActiveTab()) {
103
- const l = e.find((t) => !t.onClick);
104
- if (!l) return;
105
- w(l.id);
102
+ if (!l.sidebarActiveTab()) {
103
+ const o = e.find((i) => !i.onClick);
104
+ if (!o) return;
105
+ M(o.id);
106
106
  }
107
107
  });
108
- const A = (e) => {
109
- const s = u() ? !0 : a?.getComponent(e)?.sidebar?.fullScreen ?? !1, {
110
- nextActiveId: l,
111
- nextMobileSidebarOpen: t
112
- } = ee({
108
+ const $ = (e) => {
109
+ const s = b() ? !0 : a?.getComponent(e)?.sidebar?.fullScreen ?? !1, {
110
+ nextActiveId: o,
111
+ nextMobileSidebarOpen: i
112
+ } = re({
113
113
  clickedId: e,
114
- activeId: i.sidebarActiveTab(),
115
- mobileSidebarOpen: I(),
114
+ activeId: l.sidebarActiveTab(),
115
+ mobileSidebarOpen: k(),
116
116
  clickedIsFullScreen: s
117
117
  });
118
- i.sidebarActiveTab() !== l && w(l), b(t);
119
- }, P = (e) => {
118
+ l.sidebarActiveTab() !== o && M(o), h(i);
119
+ }, R = (e) => {
120
120
  if (e.onClick) {
121
- V(() => e.onClick());
121
+ q(() => e.onClick());
122
122
  return;
123
123
  }
124
- A(e.id);
125
- }, R = f(() => {
126
- const e = o.topBarActions;
127
- if (!d() || (o.activityBottomItemsMobileMode ?? "hidden") !== "topBar") return e;
128
- const l = o.activityBottomItems ?? [];
129
- return l.length ? [r($, {
130
- each: l,
131
- children: (t) => r(J, {
124
+ $(e.id);
125
+ }, W = v(() => {
126
+ const e = r.topBarActions;
127
+ if (!m() || (r.activityBottomItemsMobileMode ?? "hidden") !== "topBar") return e;
128
+ const o = r.activityBottomItems ?? [];
129
+ return o.length ? [n(p, {
130
+ each: o,
131
+ children: (i) => n(X, {
132
132
  get label() {
133
- return t.label;
133
+ return i.label;
134
134
  },
135
- onClick: () => P(t),
135
+ onClick: () => R(i),
136
136
  get children() {
137
- return r(S, {
137
+ return n(y, {
138
138
  get component() {
139
- return t.icon;
139
+ return i.icon;
140
140
  },
141
141
  class: "w-4 h-4"
142
142
  });
143
143
  }
144
144
  })
145
145
  }), e] : e;
146
- }), W = () => u() ? !0 : i.sidebarCollapsed();
146
+ }), D = () => b() ? !0 : l.sidebarCollapsed();
147
147
  return (() => {
148
- var e = oe(), s = e.firstChild, l = s.firstChild, t = l.firstChild;
149
- return c(e, r(G, {
148
+ var e = ae(), s = e.firstChild, o = s.firstChild, i = o.firstChild;
149
+ return c(e, n(U, {
150
150
  get logo() {
151
- return o.logo;
151
+ return r.logo;
152
152
  },
153
153
  get actions() {
154
- return R();
154
+ return W();
155
+ },
156
+ get class() {
157
+ return r.slotClassNames?.topBar;
155
158
  }
156
- }), s), c(s, r(m, {
159
+ }), s), c(s, n(u, {
157
160
  get when() {
158
- return !d();
161
+ return !m();
159
162
  },
160
163
  get children() {
161
- return [r(m, {
164
+ return [n(u, {
162
165
  get when() {
163
- return g().length > 0;
166
+ return C().length > 0;
164
167
  },
165
168
  get children() {
166
- return r(Y, {
169
+ return n(ee, {
167
170
  get items() {
168
- return g();
171
+ return C();
169
172
  },
170
173
  get bottomItems() {
171
- return o.activityBottomItems;
174
+ return r.activityBottomItems;
172
175
  },
173
176
  get activeId() {
174
- return i.sidebarActiveTab();
177
+ return l.sidebarActiveTab();
175
178
  },
176
- onActiveChange: w,
179
+ onActiveChange: M,
177
180
  get collapsed() {
178
- return W();
181
+ return D();
179
182
  },
180
183
  get onCollapsedChange() {
181
- return C(() => !!u())() ? void 0 : i.setSidebarCollapsed;
184
+ return T(() => !!b())() ? void 0 : l.setSidebarCollapsed;
185
+ },
186
+ get class() {
187
+ return r.slotClassNames?.activityBar;
182
188
  }
183
189
  });
184
190
  }
185
- }), r(m, {
191
+ }), n(u, {
186
192
  get when() {
187
- return !u();
193
+ return !b();
188
194
  },
189
195
  get children() {
190
- return r(q, {
196
+ return n(J, {
191
197
  get width() {
192
- return i.sidebarWidth();
198
+ return l.sidebarWidth();
193
199
  },
194
200
  get collapsed() {
195
- return i.sidebarCollapsed() || B();
201
+ return l.sidebarCollapsed() || x();
196
202
  },
197
203
  get resizer() {
198
- return r(_, {
204
+ return n(_, {
199
205
  direction: "horizontal",
200
- onResize: (n) => i.setSidebarWidth(i.sidebarWidth() + n)
206
+ onResize: (t) => l.setSidebarWidth(l.sidebarWidth() + t)
201
207
  });
202
208
  },
209
+ get class() {
210
+ return r.slotClassNames?.sidebar;
211
+ },
203
212
  get children() {
204
- return y(i.sidebarActiveTab());
213
+ return N(l.sidebarActiveTab());
205
214
  }
206
215
  });
207
216
  }
208
217
  })];
209
218
  }
210
- }), l), c(s, r(m, {
219
+ }), o), c(s, n(u, {
211
220
  get when() {
212
- return C(() => !!(d() && I()))() && !u();
221
+ return T(() => !!(m() && k()))() && !b();
213
222
  },
214
223
  get children() {
215
224
  return [(() => {
216
- var n = re();
217
- return n.$$click = () => b(!1), n;
225
+ var t = ne();
226
+ return t.$$click = () => h(!1), A(() => f(t, g("absolute inset-0 z-40 bg-black/30 cursor-pointer", r.slotClassNames?.mobileSidebarBackdrop))), t;
218
227
  })(), (() => {
219
- var n = ie(), p = n.firstChild;
220
- return c(p, () => y(i.sidebarActiveTab())), T(() => 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;
228
+ var t = le(), d = t.firstChild;
229
+ return c(d, () => N(l.sidebarActiveTab())), A(() => f(t, g("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;
221
230
  })()];
222
231
  }
223
- }), l), c(t, () => o.children), c(l, r(m, {
232
+ }), o), c(i, () => r.children), c(o, n(u, {
224
233
  get when() {
225
- return C(() => !!(!d() && i.terminalOpened()))() && o.terminalPanel;
234
+ return T(() => !!(!m() && l.terminalOpened()))() && r.terminalPanel;
226
235
  },
227
236
  get children() {
228
- var n = ne();
229
- return c(n, r(_, {
237
+ var t = oe();
238
+ return c(t, n(_, {
230
239
  direction: "vertical",
231
- onResize: (p) => i.setTerminalHeight(i.terminalHeight() - p)
232
- }), null), c(n, () => o.terminalPanel, null), T((p) => E(n, "height", `${i.terminalHeight()}px`)), n;
240
+ onResize: (d) => l.setTerminalHeight(l.terminalHeight() - d)
241
+ }), null), c(t, () => r.terminalPanel, null), A((d) => {
242
+ var S = g("relative shrink-0 border-t border-border bg-terminal-background overflow-hidden", r.slotClassNames?.terminalPanel), I = `${l.terminalHeight()}px`;
243
+ return S !== d.e && f(t, d.e = S), I !== d.t && E(t, "height", d.t = I), d;
244
+ }, {
245
+ e: void 0,
246
+ t: void 0
247
+ }), t;
233
248
  }
234
- }), null), c(e, r(m, {
249
+ }), null), c(e, n(u, {
235
250
  get when() {
236
- return !d();
251
+ return !m();
237
252
  },
238
253
  get children() {
239
- return r(U, {
254
+ return n(Y, {
255
+ get class() {
256
+ return r.slotClassNames?.bottomBar;
257
+ },
240
258
  get children() {
241
259
  return H();
242
260
  }
243
261
  });
244
262
  }
245
- }), null), c(e, r(m, {
263
+ }), null), c(e, n(u, {
246
264
  get when() {
247
- return C(() => !!d())() && g().length > 0;
265
+ return T(() => !!m())() && C().length > 0;
248
266
  },
249
267
  get children() {
250
- return r(X, {
268
+ return n(Z, {
251
269
  get items() {
252
- return g();
270
+ return C();
253
271
  },
254
272
  get activeId() {
255
- return Z({
256
- activeId: i.sidebarActiveTab(),
257
- mobileSidebarOpen: I(),
258
- activeIsFullScreen: B(),
273
+ return te({
274
+ activeId: l.sidebarActiveTab(),
275
+ mobileSidebarOpen: k(),
276
+ activeIsFullScreen: x(),
259
277
  activeIsPage: F()
260
278
  });
261
279
  },
262
- onSelect: A
280
+ onSelect: $,
281
+ get class() {
282
+ return r.slotClassNames?.mobileTabBar;
283
+ }
263
284
  });
264
285
  }
265
- }), null), T(() => M(e, x(
266
- // Use dvh when supported to avoid mobile browser UI causing layout jumps.
267
- "h-screen h-[100dvh] w-full flex flex-col overflow-hidden",
268
- "bg-background text-foreground",
269
- // Prevent overscroll on the shell container
270
- "overscroll-none",
271
- o.class
272
- ))), e;
286
+ }), null), A((t) => {
287
+ var d = g(
288
+ // Use dvh when supported to avoid mobile browser UI causing layout jumps.
289
+ "h-screen h-[100dvh] w-full flex flex-col overflow-hidden",
290
+ "bg-background text-foreground",
291
+ // Prevent overscroll on the shell container
292
+ "overscroll-none",
293
+ r.slotClassNames?.root,
294
+ r.class
295
+ ), S = g("flex-1 min-w-0 flex flex-col overflow-hidden", r.slotClassNames?.contentArea), I = g("flex-1 min-h-0 overflow-auto overscroll-contain", r.slotClassNames?.main);
296
+ return d !== t.e && f(e, t.e = d), S !== t.t && f(o, t.t = S), I !== t.a && f(i, t.a = I), t;
297
+ }, {
298
+ e: void 0,
299
+ t: void 0,
300
+ a: void 0
301
+ }), e;
273
302
  })();
274
303
  }
275
- N(["click"]);
304
+ Q(["click"]);
276
305
  export {
277
- Be as Shell
306
+ Ae as Shell
278
307
  };
@@ -1,12 +1,12 @@
1
- import { insert as l, effect as d, className as o, setStyleProperty as u, memo as h, template as c, delegateEvents as $ } from "solid-js/web";
1
+ import { insert as l, effect as c, className as o, setStyleProperty as u, memo as h, template as d, delegateEvents as $ } from "solid-js/web";
2
2
  import "solid-js";
3
3
  import { cn as s } from "../../utils/cn.js";
4
- var g = /* @__PURE__ */ c('<aside><div class="flex-1 overflow-auto overscroll-contain">'), m = /* @__PURE__ */ c("<div>"), _ = /* @__PURE__ */ c("<section><div class=flex-1>"), w = /* @__PURE__ */ c('<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__ */ c('<button type=button><span class="flex-1 truncate text-left">'), S = /* @__PURE__ */ c('<span class="flex-shrink-0 w-4 h-4 opacity-60">');
4
+ var g = /* @__PURE__ */ d('<aside data-floe-shell-slot=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
5
  function j(e) {
6
6
  const t = () => e.collapsed ?? !1, a = () => e.width ?? 350;
7
7
  return (() => {
8
8
  var i = g(), n = i.firstChild;
9
- return l(n, () => e.children), l(i, () => e.resizer, null), d((r) => {
9
+ return l(n, () => e.children), l(i, () => e.resizer, null), c((r) => {
10
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", x = t() ? "0px" : void 0;
11
11
  return v !== r.e && o(i, r.e = v), f !== r.t && u(i, "width", r.t = f), b !== r.a && u(i, "visibility", r.a = b), x !== r.o && u(i, "border-right-width", r.o = x), r;
12
12
  }, {
@@ -20,13 +20,13 @@ function j(e) {
20
20
  function z(e) {
21
21
  return (() => {
22
22
  var t = m();
23
- return l(t, () => e.children), d(() => o(t, s("p-2.5 space-y-3", e.class))), t;
23
+ return l(t, () => e.children), c(() => o(t, s("p-2.5 space-y-3", e.class))), t;
24
24
  })();
25
25
  }
26
26
  function E(e) {
27
27
  return (() => {
28
28
  var t = m();
29
- return l(t, () => e.children), d(() => o(t, s("space-y-0.5", e.class))), t;
29
+ return l(t, () => e.children), c(() => o(t, s("space-y-0.5", e.class))), t;
30
30
  })();
31
31
  }
32
32
  function L(e) {
@@ -38,7 +38,7 @@ function L(e) {
38
38
  var n = w(), r = n.firstChild;
39
39
  return l(r, () => e.title), l(n, () => e.actions, null), n;
40
40
  })();
41
- })(), a), l(a, () => e.children), d(() => o(t, s("flex flex-col", e.class))), t;
41
+ })(), a), l(a, () => e.children), c(() => o(t, s("flex flex-col", e.class))), t;
42
42
  })();
43
43
  }
44
44
  function N(e) {
@@ -50,7 +50,7 @@ function N(e) {
50
50
  var n = S();
51
51
  return l(n, () => e.icon), n;
52
52
  })();
53
- })(), a), l(a, () => e.children), d((i) => {
53
+ })(), a), l(a, () => e.children), c((i) => {
54
54
  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
55
  return n !== i.e && o(t, i.e = n), r !== i.t && u(t, "padding-left", i.t = r), i;
56
56
  }, {
@@ -1,40 +1,40 @@
1
- import { insert as t, createComponent as a, effect as $, className as g, template as i, delegateEvents as k } from "solid-js/web";
1
+ import { insert as t, createComponent as d, effect as $, className as g, template as l, delegateEvents as k } from "solid-js/web";
2
2
  import { Show as h } from "solid-js";
3
- import { cn as x } from "../../utils/cn.js";
3
+ import { cn as p } from "../../utils/cn.js";
4
4
  import { useCommand as y } from "../../context/CommandContext.js";
5
5
  import { Search as _ } from "../icons/index.js";
6
6
  import { useResolvedFloeConfig as w } from "../../context/FloeConfigContext.js";
7
- var C = /* @__PURE__ */ i('<span class="font-medium text-xs hidden sm:inline">'), S = /* @__PURE__ */ i('<kbd class="hidden md:inline text-[10px] px-1 py-0.5 rounded bg-background/80 border border-border/50 font-mono shrink-0">'), B = /* @__PURE__ */ i('<header><div class="h-10 flex items-center gap-3 px-3"><div class="flex items-center gap-2 flex-shrink-0"></div><button type=button><span class="flex-1 text-left hidden sm:inline truncate"></span></button><div class="flex items-center gap-1">'), E = /* @__PURE__ */ i('<div class="w-6 h-6 rounded bg-primary flex items-center justify-center text-primary-foreground text-xs font-bold">F');
8
- function R(n) {
9
- const c = y(), l = w(), o = () => l.config.commands.palette.enabled;
7
+ var C = /* @__PURE__ */ l('<span class="font-medium text-xs hidden sm:inline">'), S = /* @__PURE__ */ l('<kbd class="hidden md:inline text-[10px] px-1 py-0.5 rounded bg-background/80 border border-border/50 font-mono shrink-0">'), B = /* @__PURE__ */ l('<header data-floe-shell-slot=top-bar style=border-bottom-color:var(--top-bar-border)><div class="h-10 flex items-center gap-3 px-3"><div class="flex items-center gap-2 flex-shrink-0"></div><button type=button><span class="flex-1 text-left hidden sm:inline truncate"></span></button><div class="flex items-center gap-1">'), E = /* @__PURE__ */ l('<div class="w-6 h-6 rounded bg-primary flex items-center justify-center text-primary-foreground text-xs font-bold">F');
8
+ function R(o) {
9
+ const c = y(), i = w(), n = () => i.config.commands.palette.enabled;
10
10
  return (() => {
11
- var s = B(), p = s.firstChild, d = p.firstChild, r = d.nextSibling, m = r.firstChild, v = r.nextSibling;
12
- return t(d, () => n.logo || E(), null), t(d, a(h, {
11
+ var s = B(), x = s.firstChild, a = x.firstChild, r = a.nextSibling, m = r.firstChild, v = r.nextSibling;
12
+ return t(a, () => o.logo || E(), null), t(a, d(h, {
13
13
  get when() {
14
- return n.title;
14
+ return o.title;
15
15
  },
16
16
  get children() {
17
17
  var e = C();
18
- return t(e, () => n.title), e;
18
+ return t(e, () => o.title), e;
19
19
  }
20
- }), null), r.$$click = () => o() && c.open(), t(r, a(_, {
20
+ }), null), r.$$click = () => n() && c.open(), t(r, d(_, {
21
21
  class: "w-3.5 h-3.5 shrink-0"
22
- }), m), t(m, () => l.config.strings.topBar.searchPlaceholder), t(r, a(h, {
22
+ }), m), t(m, () => i.config.strings.topBar.searchPlaceholder), t(r, d(h, {
23
23
  get when() {
24
- return o();
24
+ return n();
25
25
  },
26
26
  get children() {
27
27
  var e = S();
28
- return t(e, () => c.getKeybindDisplay(l.config.commands.palette.keybind)), e;
28
+ return t(e, () => c.getKeybindDisplay(i.config.commands.palette.keybind)), e;
29
29
  }
30
- }), null), t(v, () => n.actions), $((e) => {
31
- var f = x(
30
+ }), null), t(v, () => o.actions), $((e) => {
31
+ var f = p(
32
32
  // Safe-area padding must not be applied on a fixed-height element (border-box),
33
33
  // otherwise the content gets squeezed on iOS notch devices.
34
34
  "shrink-0 bg-background border-b border-border safe-top safe-left safe-right",
35
- n.class
36
- ), u = !o(), b = x("flex-1 max-w-sm flex items-center gap-2 h-7 px-2.5", o() ? "cursor-pointer" : "cursor-not-allowed", "text-xs text-muted-foreground", "bg-muted/40 hover:bg-muted/70 rounded", "border border-transparent hover:border-border/50", "transition-colors duration-100", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring", !o() && "opacity-60 hover:bg-muted/40");
37
- return f !== e.e && g(s, e.e = f), u !== e.t && (r.disabled = e.t = u), b !== e.a && g(r, e.a = b), e;
35
+ o.class
36
+ ), b = !n(), u = p("flex-1 max-w-sm flex items-center gap-2 h-7 px-2.5", n() ? "cursor-pointer" : "cursor-not-allowed", "text-xs text-muted-foreground", "bg-muted/40 hover:bg-muted/70 rounded", "border border-transparent hover:border-border/50", "transition-colors duration-100", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring", !n() && "opacity-60 hover:bg-muted/40");
37
+ return f !== e.e && g(s, e.e = f), b !== e.t && (r.disabled = e.t = b), u !== e.a && g(r, e.a = u), e;
38
38
  }, {
39
39
  e: void 0,
40
40
  t: void 0,
@@ -1,4 +1,4 @@
1
- export { Shell, type ShellProps } from './Shell';
1
+ export { Shell, type ShellProps, type ShellSlotClassNames } 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';
@@ -1,4 +1,5 @@
1
1
  import { type JSX } from 'solid-js';
2
+ import type { FloeThemeTokenOverrides, ThemeType } from '../styles/themes';
2
3
  export interface FloeStorageAdapter {
3
4
  getItem: (key: string) => string | null;
4
5
  setItem: (key: string, value: string) => void;
@@ -71,7 +72,13 @@ export interface FloeLayoutConfig {
71
72
  }
72
73
  export interface FloeThemeConfig {
73
74
  storageKey: string;
74
- defaultTheme: 'light' | 'dark' | 'system';
75
+ defaultTheme: ThemeType;
76
+ /**
77
+ * Optional CSS variable overrides applied at the document root.
78
+ * `shared` applies to both themes, while `light` / `dark` only apply
79
+ * when that resolved theme is active.
80
+ */
81
+ tokens?: FloeThemeTokenOverrides;
75
82
  }
76
83
  export interface FloeDeckConfig {
77
84
  storageKey: string;