@shohojdhara/atomix 0.5.2 → 0.5.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 (61) hide show
  1. package/atomix.config.ts +33 -33
  2. package/dist/atomix.css +3213 -159
  3. package/dist/atomix.css.map +1 -1
  4. package/dist/atomix.min.css +5 -5
  5. package/dist/atomix.min.css.map +1 -1
  6. package/dist/config.d.ts +187 -112
  7. package/dist/config.js +2 -47
  8. package/dist/config.js.map +1 -1
  9. package/dist/index.d.ts +1958 -900
  10. package/dist/index.esm.js +2279 -382
  11. package/dist/index.esm.js.map +1 -1
  12. package/dist/index.js +2332 -413
  13. package/dist/index.js.map +1 -1
  14. package/dist/index.min.js +1 -1
  15. package/dist/index.min.js.map +1 -1
  16. package/dist/theme.d.ts +1390 -276
  17. package/dist/theme.js +2125 -621
  18. package/dist/theme.js.map +1 -1
  19. package/package.json +1 -1
  20. package/scripts/cli/internal/config-loader.js +30 -20
  21. package/src/lib/config/index.ts +38 -362
  22. package/src/lib/config/loader.ts +422 -0
  23. package/src/lib/config/public-api.ts +43 -0
  24. package/src/lib/config/types.ts +389 -0
  25. package/src/lib/config/validator.ts +305 -0
  26. package/src/lib/theme/adapters/index.ts +1 -1
  27. package/src/lib/theme/adapters/themeAdapter.ts +358 -229
  28. package/src/lib/theme/components/ThemeToggle.tsx +276 -0
  29. package/src/lib/theme/config/configLoader.ts +351 -0
  30. package/src/lib/theme/config/loader.ts +221 -0
  31. package/src/lib/theme/core/createTheme.ts +126 -50
  32. package/src/lib/theme/core/createThemeObject.ts +7 -4
  33. package/src/lib/theme/hooks/useThemeSwitcher.ts +164 -0
  34. package/src/lib/theme/index.ts +322 -38
  35. package/src/lib/theme/runtime/ThemeProvider.tsx +44 -10
  36. package/src/lib/theme/runtime/__tests__/ThemeProvider.test.tsx +44 -393
  37. package/src/lib/theme/runtime/useTheme.ts +1 -0
  38. package/src/lib/theme/tokens/tokens.ts +101 -1
  39. package/src/lib/theme/types.ts +91 -0
  40. package/src/lib/theme/utils/performanceMonitor.ts +315 -0
  41. package/src/lib/theme/utils/responsive.ts +280 -0
  42. package/src/lib/theme/utils/themeUtils.ts +531 -117
  43. package/src/styles/01-settings/_settings.background.scss +34 -5
  44. package/src/styles/02-tools/_tools.background.scss +330 -52
  45. package/src/styles/05-objects/_objects.masonry-grid.scss +3 -3
  46. package/src/styles/06-components/_components.accordion.scss +2 -2
  47. package/src/styles/06-components/_components.badge.scss +1 -1
  48. package/src/styles/06-components/_components.button.scss +2 -2
  49. package/src/styles/06-components/_components.callout.scss +2 -2
  50. package/src/styles/06-components/_components.card.scss +1 -1
  51. package/src/styles/06-components/_components.dropdown.scss +1 -1
  52. package/src/styles/06-components/_components.dynamic-background.scss +69 -0
  53. package/src/styles/06-components/_components.edge-panel.scss +2 -2
  54. package/src/styles/06-components/_components.input.scss +3 -3
  55. package/src/styles/06-components/_components.messages.scss +6 -6
  56. package/src/styles/06-components/_components.modal.scss +1 -1
  57. package/src/styles/06-components/_components.navbar.scss +1 -1
  58. package/src/styles/06-components/_components.popover.scss +1 -1
  59. package/src/styles/06-components/_components.toggle.scss +1 -1
  60. package/src/styles/06-components/_components.tooltip.scss +3 -3
  61. package/src/styles/06-components/_index.scss +1 -0
package/dist/config.d.ts CHANGED
@@ -205,6 +205,80 @@ interface BorderRadiusOptions {
205
205
  * Users can augment this interface via module augmentation
206
206
  */
207
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
+ };
208
282
  [key: string]: any;
209
283
  }
210
284
  /**
@@ -278,28 +352,9 @@ interface Theme extends ThemeMetadata {
278
352
  }
279
353
 
280
354
  /**
281
- * Atomix Configuration System
355
+ * Configuration Types
282
356
  *
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
- * ```
357
+ * Type definitions for the Atomix configuration system.
303
358
  */
304
359
 
305
360
  /**
@@ -327,6 +382,105 @@ interface PaletteColorOptions {
327
382
  dark?: string;
328
383
  contrastText?: string;
329
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
+ }
330
484
  /**
331
485
  * Design Tokens Schema (Tailwind-like)
332
486
  */
