@almadar/orb 0.2.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 (133) hide show
  1. package/README.md +83 -0
  2. package/bin/orb +101 -0
  3. package/package.json +58 -0
  4. package/scripts/postinstall.js +51 -0
  5. package/shells/almadar-shell/LICENSE +72 -0
  6. package/shells/almadar-shell/README.md +25 -0
  7. package/shells/almadar-shell/locales/en.json +120 -0
  8. package/shells/almadar-shell/package.json +35 -0
  9. package/shells/almadar-shell/packages/client/eslint.config.cjs +23 -0
  10. package/shells/almadar-shell/packages/client/index.html +13 -0
  11. package/shells/almadar-shell/packages/client/package.json +61 -0
  12. package/shells/almadar-shell/packages/client/postcss.config.js +6 -0
  13. package/shells/almadar-shell/packages/client/src/App.tsx +81 -0
  14. package/shells/almadar-shell/packages/client/src/config/firebase.ts +37 -0
  15. package/shells/almadar-shell/packages/client/src/features/auth/AuthContext.tsx +139 -0
  16. package/shells/almadar-shell/packages/client/src/features/auth/authService.ts +83 -0
  17. package/shells/almadar-shell/packages/client/src/features/auth/components/Login.tsx +218 -0
  18. package/shells/almadar-shell/packages/client/src/features/auth/components/ProtectedRoute.tsx +27 -0
  19. package/shells/almadar-shell/packages/client/src/features/auth/components/UserProfile.tsx +68 -0
  20. package/shells/almadar-shell/packages/client/src/features/auth/components/index.ts +3 -0
  21. package/shells/almadar-shell/packages/client/src/features/auth/index.ts +13 -0
  22. package/shells/almadar-shell/packages/client/src/features/auth/types.ts +24 -0
  23. package/shells/almadar-shell/packages/client/src/index.css +42 -0
  24. package/shells/almadar-shell/packages/client/src/main.tsx +8 -0
  25. package/shells/almadar-shell/packages/client/src/navigation/index.ts +55 -0
  26. package/shells/almadar-shell/packages/client/src/pages/index.ts +12 -0
  27. package/shells/almadar-shell/packages/client/tailwind-preset.cjs +259 -0
  28. package/shells/almadar-shell/packages/client/tailwind.config.js +21 -0
  29. package/shells/almadar-shell/packages/client/tsconfig.json +33 -0
  30. package/shells/almadar-shell/packages/client/vite.config.ts +50 -0
  31. package/shells/almadar-shell/packages/server/eslint.config.cjs +19 -0
  32. package/shells/almadar-shell/packages/server/package.json +39 -0
  33. package/shells/almadar-shell/packages/server/src/app.ts +36 -0
  34. package/shells/almadar-shell/packages/server/src/index.ts +30 -0
  35. package/shells/almadar-shell/packages/server/src/routes.ts +11 -0
  36. package/shells/almadar-shell/packages/server/src/types/express.d.ts +15 -0
  37. package/shells/almadar-shell/packages/server/tsconfig.json +23 -0
  38. package/shells/almadar-shell/packages/shared/package.json +11 -0
  39. package/shells/almadar-shell/packages/shared/pnpm-lock.yaml +22 -0
  40. package/shells/almadar-shell/packages/shared/src/index.ts +2 -0
  41. package/shells/almadar-shell/pnpm-lock.yaml +8791 -0
  42. package/shells/almadar-shell/pnpm-workspace.yaml +2 -0
  43. package/shells/almadar-shell/tsup.config.ts +13 -0
  44. package/shells/almadar-shell/turbo.json +17 -0
  45. package/shells/almadar-shell/vitest.config.ts +8 -0
  46. package/shells/almadar-shell-hono/LICENSE +72 -0
  47. package/shells/almadar-shell-hono/README.md +25 -0
  48. package/shells/almadar-shell-hono/locales/en.json +120 -0
  49. package/shells/almadar-shell-hono/package.json +31 -0
  50. package/shells/almadar-shell-hono/packages/client/eslint.config.cjs +23 -0
  51. package/shells/almadar-shell-hono/packages/client/index.html +13 -0
  52. package/shells/almadar-shell-hono/packages/client/package-lock.json +9750 -0
  53. package/shells/almadar-shell-hono/packages/client/package.json +61 -0
  54. package/shells/almadar-shell-hono/packages/client/postcss.config.js +6 -0
  55. package/shells/almadar-shell-hono/packages/client/src/App.tsx +84 -0
  56. package/shells/almadar-shell-hono/packages/client/src/config/firebase.ts +37 -0
  57. package/shells/almadar-shell-hono/packages/client/src/features/auth/AuthContext.tsx +139 -0
  58. package/shells/almadar-shell-hono/packages/client/src/features/auth/authService.ts +83 -0
  59. package/shells/almadar-shell-hono/packages/client/src/features/auth/components/Login.tsx +218 -0
  60. package/shells/almadar-shell-hono/packages/client/src/features/auth/components/ProtectedRoute.tsx +27 -0
  61. package/shells/almadar-shell-hono/packages/client/src/features/auth/components/UserProfile.tsx +68 -0
  62. package/shells/almadar-shell-hono/packages/client/src/features/auth/components/index.ts +3 -0
  63. package/shells/almadar-shell-hono/packages/client/src/features/auth/index.ts +13 -0
  64. package/shells/almadar-shell-hono/packages/client/src/features/auth/types.ts +24 -0
  65. package/shells/almadar-shell-hono/packages/client/src/index.css +35 -0
  66. package/shells/almadar-shell-hono/packages/client/src/main.tsx +8 -0
  67. package/shells/almadar-shell-hono/packages/client/src/navigation/index.ts +55 -0
  68. package/shells/almadar-shell-hono/packages/client/src/pages/index.ts +12 -0
  69. package/shells/almadar-shell-hono/packages/client/tailwind-preset.cjs +259 -0
  70. package/shells/almadar-shell-hono/packages/client/tailwind.config.js +21 -0
  71. package/shells/almadar-shell-hono/packages/client/tsconfig.json +33 -0
  72. package/shells/almadar-shell-hono/packages/client/vite.config.ts +50 -0
  73. package/shells/almadar-shell-hono/packages/server/eslint.config.cjs +19 -0
  74. package/shells/almadar-shell-hono/packages/server/package.json +38 -0
  75. package/shells/almadar-shell-hono/packages/server/pnpm-lock.yaml +4665 -0
  76. package/shells/almadar-shell-hono/packages/server/src/app.ts +31 -0
  77. package/shells/almadar-shell-hono/packages/server/src/index.ts +31 -0
  78. package/shells/almadar-shell-hono/packages/server/src/routes.ts +12 -0
  79. package/shells/almadar-shell-hono/packages/server/src/serve.ts +45 -0
  80. package/shells/almadar-shell-hono/packages/server/tsconfig.json +23 -0
  81. package/shells/almadar-shell-hono/packages/shared/package.json +25 -0
  82. package/shells/almadar-shell-hono/packages/shared/pnpm-lock.yaml +919 -0
  83. package/shells/almadar-shell-hono/packages/shared/src/index.ts +2 -0
  84. package/shells/almadar-shell-hono/packages/shared/tsconfig.json +17 -0
  85. package/shells/almadar-shell-hono/packages/shared/tsup.config.ts +10 -0
  86. package/shells/almadar-shell-hono/pnpm-lock.yaml +9441 -0
  87. package/shells/almadar-shell-hono/pnpm-workspace.yaml +2 -0
  88. package/shells/almadar-shell-hono/tsup.config.ts +13 -0
  89. package/shells/almadar-shell-hono/turbo.json +17 -0
  90. package/shells/almadar-shell-hono/vitest.config.ts +8 -0
  91. package/shells/orb-shell/LICENSE +21 -0
  92. package/shells/orb-shell/README.md +25 -0
  93. package/shells/orb-shell/locales/en.json +120 -0
  94. package/shells/orb-shell/package.json +35 -0
  95. package/shells/orb-shell/packages/client/eslint.config.cjs +23 -0
  96. package/shells/orb-shell/packages/client/index.html +13 -0
  97. package/shells/orb-shell/packages/client/package-lock.json +11390 -0
  98. package/shells/orb-shell/packages/client/package.json +55 -0
  99. package/shells/orb-shell/packages/client/postcss.config.js +6 -0
  100. package/shells/orb-shell/packages/client/src/App.tsx +79 -0
  101. package/shells/orb-shell/packages/client/src/config/firebase.ts +37 -0
  102. package/shells/orb-shell/packages/client/src/features/auth/AuthContext.tsx +139 -0
  103. package/shells/orb-shell/packages/client/src/features/auth/authService.ts +83 -0
  104. package/shells/orb-shell/packages/client/src/features/auth/components/Login.tsx +218 -0
  105. package/shells/orb-shell/packages/client/src/features/auth/components/ProtectedRoute.tsx +27 -0
  106. package/shells/orb-shell/packages/client/src/features/auth/components/UserProfile.tsx +68 -0
  107. package/shells/orb-shell/packages/client/src/features/auth/components/index.ts +3 -0
  108. package/shells/orb-shell/packages/client/src/features/auth/index.ts +13 -0
  109. package/shells/orb-shell/packages/client/src/features/auth/types.ts +24 -0
  110. package/shells/orb-shell/packages/client/src/index.css +35 -0
  111. package/shells/orb-shell/packages/client/src/main.tsx +10 -0
  112. package/shells/orb-shell/packages/client/src/navigation/index.ts +55 -0
  113. package/shells/orb-shell/packages/client/src/pages/index.ts +12 -0
  114. package/shells/orb-shell/packages/client/tailwind-preset.cjs +243 -0
  115. package/shells/orb-shell/packages/client/tailwind.config.js +15 -0
  116. package/shells/orb-shell/packages/client/tsconfig.json +33 -0
  117. package/shells/orb-shell/packages/client/vite.config.ts +49 -0
  118. package/shells/orb-shell/packages/server/eslint.config.cjs +19 -0
  119. package/shells/orb-shell/packages/server/package-lock.json +6323 -0
  120. package/shells/orb-shell/packages/server/package.json +37 -0
  121. package/shells/orb-shell/packages/server/src/app.ts +36 -0
  122. package/shells/orb-shell/packages/server/src/index.ts +30 -0
  123. package/shells/orb-shell/packages/server/src/routes.ts +11 -0
  124. package/shells/orb-shell/packages/server/src/types/express.d.ts +15 -0
  125. package/shells/orb-shell/packages/server/tsconfig.json +23 -0
  126. package/shells/orb-shell/packages/shared/package-lock.json +24 -0
  127. package/shells/orb-shell/packages/shared/package.json +10 -0
  128. package/shells/orb-shell/packages/shared/src/index.ts +2 -0
  129. package/shells/orb-shell/pnpm-lock.yaml +9433 -0
  130. package/shells/orb-shell/pnpm-workspace.yaml +2 -0
  131. package/shells/orb-shell/tsup.config.ts +13 -0
  132. package/shells/orb-shell/turbo.json +17 -0
  133. package/shells/orb-shell/vitest.config.ts +8 -0
