@sonordev/site-kit 8.8.0 → 8.9.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 (461) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +9 -0
  3. package/agent-manifest.json +8 -1
  4. package/dist/AnalyticsProvider-X7JJN3QL.js +19 -0
  5. package/dist/{ArticleViewTracker-PV2RD3P6.js → ArticleViewTracker-7Q6AMCKX.js} +11 -10
  6. package/dist/{BlocksPopup-NEEFV2L3.js → BlocksPopup-U5VIYEBA.js} +4 -5
  7. package/dist/ChatWidget-EAATOFCT.js +30 -0
  8. package/dist/{FileField-MJ3RCNFJ.js → FileField-YWMSK7RF.js} +1 -3
  9. package/dist/{FormSpotlight-NQPQFZS7.js → FormSpotlight-MAXDW3TK.js} +1 -1
  10. package/dist/{FormStage-4T5PJR5K.js → FormStage-VAHRVOIZ.js} +1 -1
  11. package/dist/ManagedForm-7IZT7ZII.js +29 -0
  12. package/dist/{ManagedNewsletterForm-TUYGN6O3.js → ManagedNewsletterForm-VVXZSEAL.js} +21 -11
  13. package/dist/{SignalCore-OW3YIH6M.js → SignalCore-HAN4O7QG.js} +90 -36
  14. package/dist/{SiteChat-XMKHBSEK.js → SiteChat-3JLCEL2N.js} +2 -2
  15. package/dist/{SiteDesignReporter-BRH7ORQS.js → SiteDesignReporter-6CCO645E.js} +5 -6
  16. package/dist/SitePopups-ZGHQNGGH.js +19 -0
  17. package/dist/SitemapSync-5LSYCBKS.js +7 -0
  18. package/dist/SitemapSync.d.ts +1 -1
  19. package/dist/_client/booking-widget.d.ts +1 -1
  20. package/dist/_client/booking-widget.js +6 -7
  21. package/dist/_client/reviewed-signal-experiment.d.ts +9 -0
  22. package/dist/_client/reviewed-signal-experiment.js +89 -0
  23. package/dist/_client/testimonial-section.d.ts +1 -1
  24. package/dist/admin-auth/index.d.ts +3 -3
  25. package/dist/affiliates/AffiliatesWidget.d.ts +1 -1
  26. package/dist/affiliates/api.d.ts +1 -1
  27. package/dist/affiliates/index.d.ts +6 -6
  28. package/dist/affiliates/index.js +1 -3
  29. package/dist/affiliates/useAffiliates.d.ts +1 -1
  30. package/dist/analytics/AnalyticsProvider.d.ts +1 -1
  31. package/dist/analytics/dispatch.d.ts +1 -1
  32. package/dist/analytics/index.d.ts +6 -6
  33. package/dist/analytics/index.js +22 -12
  34. package/dist/analytics/publication-cta.d.ts +1 -1
  35. package/dist/analytics/send-gate.d.ts +8 -4
  36. package/dist/articles/Article.d.ts +1 -1
  37. package/dist/articles/ArticleFAQ.d.ts +1 -1
  38. package/dist/articles/ArticleFaqSection.d.ts +1 -1
  39. package/dist/articles/ArticleList.d.ts +1 -1
  40. package/dist/articles/ArticleViewTracker.d.ts +1 -1
  41. package/dist/articles/AuthorCard.d.ts +1 -1
  42. package/dist/articles/AuthorPage.d.ts +1 -1
  43. package/dist/articles/ClusterLandingPage.d.ts +1 -1
  44. package/dist/articles/ClusterNavigation.d.ts +1 -1
  45. package/dist/articles/ManagedNewsletterForm.d.ts +2 -2
  46. package/dist/articles/NewsletterShell.d.ts +1 -1
  47. package/dist/articles/NewsletterWidget.d.ts +1 -1
  48. package/dist/articles/PublicationLayout.d.ts +1 -1
  49. package/dist/articles/PublicationSidebar.d.ts +1 -1
  50. package/dist/articles/RelatedPosts.d.ts +1 -1
  51. package/dist/articles/ServiceCallout.d.ts +1 -1
  52. package/dist/articles/TableOfContents.d.ts +1 -1
  53. package/dist/articles/article-photos.d.ts +1 -1
  54. package/dist/articles/article-styles.d.ts +1 -1
  55. package/dist/articles/article-tables.d.ts +1 -1
  56. package/dist/articles/artwork.d.ts +1 -1
  57. package/dist/articles/author-schema.d.ts +1 -1
  58. package/dist/articles/author-social.d.ts +1 -1
  59. package/dist/articles/excerpt.d.ts +1 -1
  60. package/dist/articles/index.d.ts +1 -1
  61. package/dist/articles/index.js +3 -3
  62. package/dist/articles/news-sitemap.d.ts +1 -1
  63. package/dist/articles/processArticleHtml.d.ts +1 -1
  64. package/dist/articles/public-reads.d.ts +1 -1
  65. package/dist/articles/reading-time.d.ts +1 -1
  66. package/dist/articles/routes.d.ts +1 -1
  67. package/dist/articles/server-core.d.ts +1 -1
  68. package/dist/articles/server-ui.d.ts +1 -1
  69. package/dist/articles/server-ui.js +6 -6
  70. package/dist/articles/server.d.ts +1 -1
  71. package/dist/articles/server.js +5 -5
  72. package/dist/articles/types.d.ts +1 -1
  73. package/dist/articles/widget-styles.d.ts +1 -1
  74. package/dist/brand/extract-brand-profile.d.ts +1 -1
  75. package/dist/chat/ChatWidget.d.ts +1 -1
  76. package/dist/chat/EchoUiActions.d.ts +1 -1
  77. package/dist/chat/SiteChat.d.ts +2 -2
  78. package/dist/chat/chat-messages.d.ts +1 -1
  79. package/dist/chat/index.d.ts +7 -7
  80. package/dist/chat/index.js +17 -9
  81. package/dist/chat/launcher-placement.d.ts +1 -1
  82. package/dist/{chunk-OPUY4RS6.js → chunk-2LBKIE2K.js} +2 -1
  83. package/dist/{chunk-XIDWNXZN.js → chunk-3W3MN6Z7.js} +2 -2
  84. package/dist/{chunk-UPFU63L4.js → chunk-55GFMOI6.js} +1 -1
  85. package/dist/chunk-5IVD6G77.js +37 -0
  86. package/dist/{chunk-URLTBVRX.js → chunk-6EDE7BOE.js} +3 -3
  87. package/dist/{chunk-DYROJGI2.js → chunk-6NLVHTYY.js} +1 -1
  88. package/dist/{chunk-ZQSCMYZO.js → chunk-7643MCD2.js} +6 -3
  89. package/dist/chunk-7IZUUXXO.js +1 -0
  90. package/dist/{chunk-C7TLGL3R.js → chunk-7VMA3KCN.js} +30 -4
  91. package/dist/{chunk-OWZWRP7Y.js → chunk-ADQ3VCKK.js} +2 -2
  92. package/dist/chunk-AG2RDHYZ.js +45 -0
  93. package/dist/chunk-AWLPFFPO.js +36 -0
  94. package/dist/{chunk-LNSNA3W4.js → chunk-C4XK472G.js} +4 -3
  95. package/dist/{chunk-TP32MRXV.js → chunk-CJ43K7RA.js} +2 -2
  96. package/dist/chunk-D4M5K6JN.js +25 -0
  97. package/dist/{chunk-F6WLHVMQ.js → chunk-DXE6SXWW.js} +1 -1
  98. package/dist/{chunk-YEX5RAEU.js → chunk-EBEM5BI5.js} +38 -27
  99. package/dist/chunk-F3RKFGRW.js +2 -0
  100. package/dist/chunk-FAY6MOLL.js +62 -0
  101. package/dist/chunk-FRY6PBT6.js +31 -0
  102. package/dist/{chunk-JYITKUUB.js → chunk-G5WUX7VE.js} +1 -1
  103. package/dist/chunk-HJD6KXKH.js +147 -0
  104. package/dist/{chunk-6BFQI3ZE.js → chunk-IO6BWRZ5.js} +2 -2
  105. package/dist/{chunk-THXELZTQ.js → chunk-ISMHDUBW.js} +1 -1
  106. package/dist/{chunk-SLFYTELD.js → chunk-J4LJE4NB.js} +1 -1
  107. package/dist/{chunk-LQJC5S2M.js → chunk-J6D3NEDE.js} +57 -0
  108. package/dist/chunk-JT7GHHMV.js +56 -0
  109. package/dist/{chunk-NFGAXWCN.js → chunk-KGIQYVQ2.js} +31 -13
  110. package/dist/chunk-KMNHNCVG.js +20 -0
  111. package/dist/chunk-KQKUXIUD.js +25 -0
  112. package/dist/{chunk-M5JIHQ42.js → chunk-L3S5WH4C.js} +2 -2
  113. package/dist/chunk-MDBXGN6W.js +13 -0
  114. package/dist/chunk-MOACHHOJ.js +20 -0
  115. package/dist/{chunk-6DXQHNZK.js → chunk-MP35JETP.js} +1 -1
  116. package/dist/chunk-NHDRA4Y5.js +6 -0
  117. package/dist/{chunk-AYQEIMGS.js → chunk-NZHECYLF.js} +103 -22
  118. package/dist/{chunk-EATJPSTS.js → chunk-O5LQUBBN.js} +1 -1
  119. package/dist/{chunk-Y6SHFILE.js → chunk-OEOSR5EG.js} +1 -1
  120. package/dist/{chunk-GQN4BGK6.js → chunk-OUD4RTBD.js} +1 -1
  121. package/dist/chunk-PMXQPO5Q.js +78 -0
  122. package/dist/chunk-PVY7X5UR.js +21 -0
  123. package/dist/{chunk-KG5IEV7I.js → chunk-QLJ2SC3T.js} +1 -1
  124. package/dist/{chunk-2WM4TNDF.js → chunk-QXAJPB6O.js} +1 -1
  125. package/dist/{chunk-2WDWQI7K.js → chunk-RYR6N4X4.js} +1 -1
  126. package/dist/{chunk-G7BRCSV6.js → chunk-S33CUULL.js} +3 -3
  127. package/dist/{chunk-YRQS7VAH.js → chunk-S63QY5XW.js} +2 -2
  128. package/dist/{chunk-GXWM5KNS.js → chunk-SO6RSRUP.js} +40 -45
  129. package/dist/{chunk-ODOV76VW.js → chunk-STIVFCWM.js} +1 -1
  130. package/dist/{chunk-SVHPILS3.js → chunk-T4A5J6SJ.js} +1 -1
  131. package/dist/chunk-TPHOIE4I.js +73 -0
  132. package/dist/{chunk-IWNJCRXW.js → chunk-UG53ZW7S.js} +125 -118
  133. package/dist/chunk-VXCUXHZO.js +9 -0
  134. package/dist/{chunk-SBPUFTMP.js → chunk-WHFWDK2H.js} +2 -2
  135. package/dist/chunk-WYNDBJG7.js +66 -0
  136. package/dist/{chunk-HN7GVGWC.js → chunk-XDH5B3PR.js} +3 -3
  137. package/dist/{chunk-PAYCK7FC.js → chunk-XJZLXUTG.js} +1 -1
  138. package/dist/{chunk-IDC5CVBR.js → chunk-YVEYO3OD.js} +1 -1
  139. package/dist/{chunk-PSS6M4CG.js → chunk-ZRSXCT4O.js} +2 -2
  140. package/dist/client/index.d.ts +8 -8
  141. package/dist/client/index.js +9 -8
  142. package/dist/config/index.d.ts +1 -1
  143. package/dist/contracts/broadcast-layouts.d.ts +8 -0
  144. package/dist/contracts/crm-disposition.d.ts +87 -0
  145. package/dist/contracts/decision-roles.d.ts +39 -0
  146. package/dist/contracts/entries.d.ts +1 -1
  147. package/dist/contracts/funnels.d.ts +85 -2
  148. package/dist/contracts/portfolio.d.ts +1 -1
  149. package/dist/contracts/publication-branding.d.ts +3 -3
  150. package/dist/contracts/resonance-constants.d.ts +4 -0
  151. package/dist/contracts/resonance.d.ts +8461 -0
  152. package/dist/contracts/signal-experiments.d.ts +219 -0
  153. package/dist/contracts/site-edit.d.ts +2 -2
  154. package/dist/contracts/sites.d.ts +1 -1
  155. package/dist/contracts/slots.d.ts +2 -2
  156. package/dist/contracts/wire-schema.d.ts +36 -0
  157. package/dist/cta-bar/CtaBar.d.ts +1 -1
  158. package/dist/cta-bar/client.js +3 -2
  159. package/dist/cta-bar/index.d.ts +4 -4
  160. package/dist/cta-bar/index.js +4 -3
  161. package/dist/fleet/FleetHeartbeat.d.ts +2 -2
  162. package/dist/fleet/contract.d.ts +1 -1
  163. package/dist/fleet/heartbeat.d.ts +2 -2
  164. package/dist/fleet/index.d.ts +6 -6
  165. package/dist/fleet/index.js +4 -5
  166. package/dist/forms/FileField.d.ts +1 -1
  167. package/dist/forms/FormClient.d.ts +2 -2
  168. package/dist/forms/FormEnhancer.d.ts +1 -1
  169. package/dist/forms/FormField.d.ts +1 -1
  170. package/dist/forms/FormSpotlight.d.ts +1 -1
  171. package/dist/forms/FormStage.d.ts +1 -1
  172. package/dist/forms/ManagedForm.d.ts +1 -1
  173. package/dist/forms/PrivateFileField.d.ts +1 -1
  174. package/dist/forms/ServerForm.d.ts +3 -3
  175. package/dist/forms/StaticForm.d.ts +1 -1
  176. package/dist/forms/contract.d.ts +1 -1
  177. package/dist/forms/experience-plan.d.ts +1 -1
  178. package/dist/forms/field-autocomplete.d.ts +1 -1
  179. package/dist/forms/field-controls.d.ts +1 -1
  180. package/dist/forms/field-rules.d.ts +1 -1
  181. package/dist/forms/form-dom-values.d.ts +1 -1
  182. package/dist/forms/index.d.ts +18 -18
  183. package/dist/forms/index.js +21 -11
  184. package/dist/forms/normalize-config.d.ts +1 -1
  185. package/dist/forms/server.d.ts +4 -4
  186. package/dist/forms/server.js +3 -3
  187. package/dist/forms/static.d.ts +2 -2
  188. package/dist/forms/submitForm.d.ts +2 -2
  189. package/dist/forms/tracking-session.d.ts +1 -1
  190. package/dist/forms/useForm.d.ts +2 -2
  191. package/dist/forms/webmcp.d.ts +2 -2
  192. package/dist/images/api.d.ts +1 -1
  193. package/dist/images/index.d.ts +6 -6
  194. package/dist/images/index.js +2 -4
  195. package/dist/images/server.d.ts +2 -2
  196. package/dist/index.d.ts +13 -13
  197. package/dist/index.js +1 -1
  198. package/dist/landing/contract.d.ts +1 -1
  199. package/dist/landing/contract.js +2 -1
  200. package/dist/landing/index.d.ts +3 -3
  201. package/dist/landing/index.js +3 -2
  202. package/dist/landing/managed-server.d.ts +2 -2
  203. package/dist/landing/managed.d.ts +10 -2
  204. package/dist/landing/server.d.ts +7 -7
  205. package/dist/landing/server.js +11 -6
  206. package/dist/layout/AiDiscoveryLinks.d.ts +1 -1
  207. package/dist/layout/SiteKitClientProviders.d.ts +1 -1
  208. package/dist/layout/SiteKitLayout.d.ts +2 -2
  209. package/dist/layout/client.d.ts +1 -1
  210. package/dist/layout/client.js +15 -11
  211. package/dist/layout/index.d.ts +5 -5
  212. package/dist/layout/index.js +17 -13
  213. package/dist/layout/types.d.ts +2 -2
  214. package/dist/llms/AEOComponents.d.ts +1 -1
  215. package/dist/llms/SpeakableSchema.d.ts +1 -1
  216. package/dist/llms/api.d.ts +1 -1
  217. package/dist/llms/client.d.ts +3 -3
  218. package/dist/llms/contract.d.ts +1 -1
  219. package/dist/llms/generateLLMsTxt.d.ts +1 -1
  220. package/dist/llms/handlers.d.ts +1 -1
  221. package/dist/llms/index.d.ts +21 -21
  222. package/dist/llms/index.js +5 -5
  223. package/dist/llms/merge.d.ts +1 -1
  224. package/dist/llms/sourcedFacts.d.ts +1 -1
  225. package/dist/llms/types.d.ts +5 -5
  226. package/dist/llms/writeLLMsTxt.d.ts +3 -3
  227. package/dist/maps/GoogleMap.d.ts +1 -1
  228. package/dist/maps/NeighborhoodMap.d.ts +1 -1
  229. package/dist/maps/api.d.ts +1 -1
  230. package/dist/maps/index.d.ts +5 -5
  231. package/dist/maps/index.js +1 -3
  232. package/dist/mcp/WebMcpTools.d.ts +1 -1
  233. package/dist/mcp/client.d.ts +2 -2
  234. package/dist/mcp/discovery.d.ts +2 -2
  235. package/dist/mcp/handlers.d.ts +4 -4
  236. package/dist/mcp/index.d.ts +12 -12
  237. package/dist/mcp/protocol.d.ts +1 -1
  238. package/dist/mcp/report.d.ts +1 -1
  239. package/dist/mcp/serverCard.d.ts +1 -1
  240. package/dist/mcp/sonor.d.ts +5 -5
  241. package/dist/mcp/sonor.js +10 -10
  242. package/dist/mcp/transport.d.ts +1 -1
  243. package/dist/motion/Parallax.d.ts +1 -1
  244. package/dist/motion/ScrollScene.d.ts +1 -1
  245. package/dist/motion/gsap.d.ts +2 -2
  246. package/dist/motion/index.d.ts +9 -9
  247. package/dist/motion/three.d.ts +1 -1
  248. package/dist/og/index.d.ts +5 -5
  249. package/dist/og/pages.d.ts +1 -1
  250. package/dist/og/route-fit.d.ts +17 -0
  251. package/dist/og/route.d.ts +8 -0
  252. package/dist/og/route.js +1 -1
  253. package/dist/og/template.d.ts +1 -1
  254. package/dist/portfolio/contract.d.ts +1 -1
  255. package/dist/press-kit/articles/Article.d.ts +2 -2
  256. package/dist/press-kit/articles/ArticleFaqSection.d.ts +1 -1
  257. package/dist/press-kit/articles/ArticleList.d.ts +2 -2
  258. package/dist/press-kit/articles/AuthorCard.d.ts +1 -1
  259. package/dist/press-kit/articles/AuthorPage.d.ts +1 -1
  260. package/dist/press-kit/articles/ClusterLandingPage.d.ts +2 -2
  261. package/dist/press-kit/articles/ClusterNavigation.d.ts +2 -2
  262. package/dist/press-kit/articles/ManagedNewsletterForm.d.ts +2 -2
  263. package/dist/press-kit/articles/PublicationLayout.d.ts +2 -2
  264. package/dist/press-kit/articles/PublicationSidebar.d.ts +1 -1
  265. package/dist/press-kit/articles/RelatedPosts.d.ts +2 -2
  266. package/dist/press-kit/articles/TableOfContents.d.ts +1 -1
  267. package/dist/press-kit/articles/article-body.d.ts +1 -1
  268. package/dist/press-kit/articles/article-headings.d.ts +1 -1
  269. package/dist/press-kit/articles/article-photos.d.ts +1 -1
  270. package/dist/press-kit/articles/artwork.d.ts +2 -2
  271. package/dist/press-kit/articles/author-schema.d.ts +2 -2
  272. package/dist/press-kit/articles/author-social.d.ts +1 -1
  273. package/dist/press-kit/articles/index.d.ts +23 -23
  274. package/dist/press-kit/articles/news-sitemap.d.ts +2 -2
  275. package/dist/press-kit/articles/public-reads.d.ts +1 -1
  276. package/dist/press-kit/articles/publication-reads.d.ts +2 -2
  277. package/dist/press-kit/articles/reading-time.d.ts +1 -1
  278. package/dist/press-kit/articles/server-core.d.ts +20 -20
  279. package/dist/press-kit/articles/server-ui.d.ts +20 -20
  280. package/dist/press-kit/articles/types.d.ts +1 -1
  281. package/dist/proxy/index.d.ts +5 -5
  282. package/dist/proxy/index.js +1 -1
  283. package/dist/reputation/TestimonialSection.d.ts +1 -1
  284. package/dist/reputation/VisualReviewCard.d.ts +1 -1
  285. package/dist/reputation/api.d.ts +1 -1
  286. package/dist/reputation/index.d.ts +4 -4
  287. package/dist/reputation/server.d.ts +3 -3
  288. package/dist/resonance/ResonanceRuntime.d.ts +7 -0
  289. package/dist/resonance/bridge.d.ts +16 -0
  290. package/dist/resonance/consent-adapter.d.ts +26 -0
  291. package/dist/resonance/controller-registry.d.ts +14 -0
  292. package/dist/resonance/controller.d.ts +103 -0
  293. package/dist/resonance/form-context.d.ts +5 -0
  294. package/dist/resonance/index.d.ts +4 -0
  295. package/dist/resonance/index.js +9 -0
  296. package/dist/resonance/meta-pixel.d.ts +67 -0
  297. package/dist/resonance/providers.d.ts +32 -0
  298. package/dist/resonance/runtime-core.d.ts +5 -0
  299. package/dist/revalidate/index.d.ts +3 -3
  300. package/dist/revalidate/index.js +2 -2
  301. package/dist/robots/index.d.ts +3 -3
  302. package/dist/robots/indexnow.js +2 -2
  303. package/dist/runtime/index.d.ts +7 -7
  304. package/dist/runtime/index.js +4 -5
  305. package/dist/runtime-core-WT7KKLWQ.js +2213 -0
  306. package/dist/seo/ManagedFAQ.d.ts +1 -1
  307. package/dist/seo/ManagedInternalLinks.d.ts +1 -1
  308. package/dist/seo/ManagedSchema.d.ts +1 -1
  309. package/dist/seo/ManagedScripts.d.ts +1 -1
  310. package/dist/seo/client.d.ts +1 -1
  311. package/dist/seo/client.js +3 -5
  312. package/dist/seo/entry-indexnow.d.ts +1 -1
  313. package/dist/seo/entry-llms-client.d.ts +1 -1
  314. package/dist/seo/entry-llms-contract.d.ts +1 -1
  315. package/dist/seo/entry-llms.d.ts +1 -1
  316. package/dist/seo/entry-meta-contract.d.ts +1 -1
  317. package/dist/seo/entry-og-route.d.ts +1 -1
  318. package/dist/seo/entry-og.d.ts +1 -1
  319. package/dist/seo/entry-pages-contract.d.ts +1 -1
  320. package/dist/seo/entry-redirects.d.ts +1 -1
  321. package/dist/seo/entry-robots.d.ts +1 -1
  322. package/dist/seo/entry-sitemap.d.ts +1 -1
  323. package/dist/seo/getManagedMetadata.d.ts +1 -1
  324. package/dist/seo/index.d.ts +12 -12
  325. package/dist/seo/index.js +9 -11
  326. package/dist/seo/indexnow.d.ts +1 -1
  327. package/dist/seo/indexnow.js +2 -2
  328. package/dist/seo/llms/client.d.ts +1 -1
  329. package/dist/seo/llms/contract.d.ts +1 -1
  330. package/dist/seo/llms.d.ts +1 -1
  331. package/dist/seo/llms.js +5 -5
  332. package/dist/seo/meta/contract.d.ts +1 -1
  333. package/dist/seo/og/route.d.ts +1 -1
  334. package/dist/seo/og/route.js +1 -1
  335. package/dist/seo/og.d.ts +1 -1
  336. package/dist/seo/pages/contract.d.ts +1 -1
  337. package/dist/seo/redirects.d.ts +1 -1
  338. package/dist/seo/register-sitemap-cli-impl.d.ts +1 -1
  339. package/dist/seo/register-sitemap-cli.js +1 -1
  340. package/dist/seo/robots.d.ts +1 -1
  341. package/dist/seo/routing.d.ts +1 -1
  342. package/dist/seo/server.d.ts +4 -4
  343. package/dist/seo/server.js +3 -3
  344. package/dist/seo/sitemap.d.ts +1 -1
  345. package/dist/seo/sitemap.js +3 -3
  346. package/dist/seo/types.d.ts +1 -1
  347. package/dist/seo-meta/contract.d.ts +1 -1
  348. package/dist/seo-pages/contract.d.ts +1 -1
  349. package/dist/server/index.d.ts +5 -5
  350. package/dist/server/index.js +3 -3
  351. package/dist/server/mint-site-token.d.ts +1 -1
  352. package/dist/server/server-fetch.d.ts +8 -0
  353. package/dist/{server-api-XIKDWSNO.js → server-api-A34TABT2.js} +2 -2
  354. package/dist/shared/build-entries.d.ts +3 -1
  355. package/dist/shared/color.d.ts +1 -1
  356. package/dist/shared/fetchWithRetry.d.ts +6 -0
  357. package/dist/shared/frame.d.ts +1 -1
  358. package/dist/shared/identity-storage.d.ts +6 -4
  359. package/dist/shared/identity.d.ts +1 -3
  360. package/dist/shared/index.d.ts +5 -5
  361. package/dist/shared/index.js +1 -1
  362. package/dist/shared/measurement-analytics.d.ts +1 -0
  363. package/dist/shared/measurement-policy.d.ts +6 -0
  364. package/dist/shared/measurement-proof.d.ts +5 -0
  365. package/dist/shared/measurement-store.d.ts +34 -0
  366. package/dist/shared/measurement-writer.d.ts +6 -0
  367. package/dist/shared/publishCredential.d.ts +1 -1
  368. package/dist/shared/reporting-gate.d.ts +3 -1
  369. package/dist/shared/site-token-claims.d.ts +18 -0
  370. package/dist/shared/site-token-configuration.d.ts +9 -0
  371. package/dist/shared/site-token-refresh.d.ts +7 -0
  372. package/dist/shared/site-token-state.d.ts +23 -0
  373. package/dist/shared/siteToken.d.ts +5 -39
  374. package/dist/shared/sonor-auth-state.d.ts +3 -0
  375. package/dist/shared/sonor-beacon.d.ts +13 -0
  376. package/dist/shared/sonor-fetch-runtime.d.ts +2 -0
  377. package/dist/shared/sonor-fetch.d.ts +7 -0
  378. package/dist/shared/sonorFetch.d.ts +4 -49
  379. package/dist/shared/version.d.ts +1 -1
  380. package/dist/signal/ReviewedSignalExperiment.d.ts +9 -0
  381. package/dist/signal/SignalBridge.d.ts +4 -4
  382. package/dist/signal/SignalCore.d.ts +2 -1
  383. package/dist/signal/SignalExperiment.d.ts +13 -5
  384. package/dist/signal/index.d.ts +3 -3
  385. package/dist/signal/index.js +4 -73
  386. package/dist/signal/store.d.ts +10 -7
  387. package/dist/signal/types.d.ts +4 -0
  388. package/dist/sitemap/index.d.ts +5 -5
  389. package/dist/sitemap/index.js +3 -3
  390. package/dist/sites/contract.d.ts +1 -1
  391. package/dist/sites/normalize.d.ts +1 -1
  392. package/dist/slots/ManagedLink.d.ts +2 -2
  393. package/dist/slots/ManagedList.d.ts +2 -2
  394. package/dist/slots/ManagedRichText.d.ts +1 -1
  395. package/dist/slots/ManagedSlot.d.ts +1 -1
  396. package/dist/slots/contract.d.ts +1 -1
  397. package/dist/slots/edit/locate.d.ts +1 -1
  398. package/dist/slots/index.d.ts +14 -14
  399. package/dist/slots/index.js +2 -2
  400. package/dist/slots/server-api.d.ts +1 -1
  401. package/dist/{chunk-FLOJUMFR.js → sonor-fetch-runtime-3PFGUXMF.js} +27 -36
  402. package/dist/sync/AddToCalendar.d.ts +1 -1
  403. package/dist/sync/BookingWidget.d.ts +1 -1
  404. package/dist/sync/MeetingFormatStep.d.ts +1 -1
  405. package/dist/sync/api.d.ts +2 -2
  406. package/dist/sync/booking-flow.d.ts +1 -1
  407. package/dist/sync/index.d.ts +3 -3
  408. package/dist/sync/index.js +6 -7
  409. package/dist/types.d.ts +6 -6
  410. package/dist/website/BlocksPopup.d.ts +1 -1
  411. package/dist/website/PopupBlocks.d.ts +1 -1
  412. package/dist/website/SiteDesignReporter.d.ts +2 -2
  413. package/dist/website/SitePopups.d.ts +1 -1
  414. package/dist/website/contract.d.ts +1 -1
  415. package/dist/website/cta-bar.d.ts +1 -1
  416. package/dist/website/cta-bar.js +4 -3
  417. package/dist/website/design.d.ts +2 -2
  418. package/dist/website/images/server.d.ts +1 -1
  419. package/dist/website/images-server.d.ts +1 -1
  420. package/dist/website/images.d.ts +1 -1
  421. package/dist/website/images.js +2 -4
  422. package/dist/website/index.d.ts +4 -4
  423. package/dist/website/index.js +5 -6
  424. package/dist/website/landing/server.d.ts +1 -1
  425. package/dist/website/landing/server.js +11 -6
  426. package/dist/website/landing-server.d.ts +1 -1
  427. package/dist/website/landing.d.ts +1 -1
  428. package/dist/website/landing.js +3 -2
  429. package/dist/website/popup-rules.d.ts +2 -2
  430. package/dist/website/popup-types.d.ts +1 -1
  431. package/dist/website/popups.d.ts +4 -4
  432. package/dist/website/popups.js +14 -8
  433. package/dist/website/slots/contract.d.ts +1 -1
  434. package/dist/website/slots-contract.d.ts +1 -1
  435. package/dist/website/slots.d.ts +2 -2
  436. package/dist/website/slots.js +2 -2
  437. package/dist/{writeLLMsTxt-4HHUAOA6.js → writeLLMsTxt-JUACXQKP.js} +2 -2
  438. package/docs.json +5 -0
  439. package/package.json +8 -2
  440. package/src/analytics/README.md +21 -0
  441. package/src/cta-bar/README.md +4 -0
  442. package/src/forms/README.md +29 -0
  443. package/src/landing/README.md +14 -0
  444. package/src/layout/README.md +3 -0
  445. package/src/og/README.md +28 -0
  446. package/src/resonance/README.md +273 -0
  447. package/src/runtime/README.md +6 -1
  448. package/src/signal/README.md +21 -0
  449. package/src/website/README.md +14 -2
  450. package/dist/AnalyticsProvider-7SBJ27SI.js +0 -13
  451. package/dist/ChatWidget-V46UBDOM.js +0 -20
  452. package/dist/ManagedForm-DDDVMKLJ.js +0 -19
  453. package/dist/SitePopups-VU2C3Z6B.js +0 -13
  454. package/dist/SitemapSync-C4H3HF3L.js +0 -9
  455. package/dist/chunk-5ROTTMBL.js +0 -19
  456. package/dist/chunk-5TM3WPCI.js +0 -7
  457. package/dist/chunk-7HW4TZB5.js +0 -148
  458. package/dist/chunk-IPQKQEWI.js +0 -52
  459. package/dist/chunk-LCDVPAMR.js +0 -24
  460. package/dist/chunk-SHAUX2MQ.js +0 -163
  461. /package/dist/{chunk-3MJNBOUO.js → chunk-2QPVU63T.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /** @deprecated Import from @sonordev/press-kit instead. Compatibility build uses the same canonical source. */
2
- export * from '../press-kit/articles/types';
2
+ export * from "../press-kit/articles/types.js";
@@ -1,2 +1,2 @@
1
1
  /** @deprecated Import from @sonordev/press-kit instead. Compatibility build uses the same canonical source. */
2
- export * from '../press-kit/articles/widget-styles';
2
+ export * from "../press-kit/articles/widget-styles.js";
@@ -13,7 +13,7 @@
13
13
  * This is static file analysis (a brace-aware scan plus regex, not a full CSS
14
14
  * parser) — runs at build time in Node.
15
15
  */
16
- import { colorLuminance } from '../shared/color';
16
+ import { colorLuminance } from "../shared/color.js";
17
17
  /**
18
18
  * Version of the extraction contract, sent with every push. Version 1 (no
19
19
  * field) labelled any site whose CSS merely *mentioned* dark — a Tailwind
@@ -11,7 +11,7 @@
11
11
  * - Proper AI → Live → Offline sequence routing
12
12
  */
13
13
  import React from 'react';
14
- import type { ChatConfig } from './types';
14
+ import type { ChatConfig } from "./types.js";
15
15
  interface ChatWidgetProps {
16
16
  /** Optional: resolved from API key via project-info when not provided */
17
17
  projectId?: string;
@@ -14,7 +14,7 @@
14
14
  * portfolio view; a site with its own chat UI handles it.
15
15
  */
16
16
  import React from 'react';
17
- import type { UiAction } from './types';
17
+ import type { UiAction } from "./types.js";
18
18
  /** A path / URL / scheme we should navigate to rather than send as a chat turn. */
19
19
  declare function isNavigable(action: string): boolean;
20
20
  export interface EchoUiActionsProps {
@@ -9,8 +9,8 @@
9
9
  * project's chat is switched on in Sonor (see ChatWidget's isChatEnabled).
10
10
  */
11
11
  import React from 'react';
12
- import type { ChatLauncherPlacement } from './types';
13
- import { type AnalyticsGateOptions } from '../shared/reporting-gate';
12
+ import type { ChatLauncherPlacement } from "./types.js";
13
+ import { type AnalyticsGateOptions } from "../shared/reporting-gate.js";
14
14
  export interface SiteChatProps extends ChatLauncherPlacement, AnalyticsGateOptions {
15
15
  apiUrl?: string;
16
16
  apiKey?: string;
@@ -12,7 +12,7 @@
12
12
  * drawn by `startChat` and again when the session came up, so every AI-mode
13
13
  * visitor who started from a chip saw it twice.
14
14
  */
15
- import type { UiAction } from './types';
15
+ import type { UiAction } from "./types.js";
16
16
  export interface MessageAttachment {
17
17
  name: string;
18
18
  url: string;
@@ -6,10 +6,10 @@
6
6
  * (idle-deferred, gated like analytics), and `ChatWidget` is the widget
7
7
  * itself.
8
8
  */
9
- export { SiteChat, type SiteChatProps } from './SiteChat';
10
- export { ChatWidget, EchoChat, isChatEnabled } from './ChatWidget';
11
- export { chatLauncherStyles, DEFAULT_LAUNCHER_OFFSET_BOTTOM } from './launcher-placement';
12
- export type { ChatLauncherStyles } from './launcher-placement';
13
- export { SONOR_PUBLIC_ECHO_DEFAULTS, getEchoWidgetProps } from './echo-config';
14
- export type { EchoPublicConfig } from './echo-config';
15
- export type { ChatAvailability, ChatConfig, ChatConversation, ChatLauncherPlacement, ChatLauncherPosition, ChatMessage, UiAction, UiActionType, } from './types';
9
+ export { SiteChat, type SiteChatProps } from "./SiteChat.js";
10
+ export { ChatWidget, EchoChat, isChatEnabled } from "./ChatWidget.js";
11
+ export { chatLauncherStyles, DEFAULT_LAUNCHER_OFFSET_BOTTOM } from "./launcher-placement.js";
12
+ export type { ChatLauncherStyles } from "./launcher-placement.js";
13
+ export { SONOR_PUBLIC_ECHO_DEFAULTS, getEchoWidgetProps } from "./echo-config.js";
14
+ export type { EchoPublicConfig } from "./echo-config.js";
15
+ export type { ChatAvailability, ChatConfig, ChatConversation, ChatLauncherPlacement, ChatLauncherPosition, ChatMessage, UiAction, UiActionType, } from "./types.js";
@@ -1,26 +1,34 @@
1
1
  'use client';
2
- export { ChatWidget, DEFAULT_LAUNCHER_OFFSET_BOTTOM, EchoChat, chatLauncherStyles, isChatEnabled } from '../chunk-TP32MRXV.js';
3
- export { SiteChat } from '../chunk-SBPUFTMP.js';
2
+ export { ChatWidget, DEFAULT_LAUNCHER_OFFSET_BOTTOM, EchoChat, chatLauncherStyles, isChatEnabled } from '../chunk-CJ43K7RA.js';
3
+ export { SiteChat } from '../chunk-WHFWDK2H.js';
4
4
  import '../chunk-6T6CQVNL.js';
5
5
  import '../chunk-JE4A5S4F.js';
6
6
  import '../chunk-27FISYK4.js';
7
- import '../chunk-IWNJCRXW.js';
7
+ import '../chunk-UG53ZW7S.js';
8
8
  import '../chunk-Q6E4OPGG.js';
9
- import '../chunk-5ROTTMBL.js';
9
+ import '../chunk-MDBXGN6W.js';
10
+ import '../chunk-PVY7X5UR.js';
10
11
  import '../chunk-C2FZBUSS.js';
11
12
  import '../chunk-TYSIAWC3.js';
12
13
  import '../chunk-HW7B43E5.js';
13
14
  import '../chunk-NJCTQH2P.js';
14
15
  import '../chunk-S22FSH7C.js';
15
16
  import '../chunk-L2V5PUFN.js';
17
+ import '../chunk-PMXQPO5Q.js';
18
+ import '../chunk-NHDRA4Y5.js';
19
+ import '../chunk-D4M5K6JN.js';
16
20
  import '../chunk-GJWI74ZZ.js';
17
- import '../chunk-5TM3WPCI.js';
18
- import '../chunk-ZQSCMYZO.js';
21
+ import '../chunk-NZOJHERI.js';
22
+ import '../chunk-KMNHNCVG.js';
23
+ import '../chunk-5IVD6G77.js';
24
+ import '../chunk-DXE6SXWW.js';
25
+ import '../chunk-7643MCD2.js';
19
26
  import '../chunk-64XODP7M.js';
20
- import '../chunk-FLOJUMFR.js';
21
- import '../chunk-7HW4TZB5.js';
27
+ import '../chunk-VXCUXHZO.js';
22
28
  import '../chunk-W7OPEMGJ.js';
23
- import '../chunk-F6WLHVMQ.js';
29
+ import '../chunk-A4CC4ZG3.js';
30
+ import '../chunk-MOACHHOJ.js';
31
+ import '../chunk-FRY6PBT6.js';
24
32
  import '../chunk-PKBMQBKP.js';
25
33
 
26
34
  // src/chat/echo-config.ts
@@ -11,7 +11,7 @@
11
11
  * input row. Deriving both from one clearance makes that impossible.
12
12
  */
13
13
  import type { CSSProperties } from 'react';
14
- import type { ChatLauncherPlacement } from './types';
14
+ import type { ChatLauncherPlacement } from "./types.js";
15
15
  /** Launcher clearance above the bottom edge when a site sets nothing. */
16
16
  export declare const DEFAULT_LAUNCHER_OFFSET_BOTTOM = "20px";
17
17
  /**
@@ -1,5 +1,6 @@
1
+ import { configureSiteCredential } from './chunk-TPHOIE4I.js';
1
2
  import { resolveSiteHost } from './chunk-FESKKJAS.js';
2
- import { configureSiteCredential, currentCredential } from './chunk-7HW4TZB5.js';
3
+ import { currentCredential } from './chunk-D4M5K6JN.js';
3
4
 
4
5
  // src/shared/publishCredential.ts
5
6
  function publishSiteCredential({
@@ -1,4 +1,4 @@
1
- import { getSEOPageData, ensureMetadata, getABTest, recordABImpression, getRedirectData, getRobotsData, getSitemapEntries } from './chunk-ODOV76VW.js';
1
+ import { getSEOPageData, ensureMetadata, getABTest, recordABImpression, getRedirectData, getRobotsData, getSitemapEntries } from './chunk-STIVFCWM.js';
2
2
  import { titleProblem, descriptionProblem } from './chunk-ISRBSTB7.js';
3
3
  import { resolveSiteHost } from './chunk-FESKKJAS.js';
4
4
 
@@ -232,7 +232,7 @@ async function generateSitemap(options) {
232
232
  }));
233
233
  }
234
234
  async function registerLocalSitemap(options) {
235
- const { registerSitemap } = await import('./server-api-XIKDWSNO.js');
235
+ const { registerSitemap } = await import('./server-api-A34TABT2.js');
236
236
  let entries = options.entries || [];
237
237
  if (options.autoDiscover && entries.length === 0) {
238
238
  try {
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { trackEvent } from './chunk-LCDVPAMR.js';
2
+ import { trackEvent } from './chunk-AG2RDHYZ.js';
3
3
  import { useRef, useEffect } from 'react';
4
4
  import { usePathname } from 'next/navigation';
5
5
  import { jsx } from 'react/jsx-runtime';
@@ -0,0 +1,37 @@
1
+ import { measurementPolicySnapshot, subscribeMeasurementPolicy, analyticsPurposePermitted } from './chunk-FRY6PBT6.js';
2
+
3
+ // src/shared/identity-storage.ts
4
+ var VISITOR_ID_KEY = "_sk_vid";
5
+ var SESSION_ID_KEY = "_sk_sid";
6
+ var SESSION_TIME_KEY = "_sk_stime";
7
+ var makeMemory = () => ({ visitorId: "", sessionId: "" });
8
+ var memoryIdentity = typeof window === "undefined" ? makeMemory() : window.__SONOR_ANALYTICS_MEMORY_V1__ ?? (window.__SONOR_ANALYTICS_MEMORY_V1__ = makeMemory());
9
+ function identityStorageKeys() {
10
+ const scope = measurementPolicySnapshot().identityScope;
11
+ const suffix = scope ? `:${encodeURIComponent(scope)}` : "";
12
+ return { visitor: VISITOR_ID_KEY + suffix, session: SESSION_ID_KEY + suffix, time: SESSION_TIME_KEY + suffix };
13
+ }
14
+ var previousScope = measurementPolicySnapshot().identityScope;
15
+ var previousKeys = identityStorageKeys();
16
+ subscribeMeasurementPolicy(() => {
17
+ const scope = measurementPolicySnapshot().identityScope;
18
+ if (!analyticsPurposePermitted() || scope !== previousScope) {
19
+ memoryIdentity.visitorId = "";
20
+ memoryIdentity.sessionId = "";
21
+ if (["denied", "withdrawn"].includes(measurementPolicySnapshot().choices.analytics_storage) && typeof window !== "undefined") {
22
+ try {
23
+ window.localStorage.removeItem(previousKeys.visitor);
24
+ } catch {
25
+ }
26
+ try {
27
+ window.sessionStorage.removeItem(previousKeys.session);
28
+ window.sessionStorage.removeItem(previousKeys.time);
29
+ } catch {
30
+ }
31
+ }
32
+ }
33
+ previousScope = scope;
34
+ previousKeys = identityStorageKeys();
35
+ });
36
+
37
+ export { identityStorageKeys, memoryIdentity };
@@ -1,8 +1,8 @@
1
1
  import { toHexColor, normalizeDesignTokens, designTokensHash } from './chunk-XHYE24HU.js';
2
2
  import { contrastRatio, parseColor, relativeLuminance } from './chunk-S22FSH7C.js';
3
- import { resolveAnalyticsTarget } from './chunk-ZQSCMYZO.js';
4
- import { sonorFetch } from './chunk-FLOJUMFR.js';
5
- import { SITE_KIT_VERSION } from './chunk-F6WLHVMQ.js';
3
+ import { SITE_KIT_VERSION } from './chunk-DXE6SXWW.js';
4
+ import { resolveAnalyticsTarget } from './chunk-7643MCD2.js';
5
+ import { sonorFetch } from './chunk-VXCUXHZO.js';
6
6
 
7
7
  // src/website/design.ts
8
8
  var SITE_DESIGN_PATH = "/api/public/site/design";
@@ -1,4 +1,4 @@
1
- import { sonorFetch } from './chunk-FLOJUMFR.js';
1
+ import { sonorFetch } from './chunk-VXCUXHZO.js';
2
2
  import { readPublishedApiConfig } from './chunk-W7OPEMGJ.js';
3
3
 
4
4
  // src/forms/formsApi.ts
@@ -49,6 +49,10 @@ function announceFrameReady() {
49
49
  function isPrivatePreview() {
50
50
  return typeof document !== "undefined" && !!document.querySelector("[data-sk-private-preview]");
51
51
  }
52
+ function isLocalHostname(raw) {
53
+ const hostname = raw.toLowerCase().replace(/\.+$/, "");
54
+ return hostname === "localhost" || hostname.endsWith(".localhost") || hostname === "127.0.0.1" || hostname === "[::1]" || hostname === "::1" || hostname === "0.0.0.0";
55
+ }
52
56
  var announcedSuppression = false;
53
57
  function resolveAnalyticsTarget(options = {}) {
54
58
  if (isPrivatePreview()) return null;
@@ -57,8 +61,7 @@ function resolveAnalyticsTarget(options = {}) {
57
61
  const apiUrl = options.apiUrl || published.apiUrl || DEFAULT_SONOR_API_URL;
58
62
  const apiKey = options.apiKey || published.apiKey;
59
63
  if (!apiKey) return null;
60
- const hostname = (config?.location?.hostname || "").toLowerCase().replace(/\.+$/, "");
61
- const local = hostname === "localhost" || hostname.endsWith(".localhost") || hostname === "127.0.0.1" || hostname === "[::1]" || hostname === "::1" || hostname === "0.0.0.0";
64
+ const local = isLocalHostname(config?.location?.hostname || "");
62
65
  const optIn = local && options.allowLocalhost !== true ? "allowLocalhost" : !options.allowInFrame && isCrossOriginFrame() ? "allowInFrame" : null;
63
66
  if (optIn) {
64
67
  if (options.debug && !announcedSuppression) {
@@ -70,4 +73,4 @@ function resolveAnalyticsTarget(options = {}) {
70
73
  return { apiUrl, apiKey };
71
74
  }
72
75
 
73
- export { announceFrameReady, isCrossOriginFrame, isFramed, isPrivatePreview, isTopFrameSameOrigin, resolveAnalyticsTarget };
76
+ export { announceFrameReady, isCrossOriginFrame, isFramed, isLocalHostname, isPrivatePreview, isTopFrameSameOrigin, resolveAnalyticsTarget };
@@ -0,0 +1 @@
1
+
@@ -56,6 +56,14 @@ function isNextControlFlow(error) {
56
56
  }
57
57
  return false;
58
58
  }
59
+ var ServerApiFetchError = class extends Error {
60
+ constructor(category, status = null) {
61
+ super(`Sonor server request failed (${category})`);
62
+ this.category = category;
63
+ this.status = status;
64
+ this.name = "ServerApiFetchError";
65
+ }
66
+ };
59
67
  async function serverApiFetch(path, options = {}) {
60
68
  const {
61
69
  method = "GET",
@@ -70,16 +78,18 @@ async function serverApiFetch(path, options = {}) {
70
78
  timeoutMs = DEFAULT_ATTEMPT_TIMEOUT_MS,
71
79
  totalTimeoutMs = DEFAULT_TOTAL_TIMEOUT_MS,
72
80
  requireKey = false,
81
+ throwOnError = false,
73
82
  logPrefix = "@sonordev/site-kit",
74
83
  init
75
84
  } = options;
76
85
  const overrides = { apiKey: overrideApiKey, apiUrl: overrideApiUrl };
77
86
  let config;
78
- if (requireKey) {
87
+ if (requireKey && !throwOnError) {
79
88
  config = requireServerApiConfig(overrides);
80
89
  } else {
81
90
  const resolved = resolveServerApiConfig(overrides);
82
91
  if (!resolved) {
92
+ if (throwOnError) throw new ServerApiFetchError("configuration");
83
93
  console.warn(`${logPrefix}: Missing SONOR_API_KEY \u2014 request to ${path} skipped.`);
84
94
  return null;
85
95
  }
@@ -87,21 +97,32 @@ async function serverApiFetch(path, options = {}) {
87
97
  }
88
98
  const { apiUrl, apiKey } = config;
89
99
  const url = `${apiUrl}${path.startsWith("/") ? path : `/${path}`}`;
90
- const serializedBody = body === void 0 ? void 0 : typeof body === "string" ? body : JSON.stringify(body);
100
+ let serializedBody;
101
+ try {
102
+ serializedBody = body === void 0 ? void 0 : typeof body === "string" ? body : JSON.stringify(body);
103
+ } catch (error) {
104
+ if (isNextControlFlow(error)) throw error;
105
+ if (throwOnError) throw new ServerApiFetchError("configuration");
106
+ throw error;
107
+ }
91
108
  const attempts = retry ? Math.max(1, maxAttempts) : 1;
92
109
  const deadline = monotonicMs() + Math.max(1, totalTimeoutMs);
93
110
  for (let attempt = 1; attempt <= attempts; attempt++) {
111
+ if (throwOnError && init?.signal?.aborted) throw new ServerApiFetchError("cancelled");
94
112
  const remaining = deadline - monotonicMs();
95
113
  if (remaining <= 0) {
114
+ if (throwOnError) throw new ServerApiFetchError("timeout");
96
115
  console.warn(
97
116
  `${logPrefix}: Time budget (${totalTimeoutMs}ms) exhausted for ${method} ${path} after ${attempt - 1} attempt(s).`
98
117
  );
99
118
  return null;
100
119
  }
120
+ let signal;
101
121
  try {
122
+ signal = attemptSignal(Math.min(timeoutMs, remaining), init?.signal);
102
123
  const response = await fetch(url, {
103
124
  ...init,
104
- signal: attemptSignal(Math.min(timeoutMs, remaining), init?.signal),
125
+ signal,
105
126
  method,
106
127
  headers: {
107
128
  "Content-Type": "application/json",
@@ -124,6 +145,7 @@ async function serverApiFetch(path, options = {}) {
124
145
  continue;
125
146
  }
126
147
  if (!response.ok) {
148
+ if (throwOnError) throw new ServerApiFetchError("http", response.status);
127
149
  let detail = response.statusText;
128
150
  try {
129
151
  const err = await response.json().catch(() => ({}));
@@ -136,12 +158,15 @@ async function serverApiFetch(path, options = {}) {
136
158
  return await response.json();
137
159
  } catch (error) {
138
160
  if (isNextControlFlow(error)) throw error;
161
+ if (throwOnError && error instanceof ServerApiFetchError) throw error;
162
+ if (throwOnError && init?.signal?.aborted) throw new ServerApiFetchError("cancelled");
139
163
  if (retry && attempt < attempts && monotonicMs() < deadline) {
140
164
  await sleep(
141
165
  Math.min(200 * attempt * attempt + retryJitter() * 150, Math.max(0, deadline - monotonicMs()))
142
166
  );
143
167
  continue;
144
168
  }
169
+ if (throwOnError) throw new ServerApiFetchError(signal?.aborted || monotonicMs() >= deadline ? "timeout" : "network");
145
170
  console.warn(
146
171
  `${logPrefix}: Network error for ${url}:`,
147
172
  error instanceof Error ? error.message : error
@@ -149,7 +174,8 @@ async function serverApiFetch(path, options = {}) {
149
174
  return null;
150
175
  }
151
176
  }
177
+ if (throwOnError) throw new ServerApiFetchError("timeout");
152
178
  return null;
153
179
  }
154
180
 
155
- export { isNextControlFlow, requireServerApiConfig, resolveApiOrigin, resolveServerApiConfig, serverApiFetch };
181
+ export { ServerApiFetchError, isNextControlFlow, requireServerApiConfig, resolveApiOrigin, resolveServerApiConfig, serverApiFetch };
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { locToPath, isMalformedSitemapPath, inferPageType } from './chunk-YVKRYQRG.js';
3
- import { resolveAnalyticsTarget } from './chunk-ZQSCMYZO.js';
4
- import { sonorFetch } from './chunk-FLOJUMFR.js';
3
+ import { resolveAnalyticsTarget } from './chunk-7643MCD2.js';
4
+ import { sonorFetch } from './chunk-VXCUXHZO.js';
5
5
  import { useRef, useEffect } from 'react';
6
6
 
7
7
  var SYNC_STAMP_KEY = "_sk_sitemap_synced_at";
@@ -0,0 +1,45 @@
1
+ import { subscribeMeasurementPolicy, measurementPolicySnapshot, analyticsPurposePermitted } from './chunk-FRY6PBT6.js';
2
+
3
+ // src/analytics/dispatch.ts
4
+ function isCurrentCall(call) {
5
+ const current = measurementPolicySnapshot();
6
+ return analyticsPurposePermitted() && call.collectionEpoch === current.collectionEpoch && call.identityScope === current.identityScope;
7
+ }
8
+ function enqueue(call) {
9
+ if (queue.length >= MAX_QUEUE) return;
10
+ const { collectionEpoch, identityScope } = measurementPolicySnapshot();
11
+ queue.push({ ...call, collectionEpoch, identityScope });
12
+ }
13
+ var MAX_QUEUE = 50;
14
+ var dispatcher = null;
15
+ var queue = [];
16
+ subscribeMeasurementPolicy(() => {
17
+ queue = queue.filter(isCurrentCall);
18
+ });
19
+ function registerAnalyticsDispatcher(next) {
20
+ dispatcher = next;
21
+ if (!next) return;
22
+ if (!analyticsPurposePermitted()) {
23
+ queue = [];
24
+ return;
25
+ }
26
+ const pending = queue;
27
+ queue = [];
28
+ for (const call of pending) {
29
+ if (!isCurrentCall(call)) continue;
30
+ if (call.kind === "event") next.trackEvent(call.options);
31
+ else next.trackConversion(call.options);
32
+ }
33
+ }
34
+ function trackEvent(options) {
35
+ if (!analyticsPurposePermitted()) return;
36
+ if (dispatcher) dispatcher.trackEvent(options);
37
+ else enqueue({ kind: "event", options });
38
+ }
39
+ function trackConversion(options) {
40
+ if (!analyticsPurposePermitted()) return;
41
+ if (dispatcher) dispatcher.trackConversion(options);
42
+ else enqueue({ kind: "conversion", options });
43
+ }
44
+
45
+ export { registerAnalyticsDispatcher, trackConversion, trackEvent };
@@ -0,0 +1,36 @@
1
+ 'use client';
2
+ import { useDeferredActivation } from './chunk-YC7ELZS3.js';
3
+ import { primeMeasurementPolicy } from './chunk-FRY6PBT6.js';
4
+ import { useRef, useEffect } from 'react';
5
+ import { usePathname } from 'next/navigation';
6
+
7
+ function ResonanceRuntime({ site, apiUrl, apiKey }) {
8
+ primeMeasurementPolicy();
9
+ const pathname = usePathname();
10
+ const ready = useDeferredActivation(true);
11
+ const latestPath = useRef(pathname);
12
+ latestPath.current = pathname;
13
+ const active = useRef(void 0);
14
+ useEffect(() => {
15
+ if (!ready) return;
16
+ let cancelled = false;
17
+ void import('./runtime-core-WT7KKLWQ.js').then(({ mountResonanceRuntime }) => {
18
+ if (cancelled) return;
19
+ const runtime = mountResonanceRuntime({ site, apiUrl, apiKey });
20
+ active.current = runtime;
21
+ if (latestPath.current) runtime?.navigate(latestPath.current);
22
+ }).catch(() => {
23
+ });
24
+ return () => {
25
+ cancelled = true;
26
+ active.current?.stop();
27
+ active.current = void 0;
28
+ };
29
+ }, [site, apiUrl, apiKey, ready]);
30
+ useEffect(() => {
31
+ if (pathname) active.current?.navigate(pathname);
32
+ }, [pathname]);
33
+ return null;
34
+ }
35
+
36
+ export { ResonanceRuntime };
@@ -1,5 +1,6 @@
1
- import { CtaBarBehavior } from './chunk-UPFU63L4.js';
1
+ import { CtaBarBehavior } from './chunk-55GFMOI6.js';
2
2
  import { GlassStyles } from './chunk-JE4A5S4F.js';
3
+ import * as React from 'react';
3
4
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
4
5
 
5
6
  var CTA_BAR_STYLE_HREF = "sk-cta-bar";
@@ -178,7 +179,7 @@ function CtaBar({
178
179
  "data-hidden": showAfter ? "" : void 0,
179
180
  children: [
180
181
  children,
181
- /* @__PURE__ */ jsx(
182
+ /* @__PURE__ */ jsx(React.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
182
183
  CtaBarBehavior,
183
184
  {
184
185
  showAfter,
@@ -187,7 +188,7 @@ function CtaBar({
187
188
  compactOnScroll,
188
189
  track
189
190
  }
190
- )
191
+ ) })
191
192
  ]
192
193
  }
193
194
  )
@@ -2,9 +2,9 @@
2
2
  import { VISUAL_VIEWPORT_GAP_PROPERTY } from './chunk-6T6CQVNL.js';
3
3
  import { GlassStyles } from './chunk-JE4A5S4F.js';
4
4
  import { DEFAULT_WIDGET_Z_INDEX } from './chunk-27FISYK4.js';
5
- import { useForm } from './chunk-IWNJCRXW.js';
5
+ import { useForm } from './chunk-UG53ZW7S.js';
6
6
  import { parseColor, relativeLuminance, DARK_LUMINANCE, contrastRatio } from './chunk-S22FSH7C.js';
7
- import { sonorFetch } from './chunk-FLOJUMFR.js';
7
+ import { sonorFetch } from './chunk-VXCUXHZO.js';
8
8
  import { readPublishedApiConfig } from './chunk-W7OPEMGJ.js';
9
9
  import { useState, useEffect, useRef, useLayoutEffect, useCallback, Fragment as Fragment$1 } from 'react';
10
10
  import { lexer } from 'marked';
@@ -0,0 +1,25 @@
1
+ // src/shared/site-token-state.ts
2
+ function initialTokenState() {
3
+ return {
4
+ seed: void 0,
5
+ isToken: false,
6
+ apiUrl: "https://api.sonor.io",
7
+ token: null,
8
+ refreshing: null
9
+ };
10
+ }
11
+ var TOKEN_STATE_KEY = "__SONOR_SITE_TOKEN_STATE__";
12
+ var siteTokenState = (() => {
13
+ if (typeof window === "undefined") return initialTokenState();
14
+ const w = window;
15
+ return w[TOKEN_STATE_KEY] ?? (w[TOKEN_STATE_KEY] = initialTokenState());
16
+ })();
17
+ function isTokenMode() {
18
+ return siteTokenState.isToken;
19
+ }
20
+ function currentCredential(seed) {
21
+ if (!siteTokenState.isToken) return seed ?? siteTokenState.seed;
22
+ return siteTokenState.token ?? seed ?? siteTokenState.seed;
23
+ }
24
+
25
+ export { currentCredential, isTokenMode, siteTokenState };
@@ -1,4 +1,4 @@
1
1
  // src/shared/version.ts
2
- var SITE_KIT_VERSION = "8.8.0";
2
+ var SITE_KIT_VERSION = "8.9.0";
3
3
 
4
4
  export { SITE_KIT_VERSION };