@sonordev/site-kit 7.1.2 → 7.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 (167) hide show
  1. package/AGENTS.md +1 -1
  2. package/CHANGELOG.md +51 -0
  3. package/README.md +9 -8
  4. package/agent-manifest.json +12 -4
  5. package/dist/{AnalyticsProvider-ZB33W6MC.js → AnalyticsProvider-SLFFBRPE.js} +4 -4
  6. package/dist/{ArticleViewTracker-GMHYLLLZ.js → ArticleViewTracker-TM5AMGN2.js} +3 -3
  7. package/dist/{BlocksPopup-EA6LYL25.js → BlocksPopup-YJNJIVPO.js} +5 -5
  8. package/dist/ChatWidget-XKOSH66S.js +17 -0
  9. package/dist/{FileField-QKA3JB2Q.js → FileField-CI4UL5SH.js} +3 -3
  10. package/dist/{FormSpotlight-AQTIA5TP.js → FormSpotlight-F2AAEGBN.js} +20 -6
  11. package/dist/{FormStage-FDTLTP3B.js → FormStage-BI5R5CNC.js} +27 -7
  12. package/dist/ManagedForm-G6COGHXL.js +16 -0
  13. package/dist/{ManagedNewsletterForm-J6QSAGGP.js → ManagedNewsletterForm-BO3WCGXX.js} +7 -5
  14. package/dist/{SignalCore-JZNXOLNT.js → SignalCore-ZA6WHKBR.js} +3 -3
  15. package/dist/SiteChat-YJADDTKG.js +5 -0
  16. package/dist/{SiteDesignReporter-W4EJUSTE.js → SiteDesignReporter-5YAW36AQ.js} +5 -5
  17. package/dist/SitePopups-ST5PMKZE.js +10 -0
  18. package/dist/SitemapSync-RJTEBINX.js +8 -0
  19. package/dist/_client/booking-widget.js +5 -5
  20. package/dist/affiliates/index.js +3 -3
  21. package/dist/analytics/index.js +4 -4
  22. package/dist/analytics/send-gate.d.ts +1 -1
  23. package/dist/articles/index.js +2 -2
  24. package/dist/articles/server-ui.js +3 -2
  25. package/dist/articles/server.js +2 -1
  26. package/dist/{engage → chat}/ChatWidget.d.ts +7 -6
  27. package/dist/{engage → chat}/EchoUiActions.d.ts +1 -1
  28. package/dist/chat/SiteChat.d.ts +25 -0
  29. package/dist/{engage → chat}/brand-color.d.ts +1 -1
  30. package/dist/{engage → chat}/chat-messages.d.ts +1 -1
  31. package/dist/{engage → chat}/echo-config.d.ts +1 -1
  32. package/dist/chat/index.d.ts +10 -6
  33. package/dist/chat/index.js +14 -8
  34. package/dist/{engage → chat}/launcher-placement.d.ts +1 -7
  35. package/dist/{engage → chat}/socket-loader.d.ts +2 -2
  36. package/dist/chat/types.d.ts +136 -0
  37. package/dist/chunk-27FISYK4.js +4 -0
  38. package/dist/{chunk-LUXVWITO.js → chunk-4NTBQNHA.js} +247 -78
  39. package/dist/{chunk-V3PUVBME.js → chunk-5V2V5C3Y.js} +2 -4
  40. package/dist/{chunk-Q4W23JYM.js → chunk-5YCEMV2L.js} +1 -1
  41. package/dist/{chunk-RHNWA34F.js → chunk-64DKGVEI.js} +41 -7
  42. package/dist/{chunk-GLHQ3LRO.js → chunk-6U3VLV2C.js} +1 -1
  43. package/dist/{chunk-WWSHFRDL.js → chunk-BC4Y3S3D.js} +1 -1
  44. package/dist/{chunk-JSZN6LDZ.js → chunk-BF7TZYC3.js} +38 -31
  45. package/dist/{chunk-M3YEPKP7.js → chunk-BKY2ZNM7.js} +1 -1
  46. package/dist/{chunk-AQSNPZY4.js → chunk-C2FZBUSS.js} +80 -1
  47. package/dist/{chunk-NK4CSJNP.js → chunk-CF5QNFYU.js} +2 -2
  48. package/dist/{chunk-D5EC5KVO.js → chunk-D5DCBD4Y.js} +2 -2
  49. package/dist/{chunk-3SDOQUUF.js → chunk-D6ZC7XKZ.js} +2 -2
  50. package/dist/chunk-EJVQJCG5.js +370 -0
  51. package/dist/{chunk-AH5Q262S.js → chunk-F24FNCTK.js} +1 -1
  52. package/dist/{chunk-V6FDQLR7.js → chunk-FR6BYFPC.js} +53 -21
  53. package/dist/{chunk-UXOGCKL6.js → chunk-GEXT7BTE.js} +1 -1
  54. package/dist/{chunk-JTU2GOM4.js → chunk-GGORNBSC.js} +18 -6
  55. package/dist/{chunk-ERXXITG4.js → chunk-HGFAEDG3.js} +1 -1
  56. package/dist/chunk-HODO5BX5.js +28 -0
  57. package/dist/chunk-HW7B43E5.js +14 -0
  58. package/dist/{chunk-CSTQDNGK.js → chunk-IAM3D3RL.js} +43 -24
  59. package/dist/{chunk-PGMVL4AB.js → chunk-JJ3DELUL.js} +2 -2
  60. package/dist/{chunk-ILU5I6RW.js → chunk-JMLK6MH7.js} +1 -1
  61. package/dist/{chunk-YEMPUQVU.js → chunk-JWTQS5F5.js} +2 -2
  62. package/dist/{chunk-VDF5DFWT.js → chunk-K4ZHAURD.js} +1 -1
  63. package/dist/chunk-NV72HZ4W.js +45 -0
  64. package/dist/{chunk-4Y5FWDPM.js → chunk-NZ4RXN3G.js} +55 -7
  65. package/dist/chunk-OWZ7ATLZ.js +187 -0
  66. package/dist/{chunk-TXBAOEKG.js → chunk-PKGN32AU.js} +5 -4
  67. package/dist/chunk-Q6E4OPGG.js +40 -0
  68. package/dist/{chunk-QEDHRBAT.js → chunk-QL6XNPSD.js} +2 -2
  69. package/dist/{chunk-JBE46QJZ.js → chunk-R46IQIGK.js} +1 -1
  70. package/dist/{chunk-6WIQCXOO.js → chunk-RPZ7OQGD.js} +1 -1
  71. package/dist/{chunk-PHYMNUJU.js → chunk-S54ECQGY.js} +1 -1
  72. package/dist/{chunk-VGH4MDTU.js → chunk-VHKEF5ZB.js} +1 -1
  73. package/dist/{chunk-HF57LG73.js → chunk-VO3JYRT5.js} +43 -29
  74. package/dist/chunk-VWWITFWM.js +300 -0
  75. package/dist/{chunk-CIG5UL2S.js → chunk-ZTLMPUO6.js} +3 -2
  76. package/dist/client/index.js +3 -3
  77. package/dist/commerce/index.js +4 -4
  78. package/dist/contracts/color.d.ts +1 -1
  79. package/dist/contracts/entries.d.ts +1 -1
  80. package/dist/contracts/error-page.d.ts +183 -0
  81. package/dist/contracts/llms.d.ts +1 -0
  82. package/dist/contracts/proposal-sitemap.d.ts +130 -0
  83. package/dist/contracts/schema-placeholders.d.ts +87 -0
  84. package/dist/engage/EngageWidget.d.ts +13 -12
  85. package/dist/engage/index.d.ts +10 -9
  86. package/dist/engage/index.js +31 -35
  87. package/dist/engage/types.d.ts +19 -244
  88. package/dist/fleet/FleetHeartbeat.d.ts +1 -1
  89. package/dist/fleet/index.js +4 -4
  90. package/dist/forms/FormEnhancer.d.ts +25 -12
  91. package/dist/forms/ServerForm.d.ts +11 -10
  92. package/dist/forms/StaticForm.d.ts +3 -1
  93. package/dist/forms/field-autocomplete.d.ts +28 -0
  94. package/dist/forms/form-dom-values.d.ts +42 -0
  95. package/dist/forms/index.js +11 -9
  96. package/dist/forms/server.js +6 -4
  97. package/dist/forms/static.js +3 -2
  98. package/dist/forms/submitForm.d.ts +8 -1
  99. package/dist/forms/types.d.ts +41 -2
  100. package/dist/forms/useForm.d.ts +21 -4
  101. package/dist/forms/webmcp.d.ts +38 -0
  102. package/dist/images/index.js +4 -4
  103. package/dist/index.d.ts +4 -1
  104. package/dist/index.js +1 -1
  105. package/dist/layout/SiteKitClientProviders.d.ts +3 -3
  106. package/dist/layout/SiteKitLayout.d.ts +4 -4
  107. package/dist/layout/client.d.ts +3 -3
  108. package/dist/layout/client.js +7 -7
  109. package/dist/layout/index.js +8 -8
  110. package/dist/layout/types.d.ts +5 -4
  111. package/dist/llms/contract.js +1 -1
  112. package/dist/llms/index.js +6 -6
  113. package/dist/maps/index.js +3 -3
  114. package/dist/mcp/index.js +2 -14
  115. package/dist/mcp/sonor.js +14 -11
  116. package/dist/revalidate/index.js +2 -2
  117. package/dist/seo/client.js +4 -4
  118. package/dist/seo/index.js +15 -8
  119. package/dist/seo/llms/contract.js +1 -1
  120. package/dist/seo/llms.js +6 -6
  121. package/dist/seo/register-sitemap-cli.js +1 -1
  122. package/dist/seo/sitemap.js +4 -4
  123. package/dist/server/index.js +2 -2
  124. package/dist/shared/dialog.d.ts +27 -0
  125. package/dist/shared/identity.d.ts +1 -1
  126. package/dist/shared/layers.d.ts +7 -0
  127. package/dist/shared/mid-form.d.ts +53 -0
  128. package/dist/shared/reporting-gate.d.ts +1 -1
  129. package/dist/shared/version.d.ts +1 -1
  130. package/dist/shared/visual-viewport-gap.d.ts +1 -1
  131. package/dist/signal/index.js +2 -2
  132. package/dist/signal/types.d.ts +1 -1
  133. package/dist/sitemap/index.js +4 -4
  134. package/dist/{socket-loader-R24ZSRSQ.js → socket-loader-CGIPEG74.js} +1 -1
  135. package/dist/sync/index.js +5 -5
  136. package/dist/types.d.ts +3 -1
  137. package/dist/{web-vitals.attribution-GD6LGLVF.js → web-vitals.attribution-N2PCCF4Q.js} +1 -1
  138. package/dist/website/BlocksPopup.d.ts +1 -1
  139. package/dist/website/PopupBlocks.d.ts +5 -2
  140. package/dist/website/SitePopups.d.ts +25 -0
  141. package/dist/website/images.js +4 -4
  142. package/dist/website/index.js +6 -6
  143. package/dist/website/popup-rules.d.ts +46 -0
  144. package/dist/website/popup-types.d.ts +113 -0
  145. package/dist/website/popups.d.ts +2 -6
  146. package/dist/website/popups.js +6 -14
  147. package/dist/{writeLLMsTxt-G3JBNBC5.js → writeLLMsTxt-OV24LQVL.js} +3 -3
  148. package/docs/MIGRATING-TO-7.md +41 -9
  149. package/docs.json +2 -1
  150. package/package.json +2 -2
  151. package/src/analytics/README.md +2 -2
  152. package/src/articles/README.md +4 -1
  153. package/src/{engage → chat}/README.md +63 -62
  154. package/src/forms/README.md +49 -3
  155. package/src/layout/README.md +8 -5
  156. package/src/seo/README.md +3 -1
  157. package/src/sync/README.md +10 -0
  158. package/src/website/README.md +133 -0
  159. package/dist/ChatWidget-UCDWMWCW.js +0 -15
  160. package/dist/EngageWidget-7ZYSK4GE.js +0 -11
  161. package/dist/ManagedForm-H7BVAH2W.js +0 -14
  162. package/dist/SitemapSync-XBANGKHZ.js +0 -8
  163. package/dist/chunk-NDF4A5JM.js +0 -37
  164. package/dist/chunk-VLARKWZU.js +0 -100
  165. package/dist/chunk-YCJT4JJG.js +0 -837
  166. package/dist/engage/DesignRenderer.d.ts +0 -57
  167. package/dist/engage/element-rules.d.ts +0 -38
