@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.
@@ -60,11 +60,15 @@ function ImageBlock({ block }) {
60
60
  }
61
61
  function HeroBlock({ block }) {
62
62
  const d = getData(block);
63
- return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-12 md:py-20", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-3xl", children: [
64
- 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 }),
65
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-4xl md:text-5xl font-bold tracking-tight mb-4 text-balance", children: d.title }),
66
- d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xl text-muted-foreground mb-8", children: d.subtitle }),
67
- (d.primaryButton || d.cta) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4 flex-wrap", children: [
63
+ const align = d.alignment || "left";
64
+ const textAlign = align === "right" ? "text-right" : align === "center" ? "text-center" : "text-left";
65
+ const itemsAlign = align === "right" ? "items-end" : align === "center" ? "items-center" : "items-start";
66
+ const mx = align === "center" ? "mx-auto" : align === "right" ? "ml-auto" : "";
67
+ return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-12 md:py-20", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `max-w-3xl ${mx}`, children: [
68
+ 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 }),
69
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: `text-4xl md:text-5xl font-bold tracking-tight mb-4 text-balance ${textAlign}`, children: d.title }),
70
+ d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-xl text-muted-foreground mb-8 ${textAlign}`, children: d.subtitle }),
71
+ (d.primaryButton || d.cta) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex gap-4 flex-wrap ${itemsAlign}`, children: [
68
72
  (d.primaryButton || d.cta) && /* @__PURE__ */ jsxRuntime.jsx(
69
73
  "a",
70
74
  {
@@ -503,12 +507,16 @@ function CenteredHeroBlock({ block }) {
503
507
  }
504
508
  function ProductHeroBlock({ block }) {
505
509
  const d = getData(block);
510
+ const align = d.alignment || "left";
511
+ const textAlign = align === "right" ? "text-right" : align === "center" ? "text-center" : "text-left";
512
+ const itemsAlign = align === "right" ? "justify-end" : align === "center" ? "justify-center" : "justify-start";
513
+ const mx = align === "center" ? "mx-auto" : align === "right" ? "ml-auto" : "";
506
514
  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: [
507
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center max-w-3xl mx-auto mb-12", children: [
508
- 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 }),
509
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-4xl md:text-5xl font-extrabold tracking-tight mb-5 text-balance leading-tight", children: d.title }),
510
- d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg text-muted-foreground leading-relaxed text-pretty mb-8", children: d.subtitle }),
511
- (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 justify-center flex-wrap", children: [
515
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `max-w-3xl ${mx} mb-12`, children: [
516
+ 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 }),
517
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: `text-4xl md:text-5xl font-extrabold tracking-tight mb-5 text-balance leading-tight ${textAlign}`, children: d.title }),
518
+ d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-lg text-muted-foreground leading-relaxed text-pretty mb-8 ${textAlign}`, children: d.subtitle }),
519
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex gap-3 flex-wrap ${itemsAlign}`, children: [
512
520
  d.primaryButton && /* @__PURE__ */ jsxRuntime.jsx(
513
521
  "a",
514
522
  {
@@ -545,12 +553,16 @@ function ProductHeroBlock({ block }) {
545
553
  function BentoHeroBlock({ block }) {
546
554
  const d = getData(block);
547
555
  const cards = Array.isArray(d.cards) ? d.cards : [];
556
+ const align = d.alignment || "center";
557
+ const textAlign = align === "right" ? "text-right" : align === "left" ? "text-left" : "text-center";
558
+ const itemsAlign = align === "right" ? "justify-end" : align === "left" ? "justify-start" : "justify-center";
559
+ const mx = align === "left" ? "" : align === "right" ? "ml-auto" : "mx-auto";
548
560
  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: [
549
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center max-w-3xl mx-auto mb-12", children: [
561
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `max-w-3xl ${mx} mb-12`, children: [
550
562
  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 }),
551
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-4xl md:text-5xl font-extrabold tracking-tight mb-4 text-balance", children: d.title }),
552
- d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg text-muted-foreground leading-relaxed text-pretty", children: d.subtitle }),
553
- (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 justify-center flex-wrap mt-7", children: [
563
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: `text-4xl md:text-5xl font-extrabold tracking-tight mb-4 text-balance ${textAlign}`, children: d.title }),
564
+ d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-lg text-muted-foreground leading-relaxed text-pretty ${textAlign}`, children: d.subtitle }),
565
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex gap-3 flex-wrap mt-7 ${itemsAlign}`, children: [
554
566
  d.primaryButton && /* @__PURE__ */ jsxRuntime.jsx(
555
567
  "a",
556
568
  {
@@ -576,7 +588,7 @@ function BentoHeroBlock({ block }) {
576
588
  style: { background: card.background || "var(--muted)" },
577
589
  children: [
578
590
  card.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-2xl", role: "img", "aria-label": card.title, children: card.icon }),
579
- 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" } }),
591
+ 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" } }),
580
592
  card.title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-sm", children: card.title }),
581
593
  card.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground leading-relaxed", children: card.description })
582
594
  ]
@@ -585,74 +597,17 @@ function BentoHeroBlock({ block }) {
585
597
  )) })
586
598
  ] }) });
587
599
  }
