@sprintup-cms/sdk 1.8.71 → 1.8.74

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.
@@ -1,6 +1,8 @@
1
1
  import { NextRequest, NextResponse } from 'next/server';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { Metadata } from 'next';
2
+ export { b as CMSCatchAllPage, C as CMSCatchAllParams, g as generateMetadata } from '../catch-all-CTLOY9lm.cjs';
3
+ import 'react/jsx-runtime';
4
+ import 'react';
5
+ import 'next';
4
6
 
5
7
  interface RevalidateHandlerOptions {
6
8
  /**
@@ -81,16 +83,6 @@ declare const GET: (request: Request) => Promise<NextResponse>;
81
83
  */
82
84
  declare function previewEntryGET(request: NextRequest): Promise<NextResponse>;
83
85
 
84
- interface CMSCatchAllParams {
85
- slug: string[];
86
- }
87
- declare function generateMetadata({ params }: {
88
- params: Promise<CMSCatchAllParams>;
89
- }): Promise<Metadata>;
90
- declare function CMSCatchAllPage({ params }: {
91
- params: Promise<CMSCatchAllParams>;
92
- }): Promise<react_jsx_runtime.JSX.Element>;
93
-
94
86
  /**
95
87
  * dynamicProxyGET — server-side proxy for dynamic block API calls.
96
88
  *
@@ -105,4 +97,4 @@ declare function CMSCatchAllPage({ params }: {
105
97
  */
106
98
  declare function dynamicProxyGET(req: NextRequest): Promise<NextResponse>;
107
99
 
108
- export { CMSCatchAllPage, type CMSCatchAllParams, GET, POST, createPreviewExitHandler, createRevalidateHandler, dynamicProxyGET, generateMetadata, previewEntryGET, GET as previewExitGET };
100
+ export { GET, POST, createPreviewExitHandler, createRevalidateHandler, dynamicProxyGET, previewEntryGET, GET as previewExitGET };
@@ -1,6 +1,8 @@
1
1
  import { NextRequest, NextResponse } from 'next/server';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { Metadata } from 'next';
2
+ export { b as CMSCatchAllPage, C as CMSCatchAllParams, g as generateMetadata } from '../catch-all-CTLOY9lm.js';
3
+ import 'react/jsx-runtime';
4
+ import 'react';
5
+ import 'next';
4
6
 
5
7
  interface RevalidateHandlerOptions {
6
8
  /**
@@ -81,16 +83,6 @@ declare const GET: (request: Request) => Promise<NextResponse>;
81
83
  */
82
84
  declare function previewEntryGET(request: NextRequest): Promise<NextResponse>;
83
85
 
84
- interface CMSCatchAllParams {
85
- slug: string[];
86
- }
87
- declare function generateMetadata({ params }: {
88
- params: Promise<CMSCatchAllParams>;
89
- }): Promise<Metadata>;
90
- declare function CMSCatchAllPage({ params }: {
91
- params: Promise<CMSCatchAllParams>;
92
- }): Promise<react_jsx_runtime.JSX.Element>;
93
-
94
86
  /**
95
87
  * dynamicProxyGET — server-side proxy for dynamic block API calls.
96
88
  *
@@ -105,4 +97,4 @@ declare function CMSCatchAllPage({ params }: {
105
97
  */
106
98
  declare function dynamicProxyGET(req: NextRequest): Promise<NextResponse>;
107
99
 
108
- export { CMSCatchAllPage, type CMSCatchAllParams, GET, POST, createPreviewExitHandler, createRevalidateHandler, dynamicProxyGET, generateMetadata, previewEntryGET, GET as previewExitGET };
100
+ export { GET, POST, createPreviewExitHandler, createRevalidateHandler, dynamicProxyGET, previewEntryGET, GET as previewExitGET };
@@ -353,7 +353,7 @@ function HeroBlock({ block }) {
353
353
  d.badge && /* @__PURE__ */ jsx("span", { className: `inline-block px-3 py-1 text-xs font-semibold rounded-full bg-secondary text-secondary-foreground mb-4`, children: d.badge }),
354
354
  /* @__PURE__ */ jsx("h1", { className: `text-4xl md:text-5xl font-bold tracking-tight mb-4 text-balance ${textAlign}`, children: d.title }),
355
355
  d.subtitle && /* @__PURE__ */ jsx("p", { className: `text-xl text-muted-foreground mb-8 ${textAlign}`, children: d.subtitle }),
356
- (d.primaryButton || d.cta) && /* @__PURE__ */ jsxs("div", { className: `flex gap-4 flex-wrap ${itemsAlign}`, children: [
356
+ (d.primaryButton || d.cta) && /* @__PURE__ */ jsxs("div", { className: `flex flex-wrap ${itemsAlign}`, style: { gap: "1rem" }, children: [
357
357
  (d.primaryButton || d.cta) && /* @__PURE__ */ jsx(
358
358
  "a",
359
359
  {
@@ -378,7 +378,7 @@ function CTABlock({ block }) {
378
378
  return /* @__PURE__ */ jsxs("section", { className: "py-12 px-8 rounded-xl bg-primary text-primary-foreground text-center", children: [
379
379
  /* @__PURE__ */ jsx("h2", { className: "text-2xl md:text-3xl font-bold mb-4", children: d.title }),
380
380
  d.subtitle && /* @__PURE__ */ jsx("p", { className: "text-primary-foreground/80 mb-6 max-w-2xl mx-auto", children: d.subtitle }),
381
- /* @__PURE__ */ jsxs("div", { className: "flex gap-4 justify-center flex-wrap", children: [
381
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-center flex-wrap", style: { gap: "1rem" }, children: [
382
382
  d.primaryButton && /* @__PURE__ */ jsx(
383
383
  "a",
384
384
  {
@@ -765,7 +765,7 @@ function CenteredHeroBlock({ block }) {
765
765
  children: d.subtitle
766
766
  }
767
767
  ),
768
- (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: "flex gap-4 justify-center flex-wrap", children: [
768
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: "flex justify-center flex-wrap", style: { gap: "1rem" }, children: [
769
769
  d.primaryButton && /* @__PURE__ */ jsx(
770
770
  "a",
771
771
  {
@@ -801,7 +801,7 @@ function ProductHeroBlock({ block }) {
801
801
  d.badge && /* @__PURE__ */ jsx("span", { className: `inline-flex items-center gap-1.5 px-3 py-1 text-xs font-semibold rounded-full bg-primary/10 text-primary mb-5`, children: d.badge }),
802
802
  /* @__PURE__ */ jsx("h1", { className: `text-4xl md:text-5xl font-extrabold tracking-tight mb-5 text-balance leading-tight ${textAlign}`, children: d.title }),
803
803
  d.subtitle && /* @__PURE__ */ jsx("p", { className: `text-lg text-muted-foreground leading-relaxed text-pretty mb-8 ${textAlign}`, children: d.subtitle }),
804
- (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: `flex gap-3 flex-wrap ${itemsAlign}`, children: [
804
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: `flex flex-wrap ${itemsAlign}`, style: { gap: "0.75rem" }, children: [
805
805
  d.primaryButton && /* @__PURE__ */ jsx(
806
806
  "a",
807
807
  {
@@ -847,7 +847,7 @@ function BentoHeroBlock({ block }) {
847
847
  d.badge && /* @__PURE__ */ jsx("span", { className: "inline-block px-3 py-1 text-xs font-semibold rounded-full bg-secondary text-secondary-foreground mb-5", children: d.badge }),
848
848
  /* @__PURE__ */ jsx("h1", { className: `text-4xl md:text-5xl font-extrabold tracking-tight mb-4 text-balance ${textAlign}`, children: d.title }),
849
849
  d.subtitle && /* @__PURE__ */ jsx("p", { className: `text-lg text-muted-foreground leading-relaxed text-pretty ${textAlign}`, children: d.subtitle }),
850
- (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: `flex gap-3 flex-wrap mt-7 ${itemsAlign}`, children: [
850
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: `flex flex-wrap ${itemsAlign}`, style: { gap: "0.75rem", marginTop: "1.75rem" }, children: [
851
851
  d.primaryButton && /* @__PURE__ */ jsx(
852
852
  "a",
853
853
  {
@@ -892,7 +892,7 @@ function MinimalHeroBlock({ block }) {
892
892
  d.eyebrow && /* @__PURE__ */ jsx("p", { className: `text-xs uppercase tracking-[0.2em] font-semibold text-muted-foreground mb-5 ${textAlign}`, children: d.eyebrow }),
893
893
  /* @__PURE__ */ jsx("h1", { className: `text-5xl md:text-7xl font-black tracking-tight mb-6 text-balance leading-none whitespace-pre-line ${textAlign}`, children: d.title }),
894
894
  d.subtitle && /* @__PURE__ */ jsx("p", { className: `text-lg md:text-xl text-muted-foreground leading-relaxed text-pretty max-w-2xl mb-9 ${textAlign} ${mx}`, children: d.subtitle }),
895
- (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: `flex gap-4 flex-wrap items-center ${itemsAlign}`, children: [
895
+ (d.primaryButton || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: `flex flex-wrap items-center ${itemsAlign}`, style: { gap: "1rem" }, children: [
896
896
  d.primaryButton && /* @__PURE__ */ jsxs(
897
897
  "a",
898
898
  {
@@ -925,7 +925,7 @@ function SplitHeroBlock({ block }) {
925
925
  /* @__PURE__ */ jsxs("div", { className: `flex-1 space-y-5 ${itemsAlign} flex flex-col`, children: [
926
926
  d.title && /* @__PURE__ */ jsx("h1", { className: `text-3xl md:text-5xl font-extrabold tracking-tight text-balance leading-tight ${textAlign}`, children: d.title }),
927
927
  d.subtitle && /* @__PURE__ */ jsx("p", { className: `text-lg text-muted-foreground leading-relaxed text-pretty ${textAlign}`, children: d.subtitle }),
928
- (d.button || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: `flex flex-wrap gap-3 pt-2 ${align === "center" ? "justify-center" : "justify-start"}`, children: [
928
+ (d.button || d.secondaryButton) && /* @__PURE__ */ jsxs("div", { className: `flex flex-wrap ${align === "center" ? "justify-center" : "justify-start"}`, style: { gap: "0.75rem", paddingTop: "0.5rem" }, children: [
929
929
  d.button && /* @__PURE__ */ jsx("a", { href: d.buttonUrl || "#", className: "inline-flex items-center px-6 py-3 rounded-lg bg-primary text-primary-foreground font-semibold text-sm hover:opacity-90 transition-opacity", children: d.button }),
930
930
  d.secondaryButton && /* @__PURE__ */ jsx("a", { href: d.secondaryUrl || "#", className: "inline-flex items-center px-6 py-3 rounded-lg border border-border text-foreground font-semibold text-sm hover:bg-muted transition-colors", children: d.secondaryButton })
931
931
  ] })
@@ -1520,7 +1520,7 @@ async function resolveProductListBlocks(blocks) {
1520
1520
  }
1521
1521
  }));
1522
1522
  }
1523
- async function CMSCatchAllPage({ params }) {
1523
+ async function CMSCatchAllPage({ params, layout = true }) {
1524
1524
  const { slug } = await params;
1525
1525
  const slugStr = slug.join("/");
1526
1526
  const draft = await draftMode();
@@ -1543,8 +1543,13 @@ async function CMSCatchAllPage({ params }) {
1543
1543
  client.getGlobals().catch(() => ({ navigation: null, footer: null }))
1544
1544
  ]);
1545
1545
  const resolvedBlocks = await resolveProductListBlocks(page.blocks ?? []);
1546
+ const showDefaultLayout = layout === true;
1547
+ const showCustomLayout = typeof layout === "object" && layout !== null;
1548
+ const CustomHeader = showCustomLayout ? layout.Header : null;
1549
+ const CustomFooter = showCustomLayout ? layout.Footer : null;
1546
1550
  return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-background flex flex-col", children: [
1547
- /* @__PURE__ */ jsx(CMSHeader, { nav: globals?.navigation }),
1551
+ showDefaultLayout && /* @__PURE__ */ jsx(CMSHeader, { nav: globals?.navigation }),
1552
+ CustomHeader && /* @__PURE__ */ jsx(CustomHeader, { nav: globals?.navigation, globals }),
1548
1553
  isPreview && /* @__PURE__ */ jsxs("div", { className: "sticky top-0 z-50 flex items-center justify-between px-4 py-2.5 bg-amber-500 text-white text-sm font-medium shadow", children: [
1549
1554
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
1550
1555
  /* @__PURE__ */ jsx("span", { children: "Draft Preview" }),
@@ -1574,7 +1579,8 @@ async function CMSCatchAllPage({ params }) {
1574
1579
  /* @__PURE__ */ jsx("p", { className: "text-sm", children: "No content added yet." }),
1575
1580
  isPreview && /* @__PURE__ */ jsx("p", { className: "text-xs mt-1 opacity-60", children: "Add blocks in the CMS editor to see them here." })
1576
1581
  ] }) }),
1577
- /* @__PURE__ */ jsx(CMSFooter, { footer: globals?.footer })
1582
+ showDefaultLayout && /* @__PURE__ */ jsx(CMSFooter, { footer: globals?.footer }),
1583
+ CustomFooter && /* @__PURE__ */ jsx(CustomFooter, { footer: globals?.footer, globals })
1578
1584
  ] });
1579
1585
  }
1580
1586
  async function dynamicProxyGET(req) {