@@ -406,7 +560,7 @@ interface JSThemeDefinition {
406
560
  */
407
561
  type ThemeDefinition = CSSThemeDefinition | JSThemeDefinition;
408
562
  /**
409
- * Build configuration (migrated from theme.config.ts)
563
+ * Build configuration
410
564
  */
411
565
  interface BuildConfig {
412
566
  output?: {
@@ -423,7 +577,7 @@ interface BuildConfig {
423
577
  };
424
578
  }
425
579
  /**
426
- * Runtime configuration (migrated from theme.config.ts)
580
+ * Runtime configuration
427
581
  */
428
582
  interface RuntimeConfig {
429
583
  basePath?: string;
@@ -437,7 +591,7 @@ interface RuntimeConfig {
437
591
  useMinified?: boolean;
438
592
  }
439
593
  /**
440
- * Integration settings (migrated from theme.config.ts)
594
+ * Integration settings
441
595
  */
442
596
  interface IntegrationConfig {
443
597
  cssVariables?: Record<string, string>;
@@ -472,14 +626,14 @@ interface TokenEngineConfig {
472
626
  };
473
627
  }
474
628
  /**
475
- * CLI component generator defaults (merged before CLI flags; flags win).
629
+ * CLI component generator defaults
476
630
  */
477
631
  interface GeneratorConfig {
478
632
  /** Default output directory for generated components */
479
633
  outputPath?: string;
480
634
  /** Override detected framework */
481
635
  framework?: 'react' | 'next' | 'vanilla';
482
- /** Per-feature defaults (CLI --no-* flags override) */
636
+ /** Per-feature defaults */
483
637
  features?: {
484
638
  storybook?: boolean;
485
639
  hook?: boolean;
@@ -497,126 +651,47 @@ interface GeneratorConfig {
497
651
  * Atomix Configuration Interface
498
652
  *
499
653
  * Tailwind-like configuration for external developers.
500
- * Focus on theme customization - build/runtime configs are internal only.
501
654
  */
502
655
  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
656
  prefix?: string;
510
- /**
511
- * Plugins to extend CLI functionality
512
- */
513
657
  plugins?: (string | PluginConfig)[];
514
- /**
515
- * Universal Token Engine configuration
516
- */
517
658
  tokenEngine?: TokenEngineConfig;
518
- /**
519
- * AI-Assisted Scaffolding configuration
520
- */
521
659
  ai?: {
522
- /** AI provider (default: 'openai') */
523
660
  provider?: 'openai' | 'anthropic';
524
- /** LLM model to use */
525
661
  model?: string;
526
- /** API key for the provider */
527
662
  apiKey?: string;
528
- /** Temperature for AI creativity (0.0-1.0, default: 0.7) */
529
663
  temperature?: number;
530
- /** Maximum tokens per AI response (default: 4000) */
531
664
  maxTokens?: number;
532
- /** Rate limiting configuration */
533
665
  rateLimit?: {
534
- /** Maximum requests allowed */
535
666
  requests: number;
536
- /** Time window in milliseconds */
537
667
  windowMs: number;
538
668
  };
539
669
  };
540
- /**
541
- * Performance & Telemetry (Phase 4)
542
- */
543
670
  telemetry?: {
544
- /** Enable local telemetry logging (default: false) */
545
671
  enabled?: boolean;
546
- /** Output path for telemetry logs (default: '.atomix/telemetry.json') */
547
672
  path?: string;
548
- /** Anonymize telemetry data (default: true) */
549
673
  anonymize?: boolean;
550
674
  };
551
- /**
552
- * `atomix generate` defaults (CLI overrides these)
553
- */
554
675
  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
- */
676
+ interactiveEffects?: InteractiveEffectsConfig;
677
+ optimization?: OptimizationConfig;
678
+ visualPolish?: VisualPolishConfig;
561
679
  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
680
  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
681
  tokens?: ThemeTokens;
576
- /**
577
- * Register custom themes (optional)
578
- *
579
- * Define CSS or JavaScript themes that can be loaded dynamically.
580
- */
581
682
  themes?: Record<string, ThemeDefinition>;
582
683
  };
583
- /** @internal Build configuration (internal use only) */
684
+ /** @internal Build configuration */
584
685
  build?: BuildConfig;
585
- /** @internal Runtime configuration (internal use only) */
686
+ /** @internal Runtime configuration */
586
687
  runtime?: RuntimeConfig;
587
- /** @internal Integration settings (internal use only) */
688
+ /** @internal Integration settings */
588
689
  integration?: IntegrationConfig;
589
- /** @internal Theme dependencies mapping (internal use only) */
690
+ /** @internal Theme dependencies mapping */
590
691
  dependencies?: Record<string, string[]>;
591
692
  }
592
693
  /**
593
694
  * 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
695
  */
621
696
  declare function defineConfig(config: AtomixConfig): AtomixConfig;
622
697
 
package/dist/config.js CHANGED
@@ -1,55 +1,10 @@
1
1
  /**
2
- * Atomix Configuration System
2
+ * Configuration Types
3
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
- * ```
4
+ * Type definitions for the Atomix configuration system.
24
5
  */
25
6
  /**
26
7
  * 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
8
  */
54
9
  function defineConfig(config) {
55
10
  return config;
@@ -1 +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;;"}
1
+ {"version":3,"file":"config.js","sources":["../src/lib/config/types.ts"],"sourcesContent":[null],"names":["defineConfig","config"],"mappings":";;;;;;;;AAkYM,SAAUA,aAAaC;IAC3B,OAAOA;AACT;;"}