@sonordev/site-kit 8.6.0 → 8.7.0

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.
Files changed (153) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/agent-manifest.json +1 -1
  3. package/dist/{AnalyticsProvider-GVJYL6XY.js → AnalyticsProvider-3UIQMIRW.js} +6 -6
  4. package/dist/{ArticleViewTracker-AOJXEBYM.js → ArticleViewTracker-KNXP2DXL.js} +5 -5
  5. package/dist/{BlocksPopup-AJ3CKVQG.js → BlocksPopup-DFE32GPX.js} +9 -8
  6. package/dist/{ChatWidget-EYBVB5SZ.js → ChatWidget-L74L4YAD.js} +5 -5
  7. package/dist/{FileField-UEQYIFRO.js → FileField-P3PLEAON.js} +3 -3
  8. package/dist/{FormSpotlight-H73ZZ66T.js → FormSpotlight-DNBSBRIE.js} +1 -1
  9. package/dist/{FormStage-2PLWWYBW.js → FormStage-I4JGLT57.js} +1 -1
  10. package/dist/{ManagedForm-ZQOFXEWS.js → ManagedForm-GJRGBM6W.js} +6 -6
  11. package/dist/{ManagedNewsletterForm-5TE47YZD.js → ManagedNewsletterForm-AUZ6YB7G.js} +9 -9
  12. package/dist/{SignalCore-FEFNMNYN.js → SignalCore-UV7K7PT4.js} +5 -5
  13. package/dist/SiteChat-6UWE545R.js +6 -0
  14. package/dist/SiteDesignReporter-ZSU76DZJ.js +13 -0
  15. package/dist/{SitePopups-C44YTQ3Q.js → SitePopups-XHWU7GNF.js} +6 -6
  16. package/dist/SitemapSync-ELWV6W7Y.js +9 -0
  17. package/dist/_client/booking-widget.js +5 -5
  18. package/dist/affiliates/index.js +3 -3
  19. package/dist/analytics/content-text.d.ts +17 -0
  20. package/dist/analytics/index.js +6 -6
  21. package/dist/{article-styles-VASFBYA3.js → article-styles-D7VCDXMG.js} +2 -1
  22. package/dist/article-tables-W45BE353.js +3 -0
  23. package/dist/articles/index.js +7 -20
  24. package/dist/articles/server-ui.js +29 -55
  25. package/dist/articles/server.js +6 -5
  26. package/dist/chat/index.js +8 -8
  27. package/dist/{chunk-3RDJKIYO.js → chunk-2WDWQI7K.js} +1 -1
  28. package/dist/{chunk-NI6ZTP3D.js → chunk-36ZMNBXZ.js} +1 -1
  29. package/dist/chunk-3MJNBOUO.js +8 -0
  30. package/dist/{chunk-ZZSAWXWD.js → chunk-3MLWIBHX.js} +1 -1
  31. package/dist/{chunk-BF7TZYC3.js → chunk-52KO4LKD.js} +1 -1
  32. package/dist/{chunk-U34O6I7W.js → chunk-5WHBYQJ4.js} +3 -3
  33. package/dist/{chunk-5D7ZISUP.js → chunk-7DYMM6SS.js} +11 -6
  34. package/dist/{chunk-GFY3E7EQ.js → chunk-7YB3QA4P.js} +15 -7
  35. package/dist/{chunk-6AWIUO2Z.js → chunk-A2MDVP47.js} +1 -1
  36. package/dist/{chunk-E4PTMORJ.js → chunk-AL5UCWLI.js} +23 -8
  37. package/dist/{chunk-O3Z5HHFP.js → chunk-BAJUXQTH.js} +2 -2
  38. package/dist/{chunk-IGAIQ2B3.js → chunk-BJYX6SFI.js} +2 -2
  39. package/dist/{chunk-72F44HKL.js → chunk-DJIGFX33.js} +1 -1
  40. package/dist/{chunk-AJG74ZZV.js → chunk-DPYGC7WE.js} +1 -1
  41. package/dist/{chunk-XA7Q2VQA.js → chunk-EK7P62DT.js} +1 -1
  42. package/dist/chunk-FXR5PJDL.js +420 -0
  43. package/dist/{chunk-OWO3RFEX.js → chunk-G5FD7UXK.js} +1 -1
  44. package/dist/{chunk-KTMHRXDT.js → chunk-HM7CDWFK.js} +1 -1
  45. package/dist/{chunk-CMUD37WV.js → chunk-HWQPCZOX.js} +1 -1
  46. package/dist/{chunk-6KU7STM3.js → chunk-HY7ZEU2C.js} +3 -1
  47. package/dist/chunk-IBHBEUZV.js +27 -0
  48. package/dist/{chunk-NUXXFCIT.js → chunk-IXZBOOAD.js} +4 -4
  49. package/dist/chunk-JESLPEST.js +14 -0
  50. package/dist/{chunk-BC7JMY4Z.js → chunk-JG53YJLM.js} +58 -1
  51. package/dist/{chunk-VA6IJ55K.js → chunk-JWCCY72G.js} +1 -1
  52. package/dist/{chunk-RI2N2EBI.js → chunk-JYITKUUB.js} +13 -5
  53. package/dist/chunk-KIYACQW3.js +1 -0
  54. package/dist/{chunk-OFSV5TZY.js → chunk-KLIDCNML.js} +1 -1
  55. package/dist/{chunk-7R2STOVD.js → chunk-L2KSHJS2.js} +3 -3
  56. package/dist/{chunk-HMTPRBYJ.js → chunk-LGWN6KCN.js} +1 -1
  57. package/dist/{chunk-YNBRVVTX.js → chunk-MJW6YIDJ.js} +1 -1
  58. package/dist/{chunk-BUE3Z32O.js → chunk-MNORERMF.js} +1 -1
  59. package/dist/{chunk-Y35BWW2C.js → chunk-ODOV76VW.js} +1 -1
  60. package/dist/{chunk-6NXFA7HE.js → chunk-OHLCE4GC.js} +2 -2
  61. package/dist/{chunk-QQT2T6JQ.js → chunk-P5PRR2BB.js} +1 -1
  62. package/dist/{chunk-JJ4JS3LD.js → chunk-PAYCK7FC.js} +1 -1
  63. package/dist/{chunk-DLM4FFNH.js → chunk-QTBAKOCZ.js} +1 -1
  64. package/dist/{chunk-L6QTERSH.js → chunk-RHT7OZNF.js} +1 -1
  65. package/dist/{chunk-YJH6WE76.js → chunk-RWWSOYJO.js} +9 -9
  66. package/dist/{chunk-JSW42BHL.js → chunk-T6TWPKBL.js} +1 -1
  67. package/dist/{chunk-FTSEP7Q3.js → chunk-U4OQJQK6.js} +3 -3
  68. package/dist/{chunk-IYCSDFPN.js → chunk-UYOE3HA4.js} +2 -2
  69. package/dist/chunk-VEJD5EJ2.js +344 -0
  70. package/dist/chunk-XAZC2TUD.js +1119 -0
  71. package/dist/{chunk-DSD3XZQQ.js → chunk-XC2TWYDV.js} +3 -3
  72. package/dist/{chunk-URJN75ZG.js → chunk-XIDWNXZN.js} +3 -3
  73. package/dist/chunk-XLAHRN4B.js +1 -0
  74. package/dist/{chunk-V67OD7RW.js → chunk-XZFOQ2V4.js} +113 -93
  75. package/dist/{chunk-QNOJSSQT.js → chunk-YYPYLYZM.js} +1 -1
  76. package/dist/client/index.js +4 -4
  77. package/dist/contracts/campaign-normalize.d.ts +2 -0
  78. package/dist/contracts/entries.d.ts +1 -1
  79. package/dist/contracts/funnels.d.ts +576 -0
  80. package/dist/contracts/inbox.d.ts +42 -0
  81. package/dist/contracts/llms.d.ts +200 -0
  82. package/dist/contracts/portfolio.d.ts +170 -0
  83. package/dist/contracts/publication-branding.d.ts +10 -2
  84. package/dist/contracts/site-cache.d.ts +2 -0
  85. package/dist/fleet/index.js +6 -6
  86. package/dist/forms/index.js +9 -9
  87. package/dist/forms/server.js +2 -2
  88. package/dist/images/index.js +4 -4
  89. package/dist/index.js +1 -1
  90. package/dist/landing/contract.d.ts +2 -13
  91. package/dist/landing/contract.js +2 -0
  92. package/dist/landing/index.js +4 -2
  93. package/dist/landing/managed-server.d.ts +21 -0
  94. package/dist/landing/managed.d.ts +11 -0
  95. package/dist/landing/metadata.js +2 -0
  96. package/dist/landing/server.d.ts +5 -0
  97. package/dist/landing/server.js +19 -2
  98. package/dist/layout/client.js +9 -9
  99. package/dist/layout/index.js +10 -10
  100. package/dist/llms/contract.js +2 -1
  101. package/dist/llms/index.js +9 -7
  102. package/dist/llms/merge.d.ts +29 -0
  103. package/dist/maps/index.js +3 -3
  104. package/dist/mcp/sonor.js +9 -8
  105. package/dist/portfolio/contract.js +1 -1
  106. package/dist/press-kit/articles/article-body.d.ts +13 -0
  107. package/dist/press-kit/articles/article-heading-ids.d.ts +7 -0
  108. package/dist/press-kit/articles/article-headings.d.ts +61 -0
  109. package/dist/press-kit/articles/html-tags.d.ts +46 -0
  110. package/dist/press-kit/articles/types.d.ts +2 -0
  111. package/dist/revalidate/index.js +3 -3
  112. package/dist/runtime/index.js +3 -3
  113. package/dist/seo/client.js +6 -6
  114. package/dist/seo/index.js +14 -13
  115. package/dist/seo/llms/contract.js +2 -1
  116. package/dist/seo/llms.js +9 -7
  117. package/dist/seo/meta/contract.js +2 -1
  118. package/dist/seo/register-sitemap-cli.js +1 -1
  119. package/dist/seo/server.js +5 -4
  120. package/dist/seo/sitemap.js +7 -5
  121. package/dist/seo-meta/contract.js +2 -1
  122. package/dist/server/index.js +3 -3
  123. package/dist/{server-api-EGOKC7Q3.js → server-api-XIKDWSNO.js} +2 -2
  124. package/dist/shared/build-entries.d.ts +3 -1
  125. package/dist/shared/markdown.d.ts +7 -6
  126. package/dist/shared/version.d.ts +1 -1
  127. package/dist/signal/index.js +2 -2
  128. package/dist/sitemap/index.js +7 -5
  129. package/dist/slots/index.js +2 -2
  130. package/dist/sync/index.js +5 -5
  131. package/dist/website/contract.js +2 -1
  132. package/dist/website/images.js +4 -4
  133. package/dist/website/index.js +10 -9
  134. package/dist/website/landing/server.js +19 -2
  135. package/dist/website/landing.js +4 -2
  136. package/dist/website/popups.js +9 -8
  137. package/dist/website/slots.js +2 -2
  138. package/dist/{writeLLMsTxt-KHVHNSDM.js → writeLLMsTxt-QN2HIVT4.js} +6 -4
  139. package/docs.json +5 -0
  140. package/package.json +1 -1
  141. package/src/analytics/README.md +1 -1
  142. package/src/landing/README.md +64 -0
  143. package/src/llms/README.md +52 -20
  144. package/dist/SiteChat-3MKYL2XM.js +0 -6
  145. package/dist/SiteDesignReporter-AJDIBNHI.js +0 -12
  146. package/dist/SitemapSync-UJA6JVPW.js +0 -9
  147. package/dist/article-tables-6XHVULPU.js +0 -2
  148. package/dist/chunk-EKBEOXTH.js +0 -114
  149. package/dist/chunk-NZ4RXN3G.js +0 -145
  150. package/dist/chunk-OSYCOC3K.js +0 -21
  151. /package/dist/{chunk-7ZWO5HDQ.js → chunk-BTHEQDN4.js} +0 -0
  152. /package/dist/{chunk-BQR4IPBW.js → chunk-ISRBSTB7.js} +0 -0
  153. /package/dist/{chunk-IHG36STL.js → chunk-XHYE24HU.js} +0 -0
