@elsapiens/cli 0.1.0 → 0.1.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.
@@ -0,0 +1,23 @@
1
+ export default {
2
+ // Navigation
3
+ 'nav.home': 'Home',
4
+ 'nav.dashboard': 'Dashboard',
5
+ 'nav.settings': 'Settings',
6
+
7
+ // App Drawer
8
+ 'appDrawer.title': 'Applications',
9
+
10
+ // User Menu
11
+ 'userMenu.manageAccount': 'Manage Account',
12
+ 'userMenu.changePassword': 'Change Password',
13
+ 'userMenu.signOut': 'Sign Out',
14
+
15
+ // Common
16
+ 'common.save': 'Save',
17
+ 'common.cancel': 'Cancel',
18
+ 'common.delete': 'Delete',
19
+ 'common.edit': 'Edit',
20
+ 'common.search': 'Search',
21
+ 'common.loading': 'Loading...',
22
+ 'common.welcomeBack': 'Welcome back',
23
+ };
@@ -0,0 +1,18 @@
1
+ import type { Locale } from '@elsapiens/providers';
2
+
3
+ const loaders: Record<Locale, () => Promise<Record<string, string>>> = {
4
+ en: () => import('./en').then((m) => m.default),
5
+ es: () => import('./en').then((m) => m.default), // Fallback to English
6
+ fr: () => import('./en').then((m) => m.default),
7
+ ar: () => import('./en').then((m) => m.default),
8
+ he: () => import('./en').then((m) => m.default),
9
+ ml: () => import('./en').then((m) => m.default),
10
+ de: () => import('./en').then((m) => m.default),
11
+ pt: () => import('./en').then((m) => m.default),
12
+ it: () => import('./en').then((m) => m.default),
13
+ ja: () => import('./en').then((m) => m.default),
14
+ zh: () => import('./en').then((m) => m.default),
15
+ ko: () => import('./en').then((m) => m.default),
16
+ };
17
+
18
+ export const loadCommon = (locale: Locale) => loaders[locale]();
@@ -0,0 +1,94 @@
1
+ import type { TranslationLoader } from '@elsapiens/providers';
2
+
3
+ /**
4
+ * Common translations loader
5
+ * Add your translations here or load them from an API
6
+ */
7
+ export const loadCommon: TranslationLoader = async (locale) => {
8
+ const translations: Record<string, Record<string, string>> = {
9
+ en: {
10
+ // Navigation
11
+ 'nav.home': 'Home',
12
+ 'nav.dashboard': 'Dashboard',
13
+ 'nav.settings': 'Settings',
14
+
15
+ // Common actions
16
+ 'common.search': 'Search...',
17
+ 'common.save': 'Save',
18
+ 'common.cancel': 'Cancel',
19
+ 'common.delete': 'Delete',
20
+ 'common.edit': 'Edit',
21
+ 'common.create': 'Create',
22
+ 'common.loading': 'Loading...',
23
+
24
+ // App Drawer
25
+ 'appDrawer.title': 'Applications',
26
+
27
+ // Dashboard
28
+ 'dashboard.title': 'Dashboard',
29
+ 'dashboard.description': 'Welcome to your dashboard',
30
+
31
+ // Settings - General
32
+ 'settings.title': 'Settings',
33
+ 'settings.description': 'Manage your account and preferences',
34
+
35
+ // Settings - Profile Section
36
+ 'settings.profile': 'Profile',
37
+ 'settings.profileDescription': 'Manage your personal information',
38
+ 'settings.firstName': 'First Name',
39
+ 'settings.lastName': 'Last Name',
40
+ 'settings.email': 'Email',
41
+ 'settings.saveChanges': 'Save Changes',
42
+
43
+ // Settings - Appearance Section
44
+ 'settings.appearance': 'Appearance',
45
+ 'settings.appearanceDescription': 'Customize the look and feel of your workspace',
46
+ 'settings.spacing': 'Spacing',
47
+ 'settings.spacingDescription': 'Adjust the density of the interface',
48
+ 'settings.spacing.compact': 'Compact',
49
+ 'settings.spacing.normal': 'Normal',
50
+ 'settings.spacing.spacious': 'Spacious',
51
+ 'settings.theme': 'Theme',
52
+ 'settings.themeDescription': 'Select light, dark, or sync with your system',
53
+ 'settings.theme.light': 'Light',
54
+ 'settings.theme.dark': 'Dark',
55
+ 'settings.theme.system': 'System',
56
+ 'settings.background': 'Background Effect',
57
+ 'settings.backgroundDescription': 'Add subtle animated effects to the content area',
58
+ 'settings.language': 'Language',
59
+ 'settings.languageDescription': 'Choose your preferred language for the interface',
60
+
61
+ // Settings - Notifications Section
62
+ 'settings.notifications': 'Notifications',
63
+ 'settings.notificationsDescription': 'Configure how you receive notifications',
64
+ 'settings.pushNotifications': 'Push Notifications',
65
+ 'settings.pushNotificationsDesc': 'Receive push notifications for updates',
66
+ 'settings.emailUpdates': 'Email Updates',
67
+ 'settings.emailUpdatesDesc': 'Receive weekly email summaries',
68
+
69
+ // Settings - Security Section
70
+ 'settings.security': 'Security',
71
+ 'settings.securityDescription': 'Manage your password and security settings',
72
+ 'settings.currentPassword': 'Current Password',
73
+ 'settings.currentPasswordPlaceholder': 'Enter current password',
74
+ 'settings.newPassword': 'New Password',
75
+ 'settings.newPasswordPlaceholder': 'Enter new password',
76
+ 'settings.confirmPassword': 'Confirm New Password',
77
+ 'settings.confirmPasswordPlaceholder': 'Confirm new password',
78
+ 'settings.updatePassword': 'Update Password',
79
+ },
80
+ // Add more locales as needed
81
+ es: {
82
+ 'nav.home': 'Inicio',
83
+ 'nav.dashboard': 'Panel',
84
+ 'nav.settings': 'Configuración',
85
+ 'common.search': 'Buscar...',
86
+ 'common.save': 'Guardar',
87
+ 'common.cancel': 'Cancelar',
88
+ 'settings.title': 'Configuración',
89
+ 'settings.description': 'Administra tu cuenta y preferencias',
90
+ },
91
+ };
92
+
93
+ return translations[locale] || translations.en;
94
+ };
@@ -0,0 +1,49 @@
1
+ export default {
2
+ 'settings.title': 'Settings',
3
+ 'settings.description': 'Manage your account and preferences',
4
+
5
+ // Profile Section
6
+ 'settings.profile': 'Profile',
7
+ 'settings.profileDescription': 'Manage your personal information',
8
+ 'settings.firstName': 'First Name',
9
+ 'settings.lastName': 'Last Name',
10
+ 'settings.email': 'Email',
11
+ 'settings.saveChanges': 'Save Changes',
12
+
13
+ // Notifications Section
14
+ 'settings.notifications': 'Notifications',
15
+ 'settings.notificationsDescription': 'Configure how you receive notifications',
16
+ 'settings.pushNotifications': 'Push Notifications',
17
+ 'settings.pushNotificationsDesc': 'Receive push notifications for updates',
18
+ 'settings.emailUpdates': 'Email Updates',
19
+ 'settings.emailUpdatesDesc': 'Receive weekly email summaries',
20
+
21
+ // Appearance Section
22
+ 'settings.appearance': 'Appearance',
23
+ 'settings.appearanceDescription': 'Customize the look and feel of your workspace',
24
+ 'settings.spacing': 'Spacing',
25
+ 'settings.spacingDescription': 'Adjust the density of the interface',
26
+ 'settings.spacing.compact': 'Compact',
27
+ 'settings.spacing.normal': 'Normal',
28
+ 'settings.spacing.spacious': 'Spacious',
29
+ 'settings.theme': 'Theme',
30
+ 'settings.themeDescription': 'Select light, dark, or sync with your system',
31
+ 'settings.theme.light': 'Light',
32
+ 'settings.theme.dark': 'Dark',
33
+ 'settings.theme.system': 'System',
34
+ 'settings.language': 'Language',
35
+ 'settings.languageDescription': 'Choose your preferred language for the interface',
36
+ 'settings.background': 'Background Effect',
37
+ 'settings.backgroundDescription': 'Add subtle animated effects to the content area',
38
+
39
+ // Security Section
40
+ 'settings.security': 'Security',
41
+ 'settings.securityDescription': 'Manage your password and security settings',
42
+ 'settings.currentPassword': 'Current Password',
43
+ 'settings.currentPasswordPlaceholder': 'Enter current password',
44
+ 'settings.newPassword': 'New Password',
45
+ 'settings.newPasswordPlaceholder': 'Enter new password',
46
+ 'settings.confirmPassword': 'Confirm New Password',
47
+ 'settings.confirmPasswordPlaceholder': 'Confirm new password',
48
+ 'settings.updatePassword': 'Update Password',
49
+ };
@@ -0,0 +1,18 @@
1
+ import type { Locale } from '@elsapiens/providers';
2
+
3
+ const loaders: Record<Locale, () => Promise<Record<string, string>>> = {
4
+ en: () => import('./en').then((m) => m.default),
5
+ es: () => import('./en').then((m) => m.default), // Fallback to English
6
+ fr: () => import('./en').then((m) => m.default),
7
+ ar: () => import('./en').then((m) => m.default),
8
+ he: () => import('./en').then((m) => m.default),
9
+ ml: () => import('./en').then((m) => m.default),
10
+ de: () => import('./en').then((m) => m.default),
11
+ pt: () => import('./en').then((m) => m.default),
12
+ it: () => import('./en').then((m) => m.default),
13
+ ja: () => import('./en').then((m) => m.default),
14
+ zh: () => import('./en').then((m) => m.default),
15
+ ko: () => import('./en').then((m) => m.default),
16
+ };
17
+
18
+ export const loadSettings = (locale: Locale) => loaders[locale]();
@@ -0,0 +1,10 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "skipLibCheck": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "allowSyntheticDefaultImports": true
8
+ },
9
+ "include": ["vite.config.ts"]
10
+ }
@@ -0,0 +1,13 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ interface ImportMetaEnv {
4
+ readonly VITE_API_URL: string;
5
+ readonly VITE_AUTH_URL: string;
6
+ readonly VITE_ROOT_DOMAIN: string;
7
+ readonly VITE_REQUIRE_AUTH: string;
8
+ readonly DEV: boolean;
9
+ }
10
+
11
+ interface ImportMeta {
12
+ readonly env: ImportMetaEnv;
13
+ }
@@ -0,0 +1,30 @@
1
+ /// <reference types="vitest" />
2
+ import { defineConfig } from 'vite';
3
+ import react from '@vitejs/plugin-react';
4
+
5
+ export default defineConfig({
6
+ plugins: [react()],
7
+ test: {
8
+ globals: true,
9
+ environment: 'jsdom',
10
+ setupFiles: ['./src/test/setup.ts'],
11
+ include: ['**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
12
+ coverage: {
13
+ provider: 'v8',
14
+ reporter: ['text', 'json', 'html'],
15
+ exclude: [
16
+ 'node_modules/',
17
+ 'src/test/',
18
+ '**/*.d.ts',
19
+ '**/*.config.*',
20
+ '**/index.ts',
21
+ ],
22
+ thresholds: {
23
+ lines: 85,
24
+ functions: 85,
25
+ branches: 85,
26
+ statements: 85,
27
+ },
28
+ },
29
+ },
30
+ });