@shellui/core 0.4.0 → 0.5.0-alpha.1

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 (145) hide show
  1. package/README.md +2 -2
  2. package/package.json +15 -3
  3. package/schemas/curated-themes.json +4035 -0
  4. package/schemas/shellui.config.schema.json +961 -0
  5. package/schemas/shellui.theme.schema.json +187 -0
  6. package/src/app.tsx +4 -1
  7. package/src/components/ContentView.tsx +144 -9
  8. package/src/components/LoadingOverlay.tsx +1 -1
  9. package/src/components/ui/alert-dialog.tsx +1 -1
  10. package/src/components/ui/dialog.tsx +23 -5
  11. package/src/components/ui/drawer.tsx +282 -42
  12. package/src/components/ui/dropdown-menu.tsx +7 -2
  13. package/src/components/ui/input.tsx +21 -0
  14. package/src/components/ui/separator.tsx +23 -0
  15. package/src/components/ui/sheet.tsx +220 -0
  16. package/src/components/ui/sidebar.tsx +785 -221
  17. package/src/components/ui/skeleton.tsx +13 -0
  18. package/src/constants/urls.ts +1 -0
  19. package/src/features/admin/utils.ts +2 -45
  20. package/src/features/alertDialog/DialogContext.tsx +1 -1
  21. package/src/features/auth/components/LoginButton.tsx +25 -18
  22. package/src/features/auth/components/LoginPreferencesControls.tsx +124 -0
  23. package/src/features/auth/components/LoginView.tsx +131 -49
  24. package/src/features/config/types.ts +64 -82
  25. package/src/features/drawer/DrawerContext.tsx +55 -19
  26. package/src/features/layouts/AppLayout.tsx +3 -3
  27. package/src/features/layouts/OverlayShell.tsx +376 -77
  28. package/src/features/layouts/appbar/AppBarLayout.tsx +501 -88
  29. package/src/features/layouts/branding/AppBrandIcon.tsx +95 -0
  30. package/src/features/layouts/branding/resolveThemeAsset.spec.ts +33 -0
  31. package/src/features/layouts/branding/resolveThemeAsset.ts +33 -0
  32. package/src/features/layouts/chrome/CollapsedDesktopTitlebar.tsx +49 -0
  33. package/src/features/layouts/chrome/ContentDragOverlay.tsx +19 -0
  34. package/src/features/layouts/chrome/DesktopBackButton.tsx +71 -0
  35. package/src/features/layouts/chrome/DesktopChrome.tsx +28 -0
  36. package/src/features/layouts/chrome/DesktopForwardButton.tsx +59 -0
  37. package/src/features/layouts/chrome/DesktopHistoryButtons.tsx +16 -0
  38. package/src/features/layouts/chrome/constants.ts +11 -0
  39. package/src/features/layouts/chrome/goDesktopBack.spec.ts +218 -0
  40. package/src/features/layouts/chrome/goDesktopBack.ts +106 -0
  41. package/src/features/layouts/chrome/index.ts +26 -0
  42. package/src/features/layouts/chrome/runtime.ts +45 -0
  43. package/src/features/layouts/findMatchingNavigationItem.spec.ts +55 -0
  44. package/src/features/layouts/fullscreen/FullscreenLayout.tsx +17 -1
  45. package/src/features/layouts/isFrameForAppUrl.spec.ts +33 -0
  46. package/src/features/layouts/sidebar/NavigationContent.tsx +70 -34
  47. package/src/features/layouts/sidebar/SidebarIcons.tsx +41 -42
  48. package/src/features/layouts/sidebar/SidebarInner.tsx +142 -24
  49. package/src/features/layouts/sidebar/SidebarLayout.tsx +100 -37
  50. package/src/features/layouts/sidebar/sidebarUtils.ts +0 -7
  51. package/src/features/layouts/sidebar/types.ts +3 -3
  52. package/src/features/layouts/utils.ts +73 -5
  53. package/src/features/layouts/windows/WindowsLayout.tsx +173 -61
  54. package/src/features/modal/ModalContext.spec.ts +77 -0
  55. package/src/features/modal/ModalContext.tsx +32 -57
  56. package/src/features/modal/validateAndNormalizeUrl.ts +96 -0
  57. package/src/features/overlays/OverlayDrawerPendingBar.tsx +26 -0
  58. package/src/features/overlays/OverlayDynamicDemoView.tsx +108 -0
  59. package/src/features/overlays/OverlayPendingSpinner.tsx +18 -0
  60. package/src/features/overlays/ResponsiveModal.tsx +483 -0
  61. package/src/features/overlays/overlaySize.spec.ts +71 -0
  62. package/src/features/overlays/overlaySize.ts +228 -0
  63. package/src/features/overlays/useOverlayReportedSize.ts +130 -0
  64. package/src/features/settings/SettingsProvider.tsx +66 -46
  65. package/src/features/settings/SettingsView.tsx +42 -47
  66. package/src/features/settings/components/Appearance.tsx +305 -55
  67. package/src/features/settings/components/develop/DrawerTestButtons.tsx +18 -0
  68. package/src/features/settings/components/develop/ModalTestButtons.tsx +23 -0
  69. package/src/features/settings/utils/getResolvedAppearanceForSettings.ts +11 -5
  70. package/src/features/storage/StoragePickerContext.tsx +3 -3
  71. package/src/features/theme/applyTheme.ts +143 -0
  72. package/src/features/theme/color.ts +83 -0
  73. package/src/features/theme/curated/amber-minimal.json +86 -0
  74. package/src/features/theme/curated/amethyst-haze.json +86 -0
  75. package/src/features/theme/curated/astro-vista.json +86 -0
  76. package/src/features/theme/curated/bold-tech.json +86 -0
  77. package/src/features/theme/curated/bubblegum.json +86 -0
  78. package/src/features/theme/curated/caffeine.json +83 -0
  79. package/src/features/theme/curated/candyland.json +86 -0
  80. package/src/features/theme/curated/catppuccin.json +86 -0
  81. package/src/features/theme/curated/claude.json +86 -0
  82. package/src/features/theme/curated/claymorphism.json +86 -0
  83. package/src/features/theme/curated/clean-slate.json +86 -0
  84. package/src/features/theme/curated/cosmic-night.json +86 -0
  85. package/src/features/theme/curated/cyberpunk.json +86 -0
  86. package/src/features/theme/curated/darkmatter.json +86 -0
  87. package/src/features/theme/curated/doom-64.json +86 -0
  88. package/src/features/theme/curated/elegant-luxury.json +86 -0
  89. package/src/features/theme/curated/graphite.json +86 -0
  90. package/src/features/theme/curated/index.ts +260 -0
  91. package/src/features/theme/curated/kodama-grove.json +86 -0
  92. package/src/features/theme/curated/light-green.json +87 -0
  93. package/src/features/theme/curated/midnight-bloom.json +86 -0
  94. package/src/features/theme/curated/mocha-mousse.json +86 -0
  95. package/src/features/theme/curated/modern-minimal.json +86 -0
  96. package/src/features/theme/curated/mono.json +84 -0
  97. package/src/features/theme/curated/nature.json +86 -0
  98. package/src/features/theme/curated/neo-brutalism.json +86 -0
  99. package/src/features/theme/curated/northern-lights.json +86 -0
  100. package/src/features/theme/curated/notebook.json +87 -0
  101. package/src/features/theme/curated/ocean-breeze.json +86 -0
  102. package/src/features/theme/curated/pastel-dreams.json +86 -0
  103. package/src/features/theme/curated/perpetuity.json +86 -0
  104. package/src/features/theme/curated/quantum-rose.json +86 -0
  105. package/src/features/theme/curated/retro-arcade.json +86 -0
  106. package/src/features/theme/curated/sage-garden.json +86 -0
  107. package/src/features/theme/curated/shadcn.json +83 -0
  108. package/src/features/theme/curated/shellui.json +82 -0
  109. package/src/features/theme/curated/soft-pop.json +86 -0
  110. package/src/features/theme/curated/solar-dusk.json +86 -0
  111. package/src/features/theme/curated/starry-night.json +86 -0
  112. package/src/features/theme/curated/sunset-horizon.json +86 -0
  113. package/src/features/theme/curated/supabase.json +85 -0
  114. package/src/features/theme/curated/t3-chat.json +83 -0
  115. package/src/features/theme/curated/tangerine.json +86 -0
  116. package/src/features/theme/curated/twitter.json +86 -0
  117. package/src/features/theme/curated/vercel.json +86 -0
  118. package/src/features/theme/curated/vintage-paper.json +86 -0
  119. package/src/features/theme/curated/violet-bloom.json +87 -0
  120. package/src/features/theme/curated/zen-inspired.json +87 -0
  121. package/src/features/theme/index.ts +76 -0
  122. package/src/features/theme/normalize.ts +159 -0
  123. package/src/features/theme/registry.ts +50 -0
  124. package/src/features/theme/resolveConfig.ts +182 -0
  125. package/src/features/theme/safeApplyTheme.ts +147 -0
  126. package/src/features/theme/themes.spec.ts +276 -0
  127. package/src/features/theme/themes.ts +82 -558
  128. package/src/features/theme/tokenKeys.ts +60 -0
  129. package/src/features/theme/types.ts +170 -0
  130. package/src/features/theme/useTheme.tsx +48 -50
  131. package/src/hooks/use-mobile.tsx +19 -0
  132. package/src/i18n/translations/en/common.json +41 -0
  133. package/src/i18n/translations/en/settings.json +10 -2
  134. package/src/i18n/translations/fr/common.json +41 -0
  135. package/src/i18n/translations/fr/settings.json +10 -2
  136. package/src/index.css +372 -128
  137. package/src/index.ts +71 -0
  138. package/src/lib/z-index.ts +4 -1
  139. package/src/routes/components/IndexRoute.tsx +12 -2
  140. package/src/routes/components/NavigationItemRoute.tsx +1 -10
  141. package/src/routes/hooks/useNavigationItems.ts +29 -44
  142. package/src/routes/routes.tsx +58 -27
  143. package/tailwind.config.js +27 -27
  144. package/src/features/layouts/sidebar/BottomNavItem.tsx +0 -88
  145. package/src/features/layouts/sidebar/MobileBottomNav.tsx +0 -168
