dune-react 0.0.30 → 0.0.32
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 +4 -4
- package/dist/components/puck-block/faq-sections/stacked-static-faq/stacked-static-faq.js +7 -7
- 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.js +2 -2
- 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 +50 -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 +50 -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 +50 -10
- package/dist/components/puck-block/footer-sections/newsletter-top-links-footer/index.d.ts +50 -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 +81 -0
- package/dist/components/puck-block/header-sections/centered-navbar/index.js +8 -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 +81 -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 +80 -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 +80 -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 +53 -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 +53 -0
- package/dist/components/puck-block/header-sections/standard-navbar/index.js +5 -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 +18 -18
- 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 +4 -4
- 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 +6 -6
- package/dist/components/puck-block/hero-sections/tab-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/tab-hero/index.js +2 -2
- 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-card-grid/component.js +4 -4
- package/dist/components/puck-block/pricing-sections/props.d.ts +3 -3
- 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 +2 -2
- package/dist/components/puck-block/pricing-sections/tab-pricing-grid/component.d.ts +2 -2
- package/dist/components/puck-block/pricing-sections/tab-pricing-grid/component.js +4 -4
- package/dist/components/puck-block/pricing-sections/tab-single-pricing/component.d.ts +2 -2
- package/dist/components/puck-block/registry.generated.d.ts +694 -118
- 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 +4 -5
- 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 +6 -6
- 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 +7 -7
- 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 +5 -5
- package/dist/components/puck-block/testimonial-sections/props.d.ts +6 -7
- 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 +9 -9
- 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 +8 -8
- 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/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 +2 -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 +15 -12
- package/package.json +2 -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,6 +1,6 @@
|
|
|
1
1
|
import { ProseContent, ProseContentDefaults } from "./component.js";
|
|
2
2
|
import { headingField } from "../../../puck-core/core/props/content.js";
|
|
3
|
-
import {
|
|
3
|
+
import { mediaField } from "../../../puck-core/core/props/media.js";
|
|
4
4
|
import { textStyleFields } from "../props.js";
|
|
5
5
|
import { sectionWrapperFields } from "../../../puck-core/section-wrapper.js";
|
|
6
6
|
const conf = {
|
|
@@ -15,7 +15,7 @@ const conf = {
|
|
|
15
15
|
value: { type: "text" }
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
mediaImage:
|
|
18
|
+
mediaImage: mediaField,
|
|
19
19
|
video: { type: "text" },
|
|
20
20
|
styles: {
|
|
21
21
|
type: "object",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TextComponentProps, TextSectionBaseProps, BaseButton,
|
|
1
|
+
import type { TextComponentProps, TextSectionBaseProps, BaseButton, BaseMedia } from "../props";
|
|
2
2
|
type SubscribeBlock = {
|
|
3
3
|
title: string;
|
|
4
4
|
description: string;
|
|
@@ -9,7 +9,7 @@ type SubscribeBlock = {
|
|
|
9
9
|
type Contributor = {
|
|
10
10
|
name: string;
|
|
11
11
|
role: string;
|
|
12
|
-
avatar:
|
|
12
|
+
avatar: BaseMedia;
|
|
13
13
|
};
|
|
14
14
|
type SocialLink = {
|
|
15
15
|
platform: string;
|
|
@@ -169,7 +169,7 @@ declare const conf: {
|
|
|
169
169
|
contributors?: {
|
|
170
170
|
name: string;
|
|
171
171
|
role: string;
|
|
172
|
-
avatar: import("@/components/puck-core/core/props/media").
|
|
172
|
+
avatar: import("@/components/puck-core/core/props/media").BaseMedia;
|
|
173
173
|
}[];
|
|
174
174
|
socialLinks?: {
|
|
175
175
|
platform: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { Dialog, DialogTrigger, DialogContent } from "../../../shadcn/dialog.js";
|
|
5
|
-
import {
|
|
5
|
+
import { CompoundMedia } from "../../../puck-base/media.js";
|
|
6
6
|
import { FaCirclePlay } from "../../../../node_modules/.pnpm/react-icons@5.6.0_react@19.2.4/node_modules/react-icons/fa6/index.js";
|
|
7
7
|
import { CgSpinner } from "../../../../node_modules/.pnpm/react-icons@5.6.0_react@19.2.4/node_modules/react-icons/cg/index.js";
|
|
8
8
|
import { cn } from "../../../../utils/css-utils.js";
|
|
@@ -11,7 +11,7 @@ const SideMediaContent = (props) => {
|
|
|
11
11
|
const {
|
|
12
12
|
heading,
|
|
13
13
|
prose,
|
|
14
|
-
|
|
14
|
+
media = { src: "", alt: "" },
|
|
15
15
|
video,
|
|
16
16
|
styles
|
|
17
17
|
} = {
|
|
@@ -30,7 +30,7 @@ const SideMediaContent = (props) => {
|
|
|
30
30
|
if (mediaType === "video") {
|
|
31
31
|
return /* @__PURE__ */ jsxs(Dialog, { children: [
|
|
32
32
|
/* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("button", { className: "relative flex w-full items-center justify-center", children: [
|
|
33
|
-
/* @__PURE__ */ jsx(
|
|
33
|
+
/* @__PURE__ */ jsx(CompoundMedia, { src: media.src, alt: media.alt, className: "size-full object-cover" }),
|
|
34
34
|
/* @__PURE__ */ jsx("span", { className: "absolute inset-0 z-10 bg-black/50" }),
|
|
35
35
|
/* @__PURE__ */ jsx(FaCirclePlay, { className: "absolute z-20 size-16 text-white" })
|
|
36
36
|
] }) }),
|
|
@@ -52,7 +52,7 @@ const SideMediaContent = (props) => {
|
|
|
52
52
|
] })
|
|
53
53
|
] });
|
|
54
54
|
}
|
|
55
|
-
return /* @__PURE__ */ jsx(
|
|
55
|
+
return /* @__PURE__ */ jsx(CompoundMedia, { src: media.src, className: "w-full object-cover", alt: media.alt });
|
|
56
56
|
};
|
|
57
57
|
const textContent = /* @__PURE__ */ jsxs("div", { children: [
|
|
58
58
|
/* @__PURE__ */ jsx("h2", { className: "rb-5 mb-5 text-5xl font-bold md:mb-6 md:text-7xl lg:text-8xl", children: heading }),
|
|
@@ -69,7 +69,7 @@ const SideMediaContent = (props) => {
|
|
|
69
69
|
const SideMediaContentDefaults = {
|
|
70
70
|
heading: "Short heading goes here",
|
|
71
71
|
prose: `<p>Morbi sed imperdiet in ipsum, adipiscing elit dui lectus. Tellus id scelerisque est ultricies ultricies. Duis est sit sed leo nisl, blandit elit sagittis. Quisque tristique consequat quam sed. Nisl at scelerisque amet nulla purus habitasse.</p><p>Nunc sed faucibus bibendum feugiat sed interdum. Ipsum egestas condimentum mi massa. In tincidunt pharetra consectetur sed duis facilisis metus. Etiam egestas in nec sed et. Quis lobortis at sit dictum eget nibh tortor commodo cursus.</p>`,
|
|
72
|
-
|
|
72
|
+
media: {
|
|
73
73
|
src: "https://picsum.photos/seed/side-media/800/600",
|
|
74
74
|
alt: "Placeholder image"
|
|
75
75
|
},
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { SideMediaContent, SideMediaContentDefaults } from "./component.js";
|
|
2
2
|
import { headingField } from "../../../puck-core/core/props/content.js";
|
|
3
|
-
import {
|
|
3
|
+
import { mediaField } from "../../../puck-core/core/props/media.js";
|
|
4
4
|
import { textStyleFields } from "../props.js";
|
|
5
5
|
import { sectionWrapperFields } from "../../../puck-core/section-wrapper.js";
|
|
6
6
|
const conf = {
|
|
7
7
|
fields: {
|
|
8
8
|
heading: headingField,
|
|
9
9
|
prose: { type: "textarea" },
|
|
10
|
-
|
|
10
|
+
media: mediaField,
|
|
11
11
|
video: { type: "text" },
|
|
12
12
|
styles: {
|
|
13
13
|
type: "object",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { TextComponentProps, TextSectionBaseProps,
|
|
1
|
+
import type { TextComponentProps, TextSectionBaseProps, BaseMedia } from "../props";
|
|
2
2
|
type StickyTextMultiImageExtra = {
|
|
3
3
|
prose: string;
|
|
4
|
-
|
|
4
|
+
medias: BaseMedia[];
|
|
5
5
|
};
|
|
6
6
|
export type StickyTextMultiImageProps = TextComponentProps<StickyTextMultiImageExtra>;
|
|
7
7
|
export declare const StickyTextMultiImage: (props: StickyTextMultiImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { CompoundMedia } from "../../../puck-base/media.js";
|
|
3
3
|
import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
|
|
4
4
|
import { cn } from "../../../../utils/css-utils.js";
|
|
5
5
|
const StickyTextMultiImage = (props) => {
|
|
6
6
|
const {
|
|
7
7
|
heading,
|
|
8
8
|
prose,
|
|
9
|
-
|
|
9
|
+
medias = [],
|
|
10
10
|
styles
|
|
11
11
|
} = {
|
|
12
12
|
...StickyTextMultiImageDefaults,
|
|
@@ -22,7 +22,7 @@ const StickyTextMultiImage = (props) => {
|
|
|
22
22
|
/* @__PURE__ */ jsx("h2", { className: "rb-5 mb-5 text-5xl font-bold md:mb-6 md:text-7xl lg:text-8xl", children: heading }),
|
|
23
23
|
/* @__PURE__ */ jsx("div", { className: "prose", dangerouslySetInnerHTML: { __html: prose } })
|
|
24
24
|
] });
|
|
25
|
-
const imagesContent = /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-6 md:gap-8", children:
|
|
25
|
+
const imagesContent = /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-6 md:gap-8", children: medias.map((img, index) => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(CompoundMedia, { src: img.src, alt: img.alt, className: "w-full object-cover" }) }, index)) });
|
|
26
26
|
return /* @__PURE__ */ jsx(SectionWrapper, { className: cn("px-[5%] py-8 md:py-12 lg:py-14", sectionClassName), style: sectionStyle, css, children: /* @__PURE__ */ jsx("div", { className: "container", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 items-start gap-x-12 gap-y-16 md:gap-y-20 lg:grid-cols-[1fr_1.5fr] lg:gap-x-20", children: contentPosition === "left" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27
27
|
textContent,
|
|
28
28
|
imagesContent
|
|
@@ -34,7 +34,7 @@ const StickyTextMultiImage = (props) => {
|
|
|
34
34
|
const StickyTextMultiImageDefaults = {
|
|
35
35
|
heading: "Short heading goes here",
|
|
36
36
|
prose: `<p>Morbi sed imperdiet in ipsum, adipiscing elit dui lectus. Tellus id scelerisque est ultricies ultricies. Duis est sit sed leo nisl, blandit elit sagittis. Quisque tristique consequat quam sed. Nisl at scelerisque amet nulla purus habitasse.</p><p>Nunc sed faucibus bibendum feugiat sed interdum. Ipsum egestas condimentum mi massa. In tincidunt pharetra consectetur sed duis facilisis metus.</p>`,
|
|
37
|
-
|
|
37
|
+
medias: [
|
|
38
38
|
{ src: "https://picsum.photos/seed/sticky-img1/800/600", alt: "Placeholder image 1" },
|
|
39
39
|
{ src: "https://picsum.photos/seed/sticky-img2/800/600", alt: "Placeholder image 2" },
|
|
40
40
|
{ src: "https://picsum.photos/seed/sticky-img3/800/600", alt: "Placeholder image 3" }
|
|
@@ -11,7 +11,7 @@ declare const conf: {
|
|
|
11
11
|
prose: {
|
|
12
12
|
type: string;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
medias: {
|
|
15
15
|
readonly type: "array";
|
|
16
16
|
readonly max: 10;
|
|
17
17
|
readonly getItemSummary: (item: {
|
|
@@ -70,7 +70,7 @@ declare const conf: {
|
|
|
70
70
|
};
|
|
71
71
|
defaultProps: Partial<import("../props").TextSectionBaseProps> & {
|
|
72
72
|
prose: string;
|
|
73
|
-
|
|
73
|
+
medias: import("@/components/puck-core/core/props/media").BaseMedia[];
|
|
74
74
|
};
|
|
75
75
|
render: (props: StickyTextMultiImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
76
76
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { StickyTextMultiImage, StickyTextMultiImageDefaults } from "./component.js";
|
|
2
2
|
import { headingField } from "../../../puck-core/core/props/content.js";
|
|
3
|
-
import {
|
|
3
|
+
import { mediasField } from "../../../puck-core/core/props/media.js";
|
|
4
4
|
import { textStyleFields } from "../props.js";
|
|
5
5
|
import { sectionWrapperFields } from "../../../puck-core/section-wrapper.js";
|
|
6
6
|
const conf = {
|
|
7
7
|
fields: {
|
|
8
8
|
heading: headingField,
|
|
9
9
|
prose: { type: "textarea" },
|
|
10
|
-
|
|
10
|
+
medias: mediasField,
|
|
11
11
|
styles: {
|
|
12
12
|
type: "object",
|
|
13
13
|
label: "Styles",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TextComponentProps, TextSectionBaseProps,
|
|
1
|
+
import type { TextComponentProps, TextSectionBaseProps, BaseMedia } from "../props";
|
|
2
2
|
type TextHeaderExtra = {
|
|
3
|
-
bgImage?:
|
|
3
|
+
bgImage?: BaseMedia;
|
|
4
4
|
bgVideo?: string;
|
|
5
5
|
};
|
|
6
6
|
export type TextHeaderProps = TextComponentProps<TextHeaderExtra>;
|
|
@@ -256,7 +256,7 @@ declare const conf: {
|
|
|
256
256
|
};
|
|
257
257
|
};
|
|
258
258
|
defaultProps: Partial<import("../props").TextSectionBaseProps> & {
|
|
259
|
-
bgImage?: import("@/components/puck-core/core/props/media").
|
|
259
|
+
bgImage?: import("@/components/puck-core/core/props/media").BaseMedia;
|
|
260
260
|
bgVideo?: string;
|
|
261
261
|
};
|
|
262
262
|
render: (props: TextHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,6 +19,8 @@ type EditorContextValue = {
|
|
|
19
19
|
sitePages?: SitePage[];
|
|
20
20
|
/** Google Maps API Key,用于 LocationField 地址搜索 */
|
|
21
21
|
googleMapsApiKey?: string;
|
|
22
|
+
/** 品牌 ID,用于资产库归属 */
|
|
23
|
+
brandId?: string;
|
|
22
24
|
};
|
|
23
25
|
export declare const EditorContextProvider: import("react").Provider<EditorContextValue>;
|
|
24
26
|
export declare const useEditorContext: () => EditorContextValue;
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
* 迁移对照:
|
|
8
8
|
* interactive.ts → action / button / badge / icon / link
|
|
9
9
|
* content.ts → heading / description / feature / card
|
|
10
|
-
* media.ts →
|
|
10
|
+
* media.ts → media / medias
|
|
11
11
|
* form.ts → form / field / location
|
|
12
12
|
* section.ts → padding / sectionStyle
|
|
13
13
|
*/
|
|
14
14
|
export { iconField as icon, actionField as action, actionDefaults, buttonField as button, buttonDefaults, buttonsField as buttons, badgeField as badge, } from "./props/interactive";
|
|
15
15
|
export { headingField as heading, descriptionField as description, featuresField as features, contentFields, contentFieldsWithFeatures, cardField as card, cardsField as cards, } from "./props";
|
|
16
|
-
export {
|
|
16
|
+
export { mediaField as media, mediasField as medias, getPlaceholderMediaUrl, media16x9Placeholder, media1x1Placeholder, media9x16Placeholder, } from "./props/media";
|
|
17
17
|
export { formFieldField as field, formFieldDefaults as fieldDefaults, formField as form, formDefaults, } from "./props/form";
|
|
18
18
|
export { type MapLocation, getMapEmbedUrl, getDirectionsUrl, locationDefaults, locationField as location, } from "./props/form";
|
|
19
19
|
export * from "./styles";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* 每个 prop 按 Type → Field → Defaults 顺序排列
|
|
6
6
|
*/
|
|
7
7
|
import type { IconName } from "./interactive";
|
|
8
|
-
import type {
|
|
8
|
+
import type { BaseMedia } from "./media";
|
|
9
9
|
export declare const headingField: {
|
|
10
10
|
readonly type: "text";
|
|
11
11
|
readonly contentEditable: true;
|
|
@@ -19,8 +19,8 @@ export interface BaseFeatureItem {
|
|
|
19
19
|
name?: string;
|
|
20
20
|
description?: string;
|
|
21
21
|
}
|
|
22
|
-
export interface
|
|
23
|
-
|
|
22
|
+
export interface FeatureItemWithMedia extends BaseFeatureItem {
|
|
23
|
+
media?: BaseMedia;
|
|
24
24
|
}
|
|
25
25
|
export type Feature = {
|
|
26
26
|
icon?: IconName;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* 使用方:import { BaseButton, buttonField, ... } from "@/components/puck-core/core/props"
|
|
6
6
|
*/
|
|
7
7
|
export { type IconName, iconField, type ActionType, type Action, resolveActionUrl, actionField, actionDefaults, type ButtonVariant, type ButtonSize, type BaseButton, buttonField, buttonDefaults, buttonsField, type BadgeVariant, type BaseBadge, badgeField, type BaseLink, type BaseSocialLink, } from "./interactive";
|
|
8
|
-
export { headingField, descriptionField, type BaseFeatureItem, type
|
|
9
|
-
export { type
|
|
8
|
+
export { headingField, descriptionField, type BaseFeatureItem, type FeatureItemWithMedia, type Feature, featuresField, cardField, cardsField, } from "./content";
|
|
9
|
+
export { type BaseMedia, mediaField, mediasField, getPlaceholderMediaUrl, media16x9Placeholder, media1x1Placeholder, media9x16Placeholder, } from "./media";
|
|
10
10
|
export { fieldTypes, type FieldTypes, type CompoundFieldProps, formMethods, type FormMethods, type CompoundFormProps, type BaseFormFieldType, type BaseFormField, formFieldField, formFieldDefaults, formField, formDefaults, type MapLocation, getMapEmbedUrl, getDirectionsUrl, locationDefaults, locationField, } from "./form";
|
|
11
11
|
export { type PaddingLevel, type SectionPadding, type BaseSectionStyle, type BaseSectionStyles, } from "./section";
|
|
12
12
|
/** heading + description + badge + buttons */
|
|
@@ -2,6 +2,7 @@ import { buttonsField, badgeField } from "./interactive.js";
|
|
|
2
2
|
import { actionDefaults, actionField, buttonDefaults, buttonField, iconField, resolveActionUrl } from "./interactive.js";
|
|
3
3
|
import { descriptionField, headingField, featuresField } from "./content.js";
|
|
4
4
|
import { cardField, cardsField } from "./content.js";
|
|
5
|
+
import { getPlaceholderMediaUrl, media16x9Placeholder, media1x1Placeholder, media9x16Placeholder, mediaField, mediasField } from "./media.js";
|
|
5
6
|
const contentFields = {
|
|
6
7
|
heading: headingField,
|
|
7
8
|
description: descriptionField,
|
|
@@ -28,7 +29,13 @@ export {
|
|
|
28
29
|
contentFieldsWithFeatures,
|
|
29
30
|
descriptionField,
|
|
30
31
|
featuresField,
|
|
32
|
+
getPlaceholderMediaUrl,
|
|
31
33
|
headingField,
|
|
32
34
|
iconField,
|
|
35
|
+
media16x9Placeholder,
|
|
36
|
+
media1x1Placeholder,
|
|
37
|
+
media9x16Placeholder,
|
|
38
|
+
mediaField,
|
|
39
|
+
mediasField,
|
|
33
40
|
resolveActionUrl
|
|
34
41
|
};
|
|
@@ -238,7 +238,50 @@ export interface BaseLink {
|
|
|
238
238
|
label: string;
|
|
239
239
|
action?: Action;
|
|
240
240
|
}
|
|
241
|
+
export type SocialPlatform = "twitter" | "facebook" | "instagram" | "linkedin" | "youtube" | "github" | "tiktok" | "discord";
|
|
241
242
|
export interface BaseSocialLink {
|
|
242
|
-
platform:
|
|
243
|
+
platform: SocialPlatform;
|
|
243
244
|
url: string;
|
|
244
245
|
}
|
|
246
|
+
export declare const socialLinksField: {
|
|
247
|
+
readonly type: "array";
|
|
248
|
+
readonly label: "Social Links";
|
|
249
|
+
readonly getItemSummary: (item: {
|
|
250
|
+
platform?: string;
|
|
251
|
+
}, i?: number) => string;
|
|
252
|
+
readonly arrayFields: {
|
|
253
|
+
readonly platform: {
|
|
254
|
+
readonly type: "select";
|
|
255
|
+
readonly label: "Platform";
|
|
256
|
+
readonly options: readonly [{
|
|
257
|
+
readonly label: "Twitter / X";
|
|
258
|
+
readonly value: "twitter";
|
|
259
|
+
}, {
|
|
260
|
+
readonly label: "Facebook";
|
|
261
|
+
readonly value: "facebook";
|
|
262
|
+
}, {
|
|
263
|
+
readonly label: "Instagram";
|
|
264
|
+
readonly value: "instagram";
|
|
265
|
+
}, {
|
|
266
|
+
readonly label: "LinkedIn";
|
|
267
|
+
readonly value: "linkedin";
|
|
268
|
+
}, {
|
|
269
|
+
readonly label: "YouTube";
|
|
270
|
+
readonly value: "youtube";
|
|
271
|
+
}, {
|
|
272
|
+
readonly label: "GitHub";
|
|
273
|
+
readonly value: "github";
|
|
274
|
+
}, {
|
|
275
|
+
readonly label: "TikTok";
|
|
276
|
+
readonly value: "tiktok";
|
|
277
|
+
}, {
|
|
278
|
+
readonly label: "Discord";
|
|
279
|
+
readonly value: "discord";
|
|
280
|
+
}];
|
|
281
|
+
};
|
|
282
|
+
readonly url: {
|
|
283
|
+
readonly type: "text";
|
|
284
|
+
readonly label: "URL";
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
};
|
|
@@ -106,6 +106,28 @@ const badgeField = {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
|
+
const socialLinksField = {
|
|
110
|
+
type: "array",
|
|
111
|
+
label: "Social Links",
|
|
112
|
+
getItemSummary: (item, i = 0) => item.platform || `Social ${i + 1}`,
|
|
113
|
+
arrayFields: {
|
|
114
|
+
platform: {
|
|
115
|
+
type: "select",
|
|
116
|
+
label: "Platform",
|
|
117
|
+
options: [
|
|
118
|
+
{ label: "Twitter / X", value: "twitter" },
|
|
119
|
+
{ label: "Facebook", value: "facebook" },
|
|
120
|
+
{ label: "Instagram", value: "instagram" },
|
|
121
|
+
{ label: "LinkedIn", value: "linkedin" },
|
|
122
|
+
{ label: "YouTube", value: "youtube" },
|
|
123
|
+
{ label: "GitHub", value: "github" },
|
|
124
|
+
{ label: "TikTok", value: "tiktok" },
|
|
125
|
+
{ label: "Discord", value: "discord" }
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
url: { type: "text", label: "URL" }
|
|
129
|
+
}
|
|
130
|
+
};
|
|
109
131
|
export {
|
|
110
132
|
actionDefaults,
|
|
111
133
|
actionField,
|
|
@@ -114,5 +136,6 @@ export {
|
|
|
114
136
|
buttonField,
|
|
115
137
|
buttonsField,
|
|
116
138
|
iconField,
|
|
117
|
-
resolveActionUrl
|
|
139
|
+
resolveActionUrl,
|
|
140
|
+
socialLinksField
|
|
118
141
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 媒体类 Props — 图片 / 视频 /
|
|
2
|
+
* 媒体类 Props — 图片 / 视频 / Embed
|
|
3
3
|
*
|
|
4
4
|
* 每个 prop 按 Type → Field → Defaults 顺序排列
|
|
5
5
|
*/
|
|
6
6
|
import type { Field } from "@puckeditor/core";
|
|
7
|
-
export interface
|
|
7
|
+
export interface BaseMedia {
|
|
8
8
|
src: string;
|
|
9
9
|
alt?: string;
|
|
10
10
|
aspectRatio?: "16x9" | "1x1" | "9x16" | "4x3" | "auto";
|
|
11
11
|
className?: string;
|
|
12
12
|
}
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const mediaField: {
|
|
14
14
|
type: "object";
|
|
15
15
|
objectFields: {
|
|
16
16
|
src: Field<string>;
|
|
@@ -19,20 +19,20 @@ export declare const imageField: {
|
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
22
|
+
export declare const getPlaceholderMediaUrl: (size: string, text?: string) => string;
|
|
23
|
+
export declare const media16x9Placeholder: {
|
|
24
24
|
alt: string;
|
|
25
25
|
src: string;
|
|
26
26
|
};
|
|
27
|
-
export declare const
|
|
27
|
+
export declare const media1x1Placeholder: {
|
|
28
28
|
alt: string;
|
|
29
29
|
src: string;
|
|
30
30
|
};
|
|
31
|
-
export declare const
|
|
31
|
+
export declare const media9x16Placeholder: {
|
|
32
32
|
alt: string;
|
|
33
33
|
src: string;
|
|
34
34
|
};
|
|
35
|
-
export declare const
|
|
35
|
+
export declare const mediasField: {
|
|
36
36
|
readonly type: "array";
|
|
37
37
|
readonly max: 10;
|
|
38
38
|
readonly getItemSummary: (item: {
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
1
|
+
import { MediaUploadField } from "../../fields/media-upload-field.js";
|
|
2
|
+
const mediaField = {
|
|
3
3
|
type: "object",
|
|
4
4
|
objectFields: {
|
|
5
5
|
src: {
|
|
6
6
|
type: "custom",
|
|
7
|
-
label: "
|
|
8
|
-
render:
|
|
7
|
+
label: "Media",
|
|
8
|
+
render: MediaUploadField
|
|
9
9
|
},
|
|
10
10
|
alt: { type: "text" }
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
|
-
const
|
|
13
|
+
const getPlaceholderMediaUrl = (size, text = "Placeholder Image") => {
|
|
14
14
|
const [w, h] = size.split("x");
|
|
15
15
|
return `https://picsum.photos/seed/${encodeURIComponent(text)}/${w}/${h}`;
|
|
16
16
|
};
|
|
17
|
-
const
|
|
17
|
+
const media16x9Placeholder = {
|
|
18
18
|
alt: "16/9 aspect ratio accessible description of the image",
|
|
19
|
-
src:
|
|
19
|
+
src: getPlaceholderMediaUrl("1920x1080")
|
|
20
20
|
};
|
|
21
|
-
const
|
|
21
|
+
const media1x1Placeholder = {
|
|
22
22
|
alt: "1/1 aspect ratio An accessible description of the image",
|
|
23
|
-
src:
|
|
23
|
+
src: getPlaceholderMediaUrl("1000x1000")
|
|
24
24
|
};
|
|
25
|
-
const
|
|
25
|
+
const media9x16Placeholder = {
|
|
26
26
|
alt: "9/16 accessible description of the image",
|
|
27
|
-
src:
|
|
27
|
+
src: getPlaceholderMediaUrl("1080x1920")
|
|
28
28
|
};
|
|
29
|
-
const
|
|
29
|
+
const mediasField = {
|
|
30
30
|
type: "array",
|
|
31
31
|
max: 10,
|
|
32
32
|
getItemSummary: (item, index = 0) => {
|
|
33
33
|
if (item.alt) {
|
|
34
34
|
return `${item.alt.slice(0, 12)}${item.alt.length > 12 ? "..." : ""}`;
|
|
35
35
|
}
|
|
36
|
-
return `
|
|
36
|
+
return `Media ${index + 1}`;
|
|
37
37
|
},
|
|
38
38
|
arrayFields: {
|
|
39
|
-
...
|
|
39
|
+
...mediaField.objectFields
|
|
40
40
|
},
|
|
41
|
-
defaultItemProps:
|
|
41
|
+
defaultItemProps: media16x9Placeholder
|
|
42
42
|
};
|
|
43
43
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
getPlaceholderMediaUrl,
|
|
45
|
+
media16x9Placeholder,
|
|
46
|
+
media1x1Placeholder,
|
|
47
|
+
media9x16Placeholder,
|
|
48
|
+
mediaField,
|
|
49
|
+
mediasField
|
|
50
50
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../utils/css-utils.js";
|
|
3
|
+
function InstagramIcon(props) {
|
|
4
|
+
return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9S287.7 141 224.1 141m0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7s74.7 33.5 74.7 74.7s-33.6 74.7-74.7 74.7m146.4-194.3c0 14.9-12 26.8-26.8 26.8c-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8s26.8 12 26.8 26.8m76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9c-26.2-26.2-58-34.4-93.9-36.2c-37-2.1-147.9-2.1-184.9 0c-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9c1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0c35.9-1.7 67.7-9.9 93.9-36.2c26.2-26.2 34.4-58 36.2-93.9c2.1-37 2.1-147.8 0-184.8M398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6c-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6c-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6c29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6c11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1" }) });
|
|
5
|
+
}
|
|
6
|
+
function FacebookIcon(props) {
|
|
7
|
+
return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M512 256C512 114.6 397.4 0 256 0S0 114.6 0 256c0 120 82.7 220.8 194.2 248.5V334.2h-52.8V256h52.8v-33.7c0-87.1 39.4-127.5 125-127.5c16.2 0 44.2 3.2 55.7 6.4V172c-6-.6-16.5-1-29.6-1c-42 0-58.2 15.9-58.2 57.2V256h83.6l-14.4 78.2H287v175.9C413.8 494.8 512 386.9 512 256" }) });
|
|
8
|
+
}
|
|
9
|
+
function XTwitterIcon(props) {
|
|
10
|
+
return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M389.2 48h70.6L305.6 224.2L487 464H345L233.7 318.6L106.5 464H35.8l164.9-188.5L26.8 48h145.6l100.5 132.9zm-24.8 373.8h39.1L151.1 88h-42z" }) });
|
|
11
|
+
}
|
|
12
|
+
function YouTubeIcon(props) {
|
|
13
|
+
return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M508.64 148.79c0-45-33.1-81.2-74-81.2C379.24 65 322.74 64 265 64h-18c-57.6 0-114.2 1-169.6 3.6C36.6 67.6 3.5 104 3.5 149C1 184.59-.06 220.19 0 255.79q-.15 53.4 3.4 106.9c0 45 33.1 81.5 73.9 81.5c58.2 2.7 117.9 3.9 178.6 3.8q91.2.3 178.6-3.8c40.9 0 74-36.5 74-81.5c2.4-35.7 3.5-71.3 3.4-107q.34-53.4-3.26-106.9M207 353.89v-196.5l145 98.2Z" }) });
|
|
14
|
+
}
|
|
15
|
+
function LinkedInIcon(props) {
|
|
16
|
+
return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3M135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5c0 21.3-17.2 38.5-38.5 38.5m282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7c-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5c67.2 0 79.7 44.3 79.7 101.9z" }) });
|
|
17
|
+
}
|
|
18
|
+
function TikTokIcon(props) {
|
|
19
|
+
return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M448 209.91a210.06 210.06 0 0 1-122.77-39.25v178.72A162.55 162.55 0 1 1 185 188.31v89.89a74.62 74.62 0 1 0 52.23 71.18V0h88a121 121 0 0 0 1.86 22.17A122.18 122.18 0 0 0 381 102.39a121.43 121.43 0 0 0 67 20.14Z" }) });
|
|
20
|
+
}
|
|
21
|
+
function GitHubIcon(props) {
|
|
22
|
+
return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 496 512", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M165.9 397.4c0 2-2.3 3.6-5.2 3.6c-3.3.3-5.6-1.3-5.6-3.6c0-2 2.3-3.6 5.2-3.6c3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9c2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9c.3 2 2.9 3.3 5.9 2.6c2.9-.7 4.9-2.6 4.6-4.6c-.3-1.9-3-3.2-5.9-2.9M244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2c12.8 2.3 17.3-5.6 17.3-12.1c0-6.2-.3-40.4-.3-61.4c0 0-70 15-84.7-29.8c0 0-11.4-29.1-27.8-36.6c0 0-22.9-15.7 1.6-15.4c0 0 24.9 2 38.6 25.8c21.9 38.6 58.6 27.5 72.9 20.9c2.3-16 8.8-27.1 16-33.7c-55.9-6.2-112.3-14.3-112.3-110.5c0-27.5 7.6-41.3 23.6-58.9c-2.6-6.5-11.1-33.3 2.6-67.9c20.9-6.5 69 27 69 27c20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27c13.7 34.7 5.2 61.4 2.6 67.9c16 17.7 25.8 31.5 25.8 58.9c0 96.5-58.9 104.2-114.8 110.5c9.2 7.9 17 22.9 17 46.4c0 33.7-.3 75.4-.3 83.6c0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252C496 113.3 383.5 8 244.8 8M97.2 352.9c-1.3 1-1 3.3.7 5.2c1.6 1.6 3.9 2.3 5.2 1c1.3-1 1-3.3-.7-5.2c-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9c1.6 1 3.6.7 4.3-.7c.7-1.3-.3-2.9-2.3-3.9c-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2c2.3 2.3 5.2 2.6 6.5 1c1.3-1.3.7-4.3-1.3-6.2c-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2c-1.4-2.3-4-3.3-5.6-2" }) });
|
|
23
|
+
}
|
|
24
|
+
function DiscordIcon(props) {
|
|
25
|
+
return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 512", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M524.531 69.836a1.5 1.5 0 0 0-.764-.7A485 485 0 0 0 404.081 32.03a1.82 1.82 0 0 0-1.923.91a338 338 0 0 0-14.9 30.6a447.9 447.9 0 0 0-134.426 0a310 310 0 0 0-15.135-30.6a1.89 1.89 0 0 0-1.924-.91a483.7 483.7 0 0 0-119.688 37.107a1.7 1.7 0 0 0-.788.676C39.068 183.651 18.186 294.69 28.43 404.354a2.02 2.02 0 0 0 .765 1.375a487.7 487.7 0 0 0 146.825 74.189a1.9 1.9 0 0 0 2.063-.676A348 348 0 0 0 208.12 430.4a1.86 1.86 0 0 0-1.019-2.588a321 321 0 0 1-45.868-21.853a1.885 1.885 0 0 1-.185-3.126a251 251 0 0 0 9.109-7.137a1.82 1.82 0 0 1 1.9-.256c96.229 43.917 200.41 43.917 295.5 0a1.81 1.81 0 0 1 1.924.233a235 235 0 0 0 9.132 7.16a1.884 1.884 0 0 1-.162 3.126a301.4 301.4 0 0 1-45.89 21.83a1.875 1.875 0 0 0-1 2.611a391 391 0 0 0 30.014 48.815a1.86 1.86 0 0 0 2.063.7A486 486 0 0 0 610.7 405.729a1.88 1.88 0 0 0 .765-1.352c12.264-126.783-20.532-236.912-86.934-334.541M222.491 337.58c-28.972 0-52.844-26.587-52.844-59.239s23.409-59.241 52.844-59.241c29.665 0 53.306 26.82 52.843 59.239c0 32.654-23.41 59.241-52.843 59.241m195.38 0c-28.971 0-52.843-26.587-52.843-59.239s23.409-59.241 52.843-59.241c29.667 0 53.307 26.82 52.844 59.239c0 32.654-23.177 59.241-52.844 59.241" }) });
|
|
26
|
+
}
|
|
27
|
+
const platformConfig = {
|
|
28
|
+
twitter: { icon: XTwitterIcon, color: "#000000" },
|
|
29
|
+
facebook: { icon: FacebookIcon, color: "#1877F2" },
|
|
30
|
+
instagram: { icon: InstagramIcon, color: "#E4405F" },
|
|
31
|
+
linkedin: { icon: LinkedInIcon, color: "#0A66C2" },
|
|
32
|
+
youtube: { icon: YouTubeIcon, color: "#FF0000" },
|
|
33
|
+
github: { icon: GitHubIcon, color: "#181717" },
|
|
34
|
+
tiktok: { icon: TikTokIcon, color: "#000000" },
|
|
35
|
+
discord: { icon: DiscordIcon, color: "#5865F2" }
|
|
36
|
+
};
|
|
37
|
+
function SocialIcon({
|
|
38
|
+
platform,
|
|
39
|
+
className = "size-6"
|
|
40
|
+
}) {
|
|
41
|
+
const config = platformConfig[platform];
|
|
42
|
+
if (!config) return null;
|
|
43
|
+
const { icon: Icon, color } = config;
|
|
44
|
+
return /* @__PURE__ */ jsx(Icon, { className: cn(className), style: { color } });
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
SocialIcon
|
|
48
|
+
};
|
|
@@ -6,7 +6,7 @@ import { usePuckDispatch, usePuckAppState } from "./hooks.js";
|
|
|
6
6
|
import { Pencil } from "lucide-react";
|
|
7
7
|
import { useEditorContext } from "./context/editor-context.js";
|
|
8
8
|
import set from "../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/set.js";
|
|
9
|
-
const BLOCK_LEVEL_TYPES = /* @__PURE__ */ new Set(["image"]);
|
|
9
|
+
const BLOCK_LEVEL_TYPES = /* @__PURE__ */ new Set(["image", "media"]);
|
|
10
10
|
function getComponentIdFromDOM(el) {
|
|
11
11
|
if (!el) return null;
|
|
12
12
|
const puckEl = el.closest("[data-puck-component]");
|
|
@@ -26,16 +26,20 @@ function withEditable(Component, config) {
|
|
|
26
26
|
}, [isBlock]);
|
|
27
27
|
const getLocation = useCallback(() => {
|
|
28
28
|
const componentId = getComponentIdFromDOM(wrapperRef.current);
|
|
29
|
+
console.log("[withEditable] getLocation — componentId:", componentId, "hasData:", !!(appState == null ? void 0 : appState.data));
|
|
29
30
|
if (!componentId || !(appState == null ? void 0 : appState.data)) return null;
|
|
30
31
|
const component = findComponentById(appState.data, componentId);
|
|
32
|
+
console.log("[withEditable] getLocation — component found:", !!component);
|
|
31
33
|
if (!component) return null;
|
|
32
34
|
const propPath = findPropPath(component.props, props, config.fields);
|
|
35
|
+
console.log("[withEditable] getLocation — propPath:", propPath, "fieldKeys:", Object.keys(config.fields), "targetProps:", { src: props.src, alt: props.alt });
|
|
33
36
|
if (propPath === null) return null;
|
|
34
37
|
return { componentId, propPath };
|
|
35
38
|
}, [appState == null ? void 0 : appState.data, props]);
|
|
36
39
|
const handleSave = useCallback(
|
|
37
40
|
(updated) => {
|
|
38
41
|
const location = getLocation();
|
|
42
|
+
console.log("[withEditable] handleSave — location:", location, "updated:", updated);
|
|
39
43
|
if (!location) return;
|
|
40
44
|
dispatch({
|
|
41
45
|
type: "setData",
|
|
@@ -86,7 +90,10 @@ function withEditable(Component, config) {
|
|
|
86
90
|
{
|
|
87
91
|
ref: portalRef,
|
|
88
92
|
onClick: handleEdit,
|
|
89
|
-
style: {
|
|
93
|
+
style: {
|
|
94
|
+
transform: `scale(${inverseScale})`,
|
|
95
|
+
transformOrigin: "center center"
|
|
96
|
+
},
|
|
90
97
|
className: "flex h-8 w-8 items-center justify-center rounded-full bg-black/50 shadow-md backdrop-blur-sm",
|
|
91
98
|
children: /* @__PURE__ */ jsx(Pencil, { className: "h-4 w-4 text-white" })
|
|
92
99
|
}
|