@shohojdhara/atomix 0.5.1 → 0.5.4

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 (145) hide show
  1. package/atomix.config.ts +45 -33
  2. package/build-tools/webpack-loader.js +5 -4
  3. package/dist/atomix.css +138 -17
  4. package/dist/atomix.css.map +1 -1
  5. package/dist/atomix.min.css +1 -1
  6. package/dist/atomix.min.css.map +1 -1
  7. package/dist/build-tools/webpack-loader.js +5 -4
  8. package/dist/charts.d.ts +23 -23
  9. package/dist/charts.js +40 -37
  10. package/dist/charts.js.map +1 -1
  11. package/dist/config.d.ts +699 -0
  12. package/dist/config.js +17 -0
  13. package/dist/config.js.map +1 -0
  14. package/dist/core.d.ts +2 -2
  15. package/dist/core.js +111 -50
  16. package/dist/core.js.map +1 -1
  17. package/dist/forms.d.ts +3 -6
  18. package/dist/forms.js +2 -2
  19. package/dist/forms.js.map +1 -1
  20. package/dist/heavy.d.ts +1 -1
  21. package/dist/heavy.js +173 -111
  22. package/dist/heavy.js.map +1 -1
  23. package/dist/index.d.ts +1881 -790
  24. package/dist/index.esm.js +2713 -816
  25. package/dist/index.esm.js.map +1 -1
  26. package/dist/index.js +2693 -780
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.min.js +1 -1
  29. package/dist/index.min.js.map +1 -1
  30. package/dist/layout.js +59 -60
  31. package/dist/layout.js.map +1 -1
  32. package/dist/theme.d.ts +1390 -276
  33. package/dist/theme.js +2133 -625
  34. package/dist/theme.js.map +1 -1
  35. package/package.json +14 -9
  36. package/scripts/atomix-cli.js +15 -1
  37. package/scripts/cli/__tests__/complexity-utils.test.js +24 -0
  38. package/scripts/cli/__tests__/detector.test.js +50 -0
  39. package/scripts/cli/__tests__/template-engine.test.js +23 -0
  40. package/scripts/cli/__tests__/test-setup.js +3 -0
  41. package/scripts/cli/commands/doctor.js +15 -3
  42. package/scripts/cli/commands/generate.js +113 -51
  43. package/scripts/cli/internal/ai-engine.js +30 -10
  44. package/scripts/cli/internal/complexity-utils.js +60 -0
  45. package/scripts/cli/internal/component-validator.js +49 -16
  46. package/scripts/cli/internal/config-loader.js +30 -20
  47. package/scripts/cli/internal/generator.js +89 -36
  48. package/scripts/cli/internal/hook-generator.js +5 -2
  49. package/scripts/cli/internal/itcss-generator.js +16 -12
  50. package/scripts/cli/templates/next-templates.js +81 -30
  51. package/scripts/cli/templates/storybook-templates.js +12 -2
  52. package/scripts/cli/utils/detector.js +45 -7
  53. package/scripts/cli/utils/diagnostics.js +78 -0
  54. package/scripts/cli/utils/telemetry.js +13 -0
  55. package/src/components/Accordion/Accordion.stories.tsx +4 -0
  56. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +1 -1
  57. package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +219 -0
  58. package/src/components/AtomixGlass/glass-utils.ts +1 -1
  59. package/src/components/Button/Button.tsx +114 -57
  60. package/src/components/Callout/Callout.tsx +4 -4
  61. package/src/components/Chart/ChartRenderer.tsx +1 -1
  62. package/src/components/Chart/DonutChart.tsx +11 -8
  63. package/src/components/EdgePanel/EdgePanel.tsx +119 -115
  64. package/src/components/Form/Select.tsx +4 -4
  65. package/src/components/List/List.tsx +4 -4
  66. package/src/components/Navigation/SideMenu/SideMenu.tsx +6 -6
  67. package/src/components/PhotoViewer/PhotoViewerImage.tsx +1 -1
  68. package/src/components/ProductReview/ProductReview.tsx +4 -2
  69. package/src/components/Rating/Rating.tsx +4 -2
  70. package/src/components/SectionIntro/SectionIntro.tsx +4 -2
  71. package/src/components/Steps/Steps.tsx +1 -1
  72. package/src/components/Tabs/Tabs.tsx +5 -5
  73. package/src/components/Testimonial/Testimonial.tsx +4 -2
  74. package/src/components/VideoPlayer/VideoPlayer.tsx +4 -2
  75. package/src/layouts/CssGrid/CssGrid.stories.tsx +464 -0
  76. package/src/layouts/CssGrid/CssGrid.tsx +215 -0
  77. package/src/layouts/CssGrid/index.ts +8 -0
  78. package/src/layouts/CssGrid/scripts/CssGrid.js +284 -0
  79. package/src/layouts/CssGrid/scripts/index.js +43 -0
  80. package/src/layouts/Grid/scripts/Container.js +139 -0
  81. package/src/layouts/Grid/scripts/Grid.js +184 -0
  82. package/src/layouts/Grid/scripts/GridCol.js +273 -0
  83. package/src/layouts/Grid/scripts/Row.js +154 -0
  84. package/src/layouts/Grid/scripts/index.js +48 -0
  85. package/src/layouts/MasonryGrid/MasonryGrid.tsx +71 -59
  86. package/src/lib/composables/atomix-glass/useGlassSize.ts +1 -1
  87. package/src/lib/composables/useAccordion.ts +5 -5
  88. package/src/lib/composables/useAtomixGlass.ts +3 -3
  89. package/src/lib/composables/useBarChart.ts +2 -2
  90. package/src/lib/composables/useChart.ts +3 -2
  91. package/src/lib/composables/useChartToolbar.ts +48 -66
  92. package/src/lib/composables/useDataTable.ts +1 -1
  93. package/src/lib/composables/useDatePicker.ts +2 -2
  94. package/src/lib/composables/useEdgePanel.ts +45 -54
  95. package/src/lib/composables/useHeroBackgroundSlider.ts +5 -5
  96. package/src/lib/composables/usePhotoViewer.ts +2 -3
  97. package/src/lib/composables/usePieChart.ts +1 -1
  98. package/src/lib/composables/usePopover.ts +151 -139
  99. package/src/lib/composables/useSideMenu.ts +28 -41
  100. package/src/lib/composables/useSlider.ts +2 -6
  101. package/src/lib/composables/useTooltip.ts +2 -2
  102. package/src/lib/config/index.ts +38 -323
  103. package/src/lib/config/loader.ts +419 -0
  104. package/src/lib/config/public-api.ts +43 -0
  105. package/src/lib/config/types.ts +389 -0
  106. package/src/lib/config/validator.ts +305 -0
  107. package/src/lib/theme/adapters/index.ts +1 -1
  108. package/src/lib/theme/adapters/themeAdapter.ts +358 -229
  109. package/src/lib/theme/components/ThemeToggle.tsx +276 -0
  110. package/src/lib/theme/config/configLoader.ts +351 -0
  111. package/src/lib/theme/config/loader.ts +221 -0
  112. package/src/lib/theme/core/createTheme.ts +126 -50
  113. package/src/lib/theme/core/createThemeObject.ts +7 -4
  114. package/src/lib/theme/devtools/Comparator.tsx +1 -1
  115. package/src/lib/theme/devtools/Inspector.tsx +1 -1
  116. package/src/lib/theme/devtools/LiveEditor.tsx +1 -1
  117. package/src/lib/theme/hooks/useThemeSwitcher.ts +164 -0
  118. package/src/lib/theme/index.ts +322 -38
  119. package/src/lib/theme/runtime/ThemeProvider.tsx +45 -11
  120. package/src/lib/theme/runtime/__tests__/ThemeProvider.test.tsx +44 -393
  121. package/src/lib/theme/runtime/useTheme.ts +1 -0
  122. package/src/lib/theme/tokens/tokens.ts +101 -1
  123. package/src/lib/theme/types.ts +91 -0
  124. package/src/lib/theme/utils/performanceMonitor.ts +315 -0
  125. package/src/lib/theme/utils/responsive.ts +280 -0
  126. package/src/lib/theme/utils/themeUtils.ts +531 -117
  127. package/src/styles/01-settings/_index.scss +1 -0
  128. package/src/styles/01-settings/_settings.atomix-glass.scss +174 -0
  129. package/src/styles/01-settings/_settings.masonry-grid.scss +42 -6
  130. package/src/styles/02-tools/_tools.glass.scss +6 -0
  131. package/src/styles/05-objects/_objects.masonry-grid.scss +162 -24
  132. package/src/styles/06-components/_components.atomix-glass.scss +4 -4
  133. package/src/lib/composables/useBreadcrumb.ts +0 -81
  134. package/src/lib/composables/useChartInteractions.ts +0 -123
  135. package/src/lib/composables/useChartPerformance.ts +0 -347
  136. package/src/lib/composables/useDropdown.ts +0 -338
  137. package/src/lib/composables/useModal.ts +0 -110
  138. package/src/lib/hooks/usePerformanceMonitor.ts +0 -148
  139. package/src/lib/utils/displacement-generator.ts +0 -92
  140. package/src/lib/utils/memoryMonitor.ts +0 -191
  141. package/src/styles/01-settings/_settings.testtypecheck.scss +0 -53
  142. package/src/styles/01-settings/_settings.typedbutton.scss +0 -53
  143. package/src/styles/06-components/_components.testbutton.scss +0 -212
  144. package/src/styles/06-components/_components.testtypecheck.scss +0 -212
  145. package/src/styles/06-components/_components.typedbutton.scss +0 -212
