@sonordev/site-kit 8.8.1 → 8.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +9 -0
- package/agent-manifest.json +49 -42
- package/dist/AnalyticsProvider-X7JJN3QL.js +19 -0
- package/dist/{ArticleViewTracker-PV2RD3P6.js → ArticleViewTracker-7Q6AMCKX.js} +11 -10
- package/dist/{BlocksPopup-NEEFV2L3.js → BlocksPopup-U5VIYEBA.js} +4 -5
- package/dist/ChatWidget-EAATOFCT.js +30 -0
- package/dist/{FileField-MJ3RCNFJ.js → FileField-YWMSK7RF.js} +1 -3
- package/dist/{FormSpotlight-NQPQFZS7.js → FormSpotlight-MAXDW3TK.js} +1 -1
- package/dist/{FormStage-4T5PJR5K.js → FormStage-VAHRVOIZ.js} +1 -1
- package/dist/ManagedForm-7IZT7ZII.js +29 -0
- package/dist/{ManagedNewsletterForm-TUYGN6O3.js → ManagedNewsletterForm-VVXZSEAL.js} +21 -11
- package/dist/{SignalCore-OW3YIH6M.js → SignalCore-HAN4O7QG.js} +90 -36
- package/dist/{SiteChat-XMKHBSEK.js → SiteChat-3JLCEL2N.js} +2 -2
- package/dist/{SiteDesignReporter-BRH7ORQS.js → SiteDesignReporter-6CCO645E.js} +5 -6
- package/dist/SitePopups-ZGHQNGGH.js +19 -0
- package/dist/SitemapSync-5LSYCBKS.js +7 -0
- package/dist/SitemapSync.d.ts +1 -1
- package/dist/_client/booking-widget.d.ts +1 -1
- package/dist/_client/booking-widget.js +6 -7
- package/dist/_client/reviewed-signal-experiment.d.ts +9 -0
- package/dist/_client/reviewed-signal-experiment.js +89 -0
- package/dist/_client/testimonial-section.d.ts +1 -1
- package/dist/admin-auth/index.d.ts +3 -3
- package/dist/affiliates/AffiliatesWidget.d.ts +1 -1
- package/dist/affiliates/api.d.ts +1 -1
- package/dist/affiliates/index.d.ts +6 -6
- package/dist/affiliates/index.js +1 -3
- package/dist/affiliates/useAffiliates.d.ts +1 -1
- package/dist/analytics/AnalyticsProvider.d.ts +1 -1
- package/dist/analytics/dispatch.d.ts +1 -1
- package/dist/analytics/index.d.ts +6 -6
- package/dist/analytics/index.js +22 -12
- package/dist/analytics/publication-cta.d.ts +1 -1
- package/dist/analytics/send-gate.d.ts +8 -4
- package/dist/articles/Article.d.ts +1 -1
- package/dist/articles/ArticleFAQ.d.ts +1 -1
- package/dist/articles/ArticleFaqSection.d.ts +1 -1
- package/dist/articles/ArticleList.d.ts +1 -1
- package/dist/articles/ArticleViewTracker.d.ts +1 -1
- package/dist/articles/AuthorCard.d.ts +1 -1
- package/dist/articles/AuthorPage.d.ts +1 -1
- package/dist/articles/ClusterLandingPage.d.ts +1 -1
- package/dist/articles/ClusterNavigation.d.ts +1 -1
- package/dist/articles/ManagedNewsletterForm.d.ts +2 -2
- package/dist/articles/NewsletterShell.d.ts +1 -1
- package/dist/articles/NewsletterWidget.d.ts +1 -1
- package/dist/articles/PublicationLayout.d.ts +1 -1
- package/dist/articles/PublicationSidebar.d.ts +1 -1
- package/dist/articles/RelatedPosts.d.ts +1 -1
- package/dist/articles/ServiceCallout.d.ts +1 -1
- package/dist/articles/TableOfContents.d.ts +1 -1
- package/dist/articles/article-photos.d.ts +1 -1
- package/dist/articles/article-styles.d.ts +1 -1
- package/dist/articles/article-tables.d.ts +1 -1
- package/dist/articles/artwork.d.ts +1 -1
- package/dist/articles/author-schema.d.ts +1 -1
- package/dist/articles/author-social.d.ts +1 -1
- package/dist/articles/excerpt.d.ts +1 -1
- package/dist/articles/index.d.ts +1 -1
- package/dist/articles/index.js +3 -3
- package/dist/articles/news-sitemap.d.ts +1 -1
- package/dist/articles/processArticleHtml.d.ts +1 -1
- package/dist/articles/public-reads.d.ts +1 -1
- package/dist/articles/reading-time.d.ts +1 -1
- package/dist/articles/routes.d.ts +1 -1
- package/dist/articles/server-core.d.ts +1 -1
- package/dist/articles/server-ui.d.ts +1 -1
- package/dist/articles/server-ui.js +6 -6
- package/dist/articles/server.d.ts +1 -1
- package/dist/articles/server.js +5 -5
- package/dist/articles/types.d.ts +1 -1
- package/dist/articles/widget-styles.d.ts +1 -1
- package/dist/brand/extract-brand-profile.d.ts +1 -1
- package/dist/chat/ChatWidget.d.ts +1 -1
- package/dist/chat/EchoUiActions.d.ts +1 -1
- package/dist/chat/SiteChat.d.ts +2 -2
- package/dist/chat/chat-messages.d.ts +1 -1
- package/dist/chat/index.d.ts +7 -7
- package/dist/chat/index.js +17 -9
- package/dist/chat/launcher-placement.d.ts +1 -1
- package/dist/{chunk-OPUY4RS6.js → chunk-2LBKIE2K.js} +2 -1
- package/dist/{chunk-XIDWNXZN.js → chunk-3W3MN6Z7.js} +2 -2
- package/dist/{chunk-UPFU63L4.js → chunk-55GFMOI6.js} +1 -1
- package/dist/chunk-5IVD6G77.js +37 -0
- package/dist/{chunk-URLTBVRX.js → chunk-6EDE7BOE.js} +3 -3
- package/dist/{chunk-DYROJGI2.js → chunk-6NLVHTYY.js} +1 -1
- package/dist/{chunk-ZQSCMYZO.js → chunk-7643MCD2.js} +6 -3
- package/dist/chunk-7IZUUXXO.js +1 -0
- package/dist/{chunk-C7TLGL3R.js → chunk-7VMA3KCN.js} +30 -4
- package/dist/{chunk-OWZWRP7Y.js → chunk-ADQ3VCKK.js} +2 -2
- package/dist/chunk-AG2RDHYZ.js +45 -0
- package/dist/chunk-AWLPFFPO.js +36 -0
- package/dist/{chunk-LNSNA3W4.js → chunk-C4XK472G.js} +4 -3
- package/dist/{chunk-TP32MRXV.js → chunk-CJ43K7RA.js} +2 -2
- package/dist/chunk-D4M5K6JN.js +25 -0
- package/dist/{chunk-F6WLHVMQ.js → chunk-DXE6SXWW.js} +1 -1
- package/dist/{chunk-YEX5RAEU.js → chunk-EBEM5BI5.js} +38 -27
- package/dist/chunk-F3RKFGRW.js +2 -0
- package/dist/chunk-FAY6MOLL.js +62 -0
- package/dist/chunk-FRY6PBT6.js +31 -0
- package/dist/{chunk-JYITKUUB.js → chunk-G5WUX7VE.js} +1 -1
- package/dist/chunk-HJD6KXKH.js +147 -0
- package/dist/{chunk-6BFQI3ZE.js → chunk-IO6BWRZ5.js} +2 -2
- package/dist/{chunk-THXELZTQ.js → chunk-ISMHDUBW.js} +1 -1
- package/dist/{chunk-SLFYTELD.js → chunk-J4LJE4NB.js} +1 -1
- package/dist/chunk-JT7GHHMV.js +56 -0
- package/dist/{chunk-NFGAXWCN.js → chunk-KGIQYVQ2.js} +31 -13
- package/dist/chunk-KMNHNCVG.js +20 -0
- package/dist/chunk-KQKUXIUD.js +25 -0
- package/dist/{chunk-M5JIHQ42.js → chunk-L3S5WH4C.js} +2 -2
- package/dist/chunk-MDBXGN6W.js +13 -0
- package/dist/chunk-MOACHHOJ.js +20 -0
- package/dist/{chunk-6DXQHNZK.js → chunk-MP35JETP.js} +1 -1
- package/dist/chunk-NHDRA4Y5.js +6 -0
- package/dist/{chunk-AYQEIMGS.js → chunk-NZHECYLF.js} +103 -22
- package/dist/{chunk-EATJPSTS.js → chunk-O5LQUBBN.js} +1 -1
- package/dist/{chunk-Y6SHFILE.js → chunk-OEOSR5EG.js} +1 -1
- package/dist/{chunk-GQN4BGK6.js → chunk-OUD4RTBD.js} +1 -1
- package/dist/chunk-PMXQPO5Q.js +78 -0
- package/dist/chunk-PVY7X5UR.js +21 -0
- package/dist/{chunk-KG5IEV7I.js → chunk-QLJ2SC3T.js} +1 -1
- package/dist/{chunk-2WM4TNDF.js → chunk-QXAJPB6O.js} +1 -1
- package/dist/{chunk-2WDWQI7K.js → chunk-RYR6N4X4.js} +1 -1
- package/dist/{chunk-G7BRCSV6.js → chunk-S33CUULL.js} +3 -3
- package/dist/{chunk-YRQS7VAH.js → chunk-S63QY5XW.js} +2 -2
- package/dist/{chunk-GXWM5KNS.js → chunk-SO6RSRUP.js} +40 -45
- package/dist/{chunk-ODOV76VW.js → chunk-STIVFCWM.js} +1 -1
- package/dist/{chunk-SVHPILS3.js → chunk-T4A5J6SJ.js} +1 -1
- package/dist/chunk-TPHOIE4I.js +73 -0
- package/dist/{chunk-IWNJCRXW.js → chunk-UG53ZW7S.js} +125 -118
- package/dist/chunk-VXCUXHZO.js +9 -0
- package/dist/{chunk-SBPUFTMP.js → chunk-WHFWDK2H.js} +2 -2
- package/dist/chunk-WYNDBJG7.js +66 -0
- package/dist/{chunk-HN7GVGWC.js → chunk-XDH5B3PR.js} +3 -3
- package/dist/{chunk-PAYCK7FC.js → chunk-XJZLXUTG.js} +1 -1
- package/dist/{chunk-IDC5CVBR.js → chunk-YVEYO3OD.js} +1 -1
- package/dist/{chunk-PSS6M4CG.js → chunk-ZRSXCT4O.js} +2 -2
- package/dist/client/index.d.ts +8 -8
- package/dist/client/index.js +9 -8
- package/dist/config/index.d.ts +1 -1
- package/dist/contracts/broadcast-layouts.d.ts +8 -0
- package/dist/contracts/crm-disposition.d.ts +87 -0
- package/dist/contracts/decision-roles.d.ts +39 -0
- package/dist/contracts/entries.d.ts +1 -1
- package/dist/contracts/funnels.d.ts +85 -2
- package/dist/contracts/portfolio.d.ts +1 -1
- package/dist/contracts/publication-branding.d.ts +3 -3
- package/dist/contracts/resonance-constants.d.ts +4 -0
- package/dist/contracts/resonance.d.ts +8461 -0
- package/dist/contracts/signal-experiments.d.ts +219 -0
- package/dist/contracts/site-edit.d.ts +2 -2
- package/dist/contracts/sites.d.ts +1 -1
- package/dist/contracts/slots.d.ts +2 -2
- package/dist/contracts/wire-schema.d.ts +36 -0
- package/dist/cta-bar/CtaBar.d.ts +1 -1
- package/dist/cta-bar/client.js +3 -2
- package/dist/cta-bar/index.d.ts +4 -4
- package/dist/cta-bar/index.js +4 -3
- package/dist/fleet/FleetHeartbeat.d.ts +2 -2
- package/dist/fleet/contract.d.ts +1 -1
- package/dist/fleet/heartbeat.d.ts +2 -2
- package/dist/fleet/index.d.ts +6 -6
- package/dist/fleet/index.js +4 -5
- package/dist/forms/FileField.d.ts +1 -1
- package/dist/forms/FormClient.d.ts +2 -2
- package/dist/forms/FormEnhancer.d.ts +1 -1
- package/dist/forms/FormField.d.ts +1 -1
- package/dist/forms/FormSpotlight.d.ts +1 -1
- package/dist/forms/FormStage.d.ts +1 -1
- package/dist/forms/ManagedForm.d.ts +1 -1
- package/dist/forms/PrivateFileField.d.ts +1 -1
- package/dist/forms/ServerForm.d.ts +3 -3
- package/dist/forms/StaticForm.d.ts +1 -1
- package/dist/forms/contract.d.ts +1 -1
- package/dist/forms/experience-plan.d.ts +1 -1
- package/dist/forms/field-autocomplete.d.ts +1 -1
- package/dist/forms/field-controls.d.ts +1 -1
- package/dist/forms/field-rules.d.ts +1 -1
- package/dist/forms/form-dom-values.d.ts +1 -1
- package/dist/forms/index.d.ts +18 -18
- package/dist/forms/index.js +21 -11
- package/dist/forms/normalize-config.d.ts +1 -1
- package/dist/forms/server.d.ts +4 -4
- package/dist/forms/server.js +3 -3
- package/dist/forms/static.d.ts +2 -2
- package/dist/forms/submitForm.d.ts +2 -2
- package/dist/forms/tracking-session.d.ts +1 -1
- package/dist/forms/useForm.d.ts +2 -2
- package/dist/forms/webmcp.d.ts +2 -2
- package/dist/images/api.d.ts +1 -1
- package/dist/images/index.d.ts +6 -6
- package/dist/images/index.js +2 -4
- package/dist/images/server.d.ts +2 -2
- package/dist/index.d.ts +13 -13
- package/dist/index.js +1 -1
- package/dist/landing/contract.d.ts +1 -1
- package/dist/landing/contract.js +2 -1
- package/dist/landing/index.d.ts +3 -3
- package/dist/landing/index.js +3 -2
- package/dist/landing/managed-server.d.ts +2 -2
- package/dist/landing/managed.d.ts +10 -2
- package/dist/landing/server.d.ts +7 -7
- package/dist/landing/server.js +11 -6
- package/dist/layout/AiDiscoveryLinks.d.ts +1 -1
- package/dist/layout/SiteKitClientProviders.d.ts +1 -1
- package/dist/layout/SiteKitLayout.d.ts +2 -2
- package/dist/layout/client.d.ts +1 -1
- package/dist/layout/client.js +15 -11
- package/dist/layout/index.d.ts +5 -5
- package/dist/layout/index.js +17 -13
- package/dist/layout/types.d.ts +2 -2
- package/dist/llms/AEOComponents.d.ts +1 -1
- package/dist/llms/SpeakableSchema.d.ts +1 -1
- package/dist/llms/api.d.ts +1 -1
- package/dist/llms/client.d.ts +3 -3
- package/dist/llms/contract.d.ts +1 -1
- package/dist/llms/generateLLMsTxt.d.ts +1 -1
- package/dist/llms/handlers.d.ts +1 -1
- package/dist/llms/index.d.ts +21 -21
- package/dist/llms/index.js +5 -5
- package/dist/llms/merge.d.ts +1 -1
- package/dist/llms/sourcedFacts.d.ts +1 -1
- package/dist/llms/types.d.ts +5 -5
- package/dist/llms/writeLLMsTxt.d.ts +3 -3
- package/dist/maps/GoogleMap.d.ts +1 -1
- package/dist/maps/NeighborhoodMap.d.ts +1 -1
- package/dist/maps/api.d.ts +1 -1
- package/dist/maps/index.d.ts +5 -5
- package/dist/maps/index.js +1 -3
- package/dist/mcp/WebMcpTools.d.ts +1 -1
- package/dist/mcp/client.d.ts +2 -2
- package/dist/mcp/discovery.d.ts +2 -2
- package/dist/mcp/handlers.d.ts +4 -4
- package/dist/mcp/index.d.ts +12 -12
- package/dist/mcp/protocol.d.ts +1 -1
- package/dist/mcp/report.d.ts +1 -1
- package/dist/mcp/serverCard.d.ts +1 -1
- package/dist/mcp/sonor.d.ts +5 -5
- package/dist/mcp/sonor.js +10 -10
- package/dist/mcp/transport.d.ts +1 -1
- package/dist/motion/Parallax.d.ts +1 -1
- package/dist/motion/ScrollScene.d.ts +1 -1
- package/dist/motion/gsap.d.ts +2 -2
- package/dist/motion/index.d.ts +9 -9
- package/dist/motion/three.d.ts +1 -1
- package/dist/og/index.d.ts +5 -5
- package/dist/og/pages.d.ts +1 -1
- package/dist/og/route-fit.d.ts +17 -0
- package/dist/og/template.d.ts +1 -1
- package/dist/portfolio/contract.d.ts +1 -1
- package/dist/press-kit/articles/Article.d.ts +2 -2
- package/dist/press-kit/articles/ArticleFaqSection.d.ts +1 -1
- package/dist/press-kit/articles/ArticleList.d.ts +2 -2
- package/dist/press-kit/articles/AuthorCard.d.ts +1 -1
- package/dist/press-kit/articles/AuthorPage.d.ts +1 -1
- package/dist/press-kit/articles/ClusterLandingPage.d.ts +2 -2
- package/dist/press-kit/articles/ClusterNavigation.d.ts +2 -2
- package/dist/press-kit/articles/ManagedNewsletterForm.d.ts +2 -2
- package/dist/press-kit/articles/PublicationLayout.d.ts +2 -2
- package/dist/press-kit/articles/PublicationSidebar.d.ts +1 -1
- package/dist/press-kit/articles/RelatedPosts.d.ts +2 -2
- package/dist/press-kit/articles/TableOfContents.d.ts +1 -1
- package/dist/press-kit/articles/article-body.d.ts +1 -1
- package/dist/press-kit/articles/article-headings.d.ts +1 -1
- package/dist/press-kit/articles/article-photos.d.ts +1 -1
- package/dist/press-kit/articles/artwork.d.ts +2 -2
- package/dist/press-kit/articles/author-schema.d.ts +2 -2
- package/dist/press-kit/articles/author-social.d.ts +1 -1
- package/dist/press-kit/articles/index.d.ts +23 -23
- package/dist/press-kit/articles/news-sitemap.d.ts +2 -2
- package/dist/press-kit/articles/public-reads.d.ts +1 -1
- package/dist/press-kit/articles/publication-reads.d.ts +2 -2
- package/dist/press-kit/articles/reading-time.d.ts +1 -1
- package/dist/press-kit/articles/server-core.d.ts +20 -20
- package/dist/press-kit/articles/server-ui.d.ts +20 -20
- package/dist/press-kit/articles/types.d.ts +1 -1
- package/dist/proxy/index.d.ts +5 -5
- package/dist/proxy/index.js +1 -1
- package/dist/reputation/TestimonialSection.d.ts +1 -1
- package/dist/reputation/VisualReviewCard.d.ts +1 -1
- package/dist/reputation/api.d.ts +1 -1
- package/dist/reputation/index.d.ts +4 -4
- package/dist/reputation/server.d.ts +3 -3
- package/dist/resonance/ResonanceRuntime.d.ts +7 -0
- package/dist/resonance/bridge.d.ts +16 -0
- package/dist/resonance/consent-adapter.d.ts +26 -0
- package/dist/resonance/controller-registry.d.ts +14 -0
- package/dist/resonance/controller.d.ts +103 -0
- package/dist/resonance/form-context.d.ts +5 -0
- package/dist/resonance/index.d.ts +4 -0
- package/dist/resonance/index.js +9 -0
- package/dist/resonance/meta-pixel.d.ts +67 -0
- package/dist/resonance/providers.d.ts +32 -0
- package/dist/resonance/runtime-core.d.ts +5 -0
- package/dist/revalidate/index.d.ts +3 -3
- package/dist/revalidate/index.js +2 -2
- package/dist/robots/index.d.ts +3 -3
- package/dist/robots/indexnow.js +2 -2
- package/dist/runtime/index.d.ts +7 -7
- package/dist/runtime/index.js +4 -5
- package/dist/runtime-core-WT7KKLWQ.js +2213 -0
- package/dist/seo/ManagedFAQ.d.ts +1 -1
- package/dist/seo/ManagedInternalLinks.d.ts +1 -1
- package/dist/seo/ManagedSchema.d.ts +1 -1
- package/dist/seo/ManagedScripts.d.ts +1 -1
- package/dist/seo/client.d.ts +1 -1
- package/dist/seo/client.js +3 -5
- package/dist/seo/entry-indexnow.d.ts +1 -1
- package/dist/seo/entry-llms-client.d.ts +1 -1
- package/dist/seo/entry-llms-contract.d.ts +1 -1
- package/dist/seo/entry-llms.d.ts +1 -1
- package/dist/seo/entry-meta-contract.d.ts +1 -1
- package/dist/seo/entry-og-route.d.ts +1 -1
- package/dist/seo/entry-og.d.ts +1 -1
- package/dist/seo/entry-pages-contract.d.ts +1 -1
- package/dist/seo/entry-redirects.d.ts +1 -1
- package/dist/seo/entry-robots.d.ts +1 -1
- package/dist/seo/entry-sitemap.d.ts +1 -1
- package/dist/seo/getManagedMetadata.d.ts +1 -1
- package/dist/seo/index.d.ts +12 -12
- package/dist/seo/index.js +9 -11
- package/dist/seo/indexnow.d.ts +1 -1
- package/dist/seo/indexnow.js +2 -2
- package/dist/seo/llms/client.d.ts +1 -1
- package/dist/seo/llms/contract.d.ts +1 -1
- package/dist/seo/llms.d.ts +1 -1
- package/dist/seo/llms.js +5 -5
- package/dist/seo/meta/contract.d.ts +1 -1
- package/dist/seo/og.d.ts +1 -1
- package/dist/seo/pages/contract.d.ts +1 -1
- package/dist/seo/redirects.d.ts +1 -1
- package/dist/seo/register-sitemap-cli-impl.d.ts +1 -1
- package/dist/seo/register-sitemap-cli.js +1 -1
- package/dist/seo/robots.d.ts +1 -1
- package/dist/seo/routing.d.ts +1 -1
- package/dist/seo/server.d.ts +4 -4
- package/dist/seo/server.js +3 -3
- package/dist/seo/sitemap.d.ts +1 -1
- package/dist/seo/sitemap.js +3 -3
- package/dist/seo/types.d.ts +1 -1
- package/dist/seo-meta/contract.d.ts +1 -1
- package/dist/seo-pages/contract.d.ts +1 -1
- package/dist/server/index.d.ts +5 -5
- package/dist/server/index.js +3 -3
- package/dist/server/mint-site-token.d.ts +1 -1
- package/dist/server/server-fetch.d.ts +8 -0
- package/dist/{server-api-XIKDWSNO.js → server-api-A34TABT2.js} +2 -2
- package/dist/shared/build-entries.d.ts +3 -1
- package/dist/shared/color.d.ts +1 -1
- package/dist/shared/fetchWithRetry.d.ts +6 -0
- package/dist/shared/frame.d.ts +1 -1
- package/dist/shared/identity-storage.d.ts +6 -4
- package/dist/shared/identity.d.ts +1 -3
- package/dist/shared/index.d.ts +5 -5
- package/dist/shared/index.js +1 -1
- package/dist/shared/measurement-analytics.d.ts +1 -0
- package/dist/shared/measurement-policy.d.ts +6 -0
- package/dist/shared/measurement-proof.d.ts +5 -0
- package/dist/shared/measurement-store.d.ts +34 -0
- package/dist/shared/measurement-writer.d.ts +6 -0
- package/dist/shared/publishCredential.d.ts +1 -1
- package/dist/shared/reporting-gate.d.ts +3 -1
- package/dist/shared/site-token-claims.d.ts +18 -0
- package/dist/shared/site-token-configuration.d.ts +9 -0
- package/dist/shared/site-token-refresh.d.ts +7 -0
- package/dist/shared/site-token-state.d.ts +23 -0
- package/dist/shared/siteToken.d.ts +5 -39
- package/dist/shared/sonor-auth-state.d.ts +3 -0
- package/dist/shared/sonor-beacon.d.ts +13 -0
- package/dist/shared/sonor-fetch-runtime.d.ts +2 -0
- package/dist/shared/sonor-fetch.d.ts +7 -0
- package/dist/shared/sonorFetch.d.ts +4 -49
- package/dist/shared/version.d.ts +1 -1
- package/dist/signal/ReviewedSignalExperiment.d.ts +9 -0
- package/dist/signal/SignalBridge.d.ts +4 -4
- package/dist/signal/SignalCore.d.ts +2 -1
- package/dist/signal/SignalExperiment.d.ts +13 -5
- package/dist/signal/index.d.ts +3 -3
- package/dist/signal/index.js +4 -73
- package/dist/signal/store.d.ts +10 -7
- package/dist/signal/types.d.ts +4 -0
- package/dist/sitemap/index.d.ts +5 -5
- package/dist/sitemap/index.js +3 -3
- package/dist/sites/contract.d.ts +1 -1
- package/dist/sites/normalize.d.ts +1 -1
- package/dist/slots/ManagedLink.d.ts +2 -2
- package/dist/slots/ManagedList.d.ts +2 -2
- package/dist/slots/ManagedRichText.d.ts +1 -1
- package/dist/slots/ManagedSlot.d.ts +1 -1
- package/dist/slots/contract.d.ts +1 -1
- package/dist/slots/edit/locate.d.ts +1 -1
- package/dist/slots/index.d.ts +14 -14
- package/dist/slots/index.js +2 -2
- package/dist/slots/server-api.d.ts +1 -1
- package/dist/{chunk-FLOJUMFR.js → sonor-fetch-runtime-3PFGUXMF.js} +27 -36
- package/dist/sync/AddToCalendar.d.ts +1 -1
- package/dist/sync/BookingWidget.d.ts +1 -1
- package/dist/sync/MeetingFormatStep.d.ts +1 -1
- package/dist/sync/api.d.ts +2 -2
- package/dist/sync/booking-flow.d.ts +1 -1
- package/dist/sync/index.d.ts +3 -3
- package/dist/sync/index.js +6 -7
- package/dist/types.d.ts +6 -6
- package/dist/website/BlocksPopup.d.ts +1 -1
- package/dist/website/PopupBlocks.d.ts +1 -1
- package/dist/website/SiteDesignReporter.d.ts +2 -2
- package/dist/website/SitePopups.d.ts +1 -1
- package/dist/website/contract.d.ts +1 -1
- package/dist/website/cta-bar.d.ts +1 -1
- package/dist/website/cta-bar.js +4 -3
- package/dist/website/design.d.ts +2 -2
- package/dist/website/images/server.d.ts +1 -1
- package/dist/website/images-server.d.ts +1 -1
- package/dist/website/images.d.ts +1 -1
- package/dist/website/images.js +2 -4
- package/dist/website/index.d.ts +4 -4
- package/dist/website/index.js +5 -6
- package/dist/website/landing/server.d.ts +1 -1
- package/dist/website/landing/server.js +11 -6
- package/dist/website/landing-server.d.ts +1 -1
- package/dist/website/landing.d.ts +1 -1
- package/dist/website/landing.js +3 -2
- package/dist/website/popup-rules.d.ts +2 -2
- package/dist/website/popup-types.d.ts +1 -1
- package/dist/website/popups.d.ts +4 -4
- package/dist/website/popups.js +14 -8
- package/dist/website/slots/contract.d.ts +1 -1
- package/dist/website/slots-contract.d.ts +1 -1
- package/dist/website/slots.d.ts +2 -2
- package/dist/website/slots.js +2 -2
- package/dist/{writeLLMsTxt-4HHUAOA6.js → writeLLMsTxt-JUACXQKP.js} +2 -2
- package/docs.json +5 -0
- package/package.json +8 -2
- package/src/analytics/README.md +21 -0
- package/src/cta-bar/README.md +4 -0
- package/src/forms/README.md +29 -0
- package/src/landing/README.md +14 -0
- package/src/layout/README.md +3 -0
- package/src/resonance/README.md +273 -0
- package/src/runtime/README.md +6 -1
- package/src/signal/README.md +21 -0
- package/src/website/README.md +14 -2
- package/dist/AnalyticsProvider-7SBJ27SI.js +0 -13
- package/dist/ChatWidget-V46UBDOM.js +0 -20
- package/dist/ManagedForm-DDDVMKLJ.js +0 -19
- package/dist/SitePopups-VU2C3Z6B.js +0 -13
- package/dist/SitemapSync-C4H3HF3L.js +0 -9
- package/dist/chunk-5ROTTMBL.js +0 -19
- package/dist/chunk-5TM3WPCI.js +0 -7
- package/dist/chunk-7HW4TZB5.js +0 -148
- package/dist/chunk-IPQKQEWI.js +0 -52
- package/dist/chunk-LCDVPAMR.js +0 -24
- package/dist/chunk-LQJC5S2M.js +0 -236
- package/dist/chunk-SHAUX2MQ.js +0 -163
- /package/dist/{chunk-3MJNBOUO.js → chunk-2QPVU63T.js} +0 -0
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { readAgentSubmit, formToolAttributes } from './chunk-Q6E4OPGG.js';
|
|
3
|
-
import {
|
|
3
|
+
import { currentResonanceFormContext } from './chunk-MDBXGN6W.js';
|
|
4
|
+
import { readAnalyticsIdentity } from './chunk-PVY7X5UR.js';
|
|
4
5
|
import { isFieldVisible, validateField, isFieldComplete, unseenControlValues } from './chunk-C2FZBUSS.js';
|
|
5
6
|
import { normalizeFormConfig, DEFAULT_FORM_SUCCESS_MESSAGE } from './chunk-TYSIAWC3.js';
|
|
6
7
|
import { DEFAULT_HONEYPOT_FIELD } from './chunk-NJCTQH2P.js';
|
|
7
8
|
import { onPageLeave } from './chunk-L2V5PUFN.js';
|
|
9
|
+
import { resolveAnalyticsTarget, analyticsSend, analyticsBeacon } from './chunk-PMXQPO5Q.js';
|
|
10
|
+
import { RESONANCE_SUBJECT_HEADER } from './chunk-NHDRA4Y5.js';
|
|
8
11
|
import { uuid } from './chunk-GJWI74ZZ.js';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
+
import { sameSite } from './chunk-NZOJHERI.js';
|
|
13
|
+
import { sonorFetch } from './chunk-VXCUXHZO.js';
|
|
14
|
+
import { readPublishedApiConfig, getClientApiConfig, readPublishedSite } from './chunk-W7OPEMGJ.js';
|
|
15
|
+
import { normalizeSiteHost } from './chunk-A4CC4ZG3.js';
|
|
16
|
+
import { subscribeMeasurementPolicy, measurementPolicySnapshot, serverMeasurementPolicySnapshot, analyticsPurposePermitted } from './chunk-FRY6PBT6.js';
|
|
17
|
+
import { useSyncExternalStore, useCallback, useRef, useEffect, useState, useMemo } from 'react';
|
|
12
18
|
|
|
13
19
|
// src/forms/field-interactions.ts
|
|
14
20
|
var MAX_TRACKED_FIELDS = 100;
|
|
@@ -171,6 +177,9 @@ function useFormTracking({
|
|
|
171
177
|
debug = false,
|
|
172
178
|
isFieldComplete: isFieldComplete2
|
|
173
179
|
}) {
|
|
180
|
+
const policy = useSyncExternalStore(subscribeMeasurementPolicy, measurementPolicySnapshot, serverMeasurementPolicySnapshot);
|
|
181
|
+
const epoch = policy.collectionEpoch;
|
|
182
|
+
const permitted = useCallback(() => measurementPolicySnapshot().collectionEpoch === epoch && !!resolveAnalyticsTarget(), [epoch]);
|
|
174
183
|
const sessionRef = useRef(null);
|
|
175
184
|
const sessionIdRef = useRef("");
|
|
176
185
|
const startTimeRef = useRef(0);
|
|
@@ -186,11 +195,17 @@ function useFormTracking({
|
|
|
186
195
|
return session.fields.snapshot((slug) => check ? check(slug) : false, now);
|
|
187
196
|
}, []);
|
|
188
197
|
useEffect(() => {
|
|
189
|
-
if (!enabled) return;
|
|
198
|
+
if (!enabled || !permitted()) return;
|
|
190
199
|
if (!formId) {
|
|
191
200
|
if (debug) console.warn("[Forms] Tracking skipped: formId is empty");
|
|
192
201
|
return;
|
|
193
202
|
}
|
|
203
|
+
const registryKey = `${formId}:${measurementPolicySnapshot().identityScope ?? "legacy"}:${policy.analyticsChoiceEpoch}`;
|
|
204
|
+
analyticsIdRef.current = null;
|
|
205
|
+
sessionIdRef.current = "";
|
|
206
|
+
stepTimesRef.current = {};
|
|
207
|
+
currentStepRef.current = 1;
|
|
208
|
+
maxStepRef.current = 1;
|
|
194
209
|
const startTracking = async (sessionId) => {
|
|
195
210
|
const { apiUrl, apiKey } = readPublishedApiConfig();
|
|
196
211
|
if (!apiUrl || !apiKey) {
|
|
@@ -198,19 +213,12 @@ function useFormTracking({
|
|
|
198
213
|
return null;
|
|
199
214
|
}
|
|
200
215
|
try {
|
|
201
|
-
const response = await
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
formId,
|
|
208
|
-
sessionId,
|
|
209
|
-
deviceType: getDeviceType()
|
|
210
|
-
})
|
|
211
|
-
},
|
|
212
|
-
{ apiKey, retries: 0 }
|
|
213
|
-
);
|
|
216
|
+
const response = await analyticsSend("/api/public/forms/analytics/start", {
|
|
217
|
+
formId,
|
|
218
|
+
sessionId,
|
|
219
|
+
deviceType: getDeviceType()
|
|
220
|
+
}, { apiUrl, apiKey, measurementEpoch: epoch });
|
|
221
|
+
if (!response || !permitted()) return null;
|
|
214
222
|
if (!response.ok) {
|
|
215
223
|
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
216
224
|
}
|
|
@@ -222,24 +230,24 @@ function useFormTracking({
|
|
|
222
230
|
return null;
|
|
223
231
|
}
|
|
224
232
|
};
|
|
225
|
-
const session = acquireTrackingSession(
|
|
233
|
+
const session = acquireTrackingSession(registryKey, startTracking);
|
|
226
234
|
sessionRef.current = session;
|
|
227
235
|
sessionIdRef.current = session.sessionId;
|
|
228
236
|
startTimeRef.current = session.startedAt;
|
|
229
237
|
stepStartTimeRef.current = Date.now();
|
|
230
238
|
let joined = true;
|
|
231
239
|
void session.analyticsId.then((id) => {
|
|
232
|
-
if (joined) analyticsIdRef.current = id;
|
|
240
|
+
if (joined && permitted()) analyticsIdRef.current = id;
|
|
233
241
|
});
|
|
234
242
|
const reportAbandon = (analyticsId) => {
|
|
235
|
-
if (!analyticsId) return;
|
|
243
|
+
if (!analyticsId || !permitted()) return;
|
|
236
244
|
const { apiUrl, apiKey } = readPublishedApiConfig();
|
|
237
245
|
if (!apiUrl || !apiKey) return;
|
|
238
246
|
if (!claimAbandon(session)) return;
|
|
239
247
|
const now = Date.now();
|
|
240
248
|
stepTimesRef.current[currentStepRef.current] = Math.floor((now - stepStartTimeRef.current) / 1e3);
|
|
241
|
-
|
|
242
|
-
|
|
249
|
+
analyticsBeacon(
|
|
250
|
+
"/api/public/forms/analytics/abandon",
|
|
243
251
|
{
|
|
244
252
|
analyticsId,
|
|
245
253
|
step: currentStepRef.current,
|
|
@@ -249,7 +257,7 @@ function useFormTracking({
|
|
|
249
257
|
fieldInteractions: fieldReport(session, now),
|
|
250
258
|
abandonmentField: session.fields.lastField
|
|
251
259
|
},
|
|
252
|
-
apiKey
|
|
260
|
+
{ apiUrl, apiKey, measurementEpoch: epoch }
|
|
253
261
|
);
|
|
254
262
|
if (debug) console.log("[Forms] Abandonment tracked:", session.fields.lastField);
|
|
255
263
|
};
|
|
@@ -260,33 +268,37 @@ function useFormTracking({
|
|
|
260
268
|
return () => {
|
|
261
269
|
joined = false;
|
|
262
270
|
stopLeaveListener();
|
|
263
|
-
releaseTrackingSession(
|
|
271
|
+
releaseTrackingSession(registryKey, session);
|
|
272
|
+
analyticsIdRef.current = null;
|
|
273
|
+
sessionIdRef.current = "";
|
|
264
274
|
sessionRef.current = null;
|
|
265
275
|
};
|
|
266
|
-
}, [formId, enabled, debug, fieldReport]);
|
|
276
|
+
}, [formId, enabled, debug, fieldReport, permitted, epoch]);
|
|
267
277
|
const resolveAnalyticsId = useCallback(async () => {
|
|
278
|
+
if (!permitted()) return null;
|
|
268
279
|
if (analyticsIdRef.current) return analyticsIdRef.current;
|
|
269
280
|
const session = sessionRef.current;
|
|
270
281
|
if (!session) return null;
|
|
271
282
|
const id = await session.analyticsId;
|
|
283
|
+
if (!permitted()) return null;
|
|
272
284
|
if (id) analyticsIdRef.current = id;
|
|
273
285
|
return id;
|
|
274
|
-
}, []);
|
|
286
|
+
}, [permitted]);
|
|
275
287
|
const trackFieldFocus = useCallback((slug) => {
|
|
276
288
|
const session = sessionRef.current;
|
|
277
|
-
if (!session || session.completed) return;
|
|
289
|
+
if (!permitted() || !session || session.completed) return;
|
|
278
290
|
if (session.fields.focus(slug)) noteActivity(session);
|
|
279
|
-
}, []);
|
|
291
|
+
}, [permitted]);
|
|
280
292
|
const trackFieldBlur = useCallback((slug) => {
|
|
281
|
-
sessionRef.current?.fields.blur(slug);
|
|
282
|
-
}, []);
|
|
293
|
+
if (permitted()) sessionRef.current?.fields.blur(slug);
|
|
294
|
+
}, [permitted]);
|
|
283
295
|
const trackFieldChange = useCallback((slug) => {
|
|
284
296
|
const session = sessionRef.current;
|
|
285
|
-
if (!session || session.completed) return;
|
|
297
|
+
if (!permitted() || !session || session.completed) return;
|
|
286
298
|
if (session.fields.change(slug)) noteActivity(session);
|
|
287
|
-
}, []);
|
|
299
|
+
}, [permitted]);
|
|
288
300
|
const trackStepChange = useCallback(async (step) => {
|
|
289
|
-
if (!enabled) return;
|
|
301
|
+
if (!enabled || !permitted()) return;
|
|
290
302
|
const { apiUrl, apiKey } = readPublishedApiConfig();
|
|
291
303
|
if (!apiUrl || !apiKey) {
|
|
292
304
|
if (debug) console.error("[Forms] Missing API URL or API key");
|
|
@@ -301,23 +313,16 @@ function useFormTracking({
|
|
|
301
313
|
const session = sessionRef.current;
|
|
302
314
|
if (session) noteActivity(session);
|
|
303
315
|
const analyticsId = await resolveAnalyticsId();
|
|
304
|
-
if (!analyticsId) return;
|
|
316
|
+
if (!analyticsId || !permitted()) return;
|
|
305
317
|
try {
|
|
306
|
-
const response = await
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
maxStep: maxStepRef.current,
|
|
315
|
-
stepTimes: stepTimesRef.current,
|
|
316
|
-
...session ? { fieldInteractions: fieldReport(session, Date.now()) } : {}
|
|
317
|
-
})
|
|
318
|
-
},
|
|
319
|
-
{ apiKey, retries: 0 }
|
|
320
|
-
);
|
|
318
|
+
const response = await analyticsSend("/api/public/forms/analytics/step", {
|
|
319
|
+
analyticsId,
|
|
320
|
+
step,
|
|
321
|
+
maxStep: maxStepRef.current,
|
|
322
|
+
stepTimes: stepTimesRef.current,
|
|
323
|
+
...session ? { fieldInteractions: fieldReport(session, Date.now()) } : {}
|
|
324
|
+
}, { apiUrl, apiKey, measurementEpoch: epoch });
|
|
325
|
+
if (!response || !permitted()) return;
|
|
321
326
|
if (!response.ok) {
|
|
322
327
|
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
323
328
|
}
|
|
@@ -325,9 +330,9 @@ function useFormTracking({
|
|
|
325
330
|
} catch (error) {
|
|
326
331
|
if (debug) console.error("[Forms] Error updating step:", error);
|
|
327
332
|
}
|
|
328
|
-
}, [enabled, debug, resolveAnalyticsId, fieldReport]);
|
|
333
|
+
}, [enabled, debug, resolveAnalyticsId, fieldReport, permitted, epoch]);
|
|
329
334
|
const trackComplete = useCallback(async () => {
|
|
330
|
-
if (!enabled) return;
|
|
335
|
+
if (!enabled || !permitted()) return;
|
|
331
336
|
const session = sessionRef.current;
|
|
332
337
|
if (session) markCompleted(session);
|
|
333
338
|
const { apiUrl, apiKey } = readPublishedApiConfig();
|
|
@@ -340,28 +345,16 @@ function useFormTracking({
|
|
|
340
345
|
stepTimesRef.current[currentStepRef.current] = finalStepTime;
|
|
341
346
|
const fieldInteractions = session ? fieldReport(session, now) : void 0;
|
|
342
347
|
const analyticsId = await resolveAnalyticsId();
|
|
343
|
-
if (!analyticsId) return;
|
|
348
|
+
if (!analyticsId || !permitted()) return;
|
|
344
349
|
try {
|
|
345
|
-
const response = await
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
keepalive: true,
|
|
354
|
-
headers: { "Content-Type": "application/json" },
|
|
355
|
-
body: JSON.stringify({
|
|
356
|
-
analyticsId,
|
|
357
|
-
totalSteps,
|
|
358
|
-
stepTimes: stepTimesRef.current,
|
|
359
|
-
totalTimeSeconds: Math.floor((now - startTimeRef.current) / 1e3),
|
|
360
|
-
...fieldInteractions ? { fieldInteractions } : {}
|
|
361
|
-
})
|
|
362
|
-
},
|
|
363
|
-
{ apiKey, retries: 0 }
|
|
364
|
-
);
|
|
350
|
+
const response = await analyticsSend("/api/public/forms/analytics/complete", {
|
|
351
|
+
analyticsId,
|
|
352
|
+
totalSteps,
|
|
353
|
+
stepTimes: stepTimesRef.current,
|
|
354
|
+
totalTimeSeconds: Math.floor((now - startTimeRef.current) / 1e3),
|
|
355
|
+
...fieldInteractions ? { fieldInteractions } : {}
|
|
356
|
+
}, { apiUrl, apiKey, measurementEpoch: epoch, keepalive: true });
|
|
357
|
+
if (!response || !permitted()) return;
|
|
365
358
|
if (!response.ok) {
|
|
366
359
|
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
367
360
|
}
|
|
@@ -369,14 +362,14 @@ function useFormTracking({
|
|
|
369
362
|
} catch (error) {
|
|
370
363
|
if (debug) console.error("[Forms] Error completing tracking:", error);
|
|
371
364
|
}
|
|
372
|
-
}, [enabled, totalSteps, debug, resolveAnalyticsId, fieldReport]);
|
|
365
|
+
}, [enabled, totalSteps, debug, resolveAnalyticsId, fieldReport, permitted, epoch]);
|
|
373
366
|
return {
|
|
374
367
|
trackStepChange,
|
|
375
368
|
trackComplete,
|
|
376
369
|
trackFieldFocus,
|
|
377
370
|
trackFieldBlur,
|
|
378
371
|
trackFieldChange,
|
|
379
|
-
sessionId: sessionIdRef.current
|
|
372
|
+
sessionId: permitted() ? sessionIdRef.current : ""
|
|
380
373
|
};
|
|
381
374
|
}
|
|
382
375
|
function getDeviceType() {
|
|
@@ -576,51 +569,65 @@ async function submitForm({
|
|
|
576
569
|
throw new Error("Verification could not be completed. Please try again.");
|
|
577
570
|
}
|
|
578
571
|
const honeypotFieldName = config.honeypot_field || DEFAULT_HONEYPOT_FIELD;
|
|
579
|
-
const
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
// page views, so the Sonor side can bind this lead to its browsing session
|
|
596
|
-
// (page -> lead attribution). Sent on every submission; null pre-hydration.
|
|
597
|
-
visitorId: identity.visitorId,
|
|
598
|
-
recaptchaToken: recaptchaToken || void 0,
|
|
599
|
-
utmSource: utm.utm_source,
|
|
600
|
-
utmMedium: utm.utm_medium,
|
|
601
|
-
utmCampaign: utm.utm_campaign,
|
|
602
|
-
utmTerm: utm.utm_term,
|
|
603
|
-
utmContent: utm.utm_content,
|
|
604
|
-
...ga4,
|
|
605
|
-
// Sub-site host — preserved on form_submissions for lead attribution
|
|
606
|
-
// across multi-site projects. Resolved by SiteKitClientProviders.
|
|
607
|
-
site: typeof window !== "undefined" ? window.__SITE_KIT_SITE__ || window.location.host : void 0,
|
|
608
|
-
_formLoadedAt: formLoadedAt,
|
|
609
|
-
...agentInvoked ? { agentInvoked: true } : {}
|
|
572
|
+
const formData = {
|
|
573
|
+
...values,
|
|
574
|
+
...config.honeypot_enabled ? { [honeypotFieldName]: honeypotValue } : {}
|
|
575
|
+
};
|
|
576
|
+
const prepareAttempt = (attempt) => {
|
|
577
|
+
const policy = measurementPolicySnapshot();
|
|
578
|
+
const site = readPublishedSite() || (typeof window !== "undefined" ? window.location.hostname : "");
|
|
579
|
+
const matchingScope = !policy.config || policy.config.projectId === config.project_id && policy.config.site === site;
|
|
580
|
+
const analytics = analyticsPurposePermitted() && matchingScope;
|
|
581
|
+
const utm = analytics ? getUTMParams() : {};
|
|
582
|
+
let ga4 = {};
|
|
583
|
+
if (analytics) {
|
|
584
|
+
try {
|
|
585
|
+
ga4 = readGa4Identity();
|
|
586
|
+
} catch {
|
|
587
|
+
}
|
|
610
588
|
}
|
|
589
|
+
const identity = analytics ? readAnalyticsIdentity() : { visitorId: null, sessionId: null };
|
|
590
|
+
const sameOrigin = getClientApiConfig().apiUrl === apiUrl;
|
|
591
|
+
const actualSite = typeof window !== "undefined" && sameSite(normalizeSiteHost(window.location.host), site);
|
|
592
|
+
const context = sameOrigin && actualSite ? currentResonanceFormContext(config.project_id, site) : null;
|
|
593
|
+
const headers = new Headers(attempt.headers);
|
|
594
|
+
headers.delete(RESONANCE_SUBJECT_HEADER);
|
|
595
|
+
if (context) headers.set(RESONANCE_SUBJECT_HEADER, context.subjectProof);
|
|
596
|
+
const payload = {
|
|
597
|
+
formId: config.id,
|
|
598
|
+
form_id: config.id,
|
|
599
|
+
data: formData,
|
|
600
|
+
metadata: {
|
|
601
|
+
pageUrl: typeof window !== "undefined" ? analytics ? window.location.href : window.location.origin + window.location.pathname : null,
|
|
602
|
+
referrer: analytics && typeof document !== "undefined" ? document.referrer || null : null,
|
|
603
|
+
userAgent: typeof navigator !== "undefined" ? navigator.userAgent : null,
|
|
604
|
+
sessionId: identity.sessionId,
|
|
605
|
+
visitorId: identity.visitorId,
|
|
606
|
+
recaptchaToken: recaptchaToken || void 0,
|
|
607
|
+
utmSource: utm.utm_source ?? null,
|
|
608
|
+
utmMedium: utm.utm_medium ?? null,
|
|
609
|
+
utmCampaign: utm.utm_campaign ?? null,
|
|
610
|
+
utmTerm: utm.utm_term ?? null,
|
|
611
|
+
utmContent: utm.utm_content ?? null,
|
|
612
|
+
...ga4,
|
|
613
|
+
site: site || void 0,
|
|
614
|
+
_formLoadedAt: formLoadedAt,
|
|
615
|
+
...agentInvoked ? { agentInvoked: true } : {},
|
|
616
|
+
...context?.exposureId ? { resonanceExposureId: context.exposureId } : {}
|
|
617
|
+
}
|
|
618
|
+
};
|
|
619
|
+
return { ...attempt, headers, body: JSON.stringify(payload) };
|
|
611
620
|
};
|
|
612
|
-
const
|
|
613
|
-
|
|
614
|
-
{
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
{ retries: 2, timeoutMs: 2e4 }
|
|
623
|
-
);
|
|
621
|
+
const initialRequest = prepareAttempt({
|
|
622
|
+
method: "POST",
|
|
623
|
+
headers: { "Content-Type": "application/json", Authorization: `Bearer ${apiKey}` }
|
|
624
|
+
});
|
|
625
|
+
const response = await sonorFetch(`${apiUrl}/api/public/forms/submit`, initialRequest, {
|
|
626
|
+
apiKey,
|
|
627
|
+
retries: 2,
|
|
628
|
+
timeoutMs: 2e4,
|
|
629
|
+
prepareAttempt
|
|
630
|
+
});
|
|
624
631
|
const data = await response.json().catch(() => null);
|
|
625
632
|
if (!response.ok) {
|
|
626
633
|
const msg = (data?.message ?? data?.error ?? (response.statusText || `HTTP ${response.status}`)).toString().trim();
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// src/shared/sonor-fetch.ts
|
|
2
|
+
async function sonorFetch(url, init = {}, options = {}) {
|
|
3
|
+
if (options.shouldSend && !options.shouldSend()) throw new Error("sonor-dispatch-withdrawn");
|
|
4
|
+
const { executeSonorFetch } = await import('./sonor-fetch-runtime-3PFGUXMF.js');
|
|
5
|
+
if (options.shouldSend && !options.shouldSend()) throw new Error("sonor-dispatch-withdrawn");
|
|
6
|
+
return executeSonorFetch(url, init, options);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { sonorFetch };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { DEFAULT_WIDGET_Z_INDEX } from './chunk-27FISYK4.js';
|
|
3
|
-
import { resolveAnalyticsTarget } from './chunk-
|
|
3
|
+
import { resolveAnalyticsTarget } from './chunk-7643MCD2.js';
|
|
4
4
|
import { useState, useEffect } from 'react';
|
|
5
5
|
import ReactDOM from 'react-dom';
|
|
6
6
|
import dynamic from 'next/dynamic';
|
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
var LazyChatWidget = dynamic(
|
|
10
|
-
() => import('./ChatWidget-
|
|
10
|
+
() => import('./ChatWidget-EAATOFCT.js').then((m) => ({ default: m.ChatWidget })),
|
|
11
11
|
{ ssr: false }
|
|
12
12
|
);
|
|
13
13
|
function SiteChat(props) {
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { advertisingPurposesPermitted } from './chunk-KMNHNCVG.js';
|
|
2
|
+
import { resonanceControllerState } from './chunk-MOACHHOJ.js';
|
|
3
|
+
import { analyticsPurposePermitted, measurementPolicySnapshot } from './chunk-FRY6PBT6.js';
|
|
4
|
+
|
|
5
|
+
// src/resonance/consent-adapter.ts
|
|
6
|
+
var makeStore = () => ({ adapter: null, listeners: /* @__PURE__ */ new Set(), registrations: 0 });
|
|
7
|
+
var store = typeof window === "undefined" ? makeStore() : window.__SONOR_RESONANCE_CMP_V1__ ?? (window.__SONOR_RESONANCE_CMP_V1__ = makeStore());
|
|
8
|
+
var listeners = store.listeners;
|
|
9
|
+
var getConsentAdapter = () => store.adapter;
|
|
10
|
+
var subscribeConsentAdapter = (listener) => {
|
|
11
|
+
listeners.add(listener);
|
|
12
|
+
return () => {
|
|
13
|
+
listeners.delete(listener);
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
function registerResonanceConsentAdapter(next) {
|
|
17
|
+
if (store.adapter && store.adapter !== next) throw new Error("A maintained consent adapter is already registered");
|
|
18
|
+
const changed = store.adapter !== next;
|
|
19
|
+
store.adapter = next;
|
|
20
|
+
store.registrations++;
|
|
21
|
+
if (changed) for (const listener of listeners) listener();
|
|
22
|
+
let active = true;
|
|
23
|
+
return () => {
|
|
24
|
+
if (!active || store.adapter !== next) return;
|
|
25
|
+
active = false;
|
|
26
|
+
if (--store.registrations > 0) return;
|
|
27
|
+
store.adapter = null;
|
|
28
|
+
for (const listener of listeners) listener();
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// src/resonance/bridge.ts
|
|
33
|
+
function getResonanceMeasurementStatus() {
|
|
34
|
+
return {
|
|
35
|
+
state: resonanceControllerState.controller?.status.state ?? "unknown",
|
|
36
|
+
reason: resonanceControllerState.controller?.status.reason ?? null,
|
|
37
|
+
policy: measurementPolicySnapshot().policy,
|
|
38
|
+
analyticsPermitted: analyticsPurposePermitted(),
|
|
39
|
+
advertisingPermitted: advertisingPurposesPermitted(),
|
|
40
|
+
providerBlockers: [...resonanceControllerState.blockers, ...resonanceControllerState.registrationConflict ? ["duplicate_runtime_installation"] : []]
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function setProviderBlockers(next) {
|
|
44
|
+
resonanceControllerState.blockers = [...next];
|
|
45
|
+
}
|
|
46
|
+
function registerResonanceController(next) {
|
|
47
|
+
if (resonanceControllerState.controller && resonanceControllerState.controller !== next) {
|
|
48
|
+
resonanceControllerState.registrationConflict = true;
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
resonanceControllerState.controller = next;
|
|
52
|
+
return () => {
|
|
53
|
+
if (resonanceControllerState.controller === next) {
|
|
54
|
+
resonanceControllerState.controller = null;
|
|
55
|
+
resonanceControllerState.blockers = [];
|
|
56
|
+
resonanceControllerState.registrationConflict = false;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function recordResonanceExposure(exposure) {
|
|
61
|
+
const active = resonanceControllerState.controller;
|
|
62
|
+
if (active) void active.exposure(exposure).catch(() => {
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { getConsentAdapter, getResonanceMeasurementStatus, recordResonanceExposure, registerResonanceConsentAdapter, registerResonanceController, setProviderBlockers, subscribeConsentAdapter };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { sanitizeFleetVersion, buildFleetHeartbeatPayload } from './chunk-ZTZQPYP6.js';
|
|
3
3
|
import { useDeferredActivation } from './chunk-YC7ELZS3.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { SITE_KIT_VERSION } from './chunk-DXE6SXWW.js';
|
|
5
|
+
import { resolveAnalyticsTarget } from './chunk-7643MCD2.js';
|
|
6
|
+
import { sonorFetch } from './chunk-VXCUXHZO.js';
|
|
7
7
|
import { useRef, useEffect } from 'react';
|
|
8
8
|
|
|
9
9
|
// src/fleet/heartbeat.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { writeLLMsTxtToPublic } from './chunk-
|
|
1
|
+
import { writeLLMsTxtToPublic } from './chunk-QLJ2SC3T.js';
|
|
2
2
|
import { getSiteConfig } from './chunk-Z22QVHT4.js';
|
|
3
3
|
import { buildFetch } from './chunk-UAYAJPEP.js';
|
|
4
4
|
import { findAppDirForDiscovery } from './chunk-ZEGVKVD5.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { readAnalyticsIdentity } from './chunk-
|
|
2
|
-
import { sonorFetch } from './chunk-
|
|
1
|
+
import { readAnalyticsIdentity } from './chunk-PVY7X5UR.js';
|
|
2
|
+
import { sonorFetch } from './chunk-VXCUXHZO.js';
|
|
3
3
|
import { getClientApiConfig } from './chunk-W7OPEMGJ.js';
|
|
4
4
|
|
|
5
5
|
// src/sync/api.ts
|
package/dist/client/index.d.ts
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* own tiny subpath so importing a utility never drags a feature module into
|
|
6
6
|
* the bundle.
|
|
7
7
|
*/
|
|
8
|
-
export { useDeferredActivation } from
|
|
9
|
-
export { VisualViewportGap, useVisualViewportGap, VISUAL_VIEWPORT_GAP_PROPERTY, } from
|
|
10
|
-
export { SiteKitCredential } from
|
|
11
|
-
export type { SiteKitCredentialProps } from
|
|
12
|
-
export { useSiteKitIdentity, getOrCreateVisitorId, getOrCreateSessionId, } from
|
|
13
|
-
export type { SiteKitIdentity } from
|
|
14
|
-
export { trackEvent, trackConversion } from
|
|
15
|
-
export type { TrackEventOptions, TrackConversionOptions } from
|
|
8
|
+
export { useDeferredActivation } from "../shared/defer.js";
|
|
9
|
+
export { VisualViewportGap, useVisualViewportGap, VISUAL_VIEWPORT_GAP_PROPERTY, } from "../shared/visual-viewport-gap.js";
|
|
10
|
+
export { SiteKitCredential } from "./SiteKitCredential.js";
|
|
11
|
+
export type { SiteKitCredentialProps } from "./SiteKitCredential.js";
|
|
12
|
+
export { useSiteKitIdentity, getOrCreateVisitorId, getOrCreateSessionId, } from "../shared/identity.js";
|
|
13
|
+
export type { SiteKitIdentity } from "../shared/identity.js";
|
|
14
|
+
export { trackEvent, trackConversion } from "../analytics/dispatch.js";
|
|
15
|
+
export type { TrackEventOptions, TrackConversionOptions } from "../analytics/types.js";
|
package/dist/client/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { SiteKitCredential } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
2
|
+
export { SiteKitCredential } from '../chunk-OEOSR5EG.js';
|
|
3
|
+
import '../chunk-2LBKIE2K.js';
|
|
4
|
+
import '../chunk-TPHOIE4I.js';
|
|
4
5
|
export { VISUAL_VIEWPORT_GAP_PROPERTY, VisualViewportGap, useVisualViewportGap } from '../chunk-6T6CQVNL.js';
|
|
5
6
|
export { useDeferredActivation } from '../chunk-YC7ELZS3.js';
|
|
6
7
|
import '../chunk-FESKKJAS.js';
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
|
|
8
|
+
export { trackConversion, trackEvent } from '../chunk-AG2RDHYZ.js';
|
|
9
|
+
export { getOrCreateSessionId, getOrCreateVisitorId, useSiteKitIdentity } from '../chunk-JT7GHHMV.js';
|
|
10
|
+
import '../chunk-D4M5K6JN.js';
|
|
10
11
|
import '../chunk-GJWI74ZZ.js';
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import '../chunk-
|
|
13
|
-
import '../chunk-
|
|
12
|
+
import '../chunk-5IVD6G77.js';
|
|
13
|
+
import '../chunk-A4CC4ZG3.js';
|
|
14
|
+
import '../chunk-FRY6PBT6.js';
|
|
14
15
|
import '../chunk-PKBMQBKP.js';
|
package/dist/config/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* })
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
import type { SecurityHeadersConfig } from
|
|
30
|
+
import type { SecurityHeadersConfig } from "../proxy/securityHeaders.js";
|
|
31
31
|
type NextConfig = Record<string, unknown>;
|
|
32
32
|
export interface SiteKitNextConfig {
|
|
33
33
|
/** Additional image domains for next/image optimization */
|
|
@@ -85,6 +85,14 @@ export declare const BROADCAST_STYLES: readonly ['glass', 'editorial', 'poster',
|
|
|
85
85
|
export type BroadcastStyleId = (typeof BROADCAST_STYLES)[number];
|
|
86
86
|
export declare const DEFAULT_BROADCAST_STYLE: BroadcastStyleId;
|
|
87
87
|
export declare const isBroadcastStyleId: (value: unknown) => value is BroadcastStyleId;
|
|
88
|
+
/** Explicit per-review photo presentation; absence keeps the existing automatic layout. */
|
|
89
|
+
export declare const REVIEW_PHOTO_PRESENTATIONS: readonly ['background'];
|
|
90
|
+
export type ReviewPhotoPresentation = (typeof REVIEW_PHOTO_PRESENTATIONS)[number];
|
|
91
|
+
/**
|
|
92
|
+
* A supported explicit photo presentation. Optional input boundaries handle
|
|
93
|
+
* omission (preserve) and null (clear) separately; neither is an explicit value.
|
|
94
|
+
*/
|
|
95
|
+
export declare const isReviewPhotoPresentation: (value: unknown) => value is ReviewPhotoPresentation;
|
|
88
96
|
/**
|
|
89
97
|
* The review compositions Broadcast draws: `signature` (photo up top, the
|
|
90
98
|
* quote low) and `frame` (centered). Order matters: a review whose v1 draw
|