@shellui/core 0.0.23 → 0.2.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/package.json +4 -2
  2. package/src/components/AppPathView.tsx +31 -0
  3. package/src/components/ContentView.tsx +14 -6
  4. package/src/components/HomeView.tsx +9 -2
  5. package/src/components/IndexRoute.tsx +37 -0
  6. package/src/components/NotFoundView.tsx +3 -2
  7. package/src/components/ViewRoute.tsx +11 -7
  8. package/src/components/ui/drawer.tsx +3 -2
  9. package/src/components/ui/tooltip.tsx +52 -0
  10. package/src/constants/urls.ts +2 -0
  11. package/src/features/config/ConfigProvider.ts +20 -76
  12. package/src/features/config/shellui-config.d.ts +13 -0
  13. package/src/features/config/types.ts +14 -3
  14. package/src/features/config/useConfig.ts +1 -10
  15. package/src/features/cookieConsent/cookieConsent.ts +2 -4
  16. package/src/features/layouts/AppBarLayout.tsx +260 -0
  17. package/src/features/layouts/AppLayout.tsx +6 -0
  18. package/src/features/layouts/DefaultLayout.tsx +25 -17
  19. package/src/features/layouts/OverlayShell.tsx +19 -8
  20. package/src/features/layouts/WindowsLayout.tsx +11 -9
  21. package/src/features/layouts/utils.ts +44 -0
  22. package/src/features/sentry/initSentry.ts +82 -12
  23. package/src/features/settings/SettingsProvider.tsx +2 -1
  24. package/src/features/settings/SettingsView.tsx +79 -15
  25. package/src/features/settings/components/Advanced.tsx +17 -2
  26. package/src/features/settings/components/ApplicationSettingsPanel.tsx +25 -0
  27. package/src/features/settings/components/Develop.tsx +68 -4
  28. package/src/i18n/translations/en/common.json +5 -0
  29. package/src/i18n/translations/en/settings.json +3 -1
  30. package/src/i18n/translations/fr/common.json +5 -0
  31. package/src/i18n/translations/fr/settings.json +3 -1
  32. package/src/index.css +10 -0
  33. package/src/lib/z-index.ts +2 -0
  34. package/src/router/routes.tsx +18 -5
  35. package/tailwind.config.js +1 -1
@@ -7,9 +7,6 @@ import { flattenNavigationItems } from '../features/layouts/utils';
7
7
  import urls from '../constants/urls';
8
8
 
9
9
  // Lazy load route components
10
- const HomeView = lazy(() =>
11
- import('../components/HomeView').then((m) => ({ default: m.HomeView })),
12
- );
13
10
  const SettingsView = lazy(() =>
14
11
  import('../features/settings/SettingsView').then((m) => ({ default: m.SettingsView })),
15
12
  );
@@ -21,9 +18,15 @@ const CookiePreferencesView = lazy(() =>
21
18
  const ViewRoute = lazy(() =>
22
19
  import('../components/ViewRoute').then((m) => ({ default: m.ViewRoute })),
23
20
  );
21
+ const IndexRoute = lazy(() =>
22
+ import('../components/IndexRoute').then((m) => ({ default: m.IndexRoute })),
23
+ );
24
24
  const NotFoundView = lazy(() =>
25
25
  import('../components/NotFoundView').then((m) => ({ default: m.NotFoundView })),
26
26
  );
27
+ const AppPathView = lazy(() =>
28
+ import('../components/AppPathView').then((m) => ({ default: m.AppPathView })),
29
+ );
27
30
 
28
31
  function RouteFallback() {
29
32
  return (
@@ -59,6 +62,15 @@ export const createRoutes = (config: ShellUIConfig): RouteObject[] => {
59
62
  </Suspense>
60
63
  ),
61
64
  },
65
+ {
66
+ // App-path route: renders component-based nav items so they can be loaded in an iframe
67
+ path: `${urls.appPath.replace(/^\//, '')}/:path/*`,
68
+ element: (
69
+ <Suspense fallback={<RouteFallback />}>
70
+ <AppPathView />
71
+ </Suspense>
72
+ ),
73
+ },
62
74
  {
63
75
  // Catch-all route
64
76
  path: '*',
@@ -88,17 +100,18 @@ export const createRoutes = (config: ShellUIConfig): RouteObject[] => {
88
100
  path: '/',
89
101
  element: (
90
102
  <Suspense fallback={<RouteFallback />}>
91
- <HomeView />
103
+ <IndexRoute />
92
104
  </Suspense>
93
105
  ),
94
106
  },
95
107
  ],
96
108
  };
97
109
 
98
- // Add navigation routes
110
+ // Add navigation routes (skip items with path '' or '/' — they are shown at "/" via IndexRoute)
99
111
  if (config.navigation && config.navigation.length > 0) {
100
112
  const navigationItems = flattenNavigationItems(config.navigation);
101
113
  navigationItems.forEach((item) => {
114
+ if (item.path === '' || item.path === '/') return;
102
115
  (layoutRoute.children as RouteObject[]).push({
103
116
  path: `/${item.path}/*`,
104
117
  element: (
@@ -56,5 +56,5 @@ module.exports = {
56
56
  },
57
57
  },
58
58
  },
59
- plugins: [require('@tailwindcss/typography')],
59
+ plugins: [require('@tailwindcss/typography'), require('tailwindcss-animate')],
60
60
  };