@sprintup-cms/sdk 1.8.69 → 1.8.74
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/CHANGELOG.md +70 -0
- package/README.md +10 -5
- package/dist/catch-all-CTLOY9lm.d.cts +38 -0
- package/dist/catch-all-CTLOY9lm.d.ts +38 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +17 -1
- package/dist/client.d.ts +17 -1
- package/dist/client.js.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js.map +1 -1
- package/dist/next/index.cjs +55 -92
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.d.cts +5 -13
- package/dist/next/index.d.ts +5 -13
- package/dist/next/index.js +55 -92
- package/dist/next/index.js.map +1 -1
- package/dist/react/index.cjs +46 -89
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +46 -89
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/next/index.d.cts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
-
|
|
3
|
-
import
|
|
2
|
+
export { b as CMSCatchAllPage, C as CMSCatchAllParams, g as generateMetadata } from '../catch-all-CTLOY9lm.cjs';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react';
|
|
5
|
+
import 'next';
|
|
4
6
|
|
|
5
7
|
interface RevalidateHandlerOptions {
|
|
6
8
|
/**
|
|
@@ -81,16 +83,6 @@ declare const GET: (request: Request) => Promise<NextResponse>;
|
|
|
81
83
|
*/
|
|
82
84
|
declare function previewEntryGET(request: NextRequest): Promise<NextResponse>;
|
|
83
85
|
|
|
84
|
-
interface CMSCatchAllParams {
|
|
85
|
-
slug: string[];
|
|
86
|
-
}
|
|
87
|
-
declare function generateMetadata({ params }: {
|
|
88
|
-
params: Promise<CMSCatchAllParams>;
|
|
89
|
-
}): Promise<Metadata>;
|
|
90
|
-
declare function CMSCatchAllPage({ params }: {
|
|
91
|
-
params: Promise<CMSCatchAllParams>;
|
|
92
|
-
}): Promise<react_jsx_runtime.JSX.Element>;
|
|
93
|
-
|
|
94
86
|
/**
|
|
95
87
|
* dynamicProxyGET — server-side proxy for dynamic block API calls.
|
|
96
88
|
*
|
|
@@ -105,4 +97,4 @@ declare function CMSCatchAllPage({ params }: {
|
|
|
105
97
|
*/
|
|
106
98
|
declare function dynamicProxyGET(req: NextRequest): Promise<NextResponse>;
|
|
107
99
|
|
|
108
|
-
export {
|
|
100
|
+
export { GET, POST, createPreviewExitHandler, createRevalidateHandler, dynamicProxyGET, previewEntryGET, GET as previewExitGET };
|
package/dist/next/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
-
|
|
3
|
-
import
|
|
2
|
+
export { b as CMSCatchAllPage, C as CMSCatchAllParams, g as generateMetadata } from '../catch-all-CTLOY9lm.js';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react';
|
|
5
|
+
import 'next';
|
|
4
6
|
|
|
5
7
|
interface RevalidateHandlerOptions {
|
|
6
8
|
/**
|
|
@@ -81,16 +83,6 @@ declare const GET: (request: Request) => Promise<NextResponse>;
|
|
|
81
83
|
*/
|
|
82
84
|
declare function previewEntryGET(request: NextRequest): Promise<NextResponse>;
|
|
83
85
|
|
|
84
|
-
interface CMSCatchAllParams {
|
|
85
|
-
slug: string[];
|
|
86
|
-
}
|
|
87
|
-
declare function generateMetadata({ params }: {
|
|
88
|
-
params: Promise<CMSCatchAllParams>;
|
|
89
|
-
}): Promise<Metadata>;
|
|
90
|
-
declare function CMSCatchAllPage({ params }: {
|
|
91
|
-
params: Promise<CMSCatchAllParams>;
|
|
92
|
-
}): Promise<react_jsx_runtime.JSX.Element>;
|
|
93
|
-
|
|
94
86
|
/**
|
|
95
87
|
* dynamicProxyGET — server-side proxy for dynamic block API calls.
|
|
96
88
|
*
|
|
@@ -105,4 +97,4 @@ declare function CMSCatchAllPage({ params }: {
|
|
|
105
97
|
*/
|
|
106
98
|
declare function dynamicProxyGET(req: NextRequest): Promise<NextResponse>;
|
|
107
99
|
|
|
108
|
-
export {
|
|
100
|
+
export { GET, POST, createPreviewExitHandler, createRevalidateHandler, dynamicProxyGET, previewEntryGET, GET as previewExitGET };
|
package/dist/next/index.js
CHANGED
|
@@ -345,11 +345,15 @@ function ImageBlock({ block }) {
|
|
|
345
345
|
}
|
|
346
346
|
function HeroBlock({ block }) {
|
|
347
347
|
const d = getData(block);
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
348
|
+
const align = d.alignment || "left";
|
|
349
|
+
const textAlign = align === "right" ? "text-right" : align === "center" ? "text-center" : "text-left";
|
|
350
|
+
const itemsAlign = align === "right" ? "items-end" : align === "center" ? "items-center" : "items-start";
|
|
351
|
+
const mx = align === "center" ? "mx-auto" : align === "right" ? "ml-auto" : "";
|
|
352
|
+
return /* @__PURE__ */ jsx("section", { className: "py-12 md:py-20", children: /* @__PURE__ */ jsxs("div", { className: `max-w-3xl ${mx}`, children: [
|
|
353
|
+
d.badge && /* @__PURE__ */ jsx("span", { className: `inline-block px-3 py-1 text-xs font-semibold rounded-full bg-secondary text-secondary-foreground mb-4`, children: d.badge }),
|
|
354
|
+
/* @__PURE__ */ jsx("h1", { className: `text-4xl md:text-5xl font-bold tracking-tight mb-4 text-balance ${textAlign}`, children: d.title }),
|
|
355
|
+
d.subtitle && /* @__PURE__ */ jsx("p", { className: `text-xl text-muted-foreground mb-8 ${textAlign}`, children: d.subtitle }),
|
|
356
|
+
(d.primaryButton || d.cta) && /* @__PURE__ */ jsxs("div", { className: `flex flex-wrap ${itemsAlign}`, style: { gap: "1rem" }, children: [
|
|
353
357
|
(d.primaryButton || d.cta) && /* @__PURE__ */ jsx(
|
|
354
358
|
"a",
|
|
355
359
|
{
|
|
@@ -374,7 +378,7 @@ function CTABlock({ block }) {
|
|
|
374
378
|
return /* @__PURE__ */ jsxs("section", { className: "py-12 px-8 rounded-xl bg-primary text-primary-foreground text-center", children: [
|
|
375
379
|
/* @__PURE__ */ jsx("h2", { className: "text-2xl md:text-3xl font-bold mb-4", children: d.title }),
|
|
376
380
|
d.subtitle && /* @__PURE__ */ jsx("p", { className: "text-primary-foreground/80 mb-6 max-w-2xl mx-auto", children: d.subtitle }),
|
|
377
|
-
/* @__PURE__ */ jsxs("div", { className: "flex
|
|
381
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-center flex-wrap", style: { gap: "1rem" }, children: [
|
|
378
382
|
d.primaryButton && /* @__PURE__ */ jsx(
|
|
379
383
|
"a",
|
|
380
384
|
{
|
|
@@ -761,7 +765,7 @@ function CenteredHeroBlock({ block }) {
|
|
|
761
765
|
children: d.subtitle
|
|
762
766
|
}
|
|
763
767
|
),
|
|
764
|
-
(d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: "flex
|
|
768
|
+
(d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: "flex justify-center flex-wrap", style: { gap: "1rem" }, children: [
|
|
765
769
|
d.primaryButton && /* @__PURE__ */ jsx(
|
|
766
770
|
"a",
|
|
767
771
|
{
|
|
@@ -788,12 +792,16 @@ function CenteredHeroBlock({ block }) {
|
|
|
788
792
|
}
|
|
789
793
|
function ProductHeroBlock({ block }) {
|
|
790
794
|
const d = getData(block);
|
|
795
|
+
const align = d.alignment || "left";
|
|
796
|
+
const textAlign = align === "right" ? "text-right" : align === "center" ? "text-center" : "text-left";
|
|
797
|
+
const itemsAlign = align === "right" ? "justify-end" : align === "center" ? "justify-center" : "justify-start";
|
|
798
|
+
const mx = align === "center" ? "mx-auto" : align === "right" ? "ml-auto" : "";
|
|
791
799
|
return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-24", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto px-4", children: [
|
|
792
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
793
|
-
d.badge && /* @__PURE__ */ jsx("span", { className:
|
|
794
|
-
/* @__PURE__ */ jsx("h1", { className:
|
|
795
|
-
d.subtitle && /* @__PURE__ */ jsx("p", { className:
|
|
796
|
-
(d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className:
|
|
800
|
+
/* @__PURE__ */ jsxs("div", { className: `max-w-3xl ${mx} mb-12`, children: [
|
|
801
|
+
d.badge && /* @__PURE__ */ jsx("span", { className: `inline-flex items-center gap-1.5 px-3 py-1 text-xs font-semibold rounded-full bg-primary/10 text-primary mb-5`, children: d.badge }),
|
|
802
|
+
/* @__PURE__ */ jsx("h1", { className: `text-4xl md:text-5xl font-extrabold tracking-tight mb-5 text-balance leading-tight ${textAlign}`, children: d.title }),
|
|
803
|
+
d.subtitle && /* @__PURE__ */ jsx("p", { className: `text-lg text-muted-foreground leading-relaxed text-pretty mb-8 ${textAlign}`, children: d.subtitle }),
|
|
804
|
+
(d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: `flex flex-wrap ${itemsAlign}`, style: { gap: "0.75rem" }, children: [
|
|
797
805
|
d.primaryButton && /* @__PURE__ */ jsx(
|
|
798
806
|
"a",
|
|
799
807
|
{
|
|
@@ -830,12 +838,16 @@ function ProductHeroBlock({ block }) {
|
|
|
830
838
|
function BentoHeroBlock({ block }) {
|
|
831
839
|
const d = getData(block);
|
|
832
840
|
const cards = Array.isArray(d.cards) ? d.cards : [];
|
|
841
|
+
const align = d.alignment || "center";
|
|
842
|
+
const textAlign = align === "right" ? "text-right" : align === "left" ? "text-left" : "text-center";
|
|
843
|
+
const itemsAlign = align === "right" ? "justify-end" : align === "left" ? "justify-start" : "justify-center";
|
|
844
|
+
const mx = align === "left" ? "" : align === "right" ? "ml-auto" : "mx-auto";
|
|
833
845
|
return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-24", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto px-4", children: [
|
|
834
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
846
|
+
/* @__PURE__ */ jsxs("div", { className: `max-w-3xl ${mx} mb-12`, children: [
|
|
835
847
|
d.badge && /* @__PURE__ */ jsx("span", { className: "inline-block px-3 py-1 text-xs font-semibold rounded-full bg-secondary text-secondary-foreground mb-5", children: d.badge }),
|
|
836
|
-
/* @__PURE__ */ jsx("h1", { className:
|
|
837
|
-
d.subtitle && /* @__PURE__ */ jsx("p", { className:
|
|
838
|
-
(d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className:
|
|
848
|
+
/* @__PURE__ */ jsx("h1", { className: `text-4xl md:text-5xl font-extrabold tracking-tight mb-4 text-balance ${textAlign}`, children: d.title }),
|
|
849
|
+
d.subtitle && /* @__PURE__ */ jsx("p", { className: `text-lg text-muted-foreground leading-relaxed text-pretty ${textAlign}`, children: d.subtitle }),
|
|
850
|
+
(d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: `flex flex-wrap ${itemsAlign}`, style: { gap: "0.75rem", marginTop: "1.75rem" }, children: [
|
|
839
851
|
d.primaryButton && /* @__PURE__ */ jsx(
|
|
840
852
|
"a",
|
|
841
853
|
{
|
|
@@ -861,7 +873,7 @@ function BentoHeroBlock({ block }) {
|
|
|
861
873
|
style: { background: card.background || "var(--muted)" },
|
|
862
874
|
children: [
|
|
863
875
|
card.icon && /* @__PURE__ */ jsx("span", { className: "text-2xl", role: "img", "aria-label": card.title, children: card.icon }),
|
|
864
|
-
card.image && /* @__PURE__ */ jsx("img", { src: card.image, alt: card.title || "", className: "w-full rounded-lg object-cover mb-1", style: { maxHeight: card.featured ? "180px" : "120px" } }),
|
|
876
|
+
card.image && /* @__PURE__ */ jsx("img", { src: card.image, alt: card.imageAlt || card.title || "Feature illustration", className: "w-full rounded-lg object-cover mb-1", style: { maxHeight: card.featured ? "180px" : "120px" } }),
|
|
865
877
|
card.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm", children: card.title }),
|
|
866
878
|
card.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground leading-relaxed", children: card.description })
|
|
867
879
|
]
|
|
@@ -870,74 +882,17 @@ function BentoHeroBlock({ block }) {
|
|
|
870
882
|
)) })
|
|
871
883
|
] }) });
|
|
872
884
|
}
|
|
873
|
-
function AnimatedHeroBlock({ block }) {
|
|
874
|
-
const d = getData(block);
|
|
875
|
-
const words = Array.isArray(d.animatedWords) && d.animatedWords.length > 0 ? d.animatedWords : ["Fast", "Simple", "Powerful"];
|
|
876
|
-
const [wordIndex, setWordIndex] = React.useState(0);
|
|
877
|
-
const [visible, setVisible] = React.useState(true);
|
|
878
|
-
React.useEffect(() => {
|
|
879
|
-
const interval = setInterval(() => {
|
|
880
|
-
setVisible(false);
|
|
881
|
-
setTimeout(() => {
|
|
882
|
-
setWordIndex((i) => (i + 1) % words.length);
|
|
883
|
-
setVisible(true);
|
|
884
|
-
}, 300);
|
|
885
|
-
}, d.interval || 2500);
|
|
886
|
-
return () => clearInterval(interval);
|
|
887
|
-
}, [words.length, d.interval]);
|
|
888
|
-
return /* @__PURE__ */ jsx("section", { className: "py-24 flex flex-col items-center text-center px-6", children: /* @__PURE__ */ jsxs("div", { className: "max-w-3xl mx-auto", children: [
|
|
889
|
-
d.badge && /* @__PURE__ */ jsx("span", { className: "inline-block px-3 py-1 text-xs font-semibold rounded-full bg-secondary text-secondary-foreground mb-6", children: d.badge }),
|
|
890
|
-
/* @__PURE__ */ jsxs("h1", { className: "text-4xl md:text-6xl font-extrabold tracking-tight mb-3 text-balance leading-tight", children: [
|
|
891
|
-
d.titlePrefix && /* @__PURE__ */ jsxs("span", { children: [
|
|
892
|
-
d.titlePrefix,
|
|
893
|
-
" "
|
|
894
|
-
] }),
|
|
895
|
-
/* @__PURE__ */ jsx(
|
|
896
|
-
"span",
|
|
897
|
-
{
|
|
898
|
-
style: {
|
|
899
|
-
display: "inline-block",
|
|
900
|
-
color: "var(--primary)",
|
|
901
|
-
transition: "opacity 0.3s ease, transform 0.3s ease",
|
|
902
|
-
opacity: visible ? 1 : 0,
|
|
903
|
-
transform: visible ? "translateY(0)" : "translateY(-8px)"
|
|
904
|
-
},
|
|
905
|
-
children: words[wordIndex]
|
|
906
|
-
}
|
|
907
|
-
),
|
|
908
|
-
d.titleSuffix && /* @__PURE__ */ jsxs("span", { children: [
|
|
909
|
-
" ",
|
|
910
|
-
d.titleSuffix
|
|
911
|
-
] })
|
|
912
|
-
] }),
|
|
913
|
-
d.subtitle && /* @__PURE__ */ jsx("p", { className: "text-lg md:text-xl text-muted-foreground leading-relaxed mb-9 text-pretty", children: d.subtitle }),
|
|
914
|
-
(d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: "flex gap-4 justify-center flex-wrap", children: [
|
|
915
|
-
d.primaryButton && /* @__PURE__ */ jsx(
|
|
916
|
-
"a",
|
|
917
|
-
{
|
|
918
|
-
href: d.primaryUrl || "#",
|
|
919
|
-
className: "inline-flex items-center px-8 py-3.5 rounded-xl bg-primary text-primary-foreground font-semibold text-sm hover:opacity-90 transition-opacity",
|
|
920
|
-
children: d.primaryButton
|
|
921
|
-
}
|
|
922
|
-
),
|
|
923
|
-
d.secondaryButton && /* @__PURE__ */ jsx(
|
|
924
|
-
"a",
|
|
925
|
-
{
|
|
926
|
-
href: d.secondaryUrl || "#",
|
|
927
|
-
className: "inline-flex items-center px-8 py-3.5 rounded-xl border border-border text-foreground font-semibold text-sm hover:bg-muted transition-colors",
|
|
928
|
-
children: d.secondaryButton
|
|
929
|
-
}
|
|
930
|
-
)
|
|
931
|
-
] })
|
|
932
|
-
] }) });
|
|
933
|
-
}
|
|
934
885
|
function MinimalHeroBlock({ block }) {
|
|
935
886
|
const d = getData(block);
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
887
|
+
const align = d.alignment || "left";
|
|
888
|
+
const textAlign = align === "right" ? "text-right" : align === "center" ? "text-center" : "text-left";
|
|
889
|
+
const itemsAlign = align === "right" ? "justify-end" : align === "center" ? "justify-center" : "justify-start";
|
|
890
|
+
const mx = align === "center" ? "mx-auto" : align === "right" ? "ml-auto" : "";
|
|
891
|
+
return /* @__PURE__ */ jsx("section", { className: "py-20 md:py-28 px-4 border-b border-border", children: /* @__PURE__ */ jsxs("div", { className: `max-w-4xl ${mx}`, children: [
|
|
892
|
+
d.eyebrow && /* @__PURE__ */ jsx("p", { className: `text-xs uppercase tracking-[0.2em] font-semibold text-muted-foreground mb-5 ${textAlign}`, children: d.eyebrow }),
|
|
893
|
+
/* @__PURE__ */ jsx("h1", { className: `text-5xl md:text-7xl font-black tracking-tight mb-6 text-balance leading-none whitespace-pre-line ${textAlign}`, children: d.title }),
|
|
894
|
+
d.subtitle && /* @__PURE__ */ jsx("p", { className: `text-lg md:text-xl text-muted-foreground leading-relaxed text-pretty max-w-2xl mb-9 ${textAlign} ${mx}`, children: d.subtitle }),
|
|
895
|
+
(d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: `flex flex-wrap items-center ${itemsAlign}`, style: { gap: "1rem" }, children: [
|
|
941
896
|
d.primaryButton && /* @__PURE__ */ jsxs(
|
|
942
897
|
"a",
|
|
943
898
|
{
|
|
@@ -963,16 +918,19 @@ function MinimalHeroBlock({ block }) {
|
|
|
963
918
|
function SplitHeroBlock({ block }) {
|
|
964
919
|
const d = getData(block);
|
|
965
920
|
const imgLeft = d.imagePosition === "left";
|
|
921
|
+
const align = d.alignment || "left";
|
|
922
|
+
const textAlign = align === "center" ? "text-center" : "text-left";
|
|
923
|
+
const itemsAlign = align === "center" ? "items-center" : "items-start";
|
|
966
924
|
return /* @__PURE__ */ jsx("section", { className: "py-16", children: /* @__PURE__ */ jsxs("div", { className: `flex flex-col ${imgLeft ? "md:flex-row-reverse" : "md:flex-row"} items-center gap-10 md:gap-16 max-w-6xl mx-auto px-4`, children: [
|
|
967
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
968
|
-
d.title && /* @__PURE__ */ jsx("h1", { className:
|
|
969
|
-
d.subtitle && /* @__PURE__ */ jsx("p", { className:
|
|
970
|
-
(d.button || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className:
|
|
925
|
+
/* @__PURE__ */ jsxs("div", { className: `flex-1 space-y-5 ${itemsAlign} flex flex-col`, children: [
|
|
926
|
+
d.title && /* @__PURE__ */ jsx("h1", { className: `text-3xl md:text-5xl font-extrabold tracking-tight text-balance leading-tight ${textAlign}`, children: d.title }),
|
|
927
|
+
d.subtitle && /* @__PURE__ */ jsx("p", { className: `text-lg text-muted-foreground leading-relaxed text-pretty ${textAlign}`, children: d.subtitle }),
|
|
928
|
+
(d.button || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: `flex flex-wrap ${align === "center" ? "justify-center" : "justify-start"}`, style: { gap: "0.75rem", paddingTop: "0.5rem" }, children: [
|
|
971
929
|
d.button && /* @__PURE__ */ jsx("a", { href: d.buttonUrl || "#", className: "inline-flex items-center px-6 py-3 rounded-lg bg-primary text-primary-foreground font-semibold text-sm hover:opacity-90 transition-opacity", children: d.button }),
|
|
972
930
|
d.secondaryButton && /* @__PURE__ */ jsx("a", { href: d.secondaryUrl || "#", className: "inline-flex items-center px-6 py-3 rounded-lg border border-border text-foreground font-semibold text-sm hover:bg-muted transition-colors", children: d.secondaryButton })
|
|
973
931
|
] })
|
|
974
932
|
] }),
|
|
975
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 w-full", children: d.image ? /* @__PURE__ */ jsx("img", { src: d.image, alt: d.title || "", className: "w-full rounded-2xl object-cover shadow-lg border border-border" }) : /* @__PURE__ */ jsx("div", { className: "w-full rounded-2xl bg-muted border border-border aspect-video flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "No image set" }) }) })
|
|
933
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 w-full", children: d.image ? /* @__PURE__ */ jsx("img", { src: d.image, alt: d.imageAlt || d.title || "Hero image", className: "w-full rounded-2xl object-cover shadow-lg border border-border" }) : /* @__PURE__ */ jsx("div", { className: "w-full rounded-2xl bg-muted border border-border aspect-video flex items-center justify-center", "aria-hidden": "true", children: /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "No image set" }) }) })
|
|
976
934
|
] }) });
|
|
977
935
|
}
|
|
978
936
|
function AccordionBlock({ block }) {
|
|
@@ -1223,7 +1181,6 @@ var BUILT_IN = {
|
|
|
1223
1181
|
"centered-hero": (b) => /* @__PURE__ */ jsx(CenteredHeroBlock, { block: b }),
|
|
1224
1182
|
"product-hero": (b) => /* @__PURE__ */ jsx(ProductHeroBlock, { block: b }),
|
|
1225
1183
|
"bento-hero": (b) => /* @__PURE__ */ jsx(BentoHeroBlock, { block: b }),
|
|
1226
|
-
"animated-hero": (b) => /* @__PURE__ */ jsx(AnimatedHeroBlock, { block: b }),
|
|
1227
1184
|
"minimal-hero": (b) => /* @__PURE__ */ jsx(MinimalHeroBlock, { block: b }),
|
|
1228
1185
|
cta: (b) => /* @__PURE__ */ jsx(CTABlock, { block: b }),
|
|
1229
1186
|
faq: (b) => /* @__PURE__ */ jsx(FAQBlock, { block: b }),
|
|
@@ -1563,7 +1520,7 @@ async function resolveProductListBlocks(blocks) {
|
|
|
1563
1520
|
}
|
|
1564
1521
|
}));
|
|
1565
1522
|
}
|
|
1566
|
-
async function CMSCatchAllPage({ params }) {
|
|
1523
|
+
async function CMSCatchAllPage({ params, layout = true }) {
|
|
1567
1524
|
const { slug } = await params;
|
|
1568
1525
|
const slugStr = slug.join("/");
|
|
1569
1526
|
const draft = await draftMode();
|
|
@@ -1586,8 +1543,13 @@ async function CMSCatchAllPage({ params }) {
|
|
|
1586
1543
|
client.getGlobals().catch(() => ({ navigation: null, footer: null }))
|
|
1587
1544
|
]);
|
|
1588
1545
|
const resolvedBlocks = await resolveProductListBlocks(page.blocks ?? []);
|
|
1546
|
+
const showDefaultLayout = layout === true;
|
|
1547
|
+
const showCustomLayout = typeof layout === "object" && layout !== null;
|
|
1548
|
+
const CustomHeader = showCustomLayout ? layout.Header : null;
|
|
1549
|
+
const CustomFooter = showCustomLayout ? layout.Footer : null;
|
|
1589
1550
|
return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-background flex flex-col", children: [
|
|
1590
|
-
/* @__PURE__ */ jsx(CMSHeader, { nav: globals?.navigation }),
|
|
1551
|
+
showDefaultLayout && /* @__PURE__ */ jsx(CMSHeader, { nav: globals?.navigation }),
|
|
1552
|
+
CustomHeader && /* @__PURE__ */ jsx(CustomHeader, { nav: globals?.navigation, globals }),
|
|
1591
1553
|
isPreview && /* @__PURE__ */ jsxs("div", { className: "sticky top-0 z-50 flex items-center justify-between px-4 py-2.5 bg-amber-500 text-white text-sm font-medium shadow", children: [
|
|
1592
1554
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1593
1555
|
/* @__PURE__ */ jsx("span", { children: "Draft Preview" }),
|
|
@@ -1617,7 +1579,8 @@ async function CMSCatchAllPage({ params }) {
|
|
|
1617
1579
|
/* @__PURE__ */ jsx("p", { className: "text-sm", children: "No content added yet." }),
|
|
1618
1580
|
isPreview && /* @__PURE__ */ jsx("p", { className: "text-xs mt-1 opacity-60", children: "Add blocks in the CMS editor to see them here." })
|
|
1619
1581
|
] }) }),
|
|
1620
|
-
/* @__PURE__ */ jsx(CMSFooter, { footer: globals?.footer })
|
|
1582
|
+
showDefaultLayout && /* @__PURE__ */ jsx(CMSFooter, { footer: globals?.footer }),
|
|
1583
|
+
CustomFooter && /* @__PURE__ */ jsx(CustomFooter, { footer: globals?.footer, globals })
|
|
1621
1584
|
] });
|
|
1622
1585
|
}
|
|
1623
1586
|
async function dynamicProxyGET(req) {
|