@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,60 @@
1
+ /**
2
+ * Map CSS-variable kebab keys onto ThemeColorsMode camelCase.
3
+ */
4
+ const KEBAB_TO_CAMEL: Record<string, string> = {
5
+ background: 'background',
6
+ foreground: 'foreground',
7
+ card: 'card',
8
+ 'card-foreground': 'cardForeground',
9
+ popover: 'popover',
10
+ 'popover-foreground': 'popoverForeground',
11
+ primary: 'primary',
12
+ 'primary-foreground': 'primaryForeground',
13
+ secondary: 'secondary',
14
+ 'secondary-foreground': 'secondaryForeground',
15
+ muted: 'muted',
16
+ 'muted-foreground': 'mutedForeground',
17
+ accent: 'accent',
18
+ 'accent-foreground': 'accentForeground',
19
+ destructive: 'destructive',
20
+ 'destructive-foreground': 'destructiveForeground',
21
+ border: 'border',
22
+ input: 'input',
23
+ ring: 'ring',
24
+ radius: 'radius',
25
+ sidebar: 'sidebarBackground',
26
+ 'sidebar-background': 'sidebarBackground',
27
+ 'sidebar-foreground': 'sidebarForeground',
28
+ 'sidebar-primary': 'sidebarPrimary',
29
+ 'sidebar-primary-foreground': 'sidebarPrimaryForeground',
30
+ 'sidebar-accent': 'sidebarAccent',
31
+ 'sidebar-accent-foreground': 'sidebarAccentForeground',
32
+ 'sidebar-border': 'sidebarBorder',
33
+ 'sidebar-ring': 'sidebarRing',
34
+ 'chart-1': 'chart1',
35
+ 'chart-2': 'chart2',
36
+ 'chart-3': 'chart3',
37
+ 'chart-4': 'chart4',
38
+ 'chart-5': 'chart5',
39
+ chart1: 'chart1',
40
+ chart2: 'chart2',
41
+ chart3: 'chart3',
42
+ chart4: 'chart4',
43
+ chart5: 'chart5',
44
+ };
45
+
46
+ /**
47
+ * Normalize a light/dark token bag (camelCase or kebab-case) to camelCase partial.
48
+ */
49
+ export function normalizeTokenKeys(
50
+ input: Record<string, unknown> | undefined | null,
51
+ ): Record<string, string> {
52
+ if (!input || typeof input !== 'object') return {};
53
+ const out: Record<string, string> = {};
54
+ for (const [key, value] of Object.entries(input)) {
55
+ if (typeof value !== 'string' || value === '') continue;
56
+ const camel = KEBAB_TO_CAMEL[key] || key;
57
+ out[camel] = value;
58
+ }
59
+ return out;
60
+ }
@@ -0,0 +1,170 @@
1
+ /**
2
+ * Theme types for Shellui (shadcn/ui CSS variable structure).
3
+ * Color values: prefer hex (`#RRGGBB`). HSL channel triples and OKLCH strings are also accepted.
4
+ */
5
+
6
+ /** Current theme JSON / object schema version. */
7
+ export const THEME_SCHEMA_VERSION = 1 as const;
8
+
9
+ /** Color tokens for one mode (light or dark). */
10
+ export interface ThemeColorsMode {
11
+ background: string;
12
+ foreground: string;
13
+ card: string;
14
+ cardForeground: string;
15
+ popover: string;
16
+ popoverForeground: string;
17
+ primary: string;
18
+ primaryForeground: string;
19
+ secondary: string;
20
+ secondaryForeground: string;
21
+ muted: string;
22
+ mutedForeground: string;
23
+ accent: string;
24
+ accentForeground: string;
25
+ destructive: string;
26
+ destructiveForeground: string;
27
+ border: string;
28
+ input: string;
29
+ ring: string;
30
+ radius: string;
31
+ sidebarBackground: string;
32
+ sidebarForeground: string;
33
+ sidebarPrimary: string;
34
+ sidebarPrimaryForeground: string;
35
+ sidebarAccent: string;
36
+ sidebarAccentForeground: string;
37
+ sidebarBorder: string;
38
+ sidebarRing: string;
39
+ /** Optional chart series colors (shadcn chart tokens). */
40
+ chart1?: string;
41
+ chart2?: string;
42
+ chart3?: string;
43
+ chart4?: string;
44
+ chart5?: string;
45
+ }
46
+
47
+ /** Partial token overrides when extending a base theme. */
48
+ export type ThemeColorsModePartial = Partial<ThemeColorsMode>;
49
+
50
+ export interface ThemeColors {
51
+ light: ThemeColorsMode;
52
+ dark: ThemeColorsMode;
53
+ }
54
+
55
+ /** Optional font packaging for a theme. */
56
+ export interface ThemeFonts {
57
+ /** Sans / UI font stack */
58
+ sans?: string;
59
+ /** Monospace font stack */
60
+ mono?: string;
61
+ /** Serif font stack */
62
+ serif?: string;
63
+ /** Heading font stack (falls back to sans) */
64
+ heading?: string;
65
+ /** Body font stack (falls back to sans) */
66
+ body?: string;
67
+ /**
68
+ * Font file URLs or paths (Google Fonts CSS, local `.css`, or `.woff2`).
69
+ * Paths in theme JSON are relative to the theme file / themesDir.
70
+ */
71
+ files?: string[];
72
+ }
73
+
74
+ /**
75
+ * Normalized runtime theme (always complete light + dark palettes).
76
+ */
77
+ export interface ThemeDefinition {
78
+ name: string;
79
+ displayName: string;
80
+ description?: string;
81
+ /** Highlight in the selector when many themes are available. */
82
+ recommended?: boolean;
83
+ colors: ThemeColors;
84
+ fontFamily?: string;
85
+ headingFontFamily?: string;
86
+ bodyFontFamily?: string;
87
+ fontFiles?: string[];
88
+ letterSpacing?: string;
89
+ textShadow?: string;
90
+ lineHeight?: string;
91
+ }
92
+
93
+ /**
94
+ * Flexible theme object for config or theme JSON files.
95
+ * Supports compact (`light`/`dark` + `label`) and legacy (`colors` + `displayName`) shapes.
96
+ * Partial light/dark tokens are merged onto the default theme.
97
+ */
98
+ export interface ThemeInput {
99
+ /**
100
+ * Theme JSON schema version. Required in theme folder JSON files (must be 1).
101
+ * Optional for inline config objects.
102
+ */
103
+ version?: typeof THEME_SCHEMA_VERSION | number;
104
+ /** JSON Schema URL for editor tooling (theme JSON files). */
105
+ $schema?: string;
106
+ name?: string;
107
+ /** Human-readable label (preferred). */
108
+ label?: string;
109
+ /** @deprecated Prefer `label`. Kept for existing configs. */
110
+ displayName?: string;
111
+ description?: string;
112
+ recommended?: boolean;
113
+ fonts?: ThemeFonts;
114
+ fontFamily?: string;
115
+ headingFontFamily?: string;
116
+ bodyFontFamily?: string;
117
+ fontFiles?: string[];
118
+ letterSpacing?: string;
119
+ textShadow?: string;
120
+ lineHeight?: string;
121
+ /** Shared radius applied to both modes when mode tokens omit `radius`. */
122
+ radius?: string;
123
+ light?: ThemeColorsModePartial;
124
+ dark?: ThemeColorsModePartial;
125
+ /** Legacy full colors object (required keys when used as a complete theme). */
126
+ colors?: {
127
+ light: ThemeColorsModePartial;
128
+ dark: ThemeColorsModePartial;
129
+ };
130
+ }
131
+
132
+ /** Built-in name, filesystem path, or inline theme object. */
133
+ export type ThemeRef = string | ThemeInput | ThemeDefinition;
134
+
135
+ /** Array of refs, or map of id → ref (id used as name when the ref is a string/path). */
136
+ export type ThemesConfig = ThemeRef[] | Record<string, ThemeRef>;
137
+
138
+ /** Keys that must be present on a complete ThemeColorsMode. */
139
+ export const THEME_COLOR_KEYS = [
140
+ 'background',
141
+ 'foreground',
142
+ 'card',
143
+ 'cardForeground',
144
+ 'popover',
145
+ 'popoverForeground',
146
+ 'primary',
147
+ 'primaryForeground',
148
+ 'secondary',
149
+ 'secondaryForeground',
150
+ 'muted',
151
+ 'mutedForeground',
152
+ 'accent',
153
+ 'accentForeground',
154
+ 'destructive',
155
+ 'destructiveForeground',
156
+ 'border',
157
+ 'input',
158
+ 'ring',
159
+ 'radius',
160
+ 'sidebarBackground',
161
+ 'sidebarForeground',
162
+ 'sidebarPrimary',
163
+ 'sidebarPrimaryForeground',
164
+ 'sidebarAccent',
165
+ 'sidebarAccentForeground',
166
+ 'sidebarBorder',
167
+ 'sidebarRing',
168
+ ] as const satisfies ReadonlyArray<keyof ThemeColorsMode>;
169
+
170
+ export type ThemeColorKey = (typeof THEME_COLOR_KEYS)[number];
@@ -1,20 +1,8 @@
1
- /* eslint-disable no-console */
2
- import { useLayoutEffect } from 'react';
1
+ import { useLayoutEffect, useEffect } from 'react';
3
2
  import { useSettings } from '../settings/hooks/useSettings';