@@ -0,0 +1,699 @@
1
+ /**
2
+ * Theme Manager Type Definitions
3
+ *
4
+ * TypeScript types and interfaces for the Atomix Design System theme management system.
5
+ */
6
+ /**
7
+ * Theme metadata interface matching themes.config.js structure
8
+ */
9
+ interface ThemeMetadata {
10
+ /** Display name of the theme */
11
+ name: string;
12
+ /** Unique identifier/class name for the theme */
13
+ class?: string;
14
+ /** Theme description */
15
+ description?: string;
16
+ /** Theme author */
17
+ author?: string;
18
+ /** Theme version (semver) */
19
+ version?: string;
20
+ /** Theme tags for categorization */
21
+ tags?: string[];
22
+ /** Whether the theme supports dark mode */
23
+ supportsDarkMode?: boolean;
24
+ /** Theme status: stable, beta, experimental, deprecated */
25
+ status?: 'stable' | 'beta' | 'experimental' | 'deprecated';
26
+ /** Accessibility information */
27
+ a11y?: {
28
+ /** Target contrast ratio */
29
+ contrastTarget?: number;
30
+ /** Supported color modes */
31
+ modes?: string[];
32
+ };
33
+ /** Primary theme color (for UI display) */
34
+ color?: string;
35
+ /** Theme features list */
36
+ features?: string[];
37
+ /** Theme dependencies (other themes required) */
38
+ dependencies?: string[];
39
+ }
40
+ /**
41
+ * Color palette configuration for a single color
42
+ */
43
+ interface PaletteColor {
44
+ /** Main color value */
45
+ main: string;
46
+ /** Light variant (auto-generated if not provided) */
47
+ light?: string;
48
+ /** Dark variant (auto-generated if not provided) */
49
+ dark?: string;
50
+ /** Contrast text color (auto-generated if not provided) */
51
+ contrastText?: string;
52
+ }
53
+ /**
54
+ * Typography configuration options for createTheme
55
+ */
56
+ interface TypographyOptions {
57
+ /** Font family */
58
+ fontFamily?: string;
59
+ /** Base font size in pixels */
60
+ fontSize?: number;
61
+ /** Font weight scale */
62
+ fontWeightLight?: number;
63
+ fontWeightRegular?: number;
64
+ fontWeightMedium?: number;
65
+ fontWeightSemiBold?: number;
66
+ fontWeightBold?: number;
67
+ /** Heading configurations */
68
+ h1?: {
69
+ fontSize?: string | number;
70
+ fontWeight?: number;
71
+ lineHeight?: number | string;
72
+ letterSpacing?: string;
73
+ };
74
+ h2?: {
75
+ fontSize?: string | number;
76
+ fontWeight?: number;
77
+ lineHeight?: number | string;
78
+ letterSpacing?: string;
79
+ };
80
+ h3?: {
81
+ fontSize?: string | number;
82
+ fontWeight?: number;
83
+ lineHeight?: number | string;
84
+ letterSpacing?: string;
85
+ };
86
+ h4?: {
87
+ fontSize?: string | number;
88
+ fontWeight?: number;
89
+ lineHeight?: number | string;
90
+ letterSpacing?: string;
91
+ };
92
+ h5?: {
93
+ fontSize?: string | number;
94
+ fontWeight?: number;
95
+ lineHeight?: number | string;
96
+ letterSpacing?: string;
97
+ };
98
+ h6?: {
99
+ fontSize?: string | number;
100
+ fontWeight?: number;
101
+ lineHeight?: number | string;
102
+ letterSpacing?: string;
103
+ };
104
+ /** Body text configurations */
105
+ body1?: {
106
+ fontSize?: string | number;
107
+ fontWeight?: number;
108
+ lineHeight?: number | string;
109
+ };
110
+ body2?: {
111
+ fontSize?: string | number;
112
+ fontWeight?: number;
113
+ lineHeight?: number | string;
114
+ };
115
+ /** Additional custom typography */
116
+ [key: string]: any;
117
+ }
118
+ /**
119
+ * Spacing function type
120
+ */
121
+ type SpacingFunction = (...values: number[]) => string;
122
+ /**
123
+ * Breakpoint values configuration
124
+ */
125
+ interface BreakpointValues {
126
+ xs?: number;
127
+ sm?: number;
128
+ md?: number;
129
+ lg?: number;
130
+ xl?: number;
131
+ [key: string]: number | undefined;
132
+ }
133
+ /**
134
+ * Shadow configuration
135
+ */
136
+ interface ShadowOptions {
137
+ xs?: string;
138
+ sm?: string;
139
+ md?: string;
140
+ lg?: string;
141
+ xl?: string;
142
+ [key: string]: string | undefined;
143
+ }
144
+ /**
145
+ * Transition configuration
146
+ */
147
+ interface TransitionOptions {
148
+ /** Transition duration values */
149
+ duration?: {
150
+ shortest?: number;
151
+ shorter?: number;
152
+ short?: number;
153
+ standard?: number;
154
+ complex?: number;
155
+ enteringScreen?: number;
156
+ leavingScreen?: number;
157
+ };
158
+ /** Easing functions */
159
+ easing?: {
160
+ easeInOut?: string;
161
+ easeOut?: string;
162
+ easeIn?: string;
163
+ sharp?: string;
164
+ };
165
+ }
166
+ /**
167
+ * Z-index configuration
168
+ */
169
+ interface ZIndexOptions {
170
+ mobileStepper?: number;
171
+ speedDial?: number;
172
+ appBar?: number;
173
+ drawer?: number;
174
+ modal?: number;
175
+ snackbar?: number;
176
+ tooltip?: number;
177
+ [key: string]: number | undefined;
178
+ }
179
+ /**
180
+ * Border radius configuration
181
+ */
182
+ interface BorderRadiusOptions {
183
+ /** Base border radius */
184
+ base?: string | number;
185
+ /** Small border radius */
186
+ sm?: string | number;
187
+ /** Medium border radius */
188
+ md?: string | number;
189
+ /** Large border radius */
190
+ lg?: string | number;
191
+ /** Extra large border radius */
192
+ xl?: string | number;
193
+ /** 2X large border radius */
194
+ xxl?: string | number;
195
+ /** 3X large border radius */
196
+ '3xl'?: string | number;
197
+ /** 4X large border radius */
198
+ '4xl'?: string | number;
199
+ /** Pill shape (fully rounded) */
200
+ pill?: string | number;
201
+ [key: string]: string | number | undefined;
202
+ }
203
+ /**
204
+ * Custom theme properties for extension
205
+ * Users can augment this interface via module augmentation
206
+ */
207
+ interface ThemeCustomProperties {
208
+ interactiveEffects?: {
209
+ vortex?: {
210
+ enabled?: boolean;
211
+ strength?: number;
212
+ radius?: number;
213
+ decay?: number;
214
+ };
215
+ chromaticAberration?: {
216
+ enabled?: boolean;
217
+ mode?: 'longitudinal' | 'lateral' | 'hybrid';
218
+ redShift?: number;
219
+ greenShift?: number;
220
+ blueShift?: number;
221
+ edgeOnly?: boolean;
222
+ edgeThreshold?: number;
223
+ };
224
+ mouseInteraction?: {
225
+ sensitivity?: number;
226
+ trailEffect?: boolean;
227
+ };
228
+ animationSpeed?: {
229
+ base?: number;
230
+ timeMultiplier?: number;
231
+ };
232
+ };
233
+ optimization?: {
234
+ responsive?: {
235
+ breakpoints?: {
236
+ mobile?: string;
237
+ tablet?: string;
238
+ desktop?: string;
239
+ wide?: string;
240
+ };
241
+ deviceScaling?: {
242
+ mobile?: number;
243
+ tablet?: number;
244
+ desktop?: number;
245
+ };
246
+ };
247
+ performance?: {
248
+ fpsTarget?: number;
249
+ autoScaling?: boolean;
250
+ };
251
+ autoScaling?: {
252
+ enabled?: boolean;
253
+ qualityThresholds?: {
254
+ lowEnd?: number;
255
+ midRange?: number;
256
+ highEnd?: number;
257
+ };
258
+ };
259
+ };
260
+ visualPolish?: {
261
+ borders?: {
262
+ iridescentGlow?: boolean;
263
+ shimmerEffect?: boolean;
264
+ beveledEdges?: boolean;
265
+ pulsingGlow?: boolean;
266
+ };
267
+ contentAwareBlur?: {
268
+ enabled?: boolean;
269
+ depthDetection?: boolean;
270
+ edgePreservation?: boolean;
271
+ variableRadius?: boolean;
272
+ };
273
+ holographicEffects?: {
274
+ enabled?: boolean;
275
+ rainbowDiffraction?: boolean;
276
+ scanlineAnimation?: boolean;
277
+ gridOverlay?: boolean;
278
+ dataStream?: boolean;
279
+ pulseRings?: boolean;
280
+ };
281
+ };
282
+ [key: string]: any;
283
+ }
284
+ /**
285
+ * Complete theme object with computed values
286
+ * Generated by createTheme function
287
+ */
288
+ interface Theme extends ThemeMetadata {
289
+ /** Color palette with computed values */
290
+ palette: {
291
+ primary: PaletteColor;
292
+ secondary: PaletteColor;
293
+ error: PaletteColor;
294
+ warning: PaletteColor;
295
+ info: PaletteColor;
296
+ success: PaletteColor;
297
+ background: {
298
+ default: string;
299
+ paper: string;
300
+ subtle: string;
301
+ };
302
+ text: {
303
+ primary: string;
304
+ secondary: string;
305
+ disabled: string;
306
+ };
307
+ [key: string]: any;
308
+ };
309
+ /** Typography with computed values */
310
+ typography: {
311
+ fontFamily: string;
312
+ fontSize: number;
313
+ fontWeightLight: number;
314
+ fontWeightRegular: number;
315
+ fontWeightMedium: number;
316
+ fontWeightSemiBold: number;
317
+ fontWeightBold: number;
318
+ h1: Required<NonNullable<TypographyOptions['h1']>>;
319
+ h2: Required<NonNullable<TypographyOptions['h2']>>;
320
+ h3: Required<NonNullable<TypographyOptions['h3']>>;
321
+ h4: Required<NonNullable<TypographyOptions['h4']>>;
322
+ h5: Required<NonNullable<TypographyOptions['h5']>>;
323
+ h6: Required<NonNullable<TypographyOptions['h6']>>;
324
+ body1: Required<NonNullable<TypographyOptions['body1']>>;
325
+ body2: Required<NonNullable<TypographyOptions['body2']>>;
326
+ [key: string]: any;
327
+ };
328
+ /** Spacing function */
329
+ spacing: SpacingFunction;
330
+ /** Breakpoints with computed values */
331
+ breakpoints: {
332
+ values: Required<BreakpointValues>;
333
+ unit: string;
334
+ up: (key: keyof BreakpointValues | number) => string;
335
+ down: (key: keyof BreakpointValues | number) => string;
336
+ between: (start: keyof BreakpointValues | number, end: keyof BreakpointValues | number) => string;
337
+ };
338
+ /** Shadows */
339
+ shadows: Required<ShadowOptions>;
340
+ /** Transitions */
341
+ transitions: Required<TransitionOptions>;
342
+ /** Z-index values */
343
+ zIndex: Required<ZIndexOptions>;
344
+ /** Border radius values */
345
+ borderRadius: Required<BorderRadiusOptions>;
346
+ /** Custom properties */
347
+ custom: ThemeCustomProperties;
348
+ /** Global CSS variables to apply */
349
+ cssVars?: Record<string, string | number>;
350
+ /** Indicates this is a JS theme (not CSS-only) */
351
+ __isJSTheme: true;
352
+ }
353
+
354
+ /**
355
+ * Configuration Types
356
+ *
357
+ * Type definitions for the Atomix configuration system.
358
+ */
359
+
360
+ /**
361
+ * Color Scale (1-10)
362
+ */
363
+ interface ColorScale {
364
+ 1?: string;
365
+ 2?: string;
366
+ 3?: string;
367
+ 4?: string;
368
+ 5?: string;
369
+ 6?: string;
370
+ 7?: string;
371
+ 8?: string;
372
+ 9?: string;
373
+ 10?: string;
374
+ [key: string]: string | undefined;
375
+ }
376
+ /**
377
+ * Palette Color Options
378
+ */
379
+ interface PaletteColorOptions {
380
+ main: string;
381
+ light?: string;
382
+ dark?: string;
383
+ contrastText?: string;
384
+ }
385
+ /**
386
+ * Interactive Effect Configuration
387
+ */
388
+ interface InteractiveEffectsConfig {
389
+ /** Vortex & flow field effects */
390
+ vortex?: {
391
+ enabled?: boolean;
392
+ strength?: number;
393
+ radius?: number;
394
+ decay?: number;
395
+ curlNoise?: boolean;
396
+ velocityTracking?: boolean;
397
+ };
398
+ /** Chromatic aberration effects */
399
+ chromaticAberration?: {
400
+ enabled?: boolean;
401
+ mode?: 'longitudinal' | 'lateral' | 'hybrid';
402
+ redShift?: number;
403
+ greenShift?: number;
404
+ blueShift?: number;
405
+ edgeOnly?: boolean;
406
+ edgeThreshold?: number;
407
+ };
408
+ /** Mouse interaction settings */
409
+ mouseInteraction?: {
410
+ sensitivity?: number;
411
+ trailEffect?: boolean;
412
+ pressureSensitivity?: boolean;
413
+ };
414
+ /** Animation speed controls */
415
+ animationSpeed?: {
416
+ base?: number;
417
+ timeMultiplier?: number;
418
+ };
419
+ }
420
+ /**
421
+ * Optimization Configuration
422
+ */
423
+ interface OptimizationConfig {
424
+ /** Responsive breakpoint system */
425
+ responsive?: {
426
+ breakpoints?: {
427
+ mobile?: string;
428
+ tablet?: string;
429
+ desktop?: string;
430
+ wide?: string;
431
+ };
432
+ /** Device-aware parameter scaling */
433
+ deviceScaling?: {
434
+ mobile?: number;
435
+ tablet?: number;
436
+ desktop?: number;
437
+ };
438
+ };
439
+ /** Performance monitoring */
440
+ performance?: {
441
+ enabled?: boolean;
442
+ fpsTarget?: number;
443
+ autoScaling?: boolean;
444
+ monitorDashboard?: boolean;
445
+ };
446
+ /** Auto-scaling logic based on device capabilities */
447
+ autoScaling?: {
448
+ enabled?: boolean;
449
+ qualityThresholds?: {
450
+ lowEnd?: number;
451
+ midRange?: number;
452
+ highEnd?: number;
453
+ };
454
+ };
455
+ }
456
+ /**
457
+ * Visual Polish Configuration
458
+ */
459
+ interface VisualPolishConfig {
460
+ /** Advanced border effects */
461
+ borders?: {
462
+ iridescentGlow?: boolean;
463
+ shimmerEffect?: boolean;
464
+ beveledEdges?: boolean;
465
+ pulsingGlow?: boolean;
466
+ };
467
+ /** Content-aware blur */
468
+ contentAwareBlur?: {
469
+ enabled?: boolean;
470
+ depthDetection?: boolean;
471
+ edgePreservation?: boolean;
472
+ variableRadius?: boolean;
473
+ };
474
+ /** Holographic effect modes */
475
+ holographicEffects?: {
476
+ enabled?: boolean;
477
+ rainbowDiffraction?: boolean;
478
+ scanlineAnimation?: boolean;
479
+ gridOverlay?: boolean;
480
+ dataStream?: boolean;
481
+ pulseRings?: boolean;
482
+ };
483
+ }
484
+ /**
485
+ * Design Tokens Schema (Tailwind-like)
486
+ */
487
+ interface ThemeTokens {
488
+ /** Color palette */
489
+ colors?: Record<string, string | PaletteColorOptions | ColorScale | Record<string, string>>;
490
+ /** Spacing scale */
491
+ spacing?: Record<string, string>;
492
+ /** Border radius scale */
493
+ borderRadius?: Record<string, string>;
494
+ /** Typography scale and settings */
495
+ typography?: {
496
+ fontFamilies?: Record<string, string>;
497
+ fontSizes?: Record<string, string>;
498
+ fontWeights?: Record<string, string | number>;
499
+ lineHeights?: Record<string, string | number>;
500
+ letterSpacings?: Record<string, string>;
501
+ };
502
+ /** Shadow scale */
503
+ shadows?: Record<string, string>;
504
+ /** Z-index scale */
505
+ zIndex?: Record<string, string | number>;
506
+ /** Breakpoints scale */
507
+ breakpoints?: Record<string, string | number>;
508
+ /** Transitions settings */
509
+ transitions?: {
510
+ durations?: Record<string, string>;
511
+ easings?: Record<string, string>;
512
+ };
513
+ }
514
+ /**
515
+ * CSS Theme Definition
516
+ */
517
+ interface CSSThemeDefinition {
518
+ type: 'css';
519
+ name: string;
520
+ class?: string;
521
+ description?: string;
522
+ author?: string;
523
+ version?: string;
524
+ tags?: string[];
525
+ supportsDarkMode?: boolean;
526
+ status?: 'stable' | 'beta' | 'experimental' | 'deprecated';
527
+ a11y?: {
528
+ contrastTarget?: number;
529
+ modes?: string[];
530
+ };
531
+ color?: string;
532
+ features?: string[];
533
+ dependencies?: string[];
534
+ cssPath?: string;
535
+ }
536
+ /**
537
+ * JavaScript Theme Definition
538
+ */
539
+ interface JSThemeDefinition {
540
+ type: 'js';
541
+ name: string;
542
+ class?: string;
543
+ description?: string;
544
+ author?: string;
545
+ version?: string;
546
+ tags?: string[];
547
+ supportsDarkMode?: boolean;
548
+ status?: 'stable' | 'beta' | 'experimental' | 'deprecated';
549
+ a11y?: {
550
+ contrastTarget?: number;
551
+ modes?: string[];
552
+ };
553
+ color?: string;
554
+ features?: string[];
555
+ dependencies?: string[];
556
+ createTheme: () => Theme;
557
+ }
558
+ /**
559
+ * Theme Definition (CSS or JS)
560
+ */
561
+ type ThemeDefinition = CSSThemeDefinition | JSThemeDefinition;
562
+ /**
563
+ * Build configuration
564
+ */
565
+ interface BuildConfig {
566
+ output?: {
567
+ directory?: string;
568
+ formats?: {
569
+ expanded?: string;
570
+ compressed?: string;
571
+ };
572
+ };
573
+ sass?: {
574
+ style?: 'expanded' | 'compressed';
575
+ sourceMap?: boolean;
576
+ loadPaths?: string[];
577
+ };
578
+ }
579
+ /**
580
+ * Runtime configuration
581
+ */
582
+ interface RuntimeConfig {
583
+ basePath?: string;
584
+ cdnPath?: string | null;
585
+ preload?: string[];
586
+ lazy?: boolean;
587
+ defaultTheme?: string;
588
+ storageKey?: string;
589
+ dataAttribute?: string;
590
+ enablePersistence?: boolean;
591
+ useMinified?: boolean;
592
+ }
593
+ /**
594
+ * Integration settings
595
+ */
596
+ interface IntegrationConfig {
597
+ cssVariables?: Record<string, string>;
598
+ classNames?: {
599
+ theme?: string;
600
+ colorMode?: string;
601
+ };
602
+ }
603
+ /**
604
+ * Plugin Configuration
605
+ */
606
+ interface PluginConfig {
607
+ name: string;
608
+ options?: Record<string, any>;
609
+ }
610
+ /**
611
+ * Token Provider Configuration
612
+ */
613
+ interface TokenProviderConfig {
614
+ type: 'figma' | 'style-dictionary' | 'w3c' | string;
615
+ options?: Record<string, any>;
616
+ }
617
+ /**
618
+ * Token Engine Configuration
619
+ */
620
+ interface TokenEngineConfig {
621
+ providers?: Record<string, TokenProviderConfig>;
622
+ sync?: {
623
+ pull?: boolean;
624
+ push?: boolean;
625
+ onBuild?: boolean;
626
+ };
627
+ }
628
+ /**
629
+ * CLI component generator defaults
630
+ */
631
+ interface GeneratorConfig {
632
+ /** Default output directory for generated components */
633
+ outputPath?: string;
634
+ /** Override detected framework */
635
+ framework?: 'react' | 'next' | 'vanilla';
636
+ /** Per-feature defaults */
637
+ features?: {
638
+ storybook?: boolean;
639
+ hook?: boolean;
640
+ styles?: boolean;
641
+ tests?: boolean;
642
+ };
643
+ /** Composable hooks directory relative to project root */
644
+ hookOutputDir?: string;
645
+ /** Story file: side-effect import for global Atomix styles */
646
+ storybookCssImport?: string;
647
+ /** Barrel file strategy for new components */
648
+ barrel?: 'index' | 'none';
649
+ }
650
+ /**
651
+ * Atomix Configuration Interface
652
+ *
653
+ * Tailwind-like configuration for external developers.
654
+ */
655
+ interface AtomixConfig {
656
+ prefix?: string;
657
+ plugins?: (string | PluginConfig)[];
658
+ tokenEngine?: TokenEngineConfig;
659
+ ai?: {
660
+ provider?: 'openai' | 'anthropic';
661
+ model?: string;
662
+ apiKey?: string;
663
+ temperature?: number;
664
+ maxTokens?: number;
665
+ rateLimit?: {
666
+ requests: number;
667
+ windowMs: number;
668
+ };
669
+ };
670
+ telemetry?: {
671
+ enabled?: boolean;
672
+ path?: string;
673
+ anonymize?: boolean;
674
+ };
675
+ generator?: GeneratorConfig;
676
+ interactiveEffects?: InteractiveEffectsConfig;
677
+ optimization?: OptimizationConfig;
678
+ visualPolish?: VisualPolishConfig;
679
+ theme?: {
680
+ extend?: ThemeTokens;
681
+ tokens?: ThemeTokens;
682
+ themes?: Record<string, ThemeDefinition>;
683
+ };
684
+ /** @internal Build configuration */
685
+ build?: BuildConfig;
686
+ /** @internal Runtime configuration */
687
+ runtime?: RuntimeConfig;
688
+ /** @internal Integration settings */
689
+ integration?: IntegrationConfig;
690
+ /** @internal Theme dependencies mapping */
691
+ dependencies?: Record<string, string[]>;
692
+ }
693
+ /**
694
+ * Helper function to define Atomix configuration with type safety
695
+ */
696
+ declare function defineConfig(config: AtomixConfig): AtomixConfig;
697
+
698
+ export { defineConfig };
699
+ export type { AtomixConfig, BuildConfig, CSSThemeDefinition, ColorScale, GeneratorConfig, IntegrationConfig, JSThemeDefinition, PaletteColorOptions, PluginConfig, RuntimeConfig, ThemeDefinition, ThemeTokens, TokenEngineConfig, TokenProviderConfig };
package/dist/config.js ADDED
@@ -0,0 +1,17 @@
1
+ import "fs";
2
+
3
+ import "path";
4
+
5
+ /**
6
+ * Configuration Types
7
+ *
8
+ * Type definitions for the Atomix configuration system.
9
+ */
10
+ /**
11
+ * Helper function to define Atomix configuration with type safety
12
+ */ function defineConfig(config) {
13
+ return config;
14
+ }
15
+
16
+ export { defineConfig };
17
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sources":["../src/lib/config/types.ts"],"sourcesContent":[null],"names":["defineConfig","config"],"mappings":";;;;;;;;;;;GAkYM,UAAUA,aAAaC;IAC3B,OAAOA;AACT;;"}