@sprintup-cms/sdk 1.9.9 → 1.10.3

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.
@@ -743,36 +743,6 @@ function CarouselBlock({ block }) {
743
743
  d.showDots !== false && slides.length > 1 && /* @__PURE__ */ jsx("div", { className: "absolute bottom-3 left-1/2 -translate-x-1/2 flex gap-1.5", children: slides.map((_, i) => /* @__PURE__ */ jsx("button", { onClick: () => setCurrent(i), className: `w-2 h-2 rounded-full transition-colors ${i === current ? "bg-white" : "bg-white/40"}`, "aria-label": `Slide ${i + 1}` }, i)) })
744
744
  ] });
745
745
  }
746
- function CardGridBlock({ block }) {
747
- const d = getData(block);
748
- const cards = Array.isArray(d.cards) ? d.cards : [];
749
- const cols = Number(d.columns) || 3;
750
- const gridCols = cols === 2 ? "sm:grid-cols-2" : cols === 4 ? "sm:grid-cols-2 lg:grid-cols-4" : "sm:grid-cols-2 lg:grid-cols-3";
751
- return /* @__PURE__ */ jsx("section", { className: "py-12", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto px-4", children: [
752
- d.title && /* @__PURE__ */ jsx("h2", { className: "text-2xl md:text-3xl font-bold tracking-tight text-center text-balance mb-8", children: d.title }),
753
- cards.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-center text-sm text-muted-foreground", children: "No cards added yet." }) : /* @__PURE__ */ jsx("div", { className: `grid grid-cols-1 gap-6 ${gridCols}`, children: cards.map((card, i) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col rounded-xl border border-border bg-card overflow-hidden hover:shadow-md transition-shadow", children: [
754
- card.image && /* @__PURE__ */ jsx("div", { className: "aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ jsx(
755
- "img",
756
- {
757
- src: card.image,
758
- alt: card.title || "",
759
- className: "w-full h-full object-cover",
760
- onError: (e) => {
761
- e.target.style.display = "none";
762
- }
763
- }
764
- ) }),
765
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 p-5 gap-2", children: [
766
- card.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-base", children: card.title }),
767
- card.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground leading-relaxed flex-1", children: card.description }),
768
- card.link && /* @__PURE__ */ jsxs("a", { href: card.link, className: "inline-flex items-center text-sm font-medium text-primary hover:underline mt-2", children: [
769
- card.linkText || "Learn more",
770
- " \u2192"
771
- ] })
772
- ] })
773
- ] }, i)) })
774
- ] }) });
775
- }
776
746
  function TimelineBlock({ block }) {
777
747
  const d = getData(block);
778
748
  const items = Array.isArray(d.items) ? d.items : [];
@@ -787,39 +757,12 @@ function TimelineBlock({ block }) {
787
757
  /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-12 h-12 rounded-full bg-primary text-primary-foreground flex items-center justify-center text-xs font-bold z-10 ring-4 ring-background", children: item.year || i + 1 }),
788
758
  /* @__PURE__ */ jsxs("div", { className: "flex-1 pb-2 pt-1", children: [
789
759
  item.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-base", children: item.title }),
790
- item.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1 leading-relaxed", children: item.description })
760
+ item.description && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground mt-1 leading-relaxed prose prose-sm max-w-none", dangerouslySetInnerHTML: { __html: item.description } })
791
761
  ] })
792
762
  ] }, i)) })
793
763
  ] })
794
764
  ] }) });
795
765
  }