4
3
  import { useConfig } from '../config/useConfig';
5
- import { getTheme, registerTheme, applyTheme, type ThemeDefinition } from './themes';
6
-
7
- /**
8
- * Apply theme to document element
9
- */
10
- function applyThemeToDocument(isDark: boolean) {
11
- const root = document.documentElement;
12
- if (isDark) {
13
- root.classList.add('dark');
14
- } else {
15
- root.classList.remove('dark');
16
- }
17
- }
4
+ import { getTheme, setAvailableThemes, defaultTheme, type ThemeDefinition } from './themes';
5
+ import { scheduleSafeThemeApply } from './safeApplyTheme';
18
6
 
19
7
  /**
20
8
  * Hook to apply theme based on settings
@@ -22,50 +10,60 @@ function applyThemeToDocument(isDark: boolean) {
22
10
  * - 'light': removes dark class
23
11
  * - 'dark': adds dark class
24
12
  * - 'system': follows prefers-color-scheme media query
25
- * Also applies theme colors based on themeName setting
13
+ * Also applies theme colors based on themeName setting.
14
+ * Rapid switches are coalesced and CSS transitions are locked so the UI snaps.
26
15
  */
27
16
  export function useTheme() {
28
- const { settings } = useSettings();
17
+ const { settings, updateSetting } = useSettings();
29
18
  const { config } = useConfig();
30
19
  const colorScheme = settings.appearance?.colorScheme ?? 'system';
31
- const themeName = settings.appearance?.name ?? 'default';
20
+ const themeName = settings.appearance?.name;
21
+ const configDefault = config?.activeTheme || config?.defaultTheme || defaultTheme.name;
22
+
23
+ // Seed appearance.name from config when the user has no stored preference yet
24
+ useEffect(() => {
25
+ if (!config) return;
26
+ if (themeName) return;
27
+ if (!configDefault) return;
28
+ updateSetting('appearance', { name: configDefault });
29
+ }, [config, configDefault, themeName, updateSetting]);
32
30
 
33
- // Apply theme immediately on mount (synchronously) to prevent empty colors
34
- // This ensures CSS variables are set before first render
35
31
  useLayoutEffect(() => {
36
- // Get the effective theme name (from settings or config)
37
- // Use themeName from settings first, then config defaultTheme, then 'default'
38
- const effectiveThemeName = themeName || config?.defaultTheme || 'default';
32
+ const effectiveThemeName = themeName || configDefault || defaultTheme.name;
39
33
 
40
- if (config?.themes) {
41
- config.themes.forEach((themeDef: ThemeDefinition) => {
42
- registerTheme(themeDef);
43
- });
44
- }
34
+ const available: ThemeDefinition[] =
35
+ config?.themes && Array.isArray(config.themes) && config.themes.length > 0
36
+ ? (config.themes as ThemeDefinition[])
37
+ : [defaultTheme];
45
38
 
46
- const themeDefinition = getTheme(effectiveThemeName) || getTheme('default');
39
+ setAvailableThemes(available);
47
40
 
48
- if (themeDefinition) {
49
- const determineIsDark = () => {
50
- if (colorScheme === 'system') {
51
- const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
52
- return mediaQuery.matches;
53
- }
54
- return colorScheme === 'dark';
55
- };
56
- const isDark = determineIsDark();
57
- applyThemeToDocument(isDark);
58
- applyTheme(themeDefinition, isDark);
59
- } else {
60
- console.error('[Theme] No theme definition found, using fallback');
61
- // Fallback: at least set primary color from default theme
62
- const defaultTheme = getTheme('default');
63
- if (defaultTheme) {
64
- const isDark =
65
- colorScheme === 'dark' ||
66
- (colorScheme === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches);
67
- applyTheme(defaultTheme, isDark);
41
+ const themeDefinition =
42
+ getTheme(effectiveThemeName) || getTheme(defaultTheme.name) || defaultTheme;
43
+
44
+ const determineIsDark = () => {
45
+ if (colorScheme === 'system') {
46
+ return window.matchMedia('(prefers-color-scheme: dark)').matches;
68
47
  }
48
+ return colorScheme === 'dark';
49
+ };
50
+
51
+ let isDark = determineIsDark();
52
+ scheduleSafeThemeApply(themeDefinition, isDark);
53
+
54
+ if (colorScheme !== 'system') return;
55
+
56
+ const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
57
+ const handleChange = () => {
58
+ isDark = mediaQuery.matches;
59
+ scheduleSafeThemeApply(themeDefinition, isDark);
60
+ };
61
+
62
+ if (mediaQuery.addEventListener) {
63
+ mediaQuery.addEventListener('change', handleChange);
64
+ return () => mediaQuery.removeEventListener('change', handleChange);
69
65
  }
70
- }, [colorScheme, themeName, config]); // Run when colorScheme, themeName, or config changes
66
+ mediaQuery.addListener(handleChange);
67
+ return () => mediaQuery.removeListener(handleChange);
68
+ }, [colorScheme, themeName, config, configDefault]);
71
69
  }
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+
3
+ const MOBILE_BREAKPOINT = 768;
4
+
5
+ export function useIsMobile() {
6
+ const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);
7
+
8
+ React.useEffect(() => {
9
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
10
+ const onChange = () => {
11
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
12
+ };
13
+ mql.addEventListener('change', onChange);
14
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
15
+ return () => mql.removeEventListener('change', onChange);
16
+ }, []);
17
+
18
+ return !!isMobile;
19
+ }
@@ -23,6 +23,41 @@
23
23
  "goToLoginAriaLabel": "Go to login",
