@shellui/core 0.5.0-beta.2 → 0.5.0-beta.3

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 (35) hide show
  1. package/package.json +2 -2
  2. package/schemas/shellui.config.schema.json +10 -2
  3. package/src/components/ContentView.tsx +12 -5
  4. package/src/components/ui/alert-dialog.tsx +1 -1
  5. package/src/components/ui/sidebar.tsx +59 -20
  6. package/src/features/config/types.ts +16 -2
  7. package/src/features/layouts/AppLayout.tsx +30 -3
  8. package/src/features/layouts/OverlayShell.tsx +3 -1
  9. package/src/features/layouts/app-bar-inset/AppBarInsetLayout.tsx +22 -0
  10. package/src/features/layouts/appbar/AppBarLayout.tsx +51 -12
  11. package/src/features/layouts/floating/FloatingFadeMask.tsx +22 -0
  12. package/src/features/layouts/floating/FloatingLayout.tsx +142 -0
  13. package/src/features/layouts/floating/FloatingSidebar.tsx +327 -0
  14. package/src/features/layouts/floating/FloatingTabBar.tsx +437 -0
  15. package/src/features/layouts/floating/FloatingTabIndicator.tsx +216 -0
  16. package/src/features/layouts/floating/computeFloatingInsets.spec.ts +83 -0
  17. package/src/features/layouts/floating/computeFloatingInsets.ts +103 -0
  18. package/src/features/layouts/floating/isShellOwnedPath.spec.ts +23 -0
  19. package/src/features/layouts/floating/isShellOwnedPath.ts +16 -0
  20. package/src/features/layouts/floating/layoutChromeStore.ts +46 -0
  21. package/src/features/layouts/floating/scrollChrome.spec.ts +49 -0
  22. package/src/features/layouts/floating/useFloatingChrome.ts +216 -0
  23. package/src/features/layouts/sidebar/SidebarLayout.tsx +32 -6
  24. package/src/features/layouts/sidebar/types.ts +4 -0
  25. package/src/features/layouts/sidebar-inset/SidebarInsetLayout.tsx +15 -0
  26. package/src/features/settings/SettingsProvider.tsx +7 -0
  27. package/src/features/settings/SettingsView.tsx +6 -6
  28. package/src/features/settings/components/Develop.tsx +31 -13
  29. package/src/features/settings/utils/buildSettingsForPropagation.ts +16 -0
  30. package/src/features/storage/StoragePickerContext.tsx +1 -0
  31. package/src/hooks/use-viewport.ts +40 -0
  32. package/src/i18n/translations/en/settings.json +8 -2
  33. package/src/i18n/translations/fr/settings.json +8 -2
  34. package/src/index.css +321 -0
  35. package/src/routes/components/RouteFallback.tsx +6 -2
@@ -12,6 +12,7 @@ import type { NavigationItem } from '../config/types';
12
12
  import { useAuth } from '../auth/hooks/useAuth';
13
13
  import { isAdminFrame } from '../admin/utils';
14
14
  import { isFrameForAppUrl } from '../layouts/utils';
15
+ import { isMainLayoutFrame } from '../layouts/floating/layoutChromeStore';
15
16
  import { defaultTheme } from '../theme/themes';
