@sonordev/site-kit 8.0.1 → 8.2.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 (90) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/agent-manifest.json +1 -1
  3. package/dist/{AnalyticsProvider-EGCZ2MVM.js → AnalyticsProvider-6TAA3XYB.js} +4 -4
  4. package/dist/{ArticleViewTracker-ATNVMT45.js → ArticleViewTracker-H4N7YCLC.js} +3 -3
  5. package/dist/{BlocksPopup-F636XNO4.js → BlocksPopup-FJT5YQD3.js} +4 -4
  6. package/dist/{ChatWidget-EQTLKPJX.js → ChatWidget-THQHHTAA.js} +5 -5
  7. package/dist/{FileField-BUD2YGN5.js → FileField-OZXXJGUM.js} +3 -3
  8. package/dist/{FormSpotlight-NGH56TGC.js → FormSpotlight-MLDJS246.js} +1 -1
  9. package/dist/{FormStage-XZRC54SY.js → FormStage-6RVY7M3R.js} +1 -1
  10. package/dist/{ManagedForm-CQDQ4CUN.js → ManagedForm-3VV54RVH.js} +6 -6
  11. package/dist/{ManagedNewsletterForm-KCN3BTKA.js → ManagedNewsletterForm-RTJDGMGG.js} +4 -4
  12. package/dist/{SignalCore-RDQPM2L2.js → SignalCore-T7ZOCA44.js} +3 -3
  13. package/dist/{SiteChat-QBDOQ5ZZ.js → SiteChat-JSHPGAE3.js} +1 -1
  14. package/dist/{SiteDesignReporter-426TUCUF.js → SiteDesignReporter-L2JBAKKK.js} +5 -5
  15. package/dist/{SitePopups-KLUD6XIE.js → SitePopups-K6ADAWFK.js} +4 -4
  16. package/dist/{SitemapSync-QOIMV5GO.js → SitemapSync-VV2YSMIW.js} +4 -4
  17. package/dist/_client/booking-widget.js +5 -5
  18. package/dist/affiliates/index.js +3 -3
  19. package/dist/analytics/index.js +4 -4
  20. package/dist/{article-styles-6CM5FUMV.js → article-styles-GFXJJDLE.js} +2 -0
  21. package/dist/articles/article-photos.d.ts +9 -0
  22. package/dist/articles/index.d.ts +1 -0
  23. package/dist/articles/index.js +1 -1
  24. package/dist/articles/server-core.d.ts +2 -0
  25. package/dist/articles/server-ui.d.ts +2 -0
  26. package/dist/articles/server-ui.js +7 -5
  27. package/dist/articles/server.d.ts +2 -0
  28. package/dist/articles/server.js +2 -1
  29. package/dist/articles/types.d.ts +17 -0
  30. package/dist/chat/index.js +6 -6
  31. package/dist/{chunk-IY6G67EF.js → chunk-3EU6S5YC.js} +1 -1
  32. package/dist/{chunk-M62U7TJF.js → chunk-575L73NT.js} +1 -1
  33. package/dist/{chunk-OE3NXEOF.js → chunk-57K4GW3D.js} +1 -1
  34. package/dist/{chunk-6KUCA5HG.js → chunk-5ZCY36TY.js} +1 -1
  35. package/dist/{chunk-Z6PVFZRI.js → chunk-66G47P5C.js} +1 -1
  36. package/dist/{chunk-55JLUMAC.js → chunk-727R7C5R.js} +2 -2
  37. package/dist/{chunk-6BXUSAOJ.js → chunk-7FSB2EXS.js} +1 -1
  38. package/dist/{chunk-VQQV7FOX.js → chunk-BQZPHICL.js} +1 -1
  39. package/dist/{chunk-OCKGB734.js → chunk-EBILJHUF.js} +1 -1
  40. package/dist/{chunk-XPTJRVL2.js → chunk-FQUGGPBM.js} +3 -2
  41. package/dist/{chunk-B7QRRLTU.js → chunk-FVXFLVXF.js} +2 -2
  42. package/dist/{chunk-7BSC6HF3.js → chunk-GWP2VBFH.js} +3 -3
  43. package/dist/{chunk-CAF53GKN.js → chunk-H4R2GPAB.js} +1 -1
  44. package/dist/chunk-HUBMKTPW.js +131 -0
  45. package/dist/{chunk-EE6IG5GK.js → chunk-I6QFPSUU.js} +8 -8
  46. package/dist/{chunk-NKFRW2VB.js → chunk-JBEUZJS3.js} +2 -2
  47. package/dist/{chunk-JCFQGEG7.js → chunk-JC2VS2SB.js} +1 -1
  48. package/dist/{chunk-AGJODJ4V.js → chunk-NNEIBXGU.js} +1 -1
  49. package/dist/{chunk-S5G3A7OZ.js → chunk-Q72M5KBS.js} +1 -1
  50. package/dist/{chunk-GMXY2OOY.js → chunk-SMYX3AAO.js} +1 -1
  51. package/dist/{chunk-J6N5DCGW.js → chunk-WBC5B3JD.js} +2 -2
  52. package/dist/{chunk-FIGIJK5F.js → chunk-WK3N3Y7V.js} +1 -1
  53. package/dist/{chunk-5GB2HHVJ.js → chunk-WSNG2K3T.js} +2 -2
  54. package/dist/{chunk-Z4MK4VOG.js → chunk-WYZ4OUON.js} +1 -1
  55. package/dist/{chunk-DWNS6ZJM.js → chunk-X7VKRHFF.js} +1 -1
  56. package/dist/{chunk-YGXWG54S.js → chunk-XWIRU6UT.js} +1 -1
  57. package/dist/{chunk-3222QBUS.js → chunk-YBAFUM3Z.js} +1 -1
  58. package/dist/{chunk-H3SDOSVU.js → chunk-ZM2FNWIQ.js} +1 -1
  59. package/dist/client/index.js +3 -3
  60. package/dist/contracts/editorial-media.d.ts +39 -0
  61. package/dist/contracts/entries.d.ts +1 -1
  62. package/dist/fleet/index.js +4 -4
  63. package/dist/forms/index.js +7 -7
  64. package/dist/forms/server.js +2 -2
  65. package/dist/images/index.js +4 -4
  66. package/dist/index.js +1 -1
  67. package/dist/layout/client.js +7 -7
  68. package/dist/layout/index.js +8 -8
  69. package/dist/llms/index.js +4 -4
  70. package/dist/maps/index.js +3 -3
  71. package/dist/mcp/sonor.js +11 -9
  72. package/dist/revalidate/index.js +2 -2
  73. package/dist/runtime/index.js +3 -3
  74. package/dist/seo/client.js +4 -4
  75. package/dist/seo/index.js +4 -4
  76. package/dist/seo/llms.js +4 -4
  77. package/dist/seo/register-sitemap-cli.js +1 -1
  78. package/dist/seo/sitemap.js +2 -2
  79. package/dist/server/index.js +2 -2
  80. package/dist/shared/version.d.ts +1 -1
  81. package/dist/signal/index.js +2 -2
  82. package/dist/sitemap/index.js +2 -2
  83. package/dist/sync/index.js +5 -5
  84. package/dist/website/images.js +4 -4
  85. package/dist/website/index.js +5 -5
  86. package/dist/website/popups.js +4 -4
  87. package/dist/{writeLLMsTxt-UZGN6IBU.js → writeLLMsTxt-DGKLYXIW.js} +1 -1
  88. package/package.json +1 -1
  89. package/src/articles/README.md +33 -0
  90. /package/dist/{chunk-TZ5RTANX.js → chunk-WACWV5EP.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  'use client';
2
- import { countStageViews, countStageQuestions, useFieldControls } from './chunk-JCFQGEG7.js';
3
- import { useFormLoadedAt, useFormTracking, submitForm, useRecaptchaWarmup, useForm } from './chunk-3222QBUS.js';
2
+ import { countStageViews, countStageQuestions, useFieldControls } from './chunk-JC2VS2SB.js';
3
+ import { useFormLoadedAt, useFormTracking, submitForm, useRecaptchaWarmup, useForm } from './chunk-YBAFUM3Z.js';
4
4
  import { readAgentSubmit, formToolAttributes } from './chunk-Q6E4OPGG.js';
5
5
  import { isFieldVisible, validateField, isFieldComplete, isDisplayOnly, unseenControlValues } from './chunk-C2FZBUSS.js';
6
6
  import { HoneypotField } from './chunk-DXO6SBMD.js';
@@ -63,7 +63,7 @@ function FormClient({
63
63
  return;
64
64
  }
65
65
  let cancelled = false;
66
- const load = resolvedExperience === "stage" ? import('./FormStage-XZRC54SY.js').then((m) => m.FormStage) : import('./FormSpotlight-NGH56TGC.js').then((m) => m.FormSpotlight);
66
+ const load = resolvedExperience === "stage" ? import('./FormStage-6RVY7M3R.js').then((m) => m.FormStage) : import('./FormSpotlight-MLDJS246.js').then((m) => m.FormSpotlight);
67
67
  load.then((Component) => {
68
68
  if (!cancelled) setExperience(() => Component);
69
69
  }).catch((err) => {
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { getSiteDesignTokens, tokensForReport, shouldReportDesign, sendSiteDesign } from './chunk-J6N5DCGW.js';
2
+ import { getSiteDesignTokens, tokensForReport, shouldReportDesign, sendSiteDesign } from './chunk-WBC5B3JD.js';
3
3
  import { designTokensHash } from './chunk-IHG36STL.js';
4
4
  import { useDeferredActivation } from './chunk-YC7ELZS3.js';
5
5
  import { resolveAnalyticsTarget } from './chunk-CAH4Y4PY.js';
@@ -0,0 +1,131 @@
1
+ // src/contracts/editorial-media.ts
2
+ var voidElements = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"]);
3
+ var rawElements = /* @__PURE__ */ new Set(["pre", "code", "script", "style", "textarea", "xmp", "template"]);
4
+ var excludedAncestors = /* @__PURE__ */ new Set(["figure", "table", "ul", "ol", "blockquote", "aside", "nav", "header", "footer"]);
5
+ var tags = () => /<!--[\s\S]*?(?:-->|$)|<\/?[a-z][\w:-]*(?=[\s/>])(?:[^"'<>]|"[^"]*"|'[^']*')*>/gi;
6
+ function editorialPlainText(value) {
7
+ const entities = { amp: "&", lt: "<", gt: ">", quot: '"', apos: "'", nbsp: " ", rsquo: "\u2019", lsquo: "\u2018", ldquo: "\u201C", rdquo: "\u201D", ndash: "\u2013", mdash: "\u2014" };
8
+ return value.replace(/<!--[\s\S]*?-->/g, "").replace(tags(), "").replace(/&(#x[\da-f]+|#\d+|[a-z]+);/gi, (full, entity) => {
9
+ if (!entity.startsWith("#")) return entities[entity.toLowerCase()] ?? full;
10
+ const number = entity[1].toLowerCase() === "x" ? parseInt(entity.slice(2), 16) : parseInt(entity.slice(1), 10);
11
+ return number > 0 && number <= 1114111 ? String.fromCodePoint(number) : full;
12
+ }).replace(/\s+/g, " ").trim();
13
+ }
14
+ function editorialTextId(kind, text) {
15
+ const normalized = editorialPlainText(text);
16
+ let hash = 2166136261;
17
+ for (let i = 0; i < normalized.length; i++) hash = Math.imul(hash ^ normalized.charCodeAt(i), 16777619);
18
+ return `${kind}-${(hash >>> 0).toString(16).padStart(8, "0")}-${normalized.length}`;
19
+ }
20
+ function attributes(tag) {
21
+ const out = /* @__PURE__ */ new Map();
22
+ const body = tag.replace(/^<[^\s>]+/, "").replace(/\/?\s*>$/, "");
23
+ for (const match of body.matchAll(/([^\s=/>]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g)) out.set(match[1].toLowerCase(), editorialPlainText(match[2] ?? match[3] ?? match[4] ?? ""));
24
+ return out;
25
+ }
26
+ function resolveArticlePhotoPlacements(html, photos = []) {
27
+ const pattern = tags();
28
+ const stack = [];
29
+ const headings = [];
30
+ const paragraphs = [];
31
+ const existing = /* @__PURE__ */ new Set(), existingSlots = /* @__PURE__ */ new Set();
32
+ let token;
33
+ while (token = pattern.exec(html)) {
34
+ const tag = token[0];
35
+ if (tag.startsWith("<!--")) continue;
36
+ const name = /^<\/?([\w:-]+)/.exec(tag)[1].toLowerCase();
37
+ if (tag.startsWith("</")) {
38
+ const at = stack.map((frame2) => frame2.name).lastIndexOf(name);
39
+ if (at < 0) continue;
40
+ const frame = stack[at];
41
+ if (frame.eligible) {
42
+ const text = editorialPlainText(html.slice(frame.inner, token.index));
43
+ if (/^h[1-6]$/.test(name)) headings.push({ id: frame.id || editorialTextId("section", text), text, level: Number(name[1]), start: frame.start, end: pattern.lastIndex, eligible: false });
44
+ if (name === "p" && text) paragraphs.push({ start: frame.start, end: pattern.lastIndex });
45
+ }
46
+ stack.length = at;
47
+ continue;
48
+ }
49
+ if (rawElements.has(name)) {
50
+ const closing = new RegExp(`</${name}\\s*>`, "gi");
51
+ closing.lastIndex = pattern.lastIndex;
52
+ if (!closing.exec(html)) break;
53
+ pattern.lastIndex = closing.lastIndex;
54
+ continue;
55
+ }
56
+ const attrs = attributes(tag);
57
+ if (name === "img" && attrs.has("src")) existing.add(attrs.get("src"));
58
+ if (name === "figure" && /^\d+$/.test(attrs.get("data-sk-editorial-photo") ?? "")) existingSlots.add(Number(attrs.get("data-sk-editorial-photo")));
59
+ if (voidElements.has(name) || /\/\s*>$/.test(tag)) continue;
60
+ stack.push({ name, start: token.index, inner: pattern.lastIndex, id: attrs.get("id"), eligible: !stack.some((frame) => excludedAncestors.has(frame.name)) });
61
+ }
62
+ const paragraphFor = (heading) => {
63
+ const next = headings.find((item) => item.start > heading.start);
64
+ return paragraphs.find((p) => p.start >= heading.end && (!next || p.end < next.start));
65
+ };
66
+ for (const heading of headings) heading.eligible = !!paragraphFor(heading);
67
+ const placements = photos.map((photo, index) => {
68
+ if (existingSlots.has(index) || photo.url && existing.has(photo.url)) return { index, status: "already_present" };
69
+ let paragraph;
70
+ if (photo.placement?.kind === "after_intro") {
71
+ const firstSection = headings.find((h) => h.level > 1);
72
+ paragraph = paragraphs.find((p) => !firstSection || p.start < firstSection.start);
73
+ } else if (photo.placement?.kind === "after_heading") {
74
+ const placement = photo.placement;
75
+ const matches = headings.filter((h) => placement.headingId ? h.id === placement.headingId : h.text === editorialPlainText(placement.heading));
76
+ if (matches.length !== 1) return { index, status: matches.length ? "ambiguous_heading" : "missing_heading" };
77
+ paragraph = paragraphFor(matches[0]);
78
+ } else return { index, status: "unassigned" };
79
+ if (!paragraph) return { index, status: "no_paragraph" };
80
+ if (photo.url) existing.add(photo.url);
81
+ return { index, status: "placed", offset: paragraph.end };
82
+ });
83
+ return { headings: headings.map(({ start: _start, end: _end, ...heading }) => heading), placements };
84
+ }
85
+
86
+ // src/articles/article-photos.ts
87
+ var escape = (value) => value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
88
+ function photoUrl(value) {
89
+ if (typeof value !== "string" || value.length > 2e3 || /[\s\\]/.test(value)) return null;
90
+ try {
91
+ const url = new URL(value);
92
+ if (url.protocol !== "https:" || url.username || url.password || /\/Blog\/(Cards|Carousel)\//i.test(decodeURIComponent(url.pathname))) return null;
93
+ return url.href;
94
+ } catch {
95
+ return null;
96
+ }
97
+ }
98
+ function figure(photo, index) {
99
+ const url = photoUrl(photo.url);
100
+ if (!url || typeof photo.alt !== "string" || !photo.alt.trim() || photo.alt.length > 300) return null;
101
+ if (![photo.width, photo.height].every((n) => Number.isInteger(n) && n > 0 && n <= 2400)) return null;
102
+ const caption = typeof photo.caption === "string" && photo.caption.trim() ? `<figcaption>${escape(photo.caption.slice(0, 300))}</figcaption>` : "";
103
+ return `<figure class="sk-article-photo" data-sk-editorial-photo="${index}"><img src="${escape(url)}" alt="${escape(photo.alt)}" width="${photo.width}" height="${photo.height}" loading="lazy" decoding="async" style="display:block;max-width:100%;height:auto" />${caption}</figure>`;
104
+ }
105
+ function insertArticlePhotos(html, photos) {
106
+ if (!html || !Array.isArray(photos) || !photos.length) return html;
107
+ const candidates = photos.slice(0, 8);
108
+ const { placements } = resolveArticlePhotoPlacements(html, candidates);
109
+ const additions = /* @__PURE__ */ new Map();
110
+ for (const { index, status, offset } of placements) {
111
+ if (status !== "placed" || offset === void 0) continue;
112
+ const rendered = figure(candidates[index], index);
113
+ if (!rendered) continue;
114
+ const images = additions.get(offset) || [];
115
+ images.push(rendered);
116
+ additions.set(offset, images);
117
+ }
118
+ let result = html;
119
+ for (const [offset, images] of [...additions].sort(([a], [b]) => b - a)) result = result.slice(0, offset) + images.join("") + result.slice(offset);
120
+ return result;
121
+ }
122
+ var articlePhotoCss = (
123
+ /* css */
124
+ `
125
+ .sk-article-photo { margin: 2em 0; max-width: 100%; }
126
+ .sk-article-photo img { display: block; width: 100%; max-width: 100%; height: auto; border-radius: var(--sk-radius, 0.75rem); }
127
+ .sk-article-photo figcaption { margin-top: 0.65em; color: var(--sk-text-secondary, inherit); font-size: 0.875em; line-height: 1.5; overflow-wrap: anywhere; }
128
+ `
129
+ );
130
+
131
+ export { articlePhotoCss, insertArticlePhotos };
@@ -1,12 +1,12 @@
1
1
  'use client';
2
2
  import { SITE_EDIT_PARAM } from './chunk-6G43IRWR.js';
3
- import { publishSiteCredential } from './chunk-6KUCA5HG.js';
4
- import { FleetHeartbeat } from './chunk-5GB2HHVJ.js';
3
+ import { publishSiteCredential } from './chunk-5ZCY36TY.js';
4
+ import { FleetHeartbeat } from './chunk-WSNG2K3T.js';
5
5
  import { useDeferredActivation } from './chunk-YC7ELZS3.js';
6
6
  import { resolveSiteHost } from './chunk-FESKKJAS.js';
7
7
  import { getOrCreateVisitorId, getOrCreateSessionId } from './chunk-ZKADJNR2.js';
8
8
  import { announceFrameReady, isCrossOriginFrame } from './chunk-CAH4Y4PY.js';
9
- import { SignalBridge } from './chunk-Z4MK4VOG.js';
9
+ import { SignalBridge } from './chunk-WYZ4OUON.js';
10
10
  import React, { useState, useRef, useCallback, useEffect, Suspense } from 'react';
11
11
  import dynamic from 'next/dynamic';
12
12
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -33,23 +33,23 @@ function startEditBridge() {
33
33
  };
34
34
  }
35
35
  var LazyAnalyticsProvider = dynamic(
36
- () => import('./AnalyticsProvider-EGCZ2MVM.js').then((m) => ({ default: m.AnalyticsProvider })),
36
+ () => import('./AnalyticsProvider-6TAA3XYB.js').then((m) => ({ default: m.AnalyticsProvider })),
37
37
  { ssr: false }
38
38
  );
39
39
  var LazySiteChat = dynamic(
40
- () => import('./SiteChat-QBDOQ5ZZ.js').then((m) => ({ default: m.SiteChat })),
40
+ () => import('./SiteChat-JSHPGAE3.js').then((m) => ({ default: m.SiteChat })),
41
41
  { ssr: false }
42
42
  );
43
43
  var LazySitePopups = dynamic(
44
- () => import('./SitePopups-KLUD6XIE.js').then((m) => ({ default: m.SitePopups })),
44
+ () => import('./SitePopups-K6ADAWFK.js').then((m) => ({ default: m.SitePopups })),
45
45
  { ssr: false }
46
46
  );
47
47
  var LazySiteDesignReporter = dynamic(
48
- () => import('./SiteDesignReporter-426TUCUF.js').then((m) => ({ default: m.SiteDesignReporter })),
48
+ () => import('./SiteDesignReporter-L2JBAKKK.js').then((m) => ({ default: m.SiteDesignReporter })),
49
49
  { ssr: false }
50
50
  );
51
51
  var LazySitemapSync = dynamic(
52
- () => import('./SitemapSync-QOIMV5GO.js').then((m) => ({ default: m.SitemapSync })),
52
+ () => import('./SitemapSync-VV2YSMIW.js').then((m) => ({ default: m.SitemapSync })),
53
53
  { ssr: false }
54
54
  );
55
55
  function SiteKitClientProviders({
@@ -3,7 +3,7 @@ import { DEFAULT_WIDGET_Z_INDEX } from './chunk-27FISYK4.js';
3
3
  import { readAnalyticsIdentity } from './chunk-5ROTTMBL.js';
4
4
  import { getOrCreateVisitorId } from './chunk-ZKADJNR2.js';
5
5
  import { resolveAnalyticsTarget } from './chunk-CAH4Y4PY.js';
6
- import { sonorFetch } from './chunk-55JLUMAC.js';
6
+ import { sonorFetch } from './chunk-727R7C5R.js';
7
7
  import { useState, useEffect, useCallback, useRef } from 'react';
8
8
  import ReactDOM from 'react-dom';
9
9
  import dynamic from 'next/dynamic';
@@ -161,7 +161,7 @@ function activatePopup(active, id, popups) {
161
161
  return [...active, id];
162
162
  }
163
163
  var LazyBlocksPopup = dynamic(
164
- () => import('./BlocksPopup-F636XNO4.js').then((m) => ({ default: m.BlocksPopup })),
164
+ () => import('./BlocksPopup-FJT5YQD3.js').then((m) => ({ default: m.BlocksPopup })),
165
165
  { ssr: false }
166
166
  );
167
167
  function SitePopups(props) {
@@ -26,7 +26,7 @@ function useFieldControls(fields) {
26
26
  }
27
27
  if (needsFile && !requested.current.file) {
28
28
  requested.current.file = true;
29
- import('./FileField-BUD2YGN5.js').then((m) => {
29
+ import('./FileField-OZXXJGUM.js').then((m) => {
30
30
  if (!cancelled) setControls((prev) => ({ ...prev, File: m.FileField }));
31
31
  }).catch(() => {
32
32
  requested.current.file = false;
@@ -7,7 +7,7 @@ import dynamic from 'next/dynamic';
7
7
  import { jsx } from 'react/jsx-runtime';
8
8
 
9
9
  var LazyChatWidget = dynamic(
10
- () => import('./ChatWidget-EQTLKPJX.js').then((m) => ({ default: m.ChatWidget })),
10
+ () => import('./ChatWidget-THQHHTAA.js').then((m) => ({ default: m.ChatWidget })),
11
11
  { ssr: false }
12
12
  );
13
13
  function SiteChat(props) {
@@ -1,4 +1,4 @@
1
1
  // src/shared/version.ts
2
- var SITE_KIT_VERSION = "8.0.1";
2
+ var SITE_KIT_VERSION = "8.2.0";
3
3
 
4
4
  export { SITE_KIT_VERSION };
@@ -6,7 +6,7 @@ import { DEFAULT_HONEYPOT_FIELD } from './chunk-NJCTQH2P.js';
6
6
  import React, { useRef, useEffect, useState, useMemo, useCallback } from 'react';
7
7
  import { jsx, jsxs } from 'react/jsx-runtime';
8
8
 
9
- var loadInteractiveForm = () => import('./ManagedForm-CQDQ4CUN.js').then((m) => m.ManagedForm);
9
+ var loadInteractiveForm = () => import('./ManagedForm-3VV54RVH.js').then((m) => m.ManagedForm);
10
10
  var REPLAY_WAIT_MS = 8e3;
11
11
  function FormEnhancer({
12
12
  formId,
@@ -1,8 +1,8 @@
1
1
  import { toHexColor, normalizeDesignTokens, designTokensHash } from './chunk-IHG36STL.js';
2
2
  import { contrastRatio, parseColor, relativeLuminance } from './chunk-S22FSH7C.js';
3
3
  import { resolveAnalyticsTarget } from './chunk-CAH4Y4PY.js';
4
- import { sonorFetch } from './chunk-55JLUMAC.js';
5
- import { SITE_KIT_VERSION } from './chunk-S5G3A7OZ.js';
4
+ import { sonorFetch } from './chunk-727R7C5R.js';
5
+ import { SITE_KIT_VERSION } from './chunk-Q72M5KBS.js';
6
6
 
7
7
  // src/website/design.ts
8
8
  var SITE_DESIGN_PATH = "/api/public/site/design";
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { locToPath, isMalformedSitemapPath, inferPageType } from './chunk-YVKRYQRG.js';
3
3
  import { resolveAnalyticsTarget } from './chunk-CAH4Y4PY.js';
4
- import { sonorFetch } from './chunk-55JLUMAC.js';
4
+ import { sonorFetch } from './chunk-727R7C5R.js';
5
5
  import { useRef, useEffect } from 'react';
6
6
 
7
7
  var SYNC_STAMP_KEY = "_sk_sitemap_synced_at";
@@ -2,8 +2,8 @@
2
2
  import { sanitizeFleetVersion, buildFleetHeartbeatPayload } from './chunk-ZTZQPYP6.js';
3
3
  import { useDeferredActivation } from './chunk-YC7ELZS3.js';
4
4
  import { resolveAnalyticsTarget } from './chunk-CAH4Y4PY.js';
5
- import { sonorFetch } from './chunk-55JLUMAC.js';
6
- import { SITE_KIT_VERSION } from './chunk-S5G3A7OZ.js';
5
+ import { sonorFetch } from './chunk-727R7C5R.js';
6
+ import { SITE_KIT_VERSION } from './chunk-Q72M5KBS.js';
7
7
  import { useRef, useEffect } from 'react';
8
8
 
9
9
  // src/fleet/heartbeat.ts
@@ -54,7 +54,7 @@ function useSignal() {
54
54
  return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
55
55
  }
56
56
  var LazySignalCore = dynamic(
57
- () => import('./SignalCore-RDQPM2L2.js').then((m) => ({ default: m.SignalCore })),
57
+ () => import('./SignalCore-T7ZOCA44.js').then((m) => ({ default: m.SignalCore })),
58
58
  { ssr: false }
59
59
  );
60
60
  function SignalBridge({
@@ -1,5 +1,5 @@
1
1
  import { secretsMatch, readCappedBody } from './chunk-XTRZGXB2.js';
2
- import { SITE_KIT_VERSION } from './chunk-S5G3A7OZ.js';
2
+ import { SITE_KIT_VERSION } from './chunk-Q72M5KBS.js';
3
3
 
4
4
  // src/llms/revalidate.ts
5
5
  function createLlmsRevalidateHandler(secret, options) {
@@ -1,5 +1,5 @@
1
1
  import { getClientApiConfig } from './chunk-3G7YABRA.js';
2
- import { sonorFetch } from './chunk-55JLUMAC.js';
2
+ import { sonorFetch } from './chunk-727R7C5R.js';
3
3
 
4
4
  // src/sync/api.ts
5
5
  function getApiConfig() {
@@ -7,7 +7,7 @@ import { DEFAULT_HONEYPOT_FIELD } from './chunk-NJCTQH2P.js';
7
7
  import { onPageLeave } from './chunk-L2V5PUFN.js';
8
8
  import { uuid } from './chunk-GJWI74ZZ.js';
9
9
  import { readPublishedApiConfig, getClientApiConfig } from './chunk-3G7YABRA.js';
10
- import { sonorFetch, sonorBeacon } from './chunk-55JLUMAC.js';
10
+ import { sonorFetch, sonorBeacon } from './chunk-727R7C5R.js';
11
11
  import { useRef, useCallback, useEffect, useState, useMemo } from 'react';
12
12
 
13
13
  // src/forms/field-interactions.ts
@@ -1,7 +1,7 @@
1
1
  import { trackedFreshFetch } from './chunk-UAYAJPEP.js';
2
2
  import { isNextControlFlow } from './chunk-C7TLGL3R.js';
3
3
  import { monotonicMs } from './chunk-MH2DSGC6.js';
4
- import { SITE_KIT_VERSION } from './chunk-S5G3A7OZ.js';
4
+ import { SITE_KIT_VERSION } from './chunk-Q72M5KBS.js';
5
5
  import 'server-only';
6
6
 
7
7
  var MINT_PATH = "/api/public/site-token";
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { publishSiteCredential } from '../chunk-6KUCA5HG.js';
2
+ import { publishSiteCredential } from '../chunk-5ZCY36TY.js';
3
3
  export { VISUAL_VIEWPORT_GAP_PROPERTY, VisualViewportGap, useVisualViewportGap } from '../chunk-6T6CQVNL.js';
4
4
  export { useDeferredActivation } from '../chunk-YC7ELZS3.js';
5
5
  import '../chunk-FESKKJAS.js';
@@ -8,8 +8,8 @@ export { trackConversion, trackEvent } from '../chunk-LCDVPAMR.js';
8
8
  export { getOrCreateSessionId, getOrCreateVisitorId, useSiteKitIdentity } from '../chunk-ZKADJNR2.js';
9
9
  import '../chunk-5TM3WPCI.js';
10
10
  import '../chunk-GJWI74ZZ.js';
11
- import '../chunk-IY6G67EF.js';
12
- import '../chunk-S5G3A7OZ.js';
11
+ import '../chunk-3EU6S5YC.js';
12
+ import '../chunk-Q72M5KBS.js';
13
13
  import '../chunk-PKBMQBKP.js';
14
14
 
15
15
  // src/client/SiteKitCredential.tsx
@@ -0,0 +1,39 @@
1
+ /** Shared article placement and source eligibility rules. Pure, server/client safe. */
2
+ export type EditorialPhotoPlacement = {
3
+ kind: 'after_intro';
4
+ } | {
5
+ kind: 'after_heading';
6
+ heading: string;
7
+ headingId?: string;
8
+ };
9
+ export type ArticlePhotoPlacementStatus = 'placed' | 'missing_heading' | 'ambiguous_heading' | 'no_paragraph' | 'already_present' | 'unassigned';
10
+ export interface EditorialHeadingTarget {
11
+ id: string;
12
+ text: string;
13
+ level: number;
14
+ eligible: boolean;
15
+ }
16
+ export declare function editorialPlainText(value: string): string;
17
+ /** A text identity, never a positional index. Editing the meaning requires a new assignment. */
18
+ export declare function editorialTextId(kind: 'section' | 'takeaway', text: string): string;
19
+ export declare function resolveArticlePhotoPlacements(html: string, photos?: Array<{
20
+ placement?: EditorialPhotoPlacement;
21
+ url?: string;
22
+ }>): {
23
+ headings: {
24
+ id: string;
25
+ text: string;
26
+ level: number;
27
+ eligible: boolean;
28
+ }[];
29
+ placements: {
30
+ index: number;
31
+ status: ArticlePhotoPlacementStatus;
32
+ offset?: number;
33
+ }[];
34
+ };
35
+ export declare const EDITORIAL_PHOTO_MIME_TYPES: readonly ['image/jpeg', 'image/jpg', 'image/png', 'image/webp', 'image/avif'];
36
+ export declare const EDITORIAL_PHOTO_MAX_BYTES: number;
37
+ /** The same generated-art path exclusion is used by the picker and source resolver. */
38
+ export declare const FINISHED_EDITORIAL_ART_PATHS: readonly ['Blog/Cards', 'Blog/Carousel', 'Broadcast/Cards', 'Broadcast/StylePreview', 'Reviews/Broadcast', 'Reviews/Photo', 'Reviews/StylePreview'];
39
+ export declare function isFinishedEditorialArtwork(path: string): boolean;
@@ -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'];
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'];
8
8
  export type ContractEntry = (typeof CONTRACT_ENTRIES)[number];
@@ -1,11 +1,11 @@
1
1
  'use client';
2
- export { FLEET_HEARTBEAT_PATH, FleetHeartbeat, detectNextVersion, sendFleetHeartbeat } from '../chunk-5GB2HHVJ.js';
2
+ export { FLEET_HEARTBEAT_PATH, FleetHeartbeat, detectNextVersion, sendFleetHeartbeat } from '../chunk-WSNG2K3T.js';
3
3
  export { FLEET_CONTRACT_VERSION, FLEET_MODULES, FLEET_MODULES_MAX, FLEET_SITE_MAX_LENGTH, FLEET_VERSION_MAX_LENGTH, FLEET_VERSION_PATTERN, buildFleetHeartbeatPayload, isFleetModule, normalizeFleetModules, normalizeFleetSite, sanitizeFleetVersion } from '../chunk-ZTZQPYP6.js';
4
4
  import '../chunk-YC7ELZS3.js';
5
5
  import '../chunk-CAH4Y4PY.js';
6
6
  import '../chunk-EKBEOXTH.js';
7
7
  import '../chunk-3G7YABRA.js';
8
- import '../chunk-55JLUMAC.js';
9
- import '../chunk-IY6G67EF.js';
10
- import '../chunk-S5G3A7OZ.js';
8
+ import '../chunk-727R7C5R.js';
9
+ import '../chunk-3EU6S5YC.js';
10
+ import '../chunk-Q72M5KBS.js';
11
11
  import '../chunk-PKBMQBKP.js';
@@ -1,12 +1,12 @@
1
1
  'use client';
2
- export { FormClient, ManagedForm } from '../chunk-7BSC6HF3.js';
2
+ export { FormClient, ManagedForm } from '../chunk-GWP2VBFH.js';
3
3
  export { DatePicker } from '../chunk-SOD2F6C2.js';
4
4
  export { FormCelebration } from '../chunk-YGGDU6C3.js';
5
- import '../chunk-JCFQGEG7.js';
6
- export { useForm, useFormTracking } from '../chunk-3222QBUS.js';
5
+ import '../chunk-JC2VS2SB.js';
6
+ export { useForm, useFormTracking } from '../chunk-YBAFUM3Z.js';
7
7
  import '../chunk-Q6E4OPGG.js';
8
8
  import '../chunk-5ROTTMBL.js';
9
- export { FormEnhancer } from '../chunk-GMXY2OOY.js';
9
+ export { FormEnhancer } from '../chunk-SMYX3AAO.js';
10
10
  import '../chunk-C2FZBUSS.js';
11
11
  import '../chunk-YC7ELZS3.js';
12
12
  import '../chunk-DXO6SBMD.js';
@@ -18,9 +18,9 @@ import '../chunk-L2V5PUFN.js';
18
18
  import '../chunk-5TM3WPCI.js';
19
19
  import '../chunk-GJWI74ZZ.js';
20
20
  import { readPublishedApiConfig } from '../chunk-3G7YABRA.js';
21
- import { sonorFetch } from '../chunk-55JLUMAC.js';
22
- import '../chunk-IY6G67EF.js';
23
- import '../chunk-S5G3A7OZ.js';
21
+ import { sonorFetch } from '../chunk-727R7C5R.js';
22
+ import '../chunk-3EU6S5YC.js';
23
+ import '../chunk-Q72M5KBS.js';
24
24
  import '../chunk-PKBMQBKP.js';
25
25
 
26
26
  // src/forms/formsApi.ts
@@ -1,5 +1,5 @@
1
- export { ServerForm, getFormConfig } from '../chunk-VQQV7FOX.js';
2
- import '../chunk-GMXY2OOY.js';
1
+ export { ServerForm, getFormConfig } from '../chunk-BQZPHICL.js';
2
+ import '../chunk-SMYX3AAO.js';
3
3
  import '../chunk-C2FZBUSS.js';
4
4
  import '../chunk-YC7ELZS3.js';
5
5
  export { StaticForm } from '../chunk-LNSF6BJC.js';
@@ -1,6 +1,6 @@
1
- export { ManagedImage, assignImageToSlot, clearImageSlot, fetchManagedImage, fetchManagedImages, listImageFiles, uploadImage } from '../chunk-6BXUSAOJ.js';
1
+ export { ManagedImage, assignImageToSlot, clearImageSlot, fetchManagedImage, fetchManagedImages, listImageFiles, uploadImage } from '../chunk-7FSB2EXS.js';
2
2
  export { ManagedFavicon, getManagedFaviconUrl } from '../chunk-GW7GSBO7.js';
3
- import '../chunk-55JLUMAC.js';
4
- import '../chunk-IY6G67EF.js';
5
- import '../chunk-S5G3A7OZ.js';
3
+ import '../chunk-727R7C5R.js';
4
+ import '../chunk-3EU6S5YC.js';
5
+ import '../chunk-Q72M5KBS.js';
6
6
  import '../chunk-PKBMQBKP.js';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { SITE_KIT_VERSION } from './chunk-S5G3A7OZ.js';
1
+ export { SITE_KIT_VERSION } from './chunk-Q72M5KBS.js';
2
2
  import './chunk-PKBMQBKP.js';
@@ -1,8 +1,8 @@
1
1
  'use client';
2
- export { SiteKitClientProviders } from '../chunk-EE6IG5GK.js';
2
+ export { SiteKitClientProviders } from '../chunk-I6QFPSUU.js';
3
3
  import '../chunk-6G43IRWR.js';
4
- import '../chunk-6KUCA5HG.js';
5
- import '../chunk-5GB2HHVJ.js';
4
+ import '../chunk-5ZCY36TY.js';
5
+ import '../chunk-WSNG2K3T.js';
6
6
  import '../chunk-ZTZQPYP6.js';
7
7
  import '../chunk-YC7ELZS3.js';
8
8
  import '../chunk-FESKKJAS.js';
@@ -13,8 +13,8 @@ import '../chunk-GJWI74ZZ.js';
13
13
  import '../chunk-CAH4Y4PY.js';
14
14
  import '../chunk-EKBEOXTH.js';
15
15
  import '../chunk-3G7YABRA.js';
16
- import '../chunk-55JLUMAC.js';
17
- import '../chunk-IY6G67EF.js';
18
- import '../chunk-S5G3A7OZ.js';
19
- import '../chunk-Z4MK4VOG.js';
16
+ import '../chunk-727R7C5R.js';
17
+ import '../chunk-3EU6S5YC.js';
18
+ import '../chunk-Q72M5KBS.js';
19
+ import '../chunk-WYZ4OUON.js';
20
20
  import '../chunk-PKBMQBKP.js';
@@ -1,11 +1,11 @@
1
- import { SiteKitClientProviders } from '../chunk-EE6IG5GK.js';
1
+ import { SiteKitClientProviders } from '../chunk-I6QFPSUU.js';
2
2
  import '../chunk-6G43IRWR.js';
3
- import '../chunk-6KUCA5HG.js';
4
- import '../chunk-5GB2HHVJ.js';
3
+ import '../chunk-5ZCY36TY.js';
4
+ import '../chunk-WSNG2K3T.js';
5
5
  import '../chunk-ZTZQPYP6.js';
6
6
  import { ManagedFavicon } from '../chunk-GW7GSBO7.js';
7
7
  import '../chunk-YC7ELZS3.js';
8
- import { resolveClientCredential } from '../chunk-H3SDOSVU.js';
8
+ import { resolveClientCredential } from '../chunk-ZM2FNWIQ.js';
9
9
  import '../chunk-UAYAJPEP.js';
10
10
  import { ManagedScripts } from '../chunk-MVLMXC44.js';
11
11
  import { resolveApiOrigin } from '../chunk-C7TLGL3R.js';
@@ -18,10 +18,10 @@ import '../chunk-GJWI74ZZ.js';
18
18
  import '../chunk-CAH4Y4PY.js';
19
19
  import '../chunk-EKBEOXTH.js';
20
20
  import '../chunk-3G7YABRA.js';
21
- import '../chunk-55JLUMAC.js';
22
- import '../chunk-IY6G67EF.js';
23
- import '../chunk-S5G3A7OZ.js';
24
- import '../chunk-Z4MK4VOG.js';
21
+ import '../chunk-727R7C5R.js';
22
+ import '../chunk-3EU6S5YC.js';
23
+ import '../chunk-Q72M5KBS.js';
24
+ import '../chunk-WYZ4OUON.js';
25
25
  import '../chunk-PKBMQBKP.js';
26
26
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
27
27
 
@@ -1,10 +1,10 @@
1
- export { createLLMsFullTxtHandler, createLLMsTxtHandler, formatSourcedFactsSection, llmsResponseHeaders } from '../chunk-M62U7TJF.js';
1
+ export { createLLMsFullTxtHandler, createLLMsTxtHandler, formatSourcedFactsSection, llmsResponseHeaders } from '../chunk-575L73NT.js';
2
2
  export { buildAiDiscoveryHeaders, wantsLlmsDiscoveryLink } from '../chunk-PO2TRJPY.js';
3
3
  export { AI_RETRIEVAL_CRAWLERS, AI_TRAINING_CRAWLERS, buildAiCrawlerRules, createRobotsTxtHandler } from '../chunk-QLTDFUJ7.js';
4
- export { LEGACY_PUBLICATION_PATH, SEO_REVALIDATION_MAX_BODY_BYTES, SEO_REVALIDATION_MAX_ITEMS, createLlmsRevalidateHandler, createSeoRevalidationHandler, parseSeoRevalidationPayload } from '../chunk-DWNS6ZJM.js';
4
+ export { LEGACY_PUBLICATION_PATH, SEO_REVALIDATION_MAX_BODY_BYTES, SEO_REVALIDATION_MAX_ITEMS, createLlmsRevalidateHandler, createSeoRevalidationHandler, parseSeoRevalidationPayload } from '../chunk-X7VKRHFF.js';
5
5
  export { AEOBlock, AEOCitedContent, AEOClaim, AEOComparison, AEODefinition, AEOEntity, AEOProvenanceList, AEOStep, AEOSteps, AEOSummary, DEFAULT_SPEAKABLE_SELECTORS, SpeakableSchema, createSpeakableSchema, getSpeakableSelectorsForPage } from '../chunk-PSAG45YF.js';
6
6
  import '../chunk-XTRZGXB2.js';
7
- export { AGENT_ACCESS_HEADING, appendAgentAccessSection, describesMcp, detectMcpServer, formatAgentAccessSection, generateLLMsFullTxt, generateLLMsTxt, writeLLMsTxtToPublic } from '../chunk-TZ5RTANX.js';
7
+ export { AGENT_ACCESS_HEADING, appendAgentAccessSection, describesMcp, detectMcpServer, formatAgentAccessSection, generateLLMsFullTxt, generateLLMsTxt, writeLLMsTxtToPublic } from '../chunk-WACWV5EP.js';
8
8
  export { getBusinessInfo, getFAQItems, getLLMsData, getOptimizedLLMsTxt, getPageSummaries, getServices } from '../chunk-JIH32RH2.js';
9
9
  import '../chunk-L5UOHS6E.js';
10
10
  import '../chunk-WMVK77ND.js';
@@ -16,5 +16,5 @@ import '../chunk-YVKRYQRG.js';
16
16
  import '../chunk-FESKKJAS.js';
17
17
  import '../chunk-A4CC4ZG3.js';
18
18
  import '../chunk-3G7YABRA.js';
19
- import '../chunk-S5G3A7OZ.js';
19
+ import '../chunk-Q72M5KBS.js';
20
20
  import '../chunk-PKBMQBKP.js';
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
  import { monotonicMs } from '../chunk-MH2DSGC6.js';
3
3
  import { getClientApiConfig } from '../chunk-3G7YABRA.js';
4
- import { sonorFetch } from '../chunk-55JLUMAC.js';
5
- import '../chunk-IY6G67EF.js';
6
- import '../chunk-S5G3A7OZ.js';
4
+ import { sonorFetch } from '../chunk-727R7C5R.js';
5
+ import '../chunk-3EU6S5YC.js';
6
+ import '../chunk-Q72M5KBS.js';
7
7
  import '../chunk-PKBMQBKP.js';
8
8
  import { useState, useCallback, useEffect } from 'react';
9
9
  import { APIProvider, Map as Map$1, AdvancedMarker, Pin, InfoWindow } from '@vis.gl/react-google-maps';