package/src/index.css CHANGED
@@ -16,73 +16,76 @@
16
16
  * for JavaScript overrides to work properly
17
17
  */
18
18
  :root {
19
- --background: 0 0% 100%;
20
- --foreground: 222.2 84% 4.9%;
21
- --card: 0 0% 100%;
22
- --card-foreground: 222.2 84% 4.9%;
23
- --popover: 0 0% 100%;
24
- --popover-foreground: 222.2 84% 4.9%;
25
- --primary: 142 71% 45%;
26
- --primary-foreground: 0 0% 100%;
27
- --secondary: 210 40% 96.1%;
28
- --secondary-foreground: 222.2 47.4% 11.2%;
29
- --muted: 210 40% 96.1%;
30
- --muted-foreground: 215.4 16.3% 46.9%;
31
- --accent: 210 40% 96.1%;
32
- --accent-foreground: 222.2 47.4% 11.2%;
33
- --destructive: 0 84.2% 60.2%;
34
- --destructive-foreground: 210 40% 98%;
35
- --border: 214.3 31.8% 91.4%;
36
- --input: 214.3 31.8% 91.4%;
37
- --ring: 222.2 84% 4.9%;
19
+ --background: oklch(1 0.0001 263.2831);
20
+ --foreground: oklch(0.2101 0.0318 264.6685);
21
+ --card: oklch(0.9846 0.0018 248.5713);
22
+ --card-foreground: oklch(0.2101 0.0318 264.6685);
23
+ --popover: oklch(1 0.0001 263.2831);
24
+ --popover-foreground: oklch(0.2101 0.0318 264.6685);
25
+ --primary: oklch(0.7609 0.1541 80.8397);
26
+ --primary-foreground: oklch(0.195 0.0239 83.9752);
27
+ --secondary: oklch(0.967 0.003 264.5101);
28
+ --secondary-foreground: oklch(0.2101 0.0318 264.6685);
29
+ --muted: oklch(0.967 0.003 264.5101);
30
+ --muted-foreground: oklch(0.551 0.0234 264.3657);
31
+ --accent: oklch(0.967 0.003 264.5101);
32
+ --accent-foreground: oklch(0.2101 0.0318 264.6685);
33
+ --destructive: oklch(0.5771 0.2151 27.3175);
34
+ --destructive-foreground: oklch(1 0.0001 263.2831);
35
+ --border: oklch(0.9276 0.0059 264.5182);
36
+ --input: oklch(0.9276 0.0059 264.5182);
37
+ --ring: oklch(0.6894 0.1397 83.6763);
38
38
  --radius: 0.5rem;
39
- --sidebar-background: 0 0% 98%;
40
- --sidebar-foreground: 240 5.3% 26.1%;
41
- --sidebar-primary: 240 5.9% 10%;
42
- --sidebar-primary-foreground: 0 0% 98%;
43
- --sidebar-accent: 240 4.8% 95.9%;
44
- --sidebar-accent-foreground: 240 5.9% 10%;
45
- --sidebar-border: 220 13% 91%;
46
- --sidebar-ring: 217.2 91.2% 59.8%;
39
+ --sidebar-background: oklch(0.9846 0.0018 248.5713);
40
+ --sidebar-foreground: oklch(0.4461 0.0264 256.8155);
41
+ --sidebar-primary: oklch(0.7609 0.1541 80.8397);
42
+ --sidebar-primary-foreground: oklch(0.195 0.0239 83.9752);
43
+ --sidebar-accent: oklch(0.967 0.003 264.5101);
44
+ --sidebar-accent-foreground: oklch(0.2101 0.0318 264.6685);
45
+ --sidebar-border: oklch(0.9276 0.0059 264.5182);
46
+ --sidebar-ring: oklch(0.6894 0.1397 83.6763);
47
+ --sidebar: var(--sidebar-background);
47
48
  }
