@shohojdhara/atomix 0.5.1 → 0.5.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.
Files changed (123) hide show
  1. package/atomix.config.ts +12 -0
  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 +624 -0
  12. package/dist/config.js +59 -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 +98 -65
  24. package/dist/index.esm.js +427 -422
  25. package/dist/index.esm.js.map +1 -1
  26. package/dist/index.js +394 -391
  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.js +4 -4
  33. package/dist/theme.js.map +1 -1
  34. package/package.json +14 -9
  35. package/scripts/atomix-cli.js +15 -1
  36. package/scripts/cli/__tests__/complexity-utils.test.js +24 -0
  37. package/scripts/cli/__tests__/detector.test.js +50 -0
  38. package/scripts/cli/__tests__/template-engine.test.js +23 -0
  39. package/scripts/cli/__tests__/test-setup.js +3 -0
  40. package/scripts/cli/commands/doctor.js +15 -3
  41. package/scripts/cli/commands/generate.js +113 -51
  42. package/scripts/cli/internal/ai-engine.js +30 -10
  43. package/scripts/cli/internal/complexity-utils.js +60 -0
  44. package/scripts/cli/internal/component-validator.js +49 -16
  45. package/scripts/cli/internal/generator.js +89 -36
  46. package/scripts/cli/internal/hook-generator.js +5 -2
  47. package/scripts/cli/internal/itcss-generator.js +16 -12
  48. package/scripts/cli/templates/next-templates.js +81 -30
  49. package/scripts/cli/templates/storybook-templates.js +12 -2
  50. package/scripts/cli/utils/detector.js +45 -7
  51. package/scripts/cli/utils/diagnostics.js +78 -0
  52. package/scripts/cli/utils/telemetry.js +13 -0
  53. package/src/components/Accordion/Accordion.stories.tsx +4 -0
  54. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +1 -1
  55. package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +219 -0
  56. package/src/components/AtomixGlass/glass-utils.ts +1 -1
  57. package/src/components/Button/Button.tsx +114 -57
  58. package/src/components/Callout/Callout.tsx +4 -4
  59. package/src/components/Chart/ChartRenderer.tsx +1 -1
  60. package/src/components/Chart/DonutChart.tsx +11 -8
  61. package/src/components/EdgePanel/EdgePanel.tsx +119 -115
  62. package/src/components/Form/Select.tsx +4 -4
  63. package/src/components/List/List.tsx +4 -4
  64. package/src/components/Navigation/SideMenu/SideMenu.tsx +6 -6
  65. package/src/components/PhotoViewer/PhotoViewerImage.tsx +1 -1
  66. package/src/components/ProductReview/ProductReview.tsx +4 -2
  67. package/src/components/Rating/Rating.tsx +4 -2
  68. package/src/components/SectionIntro/SectionIntro.tsx +4 -2
  69. package/src/components/Steps/Steps.tsx +1 -1
  70. package/src/components/Tabs/Tabs.tsx +5 -5
  71. package/src/components/Testimonial/Testimonial.tsx +4 -2
  72. package/src/components/VideoPlayer/VideoPlayer.tsx +4 -2
  73. package/src/layouts/CssGrid/CssGrid.stories.tsx +464 -0
  74. package/src/layouts/CssGrid/CssGrid.tsx +215 -0
  75. package/src/layouts/CssGrid/index.ts +8 -0
  76. package/src/layouts/CssGrid/scripts/CssGrid.js +284 -0
  77. package/src/layouts/CssGrid/scripts/index.js +43 -0
  78. package/src/layouts/Grid/scripts/Container.js +139 -0
  79. package/src/layouts/Grid/scripts/Grid.js +184 -0
  80. package/src/layouts/Grid/scripts/GridCol.js +273 -0
  81. package/src/layouts/Grid/scripts/Row.js +154 -0
  82. package/src/layouts/Grid/scripts/index.js +48 -0
  83. package/src/layouts/MasonryGrid/MasonryGrid.tsx +71 -59
  84. package/src/lib/composables/atomix-glass/useGlassSize.ts +1 -1
  85. package/src/lib/composables/useAccordion.ts +5 -5
  86. package/src/lib/composables/useAtomixGlass.ts +3 -3
  87. package/src/lib/composables/useBarChart.ts +2 -2
  88. package/src/lib/composables/useChart.ts +3 -2
  89. package/src/lib/composables/useChartToolbar.ts +48 -66
  90. package/src/lib/composables/useDataTable.ts +1 -1
  91. package/src/lib/composables/useDatePicker.ts +2 -2
  92. package/src/lib/composables/useEdgePanel.ts +45 -54
  93. package/src/lib/composables/useHeroBackgroundSlider.ts +5 -5
  94. package/src/lib/composables/usePhotoViewer.ts +2 -3
  95. package/src/lib/composables/usePieChart.ts +1 -1
  96. package/src/lib/composables/usePopover.ts +151 -139
  97. package/src/lib/composables/useSideMenu.ts +28 -41
  98. package/src/lib/composables/useSlider.ts +2 -6
  99. package/src/lib/composables/useTooltip.ts +2 -2
  100. package/src/lib/config/index.ts +39 -0
  101. package/src/lib/theme/devtools/Comparator.tsx +1 -1
  102. package/src/lib/theme/devtools/Inspector.tsx +1 -1
  103. package/src/lib/theme/devtools/LiveEditor.tsx +1 -1
  104. package/src/lib/theme/runtime/ThemeProvider.tsx +1 -1
  105. package/src/styles/01-settings/_index.scss +1 -0
  106. package/src/styles/01-settings/_settings.atomix-glass.scss +174 -0
  107. package/src/styles/01-settings/_settings.masonry-grid.scss +42 -6
  108. package/src/styles/02-tools/_tools.glass.scss +6 -0
  109. package/src/styles/05-objects/_objects.masonry-grid.scss +162 -24
  110. package/src/styles/06-components/_components.atomix-glass.scss +4 -4
  111. package/src/lib/composables/useBreadcrumb.ts +0 -81
  112. package/src/lib/composables/useChartInteractions.ts +0 -123
  113. package/src/lib/composables/useChartPerformance.ts +0 -347
  114. package/src/lib/composables/useDropdown.ts +0 -338
  115. package/src/lib/composables/useModal.ts +0 -110
  116. package/src/lib/hooks/usePerformanceMonitor.ts +0 -148
  117. package/src/lib/utils/displacement-generator.ts +0 -92
  118. package/src/lib/utils/memoryMonitor.ts +0 -191
  119. package/src/styles/01-settings/_settings.testtypecheck.scss +0 -53
  120. package/src/styles/01-settings/_settings.typedbutton.scss +0 -53
  121. package/src/styles/06-components/_components.testbutton.scss +0 -212
  122. package/src/styles/06-components/_components.testtypecheck.scss +0 -212
  123. package/src/styles/06-components/_components.typedbutton.scss +0 -212
