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