796
- function PricingCardBlock({ block }) {
797
- const d = getData(block);
798
- const features = Array.isArray(d.features) ? d.features : [];
799
- const featured = Boolean(d.featured);
800
- return /* @__PURE__ */ jsxs("div", { className: `relative flex flex-col rounded-2xl border p-8 ${featured ? "border-primary bg-primary text-primary-foreground shadow-xl scale-105" : "border-border bg-card"}`, children: [
801
- featured && /* @__PURE__ */ jsx("span", { className: "absolute -top-3 left-1/2 -translate-x-1/2 px-3 py-1 rounded-full bg-primary-foreground text-primary text-xs font-semibold", children: "Most Popular" }),
802
- /* @__PURE__ */ jsxs("div", { className: "mb-6", children: [
803
- d.name && /* @__PURE__ */ jsx("h3", { className: `text-xl font-bold ${featured ? "text-primary-foreground" : ""}`, children: d.name }),
804
- /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-end gap-1", children: [
805
- d.price && /* @__PURE__ */ jsx("span", { className: `text-4xl font-extrabold tracking-tight ${featured ? "text-primary-foreground" : ""}`, children: d.price }),
806
- d.period && /* @__PURE__ */ jsx("span", { className: `text-sm mb-1 ${featured ? "text-primary-foreground/70" : "text-muted-foreground"}`, children: d.period })
807
- ] })
808
- ] }),
809
- features.length > 0 && /* @__PURE__ */ jsx("ul", { className: "space-y-3 flex-1 mb-8", children: features.map((feat, i) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-2 text-sm", children: [
810
- /* @__PURE__ */ jsx("svg", { className: `w-4 h-4 flex-shrink-0 ${featured ? "text-primary-foreground" : "text-primary"}`, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("polyline", { points: "20 6 9 17 4 12" }) }),
811
- /* @__PURE__ */ jsx("span", { className: featured ? "text-primary-foreground/90" : "", children: feat })
812
- ] }, i)) }),
813
- d.button && /* @__PURE__ */ jsx(
814
- "a",
815
- {
816
- href: d.url || "#",
817
- className: `block text-center py-2.5 px-6 rounded-lg font-semibold text-sm transition-opacity hover:opacity-90 ${featured ? "bg-primary-foreground text-primary" : "bg-primary text-primary-foreground"}`,
818
- children: d.button
819
- }
820
- )
821
- ] });
822
- }
823
766
  function IconFeatureBlock({ block }) {
824
767
  const d = getData(block);
825
768
  const iconKey = (d.icon || "zap").toLowerCase();
@@ -827,7 +770,7 @@ function IconFeatureBlock({ block }) {
827
770
  /* @__PURE__ */ jsx("div", { className: "w-12 h-12 rounded-lg bg-primary/10 text-primary flex items-center justify-center flex-shrink-0", children: FEATURE_ICONS[iconKey] ?? /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: "w-6 h-6", children: /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }) }) }),
828
771
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
829
772
  d.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-base", children: d.title }),
830
- d.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1 leading-relaxed", children: d.description })
773
+ d.description && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground mt-1 leading-relaxed prose prose-sm max-w-none", dangerouslySetInnerHTML: { __html: d.description } })
831
774
  ] })
832
775
  ] });
833
776
  }
