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