@sonordev/site-kit 7.1.1 → 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 (282) hide show
  1. package/AGENTS.md +3 -3
  2. package/CHANGELOG.md +68 -3426
  3. package/README.md +9 -8
  4. package/agent-manifest.json +12 -4
  5. package/dist/{AnalyticsProvider-3MI5RCTL.js → AnalyticsProvider-SLFFBRPE.js} +4 -4
  6. package/dist/{ArticleViewTracker-CMBSJR3N.js → ArticleViewTracker-TM5AMGN2.js} +3 -3
  7. package/dist/{BlocksPopup-X3OAAK2L.js → BlocksPopup-YJNJIVPO.js} +5 -5
  8. package/dist/ChatWidget-XKOSH66S.js +17 -0
  9. package/dist/{FileField-QRSEGO6D.js → FileField-CI4UL5SH.js} +3 -3
  10. package/dist/{FormSpotlight-XKV7VTN4.js → FormSpotlight-F2AAEGBN.js} +20 -6
  11. package/dist/{FormStage-C3YGYAUZ.js → FormStage-BI5R5CNC.js} +27 -7
  12. package/dist/ManagedForm-G6COGHXL.js +16 -0
  13. package/dist/{ManagedNewsletterForm-LPIKGJF4.js → ManagedNewsletterForm-BO3WCGXX.js} +7 -5
  14. package/dist/{SignalCore-ICXXZBYI.js → SignalCore-ZA6WHKBR.js} +3 -3
  15. package/dist/SiteChat-YJADDTKG.js +5 -0
  16. package/dist/{SiteDesignReporter-A7MS2CIP.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/SitemapSync.d.ts +1 -1
  20. package/dist/_client/booking-widget.js +5 -5
  21. package/dist/_client/testimonial-section.d.ts +1 -1
  22. package/dist/affiliates/api.d.ts +1 -1
  23. package/dist/affiliates/index.js +3 -3
  24. package/dist/analytics/AnalyticsProvider.d.ts +1 -1
  25. package/dist/analytics/index.js +4 -4
  26. package/dist/analytics/send-gate.d.ts +13 -26
  27. package/dist/articles/Article.d.ts +1 -1
  28. package/dist/articles/ArticleList.d.ts +1 -1
  29. package/dist/articles/ClusterLandingPage.d.ts +2 -2
  30. package/dist/articles/PublicationLayout.d.ts +1 -1
  31. package/dist/articles/PublicationSidebar.d.ts +1 -1
  32. package/dist/articles/RelatedPosts.d.ts +1 -1
  33. package/dist/articles/author-schema.d.ts +1 -1
  34. package/dist/articles/excerpt.d.ts +3 -4
  35. package/dist/articles/index.d.ts +2 -2
  36. package/dist/articles/index.js +2 -2
  37. package/dist/articles/news-sitemap.d.ts +1 -1
  38. package/dist/articles/processArticleHtml.d.ts +1 -1
  39. package/dist/articles/server-core.d.ts +4 -4
  40. package/dist/articles/server-ui.js +3 -2
  41. package/dist/articles/server.d.ts +4 -4
  42. package/dist/articles/server.js +2 -1
  43. package/dist/articles/types.d.ts +1 -1
  44. package/dist/{engage → chat}/ChatWidget.d.ts +8 -7
  45. package/dist/{engage → chat}/EchoUiActions.d.ts +4 -4
  46. package/dist/chat/SiteChat.d.ts +25 -0
  47. package/dist/{engage → chat}/brand-color.d.ts +2 -2
  48. package/dist/{engage → chat}/chat-messages.d.ts +1 -1
  49. package/dist/{engage → chat}/echo-config.d.ts +1 -1
  50. package/dist/chat/index.d.ts +10 -6
  51. package/dist/chat/index.js +14 -8
  52. package/dist/{engage → chat}/launcher-placement.d.ts +1 -7
  53. package/dist/{engage → chat}/socket-loader.d.ts +2 -2
  54. package/dist/chat/types.d.ts +136 -0
  55. package/dist/chunk-27FISYK4.js +4 -0
  56. package/dist/{chunk-QPEEKFCA.js → chunk-4NTBQNHA.js} +249 -80
  57. package/dist/{chunk-RK7GF7PQ.js → chunk-5V2V5C3Y.js} +2 -4
  58. package/dist/{chunk-ICFRH2ED.js → chunk-5YCEMV2L.js} +1 -1
  59. package/dist/{chunk-V4HUSHZO.js → chunk-64DKGVEI.js} +41 -7
  60. package/dist/{chunk-GLHQ3LRO.js → chunk-6U3VLV2C.js} +1 -1
  61. package/dist/{chunk-ZETJTCMV.js → chunk-BC4Y3S3D.js} +1 -1
  62. package/dist/{chunk-JSZN6LDZ.js → chunk-BF7TZYC3.js} +38 -31
  63. package/dist/{chunk-EFPS56JA.js → chunk-BKY2ZNM7.js} +1 -1
  64. package/dist/{chunk-AQSNPZY4.js → chunk-C2FZBUSS.js} +80 -1
  65. package/dist/{chunk-H42PZKVC.js → chunk-CF5QNFYU.js} +2 -2
  66. package/dist/{chunk-JC7KXNNM.js → chunk-D5DCBD4Y.js} +2 -2
  67. package/dist/{chunk-PXZ7LAOY.js → chunk-D6ZC7XKZ.js} +2 -2
  68. package/dist/chunk-EJVQJCG5.js +370 -0
  69. package/dist/{chunk-6OL23QYD.js → chunk-F24FNCTK.js} +1 -1
  70. package/dist/{chunk-NEKEH4CK.js → chunk-FR6BYFPC.js} +53 -21
  71. package/dist/{chunk-KOPVJQ2P.js → chunk-GEXT7BTE.js} +1 -1
  72. package/dist/{chunk-ZAWANWUS.js → chunk-GGORNBSC.js} +18 -6
  73. package/dist/{chunk-DUQMSNF2.js → chunk-HGFAEDG3.js} +1 -1
  74. package/dist/chunk-HODO5BX5.js +28 -0
  75. package/dist/chunk-HW7B43E5.js +14 -0
  76. package/dist/{chunk-EQBZ24VH.js → chunk-IAM3D3RL.js} +43 -24
  77. package/dist/{chunk-ODADQM6Z.js → chunk-JJ3DELUL.js} +2 -2
  78. package/dist/{chunk-542MIHNP.js → chunk-JMLK6MH7.js} +1 -1
  79. package/dist/{chunk-7FWA3I6A.js → chunk-JWTQS5F5.js} +1 -1
  80. package/dist/{chunk-OUNRFXDC.js → chunk-K4ZHAURD.js} +1 -1
  81. package/dist/chunk-NV72HZ4W.js +45 -0
  82. package/dist/{chunk-4Y5FWDPM.js → chunk-NZ4RXN3G.js} +55 -7
  83. package/dist/chunk-OWZ7ATLZ.js +187 -0
  84. package/dist/{chunk-TXBAOEKG.js → chunk-PKGN32AU.js} +5 -4
  85. package/dist/chunk-Q6E4OPGG.js +40 -0
  86. package/dist/{chunk-J4D6ZXRW.js → chunk-QL6XNPSD.js} +3 -3
  87. package/dist/{chunk-HAG4YIZY.js → chunk-R46IQIGK.js} +6 -6
  88. package/dist/{chunk-R3VKF43H.js → chunk-RPZ7OQGD.js} +1 -1
  89. package/dist/{chunk-Q3S26EQA.js → chunk-S54ECQGY.js} +1 -1
  90. package/dist/{chunk-JIL5VY2R.js → chunk-VHKEF5ZB.js} +1 -1
  91. package/dist/{chunk-ILAW3XKD.js → chunk-VO3JYRT5.js} +43 -29
  92. package/dist/chunk-VWWITFWM.js +300 -0
  93. package/dist/{chunk-OPRBF7VE.js → chunk-ZTLMPUO6.js} +3 -2
  94. package/dist/client/index.js +3 -3
  95. package/dist/cms/CmsPreview.d.ts +2 -2
  96. package/dist/cms/index.d.ts +3 -3
  97. package/dist/cms/server-api.d.ts +1 -1
  98. package/dist/cms/types.d.ts +1 -1
  99. package/dist/commerce/EventCheckout.d.ts +1 -1
  100. package/dist/commerce/EventsAgenda.d.ts +3 -3
  101. package/dist/commerce/api.d.ts +1 -1
  102. package/dist/commerce/index.js +4 -4
  103. package/dist/commerce/server.d.ts +3 -4
  104. package/dist/contracts/color.d.ts +1 -1
  105. package/dist/contracts/entries.d.ts +1 -1
  106. package/dist/contracts/error-page.d.ts +183 -0
  107. package/dist/contracts/fleet.d.ts +9 -9
  108. package/dist/contracts/forms.d.ts +4 -10
  109. package/dist/contracts/llms.d.ts +2 -1
  110. package/dist/contracts/portfolio.d.ts +11 -15
  111. package/dist/contracts/proposal-sitemap.d.ts +130 -0
  112. package/dist/contracts/schema-placeholders.d.ts +87 -0
  113. package/dist/contracts/seo-meta.d.ts +11 -12
  114. package/dist/contracts/seo-pages.d.ts +12 -18
  115. package/dist/contracts/site-cache.d.ts +4 -4
  116. package/dist/contracts/sites-normalize.d.ts +2 -4
  117. package/dist/contracts/sites.d.ts +3 -5
  118. package/dist/contracts/slot-content.d.ts +2 -2
  119. package/dist/contracts/slots.d.ts +6 -6
  120. package/dist/contracts/voice.d.ts +56 -0
  121. package/dist/contracts/website.d.ts +2 -2
  122. package/dist/engage/EngageWidget.d.ts +13 -12
  123. package/dist/engage/index.d.ts +10 -9
  124. package/dist/engage/index.js +31 -35
  125. package/dist/engage/types.d.ts +19 -244
  126. package/dist/fleet/FleetHeartbeat.d.ts +2 -2
  127. package/dist/fleet/index.js +4 -4
  128. package/dist/forms/FormEnhancer.d.ts +25 -12
  129. package/dist/forms/FormSpotlight.d.ts +2 -2
  130. package/dist/forms/ManagedForm.d.ts +1 -1
  131. package/dist/forms/ServerForm.d.ts +11 -10
  132. package/dist/forms/StaticForm.d.ts +4 -2
  133. package/dist/forms/field-autocomplete.d.ts +28 -0
  134. package/dist/forms/field-interactions.d.ts +2 -2
  135. package/dist/forms/form-dom-values.d.ts +42 -0
  136. package/dist/forms/form-loaded-at.d.ts +2 -2
  137. package/dist/forms/formsApi.d.ts +2 -2
  138. package/dist/forms/index.d.ts +1 -1
  139. package/dist/forms/index.js +11 -9
  140. package/dist/forms/server.d.ts +1 -1
  141. package/dist/forms/server.js +6 -4
  142. package/dist/forms/static.js +3 -2
  143. package/dist/forms/submitForm.d.ts +9 -2
  144. package/dist/forms/types.d.ts +44 -5
  145. package/dist/forms/useForm.d.ts +21 -4
  146. package/dist/forms/webmcp.d.ts +38 -0
  147. package/dist/images/ManagedFavicon.d.ts +1 -1
  148. package/dist/images/ManagedImage.d.ts +4 -4
  149. package/dist/images/api.d.ts +1 -1
  150. package/dist/images/index.d.ts +2 -2
  151. package/dist/images/index.js +4 -4
  152. package/dist/index.d.ts +4 -1
  153. package/dist/index.js +1 -1
  154. package/dist/landing/contract.d.ts +3 -4
  155. package/dist/layout/SiteKitClientProviders.d.ts +4 -4
  156. package/dist/layout/SiteKitLayout.d.ts +11 -11
  157. package/dist/layout/client.d.ts +4 -4
  158. package/dist/layout/client.js +7 -7
  159. package/dist/layout/index.js +8 -8
  160. package/dist/layout/types.d.ts +7 -6
  161. package/dist/llms/SpeakableSchema.d.ts +2 -2
  162. package/dist/llms/agent-access.d.ts +2 -2
  163. package/dist/llms/aiRobots.d.ts +4 -4
  164. package/dist/llms/api.d.ts +2 -2
  165. package/dist/llms/contract.js +1 -1
  166. package/dist/llms/generateLLMsTxt.d.ts +1 -1
  167. package/dist/llms/index.js +6 -6
  168. package/dist/llms/links.d.ts +1 -1
  169. package/dist/llms/revalidate.d.ts +1 -1
  170. package/dist/llms/seo-revalidate.d.ts +2 -3
  171. package/dist/llms/types.d.ts +6 -6
  172. package/dist/llms/writeLLMsTxt.d.ts +10 -10
  173. package/dist/manifest/index.d.ts +8 -8
  174. package/dist/maps/index.js +3 -3
  175. package/dist/mcp/WebMcpTools.d.ts +1 -1
  176. package/dist/mcp/index.js +2 -14
  177. package/dist/mcp/report.d.ts +2 -2
  178. package/dist/mcp/serverCard.d.ts +1 -1
  179. package/dist/mcp/sonor.d.ts +5 -6
  180. package/dist/mcp/sonor.js +14 -11
  181. package/dist/mcp/transport.d.ts +1 -2
  182. package/dist/mcp/types.d.ts +4 -5
  183. package/dist/motion/engine.d.ts +2 -3
  184. package/dist/motion/failsafe.d.ts +1 -2
  185. package/dist/motion/gsap.d.ts +2 -2
  186. package/dist/motion/three.d.ts +1 -1
  187. package/dist/og/config.d.ts +4 -4
  188. package/dist/og/contrast.d.ts +2 -2
  189. package/dist/og/pages.d.ts +5 -5
  190. package/dist/og/route-fit.d.ts +2 -2
  191. package/dist/og/route.d.ts +1 -2
  192. package/dist/og/template.d.ts +1 -1
  193. package/dist/proxy/index.d.ts +2 -2
  194. package/dist/proxy/securityHeaders.d.ts +10 -12
  195. package/dist/redirects/index.d.ts +7 -7
  196. package/dist/reputation/TestimonialSection.d.ts +1 -1
  197. package/dist/reputation/api.d.ts +1 -1
  198. package/dist/revalidate/index.js +2 -2
  199. package/dist/robots/index.d.ts +5 -5
  200. package/dist/robots/indexnow.d.ts +2 -3
  201. package/dist/seo/ManagedScripts.d.ts +2 -2
  202. package/dist/seo/client.js +4 -4
  203. package/dist/seo/getManagedMetadata.d.ts +1 -1
  204. package/dist/seo/groundingSchema.d.ts +2 -2
  205. package/dist/seo/index.js +15 -8
  206. package/dist/seo/llms/contract.js +1 -1
  207. package/dist/seo/llms.js +6 -6
  208. package/dist/seo/register-sitemap-cli-impl.d.ts +1 -1
  209. package/dist/seo/register-sitemap-cli.d.ts +1 -1
  210. package/dist/seo/register-sitemap-cli.js +2 -2
  211. package/dist/seo/schema-filter.d.ts +5 -6
  212. package/dist/seo/server-api.d.ts +1 -1
  213. package/dist/seo/sitemap.js +4 -4
  214. package/dist/seo/types.d.ts +4 -4
  215. package/dist/seo/withManagedMetadata.d.ts +4 -4
  216. package/dist/server/index.js +2 -2
  217. package/dist/server/mint-site-token.d.ts +1 -2
  218. package/dist/server/server-fetch.d.ts +5 -5
  219. package/dist/shared/build-entries.d.ts +4 -4
  220. package/dist/shared/dialog.d.ts +27 -0
  221. package/dist/shared/frame.d.ts +8 -9
  222. package/dist/shared/fresh-fetch.d.ts +1 -2
  223. package/dist/shared/identity.d.ts +1 -1
  224. package/dist/shared/layers.d.ts +7 -0
  225. package/dist/shared/mid-form.d.ts +53 -0
  226. package/dist/shared/next-files.d.ts +1 -1
  227. package/dist/shared/publishCredential.d.ts +1 -1
  228. package/dist/shared/reporting-gate.d.ts +1 -1
  229. package/dist/shared/uuid.d.ts +1 -2
  230. package/dist/shared/version.d.ts +1 -1
  231. package/dist/shared/visual-viewport-gap.d.ts +3 -3
  232. package/dist/signal/index.js +2 -2
  233. package/dist/signal/types.d.ts +1 -1
  234. package/dist/site-config/index.d.ts +2 -2
  235. package/dist/sitemap/index.d.ts +13 -13
  236. package/dist/sitemap/index.js +4 -4
  237. package/dist/sitemap/shared.d.ts +3 -3
  238. package/dist/sites/site-param.d.ts +2 -2
  239. package/dist/slots/ManagedRichText.d.ts +1 -1
  240. package/dist/slots/ManagedSlot.d.ts +1 -1
  241. package/dist/slots/index.d.ts +1 -3
  242. package/dist/{socket-loader-R24ZSRSQ.js → socket-loader-CGIPEG74.js} +1 -1
  243. package/dist/sync/index.js +5 -5
  244. package/dist/types.d.ts +4 -2
  245. package/dist/website/BlocksPopup.d.ts +1 -1
  246. package/dist/website/PopupBlocks.d.ts +8 -6
  247. package/dist/website/SitePopups.d.ts +25 -0
  248. package/dist/website/images.js +4 -4
  249. package/dist/website/index.js +6 -6
  250. package/dist/website/popup-rules.d.ts +46 -0
  251. package/dist/website/popup-types.d.ts +113 -0
  252. package/dist/website/popups.d.ts +2 -6
  253. package/dist/website/popups.js +6 -14
  254. package/dist/{writeLLMsTxt-QR23OQUE.js → writeLLMsTxt-OV24LQVL.js} +3 -3
  255. package/docs/MIGRATING-TO-7.md +50 -22
  256. package/docs.json +2 -1
  257. package/package.json +2 -2
  258. package/src/admin-auth/README.md +3 -3
  259. package/src/analytics/README.md +9 -11
  260. package/src/articles/README.md +10 -7
  261. package/src/{engage → chat}/README.md +63 -62
  262. package/src/cta-bar/README.md +11 -11
  263. package/src/forms/README.md +60 -12
  264. package/src/layout/README.md +8 -5
  265. package/src/llms/README.md +3 -3
  266. package/src/mcp/README.md +7 -7
  267. package/src/motion/README.md +1 -1
  268. package/src/og/README.md +26 -27
  269. package/src/proxy/README.md +14 -14
  270. package/src/seo/README.md +4 -2
  271. package/src/slots/README.md +1 -1
  272. package/src/sync/README.md +10 -0
  273. package/src/website/README.md +133 -0
  274. package/dist/ChatWidget-JMFBXJ75.js +0 -15
  275. package/dist/EngageWidget-A3QKZ3SU.js +0 -11
  276. package/dist/ManagedForm-2GSSDJPP.js +0 -14
  277. package/dist/SitemapSync-4U654SEA.js +0 -8
  278. package/dist/chunk-B73QPZPH.js +0 -837
  279. package/dist/chunk-NDF4A5JM.js +0 -37
  280. package/dist/chunk-RTMMHTEQ.js +0 -100
  281. package/dist/engage/DesignRenderer.d.ts +0 -57
  282. package/dist/engage/element-rules.d.ts +0 -38
@@ -0,0 +1,113 @@
1
+ /**
2
+ * @sonordev/site-kit/website/popups: what a published popup looks like.
3
+ *
4
+ * Sonor → Website → Popups & Banners. The API serves them from
5
+ * `GET /engage/widget/elements` (its route keeps the retired module's name).
6
+ */
7
+ import type { PopupBlock } from './contract';
8
+ /** What Sonor says a popup is. A blocks popup's `layout` says where it actually sits. */
9
+ export type SitePopupType = 'popup' | 'nudge' | 'bar' | 'chat' | 'slide-in';
10
+ /** A popup, banner or toast published for this site (Sonor → Website → Popups & Banners). */
11
+ export interface SitePopup {
12
+ id: string;
13
+ project_id: string;
14
+ name: string;
15
+ type: SitePopupType;
16
+ config: SitePopupConfig;
17
+ targeting: SitePopupTargeting;
18
+ trigger: SitePopupTrigger;
19
+ is_active: boolean;
20
+ priority: number;
21
+ created_at: string;
22
+ updated_at: string;
23
+ /**
24
+ * The popup as blocks, drawn in the site's own design by PopupBlocks. A
25
+ * popup without blocks isn't drawn: Sonor's older `design_json` (Engage
26
+ * Studio) is for site-kits before 7.2.0, and is ignored here.
27
+ */
28
+ blocks?: PopupBlock[];
29
+ /**
30
+ * Where a blocks popup sits. `type`/`config` describe it for older kits
31
+ * (which can't pin a bar to the bottom); this says what it actually is.
32
+ */
33
+ layout?: {
34
+ placement: 'popup' | 'bar' | 'slide-in';
35
+ edge?: 'top' | 'bottom';
36
+ corner?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
37
+ /** The popup's own accent, over the site's. */
38
+ accent?: string;
39
+ };
40
+ status?: 'draft' | 'published' | 'archived' | 'paused';
41
+ }
42
+ export interface SitePopupConfig {
43
+ /** Visual style */
44
+ theme?: 'light' | 'dark' | 'custom';
45
+ position?: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
46
+ /** Content */
47
+ title?: string;
48
+ message?: string;
49
+ imageUrl?: string;
50
+ /** CTA */
51
+ ctaText?: string;
52
+ ctaUrl?: string;
53
+ ctaAction?: 'link' | 'close' | 'form' | 'chat';
54
+ /** Form (if ctaAction is 'form') */
55
+ formId?: string;
56
+ /** Styling */
57
+ backgroundColor?: string;
58
+ textColor?: string;
59
+ ctaBackgroundColor?: string;
60
+ ctaTextColor?: string;
61
+ borderRadius?: number;
62
+ /** Behavior */
63
+ closable?: boolean;
64
+ showOverlay?: boolean;
65
+ overlayOpacity?: number;
66
+ }
67
+ export interface SitePopupTargeting {
68
+ /** Page targeting */
69
+ pages?: {
70
+ include?: string[];
71
+ exclude?: string[];
72
+ };
73
+ /** Device targeting */
74
+ devices?: ('desktop' | 'mobile' | 'tablet')[];
75
+ /** Visitor targeting */
76
+ visitor?: {
77
+ type?: 'new' | 'returning' | 'all';
78
+ minSessions?: number;
79
+ maxSessions?: number;
80
+ };
81
+ /** Source targeting */
82
+ source?: {
83
+ utm_source?: string[];
84
+ utm_medium?: string[];
85
+ utm_campaign?: string[];
86
+ referrer?: string[];
87
+ };
88
+ /** Time targeting */
89
+ schedule?: {
90
+ startDate?: string;
91
+ endDate?: string;
92
+ daysOfWeek?: number[];
93
+ startTime?: string;
94
+ endTime?: string;
95
+ timezone?: string;
96
+ };
97
+ }
98
+ export interface SitePopupTrigger {
99
+ type: 'immediate' | 'delay' | 'scroll' | 'exit-intent' | 'click' | 'custom';
100
+ /** Delay in seconds (for 'delay' type) */
101
+ delay?: number;
102
+ /** Scroll percentage (for 'scroll' type) */
103
+ scrollPercentage?: number;
104
+ /** CSS selector (for 'click' type) */
105
+ clickSelector?: string;
106
+ /** Custom event name (for 'custom' type) */
107
+ customEvent?: string;
108
+ /** Frequency capping */
109
+ frequency?: {
110
+ type: 'always' | 'once' | 'once-per-session' | 'every-n-days';
111
+ days?: number;
112
+ };
113
+ }
@@ -7,11 +7,7 @@
7
7
  * import it to place it yourself. `PopupBlocks` is the renderer, for drawing
8
8
  * one popup from its blocks.
9
9
  */
10
- import React from 'react';
11
- import { EngageWidget } from '../engage/EngageWidget';
12
- export type SitePopupsProps = Omit<React.ComponentProps<typeof EngageWidget>, 'chatEnabled'>;
13
- /** The site's published popups, banners and toasts. No chat launcher (that's `./chat`). */
14
- export declare function SitePopups(props: SitePopupsProps): React.JSX.Element;
10
+ export { SitePopups, type SitePopupsProps } from './SitePopups';
15
11
  export { PopupBlocks, DEFAULT_POPUP_TOKENS, type PopupBlocksProps, type PopupPlacement } from './PopupBlocks';
16
- export type { EngageElement as SitePopup } from '../engage/types';
12
+ export type { SitePopup, SitePopupConfig, SitePopupTargeting, SitePopupTrigger, SitePopupType, } from './popup-types';
17
13
  export type { PopupBlock, SiteDesignTokens } from './contract';
@@ -1,22 +1,14 @@
1
1
  'use client';
2
- export { DEFAULT_POPUP_TOKENS, PopupBlocks } from '../chunk-JSZN6LDZ.js';
2
+ export { DEFAULT_POPUP_TOKENS, PopupBlocks } from '../chunk-BF7TZYC3.js';
3
3
  import '../chunk-IHG36STL.js';
4
- import { EngageWidget } from '../chunk-B73QPZPH.js';
5
- import '../chunk-NDF4A5JM.js';
6
- import '../chunk-6T6CQVNL.js';
4
+ export { SitePopups } from '../chunk-EJVQJCG5.js';
5
+ import '../chunk-27FISYK4.js';
7
6
  import '../chunk-S22FSH7C.js';
8
7
  import '../chunk-24QZEO3Q.js';
9
8
  import '../chunk-GJWI74ZZ.js';
10
9
  import '../chunk-43OCZ3JA.js';
11
10
  import '../chunk-EKBEOXTH.js';
12
- import '../chunk-PXZ7LAOY.js';
13
- import '../chunk-OUNRFXDC.js';
14
- import '../chunk-6OL23QYD.js';
11
+ import '../chunk-D6ZC7XKZ.js';
12
+ import '../chunk-K4ZHAURD.js';
13
+ import '../chunk-F24FNCTK.js';
15
14
  import '../chunk-PKBMQBKP.js';
16
- import { jsx } from 'react/jsx-runtime';
17
-
18
- function SitePopups(props) {
19
- return /* @__PURE__ */ jsx(EngageWidget, { ...props, chatEnabled: false });
20
- }
21
-
22
- export { SitePopups };
@@ -1,9 +1,9 @@
1
- export { writeLLMsTxtToPublic } from './chunk-J4D6ZXRW.js';
2
- import './chunk-GLHQ3LRO.js';
1
+ export { writeLLMsTxtToPublic } from './chunk-QL6XNPSD.js';
2
+ import './chunk-6U3VLV2C.js';
3
3
  import './chunk-L5UOHS6E.js';
4
4
  import './chunk-WMVK77ND.js';
5
5
  import './chunk-VX5CMNMM.js';
6
- import './chunk-4Y5FWDPM.js';
6
+ import './chunk-NZ4RXN3G.js';
7
7
  import './chunk-MJP63SSS.js';
8
8
  import './chunk-YVKRYQRG.js';
9
9
  import './chunk-FESKKJAS.js';
@@ -1,8 +1,8 @@
1
1
  # Moving a site to site-kit 7
2
2
 
3
3
  site-kit 7 is organised the way Sonor's dashboard is: one entry per module.
4
- Most sites need no changes at all. Move a site when you next touch it
5
- ("touch a site, update its deps"); nothing forces it before then, because a
4
+ Most sites need no changes at all. Move a site when you next touch it;
5
+ nothing forces it before then, because a
6
6
  site's `^6` range never picks up 7.
7
7
 
8
8
  ## The short version
@@ -20,7 +20,14 @@ idempotent: running it twice changes nothing the second time. It works from
20
20
  any 2.x-6.x site: copies of sites on 4.2, 5.8 and 6.5 were migrated with it
21
21
  and built.
22
22
 
23
- Requirements: Next 16 (every fleet site is on it) and Node 20.19+ or 22.12+
23
+ It leaves nothing in the project but the change. Since sonor-setup 7.1.2 the
24
+ originals of the files it writes go to a folder in your OS temp directory
25
+ (it prints where, and git has them too), not `.bak` files beside them, and
26
+ it never creates or edits `.env.example`: `.env.local` is the one env file.
27
+ An old fallback such as `process.env.SONOR_API_KEY || process.env.UPTRADE_API_KEY`
28
+ becomes `process.env.SONOR_API_KEY`.
29
+
30
+ Requirements: Next 16 and Node 20.19+ or 22.12+
24
31
  (Netlify's default is 22).
25
32
 
26
33
  ## What changed, and what the codemod does about it
@@ -48,9 +55,6 @@ keeps type imports on the root. It flags, rather than rewrites, a namespace
48
55
  import (`import * as SK`), a `require`, or a re-export from the root. The full
49
56
  list is `src/shared/module-map.json` (`rootRuntime`).
50
57
 
51
- Across our own sites on 2026-09-26 this touched three repos: one for
52
- `affiliates`, two for `BookingWidget`.
53
-
54
58
  ### 2. The setup CLI is its own package: `sonor-setup`
55
59
 
56
60
  The CLI (init, scaffold, codemods, OG cards, GEO wiring, verify) was 3 MB of
@@ -58,10 +62,10 @@ every site's install and forced a site-kit release for every setup-only fix.
58
62
  It's now [`sonor-setup`](../packages/sonor-setup).
59
63
 
60
64
  - **`npx sonor-setup …` keeps working unchanged:** npx fetches the package.
61
- - **A site whose package.json scripts run `sonor-setup`** (wirsch-law's OG
62
- step, `sonor-setup og`) needs it as a dev dependency. The codemod adds
65
+ - **A site whose package.json scripts run `sonor-setup`** (an OG step that
66
+ runs `sonor-setup og`, say) needs it as a dev dependency. The codemod adds
63
67
  `"sonor-setup": "^7.0.0"` for you.
64
- - **`sonor-register-sitemap` stays in site-kit**, since 11 sites run it from
68
+ - **`sonor-register-sitemap` stays in site-kit**, since sites run it from
65
69
  their postbuild. Nothing to change.
66
70
  - The `site-kit` bin alias for the CLI is gone (no site used it).
67
71
 
@@ -71,30 +75,46 @@ New homes, each the same module as before:
71
75
 
72
76
  - Website: `./website/{popups,images,slots,cms,landing,cta-bar}`
73
77
  - SEO: `./seo/{sitemap,robots,indexnow,redirects,og,og/route,llms,llms/client,llms/contract,meta/contract,pages/contract}`
74
- - Website chat: `./chat` (out of `./engage`)
78
+ - Website chat: `./chat`, and popups: `./website/popups` (both out of
79
+ `./engage`, which Sonor retired with the Engage module)
75
80
 
76
81
  **The old paths keep working through 7.x** and are removed in 8.0. The
77
- codemod moves them anyway, so a touched site is done in one pass.
78
- `SiteKitLayout` gains `chat` and `popups` props; `engage` is an alias
79
- (`engage={false}` still turns both off).
82
+ codemod moves them anyway, so a touched site is done in one pass: chat
83
+ imports go to `./chat`, popup types to `./website/popups` under their new
84
+ names (`EngageElement` is `SitePopup`). It flags `EngageWidget`, which draws
85
+ both and which `SiteKitLayout` already mounts. `SiteKitLayout` gains `chat`
86
+ and `popups` props; `engage` is an alias (`engage={false}` still turns both
87
+ off). Since 7.2.0, popups render only from blocks: one made in Engage Studio
88
+ isn't drawn, so make it again in Sonor (Website → Popups & Banners).
80
89
 
81
90
  ### 4. ESM only, Next 16 only
82
91
 
83
92
  site-kit ships ES modules alone (`"type": "module"`). Next, Turbopack and the
84
93
  kits don't notice. Node 20.19+/22.12+ can `require()` it too, so a
85
94
  `next.config.ts` that imports `@sonordev/site-kit/config` keeps working. A
86
- site-side script that `require()`s site-kit on an older Node would break; none
87
- in the fleet does.
95
+ site-side script that `require()`s site-kit on an older Node would break.
88
96
 
89
97
  The `next` peer is `^16`. Next 16 renamed `middleware.ts` to `proxy.ts`, and
90
98
  **the codemod moves it**: the file, a named `middleware` export (to `proxy`),
91
99
  and `createMiddleware` from `@sonordev/site-kit/middleware` (to `createProxy`
92
- from `/proxy`). The old names work through 7.x. It won't move a file that
93
- sets `runtime` (a proxy file can't; the build throws), and says so: remove
94
- the export, check the logic still runs on your host, rerun. It never moves
95
- onto an existing `proxy.ts`. `npx sonor-setup next16` runs just this part.
100
+ from `/proxy`). The old names work through 7.x.
101
+
102
+ **The proxy goes beside the app directory.** Next reads it from the project
103
+ root, or from `src/` when the app is `src/app`, and silently ignores one
104
+ anywhere else: the build passes, but the site sends no security headers and
105
+ runs no managed redirects. So on a `src/app` site the codemod writes
106
+ `src/proxy.ts`, with the file's relative imports re-pointed. Before
107
+ sonor-setup 7.1.2 it renamed the file in place, which left a root `proxy.ts`
108
+ on those sites; rerunning the codemod moves it, and `npx sonor-setup doctor`
109
+ warns about any proxy Next doesn't read.
110
+
111
+ It won't move a file that sets `runtime` (a proxy file can't; the build
112
+ throws), and says so: remove the export, check the logic still runs on your
113
+ host, rerun. It never moves onto a proxy Next already runs: with one in each
114
+ place, it reports both and changes neither. `npx sonor-setup next16` runs
115
+ just this part.
96
116
 
97
- ### 5. Removed (no site in the fleet used them)
117
+ ### 5. Removed (nothing used them)
98
118
 
99
119
  - `@sonordev/site-kit/search` and `/search/contract`
100
120
  - `@sonordev/site-kit/redirects/not-found` (`resolveManagedRedirect`), and
@@ -123,7 +143,7 @@ Still accepted and ignored until 8.0, because sites pass them:
123
143
  `.env.local`, `.env.production`, `.env`. It used to let `.env.local` beat
124
144
  the host.
125
145
 
126
- ## Optional, and new in 7.0
146
+ ## Optional, and new in 7.x
127
147
 
128
148
  - **Cache Components.** `cacheComponents: true` in next.config works with
129
149
  site-kit now (it failed every page through 6.x). Remove route segment
@@ -133,11 +153,19 @@ Still accepted and ignored until 8.0, because sites pass them:
133
153
  reviews; inquiries, availability and offerings when you ask), the server
