@spectrabrain/eds 0.1.0 → 0.2.0

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 (62) hide show
  1. package/AI.md +13 -63
  2. package/AI_CONTEXT.json +26 -95
  3. package/CHANGELOG.md +70 -4
  4. package/CONSUMER_AGENT.md +86 -164
  5. package/FRONTEND_CONVENTIONS.md +252 -0
  6. package/QUICKSTART.md +24 -29
  7. package/README.md +29 -73
  8. package/TAILWIND_V4.md +52 -184
  9. package/TOKEN_CONTEXT.md +79 -36
  10. package/consumer/align/templates/components.json +21 -0
  11. package/consumer/align/templates/env.mock +1 -0
  12. package/consumer/align/templates/eslint.config.js +35 -0
  13. package/consumer/align/templates/package.scripts.json +10 -0
  14. package/consumer/align/templates/prettierignore +2 -0
  15. package/consumer/align/templates/prettierrc.json +7 -0
  16. package/consumer/align/templates/src/app/App.tsx +16 -0
  17. package/consumer/align/templates/src/app/main.tsx +27 -0
  18. package/consumer/align/templates/src/app/providers/ErrorBoundary.tsx +58 -0
  19. package/consumer/align/templates/src/app/providers/ErrorHandler.tsx +29 -0
  20. package/consumer/align/templates/src/app/router/index.tsx +23 -0
  21. package/consumer/align/templates/src/app/styles/index.css +2 -0
  22. package/consumer/align/templates/src/mocks/browser.ts +5 -0
  23. package/consumer/align/templates/src/mocks/handlers.ts +4 -0
  24. package/consumer/align/templates/src/shared/api/index.ts +23 -0
  25. package/consumer/align/templates/src/shared/api/queryClient.ts +24 -0
  26. package/consumer/align/templates/src/shared/lib/eventBus.ts +44 -0
  27. package/consumer/align/templates/src/shared/lib/utils/index.ts +6 -0
  28. package/consumer/align/templates/src/vite-env.d.ts +2 -0
  29. package/consumer/align/templates/tsconfig.json +22 -0
  30. package/consumer/align/templates/vite.config.babel.ts +36 -0
  31. package/consumer/align/templates/vite.config.rolldown.ts +35 -0
  32. package/consumer/align-analysis.mjs +1159 -0
  33. package/consumer/align-plan.mjs +377 -0
  34. package/consumer/align-rules.mjs +473 -0
  35. package/consumer/align.mjs +401 -0
  36. package/consumer/cli.mjs +90 -40
  37. package/consumer/css-root.mjs +24 -4
  38. package/consumer/doctor.mjs +47 -21
  39. package/consumer/generate-tailwind.mjs +41 -1
  40. package/consumer/init.mjs +39 -25
  41. package/consumer/managed-block.mjs +11 -5
  42. package/consumer/paths.mjs +69 -14
  43. package/consumer/register-scripts.mjs +17 -12
  44. package/consumer/scan-classes.mjs +24 -5
  45. package/consumer/sync.mjs +35 -13
  46. package/consumer/update-agent-context.mjs +63 -7
  47. package/consumer-postinstall.mjs +8 -7
  48. package/dist/components/Button/README.md +66 -95
  49. package/dist/components/Button/spec.json +19 -138
  50. package/dist/components.css +102 -366
  51. package/dist/index.d.mts +20 -18
  52. package/dist/index.d.ts +20 -18
  53. package/dist/index.js +301 -1
  54. package/dist/index.mjs +301 -1
  55. package/dist/tokens.css +30 -0
  56. package/dist/tokens.d.mts +7 -3
  57. package/dist/tokens.d.ts +7 -3
  58. package/dist/tokens.js +301 -1
  59. package/dist/tokens.json +360 -0
  60. package/dist/tokens.mjs +301 -1
  61. package/llms.txt +20 -14
  62. package/package.json +3 -1
