@sprintup-cms/sdk 1.8.66 → 1.8.69

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 {
@@ -743,6 +739,233 @@ function PricingTableBlock({ block }) {
743
739
  }) })
744
740
  ] });
745
741
  }
742
+ function CenteredHeroBlock({ block }) {
743
+ const d = getData(block);
744
+ const hasBg = d.backgroundImage;
745
+ return /* @__PURE__ */ jsxRuntime.jsxs(
746
+ "section",
747
+ {
748
+ className: "relative flex flex-col items-center justify-center text-center py-24 px-6 overflow-hidden rounded-2xl",
749
+ style: hasBg ? { backgroundImage: `url(${d.backgroundImage})`, backgroundSize: "cover", backgroundPosition: "center" } : { background: d.backgroundColor || "var(--muted)" },
750
+ children: [
751
+ hasBg && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 rounded-2xl", style: { background: `rgba(0,0,0,${d.overlayOpacity ?? 0.45})` } }),
752
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative z-10 max-w-3xl mx-auto", children: [
753
+ 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 }),
754
+ /* @__PURE__ */ jsxRuntime.jsx(
755
+ "h1",
756
+ {
757
+ className: "text-4xl md:text-6xl font-extrabold tracking-tight mb-5 text-balance leading-tight",
758
+ style: { color: hasBg ? "#fff" : "var(--foreground)" },
759
+ children: d.title
760
+ }
761
+ ),
762
+ d.subtitle && /* @__PURE__ */ jsxRuntime.jsx(
763
+ "p",
764
+ {
765
+ className: "text-lg md:text-xl mb-8 max-w-2xl mx-auto text-pretty leading-relaxed",
766
+ style: { color: hasBg ? "rgba(255,255,255,0.8)" : "var(--muted-foreground)" },
767
+ children: d.subtitle
768
+ }
769
+ ),
770
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4 justify-center flex-wrap", children: [
771
+ d.primaryButton && /* @__PURE__ */ jsxRuntime.jsx(
772
+ "a",
773
+ {
774
+ href: d.primaryUrl || "#",
775
+ className: "inline-flex items-center px-8 py-3.5 rounded-xl font-semibold text-sm transition-opacity hover:opacity-90",
776
+ style: { background: d.buttonColor || "var(--primary)", color: d.buttonTextColor || "var(--primary-foreground)" },
777
+ children: d.primaryButton
778
+ }
779
+ ),
780
+ d.secondaryButton && /* @__PURE__ */ jsxRuntime.jsx(
781
+ "a",
782
+ {
783
+ href: d.secondaryUrl || "#",
784
+ className: "inline-flex items-center px-8 py-3.5 rounded-xl font-semibold text-sm border transition-colors hover:bg-white/10",
785
+ style: { borderColor: hasBg ? "rgba(255,255,255,0.4)" : "var(--border)", color: hasBg ? "#fff" : "var(--foreground)" },
786
+ children: d.secondaryButton
787
+ }
788
+ )
789
+ ] })
790
+ ] })
791
+ ]
792
+ }
793
+ );
794
+ }
795
+ function ProductHeroBlock({ block }) {
796
+ const d = getData(block);
797
+ 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: [
798
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center max-w-3xl mx-auto mb-12", children: [
799
+ 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 }),
800
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-4xl md:text-5xl font-extrabold tracking-tight mb-5 text-balance leading-tight", children: d.title }),
801
+ d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg text-muted-foreground leading-relaxed text-pretty mb-8", children: d.subtitle }),
802
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 justify-center flex-wrap", children: [
803
+ d.primaryButton && /* @__PURE__ */ jsxRuntime.jsx(
804
+ "a",
805
+ {
806
+ href: d.primaryUrl || "#",
807
+ 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",
808
+ children: d.primaryButton
809
+ }
810
+ ),
811
+ d.secondaryButton && /* @__PURE__ */ jsxRuntime.jsx(
812
+ "a",
813
+ {
814
+ href: d.secondaryUrl || "#",
815
+ 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",
816
+ children: d.secondaryButton
817
+ }
818
+ )
819
+ ] })
820
+ ] }),
821
+ d.image ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative rounded-2xl overflow-hidden border border-border shadow-2xl", children: [
822
+ 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: [
823
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-3 h-3 rounded-full bg-red-400" }),
824
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-3 h-3 rounded-full bg-amber-400" }),
825
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-3 h-3 rounded-full bg-emerald-400" }),
826
+ 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 })
827
+ ] }),
828
+ /* @__PURE__ */ jsxRuntime.jsx("img", { src: d.image, alt: d.title || "Product preview", className: "w-full object-cover" })
829
+ ] }) : /* @__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" }) }),
830
+ Array.isArray(d.trustedBy) && d.trustedBy.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-10 text-center", children: [
831
+ d.trustedByLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground uppercase tracking-widest mb-4 font-medium", children: d.trustedByLabel }),
832
+ /* @__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)) })
833
+ ] })
834
+ ] }) });
835
+ }
836
+ function BentoHeroBlock({ block }) {
837
+ const d = getData(block);
838
+ const cards = Array.isArray(d.cards) ? d.cards : [];
839
+ 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: [
840
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center max-w-3xl mx-auto mb-12", children: [
841
+ 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 }),
842
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-4xl md:text-5xl font-extrabold tracking-tight mb-4 text-balance", children: d.title }),
843
+ d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg text-muted-foreground leading-relaxed text-pretty", children: d.subtitle }),
844
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 justify-center flex-wrap mt-7", children: [
845
+ d.primaryButton && /* @__PURE__ */ jsxRuntime.jsx(
846
+ "a",
847
+ {
848
+ href: d.primaryUrl || "#",
849
+ 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",
850
+ children: d.primaryButton
851
+ }
852
+ ),
853
+ d.secondaryButton && /* @__PURE__ */ jsxRuntime.jsx(
854
+ "a",
855
+ {
856
+ href: d.secondaryUrl || "#",
857
+ 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",
858
+ children: d.secondaryButton
859
+ }
860
+ )
861
+ ] })
862
+ ] }),
863
+ 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(
864
+ "div",
865
+ {
866
+ 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" : ""}`,
867
+ style: { background: card.background || "var(--muted)" },
868
+ children: [
869
+ card.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-2xl", role: "img", "aria-label": card.title, children: card.icon }),
870
+ 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" } }),
871
+ card.title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-sm", children: card.title }),
872
+ card.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground leading-relaxed", children: card.description })
873
+ ]
874
+ },
875
+ i
876
+ )) })
877
+ ] }) });
878
+ }
879
+ function AnimatedHeroBlock({ block }) {
880
+ const d = getData(block);
881
+ const words = Array.isArray(d.animatedWords) && d.animatedWords.length > 0 ? d.animatedWords : ["Fast", "Simple", "Powerful"];
882
+ const [wordIndex, setWordIndex] = React__default.default.useState(0);
883
+ const [visible, setVisible] = React__default.default.useState(true);
884
+ React__default.default.useEffect(() => {
885
+ const interval = setInterval(() => {
886
+ setVisible(false);
887
+ setTimeout(() => {
888
+ setWordIndex((i) => (i + 1) % words.length);
889
+ setVisible(true);
890
+ }, 300);
891
+ }, d.interval || 2500);
892
+ return () => clearInterval(interval);
893
+ }, [words.length, d.interval]);
894
+ 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: [
895
+ 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 }),
896
+ /* @__PURE__ */ jsxRuntime.jsxs("h1", { className: "text-4xl md:text-6xl font-extrabold tracking-tight mb-3 text-balance leading-tight", children: [
897
+ d.titlePrefix && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
898
+ d.titlePrefix,
899
+ " "
900
+ ] }),
901
+ /* @__PURE__ */ jsxRuntime.jsx(
902
+ "span",
903
+ {
904
+ style: {
905
+ display: "inline-block",
906
+ color: "var(--primary)",
907
+ transition: "opacity 0.3s ease, transform 0.3s ease",
908
+ opacity: visible ? 1 : 0,
909
+ transform: visible ? "translateY(0)" : "translateY(-8px)"
910
+ },
911
+ children: words[wordIndex]
912
+ }
913
+ ),
914
+ d.titleSuffix && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
915
+ " ",
916
+ d.titleSuffix
917
+ ] })
918
+ ] }),
919
+ d.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg md:text-xl text-muted-foreground leading-relaxed mb-9 text-pretty", children: d.subtitle }),
920
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4 justify-center flex-wrap", children: [
921
+ d.primaryButton && /* @__PURE__ */ jsxRuntime.jsx(
922
+ "a",
923
+ {
924
+ href: d.primaryUrl || "#",
925
+ 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",
926
+ children: d.primaryButton
927
+ }
928
+ ),
929
+ d.secondaryButton && /* @__PURE__ */ jsxRuntime.jsx(
930
+ "a",
931
+ {
932
+ href: d.secondaryUrl || "#",
933
+ 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",
934
+ children: d.secondaryButton
935
+ }
936
+ )
937
+ ] })
938
+ ] }) });
939
+ }
940
+ function MinimalHeroBlock({ block }) {
941
+ const d = getData(block);
942
+ 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: [
943
+ d.eyebrow && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs uppercase tracking-[0.2em] font-semibold text-muted-foreground mb-5", children: d.eyebrow }),
944
+ /* @__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 }),
945
+ 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 }),
946
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4 flex-wrap items-center", children: [
947
+ d.primaryButton && /* @__PURE__ */ jsxRuntime.jsxs(
948
+ "a",
949
+ {
950
+ href: d.primaryUrl || "#",
951
+ className: "inline-flex items-center gap-2 text-sm font-semibold underline underline-offset-4 hover:text-primary transition-colors",
952
+ children: [
953
+ d.primaryButton,
954
+ /* @__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" }) })
955
+ ]
956
+ }
957
+ ),
958
+ d.secondaryButton && /* @__PURE__ */ jsxRuntime.jsx(
959
+ "a",
960
+ {
961
+ href: d.secondaryUrl || "#",
962
+ className: "inline-flex items-center text-sm text-muted-foreground hover:text-foreground transition-colors",
963
+ children: d.secondaryButton
964
+ }
965
+ )
966
+ ] })
967
+ ] }) });
968
+ }
746
969
  function SplitHeroBlock({ block }) {
747
970
  const d = getData(block);
748
971
  const imgLeft = d.imagePosition === "left";
@@ -1003,6 +1226,11 @@ var BUILT_IN = {
1003
1226
  "pricing-table": (b) => /* @__PURE__ */ jsxRuntime.jsx(PricingTableBlock, { block: b }),
1004
1227
  hero: (b) => /* @__PURE__ */ jsxRuntime.jsx(HeroBlock, { block: b }),
1005
1228
  "hero-section": (b) => /* @__PURE__ */ jsxRuntime.jsx(HeroBlock, { block: b }),
1229
+ "centered-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(CenteredHeroBlock, { block: b }),
1230
+ "product-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(ProductHeroBlock, { block: b }),
1231
+ "bento-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(BentoHeroBlock, { block: b }),
1232
+ "animated-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(AnimatedHeroBlock, { block: b }),
1233
+ "minimal-hero": (b) => /* @__PURE__ */ jsxRuntime.jsx(MinimalHeroBlock, { block: b }),
1006
1234
  cta: (b) => /* @__PURE__ */ jsxRuntime.jsx(CTABlock, { block: b }),
1007
1235
  faq: (b) => /* @__PURE__ */ jsxRuntime.jsx(FAQBlock, { block: b }),
1008
1236
  "team-member": (b) => /* @__PURE__ */ jsxRuntime.jsx(TeamMemberBlock, { block: b }),