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