@sonordev/site-kit 7.4.0 → 8.0.1

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 (229) hide show
  1. package/AGENTS.md +40 -12
  2. package/CHANGELOG.md +72 -0
  3. package/README.md +44 -18
  4. package/agent-manifest.json +111 -56
  5. package/dist/AnalyticsProvider-EGCZ2MVM.js +13 -0
  6. package/dist/{ArticleViewTracker-3DH53RSB.js → ArticleViewTracker-ATNVMT45.js} +6 -5
  7. package/dist/{BlocksPopup-FGWYVHCH.js → BlocksPopup-F636XNO4.js} +6 -5
  8. package/dist/{ChatWidget-CDQZCLVH.js → ChatWidget-EQTLKPJX.js} +8 -5
  9. package/dist/{FileField-IPJ7L2W6.js → FileField-BUD2YGN5.js} +5 -5
  10. package/dist/{FormSpotlight-CQI2DBWI.js → FormSpotlight-NGH56TGC.js} +3 -3
  11. package/dist/{FormStage-4WHD6ED4.js → FormStage-XZRC54SY.js} +3 -3
  12. package/dist/ManagedForm-CQDQ4CUN.js +19 -0
  13. package/dist/{ManagedNewsletterForm-3D2BK3KQ.js → ManagedNewsletterForm-KCN3BTKA.js} +9 -6
  14. package/dist/{SignalCore-HEQYITTM.js → SignalCore-RDQPM2L2.js} +7 -7
  15. package/dist/SiteChat-QBDOQ5ZZ.js +6 -0
  16. package/dist/SiteDesignReporter-426TUCUF.js +12 -0
  17. package/dist/SitePopups-KLUD6XIE.js +13 -0
  18. package/dist/SitemapSync-QOIMV5GO.js +9 -0
  19. package/dist/_client/booking-widget.js +6 -5
  20. package/dist/_client/testimonial-section.js +3 -2
  21. package/dist/affiliates/index.js +6 -6
  22. package/dist/analytics/index.js +73 -7
  23. package/dist/articles/index.js +2 -2
  24. package/dist/articles/server-ui.js +3 -3
  25. package/dist/articles/server.js +2 -2
  26. package/dist/brand.css +1 -1
  27. package/dist/chat/index.d.ts +1 -1
  28. package/dist/chat/index.js +39 -8
  29. package/dist/{chunk-CSN45MHO.js → chunk-3222QBUS.js} +13 -16
  30. package/dist/chunk-3G7YABRA.js +25 -0
  31. package/dist/{chunk-CGWUXUYZ.js → chunk-3RDJKIYO.js} +2 -2
  32. package/dist/{chunk-J4FSB4OG.js → chunk-3YKQLC7J.js} +5 -2
  33. package/dist/{chunk-3E3PPSNR.js → chunk-55JLUMAC.js} +2 -2
  34. package/dist/{chunk-EHR4NIMX.js → chunk-5GB2HHVJ.js} +3 -3
  35. package/dist/chunk-5ROTTMBL.js +19 -0
  36. package/dist/chunk-5TM3WPCI.js +7 -0
  37. package/dist/{chunk-DA5XC7Y6.js → chunk-6BXUSAOJ.js} +1 -1
  38. package/dist/{chunk-7HPZSWS4.js → chunk-6CJGZFOU.js} +1 -1
  39. package/dist/{chunk-RYVDGXC2.js → chunk-6KU7STM3.js} +3 -1
  40. package/dist/{chunk-JRCNUUNG.js → chunk-6KUCA5HG.js} +1 -1
  41. package/dist/{chunk-MDP7EB4J.js → chunk-7BSC6HF3.js} +5 -5
  42. package/dist/{chunk-YCFW2OQO.js → chunk-AGJODJ4V.js} +2 -2
  43. package/dist/{chunk-OOD6GMT4.js → chunk-B7QRRLTU.js} +6 -4
  44. package/dist/{chunk-X6F6SO4S.js → chunk-C7TLGL3R.js} +21 -1
  45. package/dist/{chunk-PQDJNIHR.js → chunk-CAF53GKN.js} +2 -2
  46. package/dist/{chunk-43OCZ3JA.js → chunk-CAH4Y4PY.js} +4 -2
  47. package/dist/{chunk-XA2BNW5M.js → chunk-DWNS6ZJM.js} +1 -1
  48. package/dist/{chunk-PXKIGZ2F.js → chunk-EATJPSTS.js} +1 -1
  49. package/dist/{chunk-XEMHGJEG.js → chunk-EE6IG5GK.js} +10 -10
  50. package/dist/{chunk-D2RGEWHS.js → chunk-FIGIJK5F.js} +2 -2
  51. package/dist/{chunk-PF64OEXC.js → chunk-GMXY2OOY.js} +2 -2
  52. package/dist/{chunk-IE5SSOCN.js → chunk-H3SDOSVU.js} +3 -11
  53. package/dist/{chunk-GK7TV7EK.js → chunk-IY6G67EF.js} +1 -1
  54. package/dist/{chunk-CG4ETW5Y.js → chunk-J6N5DCGW.js} +3 -3
  55. package/dist/{chunk-ATE6IFVK.js → chunk-JCFQGEG7.js} +1 -1
  56. package/dist/{chunk-4BHRA7TI.js → chunk-JIH32RH2.js} +3 -3
  57. package/dist/{chunk-ZTLMPUO6.js → chunk-LNSF6BJC.js} +1 -1
  58. package/dist/{chunk-5O62CER4.js → chunk-M62U7TJF.js} +1 -1
  59. package/dist/{chunk-EDYHROQ7.js → chunk-NFRJTOTB.js} +3 -3
  60. package/dist/{chunk-6LLTLLEJ.js → chunk-NKFRW2VB.js} +6 -5
  61. package/dist/{chunk-CKW4HFJG.js → chunk-OCKGB734.js} +3 -3
  62. package/dist/{chunk-4DJMJ4V5.js → chunk-OE3NXEOF.js} +1 -1
  63. package/dist/{chunk-KHQ5GD6T.js → chunk-S5G3A7OZ.js} +1 -1
  64. package/dist/{chunk-4NTBQNHA.js → chunk-TYAVHRWH.js} +80 -81
  65. package/dist/{chunk-ZTLU3BSW.js → chunk-TZ5RTANX.js} +2 -2
  66. package/dist/{chunk-4YTYGG2C.js → chunk-URJN75ZG.js} +29 -16
  67. package/dist/{chunk-FUQTV5O6.js → chunk-VQQV7FOX.js} +3 -3
  68. package/dist/{chunk-PKGN32AU.js → chunk-XPTJRVL2.js} +1 -1
  69. package/dist/{chunk-662ILEZ6.js → chunk-Y35BWW2C.js} +3 -7
  70. package/dist/{chunk-MHGAZ3LL.js → chunk-YGXWG54S.js} +3 -5
  71. package/dist/{chunk-AH4AXO4P.js → chunk-Z4MK4VOG.js} +1 -1
  72. package/dist/{chunk-AV4QAK5F.js → chunk-Z6PVFZRI.js} +5 -4
  73. package/dist/chunk-ZKADJNR2.js +52 -0
  74. package/dist/client/index.js +6 -5
  75. package/dist/contracts/entries.d.ts +1 -1
  76. package/dist/contracts/knowledge.d.ts +84 -0
  77. package/dist/contracts/sentences.d.ts +46 -0
  78. package/dist/contracts/site-cache.d.ts +2 -0
  79. package/dist/cta-bar/index.js +1 -1
  80. package/dist/fleet/index.js +6 -5
  81. package/dist/forms/field-autocomplete.d.ts +16 -8
  82. package/dist/forms/index.d.ts +5 -0
  83. package/dist/forms/index.js +17 -17
  84. package/dist/forms/server.js +7 -7
  85. package/dist/forms/static.js +2 -2
  86. package/dist/forms/submitForm.d.ts +5 -0
  87. package/dist/images/index.js +4 -4
  88. package/dist/index.d.ts +3 -7
  89. package/dist/index.js +1 -1
  90. package/dist/layout/SiteKitLayout.d.ts +2 -1
  91. package/dist/layout/client.js +11 -9
  92. package/dist/layout/index.js +13 -11
  93. package/dist/llms/index.js +7 -6
  94. package/dist/maps/index.js +6 -6
  95. package/dist/mcp/sonor.d.ts +47 -3
  96. package/dist/mcp/sonor.js +30 -20
  97. package/dist/proxy/index.d.ts +3 -3
  98. package/dist/proxy/index.js +1 -1
  99. package/dist/reputation/index.js +3 -2
  100. package/dist/reputation/server.js +2 -1
  101. package/dist/revalidate/index.js +3 -3
  102. package/dist/robots/indexnow.js +2 -2
  103. package/dist/runtime/index.d.ts +32 -0
  104. package/dist/runtime/index.js +7 -0
  105. package/dist/seo/api.d.ts +0 -4
  106. package/dist/seo/client.js +6 -5
  107. package/dist/seo/getManagedMetadata.d.ts +24 -0
  108. package/dist/seo/index.d.ts +2 -3
  109. package/dist/seo/index.js +14 -132
  110. package/dist/seo/indexnow.js +2 -2
  111. package/dist/seo/llms.js +7 -6
  112. package/dist/seo/register-sitemap-cli.js +2 -2
  113. package/dist/seo/server-api.d.ts +0 -6
  114. package/dist/seo/server.d.ts +1 -1
  115. package/dist/seo/server.js +4 -4
  116. package/dist/seo/sitemap.js +4 -3
  117. package/dist/seo/types.d.ts +9 -30
  118. package/dist/server/index.d.ts +8 -1
  119. package/dist/server/index.js +4 -3
  120. package/dist/server/mint-site-token.d.ts +0 -11
  121. package/dist/server/server-fetch.d.ts +19 -0
  122. package/dist/server-api-EGOKC7Q3.js +9 -0
  123. package/dist/shared/build-entries.d.ts +21 -9
  124. package/dist/shared/clientApiConfig.d.ts +56 -0
  125. package/dist/shared/identity-reader.d.ts +26 -0
  126. package/dist/shared/identity-storage.d.ts +30 -0
  127. package/dist/shared/identity.d.ts +13 -13
  128. package/dist/shared/import-specifiers.d.ts +74 -0
  129. package/dist/shared/sonorFetch.d.ts +4 -3
  130. package/dist/shared/source-graph.d.ts +4 -1
  131. package/dist/shared/version.d.ts +1 -1
  132. package/dist/signal/index.js +2 -2
  133. package/dist/sitemap/index.js +4 -3
  134. package/dist/slots/index.js +3 -3
  135. package/dist/sync/index.js +6 -5
  136. package/dist/types.d.ts +0 -1
  137. package/dist/website/cta-bar.js +1 -1
  138. package/dist/website/images.js +4 -4
  139. package/dist/website/index.js +7 -6
  140. package/dist/website/popups.js +10 -7
  141. package/dist/website/slots.js +3 -3
  142. package/dist/{writeLLMsTxt-OL4KQERZ.js → writeLLMsTxt-UZGN6IBU.js} +3 -2
  143. package/docs/MIGRATING-TO-7.md +5 -2
  144. package/docs/MIGRATING-TO-8.md +183 -0
  145. package/docs.json +4 -8
  146. package/package.json +18 -45
  147. package/skills/site-kit/SKILL.md +41 -11
  148. package/src/analytics/README.md +14 -14
  149. package/src/chat/README.md +7 -7
  150. package/src/forms/README.md +61 -6
  151. package/src/mcp/README.md +61 -20
  152. package/src/proxy/README.md +5 -4
  153. package/src/revalidate/README.md +2 -2
  154. package/src/runtime/README.md +51 -0
  155. package/src/seo/README.md +24 -8
  156. package/src/sync/README.md +2 -2
  157. package/src/website/README.md +3 -2
  158. package/dist/AnalyticsProvider-BQXV3ZF3.js +0 -11
  159. package/dist/ManagedForm-7FZNH4L2.js +0 -16
  160. package/dist/SiteChat-DMPDXY3W.js +0 -5
  161. package/dist/SiteDesignReporter-Y2IOJE52.js +0 -11
  162. package/dist/SitePopups-HD2LDKVU.js +0 -10
  163. package/dist/SitemapSync-OKPZHRX6.js +0 -8
  164. package/dist/chunk-24QZEO3Q.js +0 -41
  165. package/dist/chunk-BU66S5B7.js +0 -1
  166. package/dist/chunk-G3NHWMP5.js +0 -233
  167. package/dist/chunk-HODO5BX5.js +0 -28
  168. package/dist/chunk-L3AQCDCY.js +0 -386
  169. package/dist/chunk-P5GB6NEO.js +0 -66
  170. package/dist/chunk-SWKE6FWH.js +0 -47
  171. package/dist/cms/CmsPage.d.ts +0 -17
  172. package/dist/cms/CmsPreview.d.ts +0 -37
  173. package/dist/cms/CmsSection.d.ts +0 -8
  174. package/dist/cms/PortableTextRenderer.d.ts +0 -7
  175. package/dist/cms/index.d.ts +0 -37
  176. package/dist/cms/index.js +0 -5
  177. package/dist/cms/sanity-image.d.ts +0 -47
  178. package/dist/cms/sections/CtaSection.d.ts +0 -3
  179. package/dist/cms/sections/CustomSection.d.ts +0 -7
  180. package/dist/cms/sections/FaqSection.d.ts +0 -3
  181. package/dist/cms/sections/FormSection.d.ts +0 -8
  182. package/dist/cms/sections/GallerySection.d.ts +0 -3
  183. package/dist/cms/sections/HeroSection.d.ts +0 -3
  184. package/dist/cms/sections/RichTextSection.d.ts +0 -3
  185. package/dist/cms/sections/TestimonialsSection.d.ts +0 -3
  186. package/dist/cms/sections/index.d.ts +0 -8
  187. package/dist/cms/server-api.d.ts +0 -49
  188. package/dist/cms/server.d.ts +0 -1
  189. package/dist/cms/server.js +0 -5
  190. package/dist/cms/types.d.ts +0 -104
  191. package/dist/commerce/CalendarView.d.ts +0 -43
  192. package/dist/commerce/CheckoutForm.d.ts +0 -11
  193. package/dist/commerce/EventCalendar.d.ts +0 -26
  194. package/dist/commerce/EventCheckout.d.ts +0 -42
  195. package/dist/commerce/EventEmbed.d.ts +0 -11
  196. package/dist/commerce/EventModal.d.ts +0 -43
  197. package/dist/commerce/EventTile.d.ts +0 -10
  198. package/dist/commerce/EventsAgenda.d.ts +0 -38
  199. package/dist/commerce/EventsWidget.d.ts +0 -84
  200. package/dist/commerce/OfferingCard.d.ts +0 -9
  201. package/dist/commerce/OfferingList.d.ts +0 -9
  202. package/dist/commerce/ProductDetail.d.ts +0 -38
  203. package/dist/commerce/ProductEmbed.d.ts +0 -11
  204. package/dist/commerce/ProductGrid.d.ts +0 -41
  205. package/dist/commerce/ProductPage.d.ts +0 -39
  206. package/dist/commerce/RegistrationForm.d.ts +0 -9
  207. package/dist/commerce/SizeChart.d.ts +0 -8
  208. package/dist/commerce/UpcomingEvents.d.ts +0 -9
  209. package/dist/commerce/api.d.ts +0 -179
  210. package/dist/commerce/events-extras.d.ts +0 -60
  211. package/dist/commerce/index.d.ts +0 -33
  212. package/dist/commerce/index.js +0 -8022
  213. package/dist/commerce/server.d.ts +0 -161
  214. package/dist/commerce/server.js +0 -2
  215. package/dist/commerce/types.d.ts +0 -340
  216. package/dist/commerce/useEventModal.d.ts +0 -20
  217. package/dist/commerce/utils.d.ts +0 -17
  218. package/dist/engage/EngageWidget.d.ts +0 -21
  219. package/dist/engage/index.d.ts +0 -14
  220. package/dist/engage/index.js +0 -45
  221. package/dist/engage/types.d.ts +0 -33
  222. package/dist/seo/ManagedContent.d.ts +0 -14
  223. package/dist/server-api-BVCBLJKL.js +0 -9
  224. package/dist/website/cms/server.d.ts +0 -2
  225. package/dist/website/cms/server.js +0 -5
  226. package/dist/website/cms-server.d.ts +0 -2
  227. package/dist/website/cms.d.ts +0 -2
  228. package/dist/website/cms.js +0 -5
  229. package/src/commerce/README.md +0 -109
