@sonordev/site-kit 8.1.0 → 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 (84) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/agent-manifest.json +1 -1
  3. package/dist/{AnalyticsProvider-UWTCE5UO.js → AnalyticsProvider-6TAA3XYB.js} +4 -4
  4. package/dist/{ArticleViewTracker-MYD6SGNH.js → ArticleViewTracker-H4N7YCLC.js} +3 -3
  5. package/dist/{BlocksPopup-OY5G3EFH.js → BlocksPopup-FJT5YQD3.js} +4 -4
  6. package/dist/{ChatWidget-BTR5VERC.js → ChatWidget-THQHHTAA.js} +5 -5
  7. package/dist/{FileField-DEHVYXAO.js → FileField-OZXXJGUM.js} +3 -3
  8. package/dist/{FormSpotlight-VGC4CZL4.js → FormSpotlight-MLDJS246.js} +1 -1
  9. package/dist/{FormStage-CJUSCSAL.js → FormStage-6RVY7M3R.js} +1 -1
  10. package/dist/{ManagedForm-JCI2KPMO.js → ManagedForm-3VV54RVH.js} +6 -6
  11. package/dist/{ManagedNewsletterForm-DTE4KKXV.js → ManagedNewsletterForm-RTJDGMGG.js} +4 -4
  12. package/dist/{SignalCore-LGCBQDEH.js → SignalCore-T7ZOCA44.js} +3 -3
  13. package/dist/{SiteChat-6SF7PVUT.js → SiteChat-JSHPGAE3.js} +1 -1
  14. package/dist/{SiteDesignReporter-VISQZ5NQ.js → SiteDesignReporter-L2JBAKKK.js} +5 -5
  15. package/dist/{SitePopups-T6YPHAVY.js → SitePopups-K6ADAWFK.js} +4 -4
  16. package/dist/{SitemapSync-VKMVRPZL.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-GGZOQG5X.js → article-styles-GFXJJDLE.js} +1 -1
  21. package/dist/articles/index.js +1 -1
  22. package/dist/articles/server-ui.js +6 -6
  23. package/dist/articles/server.js +2 -2
  24. package/dist/articles/types.d.ts +1 -0
  25. package/dist/chat/index.js +6 -6
  26. package/dist/{chunk-F2VYN3QL.js → chunk-3EU6S5YC.js} +1 -1
  27. package/dist/{chunk-AIDIEVPZ.js → chunk-575L73NT.js} +1 -1
  28. package/dist/{chunk-255NCCPB.js → chunk-57K4GW3D.js} +1 -1
  29. package/dist/{chunk-6VHDCJIZ.js → chunk-5ZCY36TY.js} +1 -1
  30. package/dist/{chunk-55GHBRCN.js → chunk-66G47P5C.js} +1 -1
  31. package/dist/{chunk-WPOFTCKL.js → chunk-727R7C5R.js} +2 -2
  32. package/dist/{chunk-ADI6IYFH.js → chunk-7FSB2EXS.js} +1 -1
  33. package/dist/{chunk-O4DETQJI.js → chunk-BQZPHICL.js} +1 -1
  34. package/dist/{chunk-TAO6BVA2.js → chunk-EBILJHUF.js} +1 -1
  35. package/dist/{chunk-4Z3DI2EL.js → chunk-FQUGGPBM.js} +1 -1
  36. package/dist/{chunk-CSTC6HZO.js → chunk-FVXFLVXF.js} +2 -2
  37. package/dist/{chunk-5L467Z5Q.js → chunk-GWP2VBFH.js} +3 -3
  38. package/dist/{chunk-G2HCCWZQ.js → chunk-H4R2GPAB.js} +1 -1
  39. package/dist/{chunk-2UO4HPGE.js → chunk-HUBMKTPW.js} +73 -51
  40. package/dist/{chunk-DOMBP3FW.js → chunk-I6QFPSUU.js} +8 -8
  41. package/dist/{chunk-LLW5HKEE.js → chunk-JBEUZJS3.js} +2 -2
  42. package/dist/{chunk-XUCU3LX4.js → chunk-JC2VS2SB.js} +1 -1
  43. package/dist/{chunk-A3EU6HB5.js → chunk-NNEIBXGU.js} +1 -1
  44. package/dist/{chunk-NWVB75ER.js → chunk-Q72M5KBS.js} +1 -1
  45. package/dist/{chunk-JT52KYHQ.js → chunk-SMYX3AAO.js} +1 -1
  46. package/dist/{chunk-DSNCU2E3.js → chunk-WBC5B3JD.js} +2 -2
  47. package/dist/{chunk-IAYGTQJD.js → chunk-WK3N3Y7V.js} +1 -1
  48. package/dist/{chunk-RSBMQFZW.js → chunk-WSNG2K3T.js} +2 -2
  49. package/dist/{chunk-DZV3KPVF.js → chunk-WYZ4OUON.js} +1 -1
  50. package/dist/{chunk-V56RZH7J.js → chunk-X7VKRHFF.js} +1 -1
  51. package/dist/{chunk-2JEUDTL6.js → chunk-XWIRU6UT.js} +1 -1
  52. package/dist/{chunk-S6IGQYHW.js → chunk-YBAFUM3Z.js} +1 -1
  53. package/dist/{chunk-47VB5INH.js → chunk-ZM2FNWIQ.js} +1 -1
  54. package/dist/client/index.js +3 -3
  55. package/dist/contracts/editorial-media.d.ts +39 -0
  56. package/dist/contracts/entries.d.ts +1 -1
  57. package/dist/fleet/index.js +4 -4
  58. package/dist/forms/index.js +7 -7
  59. package/dist/forms/server.js +2 -2
  60. package/dist/images/index.js +4 -4
  61. package/dist/index.js +1 -1
  62. package/dist/layout/client.js +7 -7
  63. package/dist/layout/index.js +8 -8
  64. package/dist/llms/index.js +4 -4
  65. package/dist/maps/index.js +3 -3
  66. package/dist/mcp/sonor.js +8 -8
  67. package/dist/revalidate/index.js +2 -2
  68. package/dist/runtime/index.js +3 -3
  69. package/dist/seo/client.js +4 -4
  70. package/dist/seo/index.js +4 -4
  71. package/dist/seo/llms.js +4 -4
  72. package/dist/seo/register-sitemap-cli.js +1 -1
  73. package/dist/seo/sitemap.js +2 -2
  74. package/dist/server/index.js +2 -2
  75. package/dist/shared/version.d.ts +1 -1
  76. package/dist/signal/index.js +2 -2
  77. package/dist/sitemap/index.js +2 -2
  78. package/dist/sync/index.js +5 -5
  79. package/dist/website/images.js +4 -4
  80. package/dist/website/index.js +5 -5
  81. package/dist/website/popups.js +4 -4
  82. package/dist/{writeLLMsTxt-OS2WBSLM.js → writeLLMsTxt-DGKLYXIW.js} +1 -1
  83. package/package.json +1 -1
  84. /package/dist/{chunk-GC2QWXJ3.js → chunk-WACWV5EP.js} +0 -0