@@ -0,0 +1,40 @@
1
+ import { declarativeToolForm } from './chunk-HW7B43E5.js';
2
+
3
+ // src/forms/webmcp.ts
4
+ var DESCRIPTION_BY_TYPE = {
5
+ prospect: "Send this business an inquiry: a question, a quote request or a project to discuss.",
6
+ contact: "Send this business a message through its contact form.",
7
+ support: "Ask this business for help with an existing order, project or account.",
8
+ feedback: "Send this business feedback.",
9
+ newsletter: "Sign an email address up for this business's newsletter.",
10
+ custom: "Submit this form to the business."
11
+ };
12
+ function formToolName(config) {
13
+ const base = String(config.slug || "").toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
14
+ return `submit_${base || "form"}`.slice(0, 64);
15
+ }
16
+ function formToolDescription(config) {
17
+ const lead = DESCRIPTION_BY_TYPE[config.form_type] ?? DESCRIPTION_BY_TYPE.custom;
18
+ const named = config.name ? ` The form is called "${config.name}".` : "";
19
+ const extra = typeof config.description === "string" ? config.description.trim() : "";
20
+ return `${lead}${named}${extra ? ` ${extra}` : ""}`.slice(0, 500);
21
+ }
22
+ function formToolAttributes(config) {
23
+ return declarativeToolForm({ name: formToolName(config), description: formToolDescription(config) });
24
+ }
25
+ function readAgentSubmit(event) {
26
+ const fields = event ?? {};
27
+ const invoked = fields.agentInvoked === true;
28
+ return {
29
+ invoked,
30
+ respond: (outcome) => {
31
+ if (!invoked || typeof fields.respondWith !== "function") return;
32
+ try {
33
+ fields.respondWith.call(event, outcome);
34
+ } catch {
35
+ }
36
+ }
37
+ };
38
+ }
39
+
40
+ export { formToolAttributes, readAgentSubmit };
@@ -1,8 +1,8 @@
1
- import { getLLMsData, getOptimizedLLMsTxt } from './chunk-GLHQ3LRO.js';
1
+ import { getLLMsData, getOptimizedLLMsTxt } from './chunk-6U3VLV2C.js';
2
2
  import { linkClassificationHost } from './chunk-L5UOHS6E.js';
