@sonordev/site-kit 8.10.0 → 8.11.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 (103) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/agent-manifest.json +1 -1
  3. package/dist/{AddressAutocomplete-LQS6GQ4R.js → AddressAutocomplete-SQDJJOEF.js} +1 -1
  4. package/dist/{AnalyticsProvider-JWS7BLFY.js → AnalyticsProvider-JDVLH5OV.js} +4 -4
  5. package/dist/{ArticleViewTracker-CDPVMUAO.js → ArticleViewTracker-L6TFJ35X.js} +1 -1
  6. package/dist/{BlocksPopup-C5PNJ7U6.js → BlocksPopup-5Q47LRN2.js} +3 -3
  7. package/dist/{ChatWidget-HEPOE3YC.js → ChatWidget-4ILVGTK6.js} +5 -5
  8. package/dist/{FileField-6R5LS5NU.js → FileField-TLS53TPW.js} +1 -1
  9. package/dist/{FormSpotlight-2BSE7PD2.js → FormSpotlight-JPLIRN3H.js} +1 -1
  10. package/dist/{FormStage-3G46OPPO.js → FormStage-UBP57NY7.js} +1 -1
  11. package/dist/{ManagedForm-LTXEU25N.js → ManagedForm-PFGM5X5H.js} +6 -6
  12. package/dist/{ManagedNewsletterForm-WE6P5DMV.js → ManagedNewsletterForm-GJU5KCGA.js} +8 -8
  13. package/dist/{SignalCore-IP7FE6SN.js → SignalCore-DGKCVQ74.js} +3 -3
  14. package/dist/{SiteChat-3FQYMHCP.js → SiteChat-EP25SEMP.js} +1 -1
  15. package/dist/{SiteDesignReporter-HGTX4FX2.js → SiteDesignReporter-NE6BQSVZ.js} +4 -4
  16. package/dist/{SitePopups-V7MCNSGE.js → SitePopups-XJLZPV4L.js} +4 -4
  17. package/dist/{SitemapSync-OAJ7SIET.js → SitemapSync-35EAR2YA.js} +2 -2
  18. package/dist/_client/booking-widget.js +3 -3
  19. package/dist/_client/reviewed-signal-experiment.js +1 -1
  20. package/dist/affiliates/index.js +1 -1
  21. package/dist/analytics/index.js +4 -4
  22. package/dist/api-AHFVE5HN.js +5 -0
  23. package/dist/articles/index.js +1 -1
  24. package/dist/articles/server-ui.js +3 -3
  25. package/dist/articles/server.js +2 -2
  26. package/dist/chat/index.js +6 -6
  27. package/dist/{chunk-TLKLHSRJ.js → chunk-2URLL3Z2.js} +1 -1
  28. package/dist/{chunk-RMPXSEEU.js → chunk-3LGE3LRC.js} +1 -1
  29. package/dist/{chunk-Z62W7Q3T.js → chunk-3VKJJNQU.js} +1 -1
  30. package/dist/{chunk-P7S45DD7.js → chunk-52MFDOBB.js} +1 -1
  31. package/dist/{chunk-RUV6DCKL.js → chunk-5LCY7QKK.js} +1 -1
  32. package/dist/{chunk-Z4XJOVQX.js → chunk-7OTHRX45.js} +1 -1
  33. package/dist/{chunk-HNVLINPI.js → chunk-BHJTT63Y.js} +1 -1
  34. package/dist/{chunk-Y7DZ2ND2.js → chunk-CCZHAC4K.js} +3 -3
  35. package/dist/{chunk-HLN7A4GL.js → chunk-CIZ7Z3NU.js} +1 -1
  36. package/dist/{chunk-D4R3FQED.js → chunk-CNQMSQYQ.js} +1 -1
  37. package/dist/{chunk-MKU5ZORB.js → chunk-DHGOFK5P.js} +1 -1
  38. package/dist/{chunk-MIKVCYGX.js → chunk-DHMBDPGA.js} +2 -2
  39. package/dist/{chunk-6CIO4X6P.js → chunk-FW63D6W3.js} +1 -1
  40. package/dist/{chunk-727353NY.js → chunk-GZYIJ3JI.js} +3 -3
  41. package/dist/{chunk-A66TIJWU.js → chunk-HWYJ3O7D.js} +1 -1
  42. package/dist/{chunk-J4R7MHV2.js → chunk-I5S2XA7H.js} +8 -8
  43. package/dist/{chunk-NWEIHCSE.js → chunk-IDLJEFVB.js} +1 -1
  44. package/dist/{chunk-OEHIXCYS.js → chunk-JXH56PY3.js} +2 -2
  45. package/dist/{chunk-XAPSYDVT.js → chunk-JYRBGL33.js} +1 -1
  46. package/dist/{chunk-OCNODBH4.js → chunk-KWHR7PNA.js} +1 -1
  47. package/dist/{chunk-75N2WALV.js → chunk-LY3Q6RU5.js} +1 -1
  48. package/dist/{chunk-YJ6PRJ7Y.js → chunk-N26GRGIP.js} +2 -2
  49. package/dist/{chunk-7PWXPN53.js → chunk-NAO63YOG.js} +1 -1
  50. package/dist/{chunk-DW5X4BC7.js → chunk-OPJZSLGK.js} +2 -2
  51. package/dist/{chunk-533ZSRJF.js → chunk-R53G2IKP.js} +1 -1
  52. package/dist/{chunk-ACZ5JNSL.js → chunk-UEF4AC76.js} +2 -2
  53. package/dist/{chunk-NBNDH2J6.js → chunk-UK4ANQUS.js} +1 -1
  54. package/dist/{chunk-3RBOES2C.js → chunk-VA5NLFSL.js} +1 -1
  55. package/dist/{chunk-NH7K252M.js → chunk-XHEUPCCU.js} +1 -1
  56. package/dist/{chunk-Q2OE32TH.js → chunk-XVB5V7D3.js} +2 -2
  57. package/dist/{chunk-UMF5OILQ.js → chunk-ZWTDI2JU.js} +1 -1
  58. package/dist/contracts/entries.d.ts +1 -1
  59. package/dist/contracts/property-interest.d.ts +100 -0
  60. package/dist/contracts/resonance.d.ts +1705 -358
  61. package/dist/contracts/sales-call-prep.d.ts +666 -0
  62. package/dist/contracts/signal-experiments.d.ts +0 -1
  63. package/dist/contracts/wire-uuid.d.ts +5 -0
  64. package/dist/{controls-KLG6VQLO.js → controls-YQ3MGZJG.js} +2 -2
  65. package/dist/fleet/index.js +3 -3
  66. package/dist/forms/index.js +8 -8
  67. package/dist/forms/server.js +2 -2
  68. package/dist/images/index.js +2 -2
  69. package/dist/index.js +1 -1
  70. package/dist/landing/server.js +5 -5
  71. package/dist/layout/client.js +6 -6
  72. package/dist/layout/index.js +7 -7
  73. package/dist/llms/index.js +4 -4
  74. package/dist/maps/index.js +3 -3
  75. package/dist/mcp/sonor.js +5 -5
  76. package/dist/resonance/ConsentPreferences.d.ts +8 -0
  77. package/dist/resonance/consent-adapter.d.ts +3 -0
  78. package/dist/resonance/first-party-consent.d.ts +22 -0
  79. package/dist/resonance/index.d.ts +1 -0
  80. package/dist/resonance/index.js +272 -2
  81. package/dist/revalidate/index.js +2 -2
  82. package/dist/runtime/index.js +1 -1
  83. package/dist/{runtime-core-EU2RZMOL.js → runtime-core-WSKES5UP.js} +523 -7
  84. package/dist/seo/client.js +2 -2
  85. package/dist/seo/index.js +2 -2
  86. package/dist/seo/llms.js +4 -4
  87. package/dist/seo/register-sitemap-cli.js +1 -1
  88. package/dist/seo/sitemap.js +2 -2
  89. package/dist/server/index.js +2 -2
  90. package/dist/shared/version.d.ts +1 -1
  91. package/dist/signal/index.js +2 -2
  92. package/dist/sitemap/index.js +2 -2
  93. package/dist/{sonor-fetch-runtime-SLPBNZY4.js → sonor-fetch-runtime-JDVDCTKI.js} +2 -2
  94. package/dist/sync/index.js +3 -3
  95. package/dist/website/images.js +2 -2
  96. package/dist/website/index.js +4 -4
  97. package/dist/website/landing/server.js +5 -5
  98. package/dist/website/popups.js +4 -4
  99. package/dist/{writeLLMsTxt-2CBYGKZO.js → writeLLMsTxt-SYLPYWUX.js} +1 -1
  100. package/package.json +1 -1
  101. package/src/resonance/README.md +16 -0
  102. package/dist/api-X6N6V2H3.js +0 -5
  103. /package/dist/{chunk-ORSQKTMN.js → chunk-ES52W5EE.js} +0 -0
