dune-react 0.0.40 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/puck-block/contact-sections/centered-form/index.d.ts +96 -0
- package/dist/components/puck-block/contact-sections/centered-form/index.js +6 -1
- package/dist/components/puck-block/contact-sections/contact-cards-grid/contact-cards-grid.js +3 -3
- package/dist/components/puck-block/contact-sections/contact-cards-grid/index.d.ts +159 -0
- package/dist/components/puck-block/contact-sections/contact-cards-grid/index.js +14 -1
- package/dist/components/puck-block/contact-sections/contact-modal/index.d.ts +99 -0
- package/dist/components/puck-block/contact-sections/contact-modal/index.js +7 -1
- package/dist/components/puck-block/contact-sections/form-with-media/index.d.ts +87 -0
- package/dist/components/puck-block/contact-sections/form-with-media/index.js +4 -1
- package/dist/components/puck-block/contact-sections/header-form-cards/index.d.ts +104 -0
- package/dist/components/puck-block/contact-sections/header-form-cards/index.js +13 -2
- package/dist/components/puck-block/contact-sections/header-info-fullwidth/index.d.ts +150 -0
- package/dist/components/puck-block/contact-sections/header-info-fullwidth/index.js +12 -1
- package/dist/components/puck-block/contact-sections/info-cards-media/index.d.ts +150 -0
- package/dist/components/puck-block/contact-sections/info-cards-media/index.js +12 -1
- package/dist/components/puck-block/contact-sections/location-cards-grid/index.d.ts +147 -0
- package/dist/components/puck-block/contact-sections/location-cards-grid/index.js +5 -1
- package/dist/components/puck-block/contact-sections/props.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/split-info-form/index.d.ts +96 -0
- package/dist/components/puck-block/contact-sections/split-info-form/index.js +6 -1
- package/dist/components/puck-block/contact-sections/tab-locations/index.d.ts +147 -0
- package/dist/components/puck-block/contact-sections/tab-locations/index.js +5 -1
- package/dist/components/puck-block/cta-sections/props.d.ts +1 -1
- package/dist/components/puck-block/cta-sections/props.js +8 -0
- package/dist/components/puck-block/cta-sections/side-media-cta/index.d.ts +75 -0
- package/dist/components/puck-block/cta-sections/side-media-cta/index.js +6 -6
- package/dist/components/puck-block/cta-sections/side-media-cta/side-media-cta.js +3 -3
- package/dist/components/puck-block/cta-sections/text-block-cta/text-block-cta.js +3 -3
- package/dist/components/puck-block/faq-sections/dual-column-accordion-faq/dual-column-accordion-faq.js +2 -2
- package/dist/components/puck-block/faq-sections/props.d.ts +2 -2
- package/dist/components/puck-block/faq-sections/stacked-accordion-faq/stacked-accordion-faq.js +5 -5
- package/dist/components/puck-block/faq-sections/stacked-static-faq/stacked-static-faq.js +3 -3
- package/dist/components/puck-block/faq-sections/two-column-accordion-faq/index.d.ts +6 -0
- package/dist/components/puck-block/faq-sections/two-column-accordion-faq/index.js +2 -0
- package/dist/components/puck-block/faq-sections/two-column-accordion-faq/two-column-accordion-faq.js +2 -2
- package/dist/components/puck-block/faq-sections/two-column-static-faq/index.d.ts +6 -0
- package/dist/components/puck-block/faq-sections/two-column-static-faq/index.js +2 -0
- package/dist/components/puck-block/feature-sections/props.d.ts +3 -3
- package/dist/components/puck-block/feature-sections/text-media-split/component.js +6 -6
- package/dist/components/puck-block/feature-sections/text-only-section/component.js +8 -8
- package/dist/components/puck-block/footer-sections/centered-minimal-footer/index.d.ts +226 -2
- package/dist/components/puck-block/footer-sections/centered-minimal-footer/index.js +34 -1
- package/dist/components/puck-block/footer-sections/contact-links-footer/contact-links-footer.js +2 -2
- package/dist/components/puck-block/footer-sections/contact-links-footer/index.d.ts +159 -2
- package/dist/components/puck-block/footer-sections/contact-links-footer/index.js +32 -2
- package/dist/components/puck-block/footer-sections/cta-links-footer/cta-links-footer.js +2 -2
- package/dist/components/puck-block/footer-sections/cta-links-footer/index.d.ts +114 -2
- package/dist/components/puck-block/footer-sections/cta-links-footer/index.js +44 -2
- package/dist/components/puck-block/footer-sections/props.d.ts +2 -2
- package/dist/components/puck-block/gallery-sections/asymmetric-grid/index.d.ts +145 -0
- package/dist/components/puck-block/gallery-sections/asymmetric-grid/index.js +6 -0
- package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/index.d.ts +169 -0
- package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/index.js +11 -2
- package/dist/components/puck-block/gallery-sections/image-carousel/image-carousel.js +6 -6
- package/dist/components/puck-block/gallery-sections/image-carousel/index.d.ts +145 -0
- package/dist/components/puck-block/gallery-sections/image-carousel/index.js +6 -0
- package/dist/components/puck-block/gallery-sections/interactive-portfolio/index.d.ts +163 -0
- package/dist/components/puck-block/gallery-sections/interactive-portfolio/index.js +9 -1
- package/dist/components/puck-block/gallery-sections/masonry-grid/index.d.ts +145 -0
- package/dist/components/puck-block/gallery-sections/masonry-grid/index.js +6 -0
- package/dist/components/puck-block/gallery-sections/portfolio-cards/index.d.ts +104 -0
- package/dist/components/puck-block/gallery-sections/portfolio-cards/index.js +7 -3
- package/dist/components/puck-block/gallery-sections/portfolio-cards/portfolio-cards.js +3 -3
- package/dist/components/puck-block/gallery-sections/portfolio-divider/index.d.ts +104 -0
- package/dist/components/puck-block/gallery-sections/portfolio-divider/index.js +7 -3
- package/dist/components/puck-block/gallery-sections/props.d.ts +3 -3
- package/dist/components/puck-block/gallery-sections/scroll-parallax/index.d.ts +145 -0
- package/dist/components/puck-block/gallery-sections/scroll-parallax/index.js +7 -1
- package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/index.d.ts +228 -0
- package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/index.js +13 -1
- package/dist/components/puck-block/gallery-sections/split-carousel/index.d.ts +145 -0
- package/dist/components/puck-block/gallery-sections/split-carousel/index.js +6 -0
- package/dist/components/puck-block/gallery-sections/static-grid/index.d.ts +145 -0
- package/dist/components/puck-block/gallery-sections/static-grid/index.js +6 -0
- package/dist/components/puck-block/header-sections/centered-navbar/index.d.ts +5 -2
- package/dist/components/puck-block/header-sections/centered-navbar/index.js +8 -1
- package/dist/components/puck-block/header-sections/drawer-navbar/index.d.ts +5 -2
- package/dist/components/puck-block/header-sections/drawer-navbar/index.js +1 -1
- package/dist/components/puck-block/header-sections/floating-bordered-navbar/index.d.ts +5 -2
- package/dist/components/puck-block/header-sections/floating-bordered-navbar/index.js +1 -1
- package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/index.d.ts +5 -2
- package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/index.js +1 -1
- package/dist/components/puck-block/header-sections/mega-menu-navbar/index.d.ts +5 -2
- package/dist/components/puck-block/header-sections/mega-menu-navbar/index.js +1 -1
- package/dist/components/puck-block/header-sections/standard-navbar/index.d.ts +5 -2
- package/dist/components/puck-block/header-sections/standard-navbar/index.js +8 -1
- package/dist/components/puck-block/hero-sections/carousel-hero/component.d.ts +1 -6
- package/dist/components/puck-block/hero-sections/carousel-hero/component.js +24 -36
- package/dist/components/puck-block/hero-sections/carousel-hero/index.d.ts +0 -6
- package/dist/components/puck-block/hero-sections/carousel-hero/index.js +1 -3
- package/dist/components/puck-block/hero-sections/props.d.ts +2 -2
- package/dist/components/puck-block/hero-sections/three-image-parallax-hero/component.js +5 -5
- package/dist/components/puck-block/metrics-sections/center-media-stats/index.d.ts +79 -0
- package/dist/components/puck-block/metrics-sections/center-media-stats/index.js +2 -0
- package/dist/components/puck-block/metrics-sections/header-stats-row/header-stats-row.js +6 -1
- package/dist/components/puck-block/pricing-sections/pricing-card-grid/index.d.ts +55 -0
- package/dist/components/puck-block/pricing-sections/pricing-card-grid/index.js +3 -1
- package/dist/components/puck-block/pricing-sections/pricing-comparison-table/component.js +7 -7
- package/dist/components/puck-block/pricing-sections/pricing-comparison-table/index.d.ts +55 -0
- package/dist/components/puck-block/pricing-sections/pricing-comparison-table/index.js +3 -1
- package/dist/components/puck-block/pricing-sections/props.d.ts +2 -2
- package/dist/components/puck-block/pricing-sections/single-pricing-card/index.d.ts +64 -0
- package/dist/components/puck-block/pricing-sections/single-pricing-card/index.js +5 -1
- package/dist/components/puck-block/pricing-sections/split-pricing/index.d.ts +70 -0
- package/dist/components/puck-block/pricing-sections/split-pricing/index.js +7 -2
- package/dist/components/puck-block/pricing-sections/tab-pricing-grid/index.d.ts +78 -0
- package/dist/components/puck-block/pricing-sections/tab-pricing-grid/index.js +13 -1
- package/dist/components/puck-block/pricing-sections/tab-single-pricing/index.d.ts +23 -0
- package/dist/components/puck-block/pricing-sections/tab-single-pricing/index.js +10 -1
- package/dist/components/puck-block/registry.generated.d.ts +5734 -2060
- package/dist/components/puck-block/registry.generated.js +14 -14
- package/dist/components/puck-block/showcase-sections/compact-timeline/component.js +3 -3
- package/dist/components/puck-block/showcase-sections/horizontal-timeline/component.js +3 -3
- package/dist/components/puck-block/showcase-sections/props.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/single-column-timeline/component.js +6 -6
- package/dist/components/puck-block/showcase-sections/sticky-scroll-timeline/component.js +6 -6
- package/dist/components/puck-block/showcase-sections/zigzag-timeline/component.js +6 -6
- package/dist/components/puck-block/team-sections/props.d.ts +1 -1
- package/dist/components/puck-block/team-sections/team-carousel/index.d.ts +25 -0
- package/dist/components/puck-block/team-sections/team-carousel/index.js +22 -1
- package/dist/components/puck-block/team-sections/team-grid/component.js +3 -3
- package/dist/components/puck-block/team-sections/team-grid/index.d.ts +25 -0
- package/dist/components/puck-block/team-sections/team-grid/index.js +22 -1
- package/dist/components/puck-block/team-sections/team-inline-card/index.d.ts +25 -0
- package/dist/components/puck-block/team-sections/team-inline-card/index.js +22 -1
- package/dist/components/puck-block/team-sections/team-sticky-scatter/index.d.ts +25 -0
- package/dist/components/puck-block/team-sections/team-sticky-scatter/index.js +22 -1
- package/dist/components/puck-block/team-sections/team-two-column/index.d.ts +25 -0
- package/dist/components/puck-block/team-sections/team-two-column/index.js +22 -1
- package/dist/components/puck-block/testimonial-sections/bento-testimonial/component.js +2 -2
- package/dist/components/puck-block/testimonial-sections/bento-testimonial/index.d.ts +3 -0
- package/dist/components/puck-block/testimonial-sections/bento-testimonial/index.js +6 -1
- package/dist/components/puck-block/testimonial-sections/halfscreen-testimonial-carousel/component.js +3 -3
- package/dist/components/puck-block/testimonial-sections/halfscreen-testimonial-carousel/index.d.ts +9 -0
- package/dist/components/puck-block/testimonial-sections/halfscreen-testimonial-carousel/index.js +3 -1
- package/dist/components/puck-block/testimonial-sections/marquee-testimonial/index.d.ts +9 -0
- package/dist/components/puck-block/testimonial-sections/marquee-testimonial/index.js +3 -1
- package/dist/components/puck-block/testimonial-sections/masonry-testimonial/index.d.ts +9 -0
- package/dist/components/puck-block/testimonial-sections/masonry-testimonial/index.js +3 -1
- package/dist/components/puck-block/testimonial-sections/props.d.ts +5 -5
- package/dist/components/puck-block/testimonial-sections/sticky-testimonial/index.d.ts +9 -0
- package/dist/components/puck-block/testimonial-sections/sticky-testimonial/index.js +3 -1
- package/dist/components/puck-block/testimonial-sections/tab-testimonial/component.js +7 -7
- package/dist/components/puck-block/testimonial-sections/tab-testimonial/index.d.ts +47 -0
- package/dist/components/puck-block/testimonial-sections/tab-testimonial/index.js +5 -1
- package/dist/components/puck-block/testimonial-sections/testimonial-card-grid/component.js +6 -6
- package/dist/components/puck-block/testimonial-sections/testimonial-card-grid/index.d.ts +30 -0
- package/dist/components/puck-block/testimonial-sections/testimonial-card-grid/index.js +6 -1
- package/dist/components/puck-block/testimonial-sections/testimonial-carousel/component.js +9 -9
- package/dist/components/puck-block/testimonial-sections/testimonial-carousel/index.d.ts +21 -0
- package/dist/components/puck-block/testimonial-sections/testimonial-carousel/index.js +5 -1
- package/dist/components/puck-block/text-sections/blog-article/component.js +3 -3
- package/dist/components/puck-block/text-sections/props.d.ts +3 -3
- package/dist/components/puck-block/text-sections/prose-content/component.js +3 -3
- package/dist/components/puck-core/core/props/index.js +7 -0
- package/dist/components/puck-core/core/puck-fields-to-zod.d.ts +1 -0
- package/dist/components/puck-core/core/puck-fields-to-zod.js +21 -10
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@ const ProseContent = (props) => {
|
|
|
26
26
|
textLayout = "single",
|
|
27
27
|
mediaType = "none",
|
|
28
28
|
mediaPosition = "bottom",
|
|
29
|
-
hasMetatags = false
|
|
29
|
+
hasMetatags = "false"
|
|
30
30
|
} = styles ?? {};
|
|
31
31
|
const [isIframeLoaded, setIsIframeLoaded] = useState(false);
|
|
32
32
|
const renderMedia = () => {
|
|
@@ -61,7 +61,7 @@ const ProseContent = (props) => {
|
|
|
61
61
|
const mediaElement = renderMedia();
|
|
62
62
|
const isTwoColumn = textLayout === "twoColumnProse";
|
|
63
63
|
return /* @__PURE__ */ jsx(SectionWrapper, { className: cn("px-[5%] py-8 md:py-12 lg:py-14", sectionClassName), style: sectionStyle, css, children: /* @__PURE__ */ jsx("div", { className: "container", children: /* @__PURE__ */ jsxs("div", { className: cn("mx-auto w-full", isTwoColumn ? "max-w-4xl" : "max-w-lg"), children: [
|
|
64
|
-
hasMetatags && metatags && metatags.length > 0 && /* @__PURE__ */ jsx("div", { className: "mb-8 flex flex-wrap gap-x-8 gap-y-4 md:mb-12", children: metatags.map((tag, index) => /* @__PURE__ */ jsxs("div", { children: [
|
|
64
|
+
hasMetatags === "true" && metatags && metatags.length > 0 && /* @__PURE__ */ jsx("div", { className: "mb-8 flex flex-wrap gap-x-8 gap-y-4 md:mb-12", children: metatags.map((tag, index) => /* @__PURE__ */ jsxs("div", { children: [
|
|
65
65
|
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: tag.label }),
|
|
66
66
|
/* @__PURE__ */ jsx("p", { className: "text-sm", children: tag.value })
|
|
67
67
|
] }, index)) }),
|
|
@@ -88,7 +88,7 @@ const ProseContentDefaults = {
|
|
|
88
88
|
textLayout: "single",
|
|
89
89
|
mediaType: "none",
|
|
90
90
|
mediaPosition: "bottom",
|
|
91
|
-
hasMetatags: false
|
|
91
|
+
hasMetatags: "false"
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
94
|
export {
|
|
@@ -2,6 +2,7 @@ import { buttonsField, badgeField } from "./interactive.js";
|
|
|
2
2
|
import { actionDefaults, actionField, buttonDefaults, buttonField, iconField, resolveActionUrl } from "./interactive.js";
|
|
3
3
|
import { descriptionField, headingField, featuresField } from "./content.js";
|
|
4
4
|
import { cardField, cardsField } from "./content.js";
|
|
5
|
+
import { getPlaceholderMediaUrl, media16x9Placeholder, media1x1Placeholder, media9x16Placeholder, mediaField, mediasField } from "./media.js";
|
|
5
6
|
const contentFields = {
|
|
6
7
|
heading: headingField,
|
|
7
8
|
description: descriptionField,
|
|
@@ -28,7 +29,13 @@ export {
|
|
|
28
29
|
contentFieldsWithFeatures,
|
|
29
30
|
descriptionField,
|
|
30
31
|
featuresField,
|
|
32
|
+
getPlaceholderMediaUrl,
|
|
31
33
|
headingField,
|
|
32
34
|
iconField,
|
|
35
|
+
media16x9Placeholder,
|
|
36
|
+
media1x1Placeholder,
|
|
37
|
+
media9x16Placeholder,
|
|
38
|
+
mediaField,
|
|
39
|
+
mediasField,
|
|
33
40
|
resolveActionUrl
|
|
34
41
|
};
|
|
@@ -54,45 +54,55 @@ function withDescribe(schema, field) {
|
|
|
54
54
|
const desc = (_a = field.ai) == null ? void 0 : _a.instructions;
|
|
55
55
|
return desc ? schema.describe(desc) : schema;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function isFieldOptional(field, fieldKey) {
|
|
58
|
+
var _a, _b;
|
|
59
|
+
if (((_a = field.ai) == null ? void 0 : _a.optional) === true) return true;
|
|
60
|
+
if (((_b = field.ai) == null ? void 0 : _b.optional) === false) return false;
|
|
61
|
+
if (fieldKey === "styles") return true;
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
function maybeOptional(schema, field, fieldKey) {
|
|
65
|
+
return isFieldOptional(field, fieldKey) ? schema.optional() : schema;
|
|
66
|
+
}
|
|
67
|
+
function puckFieldToZod(field, fieldKey) {
|
|
58
68
|
var _a, _b;
|
|
59
69
|
let schema;
|
|
60
70
|
switch (field.type) {
|
|
61
71
|
case "text":
|
|
62
72
|
case "textarea":
|
|
63
|
-
schema = string()
|
|
73
|
+
schema = string();
|
|
64
74
|
break;
|
|
65
75
|
case "select":
|
|
66
76
|
case "radio": {
|
|
67
77
|
const values = (field.options ?? []).map((o) => o.value);
|
|
68
|
-
schema = values.length === 0 ? string()
|
|
78
|
+
schema = values.length === 0 ? string() : _enum(values);
|
|
69
79
|
break;
|
|
70
80
|
}
|
|
71
81
|
case "object": {
|
|
72
82
|
if (!field.objectFields || Object.keys(field.objectFields).length === 0) {
|
|
73
|
-
schema = record(string(), unknown())
|
|
83
|
+
schema = record(string(), unknown());
|
|
74
84
|
} else {
|
|
75
85
|
const shape = {};
|
|
76
86
|
for (const [k, v] of Object.entries(field.objectFields)) {
|
|
77
87
|
if ((_a = v.ai) == null ? void 0 : _a.exclude) continue;
|
|
78
|
-
shape[k] = puckFieldToZod(v);
|
|
88
|
+
shape[k] = puckFieldToZod(v, k);
|
|
79
89
|
}
|
|
80
|
-
schema = object(shape)
|
|
90
|
+
schema = object(shape);
|
|
81
91
|
}
|
|
82
92
|
break;
|
|
83
93
|
}
|
|
84
94
|
case "array": {
|
|
85
95
|
if (!field.arrayFields || Object.keys(field.arrayFields).length === 0) {
|
|
86
|
-
schema = array(unknown())
|
|
96
|
+
schema = array(unknown());
|
|
87
97
|
} else {
|
|
88
98
|
const itemShape = {};
|
|
89
99
|
for (const [k, v] of Object.entries(field.arrayFields)) {
|
|
90
100
|
if ((_b = v.ai) == null ? void 0 : _b.exclude) continue;
|
|
91
|
-
itemShape[k] = puckFieldToZod(v);
|
|
101
|
+
itemShape[k] = puckFieldToZod(v, k);
|
|
92
102
|
}
|
|
93
103
|
let arraySchema = array(object(itemShape));
|
|
94
104
|
if (field.max) arraySchema = arraySchema.max(field.max);
|
|
95
|
-
schema = arraySchema
|
|
105
|
+
schema = arraySchema;
|
|
96
106
|
}
|
|
97
107
|
break;
|
|
98
108
|
}
|
|
@@ -102,6 +112,7 @@ function puckFieldToZod(field) {
|
|
|
102
112
|
default:
|
|
103
113
|
schema = any();
|
|
104
114
|
}
|
|
115
|
+
schema = maybeOptional(schema, field, fieldKey);
|
|
105
116
|
return withDescribe(schema, field);
|
|
106
117
|
}
|
|
107
118
|
function puckFieldsToZod(fields) {
|
|
@@ -109,7 +120,7 @@ function puckFieldsToZod(fields) {
|
|
|
109
120
|
const shape = {};
|
|
110
121
|
for (const [key, field] of Object.entries(fields)) {
|
|
111
122
|
if ((_a = field.ai) == null ? void 0 : _a.exclude) continue;
|
|
112
|
-
shape[key] = puckFieldToZod(field);
|
|
123
|
+
shape[key] = puckFieldToZod(field, key);
|
|
113
124
|
}
|
|
114
125
|
return object(shape);
|
|
115
126
|
}
|