@shellui/core 0.5.0-beta.3 → 0.5.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.
Files changed (62) hide show
  1. package/README.md +5 -5
  2. package/package.json +3 -2
  3. package/src/app.tsx +8 -4
  4. package/src/components/ui/dialog.tsx +5 -1
  5. package/src/components/ui/dropdown-menu.tsx +39 -4
  6. package/src/components/ui/sheet.tsx +1 -1
  7. package/src/components/ui/sidebar.tsx +3 -2
  8. package/src/components/ui/tabs.tsx +52 -0
  9. package/src/constants/urls.ts +1 -0
  10. package/src/features/auth/AuthProvider.tsx +17 -6
  11. package/src/features/chromeActions/ChromeActionIcons.tsx +261 -0
  12. package/src/features/chromeActions/ChromeActionsDemoView.tsx +149 -0
  13. package/src/features/chromeActions/ChromeActionsHost.tsx +1511 -0
  14. package/src/features/chromeActions/ChromeActionsProvider.tsx +141 -0
  15. package/src/features/chromeActions/chromeActionsStore.spec.ts +61 -0
  16. package/src/features/chromeActions/chromeActionsStore.ts +77 -0
  17. package/src/features/chromeActions/computeActionInsets.spec.ts +360 -0
  18. package/src/features/chromeActions/computeActionInsets.ts +326 -0
  19. package/src/features/chromeActions/index.ts +26 -0
  20. package/src/features/chromeActions/resolveUuidForRemoveIframe.spec.ts +49 -0
  21. package/src/features/layouts/AppLayout.tsx +4 -4
  22. package/src/features/layouts/OverlayShell.tsx +60 -12
  23. package/src/features/layouts/app-bar-inset/AppBarInsetLayout.tsx +1 -1
  24. package/src/features/layouts/appbar/AppBarLayout.tsx +194 -89
  25. package/src/features/layouts/chrome/DesktopChrome.tsx +17 -3
  26. package/src/features/layouts/chrome/InsetMobileRadiusOverlay.tsx +18 -0
  27. package/src/features/layouts/chrome/index.ts +8 -0
  28. package/src/features/layouts/chrome/runtime.ts +73 -0
  29. package/src/features/layouts/chrome/useScrollHideChrome.ts +210 -0
  30. package/src/features/layouts/floating/FloatingBottomDock.tsx +410 -0
  31. package/src/features/layouts/floating/FloatingLayout.tsx +31 -21
  32. package/src/features/layouts/floating/FloatingStatusScrim.tsx +36 -0
  33. package/src/features/layouts/floating/computeFloatingInsets.spec.ts +5 -5
  34. package/src/features/layouts/floating/computeFloatingInsets.ts +64 -12
  35. package/src/features/layouts/floating/isShellOwnedPath.spec.ts +2 -0
  36. package/src/features/layouts/floating/isShellOwnedPath.ts +1 -0
  37. package/src/features/layouts/floating/layoutChromeStore.spec.ts +138 -0
  38. package/src/features/layouts/floating/layoutChromeStore.ts +169 -6
  39. package/src/features/layouts/floating/useFloatingChrome.ts +20 -30
  40. package/src/features/layouts/sidebar/SidebarLayout.tsx +87 -31
  41. package/src/features/layouts/sidebar-inset/SidebarInsetLayout.tsx +1 -1
  42. package/src/features/layouts/windows/WindowsLayout.tsx +240 -110
  43. package/src/features/overlays/ResponsiveModal.tsx +201 -21
  44. package/src/features/overlays/overlaySize.spec.ts +18 -0
  45. package/src/features/overlays/overlaySize.ts +89 -0
  46. package/src/features/settings/SettingsProvider.tsx +29 -9
  47. package/src/features/settings/components/Develop.tsx +2 -0
  48. package/src/features/settings/components/develop/ChromeActionsTestButtons.tsx +63 -0
  49. package/src/features/storage/uploads/uploadQueue.spec.ts +56 -1
  50. package/src/features/storage/uploads/uploadQueue.ts +42 -1
  51. package/src/features/theme/applyTheme.ts +23 -5
  52. package/src/hooks/use-mobile.tsx +21 -7
  53. package/src/i18n/translations/en/settings.json +9 -0
  54. package/src/i18n/translations/fr/settings.json +9 -0
  55. package/src/index.css +264 -124
  56. package/src/index.html +6 -4
  57. package/src/index.ts +8 -0
  58. package/src/routes/components/RouteFallback.tsx +15 -0
  59. package/src/routes/routes.tsx +14 -0
  60. package/src/features/layouts/floating/FloatingFadeMask.tsx +0 -22
  61. package/src/features/layouts/floating/FloatingTabBar.tsx +0 -437
  62. package/src/features/layouts/floating/FloatingTabIndicator.tsx +0 -216