@@ -1,10 +1,10 @@
1
1
  'use client';
2
- export { FLEET_HEARTBEAT_PATH, FleetHeartbeat, detectNextVersion, sendFleetHeartbeat } from '../chunk-Q2OE32TH.js';
2
+ export { FLEET_HEARTBEAT_PATH, FleetHeartbeat, detectNextVersion, sendFleetHeartbeat } from '../chunk-XVB5V7D3.js';
3
3
  export { FLEET_CONTRACT_VERSION, FLEET_MODULES, FLEET_MODULES_MAX, FLEET_SITE_MAX_LENGTH, FLEET_VERSION_MAX_LENGTH, FLEET_VERSION_PATTERN, buildFleetHeartbeatPayload, isFleetModule, normalizeFleetModules, normalizeFleetSite, sanitizeFleetVersion } from '../chunk-ZTZQPYP6.js';
4
4
  import '../chunk-YC7ELZS3.js';
5
- import '../chunk-D4R3FQED.js';
5
+ import '../chunk-CNQMSQYQ.js';
6
6
  import '../chunk-7643MCD2.js';
7
7
  import '../chunk-64XODP7M.js';
8
- import '../chunk-Z4XJOVQX.js';
8
+ import '../chunk-7OTHRX45.js';
9
9
  import '../chunk-W7OPEMGJ.js';
10
10
  import '../chunk-PKBMQBKP.js';
@@ -1,14 +1,14 @@
1
1
  'use client';
2
- export { configureFormsApi, defineForm, field, formsApi, initializeForms } from '../chunk-HNVLINPI.js';
2
+ export { configureFormsApi, defineForm, field, formsApi, initializeForms } from '../chunk-BHJTT63Y.js';
3
3
  export { FormCelebration } from '../chunk-YGGDU6C3.js';
4
- export { FormClient, ManagedForm } from '../chunk-727353NY.js';
5
- import '../chunk-MKU5ZORB.js';
4
+ export { FormClient, ManagedForm } from '../chunk-GZYIJ3JI.js';
5
+ import '../chunk-DHGOFK5P.js';
6
6
  export { DatePicker } from '../chunk-SOD2F6C2.js';