134
154
  card, and on Netlify the rate-limited relay. Sonor's AI Visibility tab then
135
155
  shows which agents used them. A site that already runs its own MCP server
136
- (upforge.io and the other hand-written ones) is left exactly as it is:
156
+ (a hand-written one) is left exactly as it is:
137
157
  nothing in 7.0 turns anything on for it. To have Sonor see its calls, add
138
158
  `onToolCall: reportToolCallsToSonor()` to its `createMcpHandler`.
139
159
  - **`@sonordev/contracts`** is for the APIs and the dashboard; sites keep
140
160
  importing `@sonordev/site-kit/*/contract`, which is the same code.
161
+ - **Live updates (7.1).** `npx sonor-setup scaffold` writes the route Sonor
162
+ calls when content changes, `app/api/seo-revalidate/route.ts`, and
163
+ `npx sonor-setup doctor` checks for it. A site with articles gets
164
+ `createRevalidateRoute({ publicationBasePath: '/insights' })` with its own
165
+ path, read from the app directory (a dynamic page that renders site-kit
166
+ articles, or a `[slug]` route under a folder like `/blog` or `/news`).
167
+ When more than one folder looks like the publication, it writes the
168
+ one-line route and lists them.
141
169
 
142
170
  ## Kits built on site-kit
143
171
 
