@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.
@@ -54,11 +54,15 @@ function ImageBlock({ block }) {
54
54
  }
55
55
  function HeroBlock({ block }) {
56
56
  const d = getData(block);
57
- return /* @__PURE__ */ jsx("section", { className: "py-12 md:py-20", children: /* @__PURE__ */ jsxs("div", { className: "max-w-3xl", children: [
58
- 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 }),
59
- /* @__PURE__ */ jsx("h1", { className: "text-4xl md:text-5xl font-bold tracking-tight mb-4 text-balance", children: d.title }),
60
- d.subtitle && /* @__PURE__ */ jsx("p", { className: "text-xl text-muted-foreground mb-8", children: d.subtitle }),
61
- (d.primaryButton || d.cta) && /* @__PURE__ */ jsxs("div", { className: "flex gap-4 flex-wrap", children: [
57
+ const align = d.alignment || "left";
58
+ const textAlign = align === "right" ? "text-right" : align === "center" ? "text-center" : "text-left";
59
+ const itemsAlign = align === "right" ? "items-end" : align === "center" ? "items-center" : "items-start";
60
+ const mx = align === "center" ? "mx-auto" : align === "right" ? "ml-auto" : "";
61
+ return /* @__PURE__ */ jsx("section", { className: "py-12 md:py-20", children: /* @__PURE__ */ jsxs("div", { className: `max-w-3xl ${mx}`, children: [
62
+ 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 }),
63
+ /* @__PURE__ */ jsx("h1", { className: `text-4xl md:text-5xl font-bold tracking-tight mb-4 text-balance ${textAlign}`, children: d.title }),
64
+ d.subtitle && /* @__PURE__ */ jsx("p", { className: `text-xl text-muted-foreground mb-8 ${textAlign}`, children: d.subtitle }),
65
+ (d.primaryButton || d.cta) && /* @__PURE__ */ jsxs("div", { className: `flex gap-4 flex-wrap ${itemsAlign}`, children: [
62
66
  (d.primaryButton || d.cta) && /* @__PURE__ */ jsx(
63
67
  "a",
64
68
  {
@@ -497,12 +501,16 @@ function CenteredHeroBlock({ block }) {
497
501
  }
498
502
  function ProductHeroBlock({ block }) {
499
503
  const d = getData(block);
504
+ const align = d.alignment || "left";
505
+ const textAlign = align === "right" ? "text-right" : align === "center" ? "text-center" : "text-left";
506
+ const itemsAlign = align === "right" ? "justify-end" : align === "center" ? "justify-center" : "justify-start";
507
+ const mx = align === "center" ? "mx-auto" : align === "right" ? "ml-auto" : "";
500
508
  return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-24", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto px-4", children: [
501
- /* @__PURE__ */ jsxs("div", { className: "text-center max-w-3xl mx-auto mb-12", children: [
502
- 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 }),
503
- /* @__PURE__ */ jsx("h1", { className: "text-4xl md:text-5xl font-extrabold tracking-tight mb-5 text-balance leading-tight", children: d.title }),
504
- d.subtitle && /* @__PURE__ */ jsx("p", { className: "text-lg text-muted-foreground leading-relaxed text-pretty mb-8", children: d.subtitle }),
505
- (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: "flex gap-3 justify-center flex-wrap", children: [
509
+ /* @__PURE__ */ jsxs("div", { className: `max-w-3xl ${mx} mb-12`, children: [
510
+ 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 }),
511
+ /* @__PURE__ */ jsx("h1", { className: `text-4xl md:text-5xl font-extrabold tracking-tight mb-5 text-balance leading-tight ${textAlign}`, children: d.title }),
512
+ d.subtitle && /* @__PURE__ */ jsx("p", { className: `text-lg text-muted-foreground leading-relaxed text-pretty mb-8 ${textAlign}`, children: d.subtitle }),
513
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: `flex gap-3 flex-wrap ${itemsAlign}`, children: [
506
514
  d.primaryButton && /* @__PURE__ */ jsx(
507
515
  "a",
508
516
  {
@@ -539,12 +547,16 @@ function ProductHeroBlock({ block }) {
539
547
  function BentoHeroBlock({ block }) {
540
548
  const d = getData(block);
541
549
  const cards = Array.isArray(d.cards) ? d.cards : [];
550
+ const align = d.alignment || "center";
551
+ const textAlign = align === "right" ? "text-right" : align === "left" ? "text-left" : "text-center";
552
+ const itemsAlign = align === "right" ? "justify-end" : align === "left" ? "justify-start" : "justify-center";
553
+ const mx = align === "left" ? "" : align === "right" ? "ml-auto" : "mx-auto";
542
554
  return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-24", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto px-4", children: [
543
- /* @__PURE__ */ jsxs("div", { className: "text-center max-w-3xl mx-auto mb-12", children: [
555
+ /* @__PURE__ */ jsxs("div", { className: `max-w-3xl ${mx} mb-12`, children: [
544
556
  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 }),
545
- /* @__PURE__ */ jsx("h1", { className: "text-4xl md:text-5xl font-extrabold tracking-tight mb-4 text-balance", children: d.title }),
546
- d.subtitle && /* @__PURE__ */ jsx("p", { className: "text-lg text-muted-foreground leading-relaxed text-pretty", children: d.subtitle }),
547
- (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: "flex gap-3 justify-center flex-wrap mt-7", children: [
557
+ /* @__PURE__ */ jsx("h1", { className: `text-4xl md:text-5xl font-extrabold tracking-tight mb-4 text-balance ${textAlign}`, children: d.title }),
558
+ d.subtitle && /* @__PURE__ */ jsx("p", { className: `text-lg text-muted-foreground leading-relaxed text-pretty ${textAlign}`, children: d.subtitle }),
559
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: `flex gap-3 flex-wrap mt-7 ${itemsAlign}`, children: [
548
560
  d.primaryButton && /* @__PURE__ */ jsx(
549
561
  "a",
550
562
  {
@@ -570,7 +582,7 @@ function BentoHeroBlock({ block }) {
570
582
  style: { background: card.background || "var(--muted)" },
571
583
  children: [
572
584
  card.icon && /* @__PURE__ */ jsx("span", { className: "text-2xl", role: "img", "aria-label": card.title, children: card.icon }),
573
- 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" } }),
585
+ 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" } }),
574
586
  card.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm", children: card.title }),
575
587
  card.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground leading-relaxed", children: card.description })
576
588
  ]
@@ -579,74 +591,17 @@ function BentoHeroBlock({ block }) {
579
591
  )) })
580
592
  ] }) });
581
593
  }
582
- function AnimatedHeroBlock({ block }) {
583
- const d = getData(block);
584
- const words = Array.isArray(d.animatedWords) && d.animatedWords.length > 0 ? d.animatedWords : ["Fast", "Simple", "Powerful"];
585
- const [wordIndex, setWordIndex] = React.useState(0);
586
- const [visible, setVisible] = React.useState(true);
587
- React.useEffect(() => {
588
- const interval = setInterval(() => {
589
- setVisible(false);
590
- setTimeout(() => {
591
- setWordIndex((i) => (i + 1) % words.length);
592
- setVisible(true);
593
- }, 300);
594
- }, d.interval || 2500);
595
- return () => clearInterval(interval);
596
- }, [words.length, d.interval]);
597
- 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: [
598
- 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 }),
599
- /* @__PURE__ */ jsxs("h1", { className: "text-4xl md:text-6xl font-extrabold tracking-tight mb-3 text-balance leading-tight", children: [
600
- d.titlePrefix && /* @__PURE__ */ jsxs("span", { children: [
601
- d.titlePrefix,
602
- " "
603
- ] }),
604
- /* @__PURE__ */ jsx(
605
- "span",
606
- {
607
- style: {
608
- display: "inline-block",
609
- color: "var(--primary)",
610
- transition: "opacity 0.3s ease, transform 0.3s ease",
611
- opacity: visible ? 1 : 0,
612
- transform: visible ? "translateY(0)" : "translateY(-8px)"
613
- },
614
- children: words[wordIndex]
615
- }
616
- ),
617
- d.titleSuffix && /* @__PURE__ */ jsxs("span", { children: [
618
- " ",
619
- d.titleSuffix
620
- ] })
621
- ] }),
622
- d.subtitle && /* @__PURE__ */ jsx("p", { className: "text-lg md:text-xl text-muted-foreground leading-relaxed mb-9 text-pretty", children: d.subtitle }),
623
- (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: "flex gap-4 justify-center flex-wrap", children: [
624
- d.primaryButton && /* @__PURE__ */ jsx(
625
- "a",
626
- {
627
- href: d.primaryUrl || "#",
628
- 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",
629
- children: d.primaryButton
630
- }
631
- ),
632
- d.secondaryButton && /* @__PURE__ */ jsx(
633
- "a",
634
- {
635
- href: d.secondaryUrl || "#",
636
- 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",
637
- children: d.secondaryButton
638
- }
639
- )
640
- ] })
641
- ] }) });
642
- }
643
594
  function MinimalHeroBlock({ block }) {
644
595
  const d = getData(block);
645
- 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: [
646
- d.eyebrow && /* @__PURE__ */ jsx("p", { className: "text-xs uppercase tracking-[0.2em] font-semibold text-muted-foreground mb-5", children: d.eyebrow }),
647
- /* @__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 }),
648
- 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 }),
649
- (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: "flex gap-4 flex-wrap items-center", children: [
596
+ const align = d.alignment || "left";
597
+ const textAlign = align === "right" ? "text-right" : align === "center" ? "text-center" : "text-left";
598
+ const itemsAlign = align === "right" ? "justify-end" : align === "center" ? "justify-center" : "justify-start";
599
+ const mx = align === "center" ? "mx-auto" : align === "right" ? "ml-auto" : "";
600
+ 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: [
601
+ d.eyebrow && /* @__PURE__ */ jsx("p", { className: `text-xs uppercase tracking-[0.2em] font-semibold text-muted-foreground mb-5 ${textAlign}`, children: d.eyebrow }),
602
+ /* @__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 }),
603
+ 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 }),
604
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: `flex gap-4 flex-wrap items-center ${itemsAlign}`, children: [
650
605
  d.primaryButton && /* @__PURE__ */ jsxs(
651
606
  "a",
652
607
  {
@@ -672,16 +627,19 @@ function MinimalHeroBlock({ block }) {
672
627
  function SplitHeroBlock({ block }) {
673
628
  const d = getData(block);
674
629
  const imgLeft = d.imagePosition === "left";
630
+ const align = d.alignment || "left";
631
+ const textAlign = align === "center" ? "text-center" : "text-left";
632
+ const itemsAlign = align === "center" ? "items-center" : "items-start";
675
633
  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: [
676
- /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-5", children: [
677
- d.title && /* @__PURE__ */ jsx("h1", { className: "text-3xl md:text-5xl font-extrabold tracking-tight text-balance leading-tight", children: d.title }),
678
- d.subtitle && /* @__PURE__ */ jsx("p", { className: "text-lg text-muted-foreground leading-relaxed text-pretty", children: d.subtitle }),
679
- (d.button || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3 pt-2", children: [
634
+ /* @__PURE__ */ jsxs("div", { className: `flex-1 space-y-5 ${itemsAlign} flex flex-col`, children: [
635
+ d.title && /* @__PURE__ */ jsx("h1", { className: `text-3xl md:text-5xl font-extrabold tracking-tight text-balance leading-tight ${textAlign}`, children: d.title }),
636
+ d.subtitle && /* @__PURE__ */ jsx("p", { className: `text-lg text-muted-foreground leading-relaxed text-pretty ${textAlign}`, children: d.subtitle }),
637
+ (d.button || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: `flex flex-wrap gap-3 pt-2 ${align === "center" ? "justify-center" : "justify-start"}`, children: [
680
638
  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 }),
681
639
  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 })
682
640
  ] })
683
641
  ] }),
684
- /* @__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" }) }) })
642
+ /* @__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" }) }) })
685
643
  ] }) });
686
644
  }
687
645
  function AccordionBlock({ block }) {
@@ -932,7 +890,6 @@ var BUILT_IN = {
932
890
  "centered-hero": (b) => /* @__PURE__ */ jsx(CenteredHeroBlock, { block: b }),
933
891
  "product-hero": (b) => /* @__PURE__ */ jsx(ProductHeroBlock, { block: b }),
934
892
  "bento-hero": (b) => /* @__PURE__ */ jsx(BentoHeroBlock, { block: b }),
935
- "animated-hero": (b) => /* @__PURE__ */ jsx(AnimatedHeroBlock, { block: b }),
936
893
  "minimal-hero": (b) => /* @__PURE__ */ jsx(MinimalHeroBlock, { block: b }),
937
894
  cta: (b) => /* @__PURE__ */ jsx(CTABlock, { block: b }),
938
895
  faq: (b) => /* @__PURE__ */ jsx(FAQBlock, { block: b }),