7
- export { useForm, useFormTracking } from '../chunk-MIKVCYGX.js';
7
+ export { useForm, useFormTracking } from '../chunk-DHMBDPGA.js';
8
8
  import '../chunk-Q6E4OPGG.js';
9
9
  import '../chunk-MDBXGN6W.js';
10
10
  import '../chunk-PVY7X5UR.js';
11
- export { FormEnhancer } from '../chunk-NWEIHCSE.js';
11
+ export { FormEnhancer } from '../chunk-IDLJEFVB.js';
12
12
  import '../chunk-C2FZBUSS.js';
13
13
  import '../chunk-YC7ELZS3.js';
14
14
  import '../chunk-DXO6SBMD.js';
@@ -17,17 +17,17 @@ export { DEFAULT_FORM_SUCCESS_MESSAGE } from '../chunk-TYSIAWC3.js';
17
17
  import '../chunk-HW7B43E5.js';
18
18
  import '../chunk-NJCTQH2P.js';
19
19
  import '../chunk-L2V5PUFN.js';
20
- import '../chunk-ACZ5JNSL.js';
20
+ import '../chunk-UEF4AC76.js';
21
21
  import '../chunk-NHDRA4Y5.js';
22
22
  import '../chunk-D4M5K6JN.js';
23
23
  import '../chunk-GJWI74ZZ.js';
24
24
  import '../chunk-NZOJHERI.js';
25
25
  import '../chunk-KMNHNCVG.js';
26
26
  import '../chunk-5IVD6G77.js';
27
- import '../chunk-D4R3FQED.js';
27
+ import '../chunk-CNQMSQYQ.js';
28
28
  import '../chunk-7643MCD2.js';
29
29
  import '../chunk-64XODP7M.js';
30
- import '../chunk-Z4XJOVQX.js';
30
+ import '../chunk-7OTHRX45.js';
31
31
  import '../chunk-W7OPEMGJ.js';
32
32
  import '../chunk-A4CC4ZG3.js';
33
33
  import '../chunk-MOACHHOJ.js';
@@ -1,5 +1,5 @@
1
- export { ServerForm, getFormConfig } from '../chunk-NH7K252M.js';
2
- import '../chunk-NWEIHCSE.js';
1
+ export { ServerForm, getFormConfig } from '../chunk-XHEUPCCU.js';
2
+ import '../chunk-IDLJEFVB.js';
3
3
  import '../chunk-C2FZBUSS.js';
4
4
  import '../chunk-YC7ELZS3.js';
5
5
  export { StaticForm } from '../chunk-HHEDRZOJ.js';
@@ -1,4 +1,4 @@
1
- export { ManagedImage, assignImageToSlot, clearImageSlot, fetchManagedImage, fetchManagedImages, listImageFiles, uploadImage } from '../chunk-P7S45DD7.js';
1
+ export { ManagedImage, assignImageToSlot, clearImageSlot, fetchManagedImage, fetchManagedImages, listImageFiles, uploadImage } from '../chunk-52MFDOBB.js';
2
2
  export { ManagedFavicon, getManagedFaviconUrl } from '../chunk-GW7GSBO7.js';
3
- import '../chunk-Z4XJOVQX.js';
3
+ import '../chunk-7OTHRX45.js';
4
4
  import '../chunk-PKBMQBKP.js';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { SITE_KIT_VERSION } from './chunk-D4R3FQED.js';
1
+ export { SITE_KIT_VERSION } from './chunk-CNQMSQYQ.js';
2
2
  import './chunk-PKBMQBKP.js';
@@ -1,12 +1,12 @@
1
- export { FunnelPageContent, ManagedFunnelPage, getPublishedFunnelPage, managedFunnelMetadata } from '../chunk-YJ6PRJ7Y.js';
1
+ export { FunnelPageContent, ManagedFunnelPage, getPublishedFunnelPage, managedFunnelMetadata } from '../chunk-N26GRGIP.js';
2
2
  import '../chunk-XS2ORMUG.js';
3
3
  import '../chunk-XJZLXUTG.js';
4
4
  import '../chunk-7IZUUXXO.js';
5
5
  export { normalizeCampaignSlug } from '../chunk-2QPVU63T.js';
6
6
  export { landingPageMetadata } from '../chunk-JESLPEST.js';
7
7
  import '../chunk-XHYE24HU.js';
8
- import '../chunk-NH7K252M.js';
9
- import '../chunk-NWEIHCSE.js';
8
+ import '../chunk-XHEUPCCU.js';
9
+ import '../chunk-IDLJEFVB.js';
10
10
  import '../chunk-C2FZBUSS.js';
11
11
  import '../chunk-YC7ELZS3.js';
12
12
  import '../chunk-HHEDRZOJ.js';
@@ -19,8 +19,8 @@ import '../chunk-7VMA3KCN.js';
19
19
  import '../chunk-MH2DSGC6.js';
20
20
  import '../chunk-S22FSH7C.js';
21
21
  import '../chunk-A4CC4ZG3.js';
22
- import '../chunk-OCNODBH4.js';
23
- import '../chunk-533ZSRJF.js';
22
+ import '../chunk-KWHR7PNA.js';
23
+ import '../chunk-R53G2IKP.js';
24
24
  import '../chunk-MOACHHOJ.js';
25
25
  import '../chunk-FRY6PBT6.js';
26
26
  import '../chunk-PKBMQBKP.js';
@@ -1,11 +1,11 @@
1
1
  'use client';