24
24
  "openAccountMenuAriaLabel": "Open account menu for {{name}}"
25
25
  },
26
+ "loginPage": {
27
+ "welcomeBack": "Welcome back",
28
+ "descriptionOauthOrWeb3AndMagic": "Continue with your identity provider or request a secure sign-in link by email.",
29
+ "descriptionOauthOrWeb3": "Continue with your configured identity provider.",
30
+ "descriptionMagic": "Enter your email to receive a secure sign-in link.",
31
+ "descriptionNone": "No sign-in method is currently available.",
32
+ "lastUsed": "Last used",
33
+ "continueWith": "Continue with {{provider}}",
34
+ "redirectingTo": "Redirecting to {{provider}}...",
35
+ "sendMagicLink": "Send magic link",
36
+ "sendingMagicLink": "Sending magic link...",
37
+ "connectingWallet": "Connecting wallet...",
38
+ "continueWithEthereum": "Continue with Ethereum wallet",
39
+ "hideOtherMethods": "Hide other methods",
40
+ "useAnotherMethod": "Use another method",
41
+ "or": "or",
42
+ "walletLogin": "Wallet login",
43
+ "otherSocialLogins": "Other social logins",
44
+ "socialLogin": "Social login",
45
+ "emailMagicLink": "Email magic link",
46
+ "emailPlaceholder": "name@company.com",
47
+ "noMethodsEnabled": "No login method is currently enabled in backend auth settings.",
48
+ "cancel": "Cancel",
49
+ "brandingIframeTitle": "Login branding",
50
+ "magicLinkSent": "Check your inbox for a magic login link.",
51
+ "enterEmail": "Please enter your email address.",
52
+ "couldNotSendMagicLink": "Could not send magic link.",
53
+ "methodUnsupported": "This backend does not support {{method}} login.",
54
+ "oauthUnsupported": "This backend does not support OAuth with {{provider}}.",
55
+ "couldNotVerifyCapabilities": "Could not verify backend login capabilities.",
56
+ "walletLoginFailed": "Unable to complete Ethereum wallet login.",
57
+ "signInCouldNotContinue": "Sign-in could not continue.",
58
+ "magicLinkMethod": "magic link",
59
+ "redirectNotAllowedHint": " Add this origin in shellui-auth (Django admin or shellui-admin → Company → Login redirect URLs), for example: {{origin}}."
60
+ },
26
61
  "errorBoundary": {
27
62
  "titleChunk": "Page couldn't be loaded",
28
63
  "titleGeneric": "Something went wrong",
@@ -64,5 +99,11 @@
64
99
  "storagePicker": {
65
100
  "title": "Select files or folders",
66
101
  "description": "Choose items, then confirm."
102
+ },
103
+ "desktopChrome": {
104
+ "back": "Back",
105
+ "forward": "Forward",
106
+ "navigation": "Navigation",
107
+ "openNavigation": "Open navigation"
67
108
  }
68
109
  }
