@sprintup-cms/sdk 1.8.32 → 1.8.38

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.
@@ -387,6 +387,24 @@ function FAQBlock({ block }) {
387
387
  ] }, i)) })
388
388
  ] });
389
389
  }
390
+ function TeamMemberBlock({ block }) {
391
+ const d = getData(block);
392
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row items-center sm:items-start gap-4 p-6 rounded-xl border border-border bg-card", children: [
393
+ d.avatar ? /* @__PURE__ */ jsx(
394
+ "img",
395
+ {
396
+ src: d.avatar,
397
+ alt: d.name || "Team member",
398
+ className: "w-20 h-20 rounded-full object-cover border-2 border-border flex-shrink-0"
399
+ }
400
+ ) : /* @__PURE__ */ jsx("div", { className: "w-20 h-20 rounded-full bg-muted flex items-center justify-center text-muted-foreground text-2xl font-semibold flex-shrink-0", children: (d.name || "T").charAt(0).toUpperCase() }),
401
+ /* @__PURE__ */ jsxs("div", { className: "text-center sm:text-left", children: [
402
+ d.name && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-lg", children: d.name }),
403
+ d.role && /* @__PURE__ */ jsx("p", { className: "text-sm text-primary font-medium", children: d.role }),
404
+ d.bio && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-2 leading-relaxed", children: d.bio })
405
+ ] })
406
+ ] });
407
+ }
390
408
  function StatsBlock({ block }) {
391
409
  const d = getData(block);
392
410
  const items = d.items || d.stats || [];
@@ -586,6 +604,147 @@ function SectionBlock({ block, pageType }) {
586
604
  ([key, value]) => isHtml(value) ? /* @__PURE__ */ jsx("div", { className: "prose prose-neutral dark:prose-invert max-w-none", dangerouslySetInnerHTML: { __html: String(value) } }, key) : /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: String(value) }, key)
587
605
  ) });
588
606
  }