2
- export { SiteKitClientProviders } from '../chunk-J4R7MHV2.js';
2
+ export { SiteKitClientProviders } from '../chunk-I5S2XA7H.js';
3
3
  import '../chunk-KQKUXIUD.js';
4
4
  import '../chunk-6G43IRWR.js';
5
5
  import '../chunk-2LBKIE2K.js';
6
6
  import '../chunk-TPHOIE4I.js';
7
- import '../chunk-3RBOES2C.js';
8
- import '../chunk-Q2OE32TH.js';
7
+ import '../chunk-VA5NLFSL.js';
8
+ import '../chunk-XVB5V7D3.js';
9
9
  import '../chunk-ZTZQPYP6.js';
10
10
  import '../chunk-YC7ELZS3.js';
11
11
  import '../chunk-FESKKJAS.js';
@@ -13,12 +13,12 @@ import '../chunk-JT7GHHMV.js';
13
13
  import '../chunk-D4M5K6JN.js';
14
14
  import '../chunk-GJWI74ZZ.js';
15
15
  import '../chunk-5IVD6G77.js';
16
- import '../chunk-D4R3FQED.js';
16
+ import '../chunk-CNQMSQYQ.js';
17
17
  import '../chunk-7643MCD2.js';
18
18
  import '../chunk-64XODP7M.js';
19
- import '../chunk-Z4XJOVQX.js';
19
+ import '../chunk-7OTHRX45.js';
20
20
  import '../chunk-W7OPEMGJ.js';
21
21
  import '../chunk-A4CC4ZG3.js';
22
- import '../chunk-533ZSRJF.js';
22
+ import '../chunk-R53G2IKP.js';
23
23
  import '../chunk-FRY6PBT6.js';
24
24
  import '../chunk-PKBMQBKP.js';
@@ -1,15 +1,15 @@
1
- import { SiteKitClientProviders } from '../chunk-J4R7MHV2.js';
1
+ import { SiteKitClientProviders } from '../chunk-I5S2XA7H.js';
2
2
  import '../chunk-KQKUXIUD.js';
3
3
  import '../chunk-6G43IRWR.js';
4
4
  import '../chunk-2LBKIE2K.js';
5
5
  import '../chunk-TPHOIE4I.js';
6
- import '../chunk-3RBOES2C.js';
7
- import '../chunk-Q2OE32TH.js';
6
+ import '../chunk-VA5NLFSL.js';
7
+ import '../chunk-XVB5V7D3.js';
8
8
  import '../chunk-ZTZQPYP6.js';
9
9
  import { aiDiscoveryLinks } from '../chunk-MTDVV5P3.js';
10
10
  import { ManagedFavicon } from '../chunk-GW7GSBO7.js';
11
11
  import '../chunk-YC7ELZS3.js';
12
- import { resolveClientCredential } from '../chunk-NBNDH2J6.js';
12
+ import { resolveClientCredential } from '../chunk-UK4ANQUS.js';
13
13
  import '../chunk-UAYAJPEP.js';
14
14
  import { ManagedScripts } from '../chunk-MVLMXC44.js';
15
15
  import { resolveApiOrigin } from '../chunk-7VMA3KCN.js';
@@ -19,13 +19,13 @@ import '../chunk-JT7GHHMV.js';
19
19
  import '../chunk-D4M5K6JN.js';
20
20
  import '../chunk-GJWI74ZZ.js';
21
21
  import '../chunk-5IVD6G77.js';
22
- import '../chunk-D4R3FQED.js';
22
+ import '../chunk-CNQMSQYQ.js';
23
23
  import '../chunk-7643MCD2.js';
24
24
  import '../chunk-64XODP7M.js';
25
- import '../chunk-Z4XJOVQX.js';
25
+ import '../chunk-7OTHRX45.js';
26
26
  import '../chunk-W7OPEMGJ.js';
27
27
  import '../chunk-A4CC4ZG3.js';
28
- import '../chunk-533ZSRJF.js';
28
+ import '../chunk-R53G2IKP.js';
29
29
  import '../chunk-FRY6PBT6.js';
30
30
  import '../chunk-PKBMQBKP.js';
31
31
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
@@ -1,10 +1,10 @@
1
- export { createLLMsFullTxtHandler, createLLMsTxtHandler, formatSourcedFactsSection, llmsResponseHeaders } from '../chunk-HLN7A4GL.js';
1
+ export { createLLMsFullTxtHandler, createLLMsTxtHandler, formatSourcedFactsSection, llmsResponseHeaders } from '../chunk-CIZ7Z3NU.js';
2
2
  export { buildAiDiscoveryHeaders, wantsLlmsDiscoveryLink } from '../chunk-MTDVV5P3.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-RUV6DCKL.js';
4
+ export { LEGACY_PUBLICATION_PATH, SEO_REVALIDATION_MAX_BODY_BYTES, SEO_REVALIDATION_MAX_ITEMS, createLlmsRevalidateHandler, createSeoRevalidationHandler, parseSeoRevalidationPayload } from '../chunk-5LCY7QKK.js';
5
5
  export { AEOBlock, AEOCitedContent, AEOClaim, AEOComparison, AEODefinition, AEOEntity, AEOProvenanceList, AEOStep, AEOSteps, AEOSummary, DEFAULT_SPEAKABLE_SELECTORS, SpeakableSchema, createSpeakableSchema, getSpeakableSelectorsForPage } from '../chunk-PSAG45YF.js';
6
6
  import '../chunk-XTRZGXB2.js';
