@shohojdhara/atomix 0.4.8 → 0.4.9

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 (165) hide show
  1. package/atomix.config.ts +58 -1
  2. package/dist/atomix.css +148 -120
  3. package/dist/atomix.css.map +1 -1
  4. package/dist/atomix.min.css +1 -1
  5. package/dist/atomix.min.css.map +1 -1
  6. package/dist/charts.d.ts +33 -0
  7. package/dist/charts.js +1227 -122
  8. package/dist/charts.js.map +1 -1
  9. package/dist/core.d.ts +33 -10
  10. package/dist/core.js +1052 -41
  11. package/dist/core.js.map +1 -1
  12. package/dist/forms.d.ts +33 -0
  13. package/dist/forms.js +2086 -1035
  14. package/dist/forms.js.map +1 -1
  15. package/dist/heavy.d.ts +42 -1
  16. package/dist/heavy.js +1620 -600
  17. package/dist/heavy.js.map +1 -1
  18. package/dist/index.d.ts +441 -270
  19. package/dist/index.esm.js +1900 -638
  20. package/dist/index.esm.js.map +1 -1
  21. package/dist/index.js +1935 -670
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.min.js +1 -1
  24. package/dist/index.min.js.map +1 -1
  25. package/package.json +6 -3
  26. package/scripts/atomix-cli.js +148 -4
  27. package/scripts/cli/__tests__/basic.test.js +3 -2
  28. package/scripts/cli/__tests__/clean.test.js +278 -0
  29. package/scripts/cli/__tests__/component-validator.test.js +433 -0
  30. package/scripts/cli/__tests__/generator.test.js +613 -0
  31. package/scripts/cli/__tests__/glass-motion.test.js +256 -0
  32. package/scripts/cli/__tests__/integration.test.js +719 -108
  33. package/scripts/cli/__tests__/migrate.test.js +74 -0
  34. package/scripts/cli/__tests__/security.test.js +206 -0
  35. package/scripts/cli/__tests__/test-setup.js +3 -1
  36. package/scripts/cli/__tests__/theme-bridge.test.js +507 -0
  37. package/scripts/cli/__tests__/token-provider.test.js +361 -0
  38. package/scripts/cli/__tests__/utils.test.js +5 -5
  39. package/scripts/cli/commands/benchmark.js +105 -0
  40. package/scripts/cli/commands/build-theme.js +4 -1
  41. package/scripts/cli/commands/clean.js +109 -0
  42. package/scripts/cli/commands/doctor.js +88 -0
  43. package/scripts/cli/commands/generate.js +135 -14
  44. package/scripts/cli/commands/init.js +45 -18
  45. package/scripts/cli/commands/migrate.js +106 -0
  46. package/scripts/cli/commands/sync-tokens.js +206 -0
  47. package/scripts/cli/commands/theme-bridge.js +248 -0
  48. package/scripts/cli/commands/tokens.js +157 -0
  49. package/scripts/cli/commands/validate.js +194 -0
  50. package/scripts/cli/internal/ai-engine.js +156 -0
  51. package/scripts/cli/internal/component-validator.js +443 -0
  52. package/scripts/cli/internal/config-loader.js +162 -0
  53. package/scripts/cli/internal/filesystem.js +102 -2
  54. package/scripts/cli/internal/generator.js +359 -39
  55. package/scripts/cli/internal/glass-generator.js +398 -0
  56. package/scripts/cli/internal/hook-generator.js +369 -0
  57. package/scripts/cli/internal/hooks.js +61 -0
  58. package/scripts/cli/internal/itcss-generator.js +565 -0
  59. package/scripts/cli/internal/motion-generator.js +679 -0
  60. package/scripts/cli/internal/template-engine.js +301 -0
  61. package/scripts/cli/internal/theme-bridge.js +664 -0
  62. package/scripts/cli/internal/tokens/engine.js +122 -0
  63. package/scripts/cli/internal/tokens/provider.js +34 -0
  64. package/scripts/cli/internal/tokens/providers/figma.js +50 -0
  65. package/scripts/cli/internal/tokens/providers/style-dictionary.js +48 -0
  66. package/scripts/cli/internal/tokens/providers/w3c.js +48 -0
  67. package/scripts/cli/internal/tokens/token-provider.js +443 -0
  68. package/scripts/cli/internal/tokens/token-validator.js +513 -0
  69. package/scripts/cli/internal/validator.js +276 -0
  70. package/scripts/cli/internal/wizard.js +60 -6
  71. package/scripts/cli/mappings.js +23 -0
  72. package/scripts/cli/migration-tools.js +164 -94
  73. package/scripts/cli/plugins/style-dictionary.js +46 -0
  74. package/scripts/cli/templates/README.md +525 -95
  75. package/scripts/cli/templates/common-templates.js +40 -14
  76. package/scripts/cli/templates/components/react-component.ts +282 -0
  77. package/scripts/cli/templates/config/project-config.ts +112 -0
  78. package/scripts/cli/templates/hooks/use-component.ts +477 -0
  79. package/scripts/cli/templates/index.js +19 -4
  80. package/scripts/cli/templates/index.ts +171 -0
  81. package/scripts/cli/templates/next-templates.js +72 -0
  82. package/scripts/cli/templates/react-templates.js +70 -126
  83. package/scripts/cli/templates/scss-templates.js +35 -35
  84. package/scripts/cli/templates/stories/storybook-story.ts +241 -0
  85. package/scripts/cli/templates/styles/scss-component.ts +255 -0
  86. package/scripts/cli/templates/tests/vitest-test.ts +229 -0
  87. package/scripts/cli/templates/token-templates.js +337 -1
  88. package/scripts/cli/templates/tokens/token-generators.ts +1088 -0
  89. package/scripts/cli/templates/types/component-types.ts +145 -0
  90. package/scripts/cli/templates/utils/testing-utils.ts +144 -0
  91. package/scripts/cli/templates/vanilla-templates.js +39 -0
  92. package/scripts/cli/token-manager.js +8 -2
  93. package/scripts/cli/utils/cache-manager.js +240 -0
  94. package/scripts/cli/utils/detector.js +46 -0
  95. package/scripts/cli/utils/diagnostics.js +289 -0
  96. package/scripts/cli/utils/error.js +45 -3
  97. package/scripts/cli/utils/helpers.js +24 -0
  98. package/scripts/cli/utils/logger.js +1 -1
  99. package/scripts/cli/utils/security.js +302 -0
  100. package/scripts/cli/utils/telemetry.js +115 -0
  101. package/scripts/cli/utils/validation.js +4 -38
  102. package/scripts/cli/utils.js +46 -0
  103. package/src/components/Accordion/Accordion.stories.tsx +0 -18
  104. package/src/components/Accordion/Accordion.test.tsx +0 -17
  105. package/src/components/Accordion/Accordion.tsx +0 -4
  106. package/src/components/AtomixGlass/AtomixGlass.tsx +102 -2
  107. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +125 -12
  108. package/src/components/AtomixGlass/PerformanceDashboard.tsx +219 -0
  109. package/src/components/AtomixGlass/README.md +25 -10
  110. package/src/components/AtomixGlass/animation-system.ts +578 -0
  111. package/src/components/AtomixGlass/shader-utils.ts +4 -1
  112. package/src/components/AtomixGlass/stories/Overview.stories.tsx +157 -6
  113. package/src/components/AtomixGlass/stories/Phase1-Animation.stories.tsx +653 -0
  114. package/src/components/AtomixGlass/stories/Phase1-Test.stories.tsx +95 -0
  115. package/src/components/AtomixGlass/stories/Playground.stories.tsx +51 -51
  116. package/src/components/AtomixGlass/stories/shared-components.tsx +6 -0
  117. package/src/components/Avatar/Avatar.tsx +1 -1
  118. package/src/components/Button/Button.stories.disabled-link.tsx +10 -0
  119. package/src/components/Button/Button.stories.tsx +10 -0
  120. package/src/components/Button/Button.test.tsx +16 -11
  121. package/src/components/Button/Button.tsx +4 -4
  122. package/src/components/Card/Card.tsx +1 -1
  123. package/src/components/Dropdown/Dropdown.tsx +12 -12
  124. package/src/components/Form/Select.tsx +62 -3
  125. package/src/components/Modal/Modal.tsx +14 -3
  126. package/src/components/Navigation/Navbar/Navbar.tsx +44 -0
  127. package/src/components/Slider/Slider.stories.tsx +3 -3
  128. package/src/components/Slider/Slider.tsx +38 -0
  129. package/src/components/Steps/Steps.tsx +3 -3
  130. package/src/components/Tabs/Tabs.tsx +77 -8
  131. package/src/components/Testimonial/Testimonial.tsx +1 -1
  132. package/src/components/TypedButton/TypedButton.stories.tsx +59 -0
  133. package/src/components/TypedButton/TypedButton.tsx +39 -0
  134. package/src/components/TypedButton/index.ts +2 -0
  135. package/src/components/VideoPlayer/VideoPlayer.tsx +11 -4
  136. package/src/lib/composables/index.ts +4 -7
  137. package/src/lib/composables/types.ts +45 -0
  138. package/src/lib/composables/useAccordion.ts +0 -7
  139. package/src/lib/composables/useAtomixGlass.ts +144 -5
  140. package/src/lib/composables/useChartExport.ts +3 -13
  141. package/src/lib/composables/useDropdown.ts +66 -0
  142. package/src/lib/composables/useFocusTrap.ts +80 -0
  143. package/src/lib/composables/usePerformanceMonitor.ts +448 -0
  144. package/src/lib/composables/useResponsiveGlass.presets.ts +192 -0
  145. package/src/lib/composables/useResponsiveGlass.ts +441 -0
  146. package/src/lib/composables/useTooltip.ts +16 -0
  147. package/src/lib/composables/useTypedButton.ts +66 -0
  148. package/src/lib/config/index.ts +62 -5
  149. package/src/lib/constants/components.ts +55 -0
  150. package/src/lib/theme/devtools/__tests__/useHistory.test.tsx +150 -0
  151. package/src/lib/theme/tokens/centralized-tokens.ts +120 -0
  152. package/src/lib/theme/utils/__tests__/domUtils.test.ts +101 -0
  153. package/src/lib/types/components.ts +37 -11
  154. package/src/lib/types/glass.ts +35 -0
  155. package/src/lib/types/index.ts +1 -0
  156. package/src/lib/utils/displacement-generator.ts +1 -1
  157. package/src/styles/01-settings/_settings.testtypecheck.scss +53 -0
  158. package/src/styles/01-settings/_settings.typedbutton.scss +53 -0
  159. package/src/styles/06-components/_components.testbutton.scss +212 -0
  160. package/src/styles/06-components/_components.testtypecheck.scss +212 -0
  161. package/src/styles/06-components/_components.typedbutton.scss +212 -0
  162. package/src/styles/99-utilities/_index.scss +1 -0
  163. package/src/styles/99-utilities/_utilities.text.scss +1 -1
  164. package/src/styles/99-utilities/_utilities.touch-target.scss +36 -0
  165. package/src/styles/06-components/old.chart.styles.scss +0 -2788
