@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.
- package/CHANGELOG.md +11 -0
- package/agent-manifest.json +1 -1
- package/dist/{AnalyticsProvider-GVJYL6XY.js → AnalyticsProvider-3UIQMIRW.js} +6 -6
- package/dist/{ArticleViewTracker-AOJXEBYM.js → ArticleViewTracker-KNXP2DXL.js} +5 -5
- package/dist/{BlocksPopup-AJ3CKVQG.js → BlocksPopup-DFE32GPX.js} +9 -8
- package/dist/{ChatWidget-EYBVB5SZ.js → ChatWidget-L74L4YAD.js} +5 -5
- package/dist/{FileField-UEQYIFRO.js → FileField-P3PLEAON.js} +3 -3
- package/dist/{FormSpotlight-H73ZZ66T.js → FormSpotlight-DNBSBRIE.js} +1 -1
- package/dist/{FormStage-2PLWWYBW.js → FormStage-I4JGLT57.js} +1 -1
- package/dist/{ManagedForm-ZQOFXEWS.js → ManagedForm-GJRGBM6W.js} +6 -6
- package/dist/{ManagedNewsletterForm-5TE47YZD.js → ManagedNewsletterForm-AUZ6YB7G.js} +9 -9
- package/dist/{SignalCore-FEFNMNYN.js → SignalCore-UV7K7PT4.js} +5 -5
- package/dist/SiteChat-6UWE545R.js +6 -0
- package/dist/SiteDesignReporter-ZSU76DZJ.js +13 -0
- package/dist/{SitePopups-C44YTQ3Q.js → SitePopups-XHWU7GNF.js} +6 -6
- package/dist/SitemapSync-ELWV6W7Y.js +9 -0
- package/dist/_client/booking-widget.js +5 -5
- package/dist/affiliates/index.js +3 -3
- package/dist/analytics/content-text.d.ts +17 -0
- package/dist/analytics/index.js +6 -6
- package/dist/{article-styles-VASFBYA3.js → article-styles-D7VCDXMG.js} +2 -1
- package/dist/article-tables-W45BE353.js +3 -0
- package/dist/articles/index.js +7 -20
- package/dist/articles/server-ui.js +29 -55
- package/dist/articles/server.js +6 -5
- package/dist/chat/index.js +8 -8
- package/dist/{chunk-3RDJKIYO.js → chunk-2WDWQI7K.js} +1 -1
- package/dist/{chunk-NI6ZTP3D.js → chunk-36ZMNBXZ.js} +1 -1
- package/dist/chunk-3MJNBOUO.js +8 -0
- package/dist/{chunk-ZZSAWXWD.js → chunk-3MLWIBHX.js} +1 -1
- package/dist/{chunk-BF7TZYC3.js → chunk-52KO4LKD.js} +1 -1
- package/dist/{chunk-U34O6I7W.js → chunk-5WHBYQJ4.js} +3 -3
- package/dist/{chunk-5D7ZISUP.js → chunk-7DYMM6SS.js} +11 -6
- package/dist/{chunk-GFY3E7EQ.js → chunk-7YB3QA4P.js} +15 -7
- package/dist/{chunk-6AWIUO2Z.js → chunk-A2MDVP47.js} +1 -1
- package/dist/{chunk-E4PTMORJ.js → chunk-AL5UCWLI.js} +23 -8
- package/dist/{chunk-O3Z5HHFP.js → chunk-BAJUXQTH.js} +2 -2
- package/dist/{chunk-IGAIQ2B3.js → chunk-BJYX6SFI.js} +2 -2
- package/dist/{chunk-72F44HKL.js → chunk-DJIGFX33.js} +1 -1
- package/dist/{chunk-AJG74ZZV.js → chunk-DPYGC7WE.js} +1 -1
- package/dist/{chunk-XA7Q2VQA.js → chunk-EK7P62DT.js} +1 -1
- package/dist/chunk-FXR5PJDL.js +420 -0
- package/dist/{chunk-OWO3RFEX.js → chunk-G5FD7UXK.js} +1 -1
- package/dist/{chunk-KTMHRXDT.js → chunk-HM7CDWFK.js} +1 -1
- package/dist/{chunk-CMUD37WV.js → chunk-HWQPCZOX.js} +1 -1
- package/dist/{chunk-6KU7STM3.js → chunk-HY7ZEU2C.js} +3 -1
- package/dist/chunk-IBHBEUZV.js +27 -0
- package/dist/{chunk-NUXXFCIT.js → chunk-IXZBOOAD.js} +4 -4
- package/dist/chunk-JESLPEST.js +14 -0
- package/dist/{chunk-BC7JMY4Z.js → chunk-JG53YJLM.js} +58 -1
- package/dist/{chunk-VA6IJ55K.js → chunk-JWCCY72G.js} +1 -1
- package/dist/{chunk-RI2N2EBI.js → chunk-JYITKUUB.js} +13 -5
- package/dist/chunk-KIYACQW3.js +1 -0
- package/dist/{chunk-OFSV5TZY.js → chunk-KLIDCNML.js} +1 -1
- package/dist/{chunk-7R2STOVD.js → chunk-L2KSHJS2.js} +3 -3
- package/dist/{chunk-HMTPRBYJ.js → chunk-LGWN6KCN.js} +1 -1
- package/dist/{chunk-YNBRVVTX.js → chunk-MJW6YIDJ.js} +1 -1
- package/dist/{chunk-BUE3Z32O.js → chunk-MNORERMF.js} +1 -1
- package/dist/{chunk-Y35BWW2C.js → chunk-ODOV76VW.js} +1 -1
- package/dist/{chunk-6NXFA7HE.js → chunk-OHLCE4GC.js} +2 -2
- package/dist/{chunk-QQT2T6JQ.js → chunk-P5PRR2BB.js} +1 -1
- package/dist/{chunk-JJ4JS3LD.js → chunk-PAYCK7FC.js} +1 -1
- package/dist/{chunk-DLM4FFNH.js → chunk-QTBAKOCZ.js} +1 -1
- package/dist/{chunk-L6QTERSH.js → chunk-RHT7OZNF.js} +1 -1
- package/dist/{chunk-YJH6WE76.js → chunk-RWWSOYJO.js} +9 -9
- package/dist/{chunk-JSW42BHL.js → chunk-T6TWPKBL.js} +1 -1
- package/dist/{chunk-FTSEP7Q3.js → chunk-U4OQJQK6.js} +3 -3
- package/dist/{chunk-IYCSDFPN.js → chunk-UYOE3HA4.js} +2 -2
- package/dist/chunk-VEJD5EJ2.js +344 -0
- package/dist/chunk-XAZC2TUD.js +1119 -0
- package/dist/{chunk-DSD3XZQQ.js → chunk-XC2TWYDV.js} +3 -3
- package/dist/{chunk-URJN75ZG.js → chunk-XIDWNXZN.js} +3 -3
- package/dist/chunk-XLAHRN4B.js +1 -0
- package/dist/{chunk-V67OD7RW.js → chunk-XZFOQ2V4.js} +113 -93
- package/dist/{chunk-QNOJSSQT.js → chunk-YYPYLYZM.js} +1 -1
- package/dist/client/index.js +4 -4
- package/dist/contracts/campaign-normalize.d.ts +2 -0
- package/dist/contracts/entries.d.ts +1 -1
- package/dist/contracts/funnels.d.ts +576 -0
- package/dist/contracts/inbox.d.ts +42 -0
- package/dist/contracts/llms.d.ts +200 -0
- package/dist/contracts/portfolio.d.ts +170 -0
- package/dist/contracts/publication-branding.d.ts +10 -2
- package/dist/contracts/site-cache.d.ts +2 -0
- package/dist/fleet/index.js +6 -6
- package/dist/forms/index.js +9 -9
- package/dist/forms/server.js +2 -2
- package/dist/images/index.js +4 -4
- package/dist/index.js +1 -1
- package/dist/landing/contract.d.ts +2 -13
- package/dist/landing/contract.js +2 -0
- package/dist/landing/index.js +4 -2
- package/dist/landing/managed-server.d.ts +21 -0
- package/dist/landing/managed.d.ts +11 -0
- package/dist/landing/metadata.js +2 -0
- package/dist/landing/server.d.ts +5 -0
- package/dist/landing/server.js +19 -2
- package/dist/layout/client.js +9 -9
- package/dist/layout/index.js +10 -10
- package/dist/llms/contract.js +2 -1
- package/dist/llms/index.js +9 -7
- package/dist/llms/merge.d.ts +29 -0
- package/dist/maps/index.js +3 -3
- package/dist/mcp/sonor.js +9 -8
- package/dist/portfolio/contract.js +1 -1
- package/dist/press-kit/articles/article-body.d.ts +13 -0
- package/dist/press-kit/articles/article-heading-ids.d.ts +7 -0
- package/dist/press-kit/articles/article-headings.d.ts +61 -0
- package/dist/press-kit/articles/html-tags.d.ts +46 -0
- package/dist/press-kit/articles/types.d.ts +2 -0
- package/dist/revalidate/index.js +3 -3
- package/dist/runtime/index.js +3 -3
- package/dist/seo/client.js +6 -6
- package/dist/seo/index.js +14 -13
- package/dist/seo/llms/contract.js +2 -1
- package/dist/seo/llms.js +9 -7
- package/dist/seo/meta/contract.js +2 -1
- package/dist/seo/register-sitemap-cli.js +1 -1
- package/dist/seo/server.js +5 -4
- package/dist/seo/sitemap.js +7 -5
- package/dist/seo-meta/contract.js +2 -1
- package/dist/server/index.js +3 -3
- package/dist/{server-api-EGOKC7Q3.js → server-api-XIKDWSNO.js} +2 -2
- package/dist/shared/build-entries.d.ts +3 -1
- package/dist/shared/markdown.d.ts +7 -6
- package/dist/shared/version.d.ts +1 -1
- package/dist/signal/index.js +2 -2
- package/dist/sitemap/index.js +7 -5
- package/dist/slots/index.js +2 -2
- package/dist/sync/index.js +5 -5
- package/dist/website/contract.js +2 -1
- package/dist/website/images.js +4 -4
- package/dist/website/index.js +10 -9
- package/dist/website/landing/server.js +19 -2
- package/dist/website/landing.js +4 -2
- package/dist/website/popups.js +9 -8
- package/dist/website/slots.js +2 -2
- package/dist/{writeLLMsTxt-KHVHNSDM.js → writeLLMsTxt-QN2HIVT4.js} +6 -4
- package/docs.json +5 -0
- package/package.json +1 -1
- package/src/analytics/README.md +1 -1
- package/src/landing/README.md +64 -0
- package/src/llms/README.md +52 -20
- package/dist/SiteChat-3MKYL2XM.js +0 -6
- package/dist/SiteDesignReporter-AJDIBNHI.js +0 -12
- package/dist/SitemapSync-UJA6JVPW.js +0 -9
- package/dist/article-tables-6XHVULPU.js +0 -2
- package/dist/chunk-EKBEOXTH.js +0 -114
- package/dist/chunk-NZ4RXN3G.js +0 -145
- package/dist/chunk-OSYCOC3K.js +0 -21
- /package/dist/{chunk-7ZWO5HDQ.js → chunk-BTHEQDN4.js} +0 -0
- /package/dist/{chunk-BQR4IPBW.js → chunk-ISRBSTB7.js} +0 -0
- /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-
|
|
3
|
-
import { designTokensHash } from './chunk-
|
|
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-
|
|
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-
|
|
2
|
-
import { titleProblem, descriptionProblem } from './chunk-
|
|
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-
|
|
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-
|
|
2
|
-
import { linkClassificationHost } from './chunk-
|
|
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,
|
|
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
|
-
|
|
186
|
-
if (useLocal && getLocalData) {
|
|
213
|
+
if (getLocalData && needsLocalData(data)) {
|
|
187
214
|
try {
|
|
188
215
|
const local = await getLocalData();
|
|
189
|
-
data =
|
|
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-
|
|
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
|
-
|
|
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.
|
|
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
|
|
564
|
-
const
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
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
|
|
577
|
-
|
|
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
|
-
|
|
584
|
-
|
|
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-
|
|
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';
|
package/dist/client/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { SiteKitCredential } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
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-
|
|
13
|
-
import '../chunk-
|
|
12
|
+
import '../chunk-P5PRR2BB.js';
|
|
13
|
+
import '../chunk-MNORERMF.js';
|
|
14
14
|
import '../chunk-PKBMQBKP.js';
|
|
@@ -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];
|