@sprintup-cms/sdk 1.8.53 → 1.8.55

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.
@@ -1154,11 +1154,16 @@ function parseNavItems(html) {
1154
1154
  });
1155
1155
  }
1156
1156
  function CMSHeader({ nav }) {
1157
+ console.log("[v0] CMSHeader nav:", JSON.stringify(nav, null, 2));
1157
1158
  if (!nav) return null;
1158
- const primary = nav.sectionData?.primary ?? nav.sections?.primary ?? nav.content?.primary ?? nav.primary ?? {};
1159
+ const structuredBlock = nav.blocks?.[0]?.type === "__structured__" ? nav.blocks[0].content : null;
1160
+ console.log("[v0] CMSHeader sectionData:", nav.sectionData, "structuredBlock:", structuredBlock);
1161
+ const primary = nav.sectionData?.primary ?? structuredBlock?.primary ?? {};
1162
+ console.log("[v0] CMSHeader primary:", primary);
1159
1163
  const navItems = parseNavItems(primary.nav_items || "");
1160
1164
  const logoUrl = primary.logo_url || "";
1161
1165
  const logoAlt = primary.logo_alt || "";
1166
+ console.log("[v0] CMSHeader logoUrl:", logoUrl, "logoAlt:", logoAlt, "navItems:", navItems);
1162
1167
  if (!logoUrl && !logoAlt && navItems.length === 0) return null;
1163
1168
  return /* @__PURE__ */ jsx("header", { className: "w-full border-b border-border bg-background/95 backdrop-blur sticky top-0 z-50", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto px-4 h-16 flex items-center justify-between gap-4", children: [
1164
1169
  /* @__PURE__ */ jsxs("a", { href: "/", className: "flex items-center gap-2 shrink-0", children: [
@@ -1196,12 +1201,15 @@ function parseLegalLinks(html) {
1196
1201
  });
1197
1202
  }
1198
1203
  function CMSFooter({ footer }) {
1204
+ console.log("[v0] CMSFooter footer:", JSON.stringify(footer, null, 2));
1199
1205
  if (!footer) return null;
1200
- const sd = footer.sectionData ?? {};
1201
- const c = sd.content ?? footer.sections?.content ?? footer.content?.content ?? footer.content ?? {};
1202
- const contact = sd.contact ?? footer.sections?.contact ?? footer.content?.contact ?? footer.contact ?? {};
1203
- const social = sd.social ?? footer.sections?.social ?? footer.content?.social ?? footer.social ?? {};
1204
- const legal = sd.legal ?? footer.sections?.legal ?? footer.content?.legal ?? footer.legal ?? {};
1206
+ const structuredBlock = footer.blocks?.[0]?.type === "__structured__" ? footer.blocks[0].content : null;
1207
+ console.log("[v0] CMSFooter sectionData:", footer.sectionData, "structuredBlock:", structuredBlock);
1208
+ const sd = footer.sectionData ?? structuredBlock ?? {};
1209
+ const c = sd.content ?? {};
1210
+ const contact = sd.contact ?? {};
1211
+ const social = sd.social ?? {};
1212
+ const legal = sd.legal ?? {};
1205
1213
  const columns = parseFooterColumns(c.columns || "");
1206
1214
  const legalLinks = parseLegalLinks(legal.legal_links || "");
1207
1215
  const hasSocial = social.facebook || social.twitter || social.instagram || social.linkedin || social.youtube;