@@ -835,47 +778,50 @@ function FeatureGridBlock({ block }) {
835
778
  const d = getData(block);
836
779
  const features = Array.isArray(d.features) ? d.features : [];
837
780
  const cols = Number(d.columns) || 3;
838
- const gridCols = cols === 2 ? "sm:grid-cols-2" : cols === 4 ? "sm:grid-cols-2 lg:grid-cols-4" : "sm:grid-cols-2 lg:grid-cols-3";
839
781
  return /* @__PURE__ */ jsx("section", { className: "py-12", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto px-4", children: [
840
782
  (d.title || d.subtitle) && /* @__PURE__ */ jsxs("div", { className: "text-center mb-10", children: [
841
783
  d.title && /* @__PURE__ */ jsx("h2", { className: "text-2xl md:text-3xl font-bold tracking-tight text-balance", children: d.title }),
842
784
  d.subtitle && /* @__PURE__ */ jsx("p", { className: "mt-2 text-muted-foreground text-pretty", children: d.subtitle })
843
785
  ] }),
844
- features.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-center text-sm text-muted-foreground", children: "No features added yet." }) : /* @__PURE__ */ jsx("div", { className: `grid grid-cols-1 gap-6 ${gridCols}`, children: features.map((feat, i) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 p-6 rounded-xl border border-border bg-card hover:shadow-md transition-shadow", children: [
845
- feat.icon && /* @__PURE__ */ jsx("div", { className: "w-10 h-10 rounded-lg bg-primary/10 text-primary flex items-center justify-center flex-shrink-0", children: FEATURE_ICONS[feat.icon] ?? /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: "w-5 h-5", children: /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }) }) }),
846
- /* @__PURE__ */ jsxs("div", { children: [
847
- feat.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-base", children: feat.title }),
848
- feat.description && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground mt-1 leading-relaxed prose prose-sm max-w-none", dangerouslySetInnerHTML: { __html: feat.description } })
849
- ] })
850
- ] }, i)) })
786
+ features.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-center text-sm text-muted-foreground", children: "No features added yet." }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-6", style: { gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))` }, children: features.map((feat, i) => {
787
+ const iconKey = (feat.icon || "").toLowerCase();
788
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 p-6 rounded-xl border border-border bg-card hover:shadow-md transition-shadow", children: [
789
+ feat.icon && /* @__PURE__ */ jsx("div", { className: "w-10 h-10 rounded-lg bg-primary/10 text-primary flex items-center justify-center flex-shrink-0", children: FEATURE_ICONS[iconKey] ?? /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: "w-5 h-5", children: /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }) }) }),
790
+ /* @__PURE__ */ jsxs("div", { children: [
791
+ feat.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-base", children: feat.title }),
792
+ feat.description && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground mt-1 leading-relaxed prose prose-sm max-w-none", dangerouslySetInnerHTML: { __html: feat.description } })
793
+ ] })
794
+ ] }, i);
795
+ }) })
851
796
  ] }) });
852
797
  }
853
- function TwoColumnBlock({ block }) {
798
+ function CardGridBlock({ block }) {
854
799
  const d = getData(block);
855
- const imagePos = d.imagePosition === "left" ? "flex-row-reverse" : "flex-row";
856
- const hasImage = Boolean(d.image);
857
- return /* @__PURE__ */ jsx("section", { className: "py-10", children: /* @__PURE__ */ jsxs("div", { className: `flex flex-col md:${imagePos} gap-8 md:gap-12 items-center`, children: [
858
- /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-4", children: [
859
- d.title && /* @__PURE__ */ jsx("h2", { className: "text-2xl md:text-3xl font-bold tracking-tight text-balance", children: d.title }),
860
- d.text && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground leading-relaxed text-pretty", children: d.text }),
861
- d.button && /* @__PURE__ */ jsx(
862
- "a",
800
+ const cards = Array.isArray(d.cards) ? d.cards : [];
801
+ const cols = Number(d.columns) || 3;
802
+ return /* @__PURE__ */ jsx("section", { className: "py-12", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto px-4", children: [
803
+ d.title && /* @__PURE__ */ jsx("h2", { className: "text-2xl md:text-3xl font-bold tracking-tight text-center text-balance mb-8", children: d.title }),
804
+ cards.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-center text-sm text-muted-foreground", children: "No cards added yet." }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-6", style: { gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))` }, children: cards.map((card, i) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col rounded-xl border border-border bg-card overflow-hidden hover:shadow-md transition-shadow", children: [
805
+ card.image && /* @__PURE__ */ jsx("div", { className: "aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ jsx(
806
+ "img",
863
807
  {
864
- href: d.buttonUrl || "#",
865
- className: "inline-flex items-center gap-2 px-5 py-2.5 rounded-lg bg-primary text-primary-foreground text-sm font-medium hover:opacity-90 transition-opacity",
866
- children: d.button
808
+ src: card.image,
809
+ alt: card.title || "",
810
+ className: "w-full h-full object-cover",
811
+ onError: (e) => {
812
+ e.target.style.display = "none";
813
+ }
867
814
  }
868
- )
869
- ] }),
870
- hasImage && /* @__PURE__ */ jsx("div", { className: "flex-1 w-full", children: /* @__PURE__ */ jsx(
871
- "img",
872
- {
873
- src: d.image,
874
- alt: d.title || "",
875
- className: "w-full rounded-xl object-cover border border-border shadow-sm"
876
- }
877
- ) }),
878
- !hasImage && /* @__PURE__ */ jsx("div", { className: "flex-1 w-full rounded-xl 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" }) })
815
+ ) }),
816
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 p-5 gap-2", children: [
817
+ card.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-base", children: card.title }),
818
+ card.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground leading-relaxed flex-1", children: card.description }),
819
+ card.link && /* @__PURE__ */ jsxs("a", { href: card.link, className: "inline-flex items-center text-sm font-medium text-primary hover:underline mt-2", children: [
820
+ card.linkText || "Learn more",
821
+ " \u2192"
822
+ ] })
823
+ ] })
824
+ ] }, i)) })
879
825
  ] }) });