7
- export { AGENT_ACCESS_HEADING, appendAgentAccessSection, describesMcp, detectMcpServer, formatAgentAccessSection, generateLLMsFullTxt, generateLLMsTxt, writeLLMsTxtToPublic } from '../chunk-ORSQKTMN.js';
7
+ export { AGENT_ACCESS_HEADING, appendAgentAccessSection, describesMcp, detectMcpServer, formatAgentAccessSection, generateLLMsFullTxt, generateLLMsTxt, writeLLMsTxtToPublic } from '../chunk-ES52W5EE.js';
8
8
  export { getBusinessInfo, getFAQItems, getLLMsData, getOptimizedLLMsTxt, getPageSummaries, getServices } from '../chunk-EK7P62DT.js';
9
9
  import '../chunk-7DYMM6SS.js';
10
10
  import '../chunk-IBHBEUZV.js';
@@ -16,7 +16,7 @@ import '../chunk-ISRBSTB7.js';
16
16
  import '../chunk-MJP63SSS.js';
17
17
  import '../chunk-YVKRYQRG.js';
18
18
  import '../chunk-FESKKJAS.js';
19
- import '../chunk-D4R3FQED.js';
19
+ import '../chunk-CNQMSQYQ.js';
20
20
  import '../chunk-W7OPEMGJ.js';
21
21
  import '../chunk-A4CC4ZG3.js';
22
22
  import '../chunk-PKBMQBKP.js';
@@ -1,8 +1,8 @@
1
1
  'use client';
2
- import { fetchMapsConfig, fetchNearbyPlaces } from '../chunk-6CIO4X6P.js';
3
- export { fetchMapsConfig, fetchNearbyPlaces } from '../chunk-6CIO4X6P.js';
2
+ import { fetchMapsConfig, fetchNearbyPlaces } from '../chunk-FW63D6W3.js';
3
+ export { fetchMapsConfig, fetchNearbyPlaces } from '../chunk-FW63D6W3.js';
4
4
  import '../chunk-MH2DSGC6.js';
5
- import '../chunk-Z4XJOVQX.js';
5
+ import '../chunk-7OTHRX45.js';
6
6
  import '../chunk-W7OPEMGJ.js';
7
7
  import '../chunk-PKBMQBKP.js';
8
8
  import { useState, useCallback, useEffect } from 'react';
package/dist/mcp/sonor.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { fetchReviews, fetchReviewStats } from '../chunk-BSQP6PRA.js';
2
2
  import { toolErrorResult } from '../chunk-FYAB6CXS.js';
3
- import { fetchBookingTypes, fetchAvailability } from '../chunk-75N2WALV.js';
3
+ import { fetchBookingTypes, fetchAvailability } from '../chunk-LY3Q6RU5.js';
4
4
  import { getLLMsData, getServices, getFAQItems, getPageSummaries } from '../chunk-EK7P62DT.js';
5
5
  import '../chunk-PVY7X5UR.js';
6
- import { getFormConfig } from '../chunk-NH7K252M.js';
7
- import '../chunk-NWEIHCSE.js';
6
+ import { getFormConfig } from '../chunk-XHEUPCCU.js';
7
+ import '../chunk-IDLJEFVB.js';
8
8
  import '../chunk-C2FZBUSS.js';
9
9
  import '../chunk-YC7ELZS3.js';
10
10
  import '../chunk-HHEDRZOJ.js';
@@ -22,8 +22,8 @@ import { resolveServerApiConfig } from '../chunk-7VMA3KCN.js';
22
22
  import '../chunk-MH2DSGC6.js';
23
23
  import { resolveSiteHost } from '../chunk-FESKKJAS.js';
24
24
  import '../chunk-5IVD6G77.js';
25
- import { SITE_KIT_VERSION } from '../chunk-D4R3FQED.js';
26
- import '../chunk-Z4XJOVQX.js';
25
+ import { SITE_KIT_VERSION } from '../chunk-CNQMSQYQ.js';
26
+ import '../chunk-7OTHRX45.js';
27
27
  import '../chunk-W7OPEMGJ.js';
28
28
  import '../chunk-A4CC4ZG3.js';
29
29
  import '../chunk-FRY6PBT6.js';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export interface ResonanceConsentPreferencesProps {
3
+ privacyUrl?: string;
4
+ /** Preference lifetime, capped at 180 days. Current native policy and proof expiry are checked separately. */
5
+ maxAgeDays?: number;
6
+ }
7
+ /** Opt-in preferences for a site that has no existing CMP. Mount once beside SiteKitLayout. */
8
+ export declare function ResonanceConsentPreferences({ privacyUrl, maxAgeDays }: ResonanceConsentPreferencesProps): React.JSX.Element | null;
@@ -13,6 +13,9 @@ export interface ConsentReadContext {
13
13
  configRevision: string | null;
14
14
  policyRevision: string | null;
15
15
  requiredPurposes: readonly MeasurementPurpose[];
16
+ /** Actual current configuration expiry, supplied by the existing controller. */
17
+ configEnabled?: boolean;
18
+ configExpiresAt?: string | null;
16
19
  }
