dune-react 0.0.22 → 0.0.24

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.
Files changed (131) hide show
  1. package/dist/components/puck-base/image.js +1 -1
  2. package/dist/components/puck-block/banner-sections/css-marquee-banner/css-marquee-banner.js +13 -13
  3. package/dist/components/puck-block/banner-sections/dual-row-marquee/dual-row-marquee.js +77 -53
  4. package/dist/components/puck-block/banner-sections/scroll-driven-marquee/scroll-driven-marquee.js +8 -6
  5. package/dist/components/puck-block/banner-sections/scroll-parallax-text/scroll-parallax-text.js +3 -1
  6. package/dist/components/puck-block/contact-sections/contact-cards-grid/contact-cards-grid.js +1 -1
  7. package/dist/components/puck-block/contact-sections/form-with-media/form-with-media.js +1 -1
  8. package/dist/components/puck-block/contact-sections/header-form-cards/header-form-cards.js +1 -1
  9. package/dist/components/puck-block/contact-sections/header-info-fullwidth/header-info-fullwidth.js +2 -2
  10. package/dist/components/puck-block/contact-sections/info-cards-media/info-cards-media.js +2 -2
  11. package/dist/components/puck-block/contact-sections/split-info-form/split-info-form.js +1 -1
  12. package/dist/components/puck-block/contact-sections/tab-locations/tab-locations.js +71 -55
  13. package/dist/components/puck-block/cta-sections/mouse-track-cta/mouse-track-cta.js +4 -4
  14. package/dist/components/puck-block/cta-sections/side-media-cta/side-media-cta.js +1 -1
  15. package/dist/components/puck-block/cta-sections/text-block-cta/text-block-cta.js +2 -2
  16. package/dist/components/puck-block/feature-sections/feature-cards-grid/component.js +1 -1
  17. package/dist/components/puck-block/feature-sections/feature-list-split/component.js +1 -1
  18. package/dist/components/puck-block/feature-sections/tab-feature/component.js +4 -4
  19. package/dist/components/puck-block/feature-sections/text-media-split/component.js +1 -1
  20. package/dist/components/puck-block/footer-sections/centered-minimal-footer/centered-minimal-footer.js +72 -18
  21. package/dist/components/puck-block/footer-sections/centered-minimal-footer/index.d.ts +79 -0
  22. package/dist/components/puck-block/footer-sections/centered-minimal-footer/index.js +43 -1
  23. package/dist/components/puck-block/footer-sections/compact-newsletter-footer/index.d.ts +41 -0
  24. package/dist/components/puck-block/footer-sections/contact-links-footer/contact-links-footer.js +4 -3
  25. package/dist/components/puck-block/footer-sections/contact-links-footer/index.d.ts +86 -0
  26. package/dist/components/puck-block/footer-sections/contact-links-footer/index.js +1 -1
  27. package/dist/components/puck-block/footer-sections/cta-links-footer/cta-links-footer.js +3 -2
  28. package/dist/components/puck-block/footer-sections/cta-links-footer/index.d.ts +37 -0
  29. package/dist/components/puck-block/footer-sections/cta-links-footer/index.js +1 -1
  30. package/dist/components/puck-block/footer-sections/links-newsletter-footer/index.d.ts +54 -0
  31. package/dist/components/puck-block/footer-sections/newsletter-links-footer/index.d.ts +41 -0
  32. package/dist/components/puck-block/footer-sections/newsletter-top-links-footer/index.d.ts +54 -0
  33. package/dist/components/puck-block/footer-sections/props.d.ts +3 -0
  34. package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/fullscreen-portfolio.js +1 -1
  35. package/dist/components/puck-block/gallery-sections/image-carousel/index.d.ts +14 -1
  36. package/dist/components/puck-block/gallery-sections/interactive-portfolio/interactive-portfolio.js +166 -105
  37. package/dist/components/puck-block/gallery-sections/masonry-grid/index.d.ts +17 -1
  38. package/dist/components/puck-block/gallery-sections/masonry-grid/masonry-grid.js +56 -31
  39. package/dist/components/puck-block/gallery-sections/portfolio-cards/index.d.ts +17 -1
  40. package/dist/components/puck-block/gallery-sections/portfolio-cards/portfolio-cards.js +41 -13
  41. package/dist/components/puck-block/gallery-sections/portfolio-divider/portfolio-divider.js +1 -1
  42. package/dist/components/puck-block/gallery-sections/props.d.ts +42 -3
  43. package/dist/components/puck-block/gallery-sections/props.js +24 -6
  44. package/dist/components/puck-block/gallery-sections/scroll-parallax/scroll-parallax.js +71 -22
  45. package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/scroll-parallax-portfolio.js +284 -159
  46. package/dist/components/puck-block/gallery-sections/split-carousel/index.d.ts +11 -1
  47. package/dist/components/puck-block/gallery-sections/static-grid/index.d.ts +17 -1
  48. package/dist/components/puck-block/header-sections/centered-navbar/centered-navbar.js +95 -14
  49. package/dist/components/puck-block/header-sections/drawer-navbar/drawer-navbar.js +4 -3
  50. package/dist/components/puck-block/header-sections/floating-bordered-navbar/floating-bordered-navbar.js +5 -4
  51. package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/fullscreen-overlay-navbar.js +4 -3
  52. package/dist/components/puck-block/header-sections/mega-menu-navbar/mega-menu-navbar.js +3 -2
  53. package/dist/components/puck-block/header-sections/props.d.ts +3 -0
  54. package/dist/components/puck-block/header-sections/standard-navbar/standard-navbar.js +3 -2
  55. package/dist/components/puck-block/hero-sections/carousel-hero/component.js +3 -3
  56. package/dist/components/puck-block/hero-sections/column-scroll-hero/component.js +8 -8
  57. package/dist/components/puck-block/hero-sections/dual-marquee-hero/component.js +6 -6
  58. package/dist/components/puck-block/hero-sections/fullscreen-video-hero/component.js +1 -1
  59. package/dist/components/puck-block/hero-sections/grid-expand-hero/component.js +26 -17
  60. package/dist/components/puck-block/hero-sections/grid-expand-hero/index.d.ts +17 -1
  61. package/dist/components/puck-block/hero-sections/horizontal-marquee-hero/component.js +3 -3
  62. package/dist/components/puck-block/hero-sections/inline-image-hero/inline-image-hero.js +59 -28
  63. package/dist/components/puck-block/hero-sections/mouse-track-hero/component.js +60 -19
  64. package/dist/components/puck-block/hero-sections/multi-image-grid-hero/index.d.ts +17 -1
  65. package/dist/components/puck-block/hero-sections/multi-image-grid-hero/multi-image-grid-hero.js +2 -2
  66. package/dist/components/puck-block/hero-sections/overlapping-image-hero/overlapping-image-hero.js +3 -3
  67. package/dist/components/puck-block/hero-sections/parallax-images-hero/component.js +18 -6
  68. package/dist/components/puck-block/hero-sections/props.d.ts +34 -2
  69. package/dist/components/puck-block/hero-sections/props.js +18 -4
  70. package/dist/components/puck-block/hero-sections/scatter-parallax-hero/component.js +9 -7
  71. package/dist/components/puck-block/hero-sections/scroll-expand-video-hero/component.js +7 -5
  72. package/dist/components/puck-block/hero-sections/scroll-zoom-hero/component.js +5 -3
  73. package/dist/components/puck-block/hero-sections/sticky-expand-hero/component.js +1 -1
  74. package/dist/components/puck-block/hero-sections/sticky-expand-hero/index.d.ts +13 -5
  75. package/dist/components/puck-block/hero-sections/sticky-expand-hero/index.js +2 -2
  76. package/dist/components/puck-block/hero-sections/sticky-video-hero/component.js +2 -2
  77. package/dist/components/puck-block/hero-sections/tab-hero/component.js +5 -5
  78. package/dist/components/puck-block/hero-sections/three-image-parallax-hero/component.js +3 -3
  79. package/dist/components/puck-block/hero-sections/vertical-gallery-hero/component.js +6 -6
  80. package/dist/components/puck-block/hero-sections/zoom-grid-hero/component.js +14 -12
  81. package/dist/components/puck-block/index.d.ts +1 -0
  82. package/dist/components/puck-block/location-sections/index.d.ts +3 -0
  83. package/dist/components/puck-block/location-sections/location-1/index.js +102 -0
  84. package/dist/components/puck-block/location-sections/location-1/location.d.ts +0 -3
  85. package/dist/components/puck-block/location-sections/location-1/location.js +139 -0
  86. package/dist/components/puck-block/location-sections/location-2/index.js +126 -0
  87. package/dist/components/puck-block/location-sections/location-2/location.d.ts +0 -3
  88. package/dist/components/puck-block/location-sections/location-2/location.js +133 -0
  89. package/dist/components/puck-block/location-sections/location-3/index.js +109 -0
  90. package/dist/components/puck-block/location-sections/location-3/location.d.ts +0 -3
  91. package/dist/components/puck-block/location-sections/location-3/location.js +140 -0
  92. package/dist/components/puck-block/location-sections/props.d.ts +0 -3
  93. package/dist/components/puck-block/metrics-sections/center-media-stats/center-media-stats.js +1 -1
  94. package/dist/components/puck-block/metrics-sections/header-stats-row/header-stats-row.js +1 -1
  95. package/dist/components/puck-block/metrics-sections/mixed-grid-stats/mixed-grid-stats.js +2 -2
  96. package/dist/components/puck-block/metrics-sections/split-stats/split-stats.js +1 -1
  97. package/dist/components/puck-block/metrics-sections/tab-stats/tab-stats.js +4 -4
  98. package/dist/components/puck-block/pricing-sections/pricing-comparison-table/component.js +134 -33
  99. package/dist/components/puck-block/pricing-sections/pricing-comparison-table/index.d.ts +47 -0
  100. package/dist/components/puck-block/pricing-sections/pricing-comparison-table/index.js +34 -0
  101. package/dist/components/puck-block/pricing-sections/split-pricing/component.js +3 -3
  102. package/dist/components/puck-block/pricing-sections/tab-pricing-grid/component.js +86 -40
  103. package/dist/components/puck-block/pricing-sections/tab-single-pricing/component.js +1 -1
  104. package/dist/components/puck-block/registry.generated.d.ts +501 -12
  105. package/dist/components/puck-block/registry.generated.js +157 -138
  106. package/dist/components/puck-block/showcase-sections/tab-timeline/component.js +2 -2
  107. package/dist/components/puck-block/testimonial-sections/bento-testimonial/component.js +157 -83
  108. package/dist/components/puck-block/testimonial-sections/centered-testimonial/component.js +71 -28
  109. package/dist/components/puck-block/testimonial-sections/image-testimonial/component.js +66 -29
  110. package/dist/components/puck-block/testimonial-sections/image-testimonial-carousel/component.js +1 -1
  111. package/dist/components/puck-block/testimonial-sections/tab-testimonial/component.js +6 -6
  112. package/dist/components/puck-block/testimonial-sections/testimonial-card-grid/component.js +2 -2
  113. package/dist/components/puck-block/testimonial-sections/testimonial-carousel/component.js +1 -1
  114. package/dist/components/puck-block/text-sections/prose-content/component.js +1 -1
  115. package/dist/components/puck-block/text-sections/side-media-content/component.js +1 -1
  116. package/dist/components/puck-block/text-sections/sticky-text-multi-image/component.js +3 -3
  117. package/dist/components/puck-core/core/props/form.js +25 -1
  118. package/dist/components/puck-core/core/props/media.js +6 -1
  119. package/dist/components/puck-core/fields/array-field.d.ts +7 -0
  120. package/dist/components/puck-core/fields/array-field.js +229 -0
  121. package/dist/components/puck-core/fields/auto-field.js +11 -0
  122. package/dist/components/puck-core/fields/image-upload-field.js +1 -1
  123. package/dist/components/puck-core/fields/index.d.ts +1 -0
  124. package/dist/components/puck-core/fields/location-field.js +4 -1
  125. package/dist/components/puck-core/fields/object-field.js +1 -1
  126. package/dist/index.js +6 -0
  127. 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
  128. 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
  129. 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
  130. 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
  131. package/package.json +7 -1