48
49
 
49
50
  .dark {
50
- --background: 222.2 84% 4.9%;
51
- --foreground: 210 40% 98%;
52
- --card: 222.2 84% 4.9%;
53
- --card-foreground: 210 40% 98%;
54
- --popover: 222.2 84% 4.9%;
55
- --popover-foreground: 210 40% 98%;
56
- --primary: 142 71% 55%;
57
- --primary-foreground: 0 0% 100%;
58
- --secondary: 217.2 32.6% 17.5%;
59
- --secondary-foreground: 210 40% 98%;
60
- --muted: 217.2 32.6% 17.5%;
61
- --muted-foreground: 215 20.2% 65.1%;
62
- --accent: 217.2 32.6% 17.5%;
63
- --accent-foreground: 210 40% 98%;
64
- --destructive: 0 62.8% 30.6%;
65
- --destructive-foreground: 210 40% 98%;
66
- --border: 217.2 32.6% 17.5%;
67
- --input: 217.2 32.6% 17.5%;
68
- --ring: 212.7 26.8% 83.9%;
69
- --sidebar-background: 240 5.9% 10%;
70
- --sidebar-foreground: 240 4.8% 95.9%;
71
- --sidebar-primary: 224.3 76.3% 94.9%;
72
- --sidebar-primary-foreground: 240 5.9% 10%;
73
- --sidebar-accent: 240 3.7% 15.9%;
74
- --sidebar-accent-foreground: 240 4.8% 95.9%;
75
- --sidebar-border: 240 3.7% 15.9%;
76
- --sidebar-ring: 217.2 91.2% 59.8%;
51
+ --background: oklch(0.1296 0.0274 261.6981);
52
+ --foreground: oklch(0.9846 0.0018 248.5713);
53
+ --card: oklch(0.2101 0.0318 264.6685);
54
+ --card-foreground: oklch(0.9846 0.0018 248.5713);
55
+ --popover: oklch(0.2101 0.0318 264.6685);
56
+ --popover-foreground: oklch(0.9846 0.0018 248.5713);
57
+ --primary: oklch(0.8061 0.1364 84.8895);
58
+ --primary-foreground: oklch(0.195 0.0239 83.9752);
59
+ --secondary: oklch(0.2781 0.0296 256.8577);
60
+ --secondary-foreground: oklch(0.9846 0.0018 248.5713);
61
+ --muted: oklch(0.2781 0.0296 256.8577);
62
+ --muted-foreground: oklch(0.7137 0.0192 261.335);
63
+ --accent: oklch(0.2781 0.0296 256.8577);
64
+ --accent-foreground: oklch(0.9846 0.0018 248.5713);
65
+ --destructive: oklch(0.6369 0.2078 25.3221);
66
+ --destructive-foreground: oklch(1 0.0001 263.2831);
67
+ --border: oklch(0.2781 0.0296 256.8577);
68
+ --input: oklch(0.2781 0.0296 256.8577);
69
+ --ring: oklch(0.8061 0.1364 84.8895);
70
+ --radius: 0.5rem;
71
+ --sidebar-background: oklch(0.2101 0.0318 264.6685);
72
+ --sidebar-foreground: oklch(0.9276 0.0059 264.5182);
73
+ --sidebar-primary: oklch(0.8061 0.1364 84.8895);
74
+ --sidebar-primary-foreground: oklch(0.195 0.0239 83.9752);
75
+ --sidebar-accent: oklch(0.2781 0.0296 256.8577);
76
+ --sidebar-accent-foreground: oklch(0.9846 0.0018 248.5713);
77
+ --sidebar-border: oklch(0.2781 0.0296 256.8577);
78
+ --sidebar-ring: oklch(0.8061 0.1364 84.8895);
79
+ --sidebar: var(--sidebar-background);
77
80
  }