@@ -7,9 +7,10 @@
7
7
  * ends up in the company field. Managed forms shipped no tokens at all before
8
8
  * 7.2.0.
9
9
  *
10
- * Single source of truth for which token a managed field gets. FormField is
11
- * the only caller; every experience (classic, spotlight, stage, the static
12
- * shell) renders its controls through FormField.
10
+ * Single source of truth for which token a managed field gets. FormField calls
11
+ * it for every experience (classic, spotlight, stage, the static shell), and
12
+ * `@sonordev/site-kit/forms` exports it for sites that draw their own controls
13
+ * with `useForm`, so a headless form reads this table instead of keeping a copy.
13
14
  *
14
15
  * Precedence: the field's CRM destination (`destination_field`, set in
15
16
  * Sonor) > its input type > its slug > its label. When nothing matches the
@@ -18,11 +19,18 @@
18
19
  * (`email_k3x9pq2m`).
19
20
  */
20
21
  import type { FormField } from './types';
22
+ /**
23
+ * What `autocompleteFor` reads from a managed field. Any field `useForm`
24
+ * returns fits, and so does an object literal with these keys (`field_type`
25
+ * has to be a `FieldType`, not a bare string).
26
+ */
27
+ export type AutocompleteField = Pick<FormField, 'field_type' | 'slug' | 'label' | 'destination_field'>;
21
28
  /**
22
29
  * The `autocomplete` token for one managed field, or undefined to omit it.
23
- * Only text-like inputs and selects get one; a message box, a date or a
24
- * checkbox never does.
30
+ * Only text, email and phone fields and selects get one; a message box, a
31
+ * number, a date or a checkbox never does.
32
+ *
33
+ * Pass it straight to a control: `<input autoComplete={autocompleteFor(field)} />`.
34
+ * React leaves the attribute off when the result is undefined.
25
35
  */
