@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.
@@ -272,11 +272,7 @@ function createCMSClient(options) {
272
272
  next: { revalidate: 60, tags: [`cms-globals-${appId}`] }
273
273
  });
274
274
  if (!res.ok) {
275
- const [navPages, footerPages] = await Promise.all([
276
- getPages({ type: "navigation" }),
277
- getPages({ type: "footer" })
278
- ]);
279
- return { navigation: navPages[0] ?? null, footer: footerPages[0] ?? null };
275
+ return { navigation: null, footer: null };
280
276
  }
281
277
  const json = await res.json();
282
278
  return {
@@ -355,11 +351,15 @@ function ImageBlock({ block }) {
355
351
  }
356
352
  function HeroBlock({ block }) {
357
353
  const d = getData(block);
358
- return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-12 md:py-20", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-3xl", 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", children: d.title }),
361
- d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xl text-muted-foreground mb-8", children: d.subtitle }),
362
- (d.primaryButton || d.cta) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4 flex-wrap", children: [
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: [
363
363
  (d.primaryButton || d.cta) && /* @__PURE__ */ jsxRuntime.jsx(
364
364
  "a",
365
365
  {
@@ -743,19 +743,200 @@ function PricingTableBlock({ block }) {
743
743
  }) })
744
744
  ] });
745
745
  }
746
+ function CenteredHeroBlock({ block }) {
747
+ const d = getData(block);
748
+ const hasBg = d.backgroundImage;
749
+ return /* @__PURE__ */ jsxRuntime.jsxs(
750
+ "section",
751
+ {
752
+ className: "relative flex flex-col items-center justify-center text-center py-24 px-6 overflow-hidden rounded-2xl",
753
+ style: hasBg ? { backgroundImage: `url(${d.backgroundImage})`, backgroundSize: "cover", backgroundPosition: "center" } : { background: d.backgroundColor || "var(--muted)" },
754
+ children: [
755
+ hasBg && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 rounded-2xl", style: { background: `rgba(0,0,0,${d.overlayOpacity ?? 0.45})` } }),
756
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative z-10 max-w-3xl mx-auto", children: [
757
+ d.badge && /* @__PURE__ */ jsxRuntime.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 }),
758
+ /* @__PURE__ */ jsxRuntime.jsx(
759
+ "h1",
760
+ {
761
+ className: "text-4xl md:text-6xl font-extrabold tracking-tight mb-5 text-balance leading-tight",
762
+ style: { color: hasBg ? "#fff" : "var(--foreground)" },
763
+ children: d.title
764
+ }
765
+ ),
766
+ d.subtitle && /* @__PURE__ */ jsxRuntime.jsx(
767
+ "p",
768
+ {
769
+ className: "text-lg md:text-xl mb-8 max-w-2xl mx-auto text-pretty leading-relaxed",
770
+ style: { color: hasBg ? "rgba(255,255,255,0.8)" : "var(--muted-foreground)" },
771
+ children: d.subtitle
772
+ }
773
+ ),
774
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4 justify-center flex-wrap", children: [
775
+ d.primaryButton && /* @__PURE__ */ jsxRuntime.jsx(
776
+ "a",
777
+ {
778
+ href: d.primaryUrl || "#",
779
+ className: "inline-flex items-center px-8 py-3.5 rounded-xl font-semibold text-sm transition-opacity hover:opacity-90",
780
+ style: { background: d.buttonColor || "var(--primary)", color: d.buttonTextColor || "var(--primary-foreground)" },
781
+ children: d.primaryButton
782
+ }
783
+ ),
784
+ d.secondaryButton && /* @__PURE__ */ jsxRuntime.jsx(
785
+ "a",
786
+ {
787
+ href: d.secondaryUrl || "#",
788
+ className: "inline-flex items-center px-8 py-3.5 rounded-xl font-semibold text-sm border transition-colors hover:bg-white/10",
789
+ style: { borderColor: hasBg ? "rgba(255,255,255,0.4)" : "var(--border)", color: hasBg ? "#fff" : "var(--foreground)" },
790
+ children: d.secondaryButton
791
+ }
792
+ )
793
+ ] })
794
+ ] })
795
+ ]
796
+ }
797
+ );
798
+ }
799
+ function ProductHeroBlock({ block }) {
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" : "";
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: [
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: [
811
+ d.primaryButton && /* @__PURE__ */ jsxRuntime.jsx(
812
+ "a",
813
+ {
814
+ href: d.primaryUrl || "#",
815
+ 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",
816
+ children: d.primaryButton
817
+ }
818
+ ),
819
+ d.secondaryButton && /* @__PURE__ */ jsxRuntime.jsx(
820
+ "a",
821
+ {
822
+ href: d.secondaryUrl || "#",
823
+ 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",
824
+ children: d.secondaryButton
825
+ }
826
+ )
827
+ ] })
828
+ ] }),
829
+ d.image ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative rounded-2xl overflow-hidden border border-border shadow-2xl", children: [
830
+ d.browserChrome && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 px-4 py-2.5 bg-muted border-b border-border", children: [
831
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-3 h-3 rounded-full bg-red-400" }),
832
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-3 h-3 rounded-full bg-amber-400" }),
833
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-3 h-3 rounded-full bg-emerald-400" }),
834
+ d.urlBar && /* @__PURE__ */ jsxRuntime.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 })
835
+ ] }),
836
+ /* @__PURE__ */ jsxRuntime.jsx("img", { src: d.image, alt: d.title || "Product preview", className: "w-full object-cover" })
837
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-2xl border border-dashed border-border bg-muted aspect-video flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "Add a product screenshot" }) }),
838
+ Array.isArray(d.trustedBy) && d.trustedBy.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-10 text-center", children: [
839
+ d.trustedByLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground uppercase tracking-widest mb-4 font-medium", children: d.trustedByLabel }),
840
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center justify-center gap-6", children: d.trustedBy.map((item, i) => item.logo ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: item.logo, alt: item.name || "", className: "h-6 object-contain opacity-60 grayscale" }, i) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-muted-foreground", children: item.name }, i)) })
841
+ ] })
842
+ ] }) });
843
+ }
844
+ function BentoHeroBlock({ block }) {
845
+ const d = getData(block);
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";
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: [
852
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `max-w-3xl ${mx} mb-12`, children: [
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 }),
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: [
857
+ d.primaryButton && /* @__PURE__ */ jsxRuntime.jsx(
858
+ "a",
859
+ {
860
+ href: d.primaryUrl || "#",
861
+ 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",
862
+ children: d.primaryButton
863
+ }
864
+ ),
865
+ d.secondaryButton && /* @__PURE__ */ jsxRuntime.jsx(
866
+ "a",
867
+ {
868
+ href: d.secondaryUrl || "#",
869
+ 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",
870
+ children: d.secondaryButton
871
+ }
872
+ )
873
+ ] })
874
+ ] }),
875
+ cards.length > 0 && /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs(
876
+ "div",
877
+ {
878
+ 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" : ""}`,
879
+ style: { background: card.background || "var(--muted)" },
880
+ children: [
881
+ card.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-2xl", role: "img", "aria-label": card.title, children: card.icon }),
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" } }),
883
+ card.title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-sm", children: card.title }),
884
+ card.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground leading-relaxed", children: card.description })
885
+ ]
886
+ },
887
+ i
888
+ )) })
889
+ ] }) });
890
+ }
891
+ function MinimalHeroBlock({ block }) {
892
+ const d = getData(block);
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: [
902
+ d.primaryButton && /* @__PURE__ */ jsxRuntime.jsxs(
903
+ "a",
904
+ {
905
+ href: d.primaryUrl || "#",
906
+ className: "inline-flex items-center gap-2 text-sm font-semibold underline underline-offset-4 hover:text-primary transition-colors",
907
+ children: [
908
+ d.primaryButton,
909
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12h14M12 5l7 7-7 7" }) })
910
+ ]
911
+ }
912
+ ),
913
+ d.secondaryButton && /* @__PURE__ */ jsxRuntime.jsx(
914
+ "a",
915
+ {
916
+ href: d.secondaryUrl || "#",
917
+ className: "inline-flex items-center text-sm text-muted-foreground hover:text-foreground transition-colors",
918
+ children: d.secondaryButton
919
+ }
920
+ )
921
+ ] })
922
+ ] }) });
923
+ }
746
924
  function SplitHeroBlock({ block }) {
747
925
  const d = getData(block);
748
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";
749
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: [
750
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-5", children: [
751
- d.title && /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl md:text-5xl font-extrabold tracking-tight text-balance leading-tight", children: d.title }),
752
- d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg text-muted-foreground leading-relaxed text-pretty", children: d.subtitle }),
753
- (d.button || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-3 pt-2", children: [
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: [
754
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 }),
755
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 })
756
937
  ] })
