dune-react 0.0.21 → 0.0.22

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 (180) hide show
  1. package/dist/components/index.d.ts +1 -0
  2. package/dist/components/puck-base/button.d.ts +1 -1
  3. package/dist/components/puck-base/button.js +5 -6
  4. package/dist/components/puck-base/card.d.ts +1 -1
  5. package/dist/components/puck-base/container.js +1 -1
  6. package/dist/components/puck-base/content.d.ts +1 -1
  7. package/dist/components/puck-base/image.js +16 -16
  8. package/dist/components/puck-base/index.d.ts +1 -13
  9. package/dist/components/puck-block/banner-sections/dismissible-banner/index.d.ts +3 -25
  10. package/dist/components/puck-block/contact-sections/centered-form/index.d.ts +1 -1
  11. package/dist/components/puck-block/contact-sections/contact-modal/contact-modal.js +1 -1
  12. package/dist/components/puck-block/contact-sections/contact-modal/index.d.ts +1 -1
  13. package/dist/components/puck-block/contact-sections/form-with-media/index.d.ts +1 -1
  14. package/dist/components/puck-block/contact-sections/header-form-cards/index.d.ts +1 -1
  15. package/dist/components/puck-block/contact-sections/location-cards-grid/index.d.ts +1 -1
  16. package/dist/components/puck-block/contact-sections/split-info-form/index.d.ts +1 -1
  17. package/dist/components/puck-block/cta-sections/feature-card-cta/index.d.ts +1 -1
  18. package/dist/components/puck-block/cta-sections/index.d.ts +2 -0
  19. package/dist/components/puck-block/cta-sections/mouse-track-cta/index.d.ts +1 -1
  20. package/dist/components/puck-block/cta-sections/mouse-track-cta/mouse-track-cta.js +88 -59
  21. package/dist/components/puck-block/cta-sections/props.js +46 -0
  22. package/dist/components/puck-block/cta-sections/side-media-cta/index.d.ts +1 -73
  23. package/dist/components/puck-block/cta-sections/side-media-cta/index.js +35 -0
  24. package/dist/components/puck-block/cta-sections/side-media-cta/side-media-cta.js +84 -0
  25. package/dist/components/puck-block/cta-sections/text-block-cta/index.d.ts +2 -74
  26. package/dist/components/puck-block/cta-sections/text-block-cta/index.js +38 -0
  27. package/dist/components/puck-block/cta-sections/text-block-cta/text-block-cta.d.ts +1 -1
  28. package/dist/components/puck-block/cta-sections/text-block-cta/text-block-cta.js +165 -0
  29. package/dist/components/puck-block/faq-sections/dual-column-accordion-faq/index.d.ts +1 -1
  30. package/dist/components/puck-block/faq-sections/icon-card-faq/index.d.ts +1 -1
  31. package/dist/components/puck-block/faq-sections/stacked-accordion-faq/index.d.ts +1 -1
  32. package/dist/components/puck-block/faq-sections/stacked-static-faq/index.d.ts +1 -1
  33. package/dist/components/puck-block/faq-sections/two-column-accordion-faq/index.d.ts +1 -1
  34. package/dist/components/puck-block/faq-sections/two-column-static-faq/index.d.ts +1 -1
  35. package/dist/components/puck-block/feature-sections/feature-cards-grid/index.d.ts +2 -2
  36. package/dist/components/puck-block/feature-sections/feature-list-split/index.d.ts +2 -2
  37. package/dist/components/puck-block/feature-sections/tab-feature/component.js +77 -61
  38. package/dist/components/puck-block/feature-sections/text-media-split/index.d.ts +1 -1
  39. package/dist/components/puck-block/feature-sections/text-only-section/index.d.ts +1 -1
  40. package/dist/components/puck-block/footer-sections/compact-newsletter-footer/index.d.ts +1 -1
  41. package/dist/components/puck-block/footer-sections/cta-links-footer/index.d.ts +1 -1
  42. package/dist/components/puck-block/footer-sections/links-newsletter-footer/index.d.ts +1 -1
  43. package/dist/components/puck-block/footer-sections/newsletter-links-footer/index.d.ts +1 -1
  44. package/dist/components/puck-block/footer-sections/newsletter-top-links-footer/index.d.ts +1 -1
  45. package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/index.d.ts +25 -28
  46. package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/index.js +3 -2
  47. package/dist/components/puck-block/gallery-sections/portfolio-cards/index.d.ts +2 -2
  48. package/dist/components/puck-block/gallery-sections/portfolio-divider/index.d.ts +2 -2
  49. package/dist/components/puck-block/gallery-sections/portfolio-divider/portfolio-divider.js +67 -64
  50. package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/index.d.ts +24 -27
  51. package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/index.js +3 -2
  52. package/dist/components/puck-block/header-sections/centered-navbar/index.d.ts +1 -1
  53. package/dist/components/puck-block/header-sections/drawer-navbar/drawer-navbar.js +118 -17
  54. package/dist/components/puck-block/header-sections/drawer-navbar/index.d.ts +1 -1
  55. package/dist/components/puck-block/header-sections/floating-bordered-navbar/floating-bordered-navbar.js +161 -22
  56. package/dist/components/puck-block/header-sections/floating-bordered-navbar/index.d.ts +1 -1
  57. package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/fullscreen-overlay-navbar.js +142 -19
  58. package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/index.d.ts +1 -1
  59. package/dist/components/puck-block/header-sections/mega-menu-navbar/index.d.ts +1 -1
  60. package/dist/components/puck-block/header-sections/standard-navbar/index.d.ts +1 -1
  61. package/dist/components/puck-block/hero-sections/carousel-hero/component.js +50 -9
  62. package/dist/components/puck-block/hero-sections/carousel-hero/index.d.ts +1 -1
  63. package/dist/components/puck-block/hero-sections/centered-hero/index.d.ts +2 -2
  64. package/dist/components/puck-block/hero-sections/column-scroll-hero/index.d.ts +1 -1
  65. package/dist/components/puck-block/hero-sections/dual-marquee-hero/index.d.ts +1 -1
  66. package/dist/components/puck-block/hero-sections/fullscreen-hero/index.d.ts +2 -2
  67. package/dist/components/puck-block/hero-sections/fullscreen-video-hero/component.js +4 -2
  68. package/dist/components/puck-block/hero-sections/fullscreen-video-hero/index.d.ts +1 -1
  69. package/dist/components/puck-block/hero-sections/grid-expand-hero/index.d.ts +1 -1
  70. package/dist/components/puck-block/hero-sections/horizontal-marquee-hero/index.d.ts +1 -1
  71. package/dist/components/puck-block/hero-sections/inline-image-hero/index.d.ts +1 -1
  72. package/dist/components/puck-block/hero-sections/media-text-hero/index.d.ts +26 -29
  73. package/dist/components/puck-block/hero-sections/mouse-track-hero/index.d.ts +1 -1
  74. package/dist/components/puck-block/hero-sections/multi-image-grid-hero/index.d.ts +25 -28
  75. package/dist/components/puck-block/hero-sections/multi-image-grid-hero/index.js +3 -2
  76. package/dist/components/puck-block/hero-sections/overlapping-image-hero/index.d.ts +1 -1
  77. package/dist/components/puck-block/hero-sections/parallax-images-hero/index.d.ts +1 -1
  78. package/dist/components/puck-block/hero-sections/scatter-parallax-hero/index.d.ts +1 -1
  79. package/dist/components/puck-block/hero-sections/scroll-expand-video-hero/index.d.ts +1 -1
  80. package/dist/components/puck-block/hero-sections/scroll-zoom-hero/component.js +91 -44
  81. package/dist/components/puck-block/hero-sections/scroll-zoom-hero/index.d.ts +1 -1
  82. package/dist/components/puck-block/hero-sections/split-hero/index.d.ts +2 -2
  83. package/dist/components/puck-block/hero-sections/stacked-hero/index.d.ts +2 -2
  84. package/dist/components/puck-block/hero-sections/sticky-expand-hero/index.d.ts +1 -1
  85. package/dist/components/puck-block/hero-sections/sticky-video-hero/index.d.ts +1 -1
  86. package/dist/components/puck-block/hero-sections/tab-hero/index.d.ts +28 -44
  87. package/dist/components/puck-block/hero-sections/tab-hero/index.js +7 -2
  88. package/dist/components/puck-block/hero-sections/three-image-parallax-hero/component.js +93 -43
  89. package/dist/components/puck-block/hero-sections/three-image-parallax-hero/index.d.ts +1 -1
  90. package/dist/components/puck-block/hero-sections/vertical-gallery-hero/component.js +27 -4
  91. package/dist/components/puck-block/hero-sections/vertical-gallery-hero/index.d.ts +1 -1
  92. package/dist/components/puck-block/hero-sections/zoom-grid-hero/index.d.ts +1 -1
  93. package/dist/components/puck-block/index.d.ts +2 -0
  94. package/dist/components/puck-block/location-sections/location-1/location.d.ts +1 -1
  95. package/dist/components/puck-block/location-sections/location-2/location.d.ts +1 -1
  96. package/dist/components/puck-block/location-sections/location-3/location.d.ts +2 -2
  97. package/dist/components/puck-block/location-sections/props.d.ts +1 -1
  98. package/dist/components/puck-block/metrics-sections/header-stats-row/index.d.ts +1 -1
  99. package/dist/components/puck-block/metrics-sections/mixed-grid-stats/index.d.ts +1 -1
  100. package/dist/components/puck-block/metrics-sections/split-stats/index.d.ts +1 -1
  101. package/dist/components/puck-block/metrics-sections/tab-stats/index.d.ts +0 -22
  102. package/dist/components/puck-block/metrics-sections/tab-stats/index.js +1 -1
  103. package/dist/components/puck-block/metrics-sections/tab-stats/tab-stats.js +36 -23
  104. package/dist/components/puck-block/pricing-sections/single-pricing-card/index.d.ts +0 -22
  105. package/dist/components/puck-block/pricing-sections/single-pricing-card/index.js +1 -1
  106. package/dist/components/puck-block/pricing-sections/split-pricing/index.d.ts +28 -22
  107. package/dist/components/puck-block/pricing-sections/split-pricing/index.js +8 -1
  108. package/dist/components/puck-block/registry.generated.d.ts +13141 -0
  109. package/dist/components/puck-block/registry.generated.js +558 -0
  110. package/dist/components/puck-block/showcase-sections/compact-timeline/index.d.ts +1 -1
  111. package/dist/components/puck-block/showcase-sections/horizontal-timeline/index.d.ts +1 -1
  112. package/dist/components/puck-block/showcase-sections/single-column-timeline/index.d.ts +2 -2
  113. package/dist/components/puck-block/showcase-sections/sticky-scroll-timeline/index.d.ts +2 -2
  114. package/dist/components/puck-block/showcase-sections/tab-timeline/index.d.ts +1 -23
  115. package/dist/components/puck-block/showcase-sections/tab-timeline/index.js +1 -1
  116. package/dist/components/puck-block/showcase-sections/zigzag-timeline/index.d.ts +2 -2
  117. package/dist/components/puck-block/team-sections/team-carousel/index.d.ts +1 -23
  118. package/dist/components/puck-block/team-sections/team-carousel/index.js +1 -2
  119. package/dist/components/puck-block/team-sections/team-grid/index.d.ts +1 -23
  120. package/dist/components/puck-block/team-sections/team-grid/index.js +1 -2
  121. package/dist/components/puck-block/team-sections/team-inline-card/index.d.ts +1 -23
  122. package/dist/components/puck-block/team-sections/team-inline-card/index.js +1 -2
  123. package/dist/components/puck-block/team-sections/team-two-column/index.d.ts +1 -1
  124. package/dist/components/puck-block/testimonial-sections/sticky-testimonial/index.d.ts +1 -1
  125. package/dist/components/puck-block/text-sections/aside-nav-content/index.d.ts +0 -22
  126. package/dist/components/puck-block/text-sections/aside-nav-content/index.js +1 -1
  127. package/dist/components/puck-block/text-sections/blog-article/index.d.ts +0 -22
  128. package/dist/components/puck-block/text-sections/blog-article/index.js +1 -1
  129. package/dist/components/puck-block/text-sections/prose-sidebar/index.d.ts +1 -23
  130. package/dist/components/puck-block/text-sections/text-header/index.d.ts +2 -2
  131. package/dist/components/puck-core/core/props/content.js +41 -1
  132. package/dist/components/puck-core/core/props/form.js +76 -0
  133. package/dist/components/puck-core/core/props/index.js +34 -0
  134. package/dist/components/puck-core/core/props/interactive.js +17 -0
  135. package/dist/components/puck-core/core/props/media.js +8 -4
  136. package/dist/components/puck-core/core/styles.d.ts +1 -1
  137. package/dist/components/{puck-base → puck-core}/core/styles.js +3 -1
  138. package/dist/components/{puck-base → puck-core}/core/with-editable.js +1 -1
  139. package/dist/components/puck-core/fields/action-field.js +1 -1
  140. package/dist/components/{puck-base → puck-core/fields}/image-upload-field.js +4 -4
  141. package/dist/components/{puck-base → puck-core}/fields/location-field.js +1 -1
  142. package/dist/components/puck-core/index.d.ts +1 -0
  143. package/dist/components/{puck-base → puck-core}/inline-editable.js +1 -1
  144. package/dist/index.js +121 -104
  145. package/package.json +1 -1
  146. package/dist/components/puck-base/core/fields.d.ts +0 -827
  147. package/dist/components/puck-base/core/fields.js +0 -267
  148. package/dist/components/puck-base/core/hooks.d.ts +0 -19
  149. package/dist/components/puck-base/core/icon-catalog.d.ts +0 -14
  150. package/dist/components/puck-base/core/icon-catalog.js +0 -193
  151. package/dist/components/puck-base/core/styles.d.ts +0 -1942
  152. package/dist/components/puck-base/core/types.d.ts +0 -20
  153. package/dist/components/puck-base/core/types.js +0 -26
  154. package/dist/components/puck-base/core/utils.d.ts +0 -5
  155. package/dist/components/puck-base/core/with-editable.d.ts +0 -16
  156. package/dist/components/puck-base/error-boundary.d.ts +0 -4
  157. package/dist/components/puck-base/fields/action-field.d.ts +0 -30
  158. package/dist/components/puck-base/fields/action-field.js +0 -265
  159. package/dist/components/puck-base/fields/auto-field.d.ts +0 -2
  160. package/dist/components/puck-base/fields/color-field.d.ts +0 -6
  161. package/dist/components/puck-base/fields/index.d.ts +0 -8
  162. package/dist/components/puck-base/fields/location-field.d.ts +0 -44
  163. package/dist/components/puck-base/fields/object-field.d.ts +0 -8
  164. package/dist/components/puck-base/fields/radio-toggle-field.d.ts +0 -10
  165. package/dist/components/puck-base/fields/types.d.ts +0 -29
  166. package/dist/components/puck-base/fields/virtualized-select-field.d.ts +0 -13
  167. package/dist/components/puck-base/icon-picker-field.d.ts +0 -8
  168. package/dist/components/puck-base/icon-picker-field.js +0 -153
  169. package/dist/components/puck-base/image-upload-field.d.ts +0 -7
  170. package/dist/components/puck-base/inline-editable.d.ts +0 -14
  171. package/dist/components/puck-base/use-upload.d.ts +0 -42
  172. /package/dist/components/{puck-base → puck-core}/core/hooks.js +0 -0
  173. /package/dist/components/{puck-base → puck-core}/core/utils.js +0 -0
  174. /package/dist/components/{puck-base → puck-core}/error-boundary.js +0 -0
  175. /package/dist/components/{puck-base → puck-core}/fields/auto-field.js +0 -0
  176. /package/dist/components/{puck-base → puck-core}/fields/color-field.js +0 -0
  177. /package/dist/components/{puck-base → puck-core}/fields/object-field.js +0 -0
  178. /package/dist/components/{puck-base → puck-core}/fields/radio-toggle-field.js +0 -0
  179. /package/dist/components/{puck-base → puck-core}/fields/virtualized-select-field.js +0 -0
  180. /package/dist/components/{puck-base → puck-core}/use-upload.js +0 -0