@@ -1,8 +1,8 @@
1
1
  'use client';
2
- import { getSiteDesignTokens, tokensForReport, shouldReportDesign, sendSiteDesign } from './chunk-NUXXFCIT.js';
3
- import { designTokensHash } from './chunk-IHG36STL.js';
2
+ import { getSiteDesignTokens, tokensForReport, shouldReportDesign, sendSiteDesign } from './chunk-IXZBOOAD.js';
3
+ import { designTokensHash } from './chunk-XHYE24HU.js';
4
4
  import { useDeferredActivation } from './chunk-YC7ELZS3.js';
5
- import { resolveAnalyticsTarget } from './chunk-DLM4FFNH.js';
5
+ import { resolveAnalyticsTarget } from './chunk-QTBAKOCZ.js';
6
6
  import { useRef, useEffect } from 'react';
7
7
 
8
8
  var STAMP_KEY = (site) => `_sk_design_sent:${site}`;
@@ -1,5 +1,5 @@
1
- import { getSEOPageData, ensureMetadata, getABTest, recordABImpression, getRedirectData, getRobotsData, getSitemapEntries } from './chunk-Y35BWW2C.js';
2
- import { titleProblem, descriptionProblem } from './chunk-BQR4IPBW.js';
1
+ import { getSEOPageData, ensureMetadata, getABTest, recordABImpression, getRedirectData, getRobotsData, getSitemapEntries } from './chunk-ODOV76VW.js';
2
+ import { titleProblem, descriptionProblem } from './chunk-ISRBSTB7.js';
3
3
  import { resolveSiteHost } from './chunk-FESKKJAS.js';
