@sprintup-cms/sdk 1.8.66 → 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.
@@ -266,11 +266,7 @@ function createCMSClient(options) {
266
266
  next: { revalidate: 60, tags: [`cms-globals-${appId}`] }
267
267
  });
268
268
  if (!res.ok) {
269
- const [navPages, footerPages] = await Promise.all([
270
- getPages({ type: "navigation" }),
271
- getPages({ type: "footer" })
272
- ]);
273
- return { navigation: navPages[0] ?? null, footer: footerPages[0] ?? null };
269
+ return { navigation: null, footer: null };
274
270
  }
275
271
  const json = await res.json();
276
272
  return {
@@ -349,11 +345,15 @@ function ImageBlock({ block }) {
349
345
  }
350
346
  function HeroBlock({ block }) {
351
347
  const d = getData(block);
352
- return /* @__PURE__ */ jsx("section", { className: "py-12 md:py-20", children: /* @__PURE__ */ jsxs("div", { className: "max-w-3xl", 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", children: d.title }),
355
- d.subtitle && /* @__PURE__ */ jsx("p", { className: "text-xl text-muted-foreground mb-8", children: d.subtitle }),
356
- (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: [
357
357
  (d.primaryButton || d.cta) && /* @__PURE__ */ jsx(
358
358
  "a",
359
359
  {
@@ -737,19 +737,200 @@ function PricingTableBlock({ block }) {
737
737
  }) })
738
738
  ] });
739
739
  }
740
+ function CenteredHeroBlock({ block }) {
741
+ const d = getData(block);
742
+ const hasBg = d.backgroundImage;
743
+ return /* @__PURE__ */ jsxs(
744
+ "section",
745
+ {
746
+ className: "relative flex flex-col items-center justify-center text-center py-24 px-6 overflow-hidden rounded-2xl",
747
+ style: hasBg ? { backgroundImage: `url(${d.backgroundImage})`, backgroundSize: "cover", backgroundPosition: "center" } : { background: d.backgroundColor || "var(--muted)" },
748
+ children: [
749
+ hasBg && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 rounded-2xl", style: { background: `rgba(0,0,0,${d.overlayOpacity ?? 0.45})` } }),
750
+ /* @__PURE__ */ jsxs("div", { className: "relative z-10 max-w-3xl mx-auto", children: [
751
+ d.badge && /* @__PURE__ */ jsx("span", { className: "inline-block px-3 py-1 text-xs font-semibold rounded-full bg-background/20 backdrop-blur-sm border border-white/20 mb-5 text-white", children: d.badge }),
752
+ /* @__PURE__ */ jsx(
753
+ "h1",
754
+ {
755
+ className: "text-4xl md:text-6xl font-extrabold tracking-tight mb-5 text-balance leading-tight",
756
+ style: { color: hasBg ? "#fff" : "var(--foreground)" },
757
+ children: d.title
758
+ }
759
+ ),
760
+ d.subtitle && /* @__PURE__ */ jsx(
761
+ "p",
762
+ {
763
+ className: "text-lg md:text-xl mb-8 max-w-2xl mx-auto text-pretty leading-relaxed",
764
+ style: { color: hasBg ? "rgba(255,255,255,0.8)" : "var(--muted-foreground)" },
765
+ children: d.subtitle
766
+ }
767
+ ),
768
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: "flex gap-4 justify-center flex-wrap", children: [
769
+ d.primaryButton && /* @__PURE__ */ jsx(
770
+ "a",
771
+ {
772
+ href: d.primaryUrl || "#",
773
+ className: "inline-flex items-center px-8 py-3.5 rounded-xl font-semibold text-sm transition-opacity hover:opacity-90",
774
+ style: { background: d.buttonColor || "var(--primary)", color: d.buttonTextColor || "var(--primary-foreground)" },
775
+ children: d.primaryButton
776
+ }
777
+ ),
778
+ d.secondaryButton && /* @__PURE__ */ jsx(
779
+ "a",
780
+ {
781
+ href: d.secondaryUrl || "#",
782
+ className: "inline-flex items-center px-8 py-3.5 rounded-xl font-semibold text-sm border transition-colors hover:bg-white/10",
783
+ style: { borderColor: hasBg ? "rgba(255,255,255,0.4)" : "var(--border)", color: hasBg ? "#fff" : "var(--foreground)" },
784
+ children: d.secondaryButton
785
+ }
786
+ )
787
+ ] })
788
+ ] })
789
+ ]
790
+ }
791
+ );
792
+ }
793
+ function ProductHeroBlock({ block }) {
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" : "";
799
+ return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-24", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto px-4", 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: [
805
+ d.primaryButton && /* @__PURE__ */ jsx(
806
+ "a",
807
+ {
808
+ href: d.primaryUrl || "#",
809
+ className: "inline-flex items-center px-7 py-3 rounded-xl bg-primary text-primary-foreground font-semibold text-sm hover:opacity-90 transition-opacity",
810
+ children: d.primaryButton
811
+ }
812
+ ),
813
+ d.secondaryButton && /* @__PURE__ */ jsx(
814
+ "a",
815
+ {
816
+ href: d.secondaryUrl || "#",
817
+ className: "inline-flex items-center px-7 py-3 rounded-xl border border-border text-foreground font-semibold text-sm hover:bg-muted transition-colors",
818
+ children: d.secondaryButton
819
+ }
820
+ )
821
+ ] })
822
+ ] }),
823
+ d.image ? /* @__PURE__ */ jsxs("div", { className: "relative rounded-2xl overflow-hidden border border-border shadow-2xl", children: [
824
+ d.browserChrome && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 px-4 py-2.5 bg-muted border-b border-border", children: [
825
+ /* @__PURE__ */ jsx("span", { className: "w-3 h-3 rounded-full bg-red-400" }),
826
+ /* @__PURE__ */ jsx("span", { className: "w-3 h-3 rounded-full bg-amber-400" }),
827
+ /* @__PURE__ */ jsx("span", { className: "w-3 h-3 rounded-full bg-emerald-400" }),
828
+ d.urlBar && /* @__PURE__ */ jsx("span", { className: "ml-3 flex-1 text-xs text-muted-foreground bg-background border border-border rounded px-3 py-0.5 truncate", children: d.urlBar })
829
+ ] }),
830
+ /* @__PURE__ */ jsx("img", { src: d.image, alt: d.title || "Product preview", className: "w-full object-cover" })
831
+ ] }) : /* @__PURE__ */ jsx("div", { className: "rounded-2xl border border-dashed border-border bg-muted aspect-video flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Add a product screenshot" }) }),
832
+ Array.isArray(d.trustedBy) && d.trustedBy.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mt-10 text-center", children: [
833
+ d.trustedByLabel && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground uppercase tracking-widest mb-4 font-medium", children: d.trustedByLabel }),
834
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center justify-center gap-6", children: d.trustedBy.map((item, i) => item.logo ? /* @__PURE__ */ jsx("img", { src: item.logo, alt: item.name || "", className: "h-6 object-contain opacity-60 grayscale" }, i) : /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-muted-foreground", children: item.name }, i)) })
835
+ ] })
836
+ ] }) });
837
+ }
838
+ function BentoHeroBlock({ block }) {
839
+ const d = getData(block);
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";
845
+ return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-24", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto px-4", children: [
846
+ /* @__PURE__ */ jsxs("div", { className: `max-w-3xl ${mx} mb-12`, children: [
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 }),
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: [
851
+ d.primaryButton && /* @__PURE__ */ jsx(
852
+ "a",
853
+ {
854
+ href: d.primaryUrl || "#",
855
+ className: "inline-flex items-center px-7 py-3 rounded-xl bg-primary text-primary-foreground font-semibold text-sm hover:opacity-90 transition-opacity",
856
+ children: d.primaryButton
857
+ }
858
+ ),
859
+ d.secondaryButton && /* @__PURE__ */ jsx(
860
+ "a",
861
+ {
862
+ href: d.secondaryUrl || "#",
863
+ className: "inline-flex items-center px-7 py-3 rounded-xl border border-border text-foreground font-semibold text-sm hover:bg-muted transition-colors",
864
+ children: d.secondaryButton
865
+ }
866
+ )
867
+ ] })
868
+ ] }),
869
+ cards.length > 0 && /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 auto-rows-fr", children: cards.map((card, i) => /* @__PURE__ */ jsxs(
870
+ "div",
871
+ {
872
+ className: `rounded-2xl border border-border p-6 flex flex-col gap-3 transition-shadow hover:shadow-md ${card.featured ? "lg:col-span-2 row-span-1" : ""}`,
873
+ style: { background: card.background || "var(--muted)" },
874
+ children: [
875
+ card.icon && /* @__PURE__ */ jsx("span", { className: "text-2xl", role: "img", "aria-label": card.title, children: card.icon }),
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" } }),
877
+ card.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm", children: card.title }),
878
+ card.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground leading-relaxed", children: card.description })
879
+ ]
880
+ },
881
+ i
882
+ )) })
883
+ ] }) });
884
+ }
885
+ function MinimalHeroBlock({ block }) {
886
+ const d = getData(block);
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: [
896
+ d.primaryButton && /* @__PURE__ */ jsxs(
897
+ "a",
898
+ {
899
+ href: d.primaryUrl || "#",
900
+ className: "inline-flex items-center gap-2 text-sm font-semibold underline underline-offset-4 hover:text-primary transition-colors",
901
+ children: [
902
+ d.primaryButton,
903
+ /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M5 12h14M12 5l7 7-7 7" }) })
904
+ ]
905
+ }
906
+ ),
907
+ d.secondaryButton && /* @__PURE__ */ jsx(
908
+ "a",
909
+ {
910
+ href: d.secondaryUrl || "#",
911
+ className: "inline-flex items-center text-sm text-muted-foreground hover:text-foreground transition-colors",
912
+ children: d.secondaryButton
913
+ }
914
+ )
915
+ ] })
916
+ ] }) });
917
+ }
740
918
  function SplitHeroBlock({ block }) {
741
919
  const d = getData(block);
742
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";
743
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: [
744
- /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-5", children: [
745
- d.title && /* @__PURE__ */ jsx("h1", { className: "text-3xl md:text-5xl font-extrabold tracking-tight text-balance leading-tight", children: d.title }),
746
- d.subtitle && /* @__PURE__ */ jsx("p", { className: "text-lg text-muted-foreground leading-relaxed text-pretty", children: d.subtitle }),
747
- (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: [
748
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 }),
749
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 })
750
931
  ] })