@@ -1,10 +1,9 @@
1
- // src/articles/article-photos.ts
1
+ // src/contracts/editorial-media.ts
2
2
  var voidElements = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"]);
3
3
  var rawElements = /* @__PURE__ */ new Set(["pre", "code", "script", "style", "textarea", "xmp", "template"]);
4
4
  var excludedAncestors = /* @__PURE__ */ new Set(["figure", "table", "ul", "ol", "blockquote", "aside", "nav", "header", "footer"]);
5
5
  var tags = () => /<!--[\s\S]*?(?:-->|$)|<\/?[a-z][\w:-]*(?=[\s/>])(?:[^"'<>]|"[^"]*"|'[^']*')*>/gi;
6
- var escape = (value) => value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
7
- function headingText(value) {
6
+ function editorialPlainText(value) {
8
7
  const entities = { amp: "&", lt: "<", gt: ">", quot: '"', apos: "'", nbsp: " ", rsquo: "\u2019", lsquo: "\u2018", ldquo: "\u201C", rdquo: "\u201D", ndash: "\u2013", mdash: "\u2014" };
9
8
  return value.replace(/<!--[\s\S]*?-->/g, "").replace(tags(), "").replace(/&(#x[\da-f]+|#\d+|[a-z]+);/gi, (full, entity) => {
10
9
  if (!entity.startsWith("#")) return entities[entity.toLowerCase()] ?? full;
@@ -12,31 +11,24 @@ function headingText(value) {
12
11
  return number > 0 && number <= 1114111 ? String.fromCodePoint(number) : full;
13
12
  }).replace(/\s+/g, " ").trim();
14
13
  }
15
- function photoUrl(value) {
16
- if (typeof value !== "string" || value.length > 2e3 || /[\s\\]/.test(value)) return null;
17
- try {
18
- const url = new URL(value);
19
- if (url.protocol !== "https:" || url.username || url.password || /\/Blog\/(Cards|Carousel)\//i.test(decodeURIComponent(url.pathname))) return null;
20
- return url.href;
21
- } catch {
22
- return null;
23
- }
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}`;
24
19
  }
25
- function figure(photo, index) {
26
- const url = photoUrl(photo.url);
27
- if (!url || typeof photo.alt !== "string" || !photo.alt.trim() || photo.alt.length > 300) return null;
28
- if (![photo.width, photo.height].every((n) => Number.isInteger(n) && n > 0 && n <= 2400)) return null;
29
- const caption = typeof photo.caption === "string" && photo.caption.trim() ? `<figcaption>${escape(photo.caption.slice(0, 300))}</figcaption>` : "";
30
- 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>`;
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;
31
25
  }
32
- function insertArticlePhotos(html, photos) {
33
- if (!html || !Array.isArray(photos) || !photos.length) return html;
26
+ function resolveArticlePhotoPlacements(html, photos = []) {
34
27
  const pattern = tags();
35
28
  const stack = [];
36
29
  const headings = [];
37
30
  const paragraphs = [];
38
- const existing = /* @__PURE__ */ new Set();
39
- const existingSlots = /* @__PURE__ */ new Set();
31
+ const existing = /* @__PURE__ */ new Set(), existingSlots = /* @__PURE__ */ new Set();
40
32
  let token;
41
33
  while (token = pattern.exec(html)) {
42
34
  const tag = token[0];
@@ -47,8 +39,9 @@ function insertArticlePhotos(html, photos) {
47
39
  if (at < 0) continue;
48
40
  const frame = stack[at];
49
41
  if (frame.eligible) {
50
- if (/^h[1-6]$/.test(name)) headings.push({ text: headingText(html.slice(frame.inner, token.index)), start: frame.start, end: pattern.lastIndex, level: Number(name[1]) });
51
- if (name === "p" && headingText(html.slice(frame.inner, token.index))) paragraphs.push({ start: frame.start, end: pattern.lastIndex });
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 });
52
45
  }
53
46
  stack.length = at;
54
47
  continue;
@@ -60,39 +53,68 @@ function insertArticlePhotos(html, photos) {
60
53
  pattern.lastIndex = closing.lastIndex;
61
54
  continue;
62
55
  }
63
- const attrs = tag.replace(/^<[\w:-]+/, "").replace(/\/?>$/, "");
64
- for (const match of attrs.matchAll(/([^\s=/>]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g)) {
65
- const key = match[1].toLowerCase(), value = match[2] ?? match[3] ?? match[4] ?? "";
66
- if (name === "img" && key === "src") existing.add(headingText(value));
67
- if (name === "figure" && key === "data-sk-editorial-photo" && /^\d+$/.test(value)) existingSlots.add(Number(value));
68
- }
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")));
69
59
  if (voidElements.has(name) || /\/\s*>$/.test(tag)) continue;
70
- stack.push({ name, start: token.index, inner: pattern.lastIndex, eligible: !stack.some((frame) => excludedAncestors.has(frame.name)) });
60
+ stack.push({ name, start: token.index, inner: pattern.lastIndex, id: attrs.get("id"), eligible: !stack.some((frame) => excludedAncestors.has(frame.name)) });
71
61
  }
72
- const additions = /* @__PURE__ */ new Map();
73
- photos.slice(0, 8).forEach((photo, index) => {
74
- if (!photo || existingSlots.has(index)) return;
75
- const rendered = figure(photo, index);
76
- const url = photoUrl(photo.url);
77
- if (!rendered || !url || existing.has(url)) return;
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" };
78
69
  let paragraph;
79
70
  if (photo.placement?.kind === "after_intro") {
80
- const firstSection = headings.find((heading) => heading.level > 1);
71
+ const firstSection = headings.find((h) => h.level > 1);
81
72
  paragraph = paragraphs.find((p) => !firstSection || p.start < firstSection.start);
82
- } else if (photo.placement?.kind === "after_heading" && typeof photo.placement.heading === "string") {
83
- const expectedHeading = headingText(photo.placement.heading);
84
- const matches = headings.filter((heading2) => heading2.text === expectedHeading);
85
- if (matches.length !== 1) return;
86
- const heading = matches[0];
87
- const next = headings.find((item) => item.start > heading.start);
88
- paragraph = paragraphs.find((p) => p.start >= heading.end && (!next || p.end < next.start));
89
- }
90
- if (!paragraph) return;
91
- const images = additions.get(paragraph.end) || [];
92
- images.push(rendered);
93
- additions.set(paragraph.end, images);
94
- existing.add(url);
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 };
95
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
+ }
96
118
  let result = html;
97
119
  for (const [offset, images] of [...additions].sort(([a], [b]) => b - a)) result = result.slice(0, offset) + images.join("") + result.slice(offset);
98
120
  return result;
@@ -1,12 +1,12 @@
1
1
  'use client';
2
2
  import { SITE_EDIT_PARAM } from './chunk-6G43IRWR.js';
3
- import { publishSiteCredential } from './chunk-6VHDCJIZ.js';
4
- import { FleetHeartbeat } from './chunk-RSBMQFZW.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-DZV3KPVF.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-UWTCE5UO.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-6SF7PVUT.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-T6YPHAVY.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-VISQZ5NQ.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-VKMVRPZL.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-WPOFTCKL.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-OY5G3EFH.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-DEHVYXAO.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-BTR5VERC.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.1.0";
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-JCI2KPMO.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-WPOFTCKL.js';
5
- import { SITE_KIT_VERSION } from './chunk-NWVB75ER.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-WPOFTCKL.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-WPOFTCKL.js';
6
- import { SITE_KIT_VERSION } from './chunk-NWVB75ER.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-LGCBQDEH.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-NWVB75ER.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-WPOFTCKL.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-WPOFTCKL.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-NWVB75ER.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-6VHDCJIZ.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-F2VYN3QL.js';
12
- import '../chunk-NWVB75ER.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-RSBMQFZW.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-WPOFTCKL.js';
9
- import '../chunk-F2VYN3QL.js';
10
- import '../chunk-NWVB75ER.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-5L467Z5Q.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-XUCU3LX4.js';
6
- export { useForm, useFormTracking } from '../chunk-S6IGQYHW.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-JT52KYHQ.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-WPOFTCKL.js';
22
- import '../chunk-F2VYN3QL.js';
23
- import '../chunk-NWVB75ER.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-O4DETQJI.js';
2
- import '../chunk-JT52KYHQ.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-ADI6IYFH.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-WPOFTCKL.js';
4
- import '../chunk-F2VYN3QL.js';
5
- import '../chunk-NWVB75ER.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-NWVB75ER.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-DOMBP3FW.js';
2
+ export { SiteKitClientProviders } from '../chunk-I6QFPSUU.js';
3
3
  import '../chunk-6G43IRWR.js';
4
- import '../chunk-6VHDCJIZ.js';
5
- import '../chunk-RSBMQFZW.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-WPOFTCKL.js';
17
- import '../chunk-F2VYN3QL.js';
18
- import '../chunk-NWVB75ER.js';
19
- import '../chunk-DZV3KPVF.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-DOMBP3FW.js';
1
+ import { SiteKitClientProviders } from '../chunk-I6QFPSUU.js';
2
2
  import '../chunk-6G43IRWR.js';
3
- import '../chunk-6VHDCJIZ.js';
4
- import '../chunk-RSBMQFZW.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-47VB5INH.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-WPOFTCKL.js';
22
- import '../chunk-F2VYN3QL.js';
23
- import '../chunk-NWVB75ER.js';
24
- import '../chunk-DZV3KPVF.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-AIDIEVPZ.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-V56RZH7J.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-GC2QWXJ3.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-NWVB75ER.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-WPOFTCKL.js';
5
- import '../chunk-F2VYN3QL.js';
6
- import '../chunk-NWVB75ER.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';