package/docs.json CHANGED
@@ -38,7 +38,8 @@
38
38
  "title": "Engagement",
39
39
  "pages": [
40
40
  { "slug": "forms", "title": "Forms", "file": "src/forms/README.md" },
41
- { "slug": "chat", "title": "Website chat", "file": "src/engage/README.md" },
41
+ { "slug": "chat", "title": "Website chat", "file": "src/chat/README.md" },
42
+ { "slug": "popups", "title": "Popups and banners", "file": "src/website/README.md" },
42
43
  { "slug": "cta-bar", "title": "CTA bar", "file": "src/cta-bar/README.md" },
43
44
  { "slug": "signal", "title": "Signal (A/B)", "file": "src/signal/README.md" }
44
45
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonordev/site-kit",
3
- "version": "7.1.1",
3
+ "version": "7.2.0",
4
4
  "type": "module",
5
5
  "packageManager": "pnpm@11.5.3",
6
6
  "description": "Complete client-side integration kit for Sonor - SEO, Analytics, Engage, Forms, Blog",
@@ -461,7 +461,7 @@
461
461
  "gsap": "^3.15.0",
462
462
  "happy-dom": "^20.14.5",
463
463
  "inquirer": "^14.0.2",
464
- "next": "16.3.6",
464
+ "next": "16.3.8",
465
465
  "open": "11.0.0",
466
466
  "ora": "^9.4.1",
467
467
  "playwright": "^1.62.1",
@@ -11,7 +11,7 @@ admins) can sign in; nobody else can. There are no passwords on the site.
11
11
  import { createSonorSso } from '@sonordev/site-kit/admin-auth'