3
3
  import { resolveArticleUrl } from './chunk-WMVK77ND.js';
4
4
  import { freshFetch } from './chunk-VX5CMNMM.js';
5
- import { LLM_GEO_CONTRACT_VERSION, sanitizePrimaryLanguageTag, sanitizeLlmsDisclaimerLine, sanitizeLlmsPublicSummary } from './chunk-4Y5FWDPM.js';
5
+ import { LLM_GEO_CONTRACT_VERSION, sanitizePrimaryLanguageTag, sanitizeLlmsDisclaimerLine, sanitizeLlmsPublicSummary } from './chunk-NZ4RXN3G.js';
6
6
  import { resolveTrailingSlash, applyTrailingSlash } from './chunk-YVKRYQRG.js';
7
7
  import { resolveSiteHost } from './chunk-FESKKJAS.js';
8
8
  import { readFileSync, existsSync, mkdirSync, writeFileSync, renameSync, unlinkSync, readdirSync } from 'fs';
@@ -1,5 +1,5 @@
1
1
  import { getSiteConfig } from './chunk-Z22QVHT4.js';
2
- import { writeLLMsTxtToPublic } from './chunk-QEDHRBAT.js';
2
+ import { writeLLMsTxtToPublic } from './chunk-QL6XNPSD.js';
3
3
  import { buildFetch } from './chunk-VX5CMNMM.js';
4
4
  import { findAppDirForDiscovery } from './chunk-ZEGVKVD5.js';