@@ -0,0 +1,68 @@
1
+ import React, { useState, useRef, useEffect } from 'react';
2
+ import { useAuthContext } from '../AuthContext';
3
+
4
+ const UserProfile: React.FC = () => {
5
+ const { user, loading, signOut } = useAuthContext();
6
+ const [open, setOpen] = useState(false);
7
+ const ref = useRef<HTMLDivElement>(null);
8
+
9
+ useEffect(() => {
10
+ const handleClickOutside = (e: MouseEvent) => {
11
+ if (ref.current && !ref.current.contains(e.target as Node)) setOpen(false);
12
+ };
13
+ document.addEventListener('mousedown', handleClickOutside);
14
+ return () => document.removeEventListener('mousedown', handleClickOutside);
15
+ }, []);
16
+
17
+ if (!user) return null;
18
+
19
+ const handleSignOut = async () => {
20
+ setOpen(false);
21
+ await signOut();
22
+ };
23
+
24
+ return (
25
+ <div ref={ref} className="relative">
26
+ <button
27
+ onClick={() => setOpen(!open)}
28
+ className="flex items-center space-x-2 hover:opacity-80 transition-opacity"
29
+ >
30
+ {user.photoURL ? (
31
+ <img
32
+ className="h-8 w-8 rounded-full ring-2 ring-gray-200 dark:ring-gray-700"
33
+ src={user.photoURL}
34
+ alt={user.displayName || 'User'}
35
+ />
36
+ ) : (
37
+ <div className="h-8 w-8 rounded-full bg-gray-300 dark:bg-gray-600 flex items-center justify-center text-sm font-medium text-gray-600 dark:text-gray-300">
38
+ {(user.displayName || user.email || 'U')[0].toUpperCase()}
39
+ </div>
40
+ )}
41
+ </button>
42
+
43
+ {open && (
44
+ <div className="absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white dark:bg-gray-800 ring-1 ring-black/5 dark:ring-white/10 z-50">
45
+ <div className="px-4 py-3 border-b border-gray-100 dark:border-gray-700">
46
+ <p className="text-sm font-medium text-gray-900 dark:text-gray-100 truncate">
47
+ {user.displayName || 'User'}
48
+ </p>
49
+ <p className="text-sm text-gray-500 dark:text-gray-400 truncate">
50
+ {user.email}
51
+ </p>
52
+ </div>
53
+ <div className="py-1">
54
+ <button
55
+ onClick={handleSignOut}
56
+ disabled={loading}
57
+ className="w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 disabled:opacity-50"
58
+ >
59
+ Sign Out
60
+ </button>
61
+ </div>
62
+ </div>
63
+ )}
64
+ </div>
65
+ );
66
+ };
67
+
68
+ export default UserProfile;
@@ -0,0 +1,3 @@
1
+ export { default as Login } from './Login';
2
+ export { default as UserProfile } from './UserProfile';
3
+ export { default as ProtectedRoute } from './ProtectedRoute';
@@ -0,0 +1,13 @@
1
+ // Context
2
+ export { AuthProvider, useAuthContext } from './AuthContext';
3
+
4
+ // Components
5
+ export { default as Login } from './components/Login';
6
+ export { default as UserProfile } from './components/UserProfile';
7
+ export { default as ProtectedRoute } from './components/ProtectedRoute';
8
+
9
+ // Service
10
+ export { authService } from './authService';
11
+
12
+ // Types
13
+ export type { AuthContextType, LoginCredentials, SignUpCredentials } from './types';
@@ -0,0 +1,24 @@
1
+ import { User } from 'firebase/auth';
2
+
3
+ export interface LoginCredentials {
4
+ email: string;
5
+ password: string;
6
+ }
7
+
8
+ export interface SignUpCredentials extends LoginCredentials {
9
+ displayName?: string;
10
+ }
11
+
12
+ export interface AuthContextType {
13
+ user: User | null;
14
+ loading: boolean;
15
+ error: string | null;
16
+ signInWithGoogle: () => Promise<void>;
17
+ signOut: () => Promise<void>;
18
+ signInWithEmail: (email: string, password: string) => Promise<void>;
19
+ signUpWithEmail: (email: string, password: string, displayName?: string) => Promise<void>;
20
+ sendSignInLinkToEmail: (email: string) => Promise<void>;
21
+ signInWithEmailLink: (email: string, emailLink: string) => Promise<void>;
22
+ isSignInWithEmailLink: (emailLink: string) => boolean;
23
+ clearError: () => void;
24
+ }
@@ -0,0 +1,35 @@
1
+ /* Import Almadar theme - @import must precede @tailwind directives */
2
+ @import '@almadar/ui/themes/almadar.css';
3
+
4
+ @tailwind base;
5
+ @tailwind components;
6
+ @tailwind utilities;
7
+
8
+ /* Page-level layout: padding and max-width for main content area */
9
+ .ui-slot-main {
10
+ padding: 1.5rem 1rem;
11
+ max-width: 80rem;
12
+ margin-left: auto;
13
+ margin-right: auto;
14
+ }
15
+
16
+ @media (min-width: 768px) {
17
+ .ui-slot-main {
18
+ padding: 1.5rem 1.5rem;
19
+ }
20
+ }
21
+
22
+ @media (min-width: 1024px) {
23
+ .ui-slot-main {
24
+ padding: 2rem 2rem;
25
+ }
26
+ }
27
+
28
+ /* Global transition baseline: smooth state changes on interactive elements */
29
+ button,
30
+ a,
31
+ [role="button"],
32
+ [data-entity-row],
33
+ [data-interactive] {
34
+ transition: all var(--transition-normal, 250ms) var(--transition-timing, cubic-bezier(0.4, 0, 0.2, 1));
35
+ }
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import App from './App';
4
+ import './index.css';
5
+
6
+ ReactDOM.createRoot(document.getElementById('root')!).render(
7
+ <React.StrictMode>
8
+ <App />
9
+ </React.StrictMode>
10
+ );
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Navigation Module for Compiled Shells
3
+ *
4
+ * Re-exports schema-driven navigation from @almadar/ui/renderer.
5
+ * This module provides unified navigation that:
6
+ * - Finds pages by path pattern (supports :id params)
7
+ * - Switches active page via NavigationContext
8
+ * - Fires INIT events with merged payload (route params + explicit)
9
+ * - Optionally updates browser URL via history.pushState
10
+ *
11
+ * Usage in generated pages:
12
+ * ```tsx
13
+ * import { useNavigateTo, useInitPayload } from '../navigation';
14
+ *
15
+ * function InspectionsPage() {
16
+ * const navigateTo = useNavigateTo();
17
+ * const initPayload = useInitPayload();
18
+ *
19
+ * const handleRowClick = (item) => {
20
+ * navigateTo(`/inspection/${item.id}`, { id: item.id });
21
+ * };
22
+ *
23
+ * // Use initPayload for INIT event handling
24
+ * }
25
+ * ```
26
+ *
27
+ * @packageDocumentation
28
+ */
29
+
30
+ // Re-export all navigation utilities from @almadar/ui/renderer
31
+ export {
32
+ // Context and Provider
33
+ NavigationProvider,
34
+ useNavigation,
35
+ useNavigateTo,
36
+ useNavigationState,
37
+ useInitPayload,
38
+ useActivePage,
39
+ useNavigationId,
40
+ // Path utilities
41
+ matchPath,
42
+ extractRouteParams,
43
+ pathMatches,
44
+ // Page finding utilities
45
+ findPageByPath,
46
+ findPageByName,
47
+ getDefaultPage,
48
+ getAllPages,
49
+ } from '@almadar/ui/renderer';
50
+
51
+ export type {
52
+ NavigationState,
53
+ NavigationContextValue,
54
+ NavigationProviderProps,
55
+ } from '@almadar/ui/renderer';
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Pages Placeholder
3
+ *
4
+ * This directory receives generated page components:
5
+ * - Route pages from OrbitalSchema
6
+ * - Layout components
7
+ *
8
+ * DO NOT EDIT - Contents are overwritten by compiler
9
+ */
10
+
11
+ // {{GENERATED_PAGE_EXPORTS}}
12
+ export {};
@@ -0,0 +1,243 @@
1
+ /**
2
+ * @almadar/ui Tailwind Preset
3
+ *
4
+ * Provides the complete Almadar design token system as a Tailwind preset.
5
+ * Includes a safelist of all CSS-variable-based arbitrary classes used by
6
+ * @almadar/ui components so Tailwind generates them without scanning node_modules.
7
+ *
8
+ * Usage in tailwind.config.js:
9
+ * presets: [require('@almadar/ui/tailwind-preset')]
10
+ */
11
+
12
+ /** @type {import('tailwindcss').Config} */
13
+ module.exports = {
14
+ darkMode: 'class',
15
+ safelist: [
16
+ 'accent-[var(--color-foreground)]',
17
+ 'accent-[var(--color-primary)]',
18
+ 'active:bg-[var(--color-muted)]',
19
+ 'active:bg-[var(--color-primary)]',
20
+ 'active:scale-[var(--active-scale)]',
21
+ 'active:shadow-[var(--shadow-active)]',
22
+ 'active:text-[var(--color-primary-foreground)]',
23
+ 'bg-[var(--color-accent)]',
24
+ 'bg-[var(--color-background)]',
25
+ 'bg-[var(--color-border)]',
26
+ 'bg-[var(--color-card)]',
27
+ 'bg-[var(--color-error)]',
28
+ 'bg-[var(--color-foreground)]',
29
+ 'bg-[var(--color-info)]',
30
+ 'bg-[var(--color-muted)]',
31
+ 'bg-[var(--color-muted-foreground)]',
32
+ ':bg-[var(--color-primary)]',
33
+ 'bg-[var(--color-primary)]',
34
+ 'bg-[var(--color-primary-foreground)]',
35
+ 'bg-[var(--color-secondary)]',
36
+ 'bg-[var(--color-success)]',
37
+ 'bg-[var(--color-surface)]',
38
+ 'bg-[var(--color-table-header)]',
39
+ 'bg-[var(--color-warning)]',
40
+ 'border-b-[length:var(--border-width)]',
41
+ 'border-b-[var(--color-foreground)]',
42
+ 'border-b-[var(--color-primary)]',
43
+ 'border-[length:var(--border-width)]',
44
+ 'border-[length:var(--border-width-thin)]',
45
+ 'border-l-[length:var(--border-width)]',
46
+ 'border-l-[var(--color-foreground)]',
47
+ 'border-l-[var(--color-primary)]',
48
+ 'border-r-[length:var(--border-width)]',
49
+ 'border-r-[var(--color-foreground)]',
50
+ 'border-r-[var(--color-primary)]',
51
+ 'border-t-[length:var(--border-width)]',
52
+ 'border-t-[var(--color-foreground)]',
53
+ 'border-t-[var(--color-primary)]',
54
+ 'border-[var(--color-accent)]',
55
+ ':border-[var(--color-border)]',
56
+ 'border-[var(--color-border)]',
57
+ 'border-[var(--color-card)]',
58
+ 'border-[var(--color-error)]',
59
+ 'border-[var(--color-foreground)]',
60
+ 'border-[var(--color-info)]',
61
+ ':border-[var(--color-primary)]',
62
+ 'border-[var(--color-primary)]',
63
+ 'border-[var(--color-success)]',
64
+ 'border-[var(--color-table-border)]',
65
+ 'border-[var(--color-warning)]',
66
+ 'border-x-[length:var(--border-width)]',
67
+ 'checked:bg-[var(--color-primary)]',
68
+ 'dark:bg-[var(--color-background)]',
69
+ 'dark:bg-[var(--color-card)]',
70
+ 'dark:bg-[var(--color-foreground)]',
71
+ 'dark:bg-[var(--color-muted)]',
72
+ 'dark:border-[var(--color-border)]',
73
+ 'dark:hover:bg-[var(--color-error)]',
74
+ 'dark:hover:bg-[var(--color-muted)]',
75
+ 'dark:text-[var(--color-error)]',
76
+ 'dark:text-[var(--color-foreground)]',
77
+ 'dark:text-[var(--color-muted-foreground)]',
78
+ 'disabled:bg-[var(--color-muted)]',
79
+ 'disabled:text-[var(--color-muted-foreground)]',
80
+ 'duration-[var(--transition-fast)]',
81
+ 'duration-[var(--transition-normal)]',
82
+ 'fill-[var(--color-warning)]',
83
+ 'focus:bg-[var(--color-card)]',
84
+ 'focus:bg-[var(--color-muted)]',
85
+ 'focus:border-[var(--color-error)]',
86
+ 'focus:border-[var(--color-primary)]',
87
+ 'focus:border-[var(--color-ring)]',
88
+ 'focus:ring-[length:var(--focus-ring-width)]',
89
+ 'focus:ring-offset-[length:var(--focus-ring-offset)]',
90
+ 'focus:ring-[var(--color-error)]',
91
+ 'focus:ring-[var(--color-ring)]',
92
+ 'font-[var(--font-weight-bold)]',
93
+ 'font-[var(--font-weight-medium)]',
94
+ 'from-[var(--color-muted)]',
95
+ 'group-hover:bg-[var(--color-foreground)]',
96
+ 'group-hover:text-[var(--color-foreground)]',
97
+ 'group-hover:text-[var(--color-muted-foreground)]',
98
+ 'hover:bg-[var(--color-error)]',
99
+ 'hover:bg-[var(--color-muted)]',
100
+ 'hover:bg-[var(--color-muted-foreground)]',
101
+ 'hover:bg-[var(--color-primary)]',
102
+ 'hover:bg-[var(--color-primary-hover)]',
103
+ 'hover:bg-[var(--color-secondary-hover)]',
104
+ 'hover:bg-[var(--color-success)]',
105
+ 'hover:bg-[var(--color-surface)]',
106
+ 'hover:bg-[var(--color-surface-hover)]',
107
+ 'hover:bg-[var(--color-table-row-hover)]',
108
+ 'hover:bg-[var(--color-warning)]',
109
+ 'hover:border-[var(--color-border)]',
110
+ 'hover:border-[var(--color-border-hover)]',
111
+ 'hover:border-[var(--color-muted-foreground)]',
112
+ 'hover:border-[var(--color-primary)]',
113
+ 'hover:ring-[var(--color-ring)]',
114
+ 'hover:shadow-[var(--shadow-hover)]',
115
+ 'hover:shadow-[var(--shadow-sm)]',
116
+ 'hover:text-[var(--color-error)]',
117
+ 'hover:text-[var(--color-error-foreground)]',
118
+ 'hover:text-[var(--color-foreground)]',
119
+ 'hover:text-[var(--color-primary)]',
120
+ 'hover:text-[var(--color-success-foreground)]',
121
+ 'hover:text-[var(--color-warning-foreground)]',
122
+ 'peer-focus:ring-[var(--color-error)]',
123
+ 'peer-focus:ring-[var(--color-ring)]',
124
+ 'placeholder:text-[var(--color-muted-foreground)]',
125
+ 'placeholder:text-[var(--color-placeholder)]',
126
+ 'ring-[var(--color-accent)]',
127
+ 'ring-[var(--color-error)]',
128
+ 'ring-[var(--color-info)]',
129
+ 'ring-[var(--color-muted-foreground)]',
130
+ 'ring-[var(--color-primary)]',
131
+ 'ring-[var(--color-success)]',
132
+ 'ring-[var(--color-warning)]',
133
+ 'rounded-l-[var(--radius-sm)]',
134
+ 'rounded-r-[var(--radius-sm)]',
135
+ 'rounded-t-[var(--radius-lg)]',
136
+ 'rounded-t-[var(--radius-sm)]',
137
+ 'rounded-[var(--radius-full)]',
138
+ 'rounded-[var(--radius-lg)]',
139
+ 'rounded-[var(--radius-md)]',
140
+ 'rounded-[var(--radius-sm)]',
141
+ 'rounded-[var(--radius-xl)]',
142
+ 'shadow-[var(--shadow-lg)]',
143
+ 'shadow-[var(--shadow-main)]',
144
+ 'shadow-[var(--shadow-sm)]',
145
+ 'text-[var(--color-accent)]',
146
+ 'text-[var(--color-accent-foreground)]',
147
+ 'text-[var(--color-background)]',
148
+ 'text-[var(--color-card-foreground)]',
149
+ 'text-[var(--color-error)]',
150
+ 'text-[var(--color-error-foreground)]',
151
+ 'text-[var(--color-foreground)]',
152
+ 'text-[var(--color-info)]',
153
+ 'text-[var(--color-info-foreground)]',
154
+ 'text-[var(--color-muted)]',
155
+ 'text-[var(--color-muted-foreground)]',
156
+ 'text-[var(--color-primary)]',
157
+ ':text-[var(--color-primary-foreground)]',
158
+ 'text-[var(--color-primary-foreground)]',
159
+ 'text-[var(--color-secondary-foreground)]',
160
+ 'text-[var(--color-success)]',
161
+ 'text-[var(--color-warning)]',
162
+ 'text-[var(--color-warning-foreground)]',
163
+ 'to-[var(--color-accent)]',
164
+ ],
165
+ theme: {
166
+ fontFamily: {
167
+ sans: ['var(--font-family)', 'ui-sans-serif', 'system-ui', 'sans-serif'],
168
+ mono: ['var(--font-family-mono, ui-monospace)', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', 'monospace'],
169
+ },
170
+ extend: {
171
+ colors: {
172
+ primary: {
173
+ DEFAULT: 'var(--color-primary)',
174
+ foreground: 'var(--color-primary-foreground)',
175
+ hover: 'var(--color-primary-hover)',
176
+ },
177
+ secondary: {
178
+ DEFAULT: 'var(--color-secondary)',
179
+ foreground: 'var(--color-secondary-foreground)',
180
+ hover: 'var(--color-secondary-hover)',
181
+ },
182
+ muted: {
183
+ DEFAULT: 'var(--color-muted)',
184
+ foreground: 'var(--color-muted-foreground)',
185
+ },
186
+ accent: {
187
+ DEFAULT: 'var(--color-accent)',
188
+ foreground: 'var(--color-accent-foreground)',
189
+ },
190
+ background: 'var(--color-background)',
191
+ foreground: 'var(--color-foreground)',
192
+ card: {
193
+ DEFAULT: 'var(--color-card)',
194
+ foreground: 'var(--color-card-foreground)',
195
+ },
196
+ surface: 'var(--color-surface)',
197
+ border: 'var(--color-border)',
198
+ input: 'var(--color-input)',
199
+ ring: 'var(--color-ring)',
200
+ error: {
201
+ DEFAULT: 'var(--color-error)',
202
+ foreground: 'var(--color-error-foreground)',
203
+ },
204
+ success: {
205
+ DEFAULT: 'var(--color-success)',
206
+ foreground: 'var(--color-success-foreground)',
207
+ },
208
+ warning: {
209
+ DEFAULT: 'var(--color-warning)',
210
+ foreground: 'var(--color-warning-foreground)',
211
+ },
212
+ info: {
213
+ DEFAULT: 'var(--color-info)',
214
+ foreground: 'var(--color-info-foreground)',
215
+ },
216
+ },
217
+ borderRadius: {
218
+ none: 'var(--radius-none, 0)',
219
+ sm: 'var(--radius-sm)',
220
+ md: 'var(--radius-md)',
221
+ lg: 'var(--radius-lg)',
222
+ xl: 'var(--radius-xl)',
223
+ full: 'var(--radius-full)',
224
+ },
225
+ boxShadow: {
226
+ sm: 'var(--shadow-sm)',
227
+ DEFAULT: 'var(--shadow-main)',
228
+ lg: 'var(--shadow-lg)',
229
+ inner: 'var(--shadow-inner)',
230
+ },
231
+ fontWeight: {
232
+ normal: 'var(--font-weight-normal, 400)',
233
+ medium: 'var(--font-weight-medium, 500)',
234
+ bold: 'var(--font-weight-bold, 600)',
235
+ },
236
+ transitionDuration: {
237
+ fast: 'var(--transition-fast, 150ms)',
238
+ normal: 'var(--transition-normal, 250ms)',
239
+ slow: 'var(--transition-slow, 400ms)',
240
+ },
241
+ },
242
+ },
243
+ };
@@ -0,0 +1,15 @@
1
+ import { createRequire } from 'module';
2
+ const require = createRequire(import.meta.url);
3
+
4
+ /** @type {import('tailwindcss').Config} */
5
+ export default {
6
+ presets: [require('./tailwind-preset.cjs')],
7
+ content: [
8
+ "./index.html",
9
+ "./src/**/*.{js,ts,jsx,tsx}",
10
+ ],
11
+ theme: {
12
+ extend: {},
13
+ },
14
+ plugins: [],
15
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "useDefineForClassFields": true,
5
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
6
+ "types": ["vite/client"],
7
+ "module": "ESNext",
8
+ "skipLibCheck": true,
9
+ "moduleResolution": "bundler",
10
+ "allowImportingTsExtensions": true,
11
+ "resolveJsonModule": true,
12
+ "isolatedModules": true,
13
+ "noEmit": true,
14
+ "jsx": "react-jsx",
15
+ "strict": true,
16
+ "noUnusedLocals": false,
17
+ "noUnusedParameters": false,
18
+ "noFallthroughCasesInSwitch": true,
19
+ "baseUrl": ".",
20
+ "paths": {
21
+ "@/*": ["./src/*"],
22
+ "@generated/*": ["./src/generated/*"],
23
+ "@pages/*": ["./src/pages/*"],
24
+ "@app/shared": ["../shared/src/index.ts"],
25
+ "@app/shared/*": ["../shared/src/*"],
26
+ "@shared/*": ["../shared/src/*"],
27
+ "@design-system": ["../../../design-system/index.ts"],
28
+ "@design-system/*": ["../../../design-system/*"]
29
+ }
30
+ },
31
+ "include": ["src", "../../../design-system/types"],
32
+ "exclude": ["node_modules", "dist", "src/**/__tests__", "src/**/*.stories.ts", "src/**/*.stories.tsx"]
33
+ }
@@ -0,0 +1,49 @@
1
+ import { defineConfig, loadEnv } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+ import path from 'path';
4
+
5
+ export default defineConfig(({ mode }) => {
6
+ const env = loadEnv(mode, process.cwd(), '');
7
+ const backendUrl = env.VITE_API_URL || 'http://localhost:3030';
8
+ const wsUrl = backendUrl.replace('http://', 'ws://').replace('https://', 'wss://');
9
+
10
+ return {
11
+ plugins: [react()],
12
+
13
+ resolve: {
14
+ alias: {
15
+ '@design-system': path.resolve(__dirname, '../../../design-system'),
16
+ '@': path.resolve(__dirname, './src'),
17
+ '@generated': path.resolve(__dirname, './src/generated'),
18
+ '@pages': path.resolve(__dirname, './src/pages'),
19
+ '@app/shared': path.resolve(__dirname, '../shared/src'),
20
+ '@shared': path.resolve(__dirname, '../shared/src'),
21
+ },
22
+ },
23
+
24
+ server: {
25
+ host: true,
26
+ port: 5173,
27
+ proxy: {
28
+ '/api': {
29
+ target: backendUrl,
30
+ changeOrigin: true,
31
+ },
32
+ '/ws': {
33
+ target: wsUrl,
34
+ ws: true,
35
+ },
36
+ },
37
+ },
38
+
39
+ build: {
40
+ outDir: 'dist',
41
+ sourcemap: true,
42
+ },
43
+
44
+ test: {
45
+ environment: 'jsdom',
46
+ globals: true,
47
+ },
48
+ };
49
+ });
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ const tsParser = require("@typescript-eslint/parser");
3
+ const almadarPlugin = require("@almadar/eslint-plugin");
4
+
5
+ module.exports = [
6
+ { ignores: ["dist/**", "node_modules/**", "**/*.test.ts"] },
7
+ {
8
+ files: ["src/**/*.ts"],
9
+ languageOptions: {
10
+ parser: tsParser,
11
+ parserOptions: { ecmaVersion: "latest", sourceType: "module" },
12
+ },
13
+ plugins: { almadar: almadarPlugin },
14
+ rules: {
15
+ "almadar/no-as-any": "error",
16
+ "almadar/no-import-generated": "error",
17
+ },
18
+ },
19
+ ];