12
12
 
13
13
  export const sso = createSonorSso({
14
- paths: '/admin', // or ['/bid', '/route'] for several areas
14
+ paths: '/admin', // or ['/admin', '/staff'] for several areas
15
15
  // loginPath: '/admin/login' (default: `${paths[0]}/login`)
16
16
  // adminEmails: process.env.ADMIN_EMAILS,
17
17
  })
@@ -62,8 +62,8 @@ const session = await sso.getSession()
62
62
  if (!session) return new Response('Unauthorized', { status: 401 })
63
63
  ```
64
64
 
65
- Designer APIs or other JSON endpoints can be guarded in the middleware too:
66
- pass `apiPaths: ['/api/studio']` and include them in the matcher. They get a
65
+ JSON endpoints can be guarded in the middleware too: pass
66
+ `apiPaths: ['/api/admin']` and include them in the matcher. They get a
67
67
  401 JSON response instead of a redirect.
68
68
 
69
69
  ## Env
@@ -178,14 +178,12 @@ events or conversions. The visitor is on whoever framed the page, not on this
178
178
  site, so every metric the frame produces is phantom traffic in the analytics
179
179
  its owner reads.
180
180
 
181
- This is not hypothetical. Upforge case studies embed each client's whole
182
- production site in three eager iframes, and `securityHeaders`'
183
- `DEFAULT_FRAME_ANCESTORS` permits that. Before the guard landed, 23 client
184
- sites carried the signature in `analytics_page_views`: three views of `/`
185
- sharing one session and visitor id, 21-80ms apart, referrer
186
- `https://upforge.io/` — the desktop, tablet and mobile frames of one case
187
- study. The screenshot overlay in those frames hides the pixels, not the
188
- JavaScript.
181
+ A portfolio page that shows a live site in desktop, tablet and mobile frames
182
+ is the common case, and `securityHeaders`' `DEFAULT_FRAME_ANCESTORS` permits
183
+ it. Without the guard, one visit to that page would record three views of `/`
184
+ on the framed site, milliseconds apart, sharing one session and visitor id,
185
+ with the portfolio as the referrer. A screenshot laid over the frames hides
186
+ the pixels, not the JavaScript.
189
187
 