@@ -86,6 +86,8 @@
86
86
  "modeDescription": "Choose light, dark, or automatic mode.",
87
87
  "colorTheme": "Color Theme",
88
88
  "colorThemeDescription": "Select a color theme. Each theme has light and dark variants.",
89
+ "colorThemeDescriptionSingle": "Your app theme. Light and dark variants follow the mode above.",
90
+ "recommended": "Recommended",
89
91
  "themes": {
90
92
  "light": "Light",
91
93
  "dark": "Dark",
@@ -420,9 +422,13 @@
420
422
  },
421
423
  "modalTesting": {
422
424
  "title": "Modal Testing",
423
- "description": "Opens the settings in a modal. Close with the × button or by clicking outside.",
425
+ "description": "Opens settings in a modal (desktop dialog / mobile bottom drawer). Dynamic sizing hugs compact iframe content. Close with ×, backdrop, Escape, or swipe on mobile.",
424
426
  "buttons": {
425
- "openModal": "Open modal (settings)"
427
+ "openModal": "Open modal (settings)",
428
+ "openModalSm": "Open modal (sm)",
429
+ "openModalContent": "Open modal (content, no ×)",
430
+ "openModalDynamic": "Open modal (dynamic sizing)",
431
+ "closeModal": "Close modal"
426
432
  }
427
433
  },