607
+ var FEATURE_ICONS = {
608
+ zap: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "w-5 h-5", children: /* @__PURE__ */ jsx("polygon", { points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2" }) }),
609
+ shield: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "w-5 h-5", children: /* @__PURE__ */ jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }) }),
610
+ star: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "w-5 h-5", children: /* @__PURE__ */ jsx("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }) }),
611
+ check: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "w-5 h-5", children: /* @__PURE__ */ jsx("polyline", { points: "20 6 9 17 4 12" }) }),
612
+ lock: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "w-5 h-5", children: [
613
+ /* @__PURE__ */ jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }),
614
+ /* @__PURE__ */ jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
615
+ ] }),
616
+ globe: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "w-5 h-5", children: [
617
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
618
+ /* @__PURE__ */ jsx("line", { x1: "2", y1: "12", x2: "22", y2: "12" }),
619
+ /* @__PURE__ */ jsx("path", { d: "M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" })
620
+ ] }),
621
+ clock: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "w-5 h-5", children: [
622
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
623
+ /* @__PURE__ */ jsx("polyline", { points: "12 6 12 12 16 14" })
624
+ ] }),
625
+ heart: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "w-5 h-5", children: /* @__PURE__ */ jsx("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" }) }),
626
+ settings: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "w-5 h-5", children: [
627
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "3" }),
628
+ /* @__PURE__ */ jsx("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" })
629
+ ] }),
630
+ users: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "w-5 h-5", children: [
631
+ /* @__PURE__ */ jsx("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
632
+ /* @__PURE__ */ jsx("circle", { cx: "9", cy: "7", r: "4" }),
633
+ /* @__PURE__ */ jsx("path", { d: "M23 21v-2a4 4 0 0 0-3-3.87" }),
634
+ /* @__PURE__ */ jsx("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
635
+ ] }),
636
+ trending: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "w-5 h-5", children: [
637
+ /* @__PURE__ */ jsx("polyline", { points: "23 6 13.5 15.5 8.5 10.5 1 18" }),
638
+ /* @__PURE__ */ jsx("polyline", { points: "17 6 23 6 23 12" })
639
+ ] })
640
+ };
641
+ function CardGridBlock({ block }) {
642
+ const d = getData(block);
643
+ const cards = Array.isArray(d.cards) ? d.cards : [];
644
+ const cols = Number(d.columns) || 3;
645
+ 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";
646
+ return /* @__PURE__ */ jsx("section", { className: "py-12", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto px-4", children: [
647
+ d.title && /* @__PURE__ */ jsx("h2", { className: "text-2xl md:text-3xl font-bold tracking-tight text-center text-balance mb-8", children: d.title }),
648
+ 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: [
649
+ card.image && /* @__PURE__ */ jsx("div", { className: "aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ jsx(
650
+ "img",
651
+ {
652
+ src: card.image,
653
+ alt: card.title || "",
654
+ className: "w-full h-full object-cover",
655
+ onError: (e) => {
656
+ e.target.style.display = "none";
657
+ }
658
+ }
659
+ ) }),
660
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 p-5 gap-2", children: [
661
+ card.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-base", children: card.title }),
662
+ card.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground leading-relaxed flex-1", children: card.description }),
663
+ card.link && /* @__PURE__ */ jsxs("a", { href: card.link, className: "inline-flex items-center text-sm font-medium text-primary hover:underline mt-2", children: [
664
+ card.linkText || "Learn more",
665
+ " \u2192"
666
+ ] })
667
+ ] })
668
+ ] }, i)) })
669
+ ] }) });
670
+ }
671
+ function TimelineBlock({ block }) {
672
+ const d = getData(block);
673
+ const items = Array.isArray(d.items) ? d.items : [];
674
+ return /* @__PURE__ */ jsx("section", { className: "py-12", children: /* @__PURE__ */ jsxs("div", { className: "max-w-3xl mx-auto px-4", children: [
675
+ (d.title || d.subtitle) && /* @__PURE__ */ jsxs("div", { className: "text-center mb-10", children: [
676
+ d.title && /* @__PURE__ */ jsx("h2", { className: "text-2xl md:text-3xl font-bold tracking-tight text-balance", children: d.title }),
677
+ d.subtitle && /* @__PURE__ */ jsx("p", { className: "mt-2 text-muted-foreground text-pretty", children: d.subtitle })
678
+ ] }),
679
+ items.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-center text-sm text-muted-foreground", children: "No timeline items added yet." }) : /* @__PURE__ */ jsxs("div", { className: "relative", children: [
680
+ /* @__PURE__ */ jsx("div", { className: "absolute left-6 top-0 bottom-0 w-px bg-border", "aria-hidden": "true" }),
681
+ /* @__PURE__ */ jsx("div", { className: "space-y-8", children: items.map((item, i) => /* @__PURE__ */ jsxs("div", { className: "relative flex gap-6", children: [
682
+ /* @__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 }),
683
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 pb-2 pt-1", children: [
684
+ item.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-base", children: item.title }),
685
+ item.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1 leading-relaxed", children: item.description })
686
+ ] })
687
+ ] }, i)) })
688
+ ] })
689
+ ] }) });
690
+ }
691
+ function PricingCardBlock({ block }) {
692
+ const d = getData(block);
693
+ const features = Array.isArray(d.features) ? d.features : [];
694
+ const featured = Boolean(d.featured);
695
+ 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: [
696
+ 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" }),
697
+ /* @__PURE__ */ jsxs("div", { className: "mb-6", children: [
698
+ d.name && /* @__PURE__ */ jsx("h3", { className: `text-xl font-bold ${featured ? "text-primary-foreground" : ""}`, children: d.name }),
699
+ /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-end gap-1", children: [
700
+ d.price && /* @__PURE__ */ jsx("span", { className: `text-4xl font-extrabold tracking-tight ${featured ? "text-primary-foreground" : ""}`, children: d.price }),
701
+ d.period && /* @__PURE__ */ jsx("span", { className: `text-sm mb-1 ${featured ? "text-primary-foreground/70" : "text-muted-foreground"}`, children: d.period })
702
+ ] })
703
+ ] }),
704
+ 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: [
705
+ /* @__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" }) }),
706
+ /* @__PURE__ */ jsx("span", { className: featured ? "text-primary-foreground/90" : "", children: feat })
707
+ ] }, i)) }),
708
+ d.button && /* @__PURE__ */ jsx(
709
+ "a",
710
+ {
711
+ href: d.url || "#",
712
+ 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"}`,
713
+ children: d.button
714
+ }
715
+ )
716
+ ] });
717
+ }
718
+ function IconFeatureBlock({ block }) {
719
+ const d = getData(block);
720
+ const iconKey = (d.icon || "zap").toLowerCase();
721
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4 p-6 rounded-xl border border-border bg-card", children: [
722
+ /* @__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" }) }) }),
723
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
724
+ d.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-base", children: d.title }),
725
+ d.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1 leading-relaxed", children: d.description })
726
+ ] })
727
+ ] });
728
+ }
729
+ function FeatureGridBlock({ block }) {
730
+ const d = getData(block);
731
+ const features = Array.isArray(d.features) ? d.features : [];
732
+ const cols = Number(d.columns) || 3;
733
+ 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";
734
+ return /* @__PURE__ */ jsx("section", { className: "py-12", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto px-4", children: [
735
+ (d.title || d.subtitle) && /* @__PURE__ */ jsxs("div", { className: "text-center mb-10", children: [
736
+ d.title && /* @__PURE__ */ jsx("h2", { className: "text-2xl md:text-3xl font-bold tracking-tight text-balance", children: d.title }),
737
+ d.subtitle && /* @__PURE__ */ jsx("p", { className: "mt-2 text-muted-foreground text-pretty", children: d.subtitle })
738
+ ] }),
739
+ 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: [
740
+ 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" }) }) }),
741
+ /* @__PURE__ */ jsxs("div", { children: [
742
+ feat.title && /* @__PURE__ */ jsx("h3", { className: "font-semibold text-base", children: feat.title }),
743
+ feat.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1 leading-relaxed", children: feat.description })
744
+ ] })
745
+ ] }, i)) })
746
+ ] }) });
747
+ }
589
748
  function TwoColumnBlock({ block }) {
590
749
  const d = getData(block);
591
750
  const imagePos = d.imagePosition === "left" ? "flex-row-reverse" : "flex-row";
@@ -625,6 +784,7 @@ var BUILT_IN = {
625
784
  "hero-section": (b) => /* @__PURE__ */ jsx(HeroBlock, { block: b }),
626
785
  cta: (b) => /* @__PURE__ */ jsx(CTABlock, { block: b }),
627
786
  faq: (b) => /* @__PURE__ */ jsx(FAQBlock, { block: b }),
787
+ "team-member": (b) => /* @__PURE__ */ jsx(TeamMemberBlock, { block: b }),
628
788
  stats: (b) => /* @__PURE__ */ jsx(StatsBlock, { block: b }),
629
789
  testimonial: (b) => /* @__PURE__ */ jsx(TestimonialBlock, { block: b }),
630
790
  quote: (b) => /* @__PURE__ */ jsx(QuoteBlock, { block: b }),
@@ -632,12 +792,19 @@ var BUILT_IN = {
632
792
  divider: () => /* @__PURE__ */ jsx(DividerBlock, {}),
633
793
  spacer: (b) => /* @__PURE__ */ jsx(SpacerBlock, { block: b }),
634
794
  video: (b) => /* @__PURE__ */ jsx(VideoBlock, { block: b }),
795
+ "card-grid": (b) => /* @__PURE__ */ jsx(CardGridBlock, { block: b }),
796
+ timeline: (b) => /* @__PURE__ */ jsx(TimelineBlock, { block: b }),
797
+ "pricing-card": (b) => /* @__PURE__ */ jsx(PricingCardBlock, { block: b }),
798
+ "icon-feature": (b) => /* @__PURE__ */ jsx(IconFeatureBlock, { block: b }),
799
+ "feature-grid": (b) => /* @__PURE__ */ jsx(FeatureGridBlock, { block: b }),
635
800
  "two-column": (b) => /* @__PURE__ */ jsx(TwoColumnBlock, { block: b }),
636
801
  "product-list": (b) => /* @__PURE__ */ jsx(ProductListBlock, { block: b })
637
802
  };
638
803
  function CMSBlocks({ blocks, pageType, className = "", custom = {} }) {
639
804
  if (!blocks?.length) return null;
805
+ console.log("[v0] CMSBlocks received blocks:", blocks.map((b) => ({ id: b.id, type: b.type, hasData: !!b.data, hasContent: !!b.content, dataKeys: Object.keys(b.data ?? b.content ?? {}) })));
640
806
  return /* @__PURE__ */ jsx("div", { className: `space-y-8 ${className}`, children: blocks.map((block) => {
807
+ console.log("[v0] rendering block type:", block.type, "inBuiltIn:", !!BUILT_IN[block.type]);
641
808
  if (custom[block.type]) return /* @__PURE__ */ jsx(React.Fragment, { children: custom[block.type](block) }, block.id);
642
809
  if (BUILT_IN[block.type]) return /* @__PURE__ */ jsx(React.Fragment, { children: BUILT_IN[block.type](block, pageType) }, block.id);
643
810
  return /* @__PURE__ */ jsx(SectionBlock, { block, pageType }, block.id);