26
- export declare function autocompleteFor(field: Pick<FormField, 'field_type' | 'slug' | 'label'> & {
27
- destination_field?: string;
28
- }): string | undefined;
36
+ export declare function autocompleteFor(field: AutocompleteField): string | undefined;
@@ -24,6 +24,9 @@
24
24
  * </form>
25
25
  * )
26
26
  *
27
+ * // On your own controls, autoComplete={autocompleteFor(field)} gives the
28
+ * // same autofill token a ManagedForm control gets (undefined omits it)
29
+ *
27
30
  * === FORMS API (Create/Update forms programmatically) ===
28
31
  *
29
32
  * import { formsApi, field } from '@sonordev/site-kit/forms'
@@ -99,6 +102,8 @@ export { formsApi, configureFormsApi, field, defineForm, initializeForms } from
99
102
  export type { Form, FormField, FormStep, FormType, FieldType, CreateFormInput, UpdateFormInput, FormsListOptions, FormDefinition } from './formsApi';
100
103
  export { useForm } from './useForm';
101
104
  export type { UseFormOptions, UseFormReturn } from './useForm';
105
+ export { autocompleteFor } from './field-autocomplete';
106
+ export type { AutocompleteField } from './field-autocomplete';
102
107
  export { ManagedForm } from './ManagedForm';