428
434
  "drawerTesting": {
@@ -434,6 +440,8 @@
434
440
  "drawerBottom": "Drawer from bottom",
435
441
  "drawerRightNarrow": "Drawer right (400px)",
436
442
  "drawerBottomHalf": "Drawer bottom (60vh)",
443
+ "drawerBottomDynamic": "Drawer bottom (dynamic sizing)",
444
+ "drawerNoClose": "Drawer bottom (no ×)",
437
445
  "closeDrawer": "Close drawer"
438
446
  }
439
447
  },
@@ -23,6 +23,41 @@
23
23
  "goToLoginAriaLabel": "Aller à la connexion",
24
24
  "openAccountMenuAriaLabel": "Ouvrir le menu du compte pour {{name}}"
25
25
  },
26
+ "loginPage": {
27
+ "welcomeBack": "Bon retour",
28
+ "descriptionOauthOrWeb3AndMagic": "Continuez avec votre fournisseur d'identité ou demandez un lien de connexion sécurisé par e-mail.",
29
+ "descriptionOauthOrWeb3": "Continuez avec votre fournisseur d'identité configuré.",
30
+ "descriptionMagic": "Saisissez votre e-mail pour recevoir un lien de connexion sécurisé.",
31
+ "descriptionNone": "Aucune méthode de connexion n'est disponible pour le moment.",
32
+ "lastUsed": "Dernière utilisation",
33
+ "continueWith": "Continuer avec {{provider}}",
34
+ "redirectingTo": "Redirection vers {{provider}}...",
35
+ "sendMagicLink": "Envoyer le lien magique",
36
+ "sendingMagicLink": "Envoi du lien magique...",
37
+ "connectingWallet": "Connexion au portefeuille...",
38
+ "continueWithEthereum": "Continuer avec un portefeuille Ethereum",
39
+ "hideOtherMethods": "Masquer les autres méthodes",
40
+ "useAnotherMethod": "Utiliser une autre méthode",
41
+ "or": "ou",
42
+ "walletLogin": "Connexion portefeuille",
43
+ "otherSocialLogins": "Autres connexions sociales",
44
+ "socialLogin": "Connexion sociale",
45
+ "emailMagicLink": "Lien magique par e-mail",
46
+ "emailPlaceholder": "prenom@entreprise.com",
47
+ "noMethodsEnabled": "Aucune méthode de connexion n'est activée dans les paramètres d'authentification du backend.",
48
+ "cancel": "Annuler",
49
+ "brandingIframeTitle": "Image de connexion",
50
+ "magicLinkSent": "Vérifiez votre boîte de réception pour le lien de connexion.",
51
+ "enterEmail": "Veuillez saisir votre adresse e-mail.",
52
+ "couldNotSendMagicLink": "Impossible d'envoyer le lien magique.",
53
+ "methodUnsupported": "Ce backend ne prend pas en charge la connexion {{method}}.",
54
+ "oauthUnsupported": "Ce backend ne prend pas en charge OAuth avec {{provider}}.",
55
+ "couldNotVerifyCapabilities": "Impossible de vérifier les capacités de connexion du backend.",
56
+ "walletLoginFailed": "Impossible de terminer la connexion au portefeuille Ethereum.",
57
+ "signInCouldNotContinue": "La connexion n'a pas pu se poursuivre.",
58
+ "magicLinkMethod": "lien magique",
59
+ "redirectNotAllowedHint": " Ajoutez cette origine dans shellui-auth (admin Django ou shellui-admin → Company → Login redirect URLs), par exemple : {{origin}}."
60
+ },
26
61
  "errorBoundary": {
27
62
  "titleChunk": "La page n'a pas pu être chargée",
28
63
  "titleGeneric": "Une erreur s'est produite",
@@ -64,5 +99,11 @@
64
99
  "storagePicker": {
65
100
  "title": "Sélectionner des fichiers ou dossiers",
66
101
  "description": "Choisissez des éléments, puis confirmez."
102
+ },
103
+ "desktopChrome": {
104
+ "back": "Retour",
105
+ "forward": "Suivant",
106
+ "navigation": "Navigation",
107
+ "openNavigation": "Ouvrir la navigation"
67
108
  }
68
109
  }