588
- function AnimatedHeroBlock({ block }) {
589
- const d = getData(block);
590
- const words = Array.isArray(d.animatedWords) && d.animatedWords.length > 0 ? d.animatedWords : ["Fast", "Simple", "Powerful"];
591
- const [wordIndex, setWordIndex] = React__default.default.useState(0);
592
- const [visible, setVisible] = React__default.default.useState(true);
593
- React__default.default.useEffect(() => {
594
- const interval = setInterval(() => {
595
- setVisible(false);
596
- setTimeout(() => {
597
- setWordIndex((i) => (i + 1) % words.length);
598
- setVisible(true);
599
- }, 300);
600
- }, d.interval || 2500);
601
- return () => clearInterval(interval);
602
- }, [words.length, d.interval]);
603
- 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: [
604
- 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 }),
605
- /* @__PURE__ */ jsxRuntime.jsxs("h1", { className: "text-4xl md:text-6xl font-extrabold tracking-tight mb-3 text-balance leading-tight", children: [
606
- d.titlePrefix && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
607
- d.titlePrefix,
608
- " "
609
- ] }),
610
- /* @__PURE__ */ jsxRuntime.jsx(
611
- "span",
612
- {
613
- style: {
614
- display: "inline-block",
615
- color: "var(--primary)",
616
- transition: "opacity 0.3s ease, transform 0.3s ease",
617
- opacity: visible ? 1 : 0,
618
- transform: visible ? "translateY(0)" : "translateY(-8px)"
619
- },
620
- children: words[wordIndex]
621
- }
622
- ),
623
- d.titleSuffix && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
624
- " ",
625
- d.titleSuffix
626
- ] })
627
- ] }),
628
- d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg md:text-xl text-muted-foreground leading-relaxed mb-9 text-pretty", children: d.subtitle }),
629
- (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4 justify-center flex-wrap", children: [
630
- d.primaryButton && /* @__PURE__ */ jsxRuntime.jsx(
631
- "a",
632
- {
633
- href: d.primaryUrl || "#",
634
- 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",
635
- children: d.primaryButton
636
- }
637
- ),
638
- d.secondaryButton && /* @__PURE__ */ jsxRuntime.jsx(
639
- "a",
640
- {
641
- href: d.secondaryUrl || "#",
642
- 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",
643
- children: d.secondaryButton
644
- }
645
- )
646
- ] })
647
- ] }) });
648
- }
649
600
  function MinimalHeroBlock({ block }) {
650
601
  const d = getData(block);
651
- 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", children: [
652
- d.eyebrow && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs uppercase tracking-[0.2em] font-semibold text-muted-foreground mb-5", children: d.eyebrow }),
653
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-5xl md:text-7xl font-black tracking-tight mb-6 text-balance leading-none whitespace-pre-line", children: d.title }),
654
- d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg md:text-xl text-muted-foreground leading-relaxed text-pretty max-w-2xl mb-9", children: d.subtitle }),
655
- (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4 flex-wrap items-center", children: [
602
+ const align = d.alignment || "left";
603
+ const textAlign = align === "right" ? "text-right" : align === "center" ? "text-center" : "text-left";
604
+ const itemsAlign = align === "right" ? "justify-end" : align === "center" ? "justify-center" : "justify-start";
605
+ const mx = align === "center" ? "mx-auto" : align === "right" ? "ml-auto" : "";
606
+ 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: [
607
+ d.eyebrow && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-xs uppercase tracking-[0.2em] font-semibold text-muted-foreground mb-5 ${textAlign}`, children: d.eyebrow }),
608
+ /* @__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 }),
609
+ 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 }),
610
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex gap-4 flex-wrap items-center ${itemsAlign}`, children: [
656
611
  d.primaryButton && /* @__PURE__ */ jsxRuntime.jsxs(
657
612
  "a",
658
613
  {
@@ -678,16 +633,19 @@ function MinimalHeroBlock({ block }) {
678
633
  function SplitHeroBlock({ block }) {
679
634
  const d = getData(block);
680
635
  const imgLeft = d.imagePosition === "left";
636
+ const align = d.alignment || "left";
637
+ const textAlign = align === "center" ? "text-center" : "text-left";
638
+ const itemsAlign = align === "center" ? "items-center" : "items-start";
681
639
  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: [
682
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-5", children: [
683
- d.title && /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl md:text-5xl font-extrabold tracking-tight text-balance leading-tight", children: d.title }),
684
- d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg text-muted-foreground leading-relaxed text-pretty", children: d.subtitle }),
685
- (d.button || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-3 pt-2", children: [
640
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 space-y-5 ${itemsAlign} flex flex-col`, children: [
641
+ d.title && /* @__PURE__ */ jsxRuntime.jsx("h1", { className: `text-3xl md:text-5xl font-extrabold tracking-tight text-balance leading-tight ${textAlign}`, children: d.title }),
642
+ d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-lg text-muted-foreground leading-relaxed text-pretty ${textAlign}`, children: d.subtitle }),
643
+ (d.button || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-wrap gap-3 pt-2 ${align === "center" ? "justify-center" : "justify-start"}`, children: [
686
644
  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 }),
687
645
  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 })
688
646
  ] })
689
647
  ] }),
690
- /* @__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" }) }) })
648
+ /* @__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" }) }) })
691
649
  ] }) });
692
650
  }
693
651
  function AccordionBlock({ block }) {
@@ -938,7 +896,6 @@ var BUILT_IN = {
938
896
  "centered-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(CenteredHeroBlock, { block: b }),
939
897
  "product-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(ProductHeroBlock, { block: b }),
940
898
  "bento-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(BentoHeroBlock, { block: b }),
941
- "animated-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(AnimatedHeroBlock, { block: b }),
942
899
  "minimal-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(MinimalHeroBlock, { block: b }),
943
900
  cta: (b) => /* @__PURE__ */ jsxRuntime.jsx(CTABlock, { block: b }),
944
901
  faq: (b) => /* @__PURE__ */ jsxRuntime.jsx(FAQBlock, { block: b }),