17
20
  export interface ResonanceConsentAdapter {
18
21
  requiredPurposes: readonly MeasurementPurpose[];
@@ -0,0 +1,22 @@
1
+ import type { ResonanceConsentAdapter } from "./consent-adapter.js";
2
+ export interface ConsentPreferencesSnapshot {
3
+ contextReady: boolean;
4
+ hasPreference: boolean;
5
+ analytics: boolean;
6
+ advertising: boolean;
7
+ }
8
+ interface Options {
9
+ maxAgeDays?: number;
10
+ now?: () => number;
11
+ storage?: Pick<Storage, 'getItem' | 'setItem'> | null;
12
+ }
13
+ /** Optional first-party CMP owner. Sites with an existing CMP retain their registered adapter. */
14
+ export declare function createFirstPartyConsentAdapter(options?: Options): {
15
+ adapter: ResonanceConsentAdapter;
16
+ getSnapshot: () => ConsentPreferencesSnapshot;
17
+ getServerSnapshot: () => ConsentPreferencesSnapshot;
18
+ subscribe(listener: () => void): () => void;
19
+ save(analytics: boolean, advertising: boolean): boolean;
20
+ connect(): () => void;
21
+ };
22
+ export {};
@@ -2,3 +2,4 @@ export { ResonanceRuntime, type ResonanceRuntimeProps } from "./ResonanceRuntime
2
2
  export { registerResonanceConsentAdapter, type ResonanceConsentAdapter, type ConsentObservation, type ConsentReadContext } from "./consent-adapter.js";
3
3
  export { recordResonanceExposure, getResonanceMeasurementStatus } from "./bridge.js";
4
4
  export type { MeasurementPurpose, PurposeChoice, PurposeChoices } from "../shared/measurement-policy.js";
5
+ export { ResonanceConsentPreferences, type ResonanceConsentPreferencesProps } from "./ConsentPreferences.js";
@@ -1,9 +1,279 @@
1
1
  'use client';
2
+ import { getConsentAdapter, registerResonanceConsentAdapter } from '../chunk-WYNDBJG7.js';
2
3
  export { getResonanceMeasurementStatus, recordResonanceExposure, registerResonanceConsentAdapter } from '../chunk-WYNDBJG7.js';
3
- export { ResonanceRuntime } from '../chunk-3RBOES2C.js';
4
+ export { ResonanceRuntime } from '../chunk-VA5NLFSL.js';
4
5
  import '../chunk-MDBXGN6W.js';
5
6
  import '../chunk-YC7ELZS3.js';
6
7
  import '../chunk-KMNHNCVG.js';
7
8
  import '../chunk-MOACHHOJ.js';
8
- import '../chunk-FRY6PBT6.js';
9
+ import { MEASUREMENT_PURPOSES, unknownChoices } from '../chunk-FRY6PBT6.js';
9
10
  import '../chunk-PKBMQBKP.js';
11
+ import { useState, useSyncExternalStore, useRef, useId, useEffect } from 'react';
12
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
13
+
14
+ // src/resonance/first-party-consent.ts
15
+ var storageKey = "sonor:privacy-preference:v1";
16
+ var dayMs = 864e5;
17
+ var initial = { contextReady: false, hasPreference: false, analytics: false, advertising: false };
18
+ function createFirstPartyConsentAdapter(options = {}) {
19
+ const days = options.maxAgeDays ?? 180;
20
+ if (!Number.isInteger(days) || days < 1 || days > 180) throw new Error("Consent preference lifetime must be 1\u2013180 days");
21
+ const now = options.now ?? Date.now;
22
+ let context;
23
+ let preference = null;
24
+ let snapshot = initial;
25
+ let timer;
26
+ const viewListeners = /* @__PURE__ */ new Set();
27
+ const adapterListeners = /* @__PURE__ */ new Set();
28
+ function storage() {
29
+ if (options.storage !== void 0) return options.storage;
30
+ try {
31
+ return typeof window === "undefined" ? null : window.localStorage;
32
+ } catch {
33
+ return null;
34
+ }
35
+ }
36
+ function scope() {
37
+ if (!context?.configEnabled || !context.projectId || !context.configRevision || !context.policyRevision || !context.configExpiresAt || Date.parse(context.configExpiresAt) <= now() || !Number.isFinite(Date.parse(context.configExpiresAt))) return null;
38
+ return JSON.stringify([context.projectId, context.site, context.configRevision, context.policyRevision]);
39
+ }
40
+ function current() {
41
+ return preference && preference.scope === scope() && Date.parse(preference.expiresAt) > now() ? preference : null;
42
+ }
43
+ function publish() {
44
+ const selected = current();
45
+ const next = {
46
+ contextReady: scope() !== null,
47
+ hasPreference: selected !== null,
48
+ analytics: selected?.choices.analytics_storage === "granted",
49
+ advertising: !!selected && ["ad_storage", "ad_user_data", "ad_personalization"].every((p) => selected.choices[p] === "granted")
50
+ };
51
+ if (Object.keys(next).some((key) => next[key] !== snapshot[key])) {
52
+ snapshot = next;
53
+ for (const listener of viewListeners) listener();
54
+ }
55
+ clearTimeout(timer);
56
+ const expiry = Math.min(Date.parse(context?.configExpiresAt ?? ""), Date.parse(selected?.expiresAt ?? ""));
57
+ if (Number.isFinite(expiry) && expiry > now()) {
58
+ timer = setTimeout(() => {
59
+ publish();
60
+ for (const listener of adapterListeners) listener();
61
+ }, Math.min(expiry - now(), 2147483647));
62
+ }
63
+ }
64
+ function load() {
65
+ try {
66
+ const raw = storage()?.getItem(storageKey);
67
+ if (!raw || raw.length > 2e3) {
68
+ preference = null;
69
+ return;
70
+ }
71
+ const value = JSON.parse(raw);
72
+ if (!value || Object.keys(value).sort().join(",") !== "choices,expiresAt,observedAt,scope,version" || value.version !== 1 || typeof value.scope !== "string" || !value.choices || Object.keys(value.choices).sort().join(",") !== [...MEASUREMENT_PURPOSES].sort().join(",") || !MEASUREMENT_PURPOSES.every((p) => ["granted", "denied", "withdrawn"].includes(value.choices[p])) || !Number.isFinite(Date.parse(value.observedAt)) || !Number.isFinite(Date.parse(value.expiresAt)) || Date.parse(value.observedAt) > now() || Date.parse(value.expiresAt) <= Date.parse(value.observedAt) || Date.parse(value.expiresAt) - Date.parse(value.observedAt) > days * dayMs) {
73
+ preference = null;
74
+ return;
75
+ }
76
+ preference = value;
77
+ } catch {
78
+ preference = null;
79
+ }
80
+ }
81
+ const adapter = {
82
+ requiredPurposes: MEASUREMENT_PURPOSES,
83
+ read(next) {
84
+ context = next;
85
+ if (!preference) load();
86
+ publish();
87
+ const selected = current();
88
+ return {
89
+ valid: selected !== null,
90
+ choices: selected ? { ...selected.choices } : unknownChoices(),
91
+ observedAt: selected?.observedAt ?? new Date(now()).toISOString(),
92
+ source: "user_preference"
93
+ };
94
+ },
95
+ subscribe(listener) {
96
+ adapterListeners.add(listener);
97
+ return () => {
98
+ adapterListeners.delete(listener);
99
+ };
100
+ }
101
+ };
102
+ return {
103
+ adapter,
104
+ getSnapshot: () => snapshot,
105
+ getServerSnapshot: () => initial,
106
+ subscribe(listener) {
107
+ viewListeners.add(listener);
108
+ return () => {
109
+ viewListeners.delete(listener);
110
+ };
111
+ },
112
+ save(analytics, advertising) {
113
+ const actualScope = scope();
114
+ if (!actualScope) return false;
115
+ const before = current()?.choices;
116
+ const choices = Object.fromEntries(MEASUREMENT_PURPOSES.map((purpose) => {
117
+ const granted = purpose === "analytics_storage" ? analytics : advertising;
118
+ return [purpose, granted ? "granted" : before?.[purpose] === "granted" ? "withdrawn" : "denied"];
119
+ }));
120
+ preference = {
121
+ version: 1,
122
+ scope: actualScope,
123
+ observedAt: new Date(now()).toISOString(),
124
+ expiresAt: new Date(now() + days * dayMs).toISOString(),
125
+ choices
126
+ };
127
+ try {
128
+ storage()?.setItem(storageKey, JSON.stringify(preference));
129
+ } catch {
130
+ }
131
+ publish();
132
+ for (const listener of adapterListeners) listener();
133
+ return true;
134
+ },
135
+ connect() {
136
+ const onStorage = (event) => {
137
+ if (event.key !== storageKey && event.key !== null) return;
138
+ load();
139
+ publish();
140
+ for (const listener of adapterListeners) listener();
141
+ };
142
+ if (typeof window !== "undefined") window.addEventListener("storage", onStorage);
143
+ return () => {
144
+ clearTimeout(timer);
145
+ if (typeof window !== "undefined") window.removeEventListener("storage", onStorage);
146
+ };
147
+ }
148
+ };
149
+ }
150
+ var buttonStyle = { border: "1px solid currentColor", borderRadius: 6, padding: "10px 14px", cursor: "pointer", minHeight: 44 };
151
+ function ResonanceConsentPreferences({ privacyUrl = "/privacy", maxAgeDays = 180 }) {
152
+ const [owner] = useState(() => createFirstPartyConsentAdapter({ maxAgeDays }));
153
+ const status = useSyncExternalStore(owner.subscribe, owner.getSnapshot, owner.getServerSnapshot);
154
+ const [active, setActive] = useState(false);
155
+ const [open, setOpen] = useState(false);
156
+ const [analytics, setAnalytics] = useState(false);
157
+ const [advertising, setAdvertising] = useState(false);
158
+ const dialog = useRef(null);
159
+ const launcher = useRef(null);
160
+ const titleId = useId();
161
+ const descriptionId = useId();
162
+ useEffect(() => {
163
+ if (getConsentAdapter()) return;
164
+ const unregister = registerResonanceConsentAdapter(owner.adapter);
165
+ const disconnect = owner.connect();
166
+ setActive(true);
167
+ return () => {
168
+ disconnect();
169
+ unregister();
170
+ };
171
+ }, [owner]);
172
+ useEffect(() => {
173
+ setAnalytics(status.analytics);
174
+ setAdvertising(status.advertising);
175
+ if (status.contextReady && !status.hasPreference) setOpen(true);
176
+ }, [status]);
177
+ useEffect(() => {
178
+ const element = dialog.current;
179
+ if (!element || !active) return;
180
+ if (open && !element.open) element.showModal();
181
+ else if (!open && element.open) element.close();
182
+ }, [active, open]);
183
+ function restoreFocus() {
184
+ if (launcher.current?.isConnected) launcher.current.focus({ preventScroll: true });
185
+ }
186
+ function close() {
187
+ dialog.current?.close();
188
+ setOpen(false);
189
+ restoreFocus();
190
+ }
191
+ function save(nextAnalytics, nextAdvertising) {
192
+ if (owner.save(nextAnalytics, nextAdvertising)) close();
193
+ }
194
+ if (!active) return null;
195
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
196
+ /* @__PURE__ */ jsx(
197
+ "button",
198
+ {
199
+ ref: launcher,
200
+ type: "button",
201
+ onClick: () => setOpen(true),
202
+ "aria-haspopup": "dialog",
203
+ style: {
204
+ ...buttonStyle,
205
+ position: "fixed",
206
+ bottom: "max(12px, env(safe-area-inset-bottom))",
207
+ left: 12,
208
+ zIndex: 1e3,
209
+ background: "#fff",
210
+ color: "#222",
211
+ font: "inherit"
212
+ },
213
+ children: "Privacy choices"
214
+ }
215
+ ),
216
+ /* @__PURE__ */ jsxs(
217
+ "dialog",
218
+ {
219
+ ref: dialog,
220
+ "aria-labelledby": titleId,
221
+ "aria-describedby": descriptionId,
222
+ onCancel: (event) => {
223
+ event.preventDefault();
224
+ close();
225
+ },
226
+ onClose: (event) => {
227
+ if (event.currentTarget.open) return;
228
+ setOpen(false);
229
+ restoreFocus();
230
+ },
231
+ style: {
232
+ maxWidth: 460,
233
+ width: "calc(100% - 32px)",
234
+ maxHeight: "calc(100dvh - 32px)",
235
+ overflowY: "auto",
236
+ margin: "auto",
237
+ padding: 24,
238
+ border: "1px solid #777",
239
+ borderRadius: 10,
240
+ background: "#fff",
241
+ color: "#222",
242
+ font: "16px/1.5 system-ui, sans-serif"
243
+ },
244
+ children: [
245
+ /* @__PURE__ */ jsx("h2", { id: titleId, style: { fontSize: 22, margin: "0 0 12px" }, children: "Your privacy choices" }),
246
+ /* @__PURE__ */ jsx("p", { id: descriptionId, children: "Choose whether this site may measure visits and use advertising services. You can change your choices here at any time." }),
247
+ !status.contextReady && /* @__PURE__ */ jsx("p", { role: "status", children: "Optional measurement settings are unavailable right now. Advertising stays off while settings load." }),
248
+ /* @__PURE__ */ jsxs("fieldset", { disabled: !status.contextReady, style: { border: 0, margin: "16px 0", padding: 0 }, children: [
249
+ /* @__PURE__ */ jsx("legend", { style: { fontWeight: 600 }, children: "Optional purposes" }),
250
+ /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "start", gap: 10, padding: "12px 0", minHeight: 44 }, children: [
251
+ /* @__PURE__ */ jsx("input", { type: "checkbox", checked: analytics, onChange: (event) => setAnalytics(event.target.checked) }),
252
+ /* @__PURE__ */ jsxs("span", { children: [
253
+ "Visit measurement",
254
+ /* @__PURE__ */ jsx("br", {}),
255
+ /* @__PURE__ */ jsx("small", { children: "Help this site understand page views and interactions." })
256
+ ] })
257
+ ] }),
258
+ /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "start", gap: 10, padding: "12px 0", minHeight: 44 }, children: [
259
+ /* @__PURE__ */ jsx("input", { type: "checkbox", checked: advertising, onChange: (event) => setAdvertising(event.target.checked) }),
260
+ /* @__PURE__ */ jsxs("span", { children: [
261
+ "Advertising",
262
+ /* @__PURE__ */ jsx("br", {}),
263
+ /* @__PURE__ */ jsx("small", { children: "Allow advertising storage, matching and personalization for this site." })
264
+ ] })
265
+ ] })
266
+ ] }),
267
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexWrap: "wrap", gap: 10 }, children: [
268
+ /* @__PURE__ */ jsx("button", { type: "button", style: buttonStyle, disabled: !status.contextReady, onClick: () => save(analytics, advertising), children: "Save choices" }),
269
+ /* @__PURE__ */ jsx("button", { type: "button", style: buttonStyle, disabled: !status.contextReady, onClick: () => save(false, false), children: "Decline optional" }),
270
+ /* @__PURE__ */ jsx("button", { type: "button", style: buttonStyle, onClick: close, children: "Close" })
271
+ ] }),
272
+ /* @__PURE__ */ jsx("p", { style: { marginBottom: 0 }, children: /* @__PURE__ */ jsx("a", { href: privacyUrl, children: "Read our privacy policy" }) })
273
+ ]
274
+ }
275
+ )
276
+ ] });
277
+ }
278
+
279
+ export { ResonanceConsentPreferences };
@@ -1,7 +1,7 @@
1
- import { createSeoRevalidationHandler } from '../chunk-RUV6DCKL.js';
1
+ import { createSeoRevalidationHandler } from '../chunk-5LCY7QKK.js';
2
2
  import '../chunk-XTRZGXB2.js';
3
3
  export { SITE_CACHE_TAGS, SITE_REVALIDATE_PATH, isSiteRevalidatePong } from '../chunk-HY7ZEU2C.js';
4
- import '../chunk-D4R3FQED.js';
4
+ import '../chunk-CNQMSQYQ.js';
5
5
  import '../chunk-PKBMQBKP.js';
6
6
 
7
7
  // src/revalidate/index.ts
@@ -1,7 +1,7 @@
1
1
  import '../chunk-B7T2SFUF.js';
2
2
  export { readAnalyticsIdentity } from '../chunk-PVY7X5UR.js';
3
3
  import '../chunk-5IVD6G77.js';
4
- export { sonorFetch } from '../chunk-Z4XJOVQX.js';
4
+ export { sonorFetch } from '../chunk-7OTHRX45.js';
5
5
  export { DEFAULT_SONOR_API_URL, getClientApiConfig, readPublishedApiConfig } from '../chunk-W7OPEMGJ.js';
6
6
  import '../chunk-FRY6PBT6.js';
7
7
  import '../chunk-PKBMQBKP.js';