@shellui/core 0.4.1 → 0.5.0-alpha.2

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 (142) 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.tsx +21 -8
  55. package/src/features/overlays/OverlayDrawerPendingBar.tsx +26 -0
  56. package/src/features/overlays/OverlayDynamicDemoView.tsx +108 -0
  57. package/src/features/overlays/OverlayPendingSpinner.tsx +18 -0
  58. package/src/features/overlays/ResponsiveModal.tsx +483 -0
  59. package/src/features/overlays/overlaySize.spec.ts +71 -0
  60. package/src/features/overlays/overlaySize.ts +228 -0
  61. package/src/features/overlays/useOverlayReportedSize.ts +130 -0
  62. package/src/features/settings/SettingsProvider.tsx +66 -46
  63. package/src/features/settings/SettingsView.tsx +42 -47
  64. package/src/features/settings/components/Appearance.tsx +305 -55
  65. package/src/features/settings/components/develop/DrawerTestButtons.tsx +18 -0
  66. package/src/features/settings/components/develop/ModalTestButtons.tsx +23 -0
  67. package/src/features/settings/utils/getResolvedAppearanceForSettings.ts +11 -5
  68. package/src/features/theme/applyTheme.ts +143 -0
  69. package/src/features/theme/color.ts +83 -0
  70. package/src/features/theme/curated/amber-minimal.json +86 -0
  71. package/src/features/theme/curated/amethyst-haze.json +86 -0
  72. package/src/features/theme/curated/astro-vista.json +86 -0
  73. package/src/features/theme/curated/bold-tech.json +86 -0
  74. package/src/features/theme/curated/bubblegum.json +86 -0
  75. package/src/features/theme/curated/caffeine.json +83 -0
  76. package/src/features/theme/curated/candyland.json +86 -0
  77. package/src/features/theme/curated/catppuccin.json +86 -0
  78. package/src/features/theme/curated/claude.json +86 -0
  79. package/src/features/theme/curated/claymorphism.json +86 -0
  80. package/src/features/theme/curated/clean-slate.json +86 -0
  81. package/src/features/theme/curated/cosmic-night.json +86 -0
  82. package/src/features/theme/curated/cyberpunk.json +86 -0
  83. package/src/features/theme/curated/darkmatter.json +86 -0
  84. package/src/features/theme/curated/doom-64.json +86 -0
  85. package/src/features/theme/curated/elegant-luxury.json +86 -0
  86. package/src/features/theme/curated/graphite.json +86 -0
  87. package/src/features/theme/curated/index.ts +260 -0
  88. package/src/features/theme/curated/kodama-grove.json +86 -0
  89. package/src/features/theme/curated/light-green.json +87 -0
  90. package/src/features/theme/curated/midnight-bloom.json +86 -0
  91. package/src/features/theme/curated/mocha-mousse.json +86 -0
  92. package/src/features/theme/curated/modern-minimal.json +86 -0
  93. package/src/features/theme/curated/mono.json +84 -0
  94. package/src/features/theme/curated/nature.json +86 -0
  95. package/src/features/theme/curated/neo-brutalism.json +86 -0
  96. package/src/features/theme/curated/northern-lights.json +86 -0
  97. package/src/features/theme/curated/notebook.json +87 -0
  98. package/src/features/theme/curated/ocean-breeze.json +86 -0
  99. package/src/features/theme/curated/pastel-dreams.json +86 -0
  100. package/src/features/theme/curated/perpetuity.json +86 -0
  101. package/src/features/theme/curated/quantum-rose.json +86 -0
  102. package/src/features/theme/curated/retro-arcade.json +86 -0
  103. package/src/features/theme/curated/sage-garden.json +86 -0
  104. package/src/features/theme/curated/shadcn.json +83 -0
  105. package/src/features/theme/curated/shellui.json +82 -0
  106. package/src/features/theme/curated/soft-pop.json +86 -0
  107. package/src/features/theme/curated/solar-dusk.json +86 -0
  108. package/src/features/theme/curated/starry-night.json +86 -0
  109. package/src/features/theme/curated/sunset-horizon.json +86 -0
  110. package/src/features/theme/curated/supabase.json +85 -0
  111. package/src/features/theme/curated/t3-chat.json +83 -0
  112. package/src/features/theme/curated/tangerine.json +86 -0
  113. package/src/features/theme/curated/twitter.json +86 -0
  114. package/src/features/theme/curated/vercel.json +86 -0
  115. package/src/features/theme/curated/vintage-paper.json +86 -0
  116. package/src/features/theme/curated/violet-bloom.json +87 -0
  117. package/src/features/theme/curated/zen-inspired.json +87 -0
  118. package/src/features/theme/index.ts +76 -0
  119. package/src/features/theme/normalize.ts +159 -0
  120. package/src/features/theme/registry.ts +50 -0
  121. package/src/features/theme/resolveConfig.ts +182 -0
  122. package/src/features/theme/safeApplyTheme.ts +147 -0
  123. package/src/features/theme/themes.spec.ts +276 -0
  124. package/src/features/theme/themes.ts +82 -558
  125. package/src/features/theme/tokenKeys.ts +60 -0
  126. package/src/features/theme/types.ts +170 -0
  127. package/src/features/theme/useTheme.tsx +48 -50
  128. package/src/hooks/use-mobile.tsx +19 -0
  129. package/src/i18n/translations/en/common.json +41 -0
  130. package/src/i18n/translations/en/settings.json +10 -2
  131. package/src/i18n/translations/fr/common.json +41 -0
  132. package/src/i18n/translations/fr/settings.json +10 -2
  133. package/src/index.css +372 -128
  134. package/src/index.ts +71 -0
  135. package/src/lib/z-index.ts +4 -1
  136. package/src/routes/components/IndexRoute.tsx +12 -2
  137. package/src/routes/components/NavigationItemRoute.tsx +1 -10
  138. package/src/routes/hooks/useNavigationItems.ts +29 -44
  139. package/src/routes/routes.tsx +63 -27
  140. package/tailwind.config.js +27 -27
  141. package/src/features/layouts/sidebar/BottomNavItem.tsx +0 -88
  142. package/src/features/layouts/sidebar/MobileBottomNav.tsx +0 -168
