@shohojdhara/atomix 0.3.4 → 0.3.5

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 (114) hide show
  1. package/dist/atomix.css +9 -10
  2. package/dist/atomix.css.map +1 -0
  3. package/dist/atomix.min.css +15108 -11
  4. package/dist/atomix.min.css.map +1 -0
  5. package/dist/charts.d.ts +1929 -0
  6. package/dist/charts.js +6482 -0
  7. package/dist/charts.js.map +1 -0
  8. package/dist/core.d.ts +1289 -0
  9. package/dist/core.js +3357 -0
  10. package/dist/core.js.map +1 -0
  11. package/dist/forms.d.ts +1085 -0
  12. package/dist/forms.js +2450 -0
  13. package/dist/forms.js.map +1 -0
  14. package/dist/heavy.d.ts +636 -0
  15. package/dist/heavy.js +4550 -0
  16. package/dist/heavy.js.map +1 -0
  17. package/dist/index.d.ts +5161 -4990
  18. package/dist/index.esm.js +1457 -784
  19. package/dist/index.esm.js.map +1 -1
  20. package/dist/index.js +1473 -790
  21. package/dist/index.js.map +1 -1
  22. package/dist/index.min.js +1 -1
  23. package/dist/index.min.js.map +1 -1
  24. package/dist/layout.d.ts +300 -0
  25. package/dist/layout.js +336 -0
  26. package/dist/layout.js.map +1 -0
  27. package/dist/theme.d.ts +1992 -0
  28. package/dist/theme.js +5348 -0
  29. package/dist/theme.js.map +1 -0
  30. package/package.json +66 -20
  31. package/scripts/atomix-cli.js +544 -16
  32. package/scripts/cli/__tests__/cli-commands.test.js +204 -0
  33. package/scripts/cli/__tests__/utils.test.js +201 -0
  34. package/scripts/cli/__tests__/vitest.config.js +26 -0
  35. package/scripts/cli/interactive-init.js +1 -1
  36. package/scripts/cli/token-manager.js +32 -7
  37. package/scripts/cli/utils.js +347 -0
  38. package/src/components/Accordion/Accordion.tsx +5 -54
  39. package/src/components/Accordion/index.ts +1 -1
  40. package/src/components/Avatar/Avatar.tsx +3 -3
  41. package/src/components/Badge/Badge.tsx +3 -3
  42. package/src/components/Breadcrumb/Breadcrumb.tsx +3 -3
  43. package/src/components/Card/ElevationCard.tsx +1 -1
  44. package/src/components/Chart/AnimatedChart.tsx +19 -17
  45. package/src/components/Chart/AreaChart.tsx +5 -1
  46. package/src/components/Chart/BarChart.tsx +1 -0
  47. package/src/components/Chart/BubbleChart.tsx +6 -5
  48. package/src/components/Chart/ChartToolbar.tsx +1 -0
  49. package/src/components/Chart/FunnelChart.tsx +1 -1
  50. package/src/components/Chart/RadarChart.tsx +19 -12
  51. package/src/components/Chart/ScatterChart.tsx +3 -3
  52. package/src/components/Chart/TreemapChart.tsx +2 -1
  53. package/src/components/Chart/WaterfallChart.tsx +0 -1
  54. package/src/components/Chart/types.ts +12 -2
  55. package/src/components/Chart/utils.ts +4 -3
  56. package/src/components/DataTable/DataTable.tsx +3 -3
  57. package/src/components/Dropdown/Dropdown.tsx +12 -9
  58. package/src/components/Footer/FooterSection.tsx +3 -3
  59. package/src/components/Form/Checkbox.tsx +3 -3
  60. package/src/components/Form/Input.tsx +4 -2
  61. package/src/components/Form/Radio.tsx +3 -3
  62. package/src/components/Form/Select.tsx +3 -3
  63. package/src/components/Form/Textarea.tsx +4 -2
  64. package/src/components/List/List.stories.tsx +3 -3
  65. package/src/components/List/List.tsx +3 -3
  66. package/src/components/List/ListGroup.tsx +3 -1
  67. package/src/components/Modal/Modal.tsx +3 -3
  68. package/src/components/Navigation/Menu/MegaMenu.tsx +9 -3
  69. package/src/components/Navigation/Menu/Menu.tsx +9 -3
  70. package/src/components/Pagination/Pagination.tsx +6 -5
  71. package/src/components/PhotoViewer/PhotoViewerImage.tsx +2 -2
  72. package/src/components/Popover/Popover.tsx +4 -4
  73. package/src/components/Progress/Progress.tsx +6 -2
  74. package/src/components/Rating/Rating.tsx +5 -2
  75. package/src/components/Slider/Slider.tsx +10 -9
  76. package/src/components/Spinner/Spinner.tsx +3 -3
  77. package/src/components/Tabs/Tabs.tsx +3 -3
  78. package/src/components/Tooltip/Tooltip.tsx +3 -3
  79. package/src/components/index.ts +5 -2
  80. package/src/layouts/MasonryGrid/MasonryGrid.tsx +2 -2
  81. package/src/lib/composables/useChartPerformance.ts +102 -78
  82. package/src/lib/composables/useChartScale.ts +10 -0
  83. package/src/lib/composables/useHero.ts +9 -2
  84. package/src/lib/composables/useHeroBackgroundSlider.ts +5 -3
  85. package/src/lib/composables/useSideMenu.ts +1 -0
  86. package/src/lib/composables/useVideoPlayer.ts +3 -2
  87. package/src/lib/config/loader.ts +55 -13
  88. package/src/lib/hooks/index.ts +0 -1
  89. package/src/lib/hooks/useComponentCustomization.ts +10 -14
  90. package/src/lib/hooks/usePerformanceMonitor.ts +149 -0
  91. package/src/lib/patterns/index.ts +2 -2
  92. package/src/lib/patterns/slots.tsx +2 -2
  93. package/src/lib/theme/composeTheme.ts +1 -1
  94. package/src/lib/theme/core/ThemeEngine.ts +8 -0
  95. package/src/lib/theme/core/ThemeValidator.ts +5 -2
  96. package/src/lib/theme/devtools/Inspector.tsx +1 -1
  97. package/src/lib/theme/devtools/LiveEditor.tsx +11 -5
  98. package/src/lib/theme/generateCSSVariables.ts +1 -1
  99. package/src/lib/theme/i18n/rtl.ts +2 -1
  100. package/src/lib/theme/runtime/ThemeApplicator.ts +28 -11
  101. package/src/lib/theme/runtime/ThemeErrorBoundary.tsx +3 -3
  102. package/src/lib/theme/runtime/ThemeManager.ts +4 -0
  103. package/src/lib/theme-tools.ts +1 -1
  104. package/src/lib/types/components.ts +183 -34
  105. package/src/lib/types/partProps.ts +0 -16
  106. package/src/lib/utils/fontPreloader.ts +148 -0
  107. package/src/lib/utils/index.ts +11 -0
  108. package/src/lib/utils/memoryMonitor.ts +189 -0
  109. package/src/styles/01-settings/_settings.fonts.scss +2 -5
  110. package/src/styles/03-generic/_generated-root.css +22 -1
  111. package/src/styles/06-components/_components.navbar.scss +0 -6
  112. package/src/themes/themes.config.js +37 -4
  113. package/scripts/build-themes.js +0 -208
  114. package/src/components/AtomixGlass/atomixGLass.old.tsx +0 -1263