5
5
  import { stripEmbeddedDomain, locToPath, inferPageType, isMalformedSitemapPath, resolveTrailingSlash, stripTrailingSlash, llmsWriteTimeoutMs, applyTrailingSlash } from './chunk-YVKRYQRG.js';
@@ -1,6 +1,6 @@
1
1
  import { resolveFetch } from './chunk-VX5CMNMM.js';
2
2
  import { monotonicMs } from './chunk-MH2DSGC6.js';
3
- import { SITE_KIT_VERSION } from './chunk-AH5Q262S.js';
3
+ import { SITE_KIT_VERSION } from './chunk-F24FNCTK.js';
4
4
  import 'server-only';
5
5
 
6
6
  var MINT_PATH = "/api/public/site-token";
@@ -54,7 +54,7 @@ function useSignal() {
54
54
  return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
55
55
  }
56
56
  var LazySignalCore = dynamic(
57
- () => import('./SignalCore-JZNXOLNT.js').then((m) => ({ default: m.SignalCore })),
57
+ () => import('./SignalCore-ZA6WHKBR.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-AH5Q262S.js';
2
+ import { SITE_KIT_VERSION } from './chunk-F24FNCTK.js';
3
3
 
4
4
  // src/llms/revalidate.ts
5
5
  function createLlmsRevalidateHandler(secret, options) {
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import { SITE_EDIT_PARAM } from './chunk-6G43IRWR.js';
3
- import { publishSiteCredential } from './chunk-ERXXITG4.js';
4
- import { FleetHeartbeat } from './chunk-NK4CSJNP.js';
5
- import { SignalBridge } from './chunk-PHYMNUJU.js';
3
+ import { publishSiteCredential } from './chunk-HGFAEDG3.js';
4
+ import { FleetHeartbeat } from './chunk-CF5QNFYU.js';
5
+ import { SignalBridge } from './chunk-S54ECQGY.js';
6
6
  import { useDeferredActivation } from './chunk-YC7ELZS3.js';
7
7
  import { resolveSiteHost } from './chunk-FESKKJAS.js';
8
8
  import { getOrCreateVisitorId, getOrCreateSessionId } from './chunk-24QZEO3Q.js';
@@ -33,19 +33,23 @@ function startEditBridge() {
33
33
  };
34
34
  }
35
35
  var LazyAnalyticsProvider = dynamic(
36
- () => import('./AnalyticsProvider-ZB33W6MC.js').then((m) => ({ default: m.AnalyticsProvider })),
36
+ () => import('./AnalyticsProvider-SLFFBRPE.js').then((m) => ({ default: m.AnalyticsProvider })),
37
37
  { ssr: false }
38
38
  );
39
- var LazyEngageWidget = dynamic(
40
- () => import('./EngageWidget-7ZYSK4GE.js').then((m) => ({ default: m.EngageWidget })),
39
+ var LazySiteChat = dynamic(
40
+ () => import('./SiteChat-YJADDTKG.js').then((m) => ({ default: m.SiteChat })),
41
+ { ssr: false }
42
+ );
43
+ var LazySitePopups = dynamic(
44
+ () => import('./SitePopups-ST5PMKZE.js').then((m) => ({ default: m.SitePopups })),
41
45
  { ssr: false }
42
46
  );
43
47
  var LazySiteDesignReporter = dynamic(
44
- () => import('./SiteDesignReporter-W4EJUSTE.js').then((m) => ({ default: m.SiteDesignReporter })),
48
+ () => import('./SiteDesignReporter-5YAW36AQ.js').then((m) => ({ default: m.SiteDesignReporter })),
45
49
  { ssr: false }
46
50
  );
47
51
  var LazySitemapSync = dynamic(
48
- () => import('./SitemapSync-XBANGKHZ.js').then((m) => ({ default: m.SitemapSync })),
52
+ () => import('./SitemapSync-RJTEBINX.js').then((m) => ({ default: m.SitemapSync })),
49
53
  { ssr: false }
50
54
  );
51
55
  function SiteKitClientProviders({
@@ -121,30 +125,40 @@ function SiteKitClientProviders({
121
125
  ) }) }, "sk-analytics")
122
126
  );
123
127
  }
124
- const chatOn = engage !== false && chat !== false;
128
+ const launcher = {
129
+ ...typeof engage === "object" ? engage : {},
130
+ ...typeof chat === "object" ? chat : {}
131
+ };
132
+ const chatOn = engage !== false && chat !== false && launcher.chatEnabled !== false;
125
133
  const popupsOn = engage !== false && popups !== false;