78
81
 
79
82
  @layer base {
80
83
  * {
81
- border-color: hsl(var(--border));
84
+ border-color: var(--border);
82
85
  }
83
86
  body {
84
- background-color: hsl(var(--background));
85
- color: hsl(var(--foreground));
87
+ background-color: var(--background);
88
+ color: var(--foreground);
86
89
  font-family: var(
87
90
  --body-font-family,
88
91
  var(
@@ -165,28 +168,6 @@
165
168
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
166
169
  }
167
170
  }
168
- :root {
169
- --sidebar: hsl(0 0% 98%);
170
- --sidebar-foreground: hsl(240 5.3% 26.1%);
171
- --sidebar-primary: hsl(240 5.9% 10%);
172
- --sidebar-primary-foreground: hsl(0 0% 98%);
173
- --sidebar-accent: hsl(240 4.8% 95.9%);
174
- --sidebar-accent-foreground: hsl(240 5.9% 10%);
175
- --sidebar-border: hsl(220 13% 91%);
176
- --sidebar-ring: hsl(217.2 91.2% 59.8%);
177
- }
178
-
179
- .dark {
180
- --sidebar: hsl(240 5.9% 10%);
181
- --sidebar-foreground: hsl(240 4.8% 95.9%);
182
- --sidebar-primary: hsl(224.3 76.3% 48%);
183
- --sidebar-primary-foreground: hsl(0 0% 100%);
184
- --sidebar-accent: hsl(240 3.7% 15.9%);
185
- --sidebar-accent-foreground: hsl(240 4.8% 95.9%);
186
- --sidebar-border: hsl(240 3.7% 15.9%);
187
- --sidebar-ring: hsl(217.2 91.2% 59.8%);
188
- }
189
-
190
171
  /*
191
172
  * @theme directive for Tailwind v4
192
173
  * This registers CSS variables as theme tokens that Tailwind can use
@@ -196,33 +177,34 @@
196
177
  @theme {
197
178
  /* Register CSS variables as theme tokens - these reference the dynamic variables */
198
179
  /* Tailwind v4 will use these to generate utility classes */
199
- --color-background: hsl(var(--background));
200
- --color-foreground: hsl(var(--foreground));
201
- --color-card: hsl(var(--card));
202
- --color-card-foreground: hsl(var(--card-foreground));
203
- --color-popover: hsl(var(--popover));
204
- --color-popover-foreground: hsl(var(--popover-foreground));
205
- --color-primary: hsl(var(--primary));
206
- --color-primary-foreground: hsl(var(--primary-foreground));
207
- --color-secondary: hsl(var(--secondary));
208
- --color-secondary-foreground: hsl(var(--secondary-foreground));
209
- --color-muted: hsl(var(--muted));
210
- --color-muted-foreground: hsl(var(--muted-foreground));
211
- --color-accent: hsl(var(--accent));
212
- --color-accent-foreground: hsl(var(--accent-foreground));
213
- --color-destructive: hsl(var(--destructive));
214
- --color-destructive-foreground: hsl(var(--destructive-foreground));
215
- --color-border: hsl(var(--border));
216
- --color-input: hsl(var(--input));
217
- --color-ring: hsl(var(--ring));
218
- --color-sidebar-background: hsl(var(--sidebar-background));
219
- --color-sidebar-foreground: hsl(var(--sidebar-foreground));
220
- --color-sidebar-primary: hsl(var(--sidebar-primary));
221
- --color-sidebar-primary-foreground: hsl(var(--sidebar-primary-foreground));
222
- --color-sidebar-accent: hsl(var(--sidebar-accent));
223
- --color-sidebar-accent-foreground: hsl(var(--sidebar-accent-foreground));
224
- --color-sidebar-border: hsl(var(--sidebar-border));
225
- --color-sidebar-ring: hsl(var(--sidebar-ring));
180
+ --color-background: var(--background);
181
+ --color-foreground: var(--foreground);
182
+ --color-card: var(--card);
183
+ --color-card-foreground: var(--card-foreground);
184
+ --color-popover: var(--popover);
185
+ --color-popover-foreground: var(--popover-foreground);
186
+ --color-primary: var(--primary);
187
+ --color-primary-foreground: var(--primary-foreground);
188
+ --color-secondary: var(--secondary);
189
+ --color-secondary-foreground: var(--secondary-foreground);
190
+ --color-muted: var(--muted);
191
+ --color-muted-foreground: var(--muted-foreground);
192
+ --color-accent: var(--accent);
193
+ --color-accent-foreground: var(--accent-foreground);
194
+ --color-destructive: var(--destructive);
195
+ --color-destructive-foreground: var(--destructive-foreground);
196
+ --color-border: var(--border);
197
+ --color-input: var(--input);
198
+ --color-ring: var(--ring);
199
+ --color-sidebar-background: var(--sidebar-background);
200
+ --color-sidebar-foreground: var(--sidebar-foreground);
201
+ --color-sidebar-primary: var(--sidebar-primary);
202
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
203
+ --color-sidebar-accent: var(--sidebar-accent);
204
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
205
+ --color-sidebar-border: var(--sidebar-border);
206
+ --color-sidebar-ring: var(--sidebar-ring);
207
+ --color-sidebar: var(--sidebar);
226
208
 
227
209
  /* Border radius tokens */
228
210
  --radius-lg: var(--radius);
@@ -230,9 +212,31 @@
230
212
  --radius-sm: calc(var(--radius) - 4px);
231
213
  }
232
214
 
215
+ /*
216
+ * While switching themes, disable CSS transitions so colors snap instead of morphing.
217
+ * Do NOT disable animations — that restarts Radix dialog/drawer open animations and
218
+ * looks like the settings modal is closing and reopening on every theme change.
219
+ * Overlay surfaces keep their transitions so backdrop fade stays stable.
220
+ * Appearance theme controls keep transitions so disable/pending states can ease in.
221
+ */
222
+ html.shellui-theme-switching
223
+ *:not([data-dialog-overlay]):not([data-sheet-overlay]):not([data-drawer-overlay]):not(
224
+ [data-theme-switch-ui]
225
+ ):not([data-theme-switch-ui] *),
226
+ html.shellui-theme-switching
227
+ *:not([data-dialog-overlay]):not([data-sheet-overlay]):not([data-drawer-overlay]):not(
228
+ [data-theme-switch-ui]
229
+ ):not([data-theme-switch-ui] *)::before,
230
+ html.shellui-theme-switching
231
+ *:not([data-dialog-overlay]):not([data-sheet-overlay]):not([data-drawer-overlay]):not(
232
+ [data-theme-switch-ui]
233
+ ):not([data-theme-switch-ui] *)::after {
234
+ transition: none !important;
235
+ }
236
+
233
237
  @layer base {
234
238
  * {
235
- outline-color: hsl(var(--ring) / 0.5);
239
+ outline-color: color-mix(in oklch, var(--ring) 50%, transparent);
236
240
  }
237
241
 
238
242
  /* Toaster must receive pointer events when a modal has body pointer-events: none (e.g. Radix).
@@ -244,51 +248,51 @@
244
248
 
245
249
  /* Ensure Sonner toasts use theme variables - override Sonner defaults */
246
250
  [data-sonner-toast] {
247
- background-color: hsl(var(--background)) !important;
248
- color: hsl(var(--foreground)) !important;
249
- border-color: hsl(var(--border)) !important;
251
+ background-color: var(--background) !important;
252
+ color: var(--foreground) !important;
253
+ border-color: var(--border) !important;
250
254
  }
251
255
 
252
256
  [data-sonner-toast] [data-description] {
253
- color: hsl(var(--muted-foreground)) !important;
257
+ color: var(--muted-foreground) !important;
254
258
  }
255
259
 
256
260
  [data-sonner-toast] [data-button],
257
261
  [data-sonner-toast] button[data-button] {
258
- background-color: hsl(var(--primary)) !important;
259
- color: hsl(var(--primary-foreground)) !important;
262
+ background-color: var(--primary) !important;
263
+ color: var(--primary-foreground) !important;
260
264
  }
261
265
 
262
266
  [data-sonner-toast] [data-button]:hover,
263
267
  [data-sonner-toast] button[data-button]:hover {
264
- background-color: hsl(var(--primary) / 0.9) !important;
268
+ background-color: color-mix(in oklch, var(--primary) 90%, transparent) !important;
265
269
  }
266
270
 
267
271
  [data-sonner-toast] [data-cancel],
268
272
  [data-sonner-toast] button[data-cancel] {
269
- background-color: hsl(var(--muted)) !important;
270
- color: hsl(var(--muted-foreground)) !important;
273
+ background-color: var(--muted) !important;
274
+ color: var(--muted-foreground) !important;
271
275
  }
272
276
 
273
277
  [data-sonner-toast] [data-cancel]:hover,
274
278
  [data-sonner-toast] button[data-cancel]:hover {
275
- background-color: hsl(var(--muted) / 0.8) !important;
279
+ background-color: color-mix(in oklch, var(--muted) 80%, transparent) !important;
276
280
  }
277
281
 
278
282
  /* Success toast icon uses text color (no separate icon color) */
279
283
  [data-sonner-toast][data-type='success'] [data-icon],
280
284
  [data-sonner-toast][data-type='success'] [data-icon] svg {
281
- color: hsl(var(--foreground)) !important;
285
+ color: var(--foreground) !important;
282
286
  }
283
287
 
284
288
  /* Color error toast icon */
285
289
  [data-sonner-toast][data-type='error'] [data-icon],
286
290
  [data-sonner-toast][data-type='error'] svg {
287
- color: hsl(var(--destructive)) !important;
291
+ color: var(--destructive) !important;
288
292
  }
289
293
 
290
- /* Invert sidebar icons in dark mode - target all icons in sidebar context */
291
- /* Exclude app icon and logo which have their own rules */
294
+ /* Local /icons/ nav items use CSS mask + currentColor (see NavIcon) so they
295
+ * follow sidebar hover/active text. Keep invert only for legacy <img> icons. */
292
296
  .dark [data-sidebar='sidebar'] img[src*='/icons/']:not(.sidebar-app-icon):not(.sidebar-logo),
293
297
  .dark [data-sidebar='sidebar'] img[src*='icons/']:not(.sidebar-app-icon):not(.sidebar-logo),
294
298
  .dark [data-sidebar='sidebar'] img[src$='.svg']:not(.sidebar-app-icon):not(.sidebar-logo) {
@@ -300,19 +304,30 @@
300
304
  filter: invert(1);
301
305
  }
302
306
 
303
- /* Sidebar app icon - match text color for visibility */
304
- /* In light mode: make icon dark to match dark text */
305
- [data-sidebar='sidebar'] img.sidebar-app-icon {
307
+ /* Brand app icon - match chrome text color for visibility.
308
+ * Single-path assets use filters; paired light/dark files use .app-brand-icon-static (no filter). */
309
+ img.app-brand-icon,
310
+ [data-sidebar='sidebar'] img.sidebar-app-icon,
311
+ [data-layout='app-bar'] img.app-bar-app-icon,
312
+ img.windows-app-icon {
306
313
  filter: brightness(0) saturate(100%);
307
314
  opacity: 0.9;
308
315
  }
309
316
 
310
- /* In dark mode: invert to make icon light to match light text */
311
- .dark [data-sidebar='sidebar'] img.sidebar-app-icon {
317
+ .dark img.app-brand-icon,
318
+ .dark [data-sidebar='sidebar'] img.sidebar-app-icon,
319
+ .dark [data-layout='app-bar'] img.app-bar-app-icon,
320
+ .dark img.windows-app-icon {
312
321
  filter: brightness(0) invert(1) saturate(100%);
313
322
  opacity: 0.9;
314
323
  }
315
324
 
325
+ /* Paired light/dark brand assets — show as authored (wins over layout-specific filters) */
326
+ img.app-brand-icon-static {
327
+ filter: none !important;
328
+ opacity: 1;
329
+ }
330
+
316
331
  /* Sidebar logo - dark in light mode, white in dark mode */
317
332
  /* In light mode: make logo dark */
318
333
  [data-sidebar='sidebar'] img.sidebar-logo {
@@ -343,6 +358,41 @@
343
358
  top: 50%;
344
359
  }
345
360
 
361
+ /* Responsive openModal: sheet presentation (mobile) — override centered dialog geometry */
362
+ [data-dialog-content][data-presentation='sheet'] {
363
+ left: 0;
364
+ right: 0;
365
+ top: auto;
366
+ bottom: 0;
367
+ transform: none;
368
+ }
369
+
370
+ /* User-moved / resized dialog — inline left/top/width/height own layout */
371
+ [data-dialog-content][data-geometry='custom'] {
372
+ left: auto;
373
+ top: auto;
374
+ right: auto;
375
+ bottom: auto;
376
+ transform: none;
377
+ /* Never paint larger than the viewport even if state lags a resize */
378
+ max-width: calc(100vw - 16px) !important;
379
+ max-height: calc(100dvh - 16px) !important;
380
+ }
381
+
382
+ [data-dialog-content][data-window-interacting='true'] {
383
+ transition: none !important;
384
+ user-select: none;
385
+ }
386
+
387
+ /* Morph dialog ↔ sheet on resize without remounting iframe content */
388
+ [data-dialog-content][data-presentation] {
389
+ transition-property:
390
+ width, height, max-width, max-height, border-radius, left, right, top, bottom, transform,
391
+ padding;
392
+ transition-duration: 220ms;
393
+ transition-timing-function: ease;
394
+ }
395
+
346
396
  @keyframes dialog-overlay-fade-in {
347
397
  from {
348
398
  opacity: 0;
@@ -380,6 +430,24 @@
380
430
  }
381
431
  }
382
432
 
433
+ /* Opacity-only enter/exit for responsive modal so presentation morph does not re-slide */
434
+ @keyframes responsive-modal-fade-in {
435
+ from {
436
+ opacity: 0;
437
+ }
438
+ to {
439
+ opacity: 1;
440
+ }
441
+ }
442
+ @keyframes responsive-modal-fade-out {
443
+ from {
444
+ opacity: 1;
445
+ }
446
+ to {
447
+ opacity: 0;
448
+ }
449
+ }
450
+
383
451
  [data-dialog-overlay][data-state='open'] {
384
452
  animation: dialog-overlay-fade-in 0.1s ease-out;
385
453
  }
@@ -387,13 +455,145 @@
387
455
  animation: dialog-overlay-fade-out 0.1s ease-in;
388
456
  }
389
457
 
390
- [data-dialog-content][data-state='open'] {
458
+ /* Default dialog (non-responsive / other Dialog usages) */
459
+ [data-dialog-content][data-state='open']:not([data-presentation]) {
391
460
  animation: dialog-content-in 0.1s ease-out 0.05s both;
392
461
  }
393
- [data-dialog-content][data-state='closed'] {
462
+ [data-dialog-content][data-state='closed']:not([data-presentation]) {
394
463
  animation: dialog-content-out 0.1s ease-in both;
395
464
  }
396
465
 
466
+ /* openModal ResponsiveModal — same fade for dialog and sheet (stable across resize) */
467
+ [data-dialog-content][data-presentation][data-state='open'] {
468
+ animation: responsive-modal-fade-in 0.15s ease-out both;
469
+ }
470
+ [data-dialog-content][data-presentation][data-state='closed'] {
471
+ animation: responsive-modal-fade-out 0.12s ease-in both;
472
+ }
473
+
474
+ /* Sheet overlay and panel animations (mobile sidebar) */
475
+ @keyframes sheet-overlay-fade-in {
476
+ from {
477
+ opacity: 0;
478
+ }
479
+ to {
480
+ opacity: 1;
481
+ }
482
+ }
483
+ @keyframes sheet-overlay-fade-out {
484
+ from {
485
+ opacity: 1;
486
+ }
487
+ to {
488
+ opacity: 0;
489
+ }
490
+ }
491
+ @keyframes sheet-content-in-left {
492
+ from {
493
+ transform: translateX(-100%);
494
+ }
495
+ to {
496
+ transform: translateX(0);
497
+ }
498
+ }
499
+ @keyframes sheet-content-out-left {
500
+ from {
501
+ transform: translateX(0);
502
+ }
503
+ to {
504
+ transform: translateX(-100%);
505
+ }
506
+ }
507
+ @keyframes sheet-content-in-right {
508
+ from {
509
+ transform: translateX(100%);
510
+ }
511
+ to {
512
+ transform: translateX(0);
513
+ }
514
+ }
515
+ @keyframes sheet-content-out-right {
516
+ from {
517
+ transform: translateX(0);
518
+ }
519
+ to {
520
+ transform: translateX(100%);
521
+ }
522
+ }
523
+ @keyframes sheet-content-in-top {
524
+ from {
525
+ transform: translateY(-100%);
526
+ }
527
+ to {
528
+ transform: translateY(0);
529
+ }
530
+ }
531
+ @keyframes sheet-content-out-top {
532
+ from {
533
+ transform: translateY(0);
534
+ }
535
+ to {
536
+ transform: translateY(-100%);
537
+ }
538
+ }
539
+ @keyframes sheet-content-in-bottom {
540
+ from {
541
+ transform: translateY(100%);
542
+ }
543
+ to {
544
+ transform: translateY(0);
545
+ }
546
+ }
547
+ @keyframes sheet-content-out-bottom {
548
+ from {
549
+ transform: translateY(0);
550
+ }
551
+ to {
552
+ transform: translateY(100%);
553
+ }
554
+ }
555
+
556
+ [data-sheet-overlay][data-state='open'] {
557
+ animation: sheet-overlay-fade-in 0.2s ease-out both;
558
+ }
559
+ [data-sheet-overlay][data-state='closed'] {
560
+ animation: sheet-overlay-fade-out 0.2s ease-in both;
561
+ pointer-events: none;
562
+ }
563
+
564
+ [data-sheet-content] {
565
+ will-change: transform;
566
+ }
567
+
568
+ [data-sheet-content][data-side='left'][data-state='open'] {
569
+ animation: sheet-content-in-left 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
570
+ }
571
+ [data-sheet-content][data-side='left'][data-state='closed'] {
572
+ animation: sheet-content-out-left 0.18s cubic-bezier(0.4, 0, 1, 1) both;
573
+ pointer-events: none;
574
+ }
575
+ [data-sheet-content][data-side='right'][data-state='open'] {
576
+ animation: sheet-content-in-right 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
577
+ }
578
+ [data-sheet-content][data-side='right'][data-state='closed'] {
579
+ animation: sheet-content-out-right 0.18s cubic-bezier(0.4, 0, 1, 1) both;
580
+ pointer-events: none;
581
+ }
582
+ [data-sheet-content][data-side='top'][data-state='open'] {
583
+ animation: sheet-content-in-top 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
584
+ }
585
+ [data-sheet-content][data-side='top'][data-state='closed'] {
586
+ animation: sheet-content-out-top 0.18s cubic-bezier(0.4, 0, 1, 1) both;
587
+ pointer-events: none;
588
+ }
589
+ [data-sheet-content][data-side='bottom'][data-state='open'] {
590
+ animation: sheet-content-in-bottom 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
591
+ }
592
+ [data-sheet-content][data-side='bottom'][data-state='closed'] {
593
+ animation: sheet-content-out-bottom 0.18s cubic-bezier(0.4, 0, 1, 1) both;
594
+ pointer-events: none;
595
+ }
596
+
397
597
  /* Cookie consent dialog (bottom-left) animations */
398
598
  @keyframes cookie-dialog-content-in {
399
599
  from {
@@ -463,9 +663,53 @@
463
663
 
464
664
  [data-auth-menu-content][data-state='open'] {
465
665
  animation: auth-menu-in 0.16s cubic-bezier(0.22, 1, 0.36, 1) both;
666
+ pointer-events: auto;
466
667
  }
467
668
 
468
669
  [data-auth-menu-content][data-state='closed'] {
469
670
  animation: auth-menu-out 0.12s cubic-bezier(0.4, 0, 1, 1) both;
470
671
  pointer-events: none;
471
672
  }
673
+
674
+ /* Tauri overlay titlebar: drag via data-tauri-drag-region; keep controls clickable. */
675
+ [data-shellui-drag-region],
676
+ [data-tauri-drag-region] {
677
+ app-region: drag;
678
+ -webkit-app-region: drag;
679
+ }
680
+
681
+ [data-shellui-drag-region] [data-shellui-no-drag],
682
+ [data-shellui-no-drag],
683
+ [data-shellui-drag-region] a,
684
+ [data-shellui-drag-region] button,
685
+ [data-shellui-drag-region] input,
686
+ [data-shellui-drag-region] select,
687
+ [data-shellui-drag-region] [role='combobox'] {
688
+ app-region: no-drag;
689
+ -webkit-app-region: no-drag;
690
+ }
691
+
692
+ html[data-shellui-overlay-chrome] {
693
+ --shellui-titlebar-height: 38px;
694
+ --shellui-traffic-lights-width: 78px;
695
+ }
696
+
697
+ /* Keep sidebar chrome above the full-width drag strip so Back / trigger stay clickable. */
698
+ html[data-shellui-overlay-chrome] [data-slot='sidebar-container'] {
699
+ z-index: 46;
700
+ }
701
+
702
+ /* Collapsed Tauri: full-width 38px titlebar; push sidebar + content below it. */
703
+ html[data-shellui-collapsed-titlebar] [data-slot='sidebar-container'] {
704
+ top: var(--shellui-titlebar-height, 38px);
705
+ height: calc(100svh - var(--shellui-titlebar-height, 38px));
706
+ }
707
+
708
+ html[data-shellui-collapsed-titlebar] [data-slot='sidebar-inset'] {
709
+ padding-top: var(--shellui-titlebar-height, 38px);
710
+ }
711
+
712
+ /* Avoid iframe stealing pointer events while dragging the sidebar border. */
713
+ [data-slot='sidebar-wrapper'][data-resizing] iframe {
714
+ pointer-events: none;
715
+ }