@@ -0,0 +1,961 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/ShellUIConfig",
4
+ "definitions": {
5
+ "ShellUIConfig": {
6
+ "type": "object",
7
+ "properties": {
8
+ "port": {
9
+ "type": "number"
10
+ },
11
+ "title": {
12
+ "type": "string"
13
+ },
14
+ "version": {
15
+ "type": "string",
16
+ "description": "App version string (e.g. \"1.2.0\"). Shown in Settings > System > Update app."
17
+ },
18
+ "favicon": {
19
+ "type": "string",
20
+ "description": "Favicon path (e.g. '/favicon.svg'). Used for the document link rel=\"icon\"."
21
+ },
22
+ "appIcon": {
23
+ "$ref": "#/definitions/ThemeAsset",
24
+ "description": "Small square app icon (e.g. '/app-icon.svg'). Shown in the sidebar header, app-bar, and windows start menu. Use a string for SVG/mono icons (auto light/dark via CSS), or `{ light, dark }` for paired PNGs."
25
+ },
26
+ "logo": {
27
+ "$ref": "#/definitions/ThemeAsset",
28
+ "description": "Logo path (e.g. '/logo.svg'). Wider wordmark; use a string or `{ light, dark }` pair. Prefer `appIcon` for the small square mark in chrome."
29
+ },
30
+ "language": {
31
+ "anyOf": [
32
+ {
33
+ "type": "string"
34
+ },
35
+ {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "string"
39
+ }
40
+ }
41
+ ]
42
+ },
43
+ "layout": {
44
+ "$ref": "#/definitions/LayoutType",
45
+ "description": "Layout mode: 'sidebar' (default) or 'fullscreen'. Fullscreen shows only content with no navigation."
46
+ },
47
+ "start_url": {
48
+ "type": "string",
49
+ "description": "When set, opening the app at \"/\" redirects to this path (e.g. \"/playground\")."
50
+ },
51
+ "navigation": {
52
+ "type": "array",
53
+ "items": {
54
+ "anyOf": [
55
+ {
56
+ "$ref": "#/definitions/NavigationItem"
57
+ },
58
+ {
59
+ "$ref": "#/definitions/NavigationGroup"
60
+ }
61
+ ]
62
+ }
63
+ },
64
+ "administration": {
65
+ "$ref": "#/definitions/AdministrationConfig",
66
+ "description": "Custom navigation for the staff admin panel (below Dashboard). Propagated to the admin iframe via SDK settings. See Administration docs."
67
+ },
68
+ "storage": {
69
+ "$ref": "#/definitions/StorageConfig",
70
+ "description": "Storage-service connection. Propagated to iframes via SDK settings. Enables Admin → Storage when `url` is set. Settings → Storage (quota) is shown when `url` is set unless `storage.showInSettings` is false."
71
+ },
72
+ "theme": {
73
+ "$ref": "#/definitions/ThemeRef",
74
+ "description": "Single theme: built-in name, path to a theme JSON/folder, or inline theme object. When set without `themes`, only this theme is available in the selector."
75
+ },
76
+ "themes": {
77
+ "anyOf": [
78
+ {
79
+ "$ref": "#/definitions/ThemesConfig"
80
+ },
81
+ {
82
+ "type": "array",
83
+ "items": {
84
+ "$ref": "#/definitions/ThemeDefinition"
85
+ }
86
+ }
87
+ ],
88
+ "description": "Available themes for the app.\n- Array of built-in names, paths, or inline objects\n- Map of id → name | path | object After CLI load, resolved to a `ThemeDefinition[]` for the runtime."
89
+ },
90
+ "themesDir": {
91
+ "type": "string",
92
+ "description": "Directory of theme JSON files (one `.json` per theme) with optional sibling `<name>/fonts/` folders. Resolved by the CLI at load/build time."
93
+ },
94
+ "activeTheme": {
95
+ "type": "string",
96
+ "description": "Active theme name on first visit (and when no user preference is stored). Prefer this over `defaultTheme`."
97
+ },
98
+ "defaultTheme": {
99
+ "type": "string",
100
+ "description": "Default theme name. Alias of `activeTheme` (kept for backward compatibility)."
101
+ },
102
+ "sentry": {
103
+ "$ref": "#/definitions/SentryConfig",
104
+ "description": "Sentry error reporting. Load from env (e.g. SENTRY_DSN). Only active in production builds."
105
+ },
106
+ "backend": {
107
+ "$ref": "#/definitions/BackendConfig",
108
+ "description": "Backend communication config. Defaults to undefined (no backend integration)."
109
+ },
110
+ "cookieConsent": {
111
+ "$ref": "#/definitions/CookieConsentConfig",
112
+ "description": "Cookie consent: list of cookies by category; accepted ids are stored in settings."
113
+ },
114
+ "legalDocuments": {
115
+ "$ref": "#/definitions/LegalDocumentsConfig",
116
+ "description": "Legal documents content rendered as markdown."
117
+ },
118
+ "$schema": {
119
+ "type": "string",
120
+ "description": "JSON Schema URL for editor autocomplete and validation."
121
+ }
122
+ },
123
+ "additionalProperties": false
124
+ },
125
+ "ThemeAsset": {
126
+ "anyOf": [
127
+ {
128
+ "type": "string"
129
+ },
130
+ {
131
+ "type": "object",
132
+ "properties": {
133
+ "light": {
134
+ "type": "string"
135
+ },
136
+ "dark": {
137
+ "type": "string"
138
+ }
139
+ },
140
+ "required": ["light", "dark"],
141
+ "additionalProperties": false
142
+ }
143
+ ],
144
+ "description": "Brand asset path, or separate light/dark files when CSS theming is not enough (typical for full-color PNGs). A single SVG/PNG is recolored for light/dark via CSS."
145
+ },
146
+ "LayoutType": {
147
+ "type": "string",
148
+ "enum": ["sidebar", "fullscreen", "windows", "app-bar"],
149
+ "description": "Layout mode: 'sidebar' (default) shows navigation sidebar; 'fullscreen' shows only content area; 'windows' shows a taskbar with start menu and multi-window desktop; 'app-bar' shows a compact top bar with a 9-square launcher for start links and icon-only end links."
150
+ },
151
+ "NavigationItem": {
152
+ "type": "object",
153
+ "properties": {
154
+ "label": {
155
+ "anyOf": [
156
+ {
157
+ "type": "string"
158
+ },
159
+ {
160
+ "$ref": "#/definitions/LocalizedString"
161
+ }
162
+ ]
163
+ },
164
+ "path": {
165
+ "type": "string"
166
+ },
167
+ "url": {
168
+ "type": "string"
169
+ },
170
+ "icon": {
171
+ "type": "string"
172
+ },
173
+ "hidden": {
174
+ "type": "boolean",
175
+ "description": "When true, hide this item from the sidebar and 404 page; route remains valid and item still appears in Develop settings."
176
+ },
177
+ "hideWhenLoggedOut": {
178
+ "type": "boolean",
179
+ "description": "When true, hide this item from navigation when the user is not authenticated."
180
+ },
181
+ "requiresAuth": {
182
+ "type": "boolean",
183
+ "description": "When true, navigating to this route requires authentication and redirects to login with a next URL."
184
+ },
185
+ "requiresDevMode": {
186
+ "type": "boolean",
187
+ "description": "When true, this item is available only when Settings > Advanced > Developer features is enabled."
188
+ },
189
+ "requiresStaff": {
190
+ "type": "boolean",
191
+ "description": "When true, this item is available only to staff users (`isStaff`)."
192
+ },
193
+ "hiddenOnMobile": {
194
+ "type": "boolean",
195
+ "description": "When true, hide this item on mobile (sidebar sheet). Has no effect if hidden is true."
196
+ },
197
+ "hiddenOnDesktop": {
198
+ "type": "boolean",
199
+ "description": "When true, hide this item on desktop (sidebar). Has no effect if hidden is true."
200
+ },
201
+ "openIn": {
202
+ "type": "string",
203
+ "enum": ["default", "modal", "drawer", "external"],
204
+ "description": "How to open this link: 'default' (navigate in main area), 'modal', 'drawer', or 'external' (target=\"_blank\")."
205
+ },
206
+ "useHashRouter": {
207
+ "type": "boolean",
208
+ "description": "When true, the app uses hash-based routing (e.g. /#/path). If omitted, inferred from url containing /#/."
209
+ },
210
+ "drawerPosition": {
211
+ "$ref": "#/definitions/DrawerPosition",
212
+ "description": "Optional drawer position when openIn === 'drawer'. Default is 'right' if omitted."
213
+ },
214
+ "position": {
215
+ "type": "string",
216
+ "enum": ["start", "end"],
217
+ "description": "Sidebar position: 'start' (default) or 'end'. End items are rendered in the sidebar footer."
218
+ },
219
+ "settings": {
220
+ "type": "string",
221
+ "description": "URL to display as a settings panel in Settings > Applications. When set, the nav item appears in the Applications group."
222
+ },
223
+ "safeForAuthToken": {
224
+ "type": "boolean",
225
+ "description": "Trust control for auth token sharing to iframe apps.\n- undefined/true: trusted (default), token can be shared\n- false: untrusted, token is never shared"
226
+ }
227
+ },
228
+ "required": ["label", "path", "url"],
229
+ "additionalProperties": false
230
+ },
231
+ "LocalizedString": {
232
+ "anyOf": [
233
+ {
234
+ "type": "string"
235
+ },
236
+ {
237
+ "type": "object",
238
+ "properties": {
239
+ "en": {
240
+ "type": "string"
241
+ },
242
+ "fr": {
243
+ "type": "string"
244
+ }
245
+ },
246
+ "required": ["en", "fr"],
247
+ "additionalProperties": {
248
+ "type": "string"
249
+ }
250
+ }
251
+ ]
252
+ },
253
+ "DrawerPosition": {
254
+ "type": "string",
255
+ "enum": ["top", "bottom", "left", "right"],
256
+ "description": "Drawer position when opening a link in a drawer (optional, used when openIn === 'drawer')."
257
+ },
258
+ "NavigationGroup": {
259
+ "type": "object",
260
+ "properties": {
261
+ "title": {
262
+ "anyOf": [
263
+ {
264
+ "type": "string"
265
+ },
266
+ {
267
+ "$ref": "#/definitions/LocalizedString"
268
+ }
269
+ ]
270
+ },
271
+ "items": {
272
+ "type": "array",
273
+ "items": {
274
+ "$ref": "#/definitions/NavigationItem"
275
+ }
276
+ },
277
+ "position": {
278
+ "type": "string",
279
+ "enum": ["start", "end"],
280
+ "description": "Sidebar position: 'start' (default) or 'end'. End groups are rendered in the sidebar footer."
281
+ }
282
+ },
283
+ "required": ["title", "items"],
284
+ "additionalProperties": false
285
+ },
286
+ "AdministrationConfig": {
287
+ "type": "object",
288
+ "properties": {
289
+ "title": {
290
+ "anyOf": [
291
+ {
292
+ "type": "string"
293
+ },
294
+ {
295
+ "$ref": "#/definitions/LocalizedString"
296
+ }
297
+ ],
298
+ "description": "Section title shown in the admin sidebar below Dashboard."
299
+ },
300
+ "navigation": {
301
+ "type": "array",
302
+ "items": {
303
+ "$ref": "#/definitions/NavigationItem"
304
+ },
305
+ "description": "Flat list of navigation items (same shape as top-level `navigation` items). Order is preserved in the admin sidebar."
306
+ }
307
+ },
308
+ "required": ["title", "navigation"],
309
+ "additionalProperties": false,
310
+ "description": "Custom navigation section for the staff administration panel. Admin app URL remains `backend.adminUrl` / `backend.adminPathname`. v1 is a flat list only (no nested groups)."
311
+ },
312
+ "StorageConfig": {
313
+ "type": "object",
314
+ "properties": {
315
+ "url": {
316
+ "type": "string",
317
+ "description": "Base URL of storage-service (e.g. `http://localhost:8001`)."
318
+ },
319
+ "filesUrl": {
320
+ "type": "string",
321
+ "description": "Files explorer app URL embedded under Admin → Storage → Files (e.g. `http://localhost:5175/`)."
322
+ },
323
+ "showInSettings": {
324
+ "type": "boolean",
325
+ "description": "When false, hide Settings → Storage even if `url` is set. Admin Storage is unaffected. Default: true."
326
+ }
327
+ },
328
+ "required": ["url"],
329
+ "additionalProperties": false,
330
+ "description": "Optional storage-service wiring for the shell and admin panel. When set, admin shows the Storage sidebar (files explorer, statistics, Django admin). Settings → Storage (quota) appears when `url` is set, unless `showInSettings` is false. ShellUI will also use this for the SDK file API (`shellui.storage`)."
331
+ },
332
+ "ThemeRef": {
333
+ "anyOf": [
334
+ {
335
+ "type": "string"
336
+ },
337
+ {
338
+ "$ref": "#/definitions/ThemeInput"
339
+ },
340
+ {
341
+ "$ref": "#/definitions/ThemeDefinition"
342
+ }
343
+ ],
344
+ "description": "Built-in name, filesystem path, or inline theme object."
345
+ },
346
+ "ThemeInput": {
347
+ "type": "object",
348
+ "properties": {
349
+ "version": {
350
+ "anyOf": [
351
+ {
352
+ "type": "number",
353
+ "const": 1
354
+ },
355
+ {
356
+ "type": "number"
357
+ }
358
+ ],
359
+ "description": "Theme JSON schema version. Required in theme folder JSON files (must be 1). Optional for inline config objects."
360
+ },
361
+ "$schema": {
362
+ "type": "string",
363
+ "description": "JSON Schema URL for editor tooling (theme JSON files)."
364
+ },
365
+ "name": {
366
+ "type": "string"
367
+ },
368
+ "label": {
369
+ "type": "string",
370
+ "description": "Human-readable label (preferred)."
371
+ },
372
+ "displayName": {
373
+ "type": "string",
374
+ "deprecated": "Prefer `label`. Kept for existing configs."
375
+ },
376
+ "description": {
377
+ "type": "string"
378
+ },
379
+ "recommended": {
380
+ "type": "boolean"
381
+ },
382
+ "fonts": {
383
+ "$ref": "#/definitions/ThemeFonts"
384
+ },
385
+ "fontFamily": {
386
+ "type": "string"
387
+ },
388
+ "headingFontFamily": {
389
+ "type": "string"
390
+ },
391
+ "bodyFontFamily": {
392
+ "type": "string"
393
+ },
394
+ "fontFiles": {
395
+ "type": "array",
396
+ "items": {
397
+ "type": "string"
398
+ }
399
+ },
400
+ "letterSpacing": {
401
+ "type": "string"
402
+ },
403
+ "textShadow": {
404
+ "type": "string"
405
+ },
406
+ "lineHeight": {
407
+ "type": "string"
408
+ },
409
+ "radius": {
410
+ "type": "string",
411
+ "description": "Shared radius applied to both modes when mode tokens omit `radius`."
412
+ },
413
+ "light": {
414
+ "$ref": "#/definitions/ThemeColorsModePartial"
415
+ },
416
+ "dark": {
417
+ "$ref": "#/definitions/ThemeColorsModePartial"
418
+ },
419
+ "colors": {
420
+ "type": "object",
421
+ "properties": {
422
+ "light": {
423
+ "$ref": "#/definitions/ThemeColorsModePartial"
424
+ },
425
+ "dark": {
426
+ "$ref": "#/definitions/ThemeColorsModePartial"
427
+ }
428
+ },
429
+ "required": ["light", "dark"],
430
+ "additionalProperties": false,
431
+ "description": "Legacy full colors object (required keys when used as a complete theme)."
432
+ }
433
+ },
434
+ "additionalProperties": false,
435
+ "description": "Flexible theme object for config or theme JSON files. Supports compact (`light`/`dark` + `label`) and legacy (`colors` + `displayName`) shapes. Partial light/dark tokens are merged onto the default theme."
436
+ },
437
+ "ThemeFonts": {
438
+ "type": "object",
439
+ "properties": {
440
+ "sans": {
441
+ "type": "string",
442
+ "description": "Sans / UI font stack"
443
+ },
444
+ "mono": {
445
+ "type": "string",
446
+ "description": "Monospace font stack"
447
+ },
448
+ "serif": {
449
+ "type": "string",
450
+ "description": "Serif font stack"
451
+ },
452
+ "heading": {
453
+ "type": "string",
454
+ "description": "Heading font stack (falls back to sans)"
455
+ },
456
+ "body": {
457
+ "type": "string",
458
+ "description": "Body font stack (falls back to sans)"
459
+ },
460
+ "files": {
461
+ "type": "array",
462
+ "items": {
463
+ "type": "string"
464
+ },
465
+ "description": "Font file URLs or paths (Google Fonts CSS, local `.css`, or `.woff2`). Paths in theme JSON are relative to the theme file / themesDir."
466
+ }
467
+ },
468
+ "additionalProperties": false,
469
+ "description": "Optional font packaging for a theme."
470
+ },
471
+ "ThemeColorsModePartial": {
472
+ "type": "object",
473
+ "properties": {
474
+ "background": {
475
+ "type": "string"
476
+ },
477
+ "foreground": {
478
+ "type": "string"
479
+ },
480
+ "card": {
481
+ "type": "string"
482
+ },
483
+ "cardForeground": {
484
+ "type": "string"
485
+ },
486
+ "popover": {
487
+ "type": "string"
488
+ },
489
+ "popoverForeground": {
490
+ "type": "string"
491
+ },
492
+ "primary": {
493
+ "type": "string"
494
+ },
495
+ "primaryForeground": {
496
+ "type": "string"
497
+ },
498
+ "secondary": {
499
+ "type": "string"
500
+ },
501
+ "secondaryForeground": {
502
+ "type": "string"
503
+ },
504
+ "muted": {
505
+ "type": "string"
506
+ },
507
+ "mutedForeground": {
508
+ "type": "string"
509
+ },
510
+ "accent": {
511
+ "type": "string"
512
+ },
513
+ "accentForeground": {
514
+ "type": "string"
515
+ },
516
+ "destructive": {
517
+ "type": "string"
518
+ },
519
+ "destructiveForeground": {
520
+ "type": "string"
521
+ },
522
+ "border": {
523
+ "type": "string"
524
+ },
525
+ "input": {
526
+ "type": "string"
527
+ },
528
+ "ring": {
529
+ "type": "string"
530
+ },
531
+ "radius": {
532
+ "type": "string"
533
+ },
534
+ "sidebarBackground": {
535
+ "type": "string"
536
+ },
537
+ "sidebarForeground": {
538
+ "type": "string"
539
+ },
540
+ "sidebarPrimary": {
541
+ "type": "string"
542
+ },
543
+ "sidebarPrimaryForeground": {
544
+ "type": "string"
545
+ },
546
+ "sidebarAccent": {
547
+ "type": "string"
548
+ },
549
+ "sidebarAccentForeground": {
550
+ "type": "string"
551
+ },
552
+ "sidebarBorder": {
553
+ "type": "string"
554
+ },
555
+ "sidebarRing": {
556
+ "type": "string"
557
+ },
558
+ "chart1": {
559
+ "type": "string",
560
+ "description": "Optional chart series colors (shadcn chart tokens)."
561
+ },
562
+ "chart2": {
563
+ "type": "string"
564
+ },
565
+ "chart3": {
566
+ "type": "string"
567
+ },
568
+ "chart4": {
569
+ "type": "string"
570
+ },
571
+ "chart5": {
572
+ "type": "string"
573
+ }
574
+ },
575
+ "additionalProperties": false,
576
+ "description": "Partial token overrides when extending a base theme."
577
+ },
578
+ "ThemeDefinition": {
579
+ "type": "object",
580
+ "properties": {
581
+ "name": {
582
+ "type": "string"
583
+ },
584
+ "displayName": {
585
+ "type": "string"
586
+ },
587
+ "description": {
588
+ "type": "string"
589
+ },
590
+ "recommended": {
591
+ "type": "boolean",
592
+ "description": "Highlight in the selector when many themes are available."
593
+ },
594
+ "colors": {
595
+ "$ref": "#/definitions/ThemeColors"
596
+ },
597
+ "fontFamily": {
598
+ "type": "string"
599
+ },
600
+ "headingFontFamily": {
601
+ "type": "string"
602
+ },
603
+ "bodyFontFamily": {
604
+ "type": "string"
605
+ },
606
+ "fontFiles": {
607
+ "type": "array",
608
+ "items": {
609
+ "type": "string"
610
+ }
611
+ },
612
+ "letterSpacing": {
613
+ "type": "string"
614
+ },
615
+ "textShadow": {
616
+ "type": "string"
617
+ },
618
+ "lineHeight": {
619
+ "type": "string"
620
+ }
621
+ },
622
+ "required": ["name", "displayName", "colors"],
623
+ "additionalProperties": false,
624
+ "description": "Normalized runtime theme (always complete light + dark palettes)."
625
+ },
626
+ "ThemeColors": {
627
+ "type": "object",
628
+ "properties": {
629
+ "light": {
630
+ "$ref": "#/definitions/ThemeColorsMode"
631
+ },
632
+ "dark": {
633
+ "$ref": "#/definitions/ThemeColorsMode"
634
+ }
635
+ },
636
+ "required": ["light", "dark"],
637
+ "additionalProperties": false
638
+ },
639
+ "ThemeColorsMode": {
640
+ "type": "object",
641
+ "properties": {
642
+ "background": {
643
+ "type": "string"
644
+ },
645
+ "foreground": {
646
+ "type": "string"
647
+ },
648
+ "card": {
649
+ "type": "string"
650
+ },
651
+ "cardForeground": {
652
+ "type": "string"
653
+ },
654
+ "popover": {
655
+ "type": "string"
656
+ },
657
+ "popoverForeground": {
658
+ "type": "string"
659
+ },
660
+ "primary": {
661
+ "type": "string"
662
+ },
663
+ "primaryForeground": {
664
+ "type": "string"
665
+ },
666
+ "secondary": {
667
+ "type": "string"
668
+ },
669
+ "secondaryForeground": {
670
+ "type": "string"
671
+ },
672
+ "muted": {
673
+ "type": "string"
674
+ },
675
+ "mutedForeground": {
676
+ "type": "string"
677
+ },
678
+ "accent": {
679
+ "type": "string"
680
+ },
681
+ "accentForeground": {
682
+ "type": "string"
683
+ },
684
+ "destructive": {
685
+ "type": "string"
686
+ },
687
+ "destructiveForeground": {
688
+ "type": "string"
689
+ },
690
+ "border": {
691
+ "type": "string"
692
+ },
693
+ "input": {
694
+ "type": "string"
695
+ },
696
+ "ring": {
697
+ "type": "string"
698
+ },
699
+ "radius": {
700
+ "type": "string"
701
+ },
702
+ "sidebarBackground": {
703
+ "type": "string"
704
+ },
705
+ "sidebarForeground": {
706
+ "type": "string"
707
+ },
708
+ "sidebarPrimary": {
709
+ "type": "string"
710
+ },
711
+ "sidebarPrimaryForeground": {
712
+ "type": "string"
713
+ },
714
+ "sidebarAccent": {
715
+ "type": "string"
716
+ },
717
+ "sidebarAccentForeground": {
718
+ "type": "string"
719
+ },
720
+ "sidebarBorder": {
721
+ "type": "string"
722
+ },
723
+ "sidebarRing": {
724
+ "type": "string"
725
+ },
726
+ "chart1": {
727
+ "type": "string",
728
+ "description": "Optional chart series colors (shadcn chart tokens)."
729
+ },
730
+ "chart2": {
731
+ "type": "string"
732
+ },
733
+ "chart3": {
734
+ "type": "string"
735
+ },
736
+ "chart4": {
737
+ "type": "string"
738
+ },
739
+ "chart5": {
740
+ "type": "string"
741
+ }
742
+ },
743
+ "required": [
744
+ "background",
745
+ "foreground",
746
+ "card",
747
+ "cardForeground",
748
+ "popover",
749
+ "popoverForeground",
750
+ "primary",
751
+ "primaryForeground",
752
+ "secondary",
753
+ "secondaryForeground",
754
+ "muted",
755
+ "mutedForeground",
756
+ "accent",
757
+ "accentForeground",
758
+ "destructive",
759
+ "destructiveForeground",
760
+ "border",
761
+ "input",
762
+ "ring",
763
+ "radius",
764
+ "sidebarBackground",
765
+ "sidebarForeground",
766
+ "sidebarPrimary",
767
+ "sidebarPrimaryForeground",
768
+ "sidebarAccent",
769
+ "sidebarAccentForeground",
770
+ "sidebarBorder",
771
+ "sidebarRing"
772
+ ],
773
+ "additionalProperties": false,
774
+ "description": "Color tokens for one mode (light or dark)."
775
+ },
776
+ "ThemesConfig": {
777
+ "anyOf": [
778
+ {
779
+ "type": "array",
780
+ "items": {
781
+ "$ref": "#/definitions/ThemeRef"
782
+ }
783
+ },
784
+ {
785
+ "type": "object",
786
+ "additionalProperties": {
787
+ "$ref": "#/definitions/ThemeRef"
788
+ }
789
+ }
790
+ ],
791
+ "description": "Array of refs, or map of id → ref (id used as name when the ref is a string/path)."
792
+ },
793
+ "SentryConfig": {
794
+ "type": "object",
795
+ "properties": {
796
+ "dsn": {
797
+ "type": "string",
798
+ "description": "Sentry DSN (Data Source Name). Required for Sentry to receive events."
799
+ },
800
+ "environment": {
801
+ "type": "string",
802
+ "description": "Environment name (e.g. 'production', 'staging'). Shown in Sentry dashboard."
803
+ },
804
+ "release": {
805
+ "type": "string",
806
+ "description": "Release identifier (e.g. git SHA or version). Used for release-based grouping."
807
+ }
808
+ },
809
+ "required": ["dsn"],
810
+ "additionalProperties": false,
811
+ "description": "Sentry error reporting configuration. Only used in production; ignored in dev."
812
+ },
813
+ "BackendConfig": {
814
+ "type": "object",
815
+ "properties": {
816
+ "type": {
817
+ "$ref": "#/definitions/BackendType",
818
+ "description": "Backend provider type."
819
+ },
820
+ "url": {
821
+ "type": "string",
822
+ "description": "Base URL used to access backend APIs."
823
+ },
824
+ "adminPathname": {
825
+ "type": "string",
826
+ "description": "Admin route pathname (e.g. \"/admin\"). Used as Shell route path for embedded admin panel."
827
+ },
828
+ "adminUrl": {
829
+ "type": "string",
830
+ "description": "Admin content URL loaded in the admin route view (e.g. \"https://example.com/admin\")."
831
+ },
832
+ "publishableKey": {
833
+ "type": "string",
834
+ "description": "Optional Supabase publishable key (public key)."
835
+ },
836
+ "login": {
837
+ "$ref": "#/definitions/BackendLoginConfig",
838
+ "description": "Optional login capabilities used by frontend for immediate rendering."
839
+ },
840
+ "companyId": {
841
+ "type": ["string", "number"],
842
+ "description": "Optional tenant id used for multi-tenant shellui-auth calls."
843
+ }
844
+ },
845
+ "required": ["type", "url"],
846
+ "additionalProperties": false,
847
+ "description": "Backend API configuration."
848
+ },
849
+ "BackendType": {
850
+ "type": "string",
851
+ "enum": ["shellui", "supabase"],
852
+ "description": "Supported backend providers for auth/API communication."
853
+ },
854
+ "BackendLoginConfig": {
855
+ "type": "object",
856
+ "properties": {
857
+ "methods": {
858
+ "type": "array",
859
+ "items": {
860
+ "$ref": "#/definitions/BackendLoginMethod"
861
+ },
862
+ "description": "Enabled login methods shown by the Login view."
863
+ },
864
+ "oauthProviders": {
865
+ "type": "array",
866
+ "items": {
867
+ "type": "string"
868
+ },
869
+ "description": "OAuth providers used when oauth is enabled (e.g. [\"github\"])."
870
+ },
871
+ "panelUrl": {
872
+ "type": "string",
873
+ "description": "Full-bleed iframe URL for the login left panel. When set, takes precedence over panelImage."
874
+ },
875
+ "panelImage": {
876
+ "type": "string",
877
+ "description": "Centered, ratio-preserving image path or URL for the login left panel (e.g. \"/login-panel.jpg\")."
878
+ }
879
+ },
880
+ "additionalProperties": false,
881
+ "description": "Optional login capabilities declared by app config for immediate UI rendering."
882
+ },
883
+ "BackendLoginMethod": {
884
+ "type": "string",
885
+ "enum": ["password", "oauth", "magic_link", "web3"],
886
+ "description": "Supported auth login methods that can be declared in config."
887
+ },
888
+ "CookieConsentConfig": {
889
+ "type": "object",
890
+ "properties": {
891
+ "cookies": {
892
+ "type": "array",
893
+ "items": {
894
+ "$ref": "#/definitions/CookieDefinition"
895
+ },
896
+ "description": "List of cookies the app may use. User consent is collected per category/cookie."
897
+ }
898
+ },
899
+ "required": ["cookies"],
900
+ "additionalProperties": false,
901
+ "description": "Cookie consent configuration. Accepted hosts are stored in settings; store consentedCookieHosts when user submits so we can detect new cookies and re-prompt while keeping existing approvals."
902
+ },
903
+ "CookieDefinition": {
904
+ "type": "object",
905
+ "properties": {
906
+ "name": {
907
+ "type": "string",
908
+ "description": "Display name for the cookie (e.g. \"Sentry Error Reporting\")."
909
+ },
910
+ "host": {
911
+ "type": "string",
912
+ "description": "Host or domain the cookie belongs to (e.g. \"sentry.io\", \".example.com\"). Unique key for consent and feature gating."
913
+ },
914
+ "durationSeconds": {
915
+ "type": "number",
916
+ "description": "Duration in seconds (e.g. 31536000 for 1 year)."
917
+ },
918
+ "type": {
919
+ "type": "string",
920
+ "description": "Type label for clarity (e.g. \"first_party\", \"third_party\", \"http_only\")."
921
+ },
922
+ "category": {
923
+ "$ref": "#/definitions/CookieConsentCategory",
924
+ "description": "Category for grouping in the consent UI."
925
+ },
926
+ "description": {
927
+ "$ref": "#/definitions/LocalizedString",
928
+ "description": "Optional short description shown in the consent / settings UI. Can be a string or localized object with language keys."
929
+ }
930
+ },
931
+ "required": ["name", "host", "durationSeconds", "type", "category"],
932
+ "additionalProperties": false,
933
+ "description": "Definition of a cookie that can be toggled by the user via cookie consent. Host is the unique key: use it to gate features (e.g. getCookieConsentAccepted('sentry.io'))."
934
+ },
935
+ "CookieConsentCategory": {
936
+ "type": "string",
937
+ "enum": ["strict_necessary", "functional_performance", "targeting", "social_media_embedded"],
938
+ "description": "Cookie consent categories for privacy-friendly grouping in the UI.\n- strict_necessary: Required for the app to work; typically no consent needed.\n- functional_performance: Analytics, performance, preferences.\n- targeting: Advertising, personalisation.\n- social_media_embedded: Social widgets, embedded content."
939
+ },
940
+ "LegalDocumentsConfig": {
941
+ "type": "object",
942
+ "properties": {
943
+ "privacyPolicy": {
944
+ "type": "string"
945
+ },
946
+ "termsOfService": {
947
+ "type": "string"
948
+ },
949
+ "legalNotice": {
950
+ "type": "string"
951
+ },
952
+ "dataProcessingAgreement": {
953
+ "type": "string"
954
+ }
955
+ },
956
+ "additionalProperties": false
957
+ }
958
+ },
959
+ "title": "ShellUIConfig",
960
+ "description": "Shellui application configuration (shellui.config.json). Generated from ShellUIConfig TypeScript types."
961
+ }