126
134
  if (chatOn || popupsOn) {
127
- const engageConfig = {
128
- ...typeof engage === "object" ? engage : {},
129
- ...typeof chat === "object" ? chat : {}
130
- };
131
- const engageInFrame = engageConfig.allowInFrame === true;
135
+ const shown = modulesReady && (launcher.allowInFrame === true || !isCrossOriginFrame());
132
136
  siblings.push(
133
- /* @__PURE__ */ jsx(React.Fragment, { children: modulesReady && (engageInFrame || !isCrossOriginFrame()) && /* @__PURE__ */ jsx(
134
- LazyEngageWidget,
135
- {
136
- apiUrl,
137
- apiKey,
138
- projectId,
139
- allowInFrame: analyticsConfig.allowInFrame === true,
140
- allowLocalhost: analyticsConfig.allowLocalhost === true,
141
- position: engageConfig.position || "bottom-right",
142
- offsetBottom: engageConfig.offsetBottom,
143
- zIndex: engageConfig.zIndex,
144
- chatEnabled: chatOn && engageConfig.chatEnabled !== false,
145
- popupsEnabled: popupsOn
146
- }
147
- ) }, "sk-engage")
137
+ /* @__PURE__ */ jsxs(React.Fragment, { children: [
138
+ shown && popupsOn && /* @__PURE__ */ jsx(
139
+ LazySitePopups,
140
+ {
141
+ apiUrl,
142
+ apiKey,
143
+ allowInFrame: analyticsConfig.allowInFrame === true,
144
+ allowLocalhost: analyticsConfig.allowLocalhost === true,
145
+ zIndex: launcher.zIndex
146
+ }
147
+ ),
148
+ shown && chatOn && /* @__PURE__ */ jsx(
149
+ LazySiteChat,
150
+ {
151
+ apiUrl,
152
+ apiKey,
153
+ projectId,
154
+ allowInFrame: analyticsConfig.allowInFrame === true,
155
+ allowLocalhost: analyticsConfig.allowLocalhost === true,
156
+ position: launcher.position || "bottom-right",
157
+ offsetBottom: launcher.offsetBottom,
158
+ zIndex: launcher.zIndex
159
+ }
160
+ )
161
+ ] }, "sk-widgets")
148
162
  );
149
163
  }