190
188
  **Same-origin frames still report.** A site embedding itself (a preview pane,
191
189
  a print view, an on-domain booking frame) has a real visitor really on that
@@ -214,7 +212,7 @@ with `analytics.site` or `NEXT_PUBLIC_SITE_URL` set to a production domain.
214
212
  `localhost`, its subdomains, `127.0.0.1`, `[::1]`, and `0.0.0.0` report nothing
215
213
  by default: page views, events, conversions, sessions, vitals, scroll and
216
214
  heatmap data, fleet heartbeats, and client-side sitemap registrations all use
217
- `resolveAnalyticsTarget`. Engage doesn't mount its widgets or chat transport.
215
+ `resolveAnalyticsTarget`. Website chat and popups don't mount at all.
218
216
  Public hosts and same-origin frames on public hosts still report normally.
219
217
 
220
218
  For intentional local reporting:
@@ -224,7 +222,7 @@ For intentional local reporting:
224
222
  ```
225
223
 
226
224
  The layout passes this option to AnalyticsProvider, WebVitals, FleetHeartbeat,
227
- SitemapSync and EngageWidget. Standalone components and `sendFleetHeartbeat`
225
+ SitemapSync, SiteChat and SitePopups. Standalone components and `sendFleetHeartbeat`
228
226
  accept it too; standalone `trackEvent`/`trackConversion` use their mounted
229
227
  AnalyticsProvider's options. A local cross-origin frame needs **both** opt-ins.
230
228
  Neither option bypasses authentication. No environment variable or global
@@ -241,7 +239,7 @@ Uses `SONOR_API_KEY` (injected by `SiteKitLayout`) or `window.__SITE_KIT_API_KEY
241
239
  ## Multi-site projects (`analytics.site`)
