@sprintup-cms/sdk 1.8.69 → 1.8.71
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/next/index.cjs +44 -87
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.js +44 -87
- package/dist/next/index.js.map +1 -1
- package/dist/react/index.cjs +44 -87
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +44 -87
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/next/index.cjs
CHANGED
|
@@ -351,11 +351,15 @@ function ImageBlock({ block }) {
|
|
|
351
351
|
}
|
|
352
352
|
function HeroBlock({ block }) {
|
|
353
353
|
const d = getData(block);
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
354
|
+
const align = d.alignment || "left";
|
|
355
|
+
const textAlign = align === "right" ? "text-right" : align === "center" ? "text-center" : "text-left";
|
|
356
|
+
const itemsAlign = align === "right" ? "items-end" : align === "center" ? "items-center" : "items-start";
|
|
357
|
+
const mx = align === "center" ? "mx-auto" : align === "right" ? "ml-auto" : "";
|
|
358
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-12 md:py-20", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `max-w-3xl ${mx}`, children: [
|
|
359
|
+
d.badge && /* @__PURE__ */ jsxRuntime.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 }),
|
|
360
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: `text-4xl md:text-5xl font-bold tracking-tight mb-4 text-balance ${textAlign}`, children: d.title }),
|
|
361
|
+
d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-xl text-muted-foreground mb-8 ${textAlign}`, children: d.subtitle }),
|
|
362
|
+
(d.primaryButton || d.cta) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex gap-4 flex-wrap ${itemsAlign}`, children: [
|
|
359
363
|
(d.primaryButton || d.cta) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
360
364
|
"a",
|
|
361
365
|
{
|
|
@@ -794,12 +798,16 @@ function CenteredHeroBlock({ block }) {
|
|
|
794
798
|
}
|
|
795
799
|
function ProductHeroBlock({ block }) {
|
|
796
800
|
const d = getData(block);
|
|
801
|
+
const align = d.alignment || "left";
|
|
802
|
+
const textAlign = align === "right" ? "text-right" : align === "center" ? "text-center" : "text-left";
|
|
803
|
+
const itemsAlign = align === "right" ? "justify-end" : align === "center" ? "justify-center" : "justify-start";
|
|
804
|
+
const mx = align === "center" ? "mx-auto" : align === "right" ? "ml-auto" : "";
|
|
797
805
|
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-16 md:py-24", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-6xl mx-auto px-4", children: [
|
|
798
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
799
|
-
d.badge && /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
800
|
-
/* @__PURE__ */ jsxRuntime.jsx("h1", { className:
|
|
801
|
-
d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className:
|
|
802
|
-
(d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
806
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `max-w-3xl ${mx} mb-12`, children: [
|
|
807
|
+
d.badge && /* @__PURE__ */ jsxRuntime.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 }),
|
|
808
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: `text-4xl md:text-5xl font-extrabold tracking-tight mb-5 text-balance leading-tight ${textAlign}`, children: d.title }),
|
|
809
|
+
d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-lg text-muted-foreground leading-relaxed text-pretty mb-8 ${textAlign}`, children: d.subtitle }),
|
|
810
|
+
(d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex gap-3 flex-wrap ${itemsAlign}`, children: [
|
|
803
811
|
d.primaryButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
804
812
|
"a",
|
|
805
813
|
{
|
|
@@ -836,12 +844,16 @@ function ProductHeroBlock({ block }) {
|
|
|
836
844
|
function BentoHeroBlock({ block }) {
|
|
837
845
|
const d = getData(block);
|
|
838
846
|
const cards = Array.isArray(d.cards) ? d.cards : [];
|
|
847
|
+
const align = d.alignment || "center";
|
|
848
|
+
const textAlign = align === "right" ? "text-right" : align === "left" ? "text-left" : "text-center";
|
|
849
|
+
const itemsAlign = align === "right" ? "justify-end" : align === "left" ? "justify-start" : "justify-center";
|
|
850
|
+
const mx = align === "left" ? "" : align === "right" ? "ml-auto" : "mx-auto";
|
|
839
851
|
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-16 md:py-24", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-6xl mx-auto px-4", children: [
|
|
840
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
852
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `max-w-3xl ${mx} mb-12`, children: [
|
|
841
853
|
d.badge && /* @__PURE__ */ jsxRuntime.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 }),
|
|
842
|
-
/* @__PURE__ */ jsxRuntime.jsx("h1", { className:
|
|
843
|
-
d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className:
|
|
844
|
-
(d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
854
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: `text-4xl md:text-5xl font-extrabold tracking-tight mb-4 text-balance ${textAlign}`, children: d.title }),
|
|
855
|
+
d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-lg text-muted-foreground leading-relaxed text-pretty ${textAlign}`, children: d.subtitle }),
|
|
856
|
+
(d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex gap-3 flex-wrap mt-7 ${itemsAlign}`, children: [
|
|
845
857
|
d.primaryButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
846
858
|
"a",
|
|
847
859
|
{
|
|
@@ -867,7 +879,7 @@ function BentoHeroBlock({ block }) {
|
|
|
867
879
|
style: { background: card.background || "var(--muted)" },
|
|
868
880
|
children: [
|
|
869
881
|
card.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-2xl", role: "img", "aria-label": card.title, children: card.icon }),
|
|
870
|
-
card.image && /* @__PURE__ */ jsxRuntime.jsx("img", { src: card.image, alt: card.title || "", className: "w-full rounded-lg object-cover mb-1", style: { maxHeight: card.featured ? "180px" : "120px" } }),
|
|
882
|
+
card.image && /* @__PURE__ */ jsxRuntime.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" } }),
|
|
871
883
|
card.title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-sm", children: card.title }),
|
|
872
884
|
card.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground leading-relaxed", children: card.description })
|
|
873
885
|
]
|
|
@@ -876,74 +888,17 @@ function BentoHeroBlock({ block }) {
|
|
|
876
888
|
)) })
|
|
877
889
|
] }) });
|
|
878
890
|
}
|
|
879
|
-
function AnimatedHeroBlock({ block }) {
|
|
880
|
-
const d = getData(block);
|
|
881
|
-
const words = Array.isArray(d.animatedWords) && d.animatedWords.length > 0 ? d.animatedWords : ["Fast", "Simple", "Powerful"];
|
|
882
|
-
const [wordIndex, setWordIndex] = React__default.default.useState(0);
|
|
883
|
-
const [visible, setVisible] = React__default.default.useState(true);
|
|
884
|
-
React__default.default.useEffect(() => {
|
|
885
|
-
const interval = setInterval(() => {
|
|
886
|
-
setVisible(false);
|
|
887
|
-
setTimeout(() => {
|
|
888
|
-
setWordIndex((i) => (i + 1) % words.length);
|
|
889
|
-
setVisible(true);
|
|
890
|
-
}, 300);
|
|
891
|
-
}, d.interval || 2500);
|
|
892
|
-
return () => clearInterval(interval);
|
|
893
|
-
}, [words.length, d.interval]);
|
|
894
|
-
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-24 flex flex-col items-center text-center px-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-3xl mx-auto", children: [
|
|
895
|
-
d.badge && /* @__PURE__ */ jsxRuntime.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 }),
|
|
896
|
-
/* @__PURE__ */ jsxRuntime.jsxs("h1", { className: "text-4xl md:text-6xl font-extrabold tracking-tight mb-3 text-balance leading-tight", children: [
|
|
897
|
-
d.titlePrefix && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
898
|
-
d.titlePrefix,
|
|
899
|
-
" "
|
|
900
|
-
] }),
|
|
901
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
902
|
-
"span",
|
|
903
|
-
{
|
|
904
|
-
style: {
|
|
905
|
-
display: "inline-block",
|
|
906
|
-
color: "var(--primary)",
|
|
907
|
-
transition: "opacity 0.3s ease, transform 0.3s ease",
|
|
908
|
-
opacity: visible ? 1 : 0,
|
|
909
|
-
transform: visible ? "translateY(0)" : "translateY(-8px)"
|
|
910
|
-
},
|
|
911
|
-
children: words[wordIndex]
|
|
912
|
-
}
|
|
913
|
-
),
|
|
914
|
-
d.titleSuffix && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
915
|
-
" ",
|
|
916
|
-
d.titleSuffix
|
|
917
|
-
] })
|
|
918
|
-
] }),
|
|
919
|
-
d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg md:text-xl text-muted-foreground leading-relaxed mb-9 text-pretty", children: d.subtitle }),
|
|
920
|
-
(d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4 justify-center flex-wrap", children: [
|
|
921
|
-
d.primaryButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
922
|
-
"a",
|
|
923
|
-
{
|
|
924
|
-
href: d.primaryUrl || "#",
|
|
925
|
-
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",
|
|
926
|
-
children: d.primaryButton
|
|
927
|
-
}
|
|
928
|
-
),
|
|
929
|
-
d.secondaryButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
930
|
-
"a",
|
|
931
|
-
{
|
|
932
|
-
href: d.secondaryUrl || "#",
|
|
933
|
-
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",
|
|
934
|
-
children: d.secondaryButton
|
|
935
|
-
}
|
|
936
|
-
)
|
|
937
|
-
] })
|
|
938
|
-
] }) });
|
|
939
|
-
}
|
|
940
891
|
function MinimalHeroBlock({ block }) {
|
|
941
892
|
const d = getData(block);
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
893
|
+
const align = d.alignment || "left";
|
|
894
|
+
const textAlign = align === "right" ? "text-right" : align === "center" ? "text-center" : "text-left";
|
|
895
|
+
const itemsAlign = align === "right" ? "justify-end" : align === "center" ? "justify-center" : "justify-start";
|
|
896
|
+
const mx = align === "center" ? "mx-auto" : align === "right" ? "ml-auto" : "";
|
|
897
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-20 md:py-28 px-4 border-b border-border", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `max-w-4xl ${mx}`, children: [
|
|
898
|
+
d.eyebrow && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-xs uppercase tracking-[0.2em] font-semibold text-muted-foreground mb-5 ${textAlign}`, children: d.eyebrow }),
|
|
899
|
+
/* @__PURE__ */ jsxRuntime.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 }),
|
|
900
|
+
d.subtitle && /* @__PURE__ */ jsxRuntime.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 }),
|
|
901
|
+
(d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex gap-4 flex-wrap items-center ${itemsAlign}`, children: [
|
|
947
902
|
d.primaryButton && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
948
903
|
"a",
|
|
949
904
|
{
|
|
@@ -969,16 +924,19 @@ function MinimalHeroBlock({ block }) {
|
|
|
969
924
|
function SplitHeroBlock({ block }) {
|
|
970
925
|
const d = getData(block);
|
|
971
926
|
const imgLeft = d.imagePosition === "left";
|
|
927
|
+
const align = d.alignment || "left";
|
|
928
|
+
const textAlign = align === "center" ? "text-center" : "text-left";
|
|
929
|
+
const itemsAlign = align === "center" ? "items-center" : "items-start";
|
|
972
930
|
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-16", children: /* @__PURE__ */ jsxRuntime.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: [
|
|
973
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
974
|
-
d.title && /* @__PURE__ */ jsxRuntime.jsx("h1", { className:
|
|
975
|
-
d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className:
|
|
976
|
-
(d.button || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
931
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 space-y-5 ${itemsAlign} flex flex-col`, children: [
|
|
932
|
+
d.title && /* @__PURE__ */ jsxRuntime.jsx("h1", { className: `text-3xl md:text-5xl font-extrabold tracking-tight text-balance leading-tight ${textAlign}`, children: d.title }),
|
|
933
|
+
d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-lg text-muted-foreground leading-relaxed text-pretty ${textAlign}`, children: d.subtitle }),
|
|
934
|
+
(d.button || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-wrap gap-3 pt-2 ${align === "center" ? "justify-center" : "justify-start"}`, children: [
|
|
977
935
|
d.button && /* @__PURE__ */ jsxRuntime.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 }),
|
|
978
936
|
d.secondaryButton && /* @__PURE__ */ jsxRuntime.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 })
|
|
979
937
|
] })
|
|
980
938
|
] }),
|
|
981
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 w-full", children: d.image ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: d.image, alt: d.title || "", className: "w-full rounded-2xl object-cover shadow-lg border border-border" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full rounded-2xl bg-muted border border-border aspect-video flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "No image set" }) }) })
|
|
939
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 w-full", children: d.image ? /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "w-full rounded-2xl bg-muted border border-border aspect-video flex items-center justify-center", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "No image set" }) }) })
|
|
982
940
|
] }) });
|
|
983
941
|
}
|
|
984
942
|
function AccordionBlock({ block }) {
|
|
@@ -1229,7 +1187,6 @@ var BUILT_IN = {
|
|
|
1229
1187
|
"centered-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(CenteredHeroBlock, { block: b }),
|
|
1230
1188
|
"product-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(ProductHeroBlock, { block: b }),
|
|
1231
1189
|
"bento-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(BentoHeroBlock, { block: b }),
|
|
1232
|
-
"animated-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(AnimatedHeroBlock, { block: b }),
|
|
1233
1190
|
"minimal-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(MinimalHeroBlock, { block: b }),
|
|
1234
1191
|
cta: (b) => /* @__PURE__ */ jsxRuntime.jsx(CTABlock, { block: b }),
|
|
1235
1192
|
faq: (b) => /* @__PURE__ */ jsxRuntime.jsx(FAQBlock, { block: b }),
|