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,7 +1,7 @@
|
|
|
1
1
|
import { CompoundButtonProps } from "./button";
|
|
2
|
-
import {
|
|
2
|
+
import { CompoundMediaProps } from "./media";
|
|
3
3
|
export interface CompoundArticleCardProps {
|
|
4
|
-
image?:
|
|
4
|
+
image?: CompoundMediaProps;
|
|
5
5
|
heading?: string;
|
|
6
6
|
description?: string;
|
|
7
7
|
button?: CompoundButtonProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../utils/css-utils.js";
|
|
3
3
|
import { CompoundButton } from "./button.js";
|
|
4
|
-
import {
|
|
4
|
+
import { CompoundMedia } from "./media.js";
|
|
5
5
|
const CompoundArticleCard = ({
|
|
6
6
|
image,
|
|
7
7
|
heading,
|
|
@@ -10,7 +10,7 @@ const CompoundArticleCard = ({
|
|
|
10
10
|
className
|
|
11
11
|
}) => {
|
|
12
12
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4", className), children: [
|
|
13
|
-
image && /* @__PURE__ */ jsx("div", { className: "bg-muted mb-2 aspect-video overflow-hidden rounded-md [&>span]:h-full [&>span]:w-full", children: /* @__PURE__ */ jsx(
|
|
13
|
+
image && /* @__PURE__ */ jsx("div", { className: "bg-muted mb-2 aspect-video overflow-hidden rounded-md [&>span]:h-full [&>span]:w-full", children: /* @__PURE__ */ jsx(CompoundMedia, { src: image.src || "", alt: image.alt, className: "h-full w-full object-cover" }) }),
|
|
14
14
|
!!heading || !!description || !!button ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
15
15
|
heading ? /* @__PURE__ */ jsx("h3", { className: "text-xl tracking-tight", children: heading }) : null,
|
|
16
16
|
description ? /* @__PURE__ */ jsx("p", { className: "text-muted-foreground max-w-xs text-base", children: description }) : null,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IconName } from "@/components/puck-core/core/types";
|
|
2
2
|
import { CompoundButtonProps } from "./button";
|
|
3
|
-
import {
|
|
3
|
+
import { CompoundMediaProps } from "./media";
|
|
4
4
|
export interface CompoundCardProps {
|
|
5
|
-
image?:
|
|
5
|
+
image?: CompoundMediaProps;
|
|
6
6
|
icon?: IconName;
|
|
7
7
|
heading?: string;
|
|
8
8
|
description?: string;
|
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { SafeDynamicIcon } from "./safe-dynamic-icon.js";
|
|
3
3
|
import { cn } from "../../utils/css-utils.js";
|
|
4
4
|
import { CompoundButton } from "./button.js";
|
|
5
|
-
import {
|
|
5
|
+
import { CompoundMedia } from "./media.js";
|
|
6
6
|
const CompoundCard = ({
|
|
7
7
|
image,
|
|
8
8
|
icon,
|
|
@@ -30,7 +30,7 @@ const CompoundCard = ({
|
|
|
30
30
|
className
|
|
31
31
|
),
|
|
32
32
|
children: [
|
|
33
|
-
hasImage ? /* @__PURE__ */ jsx("div", { className: "aspect-video overflow-hidden rounded-t-md", children: /* @__PURE__ */ jsx(
|
|
33
|
+
hasImage ? /* @__PURE__ */ jsx("div", { className: "aspect-video overflow-hidden rounded-t-md", children: /* @__PURE__ */ jsx(CompoundMedia, { src: image.src, alt: image.alt, className: "h-full" }) }) : null,
|
|
34
34
|
hasIcon && !hasImage ? /* @__PURE__ */ jsx(
|
|
35
35
|
SafeDynamicIcon,
|
|
36
36
|
{
|
|
@@ -5,7 +5,8 @@ export { CompoundContainer, type CompoundContainerProps, type SectionStyle, type
|
|
|
5
5
|
export { CompoundContent, type CompoundContentProps } from "./content";
|
|
6
6
|
export { CompoundField, type CompoundFieldProps, fieldTypes, type FieldTypes } from "./field";
|
|
7
7
|
export { CompoundForm, type CompoundFormProps, formMethods, type FormMethods } from "./form";
|
|
8
|
-
export {
|
|
8
|
+
export { CompoundMedia, type CompoundMediaProps } from "./media";
|
|
9
9
|
export { CompoundArticleCard, type CompoundArticleCardProps } from "./article-card";
|
|
10
10
|
export { GradientText, type GradientTextProps } from "./gradient-text";
|
|
11
11
|
export { SafeDynamicIcon } from "./safe-dynamic-icon";
|
|
12
|
+
export { CompoundSocialLinks, type CompoundSocialLinksProps } from "./social-links";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function detectMediaType(src: string): "image" | "video" | "embed";
|
|
2
|
+
export interface CompoundMediaProps {
|
|
3
|
+
src: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
/** Only effective when src resolves to video type */
|
|
7
|
+
videoAutoplay?: boolean;
|
|
8
|
+
videoLoop?: boolean;
|
|
9
|
+
videoMuted?: boolean;
|
|
10
|
+
videoPoster?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const CompoundMedia: (props: CompoundMediaProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useEffect, useRef, useCallback, useMemo } from "react";
|
|
4
|
+
import Cropper from "react-easy-crop";
|
|
5
|
+
import { Pencil, Film, Youtube, 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 { mediaField } from "../puck-core/core/props/media.js";
|
|
9
|
+
import { Button } from "../shadcn/button.js";
|
|
10
|
+
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "../shadcn/dialog.js";
|
|
11
|
+
import { Input } from "../shadcn/input.js";
|
|
12
|
+
import { Label } from "../shadcn/label.js";
|
|
13
|
+
import { ScrollArea } from "../shadcn/scroll-area.js";
|
|
14
|
+
import { Slider } from "../shadcn/slider.js";
|
|
15
|
+
import { Tabs, TabsList, TabsTrigger, TabsIndicator, TabsContent } from "../shadcn/tabs.js";
|
|
16
|
+
import useUpload from "../puck-core/use-upload.js";
|
|
17
|
+
import { useEditorContext } from "../puck-core/core/context/editor-context.js";
|
|
18
|
+
import { VideoIframe } from "../shadcn/video-iframe.js";
|
|
19
|
+
function detectMediaType(src) {
|
|
20
|
+
if (/youtube\.com|youtu\.be|vimeo\.com/i.test(src)) return "embed";
|
|
21
|
+
if (/\.(mp4|webm|mov|ogg)(\?.*)?$/i.test(src)) return "video";
|
|
22
|
+
return "image";
|
|
23
|
+
}
|
|
24
|
+
function getEmbedUrl(url) {
|
|
25
|
+
const ytMatch = url.match(
|
|
26
|
+
/(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([a-zA-Z0-9_-]+)/
|
|
27
|
+
);
|
|
28
|
+
if (ytMatch) return `https://www.youtube.com/embed/${ytMatch[1]}?autoplay=1`;
|
|
29
|
+
const vimeoMatch = url.match(/vimeo\.com\/(\d+)/);
|
|
30
|
+
if (vimeoMatch)
|
|
31
|
+
return `https://player.vimeo.com/video/${vimeoMatch[1]}?autoplay=1`;
|
|
32
|
+
return url;
|
|
33
|
+
}
|
|
34
|
+
const createImage = (url) => new Promise((resolve, reject) => {
|
|
35
|
+
const image = new Image();
|
|
36
|
+
image.addEventListener("load", () => resolve(image));
|
|
37
|
+
image.addEventListener("error", (error) => reject(error));
|
|
38
|
+
image.setAttribute("crossOrigin", "anonymous");
|
|
39
|
+
image.src = url;
|
|
40
|
+
});
|
|
41
|
+
const getCroppedImg = async (imageSrc, pixelCrop, rotation) => {
|
|
42
|
+
const image = await createImage(imageSrc);
|
|
43
|
+
const canvas = document.createElement("canvas");
|
|
44
|
+
const ctx = canvas.getContext("2d");
|
|
45
|
+
const maxSize = Math.max(image.width, image.height);
|
|
46
|
+
const safeArea = 2 * (maxSize / 2 * Math.sqrt(2));
|
|
47
|
+
canvas.width = safeArea;
|
|
48
|
+
canvas.height = safeArea;
|
|
49
|
+
ctx.translate(safeArea / 2, safeArea / 2);
|
|
50
|
+
ctx.rotate(rotation * Math.PI / 180);
|
|
51
|
+
ctx.translate(-safeArea / 2, -safeArea / 2);
|
|
52
|
+
ctx.drawImage(
|
|
53
|
+
image,
|
|
54
|
+
safeArea / 2 - image.width * 0.5,
|
|
55
|
+
safeArea / 2 - image.height * 0.5
|
|
56
|
+
);
|
|
57
|
+
const data = ctx.getImageData(0, 0, safeArea, safeArea);
|
|
58
|
+
canvas.width = pixelCrop.width;
|
|
59
|
+
canvas.height = pixelCrop.height;
|
|
60
|
+
ctx.putImageData(
|
|
61
|
+
data,
|
|
62
|
+
Math.round(0 - safeArea / 2 + image.width * 0.5 - pixelCrop.x),
|
|
63
|
+
Math.round(0 - safeArea / 2 + image.height * 0.5 - pixelCrop.y)
|
|
64
|
+
);
|
|
65
|
+
return new Promise((resolve) => {
|
|
66
|
+
canvas.toBlob((blob) => resolve(blob), "image/jpeg", 0.95);
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
const DEFAULT_LIBRARY_IMAGES = [];
|
|
70
|
+
function CompoundMediaBase(props) {
|
|
71
|
+
const type = detectMediaType(props.src);
|
|
72
|
+
const { isEditor } = useEditorContext();
|
|
73
|
+
switch (type) {
|
|
74
|
+
case "embed":
|
|
75
|
+
return /* @__PURE__ */ jsx(
|
|
76
|
+
VideoIframe,
|
|
77
|
+
{
|
|
78
|
+
video: props.src,
|
|
79
|
+
autoplay: !isEditor,
|
|
80
|
+
className: cn("block h-full w-full", props.className)
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
case "video":
|
|
84
|
+
return /* @__PURE__ */ jsx(
|
|
85
|
+
"video",
|
|
86
|
+
{
|
|
87
|
+
src: props.src,
|
|
88
|
+
poster: props.videoPoster,
|
|
89
|
+
autoPlay: isEditor ? false : props.videoAutoplay ?? true,
|
|
90
|
+
loop: props.videoLoop ?? true,
|
|
91
|
+
muted: props.videoMuted ?? true,
|
|
92
|
+
playsInline: true,
|
|
93
|
+
className: cn("block h-full w-full object-cover", props.className)
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
case "image":
|
|
97
|
+
default:
|
|
98
|
+
return /* @__PURE__ */ jsx(
|
|
99
|
+
"img",
|
|
100
|
+
{
|
|
101
|
+
src: props.src,
|
|
102
|
+
alt: props.alt,
|
|
103
|
+
className: cn("block h-full w-full", props.className)
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function MediaEditDialog({
|
|
109
|
+
open,
|
|
110
|
+
onOpenChange,
|
|
111
|
+
initialData,
|
|
112
|
+
onSave
|
|
113
|
+
}) {
|
|
114
|
+
const currentType = detectMediaType(initialData.src);
|
|
115
|
+
const [mediaTab, setMediaTab] = useState(currentType);
|
|
116
|
+
const [imageSubTab, setImageSubTab] = useState("library");
|
|
117
|
+
const [alt, setAlt] = useState(initialData.alt ?? "");
|
|
118
|
+
const [libraryImages, setLibraryImages] = useState(
|
|
119
|
+
DEFAULT_LIBRARY_IMAGES
|
|
120
|
+
);
|
|
121
|
+
const [isLoadingImages, setIsLoadingImages] = useState(false);
|
|
122
|
+
const { fetchLibraryImages } = useEditorContext();
|
|
123
|
+
useEffect(() => {
|
|
124
|
+
if (!open || !fetchLibraryImages) return;
|
|
125
|
+
setIsLoadingImages(true);
|
|
126
|
+
fetchLibraryImages().then((images) => {
|
|
127
|
+
if (images.length > 0) setLibraryImages(images);
|
|
128
|
+
}).catch(() => {
|
|
129
|
+
}).finally(() => setIsLoadingImages(false));
|
|
130
|
+
}, [open, fetchLibraryImages]);
|
|
131
|
+
const [crop, setCrop] = useState({ x: 0, y: 0 });
|
|
132
|
+
const [zoom, setZoom] = useState(1);
|
|
133
|
+
const [rotation, setRotation] = useState(0);
|
|
134
|
+
const [croppedAreaPixels, setCroppedAreaPixels] = useState(null);
|
|
135
|
+
const [selectedImg, setSelectedImg] = useState(null);
|
|
136
|
+
const replaceInputRef = useRef(null);
|
|
137
|
+
const lastUploadedFile = useRef(null);
|
|
138
|
+
const [videoUrl, setVideoUrl] = useState(
|
|
139
|
+
currentType === "video" ? initialData.src : ""
|
|
140
|
+
);
|
|
141
|
+
const [embedUrl, setEmbedUrl] = useState(
|
|
142
|
+
currentType === "embed" ? initialData.src : ""
|
|
143
|
+
);
|
|
144
|
+
const { brandId, domain } = useEditorContext();
|
|
145
|
+
const saveToAssetLibrary = useCallback(
|
|
146
|
+
async (fileUrl, file) => {
|
|
147
|
+
var _a;
|
|
148
|
+
if (!domain) return;
|
|
149
|
+
try {
|
|
150
|
+
const fileName = (file == null ? void 0 : file.name) || fileUrl.split("/").pop() || "uploaded-media";
|
|
151
|
+
const isVideo = ((_a = file == null ? void 0 : file.type) == null ? void 0 : _a.startsWith("video/")) || detectMediaType(fileUrl) === "video";
|
|
152
|
+
const params = new URLSearchParams();
|
|
153
|
+
if (brandId) params.set("brandId", brandId);
|
|
154
|
+
await fetch(`${domain}/api/user-assets?${params}`, {
|
|
155
|
+
method: "POST",
|
|
156
|
+
headers: { "Content-Type": "application/json" },
|
|
157
|
+
credentials: "include",
|
|
158
|
+
body: JSON.stringify({
|
|
159
|
+
title: fileName,
|
|
160
|
+
type: isVideo ? "video" : "image",
|
|
161
|
+
label: "raw",
|
|
162
|
+
source_type: "user-upload",
|
|
163
|
+
file: fileUrl,
|
|
164
|
+
file_size: (file == null ? void 0 : file.size) || 0
|
|
165
|
+
})
|
|
166
|
+
});
|
|
167
|
+
} catch (e) {
|
|
168
|
+
console.error("[MediaEditDialog] Failed to save asset:", e);
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
[brandId, domain]
|
|
172
|
+
);
|
|
173
|
+
const handleClose = useCallback(() => {
|
|
174
|
+
onOpenChange(false);
|
|
175
|
+
setCrop({ x: 0, y: 0 });
|
|
176
|
+
setZoom(1);
|
|
177
|
+
setRotation(0);
|
|
178
|
+
setSelectedImg(null);
|
|
179
|
+
setVideoUrl("");
|
|
180
|
+
setEmbedUrl("");
|
|
181
|
+
}, [onOpenChange]);
|
|
182
|
+
const { upload: uploadCrop, isUploading: isCropUploading } = useUpload({
|
|
183
|
+
onSuccess: (url) => {
|
|
184
|
+
saveToAssetLibrary(url);
|
|
185
|
+
onSave({ src: url, alt });
|
|
186
|
+
handleClose();
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
const { upload: uploadReplace, isUploading: isReplaceUploading } = useUpload({
|
|
190
|
+
onSuccess: (url) => {
|
|
191
|
+
saveToAssetLibrary(url, lastUploadedFile.current ?? void 0);
|
|
192
|
+
onSave({ src: url, alt });
|
|
193
|
+
handleClose();
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
const handleCropSave = useCallback(async () => {
|
|
197
|
+
if (!croppedAreaPixels || !initialData.src) return;
|
|
198
|
+
try {
|
|
199
|
+
const croppedBlob = await getCroppedImg(
|
|
200
|
+
initialData.src,
|
|
201
|
+
croppedAreaPixels,
|
|
202
|
+
rotation
|
|
203
|
+
);
|
|
204
|
+
const file = new File([croppedBlob], "cropped-image.jpg", {
|
|
205
|
+
type: "image/jpeg"
|
|
206
|
+
});
|
|
207
|
+
await uploadCrop(file);
|
|
208
|
+
} catch (error) {
|
|
209
|
+
console.error("Crop failed:", error);
|
|
210
|
+
}
|
|
211
|
+
}, [croppedAreaPixels, initialData.src, rotation, uploadCrop]);
|
|
212
|
+
const handleFileReplace = useCallback(
|
|
213
|
+
(e) => {
|
|
214
|
+
var _a;
|
|
215
|
+
const file = (_a = e.target.files) == null ? void 0 : _a[0];
|
|
216
|
+
if (file) {
|
|
217
|
+
lastUploadedFile.current = file;
|
|
218
|
+
uploadReplace(file);
|
|
219
|
+
}
|
|
220
|
+
e.target.value = "";
|
|
221
|
+
},
|
|
222
|
+
[uploadReplace]
|
|
223
|
+
);
|
|
224
|
+
const handleLibraryDone = useCallback(() => {
|
|
225
|
+
if (!selectedImg) return;
|
|
226
|
+
onSave({ src: selectedImg, alt });
|
|
227
|
+
handleClose();
|
|
228
|
+
}, [selectedImg, alt, onSave, handleClose]);
|
|
229
|
+
const handleVideoDone = useCallback(() => {
|
|
230
|
+
const url = videoUrl.trim();
|
|
231
|
+
if (!url) return;
|
|
232
|
+
onSave({ src: url, alt });
|
|
233
|
+
handleClose();
|
|
234
|
+
}, [videoUrl, alt, onSave, handleClose]);
|
|
235
|
+
const handleEmbedDone = useCallback(() => {
|
|
236
|
+
const url = embedUrl.trim();
|
|
237
|
+
if (!url) return;
|
|
238
|
+
onSave({ src: url, alt });
|
|
239
|
+
handleClose();
|
|
240
|
+
}, [embedUrl, alt, onSave, handleClose]);
|
|
241
|
+
const canDone = useMemo(() => {
|
|
242
|
+
if (mediaTab === "image") {
|
|
243
|
+
if (imageSubTab === "library") return !!selectedImg;
|
|
244
|
+
if (imageSubTab === "adjust") return !isCropUploading;
|
|
245
|
+
return true;
|
|
246
|
+
}
|
|
247
|
+
if (mediaTab === "video") return !!videoUrl.trim();
|
|
248
|
+
if (mediaTab === "embed") return !!embedUrl.trim();
|
|
249
|
+
return false;
|
|
250
|
+
}, [mediaTab, imageSubTab, selectedImg, isCropUploading, videoUrl, embedUrl]);
|
|
251
|
+
const handleDone = useCallback(() => {
|
|
252
|
+
if (mediaTab === "image") {
|
|
253
|
+
if (imageSubTab === "library") handleLibraryDone();
|
|
254
|
+
else if (imageSubTab === "adjust") handleCropSave();
|
|
255
|
+
else {
|
|
256
|
+
onSave({ alt });
|
|
257
|
+
handleClose();
|
|
258
|
+
}
|
|
259
|
+
} else if (mediaTab === "video") {
|
|
260
|
+
handleVideoDone();
|
|
261
|
+
} else if (mediaTab === "embed") {
|
|
262
|
+
handleEmbedDone();
|
|
263
|
+
}
|
|
264
|
+
}, [
|
|
265
|
+
mediaTab,
|
|
266
|
+
imageSubTab,
|
|
267
|
+
handleLibraryDone,
|
|
268
|
+
handleCropSave,
|
|
269
|
+
handleVideoDone,
|
|
270
|
+
handleEmbedDone,
|
|
271
|
+
onSave,
|
|
272
|
+
alt,
|
|
273
|
+
handleClose
|
|
274
|
+
]);
|
|
275
|
+
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: [
|
|
276
|
+
/* @__PURE__ */ jsx(DialogHeader, { className: "px-6 pt-5 pb-0", children: /* @__PURE__ */ jsx(DialogTitle, { className: "text-base font-semibold", children: "Edit Media" }) }),
|
|
277
|
+
/* @__PURE__ */ jsxs(
|
|
278
|
+
Tabs,
|
|
279
|
+
{
|
|
280
|
+
value: mediaTab,
|
|
281
|
+
onValueChange: (v) => setMediaTab(v),
|
|
282
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
283
|
+
children: [
|
|
284
|
+
/* @__PURE__ */ jsxs(TabsList, { variant: "line", className: "relative mx-6 mt-3", children: [
|
|
285
|
+
/* @__PURE__ */ jsxs(TabsTrigger, { value: "image", children: [
|
|
286
|
+
/* @__PURE__ */ jsx(Pencil, { className: "size-3.5" }),
|
|
287
|
+
"Image"
|
|
288
|
+
] }),
|
|
289
|
+
/* @__PURE__ */ jsxs(TabsTrigger, { value: "video", children: [
|
|
290
|
+
/* @__PURE__ */ jsx(Film, { className: "size-3.5" }),
|
|
291
|
+
"Video"
|
|
292
|
+
] }),
|
|
293
|
+
/* @__PURE__ */ jsxs(TabsTrigger, { value: "embed", children: [
|
|
294
|
+
/* @__PURE__ */ jsx(Youtube, { className: "size-3.5" }),
|
|
295
|
+
"YouTube"
|
|
296
|
+
] }),
|
|
297
|
+
/* @__PURE__ */ jsx(TabsIndicator, {})
|
|
298
|
+
] }),
|
|
299
|
+
/* @__PURE__ */ jsx(
|
|
300
|
+
TabsContent,
|
|
301
|
+
{
|
|
302
|
+
value: "image",
|
|
303
|
+
className: "animate-tabs flex-none h-[360px] flex flex-col overflow-hidden",
|
|
304
|
+
children: /* @__PURE__ */ jsxs(
|
|
305
|
+
Tabs,
|
|
306
|
+
{
|
|
307
|
+
value: imageSubTab,
|
|
308
|
+
onValueChange: (v) => setImageSubTab(v),
|
|
309
|
+
orientation: "vertical",
|
|
310
|
+
className: "flex flex-1 overflow-hidden",
|
|
311
|
+
children: [
|
|
312
|
+
/* @__PURE__ */ jsxs(TabsList, { className: "ml-6 mt-3", children: [
|
|
313
|
+
/* @__PURE__ */ jsxs(TabsTrigger, { value: "adjust", children: [
|
|
314
|
+
/* @__PURE__ */ jsx(Pencil, {}),
|
|
315
|
+
"Crop"
|
|
316
|
+
] }),
|
|
317
|
+
/* @__PURE__ */ jsxs(TabsTrigger, { value: "library", children: [
|
|
318
|
+
/* @__PURE__ */ jsx(Search, {}),
|
|
319
|
+
"Library"
|
|
320
|
+
] }),
|
|
321
|
+
/* @__PURE__ */ jsxs(TabsTrigger, { value: "upload", children: [
|
|
322
|
+
/* @__PURE__ */ jsx(Upload, {}),
|
|
323
|
+
"Upload"
|
|
324
|
+
] })
|
|
325
|
+
] }),
|
|
326
|
+
/* @__PURE__ */ jsxs(
|
|
327
|
+
TabsContent,
|
|
328
|
+
{
|
|
329
|
+
value: "adjust",
|
|
330
|
+
className: "m-3 bg-muted rounded-lg animate-tabs flex flex-col",
|
|
331
|
+
children: [
|
|
332
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted relative h-64", children: /* @__PURE__ */ jsx(
|
|
333
|
+
Cropper,
|
|
334
|
+
{
|
|
335
|
+
image: currentType === "image" ? initialData.src : "",
|
|
336
|
+
crop,
|
|
337
|
+
zoom,
|
|
338
|
+
rotation,
|
|
339
|
+
aspect: 16 / 9,
|
|
340
|
+
onCropChange: setCrop,
|
|
341
|
+
onZoomChange: setZoom,
|
|
342
|
+
onRotationChange: setRotation,
|
|
343
|
+
onCropComplete: (_, pixels) => setCroppedAreaPixels(pixels)
|
|
344
|
+
}
|
|
345
|
+
) }),
|
|
346
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4 px-6 py-3", children: [
|
|
347
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-4", children: [
|
|
348
|
+
/* @__PURE__ */ jsx("label", { className: "text-xs font-medium text-gray-500", children: "Zoom" }),
|
|
349
|
+
/* @__PURE__ */ jsx(
|
|
350
|
+
Slider,
|
|
351
|
+
{
|
|
352
|
+
className: "flex",
|
|
353
|
+
value: [zoom],
|
|
354
|
+
onValueChange: (vals) => setZoom(Array.isArray(vals) ? vals[0] ?? 1 : vals),
|
|
355
|
+
min: 1,
|
|
356
|
+
max: 3,
|
|
357
|
+
step: 0.1
|
|
358
|
+
}
|
|
359
|
+
)
|
|
360
|
+
] }),
|
|
361
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-4", children: [
|
|
362
|
+
/* @__PURE__ */ jsx("label", { className: "text-xs font-medium text-gray-500", children: "Rotation" }),
|
|
363
|
+
/* @__PURE__ */ jsx(
|
|
364
|
+
Slider,
|
|
365
|
+
{
|
|
366
|
+
className: "flex",
|
|
367
|
+
value: [rotation],
|
|
368
|
+
onValueChange: (vals) => setRotation(Array.isArray(vals) ? vals[0] ?? 0 : vals),
|
|
369
|
+
min: 0,
|
|
370
|
+
max: 360,
|
|
371
|
+
step: 1
|
|
372
|
+
}
|
|
373
|
+
)
|
|
374
|
+
] })
|
|
375
|
+
] })
|
|
376
|
+
]
|
|
377
|
+
}
|
|
378
|
+
),
|
|
379
|
+
/* @__PURE__ */ jsx(
|
|
380
|
+
TabsContent,
|
|
381
|
+
{
|
|
382
|
+
value: "library",
|
|
383
|
+
className: "m-3 bg-muted rounded-lg animate-tabs flex flex-col gap-3 px-6 py-4",
|
|
384
|
+
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: [
|
|
385
|
+
/* @__PURE__ */ jsx(Search, { className: "h-8 w-8 text-gray-300" }),
|
|
386
|
+
/* @__PURE__ */ jsx("p", { className: "mt-3 text-sm font-medium text-gray-500", children: "No images available" }),
|
|
387
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-gray-400", children: "Try uploading an image instead" })
|
|
388
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-2", children: libraryImages.map((src) => {
|
|
389
|
+
const isSelected = selectedImg === src;
|
|
390
|
+
return /* @__PURE__ */ jsxs(
|
|
391
|
+
"button",
|
|
392
|
+
{
|
|
393
|
+
type: "button",
|
|
394
|
+
onClick: () => setSelectedImg(src),
|
|
395
|
+
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"}`,
|
|
396
|
+
children: [
|
|
397
|
+
/* @__PURE__ */ jsx(
|
|
398
|
+
"img",
|
|
399
|
+
{
|
|
400
|
+
src,
|
|
401
|
+
alt: "",
|
|
402
|
+
className: "h-full w-full object-cover"
|
|
403
|
+
}
|
|
404
|
+
),
|
|
405
|
+
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" }) })
|
|
406
|
+
]
|
|
407
|
+
},
|
|
408
|
+
src
|
|
409
|
+
);
|
|
410
|
+
}) }) })
|
|
411
|
+
}
|
|
412
|
+
),
|
|
413
|
+
/* @__PURE__ */ jsxs(
|
|
414
|
+
TabsContent,
|
|
415
|
+
{
|
|
416
|
+
value: "upload",
|
|
417
|
+
className: "m-3 bg-muted rounded-lg animate-tabs flex flex-col items-center justify-center gap-4 px-6 py-14",
|
|
418
|
+
children: [
|
|
419
|
+
/* @__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" }) }),
|
|
420
|
+
/* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
421
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-gray-700", children: "Upload a new image to replace the current one" }),
|
|
422
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-gray-400", children: "Supports JPG, PNG, WebP formats" })
|
|
423
|
+
] }),
|
|
424
|
+
/* @__PURE__ */ jsxs(
|
|
425
|
+
Button,
|
|
426
|
+
{
|
|
427
|
+
variant: "outline",
|
|
428
|
+
size: "sm",
|
|
429
|
+
onClick: () => {
|
|
430
|
+
var _a;
|
|
431
|
+
return (_a = replaceInputRef.current) == null ? void 0 : _a.click();
|
|
432
|
+
},
|
|
433
|
+
disabled: isReplaceUploading,
|
|
434
|
+
children: [
|
|
435
|
+
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" }),
|
|
436
|
+
"Choose File"
|
|
437
|
+
]
|
|
438
|
+
}
|
|
439
|
+
),
|
|
440
|
+
/* @__PURE__ */ jsx(
|
|
441
|
+
"input",
|
|
442
|
+
{
|
|
443
|
+
ref: replaceInputRef,
|
|
444
|
+
type: "file",
|
|
445
|
+
accept: "image/*",
|
|
446
|
+
onChange: handleFileReplace,
|
|
447
|
+
className: "hidden"
|
|
448
|
+
}
|
|
449
|
+
)
|
|
450
|
+
]
|
|
451
|
+
}
|
|
452
|
+
)
|
|
453
|
+
]
|
|
454
|
+
}
|
|
455
|
+
)
|
|
456
|
+
}
|
|
457
|
+
),
|
|
458
|
+
/* @__PURE__ */ jsxs(
|
|
459
|
+
TabsContent,
|
|
460
|
+
{
|
|
461
|
+
value: "video",
|
|
462
|
+
className: "animate-tabs flex-none h-[360px] flex flex-col gap-4 px-6 py-6",
|
|
463
|
+
children: [
|
|
464
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
465
|
+
/* @__PURE__ */ jsx(Label, { className: "text-sm font-medium", children: "Video URL" }),
|
|
466
|
+
/* @__PURE__ */ jsx(
|
|
467
|
+
Input,
|
|
468
|
+
{
|
|
469
|
+
placeholder: "https://example.com/video.mp4",
|
|
470
|
+
value: videoUrl,
|
|
471
|
+
onChange: (e) => setVideoUrl(e.target.value)
|
|
472
|
+
}
|
|
473
|
+
),
|
|
474
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Supports .mp4, .webm, .mov, .ogg direct links" })
|
|
475
|
+
] }),
|
|
476
|
+
videoUrl.trim() && detectMediaType(videoUrl.trim()) === "video" && /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-md border bg-muted", children: /* @__PURE__ */ jsx(
|
|
477
|
+
"video",
|
|
478
|
+
{
|
|
479
|
+
src: videoUrl.trim(),
|
|
480
|
+
controls: true,
|
|
481
|
+
muted: true,
|
|
482
|
+
playsInline: true,
|
|
483
|
+
className: "h-48 w-full object-contain"
|
|
484
|
+
}
|
|
485
|
+
) })
|
|
486
|
+
]
|
|
487
|
+
}
|
|
488
|
+
),
|
|
489
|
+
/* @__PURE__ */ jsxs(
|
|
490
|
+
TabsContent,
|
|
491
|
+
{
|
|
492
|
+
value: "embed",
|
|
493
|
+
className: "animate-tabs flex-none h-[360px] flex flex-col gap-4 px-6 py-6",
|
|
494
|
+
children: [
|
|
495
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
496
|
+
/* @__PURE__ */ jsx(Label, { className: "text-sm font-medium", children: "YouTube / Vimeo URL" }),
|
|
497
|
+
/* @__PURE__ */ jsx(
|
|
498
|
+
Input,
|
|
499
|
+
{
|
|
500
|
+
placeholder: "https://www.youtube.com/watch?v=...",
|
|
501
|
+
value: embedUrl,
|
|
502
|
+
onChange: (e) => setEmbedUrl(e.target.value)
|
|
503
|
+
}
|
|
504
|
+
),
|
|
505
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Paste a YouTube or Vimeo link" })
|
|
506
|
+
] }),
|
|
507
|
+
embedUrl.trim() && detectMediaType(embedUrl.trim()) === "embed" && /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-md border bg-muted", children: /* @__PURE__ */ jsx(
|
|
508
|
+
"iframe",
|
|
509
|
+
{
|
|
510
|
+
src: getEmbedUrl(embedUrl.trim()),
|
|
511
|
+
className: "h-48 w-full",
|
|
512
|
+
allow: "autoplay; fullscreen",
|
|
513
|
+
allowFullScreen: true
|
|
514
|
+
}
|
|
515
|
+
) })
|
|
516
|
+
]
|
|
517
|
+
}
|
|
518
|
+
)
|
|
519
|
+
]
|
|
520
|
+
}
|
|
521
|
+
),
|
|
522
|
+
/* @__PURE__ */ jsx("div", { className: "border-t px-6 py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
523
|
+
/* @__PURE__ */ jsx(Label, { className: "flex-none", children: "Alt Text" }),
|
|
524
|
+
/* @__PURE__ */ jsx(
|
|
525
|
+
Input,
|
|
526
|
+
{
|
|
527
|
+
value: alt,
|
|
528
|
+
onChange: (e) => setAlt(e.target.value),
|
|
529
|
+
placeholder: "Media description..."
|
|
530
|
+
}
|
|
531
|
+
)
|
|
532
|
+
] }) }),
|
|
533
|
+
/* @__PURE__ */ jsxs(DialogFooter, { className: "border-t px-6 py-3", children: [
|
|
534
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClose, children: "Cancel" }),
|
|
535
|
+
/* @__PURE__ */ jsxs(Button, { size: "sm", disabled: !canDone, onClick: handleDone, children: [
|
|
536
|
+
isCropUploading && /* @__PURE__ */ jsx(Loader2, { className: "mr-1.5 h-3.5 w-3.5 animate-spin" }),
|
|
537
|
+
"Done"
|
|
538
|
+
] })
|
|
539
|
+
] })
|
|
540
|
+
] }) });
|
|
541
|
+
}
|
|
542
|
+
const EditableMedia = withEditable(CompoundMediaBase, {
|
|
543
|
+
type: "media",
|
|
544
|
+
fields: mediaField.objectFields
|
|
545
|
+
});
|
|
546
|
+
const CompoundMedia = (props) => {
|
|
547
|
+
const [dialogOpen, setDialogOpen] = useState(false);
|
|
548
|
+
const [dialogData, setDialogData] = useState(null);
|
|
549
|
+
const [onSaveCallback, setOnSaveCallback] = useState(null);
|
|
550
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
551
|
+
/* @__PURE__ */ jsx(
|
|
552
|
+
EditableMedia,
|
|
553
|
+
{
|
|
554
|
+
...props,
|
|
555
|
+
onEdit: (currentProps, onSave) => {
|
|
556
|
+
setDialogData(currentProps);
|
|
557
|
+
setOnSaveCallback(() => onSave);
|
|
558
|
+
setDialogOpen(true);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
),
|
|
562
|
+
dialogOpen && dialogData && onSaveCallback && /* @__PURE__ */ jsx(
|
|
563
|
+
MediaEditDialog,
|
|
564
|
+
{
|
|
565
|
+
open: dialogOpen,
|
|
566
|
+
onOpenChange: setDialogOpen,
|
|
567
|
+
initialData: dialogData,
|
|
568
|
+
onSave: onSaveCallback
|
|
569
|
+
}
|
|
570
|
+
)
|
|
571
|
+
] });
|
|
572
|
+
};
|
|
573
|
+
export {
|
|
574
|
+
CompoundMedia,
|
|
575
|
+
detectMediaType
|
|
576
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BaseSocialLink } from "@/components/puck-core/core/props/interactive";
|
|
2
|
+
export interface CompoundSocialLinksProps {
|
|
3
|
+
links: BaseSocialLink[];
|
|
4
|
+
iconClassName?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const CompoundSocialLinks: ({ links, iconClassName, className, }: CompoundSocialLinksProps) => import("react/jsx-runtime").JSX.Element | null;
|