package/src/index.css CHANGED
@@ -169,10 +169,6 @@
169
169
  border-radius: var(--shellui-floating-sidebar-radius);
170
170
  }
171
171
 
172
- [data-shellui-floating-tabbar] > .shellui-floating-glass {
173
- border-radius: var(--shellui-floating-mobile-radius);
174
- }
175
-
176
172
  .dark .shellui-floating-glass {
177
173
  background:
178
174
  linear-gradient(
@@ -190,160 +186,184 @@
190
186
  0 2px 8px color-mix(in oklch, black 22%, transparent);
191
187
  }
192
188
 
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
189
  /* Desktop floating nav rows / chrome controls: match capped sidebar radius. */
244
190
  .shellui-floating-sidebar-panel .shellui-floating-nav-item,
245
191
  .shellui-floating-sidebar-panel .shellui-floating-nav-control {
246
192
  border-radius: var(--shellui-floating-sidebar-radius);
247
193
  }
248
194
 
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;
195
+ /* Phone/tablet floating dock + pill FAB: binary radius (0 theme → square). */
196
+ [data-shellui-floating-dock-list],
197
+ [data-shellui-floating-dock-tab],
198
+ [data-shellui-chrome-actions-fab][data-shellui-floating-fab='true'] {
199
+ border-radius: var(--shellui-floating-mobile-radius) !important;
275
200
  }
276
201
 
202
+ /* Floating desktop sidebar collapse — transform/opacity only; respect reduced motion. */
277
203
  @media (prefers-reduced-motion: reduce) {
278
- .shellui-floating-fade {
279
- transition: none;
204
+ .shellui-floating-sidebar-panel .shellui-floating-glass,
205
+ .shellui-floating-sidebar-chip .shellui-floating-glass,
206
+ [data-shellui-floating-dock],
207
+ [data-shellui-floating-dock-row],
208
+ [data-shellui-floating-dock-fab] {
209
+ transition: none !important;
210
+ animation: none !important;
280
211
  }
281
212
  }
282
213
 
283
- .shellui-floating-fade-top {
284
- top: 0;
285
- height: 3rem; /* 48px */
286
- --shellui-floating-fade-dir: to bottom;
214
+ /*
215
+ * Floating bottom dock hide-on-scroll (phone/tablet).
216
+ * Slide the whole dock (Tabs + FAB); appear slower, dismiss faster.
217
+ */
218
+ [data-shellui-floating-dock] {
219
+ translate: 0 0;
220
+ transition-property: translate, opacity;
221
+ transition-duration: 380ms;
222
+ transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
287
223
  }
288
224
 
289
- .shellui-floating-fade-bottom {
290
- bottom: 0;
291
- height: 4.5rem; /* 72px */
292
- --shellui-floating-fade-dir: to top;
225
+ [data-shellui-floating-dock][data-chrome-visible='false'] {
226
+ translate: 0 120%;
227
+ opacity: 0;
228
+ pointer-events: none;
229
+ transition-duration: 160ms;
230
+ transition-timing-function: ease-in;
293
231
  }
294
232
 
295
- /* Floating desktop sidebar collapse — transform/opacity only; respect reduced motion. */
296
233
  @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 {
234
+ [data-shellui-floating-dock] {
302
235
  transition: none !important;
303
- animation: none !important;
304
236
  }
305
237
  }
306
238
 
307
239
  /*
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.
240
+ * Floating action chrome hide-on-scroll (phone/tablet) — same timings as the
241
+ * dock: slide the wrapper, fade opacity. Appear slower; dismiss faster.
242
+ * Presence (set/clear) uses data-visible; scroll hide uses data-scroll-hidden.
243
+ * Corner FAB slot still used on non-docked layouts.
244
+ *
245
+ * Shell header layouts (sidebar / app-bar) opt into `data-shell-scroll-sync` and
246
+ * follow the shared `--shellui-chrome-hide-*` vars on <html> instead — see below.
312
247
  */
313
- [data-shellui-floating-tabbar] {
248
+ [data-shellui-chrome-actions-top='overlay'],
249
+ [data-shellui-chrome-actions-fab-slot] {
250
+ opacity: 1;
314
251
  translate: 0 0;
315
- transition-property: translate;
252
+ transition-property: translate, opacity;
316
253
  transition-duration: 380ms;
317
254
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
318
255
  }
319
256
 
320
- [data-shellui-floating-tabbar][data-chrome-visible='false'] {
257
+ [data-shellui-chrome-actions-top='overlay'][data-visible='false'],
258
+ [data-shellui-chrome-actions-fab-slot][data-visible='false'] {
259
+ opacity: 0;
260
+ pointer-events: none;
261
+ }
262
+
263
+ /* Presence-only dismiss stays snappy (not scroll hide). */
264
+ [data-shellui-chrome-actions-top='overlay'][data-visible='false']:not([data-scroll-hidden='true']),
265
+ [data-shellui-chrome-actions-fab-slot][data-visible='false']:not([data-scroll-hidden='true']) {
266
+ transition-duration: 200ms;
267
+ transition-timing-function: ease-out;
268
+ }
269
+
270
+ /* Floating / FAB scroll hide — own slide+fade (not shell-synced). */
271
+ [data-shellui-chrome-actions-top='overlay'][data-scroll-hidden='true']:not(
272
+ [data-shell-scroll-sync]
273
+ ),
274
+ [data-shellui-chrome-actions-fab-slot][data-scroll-hidden='true'] {
275
+ opacity: 0;
276
+ pointer-events: none;
321
277
  transition-duration: 160ms;
322
278
  transition-timing-function: ease-in;
323
279
  }
324
280
 
325
- [data-shellui-floating-tabbar='bottom'][data-chrome-visible='false'] {
326
- translate: 0 120%;
281
+ [data-shellui-chrome-actions-top='overlay'][data-scroll-hidden='true']:not(
282
+ [data-shell-scroll-sync]
283
+ ) {
284
+ translate: 0 -120%;
327
285
  }
328
286
 
329
- [data-shellui-floating-tabbar='top'][data-chrome-visible='false'] {
330
- translate: 0 -120%;
287
+ [data-shellui-chrome-actions-fab-slot][data-scroll-hidden='true'] {
288
+ translate: 0 120%;
331
289
  }
332
290
 
333
- [data-shellui-floating-tabbar] > .shellui-floating-glass {
291
+ /*
292
+ * Shared mobile shell chrome motion (header + inset tray + top action row).
293
+ * One attribute on <html> sets the target; both consumers run the same local
294
+ * translate + opacity transition (same idea as the floating dock).
295
+ */
296
+ [data-shellui-mobile-chrome-stack],
297
+ [data-shellui-chrome-actions-top='overlay'][data-shell-scroll-sync] {
298
+ translate: 0 0;
334
299
  opacity: 1;
335
- transition-property: opacity;
300
+ transition-property: translate, opacity;
336
301
  transition-duration: 380ms;
337
302
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
338
303
  }
339
304
 
340
- [data-shellui-floating-tabbar][data-chrome-visible='false'] > .shellui-floating-glass {
305
+ html[data-shellui-chrome-hidden='true'] [data-shellui-mobile-chrome-stack],
306
+ html[data-shellui-chrome-hidden='true']
307
+ [data-shellui-chrome-actions-top='overlay'][data-shell-scroll-sync] {
308
+ translate: 0 -120%;
341
309
  opacity: 0;
342
- pointer-events: none;
343
310
  transition-duration: 160ms;
344
311
  transition-timing-function: ease-in;
345
312
  }
346
313
 
314
+ [data-shellui-mobile-chrome-stack][data-chrome-visible='false'],
315
+ [data-shellui-chrome-actions-top='overlay'][data-shell-scroll-sync][data-scroll-hidden='true'] {
316
+ pointer-events: none;
317
+ }
318
+
319
+ /* Presence clear still fades locally when actions are removed. */
320
+ [data-shellui-chrome-actions-top='overlay'][data-shell-scroll-sync][data-visible='false'] {
321
+ opacity: 0;
322
+ transition: opacity 200ms ease-out;
323
+ }
324
+
325
+ /*
326
+ * Full-bleed iframe under inset chrome: tray band + box-shadow cutout for the
327
+ * top radius. Overlay is pointer-events: none so taps reach the iframe.
328
+ */
329
+ [data-shellui-inset-radius-overlay]::before {
330
+ content: '';
331
+ position: absolute;
332
+ inset-inline: 0;
333
+ top: 0;
334
+ height: var(--shellui-shell-header-height, 0px);
335
+ background: var(--shellui-inset-chrome);
336
+ }
337
+
338
+ [data-shellui-inset-radius-cutout] {
339
+ position: absolute;
340
+ inset: 0;
341
+ top: var(--shellui-shell-header-height, 0px);
342
+ overflow: hidden;
343
+ }
344
+
345
+ [data-shellui-inset-radius-cutout]::before {
346
+ content: '';
347
+ position: absolute;
348
+ inset: 0;
349
+ border-radius: 1rem 1rem 0 0;
350
+ border: 1px solid var(--border);
351
+ border-bottom-width: 0;
352
+ box-shadow: 0 0 0 100vmax var(--shellui-inset-chrome);
353
+ }
354
+
355
+ @media (prefers-reduced-motion: reduce) {
356
+ [data-shellui-chrome-actions-top='overlay'],
357
+ [data-shellui-chrome-actions-fab-slot] {
358
+ transition: none !important;
359
+ }
360
+
361
+ [data-shellui-mobile-chrome-stack],
362
+ [data-shellui-chrome-actions-top='overlay'][data-shell-scroll-sync] {
363
+ transition: none !important;
364
+ }
365
+ }
366
+
347
367
  /*
348
368
  * Layout chrome safe insets — applied INSIDE the iframe app, never by shrinking
349
369
  * the host iframe (main layout content stays 100%×100% under floating chrome).
@@ -358,6 +378,61 @@
358
378
  box-sizing: border-box;
359
379
  }
360
380
 
381
+ /* Animate live inset changes (action chrome, sidebar collapse, etc.). */
382
+ @property --shellui-inset-top {
383
+ syntax: '<length>';
384
+ inherits: true;
385
+ initial-value: 0px;
386
+ }
387
+ @property --shellui-inset-right {
388
+ syntax: '<length>';
389
+ inherits: true;
390
+ initial-value: 0px;
391
+ }
392
+ @property --shellui-inset-bottom {
393
+ syntax: '<length>';
394
+ inherits: true;
395
+ initial-value: 0px;
396
+ }
397
+ @property --shellui-inset-left {
398
+ syntax: '<length>';
399
+ inherits: true;
400
+ initial-value: 0px;
401
+ }
402
+ @property --shellui-chrome-actions-leading-extra {
403
+ syntax: '<length>';
404
+ inherits: true;
405
+ initial-value: 0px;
406
+ }
407
+
408
+ /* Host: always animate inset CSS vars (sidebar collapse / floating chrome). */
409
+ html {
410
+ transition:
411
+ --shellui-inset-top 200ms cubic-bezier(0.22, 1, 0.36, 1),
412
+ --shellui-inset-right 200ms cubic-bezier(0.22, 1, 0.36, 1),
413
+ --shellui-inset-bottom 200ms cubic-bezier(0.22, 1, 0.36, 1),
414
+ --shellui-inset-left 200ms cubic-bezier(0.22, 1, 0.36, 1),
415
+ --shellui-chrome-actions-leading-extra 200ms cubic-bezier(0.22, 1, 0.36, 1);
416
+ }
417
+
418
+ /* App body padding: only after SDK enables animations (skip initial load). */
419
+ html[data-shellui-layout-chrome-animate] .shellui-apply-layout-chrome-pad {
420
+ transition:
421
+ padding-top 200ms cubic-bezier(0.22, 1, 0.36, 1),
422
+ padding-right 200ms cubic-bezier(0.22, 1, 0.36, 1),
423
+ padding-bottom 200ms cubic-bezier(0.22, 1, 0.36, 1),
424
+ padding-left 200ms cubic-bezier(0.22, 1, 0.36, 1);
425
+ }
426
+
427
+ @media (prefers-reduced-motion: reduce) {
428
+ html {
429
+ transition: none;
430
+ }
431
+ html[data-shellui-layout-chrome-animate] .shellui-apply-layout-chrome-pad {
432
+ transition: none;
433
+ }
434
+ }
435
+
361
436
  /* Scroll clearance so anchors/focus land clear of floating chrome. */
362
437
  html[data-shellui-layout-chrome-pad] .overflow-y-auto,
363
438
  html[data-shellui-layout-chrome-pad] .overflow-auto,
@@ -608,6 +683,11 @@ html.shellui-theme-switching
608
683
  pointer-events: auto !important;
609
684
  }
610
685
 
686
+ /* Chrome-action controls portaled above overlay iframes (modal/drawer). */
687
+ [data-shellui-chrome-actions] [data-shellui-chrome-actions-hit] {
688
+ pointer-events: auto !important;
689
+ }
690
+
611
691
  /* Ensure Sonner toasts use theme variables - override Sonner defaults */
612
692
  [data-sonner-toast] {
613
693
  background-color: var(--background) !important;
@@ -737,13 +817,18 @@ html.shellui-theme-switching
737
817
 
738
818
  /* Dialog / modal — sheet & custom geometry overrides (base left/top come from component classes) */
739
819
 
740
- /* Responsive openModal: sheet presentation (mobile) — override centered dialog geometry */
820
+ /* Responsive openModal: sheet presentation (mobile) — override centered dialog geometry.
821
+ * Do not set `transform: none` — enter/exit slide and swipe-dismiss own transform.
822
+ * Morph transitions omit `transform` so keyframes / drag aren’t fought. */
741
823
  [data-dialog-content][data-presentation='sheet'] {
742
824
  left: 0;
743
825
  right: 0;
744
826
  top: auto;
745
827
  bottom: 0;
746
- transform: none;
828
+ transition-property:
829
+ width, height, max-width, max-height, border-radius, left, right, top, bottom, padding;
830
+ transition-duration: 220ms;
831
+ transition-timing-function: ease;
747
832
  }
748
833
 
749
834
  /* User-moved / resized dialog — inline left/top/width/height own layout */
@@ -764,7 +849,7 @@ html.shellui-theme-switching
764
849
  }
765
850
 
766
851
  /* Morph dialog ↔ sheet on resize without remounting iframe content */
767
- [data-dialog-content][data-presentation] {
852
+ [data-dialog-content][data-presentation='dialog'] {
768
853
  transition-property:
769
854
  width, height, max-width, max-height, border-radius, left, right, top, bottom, transform,
770
855
  padding;
@@ -809,7 +894,8 @@ html.shellui-theme-switching
809
894
  }
810
895
  }
811
896
 
812
- /* Opacity-only enter/exit for responsive modal so presentation morph does not re-slide */
897
+ /* Opacity-only enter/exit for responsive modal *dialog* so presentation morph
898
+ (dialog ↔ sheet on resize) does not re-slide. Sheets get a real slide below. */
813
899
  @keyframes responsive-modal-fade-in {
814
900
  from {
815
901
  opacity: 0;
@@ -827,11 +913,33 @@ html.shellui-theme-switching
827
913
  }
828
914
  }
829
915
 
916
+ /* Mobile openModal-as-sheet — native-like bottom sheet (Vaul-aligned easing). */
917
+ @keyframes responsive-modal-sheet-in {
918
+ from {
919
+ opacity: 1;
920
+ transform: translateY(100%);
921
+ }
922
+ to {
923
+ opacity: 1;
924
+ transform: translateY(0);
925
+ }
926
+ }
927
+ @keyframes responsive-modal-sheet-out {
928
+ from {
929
+ opacity: 1;
930
+ transform: translateY(0);
931
+ }
932
+ to {
933
+ opacity: 1;
934
+ transform: translateY(100%);
935
+ }
936
+ }
937
+
830
938
  [data-dialog-overlay][data-state='open'] {
831
- animation: dialog-overlay-fade-in 0.1s ease-out;
939
+ animation: dialog-overlay-fade-in 0.2s ease-out;
832
940
  }
833
941
  [data-dialog-overlay][data-state='closed'] {
834
- animation: dialog-overlay-fade-out 0.1s ease-in;
942
+ animation: dialog-overlay-fade-out 0.2s ease-in;
835
943
  }
836
944
 
837
945
  /* Alert dialogs — position/size come from inline styles on the component.
@@ -879,16 +987,32 @@ html.shellui-theme-switching
879
987
  animation: dialog-content-out 0.1s ease-in both;
880
988
  }
881
989
 
882
- /* openModal ResponsiveModal — same fade for dialog and sheet (stable across resize) */
883
- [data-dialog-content][data-presentation][data-state='open'] {
990
+ /* openModal ResponsiveModal — dialog stays fade-only (stable across resize morph). */
991
+ [data-dialog-content][data-presentation='dialog'][data-state='open'] {
884
992
  animation: responsive-modal-fade-in 0.15s ease-out both;
885
993
  }
886
- [data-dialog-content][data-presentation][data-state='closed'] {
994
+ [data-dialog-content][data-presentation='dialog'][data-state='closed'] {
887
995
  animation: responsive-modal-fade-out 0.12s ease-in both;
888
996
  }
889
- /* Sheet swipe-dismiss continues from the dragged translate; keep mounted for the slide */
890
- [data-dialog-content][data-presentation='sheet'][data-state='closed'] {
891
- animation: responsive-modal-fade-out 0.28s cubic-bezier(0.32, 0.72, 0, 1) both;
997
+
998
+ /*
999
+ * Mobile sheet: slide up on open, slide down on close.
1000
+ * `data-enter-motion` is set only for the opening beat so a later dialog↔sheet
1001
+ * morph does not re-run the enter slide. No animation-fill-mode on enter — after
1002
+ * the keyframes finish, inline `transform` (swipe drag) must own the property.
1003
+ * Swipe dismiss already translates off-screen; skip the close keyframe then.
1004
+ */
1005
+ [data-dialog-content][data-presentation='sheet'][data-state='open'][data-enter-motion] {
1006
+ animation: responsive-modal-sheet-in 0.42s cubic-bezier(0.32, 0.72, 0, 1);
1007
+ will-change: transform;
1008
+ }
1009
+ [data-dialog-content][data-presentation='sheet'][data-state='closed']:not([data-dismiss='swipe']) {
1010
+ animation: responsive-modal-sheet-out 0.32s cubic-bezier(0.32, 0.72, 0, 1) forwards;
1011
+ will-change: transform;
1012
+ }
1013
+ [data-dialog-content][data-presentation='sheet'][data-state='closed'][data-dismiss='swipe'] {
1014
+ /* Keep the dragged translate; only a light fade if needed */
1015
+ animation: none;
892
1016
  }
893
1017
 
894
1018
  /* Sheet overlay and panel animations (mobile sidebar) */
@@ -1053,6 +1177,22 @@ html.shellui-theme-switching
1053
1177
  }
1054
1178
  }
1055
1179
 
1180
+ /* Chrome action glyph spin (`animate: 'icon-rotate'`). Explicit so we don’t
1181
+ * depend on Tailwind generating `animate-spin` for dynamically applied classes. */
1182
+ @keyframes shellui-chrome-action-spin {
1183
+ to {
1184
+ transform: rotate(360deg);
1185
+ }
1186
+ }
1187
+ [data-shellui-chrome-action-animate='icon-rotate'] {
1188
+ animation: shellui-chrome-action-spin 0.75s linear infinite;
1189
+ }
1190
+ @media (prefers-reduced-motion: reduce) {
1191
+ [data-shellui-chrome-action-animate='icon-rotate'] {
1192
+ animation: none;
1193
+ }
1194
+ }
1195
+
1056
1196
  /* Auth account dropdown menu animation (LoginButton) */
1057
1197
  @keyframes auth-menu-in {
1058
1198
  from {
package/src/index.html CHANGED
@@ -6,7 +6,10 @@
6
6
  name="viewport"
7
7
  content="width=device-width, initial-scale=1.0, viewport-fit=cover"
8
8
  />
9
- <!-- iOS home-screen / standalone: draw under a translucent status bar -->
9
+ <!-- iOS home-screen / standalone: draw under a translucent status bar.
10
+ On iOS 26/27 Home Screen PWAs, the system may still paint Liquid Glass
11
+ status chrome; App Store / Tauri WKWebView does not get that treatment.
12
+ See docs/tauri.md (Browser PWA vs native). -->
10
13
  <meta
11
14
  name="apple-mobile-web-app-capable"
12
15
  content="yes"
@@ -19,9 +22,8 @@
19
22
  name="apple-mobile-web-app-status-bar-style"
20
23
  content="black-translucent"
21
24
  />
22
- <!-- No theme-color here on purpose: in an installed iOS web app it overrides
23
- black-translucent and paints a slab overlays cannot cover. applyTheme adds
24
- one at runtime for the platforms that still honour it. -->
25
+ <!-- No static theme-color: on installed iOS PWAs it can override
26
+ black-translucent. applyTheme sets it only for browser tabs (not PWA / Tauri). -->
25
27
  <title></title>
26
28
  <link
27
29
  rel="icon"
package/src/index.ts CHANGED
@@ -112,3 +112,11 @@ export {
112
112
  getCookieConsentNewHosts,
113
113
  } from './features/cookieConsent/cookieConsent.js';
114
114
  export { useCookieConsent } from './features/cookieConsent/useCookieConsent.js';
115
+ export {
116
+ isTauriRuntime,
117
+ isStandaloneDisplayMode,
118
+ isHomeScreenPwa,
119
+ getShelluiHostKind,
120
+ syncShelluiHostAttribute,
121
+ type ShelluiHostKind,
122
+ } from './features/layouts/chrome/runtime.js';
@@ -1,6 +1,21 @@
1
1
  import { LoadingOverlay } from '../../components/LoadingOverlay';
2
+ import { isShellUiRootWindow } from '../../features/layouts/chrome/SafeAreaTopbar';
2
3
 
4
+ /**
5
+ * Suspense fallback for lazy routes.
6
+ * Nested shell-in-iframe: parent ContentView already shows the loading bar until
7
+ * SHELLUI_INITIALIZED — another bar here reads as a double load / redirect.
8
+ */
3
9
  export function RouteFallback() {
10
+ if (!isShellUiRootWindow()) {
11
+ return (
12
+ <div
13
+ className="h-full min-h-full bg-background"
14
+ aria-hidden
15
+ />
16
+ );
17
+ }
18
+
4
19
  return (
5
20
  <div
6
21
  className="relative h-full min-h-full bg-background"
@@ -22,6 +22,11 @@ const OverlayDynamicDemoView = lazy(() =>
22
22
  default: m.OverlayDynamicDemoView,
23
23
  })),
24
24
  );
25
+ const ChromeActionsDemoView = lazy(() =>
26
+ import('../features/chromeActions/ChromeActionsDemoView').then((m) => ({
27
+ default: m.ChromeActionsDemoView,
28
+ })),
29
+ );
25
30
  const LoginView = lazy(() =>
26
31
  import('../features/auth/components/LoginView').then((m) => ({ default: m.LoginView })),
27
32
  );
@@ -82,6 +87,15 @@ export const createRoutes = (config: ShellUIConfig): RouteObject[] => {
82
87
  </Suspense>
83
88
  ),
84
89
  },
90
+ {
91
+ // Chrome actions demo (develop → iframe set/clear)
92
+ path: urls.chromeActionsDemo.replace(/^\//, ''),
93
+ element: (
94
+ <Suspense fallback={<RouteFallback />}>
95
+ <ChromeActionsDemoView />
96
+ </Suspense>
97
+ ),
98
+ },
85
99
  {
86
100
  // Login route
87
101
  path: urls.login.replace(/^\//, ''),
@@ -1,22 +0,0 @@
1
- /** Soft edge fades — mask-tapered blur so scrolling content softens toward chrome. */
2
- export function FloatingFadeMask({
3
- placement,
4
- visible,
5
- }: {
6
- placement: 'top' | 'bottom';
7
- /** False at the matching scroll edge (top/bottom) or when content does not overflow. */
8
- visible: boolean;
9
- }) {
10
- return (
11
- <div
12
- aria-hidden
13
- data-shellui-floating-fade={placement}
14
- data-visible={visible ? 'true' : 'false'}
15
- className={
16
- placement === 'top'
17
- ? 'shellui-floating-fade shellui-floating-fade-top'
18
- : 'shellui-floating-fade shellui-floating-fade-bottom'
19
- }
20
- />
21
- );
22
- }