@@ -0,0 +1,679 @@
1
+ /**
2
+ * Motion & Animation Token Generator
3
+ * Generates comprehensive animation tokens and presets for Atomix components
4
+ */
5
+
6
+ import { join } from 'path';
7
+ import { filesystem } from './filesystem.js';
8
+ import { logger } from '../utils/logger.js';
9
+ import { AtomixCLIError } from '../utils/error.js';
10
+
11
+ /**
12
+ * Animation preset library
13
+ */
14
+ export const ANIMATION_PRESETS = {
15
+ // Fade animations
16
+ fade: {
17
+ keyframes: `
18
+ from { opacity: 0; }
19
+ to { opacity: 1; }
20
+ `,
21
+ duration: 'var(--atomix-duration-base)',
22
+ easing: 'var(--atomix-easing-smooth)'
23
+ },
24
+
25
+ fadeIn: {
26
+ keyframes: `
27
+ from { opacity: 0; }
28
+ to { opacity: 1; }
29
+ `,
30
+ duration: 'var(--atomix-duration-base)',
31
+ easing: 'var(--atomix-ease-out)'
32
+ },
33
+
34
+ fadeOut: {
35
+ keyframes: `
36
+ from { opacity: 1; }
37
+ to { opacity: 0; }
38
+ `,
39
+ duration: 'var(--atomix-duration-base)',
40
+ easing: 'var(--atomix-ease-in)'
41
+ },
42
+
43
+ // Slide animations
44
+ slideInUp: {
45
+ keyframes: `
46
+ from {
47
+ transform: translateY(20px);
48
+ opacity: 0;
49
+ }
50
+ to {
51
+ transform: translateY(0);
52
+ opacity: 1;
53
+ }
54
+ `,
55
+ duration: 'var(--atomix-duration-slow)',
56
+ easing: 'var(--atomix-easing-smooth)'
57
+ },
58
+
59
+ slideInDown: {
60
+ keyframes: `
61
+ from {
62
+ transform: translateY(-20px);
63
+ opacity: 0;
64
+ }
65
+ to {
66
+ transform: translateY(0);
67
+ opacity: 1;
68
+ }
69
+ `,
70
+ duration: 'var(--atomix-duration-slow)',
71
+ easing: 'var(--atomix-easing-smooth)'
72
+ },
73
+
74
+ slideInLeft: {
75
+ keyframes: `
76
+ from {
77
+ transform: translateX(-20px);
78
+ opacity: 0;
79
+ }
80
+ to {
81
+ transform: translateX(0);
82
+ opacity: 1;
83
+ }
84
+ `,
85
+ duration: 'var(--atomix-duration-slow)',
86
+ easing: 'var(--atomix-easing-smooth)'
87
+ },
88
+
89
+ slideInRight: {
90
+ keyframes: `
91
+ from {
92
+ transform: translateX(20px);
93
+ opacity: 0;
94
+ }
95
+ to {
96
+ transform: translateX(0);
97
+ opacity: 1;
98
+ }
99
+ `,
100
+ duration: 'var(--atomix-duration-slow)',
101
+ easing: 'var(--atomix-easing-smooth)'
102
+ },
103
+
104
+ // Scale animations
105
+ scaleIn: {
106
+ keyframes: `
107
+ from {
108
+ transform: scale(0.95);
109
+ opacity: 0;
110
+ }
111
+ to {
112
+ transform: scale(1);
113
+ opacity: 1;
114
+ }
115
+ `,
116
+ duration: 'var(--atomix-duration-fast)',
117
+ easing: 'var(--atomix-easing-smooth)'
118
+ },
119
+
120
+ scaleOut: {
121
+ keyframes: `
122
+ from {
123
+ transform: scale(1);
124
+ opacity: 1;
125
+ }
126
+ to {
127
+ transform: scale(0.95);
128
+ opacity: 0;
129
+ }
130
+ `,
131
+ duration: 'var(--atomix-duration-fast)',
132
+ easing: 'var(--atomix-easing-smooth)'
133
+ },
134
+
135
+ // Bounce animations
136
+ bounceIn: {
137
+ keyframes: `
138
+ 0% {
139
+ transform: scale(0.3);
140
+ opacity: 0;
141
+ }
142
+ 50% {
143
+ transform: scale(1.05);
144
+ }
145
+ 70% {
146
+ transform: scale(0.9);
147
+ }
148
+ 100% {
149
+ transform: scale(1);
150
+ opacity: 1;
151
+ }
152
+ `,
153
+ duration: 'var(--atomix-duration-slower)',
154
+ easing: 'var(--atomix-ease-bounce)'
155
+ },
156
+
157
+ bounce: {
158
+ keyframes: `
159
+ 0%, 100% {
160
+ transform: translateY(0);
161
+ }
162
+ 50% {
163
+ transform: translateY(-10px);
164
+ }
165
+ `,
166
+ duration: '0.6s',
167
+ easing: 'var(--atomix-ease-bounce)',
168
+ iterations: 'infinite'
169
+ },
170
+
171
+ // Rotate animations
172
+ spin: {
173
+ keyframes: `
174
+ from {
175
+ transform: rotate(0deg);
176
+ }
177
+ to {
178
+ transform: rotate(360deg);
179
+ }
180
+ `,
181
+ duration: '1s',
182
+ easing: 'linear',
183
+ iterations: 'infinite'
184
+ },
185
+
186
+ // Shake animation
187
+ shake: {
188
+ keyframes: `
189
+ 0%, 100% {
190
+ transform: translateX(0);
191
+ }
192
+ 10%, 30%, 50%, 70%, 90% {
193
+ transform: translateX(-5px);
194
+ }
195
+ 20%, 40%, 60%, 80% {
196
+ transform: translateX(5px);
197
+ }
198
+ `,
199
+ duration: '0.5s',
200
+ easing: 'var(--atomix-easing-smooth)'
201
+ },
202
+
203
+ // Pulse animation
204
+ pulse: {
205
+ keyframes: `
206
+ 0%, 100% {
207
+ opacity: 1;
208
+ transform: scale(1);
209
+ }
210
+ 50% {
211
+ opacity: 0.8;
212
+ transform: scale(1.05);
213
+ }
214
+ `,
215
+ duration: '2s',
216
+ easing: 'var(--atomix-ease-in-out)',
217
+ iterations: 'infinite'
218
+ },
219
+
220
+ // Skeleton loading
221
+ shimmer: {
222
+ keyframes: `
223
+ 0% {
224
+ background-position: -200% 0;
225
+ }
226
+ 100% {
227
+ background-position: 200% 0;
228
+ }
229
+ `,
230
+ duration: '1.5s',
231
+ easing: 'linear',
232
+ iterations: 'infinite'
233
+ }
234
+ };
235
+
236
+ /**
237
+ * Generate motion tokens SCSS
238
+ */
239
+ export function generateMotionTokens() {
240
+ return `// Motion & Animation Tokens
241
+ // Generated by Atomix CLI
242
+ // =============================================================================
243
+
244
+ @use 'sass:map';
245
+
246
+ // Duration Scale
247
+ // =============================================================================
248
+
249
+ :root {
250
+ // Core durations
251
+ --atomix-duration-instant: 0s;
252
+ --atomix-duration-immediate: 0.05s;
253
+ --atomix-duration-fast: 0.15s;
254
+ --atomix-duration-base: 0.3s;
255
+ --atomix-duration-slow: 0.5s;
256
+ --atomix-duration-slower: 0.7s;
257
+ --atomix-duration-slowest: 1s;
258
+
259
+ // Easing Functions
260
+ --atomix-easing-linear: linear;
261
+ --atomix-easing-none: linear;
262
+
263
+ // Standard easings
264
+ --atomix-ease-in: cubic-bezier(0.4, 0, 1, 1);
265
+ --atomix-ease-out: cubic-bezier(0, 0, 0.2, 1);
266
+ --atomix-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
267
+
268
+ // Premium easings (smooth curves)
269
+ --atomix-easing-smooth: cubic-bezier(0.23, 1, 0.32, 1);
270
+ --atomix-easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
271
+ --atomix-easing-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
272
+ --atomix-easing-snappy: cubic-bezier(0.2, 0, 0, 1);
273
+
274
+ // Transition presets
275
+ --atomix-transition-fast: all var(--atomix-duration-fast) var(--atomix-easing-smooth);
276
+ --atomix-transition-base: all var(--atomix-duration-base) var(--atomix-easing-smooth);
277
+ --atomix-transition-slow: all var(--atomix-duration-slow) var(--atomix-easing-smooth);
278
+
279
+ // Property-specific transitions
280
+ --atomix-transition-colors:
281
+ background-color var(--atomix-duration-base) var(--atomix-easing-smooth),
282
+ border-color var(--atomix-duration-base) var(--atomix-easing-smooth),
283
+ color var(--atomix-duration-base) var(--atomix-easing-smooth),
284
+ fill var(--atomix-duration-base) var(--atomix-easing-smooth),
285
+ stroke var(--atomix-duration-base) var(--atomix-easing-smooth);
286
+
287
+ --atomix-transition-opacity:
288
+ opacity var(--atomix-duration-base) var(--atomix-easing-smooth);
289
+
290
+ --atomix-transition-shadow:
291
+ box-shadow var(--atomix-duration-base) var(--atomix-easing-smooth);
292
+
293
+ --atomix-transition-transform:
294
+ transform var(--atomix-duration-base) var(--atomix-easing-smooth);
295
+ }
296
+
297
+ // Keyframe Definitions
298
+ // =============================================================================
299
+
300
+ // Fade
301
+ @keyframes atomix-fade-in {
302
+ from { opacity: 0; }
303
+ to { opacity: 1; }
304
+ }
305
+
306
+ @keyframes atomix-fade-out {
307
+ from { opacity: 1; }
308
+ to { opacity: 0; }
309
+ }
310
+
311
+ // Slide
312
+ @keyframes atomix-slide-in-up {
313
+ from {
314
+ transform: translateY(20px);
315
+ opacity: 0;
316
+ }
317
+ to {
318
+ transform: translateY(0);
319
+ opacity: 1;
320
+ }
321
+ }
322
+
323
+ @keyframes atomix-slide-in-down {
324
+ from {
325
+ transform: translateY(-20px);
326
+ opacity: 0;
327
+ }
328
+ to {
329
+ transform: translateY(0);
330
+ opacity: 1;
331
+ }
332
+ }
333
+
334
+ @keyframes atomix-slide-in-left {
335
+ from {
336
+ transform: translateX(-20px);
337
+ opacity: 0;
338
+ }
339
+ to {
340
+ transform: translateX(0);
341
+ opacity: 1;
342
+ }
343
+ }
344
+
345
+ @keyframes atomix-slide-in-right {
346
+ from {
347
+ transform: translateX(20px);
348
+ opacity: 0;
349
+ }
350
+ to {
351
+ transform: translateX(0);
352
+ opacity: 1;
353
+ }
354
+ }
355
+
356
+ // Scale
357
+ @keyframes atomix-scale-in {
358
+ from {
359
+ transform: scale(0.95);
360
+ opacity: 0;
361
+ }
362
+ to {
363
+ transform: scale(1);
364
+ opacity: 1;
365
+ }
366
+ }
367
+
368
+ @keyframes atomix-scale-out {
369
+ from {
370
+ transform: scale(1);
371
+ opacity: 1;
372
+ }
373
+ to {
374
+ transform: scale(0.95);
375
+ opacity: 0;
376
+ }
377
+ }
378
+
379
+ // Bounce
380
+ @keyframes atomix-bounce-in {
381
+ 0% {
382
+ transform: scale(0.3);
383
+ opacity: 0;
384
+ }
385
+ 50% {
386
+ transform: scale(1.05);
387
+ }
388
+ 70% {
389
+ transform: scale(0.9);
390
+ }
391
+ 100% {
392
+ transform: scale(1);
393
+ opacity: 1;
394
+ }
395
+ }
396
+
397
+ @keyframes atomix-bounce {
398
+ 0%, 100% {
399
+ transform: translateY(0);
400
+ }
401
+ 50% {
402
+ transform: translateY(-10px);
403
+ }
404
+ }
405
+
406
+ // Rotate
407
+ @keyframes atomix-spin {
408
+ from {
409
+ transform: rotate(0deg);
410
+ }
411
+ to {
412
+ transform: rotate(360deg);
413
+ }
414
+ }
415
+
416
+ // Shake
417
+ @keyframes atomix-shake {
418
+ 0%, 100% {
419
+ transform: translateX(0);
420
+ }
421
+ 10%, 30%, 50%, 70%, 90% {
422
+ transform: translateX(-5px);
423
+ }
424
+ 20%, 40%, 60%, 80% {
425
+ transform: translateX(5px);
426
+ }
427
+ }
428
+
429
+ // Pulse
430
+ @keyframes atomix-pulse {
431
+ 0%, 100% {
432
+ opacity: 1;
433
+ transform: scale(1);
434
+ }
435
+ 50% {
436
+ opacity: 0.8;
437
+ transform: scale(1.05);
438
+ }
439
+ }
440
+
441
+ // Shimmer (skeleton loading)
442
+ @keyframes atomix-shimmer {
443
+ 0% {
444
+ background-position: -200% 0;
445
+ }
446
+ 100% {
447
+ background-position: 200% 0;
448
+ }
449
+ }
450
+
451
+ // Animation Utility Classes
452
+ // =============================================================================
453
+
454
+ // Fade animations
455
+ .atomix-animate-fade-in {
456
+ animation: atomix-fade-in var(--atomix-duration-base) var(--atomix-easing-smooth);
457
+ }
458
+
459
+ .atomix-animate-fade-out {
460
+ animation: atomix-fade-out var(--atomix-duration-base) var(--atomix-easing-smooth);
461
+ }
462
+
463
+ // Slide animations
464
+ .atomix-animate-slide-in-up {
465
+ animation: atomix-slide-in-up var(--atomix-duration-slow) var(--atomix-easing-smooth);
466
+ }
467
+
468
+ .atomix-animate-slide-in-down {
469
+ animation: atomix-slide-in-down var(--atomix-duration-slow) var(--atomix-easing-smooth);
470
+ }
471
+
472
+ .atomix-animate-slide-in-left {
473
+ animation: atomix-slide-in-left var(--atomix-duration-slow) var(--atomix-easing-smooth);
474
+ }
475
+
476
+ .atomix-animate-slide-in-right {
477
+ animation: atomix-slide-in-right var(--atomix-duration-slow) var(--atomix-easing-smooth);
478
+ }
479
+
480
+ // Scale animations
481
+ .atomix-animate-scale-in {
482
+ animation: atomix-scale-in var(--atomix-duration-fast) var(--atomix-easing-smooth);
483
+ }
484
+
485
+ .atomix-animate-scale-out {
486
+ animation: atomix-scale-out var(--atomix-duration-fast) var(--atomix-easing-smooth);
487
+ }
488
+
489
+ // Bounce animations
490
+ .atomix-animate-bounce-in {
491
+ animation: atomix-bounce-in var(--atomix-duration-slower) var(--atomix-ease-bounce);
492
+ }
493
+
494
+ .atomix-animate-bounce {
495
+ animation: atomix-bounce 0.6s var(--atomix-ease-bounce) infinite;
496
+ }
497
+
498
+ // Rotate animations
499
+ .atomix-animate-spin {
500
+ animation: atomix-spin 1s linear infinite;
501
+ }
502
+
503
+ // Shake animation
504
+ .atomix-animate-shake {
505
+ animation: atomix-shake 0.5s var(--atomix-easing-smooth);
506
+ }
507
+
508
+ // Pulse animation
509
+ .atomix-animate-pulse {
510
+ animation: atomix-pulse 2s var(--atomix-ease-in-out) infinite;
511
+ }
512
+
513
+ // Shimmer animation (skeleton)
514
+ .atomix-animate-shimmer {
515
+ animation: atomix-shimmer 1.5s linear infinite;
516
+ background: linear-gradient(
517
+ 90deg,
518
+ rgba(255, 255, 255, 0) 0%,
519
+ rgba(255, 255, 255, 0.2) 20%,
520
+ rgba(255, 255, 255, 0.5) 60%,
521
+ rgba(255, 255, 255, 0)
522
+ );
523
+ background-size: 200% auto;
524
+ }
525
+
526
+ // Animation Delays
527
+ .atomix-delay-100 { animation-delay: 0.1s; }
528
+ .atomix-delay-200 { animation-delay: 0.2s; }
529
+ .atomix-delay-300 { animation-delay: 0.3s; }
530
+ .atomix-delay-400 { animation-delay: 0.4s; }
531
+ .atomix-delay-500 { animation-delay: 0.5s; }
532
+
533
+ // Animation Durations
534
+ .atomix-duration-fast { animation-duration: var(--atomix-duration-fast); }
535
+ .atomix-duration-base { animation-duration: var(--atomix-duration-base); }
536
+ .atomix-duration-slow { animation-duration: var(--atomix-duration-slow); }
537
+
538
+ // Reduced Motion
539
+ // =============================================================================
540
+
541
+ @media (prefers-reduced-motion: reduce) {
542
+ *,
543
+ *::before,
544
+ *::after {
545
+ animation-duration: 0.01ms !important;
546
+ animation-iteration-count: 1 !important;
547
+ transition-duration: 0.01ms !important;
548
+ }
549
+
550
+ // Disable parallax and scroll-based animations
551
+ .atomix-parallax,
552
+ .atomix-scroll-animate {
553
+ transform: none !important;
554
+ opacity: 1 !important;
555
+ }
556
+ }
557
+ `;
558
+ }
559
+
560
+ /**
561
+ * Generate component-specific animation config
562
+ */
563
+ export function generateComponentAnimation(componentName) {
564
+ const componentPrefix = componentName.toLowerCase().replace(/([A-Z])/g, '-$1').replace(/^-/, '');
565
+
566
+ return `// ${componentName} Animation Configuration
567
+ // Generated by Atomix CLI
568
+ // =============================================================================
569
+
570
+ @use '../../01-settings/settings.${componentPrefix}' as *;
571
+ @use '../../02-tools/motion-tokens' as *;
572
+
573
+ // Component Animation Variables
574
+ :root {
575
+ --${componentPrefix}-enter-duration: var(--atomix-duration-base);
576
+ --${componentPrefix}-exit-duration: var(--atomix-duration-fast);
577
+ --${componentPrefix}-hover-duration: var(--atomix-duration-fast);
578
+ --${componentPrefix}-focus-duration: var(--atomix-duration-immediate);
579
+
580
+ --${componentPrefix}-enter-easing: var(--atomix-easing-smooth);
581
+ --${componentPrefix}-exit-easing: var(--atomix-ease-in);
582
+ --${componentPrefix}-hover-easing: var(--atomix-easing-smooth);
583
+ }
584
+
585
+ // Component Enter/Exit Animations
586
+ .${componentPrefix}--animate-enter {
587
+ animation: atomix-fade-in var(--${componentPrefix}-enter-duration) var(--${componentPrefix}-enter-easing);
588
+ }
589
+
590
+ .${componentPrefix}--animate-exit {
591
+ animation: atomix-fade-out var(--${componentPrefix}-exit-duration) var(--${componentPrefix}-exit-easing);
592
+ }
593
+
594
+ // Hover Animation
595
+ .${componentPrefix}:hover {
596
+ transition: transform var(--${componentPrefix}-hover-duration) var(--${componentPrefix}-hover-easing),
597
+ box-shadow var(--${component-prefix}-hover-duration) var(--${componentPrefix}-hover-easing);
598
+
599
+ // Subtle lift effect
600
+ transform: translateY(-2px);
601
+ box-shadow: var(--atomix-shadow-md);
602
+ }
603
+
604
+ // Focus Animation
605
+ .${componentPrefix}:focus-visible {
606
+ transition: box-shadow var(--${componentPrefix}-focus-duration) var(--${componentPrefix}-focus-easing);
607
+ box-shadow: 0 0 0 2px var(--atomix-color-primary-200);
608
+ }
609
+
610
+ // Loading State Animation
611
+ .${componentPrefix}--state-loading {
612
+ animation: atomix-pulse 2s var(--atomix-ease-in-out) infinite;
613
+ }
614
+
615
+ // Disabled State
616
+ .${componentPrefix}--state-disabled {
617
+ transition: opacity var(--atomix-duration-base) var(--atomix-ease-out);
618
+ opacity: var(--${componentPrefix}-disabled-opacity);
619
+ }
620
+ `;
621
+ }
622
+
623
+ /**
624
+ * Generate complete motion package
625
+ */
626
+ export async function generateMotionPackage(projectRoot, options = {}) {
627
+ const {
628
+ outputDir = 'src/styles/02-tools',
629
+ force = false
630
+ } = options;
631
+
632
+ const created = [];
633
+
634
+ try {
635
+ // Create output directory
636
+ await filesystem.createDirectory(outputDir);
637
+
638
+ // Generate motion tokens file
639
+ const motionFile = join(outputDir, '_motion-tokens.scss');
640
+
641
+ if (force || !await filesystem.exists(motionFile)) {
642
+ const motionContent = generateMotionTokens();
643
+ await filesystem.writeFile(motionFile, motionContent, 'utf8');
644
+ created.push('src/styles/02-tools/_motion-tokens.scss');
645
+ logger.debug(`Created motion tokens: ${motionFile}`);
646
+ }
647
+
648
+ return {
649
+ success: true,
650
+ created,
651
+ message: `Generated motion package with ${created.length} files`
652
+ };
653
+
654
+ } catch (error) {
655
+ throw new AtomixCLIError(
656
+ `Failed to generate motion package: ${error.message}`,
657
+ 'MOTION_GENERATION_FAILED',
658
+ [
659
+ 'Check you have write permissions for src/styles directory',
660
+ 'Verify motion tokens don\'t already exist',
661
+ 'Try running with --force flag to overwrite existing files'
662
+ ]
663
+ );
664
+ }
665
+ }
666
+
667
+ /**
668
+ * Get available animation presets
669
+ */
670
+ export function getAnimationPresets() {
671
+ return Object.keys(ANIMATION_PRESETS);
672
+ }
673
+
674
+ /**
675
+ * Get animation preset details
676
+ */
677
+ export function getAnimationPreset(name) {
678
+ return ANIMATION_PRESETS[name] || null;
679
+ }