150
164
  if (sitemapSync) {
@@ -0,0 +1,300 @@
1
+ // src/contracts/schema-placeholders.ts
2
+ var RESERVED_EXAMPLE_DOMAINS = ["example.com", "example.net", "example.org"];
3
+ var RESERVED_EXAMPLE_TLD = "example";
4
+ var PLACEHOLDER_NAMES = /* @__PURE__ */ new Set([
5
+ "example",
6
+ "example business",
7
+ "example company",
8
+ "example organization",
9
+ "your business",
10
+ "your business name",
11
+ "your company",
12
+ "your company name",
13
+ "your organization",
14
+ "your organization name",
15
+ "business name",
16
+ "company name",
17
+ "organization name",
18
+ "your name",
19
+ "lorem ipsum"
20
+ ]);
21
+ var NAME_KEYS = /* @__PURE__ */ new Set([
22
+ "name",
23
+ "legalName",
24
+ "alternateName",
25
+ "author",
26
+ "creator",
27
+ "publisher",
28
+ "brand",
29
+ "provider",
30
+ "seller",
31
+ "manufacturer",
32
+ "organizer",
33
+ "founder"
34
+ ]);
35
+ var PHONE_KEYS = /* @__PURE__ */ new Set(["telephone", "faxNumber"]);
36
+ var URI_TEMPLATE_KEYS = /* @__PURE__ */ new Set(["target", "urlTemplate"]);
37
+ var BODY_TEXT_KEYS = /* @__PURE__ */ new Set(["articleBody"]);
38
+ var ANNOTATION_KEYS = /* @__PURE__ */ new Set(["note", "notes", "_note", "_notes", "_comment", "_comments", "__comment", "$comment"]);
39
+ var STRUCTURAL_KEYS = /* @__PURE__ */ new Set(["@context", "@type", "@id", "position"]);
40
+ var MUSTACHE_SLOT = /\{\{\s*[#^/>&]?\s*[A-Za-z_$][\w$.[\]-]*\s*\}\}/;
41
+ var JSX_EXPRESSION_VALUE = /^\{\s*[A-Za-z_$][\w$]*(?:\??\.[A-Za-z_$][\w$]*|\[[^\]]*\])+[^{}]*\}$/;
42
+ var JSX_MEMBER_IN_TEXT = /\{\s*[A-Za-z_$][\w$]*(?:\??\.[A-Za-z_$][\w$]*)+\s*\}/;
43
+ var BRACKET_SLOT_VALUE = /^\[\s*[A-Za-z][^[\]"{}<>]{0,80}\]$/;
44
+ var BRACKET_SLOT_IN_TEXT = /\[\s*((?:your|insert your|enter your|add your)\s+[^[\]]{1,60}?|(?:(?:business|company|organization|brand|full|first|last|resident|client|customer|author)\s+)?(?:name|phone(?:\s+number)?|telephone|email(?:\s+address)?|(?:street\s+)?address|city|state|zip(?:\s+code)?|postal\s+code|website|url|logo|date))\s*\](?!\()/gi;
45
+ var REPLACE_MARKER = /\bREPLACE(?:_WITH_\w*|_ME\b)/;
46
+ var UPPER_SLOT_VALUE = /^YOUR_[A-Z0-9_]+$/;
47
+ var MAX_DEPTH = 40;
48
+ var MAX_EVIDENCE = 5;
49
+ var EVIDENCE_VALUE_LENGTH = 120;
50
+ function withoutSchemaPlaceholders(value) {
51
+ const state = { dropped: [], notes: [] };
52
+ if (value === null || value === void 0) return { value: null, ...state };
53
+ const result = visitRoot(value, state);
54
+ return { value: result, ...state };
55
+ }
56
+ function visitRoot(value, state) {
57
+ if (Array.isArray(value)) {
58
+ const out = visitArray(value, "$", state, 0, true);
59
+ return out.removed && out.value.length === 0 ? null : out.value;
60
+ }
61
+ if (!isPlainObject(value)) return value;
62
+ if (isGraphWrapper(value)) {
63
+ const out = visitContainer(value, "$", state, 0);
64
+ return out.removedChild && !hasContentBeyond(out.value, /* @__PURE__ */ new Set(["@context"])) ? null : out.value;
65
+ }
66
+ const visit = visitNode(value, "$", state, 0);
67
+ return visit.keep ? visit.value : null;
68
+ }
69
+ function visitNode(node, path, state, depth) {
70
+ if (isAnnotationOnly(node)) {
71
+ state.dropped.push({ path, type: null, reasons: ["annotation"], evidence: annotationEvidence(node) });
72
+ return { keep: false };
73
+ }
74
+ const evidence = [];
75
+ collectEvidence(node, evidence, depth);
76
+ if (evidence.length) {
77
+ state.dropped.push({ path, type: typeOf(node), reasons: unique(evidence.map((e) => e.reason)), evidence });
78
+ return { keep: false };
79
+ }
80
+ const droppedMark = state.dropped.length;
81
+ const notesMark = state.notes.length;
82
+ const pruned = visitContainer(node, path, state, depth);
83
+ if (pruned.removedChild && !hasContentBeyond(pruned.value, STRUCTURAL_KEYS)) {
84
+ const children = state.dropped.splice(droppedMark);
85
+ state.notes.length = notesMark;
86
+ state.dropped.push({
87
+ path,
88
+ type: typeOf(node),
89
+ reasons: unique(["emptied", ...children.flatMap((c) => c.reasons)]),
90
+ evidence: children.flatMap((c) => c.evidence).slice(0, MAX_EVIDENCE)
91
+ });
92
+ return { keep: false };
93
+ }
94
+ return { keep: true, value: pruned.value };
95
+ }
96
+ function visitContainer(obj, path, state, depth) {
97
+ if (depth >= MAX_DEPTH) return { value: obj, removedChild: false };
98
+ let changed = false;
99
+ let removedChild = false;
100
+ const out = {};
101
+ for (const [key, child] of Object.entries(obj)) {
102
+ if (key === "@context") {
103
+ out[key] = child;
104
+ continue;
105
+ }
106
+ if (ANNOTATION_KEYS.has(key)) {
107
+ state.notes.push({ path, key });
108
+ changed = true;
109
+ continue;
110
+ }
111
+ const childPath = stepKey(path, key);
112
+ if (Array.isArray(child)) {
113
+ const pruned = visitArray(child, childPath, state, depth + 1, key === "@graph");
114
+ if (pruned.removed) removedChild = true;
115
+ if (pruned.value !== child) changed = true;
116
+ if (pruned.removed && pruned.value.length === 0) continue;
117
+ out[key] = pruned.value;
118
+ continue;
119
+ }
120
+ if (isPlainObject(child)) {
121
+ if (isNestedNode(child)) {
122
+ const visit = visitNode(child, childPath, state, depth + 1);
123
+ if (!visit.keep) {
124
+ changed = true;
125
+ removedChild = true;
126
+ continue;
127
+ }
128
+ if (visit.value !== child) changed = true;
129
+ out[key] = visit.value;
130
+ continue;
131
+ }
132
+ const pruned = visitContainer(child, childPath, state, depth + 1);
133
+ if (pruned.removedChild) removedChild = true;
134
+ if (pruned.value !== child) changed = true;
135
+ out[key] = pruned.value;
136
+ continue;
137
+ }
138
+ out[key] = child;
139
+ }
140
+ return { value: changed ? out : obj, removedChild };
141
+ }
142
+ function visitArray(items, path, state, depth, units) {
143
+ if (depth >= MAX_DEPTH) return { value: items, removed: false };
144
+ let changed = false;
145
+ let removed = false;
146
+ const out = [];
147
+ items.forEach((item, index) => {
148
+ const itemPath = `${path}[${index}]`;
149
+ if (Array.isArray(item)) {
150
+ const pruned = visitArray(item, itemPath, state, depth + 1, units);
151
+ if (pruned.removed) removed = true;
152
+ if (pruned.value !== item) changed = true;
153
+ out.push(pruned.value);
154
+ return;
155
+ }
156
+ if (isPlainObject(item) && (units || isNestedNode(item))) {
157
+ const visit = visitNode(item, itemPath, state, depth + 1);
158
+ if (!visit.keep) {
159
+ changed = true;
160
+ removed = true;
161
+ return;
162
+ }
163
+ if (visit.value !== item) changed = true;
164
+ out.push(visit.value);
165
+ return;
166
+ }
167
+ if (isPlainObject(item)) {
168
+ const pruned = visitContainer(item, itemPath, state, depth + 1);
169
+ if (pruned.removedChild) removed = true;
170
+ if (pruned.value !== item) changed = true;
171
+ out.push(pruned.value);
172
+ return;
173
+ }
174
+ out.push(item);
175
+ });
176
+ return { value: changed ? out : items, removed };
177
+ }
178
+ function collectEvidence(holder, out, depth) {
179
+ for (const [key, value] of Object.entries(holder)) {
180
+ if (key === "@context" || ANNOTATION_KEYS.has(key)) continue;
181
+ collectFromValue(holder, key, value, out, depth);
182
+ }
183
+ }
184
+ function collectFromValue(holder, key, value, out, depth) {
185
+ if (depth >= MAX_DEPTH || out.length >= MAX_EVIDENCE) return;
186
+ if (typeof value === "string") {
187
+ for (const reason of placeholderReasons(key, value, holder)) {
188
+ if (out.length >= MAX_EVIDENCE) return;
189
+ out.push({ reason, key, value: cutForLog(value) });
190
+ }
191
+ return;
192
+ }
193
+ if (Array.isArray(value)) {
194
+ for (const item of value) collectFromValue(holder, key, item, out, depth + 1);
195
+ return;
196
+ }
197
+ if (isPlainObject(value) && !isNestedNode(value)) collectEvidence(value, out, depth + 1);
198
+ }
199
+ function placeholderReasons(key, raw, holder) {
200
+ const value = raw.trim();
201
+ if (!value) return [];
202
+ const reasons = [];
203
+ const host = urlHost(value);
204
+ if (host && isReservedExampleHost(host)) reasons.push("example_domain");
205
+ if ((PHONE_KEYS.has(key) || /^tel:/i.test(value)) && isPlaceholderPhone(value)) reasons.push("placeholder_phone");
206
+ if (NAME_KEYS.has(key) && !("value" in holder) && PLACEHOLDER_NAMES.has(normalizeName(value))) {
207
+ reasons.push("placeholder_name");
208
+ }
209
+ if (isTemplateSlot(key, value)) reasons.push("template_token");
210
+ return reasons;
211
+ }
212
+ function isTemplateSlot(key, value) {
213
+ if (JSX_EXPRESSION_VALUE.test(value) || BRACKET_SLOT_VALUE.test(value) || UPPER_SLOT_VALUE.test(value)) return true;
214
+ if (REPLACE_MARKER.test(value)) return true;
215
+ if (!BODY_TEXT_KEYS.has(key)) {
216
+ if (MUSTACHE_SLOT.test(value)) return true;
217
+ for (const match of value.matchAll(BRACKET_SLOT_IN_TEXT)) {
218
+ if (/^[A-Z]/.test(match[1])) return true;
219
+ }
220
+ }
221
+ return !URI_TEMPLATE_KEYS.has(key) && isUrlOrPath(value) && JSX_MEMBER_IN_TEXT.test(value);
222
+ }
223
+ function urlHost(value) {
224
+ const mailto = /^mailto:[^@\s?]+@([^?\s#/]+)/i.exec(value);
225
+ if (mailto) return mailto[1];
226
+ const url = /^(?:[a-z][a-z0-9+.-]*:)?\/\/(?:[^/?#@\s]*@)?([^/?#:\s]+)/i.exec(value);
227
+ if (url) return url[1];
228
+ const email = /^[^\s@/:]+@([^\s@/:?#]+)$/.exec(value);
229
+ if (email) return email[1];
230
+ const bare = /^((?:[a-z0-9-]+\.)+[a-z][a-z0-9-]*)\.?(?::\d+)?(?:[/?#]\S*)?$/i.exec(value);
231
+ return bare ? bare[1] : null;
232
+ }
233
+ function isReservedExampleHost(host) {
234
+ const h = host.toLowerCase().replace(/\.$/, "");
235
+ if (h === RESERVED_EXAMPLE_TLD || h.endsWith(`.${RESERVED_EXAMPLE_TLD}`)) return true;
236
+ return RESERVED_EXAMPLE_DOMAINS.some((domain) => h === domain || h.endsWith(`.${domain}`));
237
+ }
238
+ function isUrlOrPath(value) {
239
+ return /^(?:[a-z][a-z0-9+.-]*:)?\/\//i.test(value) || value.startsWith("/");
240
+ }
241
+ function isPlaceholderPhone(raw) {
242
+ const value = raw.replace(/^tel:/i, "").trim();
243
+ if (/^[+\d\s().xX-]+$/.test(value) && (value.match(/x/gi)?.length ?? 0) >= 4) return true;
244
+ let digits = value.replace(/\D/g, "");
245
+ if (digits.length === 11 && digits.startsWith("1")) digits = digits.slice(1);
246
+ if (digits.length >= 7 && /^0+$/.test(digits)) return true;
247
+ if (digits === "1234567890" || digits === "1234567") return true;
248
+ const local = digits.length === 10 ? digits.slice(3) : digits.length === 7 ? digits : null;
249
+ return local !== null && /^55501\d\d$/.test(local);
250
+ }
251
+ function normalizeName(value) {
252
+ return value.replace(/\s+/g, " ").trim().replace(/[.,]+$/, "").toLowerCase();
253
+ }
254
+ function isPlainObject(value) {
255
+ return typeof value === "object" && value !== null && !Array.isArray(value);
256
+ }
257
+ function isNestedNode(value) {
258
+ return "@type" in value || "@id" in value || isAnnotationOnly(value);
259
+ }
260
+ function isGraphWrapper(value) {
261
+ return "@graph" in value && !("@type" in value) && !("@id" in value);
262
+ }
263
+ function isAnnotationOnly(value) {
264
+ if ("@type" in value || "@id" in value || "@graph" in value) return false;
265
+ const keys = Object.keys(value).filter((key) => key !== "@context");
266
+ return keys.length > 0 && keys.every((key) => ANNOTATION_KEYS.has(key));
267
+ }
268
+ function annotationEvidence(node) {
269
+ return Object.entries(node).filter(([key]) => ANNOTATION_KEYS.has(key)).slice(0, MAX_EVIDENCE).map(([key, value]) => ({
270
+ reason: "annotation",
271
+ key,
272
+ value: cutForLog(typeof value === "string" ? value : JSON.stringify(value) ?? "")
273
+ }));
274
+ }
275
+ function hasContentBeyond(obj, ignored) {
276
+ return Object.entries(obj).some(([key, value]) => !ignored.has(key) && hasContent(value));
277
+ }
278
+ function hasContent(value) {
279
+ if (value === null || value === void 0 || value === "") return false;
280
+ if (Array.isArray(value)) return value.length > 0;
281
+ if (isPlainObject(value)) return Object.keys(value).length > 0;
282
+ return true;
283
+ }
284
+ function typeOf(node) {
285
+ const type = node["@type"];
286
+ if (typeof type === "string") return type;
287
+ if (Array.isArray(type)) return type.filter((t) => typeof t === "string").join(",") || null;
288
+ return null;
289
+ }
290
+ function stepKey(path, key) {
291
+ return /^[A-Za-z_$][\w$]*$/.test(key) ? `${path}.${key}` : `${path}[${JSON.stringify(key)}]`;
292
+ }
293
+ function unique(values) {
294
+ return [...new Set(values)];
295
+ }
296
+ function cutForLog(value) {
297
+ return value.length > EVIDENCE_VALUE_LENGTH ? `${value.slice(0, EVIDENCE_VALUE_LENGTH)}...` : value;
298
+ }
299
+
300
+ export { withoutSchemaPlaceholders };
@@ -1,5 +1,5 @@
1
1
  import { HoneypotField } from './chunk-DXO6SBMD.js';
2
- import { FormField } from './chunk-LUXVWITO.js';
2
+ import { FormField } from './chunk-4NTBQNHA.js';
3
3
  import { normalizeFormConfig } from './chunk-5SQK3D53.js';
4
4
  import { DEFAULT_HONEYPOT_FIELD } from './chunk-NJCTQH2P.js';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -31,7 +31,8 @@ function StaticForm({ config: raw, className }) {
31
31
  },
32
32
  field.id || field.slug
33
33
  )) }) }),
34
- /* @__PURE__ */ jsx("div", { className: "sk-form__actions", style: { justifyContent: "flex-end" }, children: /* @__PURE__ */ jsx("button", { type: "submit", className: "sk-form__btn sk-form__btn--submit", children: config.submit_button_text || "Submit" }) }),
34
+ /* @__PURE__ */ jsx("div", { className: "sk-form__actions", style: { justifyContent: "flex-end" }, children: /* @__PURE__ */ jsx("button", { type: "submit", className: "sk-form__btn sk-form__btn--submit", disabled: true, "data-sk-shell-submit": "", children: config.submit_button_text || "Submit" }) }),
35
+ /* @__PURE__ */ jsx("noscript", { children: /* @__PURE__ */ jsx("p", { className: "sk-form__noscript", children: "This form needs JavaScript to send. Turn it on and reload the page." }) }),
35
36
  config.honeypot_enabled && /* @__PURE__ */ jsx(HoneypotField, { name: honeypotFieldName })
36
37
  ]
37
38
  }
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { publishSiteCredential } from '../chunk-ERXXITG4.js';
2
+ import { publishSiteCredential } from '../chunk-HGFAEDG3.js';
3
3
  export { useDeferredActivation } from '../chunk-YC7ELZS3.js';
4
4
  import '../chunk-FESKKJAS.js';
5
5
  import '../chunk-A4CC4ZG3.js';
@@ -7,8 +7,8 @@ export { trackConversion, trackEvent } from '../chunk-LCDVPAMR.js';
7
7
  export { VISUAL_VIEWPORT_GAP_PROPERTY, VisualViewportGap, useVisualViewportGap } from '../chunk-6T6CQVNL.js';
8
8
  export { getOrCreateSessionId, getOrCreateVisitorId, useSiteKitIdentity } from '../chunk-24QZEO3Q.js';
9
9
  import '../chunk-GJWI74ZZ.js';
10
- import '../chunk-VDF5DFWT.js';
11
- import '../chunk-AH5Q262S.js';
10
+ import '../chunk-K4ZHAURD.js';
11
+ import '../chunk-F24FNCTK.js';
12
12
  import '../chunk-PKBMQBKP.js';
13
13
 
14
14
  // src/client/SiteKitCredential.tsx
@@ -1,15 +1,15 @@
1
1
  'use client';
2
2
  import '../chunk-P5GB6NEO.js';
3
- import { useAnalyticsOptional } from '../chunk-YEMPUQVU.js';
3
+ import { useAnalyticsOptional } from '../chunk-JWTQS5F5.js';
4
4
  import '../chunk-LCDVPAMR.js';
5
5
  import '../chunk-24QZEO3Q.js';
6
6
  import '../chunk-L2V5PUFN.js';
7
7
  import '../chunk-GJWI74ZZ.js';
8
8
  import '../chunk-43OCZ3JA.js';
9
9
  import '../chunk-EKBEOXTH.js';
10
- import { sonorFetch } from '../chunk-3SDOQUUF.js';
11
- import '../chunk-VDF5DFWT.js';
12
- import '../chunk-AH5Q262S.js';
10
+ import { sonorFetch } from '../chunk-D6ZC7XKZ.js';
11
+ import '../chunk-K4ZHAURD.js';
12
+ import '../chunk-F24FNCTK.js';
13
13
  import '../chunk-PKBMQBKP.js';
14
14
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
15
15
  import React5, { useState, useEffect, useMemo, useRef, useCallback } from 'react';
@@ -4,7 +4,7 @@
4
4
  * Single source of truth for turning a CSS colour string into something the
5
5
  * kit can reason about. Used at build time by the brand-profile extractor
6
6
  * (`src/brand/extract-brand-profile.ts`, theme detection) and in the browser
7
- * by Echo (`src/engage/brand-color.ts`, brand text contrast). Pure, no
7
+ * by Echo (`src/chat/brand-color.ts`, brand text contrast). Pure, no
8
8
  * imports, safe in both.
9
9
  */
10
10
  export type Rgb = {
@@ -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'];
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'];
8
8
  export type ContractEntry = (typeof CONTRACT_ENTRIES)[number];