242
240
 
243
241
  A single Sonor project can host many sub-sites (e.g. one project hosting
244
- example.com + 16 state microsites). Every analytics event is
242
+ example.com + a dozen regional microsites). Every analytics event is
245
243
  tagged with the sub-site host so the dashboard can roll up + filter per
246
244
  site without forcing each microsite into its own Sonor project.
247
245
 
@@ -17,12 +17,12 @@ import type { PublicationRoutingOptions } from '@sonordev/site-kit/articles/serv
17
17
 
18
18
  const siteUrl = 'https://example.com'
19
19
  const routing = {
20
- basePath: '/theforge',
20
+ basePath: '/journal',
21
21
  includeCategoryInPath: true,
22
- categoryPath: (slug: string) => `/theforge?category=${encodeURIComponent(slug)}`,
22
+ categoryPath: (slug: string) => `/journal?category=${encodeURIComponent(slug)}`,
23
23
  } satisfies PublicationRoutingOptions
24
24
 
25
- // Cards, related stories and cluster links now use /theforge/category/slug.
25
+ // Cards, related stories and cluster links now use /journal/category/slug.
26
26
  const article = <Article slug="build-first" routing={routing} />
27
27
  const archive = <ArticleList routing={routing} />
28
28
 
@@ -30,7 +30,7 @@ const archive = <ArticleList routing={routing} />
30
30
  const metadata = await generateArticleMetadata('build-first', { siteUrl, ...routing })
