@sonordev/site-kit 8.5.2 → 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 (170) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/agent-manifest.json +1 -1
  3. package/dist/{AnalyticsProvider-HSJMHYBA.js → AnalyticsProvider-3UIQMIRW.js} +6 -6
  4. package/dist/{ArticleViewTracker-XEA6ZY67.js → ArticleViewTracker-KNXP2DXL.js} +5 -5
  5. package/dist/{BlocksPopup-DUTOENMQ.js → BlocksPopup-DFE32GPX.js} +9 -8
  6. package/dist/{ChatWidget-PMVQTSEU.js → ChatWidget-L74L4YAD.js} +6 -6
  7. package/dist/FileField-P3PLEAON.js +237 -0
  8. package/dist/{FormSpotlight-RTPJPLQ3.js → FormSpotlight-DNBSBRIE.js} +2 -2
  9. package/dist/{FormStage-UANGD66Z.js → FormStage-I4JGLT57.js} +2 -2
  10. package/dist/{ManagedForm-4AACRHEY.js → ManagedForm-GJRGBM6W.js} +8 -8
  11. package/dist/{ManagedNewsletterForm-RWKFWZ72.js → ManagedNewsletterForm-AUZ6YB7G.js} +11 -11
  12. package/dist/{SignalCore-XULLPKPX.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-US6VQN7X.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 +9 -9
  27. package/dist/{chunk-3RDJKIYO.js → chunk-2WDWQI7K.js} +1 -1
  28. package/dist/{chunk-DLTLXYOV.js → chunk-36ZMNBXZ.js} +4 -9
  29. package/dist/chunk-3MJNBOUO.js +8 -0
  30. package/dist/{chunk-IXA7ZB6U.js → chunk-3MLWIBHX.js} +1 -1
  31. package/dist/{chunk-BF7TZYC3.js → chunk-52KO4LKD.js} +1 -1
  32. package/dist/{chunk-ZDUTXHM6.js → chunk-5WHBYQJ4.js} +3 -3
  33. package/dist/{chunk-5D7ZISUP.js → chunk-7DYMM6SS.js} +11 -6
  34. package/dist/{chunk-HNYECNCU.js → chunk-7YB3QA4P.js} +15 -7
  35. package/dist/{chunk-N4ZCNYWF.js → chunk-A2MDVP47.js} +1 -1
  36. package/dist/{chunk-E4PTMORJ.js → chunk-AL5UCWLI.js} +23 -8
  37. package/dist/{chunk-ANVHRT35.js → chunk-BAJUXQTH.js} +2 -2
  38. package/dist/{chunk-ITQND6IB.js → chunk-BJYX6SFI.js} +2 -2
  39. package/dist/{chunk-TYAVHRWH.js → chunk-CVADNHJ4.js} +8 -2
  40. package/dist/{chunk-5BRHTBPO.js → chunk-DJIGFX33.js} +1 -1
  41. package/dist/{chunk-ZSU7KTIE.js → chunk-DPYGC7WE.js} +2 -2
  42. package/dist/{chunk-XA7Q2VQA.js → chunk-EK7P62DT.js} +1 -1
  43. package/dist/chunk-FXR5PJDL.js +420 -0
  44. package/dist/{chunk-GLLFIE2R.js → chunk-G5FD7UXK.js} +2 -2
  45. package/dist/{chunk-OFQ3BU52.js → chunk-HM7CDWFK.js} +1 -1
  46. package/dist/{chunk-Q4Y3WIHE.js → chunk-HWQPCZOX.js} +1 -1
  47. package/dist/{chunk-6KU7STM3.js → chunk-HY7ZEU2C.js} +3 -1
  48. package/dist/chunk-IBHBEUZV.js +27 -0
  49. package/dist/{chunk-7HRYSLY2.js → chunk-IXZBOOAD.js} +4 -4
  50. package/dist/chunk-JESLPEST.js +14 -0
  51. package/dist/{chunk-BC7JMY4Z.js → chunk-JG53YJLM.js} +58 -1
  52. package/dist/{chunk-FVXCQC7W.js → chunk-JWCCY72G.js} +1 -1
  53. package/dist/{chunk-RI2N2EBI.js → chunk-JYITKUUB.js} +13 -5
  54. package/dist/chunk-KIYACQW3.js +1 -0
  55. package/dist/{chunk-YW3LNSBM.js → chunk-KLIDCNML.js} +1 -1
  56. package/dist/{chunk-3PT6SO65.js → chunk-L2KSHJS2.js} +5 -5
  57. package/dist/{chunk-27LYZVPP.js → chunk-LGWN6KCN.js} +2 -2
  58. package/dist/{chunk-GTVOB5RN.js → chunk-MJW6YIDJ.js} +1 -1
  59. package/dist/{chunk-CFSIGEUW.js → chunk-MNORERMF.js} +1 -1
  60. package/dist/{chunk-Y35BWW2C.js → chunk-ODOV76VW.js} +1 -1
  61. package/dist/{chunk-EQHGPB3J.js → chunk-OHLCE4GC.js} +2 -2
  62. package/dist/{chunk-OEA7U4HJ.js → chunk-P5PRR2BB.js} +1 -1
  63. package/dist/{chunk-JJ4JS3LD.js → chunk-PAYCK7FC.js} +1 -1
  64. package/dist/{chunk-DLM4FFNH.js → chunk-QTBAKOCZ.js} +1 -1
  65. package/dist/{chunk-2QFIYYMP.js → chunk-RHT7OZNF.js} +1 -1
  66. package/dist/{chunk-UGZ3B5AK.js → chunk-RWWSOYJO.js} +9 -9
  67. package/dist/{chunk-T6U6J3QK.js → chunk-T6TWPKBL.js} +1 -1
  68. package/dist/{chunk-5SQK3D53.js → chunk-TYSIAWC3.js} +1 -0
  69. package/dist/{chunk-24NM64IV.js → chunk-U4OQJQK6.js} +3 -3
  70. package/dist/{chunk-GDQKDL3E.js → chunk-UYOE3HA4.js} +2 -2
  71. package/dist/chunk-VEJD5EJ2.js +344 -0
  72. package/dist/{chunk-LNSF6BJC.js → chunk-VPZJ7ZTL.js} +2 -2
  73. package/dist/chunk-XAZC2TUD.js +1119 -0
  74. package/dist/{chunk-A7RZQI6H.js → chunk-XC2TWYDV.js} +3 -3
  75. package/dist/{chunk-URJN75ZG.js → chunk-XIDWNXZN.js} +3 -3
  76. package/dist/chunk-XLAHRN4B.js +1 -0
  77. package/dist/{chunk-URZTBPZO.js → chunk-XZFOQ2V4.js} +113 -93
  78. package/dist/{chunk-I4LMZNBN.js → chunk-YYPYLYZM.js} +1 -1
  79. package/dist/client/index.js +4 -4
  80. package/dist/contracts/broadcast-layouts.d.ts +133 -0
  81. package/dist/contracts/business-claims.d.ts +456 -0
  82. package/dist/contracts/campaign-normalize.d.ts +2 -0
  83. package/dist/contracts/entries.d.ts +1 -1
  84. package/dist/contracts/funnels.d.ts +576 -0
  85. package/dist/contracts/inbox.d.ts +42 -0
  86. package/dist/contracts/llms.d.ts +200 -0
  87. package/dist/contracts/outreach.d.ts +267 -0
  88. package/dist/contracts/page-titles.d.ts +140 -0
  89. package/dist/contracts/portfolio.d.ts +170 -0
  90. package/dist/contracts/public-url-host.d.ts +10 -0
  91. package/dist/contracts/publication-branding.d.ts +151 -0
  92. package/dist/contracts/publication-charter.d.ts +14 -0
  93. package/dist/contracts/site-cache.d.ts +2 -0
  94. package/dist/fleet/index.js +6 -6
  95. package/dist/forms/FileField.d.ts +3 -1
  96. package/dist/forms/PrivateFileField.d.ts +3 -0
  97. package/dist/forms/index.js +11 -11
  98. package/dist/forms/private-file-rules.d.ts +8 -0
  99. package/dist/forms/server.js +5 -5
  100. package/dist/forms/static.js +3 -3
  101. package/dist/forms/styles.css +17 -1
  102. package/dist/forms/types.d.ts +4 -0
  103. package/dist/images/index.js +4 -4
  104. package/dist/index.js +1 -1
  105. package/dist/landing/contract.d.ts +2 -13
  106. package/dist/landing/contract.js +2 -0
  107. package/dist/landing/index.js +4 -2
  108. package/dist/landing/managed-server.d.ts +21 -0
  109. package/dist/landing/managed.d.ts +11 -0
  110. package/dist/landing/metadata.js +2 -0
  111. package/dist/landing/server.d.ts +5 -0
  112. package/dist/landing/server.js +19 -2
  113. package/dist/layout/client.js +9 -9
  114. package/dist/layout/index.js +10 -10
  115. package/dist/llms/contract.js +2 -1
  116. package/dist/llms/index.js +9 -7
  117. package/dist/llms/merge.d.ts +29 -0
  118. package/dist/maps/index.js +3 -3
  119. package/dist/mcp/sonor.js +12 -11
  120. package/dist/portfolio/contract.js +1 -1
  121. package/dist/press-kit/articles/article-body.d.ts +13 -0
  122. package/dist/press-kit/articles/article-heading-ids.d.ts +7 -0
  123. package/dist/press-kit/articles/article-headings.d.ts +61 -0
  124. package/dist/press-kit/articles/html-tags.d.ts +46 -0
  125. package/dist/press-kit/articles/types.d.ts +2 -0
  126. package/dist/revalidate/index.js +3 -3
  127. package/dist/runtime/index.js +3 -3
  128. package/dist/seo/client.js +6 -6
  129. package/dist/seo/index.js +14 -13
  130. package/dist/seo/llms/contract.js +2 -1
  131. package/dist/seo/llms.js +9 -7
  132. package/dist/seo/meta/contract.js +2 -1
  133. package/dist/seo/register-sitemap-cli.js +1 -1
  134. package/dist/seo/server.js +5 -4
  135. package/dist/seo/sitemap.js +7 -5
  136. package/dist/seo-meta/contract.js +2 -1
  137. package/dist/server/index.js +3 -3
  138. package/dist/{server-api-EGOKC7Q3.js → server-api-XIKDWSNO.js} +2 -2
  139. package/dist/shared/build-entries.d.ts +3 -1
  140. package/dist/shared/markdown.d.ts +7 -6
  141. package/dist/shared/version.d.ts +1 -1
  142. package/dist/signal/index.js +2 -2
  143. package/dist/sitemap/index.js +7 -5
  144. package/dist/slots/index.js +2 -2
  145. package/dist/sync/index.js +5 -5
  146. package/dist/website/contract.js +2 -1
  147. package/dist/website/images.js +4 -4
  148. package/dist/website/index.js +10 -9
  149. package/dist/website/landing/server.js +19 -2
  150. package/dist/website/landing.js +4 -2
  151. package/dist/website/popups.js +9 -8
  152. package/dist/website/slots.js +2 -2
  153. package/dist/{writeLLMsTxt-BAK5XMRR.js → writeLLMsTxt-QN2HIVT4.js} +6 -4
  154. package/docs.json +5 -0
  155. package/package.json +1 -1
  156. package/src/analytics/README.md +1 -1
  157. package/src/forms/README.md +22 -0
  158. package/src/landing/README.md +64 -0
  159. package/src/llms/README.md +52 -20
  160. package/dist/FileField-F7BG4XAZ.js +0 -83
  161. package/dist/SiteChat-P4CRBRJZ.js +0 -6
  162. package/dist/SiteDesignReporter-QDVP4WMK.js +0 -12
  163. package/dist/SitemapSync-5FBRDGHG.js +0 -9
  164. package/dist/article-tables-6XHVULPU.js +0 -2
  165. package/dist/chunk-EKBEOXTH.js +0 -114
  166. package/dist/chunk-NZ4RXN3G.js +0 -145
  167. package/dist/chunk-OSYCOC3K.js +0 -21
  168. /package/dist/{chunk-7ZWO5HDQ.js → chunk-BTHEQDN4.js} +0 -0
  169. /package/dist/{chunk-BQR4IPBW.js → chunk-ISRBSTB7.js} +0 -0
  170. /package/dist/{chunk-IHG36STL.js → chunk-XHYE24HU.js} +0 -0
@@ -1,114 +0,0 @@
1
- // src/contracts/portfolio.ts
2
- var FRAME_READY_MESSAGE = "sonor:frame-ready";
3
- function isFrameReadyMessage(data) {
4
- return !!data && typeof data === "object" && data.type === FRAME_READY_MESSAGE && data.v === 1;
5
- }
6
- var PORTFOLIO_CONTRACT_VERSION = 1;
7
- var LIGHTHOUSE_RE = /lighthouse/i;
8
- function isLighthouseKpi(kpi) {
9
- return LIGHTHOUSE_RE.test(kpi.label || "");
10
- }
11
- function curateHeroKpis(kpis) {
12
- const business = kpis.filter((k) => !isLighthouseKpi(k));
13
- const lighthouse = kpis.filter(isLighthouseKpi);
14
- if (lighthouse.length <= 1) return kpis;
15
- const allPerfect = lighthouse.length >= 4 && lighthouse.every((k) => k.value === 100);
16
- const summary = allPerfect ? {
17
- ...lighthouse[0],
18
- label: "Lighthouse, all 4 categories",
19
- description: "Perfect scores across performance, SEO, accessibility, and best practices."
20
- } : lighthouse.find((k) => /performance/i.test(k.label)) ?? lighthouse[0];
21
- return [...business, summary];
22
- }
23
- var PORTFOLIO_KPI_JSON_SCHEMA = {
24
- $schema: "http://json-schema.org/draft-07/schema#",
25
- $id: "https://sonor.io/schemas/portfolio-kpi.v1.json",
26
- title: "KpiLike",
27
- description: "The subset of a portfolio KPI tile the Lighthouse-collapse policy reads.",
28
- type: "object",
29
- required: ["label", "value"],
30
- properties: {
31
- label: { type: "string" },
32
- value: { type: "number" },
33
- description: { type: "string" },
34
- source: { enum: ["measured", "reported", "estimated"] },
35
- reportedBy: {
36
- type: "object",
37
- required: ["name", "organization", "date"],
38
- properties: {
39
- name: { type: "string", minLength: 1 },
40
- role: { type: "string" },
41
- organization: { type: "string", minLength: 1 },
42
- date: { type: "string", pattern: "^\\d{4}-\\d{2}-\\d{2}$" }
43
- }
44
- }
45
- },
46
- // A reported number is only valid with someone named behind it.
47
- if: { properties: { source: { const: "reported" } }, required: ["source"] },
48
- then: { required: ["reportedBy"] },
49
- additionalProperties: true
50
- };
51
- var METRIC_SOURCES = ["measured", "reported", "estimated"];
52
- var ISO_DAY_RE = /^\d{4}-\d{2}-\d{2}$/;
53
- var MONTHS = [
54
- "January",
55
- "February",
56
- "March",
57
- "April",
58
- "May",
59
- "June",
60
- "July",
61
- "August",
62
- "September",
63
- "October",
64
- "November",
65
- "December"
66
- ];
67
- function isMetricSource(value) {
68
- return typeof value === "string" && METRIC_SOURCES.includes(value);
69
- }
70
- function metricSourceProblem(metric) {
71
- if (metric.source === void 0 || metric.source === null) return null;
72
- if (!isMetricSource(metric.source)) return `source must be one of ${METRIC_SOURCES.join(", ")}`;
73
- if (metric.source !== "reported") return null;
74
- const by = metric.reportedBy;
75
- if (!by || typeof by !== "object") {
76
- return "a reported number needs reportedBy: who reported it, where they work, and when";
77
- }
78
- if (typeof by.name !== "string" || !by.name.trim()) return "reportedBy.name is required";
79
- if (typeof by.organization !== "string" || !by.organization.trim()) {
80
- return "reportedBy.organization is required";
81
- }
82
- if (typeof by.date !== "string" || !ISO_DAY_RE.test(by.date) || Number.isNaN(Date.parse(by.date))) {
83
- return "reportedBy.date must be a real day, YYYY-MM-DD";
84
- }
85
- if (by.role !== void 0 && typeof by.role !== "string") return "reportedBy.role must be text";
86
- return null;
87
- }
88
- function isHeadlineMetric(metric) {
89
- if (metric.source === "measured") return true;
90
- return metric.source === "reported" && metricSourceProblem(metric) === null;
91
- }
92
- function metricSourceLabel(source) {
93
- if (source === "measured") return "Measured";
94
- if (source === "reported") return "Client-reported";
95
- if (source === "estimated") return "Estimated";
96
- return null;
97
- }
98
- function formatAttribution(by) {
99
- const [year, month, day] = by.date.split("-").map(Number);
100
- const when = MONTHS[month - 1] ? `${MONTHS[month - 1]} ${day}, ${year}` : by.date;
101
- return [`Reported by ${by.name.trim()}`, by.role?.trim(), by.organization.trim(), when].filter(Boolean).join(", ");
102
- }
103
- function shortAttribution(by) {
104
- return `per ${by.organization.trim()}`;
105
- }
106
- function carryReportedMetrics(previous, next, keyOf) {
107
- const norm = (metric) => String(keyOf(metric) ?? "").trim().toLowerCase();
108
- const reported = (previous ?? []).filter((m) => m?.source === "reported");
109
- const taken = new Set(reported.map(norm));
110
- const generated = (next ?? []).filter((m) => m && m.source !== "reported" && !taken.has(norm(m)));
111
- return [...reported, ...generated];
112
- }
113
-
114
- export { FRAME_READY_MESSAGE, METRIC_SOURCES, PORTFOLIO_CONTRACT_VERSION, PORTFOLIO_KPI_JSON_SCHEMA, carryReportedMetrics, curateHeroKpis, formatAttribution, isFrameReadyMessage, isHeadlineMetric, isLighthouseKpi, isMetricSource, metricSourceLabel, metricSourceProblem, shortAttribution };
@@ -1,145 +0,0 @@
1
- // src/contracts/llms.ts
2
- var LLM_GEO_CONTRACT_VERSION = 1;
3
- var LLMS_PUBLIC_SUMMARY_MAX_LENGTH = 400;
4
- var LLMS_DISCLAIMER_MAX_LENGTH = 280;
5
- var MANAGED_LLM_SCHEMA_KNOWN_KEYS = /* @__PURE__ */ new Set([
6
- "@context",
7
- "@type",
8
- "name",
9
- "description",
10
- "url",
11
- "keywords",
12
- "audience",
13
- "about",
14
- "mainEntity",
15
- "isPartOf",
16
- "speakable",
17
- "additionalType"
18
- ]);
19
- var SENTENCE_SHARE = 0.4;
20
- var ELLIPSIS = "\u2026";
21
- var CLOSERS = /* @__PURE__ */ new Set(['"', "'", ")", "]", "\u201D", "\u2019", "\xBB"]);
22
- var ABBREVIATIONS = /* @__PURE__ */ new Set([
23
- "mr",
24
- "mrs",
25
- "ms",
26
- "dr",
27
- "prof",
28
- "st",
29
- "mt",
30
- "ft",
31
- "jr",
32
- "sr",
33
- "inc",
34
- "ltd",
35
- "co",
36
- "corp",
37
- "vs",
38
- "no"
39
- ]);
40
- var TRAILING_SEPARATORS = /[\s.,;:\-\u2013\u2014/&([{]+$/;
41
- function clipAtWordBoundary(text, max) {
42
- const flat = text.replace(/\s+/g, " ").trim();
43
- if (flat.length <= max) return flat;
44
- if (max < 2) return flat.slice(0, Math.max(0, max));
45
- const floor = Math.floor(max * (1 - SENTENCE_SHARE));
46
- for (let end = max; end > floor; end--) {
47
- if (endsSentence(flat, end)) return flat.slice(0, end);
48
- }
49
- const room = max - 1;
50
- const space = flat.lastIndexOf(" ", room);
51
- if (space <= 0) return `${flat.slice(0, room)}${ELLIPSIS}`;
52
- if (endsSentence(flat, space)) return flat.slice(0, space);
53
- const head = flat.slice(0, space).replace(TRAILING_SEPARATORS, "");
54
- return `${head || flat.slice(0, room)}${ELLIPSIS}`;
55
- }
56
- function endsSentence(flat, end) {
57
- if (flat[end] !== " ") return false;
58
- let i = end - 1;
59
- while (i > 0 && CLOSERS.has(flat[i])) i--;
60
- const terminator = flat[i];
61
- if (terminator === "!" || terminator === "?") return true;
62
- return terminator === "." && !isAbbreviation(flat, i);
63
- }
64
- function isAbbreviation(flat, dot) {
65
- let start = dot;
66
- while (start > 0 && flat[start - 1] !== " ") start--;
67
- const token = flat.slice(start, dot).replace(/^[("'[\u201c\u2018]+/, "").toLowerCase();
68
- if (token.includes(".") || /^[a-z]$/.test(token)) return true;
69
- return ABBREVIATIONS.has(token);
70
- }
71
- function sanitizeLlmsPublicSummary(raw) {
72
- if (raw === null || raw === void 0) return null;
73
- if (typeof raw !== "string") return null;
74
- let s = raw.trim().replace(/\s+/g, " ");
75
- s = s.replace(/[\[\]\r\n]/g, " ").replace(/\s+/g, " ").trim();
76
- s = clipAtWordBoundary(s, LLMS_PUBLIC_SUMMARY_MAX_LENGTH);
77
- if (/\b[\w.%+-]+@[\w.-]+\.[A-Za-z]{2,}\b/.test(s)) return null;
78
- if (/\b\+?\d[\d\s().-]{8,}\b/.test(s)) return null;
79
- if (s.length < 8) return null;
80
- return s;
81
- }
82
- function sanitizeLlmsDisclaimerLine(raw) {
83
- if (raw === null || raw === void 0) return null;
84
- if (typeof raw !== "string") return null;
85
- let s = raw.trim().replace(/\s+/g, " ");
86
- s = s.replace(/[\[\]\r\n]/g, " ").replace(/\s+/g, " ").trim();
87
- s = clipAtWordBoundary(s, LLMS_DISCLAIMER_MAX_LENGTH);
88
- if (/\b[\w.%+-]+@[\w.-]+\.[A-Za-z]{2,}\b/.test(s)) return null;
89
- if (/\b\+?\d[\d\s().-]{8,}\b/.test(s)) return null;
90
- if (s.length < 3) return null;
91
- return s;
92
- }
93
- function sanitizePrimaryLanguageTag(raw) {
94
- if (raw === null || raw === void 0) return null;
95
- if (typeof raw !== "string") return null;
96
- const s = raw.trim();
97
- if (!/^[\w-]{2,20}$/.test(s)) return null;
98
- return s;
99
- }
100
- function isEmittableReviewNode(node) {
101
- const author = node.author;
102
- if (typeof author === "string") return author.trim().length > 0;
103
- if (Array.isArray(author)) {
104
- return author.some((a) => isEmittableReviewNode({ author: a }));
105
- }
106
- if (author && typeof author === "object") {
107
- const name = author.name;
108
- return typeof name === "string" && name.trim().length > 0;
109
- }
110
- return false;
111
- }
112
- var DROP = /* @__PURE__ */ Symbol("drop-invalid-review");
113
- function stripInvalidReviewNodes(value) {
114
- if (Array.isArray(value)) {
115
- return value.map((v) => stripInvalidReviewNodes(v)).filter((v) => v !== DROP);
116
- }
117
- if (value && typeof value === "object") {
118
- const src = value;
119
- if (src["@type"] === "Review" && !isEmittableReviewNode(src)) return DROP;
120
- const out = {};
121
- for (const key of Object.keys(src)) {
122
- const child = stripInvalidReviewNodes(src[key]);
123
- if (child === DROP) continue;
124
- out[key] = child;
125
- }
126
- return out;
127
- }
128
- return value;
129
- }
130
- function pickManagedLlmSchemaForJsonLd(schema) {
131
- if (!schema || typeof schema !== "object") return null;
132
- const out = {};
133
- const omitFromJsonLd = /* @__PURE__ */ new Set(["llms_public_summary"]);
134
- for (const key of Object.keys(schema)) {
135
- if (omitFromJsonLd.has(key)) continue;
136
- if (MANAGED_LLM_SCHEMA_KNOWN_KEYS.has(key)) {
137
- const value = stripInvalidReviewNodes(schema[key]);
138
- if (value === DROP) continue;
139
- out[key] = value;
140
- }
141
- }
142
- return Object.keys(out).length ? out : null;
143
- }
144
-
145
- export { LLMS_DISCLAIMER_MAX_LENGTH, LLMS_PUBLIC_SUMMARY_MAX_LENGTH, LLM_GEO_CONTRACT_VERSION, MANAGED_LLM_SCHEMA_KNOWN_KEYS, clipAtWordBoundary, isEmittableReviewNode, pickManagedLlmSchemaForJsonLd, sanitizeLlmsDisclaimerLine, sanitizeLlmsPublicSummary, sanitizePrimaryLanguageTag };
@@ -1,21 +0,0 @@
1
- // src/landing/contract.ts
2
- function normalizeCampaignSlug(input) {
3
- if (!input || typeof input !== "string") return null;
4
- const slug = input.trim().toLowerCase().replace(/[\s_]+/g, "-").replace(/[^a-z0-9-]/g, "").replace(/-{2,}/g, "-").replace(/^-+|-+$/g, "").slice(0, 80);
5
- return slug || null;
6
- }
7
-
8
- // src/landing/metadata.ts
9
- function landingPageMetadata(meta = {}) {
10
- const callerRobots = meta.robots && typeof meta.robots === "object" ? meta.robots : void 0;
11
- return {
12
- ...meta,
13
- robots: {
14
- index: false,
15
- follow: false,
16
- ...callerRobots
17
- }
18
- };
19
- }
20
-
21
- export { landingPageMetadata, normalizeCampaignSlug };
File without changes
File without changes
File without changes