757
938
  ] }),
758
- /* @__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" }) }) })
759
940
  ] }) });
760
941
  }
761
942
  function AccordionBlock({ block }) {
@@ -1003,6 +1184,10 @@ var BUILT_IN = {
1003
1184
  "pricing-table": (b) => /* @__PURE__ */ jsxRuntime.jsx(PricingTableBlock, { block: b }),
1004
1185
  hero: (b) => /* @__PURE__ */ jsxRuntime.jsx(HeroBlock, { block: b }),
1005
1186
  "hero-section": (b) => /* @__PURE__ */ jsxRuntime.jsx(HeroBlock, { block: b }),
1187
+ "centered-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(CenteredHeroBlock, { block: b }),
1188
+ "product-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(ProductHeroBlock, { block: b }),
1189
+ "bento-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(BentoHeroBlock, { block: b }),
1190
+ "minimal-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(MinimalHeroBlock, { block: b }),
1006
1191
  cta: (b) => /* @__PURE__ */ jsxRuntime.jsx(CTABlock, { block: b }),
1007
1192
  faq: (b) => /* @__PURE__ */ jsxRuntime.jsx(FAQBlock, { block: b }),
1008
1193
  "team-member": (b) => /* @__PURE__ */ jsxRuntime.jsx(TeamMemberBlock, { block: b }),