31
31
  const post = await getArticle('build-first')
32
32
  const schema = post ? generateArticleSchema(post, { siteUrl, ...routing }) : null
33
- // In app/theforge/[category]/[slug]/page.tsx, wrap it to pass the routing:
33
+ // In app/journal/[category]/[slug]/page.tsx, wrap it to pass the routing:
34
34
  // export function generateStaticParams() { return generateArticleStaticParams(routing) }
35
35
  const params = await generateArticleStaticParams(routing) // { category, slug }[]
36
36
  const sitemap = await generateArticleSitemap(siteUrl, {
@@ -38,7 +38,7 @@ const sitemap = await generateArticleSitemap(siteUrl, {
38
38
  includeCategories: false, // category filters don't need separate sitemap entries
39
39
  includeClusters: false, // enable when your site implements cluster routes
40
40
  })
41
- const rss = await generateRssFeed({ siteUrl, siteName: 'The Forge', ...routing })
41
+ const rss = await generateRssFeed({ siteUrl, siteName: 'The Journal', ...routing })
42
42
  const href = createPublicationRoutes(routing).post({ slug: 'build-first', category: 'guides' })
43
43
  ```
44
44
 
@@ -47,7 +47,10 @@ const href = createPublicationRoutes(routing).post({ slug: 'build-first', catego
47
47
  provide `postPath: post => '/articles/' + encodeURIComponent(post.slug)`.
48
48
  Callbacks return local paths; generated metadata, feeds, and sitemaps separately
49
49
  honor a valid `canonical_url`. The same routes apply to Atom and generated
50
- breadcrumb/cluster schemas. Supplied `schema`/`schema_json` objects stay intact.
50
+ breadcrumb/cluster schemas. Supplied `schema`/`schema_json` objects stay intact, apart
51
+ from template placeholders (an `Organization` named "Example", `example.com` URLs,
52
+ `{post.title}`), which `generateAllArticleSchemas` drops. When nothing real is left,
53
+ it generates the article's schema from its own fields instead.
51
54
 
52
55
  For custom layouts, `resolveArticleArtwork(post, 'article')` prefers
53
56
  `editorial_image`, preserving an empty decorative `editorial_image_alt`.
@@ -107,7 +110,7 @@ export async function generateMetadata() {
107
110
 
108
111
  export default function PublicationPage() {
109
112
  return (
110
- <PublicationLayout hero={{ title: 'The Forge', subtitle: 'Latest articles' }}>
113
+ <PublicationLayout hero={{ title: 'The Journal', subtitle: 'Latest articles' }}>
111
114
  <ArticleList showCategoryFilter showPagination />
112
115
  </PublicationLayout>
113
116
  )