751
932
  ] }),
752
- /* @__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" }) }) })
753
934
  ] }) });
754
935
  }
755
936
  function AccordionBlock({ block }) {
@@ -997,6 +1178,10 @@ var BUILT_IN = {
997
1178
  "pricing-table": (b) => /* @__PURE__ */ jsx(PricingTableBlock, { block: b }),
998
1179
  hero: (b) => /* @__PURE__ */ jsx(HeroBlock, { block: b }),
999
1180
  "hero-section": (b) => /* @__PURE__ */ jsx(HeroBlock, { block: b }),
1181
+ "centered-hero": (b) => /* @__PURE__ */ jsx(CenteredHeroBlock, { block: b }),
1182
+ "product-hero": (b) => /* @__PURE__ */ jsx(ProductHeroBlock, { block: b }),
1183
+ "bento-hero": (b) => /* @__PURE__ */ jsx(BentoHeroBlock, { block: b }),
1184
+ "minimal-hero": (b) => /* @__PURE__ */ jsx(MinimalHeroBlock, { block: b }),
1000
1185
  cta: (b) => /* @__PURE__ */ jsx(CTABlock, { block: b }),
1001
1186
  faq: (b) => /* @__PURE__ */ jsx(FAQBlock, { block: b }),
1002
1187
  "team-member": (b) => /* @__PURE__ */ jsx(TeamMemberBlock, { block: b }),