@contentrain/astro-kit 0.5.0 → 0.6.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 (66) hide show
  1. package/catalog.json +1512 -167
  2. package/components/_shared/KitImage.astro +10 -4
  3. package/components/_shared/image.ts +14 -0
  4. package/components/_shared/types.ts +2 -1
  5. package/components/announcement/Announcement.astro +53 -0
  6. package/components/announcement/fixtures.json +6 -0
  7. package/components/announcement/meta.json +53 -0
  8. package/components/card-grid/CardGrid.astro +5 -3
  9. package/components/card-grid/meta.json +25 -11
  10. package/components/consent/Consent.astro +87 -0
  11. package/components/consent/fixtures.json +4 -0
  12. package/components/consent/meta.json +67 -0
  13. package/components/contact-details/ContactDetails.astro +74 -0
  14. package/components/contact-details/fixtures.json +4 -0
  15. package/components/contact-details/meta.json +105 -0
  16. package/components/contact-form/ContactForm.astro +22 -6
  17. package/components/contact-form/fixtures.json +2 -1
  18. package/components/contact-form/meta.json +7 -6
  19. package/components/cta/meta.json +4 -4
  20. package/components/faq/meta.json +6 -6
  21. package/components/feature-list/FeatureList.astro +85 -0
  22. package/components/feature-list/fixtures.json +129 -0
  23. package/components/feature-list/meta.json +118 -0
  24. package/components/footer/Footer.astro +14 -6
  25. package/components/footer/fixtures.json +3 -1
  26. package/components/footer/meta.json +12 -0
  27. package/components/gallery/Gallery.astro +7 -3
  28. package/components/gallery/meta.json +6 -6
  29. package/components/header/Header.astro +19 -8
  30. package/components/header/fixtures.json +2 -1
  31. package/components/hero/meta.json +30 -8
  32. package/components/logo-cloud/LogoCloud.astro +69 -0
  33. package/components/logo-cloud/fixtures.json +139 -0
  34. package/components/logo-cloud/meta.json +107 -0
  35. package/components/newsletter/meta.json +12 -0
  36. package/components/pricing/Pricing.astro +94 -0
  37. package/components/pricing/fixtures.json +6 -0
  38. package/components/pricing/meta.json +133 -0
  39. package/components/prose/Prose.astro +7 -3
  40. package/components/prose/fixtures.json +2 -1
  41. package/components/prose/meta.json +5 -2
  42. package/components/slider/Slider.astro +15 -3
  43. package/components/slider/meta.json +8 -8
  44. package/components/split/Split.astro +64 -0
  45. package/components/split/fixtures.json +6 -0
  46. package/components/split/meta.json +154 -0
  47. package/components/stats/Stats.astro +66 -0
  48. package/components/stats/fixtures.json +98 -0
  49. package/components/stats/meta.json +113 -0
  50. package/components/steps/Steps.astro +77 -0
  51. package/components/steps/fixtures.json +5 -0
  52. package/components/steps/meta.json +105 -0
  53. package/components/team/Team.astro +82 -0
  54. package/components/team/fixtures.json +5 -0
  55. package/components/team/meta.json +116 -0
  56. package/components/testimonial/Testimonial.astro +5 -3
  57. package/components/testimonial/meta.json +21 -20
  58. package/dist/index.d.mts +115 -2
  59. package/dist/index.d.mts.map +1 -1
  60. package/dist/index.mjs +175 -3
  61. package/dist/index.mjs.map +1 -1
  62. package/mapping/classic.json +51 -6
  63. package/mapping/divi.json +359 -9
  64. package/mapping/elementor.json +581 -8
  65. package/mapping/gutenberg.json +420 -4
  66. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "format": "astro-kit-mapping@1",
3
3
  "builder": "gutenberg",
4
- "version": "4",
4
+ "version": "5",
5
5
  "fallback": "prose",
6
6
  "rules": [
7
7
  {
@@ -96,7 +96,8 @@
96
96
  "title": "dom:h2,h3,h4",
97
97
  "text": "dom:p",
98
98
  "href": "dom:a@href",
99
- "image": "img:img"
99
+ "image": "img:img@src",
100
+ "imageAlt": "img:img@alt"
100
101
  }
101
102
  },
