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
|
@@ -1,360 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useState, useEffect, useRef, useCallback } from "react";
|
|
4
|
-
import Cropper from "react-easy-crop";
|
|
5
|
-
import { Pencil, Search, Upload, Loader2, Check } from "lucide-react";
|
|
6
|
-
import { cn } from "../../utils/css-utils.js";
|
|
7
|
-
import { withEditable } from "../puck-core/core/with-editable.js";
|
|
8
|
-
import { Button } from "../shadcn/button.js";
|
|
9
|
-
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "../shadcn/dialog.js";
|
|
10
|
-
import { Input } from "../shadcn/input.js";
|
|
11
|
-
import { Label } from "../shadcn/label.js";
|
|
12
|
-
import { ScrollArea } from "../shadcn/scroll-area.js";
|
|
13
|
-
import { Slider } from "../shadcn/slider.js";
|
|
14
|
-
import { Tabs, TabsList, TabsTrigger } from "../shadcn/tabs.js";
|
|
15
|
-
import useUpload from "../puck-core/use-upload.js";
|
|
16
|
-
import { useEditorContext } from "../puck-core/core/context/editor-context.js";
|
|
17
|
-
import { imageField } from "../puck-core/core/props/media.js";
|
|
18
|
-
const createImage = (url) => new Promise((resolve, reject) => {
|
|
19
|
-
const image = new Image();
|
|
20
|
-
image.addEventListener("load", () => resolve(image));
|
|
21
|
-
image.addEventListener("error", (error) => reject(error));
|
|
22
|
-
image.setAttribute("crossOrigin", "anonymous");
|
|
23
|
-
image.src = url;
|
|
24
|
-
});
|
|
25
|
-
const getCroppedImg = async (imageSrc, pixelCrop, rotation) => {
|
|
26
|
-
const image = await createImage(imageSrc);
|
|
27
|
-
const canvas = document.createElement("canvas");
|
|
28
|
-
const ctx = canvas.getContext("2d");
|
|
29
|
-
const maxSize = Math.max(image.width, image.height);
|
|
30
|
-
const safeArea = 2 * (maxSize / 2 * Math.sqrt(2));
|
|
31
|
-
canvas.width = safeArea;
|
|
32
|
-
canvas.height = safeArea;
|
|
33
|
-
ctx.translate(safeArea / 2, safeArea / 2);
|
|
34
|
-
ctx.rotate(rotation * Math.PI / 180);
|
|
35
|
-
ctx.translate(-safeArea / 2, -safeArea / 2);
|
|
36
|
-
ctx.drawImage(
|
|
37
|
-
image,
|
|
38
|
-
safeArea / 2 - image.width * 0.5,
|
|
39
|
-
safeArea / 2 - image.height * 0.5
|
|
40
|
-
);
|
|
41
|
-
const data = ctx.getImageData(0, 0, safeArea, safeArea);
|
|
42
|
-
canvas.width = pixelCrop.width;
|
|
43
|
-
canvas.height = pixelCrop.height;
|
|
44
|
-
ctx.putImageData(
|
|
45
|
-
data,
|
|
46
|
-
Math.round(0 - safeArea / 2 + image.width * 0.5 - pixelCrop.x),
|
|
47
|
-
Math.round(0 - safeArea / 2 + image.height * 0.5 - pixelCrop.y)
|
|
48
|
-
);
|
|
49
|
-
return new Promise((resolve) => {
|
|
50
|
-
canvas.toBlob((blob) => resolve(blob), "image/jpeg", 0.95);
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
const DEFAULT_LIBRARY_IMAGES = [];
|
|
54
|
-
function CompoundImageBase(props) {
|
|
55
|
-
return /* @__PURE__ */ jsx(
|
|
56
|
-
"img",
|
|
57
|
-
{
|
|
58
|
-
src: props.src,
|
|
59
|
-
alt: props.alt,
|
|
60
|
-
className: cn("block h-full w-full", props.className)
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
function ImageEditDialog({
|
|
65
|
-
open,
|
|
66
|
-
onOpenChange,
|
|
67
|
-
initialData,
|
|
68
|
-
onSave
|
|
69
|
-
}) {
|
|
70
|
-
const [tab, setTab] = useState("library");
|
|
71
|
-
const [alt, setAlt] = useState(initialData.alt ?? "");
|
|
72
|
-
const [libraryImages, setLibraryImages] = useState(
|
|
73
|
-
DEFAULT_LIBRARY_IMAGES
|
|
74
|
-
);
|
|
75
|
-
const [isLoadingImages, setIsLoadingImages] = useState(false);
|
|
76
|
-
const { fetchLibraryImages } = useEditorContext();
|
|
77
|
-
useEffect(() => {
|
|
78
|
-
if (!open || !fetchLibraryImages) return;
|
|
79
|
-
setIsLoadingImages(true);
|
|
80
|
-
fetchLibraryImages().then((images) => {
|
|
81
|
-
if (images.length > 0) setLibraryImages(images);
|
|
82
|
-
}).catch(() => {
|
|
83
|
-
}).finally(() => setIsLoadingImages(false));
|
|
84
|
-
}, [open, fetchLibraryImages]);
|
|
85
|
-
const [crop, setCrop] = useState({ x: 0, y: 0 });
|
|
86
|
-
const [zoom, setZoom] = useState(1);
|
|
87
|
-
const [rotation, setRotation] = useState(0);
|
|
88
|
-
const [croppedAreaPixels, setCroppedAreaPixels] = useState(null);
|
|
89
|
-
const [selectedImg, setSelectedImg] = useState(null);
|
|
90
|
-
const replaceInputRef = useRef(null);
|
|
91
|
-
const handleClose = useCallback(() => {
|
|
92
|
-
onOpenChange(false);
|
|
93
|
-
setCrop({ x: 0, y: 0 });
|
|
94
|
-
setZoom(1);
|
|
95
|
-
setRotation(0);
|
|
96
|
-
setSelectedImg(null);
|
|
97
|
-
}, [onOpenChange]);
|
|
98
|
-
const { upload: uploadCrop, isUploading: isCropUploading } = useUpload({
|
|
99
|
-
onSuccess: (url) => {
|
|
100
|
-
onSave({ src: url, alt });
|
|
101
|
-
handleClose();
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
const { upload: uploadReplace, isUploading: isReplaceUploading } = useUpload({
|
|
105
|
-
onSuccess: (url) => {
|
|
106
|
-
onSave({ src: url, alt });
|
|
107
|
-
handleClose();
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
const handleCropSave = useCallback(async () => {
|
|
111
|
-
if (!croppedAreaPixels || !initialData.src) return;
|
|
112
|
-
try {
|
|
113
|
-
const croppedBlob = await getCroppedImg(
|
|
114
|
-
initialData.src,
|
|
115
|
-
croppedAreaPixels,
|
|
116
|
-
rotation
|
|
117
|
-
);
|
|
118
|
-
const file = new File([croppedBlob], "cropped-image.jpg", {
|
|
119
|
-
type: "image/jpeg"
|
|
120
|
-
});
|
|
121
|
-
await uploadCrop(file);
|
|
122
|
-
} catch (error) {
|
|
123
|
-
console.error("Crop failed:", error);
|
|
124
|
-
}
|
|
125
|
-
}, [croppedAreaPixels, initialData.src, rotation, uploadCrop]);
|
|
126
|
-
const handleFileReplace = useCallback(
|
|
127
|
-
(e) => {
|
|
128
|
-
var _a;
|
|
129
|
-
const file = (_a = e.target.files) == null ? void 0 : _a[0];
|
|
130
|
-
if (file) uploadReplace(file);
|
|
131
|
-
e.target.value = "";
|
|
132
|
-
},
|
|
133
|
-
[uploadReplace]
|
|
134
|
-
);
|
|
135
|
-
const handleLibraryDone = useCallback(() => {
|
|
136
|
-
if (!selectedImg) return;
|
|
137
|
-
onSave({ src: selectedImg, alt });
|
|
138
|
-
handleClose();
|
|
139
|
-
}, [selectedImg, alt, onSave, handleClose]);
|
|
140
|
-
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: (o) => !o && handleClose(), children: /* @__PURE__ */ jsxs(DialogContent, { className: "flex max-h-[80vh] max-w-lg flex-col gap-0 overflow-hidden p-0", children: [
|
|
141
|
-
/* @__PURE__ */ jsx(DialogHeader, { className: "px-6 pt-5 pb-0", children: /* @__PURE__ */ jsx(DialogTitle, { className: "text-base font-semibold", children: "Edit Image" }) }),
|
|
142
|
-
/* @__PURE__ */ jsxs(
|
|
143
|
-
Tabs,
|
|
144
|
-
{
|
|
145
|
-
value: tab,
|
|
146
|
-
onValueChange: (v) => setTab(v),
|
|
147
|
-
className: "flex flex-1 flex-col overflow-hidden",
|
|
148
|
-
children: [
|
|
149
|
-
/* @__PURE__ */ jsxs(TabsList, { className: "mx-6 mt-3 bg-transparent", children: [
|
|
150
|
-
/* @__PURE__ */ jsxs(TabsTrigger, { value: "adjust", children: [
|
|
151
|
-
/* @__PURE__ */ jsx(Pencil, {}),
|
|
152
|
-
"Crop"
|
|
153
|
-
] }),
|
|
154
|
-
/* @__PURE__ */ jsxs(TabsTrigger, { value: "library", children: [
|
|
155
|
-
/* @__PURE__ */ jsx(Search, {}),
|
|
156
|
-
"Library"
|
|
157
|
-
] }),
|
|
158
|
-
/* @__PURE__ */ jsxs(TabsTrigger, { value: "upload", children: [
|
|
159
|
-
/* @__PURE__ */ jsx(Upload, {}),
|
|
160
|
-
"Upload"
|
|
161
|
-
] })
|
|
162
|
-
] }),
|
|
163
|
-
/* @__PURE__ */ jsxs("div", { className: "mt-3 flex-1 overflow-hidden", children: [
|
|
164
|
-
/* @__PURE__ */ jsxs("div", { className: cn("flex flex-col", tab !== "adjust" && "hidden"), children: [
|
|
165
|
-
/* @__PURE__ */ jsx("div", { className: "bg-muted relative h-64", children: /* @__PURE__ */ jsx(
|
|
166
|
-
Cropper,
|
|
167
|
-
{
|
|
168
|
-
image: initialData.src,
|
|
169
|
-
crop,
|
|
170
|
-
zoom,
|
|
171
|
-
rotation,
|
|
172
|
-
aspect: 16 / 9,
|
|
173
|
-
onCropChange: setCrop,
|
|
174
|
-
onZoomChange: setZoom,
|
|
175
|
-
onRotationChange: setRotation,
|
|
176
|
-
onCropComplete: (_, pixels) => setCroppedAreaPixels(pixels)
|
|
177
|
-
}
|
|
178
|
-
) }),
|
|
179
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4 px-6 py-3", children: [
|
|
180
|
-
/* @__PURE__ */ jsxs("div", { className: "flex gap-4", children: [
|
|
181
|
-
/* @__PURE__ */ jsx("label", { className: "text-xs font-medium text-gray-500", children: "Zoom" }),
|
|
182
|
-
/* @__PURE__ */ jsx(
|
|
183
|
-
Slider,
|
|
184
|
-
{
|
|
185
|
-
className: "flex",
|
|
186
|
-
value: [zoom],
|
|
187
|
-
onValueChange: (vals) => setZoom(Array.isArray(vals) ? vals[0] ?? 1 : vals),
|
|
188
|
-
min: 1,
|
|
189
|
-
max: 3,
|
|
190
|
-
step: 0.1
|
|
191
|
-
}
|
|
192
|
-
)
|
|
193
|
-
] }),
|
|
194
|
-
/* @__PURE__ */ jsxs("div", { className: "flex gap-4", children: [
|
|
195
|
-
/* @__PURE__ */ jsx("label", { className: "text-xs font-medium text-gray-500", children: "Rotation" }),
|
|
196
|
-
/* @__PURE__ */ jsx(
|
|
197
|
-
Slider,
|
|
198
|
-
{
|
|
199
|
-
className: "flex",
|
|
200
|
-
value: [rotation],
|
|
201
|
-
onValueChange: (vals) => setRotation(Array.isArray(vals) ? vals[0] ?? 0 : vals),
|
|
202
|
-
min: 0,
|
|
203
|
-
max: 360,
|
|
204
|
-
step: 1
|
|
205
|
-
}
|
|
206
|
-
)
|
|
207
|
-
] })
|
|
208
|
-
] })
|
|
209
|
-
] }),
|
|
210
|
-
/* @__PURE__ */ jsx(
|
|
211
|
-
"div",
|
|
212
|
-
{
|
|
213
|
-
className: cn(
|
|
214
|
-
"flex flex-col gap-3 px-6 py-4",
|
|
215
|
-
tab !== "library" && "hidden"
|
|
216
|
-
),
|
|
217
|
-
children: /* @__PURE__ */ jsx(ScrollArea, { className: "h-[280px]", children: isLoadingImages ? /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center py-20", children: /* @__PURE__ */ jsx(Loader2, { className: "h-6 w-6 animate-spin text-gray-400" }) }) : libraryImages.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col items-center justify-center py-20 text-center", children: [
|
|
218
|
-
/* @__PURE__ */ jsx(Search, { className: "h-8 w-8 text-gray-300" }),
|
|
219
|
-
/* @__PURE__ */ jsx("p", { className: "mt-3 text-sm font-medium text-gray-500", children: "No images available" }),
|
|
220
|
-
/* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-gray-400", children: "Try uploading an image instead" })
|
|
221
|
-
] }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-2", children: libraryImages.map((src) => {
|
|
222
|
-
const isSelected = selectedImg === src;
|
|
223
|
-
return /* @__PURE__ */ jsxs(
|
|
224
|
-
"button",
|
|
225
|
-
{
|
|
226
|
-
type: "button",
|
|
227
|
-
onClick: () => setSelectedImg(src),
|
|
228
|
-
className: `relative aspect-4/3 overflow-hidden rounded-lg border-2 transition-all ${isSelected ? "border-blue-500 ring-2 ring-blue-100" : "border-transparent hover:border-gray-300"}`,
|
|
229
|
-
children: [
|
|
230
|
-
/* @__PURE__ */ jsx(
|
|
231
|
-
"img",
|
|
232
|
-
{
|
|
233
|
-
src,
|
|
234
|
-
alt: "",
|
|
235
|
-
className: "h-full w-full object-cover"
|
|
236
|
-
}
|
|
237
|
-
),
|
|
238
|
-
isSelected && /* @__PURE__ */ jsx("div", { className: "absolute top-1.5 right-1.5 flex h-5 w-5 items-center justify-center rounded-full bg-blue-500 shadow-sm", children: /* @__PURE__ */ jsx(Check, { className: "h-3 w-3 text-white" }) })
|
|
239
|
-
]
|
|
240
|
-
},
|
|
241
|
-
src
|
|
242
|
-
);
|
|
243
|
-
}) }) })
|
|
244
|
-
}
|
|
245
|
-
),
|
|
246
|
-
/* @__PURE__ */ jsxs(
|
|
247
|
-
"div",
|
|
248
|
-
{
|
|
249
|
-
className: cn(
|
|
250
|
-
"flex flex-col items-center justify-center gap-4 px-6 py-14",
|
|
251
|
-
tab !== "upload" && "hidden"
|
|
252
|
-
),
|
|
253
|
-
children: [
|
|
254
|
-
/* @__PURE__ */ jsx("div", { className: "flex h-14 w-14 items-center justify-center rounded-full bg-gray-100", children: /* @__PURE__ */ jsx(Upload, { className: "h-6 w-6 text-gray-400" }) }),
|
|
255
|
-
/* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
256
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-gray-700", children: "Upload a new image to replace the current one" }),
|
|
257
|
-
/* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-gray-400", children: "Supports JPG, PNG, WebP formats" })
|
|
258
|
-
] }),
|
|
259
|
-
/* @__PURE__ */ jsxs(
|
|
260
|
-
Button,
|
|
261
|
-
{
|
|
262
|
-
variant: "outline",
|
|
263
|
-
size: "sm",
|
|
264
|
-
onClick: () => {
|
|
265
|
-
var _a;
|
|
266
|
-
return (_a = replaceInputRef.current) == null ? void 0 : _a.click();
|
|
267
|
-
},
|
|
268
|
-
disabled: isReplaceUploading,
|
|
269
|
-
children: [
|
|
270
|
-
isReplaceUploading ? /* @__PURE__ */ jsx(Loader2, { className: "mr-1.5 h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx(Upload, { className: "mr-1.5 h-3.5 w-3.5" }),
|
|
271
|
-
"Choose File"
|
|
272
|
-
]
|
|
273
|
-
}
|
|
274
|
-
),
|
|
275
|
-
/* @__PURE__ */ jsx(
|
|
276
|
-
"input",
|
|
277
|
-
{
|
|
278
|
-
ref: replaceInputRef,
|
|
279
|
-
type: "file",
|
|
280
|
-
accept: "image/*",
|
|
281
|
-
onChange: handleFileReplace,
|
|
282
|
-
className: "hidden"
|
|
283
|
-
}
|
|
284
|
-
)
|
|
285
|
-
]
|
|
286
|
-
}
|
|
287
|
-
)
|
|
288
|
-
] })
|
|
289
|
-
]
|
|
290
|
-
}
|
|
291
|
-
),
|
|
292
|
-
/* @__PURE__ */ jsx("div", { className: "border-t px-6 py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
293
|
-
/* @__PURE__ */ jsx(Label, { className: "flex-none", children: "Alt Text" }),
|
|
294
|
-
/* @__PURE__ */ jsx(
|
|
295
|
-
Input,
|
|
296
|
-
{
|
|
297
|
-
value: alt,
|
|
298
|
-
onChange: (e) => setAlt(e.target.value),
|
|
299
|
-
placeholder: "Image description..."
|
|
300
|
-
}
|
|
301
|
-
)
|
|
302
|
-
] }) }),
|
|
303
|
-
/* @__PURE__ */ jsxs(DialogFooter, { className: "border-t px-6 py-3", children: [
|
|
304
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClose, children: "Cancel" }),
|
|
305
|
-
/* @__PURE__ */ jsxs(
|
|
306
|
-
Button,
|
|
307
|
-
{
|
|
308
|
-
size: "sm",
|
|
309
|
-
disabled: tab === "library" && !selectedImg || tab === "adjust" && isCropUploading,
|
|
310
|
-
onClick: () => {
|
|
311
|
-
if (tab === "library") handleLibraryDone();
|
|
312
|
-
else if (tab === "adjust") handleCropSave();
|
|
313
|
-
else if (tab === "upload") {
|
|
314
|
-
onSave({ alt });
|
|
315
|
-
handleClose();
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
children: [
|
|
319
|
-
isCropUploading && /* @__PURE__ */ jsx(Loader2, { className: "mr-1.5 h-3.5 w-3.5 animate-spin" }),
|
|
320
|
-
"Done"
|
|
321
|
-
]
|
|
322
|
-
}
|
|
323
|
-
)
|
|
324
|
-
] })
|
|
325
|
-
] }) });
|
|
326
|
-
}
|
|
327
|
-
const EditableImage = withEditable(CompoundImageBase, {
|
|
328
|
-
type: "image",
|
|
329
|
-
fields: imageField.objectFields
|
|
330
|
-
});
|
|
331
|
-
const CompoundImage = (props) => {
|
|
332
|
-
const [dialogOpen, setDialogOpen] = useState(false);
|
|
333
|
-
const [dialogData, setDialogData] = useState(null);
|
|
334
|
-
const [onSaveCallback, setOnSaveCallback] = useState(null);
|
|
335
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
336
|
-
/* @__PURE__ */ jsx(
|
|
337
|
-
EditableImage,
|
|
338
|
-
{
|
|
339
|
-
...props,
|
|
340
|
-
onEdit: (currentProps, onSave) => {
|
|
341
|
-
setDialogData(currentProps);
|
|
342
|
-
setOnSaveCallback(() => onSave);
|
|
343
|
-
setDialogOpen(true);
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
),
|
|
347
|
-
dialogOpen && dialogData && onSaveCallback && /* @__PURE__ */ jsx(
|
|
348
|
-
ImageEditDialog,
|
|
349
|
-
{
|
|
350
|
-
open: dialogOpen,
|
|
351
|
-
onOpenChange: setDialogOpen,
|
|
352
|
-
initialData: dialogData,
|
|
353
|
-
onSave: onSaveCallback
|
|
354
|
-
}
|
|
355
|
-
)
|
|
356
|
-
] });
|
|
357
|
-
};
|
|
358
|
-
export {
|
|
359
|
-
CompoundImage
|
|
360
|
-
};
|