16
17
  import {
17
18
  buildSettingsForPropagation,
@@ -220,6 +221,7 @@ export function SettingsProvider({ children }: { children: ReactNode }) {
220
221
  const settingsToPropagate = buildSettingsForPropagation(baseSettings, config, lang, {
221
222
  includeAuthAccessToken,
222
223
  accessToken,
224
+ includeLayoutChrome: isMainLayoutFrame(iframe),
223
225
  });
224
226
  shellui.sendMessage({
225
227
  type: 'SHELLUI_SETTINGS',
@@ -235,9 +237,13 @@ export function SettingsProvider({ children }: { children: ReactNode }) {
235
237
  (iframeUuid: string, frameSrc: string, baseSettings: Settings) => {
236
238
  const lang = baseSettings.language?.code || 'en';
237
239
  const includeAuthAccessToken = isTrustedFrameForAuthToken(frameSrc);
240
+ const iframe = shellui.frameRegistry
241
+ .getAllIframes()
242
+ .find(([uuid]) => uuid === iframeUuid)?.[1];
238
243
  const settingsToPropagate = buildSettingsForPropagation(baseSettings, config, lang, {
239
244
  includeAuthAccessToken,
240
245
  accessToken: accessTokenRef.current,
246
+ includeLayoutChrome: isMainLayoutFrame(iframe),
241
247
  });
242
248
  shellui.sendMessage({
243
249
  type: 'SHELLUI_SETTINGS',
@@ -459,6 +465,7 @@ export function SettingsProvider({ children }: { children: ReactNode }) {
459
465
  const settingsToPropagate = buildSettingsForPropagation(currentSettings, config, lang, {
460
466
  includeAuthAccessToken,
461
467
  accessToken: accessTokenRef.current,
468
+ includeLayoutChrome: isMainLayoutFrame(frame),
462
469
  });
463
470
 
464
471
  // Route through the full parent -> child -> ... -> requester path so deep descendants
@@ -230,7 +230,7 @@ export const SettingsView = () => {
230
230
  }, [navigate]);
231
231
 
232
232
  return (
233
- <div className="flex h-full w-full overflow-hidden items-start">
233
+ <div className="flex h-full w-full overflow-hidden items-start md:pt-[var(--shellui-inset-top,0px)] md:pr-[var(--shellui-inset-right,0px)] md:pb-[var(--shellui-inset-bottom,0px)] md:pl-[var(--shellui-inset-left,0px)]">
234
234
  {/* Desktop settings nav — local provider so this works outside the shell sidebar layout */}
235
235
  <SidebarProvider className="hidden h-full min-h-0 w-auto shrink-0 md:flex">
236
236
  <Sidebar
@@ -276,10 +276,10 @@ export const SettingsView = () => {
276
276
  {isSettingsRoot ? (
277
277
  // Show list of settings pages
278
278
  <div className="flex flex-1 flex-col overflow-y-auto bg-background">
279
- <header className="flex h-16 shrink-0 items-center justify-center px-4 border-b">
279
+ <header className="flex min-h-16 shrink-0 items-center justify-center border-b px-4 pt-[var(--shellui-inset-top,0px)]">
280
280
  <h1 className="text-lg font-semibold">{t('title')}</h1>
281
281
  </header>
282
- <div className="flex flex-1 flex-col gap-6 p-4 pb-[max(1.5rem,calc(1rem+env(safe-area-inset-bottom,0px)))] pl-[max(1rem,env(safe-area-inset-left,0px))] pr-[max(1rem,env(safe-area-inset-right,0px))]">
282
+ <div className="flex flex-1 flex-col gap-6 p-4 pb-[max(1.5rem,calc(1rem+max(var(--shellui-inset-bottom,0px),env(safe-area-inset-bottom,0px))))] pl-[max(1rem,max(var(--shellui-inset-left,0px),env(safe-area-inset-left,0px)))] pr-[max(1rem,max(var(--shellui-inset-right,0px),env(safe-area-inset-right,0px)))]">
283
283
  {groupedRoutes.map((group) => (
284
284
  <div
285
285
  key={group.title}
@@ -333,7 +333,7 @@ export const SettingsView = () => {
333
333
  ) : (
334
334
  // Show selected settings page with back button
335
335
  <div className="flex h-full flex-1 flex-col overflow-hidden">
336
- <header className="flex h-16 shrink-0 items-center gap-2 px-4 border-b">
336
+ <header className="flex min-h-16 shrink-0 items-center gap-2 border-b px-4 pt-[var(--shellui-inset-top,0px)]">
337
337
  <Button
338
338
  variant="ghost"
339
339
  size="icon"
@@ -349,7 +349,7 @@ export const SettingsView = () => {
349
349
  'flex flex-1 flex-col overflow-hidden',
350
350
  selectedItem?.path?.startsWith('app-')
351
351
  ? 'min-h-0'
352
- : 'gap-4 overflow-y-auto p-4 pt-4 pb-[max(1.5rem,calc(1rem+env(safe-area-inset-bottom,0px)))] pl-[max(1rem,env(safe-area-inset-left,0px))] pr-[max(1rem,env(safe-area-inset-right,0px))]',
352
+ : 'gap-4 overflow-y-auto p-4 pt-4 pb-[max(1.5rem,calc(1rem+max(var(--shellui-inset-bottom,0px),env(safe-area-inset-bottom,0px))))] pl-[max(1rem,max(var(--shellui-inset-left,0px),env(safe-area-inset-left,0px)))] pr-[max(1rem,max(var(--shellui-inset-right,0px),env(safe-area-inset-right,0px)))]',
353
353
  )}
354
354
  >
355
355
  <Routes>
@@ -380,7 +380,7 @@ export const SettingsView = () => {
380
380
  {/* Desktop Main Content */}
381
381
  <main className="hidden md:flex h-full flex-1 flex-col overflow-hidden">
382
382
  {selectedItem && (
383
- <header className="flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear">
383
+ <header className="flex min-h-16 shrink-0 items-center gap-2 pt-[var(--shellui-inset-top,0px)] transition-[width,height] ease-linear">
384
384
  <div className="flex items-center gap-2 px-4">
385
385
  <Breadcrumb>
386
386
  <BreadcrumbList>
@@ -18,14 +18,15 @@ import { DrawerTestButtons } from './develop/DrawerTestButtons';
18
18
  import { StoragePickerTestButtons } from './develop/StoragePickerTestButtons';
19
19
  import { captureException } from '../../sentry/initSentry';
20
20
  import { useCookieConsent } from '../../cookieConsent/useCookieConsent';
21
- import type { LayoutType } from '../../config/types';
21
+ import { normalizeLayoutType, type LayoutType } from '../../config/types';
22
22
 
23
23
  export const Develop = () => {
24
24
  const { t } = useTranslation('settings');
25
25
  const { settings, updateSetting } = useSettings();
26
26
  const { config } = useConfig();
27
27
  const currentLanguage = settings.language?.code || 'en';
28
- const effectiveLayout: LayoutType = settings.layout ?? config?.layout ?? 'sidebar';
28
+ const effectiveLayout: LayoutType =
29
+ normalizeLayoutType(settings.layout ?? config?.layout) ?? 'sidebar';
29
30
  const navItems = config?.navigation?.length
30
31
  ? flattenNavigationItems(config?.navigation ?? []).filter(
31
32
  (item, index, self) => index === self.findIndex((i) => i.path === item.path),
@@ -151,17 +152,34 @@ export const Develop = () => {
151
152
  >
152
153
  {t('develop.layout.title')}
153
154
  </h3>
154
- <div className="flex flex-wrap gap-2">
155
- {(['sidebar', 'app-bar', 'windows'] as const).map((layoutMode) => (
156
- <Button
157
- key={layoutMode}
158
- variant={effectiveLayout === layoutMode ? 'default' : 'outline'}
159
- size="sm"
160
- onClick={() => updateSetting('layout', layoutMode as LayoutType)}
161
- >
162
- {t(`develop.layout.${layoutMode}`)}
163
- </Button>
164
- ))}
155
+ <p className="mb-3 text-sm text-muted-foreground">{t('develop.layout.description')}</p>
156
+ <div
157
+ role="group"
158
+ aria-label={t('develop.layout.title')}
159
+ className="inline-flex max-w-full flex-wrap gap-1 rounded-xl border border-border/70 bg-muted/40 p-1"
160
+ >
161
+ {(
162
+ ['sidebar', 'sidebar-inset', 'app-bar', 'app-bar-inset', 'floating', 'windows'] as const
163
+ ).map((layoutMode) => {
164
+ const active = effectiveLayout === layoutMode;
165
+ return (
166
+ <Button
167
+ key={layoutMode}
168
+ type="button"
169
+ variant="ghost"
170
+ size="sm"
171
+ aria-pressed={active}
172
+ className={
173
+ active
174
+ ? 'bg-background text-foreground shadow-sm hover:bg-background'
175
+ : 'text-muted-foreground hover:bg-transparent hover:text-foreground'
176
+ }
177
+ onClick={() => updateSetting('layout', layoutMode as LayoutType)}
178
+ >
179
+ {t(`develop.layout.${layoutMode}`)}
180
+ </Button>
181
+ );
182
+ })}
165
183
  </div>
166
184
  </div>
167
185
 
@@ -4,6 +4,7 @@ import { flattenNavigationItems } from './flattenNavigationItems';
4
4
  import { getAvailableThemesForSettings } from './getAvailableThemesForSettings';
5
5
  import { getResolvedAppearanceForSettings } from './getResolvedAppearanceForSettings';
6
6
  import { resolveLabel } from './resolveLabel';
7
+ import { getPublishedLayoutChrome } from '../../layouts/floating/layoutChromeStore';
7
8
 
8
9
  /**
9
10
  * Build settings for propagation to iframes: inject navigation, full theme object,
@@ -16,6 +17,8 @@ export const buildSettingsForPropagation = (
16
17
  options?: {
17
18
  includeAuthAccessToken?: boolean;
18
19
  accessToken?: string | null;
20
+ /** When false, omit layoutChrome (modal / drawer frames). Default true. */
21
+ includeLayoutChrome?: boolean;
19
22
  },
20
23
  ): Settings => {
21
24
  const appearance = getResolvedAppearanceForSettings(settings, config);
@@ -24,6 +27,19 @@ export const buildSettingsForPropagation = (
24
27
  appearance: appearance ?? settings.appearance,
25
28
  };
26
29
 
30
+ if (options?.includeLayoutChrome !== false) {
31
+ const layoutChrome = getPublishedLayoutChrome();
32
+ if (layoutChrome) {
33
+ result = { ...result, layoutChrome };
34
+ } else if ('layoutChrome' in result) {
35
+ const { layoutChrome: _removed, ...rest } = result;
36
+ result = rest;
37
+ }
38
+ } else if ('layoutChrome' in result) {
39
+ const { layoutChrome: _removed, ...rest } = result;
40
+ result = rest;
41
+ }
42
+
27
43
  // Inject available themes when we have a resolved appearance (themes are already registered above)
28
44
  if (result.appearance && typeof window !== 'undefined') {
29
45
  result = {
@@ -203,6 +203,7 @@ export const StoragePickerProvider = ({ children }: StoragePickerProviderProps)
203
203
  url={pending.url}
204
204
  pathPrefix="storage-picker"
205
205
  ignoreMessages={true}
206
+ layoutChrome={false}
206
207
  navItem={pickerNavItem}
207
208
  />
208
209
  </div>
@@ -0,0 +1,40 @@
1
+ import * as React from 'react';
2
+
3
+ /** Matches Tailwind `md` (tablet and up). */
4
+ export const VIEWPORT_MOBILE_MAX = 767;
5
+ /** Matches Tailwind `lg` (desktop and up). */
6
+ export const VIEWPORT_TABLET_MAX = 1023;
7
+
8
+ export type ShellViewport = 'mobile' | 'tablet' | 'desktop';
9
+
10
+ export function resolveViewport(width: number): ShellViewport {
11
+ if (width <= VIEWPORT_MOBILE_MAX) return 'mobile';
12
+ if (width <= VIEWPORT_TABLET_MAX) return 'tablet';
13
+ return 'desktop';
14
+ }
15
+
16
+ /** Reactive viewport tier: mobile (&lt;768), tablet (768–1023), desktop (≥1024). */
17
+ export function useViewport(): ShellViewport {
18
+ const [viewport, setViewport] = React.useState<ShellViewport>(() =>
19
+ typeof window !== 'undefined' ? resolveViewport(window.innerWidth) : 'desktop',
20
+ );
21
+
22
+ React.useEffect(() => {
23
+ const sync = () => setViewport(resolveViewport(window.innerWidth));
24
+ const mobileMql = window.matchMedia(`(max-width: ${VIEWPORT_MOBILE_MAX}px)`);
25
+ const tabletMql = window.matchMedia(
26
+ `(min-width: ${VIEWPORT_MOBILE_MAX + 1}px) and (max-width: ${VIEWPORT_TABLET_MAX}px)`,
27
+ );
28
+ mobileMql.addEventListener('change', sync);
29
+ tabletMql.addEventListener('change', sync);
30
+ window.addEventListener('resize', sync);
31
+ sync();
32
+ return () => {
33
+ mobileMql.removeEventListener('change', sync);
34
+ tabletMql.removeEventListener('change', sync);
35
+ window.removeEventListener('resize', sync);
36
+ };
37
+ }, []);
38
+
39
+ return viewport;
40
+ }
@@ -271,10 +271,16 @@
271
271
  },
272
272
  "layout": {
273
273
  "title": "Layout",
274
- "description": "Switch between sidebar layout and windows (taskbar) layout. This overrides the app config for this session.",
274
+ "description": "Switch between sidebar, inset, app bar, floating, and windows layouts. This overrides the app config for this session.",
275
275
  "sidebar": "Sidebar",
276
+ "sidebar-inset": "Sidebar inset",
276
277
  "windows": "Windows (experimental)",
277
- "app-bar": "App bar"
278
+ "app-bar": "App bar",
279
+ "app-bar-inset": "App bar inset",
280
+ "floating": "Floating",
281
+ "more": "More",
282
+ "hideSidebar": "Hide sidebar",
283
+ "showSidebar": "Show sidebar"
278
284
  },
279
285
  "logging": {
280
286
  "title": "Logging",
@@ -271,10 +271,16 @@
271
271
  },
272
272
  "layout": {
273
273
  "title": "Disposition",
274
- "description": "Basculer entre la disposition avec barre latérale et la disposition fenêtres (barre des tâches). Remplace la config de l'app pour cette session.",
274
+ "description": "Basculer entre barre latérale, encadrés, barre d'app, flottante et fenêtres. Remplace la config de l'app pour cette session.",
275
275
  "sidebar": "Barre latérale",
276
+ "sidebar-inset": "Barre latérale encadrée",
276
277
  "windows": "Fenêtres (expérimental)",
277
- "app-bar": "Barre d'app"
278
+ "app-bar": "Barre d'app",
279
+ "app-bar-inset": "Barre d'app encadrée",
280
+ "floating": "Flottante",
281
+ "more": "Plus",
282
+ "hideSidebar": "Masquer la barre latérale",
283
+ "showSidebar": "Afficher la barre latérale"
278
284
  },
279
285
  "logging": {
280
286
  "title": "Journalisation",
package/src/index.css CHANGED
@@ -43,6 +43,15 @@
43
43
  --sidebar-border: oklch(0.9276 0.0059 264.5182);
44
44
  --sidebar-ring: oklch(0.6894 0.1397 83.6763);
45
45
  --sidebar: var(--sidebar-background);
46
+ /* Tray behind inset content — slight darken of sidebar for edge contrast. */
47
+ --shellui-inset-chrome: color-mix(in oklch, var(--sidebar) 97%, black);
48
+ /* Hover / selected chips on the inset tray — subtle contrast against chrome. */
49
+ --shellui-inset-accent: color-mix(
50
+ in oklch,
51
+ var(--shellui-inset-chrome) 90%,
52
+ var(--sidebar-foreground)
53
+ );
54
+ --shellui-inset-accent-foreground: var(--sidebar-foreground);
46
55
  }
47
56
 
48
57
  .dark {
@@ -75,6 +84,15 @@
75
84
  --sidebar-border: oklch(0.2781 0.0296 256.8577);
76
85
  --sidebar-ring: oklch(0.8061 0.1364 84.8895);
77
86
  --sidebar: var(--sidebar-background);
87
+ /* Dark: lift the tray slightly — sidebar is already lighter than background, so darkening hides the edge. */
88
+ --shellui-inset-chrome: color-mix(in oklch, var(--sidebar) 88%, white);
89
+ /* Hover / selected chips on the inset tray — subtle contrast against chrome. */
90
+ --shellui-inset-accent: color-mix(
91
+ in oklch,
92
+ var(--shellui-inset-chrome) 88%,
93
+ var(--sidebar-foreground)
94
+ );
95
+ --shellui-inset-accent-foreground: var(--sidebar-foreground);
78
96
  }
79
97
 
80
98
  /*
@@ -107,6 +125,249 @@
107
125
  padding-left: calc(var(--shellui-safe-pad-x, 1.5rem) + var(--shellui-safe-area-left));
108
126
  }
109
127
 
128
+ /*
129
+ * Floating layout glass chrome (frosted blur + translucent fill).
130
+ * Colors follow sidebar tokens so themes restyle chrome with the rest of nav.
131
+ *
132
+ * Radius:
133
+ * - Desktop sidebar: theme radius, capped at 0.5rem
134
+ * - Mobile tab bar: binary — 0 when theme radius is 0, else full pill (50%)
135
+ */
136
+ :root {
137
+ --shellui-inset-top: 0px;
138
+ --shellui-inset-right: 0px;
139
+ --shellui-inset-bottom: 0px;
140
+ --shellui-inset-left: 0px;
141
+ --shellui-floating-sidebar-radius: min(var(--radius), 5rem);
142
+ /* Any positive --radius → huge radius (pill); 0 → square. */
143
+ --shellui-floating-mobile-radius: calc(var(--radius) * 999);
144
+ }
145
+
146
+ .shellui-floating-glass {
147
+ color: var(--sidebar-foreground);
148
+ background:
149
+ linear-gradient(
150
+ 145deg,
151
+ color-mix(in oklch, white 40%, transparent) 0%,
152
+ color-mix(in oklch, white 10%, transparent) 42%,
153
+ color-mix(in oklch, white 16%, transparent) 100%
154
+ ),
155
+ /* Frost from sidebar surface so chrome tracks theme, not raw background grey */
156
+ color-mix(in oklch, var(--sidebar) 82%, transparent);
157
+ backdrop-filter: blur(40px) saturate(160%);
158
+ -webkit-backdrop-filter: blur(40px) saturate(160%);
159
+ border: 1px solid color-mix(in oklch, var(--sidebar-border) 80%, transparent);
160
+ box-shadow:
161
+ 0 1px 0 color-mix(in oklch, white 40%, transparent) inset,
162
+ 0 -1px 0 color-mix(in oklch, black 6%, transparent) inset,
163
+ 0 10px 32px color-mix(in oklch, black 14%, transparent),
164
+ 0 2px 6px color-mix(in oklch, black 6%, transparent);
165
+ }
166
+
167
+ .shellui-floating-sidebar-panel .shellui-floating-glass,
168
+ .shellui-floating-sidebar-chip .shellui-floating-glass {
169
+ border-radius: var(--shellui-floating-sidebar-radius);
170
+ }
171
+
172
+ [data-shellui-floating-tabbar] > .shellui-floating-glass {
173
+ border-radius: var(--shellui-floating-mobile-radius);
174
+ }
175
+
176
+ .dark .shellui-floating-glass {
177
+ background:
178
+ linear-gradient(
179
+ 145deg,
180
+ color-mix(in oklch, white 16%, transparent) 0%,
181
+ color-mix(in oklch, white 4%, transparent) 45%,
182
+ color-mix(in oklch, white 9%, transparent) 100%
183
+ ),
184
+ color-mix(in oklch, var(--sidebar) 78%, transparent);
185
+ border-color: color-mix(in oklch, var(--sidebar-border) 90%, transparent);
186
+ box-shadow:
187
+ 0 1px 0 color-mix(in oklch, white 12%, transparent) inset,
188
+ 0 -1px 0 color-mix(in oklch, black 30%, transparent) inset,
189
+ 0 14px 40px color-mix(in oklch, black 40%, transparent),
190
+ 0 2px 8px color-mix(in oklch, black 22%, transparent);
191
+ }
192
+
193
+ /*
194
+ * Floating More sheet — mostly opaque sidebar fill.
195
+ * backdrop-filter cannot blur cross-origin / iframe content behind the shell,
196
+ * so readability comes from density, not real frost of the page.
197
+ */
198
+ .shellui-floating-glass-menu {
199
+ border-radius: min(var(--radius), 0.5rem);
200
+ background:
201
+ linear-gradient(
202
+ 145deg,
203
+ color-mix(in oklch, white 28%, transparent) 0%,
204
+ color-mix(in oklch, white 6%, transparent) 42%,
205
+ color-mix(in oklch, white 12%, transparent) 100%
206
+ ),
207
+ color-mix(in oklch, var(--sidebar) 96%, transparent);
208
+ /* No backdrop-filter: parent shell cannot blur iframe pixels underneath. */
209
+ backdrop-filter: none;
210
+ -webkit-backdrop-filter: none;
211
+ box-shadow:
212
+ 0 1px 0 color-mix(in oklch, white 35%, transparent) inset,
213
+ 0 12px 40px color-mix(in oklch, black 22%, transparent),
214
+ 0 2px 8px color-mix(in oklch, black 10%, transparent);
215
+ }
216
+
217
+ .dark .shellui-floating-glass-menu {
218
+ background:
219
+ linear-gradient(
220
+ 145deg,
221
+ color-mix(in oklch, white 12%, transparent) 0%,
222
+ color-mix(in oklch, white 3%, transparent) 45%,
223
+ color-mix(in oklch, white 7%, transparent) 100%
224
+ ),
225
+ color-mix(in oklch, var(--sidebar) 96%, transparent);
226
+ box-shadow:
227
+ 0 1px 0 color-mix(in oklch, white 10%, transparent) inset,
228
+ 0 14px 44px color-mix(in oklch, black 45%, transparent),
229
+ 0 2px 8px color-mix(in oklch, black 25%, transparent);
230
+ }
231
+
232
+ /* Selected tab chip + tabs: same binary radius as the mobile bar. */
233
+ .shellui-floating-tab-indicator,
234
+ .shellui-floating-tab {
235
+ border-radius: var(--shellui-floating-mobile-radius);
236
+ }
237
+
238
+ .shellui-floating-tab-indicator {
239
+ background: var(--sidebar-primary);
240
+ color: var(--sidebar-primary-foreground);
241
+ }
242
+
243
+ /* Desktop floating nav rows / chrome controls: match capped sidebar radius. */
244
+ .shellui-floating-sidebar-panel .shellui-floating-nav-item,
245
+ .shellui-floating-sidebar-panel .shellui-floating-nav-control {
246
+ border-radius: var(--shellui-floating-sidebar-radius);
247
+ }
248
+
249
+ /* More sheet rows: same small capped radius as the sheet. */
250
+ .shellui-floating-glass-menu .shellui-floating-nav-item {
251
+ border-radius: min(var(--radius), 0.5rem);
252
+ }
253
+
254
+ /*
255
+ * Floating layout edge fades: soft transparent dissolve (no backdrop blur).
256
+ * Shown only when scroll is past that edge.
257
+ */
258
+ .shellui-floating-fade {
259
+ pointer-events: none;
260
+ position: absolute;
261
+ inset-inline: 0;
262
+ z-index: 40;
263
+ opacity: 0;
264
+ transition: opacity 220ms ease;
265
+ background: linear-gradient(
266
+ var(--shellui-floating-fade-dir, to bottom),
267
+ color-mix(in oklch, var(--background) 45%, transparent) 0%,
268
+ color-mix(in oklch, var(--background) 18%, transparent) 45%,
269
+ transparent 100%
270
+ );
271
+ }
272
+
273
+ .shellui-floating-fade[data-visible='true'] {
274
+ opacity: 1;
275
+ }
276
+
277
+ @media (prefers-reduced-motion: reduce) {
278
+ .shellui-floating-fade {
279
+ transition: none;
280
+ }
281
+ }
282
+
283
+ .shellui-floating-fade-top {
284
+ top: 0;
285
+ height: 3rem; /* 48px */
286
+ --shellui-floating-fade-dir: to bottom;
287
+ }
288
+
289
+ .shellui-floating-fade-bottom {
290
+ bottom: 0;
291
+ height: 4.5rem; /* 72px */
292
+ --shellui-floating-fade-dir: to top;
293
+ }
294
+
295
+ /* Floating desktop sidebar collapse — transform/opacity only; respect reduced motion. */
296
+ @media (prefers-reduced-motion: reduce) {
297
+ .shellui-floating-sidebar-panel .shellui-floating-glass,
298
+ .shellui-floating-sidebar-chip .shellui-floating-glass,
299
+ [data-shellui-floating-tabbar],
300
+ [data-shellui-floating-tabbar] > .shellui-floating-glass,
301
+ .shellui-floating-tab-indicator {
302
+ transition: none !important;
303
+ animation: none !important;
304
+ }
305
+ }
306
+
307
+ /*
308
+ * Floating tab bar hide-on-scroll.
309
+ * Slide the wrapper; fade the glass child. Parent opacity + backdrop-filter
310
+ * does not interpolate — the frost pops in at the end of the slide.
311
+ * Appear is slower; dismiss is faster.
312
+ */
313
+ [data-shellui-floating-tabbar] {
314
+ translate: 0 0;
315
+ transition-property: translate;
316
+ transition-duration: 380ms;
317
+ transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
318
+ }
319
+
320
+ [data-shellui-floating-tabbar][data-chrome-visible='false'] {
321
+ transition-duration: 160ms;
322
+ transition-timing-function: ease-in;
323
+ }
324
+
325
+ [data-shellui-floating-tabbar='bottom'][data-chrome-visible='false'] {
326
+ translate: 0 120%;
327
+ }
328
+
329
+ [data-shellui-floating-tabbar='top'][data-chrome-visible='false'] {
330
+ translate: 0 -120%;
331
+ }
332
+
333
+ [data-shellui-floating-tabbar] > .shellui-floating-glass {
334
+ opacity: 1;
335
+ transition-property: opacity;
336
+ transition-duration: 380ms;
337
+ transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
338
+ }
339
+
340
+ [data-shellui-floating-tabbar][data-chrome-visible='false'] > .shellui-floating-glass {
341
+ opacity: 0;
342
+ pointer-events: none;
343
+ transition-duration: 160ms;
344
+ transition-timing-function: ease-in;
345
+ }
346
+
347
+ /*
348
+ * Layout chrome safe insets — applied INSIDE the iframe app, never by shrinking
349
+ * the host iframe (main layout content stays 100%×100% under floating chrome).
350
+ * SDK auto-padding toggles `.shellui-apply-layout-chrome-pad` on `document.body`
351
+ * (and apps may put the class on their own scroll root).
352
+ */
353
+ .shellui-apply-layout-chrome-pad {
354
+ padding-top: var(--shellui-inset-top, 0px);
355
+ padding-right: var(--shellui-inset-right, 0px);
356
+ padding-bottom: var(--shellui-inset-bottom, 0px);
357
+ padding-left: var(--shellui-inset-left, 0px);
358
+ box-sizing: border-box;
359
+ }
360
+
361
+ /* Scroll clearance so anchors/focus land clear of floating chrome. */
362
+ html[data-shellui-layout-chrome-pad] .overflow-y-auto,
363
+ html[data-shellui-layout-chrome-pad] .overflow-auto,
364
+ html[data-shellui-layout-chrome-pad] [data-shellui-chrome-scroll] {
365
+ scroll-padding-top: var(--shellui-inset-top, 0px);
366
+ scroll-padding-bottom: var(--shellui-inset-bottom, 0px);
367
+ scroll-padding-left: var(--shellui-inset-left, 0px);
368
+ scroll-padding-right: var(--shellui-inset-right, 0px);
369
+ }
370
+
110
371
  /*
111
372
  * Installed web app: make <body> the containing block for fixed descendants
112
373
  * (overlays, sheets, toasts). Pure CSS via display-mode — no JS attributes.
@@ -124,6 +385,38 @@
124
385
  * {
125
386
  border-color: var(--border);
126
387
  }
388
+ /*
389
+ * Interactive controls: pointer everywhere for consistency (raw <button>/links
390
+ * in layouts often omit Tailwind `cursor-pointer`; native UA default varies).
391
+ */
392
+ button:not(:disabled):not([disabled]),
393
+ [role='button']:not([aria-disabled='true']),
394
+ [role='menuitem'],
395
+ [role='tab'],
396
+ [role='option'],
397
+ [role='switch'],
398
+ [role='checkbox'],
399
+ [role='radio'],
400
+ [role='link'],
401
+ a[href],
402
+ summary,
403
+ label[for],
404
+ input[type='button']:not(:disabled),
405
+ input[type='submit']:not(:disabled),
406
+ input[type='reset']:not(:disabled),
407
+ input[type='checkbox']:not(:disabled),
408
+ input[type='radio']:not(:disabled),
409
+ input[type='file']:not(:disabled),
410
+ select:not(:disabled) {
411
+ cursor: pointer;
412
+ }
413
+ button:disabled,
414
+ button[disabled],
415
+ [role='button'][aria-disabled='true'],
416
+ input:disabled,
417
+ select:disabled {
418
+ cursor: not-allowed;
419
+ }
127
420
  body {
128
421
  background-color: var(--background);
129
422
  color: var(--foreground);
@@ -185,6 +478,16 @@
185
478
  filter: brightness(0.95);
186
479
  }
187
480
 
481
+ /* Shell chrome nav uses its own accent hover — don't stack the global brightness. */
482
+ [data-shellui-sidebar-layout] button:hover,
483
+ [data-shellui-sidebar-layout] [role='button']:hover,
484
+ [data-shellui-app-bar-layout] button:hover,
485
+ [data-shellui-app-bar-layout] [role='button']:hover,
486
+ [data-shellui-collapsed-titlebar] button:hover,
487
+ [data-shellui-collapsed-titlebar] [role='button']:hover {
488
+ filter: none;
489
+ }
490
+
188
491
  /* Playful input styling */
189
492
  input,
190
493
  textarea,
@@ -246,6 +549,7 @@
246
549
  --color-sidebar-border: var(--sidebar-border);
247
550
  --color-sidebar-ring: var(--sidebar-ring);
248
551
  --color-sidebar: var(--sidebar);
552
+ --color-shellui-inset-chrome: var(--shellui-inset-chrome);
249
553
 
250
554
  /* Border radius tokens */
251
555
  --radius-lg: var(--radius);
@@ -253,6 +557,23 @@
253
557
  --radius-sm: calc(var(--radius) - 4px);
254
558
  }
255
559
 
560
+ /* Inset layouts: keep Tauri collapsed titlebar on the chrome tray. */
561
+ [data-shellui-layout-variant='inset'] [data-shellui-collapsed-titlebar] {
562
+ background-color: var(--shellui-inset-chrome);
563
+ border-bottom-color: transparent;
564
+ }
565
+
566
+ /*
567
+ * Inset layouts: remap sidebar accent tokens so hover / selected nav chips
568
+ * contrast against --shellui-inset-chrome (transparent sidebar / app-bar).
569
+ */
570
+ [data-shellui-layout-variant='inset'] {
571
+ --sidebar-accent: var(--shellui-inset-accent);
572
+ --sidebar-accent-foreground: var(--shellui-inset-accent-foreground);
573
+ --color-sidebar-accent: var(--shellui-inset-accent);
574
+ --color-sidebar-accent-foreground: var(--shellui-inset-accent-foreground);
575
+ }
576
+
256
577
  /*
257
578
  * While switching themes, disable CSS transitions so colors snap instead of morphing.
258
579
  * Do NOT disable animations — that restarts Radix dialog/drawer open animations and
@@ -1,8 +1,12 @@
1
+ import { LoadingOverlay } from '../../components/LoadingOverlay';
2
+
1
3
  export function RouteFallback() {
2
4
  return (
3
5
  <div
4
- className="h-full min-h-full bg-background"
6
+ className="relative h-full min-h-full bg-background"
5
7
  aria-hidden
6
- />
8
+ >
9
+ <LoadingOverlay />
10
+ </div>
7
11
  );
8
12
  }