@@ -5,7 +5,7 @@
5
5
  * DO NOT EDIT MANUALLY - Edit atomix.config.ts instead
6
6
  * Run 'npm run sync:config' to regenerate
7
7
  *
8
- * Generated on: 2025-12-21T16:24:42.905Z
8
+ * Generated on: 2025-12-23T09:44:24.454Z
9
9
  */
10
10
 
11
11
  export const themesConfig = {
@@ -16,7 +16,22 @@ export const themesConfig = {
16
16
  metadata: {},
17
17
 
18
18
  // Build configuration
19
- build: {},
19
+ build: {
20
+ output: {
21
+ directory: 'dist/themes',
22
+ formats: {
23
+ expanded: '.css',
24
+ compressed: '.min.css'
25
+ }
26
+ },
27
+ sass: {
28
+ style: 'expanded',
29
+ sourceMap: true,
30
+ loadPaths: [
31
+ 'src'
32
+ ]
33
+ }
34
+ },
20
35
 
21
36
  // Export configuration for package.json
22
37
  exports: {
@@ -25,10 +40,28 @@ export const themesConfig = {
25
40
  },
26
41
 
27
42
  // Theme integration settings
28
- integration: {},
43
+ integration: {
44
+ cssVariables: {
45
+ colorMode: '--color-mode'
46
+ },
47
+ classNames: {
48
+ theme: 'data-theme',
49
+ colorMode: 'data-color-mode'
50
+ }
51
+ },
29
52
 
30
53
  // Runtime theme loading configuration
31
- runtime: {},
54
+ runtime: {
55
+ basePath: '/themes',
56
+ cdnPath: null,
57
+ preload: [],
58
+ lazy: false,
59
+ defaultTheme: null,
60
+ storageKey: 'atomix-theme',
61
+ dataAttribute: 'data-atomix-theme',
62
+ enablePersistence: true,
63
+ useMinified: false
64
+ },
32
65
 
33
66
  // Theme dependencies (if a theme requires another theme to be loaded)
34
67
  dependencies: {},
@@ -1,208 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Build script for Atomix themes
5
- *
6
- * This script compiles all theme SCSS files to CSS
7
- * and generates both expanded and minified versions.
8
- */
9
-
10
- import { readdir, mkdir, access } from 'fs/promises';
11
- import { join, basename } from 'path';
12
- import * as sass from 'sass';
13
- import postcss from 'postcss';
14
- import autoprefixer from 'autoprefixer';
15
- import cssnano from 'cssnano';
16
- import { fileURLToPath } from 'url';
17
- import { dirname } from 'path';
18
-
19
- const __filename = fileURLToPath(import.meta.url);
20
- const __dirname = dirname(__filename);
21
-
22
- // Configuration
23
- const THEMES_DIR = join(__dirname, '../src/themes');
24
- const OUTPUT_DIR = join(__dirname, '../dist/themes');
25
- const EXCLUDE_FILES = ['README.md', 'THEME_CHECKLIST.md', 'themes.config.js'];
26
-
27
- /**
28
- * Ensure output directory exists
29
- */
30
- async function ensureOutputDir() {
31
- try {
32
- await access(OUTPUT_DIR);
33
- } catch {
34
- await mkdir(OUTPUT_DIR, { recursive: true });
35
- console.log(`✅ Created output directory: ${OUTPUT_DIR}`);
36
- }
37
- }
38
-
39
- /**
40
- * Get list of themes to build
41
- */
42
- async function getThemes() {
43
- const entries = await readdir(THEMES_DIR, { withFileTypes: true });
44
- const themes = entries
45
- .filter(entry => entry.isDirectory())
46
- .map(entry => entry.name);
47
-
48
- console.log(`📦 Found ${themes.length} themes: ${themes.join(', ')}`);
49
- return themes;
50
- }
51
-
52
- /**
53
- * Check if theme has an index.scss file
54
- */
55
- async function hasIndexScss(themeName) {
56
- try {
57
- await access(join(THEMES_DIR, themeName, 'index.scss'));
58
- return true;
59
- } catch {
60
- return false;
61
- }
62
- }
63
-
64
- /**
65
- * Build a single theme
66
- */
67
- async function buildTheme(themeName) {
68
- const indexPath = join(THEMES_DIR, themeName, 'index.scss');
69
-
70
- // Check if index.scss exists
71
- if (!(await hasIndexScss(themeName))) {
72
- console.log(`⚠️ Skipping ${themeName}: No index.scss found`);
73
- return;
74
- }
75
-
76
- console.log(`🔨 Building theme: ${themeName}`);
77
-
78
- try {
79
- // Compile SCSS
80
- const result = sass.compile(indexPath, {
81
- loadPaths: [
82
- join(__dirname, '../src'),
83
- join(__dirname, '../src/styles'),
84
- join(__dirname, '../node_modules'),
85
- ],
86
- sourceMap: true,
87
- style: 'expanded',
88
- });
89
-
90
- // Process with PostCSS (autoprefixer)
91
- const processed = await postcss([
92
- autoprefixer({
93
- overrideBrowserslist: ['> 1%', 'last 2 versions', 'not dead'],
94
- }),
95
- ]).process(result.css, {
96
- from: indexPath,
97
- to: join(OUTPUT_DIR, `${themeName}.css`),
98
- map: { inline: false },
99
- });
100
-
101
- // Write expanded CSS
102
- const { writeFile } = await import('fs/promises');
103
- await writeFile(
104
- join(OUTPUT_DIR, `${themeName}.css`),
105
- processed.css,
106
- 'utf8'
107
- );
108
-
109
- // Write source map if available
110
- if (processed.map) {
111
- await writeFile(
112
- join(OUTPUT_DIR, `${themeName}.css.map`),
113
- processed.map.toString(),
114
- 'utf8'
115
- );
116
- }
117
-
118
- console.log(` ✅ Generated ${themeName}.css`);
119
-
120
- // Create minified version
121
- const minified = await postcss([
122
- autoprefixer({
123
- overrideBrowserslist: ['> 1%', 'last 2 versions', 'not dead'],
124
- }),
125
- cssnano({
126
- preset: 'default',
127
- }),
128
- ]).process(result.css, {
129
- from: indexPath,
130
- to: join(OUTPUT_DIR, `${themeName}.min.css`),
131
- });
132
-
133
- await writeFile(
134
- join(OUTPUT_DIR, `${themeName}.min.css`),
135
- minified.css,
136
- 'utf8'
137
- );
138
-
139
- console.log(` ✅ Generated ${themeName}.min.css`);
140
-
141
- return {
142
- theme: themeName,
143
- success: true,
144
- files: [
145
- `${themeName}.css`,
146
- `${themeName}.min.css`,
147
- ],
148
- };
149
- } catch (error) {
150
- console.error(` ❌ Failed to build ${themeName}:`, error.message);
151
- return {
152
- theme: themeName,
153
- success: false,
154
- error: error.message,
155
- };
156
- }
157
- }
158
-
159
- /**
160
- * Build all themes
161
- */
162
- async function buildAllThemes() {
163
- console.log('🚀 Starting theme build process...\n');
164
-
165
- // Ensure output directory exists
166
- await ensureOutputDir();
167
-
168
- // Get list of themes
169
- const themes = await getThemes();
170
-
171
- // Build each theme
172
- const results = [];
173
- for (const theme of themes) {
174
- const result = await buildTheme(theme);
175
- results.push(result);
176
- console.log(''); // Add spacing between themes
177
- }
178
-
179
- // Summary
180
- console.log('📊 Build Summary:');
181
- const successful = results.filter(r => r?.success).length;
182
- const failed = results.filter(r => r && !r.success).length;
183
- const skipped = results.filter(r => !r).length;
184
-
185
- console.log(` ✅ Successful: ${successful}`);
186
- if (failed > 0) {
187
- console.log(` ❌ Failed: ${failed}`);
188
- results.filter(r => r && !r.success).forEach(r => {
189
- console.log(` - ${r.theme}: ${r.error}`);
190
- });
191
- }
192
- if (skipped > 0) {
193
- console.log(` ⚠️ Skipped: ${skipped}`);
194
- }
195
-
196
- console.log('\n✨ Theme build complete!');
197
-
198
- // Exit with error code if any builds failed
199
- if (failed > 0) {
200
- process.exit(1);
201
- }
202
- }
203
-
204
- // Run the build
205
- buildAllThemes().catch(error => {
206
- console.error('💥 Build failed:', error);
207
- process.exit(1);
208
- });