103
108
  /**
104
109
  * Client boundary that upgrades a server-rendered <StaticForm> at idle.
@@ -1,23 +1,26 @@
1
1
  'use client';
2
- export { FormCelebration } from '../chunk-YGGDU6C3.js';
3
- export { FormClient, ManagedForm } from '../chunk-MDP7EB4J.js';
4
- import '../chunk-ATE6IFVK.js';
2
+ export { FormClient, ManagedForm } from '../chunk-7BSC6HF3.js';
5
3
  export { DatePicker } from '../chunk-SOD2F6C2.js';
6
- export { FormEnhancer } from '../chunk-PF64OEXC.js';
7
- import '../chunk-YC7ELZS3.js';
8
- import '../chunk-DXO6SBMD.js';
9
- export { FormField as FormFieldComponent } from '../chunk-4NTBQNHA.js';
10
- export { useForm, useFormTracking } from '../chunk-CSN45MHO.js';
4
+ export { FormCelebration } from '../chunk-YGGDU6C3.js';
5
+ import '../chunk-JCFQGEG7.js';
6
+ export { useForm, useFormTracking } from '../chunk-3222QBUS.js';
11
7
  import '../chunk-Q6E4OPGG.js';
8
+ import '../chunk-5ROTTMBL.js';
9
+ export { FormEnhancer } from '../chunk-GMXY2OOY.js';
12
10
  import '../chunk-C2FZBUSS.js';
11
+ import '../chunk-YC7ELZS3.js';
12
+ import '../chunk-DXO6SBMD.js';
13
+ export { FormField as FormFieldComponent, autocompleteFor } from '../chunk-TYAVHRWH.js';
13
14
  export { DEFAULT_FORM_SUCCESS_MESSAGE } from '../chunk-5SQK3D53.js';
14
15
  import '../chunk-HW7B43E5.js';
15
16
  import '../chunk-NJCTQH2P.js';
16
17
  import '../chunk-L2V5PUFN.js';
18
+ import '../chunk-5TM3WPCI.js';
17
19
  import '../chunk-GJWI74ZZ.js';
18
- import { sonorFetch } from '../chunk-3E3PPSNR.js';
19
- import '../chunk-GK7TV7EK.js';
20
- import '../chunk-KHQ5GD6T.js';
20
+ import { readPublishedApiConfig } from '../chunk-3G7YABRA.js';
21
+ import { sonorFetch } from '../chunk-55JLUMAC.js';
22
+ import '../chunk-IY6G67EF.js';
23
+ import '../chunk-S5G3A7OZ.js';
21
24
  import '../chunk-PKBMQBKP.js';
22
25
 
23
26
  // src/forms/formsApi.ts
@@ -27,12 +30,9 @@ function configureFormsApi(options) {
27
30
  }
28
31
  function getConfig() {
29
32
  if (config) return config;
30
- if (typeof window !== "undefined") {
31
- const apiUrl = window.__SITE_KIT_API_URL__;
32
- const apiKey = window.__SITE_KIT_API_KEY__;
33
- if (apiUrl && apiKey) {
34
- return { baseUrl: apiUrl, apiKey };
35
- }
33
+ const { apiUrl, apiKey } = readPublishedApiConfig();
34
+ if (apiUrl && apiKey) {
35
+ return { baseUrl: apiUrl, apiKey };
36
36
  }
37
37
  throw new Error(
38
38
  "Forms API not configured. Use SiteKitLayout in your root layout or call configureFormsApi() first."
@@ -1,13 +1,13 @@
1
- export { ServerForm, getFormConfig } from '../chunk-FUQTV5O6.js';
2
- import '../chunk-PF64OEXC.js';
1
+ export { ServerForm, getFormConfig } from '../chunk-VQQV7FOX.js';
2
+ import '../chunk-GMXY2OOY.js';
3
+ import '../chunk-C2FZBUSS.js';
3
4
  import '../chunk-YC7ELZS3.js';
4
- export { StaticForm } from '../chunk-ZTLMPUO6.js';
5
+ export { StaticForm } from '../chunk-LNSF6BJC.js';
5
6
  import '../chunk-DXO6SBMD.js';
6
- import '../chunk-4NTBQNHA.js';
7
- import '../chunk-X6F6SO4S.js';
8
- import '../chunk-MH2DSGC6.js';
9
- import '../chunk-C2FZBUSS.js';
7
+ import '../chunk-TYAVHRWH.js';
10
8
  import '../chunk-5SQK3D53.js';
11
9
  import '../chunk-HW7B43E5.js';
12
10
  import '../chunk-NJCTQH2P.js';
11
+ import '../chunk-C7TLGL3R.js';
12
+ import '../chunk-MH2DSGC6.js';
13
13
  import '../chunk-PKBMQBKP.js';
@@ -1,6 +1,6 @@
1
- export { StaticForm } from '../chunk-ZTLMPUO6.js';
1
+ export { StaticForm } from '../chunk-LNSF6BJC.js';
2
2
  import '../chunk-DXO6SBMD.js';
3
- import '../chunk-4NTBQNHA.js';
3
+ import '../chunk-TYAVHRWH.js';
4
4
  import '../chunk-5SQK3D53.js';
5
5
  import '../chunk-HW7B43E5.js';
6
6
  import '../chunk-NJCTQH2P.js';
@@ -9,6 +9,11 @@
9
9
  import { DEFAULT_HONEYPOT_FIELD } from './contract';
10
10
  import type { FormSubmitResult, ManagedFormConfig } from './types';
11
11
  export { DEFAULT_HONEYPOT_FIELD };
12
+ /**
13
+ * The API origin and credential for a submission. On the server it honors
14
+ * the same env override SiteKitLayout feeds into __SITE_KIT_API_URL__, so an
15
+ * SSR-rendered absolute URL (the native form action) follows a staging site.
16
+ */
12
17
  export declare function getApiConfig(): {
13
18
  apiUrl: string;
14
19
  apiKey: string | undefined;
@@ -1,6 +1,6 @@
1
- export { ManagedImage, assignImageToSlot, clearImageSlot, fetchManagedImage, fetchManagedImages, listImageFiles, uploadImage } from '../chunk-DA5XC7Y6.js';
1
+ export { ManagedImage, assignImageToSlot, clearImageSlot, fetchManagedImage, fetchManagedImages, listImageFiles, uploadImage } from '../chunk-6BXUSAOJ.js';
2
2
  export { ManagedFavicon, getManagedFaviconUrl } from '../chunk-GW7GSBO7.js';
3
- import '../chunk-3E3PPSNR.js';
4
- import '../chunk-GK7TV7EK.js';
5
- import '../chunk-KHQ5GD6T.js';
3
+ import '../chunk-55JLUMAC.js';
4
+ import '../chunk-IY6G67EF.js';
5
+ import '../chunk-S5G3A7OZ.js';
6
6
  import '../chunk-PKBMQBKP.js';
package/dist/index.d.ts CHANGED
@@ -3,9 +3,9 @@
3
3
  * that runs.
4
4
  *
5
5
  * Since 7.0 every component, hook and helper lives on the entry for its Sonor
6
- * module (`@sonordev/site-kit/sync`, `/commerce`, `/website/images`, ...), so
7
- * a stray root import can't pull commerce or server code into a page's
8
- * bundle. Import types from here or from the module; import anything that
6
+ * module (`@sonordev/site-kit/sync`, `/forms`, `/website/images`, ...), so
7
+ * a stray root import can't pull a feature module or server code into a
8
+ * page's bundle. (Commerce lives in `@sonordev/commerce-kit`.) Import types from here or from the module; import anything that
9
9
  * runs from the module.
10
10
  *
11
11
  * Moving a 6.x site: `npx sonor-setup codemod` rewrites root imports to the
@@ -17,12 +17,8 @@ export type { ManagedMetadataResult, ManagedSchemaProps, ManagedFAQData } from '
17
17
  export type { AnalyticsConfig, AnalyticsEvent, PageView } from './analytics/types';
18
18
  export type { ChatConfig } from './chat/types';
19
19
  export type { SitePopup } from './website/popup-types';
20
- /** Deprecated names (engage was retired): SitePopup and SitePopupConfig. */
21
- export type { EngageElement, WidgetConfig } from './engage/types';
22
20
  export type { ManagedFormConfig, FormSubmission, FormSubmitResult, FormField } from './forms/types';
23
21
  export type { Article as ArticleType, ArticleAuthor, ArticleCategory } from './articles/types';
24
- export type { CommerceOffering, CommerceCategory, CommerceVariant, CommerceSchedule, OfferingType, Cart, CartItem, } from './commerce/types';
25
- export type { EventCheckoutProps, CheckoutLineItem } from './commerce';
26
22
  export type { Affiliate, AffiliateOffer, AffiliateWithOffers, AffiliatesWidgetProps, AffiliateCardProps, UseAffiliatesResult, } from './affiliates';
27
23
  export type { RedirectRule, RedirectConfig } from './redirects';
28
24
  export type { ManagedImageProps, ManagedImageData, ImageFile, ImageApiConfig, } from './images';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { SITE_KIT_VERSION } from './chunk-KHQ5GD6T.js';
1
+ export { SITE_KIT_VERSION } from './chunk-S5G3A7OZ.js';
2
2
  import './chunk-PKBMQBKP.js';
@@ -60,7 +60,8 @@ export interface SiteKitLayoutProps {
60
60
  popups?: boolean;
61
61
  /**
62
62
  * @deprecated Use `chat` and `popups`. `engage={false}` still turns both
63
- * off, and an object still configures the chat launcher, through 7.x.
63
+ * off, and an object still configures the chat launcher. It goes in a
64
+ * later major.
64
65
  */
65
66
  engage?: boolean | EngageConfig;
66
67
  /** Signal AI (experiments, behavior). false (default) | true | config object */
@@ -1,18 +1,20 @@
1
1
  'use client';
2
- export { SiteKitClientProviders } from '../chunk-XEMHGJEG.js';
2
+ export { SiteKitClientProviders } from '../chunk-EE6IG5GK.js';
3
3
  import '../chunk-6G43IRWR.js';
4
- import '../chunk-JRCNUUNG.js';
5
- import '../chunk-EHR4NIMX.js';
4
+ import '../chunk-6KUCA5HG.js';
5
+ import '../chunk-5GB2HHVJ.js';
6
6
  import '../chunk-ZTZQPYP6.js';
7
- import '../chunk-AH4AXO4P.js';
8
7
  import '../chunk-YC7ELZS3.js';
9
8
  import '../chunk-FESKKJAS.js';
10
9
  import '../chunk-A4CC4ZG3.js';
11
- import '../chunk-24QZEO3Q.js';
10
+ import '../chunk-ZKADJNR2.js';
11
+ import '../chunk-5TM3WPCI.js';
12
12
  import '../chunk-GJWI74ZZ.js';
13
- import '../chunk-43OCZ3JA.js';
13
+ import '../chunk-CAH4Y4PY.js';
14
14
  import '../chunk-EKBEOXTH.js';
15
- import '../chunk-3E3PPSNR.js';
16
- import '../chunk-GK7TV7EK.js';
17
- import '../chunk-KHQ5GD6T.js';
15
+ import '../chunk-3G7YABRA.js';
16
+ import '../chunk-55JLUMAC.js';
17
+ import '../chunk-IY6G67EF.js';
18
+ import '../chunk-S5G3A7OZ.js';
19
+ import '../chunk-Z4MK4VOG.js';
18
20
  import '../chunk-PKBMQBKP.js';
@@ -1,25 +1,27 @@
1
- import { SiteKitClientProviders } from '../chunk-XEMHGJEG.js';
1
+ import { SiteKitClientProviders } from '../chunk-EE6IG5GK.js';
2
2
  import '../chunk-6G43IRWR.js';
3
- import '../chunk-JRCNUUNG.js';
4
- import '../chunk-EHR4NIMX.js';
3
+ import '../chunk-6KUCA5HG.js';
4
+ import '../chunk-5GB2HHVJ.js';
5
5
  import '../chunk-ZTZQPYP6.js';
6
6
  import { ManagedFavicon } from '../chunk-GW7GSBO7.js';
7
- import '../chunk-AH4AXO4P.js';
8
7
  import '../chunk-YC7ELZS3.js';
9
- import { resolveClientCredential } from '../chunk-IE5SSOCN.js';
8
+ import { resolveClientCredential } from '../chunk-H3SDOSVU.js';
10
9
  import '../chunk-UAYAJPEP.js';
11
10
  import { ManagedScripts } from '../chunk-MVLMXC44.js';
12
- import { resolveApiOrigin } from '../chunk-X6F6SO4S.js';
11
+ import { resolveApiOrigin } from '../chunk-C7TLGL3R.js';
13
12
  import '../chunk-MH2DSGC6.js';
14
13
  import '../chunk-FESKKJAS.js';
15
14
  import '../chunk-A4CC4ZG3.js';
16
- import '../chunk-24QZEO3Q.js';
15
+ import '../chunk-ZKADJNR2.js';
16
+ import '../chunk-5TM3WPCI.js';
17
17
  import '../chunk-GJWI74ZZ.js';
18
- import '../chunk-43OCZ3JA.js';
18
+ import '../chunk-CAH4Y4PY.js';
19
19
  import '../chunk-EKBEOXTH.js';
20
- import '../chunk-3E3PPSNR.js';
21
- import '../chunk-GK7TV7EK.js';
22
- import '../chunk-KHQ5GD6T.js';
20
+ import '../chunk-3G7YABRA.js';
21
+ import '../chunk-55JLUMAC.js';
22
+ import '../chunk-IY6G67EF.js';
23
+ import '../chunk-S5G3A7OZ.js';
24
+ import '../chunk-Z4MK4VOG.js';
23
25
  import '../chunk-PKBMQBKP.js';
24
26
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
25
27
 
@@ -1,11 +1,11 @@
1
- export { createLLMsFullTxtHandler, createLLMsTxtHandler, formatSourcedFactsSection, llmsResponseHeaders } from '../chunk-5O62CER4.js';
1
+ export { createLLMsFullTxtHandler, createLLMsTxtHandler, formatSourcedFactsSection, llmsResponseHeaders } from '../chunk-M62U7TJF.js';
2
2
  export { buildAiDiscoveryHeaders, wantsLlmsDiscoveryLink } from '../chunk-PO2TRJPY.js';
3
3
  export { AI_RETRIEVAL_CRAWLERS, AI_TRAINING_CRAWLERS, buildAiCrawlerRules, createRobotsTxtHandler } from '../chunk-QLTDFUJ7.js';
4
- export { LEGACY_PUBLICATION_PATH, SEO_REVALIDATION_MAX_BODY_BYTES, SEO_REVALIDATION_MAX_ITEMS, createLlmsRevalidateHandler, createSeoRevalidationHandler, parseSeoRevalidationPayload } from '../chunk-XA2BNW5M.js';
5
- import '../chunk-XTRZGXB2.js';
4
+ export { LEGACY_PUBLICATION_PATH, SEO_REVALIDATION_MAX_BODY_BYTES, SEO_REVALIDATION_MAX_ITEMS, createLlmsRevalidateHandler, createSeoRevalidationHandler, parseSeoRevalidationPayload } from '../chunk-DWNS6ZJM.js';
6
5
  export { AEOBlock, AEOCitedContent, AEOClaim, AEOComparison, AEODefinition, AEOEntity, AEOProvenanceList, AEOStep, AEOSteps, AEOSummary, DEFAULT_SPEAKABLE_SELECTORS, SpeakableSchema, createSpeakableSchema, getSpeakableSelectorsForPage } from '../chunk-PSAG45YF.js';
7
- export { AGENT_ACCESS_HEADING, appendAgentAccessSection, describesMcp, detectMcpServer, formatAgentAccessSection, generateLLMsFullTxt, generateLLMsTxt, writeLLMsTxtToPublic } from '../chunk-ZTLU3BSW.js';
8
- export { getBusinessInfo, getFAQItems, getLLMsData, getOptimizedLLMsTxt, getPageSummaries, getServices } from '../chunk-4BHRA7TI.js';
6
+ import '../chunk-XTRZGXB2.js';
7
+ export { AGENT_ACCESS_HEADING, appendAgentAccessSection, describesMcp, detectMcpServer, formatAgentAccessSection, generateLLMsFullTxt, generateLLMsTxt, writeLLMsTxtToPublic } from '../chunk-TZ5RTANX.js';
8
+ export { getBusinessInfo, getFAQItems, getLLMsData, getOptimizedLLMsTxt, getPageSummaries, getServices } from '../chunk-JIH32RH2.js';
9
9
  import '../chunk-L5UOHS6E.js';
10
10
  import '../chunk-WMVK77ND.js';
11
11
  import '../chunk-UAYAJPEP.js';
@@ -15,5 +15,6 @@ import '../chunk-MJP63SSS.js';
15
15
  import '../chunk-YVKRYQRG.js';
16
16
  import '../chunk-FESKKJAS.js';
17
17
  import '../chunk-A4CC4ZG3.js';
18
- import '../chunk-KHQ5GD6T.js';
18
+ import '../chunk-3G7YABRA.js';
19
+ import '../chunk-S5G3A7OZ.js';
19
20
  import '../chunk-PKBMQBKP.js';
@@ -1,8 +1,9 @@
1
1
  'use client';
2
2
  import { monotonicMs } from '../chunk-MH2DSGC6.js';
3
- import { sonorFetch } from '../chunk-3E3PPSNR.js';
4
- import '../chunk-GK7TV7EK.js';
5
- import '../chunk-KHQ5GD6T.js';
3
+ import { getClientApiConfig } from '../chunk-3G7YABRA.js';
4
+ import { sonorFetch } from '../chunk-55JLUMAC.js';
5
+ import '../chunk-IY6G67EF.js';
6
+ import '../chunk-S5G3A7OZ.js';
6
7
  import '../chunk-PKBMQBKP.js';
7
8
  import { useState, useCallback, useEffect } from 'react';
8
9
  import { APIProvider, Map as Map$1, AdvancedMarker, Pin, InfoWindow } from '@vis.gl/react-google-maps';
@@ -125,9 +126,8 @@ function GoogleMap({
125
126
 
126
127
  // src/maps/api.ts
127
128
  function getApiConfig() {
128
- const apiUrl = typeof window !== "undefined" ? window.__SITE_KIT_API_URL__ || "https://api.sonor.io" : process.env.SONOR_API_URL || "https://api.sonor.io";
129
- const apiKey = typeof window !== "undefined" ? window.__SITE_KIT_API_KEY__ || "" : process.env.SONOR_API_KEY || "";
130
- return { apiUrl, apiKey };
129
+ const { apiUrl, apiKey } = getClientApiConfig({ serverKey: true });
130
+ return { apiUrl, apiKey: apiKey ?? "" };
131
131
  }
132
132
  var configCache = null;
133
133
  var CONFIG_CACHE_TTL = 3e5;
@@ -5,7 +5,7 @@
5
5
  * Ten sites wrote the same MCP tools by hand (firm info, practice areas, FAQ
6
6
  * search, reviews), each a copy of data Sonor already serves. These are those
7
7
  * tools once, as thin wrappers over the fetchers the site's own pages use
8
- * (llms, articles, reputation, commerce, sync, forms), so an agent reads what
8
+ * (llms, articles, reputation, sync, forms and, for offerings, commerce-kit), so an agent reads what
9
9
  * a visitor reads and nothing drifts:
10
10
  *
11
11
  * get_business_profile who the business is, how to reach it, hours, area
@@ -15,7 +15,7 @@
15
15
  * list_articles its articles, newest first
16
16
  * get_article one article in full
17
17
  * get_reviews verbatim reviews and the rating summary
18
- * list_offerings priced products, services and events (opt-in)
18
+ * list_offerings priced products, services and events (opt-in; needs commerce-kit's getOfferingsResult)
19
19
  * check_availability open appointment times (opt-in)
20
20
  * get_inquiry_form what an inquiry needs (opt-in, with send_inquiry)
21
21
  * send_inquiry a person's inquiry, filed by a named agent (opt-in)
@@ -43,6 +43,44 @@ import { type McpServerDefinition } from './protocol';
43
43
  import type { McpServerInfo, SiteKitMcpTool } from './types';
44
44
  export { reportToolCallsToSonor } from './report';
45
45
  export type { ReportToolCallsOptions } from './report';
46
+ /**
47
+ * One priced thing a business sells, as `list_offerings` reads it. Only the
48
+ * fields the tool uses, so any source of offerings can supply them; the
49
+ * `CommerceOffering` that `@sonordev/commerce-kit` returns satisfies it as is.
50
+ */
51
+ export interface McpOffering {
52
+ name: string;
53
+ type: string;
54
+ slug: string;
55
+ short_description?: string | null;
56
+ description?: string | null;
57
+ price_is_public?: boolean;
58
+ price?: number | null;
59
+ currency?: string;
60
+ billing_period?: string | null;
61
+ }
62
+ /**
63
+ * Where `list_offerings` gets its data: pass `getOfferingsResult` (or
64
+ * `getOfferings`) from `@sonordev/commerce-kit/commerce/server`. The `Result`
65
+ * form answers `{ ok, data }`, so a failed request reads as "the catalog is
66
+ * unavailable" instead of "the business sells nothing"; the plain form answers
67
+ * a bare array, where an outage looks like an empty catalog. The fetcher belongs to commerce-kit
68
+ * (it owns the endpoint and its transform); the tool stays here, with the
69
+ * ranking, limits and the rule that a private price is never shown. That split
70
+ * is why site-kit doesn't import commerce-kit: it would be a cycle, and a
71
+ * second copy of the fetcher would drift.
72
+ */
73
+ export type McpOfferingsReader = (config: {
74
+ apiUrl: string;
75
+ apiKey: string;
76
+ projectId: string;
77
+ }, options: {
78
+ type?: 'product' | 'service' | 'event';
79
+ limit?: number;
80
+ }) => Promise<McpOffering[] | {
81
+ ok: boolean;
82
+ data: McpOffering[];
83
+ }>;
46
84
  export type SonorMcpToolName = 'get_business_profile' | 'list_services' | 'search_faq' | 'find_pages' | 'list_articles' | 'get_article' | 'get_reviews' | 'list_offerings' | 'check_availability' | 'get_inquiry_form' | 'send_inquiry';
47
85
  export interface SonorMcpOptions {
48
86
  /** The business, as tool descriptions name it ("…at Example Law"). */
@@ -57,9 +95,15 @@ export interface SonorMcpOptions {
57
95
  } | false;
58
96
  /** `false` drops get_reviews (a site with no reviews in Sonor). */
59
97
  reviews?: boolean;
60
- /** Add list_offerings: priced products, services and events from Commerce. */
98
+ /**
99
+ * Add list_offerings: priced products, services and events from Commerce.
100
+ * `read` is `getOfferingsResult` (or `getOfferings`) from
101
+ * `@sonordev/commerce-kit/commerce/server` (the tool needs commerce-kit
102
+ * installed; `list_services` doesn't).
103
+ */
61
104
  offerings?: {
62
105
  path?: string;
106
+ read: McpOfferingsReader;
63
107
  };
64
108
  /** Add check_availability: open times from Sync. `path` is the booking page agents send people to. */
65
109
  booking?: {
package/dist/mcp/sonor.js CHANGED
@@ -1,15 +1,18 @@
1
+ import { fetchReviews, fetchReviewStats } from '../chunk-NFRJTOTB.js';
1
2
  import { toolErrorResult } from '../chunk-FYAB6CXS.js';
2
- import { fetchReviews, fetchReviewStats } from '../chunk-EDYHROQ7.js';
3
- import { getOfferings } from '../chunk-G3NHWMP5.js';
4
- import { fetchBookingTypes, fetchAvailability } from '../chunk-MHGAZ3LL.js';
5
- import { getLLMsData, getServices, getFAQItems, getPageSummaries } from '../chunk-4BHRA7TI.js';
6
- import { getFormConfig } from '../chunk-FUQTV5O6.js';
7
- import '../chunk-PF64OEXC.js';
3
+ import { fetchBookingTypes, fetchAvailability } from '../chunk-YGXWG54S.js';
4
+ import { getLLMsData, getServices, getFAQItems, getPageSummaries } from '../chunk-JIH32RH2.js';
5
+ import { getFormConfig } from '../chunk-VQQV7FOX.js';
6
+ import '../chunk-GMXY2OOY.js';
7
+ import '../chunk-C2FZBUSS.js';
8
8
  import '../chunk-YC7ELZS3.js';
9
- import '../chunk-ZTLMPUO6.js';
9
+ import '../chunk-LNSF6BJC.js';
10
10
  import '../chunk-DXO6SBMD.js';
11
- import '../chunk-4NTBQNHA.js';
12
- import { getAllArticles, getArticle } from '../chunk-PKGN32AU.js';
11
+ import '../chunk-TYAVHRWH.js';
12
+ import '../chunk-5SQK3D53.js';
13
+ import '../chunk-HW7B43E5.js';
14
+ import '../chunk-NJCTQH2P.js';
15
+ import { getAllArticles, getArticle } from '../chunk-XPTJRVL2.js';
13
16
  import '../chunk-Y3INC4QJ.js';
14
17
  import '../chunk-QXMIKDOL.js';
15
18
  import '../chunk-WMVK77ND.js';
@@ -17,17 +20,14 @@ import { resolveFetch } from '../chunk-UAYAJPEP.js';
17
20
  import '../chunk-NZ4RXN3G.js';
18
21
  import '../chunk-VWWITFWM.js';
19
22
  import '../chunk-MJP63SSS.js';
20
- import { resolveServerApiConfig } from '../chunk-X6F6SO4S.js';
23
+ import { resolveServerApiConfig } from '../chunk-C7TLGL3R.js';
21
24
  import '../chunk-MH2DSGC6.js';
22
25
  import { resolveSiteHost } from '../chunk-FESKKJAS.js';
23
26
  import '../chunk-A4CC4ZG3.js';
24
- import '../chunk-C2FZBUSS.js';
25
- import '../chunk-5SQK3D53.js';
26
- import '../chunk-HW7B43E5.js';
27
- import '../chunk-NJCTQH2P.js';
28
- import '../chunk-3E3PPSNR.js';
29
- import '../chunk-GK7TV7EK.js';
30
- import { SITE_KIT_VERSION } from '../chunk-KHQ5GD6T.js';
27
+ import '../chunk-3G7YABRA.js';
28
+ import '../chunk-55JLUMAC.js';
29
+ import '../chunk-IY6G67EF.js';
30
+ import { SITE_KIT_VERSION } from '../chunk-S5G3A7OZ.js';
31
31
  import '../chunk-PKBMQBKP.js';
32
32
  import 'server-only';
33
33
  import { after } from 'next/server.js';
@@ -279,7 +279,7 @@ function getReviews(ctx) {
279
279
  }
280
280
  };
281
281
  }
282
- function listOfferings(ctx, basePath) {
282
+ function listOfferings(ctx, basePath, read) {
283
283
  return {
284
284
  name: "list_offerings",
285
285
  title: "List products, services and events",
@@ -298,7 +298,9 @@ function listOfferings(ctx, basePath) {
298
298
  const config = resolveServerApiConfig();
299
299
  if (!config) return { offerings: [], note: "The catalog is unavailable right now." };
300
300
  const type = ["product", "service", "event"].includes(String(args.type)) ? String(args.type) : void 0;
301
- const offerings = await getOfferings({ ...config, projectId: "" }, { type, limit: 100 });
301
+ const result = await read({ ...config, projectId: "" }, { type, limit: 100 });
302
+ if (!Array.isArray(result) && result.ok === false) return { offerings: [], note: "The catalog is unavailable right now." };
303
+ const offerings = Array.isArray(result) ? result : result.data;
302
304
  const picked = rankByQuery(offerings, text(args.query, 200), (o) => [o.name, o.short_description ?? o.description ?? ""], limitOf(args.limit, 10));
303
305
  return {
304
306
  offerings: picked.map((o) => ({
@@ -441,6 +443,14 @@ function sendInquiry(ctx, form, purpose) {
441
443
  }
442
444
  };
443
445
  }
446
+ function offeringsReader(offerings) {
447
+ if (typeof offerings.read !== "function") {
448
+ throw new Error(
449
+ "sonorMcpServer: `offerings` needs a reader. Install @sonordev/commerce-kit and pass `offerings: { path: '/shop', read: getOfferingsResult }` with getOfferingsResult from '@sonordev/commerce-kit/commerce/server'."
450
+ );
451
+ }
452
+ return offerings.read;
453
+ }
444
454
  function sonorMcpTools(options) {
445
455
  const ctx = contextFor(options);
446
456
  const articlesPath = options.articles === false ? null : (options.articles?.path ?? "/blog").replace(/\/+$/, "");
@@ -452,7 +462,7 @@ function sonorMcpTools(options) {
452
462
  findPages(ctx),
453
463
  ...articlesPath !== null ? [listArticles(ctx, articlesPath), getArticleTool(ctx, articlesPath)] : [],
454
464
  ...options.reviews === false ? [] : [getReviews(ctx)],
455
- ...options.offerings ? [listOfferings(ctx, (options.offerings.path ?? "/shop").replace(/\/+$/, ""))] : [],
465
+ ...options.offerings ? [listOfferings(ctx, (options.offerings.path ?? "/shop").replace(/\/+$/, ""), offeringsReader(options.offerings))] : [],
456
466
  ...options.booking ? [checkAvailability(ctx, options.booking.path)] : [],
457
467
  ...options.inquiry ? [getInquiryForm(ctx, options.inquiry.form, purpose), sendInquiry(ctx, options.inquiry.form, purpose)] : []
458
468
  ];
@@ -138,9 +138,9 @@ export declare const siteKitMatcher: {
138
138
  * @deprecated Use `createProxy` from `@sonordev/site-kit/proxy`. Next 16
139
139
  * renamed the `middleware` file convention to `proxy`, and the factory is
140
140
  * named for the file it's exported from. This alias and the `./middleware`
141
- * path last through 7.x and go in 8.0; `npx sonor-setup codemod --write`
142
- * moves a site over (it renames middleware.ts to proxy.ts too).
141
+ * path still work in 8 and will go in a later major; `npx sonor-setup codemod
142
+ * --write` moves a site over (it renames middleware.ts to proxy.ts too).
143
143
  */
144
144
  export declare const createMiddleware: typeof createProxy;
145
- /** @deprecated Use `SiteKitProxyConfig`. Goes in 8.0 with `createMiddleware`. */
145
+ /** @deprecated Use `SiteKitProxyConfig`. Goes with `createMiddleware`, in a later major. */
146
146
  export type SiteKitMiddlewareConfig = SiteKitProxyConfig;
@@ -1,7 +1,7 @@
1
1
  import { buildSecurityHeaders } from '../chunk-3QI26673.js';
2
2
  export { DEFAULT_FRAME_ANCESTORS } from '../chunk-3QI26673.js';
3
- import { handleManagedRedirects } from '../chunk-HXJ54KAM.js';
4
3
  import { buildAiDiscoveryHeaders, wantsLlmsDiscoveryLink } from '../chunk-PO2TRJPY.js';
4
+ import { handleManagedRedirects } from '../chunk-HXJ54KAM.js';
5
5
  import '../chunk-Z22QVHT4.js';
6
6
  import '../chunk-MJP63SSS.js';
7
7
  import '../chunk-FESKKJAS.js';
@@ -1,6 +1,7 @@
1
- export { TestimonialSection } from '../chunk-7HPZSWS4.js';
1
+ export { TestimonialSection } from '../chunk-6CJGZFOU.js';
2
2
  export { VisualReviewCard, VisualReviewGallery } from '../chunk-OD2ULW5Z.js';
3
3
  import '../chunk-CAT235HY.js';
4
- export { fetchReviewStats, fetchReviews } from '../chunk-EDYHROQ7.js';
4
+ export { fetchReviewStats, fetchReviews } from '../chunk-NFRJTOTB.js';
5
5
  import '../chunk-MH2DSGC6.js';
6
+ import '../chunk-3G7YABRA.js';
6
7
  import '../chunk-PKBMQBKP.js';
@@ -1,5 +1,6 @@
1
1
  export { VisualReviewCard, VisualReviewGallery } from '../chunk-OD2ULW5Z.js';
2
2
  import '../chunk-CAT235HY.js';
3
- export { fetchReviewStats, fetchReviews } from '../chunk-EDYHROQ7.js';
3
+ export { fetchReviewStats, fetchReviews } from '../chunk-NFRJTOTB.js';
4
4
  import '../chunk-MH2DSGC6.js';
5
+ import '../chunk-3G7YABRA.js';
5
6
  import '../chunk-PKBMQBKP.js';
@@ -1,7 +1,7 @@
1
- import { createSeoRevalidationHandler } from '../chunk-XA2BNW5M.js';
1
+ import { createSeoRevalidationHandler } from '../chunk-DWNS6ZJM.js';
2
2
  import '../chunk-XTRZGXB2.js';
3
- export { SITE_CACHE_TAGS, SITE_REVALIDATE_PATH, isSiteRevalidatePong } from '../chunk-RYVDGXC2.js';
4
- import '../chunk-KHQ5GD6T.js';
3
+ export { SITE_CACHE_TAGS, SITE_REVALIDATE_PATH, isSiteRevalidatePong } from '../chunk-6KU7STM3.js';
4
+ import '../chunk-S5G3A7OZ.js';
5
5
  import '../chunk-PKBMQBKP.js';
6
6
 
7
7
  // src/revalidate/index.ts
@@ -1,4 +1,4 @@
1
- export { GET, INDEXNOW_KEY_PATH, createIndexNowKeyRoute, fetchIndexNowKey } from '../chunk-PXKIGZ2F.js';
2
- import '../chunk-X6F6SO4S.js';
1
+ export { GET, INDEXNOW_KEY_PATH, createIndexNowKeyRoute, fetchIndexNowKey } from '../chunk-EATJPSTS.js';
2
+ import '../chunk-C7TLGL3R.js';
3
3
  import '../chunk-MH2DSGC6.js';
4
4
  import '../chunk-PKBMQBKP.js';
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @sonordev/site-kit/runtime — how a package that builds on site-kit talks to
3
+ * Sonor from the browser, without carrying a transport of its own.
4
+ *
5
+ * `@sonordev/commerce-kit` is built on this entry, and any other kit should
6
+ * be: the credential lifecycle (short-lived site tokens, refreshed once on an
7
+ * authentication failure), retries with a timeout, the auth circuit breaker
8
+ * and the one reader of the API origin the layout publishes all live in
9
+ * site-kit, so a kit that goes through here gets every fix site-kit ships.
10
+ * The visitor's analytics ids come from here too (`readAnalyticsIdentity`),
11
+ * read-only, so a kit can attribute what it sends without knowing where
12
+ * site-kit keeps them.
13
+ *
14
+ * Deliberately NOT stamped `'use client'` and free of React, Next and
15
+ * `server-only`: it is imported from client components and server code alike
16
+ * (`getClientApiConfig` is built to run during server rendering), and a
17
+ * function exported from a stamped entry can't be called from a server
18
+ * component. `@sonordev/site-kit/client` is stamped, which is why this isn't
19
+ * part of it. src/shared/client-entry-boundary.test.ts and tsup.config.ts
20
+ * keep it that way (ISOMORPHIC_ENTRIES in src/shared/build-entries.ts).
21
+ *
22
+ * Stable public surface, covered by semver: runtime/index.test.ts pins the
23
+ * exact list of exports, so adding or removing one is a deliberate change.
24
+ * See README.md.
25
+ */
26
+ export { sonorFetch } from '../shared/sonorFetch';
27
+ export type { SonorFetchOptions } from '../shared/sonorFetch';
28
+ export type { FetchRetryOptions } from '../shared/fetchWithRetry';
29
+ export { getClientApiConfig, readPublishedApiConfig, DEFAULT_SONOR_API_URL } from '../shared/clientApiConfig';
30
+ export type { ClientApiConfigOptions } from '../shared/clientApiConfig';
31
+ export { readAnalyticsIdentity } from '../shared/identity-reader';
32
+ export type { AnalyticsIdentity } from '../shared/identity-reader';
@@ -0,0 +1,7 @@
1
+ export { readAnalyticsIdentity } from '../chunk-5ROTTMBL.js';
2
+ import '../chunk-5TM3WPCI.js';
3
+ export { DEFAULT_SONOR_API_URL, getClientApiConfig, readPublishedApiConfig } from '../chunk-3G7YABRA.js';
4
+ export { sonorFetch } from '../chunk-55JLUMAC.js';
5
+ import '../chunk-IY6G67EF.js';
6
+ import '../chunk-S5G3A7OZ.js';
7
+ import '../chunk-PKBMQBKP.js';
package/dist/seo/api.d.ts CHANGED
@@ -32,10 +32,6 @@ export declare const getInternalLinks: (projectId: string, sourcePath: string, o
32
32
  position?: string;
33
33
  limit?: number;
34
34
  }) => Promise<any[]>;
35
- /**
36
- * Fetch content block - cached per request
37
- */
38
- export declare const getContentBlock: (projectId: string, path: string, section: string) => Promise<any>;
39
35
  /**
40
36
  * Fetch A/B test and determine variant - cached per request
41
37
  */