dune-react 0.0.31 → 0.0.33
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.
- package/dist/components/puck-base/article-card.d.ts +2 -2
- package/dist/components/puck-base/article-card.js +2 -2
- package/dist/components/puck-base/card.d.ts +2 -2
- package/dist/components/puck-base/card.js +2 -2
- package/dist/components/puck-base/index.d.ts +2 -1
- package/dist/components/puck-base/media.d.ts +12 -0
- package/dist/components/puck-base/media.js +576 -0
- package/dist/components/puck-base/social-links.d.ts +7 -0
- package/dist/components/puck-base/social-links.js +23 -0
- package/dist/components/puck-block/banner-sections/css-marquee-banner/css-marquee-banner.js +6 -6
- package/dist/components/puck-block/banner-sections/css-marquee-banner/index.d.ts +1 -1
- package/dist/components/puck-block/banner-sections/css-marquee-banner/index.js +2 -2
- package/dist/components/puck-block/banner-sections/dismissible-banner/index.d.ts +42 -0
- package/dist/components/puck-block/banner-sections/dual-row-marquee/dual-row-marquee.js +10 -10
- package/dist/components/puck-block/banner-sections/dual-row-marquee/index.d.ts +2 -2
- package/dist/components/puck-block/banner-sections/dual-row-marquee/index.js +3 -3
- package/dist/components/puck-block/banner-sections/props.d.ts +9 -12
- package/dist/components/puck-block/contact-sections/centered-form/centered-form.js +1 -5
- package/dist/components/puck-block/contact-sections/contact-cards-grid/contact-cards-grid.js +1 -5
- package/dist/components/puck-block/contact-sections/contact-modal/contact-modal.js +1 -5
- package/dist/components/puck-block/contact-sections/form-with-media/form-with-media.js +4 -8
- package/dist/components/puck-block/contact-sections/form-with-media/index.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/form-with-media/index.js +2 -2
- package/dist/components/puck-block/contact-sections/header-form-cards/header-form-cards.js +1 -5
- package/dist/components/puck-block/contact-sections/header-info-fullwidth/header-info-fullwidth.js +4 -8
- package/dist/components/puck-block/contact-sections/header-info-fullwidth/index.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/header-info-fullwidth/index.js +2 -2
- package/dist/components/puck-block/contact-sections/info-cards-media/index.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/info-cards-media/index.js +2 -2
- package/dist/components/puck-block/contact-sections/info-cards-media/info-cards-media.js +4 -8
- package/dist/components/puck-block/contact-sections/location-cards-grid/index.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/location-cards-grid/index.js +2 -2
- package/dist/components/puck-block/contact-sections/location-cards-grid/location-cards-grid.js +10 -14
- package/dist/components/puck-block/contact-sections/props.d.ts +5 -16
- package/dist/components/puck-block/contact-sections/split-info-form/index.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/split-info-form/split-info-form.d.ts +7 -2
- package/dist/components/puck-block/contact-sections/split-info-form/split-info-form.js +1 -2
- package/dist/components/puck-block/contact-sections/tab-locations/index.d.ts +57 -8
- package/dist/components/puck-block/contact-sections/tab-locations/index.js +7 -7
- package/dist/components/puck-block/contact-sections/tab-locations/tab-locations.js +40 -47
- package/dist/components/puck-block/cta-sections/feature-card-cta/feature-card-cta.d.ts +2 -2
- package/dist/components/puck-block/cta-sections/feature-card-cta/feature-card-cta.js +2 -2
- package/dist/components/puck-block/cta-sections/feature-card-cta/index.js +2 -2
- package/dist/components/puck-block/cta-sections/mouse-track-cta/index.d.ts +1 -1
- package/dist/components/puck-block/cta-sections/mouse-track-cta/index.js +2 -2
- package/dist/components/puck-block/cta-sections/mouse-track-cta/mouse-track-cta.d.ts +2 -2
- package/dist/components/puck-block/cta-sections/mouse-track-cta/mouse-track-cta.js +6 -6
- package/dist/components/puck-block/cta-sections/props.d.ts +3 -3
- package/dist/components/puck-block/cta-sections/side-media-cta/index.d.ts +1 -1
- package/dist/components/puck-block/cta-sections/side-media-cta/index.js +2 -2
- package/dist/components/puck-block/cta-sections/side-media-cta/side-media-cta.js +4 -4
- package/dist/components/puck-block/cta-sections/text-block-cta/index.d.ts +2 -2
- package/dist/components/puck-block/cta-sections/text-block-cta/index.js +3 -3
- package/dist/components/puck-block/cta-sections/text-block-cta/text-block-cta.d.ts +3 -3
- package/dist/components/puck-block/cta-sections/text-block-cta/text-block-cta.js +10 -10
- package/dist/components/puck-block/faq-sections/icon-card-faq/icon-card-faq.d.ts +2 -2
- package/dist/components/puck-block/faq-sections/icon-card-faq/icon-card-faq.js +2 -2
- package/dist/components/puck-block/faq-sections/icon-card-faq/index.js +2 -2
- package/dist/components/puck-block/faq-sections/props.d.ts +3 -3
- package/dist/components/puck-block/feature-sections/feature-cards-grid/component.d.ts +2 -2
- package/dist/components/puck-block/feature-sections/feature-cards-grid/component.js +6 -6
- package/dist/components/puck-block/feature-sections/feature-cards-grid/index.d.ts +1 -1
- package/dist/components/puck-block/feature-sections/feature-cards-grid/index.js +3 -3
- package/dist/components/puck-block/feature-sections/feature-list-split/component.d.ts +2 -2
- package/dist/components/puck-block/feature-sections/feature-list-split/component.js +6 -6
- package/dist/components/puck-block/feature-sections/feature-list-split/index.d.ts +1 -1
- package/dist/components/puck-block/feature-sections/feature-list-split/index.js +3 -3
- package/dist/components/puck-block/feature-sections/props.d.ts +3 -3
- package/dist/components/puck-block/feature-sections/tab-feature/component.d.ts +2 -2
- package/dist/components/puck-block/feature-sections/tab-feature/component.js +12 -12
- package/dist/components/puck-block/feature-sections/tab-feature/index.d.ts +1 -1
- package/dist/components/puck-block/feature-sections/tab-feature/index.js +2 -2
- package/dist/components/puck-block/feature-sections/text-media-split/component.js +5 -5
- package/dist/components/puck-block/feature-sections/text-media-split/index.d.ts +1 -1
- package/dist/components/puck-block/feature-sections/text-media-split/index.js +2 -2
- package/dist/components/puck-block/feature-sections/text-only-section/component.d.ts +2 -2
- package/dist/components/puck-block/feature-sections/text-only-section/component.js +2 -2
- package/dist/components/puck-block/feature-sections/text-only-section/index.d.ts +1 -1
- package/dist/components/puck-block/feature-sections/text-only-section/index.js +2 -2
- package/dist/components/puck-block/footer-sections/centered-minimal-footer/centered-minimal-footer.js +9 -9
- package/dist/components/puck-block/footer-sections/centered-minimal-footer/index.d.ts +11 -0
- package/dist/components/puck-block/footer-sections/centered-minimal-footer/index.js +3 -2
- package/dist/components/puck-block/footer-sections/compact-newsletter-footer/index.d.ts +11 -0
- package/dist/components/puck-block/footer-sections/contact-links-footer/contact-links-footer.d.ts +7 -2
- package/dist/components/puck-block/footer-sections/contact-links-footer/contact-links-footer.js +9 -9
- package/dist/components/puck-block/footer-sections/contact-links-footer/index.d.ts +61 -10
- package/dist/components/puck-block/footer-sections/contact-links-footer/index.js +3 -2
- package/dist/components/puck-block/footer-sections/cta-links-footer/cta-links-footer.js +9 -9
- package/dist/components/puck-block/footer-sections/cta-links-footer/index.d.ts +61 -10
- package/dist/components/puck-block/footer-sections/cta-links-footer/index.js +3 -3
- package/dist/components/puck-block/footer-sections/links-newsletter-footer/index.d.ts +61 -10
- package/dist/components/puck-block/footer-sections/newsletter-links-footer/index.d.ts +11 -0
- package/dist/components/puck-block/footer-sections/newsletter-top-links-footer/index.d.ts +61 -10
- package/dist/components/puck-block/footer-sections/props.d.ts +17 -10
- package/dist/components/puck-block/footer-sections/props.js +8 -0
- package/dist/components/puck-block/gallery-sections/asymmetric-grid/asymmetric-grid.js +7 -7
- package/dist/components/puck-block/gallery-sections/asymmetric-grid/index.d.ts +1 -1
- package/dist/components/puck-block/gallery-sections/asymmetric-grid/index.js +2 -2
- package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/fullscreen-portfolio.js +12 -12
- package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/index.d.ts +1 -1
- package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/index.js +2 -2
- package/dist/components/puck-block/gallery-sections/image-carousel/image-carousel.js +12 -12
- package/dist/components/puck-block/gallery-sections/image-carousel/index.d.ts +1 -1
- package/dist/components/puck-block/gallery-sections/image-carousel/index.js +2 -2
- package/dist/components/puck-block/gallery-sections/interactive-portfolio/index.d.ts +1 -1
- package/dist/components/puck-block/gallery-sections/interactive-portfolio/index.js +2 -2
- package/dist/components/puck-block/gallery-sections/interactive-portfolio/interactive-portfolio.js +14 -14
- package/dist/components/puck-block/gallery-sections/masonry-grid/index.d.ts +1 -1
- package/dist/components/puck-block/gallery-sections/masonry-grid/index.js +2 -2
- package/dist/components/puck-block/gallery-sections/masonry-grid/masonry-grid.js +7 -7
- package/dist/components/puck-block/gallery-sections/portfolio-cards/index.d.ts +1 -1
- package/dist/components/puck-block/gallery-sections/portfolio-cards/index.js +2 -2
- package/dist/components/puck-block/gallery-sections/portfolio-cards/portfolio-cards.js +6 -6
- package/dist/components/puck-block/gallery-sections/portfolio-divider/index.d.ts +1 -1
- package/dist/components/puck-block/gallery-sections/portfolio-divider/index.js +2 -2
- package/dist/components/puck-block/gallery-sections/portfolio-divider/portfolio-divider.js +9 -9
- package/dist/components/puck-block/gallery-sections/props.d.ts +8 -8
- package/dist/components/puck-block/gallery-sections/scroll-parallax/index.d.ts +1 -1
- package/dist/components/puck-block/gallery-sections/scroll-parallax/index.js +2 -2
- package/dist/components/puck-block/gallery-sections/scroll-parallax/scroll-parallax.js +11 -11
- package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/index.d.ts +1 -1
- package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/index.js +5 -5
- package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/scroll-parallax-portfolio.js +26 -26
- package/dist/components/puck-block/gallery-sections/split-carousel/index.d.ts +1 -1
- package/dist/components/puck-block/gallery-sections/split-carousel/index.js +2 -2
- package/dist/components/puck-block/gallery-sections/split-carousel/split-carousel.js +6 -6
- package/dist/components/puck-block/gallery-sections/static-grid/index.d.ts +1 -1
- package/dist/components/puck-block/gallery-sections/static-grid/index.js +2 -2
- package/dist/components/puck-block/gallery-sections/static-grid/static-grid.js +7 -7
- package/dist/components/puck-block/header-sections/centered-navbar/centered-navbar.js +31 -24
- package/dist/components/puck-block/header-sections/centered-navbar/index.d.ts +92 -0
- package/dist/components/puck-block/header-sections/centered-navbar/index.js +9 -4
- package/dist/components/puck-block/header-sections/drawer-navbar/drawer-navbar.js +32 -25
- package/dist/components/puck-block/header-sections/drawer-navbar/index.d.ts +92 -0
- package/dist/components/puck-block/header-sections/drawer-navbar/index.js +5 -3
- package/dist/components/puck-block/header-sections/floating-bordered-navbar/floating-bordered-navbar.js +27 -22
- package/dist/components/puck-block/header-sections/floating-bordered-navbar/index.d.ts +91 -3
- package/dist/components/puck-block/header-sections/floating-bordered-navbar/index.js +3 -3
- package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/fullscreen-overlay-navbar.js +23 -18
- package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/index.d.ts +91 -3
- package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/index.js +3 -3
- package/dist/components/puck-block/header-sections/mega-menu-navbar/index.d.ts +64 -0
- package/dist/components/puck-block/header-sections/mega-menu-navbar/index.js +3 -3
- package/dist/components/puck-block/header-sections/mega-menu-navbar/mega-menu-navbar.js +13 -6
- package/dist/components/puck-block/header-sections/props.d.ts +17 -5
- package/dist/components/puck-block/header-sections/props.js +8 -0
- package/dist/components/puck-block/header-sections/standard-navbar/index.d.ts +64 -0
- package/dist/components/puck-block/header-sections/standard-navbar/index.js +6 -4
- package/dist/components/puck-block/header-sections/standard-navbar/standard-navbar.js +9 -5
- package/dist/components/puck-block/hero-sections/carousel-hero/component.js +8 -8
- package/dist/components/puck-block/hero-sections/carousel-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/carousel-hero/index.js +2 -2
- package/dist/components/puck-block/hero-sections/column-scroll-hero/component.d.ts +3 -3
- package/dist/components/puck-block/hero-sections/column-scroll-hero/component.js +14 -14
- package/dist/components/puck-block/hero-sections/column-scroll-hero/index.d.ts +2 -2
- package/dist/components/puck-block/hero-sections/column-scroll-hero/index.js +3 -3
- package/dist/components/puck-block/hero-sections/dual-marquee-hero/component.js +11 -11
- package/dist/components/puck-block/hero-sections/dual-marquee-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/dual-marquee-hero/index.js +2 -2
- package/dist/components/puck-block/hero-sections/fullscreen-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/fullscreen-video-hero/component.js +5 -5
- package/dist/components/puck-block/hero-sections/fullscreen-video-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/fullscreen-video-hero/index.js +2 -2
- package/dist/components/puck-block/hero-sections/grid-expand-hero/component.js +16 -16
- package/dist/components/puck-block/hero-sections/grid-expand-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/grid-expand-hero/index.js +2 -2
- package/dist/components/puck-block/hero-sections/horizontal-marquee-hero/component.js +11 -11
- package/dist/components/puck-block/hero-sections/horizontal-marquee-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/horizontal-marquee-hero/index.js +2 -2
- package/dist/components/puck-block/hero-sections/media-text-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/mouse-track-hero/component.d.ts +3 -3
- package/dist/components/puck-block/hero-sections/mouse-track-hero/component.js +6 -6
- package/dist/components/puck-block/hero-sections/mouse-track-hero/index.js +3 -3
- package/dist/components/puck-block/hero-sections/multi-image-grid-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/multi-image-grid-hero/index.js +2 -2
- package/dist/components/puck-block/hero-sections/multi-image-grid-hero/multi-image-grid-hero.js +7 -7
- package/dist/components/puck-block/hero-sections/overlapping-image-hero/index.js +4 -4
- package/dist/components/puck-block/hero-sections/overlapping-image-hero/overlapping-image-hero.d.ts +4 -4
- package/dist/components/puck-block/hero-sections/overlapping-image-hero/overlapping-image-hero.js +16 -16
- package/dist/components/puck-block/hero-sections/parallax-images-hero/component.js +12 -12
- package/dist/components/puck-block/hero-sections/parallax-images-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/parallax-images-hero/index.js +2 -2
- package/dist/components/puck-block/hero-sections/props.d.ts +3 -3
- package/dist/components/puck-block/hero-sections/scatter-parallax-hero/component.js +5 -5
- package/dist/components/puck-block/hero-sections/scatter-parallax-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/scatter-parallax-hero/index.js +2 -2
- package/dist/components/puck-block/hero-sections/scroll-expand-video-hero/component.js +5 -5
- package/dist/components/puck-block/hero-sections/scroll-expand-video-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/scroll-expand-video-hero/index.js +2 -2
- package/dist/components/puck-block/hero-sections/scroll-zoom-hero/component.js +9 -9
- package/dist/components/puck-block/hero-sections/scroll-zoom-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/scroll-zoom-hero/index.js +2 -2
- package/dist/components/puck-block/hero-sections/split-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/stacked-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/sticky-expand-hero/component.js +12 -12
- package/dist/components/puck-block/hero-sections/sticky-expand-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/sticky-expand-hero/index.js +2 -2
- package/dist/components/puck-block/hero-sections/sticky-video-hero/component.d.ts +2 -2
- package/dist/components/puck-block/hero-sections/sticky-video-hero/component.js +13 -13
- package/dist/components/puck-block/hero-sections/sticky-video-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/sticky-video-hero/index.js +3 -3
- package/dist/components/puck-block/hero-sections/tab-hero/component.d.ts +2 -2
- package/dist/components/puck-block/hero-sections/tab-hero/component.js +7 -6
- package/dist/components/puck-block/hero-sections/tab-hero/index.d.ts +4 -7
- package/dist/components/puck-block/hero-sections/tab-hero/index.js +2 -7
- package/dist/components/puck-block/hero-sections/three-image-parallax-hero/component.d.ts +4 -4
- package/dist/components/puck-block/hero-sections/three-image-parallax-hero/component.js +4 -4
- package/dist/components/puck-block/hero-sections/three-image-parallax-hero/index.js +4 -4
- package/dist/components/puck-block/hero-sections/vertical-gallery-hero/component.js +11 -11
- package/dist/components/puck-block/hero-sections/vertical-gallery-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/vertical-gallery-hero/index.js +2 -2
- package/dist/components/puck-block/hero-sections/zoom-grid-hero/component.js +7 -7
- package/dist/components/puck-block/hero-sections/zoom-grid-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/zoom-grid-hero/index.js +2 -2
- package/dist/components/puck-block/metrics-sections/center-media-stats/center-media-stats.js +5 -5
- package/dist/components/puck-block/metrics-sections/center-media-stats/index.d.ts +1 -1
- package/dist/components/puck-block/metrics-sections/center-media-stats/index.js +2 -2
- package/dist/components/puck-block/metrics-sections/header-stats-row/header-stats-row.js +4 -4
- package/dist/components/puck-block/metrics-sections/header-stats-row/index.d.ts +1 -1
- package/dist/components/puck-block/metrics-sections/header-stats-row/index.js +2 -2
- package/dist/components/puck-block/metrics-sections/mixed-grid-stats/index.d.ts +2 -2
- package/dist/components/puck-block/metrics-sections/mixed-grid-stats/index.js +3 -3
- package/dist/components/puck-block/metrics-sections/mixed-grid-stats/mixed-grid-stats.d.ts +2 -2
- package/dist/components/puck-block/metrics-sections/mixed-grid-stats/mixed-grid-stats.js +7 -7
- package/dist/components/puck-block/metrics-sections/props.d.ts +6 -6
- package/dist/components/puck-block/metrics-sections/split-stats/index.d.ts +1 -1
- package/dist/components/puck-block/metrics-sections/split-stats/index.js +2 -2
- package/dist/components/puck-block/metrics-sections/split-stats/split-stats.js +4 -4
- package/dist/components/puck-block/metrics-sections/tab-stats/index.d.ts +2 -2
- package/dist/components/puck-block/metrics-sections/tab-stats/index.js +3 -3
- package/dist/components/puck-block/metrics-sections/tab-stats/tab-stats.d.ts +3 -3
- package/dist/components/puck-block/metrics-sections/tab-stats/tab-stats.js +11 -11
- package/dist/components/puck-block/pricing-sections/pricing-comparison-table/component.js +13 -0
- package/dist/components/puck-block/pricing-sections/props.d.ts +2 -2
- package/dist/components/puck-block/pricing-sections/single-pricing-card/component.d.ts +2 -2
- package/dist/components/puck-block/pricing-sections/single-pricing-card/component.js +3 -3
- package/dist/components/puck-block/pricing-sections/split-pricing/component.d.ts +2 -2
- package/dist/components/puck-block/pricing-sections/split-pricing/component.js +4 -3
- package/dist/components/puck-block/pricing-sections/tab-pricing-grid/component.d.ts +2 -2
- package/dist/components/puck-block/pricing-sections/tab-single-pricing/component.d.ts +2 -2
- package/dist/components/puck-block/registry.generated.d.ts +796 -124
- package/dist/components/puck-block/showcase-sections/compact-timeline/component.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/compact-timeline/component.js +3 -3
- package/dist/components/puck-block/showcase-sections/compact-timeline/index.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/compact-timeline/index.js +2 -2
- package/dist/components/puck-block/showcase-sections/horizontal-timeline/component.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/horizontal-timeline/component.js +3 -3
- package/dist/components/puck-block/showcase-sections/horizontal-timeline/index.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/horizontal-timeline/index.js +2 -2
- package/dist/components/puck-block/showcase-sections/props.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/single-column-timeline/component.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/single-column-timeline/component.js +3 -3
- package/dist/components/puck-block/showcase-sections/single-column-timeline/index.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/single-column-timeline/index.js +2 -2
- package/dist/components/puck-block/showcase-sections/sticky-scroll-timeline/component.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/sticky-scroll-timeline/component.js +3 -3
- package/dist/components/puck-block/showcase-sections/sticky-scroll-timeline/index.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/sticky-scroll-timeline/index.js +2 -2
- package/dist/components/puck-block/showcase-sections/tab-timeline/component.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/tab-timeline/component.js +8 -8
- package/dist/components/puck-block/showcase-sections/tab-timeline/index.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/tab-timeline/index.js +2 -2
- package/dist/components/puck-block/showcase-sections/zigzag-timeline/component.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/zigzag-timeline/component.js +3 -3
- package/dist/components/puck-block/showcase-sections/zigzag-timeline/index.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/zigzag-timeline/index.js +2 -2
- package/dist/components/puck-block/team-sections/props.d.ts +2 -3
- package/dist/components/puck-block/team-sections/team-carousel/component.d.ts +2 -2
- package/dist/components/puck-block/team-sections/team-carousel/component.js +3 -3
- package/dist/components/puck-block/team-sections/team-grid/component.d.ts +2 -2
- package/dist/components/puck-block/team-sections/team-grid/component.js +3 -3
- package/dist/components/puck-block/team-sections/team-inline-card/component.d.ts +2 -2
- package/dist/components/puck-block/team-sections/team-inline-card/component.js +3 -3
- package/dist/components/puck-block/team-sections/team-sticky-scatter/component.d.ts +2 -2
- package/dist/components/puck-block/team-sections/team-sticky-scatter/component.js +3 -3
- package/dist/components/puck-block/team-sections/team-two-column/component.d.ts +2 -2
- package/dist/components/puck-block/team-sections/team-two-column/component.js +3 -3
- package/dist/components/puck-block/testimonial-sections/bento-testimonial/component.d.ts +4 -4
- package/dist/components/puck-block/testimonial-sections/bento-testimonial/component.js +8 -8
- package/dist/components/puck-block/testimonial-sections/centered-testimonial/component.d.ts +3 -3
- package/dist/components/puck-block/testimonial-sections/centered-testimonial/component.js +4 -4
- package/dist/components/puck-block/testimonial-sections/centered-testimonial/index.js +3 -3
- package/dist/components/puck-block/testimonial-sections/halfscreen-testimonial-carousel/component.d.ts +3 -3
- package/dist/components/puck-block/testimonial-sections/halfscreen-testimonial-carousel/component.js +3 -3
- package/dist/components/puck-block/testimonial-sections/image-testimonial/component.d.ts +3 -3
- package/dist/components/puck-block/testimonial-sections/image-testimonial/component.js +10 -10
- package/dist/components/puck-block/testimonial-sections/image-testimonial/index.d.ts +1 -1
- package/dist/components/puck-block/testimonial-sections/image-testimonial/index.js +3 -3
- package/dist/components/puck-block/testimonial-sections/image-testimonial-carousel/component.d.ts +3 -3
- package/dist/components/puck-block/testimonial-sections/image-testimonial-carousel/component.js +7 -7
- package/dist/components/puck-block/testimonial-sections/image-testimonial-carousel/index.d.ts +1 -1
- package/dist/components/puck-block/testimonial-sections/image-testimonial-carousel/index.js +3 -3
- package/dist/components/puck-block/testimonial-sections/marquee-testimonial/component.d.ts +2 -2
- package/dist/components/puck-block/testimonial-sections/marquee-testimonial/component.js +2 -2
- package/dist/components/puck-block/testimonial-sections/masonry-testimonial/component.d.ts +2 -2
- package/dist/components/puck-block/testimonial-sections/masonry-testimonial/component.js +2 -2
- package/dist/components/puck-block/testimonial-sections/props.d.ts +3 -4
- package/dist/components/puck-block/testimonial-sections/sticky-testimonial/component.d.ts +3 -2
- package/dist/components/puck-block/testimonial-sections/sticky-testimonial/component.js +6 -3
- package/dist/components/puck-block/testimonial-sections/tab-testimonial/component.d.ts +4 -4
- package/dist/components/puck-block/testimonial-sections/tab-testimonial/component.js +5 -5
- package/dist/components/puck-block/testimonial-sections/testimonial-card-grid/component.d.ts +4 -4
- package/dist/components/puck-block/testimonial-sections/testimonial-card-grid/component.js +6 -6
- package/dist/components/puck-block/testimonial-sections/testimonial-carousel/component.d.ts +3 -3
- package/dist/components/puck-block/testimonial-sections/testimonial-carousel/component.js +3 -3
- package/dist/components/puck-block/text-sections/blog-article/component.d.ts +4 -7
- package/dist/components/puck-block/text-sections/blog-article/component.js +9 -17
- package/dist/components/puck-block/text-sections/blog-article/index.d.ts +39 -14
- package/dist/components/puck-block/text-sections/blog-article/index.js +4 -10
- package/dist/components/puck-block/text-sections/props.d.ts +3 -3
- package/dist/components/puck-block/text-sections/prose-content/component.d.ts +2 -2
- package/dist/components/puck-block/text-sections/prose-content/component.js +3 -3
- package/dist/components/puck-block/text-sections/prose-content/index.d.ts +1 -1
- package/dist/components/puck-block/text-sections/prose-content/index.js +2 -2
- package/dist/components/puck-block/text-sections/prose-sidebar/component.d.ts +2 -2
- package/dist/components/puck-block/text-sections/prose-sidebar/index.d.ts +1 -1
- package/dist/components/puck-block/text-sections/side-media-content/component.js +5 -5
- package/dist/components/puck-block/text-sections/side-media-content/index.d.ts +1 -1
- package/dist/components/puck-block/text-sections/side-media-content/index.js +2 -2
- package/dist/components/puck-block/text-sections/sticky-text-multi-image/component.d.ts +2 -2
- package/dist/components/puck-block/text-sections/sticky-text-multi-image/component.js +4 -4
- package/dist/components/puck-block/text-sections/sticky-text-multi-image/index.d.ts +2 -2
- package/dist/components/puck-block/text-sections/sticky-text-multi-image/index.js +2 -2
- package/dist/components/puck-block/text-sections/text-header/component.d.ts +2 -2
- package/dist/components/puck-block/text-sections/text-header/index.d.ts +1 -1
- package/dist/components/puck-core/core/context/editor-context.d.ts +2 -0
- package/dist/components/puck-core/core/fields.d.ts +2 -2
- package/dist/components/puck-core/core/props/content.d.ts +3 -3
- package/dist/components/puck-core/core/props/index.d.ts +2 -2
- package/dist/components/puck-core/core/props/index.js +7 -0
- package/dist/components/puck-core/core/props/interactive.d.ts +44 -1
- package/dist/components/puck-core/core/props/interactive.js +24 -1
- package/dist/components/puck-core/core/props/media.d.ts +8 -8
- package/dist/components/puck-core/core/props/media.js +21 -21
- package/dist/components/puck-core/core/puck-fields-to-zod.d.ts +40 -0
- package/dist/components/puck-core/core/puck-fields-to-zod.js +113 -0
- package/dist/components/puck-core/core/social-icons.d.ts +5 -0
- package/dist/components/puck-core/core/social-icons.js +48 -0
- package/dist/components/puck-core/core/with-editable.js +9 -2
- package/dist/components/puck-core/fields/media-upload-field.d.ts +7 -0
- package/dist/components/puck-core/fields/{image-upload-field.js → media-upload-field.js} +71 -28
- package/dist/components/puck-core/index.d.ts +3 -2
- package/dist/components/shadcn/tabs.d.ts +2 -1
- package/dist/components/shadcn/tabs.js +21 -3
- package/dist/components/shadcn/video-iframe.d.ts +2 -1
- package/dist/components/shadcn/video-iframe.js +7 -6
- package/dist/index.js +18 -12
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.js +44 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.js +43 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.js +29 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js +665 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js +569 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js +410 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js +74 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/doc.js +37 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js +72 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js +314 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js +95 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js +81 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.js +51 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js +1345 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js +362 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js +430 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js +8 -0
- package/package.json +3 -2
- package/dist/components/puck-base/image.d.ts +0 -6
- package/dist/components/puck-base/image.js +0 -360
- package/dist/components/puck-core/fields/image-upload-field.d.ts +0 -7
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import { $constructor } from "./core.js";
|
|
2
|
+
import { lowercase, uppercase, integer } from "./regexes.js";
|
|
3
|
+
import { floatSafeRemainder, nullish, getLengthableOrigin, escapeRegex, NUMBER_FORMAT_RANGES } from "./util.js";
|
|
4
|
+
const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
5
|
+
var _a;
|
|
6
|
+
inst._zod ?? (inst._zod = {});
|
|
7
|
+
inst._zod.def = def;
|
|
8
|
+
(_a = inst._zod).onattach ?? (_a.onattach = []);
|
|
9
|
+
});
|
|
10
|
+
const numericOriginMap = {
|
|
11
|
+
number: "number",
|
|
12
|
+
bigint: "bigint",
|
|
13
|
+
object: "date"
|
|
14
|
+
};
|
|
15
|
+
const $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => {
|
|
16
|
+
$ZodCheck.init(inst, def);
|
|
17
|
+
const origin = numericOriginMap[typeof def.value];
|
|
18
|
+
inst._zod.onattach.push((inst2) => {
|
|
19
|
+
const bag = inst2._zod.bag;
|
|
20
|
+
const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
21
|
+
if (def.value < curr) {
|
|
22
|
+
if (def.inclusive)
|
|
23
|
+
bag.maximum = def.value;
|
|
24
|
+
else
|
|
25
|
+
bag.exclusiveMaximum = def.value;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
inst._zod.check = (payload) => {
|
|
29
|
+
if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
payload.issues.push({
|
|
33
|
+
origin,
|
|
34
|
+
code: "too_big",
|
|
35
|
+
maximum: typeof def.value === "object" ? def.value.getTime() : def.value,
|
|
36
|
+
input: payload.value,
|
|
37
|
+
inclusive: def.inclusive,
|
|
38
|
+
inst,
|
|
39
|
+
continue: !def.abort
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
const $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => {
|
|
44
|
+
$ZodCheck.init(inst, def);
|
|
45
|
+
const origin = numericOriginMap[typeof def.value];
|
|
46
|
+
inst._zod.onattach.push((inst2) => {
|
|
47
|
+
const bag = inst2._zod.bag;
|
|
48
|
+
const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
49
|
+
if (def.value > curr) {
|
|
50
|
+
if (def.inclusive)
|
|
51
|
+
bag.minimum = def.value;
|
|
52
|
+
else
|
|
53
|
+
bag.exclusiveMinimum = def.value;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
inst._zod.check = (payload) => {
|
|
57
|
+
if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
payload.issues.push({
|
|
61
|
+
origin,
|
|
62
|
+
code: "too_small",
|
|
63
|
+
minimum: typeof def.value === "object" ? def.value.getTime() : def.value,
|
|
64
|
+
input: payload.value,
|
|
65
|
+
inclusive: def.inclusive,
|
|
66
|
+
inst,
|
|
67
|
+
continue: !def.abort
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
const $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
72
|
+
$ZodCheck.init(inst, def);
|
|
73
|
+
inst._zod.onattach.push((inst2) => {
|
|
74
|
+
var _a;
|
|
75
|
+
(_a = inst2._zod.bag).multipleOf ?? (_a.multipleOf = def.value);
|
|
76
|
+
});
|
|
77
|
+
inst._zod.check = (payload) => {
|
|
78
|
+
if (typeof payload.value !== typeof def.value)
|
|
79
|
+
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
80
|
+
const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0;
|
|
81
|
+
if (isMultiple)
|
|
82
|
+
return;
|
|
83
|
+
payload.issues.push({
|
|
84
|
+
origin: typeof payload.value,
|
|
85
|
+
code: "not_multiple_of",
|
|
86
|
+
divisor: def.value,
|
|
87
|
+
input: payload.value,
|
|
88
|
+
inst,
|
|
89
|
+
continue: !def.abort
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => {
|
|
94
|
+
var _a;
|
|
95
|
+
$ZodCheck.init(inst, def);
|
|
96
|
+
def.format = def.format || "float64";
|
|
97
|
+
const isInt = (_a = def.format) == null ? void 0 : _a.includes("int");
|
|
98
|
+
const origin = isInt ? "int" : "number";
|
|
99
|
+
const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
|
|
100
|
+
inst._zod.onattach.push((inst2) => {
|
|
101
|
+
const bag = inst2._zod.bag;
|
|
102
|
+
bag.format = def.format;
|
|
103
|
+
bag.minimum = minimum;
|
|
104
|
+
bag.maximum = maximum;
|
|
105
|
+
if (isInt)
|
|
106
|
+
bag.pattern = integer;
|
|
107
|
+
});
|
|
108
|
+
inst._zod.check = (payload) => {
|
|
109
|
+
const input = payload.value;
|
|
110
|
+
if (isInt) {
|
|
111
|
+
if (!Number.isInteger(input)) {
|
|
112
|
+
payload.issues.push({
|
|
113
|
+
expected: origin,
|
|
114
|
+
format: def.format,
|
|
115
|
+
code: "invalid_type",
|
|
116
|
+
continue: false,
|
|
117
|
+
input,
|
|
118
|
+
inst
|
|
119
|
+
});
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (!Number.isSafeInteger(input)) {
|
|
123
|
+
if (input > 0) {
|
|
124
|
+
payload.issues.push({
|
|
125
|
+
input,
|
|
126
|
+
code: "too_big",
|
|
127
|
+
maximum: Number.MAX_SAFE_INTEGER,
|
|
128
|
+
note: "Integers must be within the safe integer range.",
|
|
129
|
+
inst,
|
|
130
|
+
origin,
|
|
131
|
+
inclusive: true,
|
|
132
|
+
continue: !def.abort
|
|
133
|
+
});
|
|
134
|
+
} else {
|
|
135
|
+
payload.issues.push({
|
|
136
|
+
input,
|
|
137
|
+
code: "too_small",
|
|
138
|
+
minimum: Number.MIN_SAFE_INTEGER,
|
|
139
|
+
note: "Integers must be within the safe integer range.",
|
|
140
|
+
inst,
|
|
141
|
+
origin,
|
|
142
|
+
inclusive: true,
|
|
143
|
+
continue: !def.abort
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (input < minimum) {
|
|
150
|
+
payload.issues.push({
|
|
151
|
+
origin: "number",
|
|
152
|
+
input,
|
|
153
|
+
code: "too_small",
|
|
154
|
+
minimum,
|
|
155
|
+
inclusive: true,
|
|
156
|
+
inst,
|
|
157
|
+
continue: !def.abort
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
if (input > maximum) {
|
|
161
|
+
payload.issues.push({
|
|
162
|
+
origin: "number",
|
|
163
|
+
input,
|
|
164
|
+
code: "too_big",
|
|
165
|
+
maximum,
|
|
166
|
+
inclusive: true,
|
|
167
|
+
inst,
|
|
168
|
+
continue: !def.abort
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
});
|
|
173
|
+
const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
174
|
+
var _a;
|
|
175
|
+
$ZodCheck.init(inst, def);
|
|
176
|
+
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
|
|
177
|
+
const val = payload.value;
|
|
178
|
+
return !nullish(val) && val.length !== void 0;
|
|
179
|
+
});
|
|
180
|
+
inst._zod.onattach.push((inst2) => {
|
|
181
|
+
const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
182
|
+
if (def.maximum < curr)
|
|
183
|
+
inst2._zod.bag.maximum = def.maximum;
|
|
184
|
+
});
|
|
185
|
+
inst._zod.check = (payload) => {
|
|
186
|
+
const input = payload.value;
|
|
187
|
+
const length = input.length;
|
|
188
|
+
if (length <= def.maximum)
|
|
189
|
+
return;
|
|
190
|
+
const origin = getLengthableOrigin(input);
|
|
191
|
+
payload.issues.push({
|
|
192
|
+
origin,
|
|
193
|
+
code: "too_big",
|
|
194
|
+
maximum: def.maximum,
|
|
195
|
+
inclusive: true,
|
|
196
|
+
input,
|
|
197
|
+
inst,
|
|
198
|
+
continue: !def.abort
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
});
|
|
202
|
+
const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
203
|
+
var _a;
|
|
204
|
+
$ZodCheck.init(inst, def);
|
|
205
|
+
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
|
|
206
|
+
const val = payload.value;
|
|
207
|
+
return !nullish(val) && val.length !== void 0;
|
|
208
|
+
});
|
|
209
|
+
inst._zod.onattach.push((inst2) => {
|
|
210
|
+
const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
211
|
+
if (def.minimum > curr)
|
|
212
|
+
inst2._zod.bag.minimum = def.minimum;
|
|
213
|
+
});
|
|
214
|
+
inst._zod.check = (payload) => {
|
|
215
|
+
const input = payload.value;
|
|
216
|
+
const length = input.length;
|
|
217
|
+
if (length >= def.minimum)
|
|
218
|
+
return;
|
|
219
|
+
const origin = getLengthableOrigin(input);
|
|
220
|
+
payload.issues.push({
|
|
221
|
+
origin,
|
|
222
|
+
code: "too_small",
|
|
223
|
+
minimum: def.minimum,
|
|
224
|
+
inclusive: true,
|
|
225
|
+
input,
|
|
226
|
+
inst,
|
|
227
|
+
continue: !def.abort
|
|
228
|
+
});
|
|
229
|
+
};
|
|
230
|
+
});
|
|
231
|
+
const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
232
|
+
var _a;
|
|
233
|
+
$ZodCheck.init(inst, def);
|
|
234
|
+
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
|
|
235
|
+
const val = payload.value;
|
|
236
|
+
return !nullish(val) && val.length !== void 0;
|
|
237
|
+
});
|
|
238
|
+
inst._zod.onattach.push((inst2) => {
|
|
239
|
+
const bag = inst2._zod.bag;
|
|
240
|
+
bag.minimum = def.length;
|
|
241
|
+
bag.maximum = def.length;
|
|
242
|
+
bag.length = def.length;
|
|
243
|
+
});
|
|
244
|
+
inst._zod.check = (payload) => {
|
|
245
|
+
const input = payload.value;
|
|
246
|
+
const length = input.length;
|
|
247
|
+
if (length === def.length)
|
|
248
|
+
return;
|
|
249
|
+
const origin = getLengthableOrigin(input);
|
|
250
|
+
const tooBig = length > def.length;
|
|
251
|
+
payload.issues.push({
|
|
252
|
+
origin,
|
|
253
|
+
...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length },
|
|
254
|
+
inclusive: true,
|
|
255
|
+
exact: true,
|
|
256
|
+
input: payload.value,
|
|
257
|
+
inst,
|
|
258
|
+
continue: !def.abort
|
|
259
|
+
});
|
|
260
|
+
};
|
|
261
|
+
});
|
|
262
|
+
const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
263
|
+
var _a, _b;
|
|
264
|
+
$ZodCheck.init(inst, def);
|
|
265
|
+
inst._zod.onattach.push((inst2) => {
|
|
266
|
+
const bag = inst2._zod.bag;
|
|
267
|
+
bag.format = def.format;
|
|
268
|
+
if (def.pattern) {
|
|
269
|
+
bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
|
|
270
|
+
bag.patterns.add(def.pattern);
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
if (def.pattern)
|
|
274
|
+
(_a = inst._zod).check ?? (_a.check = (payload) => {
|
|
275
|
+
def.pattern.lastIndex = 0;
|
|
276
|
+
if (def.pattern.test(payload.value))
|
|
277
|
+
return;
|
|
278
|
+
payload.issues.push({
|
|
279
|
+
origin: "string",
|
|
280
|
+
code: "invalid_format",
|
|
281
|
+
format: def.format,
|
|
282
|
+
input: payload.value,
|
|
283
|
+
...def.pattern ? { pattern: def.pattern.toString() } : {},
|
|
284
|
+
inst,
|
|
285
|
+
continue: !def.abort
|
|
286
|
+
});
|
|
287
|
+
});
|
|
288
|
+
else
|
|
289
|
+
(_b = inst._zod).check ?? (_b.check = () => {
|
|
290
|
+
});
|
|
291
|
+
});
|
|
292
|
+
const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
|
|
293
|
+
$ZodCheckStringFormat.init(inst, def);
|
|
294
|
+
inst._zod.check = (payload) => {
|
|
295
|
+
def.pattern.lastIndex = 0;
|
|
296
|
+
if (def.pattern.test(payload.value))
|
|
297
|
+
return;
|
|
298
|
+
payload.issues.push({
|
|
299
|
+
origin: "string",
|
|
300
|
+
code: "invalid_format",
|
|
301
|
+
format: "regex",
|
|
302
|
+
input: payload.value,
|
|
303
|
+
pattern: def.pattern.toString(),
|
|
304
|
+
inst,
|
|
305
|
+
continue: !def.abort
|
|
306
|
+
});
|
|
307
|
+
};
|
|
308
|
+
});
|
|
309
|
+
const $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => {
|
|
310
|
+
def.pattern ?? (def.pattern = lowercase);
|
|
311
|
+
$ZodCheckStringFormat.init(inst, def);
|
|
312
|
+
});
|
|
313
|
+
const $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => {
|
|
314
|
+
def.pattern ?? (def.pattern = uppercase);
|
|
315
|
+
$ZodCheckStringFormat.init(inst, def);
|
|
316
|
+
});
|
|
317
|
+
const $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => {
|
|
318
|
+
$ZodCheck.init(inst, def);
|
|
319
|
+
const escapedRegex = escapeRegex(def.includes);
|
|
320
|
+
const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);
|
|
321
|
+
def.pattern = pattern;
|
|
322
|
+
inst._zod.onattach.push((inst2) => {
|
|
323
|
+
const bag = inst2._zod.bag;
|
|
324
|
+
bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
|
|
325
|
+
bag.patterns.add(pattern);
|
|
326
|
+
});
|
|
327
|
+
inst._zod.check = (payload) => {
|
|
328
|
+
if (payload.value.includes(def.includes, def.position))
|
|
329
|
+
return;
|
|
330
|
+
payload.issues.push({
|
|
331
|
+
origin: "string",
|
|
332
|
+
code: "invalid_format",
|
|
333
|
+
format: "includes",
|
|
334
|
+
includes: def.includes,
|
|
335
|
+
input: payload.value,
|
|
336
|
+
inst,
|
|
337
|
+
continue: !def.abort
|
|
338
|
+
});
|
|
339
|
+
};
|
|
340
|
+
});
|
|
341
|
+
const $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => {
|
|
342
|
+
$ZodCheck.init(inst, def);
|
|
343
|
+
const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
|
|
344
|
+
def.pattern ?? (def.pattern = pattern);
|
|
345
|
+
inst._zod.onattach.push((inst2) => {
|
|
346
|
+
const bag = inst2._zod.bag;
|
|
347
|
+
bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
|
|
348
|
+
bag.patterns.add(pattern);
|
|
349
|
+
});
|
|
350
|
+
inst._zod.check = (payload) => {
|
|
351
|
+
if (payload.value.startsWith(def.prefix))
|
|
352
|
+
return;
|
|
353
|
+
payload.issues.push({
|
|
354
|
+
origin: "string",
|
|
355
|
+
code: "invalid_format",
|
|
356
|
+
format: "starts_with",
|
|
357
|
+
prefix: def.prefix,
|
|
358
|
+
input: payload.value,
|
|
359
|
+
inst,
|
|
360
|
+
continue: !def.abort
|
|
361
|
+
});
|
|
362
|
+
};
|
|
363
|
+
});
|
|
364
|
+
const $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => {
|
|
365
|
+
$ZodCheck.init(inst, def);
|
|
366
|
+
const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
|
|
367
|
+
def.pattern ?? (def.pattern = pattern);
|
|
368
|
+
inst._zod.onattach.push((inst2) => {
|
|
369
|
+
const bag = inst2._zod.bag;
|
|
370
|
+
bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
|
|
371
|
+
bag.patterns.add(pattern);
|
|
372
|
+
});
|
|
373
|
+
inst._zod.check = (payload) => {
|
|
374
|
+
if (payload.value.endsWith(def.suffix))
|
|
375
|
+
return;
|
|
376
|
+
payload.issues.push({
|
|
377
|
+
origin: "string",
|
|
378
|
+
code: "invalid_format",
|
|
379
|
+
format: "ends_with",
|
|
380
|
+
suffix: def.suffix,
|
|
381
|
+
input: payload.value,
|
|
382
|
+
inst,
|
|
383
|
+
continue: !def.abort
|
|
384
|
+
});
|
|
385
|
+
};
|
|
386
|
+
});
|
|
387
|
+
const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => {
|
|
388
|
+
$ZodCheck.init(inst, def);
|
|
389
|
+
inst._zod.check = (payload) => {
|
|
390
|
+
payload.value = def.tx(payload.value);
|
|
391
|
+
};
|
|
392
|
+
});
|
|
393
|
+
export {
|
|
394
|
+
$ZodCheck,
|
|
395
|
+
$ZodCheckEndsWith,
|
|
396
|
+
$ZodCheckGreaterThan,
|
|
397
|
+
$ZodCheckIncludes,
|
|
398
|
+
$ZodCheckLengthEquals,
|
|
399
|
+
$ZodCheckLessThan,
|
|
400
|
+
$ZodCheckLowerCase,
|
|
401
|
+
$ZodCheckMaxLength,
|
|
402
|
+
$ZodCheckMinLength,
|
|
403
|
+
$ZodCheckMultipleOf,
|
|
404
|
+
$ZodCheckNumberFormat,
|
|
405
|
+
$ZodCheckOverwrite,
|
|
406
|
+
$ZodCheckRegex,
|
|
407
|
+
$ZodCheckStartsWith,
|
|
408
|
+
$ZodCheckStringFormat,
|
|
409
|
+
$ZodCheckUpperCase
|
|
410
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
function $constructor(name, initializer, params) {
|
|
2
|
+
function init(inst, def) {
|
|
3
|
+
if (!inst._zod) {
|
|
4
|
+
Object.defineProperty(inst, "_zod", {
|
|
5
|
+
value: {
|
|
6
|
+
def,
|
|
7
|
+
constr: _,
|
|
8
|
+
traits: /* @__PURE__ */ new Set()
|
|
9
|
+
},
|
|
10
|
+
enumerable: false
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
if (inst._zod.traits.has(name)) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
inst._zod.traits.add(name);
|
|
17
|
+
initializer(inst, def);
|
|
18
|
+
const proto = _.prototype;
|
|
19
|
+
const keys = Object.keys(proto);
|
|
20
|
+
for (let i = 0; i < keys.length; i++) {
|
|
21
|
+
const k = keys[i];
|
|
22
|
+
if (!(k in inst)) {
|
|
23
|
+
inst[k] = proto[k].bind(inst);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const Parent = (params == null ? void 0 : params.Parent) ?? Object;
|
|
28
|
+
class Definition extends Parent {
|
|
29
|
+
}
|
|
30
|
+
Object.defineProperty(Definition, "name", { value: name });
|
|
31
|
+
function _(def) {
|
|
32
|
+
var _a;
|
|
33
|
+
const inst = (params == null ? void 0 : params.Parent) ? new Definition() : this;
|
|
34
|
+
init(inst, def);
|
|
35
|
+
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
36
|
+
for (const fn of inst._zod.deferred) {
|
|
37
|
+
fn();
|
|
38
|
+
}
|
|
39
|
+
return inst;
|
|
40
|
+
}
|
|
41
|
+
Object.defineProperty(_, "init", { value: init });
|
|
42
|
+
Object.defineProperty(_, Symbol.hasInstance, {
|
|
43
|
+
value: (inst) => {
|
|
44
|
+
var _a, _b;
|
|
45
|
+
if ((params == null ? void 0 : params.Parent) && inst instanceof params.Parent)
|
|
46
|
+
return true;
|
|
47
|
+
return (_b = (_a = inst == null ? void 0 : inst._zod) == null ? void 0 : _a.traits) == null ? void 0 : _b.has(name);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(_, "name", { value: name });
|
|
51
|
+
return _;
|
|
52
|
+
}
|
|
53
|
+
class $ZodAsyncError extends Error {
|
|
54
|
+
constructor() {
|
|
55
|
+
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
class $ZodEncodeError extends Error {
|
|
59
|
+
constructor(name) {
|
|
60
|
+
super(`Encountered unidirectional transform during encode: ${name}`);
|
|
61
|
+
this.name = "ZodEncodeError";
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const globalConfig = {};
|
|
65
|
+
function config(newConfig) {
|
|
66
|
+
return globalConfig;
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
$ZodAsyncError,
|
|
70
|
+
$ZodEncodeError,
|
|
71
|
+
$constructor,
|
|
72
|
+
config,
|
|
73
|
+
globalConfig
|
|
74
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
class Doc {
|
|
2
|
+
constructor(args = []) {
|
|
3
|
+
this.content = [];
|
|
4
|
+
this.indent = 0;
|
|
5
|
+
if (this)
|
|
6
|
+
this.args = args;
|
|
7
|
+
}
|
|
8
|
+
indented(fn) {
|
|
9
|
+
this.indent += 1;
|
|
10
|
+
fn(this);
|
|
11
|
+
this.indent -= 1;
|
|
12
|
+
}
|
|
13
|
+
write(arg) {
|
|
14
|
+
if (typeof arg === "function") {
|
|
15
|
+
arg(this, { execution: "sync" });
|
|
16
|
+
arg(this, { execution: "async" });
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const content = arg;
|
|
20
|
+
const lines = content.split("\n").filter((x) => x);
|
|
21
|
+
const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
|
|
22
|
+
const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
|
|
23
|
+
for (const line of dedented) {
|
|
24
|
+
this.content.push(line);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
compile() {
|
|
28
|
+
const F = Function;
|
|
29
|
+
const args = this == null ? void 0 : this.args;
|
|
30
|
+
const content = (this == null ? void 0 : this.content) ?? [``];
|
|
31
|
+
const lines = [...content.map((x) => ` ${x}`)];
|
|
32
|
+
return new F(...args, lines.join("\n"));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
Doc
|
|
37
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { $constructor } from "./core.js";
|
|
2
|
+
import { jsonStringifyReplacer } from "./util.js";
|
|
3
|
+
const initializer = (inst, def) => {
|
|
4
|
+
inst.name = "$ZodError";
|
|
5
|
+
Object.defineProperty(inst, "_zod", {
|
|
6
|
+
value: inst._zod,
|
|
7
|
+
enumerable: false
|
|
8
|
+
});
|
|
9
|
+
Object.defineProperty(inst, "issues", {
|
|
10
|
+
value: def,
|
|
11
|
+
enumerable: false
|
|
12
|
+
});
|
|
13
|
+
inst.message = JSON.stringify(def, jsonStringifyReplacer, 2);
|
|
14
|
+
Object.defineProperty(inst, "toString", {
|
|
15
|
+
value: () => inst.message,
|
|
16
|
+
enumerable: false
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const $ZodError = $constructor("$ZodError", initializer);
|
|
20
|
+
const $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
21
|
+
function flattenError(error, mapper = (issue) => issue.message) {
|
|
22
|
+
const fieldErrors = {};
|
|
23
|
+
const formErrors = [];
|
|
24
|
+
for (const sub of error.issues) {
|
|
25
|
+
if (sub.path.length > 0) {
|
|
26
|
+
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
27
|
+
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
28
|
+
} else {
|
|
29
|
+
formErrors.push(mapper(sub));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return { formErrors, fieldErrors };
|
|
33
|
+
}
|
|
34
|
+
function formatError(error, mapper = (issue) => issue.message) {
|
|
35
|
+
const fieldErrors = { _errors: [] };
|
|
36
|
+
const processError = (error2) => {
|
|
37
|
+
for (const issue of error2.issues) {
|
|
38
|
+
if (issue.code === "invalid_union" && issue.errors.length) {
|
|
39
|
+
issue.errors.map((issues) => processError({ issues }));
|
|
40
|
+
} else if (issue.code === "invalid_key") {
|
|
41
|
+
processError({ issues: issue.issues });
|
|
42
|
+
} else if (issue.code === "invalid_element") {
|
|
43
|
+
processError({ issues: issue.issues });
|
|
44
|
+
} else if (issue.path.length === 0) {
|
|
45
|
+
fieldErrors._errors.push(mapper(issue));
|
|
46
|
+
} else {
|
|
47
|
+
let curr = fieldErrors;
|
|
48
|
+
let i = 0;
|
|
49
|
+
while (i < issue.path.length) {
|
|
50
|
+
const el = issue.path[i];
|
|
51
|
+
const terminal = i === issue.path.length - 1;
|
|
52
|
+
if (!terminal) {
|
|
53
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
54
|
+
} else {
|
|
55
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
56
|
+
curr[el]._errors.push(mapper(issue));
|
|
57
|
+
}
|
|
58
|
+
curr = curr[el];
|
|
59
|
+
i++;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
processError(error);
|
|
65
|
+
return fieldErrors;
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
$ZodError,
|
|
69
|
+
$ZodRealError,
|
|
70
|
+
flattenError,
|
|
71
|
+
formatError
|
|
72
|
+
};
|