@@ -1,4 +1,5 @@
1
1
  export * from "./shadcn/index.ts";
2
2
  export * from "./ui-block/index.ts";
3
3
  export * from "./puck-base/index.ts";
4
+ export * from "./puck-core/index.ts";
4
5
  export * from "./puck-block/index.ts";
@@ -1,5 +1,5 @@
1
1
  import { type ButtonProps } from "@/components/shadcn/button";
2
- import { Action, IconName } from "./core/types";
2
+ import { Action, IconName } from "@/components/puck-core/core/types";
3
3
  export interface CompoundButtonProps {
4
4
  label: string;
5
5
  action?: Action;
@@ -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 { resolveActionUrl } from "./core/types.js";
10
- import { withEditable } from "./core/with-editable.js";
11
- import { AutoField } from "./fields/auto-field.js";
12
- const BUTTON_FIELDS = button.objectFields;
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: button.objectFields
82
+ fields: buttonField.objectFields
84
83
  });
85
84
  const CompoundButton = (props) => {
86
85
  const [dialogOpen, setDialogOpen] = useState(false);
@@ -1,4 +1,4 @@
1
- import { IconName } from "./core/types";
1
+ import { IconName } from "@/components/puck-core/core/types";
2
2
  import { CompoundButtonProps } from "./button";
3
3
  import { CompoundImageProps } from "./image";
4
4
  export interface CompoundCardProps {
@@ -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 "./error-boundary.js";
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 "./core/types";
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 "./core/with-editable.js";
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 "./use-upload.js";
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 image2 = new Image();
20
- image2.addEventListener("load", () => resolve(image2));
21
- image2.addEventListener("error", (error) => reject(error));
22
- image2.setAttribute("crossOrigin", "anonymous");
23
- image2.src = url;
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 image2 = await createImage(imageSrc);
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(image2.width, image2.height);
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
- image2,
38
- safeArea / 2 - image2.width * 0.5,
39
- safeArea / 2 - image2.height * 0.5
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 + image2.width * 0.5 - pixelCrop.x),
47
- Math.round(0 - safeArea / 2 + image2.height * 0.5 - pixelCrop.y)
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: image.objectFields
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 { InlineEditable } from "./inline-editable";
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";
@@ -34,7 +34,7 @@ declare const conf: {
34
34
  readonly action: {
35
35
  type: "custom";
36
36
  label: string;
37
- render: typeof import("../../../puck-core").ActionField;
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("../../../puck-core").ActionField;
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("../../../puck-core").ActionField;
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
  };
@@ -24,7 +24,7 @@ declare const conf: {
24
24
  readonly action: {
25
25
  type: "custom";
26
26
  label: string;
27
- render: typeof import("../../../puck-core").ActionField;
27
+ render: typeof import("../../..").ActionField;
28
28
  };
29
29
  readonly variant: {
30
30
  readonly type: "select";
@@ -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(Button, { children: "Open modal" }) }),
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
  {
@@ -21,7 +21,7 @@ declare const conf: {
21
21
  readonly action: {
22
22
  type: "custom";
23
23
  label: string;
24
- render: typeof import("../../../puck-core").ActionField;
24
+ render: typeof import("../../..").ActionField;
25
25
  };
26
26
  readonly variant: {
27
27
  readonly type: "select";
@@ -24,7 +24,7 @@ declare const conf: {
24
24
  readonly action: {
25
25
  type: "custom";
26
26
  label: string;
27
- render: typeof import("../../../puck-core").ActionField;
27
+ render: typeof import("../../..").ActionField;
28
28
  };
29
29
  readonly variant: {
30
30
  readonly type: "select";
@@ -24,7 +24,7 @@ declare const conf: {
24
24
  readonly action: {
25
25
  type: "custom";
26
26
  label: string;
27
- render: typeof import("../../../puck-core").ActionField;
27
+ render: typeof import("../../..").ActionField;
28
28
  };
29
29
  readonly variant: {
30
30
  readonly type: "select";
@@ -49,7 +49,7 @@ declare const conf: {
49
49
  readonly action: {
50
50
  type: "custom";
51
51
  label: string;
52
- render: typeof import("../../../puck-core").ActionField;
52
+ render: typeof import("../../..").ActionField;
53
53
  };
54
54
  readonly variant: {
55
55
  readonly type: "select";
@@ -33,7 +33,7 @@ declare const conf: {
33
33
  readonly action: {
34
34
  type: "custom";
35
35
  label: string;
36
- render: typeof import("../../../puck-core").ActionField;
36
+ render: typeof import("../../..").ActionField;
37
37
  };
38
38
  readonly variant: {
39
39
  readonly type: "select";
@@ -41,7 +41,7 @@ declare const conf: {
41
41
  readonly action: {
42
42
  type: "custom";
43
43
  label: string;
44
- render: typeof import("../../../puck-core").ActionField;
44
+ render: typeof import("../../..").ActionField;
45
45
  };
46
46
  readonly variant: {
47
47
  readonly type: "select";
@@ -1,2 +1,4 @@
1
1
  export { default as FeatureCardCtaConf } from "./feature-card-cta";
2
2
  export { default as MouseTrackCtaConf } from "./mouse-track-cta";
3
+ export { default as SideMediaCtaConf } from "./side-media-cta";
4
+ export { default as TextBlockCtaConf } from "./text-block-cta";
@@ -17,7 +17,7 @@ declare const conf: {
17
17
  action: {
18
18
  type: "custom";
19
19
  label: string;
20
- render: typeof import("../../../puck-core").ActionField;
20
+ render: typeof import("../../..").ActionField;
21
21
  };
22
22
  heading: {
23
23
  readonly type: "text";
@@ -26,11 +26,20 @@ const imageVariants = {
26
26
  right: { x: -50, transition: { type: "spring", duration: 1, bounce: 0 } }
27
27
  };
28
28
  const MouseTrackCta = (props) => {
29
- const { tagline, hoverLinks = [], styles } = {
29
+ const {
30
+ tagline,
31
+ hoverLinks = [],
32
+ styles
33
+ } = {
30
34
  ...MouseTrackCtaDefaults,
31
35
  ...props
32
36
  };
33
- const { className: sectionClassName, style: sectionStyle, css, listStyle = "center" } = styles ?? {};
37
+ const {
38
+ className: sectionClassName,
39
+ style: sectionStyle,
40
+ css,
41
+ listStyle = "center"
42
+ } = styles ?? {};
34
43
  const isNumbered = listStyle === "numbered";
35
44
  const [cursorPosition, setCursorPosition] = useState({ x: 0, y: 0 });
36
45
  const [hoveredIndex, setHoveredIndex] = useState(null);
@@ -47,7 +56,10 @@ const MouseTrackCta = (props) => {
47
56
  const containerRect = container.getBoundingClientRect();
48
57
  const leftBoundary = containerRect.left + containerRect.width / 2 - 100;
49
58
  const rightBoundary = containerRect.right / 2 + 100;
50
- const clampedX = Math.max(leftBoundary, Math.min(rightBoundary, e.clientX));
59
+ const clampedX = Math.max(
60
+ leftBoundary,
61
+ Math.min(rightBoundary, e.clientX)
62
+ );
51
63
  const smoothFactor = 0.1;
52
64
  setCursorPosition((prev) => ({
53
65
  x: prev.x + (clampedX - prev.x) * smoothFactor,
@@ -64,64 +76,81 @@ const MouseTrackCta = (props) => {
64
76
  const translateBottomInverse = direction === "bottom" ? isNumbered ? 25 : 50 : 0;
65
77
  const translateLeftInverse = direction === "left" ? isNumbered ? -25 : -50 : 0;
66
78
  const translateRightInverse = direction === "right" ? isNumbered ? 25 : 50 : 0;
67
- return /* @__PURE__ */ jsx(SectionWrapper, { className: cn("px-[5%] py-8 md:py-12 lg:py-14", sectionClassName), style: sectionStyle, css, onMouseMove: !isNumbered ? handleMouseMove : void 0, children: /* @__PURE__ */ jsxs("div", { className: cn("container", { "max-w-xl text-center": !isNumbered }), onMouseMove: isNumbered ? handleMouseMove : void 0, children: [
68
- /* @__PURE__ */ jsx("p", { className: "mb-6 font-semibold md:mb-8", children: tagline }),
69
- /* @__PURE__ */ jsx(
70
- motion.div,
71
- {
72
- initial: "initial",
73
- whileHover: direction,
74
- onMouseEnter: handleMouseEnter,
75
- onMouseLeave: handleMouseLeave,
76
- children: hoverLinks.map((link, index) => /* @__PURE__ */ jsxs(
77
- "a",
78
- {
79
- href: resolveActionUrl(link.action ?? { type: "none" }) ?? "#",
80
- onMouseEnter: () => setHoveredIndex(index),
81
- className: cn(
82
- "flex items-center p-4 transition-colors duration-300",
83
- isNumbered ? "relative justify-start border-b border-border-primary py-5 md:py-6" : "justify-center",
79
+ return /* @__PURE__ */ jsx(
80
+ SectionWrapper,
81
+ {
82
+ className: cn("isolate px-[5%] py-8 md:py-12 lg:py-14", sectionClassName),
83
+ style: sectionStyle,
84
+ css,
85
+ onMouseMove: !isNumbered ? handleMouseMove : void 0,
86
+ children: /* @__PURE__ */ jsxs(
87
+ "div",
88
+ {
89
+ className: cn("container", { "max-w-xl text-center": !isNumbered }),
90
+ onMouseMove: isNumbered ? handleMouseMove : void 0,
91
+ children: [
92
+ /* @__PURE__ */ jsx("p", { className: "mb-6 font-semibold md:mb-8", children: tagline }),
93
+ /* @__PURE__ */ jsx(
94
+ motion.div,
84
95
  {
85
- "lg:text-black/20": hoveredIndex !== index && hoveredIndex !== null,
86
- "lg:text-black": hoveredIndex === index || hoveredIndex === null
87
- }
88
- ),
89
- children: [
90
- isNumbered && link.listNumber && /* @__PURE__ */ jsx("p", { className: "mr-6 whitespace-nowrap text-xl font-bold md:mr-8 md:text-2xl", children: link.listNumber }),
91
- /* @__PURE__ */ jsx("h3", { className: "text-5xl font-bold md:text-9xl lg:text-10xl", children: link.heading }),
92
- /* @__PURE__ */ jsx(
93
- motion.div,
94
- {
95
- className: cn(
96
- "pointer-events-none fixed inset-0 hidden size-[600px] lg:block",
97
- isNumbered ? "-z-10 ml-[300px]" : "-z-10",
98
- {
99
- "opacity-100": hoveredIndex === index,
100
- "opacity-0": hoveredIndex !== index
101
- }
102
- ),
103
- style: {
104
- translateX: cursorPosition.x - 300 + translateLeftInverse + translateRightInverse,
105
- translateY: cursorPosition.y - 300 + translateTopInverse + translateBottomInverse
96
+ initial: "initial",
97
+ whileHover: direction,
98
+ onMouseEnter: handleMouseEnter,
99
+ onMouseLeave: handleMouseLeave,
100
+ children: hoverLinks.map((link, index) => /* @__PURE__ */ jsxs(
101
+ "a",
102
+ {
103
+ href: resolveActionUrl(link.action ?? { type: "none" }) ?? "#",
104
+ onMouseEnter: () => setHoveredIndex(index),
105
+ className: cn(
106
+ "flex items-center p-4 transition-colors duration-300",
107
+ isNumbered ? "relative justify-start border-b border-border-primary py-5 md:py-6" : "justify-center",
108
+ {
109
+ "lg:text-black/20": hoveredIndex !== index && hoveredIndex !== null,
110
+ "lg:text-black": hoveredIndex === index || hoveredIndex === null
111
+ }
112
+ ),
113
+ children: [
114
+ isNumbered && link.listNumber && /* @__PURE__ */ jsx("p", { className: "mr-6 whitespace-nowrap text-xl font-bold md:mr-8 md:text-2xl", children: link.listNumber }),
115
+ /* @__PURE__ */ jsx("h3", { className: "text-5xl font-bold md:text-9xl lg:text-10xl", children: link.heading }),
116
+ /* @__PURE__ */ jsx(
117
+ motion.div,
118
+ {
119
+ className: cn(
120
+ "pointer-events-none fixed inset-0 hidden size-[600px] transition-opacity duration-300 lg:block",
121
+ isNumbered ? "-z-10 ml-[300px]" : "-z-10",
122
+ {
123
+ "opacity-70": hoveredIndex === index,
124
+ "opacity-0": hoveredIndex !== index
125
+ }
126
+ ),
127
+ animate: {
128
+ x: cursorPosition.x - 300 + translateLeftInverse + translateRightInverse,
129
+ y: cursorPosition.y - 300 + translateTopInverse + translateBottomInverse
130
+ },
131
+ transition: { type: "spring", damping: 20, stiffness: 150, mass: 0.5 },
132
+ children: /* @__PURE__ */ jsx(
133
+ motion.img,
134
+ {
135
+ className: "size-full max-w-md",
136
+ variants: imageVariants,
137
+ src: link.image.src,
138
+ alt: link.image.alt
139
+ }
140
+ )
141
+ }
142
+ )
143
+ ]
106
144
  },
107
- children: /* @__PURE__ */ jsx(
108
- motion.img,
109
- {
110
- className: "size-full max-w-md",
111
- variants: imageVariants,
112
- src: link.image.src,
113
- alt: link.image.alt
114
- }
115
- )
116
- }
117
- )
118
- ]
119
- },
120
- index
121
- ))
122
- }
123
- )
124
- ] }) });
145
+ index
146
+ ))
147
+ }
148
+ )
149
+ ]
150
+ }
151
+ )
152
+ }
153
+ );
125
154
  };
126
155
  const MouseTrackCtaDefaults = {
127
156
  tagline: "Tagline",
@@ -1,4 +1,14 @@
1
1
  const ctaStyleFields = {
2
+ textLayout: {
3
+ type: "select",
4
+ label: "Text Layout",
5
+ options: [
6
+ { label: "Left", value: "left" },
7
+ { label: "Center", value: "center" },
8
+ { label: "Two Column", value: "twoColumn" },
9
+ { label: "Inline Row", value: "inlineRow" }
10
+ ]
11
+ },
2
12
  textAlign: {
3
13
  type: "radio",
4
14
  label: "Text Align",
@@ -7,6 +17,42 @@ const ctaStyleFields = {
7
17
  { label: "Center", value: "center" }
8
18
  ]
9
19
  },
20
+ mediaPosition: {
21
+ type: "radio",
22
+ label: "Media Position",
23
+ options: [
24
+ { label: "Left", value: "left" },
25
+ { label: "Right", value: "right" }
26
+ ]
27
+ },
28
+ bgMedia: {
29
+ type: "select",
30
+ label: "Background Media",
31
+ options: [
32
+ { label: "None", value: "none" },
33
+ { label: "Fullscreen Image", value: "fullscreenImage" },
34
+ { label: "Fullscreen Video", value: "fullscreenVideo" },
35
+ { label: "Container Image", value: "containerImage" },
36
+ { label: "Container Video", value: "containerVideo" }
37
+ ]
38
+ },
39
+ bordered: {
40
+ type: "radio",
41
+ label: "Bordered",
42
+ options: [
43
+ { label: "Yes", value: "true" },
44
+ { label: "No", value: "false" }
45
+ ]
46
+ },
47
+ bottomContent: {
48
+ type: "select",
49
+ label: "Bottom Content",
50
+ options: [
51
+ { label: "None", value: "none" },
52
+ { label: "Image", value: "image" },
53
+ { label: "Logos", value: "logos" }
54
+ ]
55
+ },
10
56
  listStyle: {
11
57
  type: "radio",
12
58
  label: "List Style",
@@ -25,7 +25,7 @@ declare const conf: {
25
25
  readonly action: {
26
26
  type: "custom";
27
27
  label: string;
28
- render: typeof import("../../../puck-core").ActionField;
28
+ render: typeof import("../../..").ActionField;
29
29
  };
30
30
  readonly variant: {
31
31
  readonly type: "select";
@@ -108,67 +108,6 @@ declare const conf: {
108
108
  src: string;
109
109
  };
110
110
  };
111
- inputPlaceholder: {
112
- type: string;
113
- };
114
- formButton: {
115
- readonly type: "object";
116
- readonly objectFields: {
117
- readonly label: {
118
- readonly type: "text";
119
- };
120
- readonly action: {
121
- type: "custom";
122
- label: string;
123
- render: typeof import("../../../puck-core").ActionField;
124
- };
125
- readonly variant: {
126
- readonly type: "select";
127
- readonly options: readonly [{
128
- readonly label: "primary";
129
- readonly value: "default";
130
- }, {
131
- readonly label: "secondary";
132
- readonly value: "secondary";
133
- }, {
134
- readonly label: "outline";
135
- readonly value: "outline";
136
- }, {
137
- readonly label: "ghost";
138
- readonly value: "ghost";
139
- }, {
140
- readonly label: "link";
141
- readonly value: "link";
142
- }, {
143
- readonly label: "destructive";
144
- readonly value: "destructive";
145
- }];
146
- };
147
- readonly size: {
148
- readonly type: "select";
149
- readonly options: readonly [{
150
- readonly label: "default";
151
- readonly value: "default";
152
- }, {
153
- readonly label: "sm";
154
- readonly value: "sm";
155
- }, {
156
- readonly label: "lg";
157
- readonly value: "lg";
158
- }, {
159
- readonly label: "icon";
160
- readonly value: "icon";
161
- }];
162
- };
163
- readonly icon: {
164
- type: "custom";
165
- render: typeof import("../../../puck-core/fields/icon-picker-field").IconPickerField;
166
- };
167
- };
168
- };
169
- termsAndConditions: {
170
- type: string;
171
- };
172
111
  styles: {
173
112
  type: string;
174
113
  label: string;
@@ -217,17 +156,6 @@ declare const conf: {
217
156
  readonly value: "false";
218
157
  }];
219
158
  };
220
- formType: {
221
- readonly type: "radio";
222
- readonly label: "Form Type";
223
- readonly options: readonly [{
224
- readonly label: "Buttons";
225
- readonly value: "buttons";
226
- }, {
227
- readonly label: "Email";
228
- readonly value: "email";
229
- }];
230
- };
231
159
  };
232
160
  };
233
161
  };