@@ -0,0 +1,624 @@
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
+ [key: string]: any;
209
+ }
210
+ /**
211
+ * Complete theme object with computed values
212
+ * Generated by createTheme function
213
+ */
214
+ interface Theme extends ThemeMetadata {
215
+ /** Color palette with computed values */
216
+ palette: {
217
+ primary: PaletteColor;
218
+ secondary: PaletteColor;
219
+ error: PaletteColor;
220
+ warning: PaletteColor;
221
+ info: PaletteColor;
222
+ success: PaletteColor;
223
+ background: {
224
+ default: string;
225
+ paper: string;
226
+ subtle: string;
227
+ };
228
+ text: {
229
+ primary: string;
230
+ secondary: string;
231
+ disabled: string;
232
+ };
233
+ [key: string]: any;
234
+ };
235
+ /** Typography with computed values */
236
+ typography: {
237
+ fontFamily: string;
238
+ fontSize: number;
239
+ fontWeightLight: number;
240
+ fontWeightRegular: number;
241
+ fontWeightMedium: number;
242
+ fontWeightSemiBold: number;
243
+ fontWeightBold: number;
244
+ h1: Required<NonNullable<TypographyOptions['h1']>>;
245
+ h2: Required<NonNullable<TypographyOptions['h2']>>;
246
+ h3: Required<NonNullable<TypographyOptions['h3']>>;
247
+ h4: Required<NonNullable<TypographyOptions['h4']>>;
248
+ h5: Required<NonNullable<TypographyOptions['h5']>>;
249
+ h6: Required<NonNullable<TypographyOptions['h6']>>;
250
+ body1: Required<NonNullable<TypographyOptions['body1']>>;
251
+ body2: Required<NonNullable<TypographyOptions['body2']>>;
252
+ [key: string]: any;
253
+ };
254
+ /** Spacing function */
255
+ spacing: SpacingFunction;
256
+ /** Breakpoints with computed values */
257
+ breakpoints: {
258
+ values: Required<BreakpointValues>;
259
+ unit: string;
260
+ up: (key: keyof BreakpointValues | number) => string;
261
+ down: (key: keyof BreakpointValues | number) => string;
262
+ between: (start: keyof BreakpointValues | number, end: keyof BreakpointValues | number) => string;
263
+ };
264
+ /** Shadows */
265
+ shadows: Required<ShadowOptions>;
266
+ /** Transitions */
267
+ transitions: Required<TransitionOptions>;
268
+ /** Z-index values */
269
+ zIndex: Required<ZIndexOptions>;
270
+ /** Border radius values */
271
+ borderRadius: Required<BorderRadiusOptions>;
272
+ /** Custom properties */
273
+ custom: ThemeCustomProperties;
274
+ /** Global CSS variables to apply */
275
+ cssVars?: Record<string, string | number>;
276
+ /** Indicates this is a JS theme (not CSS-only) */
277
+ __isJSTheme: true;
278
+ }
279
+
280
+ /**
281
+ * Atomix Configuration System
282
+ *
283
+ * Tailwind-like configuration for customizing the Atomix Design System.
284
+ *
285
+ * External developers can create `atomix.config.ts` in their project root
286
+ * to customize design tokens, similar to Tailwind's tailwind.config.js
287
+ *
288
+ * @example
289
+ * ```typescript
290
+ * // atomix.config.ts (in your project)
291
+ * import { defineConfig } from '@shohojdhara/atomix/config';
292
+ *
293
+ * export default defineConfig({
294
+ * theme: {
295
+ * extend: {
296
+ * colors: {
297
+ * primary: { main: '#7AFFD7' },
298
+ * },
299
+ * },
300
+ * },
301
+ * });
302
+ * ```
303
+ */
304
+
305
+ /**
306
+ * Color Scale (1-10)
307
+ */
308
+ interface ColorScale {
309
+ 1?: string;
310
+ 2?: string;
311
+ 3?: string;
312
+ 4?: string;
313
+ 5?: string;
314
+ 6?: string;
315
+ 7?: string;
316
+ 8?: string;
317
+ 9?: string;
318
+ 10?: string;
319
+ [key: string]: string | undefined;
320
+ }
321
+ /**
322
+ * Palette Color Options
323
+ */
324
+ interface PaletteColorOptions {
325
+ main: string;
326
+ light?: string;
327
+ dark?: string;
328
+ contrastText?: string;
329
+ }
330
+ /**
331
+ * Design Tokens Schema (Tailwind-like)
332
+ */
333
+ interface ThemeTokens {
334
+ /** Color palette */
335
+ colors?: Record<string, string | PaletteColorOptions | ColorScale | Record<string, string>>;
336
+ /** Spacing scale */
337
+ spacing?: Record<string, string>;
338
+ /** Border radius scale */
339
+ borderRadius?: Record<string, string>;
340
+ /** Typography scale and settings */
341
+ typography?: {
342
+ fontFamilies?: Record<string, string>;
343
+ fontSizes?: Record<string, string>;
344
+ fontWeights?: Record<string, string | number>;
345
+ lineHeights?: Record<string, string | number>;
346
+ letterSpacings?: Record<string, string>;
347
+ };
348
+ /** Shadow scale */
349
+ shadows?: Record<string, string>;
350
+ /** Z-index scale */
351
+ zIndex?: Record<string, string | number>;
352
+ /** Breakpoints scale */
353
+ breakpoints?: Record<string, string | number>;
354
+ /** Transitions settings */
355
+ transitions?: {
356
+ durations?: Record<string, string>;
357
+ easings?: Record<string, string>;
358
+ };
359
+ }
360
+ /**
361
+ * CSS Theme Definition
362
+ */
363
+ interface CSSThemeDefinition {
364
+ type: 'css';
365
+ name: string;
366
+ class?: string;
367
+ description?: string;
368
+ author?: string;
369
+ version?: string;
370
+ tags?: string[];
371
+ supportsDarkMode?: boolean;
372
+ status?: 'stable' | 'beta' | 'experimental' | 'deprecated';
373
+ a11y?: {
374
+ contrastTarget?: number;
375
+ modes?: string[];
376
+ };
377
+ color?: string;
378
+ features?: string[];
379
+ dependencies?: string[];
380
+ cssPath?: string;
381
+ }
382
+ /**
383
+ * JavaScript Theme Definition
384
+ */
385
+ interface JSThemeDefinition {
386
+ type: 'js';
387
+ name: string;
388
+ class?: string;
389
+ description?: string;
390
+ author?: string;
391
+ version?: string;
392
+ tags?: string[];
393
+ supportsDarkMode?: boolean;
394
+ status?: 'stable' | 'beta' | 'experimental' | 'deprecated';
395
+ a11y?: {
396
+ contrastTarget?: number;
397
+ modes?: string[];
398
+ };
399
+ color?: string;
400
+ features?: string[];
401
+ dependencies?: string[];
402
+ createTheme: () => Theme;
403
+ }
404
+ /**
405
+ * Theme Definition (CSS or JS)
406
+ */
407
+ type ThemeDefinition = CSSThemeDefinition | JSThemeDefinition;
408
+ /**
409
+ * Build configuration (migrated from theme.config.ts)
410
+ */
411
+ interface BuildConfig {
412
+ output?: {
413
+ directory?: string;
414
+ formats?: {
415
+ expanded?: string;
416
+ compressed?: string;
417
+ };
418
+ };
419
+ sass?: {
420
+ style?: 'expanded' | 'compressed';
421
+ sourceMap?: boolean;
422
+ loadPaths?: string[];
423
+ };
424
+ }
425
+ /**
426
+ * Runtime configuration (migrated from theme.config.ts)
427
+ */
428
+ interface RuntimeConfig {
429
+ basePath?: string;
430
+ cdnPath?: string | null;
431
+ preload?: string[];
432
+ lazy?: boolean;
433
+ defaultTheme?: string;
434
+ storageKey?: string;
435
+ dataAttribute?: string;
436
+ enablePersistence?: boolean;
437
+ useMinified?: boolean;
438
+ }
439
+ /**
440
+ * Integration settings (migrated from theme.config.ts)
441
+ */
442
+ interface IntegrationConfig {
443
+ cssVariables?: Record<string, string>;
444
+ classNames?: {
445
+ theme?: string;
446
+ colorMode?: string;
447
+ };
448
+ }
449
+ /**
450
+ * Plugin Configuration
451
+ */
452
+ interface PluginConfig {
453
+ name: string;
454
+ options?: Record<string, any>;
455
+ }
456
+ /**
457
+ * Token Provider Configuration
458
+ */
459
+ interface TokenProviderConfig {
460
+ type: 'figma' | 'style-dictionary' | 'w3c' | string;
461
+ options?: Record<string, any>;
462
+ }
463
+ /**
464
+ * Token Engine Configuration
465
+ */
466
+ interface TokenEngineConfig {
467
+ providers?: Record<string, TokenProviderConfig>;
468
+ sync?: {
469
+ pull?: boolean;
470
+ push?: boolean;
471
+ onBuild?: boolean;
472
+ };
473
+ }
474
+ /**
475
+ * CLI component generator defaults (merged before CLI flags; flags win).
476
+ */
477
+ interface GeneratorConfig {
478
+ /** Default output directory for generated components */
479
+ outputPath?: string;
480
+ /** Override detected framework */
481
+ framework?: 'react' | 'next' | 'vanilla';
482
+ /** Per-feature defaults (CLI --no-* flags override) */
483
+ features?: {
484
+ storybook?: boolean;
485
+ hook?: boolean;
486
+ styles?: boolean;
487
+ tests?: boolean;
488
+ };
489
+ /** Composable hooks directory relative to project root */
490
+ hookOutputDir?: string;
491
+ /** Story file: side-effect import for global Atomix styles */
492
+ storybookCssImport?: string;
493
+ /** Barrel file strategy for new components */
494
+ barrel?: 'index' | 'none';
495
+ }
496
+ /**
497
+ * Atomix Configuration Interface
498
+ *
499
+ * Tailwind-like configuration for external developers.
500
+ * Focus on theme customization - build/runtime configs are internal only.
501
+ */
502
+ interface AtomixConfig {
503
+ /**
504
+ * CSS variable prefix (default: 'atomix')
505
+ *
506
+ * Change this to customize all CSS variable names.
507
+ * Example: prefix: 'myapp' → --myapp-primary instead of --atomix-primary
508
+ */
509
+ prefix?: string;
510
+ /**
511
+ * Plugins to extend CLI functionality
512
+ */
513
+ plugins?: (string | PluginConfig)[];
514
+ /**
515
+ * Universal Token Engine configuration
516
+ */
517
+ tokenEngine?: TokenEngineConfig;
518
+ /**
519
+ * AI-Assisted Scaffolding configuration
520
+ */
521
+ ai?: {
522
+ /** AI provider (default: 'openai') */
523
+ provider?: 'openai' | 'anthropic';
524
+ /** LLM model to use */
525
+ model?: string;
526
+ /** API key for the provider */
527
+ apiKey?: string;
528
+ /** Temperature for AI creativity (0.0-1.0, default: 0.7) */
529
+ temperature?: number;
530
+ /** Maximum tokens per AI response (default: 4000) */
531
+ maxTokens?: number;
532
+ /** Rate limiting configuration */
533
+ rateLimit?: {
534
+ /** Maximum requests allowed */
535
+ requests: number;
536
+ /** Time window in milliseconds */
537
+ windowMs: number;
538
+ };
539
+ };
540
+ /**
541
+ * Performance & Telemetry (Phase 4)
542
+ */
543
+ telemetry?: {
544
+ /** Enable local telemetry logging (default: false) */
545
+ enabled?: boolean;
546
+ /** Output path for telemetry logs (default: '.atomix/telemetry.json') */
547
+ path?: string;
548
+ /** Anonymize telemetry data (default: true) */
549
+ anonymize?: boolean;
550
+ };
551
+ /**
552
+ * `atomix generate` defaults (CLI overrides these)
553
+ */
554
+ generator?: GeneratorConfig;
555
+ /**
556
+ * Theme customization (Tailwind-like)
557
+ *
558
+ * Use `extend` to add or override design tokens.
559
+ * Use `tokens` to completely replace the default token system (advanced).
560
+ */
561
+ theme?: {
562
+ /**
563
+ * Extend the default design tokens
564
+ *
565
+ * This is the recommended way to customize Atomix.
566
+ * Your values will override or extend the base tokens.
567
+ */
568
+ extend?: ThemeTokens;
569
+ /**
570
+ * Override the default tokens entirely (advanced)
571
+ *
572
+ * Use with caution - this replaces the entire token system.
573
+ * Most users should use `extend` instead.
574
+ */
575
+ tokens?: ThemeTokens;
576
+ /**
577
+ * Register custom themes (optional)
578
+ *
579
+ * Define CSS or JavaScript themes that can be loaded dynamically.
580
+ */
581
+ themes?: Record<string, ThemeDefinition>;
582
+ };
583
+ /** @internal Build configuration (internal use only) */
584
+ build?: BuildConfig;
585
+ /** @internal Runtime configuration (internal use only) */
586
+ runtime?: RuntimeConfig;
587
+ /** @internal Integration settings (internal use only) */
588
+ integration?: IntegrationConfig;
589
+ /** @internal Theme dependencies mapping (internal use only) */
590
+ dependencies?: Record<string, string[]>;
591
+ }
592
+ /**
593
+ * Helper function to define Atomix configuration with type safety
594
+ *
595
+ * @param config - Atomix configuration object
596
+ * @returns The configuration object
597
+ */
598
+ /**
599
+ * Helper function to define Atomix configuration with type safety
600
+ *
601
+ * Similar to Tailwind's defineConfig, provides autocomplete and type checking.
602
+ *
603
+ * @param config - Atomix configuration object
604
+ * @returns The configuration object
605
+ *
606
+ * @example
607
+ * ```typescript
608
+ * import { defineConfig } from '@shohojdhara/atomix/config';
609
+ *
610
+ * export default defineConfig({
611
+ * theme: {
612
+ * extend: {
613
+ * colors: {
614
+ * primary: { main: '#7AFFD7' },
615
+ * },
616
+ * },
617
+ * },
618
+ * });
619
+ * ```
620
+ */
621
+ declare function defineConfig(config: AtomixConfig): AtomixConfig;
622
+
623
+ export { defineConfig };
624
+ export type { AtomixConfig, BuildConfig, CSSThemeDefinition, ColorScale, GeneratorConfig, IntegrationConfig, JSThemeDefinition, PaletteColorOptions, PluginConfig, RuntimeConfig, ThemeDefinition, ThemeTokens, TokenEngineConfig, TokenProviderConfig };
package/dist/config.js ADDED
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Atomix Configuration System
3
+ *
4
+ * Tailwind-like configuration for customizing the Atomix Design System.
5
+ *
6
+ * External developers can create `atomix.config.ts` in their project root
7
+ * to customize design tokens, similar to Tailwind's tailwind.config.js
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * // atomix.config.ts (in your project)
12
+ * import { defineConfig } from '@shohojdhara/atomix/config';
13
+ *
14
+ * export default defineConfig({
15
+ * theme: {
16
+ * extend: {
17
+ * colors: {
18
+ * primary: { main: '#7AFFD7' },
19
+ * },
20
+ * },
21
+ * },
22
+ * });
23
+ * ```
24
+ */
25
+ /**
26
+ * Helper function to define Atomix configuration with type safety
27
+ *
28
+ * @param config - Atomix configuration object
29
+ * @returns The configuration object
30
+ */
31
+ /**
32
+ * Helper function to define Atomix configuration with type safety
33
+ *
34
+ * Similar to Tailwind's defineConfig, provides autocomplete and type checking.
35
+ *
36
+ * @param config - Atomix configuration object
37
+ * @returns The configuration object
38
+ *
39
+ * @example
40
+ * ```typescript
41
+ * import { defineConfig } from '@shohojdhara/atomix/config';
42
+ *
43
+ * export default defineConfig({
44
+ * theme: {
45
+ * extend: {
46
+ * colors: {
47
+ * primary: { main: '#7AFFD7' },
48
+ * },
49
+ * },
50
+ * },
51
+ * });
52
+ * ```
53
+ */
54
+ function defineConfig(config) {
55
+ return config;
56
+ }
57
+
58
+ export { defineConfig };
59
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sources":["../src/lib/config/index.ts"],"sourcesContent":[null],"names":["defineConfig","config"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgXM,SAAUA,aAAaC;IAC3B,OAAOA;AACT;;"}
package/dist/core.d.ts CHANGED
@@ -1331,9 +1331,9 @@ type ButtonAsProp = {
1331
1331
  linkComponent?: React$1.ElementType;
1332
1332
  [key: string]: any;
1333
1333
  };
1334
- declare const Button: React$1.MemoExoticComponent<React$1.ForwardRefExoticComponent<Omit<ButtonProps & ButtonAsProp, "ref"> & React$1.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>>;
1334
+ declare const Button: React$1.NamedExoticComponent<Omit<ButtonProps & ButtonAsProp, "ref"> & React$1.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
1335
1335
 
1336
- declare const Card: React$1.MemoExoticComponent<React$1.ForwardRefExoticComponent<CardProps & React$1.RefAttributes<HTMLDivElement | HTMLAnchorElement>>>;
1336
+ declare const Card: React$1.NamedExoticComponent<CardProps & React$1.RefAttributes<HTMLDivElement | HTMLAnchorElement>>;
1337
1337
 
1338
1338
  declare const ElevationCard: React$1.FC<ElevationCardProps>;
1339
1339