@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.
@@ -345,11 +345,15 @@ function ImageBlock({ block }) {
345
345
  }
346
346
  function HeroBlock({ block }) {
347
347
  const d = getData(block);
348
- return /* @__PURE__ */ jsx("section", { className: "py-12 md:py-20", children: /* @__PURE__ */ jsxs("div", { className: "max-w-3xl", children: [
349
- 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 }),
350
- /* @__PURE__ */ jsx("h1", { className: "text-4xl md:text-5xl font-bold tracking-tight mb-4 text-balance", children: d.title }),
351
- d.subtitle && /* @__PURE__ */ jsx("p", { className: "text-xl text-muted-foreground mb-8", children: d.subtitle }),
352
- (d.primaryButton || d.cta) && /* @__PURE__ */ jsxs("div", { className: "flex gap-4 flex-wrap", children: [
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 gap-4 flex-wrap ${itemsAlign}`, children: [
353
357
  (d.primaryButton || d.cta) && /* @__PURE__ */ jsx(
354
358
  "a",
355
359
  {
@@ -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: "text-center max-w-3xl mx-auto mb-12", children: [
793
- 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 }),
794
- /* @__PURE__ */ jsx("h1", { className: "text-4xl md:text-5xl font-extrabold tracking-tight mb-5 text-balance leading-tight", children: d.title }),
795
- d.subtitle && /* @__PURE__ */ jsx("p", { className: "text-lg text-muted-foreground leading-relaxed text-pretty mb-8", children: d.subtitle }),
796
- (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: "flex gap-3 justify-center flex-wrap", children: [
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 gap-3 flex-wrap ${itemsAlign}`, 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: "text-center max-w-3xl mx-auto mb-12", children: [
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: "text-4xl md:text-5xl font-extrabold tracking-tight mb-4 text-balance", children: d.title }),
837
- d.subtitle && /* @__PURE__ */ jsx("p", { className: "text-lg text-muted-foreground leading-relaxed text-pretty", children: d.subtitle }),
838
- (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: "flex gap-3 justify-center flex-wrap mt-7", children: [
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 gap-3 flex-wrap mt-7 ${itemsAlign}`, 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
- return /* @__PURE__ */ jsx("section", { className: "py-20 md:py-28 px-4 border-b border-border", children: /* @__PURE__ */ jsxs("div", { className: "max-w-4xl", children: [
937
- d.eyebrow && /* @__PURE__ */ jsx("p", { className: "text-xs uppercase tracking-[0.2em] font-semibold text-muted-foreground mb-5", children: d.eyebrow }),
938
- /* @__PURE__ */ jsx("h1", { className: "text-5xl md:text-7xl font-black tracking-tight mb-6 text-balance leading-none whitespace-pre-line", children: d.title }),
939
- d.subtitle && /* @__PURE__ */ jsx("p", { className: "text-lg md:text-xl text-muted-foreground leading-relaxed text-pretty max-w-2xl mb-9", children: d.subtitle }),
940
- (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: "flex gap-4 flex-wrap items-center", children: [
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 gap-4 flex-wrap items-center ${itemsAlign}`, 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: "flex-1 space-y-5", children: [
968
- d.title && /* @__PURE__ */ jsx("h1", { className: "text-3xl md:text-5xl font-extrabold tracking-tight text-balance leading-tight", children: d.title }),
969
- d.subtitle && /* @__PURE__ */ jsx("p", { className: "text-lg text-muted-foreground leading-relaxed text-pretty", children: d.subtitle }),
970
- (d.button || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3 pt-2", children: [
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 gap-3 pt-2 ${align === "center" ? "justify-center" : "justify-start"}`, 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 }),