package/dist/tokens.js CHANGED
@@ -410,6 +410,276 @@ var tokenMap = /* @__PURE__ */ Object.freeze({
410
410
  "value": "#FDE047",
411
411
  "cssVariable": "--eds-color-stroke-warning-weak"
412
412
  },
413
+ "radius-1": {
414
+ "name": "radius-1",
415
+ "type": "dimension",
416
+ "value": {
417
+ "value": 2,
418
+ "unit": "px"
419
+ },
420
+ "cssVariable": "--eds-radius-1"
421
+ },
422
+ "radius-10": {
423
+ "name": "radius-10",
424
+ "type": "dimension",
425
+ "value": {
426
+ "value": 999,
427
+ "unit": "px"
428
+ },
429
+ "cssVariable": "--eds-radius-10"
430
+ },
431
+ "radius-2": {
432
+ "name": "radius-2",
433
+ "type": "dimension",
434
+ "value": {
435
+ "value": 4,
436
+ "unit": "px"
437
+ },
438
+ "cssVariable": "--eds-radius-2"
439
+ },
440
+ "radius-3": {
441
+ "name": "radius-3",
442
+ "type": "dimension",
443
+ "value": {
444
+ "value": 6,
445
+ "unit": "px"
446
+ },
447
+ "cssVariable": "--eds-radius-3"
448
+ },
449
+ "radius-4": {
450
+ "name": "radius-4",
451
+ "type": "dimension",
452
+ "value": {
453
+ "value": 8,
454
+ "unit": "px"
455
+ },
456
+ "cssVariable": "--eds-radius-4"
457
+ },
458
+ "radius-5": {
459
+ "name": "radius-5",
460
+ "type": "dimension",
461
+ "value": {
462
+ "value": 10,
463
+ "unit": "px"
464
+ },
465
+ "cssVariable": "--eds-radius-5"
466
+ },
467
+ "radius-6": {
468
+ "name": "radius-6",
469
+ "type": "dimension",
470
+ "value": {
471
+ "value": 12,
472
+ "unit": "px"
473
+ },
474
+ "cssVariable": "--eds-radius-6"
475
+ },
476
+ "radius-7": {
477
+ "name": "radius-7",
478
+ "type": "dimension",
479
+ "value": {
480
+ "value": 14,
481
+ "unit": "px"
482
+ },
483
+ "cssVariable": "--eds-radius-7"
484
+ },
485
+ "radius-8": {
486
+ "name": "radius-8",
487
+ "type": "dimension",
488
+ "value": {
489
+ "value": 16,
490
+ "unit": "px"
491
+ },
492
+ "cssVariable": "--eds-radius-8"
493
+ },
494
+ "radius-9": {
495
+ "name": "radius-9",
496
+ "type": "dimension",
497
+ "value": {
498
+ "value": 20,
499
+ "unit": "px"
500
+ },
501
+ "cssVariable": "--eds-radius-9"
502
+ },
503
+ "radius-none": {
504
+ "name": "radius-none",
505
+ "type": "dimension",
506
+ "value": {
507
+ "value": 0,
508
+ "unit": "px"
509
+ },
510
+ "cssVariable": "--eds-radius-none"
511
+ },
512
+ "spacing-0.5": {
513
+ "name": "spacing-0.5",
514
+ "type": "dimension",
515
+ "value": {
516
+ "value": 2,
517
+ "unit": "px"
518
+ },
519
+ "cssVariable": "--eds-spacing-0\\.5"
520
+ },
521
+ "spacing-1": {
522
+ "name": "spacing-1",
523
+ "type": "dimension",
524
+ "value": {
525
+ "value": 4,
526
+ "unit": "px"
527
+ },
528
+ "cssVariable": "--eds-spacing-1"
529
+ },
530
+ "spacing-1.5": {
531
+ "name": "spacing-1.5",
532
+ "type": "dimension",
533
+ "value": {
534
+ "value": 6,
535
+ "unit": "px"
536
+ },
537
+ "cssVariable": "--eds-spacing-1\\.5"
538
+ },
539
+ "spacing-10": {
540
+ "name": "spacing-10",
541
+ "type": "dimension",
542
+ "value": {
543
+ "value": 40,
544
+ "unit": "px"
545
+ },
546
+ "cssVariable": "--eds-spacing-10"
547
+ },
548
+ "spacing-11": {
549
+ "name": "spacing-11",
550
+ "type": "dimension",
551
+ "value": {
552
+ "value": 44,
553
+ "unit": "px"
554
+ },
555
+ "cssVariable": "--eds-spacing-11"
556
+ },
557
+ "spacing-12": {
558
+ "name": "spacing-12",
559
+ "type": "dimension",
560
+ "value": {
561
+ "value": 48,
562
+ "unit": "px"
563
+ },
564
+ "cssVariable": "--eds-spacing-12"
565
+ },
566
+ "spacing-2": {
567
+ "name": "spacing-2",
568
+ "type": "dimension",
569
+ "value": {
570
+ "value": 8,
571
+ "unit": "px"
572
+ },
573
+ "cssVariable": "--eds-spacing-2"
574
+ },
575
+ "spacing-2.5": {
576
+ "name": "spacing-2.5",
577
+ "type": "dimension",
578
+ "value": {
579
+ "value": 10,
580
+ "unit": "px"
581
+ },
582
+ "cssVariable": "--eds-spacing-2\\.5"
583
+ },
584
+ "spacing-3": {
585
+ "name": "spacing-3",
586
+ "type": "dimension",
587
+ "value": {
588
+ "value": 12,
589
+ "unit": "px"
590
+ },
591
+ "cssVariable": "--eds-spacing-3"
592
+ },
593
+ "spacing-3.5": {
594
+ "name": "spacing-3.5",
595
+ "type": "dimension",
596
+ "value": {
597
+ "value": 14,
598
+ "unit": "px"
599
+ },
600
+ "cssVariable": "--eds-spacing-3\\.5"
601
+ },
602
+ "spacing-4": {
603
+ "name": "spacing-4",
604
+ "type": "dimension",
605
+ "value": {
606
+ "value": 16,
607
+ "unit": "px"
608
+ },
609
+ "cssVariable": "--eds-spacing-4"
610
+ },
611
+ "spacing-4.5": {
612
+ "name": "spacing-4.5",
613
+ "type": "dimension",
614
+ "value": {
615
+ "value": 18,
616
+ "unit": "px"
617
+ },
618
+ "cssVariable": "--eds-spacing-4\\.5"
619
+ },
620
+ "spacing-5": {
621
+ "name": "spacing-5",
622
+ "type": "dimension",
623
+ "value": {
624
+ "value": 20,
625
+ "unit": "px"
626
+ },
627
+ "cssVariable": "--eds-spacing-5"
628
+ },
629
+ "spacing-6": {
630
+ "name": "spacing-6",
631
+ "type": "dimension",
632
+ "value": {
633
+ "value": 24,
634
+ "unit": "px"
635
+ },
636
+ "cssVariable": "--eds-spacing-6"
637
+ },
638
+ "spacing-7": {
639
+ "name": "spacing-7",
640
+ "type": "dimension",
641
+ "value": {
642
+ "value": 28,
643
+ "unit": "px"
644
+ },
645
+ "cssVariable": "--eds-spacing-7"
646
+ },
647
+ "spacing-7.5": {
648
+ "name": "spacing-7.5",
649
+ "type": "dimension",
650
+ "value": {
651
+ "value": 30,
652
+ "unit": "px"
653
+ },
654
+ "cssVariable": "--eds-spacing-7\\.5"
655
+ },
656
+ "spacing-8": {
657
+ "name": "spacing-8",
658
+ "type": "dimension",
659
+ "value": {
660
+ "value": 32,
661
+ "unit": "px"
662
+ },
663
+ "cssVariable": "--eds-spacing-8"
664
+ },
665
+ "spacing-9": {
666
+ "name": "spacing-9",
667
+ "type": "dimension",
668
+ "value": {
669
+ "value": 36,
670
+ "unit": "px"
671
+ },
672
+ "cssVariable": "--eds-spacing-9"
673
+ },
674
+ "spacing-none": {
675
+ "name": "spacing-none",
676
+ "type": "dimension",
677
+ "value": {
678
+ "value": 0,
679
+ "unit": "px"
680
+ },
681
+ "cssVariable": "--eds-spacing-none"
682
+ },
413
683
  "typography-body1-fontFamily": {
414
684
  "name": "typography-body1-fontFamily",
415
685
  "type": "fontFamily",
@@ -1212,6 +1482,36 @@ var tokenNames = /* @__PURE__ */ Object.freeze([
1212
1482
  "color-stroke-positive-weak",
1213
1483
  "color-stroke-warning-primary",
1214
1484
  "color-stroke-warning-weak",
1485
+ "radius-1",
1486
+ "radius-10",
1487
+ "radius-2",
1488
+ "radius-3",
1489
+ "radius-4",
1490
+ "radius-5",
1491
+ "radius-6",
1492
+ "radius-7",
1493
+ "radius-8",
1494
+ "radius-9",
1495
+ "radius-none",
1496
+ "spacing-0.5",
1497
+ "spacing-1",
1498
+ "spacing-1.5",
1499
+ "spacing-10",
1500
+ "spacing-11",
1501
+ "spacing-12",
1502
+ "spacing-2",
1503
+ "spacing-2.5",
1504
+ "spacing-3",
1505
+ "spacing-3.5",
1506
+ "spacing-4",
1507
+ "spacing-4.5",
1508
+ "spacing-5",
1509
+ "spacing-6",
1510
+ "spacing-7",
1511
+ "spacing-7.5",
1512
+ "spacing-8",
1513
+ "spacing-9",
1514
+ "spacing-none",
1215
1515
  "typography-body1-fontFamily",
1216
1516
  "typography-body1-fontSize",
1217
1517
  "typography-body1-fontWeight",
@@ -1302,7 +1602,7 @@ function cssVar(name) {
1302
1602
  if (!tokenNames.includes(name)) {
1303
1603
  throw new Error("Unknown semantic token: " + name);
1304
1604
  }
1305
- return "var(--eds-" + name + ")";
1605
+ return "var(" + tokenMap[name].cssVariable + ")";
1306
1606
  }
1307
1607
 
1308
1608
  exports.cssVar = cssVar;
package/dist/tokens.json CHANGED
@@ -613,6 +613,366 @@
613
613
  }
614
614
  }
615
615
  },
616
+ "radius-1": {
617
+ "$type": "dimension",
618
+ "$value": {
619
+ "value": 2,
620
+ "unit": "px"
621
+ },
622
+ "$extensions": {
623
+ "eds": {
624
+ "cssVariable": "--eds-radius-1"
625
+ }
626
+ }
627
+ },
628
+ "radius-10": {
629
+ "$type": "dimension",
630
+ "$value": {
631
+ "value": 999,
632
+ "unit": "px"
633
+ },
634
+ "$extensions": {
635
+ "eds": {
636
+ "cssVariable": "--eds-radius-10"
637
+ }
638
+ }
639
+ },
640
+ "radius-2": {
641
+ "$type": "dimension",
642
+ "$value": {
643
+ "value": 4,
644
+ "unit": "px"
645
+ },
646
+ "$extensions": {
647
+ "eds": {
648
+ "cssVariable": "--eds-radius-2"
649
+ }
650
+ }
651
+ },
652
+ "radius-3": {
653
+ "$type": "dimension",
654
+ "$value": {
655
+ "value": 6,
656
+ "unit": "px"
657
+ },
658
+ "$extensions": {
659
+ "eds": {
660
+ "cssVariable": "--eds-radius-3"
661
+ }
662
+ }
663
+ },
664
+ "radius-4": {
665
+ "$type": "dimension",
666
+ "$value": {
667
+ "value": 8,
668
+ "unit": "px"
669
+ },
670
+ "$extensions": {
671
+ "eds": {
672
+ "cssVariable": "--eds-radius-4"
673
+ }
674
+ }
675
+ },
676
+ "radius-5": {
677
+ "$type": "dimension",
678
+ "$value": {
679
+ "value": 10,
680
+ "unit": "px"
681
+ },
682
+ "$extensions": {
683
+ "eds": {
684
+ "cssVariable": "--eds-radius-5"
685
+ }
686
+ }
687
+ },
688
+ "radius-6": {
689
+ "$type": "dimension",
690
+ "$value": {
691
+ "value": 12,
692
+ "unit": "px"
693
+ },
694
+ "$extensions": {
695
+ "eds": {
696
+ "cssVariable": "--eds-radius-6"
697
+ }
698
+ }
699
+ },
700
+ "radius-7": {
701
+ "$type": "dimension",
702
+ "$value": {
703
+ "value": 14,
704
+ "unit": "px"
705
+ },
706
+ "$extensions": {
707
+ "eds": {
708
+ "cssVariable": "--eds-radius-7"
709
+ }
710
+ }
711
+ },
712
+ "radius-8": {
713
+ "$type": "dimension",
714
+ "$value": {
715
+ "value": 16,
716
+ "unit": "px"
717
+ },
718
+ "$extensions": {
719
+ "eds": {
720
+ "cssVariable": "--eds-radius-8"
721
+ }
722
+ }
723
+ },
724
+ "radius-9": {
725
+ "$type": "dimension",
726
+ "$value": {
727
+ "value": 20,
728
+ "unit": "px"
729
+ },
730
+ "$extensions": {
731
+ "eds": {
732
+ "cssVariable": "--eds-radius-9"
733
+ }
734
+ }
735
+ },
736
+ "radius-none": {
737
+ "$type": "dimension",
738
+ "$value": {
739
+ "value": 0,
740
+ "unit": "px"
741
+ },
742
+ "$extensions": {
743
+ "eds": {
744
+ "cssVariable": "--eds-radius-none"
745
+ }
746
+ }
747
+ },
748
+ "spacing-0.5": {
749
+ "$type": "dimension",
750
+ "$value": {
751
+ "value": 2,
752
+ "unit": "px"
753
+ },
754
+ "$extensions": {
755
+ "eds": {
756
+ "cssVariable": "--eds-spacing-0\\.5"
757
+ }
758
+ }
759
+ },
760
+ "spacing-1": {
761
+ "$type": "dimension",
762
+ "$value": {
763
+ "value": 4,
764
+ "unit": "px"
765
+ },
766
+ "$extensions": {
767
+ "eds": {
768
+ "cssVariable": "--eds-spacing-1"
769
+ }
770
+ }
771
+ },
772
+ "spacing-1.5": {
773
+ "$type": "dimension",
774
+ "$value": {
775
+ "value": 6,
776
+ "unit": "px"
777
+ },
778
+ "$extensions": {
779
+ "eds": {
780
+ "cssVariable": "--eds-spacing-1\\.5"
781
+ }
782
+ }
783
+ },
784
+ "spacing-10": {
785
+ "$type": "dimension",
786
+ "$value": {
787
+ "value": 40,
788
+ "unit": "px"
789
+ },
790
+ "$extensions": {
791
+ "eds": {
792
+ "cssVariable": "--eds-spacing-10"
793
+ }
794
+ }
795
+ },
796
+ "spacing-11": {
797
+ "$type": "dimension",
798
+ "$value": {
799
+ "value": 44,
800
+ "unit": "px"
801
+ },
802
+ "$extensions": {
803
+ "eds": {
804
+ "cssVariable": "--eds-spacing-11"
805
+ }
806
+ }
807
+ },
808
+ "spacing-12": {
809
+ "$type": "dimension",
810
+ "$value": {
811
+ "value": 48,
812
+ "unit": "px"
813
+ },
814
+ "$extensions": {
815
+ "eds": {
816
+ "cssVariable": "--eds-spacing-12"
817
+ }
818
+ }
819
+ },
820
+ "spacing-2": {
821
+ "$type": "dimension",
822
+ "$value": {
823
+ "value": 8,
824
+ "unit": "px"
825
+ },
826
+ "$extensions": {
827
+ "eds": {
828
+ "cssVariable": "--eds-spacing-2"
829
+ }
830
+ }
831
+ },
832
+ "spacing-2.5": {
833
+ "$type": "dimension",
834
+ "$value": {
835
+ "value": 10,
836
+ "unit": "px"
837
+ },
838
+ "$extensions": {
839
+ "eds": {
840
+ "cssVariable": "--eds-spacing-2\\.5"
841
+ }
842
+ }
843
+ },
844
+ "spacing-3": {
845
+ "$type": "dimension",
846
+ "$value": {
847
+ "value": 12,
848
+ "unit": "px"
849
+ },
850
+ "$extensions": {
851
+ "eds": {
852
+ "cssVariable": "--eds-spacing-3"
853
+ }
854
+ }
855
+ },
856
+ "spacing-3.5": {
857
+ "$type": "dimension",
858
+ "$value": {
859
+ "value": 14,
860
+ "unit": "px"
861
+ },
862
+ "$extensions": {
863
+ "eds": {
864
+ "cssVariable": "--eds-spacing-3\\.5"
865
+ }
866
+ }
867
+ },
868
+ "spacing-4": {
869
+ "$type": "dimension",
870
+ "$value": {
871
+ "value": 16,
872
+ "unit": "px"
873
+ },
874
+ "$extensions": {
875
+ "eds": {
876
+ "cssVariable": "--eds-spacing-4"
877
+ }
878
+ }
879
+ },
880
+ "spacing-4.5": {
881
+ "$type": "dimension",
882
+ "$value": {
883
+ "value": 18,
884
+ "unit": "px"
885
+ },
886
+ "$extensions": {
887
+ "eds": {
888
+ "cssVariable": "--eds-spacing-4\\.5"
889
+ }
890
+ }
891
+ },
892
+ "spacing-5": {
893
+ "$type": "dimension",
894
+ "$value": {
895
+ "value": 20,
896
+ "unit": "px"
897
+ },
898
+ "$extensions": {
899
+ "eds": {
900
+ "cssVariable": "--eds-spacing-5"
901
+ }
902
+ }
903
+ },
904
+ "spacing-6": {
905
+ "$type": "dimension",
906
+ "$value": {
907
+ "value": 24,
908
+ "unit": "px"
909
+ },
910
+ "$extensions": {
911
+ "eds": {
912
+ "cssVariable": "--eds-spacing-6"
913
+ }
914
+ }
915
+ },
916
+ "spacing-7": {
917
+ "$type": "dimension",
918
+ "$value": {
919
+ "value": 28,
920
+ "unit": "px"
921
+ },
922
+ "$extensions": {
923
+ "eds": {
924
+ "cssVariable": "--eds-spacing-7"
925
+ }
926
+ }
927
+ },
928
+ "spacing-7.5": {
929
+ "$type": "dimension",
930
+ "$value": {
931
+ "value": 30,
932
+ "unit": "px"
933
+ },
934
+ "$extensions": {
935
+ "eds": {
936
+ "cssVariable": "--eds-spacing-7\\.5"
937
+ }
938
+ }
939
+ },
940
+ "spacing-8": {
941
+ "$type": "dimension",
942
+ "$value": {
943
+ "value": 32,
944
+ "unit": "px"
945
+ },
946
+ "$extensions": {
947
+ "eds": {
948
+ "cssVariable": "--eds-spacing-8"
949
+ }
950
+ }
951
+ },
952
+ "spacing-9": {
953
+ "$type": "dimension",
954
+ "$value": {
955
+ "value": 36,
956
+ "unit": "px"
957
+ },
958
+ "$extensions": {
959
+ "eds": {
960
+ "cssVariable": "--eds-spacing-9"
961
+ }
962
+ }
963
+ },
964
+ "spacing-none": {
965
+ "$type": "dimension",
966
+ "$value": {
967
+ "value": 0,
968
+ "unit": "px"
969
+ },
970
+ "$extensions": {
971
+ "eds": {
972
+ "cssVariable": "--eds-spacing-none"
973
+ }
974
+ }
975
+ },
616
976
  "typography-body1-fontFamily": {
617
977
  "$type": "fontFamily",
618
978
  "$value": [