@shellui/core 0.7.0-alpha.10 → 0.7.0-alpha.12

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 (46) hide show
  1. package/package.json +2 -2
  2. package/src/components/ui/drawer.tsx +47 -30
  3. package/src/components/ui/sheet.tsx +18 -12
  4. package/src/components/ui/shell-divider.spec.tsx +63 -0
  5. package/src/components/ui/shell-divider.tsx +20 -0
  6. package/src/components/ui/sidebar.tsx +15 -7
  7. package/src/components/ui/tooltip.tsx +4 -2
  8. package/src/features/auth/components/LoginButton.spec.tsx +203 -0
  9. package/src/features/auth/components/LoginButton.tsx +77 -28
  10. package/src/features/auth/components/LoginButtonIcons.tsx +4 -8
  11. package/src/features/chromeActions/ChromeActionsHost.tsx +5 -1
  12. package/src/features/layouts/OverlayShell.tsx +58 -40
  13. package/src/features/layouts/appbar/AppBarItemIcon.spec.tsx +45 -0
  14. package/src/features/layouts/appbar/AppBarItemIcon.tsx +19 -0
  15. package/src/features/layouts/appbar/AppBarLayout.tsx +53 -81
  16. package/src/features/layouts/appbar/appBarOverflow.spec.ts +27 -0
  17. package/src/features/layouts/appbar/appBarOverflow.ts +42 -0
  18. package/src/features/layouts/chrome/CollapsedDesktopTitlebar.tsx +1 -1
  19. package/src/features/layouts/chrome/constants.ts +3 -0
  20. package/src/features/layouts/chrome/viewport.ts +11 -4
  21. package/src/features/layouts/floating/FloatingBottomDock.tsx +67 -26
  22. package/src/features/layouts/floating/FloatingLayout.tsx +1 -0
  23. package/src/features/layouts/floating/FloatingSidebar.tsx +43 -20
  24. package/src/features/layouts/floating/moreSections.spec.ts +28 -0
  25. package/src/features/layouts/floating/moreSections.ts +31 -0
  26. package/src/features/layouts/fullscreen/FullscreenLayout.spec.tsx +68 -0
  27. package/src/features/layouts/fullscreen/FullscreenLayout.tsx +10 -1
  28. package/src/features/layouts/sidebar/NavigationContent.tsx +4 -4
  29. package/src/features/layouts/sidebar/SidebarIcons.tsx +67 -0
  30. package/src/features/layouts/sidebar/SidebarInner.spec.tsx +149 -0
  31. package/src/features/layouts/sidebar/SidebarInner.tsx +60 -11
  32. package/src/features/layouts/sidebar/SidebarLayout.tsx +23 -13
  33. package/src/features/layouts/windows/WindowsLayout.tsx +93 -47
  34. package/src/features/layouts/windows/deskDots.spec.ts +6 -4
  35. package/src/features/layouts/windows/deskDots.ts +8 -8
  36. package/src/features/overlays/ResponsiveModal.tsx +5 -3
  37. package/src/features/overlays/overlaySize.spec.ts +56 -16
  38. package/src/features/overlays/overlaySize.ts +114 -31
  39. package/src/features/overlays/phoneDrawerAnchoring.spec.ts +187 -0
  40. package/src/features/overlays/useOverlayReportedSize.ts +8 -3
  41. package/src/i18n/translations/en/common.json +1 -0
  42. package/src/i18n/translations/fr/common.json +1 -0
  43. package/src/index.css +232 -42
  44. package/src/service-worker/devCaches.spec.ts +32 -0
  45. package/src/service-worker/devCaches.ts +27 -0
  46. package/src/service-worker/sw-dev.ts +23 -23
