dune-react 0.0.21 → 0.0.23
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/index.d.ts +1 -0
- package/dist/components/puck-base/button.d.ts +1 -1
- package/dist/components/puck-base/button.js +5 -6
- package/dist/components/puck-base/card.d.ts +1 -1
- package/dist/components/puck-base/container.js +1 -1
- package/dist/components/puck-base/content.d.ts +1 -1
- package/dist/components/puck-base/image.js +16 -16
- package/dist/components/puck-base/index.d.ts +1 -13
- package/dist/components/puck-block/banner-sections/css-marquee-banner/css-marquee-banner.js +13 -13
- package/dist/components/puck-block/banner-sections/dismissible-banner/index.d.ts +3 -25
- package/dist/components/puck-block/banner-sections/dual-row-marquee/dual-row-marquee.js +8 -8
- package/dist/components/puck-block/banner-sections/scroll-driven-marquee/scroll-driven-marquee.js +8 -6
- package/dist/components/puck-block/banner-sections/scroll-parallax-text/scroll-parallax-text.js +3 -1
- package/dist/components/puck-block/contact-sections/centered-form/index.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/contact-cards-grid/contact-cards-grid.js +1 -1
- package/dist/components/puck-block/contact-sections/contact-modal/contact-modal.js +1 -1
- package/dist/components/puck-block/contact-sections/contact-modal/index.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/form-with-media/form-with-media.js +1 -1
- package/dist/components/puck-block/contact-sections/form-with-media/index.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/header-form-cards/header-form-cards.js +1 -1
- package/dist/components/puck-block/contact-sections/header-form-cards/index.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/header-info-fullwidth/header-info-fullwidth.js +2 -2
- package/dist/components/puck-block/contact-sections/info-cards-media/info-cards-media.js +2 -2
- package/dist/components/puck-block/contact-sections/location-cards-grid/index.d.ts +1 -1
- 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.js +1 -1
- package/dist/components/puck-block/cta-sections/feature-card-cta/index.d.ts +1 -1
- package/dist/components/puck-block/cta-sections/index.d.ts +2 -0
- 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/mouse-track-cta.js +92 -63
- package/dist/components/puck-block/cta-sections/props.js +46 -0
- package/dist/components/puck-block/cta-sections/side-media-cta/index.d.ts +1 -73
- package/dist/components/puck-block/cta-sections/side-media-cta/index.js +35 -0
- package/dist/components/puck-block/cta-sections/side-media-cta/side-media-cta.js +84 -0
- package/dist/components/puck-block/cta-sections/text-block-cta/index.d.ts +2 -74
- package/dist/components/puck-block/cta-sections/text-block-cta/index.js +38 -0
- package/dist/components/puck-block/cta-sections/text-block-cta/text-block-cta.d.ts +1 -1
- package/dist/components/puck-block/cta-sections/text-block-cta/text-block-cta.js +165 -0
- package/dist/components/puck-block/faq-sections/dual-column-accordion-faq/index.d.ts +1 -1
- package/dist/components/puck-block/faq-sections/icon-card-faq/index.d.ts +1 -1
- package/dist/components/puck-block/faq-sections/stacked-accordion-faq/index.d.ts +1 -1
- package/dist/components/puck-block/faq-sections/stacked-static-faq/index.d.ts +1 -1
- package/dist/components/puck-block/faq-sections/two-column-accordion-faq/index.d.ts +1 -1
- package/dist/components/puck-block/faq-sections/two-column-static-faq/index.d.ts +1 -1
- package/dist/components/puck-block/feature-sections/feature-cards-grid/component.js +1 -1
- package/dist/components/puck-block/feature-sections/feature-cards-grid/index.d.ts +2 -2
- package/dist/components/puck-block/feature-sections/feature-list-split/component.js +1 -1
- package/dist/components/puck-block/feature-sections/feature-list-split/index.d.ts +2 -2
- package/dist/components/puck-block/feature-sections/tab-feature/component.js +80 -64
- package/dist/components/puck-block/feature-sections/text-media-split/component.js +1 -1
- package/dist/components/puck-block/feature-sections/text-media-split/index.d.ts +1 -1
- package/dist/components/puck-block/feature-sections/text-only-section/index.d.ts +1 -1
- package/dist/components/puck-block/footer-sections/centered-minimal-footer/centered-minimal-footer.js +72 -18
- package/dist/components/puck-block/footer-sections/centered-minimal-footer/index.d.ts +79 -0
- package/dist/components/puck-block/footer-sections/centered-minimal-footer/index.js +43 -1
- package/dist/components/puck-block/footer-sections/compact-newsletter-footer/index.d.ts +42 -1
- package/dist/components/puck-block/footer-sections/contact-links-footer/contact-links-footer.js +4 -3
- package/dist/components/puck-block/footer-sections/contact-links-footer/index.d.ts +86 -0
- package/dist/components/puck-block/footer-sections/contact-links-footer/index.js +1 -1
- package/dist/components/puck-block/footer-sections/cta-links-footer/cta-links-footer.js +3 -2
- package/dist/components/puck-block/footer-sections/cta-links-footer/index.d.ts +38 -1
- package/dist/components/puck-block/footer-sections/cta-links-footer/index.js +1 -1
- package/dist/components/puck-block/footer-sections/links-newsletter-footer/index.d.ts +55 -1
- package/dist/components/puck-block/footer-sections/newsletter-links-footer/index.d.ts +42 -1
- package/dist/components/puck-block/footer-sections/newsletter-top-links-footer/index.d.ts +55 -1
- package/dist/components/puck-block/footer-sections/props.d.ts +3 -0
- package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/fullscreen-portfolio.js +1 -1
- package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/index.d.ts +25 -28
- package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/index.js +3 -2
- package/dist/components/puck-block/gallery-sections/interactive-portfolio/interactive-portfolio.js +1 -1
- package/dist/components/puck-block/gallery-sections/portfolio-cards/index.d.ts +2 -2
- package/dist/components/puck-block/gallery-sections/portfolio-cards/portfolio-cards.js +1 -1
- package/dist/components/puck-block/gallery-sections/portfolio-divider/index.d.ts +2 -2
- package/dist/components/puck-block/gallery-sections/portfolio-divider/portfolio-divider.js +68 -65
- package/dist/components/puck-block/gallery-sections/props.d.ts +11 -1
- package/dist/components/puck-block/gallery-sections/props.js +7 -2
- package/dist/components/puck-block/gallery-sections/scroll-parallax/scroll-parallax.js +18 -0
- package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/index.d.ts +24 -27
- package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/index.js +3 -2
- package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/scroll-parallax-portfolio.js +25 -22
- package/dist/components/puck-block/gallery-sections/split-carousel/index.d.ts +11 -1
- package/dist/components/puck-block/header-sections/centered-navbar/centered-navbar.js +3 -2
- package/dist/components/puck-block/header-sections/centered-navbar/index.d.ts +1 -1
- package/dist/components/puck-block/header-sections/drawer-navbar/drawer-navbar.js +119 -17
- package/dist/components/puck-block/header-sections/drawer-navbar/index.d.ts +1 -1
- package/dist/components/puck-block/header-sections/floating-bordered-navbar/floating-bordered-navbar.js +162 -22
- package/dist/components/puck-block/header-sections/floating-bordered-navbar/index.d.ts +1 -1
- package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/fullscreen-overlay-navbar.js +143 -19
- package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/index.d.ts +1 -1
- package/dist/components/puck-block/header-sections/mega-menu-navbar/index.d.ts +1 -1
- package/dist/components/puck-block/header-sections/mega-menu-navbar/mega-menu-navbar.js +3 -2
- package/dist/components/puck-block/header-sections/props.d.ts +3 -0
- package/dist/components/puck-block/header-sections/standard-navbar/index.d.ts +1 -1
- package/dist/components/puck-block/header-sections/standard-navbar/standard-navbar.js +3 -2
- package/dist/components/puck-block/hero-sections/carousel-hero/component.js +50 -9
- package/dist/components/puck-block/hero-sections/carousel-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/centered-hero/index.d.ts +2 -2
- package/dist/components/puck-block/hero-sections/column-scroll-hero/component.js +8 -8
- package/dist/components/puck-block/hero-sections/column-scroll-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/dual-marquee-hero/component.js +6 -6
- package/dist/components/puck-block/hero-sections/dual-marquee-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/fullscreen-hero/index.d.ts +2 -2
- package/dist/components/puck-block/hero-sections/fullscreen-video-hero/component.js +5 -3
- package/dist/components/puck-block/hero-sections/fullscreen-video-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/grid-expand-hero/component.js +26 -17
- package/dist/components/puck-block/hero-sections/grid-expand-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/horizontal-marquee-hero/component.js +3 -3
- package/dist/components/puck-block/hero-sections/horizontal-marquee-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/inline-image-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/media-text-hero/index.d.ts +26 -29
- package/dist/components/puck-block/hero-sections/mouse-track-hero/component.js +60 -19
- package/dist/components/puck-block/hero-sections/mouse-track-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/multi-image-grid-hero/index.d.ts +25 -28
- package/dist/components/puck-block/hero-sections/multi-image-grid-hero/index.js +3 -2
- package/dist/components/puck-block/hero-sections/multi-image-grid-hero/multi-image-grid-hero.js +2 -2
- package/dist/components/puck-block/hero-sections/overlapping-image-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/overlapping-image-hero/overlapping-image-hero.js +3 -3
- package/dist/components/puck-block/hero-sections/parallax-images-hero/component.js +18 -6
- package/dist/components/puck-block/hero-sections/parallax-images-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/scatter-parallax-hero/component.js +9 -7
- package/dist/components/puck-block/hero-sections/scatter-parallax-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/scroll-expand-video-hero/component.js +7 -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-zoom-hero/component.js +93 -44
- package/dist/components/puck-block/hero-sections/scroll-zoom-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/split-hero/index.d.ts +2 -2
- package/dist/components/puck-block/hero-sections/stacked-hero/index.d.ts +2 -2
- package/dist/components/puck-block/hero-sections/sticky-expand-hero/component.js +1 -1
- package/dist/components/puck-block/hero-sections/sticky-expand-hero/index.d.ts +14 -6
- 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.js +2 -2
- package/dist/components/puck-block/hero-sections/sticky-video-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/tab-hero/component.js +4 -4
- package/dist/components/puck-block/hero-sections/tab-hero/index.d.ts +28 -44
- package/dist/components/puck-block/hero-sections/tab-hero/index.js +7 -2
- package/dist/components/puck-block/hero-sections/three-image-parallax-hero/component.js +96 -46
- package/dist/components/puck-block/hero-sections/three-image-parallax-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/vertical-gallery-hero/component.js +33 -10
- package/dist/components/puck-block/hero-sections/vertical-gallery-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/zoom-grid-hero/component.js +14 -12
- package/dist/components/puck-block/hero-sections/zoom-grid-hero/index.d.ts +1 -1
- package/dist/components/puck-block/index.d.ts +2 -0
- package/dist/components/puck-block/location-sections/location-1/location.d.ts +1 -1
- package/dist/components/puck-block/location-sections/location-2/location.d.ts +1 -1
- package/dist/components/puck-block/location-sections/location-3/location.d.ts +2 -2
- package/dist/components/puck-block/location-sections/props.d.ts +1 -1
- package/dist/components/puck-block/metrics-sections/center-media-stats/center-media-stats.js +1 -1
- package/dist/components/puck-block/metrics-sections/header-stats-row/header-stats-row.js +1 -1
- package/dist/components/puck-block/metrics-sections/header-stats-row/index.d.ts +1 -1
- package/dist/components/puck-block/metrics-sections/mixed-grid-stats/index.d.ts +1 -1
- package/dist/components/puck-block/metrics-sections/mixed-grid-stats/mixed-grid-stats.js +2 -2
- package/dist/components/puck-block/metrics-sections/split-stats/index.d.ts +1 -1
- package/dist/components/puck-block/metrics-sections/split-stats/split-stats.js +1 -1
- package/dist/components/puck-block/metrics-sections/tab-stats/index.d.ts +0 -22
- package/dist/components/puck-block/metrics-sections/tab-stats/index.js +1 -1
- package/dist/components/puck-block/metrics-sections/tab-stats/tab-stats.js +39 -26
- package/dist/components/puck-block/pricing-sections/pricing-comparison-table/index.d.ts +47 -0
- package/dist/components/puck-block/pricing-sections/pricing-comparison-table/index.js +34 -0
- package/dist/components/puck-block/pricing-sections/single-pricing-card/index.d.ts +0 -22
- package/dist/components/puck-block/pricing-sections/single-pricing-card/index.js +1 -1
- package/dist/components/puck-block/pricing-sections/split-pricing/component.js +3 -3
- package/dist/components/puck-block/pricing-sections/split-pricing/index.d.ts +28 -22
- package/dist/components/puck-block/pricing-sections/split-pricing/index.js +8 -1
- package/dist/components/puck-block/registry.generated.d.ts +13408 -0
- package/dist/components/puck-block/registry.generated.js +558 -0
- package/dist/components/puck-block/showcase-sections/compact-timeline/index.d.ts +1 -1
- package/dist/components/puck-block/showcase-sections/horizontal-timeline/index.d.ts +1 -1
- package/dist/components/puck-block/showcase-sections/single-column-timeline/index.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/sticky-scroll-timeline/index.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/tab-timeline/component.js +1 -1
- package/dist/components/puck-block/showcase-sections/tab-timeline/index.d.ts +1 -23
- package/dist/components/puck-block/showcase-sections/tab-timeline/index.js +1 -1
- package/dist/components/puck-block/showcase-sections/zigzag-timeline/index.d.ts +2 -2
- package/dist/components/puck-block/team-sections/team-carousel/index.d.ts +1 -23
- package/dist/components/puck-block/team-sections/team-carousel/index.js +1 -2
- package/dist/components/puck-block/team-sections/team-grid/index.d.ts +1 -23
- package/dist/components/puck-block/team-sections/team-grid/index.js +1 -2
- package/dist/components/puck-block/team-sections/team-inline-card/index.d.ts +1 -23
- package/dist/components/puck-block/team-sections/team-inline-card/index.js +1 -2
- package/dist/components/puck-block/team-sections/team-two-column/index.d.ts +1 -1
- package/dist/components/puck-block/testimonial-sections/bento-testimonial/component.js +2 -2
- package/dist/components/puck-block/testimonial-sections/sticky-testimonial/index.d.ts +1 -1
- package/dist/components/puck-block/testimonial-sections/tab-testimonial/component.js +2 -2
- package/dist/components/puck-block/text-sections/aside-nav-content/index.d.ts +0 -22
- package/dist/components/puck-block/text-sections/aside-nav-content/index.js +1 -1
- package/dist/components/puck-block/text-sections/blog-article/index.d.ts +0 -22
- package/dist/components/puck-block/text-sections/blog-article/index.js +1 -1
- package/dist/components/puck-block/text-sections/prose-content/component.js +1 -1
- package/dist/components/puck-block/text-sections/prose-sidebar/index.d.ts +1 -23
- package/dist/components/puck-block/text-sections/side-media-content/component.js +1 -1
- package/dist/components/puck-block/text-sections/sticky-text-multi-image/component.js +3 -3
- package/dist/components/puck-block/text-sections/text-header/index.d.ts +2 -2
- package/dist/components/puck-core/core/props/content.js +41 -1
- package/dist/components/puck-core/core/props/form.js +76 -0
- package/dist/components/puck-core/core/props/index.js +34 -0
- package/dist/components/puck-core/core/props/interactive.js +17 -0
- package/dist/components/puck-core/core/props/media.js +14 -5
- package/dist/components/puck-core/core/styles.d.ts +1 -1
- package/dist/components/{puck-base → puck-core}/core/styles.js +3 -1
- package/dist/components/{puck-base → puck-core}/core/with-editable.js +1 -1
- package/dist/components/puck-core/fields/action-field.js +1 -1
- package/dist/components/puck-core/fields/array-field.d.ts +7 -0
- package/dist/components/puck-core/fields/array-field.js +229 -0
- package/dist/components/{puck-base → puck-core}/fields/auto-field.js +11 -0
- package/dist/components/{puck-base → puck-core/fields}/image-upload-field.js +5 -5
- package/dist/components/puck-core/fields/index.d.ts +1 -0
- package/dist/components/{puck-base → puck-core}/fields/location-field.js +1 -1
- package/dist/components/{puck-base → puck-core}/fields/object-field.js +1 -1
- package/dist/components/puck-core/index.d.ts +1 -0
- package/dist/components/{puck-base → puck-core}/inline-editable.js +1 -1
- package/dist/index.js +121 -104
- package/dist/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@19.2.4/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +59 -0
- package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@dnd-kit/core/dist/core.esm.js +3093 -0
- package/dist/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.4_react@19.2.4__react@19.2.4__react@19.2.4/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +592 -0
- package/dist/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.2.4/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +301 -0
- package/package.json +4 -1
- package/dist/components/puck-base/core/fields.d.ts +0 -827
- package/dist/components/puck-base/core/fields.js +0 -267
- package/dist/components/puck-base/core/hooks.d.ts +0 -19
- package/dist/components/puck-base/core/icon-catalog.d.ts +0 -14
- package/dist/components/puck-base/core/icon-catalog.js +0 -193
- package/dist/components/puck-base/core/styles.d.ts +0 -1942
- package/dist/components/puck-base/core/types.d.ts +0 -20
- package/dist/components/puck-base/core/types.js +0 -26
- package/dist/components/puck-base/core/utils.d.ts +0 -5
- package/dist/components/puck-base/core/with-editable.d.ts +0 -16
- package/dist/components/puck-base/error-boundary.d.ts +0 -4
- package/dist/components/puck-base/fields/action-field.d.ts +0 -30
- package/dist/components/puck-base/fields/action-field.js +0 -265
- package/dist/components/puck-base/fields/auto-field.d.ts +0 -2
- package/dist/components/puck-base/fields/color-field.d.ts +0 -6
- package/dist/components/puck-base/fields/index.d.ts +0 -8
- package/dist/components/puck-base/fields/location-field.d.ts +0 -44
- package/dist/components/puck-base/fields/object-field.d.ts +0 -8
- package/dist/components/puck-base/fields/radio-toggle-field.d.ts +0 -10
- package/dist/components/puck-base/fields/types.d.ts +0 -29
- package/dist/components/puck-base/fields/virtualized-select-field.d.ts +0 -13
- package/dist/components/puck-base/icon-picker-field.d.ts +0 -8
- package/dist/components/puck-base/icon-picker-field.js +0 -153
- package/dist/components/puck-base/image-upload-field.d.ts +0 -7
- package/dist/components/puck-base/inline-editable.d.ts +0 -14
- package/dist/components/puck-base/use-upload.d.ts +0 -42
- /package/dist/components/{puck-base → puck-core}/core/hooks.js +0 -0
- /package/dist/components/{puck-base → puck-core}/core/utils.js +0 -0
- /package/dist/components/{puck-base → puck-core}/error-boundary.js +0 -0
- /package/dist/components/{puck-base → puck-core}/fields/color-field.js +0 -0
- /package/dist/components/{puck-base → puck-core}/fields/radio-toggle-field.js +0 -0
- /package/dist/components/{puck-base → puck-core}/fields/virtualized-select-field.js +0 -0
- /package/dist/components/{puck-base → puck-core}/use-upload.js +0 -0
|
@@ -4,12 +4,11 @@ import { useState, useCallback } from "react";
|
|
|
4
4
|
import { SafeDynamicIcon } from "./safe-dynamic-icon.js";
|
|
5
5
|
import { Button, buttonVariants } from "../shadcn/button.js";
|
|
6
6
|
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "../shadcn/dialog.js";
|
|
7
|
-
import { button } from "./core/fields.js";
|
|
8
7
|
import { cn } from "../../utils/css-utils.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { AutoField } from "
|
|
12
|
-
const BUTTON_FIELDS =
|
|
8
|
+
import { withEditable } from "../puck-core/core/with-editable.js";
|
|
9
|
+
import { buttonField, resolveActionUrl } from "../puck-core/core/props/interactive.js";
|
|
10
|
+
import { AutoField } from "../puck-core/fields/auto-field.js";
|
|
11
|
+
const BUTTON_FIELDS = buttonField.objectFields;
|
|
13
12
|
function ButtonEditDialog({
|
|
14
13
|
open,
|
|
15
14
|
onOpenChange,
|
|
@@ -80,7 +79,7 @@ function CompoundButtonBase(props) {
|
|
|
80
79
|
}
|
|
81
80
|
const EditableButton = withEditable(CompoundButtonBase, {
|
|
82
81
|
type: "button",
|
|
83
|
-
fields:
|
|
82
|
+
fields: buttonField.objectFields
|
|
84
83
|
});
|
|
85
84
|
const CompoundButton = (props) => {
|
|
86
85
|
const [dialogOpen, setDialogOpen] = useState(false);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../utils/css-utils.js";
|
|
3
|
-
import { ErrorBoundary } from "
|
|
3
|
+
import { ErrorBoundary } from "../puck-core/error-boundary.js";
|
|
4
4
|
const SECTION_STYLE_VARS = {
|
|
5
5
|
dark: {
|
|
6
6
|
"--background": "oklch(0.145 0 0)",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CompoundBadgeProps } from "./badge";
|
|
2
2
|
import { CompoundButtonProps } from "./button";
|
|
3
|
-
import { Feature } from "
|
|
3
|
+
import { Feature } from "@/components/puck-core/core/types";
|
|
4
4
|
export interface CompoundContentProps {
|
|
5
5
|
badge?: CompoundBadgeProps;
|
|
6
6
|
heading?: string;
|
|
@@ -4,8 +4,7 @@ import { useState, useEffect, useRef, useCallback } from "react";
|
|
|
4
4
|
import Cropper from "react-easy-crop";
|
|
5
5
|
import { Pencil, Search, Upload, Loader2, Check } from "lucide-react";
|
|
6
6
|
import { cn } from "../../utils/css-utils.js";
|
|
7
|
-
import { withEditable } from "
|
|
8
|
-
import { image } from "./core/fields.js";
|
|
7
|
+
import { withEditable } from "../puck-core/core/with-editable.js";
|
|
9
8
|
import { Button } from "../shadcn/button.js";
|
|
10
9
|
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "../shadcn/dialog.js";
|
|
11
10
|
import { Input } from "../shadcn/input.js";
|
|
@@ -13,20 +12,21 @@ import { Label } from "../shadcn/label.js";
|
|
|
13
12
|
import { ScrollArea } from "../shadcn/scroll-area.js";
|
|
14
13
|
import { Slider } from "../shadcn/slider.js";
|
|
15
14
|
import { Tabs, TabsList, TabsTrigger } from "../shadcn/tabs.js";
|
|
16
|
-
import useUpload from "
|
|
15
|
+
import useUpload from "../puck-core/use-upload.js";
|
|
17
16
|
import { useEditorContext } from "../puck-core/core/context/editor-context.js";
|
|
17
|
+
import { imageField } from "../puck-core/core/props/media.js";
|
|
18
18
|
const createImage = (url) => new Promise((resolve, reject) => {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
const image = new Image();
|
|
20
|
+
image.addEventListener("load", () => resolve(image));
|
|
21
|
+
image.addEventListener("error", (error) => reject(error));
|
|
22
|
+
image.setAttribute("crossOrigin", "anonymous");
|
|
23
|
+
image.src = url;
|
|
24
24
|
});
|
|
25
25
|
const getCroppedImg = async (imageSrc, pixelCrop, rotation) => {
|
|
26
|
-
const
|
|
26
|
+
const image = await createImage(imageSrc);
|
|
27
27
|
const canvas = document.createElement("canvas");
|
|
28
28
|
const ctx = canvas.getContext("2d");
|
|
29
|
-
const maxSize = Math.max(
|
|
29
|
+
const maxSize = Math.max(image.width, image.height);
|
|
30
30
|
const safeArea = 2 * (maxSize / 2 * Math.sqrt(2));
|
|
31
31
|
canvas.width = safeArea;
|
|
32
32
|
canvas.height = safeArea;
|
|
@@ -34,17 +34,17 @@ const getCroppedImg = async (imageSrc, pixelCrop, rotation) => {
|
|
|
34
34
|
ctx.rotate(rotation * Math.PI / 180);
|
|
35
35
|
ctx.translate(-safeArea / 2, -safeArea / 2);
|
|
36
36
|
ctx.drawImage(
|
|
37
|
-
|
|
38
|
-
safeArea / 2 -
|
|
39
|
-
safeArea / 2 -
|
|
37
|
+
image,
|
|
38
|
+
safeArea / 2 - image.width * 0.5,
|
|
39
|
+
safeArea / 2 - image.height * 0.5
|
|
40
40
|
);
|
|
41
41
|
const data = ctx.getImageData(0, 0, safeArea, safeArea);
|
|
42
42
|
canvas.width = pixelCrop.width;
|
|
43
43
|
canvas.height = pixelCrop.height;
|
|
44
44
|
ctx.putImageData(
|
|
45
45
|
data,
|
|
46
|
-
Math.round(0 - safeArea / 2 +
|
|
47
|
-
Math.round(0 - safeArea / 2 +
|
|
46
|
+
Math.round(0 - safeArea / 2 + image.width * 0.5 - pixelCrop.x),
|
|
47
|
+
Math.round(0 - safeArea / 2 + image.height * 0.5 - pixelCrop.y)
|
|
48
48
|
);
|
|
49
49
|
return new Promise((resolve) => {
|
|
50
50
|
canvas.toBlob((blob) => resolve(blob), "image/jpeg", 0.95);
|
|
@@ -326,7 +326,7 @@ function ImageEditDialog({
|
|
|
326
326
|
}
|
|
327
327
|
const EditableImage = withEditable(CompoundImageBase, {
|
|
328
328
|
type: "image",
|
|
329
|
-
fields:
|
|
329
|
+
fields: imageField.objectFields
|
|
330
330
|
});
|
|
331
331
|
const CompoundImage = (props) => {
|
|
332
332
|
const [dialogOpen, setDialogOpen] = useState(false);
|
|
@@ -7,17 +7,5 @@ export { CompoundField, type CompoundFieldProps, fieldTypes, type FieldTypes } f
|
|
|
7
7
|
export { CompoundForm, type CompoundFormProps, formMethods, type FormMethods } from "./form";
|
|
8
8
|
export { CompoundImage, type CompoundImageProps } from "./image";
|
|
9
9
|
export { CompoundArticleCard, type CompoundArticleCardProps } from "./article-card";
|
|
10
|
-
export { ImageUploadField } from "./image-upload-field";
|
|
11
|
-
export { ActionField, ACTION_TYPE_FIELD_MAP, ACTION_TYPE_OPTIONS, PageActionFields, ExternalActionFields, EmailActionFields, PhoneActionFields, SectionActionFields, DownloadActionFields, type ActionTypeFieldProps, } from "./fields";
|
|
12
|
-
export { ErrorBoundary } from "./error-boundary";
|
|
13
10
|
export { GradientText, type GradientTextProps } from "./gradient-text";
|
|
14
|
-
export {
|
|
15
|
-
export { type IconName, type Feature, type ActionType, type Action, resolveActionUrl, } from "./core/types";
|
|
16
|
-
export { withEditable } from "./core/with-editable";
|
|
17
|
-
export { usePuckDispatch, usePuckAppState, usePuckHistory, usePuckConfig, usePuckGetSelectorForId, type PuckComponentInfo, } from "./core/hooks";
|
|
18
|
-
export { findComponentById, getRandomAdjective } from "./core/utils";
|
|
19
|
-
export { icon, action, actionDefaults, button, buttons, badge, image, images, padding, paddingDefaults, paddingLevel, heading, description, features, contentFields, contentFieldsWithFeatures, card, cards, field, fieldDefaults, form, formDefaults, getPlaceholderImageUrl, image16x9Placeholder, image1x1Placeholder, image9x16Placeholder, sectionStyle, sectionOverlay, backgroundColor, backgroundImage, } from "./core/fields";
|
|
20
|
-
export { EditorContextProvider, useEditorContext } from "@/components/puck-core/core/context/editor-context";
|
|
21
|
-
export { SectionIdProvider, useSectionId } from "@/components/puck-core/core/context/section-id-context";
|
|
22
|
-
export { AutoField, type FieldDef, type AutoFieldProps, type FieldsPanelProps } from "./fields";
|
|
23
|
-
export { default as useUpload, type UploadFileItem, type UploadStatus, type UseUploadOptions } from "./use-upload";
|
|
11
|
+
export { SafeDynamicIcon } from "./safe-dynamic-icon";
|
|
@@ -69,39 +69,39 @@ const CssMarqueeBanner = (props) => {
|
|
|
69
69
|
};
|
|
70
70
|
const CssMarqueeBannerDefaults = {
|
|
71
71
|
headings: [
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
72
|
+
"Brand Name",
|
|
73
|
+
"Brand Name",
|
|
74
|
+
"Brand Name",
|
|
75
|
+
"Brand Name",
|
|
76
|
+
"Brand Name"
|
|
77
77
|
],
|
|
78
78
|
sections: [
|
|
79
79
|
{
|
|
80
|
-
title: "
|
|
80
|
+
title: "Brand Name",
|
|
81
81
|
image: {
|
|
82
82
|
src: "https://picsum.photos/seed/banner-marquee-1/400/267",
|
|
83
|
-
alt: "
|
|
83
|
+
alt: "Brand Name"
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
|
-
title: "
|
|
87
|
+
title: "Brand Name",
|
|
88
88
|
image: {
|
|
89
89
|
src: "https://picsum.photos/seed/banner-marquee-2/400/267",
|
|
90
|
-
alt: "
|
|
90
|
+
alt: "Brand Name"
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
|
-
title: "
|
|
94
|
+
title: "Brand Name",
|
|
95
95
|
image: {
|
|
96
96
|
src: "https://picsum.photos/seed/banner-marquee-3/400/267",
|
|
97
|
-
alt: "
|
|
97
|
+
alt: "Brand Name"
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
|
-
title: "
|
|
101
|
+
title: "Brand Name",
|
|
102
102
|
image: {
|
|
103
103
|
src: "https://picsum.photos/seed/banner-marquee-4/400/267",
|
|
104
|
-
alt: "
|
|
104
|
+
alt: "Brand Name"
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
],
|
|
@@ -34,7 +34,7 @@ declare const conf: {
|
|
|
34
34
|
readonly action: {
|
|
35
35
|
type: "custom";
|
|
36
36
|
label: string;
|
|
37
|
-
render: typeof import("
|
|
37
|
+
render: typeof import("../../..").ActionField;
|
|
38
38
|
};
|
|
39
39
|
readonly variant: {
|
|
40
40
|
readonly type: "select";
|
|
@@ -112,7 +112,7 @@ declare const conf: {
|
|
|
112
112
|
readonly action: {
|
|
113
113
|
type: "custom";
|
|
114
114
|
label: string;
|
|
115
|
-
render: typeof import("
|
|
115
|
+
render: typeof import("../../..").ActionField;
|
|
116
116
|
};
|
|
117
117
|
readonly variant: {
|
|
118
118
|
readonly type: "select";
|
|
@@ -170,31 +170,9 @@ declare const conf: {
|
|
|
170
170
|
action: {
|
|
171
171
|
type: "custom";
|
|
172
172
|
label: string;
|
|
173
|
-
render: typeof import("
|
|
173
|
+
render: typeof import("../../..").ActionField;
|
|
174
174
|
};
|
|
175
175
|
title: {
|
|
176
|
-
className: {
|
|
177
|
-
readonly type: "text";
|
|
178
|
-
readonly label: "Class Name";
|
|
179
|
-
readonly ai: {
|
|
180
|
-
readonly instructions: "Additional Tailwind CSS classes to apply to the section wrapper.";
|
|
181
|
-
};
|
|
182
|
-
};
|
|
183
|
-
style: {
|
|
184
|
-
readonly type: "object";
|
|
185
|
-
readonly label: "Style";
|
|
186
|
-
readonly objectFields: {};
|
|
187
|
-
readonly ai: {
|
|
188
|
-
readonly instructions: "Inline CSSProperties object for the section wrapper, e.g. { backgroundColor: 'red', minHeight: '100vh' }.";
|
|
189
|
-
};
|
|
190
|
-
};
|
|
191
|
-
css: {
|
|
192
|
-
readonly type: "textarea";
|
|
193
|
-
readonly label: "Custom CSS";
|
|
194
|
-
readonly ai: {
|
|
195
|
-
readonly instructions: "Custom CSS rules. Use & as a placeholder for the section selector.";
|
|
196
|
-
};
|
|
197
|
-
};
|
|
198
176
|
type: string;
|
|
199
177
|
};
|
|
200
178
|
};
|
|
@@ -72,16 +72,16 @@ const DualRowMarquee = (props) => {
|
|
|
72
72
|
};
|
|
73
73
|
const DualRowMarqueeDefaults = {
|
|
74
74
|
headingsTop: [
|
|
75
|
-
{ title: "
|
|
76
|
-
{ title: "
|
|
77
|
-
{ title: "
|
|
78
|
-
{ title: "
|
|
75
|
+
{ title: "Brand Name", image: { src: "https://picsum.photos/seed/banner-dual-1/100/100", alt: "Brand Name 1" } },
|
|
76
|
+
{ title: "Brand Name", image: { src: "https://picsum.photos/seed/banner-dual-2/100/100", alt: "Brand Name 2" } },
|
|
77
|
+
{ title: "Brand Name", image: { src: "https://picsum.photos/seed/banner-dual-3/100/100", alt: "Brand Name 3" } },
|
|
78
|
+
{ title: "Brand Name", image: { src: "https://picsum.photos/seed/banner-dual-4/100/100", alt: "Brand Name 4" } }
|
|
79
79
|
],
|
|
80
80
|
headingsBottom: [
|
|
81
|
-
{ title: "
|
|
82
|
-
{ title: "
|
|
83
|
-
{ title: "
|
|
84
|
-
{ title: "
|
|
81
|
+
{ title: "Brand Name", image: { src: "https://picsum.photos/seed/banner-dual-5/100/100", alt: "Brand Name 5" } },
|
|
82
|
+
{ title: "Brand Name", image: { src: "https://picsum.photos/seed/banner-dual-6/100/100", alt: "Brand Name 6" } },
|
|
83
|
+
{ title: "Brand Name", image: { src: "https://picsum.photos/seed/banner-dual-7/100/100", alt: "Brand Name 7" } },
|
|
84
|
+
{ title: "Brand Name", image: { src: "https://picsum.photos/seed/banner-dual-8/100/100", alt: "Brand Name 8" } }
|
|
85
85
|
]
|
|
86
86
|
};
|
|
87
87
|
export {
|
package/dist/components/puck-block/banner-sections/scroll-driven-marquee/scroll-driven-marquee.js
CHANGED
|
@@ -5,6 +5,7 @@ import { useRef } from "react";
|
|
|
5
5
|
import { cn } from "../../../../utils/css-utils.js";
|
|
6
6
|
import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
|
|
7
7
|
import { useScrollContainer } from "../../../../hooks/use-scroll-container.js";
|
|
8
|
+
import { useEditorContext } from "../../../puck-core/core/context/editor-context.js";
|
|
8
9
|
const ScrollDrivenMarquee = (props) => {
|
|
9
10
|
const {
|
|
10
11
|
headings = [],
|
|
@@ -18,6 +19,7 @@ const ScrollDrivenMarquee = (props) => {
|
|
|
18
19
|
style: sectionStyle,
|
|
19
20
|
css
|
|
20
21
|
} = styles ?? {};
|
|
22
|
+
const { isEditor } = useEditorContext();
|
|
21
23
|
const sectionRef = useRef(null);
|
|
22
24
|
const [scrollContainerRef] = useScrollContainer(sectionRef);
|
|
23
25
|
const { scrollYProgress } = useScroll({
|
|
@@ -30,7 +32,7 @@ const ScrollDrivenMarquee = (props) => {
|
|
|
30
32
|
motion.div,
|
|
31
33
|
{
|
|
32
34
|
className: "ml-12 grid auto-cols-max grid-flow-col grid-cols-[max-content] gap-12",
|
|
33
|
-
style: { x: headingTranslate },
|
|
35
|
+
style: { x: isEditor ? "0%" : headingTranslate },
|
|
34
36
|
children: headings.map((heading, headingIndex) => /* @__PURE__ */ jsx("h1", { className: "text-md font-bold md:text-lg", children: heading }, headingIndex))
|
|
35
37
|
},
|
|
36
38
|
index
|
|
@@ -38,11 +40,11 @@ const ScrollDrivenMarquee = (props) => {
|
|
|
38
40
|
};
|
|
39
41
|
const ScrollDrivenMarqueeDefaults = {
|
|
40
42
|
headings: [
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
43
|
+
"Brand Name",
|
|
44
|
+
"Brand Name",
|
|
45
|
+
"Brand Name",
|
|
46
|
+
"Brand Name",
|
|
47
|
+
"Brand Name"
|
|
46
48
|
]
|
|
47
49
|
};
|
|
48
50
|
export {
|
package/dist/components/puck-block/banner-sections/scroll-parallax-text/scroll-parallax-text.js
CHANGED
|
@@ -5,6 +5,7 @@ import { useScroll, useTransform, motion } from "framer-motion";
|
|
|
5
5
|
import { cn } from "../../../../utils/css-utils.js";
|
|
6
6
|
import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
|
|
7
7
|
import { useScrollContainer } from "../../../../hooks/use-scroll-container.js";
|
|
8
|
+
import { useEditorContext } from "../../../puck-core/core/context/editor-context.js";
|
|
8
9
|
const ScrollParallaxText = (props) => {
|
|
9
10
|
const {
|
|
10
11
|
headings = [],
|
|
@@ -18,6 +19,7 @@ const ScrollParallaxText = (props) => {
|
|
|
18
19
|
style: sectionStyle,
|
|
19
20
|
css
|
|
20
21
|
} = styles ?? {};
|
|
22
|
+
const { isEditor } = useEditorContext();
|
|
21
23
|
const sectionRef = useRef(null);
|
|
22
24
|
const [scrollContainerRef] = useScrollContainer(sectionRef);
|
|
23
25
|
const { scrollYProgress } = useScroll({
|
|
@@ -37,7 +39,7 @@ const ScrollParallaxText = (props) => {
|
|
|
37
39
|
children: /* @__PURE__ */ jsx("div", { className: "flex flex-col whitespace-nowrap", children: headings.map((heading, index) => /* @__PURE__ */ jsx(
|
|
38
40
|
motion.h1,
|
|
39
41
|
{
|
|
40
|
-
style: index % 2 === 0 ? { x: xPartOne } : { x: xPartTwo },
|
|
42
|
+
style: index % 2 === 0 ? { x: isEditor ? "0%" : xPartOne } : { x: isEditor ? "0%" : xPartTwo },
|
|
41
43
|
className: cn("text-[6rem] font-bold leading-[1.2]", {
|
|
42
44
|
"self-end": index % 2 !== 0
|
|
43
45
|
}),
|
package/dist/components/puck-block/contact-sections/contact-cards-grid/contact-cards-grid.js
CHANGED
|
@@ -80,7 +80,7 @@ const ContactCardsGridDefaults = {
|
|
|
80
80
|
icon: "email",
|
|
81
81
|
title: "Email",
|
|
82
82
|
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in ero.",
|
|
83
|
-
link: { label: "hello@
|
|
83
|
+
link: { label: "hello@example.com", action: { type: "email", email: "hello@example.com" } }
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
icon: "phone",
|
|
@@ -144,7 +144,7 @@ const ContactModal = (props) => {
|
|
|
144
144
|
] }) }) });
|
|
145
145
|
}
|
|
146
146
|
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 max-w-lg text-center", children: /* @__PURE__ */ jsxs(Dialog, { children: [
|
|
147
|
-
/* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
147
|
+
/* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { className: "inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90", children: "Open modal" }) }),
|
|
148
148
|
/* @__PURE__ */ jsx(
|
|
149
149
|
DialogContent,
|
|
150
150
|
{
|
|
@@ -154,7 +154,7 @@ const HeaderFormCardsDefaults = {
|
|
|
154
154
|
icon: "email",
|
|
155
155
|
title: "Email",
|
|
156
156
|
description: "Lorem ipsum dolor sit amet.",
|
|
157
|
-
link: { label: "hello@
|
|
157
|
+
link: { label: "hello@example.com", action: { type: "email", email: "hello@example.com" } }
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
icon: "phone",
|
package/dist/components/puck-block/contact-sections/header-info-fullwidth/header-info-fullwidth.js
CHANGED
|
@@ -44,7 +44,7 @@ const HeaderInfoFullwidthDefaults = {
|
|
|
44
44
|
buttons: [],
|
|
45
45
|
image: {
|
|
46
46
|
src: "https://picsum.photos/seed/contact-fullwidth/1920/600",
|
|
47
|
-
alt: "
|
|
47
|
+
alt: "Placeholder image"
|
|
48
48
|
},
|
|
49
49
|
email: "",
|
|
50
50
|
phone: "",
|
|
@@ -54,7 +54,7 @@ const HeaderInfoFullwidthDefaults = {
|
|
|
54
54
|
icon: "email",
|
|
55
55
|
title: "Email",
|
|
56
56
|
description: "",
|
|
57
|
-
link: { label: "hello@
|
|
57
|
+
link: { label: "hello@example.com", action: { type: "email", email: "hello@example.com" } }
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
icon: "phone",
|
|
@@ -42,7 +42,7 @@ const InfoCardsMediaDefaults = {
|
|
|
42
42
|
buttons: [],
|
|
43
43
|
image: {
|
|
44
44
|
src: "https://picsum.photos/seed/contact-info/1200/800",
|
|
45
|
-
alt: "
|
|
45
|
+
alt: "Placeholder image"
|
|
46
46
|
},
|
|
47
47
|
email: "",
|
|
48
48
|
phone: "",
|
|
@@ -52,7 +52,7 @@ const InfoCardsMediaDefaults = {
|
|
|
52
52
|
icon: "email",
|
|
53
53
|
title: "Email",
|
|
54
54
|
description: "Lorem ipsum dolor sit amet.",
|
|
55
|
-
link: { label: "hello@
|
|
55
|
+
link: { label: "hello@example.com", action: { type: "email", email: "hello@example.com" } }
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
icon: "phone",
|
|
@@ -146,7 +146,7 @@ const SplitInfoFormDefaults = {
|
|
|
146
146
|
button: { label: "Submit" },
|
|
147
147
|
buttons: [],
|
|
148
148
|
image: { src: "https://picsum.photos/seed/contact-split/800/600", alt: "Placeholder" },
|
|
149
|
-
email: "hello@
|
|
149
|
+
email: "hello@example.com",
|
|
150
150
|
phone: "+1 (555) 000-0000",
|
|
151
151
|
address: "123 Sample St, Sydney NSW 2000 AU",
|
|
152
152
|
contacts: [],
|