880
826
  }
881
827
  function BentoGridBlock({ block }) {
@@ -896,13 +842,14 @@ function BentoGridBlock({ block }) {
896
842
  ] }),
897
843
  /* @__PURE__ */ jsx("div", { className: "grid grid-cols-4 gap-3", style: { gridAutoRows: "180px" }, children: items.map((item, i) => {
898
844
  const [cs, rs] = SPAN[item.size] ?? [1, 1];
845
+ const iconKey = (item.icon || "").toLowerCase();
899
846
  return /* @__PURE__ */ jsxs(
900
847
  "div",
901
848
  {
902
849
  style: { gridColumn: `span ${cs}`, gridRow: `span ${rs}` },
903
850
  className: "rounded-xl border border-border bg-card p-5 flex flex-col justify-between hover:bg-muted/40 transition-colors",
904
851
  children: [
905
- /* @__PURE__ */ jsx("div", { className: "w-8 h-8 rounded-lg bg-muted flex items-center justify-center mb-3", children: FEATURE_ICONS[item.icon] ?? /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: "w-4 h-4", children: /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }) }) }),
852
+ /* @__PURE__ */ jsx("div", { className: "w-8 h-8 rounded-lg bg-muted flex items-center justify-center mb-3", children: FEATURE_ICONS[iconKey] ?? /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: "w-4 h-4", children: /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }) }) }),
906
853
  /* @__PURE__ */ jsxs("div", { children: [
907
854
  /* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm", children: item.title }),
908
855
  item.description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mt-0.5 leading-relaxed", children: item.description })
@@ -957,10 +904,10 @@ var BUILT_IN = {
957
904
  video: (b) => /* @__PURE__ */ jsx(VideoBlock, { block: b }),
958
905
  "card-grid": (b) => /* @__PURE__ */ jsx(CardGridBlock, { block: b }),
959
906
  timeline: (b) => /* @__PURE__ */ jsx(TimelineBlock, { block: b }),
960
- "pricing-card": (b) => /* @__PURE__ */ jsx(PricingCardBlock, { block: b }),
907
+ "pricing-card": (b) => /* @__PURE__ */ jsx(PricingTableBlock, { block: b }),
961
908
  "icon-feature": (b) => /* @__PURE__ */ jsx(IconFeatureBlock, { block: b }),
962
909
  "feature-grid": (b) => /* @__PURE__ */ jsx(FeatureGridBlock, { block: b }),
963
- "two-column": (b) => /* @__PURE__ */ jsx(TwoColumnBlock, { block: b }),
910
+ "two-column": (b) => /* @__PURE__ */ jsx(ColumnsBlock, { block: b }),
964
911
  "split-hero": (b) => /* @__PURE__ */ jsx(SplitHeroBlock, { block: b }),
965
912
  accordion: (b) => /* @__PURE__ */ jsx(AccordionBlock, { block: b }),
966
913
  tabs: (b) => /* @__PURE__ */ jsx(TabsBlock, { block: b }),