102
103
  {
@@ -207,7 +208,8 @@
207
208
  "into": "slides",
208
209
  "each": "figure.wp-block-image",
209
210
  "item": {
210
- "image": "img:img",
211
+ "image": "img:img@src",
212
+ "imageAlt": "img:img@alt",
211
213
  "text": "dom:figcaption"
212
214
  }
213
215
  },
@@ -253,7 +255,8 @@
253
255
  "into": "items",
254
256
  "each": "figure.wp-block-image",
255
257
  "item": {
256
- "image": "img:img",
258
+ "image": "img:img@src",
259
+ "imageAlt": "img:img@alt",
257
260
  "caption": "dom:figcaption"
258
261
  }
259
262
  },
@@ -457,5 +460,418 @@
457
460
  "html": "html:"
458
461
  }
459
462
  }
463
+ ],
464
+ "sections": [
465
+ {
466
+ "id": "hero.cover",
467
+ "component": "hero",
468
+ "variant": {
469
+ "layout": "cover"
470
+ },
471
+ "when": {
472
+ "position": "first",
473
+ "root": "core/cover"
474
+ },
475
+ "slots": {
476
+ "title": {
477
+ "match": "core/heading",
478
+ "max": 1,
479
+ "min": 1
480
+ },
481
+ "lead": {
482
+ "match": "core/paragraph",
483
+ "max": 1
484
+ },
485
+ "button": {
486
+ "match": "core/button",
487
+ "max": 2
488
+ }
489
+ },
490
+ "props": {
491
+ "heading": "@title dom:",
492
+ "lead": "@lead dom:",
493
+ "image": "img:img.wp-block-cover__image-background"
494
+ },
495
+ "into": "actions",
496
+ "each": "@button",
497
+ "item": {
498
+ "label": "dom:a",
499
+ "href": "dom:a@href",
500
+ "style": "class:is-style-outline=ghost|primary"
501
+ }
502
+ },
503
+ {
504
+ "id": "hero.split",
505
+ "component": "hero",
506
+ "variant": {
507
+ "layout": "split"
508
+ },
509
+ "when": {
510
+ "position": "first",
511
+ "columns": 2
512
+ },
513
+ "slots": {
514
+ "title": {
515
+ "match": "core/heading",
516
+ "max": 1,
517
+ "min": 1
518
+ },
519
+ "lead": {
520
+ "match": "core/paragraph",
521
+ "max": 1
522
+ },
523
+ "button": {
524
+ "match": "core/button",
525
+ "max": 2
526
+ },
527
+ "media": {
528
+ "match": "core/image",
529
+ "min": 1,
530
+ "max": 1
531
+ }
532
+ },
533
+ "props": {
534
+ "heading": "@title dom:",
535
+ "lead": "@lead dom:",
536
+ "image": "@media img:img"
537
+ },
538
+ "into": "actions",
539
+ "each": "@button",
540
+ "item": {
541
+ "label": "dom:a",
542
+ "href": "dom:a@href",
543
+ "style": "class:is-style-outline=ghost|primary"
544
+ }
545
+ },
546
+ {
547
+ "id": "hero.centered",
548
+ "component": "hero",
549
+ "variant": {
550
+ "layout": "centered"
551
+ },
552
+ "when": {
553
+ "position": "first",
554
+ "columns": 1
555
+ },
556
+ "slots": {
557
+ "title": {
558
+ "match": "core/heading",
559
+ "max": 1,
560
+ "min": 1
561
+ },
562
+ "lead": {
563
+ "match": "core/paragraph",
564
+ "max": 1
565
+ },
566
+ "button": {
567
+ "match": "core/button",
568
+ "max": 2
569
+ }
570
+ },
571
+ "props": {
572
+ "heading": "@title dom:",
573
+ "lead": "@lead dom:"
574
+ },
575
+ "into": "actions",
576
+ "each": "@button",
577
+ "item": {
578
+ "label": "dom:a",
579
+ "href": "dom:a@href",
580
+ "style": "class:is-style-outline=ghost|primary"
581
+ }
582
+ },
583
+ {
584
+ "id": "split.media-text",
585
+ "component": "split",
586
+ "when": {
587
+ "root": "core/media-text"
588
+ },
589
+ "slots": {
590
+ "title": {
591
+ "match": "core/heading",
592
+ "max": 1,
593
+ "min": 1
594
+ },
595
+ "body": {
596
+ "match": [
597
+ "core/paragraph",
598
+ "core/list",
599
+ "core/quote"
600
+ ]
601
+ },
602
+ "button": {
603
+ "match": "core/button",
604
+ "max": 2
605
+ }
606
+ },
607
+ "props": {
608
+ "heading": "@title dom:",
609
+ "body": "@body html:",
610
+ "image": "img:.wp-block-media-text__media img"
611
+ },
612
+ "into": "actions",
613
+ "each": "@button",
614
+ "item": {
615
+ "label": "dom:a",
616
+ "href": "dom:a@href",
617
+ "style": "class:is-style-outline=ghost|primary"
618
+ }
619
+ },
620
+ {
621
+ "id": "split.columns",
622
+ "component": "split",
623
+ "when": {
624
+ "columns": 2
625
+ },
626
+ "slots": {
627
+ "media": {
628
+ "match": "core/image",
629
+ "min": 1,
630
+ "max": 1
631
+ },
632
+ "title": {
633
+ "match": "core/heading",
634
+ "max": 1,
635
+ "min": 1
636
+ },
637
+ "body": {
638
+ "match": [
639
+ "core/paragraph",
640
+ "core/list",
641
+ "core/quote"
642
+ ]
643
+ },
644
+ "button": {
645
+ "match": "core/button",
646
+ "max": 2
647
+ }
648
+ },
649
+ "props": {
650
+ "heading": "@title dom:",
651
+ "body": "@body html:",
652
+ "image": "@media img:img"
653
+ },
654
+ "into": "actions",
655
+ "each": "@button",
656
+ "item": {
657
+ "label": "dom:a",
658
+ "href": "dom:a@href",
659
+ "style": "class:is-style-outline=ghost|primary"
660
+ }
661
+ },
662
+ {
663
+ "id": "card-grid.columns",
664
+ "component": "card-grid",
665
+ "when": {
666
+ "columns": [
667
+ 2,
668
+ 3,
669
+ 4
670
+ ],
671
+ "repeat": "columns",
672
+ "root": "core/columns"
673
+ },
674
+ "slots": {
675
+ "media": {
676
+ "match": "core/image",
677
+ "max": 1
678
+ },
679
+ "title": {
680
+ "match": "core/heading",
681
+ "max": 1,
682
+ "min": 1
683
+ },
684
+ "text": {
685
+ "match": "core/paragraph",
686
+ "max": 1
687
+ },
688
+ "button": {
689
+ "match": "core/button",
690
+ "max": 1
691
+ }
692
+ },
693
+ "into": "items",
694
+ "each": "column",
695
+ "item": {
696
+ "title": "@title dom:",
697
+ "text": "@text dom:",
698
+ "image": "@media img:img@src",
699
+ "imageAlt": "@media img:img@alt",
700
+ "href": "@button dom:a@href"
701
+ }
702
+ },
703
+ {
704
+ "id": "gallery.heading",
705
+ "component": "gallery",
706
+ "slots": {
707
+ "title": {
708
+ "match": "core/heading",
709
+ "max": 1
710
+ },
711
+ "images": {
712
+ "match": "core/gallery",
713
+ "min": 1,
714
+ "max": 1
715
+ }
716
+ },
717
+ "props": {
718
+ "heading": "@title dom:",
719
+ "closeLabel": "ui:gallery.close"
720
+ },
721
+ "into": "items",
722
+ "each": "@images figure.wp-block-image",
723
+ "item": {
724
+ "image": "img:img@src",
725
+ "imageAlt": "img:img@alt",
726
+ "caption": "dom:figcaption"
727
+ }
728
+ },
729
+ {
730
+ "id": "faq.details",
731
+ "component": "faq",
732
+ "slots": {
733
+ "title": {
734
+ "match": "core/heading",
735
+ "max": 1
736
+ },
737
+ "faq": {
738
+ "match": "core/details",
739
+ "min": 2
740
+ }
741
+ },
742
+ "props": {
743
+ "heading": "@title dom:"
744
+ },
745
+ "into": "items",
746
+ "each": "@faq",
747
+ "item": {
748
+ "question": "dom:summary",
749
+ "answer": "html::scope > :not(summary)"
750
+ }
751
+ },
752
+ {
753
+ "id": "testimonial.quotes",
754
+ "component": "testimonial",
755
+ "slots": {
756
+ "title": {
757
+ "match": "core/heading",
758
+ "max": 1
759
+ },
760
+ "quote": {
761
+ "match": [
762
+ "core/quote",
763
+ "core/pullquote"
764
+ ],
765
+ "min": 1
766
+ }
767
+ },
768
+ "props": {
769
+ "heading": "@title dom:"
770
+ },
771
+ "into": "items",
772
+ "each": "@quote",
773
+ "item": {
774
+ "quote": "dom:p",
775
+ "name": "dom:cite"
776
+ }
777
+ },
778
+ {
779
+ "id": "contact-form.form",
780
+ "component": "contact-form",
781
+ "slots": {
782
+ "title": {
783
+ "match": "core/heading",
784
+ "max": 1
785
+ },
786
+ "formTitle": {
787
+ "match": "core/heading",
788
+ "max": 1
789
+ },
790
+ "intro": {
791
+ "match": "core/paragraph",
792
+ "max": 1
793
+ },
794
+ "form": {
795
+ "match": [
796
+ "contact-form-7/contact-form-selector",
797
+ "jetpack/contact-form",
798
+ "wpforms/form-selector",
799
+ "gravityforms/form",
800
+ "ninja-forms/form"
801
+ ],
802
+ "min": 1,
803
+ "max": 1
804
+ }
805
+ },
806
+ "props": {
807
+ "model": "const:contact",
808
+ "heading": "@title dom:",
809
+ "intro": "@intro dom:",
810
+ "formHeading": "@formTitle dom:"
811
+ }
812
+ },
813
+ {
814
+ "id": "cta.text-button",
815
+ "component": "cta",
816
+ "slots": {
817
+ "title": {
818
+ "match": "core/heading",
819
+ "max": 1,
820
+ "min": 1
821
+ },
822
+ "body": {
823
+ "match": "core/paragraph",
824
+ "max": 1
825
+ },
826
+ "button": {
827
+ "match": "core/button",
828
+ "min": 1,
829
+ "max": 2
830
+ }
831
+ },
832
+ "props": {
833
+ "heading": "@title dom:",
834
+ "body": "@body dom:"
835
+ },
836
+ "into": "actions",
837
+ "each": "@button",
838
+ "item": {
839
+ "label": "dom:a",
840
+ "href": "dom:a@href",
841
+ "style": "class:is-style-outline=ghost|primary"
842
+ }
843
+ },
844
+ {
845
+ "id": "feature-list.list",
846
+ "component": "feature-list",
847
+ "variant": {
848
+ "style": "check"
849
+ },
850
+ "slots": {
851
+ "title": {
852
+ "match": "core/heading",
853
+ "max": 1,
854
+ "min": 1
855
+ },
856
+ "intro": {
857
+ "match": "core/paragraph",
858
+ "max": 1
859
+ },
860
+ "list": {
861
+ "match": "core/list",
862
+ "min": 1,
863
+ "max": 1
864
+ }
865
+ },
866
+ "props": {
867
+ "heading": "@title dom:",
868
+ "intro": "@intro dom:"
869
+ },
870
+ "into": "items",
871
+ "each": "@list li",
872
+ "item": {
873
+ "title": "dom:"
874
+ }
875
+ }
460
876
  ]
461
877
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentrain/astro-kit",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "license": "MIT",
5
5
  "description": "Copy-in Astro components for Contentrain sites (shadcn model): typed props, tailwind-variants, zero JavaScript by default — with a machine-readable catalog",
6
6
  "type": "module",
@@ -42,7 +42,7 @@
42
42
  "mapping"
43
43
  ],
44
44
  "dependencies": {
45
- "@contentrain/types": "1.29.0"
45
+ "@contentrain/types": "1.30.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/node": "^22.10.0",