4
4
 
5
5
  // src/seo/getManagedMetadata.ts
@@ -232,7 +232,7 @@ async function generateSitemap(options) {
232
232
  }));
233
233
  }
234
234
  async function registerLocalSitemap(options) {
235
- const { registerSitemap } = await import('./server-api-EGOKC7Q3.js');
235
+ const { registerSitemap } = await import('./server-api-XIKDWSNO.js');
236
236
  let entries = options.entries || [];
237
237
  if (options.autoDiscover && entries.length === 0) {
238
238
  try {
@@ -0,0 +1 @@
1
+
@@ -1,8 +1,8 @@
1
- import { getLLMsData, getOptimizedLLMsTxt } from './chunk-XA7Q2VQA.js';
2
- import { linkClassificationHost } from './chunk-5D7ZISUP.js';
1
+ import { getLLMsData, getOptimizedLLMsTxt } from './chunk-EK7P62DT.js';
2
+ import { linkClassificationHost } from './chunk-7DYMM6SS.js';
3
3
  import { resolveArticleUrl } from './chunk-4K735O3J.js';
4
4
  import { freshFetch } from './chunk-UAYAJPEP.js';
5
- import { LLM_GEO_CONTRACT_VERSION, sanitizePrimaryLanguageTag, sanitizeLlmsDisclaimerLine, sanitizeLlmsPublicSummary } from './chunk-NZ4RXN3G.js';
5
+ import { selectLlmsPages, LLM_GEO_CONTRACT_VERSION, sanitizePrimaryLanguageTag, sanitizeLlmsDisclaimerLine, llmsBlockquoteSummary, llmsAbsoluteUrl, llmsContactLines, isLlmsListablePage, groupLlmsPages, llmsPageTitle, llmsPageListNote } from './chunk-XAZC2TUD.js';
6
6
  import { resolveTrailingSlash, applyTrailingSlash } from './chunk-YVKRYQRG.js';
7
7
  import { resolveSiteHost } from './chunk-FESKKJAS.js';
8
8
  import { readFileSync, existsSync, mkdirSync, writeFileSync, renameSync, unlinkSync, readdirSync } from 'fs';
@@ -101,6 +101,47 @@ function humanizeIndustry(industry) {
101
101
  return spaced.charAt(0).toUpperCase() + spaced.slice(1);
102
102
  }
103
103
 
104
+ // src/llms/merge.ts
105
+ function isFilled(value) {
106
+ if (typeof value === "string") return value.trim() !== "";
107
+ return value !== null && value !== void 0;
108
+ }
109
+ function mergeFilledFields(sonor, local) {
110
+ if (!sonor && !local) return void 0;
111
+ if (!sonor) return local ?? void 0;
112
+ if (!local) return sonor;
113
+ const merged = { ...local };
114
+ for (const [key, value] of Object.entries(sonor)) {
115
+ if (isFilled(value) || !isFilled(merged[key])) merged[key] = value;
116
+ }
117
+ return merged;
118
+ }
119
+ var NAP_BUSINESS_FIELDS = ["name", "description"];
120
+ var NAP_CONTACT_FIELDS = ["phone", "address", "city", "state", "postal_code"];
121
+ function lacksNap(data) {
122
+ const business = data.business ?? {};
123
+ const contact = data.contact ?? {};
124
+ return NAP_BUSINESS_FIELDS.some((key) => !isFilled(business[key])) || NAP_CONTACT_FIELDS.some((key) => !isFilled(contact[key]));
125
+ }
126
+ function needsLocalData(data) {
127
+ if (!data) return true;
128
+ if (!data.services?.length || !data.faq?.length || !data.pages?.length) return true;
129
+ return lacksNap(data);
130
+ }
131
+ function mergeLlmsData(sonor, local, mergeMeta) {
132
+ if (!local) return sonor;
133
+ if (!sonor) return local;
134
+ return {
135
+ meta: mergeMeta(local.meta, sonor.meta),
136
+ business: mergeFilledFields(sonor.business, local.business),
137
+ contact: mergeFilledFields(sonor.contact, local.contact),
138
+ services: (sonor.services?.length ? sonor.services : local.services) ?? [],
139
+ faq: (sonor.faq?.length ? sonor.faq : local.faq) ?? [],
140
+ pages: (sonor.pages?.length ? sonor.pages : local.pages) ?? [],
141
+ portfolio: (sonor.portfolio?.length ? sonor.portfolio : local.portfolio) ?? []
142
+ };
143
+ }
144
+
104
145
  // src/llms/links.ts
105
146
  var ABSOLUTE_URL = /https?:\/\/[^\s<>()[\]"'`]+/g;
106
147
  var RELATIVE_LINK_TARGET = /\]\((\/(?!\/)[^)\s]*)/g;
@@ -138,19 +179,6 @@ function resolveBaseUrl(optionBaseUrl, businessWebsite) {
138
179
  const candidate = optionBaseUrl || businessWebsite || process.env.NEXT_PUBLIC_SITE_URL || process.env.SITE_URL || "";
139
180
  return candidate.trim().replace(/\/+$/, "");
140
181
  }
141
- function mergeLLMsData(portal, local) {
142
- if (!local) return portal;
143
- if (!portal) return local;
144
- return {
145
- meta: mergeLlmsMeta(local.meta, portal.meta),
146
- business: portal.business ?? local.business,
147
- contact: portal.contact ?? local.contact,
148
- services: (portal.services?.length ? portal.services : local.services) ?? [],
149
- faq: (portal.faq?.length ? portal.faq : local.faq) ?? [],
150
- pages: (portal.pages?.length ? portal.pages : local.pages) ?? [],
151
- portfolio: (portal.portfolio?.length ? portal.portfolio : local.portfolio) ?? []
152
- };
153
- }
154
182
  async function generateLLMsTxt(options) {
155
183
  const {
156
184
  projectId,
@@ -182,11 +210,10 @@ async function generateLLMsTxt(options) {
182
210
  } = options;
183
211
  const readFetch = fresh ? freshFetch : fetch;
184
212
  let data = await getLLMsData(projectId, site, fresh);
185
- const useLocal = getLocalData && (!data || !data.services?.length);
186
- if (useLocal && getLocalData) {
213
+ if (getLocalData && needsLocalData(data)) {
187
214
  try {
188
215
  const local = await getLocalData();
189
- data = mergeLLMsData(data ?? null, local);
216
+ data = mergeLlmsData(data ?? null, local, mergeLlmsMeta);
190
217
  } catch (err) {
191
218
  console.warn("[site-kit] getLocalData failed:", err);
192
219
  }
@@ -222,11 +249,32 @@ async function generateLLMsTxt(options) {
222
249
  sections.push(about);
223
250
  sectionNames.push("about");
224
251
  }
252
+ if (includeContact) {
253
+ const contact = generateContactSection(data.contact);
254
+ if (contact) {
255
+ sections.push(contact);
256
+ sectionNames.push("contact");
257
+ }
258
+ }
225
259
  if (includeServices && data.services?.length > 0) {
226
- const services = generateServicesSection(data.services);
260
+ const services = generateServicesSection(data.services, baseUrl);
227
261
  sections.push(services);
228
262
  sectionNames.push("services");
229
263
  }
264
+ const renderOptional = optionalPagePaths.length > 0 && Boolean(baseUrl);
265
+ const optionalKeys = renderOptional ? new Set(optionalPagePaths.map(normalizeLlmsPagePath)) : null;
266
+ const listable = listablePages(data.pages ?? []);
267
+ const indexPages = optionalKeys ? listable.filter((p) => !optionalKeys.has(normalizeLlmsPagePath(p.path))) : listable;
268
+ if (includePages && indexPages.length > 0) {
269
+ const pages = generatePagesSection(
270
+ selectLlmsPages(indexPages, maxPages),
271
+ baseUrl,
272
+ pageListNotesFromPublicSummaryOnly,
273
+ data.business?.name
274
+ );
275
+ sections.push(pages);
276
+ sectionNames.push("pages");
277
+ }
230
278
  if (includePortfolio) {
231
279
  let portfolioItems = data.portfolio || [];
232
280
  if (portfolioItems.length === 0) {
@@ -262,41 +310,11 @@ async function generateLLMsTxt(options) {
262
310
  sectionNames.push("portfolio");
263
311
  }
264
312
  }
265
- if (includeContact && data.contact) {
266
- const contact = generateContactSection(data.contact);
267
- sections.push(contact);
268
- sectionNames.push("contact");
269
- }
270
313
  if (includeFAQ && data.faq?.length > 0) {
271
314
  const faq = generateFAQSection(data.faq.slice(0, maxFAQItems));
272
315
  sections.push(faq);
273
316
  sectionNames.push("faq");
274
317
  }
275
- const renderOptional = optionalPagePaths.length > 0 && Boolean(baseUrl);
276
- const optionalKeys = renderOptional ? new Set(optionalPagePaths.map(normalizeLlmsPagePath)) : null;
277
- const indexPages = optionalKeys ? (data.pages ?? []).filter((p) => !optionalKeys.has(normalizeLlmsPagePath(p.path))) : data.pages ?? [];
278
- if (includePages && indexPages.length > 0) {
279
- const pages = generatePagesSection(
280
- indexPages.slice(0, maxPages),
281
- baseUrl,
282
- pageListNotesFromPublicSummaryOnly
283
- );
284
- sections.push(pages);
285
- sectionNames.push("pages");
286
- }
287
- if (renderOptional) {
288
- const opt = generateOptionalPagesSection(
289
- optionalPagePaths,
290
- data.pages || [],
291
- baseUrl,
292
- pageListNotesFromPublicSummaryOnly,
293
- trailingSlash
294
- );
295
- if (opt) {
296
- sections.push(opt);
297
- sectionNames.push("optional");
298
- }
299
- }
300
318
  if (linkToFullLlms && baseUrl) {
301
319
  const fullPath = fullLlmsTxtPath.startsWith("/") ? fullLlmsTxtPath : `/${fullLlmsTxtPath}`;
302
320
  const fullUrl = fullPath.startsWith("http") ? fullPath : `${baseUrl}${fullPath}`;
@@ -312,7 +330,7 @@ async function generateLLMsTxt(options) {
312
330
  if (includeEntities) {
313
331
  attemptedSections.push("knowledge-graph");
314
332
  optionalFetches.push(
315
- import('./server-api-EGOKC7Q3.js').then(async ({ getEntities, getPrimaryEntity }) => {
333
+ import('./server-api-XIKDWSNO.js').then(async ({ getEntities, getPrimaryEntity }) => {
316
334
  const [entities, primaryEntity] = await Promise.all([
317
335
  getEntities().then((e) => e.slice(0, maxEntities)),
318
336
  getPrimaryEntity()
@@ -389,6 +407,20 @@ ${custom.content}`);
389
407
  sections.splice(index, 0, formatAgentAccessSection(baseUrl, agentOptions));
390
408
  sectionNames.splice(index, 0, "agent-access");
391
409
  }
410
+ if (renderOptional) {
411
+ const opt = generateOptionalPagesSection(
412
+ optionalPagePaths,
413
+ data.pages || [],
414
+ baseUrl,
415
+ pageListNotesFromPublicSummaryOnly,
416
+ trailingSlash,
417
+ data.business?.name
418
+ );
419
+ if (opt) {
420
+ sections.push(opt);
421
+ sectionNames.push("optional");
422
+ }
423
+ }
392
424
  return {
393
425
  // Every own-site link (pages, clusters, portfolio, custom sections) takes
394
426
  // the site's trailing-slash shape in one pass.
@@ -442,8 +474,7 @@ function generateHeaderSection(business, meta, resolvedBaseUrl) {
442
474
  const lines = [];
443
475
  lines.push(`# ${business.name}`);
444
476
  lines.push("");
445
- const summary = business.tagline || business.description?.split(".")[0] || business.name;
446
- lines.push(`> ${summary}`);
477
+ lines.push(`> ${llmsBlockquoteSummary(business)}`);
447
478
  if (meta?.last_updated) {
448
479
  lines.push(`> Content index last updated: ${meta.last_updated}`);
449
480
  }
@@ -477,13 +508,13 @@ function generateAboutSection(business) {
477
508
  }
478
509
  return lines.join("\n");
479
510
  }
480
- function generateServicesSection(services) {
511
+ function generateServicesSection(services, baseUrl) {
481
512
  const lines = [];
482
513
  lines.push("## Services");
483
514
  lines.push("");
484
515
  for (const service of services) {
485
516
  if (service.url) {
486
- lines.push(`- **[${service.name}](${service.url})**: ${service.description}`);
517
+ lines.push(`- **[${service.name}](${llmsAbsoluteUrl(baseUrl, service.url)})**: ${service.description}`);
487
518
  } else {
488
519
  lines.push(`- **${service.name}**: ${service.description}`);
489
520
  }
@@ -524,29 +555,8 @@ function generatePortfolioSection(items, baseUrl) {
524
555
  return lines.join("\n").trim();
525
556
  }
526
557
  function generateContactSection(contact) {
527
- const lines = [];
528
- lines.push("## Contact Information");
529
- lines.push("");
530
- if (contact.phone) {
531
- lines.push(`- **Phone:** ${contact.phone}`);
532
- }
533
- if (contact.email) {
534
- lines.push(`- **Email:** ${contact.email}`);
535
- }
536
- if (contact.address || contact.city) {
537
- const addressParts = [
538
- contact.address,
539
- contact.city,
540
- contact.state,
541
- contact.postal_code,
542
- contact.country
543
- ].filter(Boolean);
544
- lines.push(`- **Address:** ${addressParts.join(", ")}`);
545
- }
546
- if (contact.hours) {
547
- lines.push(`- **Hours:** ${contact.hours}`);
548
- }
549
- return lines.join("\n");
558
+ const lines = llmsContactLines(contact);
559
+ return lines.length > 0 ? ["## Contact Information", "", ...lines].join("\n") : null;
550
560
  }
551
561
  function generateFAQSection(faq) {
552
562
  const lines = [];
@@ -560,32 +570,42 @@ function generateFAQSection(faq) {
560
570
  }
561
571
  return lines.join("\n").trim();
562
572
  }
563
- function pageListNote(page, publicSummaryOnly) {
564
- const pub = sanitizeLlmsPublicSummary(page.llms_public_summary);
565
- if (pub) return pub;
566
- if (publicSummaryOnly) return void 0;
567
- if (page.description) return page.description.replace(/[\[\]\r\n]/g, " ").trim();
568
- return void 0;
573
+ function listablePages(pages) {
574
+ const seen = /* @__PURE__ */ new Set();
575
+ return pages.filter((page) => {
576
+ if (!page?.path || !isLlmsListablePage({ path: page.path })) return false;
577
+ const key = normalizeLlmsPagePath(page.path);
578
+ if (seen.has(key)) return false;
579
+ seen.add(key);
580
+ return true;
581
+ });
569
582
  }
570
583
  function normalizeLlmsPagePath(path) {
571
584
  const withLeading = path.startsWith("/") ? path : `/${path}`;
572
585
  return withLeading.replace(/\/$/, "") || "/";
573
586
  }
574
- function formatPageLine(page, baseUrl, publicSummaryOnly) {
587
+ function formatPageLine(page, baseUrl, publicSummaryOnly, homeName) {
575
588
  const url = page.path.startsWith("http") ? page.path : `${baseUrl}${page.path}`;
576
- const note = pageListNote(page, publicSummaryOnly);
577
- return note ? `- [${page.title}](${url}): ${note}` : `- [${page.title}](${url})`;
589
+ const title = llmsPageTitle({ path: page.path, title: page.title }, homeName).replace(/[[\]]/g, "");
590
+ const note = llmsPageListNote(page, publicSummaryOnly);
591
+ return note ? `- [${title}](${url}): ${note}` : `- [${title}](${url})`;
578
592
  }
579
- function generatePagesSection(pages, baseUrl, publicSummaryOnly) {
593
+ function generatePagesSection(pages, baseUrl, publicSummaryOnly, homeName) {
580
594
  const lines = [];
581
595
  lines.push("## Site Pages");
582
596
  lines.push("");
583
- for (const page of pages) {
584
- lines.push(formatPageLine(page, baseUrl, publicSummaryOnly));
585
- }
597
+ groupLlmsPages(pages).forEach((group, i) => {
598
+ if (group.heading) {
599
+ if (i > 0) lines.push("");
600
+ lines.push(`### ${group.heading}`, "");
601
+ }
602
+ for (const page of group.pages) {
603
+ lines.push(formatPageLine(page, baseUrl, publicSummaryOnly, homeName));
604
+ }
605
+ });
586
606
  return lines.join("\n");
587
607
  }
588
- function generateOptionalPagesSection(paths, pages, baseUrl, publicSummaryOnly, trailingSlash) {
608
+ function generateOptionalPagesSection(paths, pages, baseUrl, publicSummaryOnly, trailingSlash, homeName) {
589
609
  const byPath = /* @__PURE__ */ new Map();
590
610
  for (const page of pages) {
591
611
  const key = normalizeLlmsPagePath(page.path);
@@ -599,7 +619,7 @@ function generateOptionalPagesSection(paths, pages, baseUrl, publicSummaryOnly,
599
619
  seen.add(key);
600
620
  const match = byPath.get(key);
601
621
  if (match) {
602
- lines.push(formatPageLine(match, baseUrl, publicSummaryOnly));
622
+ lines.push(formatPageLine(match, baseUrl, publicSummaryOnly, homeName));
603
623
  continue;
604
624
  }
605
625
  const title = key.split("/").filter(Boolean).pop() || key;
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { detectTimezone, releaseSlotHold, fetchBookingTypeDetails, fetchBookingTypes, fetchAvailability, createSlotHold, createBooking, formatDuration, formatDate, formatTime, prepareMeeting } from './chunk-72F44HKL.js';
2
+ import { detectTimezone, releaseSlotHold, fetchBookingTypeDetails, fetchBookingTypes, fetchAvailability, createSlotHold, createBooking, formatDuration, formatDate, formatTime, prepareMeeting } from './chunk-DJIGFX33.js';
3
3
  import { readPublishedApiConfig, DEFAULT_SONOR_API_URL } from './chunk-W7OPEMGJ.js';
4
4
  import { useState, useRef, useMemo, useCallback, useEffect, useId } from 'react';
5
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
1
  'use client';
2
- export { SiteKitCredential } from '../chunk-6AWIUO2Z.js';
3
- import '../chunk-VA6IJ55K.js';
2
+ export { SiteKitCredential } from '../chunk-A2MDVP47.js';
3
+ import '../chunk-JWCCY72G.js';
4
4
  export { VISUAL_VIEWPORT_GAP_PROPERTY, VisualViewportGap, useVisualViewportGap } from '../chunk-6T6CQVNL.js';
5
5
  export { useDeferredActivation } from '../chunk-YC7ELZS3.js';
6
6
  import '../chunk-FESKKJAS.js';
@@ -9,6 +9,6 @@ export { trackConversion, trackEvent } from '../chunk-LCDVPAMR.js';
9
9
  export { getOrCreateSessionId, getOrCreateVisitorId, useSiteKitIdentity } from '../chunk-IPQKQEWI.js';
10
10
  import '../chunk-GJWI74ZZ.js';
11
11
  import '../chunk-5TM3WPCI.js';
12
- import '../chunk-QQT2T6JQ.js';
13
- import '../chunk-BUE3Z32O.js';
12
+ import '../chunk-P5PRR2BB.js';
13
+ import '../chunk-MNORERMF.js';
14
14
  import '../chunk-PKBMQBKP.js';
@@ -0,0 +1,2 @@
1
+ /** Single source of truth for campaign identities across sites, APIs and funnels. */
2
+ export declare function normalizeCampaignSlug(input?: string | null): string | null;
@@ -4,5 +4,5 @@
4
4
  * tsup config, its package.json check and the boundary test, so a new
5
5
  * contract is added in one place.
6
6
  */
7
- export declare const CONTRACT_ENTRIES: readonly ['forms', 'llms', 'slots', 'slot-content', 'site-cache', 'site-edit', 'website', 'color', 'fleet', 'sites', 'seo-pages', 'seo-meta', 'portfolio', 'voice', 'proposal-sitemap', 'error-page', 'schema-placeholders', 'sentences', 'knowledge', 'editorial-media', 'business-claims', 'outreach', 'page-titles', 'broadcast-layouts', 'publication-branding', 'public-url-host'];
7
+ export declare const CONTRACT_ENTRIES: readonly ['forms', 'llms', 'slots', 'slot-content', 'site-cache', 'site-edit', 'website', 'color', 'fleet', 'sites', 'seo-pages', 'seo-meta', 'portfolio', 'voice', 'proposal-sitemap', 'error-page', 'schema-placeholders', 'sentences', 'knowledge', 'editorial-media', 'business-claims', 'outreach', 'page-titles', 'broadcast-layouts', 'publication-branding', 'public-url-host', 'inbox', 'funnels'];
8
8
  export type ContractEntry = (typeof CONTRACT_ENTRIES)[number];