@@ -3,51 +3,82 @@ import { CompoundButton } from "../../../puck-base/button.js";
3
3
  import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
4
4
  import { cn } from "../../../../utils/css-utils.js";
5
5
  const InlineImageHero = (props) => {
6
- const { headers = [], description, buttons = [], styles: rawStyles } = {
6
+ const {
7
+ headers = [],
8
+ description,
9
+ buttons = [],
10
+ styles: rawStyles
11
+ } = {
7
12
  ...InlineImageHeroDefaults,
8
13
  ...props
9
14
  };
10
- const { className: sectionClassName, style: sectionStyle, css, textAlign } = rawStyles ?? {};
15
+ const {
16
+ className: sectionClassName,
17
+ style: sectionStyle,
18
+ css,
19
+ textAlign
20
+ } = rawStyles ?? {};
11
21
  const isCenter = textAlign === "center";
12
- return /* @__PURE__ */ jsx(SectionWrapper, { className: cn("relative px-[5%] py-8 md:py-12 lg:py-14", sectionClassName), style: sectionStyle, css, children: /* @__PURE__ */ jsxs(
13
- "div",
22
+ return /* @__PURE__ */ jsx(
23
+ SectionWrapper,
14
24
  {
15
- className: `container max-w-xl overflow-hidden${isCenter ? " text-center" : ""}`,
16
- children: [
17
- /* @__PURE__ */ jsx("h1", { className: "mb-5 text-3xl font-bold leading-[1.2] sm:text-6xl md:mb-6 md:text-9xl lg:text-[5rem]", children: headers.map((header, index) => /* @__PURE__ */ jsx("span", { children: header.bgUrl ? /* @__PURE__ */ jsx(
18
- "span",
19
- {
20
- className: "bg-contain bg-no-repeat pr-16 [background-position-x:100%] [background-position-y:center] sm:pr-[5.75rem] md:pr-[7.5rem] lg:pr-[11.5rem]",
21
- style: {
22
- backgroundImage: `url('${header.bgUrl}')`
23
- },
24
- children: header.heading
25
- }
26
- ) : " " + header.heading + " " }, index)) }),
27
- /* @__PURE__ */ jsx("p", { className: "md:text-md", children: description }),
28
- /* @__PURE__ */ jsx(
29
- "div",
30
- {
31
- className: `mt-6 flex${isCenter ? " items-center justify-center" : ""} gap-x-4 md:mt-8`,
32
- children: buttons.map((button, index) => /* @__PURE__ */ jsx(CompoundButton, { label: button.label, variant: button.variant, size: button.size, action: button.action, icon: button.icon }, index))
33
- }
34
- )
35
- ]
25
+ className: cn(
26
+ "relative px-[5%] py-8 md:py-12 lg:py-14",
27
+ sectionClassName
28
+ ),
29
+ style: sectionStyle,
30
+ css,
31
+ children: /* @__PURE__ */ jsxs(
32
+ "div",
33
+ {
34
+ className: `container max-w-xl overflow-hidden${isCenter ? " text-center" : ""}`,
35
+ children: [
36
+ /* @__PURE__ */ jsx("h1", { className: "mb-5 text-3xl font-bold leading-[1.2] sm:text-6xl md:mb-6 md:text-9xl lg:text-[5rem]", children: headers.map((header, index) => /* @__PURE__ */ jsx("span", { children: header.bgUrl ? /* @__PURE__ */ jsx(
37
+ "span",
38
+ {
39
+ className: "bg-no-repeat pr-16 [background-position-x:100%] [background-position-y:center] [background-size:auto_80%] sm:pr-[5.75rem] md:pr-[7.5rem] lg:pr-[11.5rem]",
40
+ style: {
41
+ backgroundImage: `url('${header.bgUrl}')`
42
+ },
43
+ children: header.heading
44
+ }
45
+ ) : " " + header.heading + " " }, index)) }),
46
+ /* @__PURE__ */ jsx("p", { className: "md:text-md", children: description }),
47
+ /* @__PURE__ */ jsx(
48
+ "div",
49
+ {
50
+ className: `mt-6 flex${isCenter ? " items-center justify-center" : ""} gap-x-4 md:mt-8`,
51
+ children: buttons.map((button, index) => /* @__PURE__ */ jsx(
52
+ CompoundButton,
53
+ {
54
+ label: button.label,
55
+ variant: button.variant,
56
+ size: button.size,
57
+ action: button.action,
58
+ icon: button.icon
59
+ },
60
+ index
61
+ ))
62
+ }
63
+ )
64
+ ]
65
+ }
66
+ )
36
67
  }
37
- ) });
68
+ );
38
69
  };
39
70
  const InlineImageHeroDefaults = {
40
71
  headers: [
41
72
  {
42
73
  heading: "Long",
43
- bgUrl: "https://picsum.photos/seed/hero-landscape/1200/800"
74
+ bgUrl: "https://file.springbrand.ai/web_assets/template-logo.svg"
44
75
  },
45
76
  {
46
77
  heading: "heading is what you see here in this"
47
78
  },
48
79
  {
49
80
  heading: "header",
50
- bgUrl: "https://picsum.photos/seed/hero-landscape/1200/800"
81
+ bgUrl: "https://file.springbrand.ai/web_assets/template-logo.svg"
51
82
  },
52
83
  {
53
84
  heading: "section"
@@ -7,6 +7,7 @@ import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
7
7
  import { cn } from "../../../../utils/css-utils.js";
8
8
  import { motion, useMotionValue, useSpring, useTransform } from "framer-motion";
9
9
  import { useCallback } from "react";
10
+ import { useEditorContext } from "../../../puck-core/core/context/editor-context.js";
10
11
  const imagePositions = {
11
12
  group1: [
12
13
  "bottom-[5%] left-[-8%] z-10 max-w-[18%] sm:bottom-[10%] lg:bottom-auto",
@@ -46,14 +47,27 @@ const getTransformStyles = (smoothMouseX, smoothMouseY, xRange, yRange) => {
46
47
  };
47
48
  };
48
49
  const MouseTrackHero = (props) => {
49
- const { heading, description, buttons = [], group1Images = [], group2Images = [], styles } = {
50
+ const {
51
+ heading,
52
+ description,
53
+ buttons = [],
54
+ group1Images = [],
55
+ group2Images = [],
56
+ styles
57
+ } = {
50
58
  ...MouseTrackHeroDefaults,
51
59
  ...props
52
60
  };
53
- const { className: sectionClassName, style: sectionStyle, css } = styles ?? {};
61
+ const {
62
+ className: sectionClassName,
63
+ style: sectionStyle,
64
+ css
65
+ } = styles ?? {};
66
+ const { isEditor } = useEditorContext();
54
67
  const { smoothMouseX, smoothMouseY, handleMouseMove } = useMouseMove();
55
68
  const isMobile = useMediaQuery("(max-width: 991px)");
56
- const Animate = isMobile ? "div" : motion.div;
69
+ const disableMotion = isMobile || isEditor;
70
+ const Animate = disableMotion ? "div" : motion.div;
57
71
  const canvasTransform = getTransformStyles(
58
72
  smoothMouseX,
59
73
  smoothMouseY,
@@ -77,26 +91,53 @@ const MouseTrackHero = (props) => {
77
91
  {
78
92
  className: "absolute inset-0 flex origin-bottom items-center justify-center",
79
93
  style: transformStyles,
80
- children: images.map((image, index) => /* @__PURE__ */ jsx("div", { className: `absolute w-full ${positions[index]}`, children: /* @__PURE__ */ jsx(CompoundImage, { src: image.src, alt: image.alt, className: "size-full" }) }, index))
94
+ children: images.map((image, index) => /* @__PURE__ */ jsx("div", { className: `absolute w-full ${positions[index]}`, children: /* @__PURE__ */ jsx(
95
+ CompoundImage,
96
+ {
97
+ src: image.src,
98
+ alt: image.alt,
99
+ className: "size-full"
100
+ }
101
+ ) }, index))
81
102
  }
82
103
  );
83
104
  return /* @__PURE__ */ jsxs(
84
105
  SectionWrapper,
85
106
  {
86
- className: cn("relative flex h-svh items-center justify-center overflow-hidden lg:h-screen", sectionClassName),
107
+ className: cn(
108
+ "relative flex h-svh items-center justify-center overflow-hidden lg:h-screen",
109
+ sectionClassName
110
+ ),
87
111
  style: sectionStyle,
88
112
  css,
89
- onMouseMove: handleMouseMove,
113
+ onMouseMove: isEditor ? void 0 : handleMouseMove,
90
114
  children: [
91
115
  /* @__PURE__ */ jsx("div", { className: "px-[5%] py-8 md:py-12 lg:py-14", children: /* @__PURE__ */ jsx("div", { className: "container max-w-lg", children: /* @__PURE__ */ jsxs("div", { className: "relative z-10 text-center", children: [
92
116
  /* @__PURE__ */ jsx("h1", { className: "mb-5 text-6xl font-bold md:mb-6 md:text-9xl lg:text-10xl", children: heading }),
93
117
  /* @__PURE__ */ jsx("p", { className: "md:text-md", children: description }),
94
- /* @__PURE__ */ jsx("div", { className: "mt-6 flex items-center justify-center gap-4 md:mt-8", children: buttons.map((button, index) => /* @__PURE__ */ jsx(CompoundButton, { label: button.label, variant: button.variant, size: button.size, action: button.action, icon: button.icon }, index)) })
118
+ /* @__PURE__ */ jsx("div", { className: "mt-6 flex items-center justify-center gap-4 md:mt-8", children: buttons.map((button, index) => /* @__PURE__ */ jsx(
119
+ CompoundButton,
120
+ {
121
+ label: button.label,
122
+ variant: button.variant,
123
+ size: button.size,
124
+ action: button.action,
125
+ icon: button.icon
126
+ },
127
+ index
128
+ )) })
95
129
  ] }) }) }),
96
- /* @__PURE__ */ jsxs(Animate, { className: "absolute size-full", style: canvasTransform, children: [
97
- renderImages(group1Images, imagePositions.group1, group1Transform),
98
- renderImages(group2Images, imagePositions.group2, group2Transform)
99
- ] })
130
+ /* @__PURE__ */ jsxs(
131
+ Animate,
132
+ {
133
+ className: "absolute size-full",
134
+ style: canvasTransform,
135
+ children: [
136
+ renderImages(group1Images, imagePositions.group1, group1Transform),
137
+ renderImages(group2Images, imagePositions.group2, group2Transform)
138
+ ]
139
+ }
140
+ )
100
141
  ]
101
142
  }
102
143
  );
@@ -108,37 +149,37 @@ const MouseTrackHeroDefaults = {
108
149
  group1Images: [
109
150
  {
110
151
  src: "https://picsum.photos/seed/hero-square/1200/1200",
111
- alt: "Relume placeholder image 1"
152
+ alt: "Placeholder image 1"
112
153
  },
113
154
  {
114
155
  src: "https://picsum.photos/seed/hero-square/1200/1200",
115
- alt: "Relume placeholder image 2"
156
+ alt: "Placeholder image 2"
116
157
  },
117
158
  {
118
159
  src: "https://picsum.photos/seed/hero-square/1200/1200",
119
- alt: "Relume placeholder image 3"
160
+ alt: "Placeholder image 3"
120
161
  },
121
162
  {
122
163
  src: "https://picsum.photos/seed/hero-square/1200/1200",
123
- alt: "Relume placeholder image 4"
164
+ alt: "Placeholder image 4"
124
165
  }
125
166
  ],
126
167
  group2Images: [
127
168
  {
128
169
  src: "https://picsum.photos/seed/hero-landscape/1200/800",
129
- alt: "Relume placeholder image 5"
170
+ alt: "Placeholder image 5"
130
171
  },
131
172
  {
132
173
  src: "https://picsum.photos/seed/hero-square/1200/1200",
133
- alt: "Relume placeholder image 6"
174
+ alt: "Placeholder image 6"
134
175
  },
135
176
  {
136
177
  src: "https://picsum.photos/seed/hero-landscape/1200/800",
137
- alt: "Relume placeholder image 7"
178
+ alt: "Placeholder image 7"
138
179
  },
139
180
  {
140
181
  src: "https://picsum.photos/seed/hero-landscape/1200/800",
141
- alt: "Relume placeholder image 8"
182
+ alt: "Placeholder image 8"
142
183
  }
143
184
  ]
144
185
  };
@@ -143,8 +143,24 @@ declare const conf: {
143
143
  }[];
144
144
  };
145
145
  imageGridRatio: {
146
- readonly type: "text";
146
+ readonly type: "select";
147
147
  readonly label: "Image Grid Ratio";
148
+ readonly options: readonly [{
149
+ readonly label: "3:1 (宽主图 + 窄侧图)";
150
+ readonly value: "1fr_0.33fr";
151
+ }, {
152
+ readonly label: "1:1 (等宽)";
153
+ readonly value: "1fr_1fr";
154
+ }, {
155
+ readonly label: "2:1";
156
+ readonly value: "2fr_1fr";
157
+ }, {
158
+ readonly label: "1:2";
159
+ readonly value: "1fr_2fr";
160
+ }, {
161
+ readonly label: "3:2";
162
+ readonly value: "3fr_2fr";
163
+ }];
148
164
  };
149
165
  };
150
166
  };
@@ -68,11 +68,11 @@ const MultiImageGridHeroDefaults = {
68
68
  images: [
69
69
  {
70
70
  src: "https://picsum.photos/seed/hero-landscape/1200/800",
71
- alt: "Relume placeholder image 1"
71
+ alt: "Placeholder image 1"
72
72
  },
73
73
  {
74
74
  src: "https://picsum.photos/seed/hero-square/1200/1200",
75
- alt: "Relume placeholder image 2"
75
+ alt: "Placeholder image 2"
76
76
  }
77
77
  ],
78
78
  styles: {
@@ -199,15 +199,15 @@ const OverlappingImageHeroDefaults = {
199
199
  buttons: [{ label: "Button" }, { label: "Button", variant: "secondary" }],
200
200
  firstImage: {
201
201
  src: "https://picsum.photos/seed/hero-square/1200/1200",
202
- alt: "Relume placeholder image 1"
202
+ alt: "Placeholder image 1"
203
203
  },
204
204
  secondImage: {
205
205
  src: "https://picsum.photos/seed/hero-portrait/800/1200",
206
- alt: "Relume placeholder image 2"
206
+ alt: "Placeholder image 2"
207
207
  },
208
208
  thirdImage: {
209
209
  src: "https://picsum.photos/seed/hero-dim/1200/800",
210
- alt: "Relume placeholder image 3"
210
+ alt: "Placeholder image 3"
211
211
  },
212
212
  styles: {
213
213
  textPosition: "left",
@@ -6,6 +6,7 @@ import { CompoundImage } from "../../../puck-base/image.js";
6
6
  import { useRef } from "react";
7
7
  import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
8
8
  import { useScrollContainer } from "../../../../hooks/use-scroll-container.js";
9
+ import { useEditorContext } from "../../../puck-core/core/context/editor-context.js";
9
10
  import { cn } from "../../../../utils/css-utils.js";
10
11
  const ParallaxImagesHero = (props) => {
11
12
  const { heading, description, buttons = [], images = [], styles } = {
@@ -13,6 +14,7 @@ const ParallaxImagesHero = (props) => {
13
14
  ...props
14
15
  };
15
16
  const { className: sectionClassName, style: sectionStyle, css } = styles ?? {};
17
+ const { isEditor } = useEditorContext();
16
18
  const transformRef = useRef(null);
17
19
  const [scrollContainerRef] = useScrollContainer(transformRef);
18
20
  const { scrollYProgress } = useScroll({
@@ -24,6 +26,16 @@ const ParallaxImagesHero = (props) => {
24
26
  });
25
27
  const yFirst = useTransform(animatedScrollYProgress, [0, 1], ["0vh", "-87.5vh"]);
26
28
  const ySecond = useTransform(animatedScrollYProgress, [0, 1], ["0vh", "-39.6vh"]);
29
+ if (isEditor) {
30
+ return /* @__PURE__ */ jsx(SectionWrapper, { ref: transformRef, className: cn("relative px-[5%]", sectionClassName), style: sectionStyle, css, children: /* @__PURE__ */ jsxs("div", { className: "relative overflow-hidden", children: [
31
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-4 py-8", children: images.slice(0, 6).map((image, index) => /* @__PURE__ */ jsx("div", { className: "relative aspect-square", children: /* @__PURE__ */ jsx(CompoundImage, { src: image.src, className: "absolute inset-0 size-full object-cover", alt: image.alt }) }, index)) }),
32
+ /* @__PURE__ */ jsx("div", { className: "container relative flex max-w-lg items-center py-16 text-center", children: /* @__PURE__ */ jsxs("div", { children: [
33
+ /* @__PURE__ */ jsx("h1", { className: "mb-5 text-6xl font-bold md:mb-6 md:text-9xl lg:text-10xl", children: heading }),
34
+ /* @__PURE__ */ jsx("p", { className: "relative z-20 md:text-md", children: description }),
35
+ /* @__PURE__ */ jsx("div", { className: "relative z-20 mt-6 flex items-center justify-center gap-x-4 md:mt-8", children: buttons.map((button, index) => /* @__PURE__ */ jsx(CompoundButton, { label: button.label, variant: button.variant, size: button.size, action: button.action, icon: button.icon }, index)) })
36
+ ] }) })
37
+ ] }) });
38
+ }
27
39
  return /* @__PURE__ */ jsx(SectionWrapper, { ref: transformRef, className: cn("relative h-[150vh] px-[5%] md:h-[300vh]", sectionClassName), style: sectionStyle, css, children: /* @__PURE__ */ jsxs("div", { className: "sticky top-0 h-screen overflow-hidden", children: [
28
40
  /* @__PURE__ */ jsx("div", { className: "absolute bottom-0 left-0 right-auto top-0 z-10", children: /* @__PURE__ */ jsx(motion.div, { className: "flex flex-col gap-[26vw] pt-[70vh]", style: { y: yFirst }, children: images.slice(0, 4).map((image, index) => /* @__PURE__ */ jsx(
29
41
  "div",
@@ -93,27 +105,27 @@ const ParallaxImagesHeroDefaults = {
93
105
  images: [
94
106
  {
95
107
  src: "https://picsum.photos/seed/hero-square/1200/1200",
96
- alt: "Relume placeholder image 1"
108
+ alt: "Placeholder image 1"
97
109
  },
98
110
  {
99
111
  src: "https://picsum.photos/seed/hero-square/1200/1200",
100
- alt: "Relume placeholder image 2"
112
+ alt: "Placeholder image 2"
101
113
  },
102
114
  {
103
115
  src: "https://picsum.photos/seed/hero-square/1200/1200",
104
- alt: "Relume placeholder image 3"
116
+ alt: "Placeholder image 3"
105
117
  },
106
118
  {
107
119
  src: "https://picsum.photos/seed/hero-square/1200/1200",
108
- alt: "Relume placeholder image 4"
120
+ alt: "Placeholder image 4"
109
121
  },
110
122
  {
111
123
  src: "https://picsum.photos/seed/hero-square/1200/1200",
112
- alt: "Relume placeholder image 5"
124
+ alt: "Placeholder image 5"
113
125
  },
114
126
  {
115
127
  src: "https://picsum.photos/seed/hero-square/1200/1200",
116
- alt: "Relume placeholder image 6"
128
+ alt: "Placeholder image 6"
117
129
  }
118
130
  ]
119
131
  };
@@ -157,8 +157,24 @@ export declare const heroStyleFields: {
157
157
  }];
158
158
  };
159
159
  readonly imageGridRatio: {
160
- readonly type: "text";
160
+ readonly type: "select";
161
161
  readonly label: "Image Grid Ratio";
162
+ readonly options: readonly [{
163
+ readonly label: "3:1 (宽主图 + 窄侧图)";
164
+ readonly value: "1fr_0.33fr";
165
+ }, {
166
+ readonly label: "1:1 (等宽)";
167
+ readonly value: "1fr_1fr";
168
+ }, {
169
+ readonly label: "2:1";
170
+ readonly value: "2fr_1fr";
171
+ }, {
172
+ readonly label: "1:2";
173
+ readonly value: "1fr_2fr";
174
+ }, {
175
+ readonly label: "3:2";
176
+ readonly value: "3fr_2fr";
177
+ }];
162
178
  };
163
179
  readonly overlapStyle: {
164
180
  readonly type: "radio";
@@ -197,8 +213,24 @@ export declare const heroStyleFields: {
197
213
  }];
198
214
  };
199
215
  readonly gridRatio: {
200
- readonly type: "text";
216
+ readonly type: "select";
201
217
  readonly label: "Grid Ratio";
218
+ readonly options: readonly [{
219
+ readonly label: "25% / 50% / 25%";
220
+ readonly value: "25%_50%_25%";
221
+ }, {
222
+ readonly label: "32% / 36% / 32%";
223
+ readonly value: "32%_36%_32%";
224
+ }, {
225
+ readonly label: "33% / 33% / 33%";
226
+ readonly value: "33%_34%_33%";
227
+ }, {
228
+ readonly label: "20% / 60% / 20%";
229
+ readonly value: "20%_60%_20%";
230
+ }, {
231
+ readonly label: "40% / 30% / 30%";
232
+ readonly value: "40%_30%_30%";
233
+ }];
202
234
  };
203
235
  };
204
236
  /** 将 HeroSectionBaseProps 与组件特有字段合并,生成最终 Props */
@@ -35,8 +35,15 @@ const heroStyleFields = {
35
35
  ]
36
36
  },
37
37
  imageGridRatio: {
38
- type: "text",
39
- label: "Image Grid Ratio"
38
+ type: "select",
39
+ label: "Image Grid Ratio",
40
+ options: [
41
+ { label: "3:1 (宽主图 + 窄侧图)", value: "1fr_0.33fr" },
42
+ { label: "1:1 (等宽)", value: "1fr_1fr" },
43
+ { label: "2:1", value: "2fr_1fr" },
44
+ { label: "1:2", value: "1fr_2fr" },
45
+ { label: "3:2", value: "3fr_2fr" }
46
+ ]
40
47
  },
41
48
  overlapStyle: {
42
49
  type: "radio",
@@ -64,8 +71,15 @@ const heroStyleFields = {
64
71
  ]
65
72
  },
66
73
  gridRatio: {
67
- type: "text",
68
- label: "Grid Ratio"
74
+ type: "select",
75
+ label: "Grid Ratio",
76
+ options: [
77
+ { label: "25% / 50% / 25%", value: "25%_50%_25%" },
78
+ { label: "32% / 36% / 32%", value: "32%_36%_32%" },
79
+ { label: "33% / 33% / 33%", value: "33%_34%_33%" },
80
+ { label: "20% / 60% / 20%", value: "20%_60%_20%" },
81
+ { label: "40% / 30% / 30%", value: "40%_30%_30%" }
82
+ ]
69
83
  }
70
84
  };
71
85
  export {
@@ -6,6 +6,7 @@ import { CompoundButton } from "../../../puck-base/button.js";
6
6
  import { CompoundImage } from "../../../puck-base/image.js";
7
7
  import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
8
8
  import { useScrollContainer } from "../../../../hooks/use-scroll-container.js";
9
+ import { useEditorContext } from "../../../puck-core/core/context/editor-context.js";
9
10
  import { useScroll, useTransform, motion } from "framer-motion";
10
11
  const ScatterParallaxHero = (props) => {
11
12
  const { heading, description, buttons = [], images = [], styles } = {
@@ -13,6 +14,7 @@ const ScatterParallaxHero = (props) => {
13
14
  ...props
14
15
  };
15
16
  const { className: sectionClassName, style: sectionStyle, css } = styles ?? {};
17
+ const { isEditor } = useEditorContext();
16
18
  const sectionRef = useRef(null);
17
19
  const [scrollContainerRef] = useScrollContainer(sectionRef);
18
20
  const { scrollYProgress } = useScroll(
@@ -52,12 +54,12 @@ const ScatterParallaxHero = (props) => {
52
54
  /* @__PURE__ */ jsx(
53
55
  motion.div,
54
56
  {
55
- style: containerMotion,
57
+ style: isEditor ? { y: "0%", scale: 1, opacity: 1 } : containerMotion,
56
58
  className: "absolute inset-0 z-10 flex origin-bottom items-end justify-center",
57
59
  children: images.map((image, index) => /* @__PURE__ */ jsx(
58
60
  motion.div,
59
61
  {
60
- style: imageMotions[index],
62
+ style: isEditor ? { x: 0, y: 0 } : imageMotions[index],
61
63
  className: cn("absolute w-full max-w-[9rem] sm:max-w-[15rem] lg:max-w-xs", {
62
64
  "left-[-25%] top-[65%] sm:top-[45%] md:left-[-20%] lg:left-[-10%] lg:top-[12%] ": index === 0,
63
65
  "bottom-[5%] left-[-8%] md:left-[5%] lg:bottom-[10%]": index === 1,
@@ -82,23 +84,23 @@ const ScatterParallaxHeroDefaults = {
82
84
  images: [
83
85
  {
84
86
  src: "https://picsum.photos/seed/hero-square/1200/1200",
85
- alt: "Relume placeholder image 1"
87
+ alt: "Placeholder image 1"
86
88
  },
87
89
  {
88
90
  src: "https://picsum.photos/seed/hero-square/1200/1200",
89
- alt: "Relume placeholder image 2"
91
+ alt: "Placeholder image 2"
90
92
  },
91
93
  {
92
94
  src: "https://picsum.photos/seed/hero-square/1200/1200",
93
- alt: "Relume placeholder image 3"
95
+ alt: "Placeholder image 3"
94
96
  },
95
97
  {
96
98
  src: "https://picsum.photos/seed/hero-square/1200/1200",
97
- alt: "Relume placeholder image 4"
99
+ alt: "Placeholder image 4"
98
100
  },
99
101
  {
100
102
  src: "https://picsum.photos/seed/hero-square/1200/1200",
101
- alt: "Relume placeholder image 5"
103
+ alt: "Placeholder image 5"
102
104
  }
103
105
  ]
104
106
  };
@@ -8,6 +8,7 @@ import { useScroll, useSpring, useTransform, motion } from "framer-motion";
8
8
  import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
9
9
  import { useScrollContainer } from "../../../../hooks/use-scroll-container.js";
10
10
  import { cn } from "../../../../utils/css-utils.js";
11
+ import { useEditorContext } from "../../../puck-core/core/context/editor-context.js";
11
12
  import { FaCirclePlay } from "../../../../node_modules/.pnpm/react-icons@5.6.0_react@19.2.4/node_modules/react-icons/fa6/index.js";
12
13
  import { CgSpinner } from "../../../../node_modules/.pnpm/react-icons@5.6.0_react@19.2.4/node_modules/react-icons/cg/index.js";
13
14
  const ScrollExpandVideoHero = (props) => {
@@ -17,6 +18,7 @@ const ScrollExpandVideoHero = (props) => {
17
18
  };
18
19
  const image = images == null ? void 0 : images[0];
19
20
  const { className: sectionClassName, style: sectionStyle, css } = styles ?? {};
21
+ const { isEditor } = useEditorContext();
20
22
  const [isIframeLoaded, setIsIframeLoaded] = useState(false);
21
23
  const transformRef = useRef(null);
22
24
  const [scrollContainerRef] = useScrollContainer(transformRef);
@@ -37,11 +39,11 @@ const ScrollExpandVideoHero = (props) => {
37
39
  SectionWrapper,
38
40
  {
39
41
  ref: transformRef,
40
- className: cn("relative flex h-[300vh] flex-col items-center", sectionClassName),
42
+ className: cn("relative flex flex-col items-center", isEditor ? "h-auto" : "h-[300vh]", sectionClassName),
41
43
  style: sectionStyle,
42
44
  css,
43
45
  children: [
44
- /* @__PURE__ */ jsx("div", { className: "px-[5%]", children: /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-0 mx-auto flex min-h-[80vh] max-w-lg items-center justify-center py-16 text-center md:py-24 lg:py-28", children: /* @__PURE__ */ jsxs(motion.div, { style: { opacity: fadeOut, scale: scaleDown }, children: [
46
+ /* @__PURE__ */ jsx("div", { className: "px-[5%]", children: /* @__PURE__ */ jsx("div", { className: cn("z-0 mx-auto flex min-h-[80vh] max-w-lg items-center justify-center py-16 text-center md:py-24 lg:py-28", !isEditor && "sticky top-0"), children: /* @__PURE__ */ jsxs(motion.div, { style: isEditor ? { opacity: 1, scale: 1 } : { opacity: fadeOut, scale: scaleDown }, children: [
45
47
  /* @__PURE__ */ jsx("h1", { className: "mb-5 text-6xl font-bold md:mb-6 md:text-9xl lg:text-10xl", children: heading }),
46
48
  /* @__PURE__ */ jsx("p", { className: "md:text-md", children: description }),
47
49
  /* @__PURE__ */ jsx("div", { className: "mt-6 flex items-center justify-center gap-x-4 md:mt-8", children: buttons.map((button, index) => /* @__PURE__ */ jsx(CompoundButton, { label: button.label, variant: button.variant, size: button.size, action: button.action, icon: button.icon }, index)) })
@@ -49,8 +51,8 @@ const ScrollExpandVideoHero = (props) => {
49
51
  /* @__PURE__ */ jsx(
50
52
  motion.div,
51
53
  {
52
- style: { width, height, y },
53
- className: "sticky top-[10vh] z-10 mb-[-10vh] flex flex-col justify-start",
54
+ style: isEditor ? { width: "100%", height: "100vh", y: 0 } : { width, height, y },
55
+ className: cn("z-10 flex flex-col justify-start", isEditor ? "relative" : "sticky top-[10vh] mb-[-10vh]"),
54
56
  children: /* @__PURE__ */ jsxs(Dialog, { children: [
55
57
  /* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("button", { className: "relative flex size-full items-center justify-center", children: [
56
58
  /* @__PURE__ */ jsx(CompoundImage, { src: image.src, alt: image.alt, className: "size-full object-cover" }),
@@ -88,7 +90,7 @@ const ScrollExpandVideoHeroDefaults = {
88
90
  video: "https://www.youtube.com/embed/8DKLYsikxTs?si=Ch9W0KrDWWUiCMMW",
89
91
  images: [{
90
92
  src: "https://picsum.photos/seed/hero-video/1200/800",
91
- alt: "Relume placeholder image"
93
+ alt: "Placeholder image"
92
94
  }]
93
95
  };
94
96
  export {
@@ -6,6 +6,7 @@ import { VideoIframe } from "../../../shadcn/video-iframe.js";
6
6
  import { Dialog, DialogTrigger, DialogContent } from "../../../shadcn/dialog.js";
7
7
  import { useMediaQuery } from "../../../../hooks/use-media-query.js";
8
8
  import { useScrollContainer } from "../../../../hooks/use-scroll-container.js";
9
+ import { useEditorContext } from "../../../puck-core/core/context/editor-context.js";
9
10
  import { CompoundButton } from "../../../puck-base/button.js";
10
11
  import { CompoundImage } from "../../../puck-base/image.js";
11
12
  import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
@@ -30,6 +31,7 @@ const ScrollZoomHero = (props) => {
30
31
  css,
31
32
  mediaType
32
33
  } = rawStyles ?? {};
34
+ const { isEditor } = useEditorContext();
33
35
  const isMobile = useMediaQuery("(max-width: 767px)");
34
36
  const sectionRef = useRef(null);
35
37
  const [scrollContainerRef] = useScrollContainer(sectionRef);
@@ -71,7 +73,7 @@ const ScrollZoomHero = (props) => {
71
73
  role: "button",
72
74
  tabIndex: 0,
73
75
  className: "relative flex size-full cursor-pointer origin-top-right items-center justify-center",
74
- style: { scale: isMobile ? 1 : scaleValue },
76
+ style: { scale: isMobile || isEditor ? 1 : scaleValue },
75
77
  children: [
76
78
  /* @__PURE__ */ jsx(
77
79
  CompoundImage,
@@ -91,7 +93,7 @@ const ScrollZoomHero = (props) => {
91
93
  motion.div,
92
94
  {
93
95
  className: "flex origin-top-right flex-col items-end justify-center md:h-[60vh] lg:h-[80vh] lg:justify-start",
94
- style: { scale: isMobile ? 1 : scaleValue },
96
+ style: { scale: isMobile || isEditor ? 1 : scaleValue },
95
97
  children: /* @__PURE__ */ jsx(
96
98
  CompoundImage,
97
99
  {
@@ -114,7 +116,7 @@ const ScrollZoomHeroDefaults = {
114
116
  images: [
115
117
  {
116
118
  src: "https://picsum.photos/seed/hero-video/1200/800",
117
- alt: "Relume placeholder image"
119
+ alt: "Placeholder image"
118
120
  }
119
121
  ],
120
122
  styles: {
@@ -59,7 +59,7 @@ const StickyExpandHeroDefaults = {
59
59
  buttons: [{ label: "Button" }, { label: "Button", variant: "secondary" }],
60
60
  images: [{
61
61
  src: "https://picsum.photos/seed/hero-landscape/1200/800",
62
- alt: "Relume placeholder image"
62
+ alt: "Placeholder image"
63
63
  }]
64
64
  };
65
65
  export {