@@ -86,6 +86,8 @@
86
86
  "modeDescription": "Choisissez le mode clair, sombre ou automatique.",
87
87
  "colorTheme": "Thème de couleur",
88
88
  "colorThemeDescription": "Sélectionnez un thème de couleur. Chaque thème a des variantes claires et sombres.",
89
+ "colorThemeDescriptionSingle": "Thème de votre application. Les variantes claire et sombre suivent le mode ci-dessus.",
90
+ "recommended": "Recommandé",
89
91
  "themes": {
90
92
  "light": "Clair",
91
93
  "dark": "Sombre",
@@ -420,9 +422,13 @@
420
422
  },
421
423
  "modalTesting": {
422
424
  "title": "Tests du modal",
423
- "description": "Ouvre les paramètres dans un modal. Fermez avec le bouton × ou en cliquant à l'extérieur.",
425
+ "description": "Ouvre les paramètres dans un modal (dialogue bureau / tiroir bas mobile). Le dimensionnement dynamique épouse le contenu compact. Fermez avec ×, le fond, Échap, ou un balayage sur mobile.",
424
426
  "buttons": {
425
- "openModal": "Ouvrir le modal (paramètres)"
427
+ "openModal": "Ouvrir le modal (paramètres)",
428
+ "openModalSm": "Ouvrir le modal (sm)",
429
+ "openModalContent": "Ouvrir le modal (contenu, sans ×)",
430
+ "openModalDynamic": "Ouvrir le modal (taille dynamique)",
431
+ "closeModal": "Fermer le modal"
426
432
  }
427
433
  },
428
434
  "drawerTesting": {
@@ -434,6 +440,8 @@
434
440
  "drawerBottom": "Tiroir depuis le bas",
435
441
  "drawerRightNarrow": "Tiroir droite (400px)",
436
442
  "drawerBottomHalf": "Tiroir bas (60vh)",
443
+ "drawerBottomDynamic": "Tiroir bas (taille dynamique)",
444
+ "drawerNoClose": "Tiroir bas (sans ×)",
437
445
  "closeDrawer": "Fermer le tiroir"
438
446
  }
439
447
  },