@sprintup-cms/sdk 1.9.8 → 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 +41 -94
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.js +41 -94
- package/dist/next/index.js.map +1 -1
- package/dist/react/index.cjs +41 -94
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +41 -94
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/next/index.js
CHANGED
|
@@ -925,7 +925,7 @@ function BentoHeroBlock({ block }) {
|
|
|
925
925
|
)
|
|
926
926
|
] })
|
|
927
927
|
] }),
|
|
928
|
-
cards.length > 0 && /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4", style: { gridAutoRows: "
|
|
928
|
+
cards.length > 0 && /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4", style: { gridAutoRows: "180px" }, children: cards.map((card, i) => {
|
|
929
929
|
const colSpan = card.featured ? 2 : 1;
|
|
930
930
|
const rowSpan = card.rows || 1;
|
|
931
931
|
return /* @__PURE__ */ jsxs(
|
|
@@ -1093,36 +1093,6 @@ function CarouselBlock({ block }) {
|
|
|
1093
1093
|
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)) })
|
|
1094
1094
|
] });
|
|
1095
1095
|
}
|
|
1096
|
-
function CardGridBlock({ block }) {
|
|
1097
|
-
const d = getData(block);
|
|
1098
|
-
const cards = Array.isArray(d.cards) ? d.cards : [];
|
|
1099
|
-
const cols = Number(d.columns) || 3;
|
|
1100
|
-
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";
|
|
1101
|
-
return /* @__PURE__ */ jsx("section", { className: "py-12", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto px-4", children: [
|
|
1102
|
-
d.title && /* @__PURE__ */ jsx("h2", { className: "text-2xl md:text-3xl font-bold tracking-tight text-center text-balance mb-8", children: d.title }),
|
|
1103
|
-
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: [
|
|
1104
|
-
card.image && /* @__PURE__ */ jsx("div", { className: "aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ jsx(
|
|
1105
|
-
"img",
|
|
1106
|
-
{
|
|
1107
|
-
src: card.image,
|
|
1108
|
-
alt: card.title || "",
|
|
1109
|
-
className: "w-full h-full object-cover",
|
|
1110
|
-
onError: (e) => {
|
|
1111
|
-
e.target.style.display = "none";
|
|
1112
|
-
}
|
|
1113
|
-
}
|
|
1114
|
-
) }),
|
|
1115
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 p-5 gap-2", children: [
|
|
1116
|
-
card.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-base", children: card.title }),
|
|
1117
|
-
card.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground leading-relaxed flex-1", children: card.description }),
|
|
1118
|
-
card.link && /* @__PURE__ */ jsxs("a", { href: card.link, className: "inline-flex items-center text-sm font-medium text-primary hover:underline mt-2", children: [
|
|
1119
|
-
card.linkText || "Learn more",
|
|
1120
|
-
" \u2192"
|
|
1121
|
-
] })
|
|
1122
|
-
] })
|
|
1123
|
-
] }, i)) })
|
|
1124
|
-
] }) });
|
|
1125
|
-
}
|
|
1126
1096
|
function TimelineBlock({ block }) {
|
|
1127
1097
|
const d = getData(block);
|
|
1128
1098
|
const items = Array.isArray(d.items) ? d.items : [];
|
|
@@ -1137,39 +1107,12 @@ function TimelineBlock({ block }) {
|
|
|
1137
1107
|
/* @__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 }),
|
|
1138
1108
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 pb-2 pt-1", children: [
|
|
1139
1109
|
item.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-base", children: item.title }),
|
|
1140
|
-
item.description && /* @__PURE__ */ jsx("
|
|
1110
|
+
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 } })
|
|
1141
1111
|
] })
|
|
1142
1112
|
] }, i)) })
|
|
1143
1113
|
] })
|
|
1144
1114
|
] }) });
|
|
1145
1115
|
}
|
|
1146
|
-
function PricingCardBlock({ block }) {
|
|
1147
|
-
const d = getData(block);
|
|
1148
|
-
const features = Array.isArray(d.features) ? d.features : [];
|
|
1149
|
-
const featured = Boolean(d.featured);
|
|
1150
|
-
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: [
|
|
1151
|
-
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" }),
|
|
1152
|
-
/* @__PURE__ */ jsxs("div", { className: "mb-6", children: [
|
|
1153
|
-
d.name && /* @__PURE__ */ jsx("h3", { className: `text-xl font-bold ${featured ? "text-primary-foreground" : ""}`, children: d.name }),
|
|
1154
|
-
/* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-end gap-1", children: [
|
|
1155
|
-
d.price && /* @__PURE__ */ jsx("span", { className: `text-4xl font-extrabold tracking-tight ${featured ? "text-primary-foreground" : ""}`, children: d.price }),
|
|
1156
|
-
d.period && /* @__PURE__ */ jsx("span", { className: `text-sm mb-1 ${featured ? "text-primary-foreground/70" : "text-muted-foreground"}`, children: d.period })
|
|
1157
|
-
] })
|
|
1158
|
-
] }),
|
|
1159
|
-
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: [
|
|
1160
|
-
/* @__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" }) }),
|
|
1161
|
-
/* @__PURE__ */ jsx("span", { className: featured ? "text-primary-foreground/90" : "", children: feat })
|
|
1162
|
-
] }, i)) }),
|
|
1163
|
-
d.button && /* @__PURE__ */ jsx(
|
|
1164
|
-
"a",
|
|
1165
|
-
{
|
|
1166
|
-
href: d.url || "#",
|
|
1167
|
-
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"}`,
|
|
1168
|
-
children: d.button
|
|
1169
|
-
}
|
|
1170
|
-
)
|
|
1171
|
-
] });
|
|
1172
|
-
}
|
|
1173
1116
|
function IconFeatureBlock({ block }) {
|
|
1174
1117
|
const d = getData(block);
|
|
1175
1118
|
const iconKey = (d.icon || "zap").toLowerCase();
|
|
@@ -1177,7 +1120,7 @@ function IconFeatureBlock({ block }) {
|
|
|
1177
1120
|
/* @__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" }) }) }),
|
|
1178
1121
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
1179
1122
|
d.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-base", children: d.title }),
|
|
1180
|
-
d.description && /* @__PURE__ */ jsx("
|
|
1123
|
+
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 } })
|
|
1181
1124
|
] })
|
|
1182
1125
|
] });
|
|
1183
1126
|
}
|
|
@@ -1185,47 +1128,50 @@ function FeatureGridBlock({ block }) {
|
|
|
1185
1128
|
const d = getData(block);
|
|
1186
1129
|
const features = Array.isArray(d.features) ? d.features : [];
|
|
1187
1130
|
const cols = Number(d.columns) || 3;
|
|
1188
|
-
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";
|
|
1189
1131
|
return /* @__PURE__ */ jsx("section", { className: "py-12", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto px-4", children: [
|
|
1190
1132
|
(d.title || d.subtitle) && /* @__PURE__ */ jsxs("div", { className: "text-center mb-10", children: [
|
|
1191
1133
|
d.title && /* @__PURE__ */ jsx("h2", { className: "text-2xl md:text-3xl font-bold tracking-tight text-balance", children: d.title }),
|
|
1192
1134
|
d.subtitle && /* @__PURE__ */ jsx("p", { className: "mt-2 text-muted-foreground text-pretty", children: d.subtitle })
|
|
1193
1135
|
] }),
|
|
1194
|
-
features.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-center text-sm text-muted-foreground", children: "No features added yet." }) : /* @__PURE__ */ jsx("div", { className:
|
|
1195
|
-
|
|
1196
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
1197
|
-
feat.
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1136
|
+
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) => {
|
|
1137
|
+
const iconKey = (feat.icon || "").toLowerCase();
|
|
1138
|
+
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: [
|
|
1139
|
+
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" }) }) }),
|
|
1140
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
1141
|
+
feat.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-base", children: feat.title }),
|
|
1142
|
+
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 } })
|
|
1143
|
+
] })
|
|
1144
|
+
] }, i);
|
|
1145
|
+
}) })
|
|
1201
1146
|
] }) });
|
|
1202
1147
|
}
|
|
1203
|
-
function
|
|
1148
|
+
function CardGridBlock({ block }) {
|
|
1204
1149
|
const d = getData(block);
|
|
1205
|
-
const
|
|
1206
|
-
const
|
|
1207
|
-
return /* @__PURE__ */ jsx("section", { className: "py-
|
|
1208
|
-
/* @__PURE__ */
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
"a",
|
|
1150
|
+
const cards = Array.isArray(d.cards) ? d.cards : [];
|
|
1151
|
+
const cols = Number(d.columns) || 3;
|
|
1152
|
+
return /* @__PURE__ */ jsx("section", { className: "py-12", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto px-4", children: [
|
|
1153
|
+
d.title && /* @__PURE__ */ jsx("h2", { className: "text-2xl md:text-3xl font-bold tracking-tight text-center text-balance mb-8", children: d.title }),
|
|
1154
|
+
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: [
|
|
1155
|
+
card.image && /* @__PURE__ */ jsx("div", { className: "aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ jsx(
|
|
1156
|
+
"img",
|
|
1213
1157
|
{
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1158
|
+
src: card.image,
|
|
1159
|
+
alt: card.title || "",
|
|
1160
|
+
className: "w-full h-full object-cover",
|
|
1161
|
+
onError: (e) => {
|
|
1162
|
+
e.target.style.display = "none";
|
|
1163
|
+
}
|
|
1217
1164
|
}
|
|
1218
|
-
)
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
}
|
|
1227
|
-
) })
|
|
1228
|
-
!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" }) })
|
|
1165
|
+
) }),
|
|
1166
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 p-5 gap-2", children: [
|
|
1167
|
+
card.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-base", children: card.title }),
|
|
1168
|
+
card.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground leading-relaxed flex-1", children: card.description }),
|
|
1169
|
+
card.link && /* @__PURE__ */ jsxs("a", { href: card.link, className: "inline-flex items-center text-sm font-medium text-primary hover:underline mt-2", children: [
|
|
1170
|
+
card.linkText || "Learn more",
|
|
1171
|
+
" \u2192"
|
|
1172
|
+
] })
|
|
1173
|
+
] })
|
|
1174
|
+
] }, i)) })
|
|
1229
1175
|
] }) });
|
|
1230
1176
|
}
|
|
1231
1177
|
function BentoGridBlock({ block }) {
|
|
@@ -1246,13 +1192,14 @@ function BentoGridBlock({ block }) {
|
|
|
1246
1192
|
] }),
|
|
1247
1193
|
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-4 gap-3", style: { gridAutoRows: "180px" }, children: items.map((item, i) => {
|
|
1248
1194
|
const [cs, rs] = SPAN[item.size] ?? [1, 1];
|
|
1195
|
+
const iconKey = (item.icon || "").toLowerCase();
|
|
1249
1196
|
return /* @__PURE__ */ jsxs(
|
|
1250
1197
|
"div",
|
|
1251
1198
|
{
|
|
1252
1199
|
style: { gridColumn: `span ${cs}`, gridRow: `span ${rs}` },
|
|
1253
1200
|
className: "rounded-xl border border-border bg-card p-5 flex flex-col justify-between hover:bg-muted/40 transition-colors",
|
|
1254
1201
|
children: [
|
|
1255
|
-
/* @__PURE__ */ jsx("div", { className: "w-8 h-8 rounded-lg bg-muted flex items-center justify-center mb-3", children: FEATURE_ICONS[
|
|
1202
|
+
/* @__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" }) }) }),
|
|
1256
1203
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
1257
1204
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm", children: item.title }),
|
|
1258
1205
|
item.description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mt-0.5 leading-relaxed", children: item.description })
|
|
@@ -1307,10 +1254,10 @@ var BUILT_IN = {
|
|
|
1307
1254
|
video: (b) => /* @__PURE__ */ jsx(VideoBlock, { block: b }),
|
|
1308
1255
|
"card-grid": (b) => /* @__PURE__ */ jsx(CardGridBlock, { block: b }),
|
|
1309
1256
|
timeline: (b) => /* @__PURE__ */ jsx(TimelineBlock, { block: b }),
|
|
1310
|
-
"pricing-card": (b) => /* @__PURE__ */ jsx(
|
|
1257
|
+
"pricing-card": (b) => /* @__PURE__ */ jsx(PricingTableBlock, { block: b }),
|
|
1311
1258
|
"icon-feature": (b) => /* @__PURE__ */ jsx(IconFeatureBlock, { block: b }),
|
|
1312
1259
|
"feature-grid": (b) => /* @__PURE__ */ jsx(FeatureGridBlock, { block: b }),
|
|
1313
|
-
"two-column": (b) => /* @__PURE__ */ jsx(
|
|
1260
|
+
"two-column": (b) => /* @__PURE__ */ jsx(ColumnsBlock, { block: b }),
|
|
1314
1261
|
"split-hero": (b) => /* @__PURE__ */ jsx(SplitHeroBlock, { block: b }),
|
|
1315
1262
|
accordion: (b) => /* @__PURE__ */ jsx(AccordionBlock, { block: b }),
|
|
1316
1263
|
tabs: (b) => /* @__PURE__ */ jsx(TabsBlock, { block: b }),
|