@@ -0,0 +1,187 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { dirname, resolve } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ import { describe, expect, it } from 'vitest';
5
+ import type { DrawerPosition, OverlayOpenOptions } from '@shellui/sdk';
6
+ import {
7
+ resolveDismissOptions,
8
+ resolveDrawerChrome,
9
+ resolveDrawerSizeForViewport,
10
+ } from './overlaySize';
11
+
12
+ /**
13
+ * Phones (below 768px): every drawer must be a bottom sheet, anchored 8px plus the
14
+ * safe area above the bottom edge, with a drag handle, sized to its content so the
15
+ * actions sit right above the bottom where the thumb reaches. A tall sheet stops 8px
16
+ * below the notch and scrolls inside. These tests fail if any drawer path stops being
17
+ * bottom-anchored or content-sized on a phone.
18
+ */
19
+
20
+ const POSITIONS: DrawerPosition[] = ['left', 'right', 'top', 'bottom'];
21
+
22
+ const OPTION_CASES: Array<{
23
+ name: string;
24
+ options: OverlayOpenOptions & { showDragHandle?: boolean };
25
+ reported?: number;
26
+ }> = [
27
+ { name: 'defaults', options: {} },
28
+ { name: 'sm', options: { size: 'sm' } },
29
+ { name: 'md', options: { size: 'md' } },
30
+ { name: 'lg', options: { size: 'lg' } },
31
+ { name: 'xl', options: { size: 'xl' } },
32
+ { name: 'full', options: { size: 'full' } },
33
+ { name: '300px', options: { size: '300px' } },
34
+ { name: '40vh', options: { size: '40vh' } },
35
+ { name: 'width 60vw', options: { width: '60vw' } },
36
+ { name: 'content (reported 152px)', options: { size: 'content' }, reported: 152 },
37
+ { name: 'dynamicSizing (reported 320px)', options: { dynamicSizing: true }, reported: 320 },
38
+ { name: 'no drag handle', options: { showDragHandle: false } },
39
+ { name: 'not dismissible', options: { dismissible: false } },
40
+ {
41
+ name: 'sm, not dismissible, no handle',
42
+ options: { size: 'sm', dismissible: false, showDragHandle: false },
43
+ },
44
+ ];
45
+
46
+ const PHONES = [
47
+ { name: '390 x 844 with notch', height: 844, safeTop: 47, safeBottom: 34 },
48
+ { name: '375 x 667 without notch', height: 667, safeTop: 0, safeBottom: 0 },
49
+ { name: '767 x 1000 (just below md)', height: 1000, safeTop: 0, safeBottom: 0 },
50
+ ];
51
+
52
+ /** Content heights the iframe may report: short, mid, and taller than any phone. */
53
+ const REPORTS = [120, 326, 560, 2000];
54
+
55
+ /** --shellui-drawer-bottom on a phone: 8px gap plus the bottom safe area. */
56
+ const phoneBottomOffset = (safeBottom: number) => 8 + safeBottom;
57
+ /** --shellui-drawer-top on a phone: 8px gap plus the top safe area (below the notch). */
58
+ const phoneTopOffset = (safeTop: number) => 8 + safeTop;
59
+
60
+ function specDir(): string {
61
+ const url = import.meta.url;
62
+ if (url.startsWith('file:')) return dirname(fileURLToPath(url));
63
+ return dirname(url);
64
+ }
65
+
66
+ describe('phone drawers are bottom-anchored sheets', () => {
67
+ for (const position of POSITIONS) {
68
+ for (const { name, options } of OPTION_CASES) {
69
+ it(`${position} drawer (${name}) is a content-sized bottom sheet with a drag handle`, () => {
70
+ const size = resolveDrawerSizeForViewport(options, position, true);
71
+ const chrome = resolveDrawerChrome({
72
+ position,
73
+ isMobile: true,
74
+ dismiss: resolveDismissOptions(options),
75
+ contentSized: size.contentSized,
76
+ });
77
+ expect(chrome.direction).toBe('bottom');
78
+ expect(chrome.showDragHandle).toBe(true);
79
+ // No half-height stop: the sheet is as tall as its content.
80
+ expect(chrome.allowSnapPoints).toBe(false);
81
+ expect(size.contentSized).toBe(true);
82
+ expect(size.drawerSize).toBeNull();
83
+ expect(size.style.height).toBe('auto');
84
+ expect(size.style.maxHeight).toBe('var(--shellui-drawer-max-height)');
85
+ // Nothing may move the sheet off its bottom anchor through inline style.
86
+ expect(size.style.top).toBeUndefined();
87
+ expect(size.style.bottom).toBeUndefined();
88
+ expect(size.style.transform).toBeUndefined();
89
+ // Apps that never report fall back to their requested height, still capped.
90
+ if (size.fallbackHeight) {
91
+ expect(size.fallbackHeight).toMatch(/var\(--shellui-drawer-max-height\)\)$/);
92
+ expect(size.fallbackHeight).not.toMatch(/vw/);
93
+ }
94
+ });
95
+ }
96
+ }
97
+
98
+ it('keeps the requested edge on desktop', () => {
99
+ for (const position of POSITIONS) {
100
+ const chrome = resolveDrawerChrome({
101
+ position,
102
+ isMobile: false,
103
+ dismiss: resolveDismissOptions({}),
104
+ });
105
+ expect(chrome.direction).toBe(position);
106
+ expect(chrome.showDragHandle).toBe(position === 'top' || position === 'bottom');
107
+ expect(resolveDrawerSizeForViewport({ size: 'md' }, position, false).contentSized).toBe(
108
+ false,
109
+ );
110
+ }
111
+ });
112
+
113
+ it('hides the handle while a phone sheet waits for its size', () => {
114
+ const chrome = resolveDrawerChrome({
115
+ position: 'right',
116
+ isMobile: true,
117
+ dismiss: resolveDismissOptions({}),
118
+ pending: true,
119
+ });
120
+ expect(chrome.direction).toBe('bottom');
121
+ expect(chrome.showDragHandle).toBe(false);
122
+ expect(chrome.allowSnapPoints).toBe(false);
123
+ });
124
+
125
+ for (const phone of PHONES) {
126
+ for (const reported of REPORTS) {
127
+ it(`${phone.name}: a ${reported}px sheet ends above the bottom edge, top below the notch`, () => {
128
+ const H = phone.height;
129
+ const bottomOffset = phoneBottomOffset(phone.safeBottom);
130
+ // --shellui-drawer-max-height: app height minus drawer top and bottom offsets
131
+ const maxH = H - phoneTopOffset(phone.safeTop) - bottomOffset;
132
+ const visible = Math.min(reported, maxH);
133
+ const bottom = H - bottomOffset;
134
+ const top = bottom - visible;
135
+
136
+ expect(bottom).toBe(H - 8 - phone.safeBottom);
137
+ expect(top).toBeGreaterThanOrEqual(phone.safeTop + 8);
138
+ // Short content: the sheet hugs it, so the actions are near the bottom.
139
+ if (reported < maxH) expect(visible).toBe(reported);
140
+ // Tall content: capped, the iframe scrolls inside.
141
+ else expect(top).toBe(phone.safeTop + 8);
142
+ });
143
+ }
144
+ }
145
+
146
+ it('anchors the bottom drawer chrome to the bottom offset', () => {
147
+ const drawerSrc = readFileSync(resolve(specDir(), '../../components/ui/drawer.tsx'), 'utf8');
148
+ const bottom = drawerSrc.match(/^\s*bottom: `\$\{drawerPanel\}([^`]*)`/m)?.[1] ?? '';
149
+ expect(bottom).toContain('bottom-[var(--shellui-drawer-bottom)]');
150
+ expect(bottom).toContain('left-[var(--shellui-drawer-left)]');
151
+ expect(bottom).toContain('right-[var(--shellui-drawer-right)]');
152
+ expect(bottom).not.toMatch(/(^|\s)top-/);
153
+ });
154
+
155
+ it('keeps an 8px phone gap plus the safe areas, and caps sheets between them', () => {
156
+ const css = readFileSync(resolve(specDir(), '../../index.css'), 'utf8');
157
+ expect(css).toMatch(/--shellui-drawer-gap:\s*8px;/);
158
+ expect(css).toMatch(
159
+ /--shellui-drawer-bottom:\s*calc\(\s*var\(--shellui-drawer-gap\)\s*\+\s*var\(--shellui-safe-area-bottom\)\s*\);/,
160
+ );
161
+ expect(css).toMatch(
162
+ /--shellui-drawer-top:\s*calc\(\s*var\(--shellui-drawer-gap\)\s*\+\s*var\(--shellui-safe-area-top\)\s*\);/,
163
+ );
164
+ expect(css).toMatch(
165
+ /--shellui-drawer-max-height:\s*calc\(\s*var\(--shellui-app-height\)\s*-\s*var\(--shellui-drawer-top\)\s*-\s*var\(--shellui-drawer-bottom\)/,
166
+ );
167
+ });
168
+
169
+ it('OverlayShell takes the drawer edge, handle and height from these helpers', () => {
170
+ const shell = readFileSync(resolve(specDir(), '../layouts/OverlayShell.tsx'), 'utf8');
171
+ expect(shell).toMatch(/resolveDrawerChrome\(/);
172
+ expect(shell).toMatch(/showDragHandle=\{drawerChrome\.showDragHandle\}/);
173
+ expect(shell).toMatch(
174
+ /resolveDrawerSizeForViewport\(drawerOptions, drawerPosition, isMobile\)/,
175
+ );
176
+ // Phone sheets listen for the content size and may grow to the drawer max height.
177
+ expect(shell).toMatch(
178
+ /useOverlayReportedSize\(\s*drawerSize\.contentSized \|\| drawerDynamic,\s*isDrawerOpen,\s*isMobile \? 1 : undefined,?\s*\)/,
179
+ );
180
+ expect(shell).toMatch(/if \(!drawerChrome\.allowSnapPoints\) return undefined;/);
181
+ // A tall content report is clamped by the drawer max height, not the overlay max
182
+ // (which ignores the bottom offset and would push the top under the notch).
183
+ expect(shell).toMatch(/maxHeight: `min\(\$\{drawerReported\.height\}px, \$\{DRAWER_MAX_H\}\)`/);
184
+ expect(shell).toMatch(/height: drawerPhoneFallback, maxHeight: DRAWER_MAX_H/);
185
+ expect(shell).toMatch(/direction=\{effectiveDrawerPosition\}/);
186
+ });
187
+ });
@@ -27,7 +27,12 @@ export type ReportedOverlaySize = {
27
27
  * On close: last size is kept for CLOSE_SIZE_CLEAR_MS so exit animation does not
28
28
  * shrink back to the pending spinner. On open: size resets immediately (pending again).
29
29
  */
30
- export function useOverlayReportedSize(enabled: boolean, active: boolean) {
30
+ export function useOverlayReportedSize(
31
+ enabled: boolean,
32
+ active: boolean,
33
+ /** Share of the overlay max height a report may reach. Phone sheets pass 1: CSS caps them. */
34
+ maxRatio = MAX_VIEWPORT_RATIO,
35
+ ) {
31
36
  const [reported, setReported] = useState<ReportedOverlaySize | null>(null);
32
37
  const [fallback, setFallback] = useState(false);
33
38
  const lastRef = useRef<ReportedOverlaySize | null>(null);
@@ -69,7 +74,7 @@ export function useOverlayReportedSize(enabled: boolean, active: boolean) {
69
74
 
70
75
  // Clamp against the shell height (not raw innerHeight / dvh), so standalone
71
76
  // iOS overlays cannot outgrow the visible screen.
72
- const maxH = overlayMaxHeightPx(MAX_VIEWPORT_RATIO);
77
+ const maxH = overlayMaxHeightPx(maxRatio);
73
78
  const rawH = Math.ceil(height);
74
79
  const clampedH = Math.min(Math.max(rawH, MIN_CONTENT_HEIGHT), maxH);
75
80
  const wasClamped = rawH > maxH;
@@ -111,7 +116,7 @@ export function useOverlayReportedSize(enabled: boolean, active: boolean) {
111
116
  cleanup();
112
117
  if (fallbackTimerRef.current) clearTimeout(fallbackTimerRef.current);
113
118
  };
114
- }, [enabled, active]);
119
+ }, [enabled, active, maxRatio]);
115
120
 
116
121
  const effectiveReported =
117
122
  reported ??
@@ -24,6 +24,7 @@
24
24
  "userFallback": "User",
25
25
  "goToLoginAriaLabel": "Go to login",
26
26
  "openAccountMenuAriaLabel": "Open account menu for {{name}}",
27
+ "openAccountMenuWithEmailAriaLabel": "Open account menu for {{name}}, {{email}}",
27
28
  "loadingAccount": "Loading account…",
28
29
  "backToHome": "Back to home"
29
30
  },
@@ -24,6 +24,7 @@
24
24
  "userFallback": "Utilisateur",
25
25
  "goToLoginAriaLabel": "Aller à la connexion",
26
26
  "openAccountMenuAriaLabel": "Ouvrir le menu du compte pour {{name}}",
27
+ "openAccountMenuWithEmailAriaLabel": "Ouvrir le menu du compte pour {{name}}, {{email}}",
27
28
  "loadingAccount": "Chargement du compte…",
28
29
  "backToHome": "Retour à l'accueil"
29
30
  },
package/src/index.css CHANGED
@@ -217,6 +217,54 @@ html[data-shellui-nav-contrast='low'] {
217
217
  );
218
218
  }
219
219
 
220
+ /*
221
+ * Floating drawers: every drawer, sheet and phone bottom sheet sits a gap away
222
+ * from the window edge (8px on phones, 12px from 768px), plus the safe area.
223
+ * Radii follow the theme radius, so --radius: 0 gives square panels.
224
+ */
225
+ :root {
226
+ --shellui-drawer-gap: 8px;
227
+ --shellui-drawer-radius: var(--shellui-r-float);
228
+ --shellui-sheet-radius: calc(var(--shellui-r-float) * 1.5);
229
+ --shellui-drawer-border: var(--border);
230
+ --shellui-drawer-shadow: var(--shellui-win-shadow);
231
+ --shellui-drawer-top: calc(var(--shellui-drawer-gap) + var(--shellui-safe-area-top));
232
+ --shellui-drawer-right: calc(var(--shellui-drawer-gap) + var(--shellui-safe-area-right));
233
+ --shellui-drawer-bottom: calc(var(--shellui-drawer-gap) + var(--shellui-safe-area-bottom));
234
+ --shellui-drawer-left: calc(var(--shellui-drawer-gap) + var(--shellui-safe-area-left));
235
+ --shellui-drawer-max-width: calc(
236
+ 100vw - var(--shellui-drawer-left) - var(--shellui-drawer-right)
237
+ );
238
+ --shellui-drawer-max-height: calc(
239
+ var(--shellui-app-height) - var(--shellui-drawer-top) - var(--shellui-drawer-bottom)
240
+ );
241
+ }
242
+ @media (min-width: 768px) {
243
+ :root {
244
+ --shellui-drawer-gap: 12px;
245
+ }
246
+ }
247
+ /* macOS desktop: drawers clear the 32px strip and the default traffic lights. */
248
+ html[data-shellui-mac-chrome],
249
+ html[data-shellui-overlay-chrome] {
250
+ --shellui-drawer-top: calc(var(--shellui-mac-titlebar-h) + var(--shellui-drawer-gap));
251
+ }
252
+
253
+ /*
254
+ * Shared divider for the shell panels, per the layouts redesign kit
255
+ * (shell.css `.sbx .foot`, `.fside .head` / `.fside .foot`, `.startm .sh` /
256
+ * `.startm .sf`): a full-width 1px --shellui-hairline with no margin of its own.
257
+ * Inside a padded container, cancel the padding with negative inline margins
258
+ * (e.g. -mx-2) so it still runs edge to edge. Menus keep the shadcn separator
259
+ * (kit `.menu hr`: full bleed, --border).
260
+ */
261
+ .shellui-divider {
262
+ flex-shrink: 0;
263
+ height: 1px;
264
+ border: 0;
265
+ background: var(--shellui-hairline);
266
+ }
267
+
220
268
  /*
221
269
  * Content padding that clears the notch / home indicator, then keeps the
222
270
  * configured inset beyond that edge. Override with --shellui-safe-pad-x / -y.
@@ -911,10 +959,10 @@ html.shellui-theme-switching
911
959
  * Do not set `transform: none` — enter/exit slide and swipe-dismiss own transform.
912
960
  * Morph transitions omit `transform` so keyframes / drag aren’t fought. */
913
961
  [data-dialog-content][data-presentation='sheet'] {
914
- left: 0;
915
- right: 0;
962
+ left: var(--shellui-drawer-left);
963
+ right: var(--shellui-drawer-right);
916
964
  top: auto;
917
- bottom: 0;
965
+ bottom: var(--shellui-drawer-bottom);
918
966
  transition-property:
919
967
  width, height, max-width, max-height, border-radius, left, right, top, bottom, padding;
920
968
  transition-duration: 220ms;
@@ -1007,7 +1055,7 @@ html.shellui-theme-switching
1007
1055
  @keyframes responsive-modal-sheet-in {
1008
1056
  from {
1009
1057
  opacity: 1;
1010
- transform: translateY(100%);
1058
+ transform: translateY(calc(100% + var(--shellui-drawer-bottom) + 48px));
1011
1059
  }
1012
1060
  to {
1013
1061
  opacity: 1;
@@ -1021,7 +1069,7 @@ html.shellui-theme-switching
1021
1069
  }
1022
1070
  to {
1023
1071
  opacity: 1;
1024
- transform: translateY(100%);
1072
+ transform: translateY(calc(100% + var(--shellui-drawer-bottom) + 48px));
1025
1073
  }
1026
1074
  }
1027
1075
 
@@ -1124,7 +1172,7 @@ html.shellui-theme-switching
1124
1172
  }
1125
1173
  @keyframes sheet-content-in-left {
1126
1174
  from {
1127
- transform: translateX(-100%);
1175
+ transform: translateX(calc(-100% - var(--shellui-drawer-left) - 48px));
1128
1176
  }
1129
1177
  to {
1130
1178
  transform: translateX(0);
@@ -1135,12 +1183,12 @@ html.shellui-theme-switching
1135
1183
  transform: translateX(0);
1136
1184
  }
1137
1185
  to {
1138
- transform: translateX(-100%);
1186
+ transform: translateX(calc(-100% - var(--shellui-drawer-left) - 48px));
1139
1187
  }
1140
1188
  }
1141
1189
  @keyframes sheet-content-in-right {
1142
1190
  from {
1143
- transform: translateX(100%);
1191
+ transform: translateX(calc(100% + var(--shellui-drawer-right) + 48px));
1144
1192
  }
1145
1193
  to {
1146
1194
  transform: translateX(0);
@@ -1151,12 +1199,12 @@ html.shellui-theme-switching
1151
1199
  transform: translateX(0);
1152
1200
  }
1153
1201
  to {
1154
- transform: translateX(100%);
1202
+ transform: translateX(calc(100% + var(--shellui-drawer-right) + 48px));
1155
1203
  }
1156
1204
  }
1157
1205
  @keyframes sheet-content-in-top {
1158
1206
  from {
1159
- transform: translateY(-100%);
1207
+ transform: translateY(calc(-100% - var(--shellui-drawer-top) - 48px));
1160
1208
  }
1161
1209
  to {
1162
1210
  transform: translateY(0);
@@ -1167,12 +1215,12 @@ html.shellui-theme-switching
1167
1215
  transform: translateY(0);
1168
1216
  }
1169
1217
  to {
1170
- transform: translateY(-100%);
1218
+ transform: translateY(calc(-100% - var(--shellui-drawer-top) - 48px));
1171
1219
  }
1172
1220
  }
1173
1221
  @keyframes sheet-content-in-bottom {
1174
1222
  from {
1175
- transform: translateY(100%);
1223
+ transform: translateY(calc(100% + var(--shellui-drawer-bottom) + 48px));
1176
1224
  }
1177
1225
  to {
1178
1226
  transform: translateY(0);
@@ -1183,7 +1231,7 @@ html.shellui-theme-switching
1183
1231
  transform: translateY(0);
1184
1232
  }
1185
1233
  to {
1186
- transform: translateY(100%);
1234
+ transform: translateY(calc(100% + var(--shellui-drawer-bottom) + 48px));
1187
1235
  }
1188
1236
  }
1189
1237
 
@@ -1228,6 +1276,78 @@ html.shellui-theme-switching
1228
1276
  pointer-events: none;
1229
1277
  }
1230
1278
 
1279
+ /*
1280
+ * Floating drawers (vaul). Offsets, radius, border and shadow live on the
1281
+ * drawerContentByDirection classes. The closed position adds the edge offset
1282
+ * plus 48px so no strip of panel or shadow stays on screen as it slides.
1283
+ */
1284
+ [data-drawer-content][data-drawer-direction='right'] {
1285
+ --initial-transform: calc(100% + var(--shellui-drawer-right) + 48px);
1286
+ }
1287
+ [data-drawer-content][data-drawer-direction='left'] {
1288
+ --initial-transform: calc(100% + var(--shellui-drawer-left) + 48px);
1289
+ }
1290
+ [data-drawer-content][data-drawer-direction='top'] {
1291
+ --initial-transform: calc(100% + var(--shellui-drawer-top) + 48px);
1292
+ }
1293
+ [data-drawer-content][data-drawer-direction='bottom'] {
1294
+ --initial-transform: calc(100% + var(--shellui-drawer-bottom) + 48px);
1295
+ }
1296
+ /* vaul paints a 200% ::after past the anchored edge; it would fill the gap. */
1297
+ [data-drawer-content]::after {
1298
+ content: none !important;
1299
+ }
1300
+ /* macOS desktop: the scrim starts under the 32px strip so the lights and window drag keep working. */
1301
+ html[data-shellui-mac-chrome] [data-drawer-overlay],
1302
+ html[data-shellui-overlay-chrome] [data-drawer-overlay] {
1303
+ top: var(--shellui-mac-titlebar-h);
1304
+ }
1305
+
1306
+ @keyframes shellui-drawer-fade-in {
1307
+ from {
1308
+ opacity: 0;
1309
+ }
1310
+ to {
1311
+ opacity: 1;
1312
+ }
1313
+ }
1314
+ @keyframes shellui-drawer-fade-out {
1315
+ from {
1316
+ opacity: 1;
1317
+ }
1318
+ to {
1319
+ opacity: 0;
1320
+ }
1321
+ }
1322
+
1323
+ /* Reduced motion: drawers and sheets fade in place instead of sliding. !important beats vaul's injected slide rules. */
1324
+ @media (prefers-reduced-motion: reduce) {
1325
+ [data-drawer-content] {
1326
+ --initial-transform: 0px;
1327
+ transition: none !important;
1328
+ }
1329
+ [data-drawer-content][data-state='open'] {
1330
+ animation: shellui-drawer-fade-in 150ms ease-out both !important;
1331
+ }
1332
+ [data-drawer-content][data-state='closed'] {
1333
+ animation: shellui-drawer-fade-out 120ms ease-in both !important;
1334
+ }
1335
+ [data-sheet-content][data-side][data-state='open'] {
1336
+ animation: shellui-drawer-fade-in 150ms ease-out both;
1337
+ }
1338
+ [data-sheet-content][data-side][data-state='closed'] {
1339
+ animation: shellui-drawer-fade-out 120ms ease-in both;
1340
+ }
1341
+ [data-dialog-content][data-presentation='sheet'][data-state='open'][data-enter-motion] {
1342
+ animation: shellui-drawer-fade-in 150ms ease-out;
1343
+ }
1344
+ [data-dialog-content][data-presentation='sheet'][data-state='closed']:not(
1345
+ [data-dismiss='swipe']
1346
+ ) {
1347
+ animation: shellui-drawer-fade-out 120ms ease-in forwards;
1348
+ }
1349
+ }
1350
+
1231
1351
  /* Cookie consent dialog (bottom-left) animations */
1232
1352
  @keyframes cookie-dialog-content-in {
1233
1353
  from {
@@ -1362,6 +1482,12 @@ html.shellui-theme-switching
1362
1482
  animation: auth-menu-out 0.12s cubic-bezier(0.4, 0, 1, 1) both;
1363
1483
  pointer-events: none;
1364
1484
  }
1485
+ @media (prefers-reduced-motion: reduce) {
1486
+ [data-auth-menu-content][data-state],
1487
+ [data-shellui-auth-loading] .animate-pulse {
1488
+ animation: none;
1489
+ }
1490
+ }
1365
1491
 
1366
1492
  /* Tauri overlay titlebar: drag via data-tauri-drag-region; keep controls clickable. */
1367
1493
  [data-shellui-drag-region],
@@ -1450,9 +1576,9 @@ html[data-shellui-overlay-chrome] [data-slot='sidebar-container'] {
1450
1576
  /*
1451
1577
  * Tablet / desktop: fixed shell sidebar sits below the layout safe-area strip.
1452
1578
  * Only when the root (non-iframe) layout advertised the topbar via
1453
- * data-shellui-safe-area-topbar. Drawer overlay stays full-bleed (topbar dims
1454
- * behind it); left/right/top drawer panels clear the inset so they never cover
1455
- * the strip. Height is 0 when env(safe-area-inset-top) is 0.
1579
+ * data-shellui-safe-area-topbar. Drawers clear the inset through
1580
+ * --shellui-drawer-top, which already includes the safe area.
1581
+ * Height is 0 when env(safe-area-inset-top) is 0.
1456
1582
  */
1457
1583
  @media (min-width: 768px) {
1458
1584
  html[data-shellui-safe-area-topbar]
@@ -1464,21 +1590,6 @@ html[data-shellui-overlay-chrome] [data-slot='sidebar-container'] {
1464
1590
  bottom: auto;
1465
1591
  height: calc(var(--shellui-app-height, 100dvh) - var(--shellui-safe-area-top));
1466
1592
  }
1467
-
1468
- html[data-shellui-safe-area-topbar] [data-drawer-content][data-drawer-direction='left'],
1469
- html[data-shellui-safe-area-topbar] [data-drawer-content][data-drawer-direction='right'] {
1470
- top: var(--shellui-safe-area-top);
1471
- bottom: 0;
1472
- height: auto;
1473
- }
1474
-
1475
- /* Top drawer: sit below the safe-area band (no extra pt — offset replaces it). */
1476
- html[data-shellui-safe-area-topbar] [data-drawer-content][data-drawer-direction='top'] {
1477
- top: var(--shellui-safe-area-top);
1478
- padding-top: 0;
1479
- border-top-left-radius: 0.75rem;
1480
- border-top-right-radius: 0.75rem;
1481
- }
1482
1593
  }
1483
1594
 
1484
1595
  /* Collapsed Tauri: full-width 32px macOS strip; push sidebar + content below it. */
@@ -1588,7 +1699,7 @@ html[data-shellui-safe-area-topbar] [data-shellui-collapsed-titlebar] {
1588
1699
  .shellui-nav [data-sidebar='group'] {
1589
1700
  position: relative;
1590
1701
  }
1591
- /* Collapsed rail: the hidden group label leaves a 24 x 1 px hairline. */
1702
+ /* Collapsed rail: the hidden group label leaves a 24 x 1 px hairline (sidebar spec). */
1592
1703
  .group[data-collapsible='icon']
1593
1704
  .shellui-nav
1594
1705
  [data-sidebar='group']:has(.shellui-nav-label)::before {
@@ -1602,8 +1713,7 @@ html[data-shellui-safe-area-topbar] [data-shellui-collapsed-titlebar] {
1602
1713
  background: var(--shellui-hairline);
1603
1714
  }
1604
1715
  .shellui-nav[data-shellui-nav-footer] {
1605
- border-top-color: var(--shellui-hairline);
1606
- padding: 6px 0 max(8px, var(--shellui-safe-area-bottom));
1716
+ padding: 0 0 max(8px, var(--shellui-safe-area-bottom));
1607
1717
  }
1608
1718
 
1609
1719
  /* Rail: 2 px ring line on hover and while dragging. */
@@ -1660,8 +1770,11 @@ html[data-shellui-safe-area-topbar] [data-shellui-collapsed-titlebar] {
1660
1770
  [data-sidebar='menu-button'][data-active='true'] {
1661
1771
  box-shadow: 0 1px 2px color-mix(in oklch, black 10%, transparent);
1662
1772
  }
1663
- [data-shellui-layout-variant='inset'] .shellui-nav[data-shellui-nav-footer] {
1664
- border-top-color: transparent;
1773
+ /* Inset: no footer hairline, the card edge already separates (sidebar-inset spec). */
1774
+ [data-shellui-layout-variant='inset']
1775
+ .shellui-nav[data-shellui-nav-footer]
1776
+ > [data-shellui-footer-divider] {
1777
+ background: transparent;
1665
1778
  }
1666
1779
  @media (min-width: 768px) {
1667
1780
  [data-shellui-layout-variant='inset'] [data-slot='sidebar-inset'] {
@@ -1712,6 +1825,26 @@ html[data-shellui-safe-area-topbar] [data-shellui-collapsed-titlebar] {
1712
1825
  .shellui-appbar-end.is-active {
1713
1826
  background-color: var(--shellui-nav-hover);
1714
1827
  }
1828
+ /*
1829
+ * Web bar (56px, 6px top pad, 1px border): the underline sits on the bar's bottom
1830
+ * border, half the leftover height below the item. Tauri keeps it at the item bottom.
1831
+ */
1832
+ html:not([data-shellui-host='tauri'])
1833
+ [data-shellui-app-bar-layout]
1834
+ > header
1835
+ .shellui-appbar-item.is-active::after,
1836
+ html:not([data-shellui-host='tauri'])
1837
+ [data-shellui-mobile-chrome-stack]
1838
+ > header[data-layout]
1839
+ .shellui-appbar-item.is-active::after {
1840
+ bottom: calc((var(--shellui-appbar-item-h, 32px) - 49px) / 2 - 1px);
1841
+ }
1842
+ @media (max-width: 767px) {
1843
+ [data-shellui-app-bar-layout] .shellui-appbar-item {
1844
+ --shellui-appbar-item-h: 40px;
1845
+ height: 40px;
1846
+ }
1847
+ }
1715
1848
  .shellui-appbar-item:focus-visible,
1716
1849
  .shellui-appbar-end:focus-visible {
1717
1850
  outline: 2px solid var(--sidebar-ring);
@@ -1732,6 +1865,9 @@ html[data-shellui-safe-area-topbar] [data-shellui-collapsed-titlebar] {
1732
1865
  font-size: 13.5px;
1733
1866
  border-radius: var(--shellui-r-row);
1734
1867
  }
1868
+ .shellui-appbar-menu .shellui-appbar-menu-item > :first-child:is(svg, img, span[aria-hidden]) {
1869
+ color: var(--muted-foreground);
1870
+ }
1735
1871
  .shellui-appbar-menu .shellui-appbar-menu-item.is-active {
1736
1872
  background-color: var(--accent);
1737
1873
  color: var(--accent-foreground);
@@ -1896,7 +2032,7 @@ html[data-shellui-safe-area-topbar] [data-shellui-collapsed-titlebar] {
1896
2032
  right: calc(8px + var(--shellui-safe-area-right));
1897
2033
  bottom: calc(8px + var(--shellui-safe-area-bottom));
1898
2034
  padding-top: 8px;
1899
- border-radius: calc(var(--shellui-r-float) + 8px);
2035
+ border-radius: var(--shellui-sheet-radius);
1900
2036
  background: color-mix(in oklch, var(--sidebar) 92%, transparent);
1901
2037
  backdrop-filter: blur(24px) saturate(180%);
1902
2038
  -webkit-backdrop-filter: blur(24px) saturate(180%);
@@ -1910,6 +2046,13 @@ html[data-shellui-safe-area-topbar] [data-shellui-collapsed-titlebar] {
1910
2046
  border-radius: 999px;
1911
2047
  background: color-mix(in oklch, var(--sidebar-foreground) 22%, transparent);
1912
2048
  }
2049
+ /* More sheet group label (sidebar sheet label size, 12.5px / 600). */
2050
+ .shellui-more-sheet-label {
2051
+ padding: 14px 12px 4px;
2052
+ font-size: 12.5px;
2053
+ font-weight: 600;
2054
+ color: var(--shellui-nav-label);
2055
+ }
1913
2056
  .shellui-more-sheet-row {
1914
2057
  min-height: 48px;
1915
2058
  padding-inline: 12px;
@@ -1938,6 +2081,21 @@ html[data-shellui-safe-area-topbar] [data-shellui-collapsed-titlebar] {
1938
2081
  .shellui-more-sheet-account:empty {
1939
2082
  display: none;
1940
2083
  }
2084
+ /* Account row: 48 px in the mobile sidebar sheet, 56 px with a 32 px avatar in the More sheet. */
2085
+ [data-mobile='true'] .shellui-account-row {
2086
+ height: 3rem;
2087
+ }
2088
+ .shellui-more-sheet-account .shellui-account-row {
2089
+ height: 3.5rem;
2090
+ padding-inline: 0.75rem;
2091
+ font-size: 15px;
2092
+ }
2093
+ .shellui-more-sheet-account .shellui-account-row [data-shellui-account-initials],
2094
+ .shellui-more-sheet-account .shellui-account-row img {
2095
+ width: 2rem;
2096
+ height: 2rem;
2097
+ font-size: 12px;
2098
+ }
1941
2099
  /* vaul paints an ::after below bottom drawers; the sheet floats, so drop it. */
1942
2100
  .shellui-more-sheet::after {
1943
2101
  content: none !important;
@@ -2189,9 +2347,6 @@ html[data-shellui-keyboard='open']
2189
2347
  border-radius: calc(var(--radius) + 6px);
2190
2348
  box-shadow: var(--shellui-glass-shadow);
2191
2349
  }
2192
- .shellui-start-head {
2193
- border-bottom: 1px solid color-mix(in oklch, var(--border) 60%, transparent);
2194
- }
2195
2350
  .shellui-start-title {
2196
2351
  font-size: 14px;
2197
2352
  font-weight: 600;
@@ -2201,8 +2356,31 @@ html[data-shellui-keyboard='open']
2201
2356
  margin-top: 2px;
2202
2357
  font-size: 12.5px;
2203
2358
  }
2204
- .shellui-start-foot {
2205
- border-top: 1px solid color-mix(in oklch, var(--border) 60%, transparent);
2359
+ .shellui-start-label {
2360
+ font-size: 12px;
2361
+ font-weight: 600;
2362
+ text-transform: none;
2363
+ letter-spacing: 0;
2364
+ }
2365
+ .shellui-task.shellui-task-icon {
2366
+ width: 38px;
2367
+ justify-content: center;
2368
+ padding: 0;
2369
+ }
2370
+ .shellui-start-settings {
2371
+ display: inline-flex;
2372
+ width: 36px;
2373
+ height: 36px;
2374
+ flex: none;
2375
+ align-items: center;
2376
+ justify-content: center;
2377
+ border-radius: var(--shellui-r-row);
2378
+ color: var(--shellui-nav-icon);
2379
+ cursor: pointer;
2380
+ }
2381
+ .shellui-start-settings:hover {
2382
+ background: var(--shellui-nav-hover);
2383
+ color: var(--popover-foreground);
2206
2384
  }
2207
2385
  .shellui-start-row {
2208
2386
  display: flex;
@@ -2274,6 +2452,18 @@ html[data-shellui-keyboard='open']
2274
2452
  }
2275
2453
  }
2276
2454
 
2455
+ /*
2456
+ * Fullscreen layout on phones: top pads by safe-area-top + 12px, sides and bottom
2457
+ * by their safe area. The 12px only applies when there is a top inset (the min()
2458
+ * term is 0 on a plain desktop browser).
2459
+ */
2460
+ .shellui-fullscreen-safe {
2461
+ padding-top: calc(var(--shellui-safe-area-top) + min(12px, var(--shellui-safe-area-top) * 1000));
2462
+ padding-right: var(--shellui-safe-area-right);
2463
+ padding-bottom: var(--shellui-safe-area-bottom);
2464
+ padding-left: var(--shellui-safe-area-left);
2465
+ }
2466
+
2277
2467
  /* Fullscreen layout (Tauri): a small glass group keeps history buttons legible on any content. */
2278
2468
  .shellui-history-glass {
2279
2469
  gap: 2px;