@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,17 +1,23 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { getFreshCredential } from './chunk-FAY6MOLL.js';
|
|
3
|
+
import { isSiteToken } from './chunk-TPHOIE4I.js';
|
|
4
|
+
import { getOrCreateSessionId, getOrCreateVisitorId } from './chunk-JT7GHHMV.js';
|
|
3
5
|
import { onPageLeave } from './chunk-L2V5PUFN.js';
|
|
6
|
+
import { RESONANCE_SUBJECT_HEADER } from './chunk-NHDRA4Y5.js';
|
|
7
|
+
import './chunk-D4M5K6JN.js';
|
|
4
8
|
import './chunk-GJWI74ZZ.js';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import
|
|
9
|
+
import { experimentMeasurementPermitted, currentSubjectProof } from './chunk-KMNHNCVG.js';
|
|
10
|
+
import './chunk-5IVD6G77.js';
|
|
11
|
+
import './chunk-DXE6SXWW.js';
|
|
12
|
+
import { resolveAnalyticsTarget } from './chunk-7643MCD2.js';
|
|
7
13
|
import './chunk-64XODP7M.js';
|
|
8
|
-
import { sonorFetch } from './chunk-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import './chunk-F6WLHVMQ.js';
|
|
14
|
+
import { sonorFetch } from './chunk-VXCUXHZO.js';
|
|
15
|
+
import { getClientApiConfig, readPublishedSite } from './chunk-W7OPEMGJ.js';
|
|
16
|
+
import { subscribeMeasurementPolicy, measurementPolicySnapshot, serverMeasurementPolicySnapshot, analyticsPurposePermitted } from './chunk-FRY6PBT6.js';
|
|
12
17
|
import './chunk-PKBMQBKP.js';
|
|
13
|
-
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
18
|
+
import { useState, useRef, useSyncExternalStore, useEffect, useCallback } from 'react';
|
|
14
19
|
|
|
20
|
+
var getClientSite = () => readPublishedSite() || (typeof window !== "undefined" ? window.location.host : "");
|
|
15
21
|
function getApiConfig() {
|
|
16
22
|
return getClientApiConfig();
|
|
17
23
|
}
|
|
@@ -56,6 +62,7 @@ function SignalCore({
|
|
|
56
62
|
onState
|
|
57
63
|
}) {
|
|
58
64
|
const [config, setConfig] = useState(null);
|
|
65
|
+
const [assignmentRevision, setAssignmentRevision] = useState(0);
|
|
59
66
|
const [loading, setLoading] = useState(true);
|
|
60
67
|
const [error, setError] = useState(null);
|
|
61
68
|
const eventSourceRef = useRef(null);
|
|
@@ -66,19 +73,53 @@ function SignalCore({
|
|
|
66
73
|
const scrollDepthRef = useRef(0);
|
|
67
74
|
const clickCountRef = useRef(0);
|
|
68
75
|
const { apiUrl, apiKey } = getApiConfig();
|
|
69
|
-
const
|
|
70
|
-
const
|
|
76
|
+
const policy = useSyncExternalStore(subscribeMeasurementPolicy, measurementPolicySnapshot, serverMeasurementPolicySnapshot);
|
|
77
|
+
const [identity, setIdentity] = useState({ visitor: "", session: "" });
|
|
78
|
+
const permitted = () => analyticsPurposePermitted() && !!resolveAnalyticsTarget({ apiUrl, apiKey });
|
|
79
|
+
const epoch = policy.collectionEpoch;
|
|
80
|
+
const allowed = () => permitted() && measurementPolicySnapshot().collectionEpoch === epoch;
|
|
71
81
|
useEffect(() => {
|
|
72
|
-
|
|
73
|
-
|
|
82
|
+
if (!permitted()) {
|
|
83
|
+
setIdentity({ visitor: "", session: "" });
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
setIdentity({ visitor: externalVisitorId || getOrCreateVisitorId(), session: externalSessionId || getOrCreateSessionId() });
|
|
87
|
+
}, [epoch, externalVisitorId, externalSessionId, apiUrl, apiKey]);
|
|
88
|
+
const resolvedVisitorId = identity.visitor;
|
|
89
|
+
const resolvedSessionId = identity.session;
|
|
90
|
+
useEffect(() => subscribeMeasurementPolicy(() => {
|
|
91
|
+
if (!allowed()) {
|
|
92
|
+
eventQueueRef.current = [];
|
|
93
|
+
assignmentsRef.current.clear();
|
|
94
|
+
eventSourceRef.current?.close();
|
|
95
|
+
eventSourceRef.current = null;
|
|
96
|
+
if (flushTimeoutRef.current) clearTimeout(flushTimeoutRef.current);
|
|
97
|
+
setConfig(null);
|
|
98
|
+
}
|
|
99
|
+
}), [epoch, apiUrl, apiKey]);
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
onState({ config, loading, error, assignmentRevision });
|
|
102
|
+
}, [config, loading, error, assignmentRevision, onState]);
|
|
74
103
|
const loadExperimentAssignment = useCallback(async (experimentId) => {
|
|
75
|
-
|
|
76
|
-
const
|
|
104
|
+
if (!allowed() || !resolvedVisitorId) return null;
|
|
105
|
+
const managed = measurementPolicySnapshot().policy === "configured";
|
|
106
|
+
if (managed && !experimentMeasurementPermitted()) return null;
|
|
107
|
+
const proof = managed ? currentSubjectProof() : null;
|
|
108
|
+
if (managed && assignmentsRef.current.delete(experimentId)) setAssignmentRevision((value) => value + 1);
|
|
109
|
+
const storageKey = `_sk_signal_exp_${experimentId}`;
|
|
110
|
+
let stored = null;
|
|
111
|
+
if (!managed) {
|
|
112
|
+
try {
|
|
113
|
+
stored = localStorage.getItem(storageKey);
|
|
114
|
+
} catch {
|
|
115
|
+
}
|
|
116
|
+
}
|
|
77
117
|
if (stored) {
|
|
78
118
|
try {
|
|
79
119
|
const assignment = JSON.parse(stored);
|
|
80
120
|
if (assignment.expires > Date.now()) {
|
|
81
121
|
assignmentsRef.current.set(experimentId, assignment);
|
|
122
|
+
setAssignmentRevision((value) => value + 1);
|
|
82
123
|
return assignment;
|
|
83
124
|
}
|
|
84
125
|
} catch {
|
|
@@ -86,29 +127,38 @@ function SignalCore({
|
|
|
86
127
|
}
|
|
87
128
|
try {
|
|
88
129
|
const response = await sonorFetch(
|
|
89
|
-
`${apiUrl}/api/public/signal/experiment/${experimentId}`,
|
|
130
|
+
`${apiUrl}/api/public/signal/experiment/${experimentId}?site=${encodeURIComponent(getClientSite())}`,
|
|
90
131
|
{
|
|
91
132
|
headers: {
|
|
92
|
-
"x-visitor-id": resolvedVisitorId
|
|
133
|
+
"x-visitor-id": resolvedVisitorId,
|
|
134
|
+
...currentSubjectProof() ? { [RESONANCE_SUBJECT_HEADER]: currentSubjectProof().subjectProof } : {}
|
|
93
135
|
}
|
|
94
136
|
},
|
|
95
|
-
{ apiKey }
|
|
137
|
+
{ apiKey, shouldSend: allowed }
|
|
96
138
|
);
|
|
97
139
|
if (!response.ok) return null;
|
|
98
140
|
const assignment = await response.json();
|
|
99
|
-
|
|
141
|
+
if (!allowed() || managed && (!proof || currentSubjectProof()?.subjectProof !== proof.subjectProof || assignment.site !== getClientSite() || !assignment.assignment_id || !assignment.experiment_revision)) return null;
|
|
142
|
+
if (!managed) {
|
|
143
|
+
try {
|
|
144
|
+
localStorage.setItem(storageKey, JSON.stringify(assignment));
|
|
145
|
+
} catch {
|
|
146
|
+
}
|
|
147
|
+
}
|
|
100
148
|
assignmentsRef.current.set(experimentId, assignment);
|
|
149
|
+
setAssignmentRevision((value) => value + 1);
|
|
101
150
|
return assignment;
|
|
102
151
|
} catch (err) {
|
|
103
152
|
if (isDebug()) console.error("[Signal] Experiment assignment error:", err);
|
|
104
153
|
return null;
|
|
105
154
|
}
|
|
106
|
-
}, [apiUrl, apiKey]);
|
|
155
|
+
}, [apiUrl, apiKey, resolvedVisitorId, resolvedSessionId, epoch, policy.proof]);
|
|
107
156
|
const getExperiment = useCallback((experimentId) => {
|
|
157
|
+
if (!permitted() || measurementPolicySnapshot().policy === "configured" && !experimentMeasurementPermitted()) return null;
|
|
108
158
|
return assignmentsRef.current.get(experimentId) || null;
|
|
109
159
|
}, []);
|
|
110
160
|
const fetchConfig = useCallback(async () => {
|
|
111
|
-
if (!apiKey || !enabled ||
|
|
161
|
+
if (!apiKey || !enabled || !allowed() || !resolvedVisitorId) {
|
|
112
162
|
setLoading(false);
|
|
113
163
|
return;
|
|
114
164
|
}
|
|
@@ -117,15 +167,17 @@ function SignalCore({
|
|
|
117
167
|
`${apiUrl}/api/public/signal/config`,
|
|
118
168
|
{
|
|
119
169
|
headers: {
|
|
120
|
-
"x-visitor-id": resolvedVisitorId
|
|
170
|
+
"x-visitor-id": resolvedVisitorId,
|
|
171
|
+
...currentSubjectProof() ? { [RESONANCE_SUBJECT_HEADER]: currentSubjectProof().subjectProof } : {}
|
|
121
172
|
}
|
|
122
173
|
},
|
|
123
|
-
{ apiKey }
|
|
174
|
+
{ apiKey, shouldSend: allowed }
|
|
124
175
|
);
|
|
125
176
|
if (!response.ok) {
|
|
126
177
|
throw new Error(`Failed to fetch Signal config: ${response.statusText}`);
|
|
127
178
|
}
|
|
128
179
|
const data = await response.json();
|
|
180
|
+
if (!allowed()) return;
|
|
129
181
|
setConfig(data.config);
|
|
130
182
|
setError(null);
|
|
131
183
|
if (experiments && data.config?.experiments) {
|
|
@@ -143,7 +195,7 @@ function SignalCore({
|
|
|
143
195
|
}
|
|
144
196
|
}, [apiUrl, apiKey, enabled, experiments, resolvedVisitorId, loadExperimentAssignment]);
|
|
145
197
|
const connectSSE = useCallback(() => {
|
|
146
|
-
if (!apiKey || !enabled || !realtime ||
|
|
198
|
+
if (!apiKey || !enabled || !realtime || !allowed() || measurementPolicySnapshot().policy === "configured") return;
|
|
147
199
|
if (eventSourceRef.current) {
|
|
148
200
|
eventSourceRef.current.close();
|
|
149
201
|
eventSourceRef.current = null;
|
|
@@ -156,7 +208,7 @@ function SignalCore({
|
|
|
156
208
|
}
|
|
157
209
|
return;
|
|
158
210
|
}
|
|
159
|
-
if (eventSourceRef.current) return;
|
|
211
|
+
if (!allowed() || eventSourceRef.current) return;
|
|
160
212
|
const url = `${apiUrl}/api/public/signal/stream?token=${encodeURIComponent(credential)}`;
|
|
161
213
|
connectEventSource(url);
|
|
162
214
|
})();
|
|
@@ -200,7 +252,7 @@ function SignalCore({
|
|
|
200
252
|
}
|
|
201
253
|
}, [apiUrl, apiKey, enabled, realtime, loadExperimentAssignment]);
|
|
202
254
|
const flushEvents = useCallback(async () => {
|
|
203
|
-
if (
|
|
255
|
+
if (!allowed() || !resolvedVisitorId || !resolvedSessionId) {
|
|
204
256
|
eventQueueRef.current = [];
|
|
205
257
|
return;
|
|
206
258
|
}
|
|
@@ -219,15 +271,15 @@ function SignalCore({
|
|
|
219
271
|
events
|
|
220
272
|
})
|
|
221
273
|
},
|
|
222
|
-
{ apiKey, retries: 0 }
|
|
274
|
+
{ apiKey, retries: 0, shouldSend: allowed }
|
|
223
275
|
);
|
|
224
276
|
} catch (err) {
|
|
225
|
-
eventQueueRef.current = [...events, ...eventQueueRef.current];
|
|
277
|
+
if (allowed()) eventQueueRef.current = [...events, ...eventQueueRef.current].slice(0, 100);
|
|
226
278
|
if (isDebug()) console.error("[Signal] Event flush error:", err);
|
|
227
279
|
}
|
|
228
|
-
}, [apiUrl, apiKey]);
|
|
280
|
+
}, [apiUrl, apiKey, resolvedVisitorId, resolvedSessionId, epoch]);
|
|
229
281
|
const trackEvent = useCallback((event) => {
|
|
230
|
-
if (!enabled || !apiKey ||
|
|
282
|
+
if (!enabled || !apiKey || !allowed() || !resolvedVisitorId || !resolvedSessionId) return;
|
|
231
283
|
const enrichedEvent = {
|
|
232
284
|
...event,
|
|
233
285
|
page_url: window.location.href,
|
|
@@ -249,14 +301,14 @@ function SignalCore({
|
|
|
249
301
|
page_metadata: pageMetadataRef?.current ?? void 0,
|
|
250
302
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
251
303
|
};
|
|
252
|
-
eventQueueRef.current.push(enrichedEvent);
|
|
304
|
+
if (eventQueueRef.current.length < 100) eventQueueRef.current.push(enrichedEvent);
|
|
253
305
|
if (flushTimeoutRef.current) {
|
|
254
306
|
clearTimeout(flushTimeoutRef.current);
|
|
255
307
|
}
|
|
256
308
|
flushTimeoutRef.current = setTimeout(flushEvents, 1e3);
|
|
257
|
-
}, [enabled, apiKey, flushEvents]);
|
|
309
|
+
}, [enabled, apiKey, flushEvents, epoch]);
|
|
258
310
|
const trackOutcome = useCallback(async (outcome) => {
|
|
259
|
-
if (!enabled || !apiKey ||
|
|
311
|
+
if (!enabled || !apiKey || !allowed() || !resolvedVisitorId || !resolvedSessionId) return;
|
|
260
312
|
try {
|
|
261
313
|
await sonorFetch(
|
|
262
314
|
`${apiUrl}/api/public/signal/outcome`,
|
|
@@ -272,21 +324,23 @@ function SignalCore({
|
|
|
272
324
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
273
325
|
})
|
|
274
326
|
},
|
|
275
|
-
{ apiKey, retries: 0 }
|
|
327
|
+
{ apiKey, retries: 0, shouldSend: allowed }
|
|
276
328
|
);
|
|
277
329
|
} catch (err) {
|
|
278
330
|
if (isDebug()) console.error("[Signal] Outcome tracking error:", err);
|
|
279
331
|
}
|
|
280
|
-
}, [apiUrl, apiKey, enabled]);
|
|
332
|
+
}, [apiUrl, apiKey, enabled, resolvedVisitorId, resolvedSessionId, epoch]);
|
|
281
333
|
useEffect(() => {
|
|
282
|
-
if (!behaviorTracking || typeof window === "undefined") return;
|
|
334
|
+
if (!behaviorTracking || typeof window === "undefined" || !allowed()) return;
|
|
283
335
|
const handleScroll = () => {
|
|
336
|
+
if (!allowed()) return;
|
|
284
337
|
const scrollTop = window.scrollY;
|
|
285
338
|
const docHeight = document.documentElement.scrollHeight - window.innerHeight;
|
|
286
339
|
const depth = docHeight > 0 ? Math.round(scrollTop / docHeight * 100) : 0;
|
|
287
340
|
scrollDepthRef.current = Math.max(scrollDepthRef.current, depth);
|
|
288
341
|
};
|
|
289
342
|
const handleClick = () => {
|
|
343
|
+
if (!allowed()) return;
|
|
290
344
|
clickCountRef.current++;
|
|
291
345
|
};
|
|
292
346
|
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
@@ -297,7 +351,7 @@ function SignalCore({
|
|
|
297
351
|
window.removeEventListener("click", handleClick);
|
|
298
352
|
stopLeaveListener();
|
|
299
353
|
};
|
|
300
|
-
}, [behaviorTracking, flushEvents]);
|
|
354
|
+
}, [behaviorTracking, flushEvents, epoch]);
|
|
301
355
|
useEffect(() => {
|
|
302
356
|
fetchConfig();
|
|
303
357
|
}, [fetchConfig]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { SiteChat } from './chunk-
|
|
1
|
+
export { SiteChat } from './chunk-WHFWDK2H.js';
|
|
2
2
|
import './chunk-27FISYK4.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-7643MCD2.js';
|
|
4
4
|
import './chunk-64XODP7M.js';
|
|
5
5
|
import './chunk-W7OPEMGJ.js';
|
|
6
6
|
import './chunk-PKBMQBKP.js';
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
export { SiteDesignReporter } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { SiteDesignReporter } from './chunk-IO6BWRZ5.js';
|
|
2
|
+
import './chunk-6EDE7BOE.js';
|
|
3
3
|
import './chunk-XLAHRN4B.js';
|
|
4
4
|
import './chunk-XHYE24HU.js';
|
|
5
5
|
import './chunk-YC7ELZS3.js';
|
|
6
6
|
import './chunk-S22FSH7C.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-DXE6SXWW.js';
|
|
8
|
+
import './chunk-7643MCD2.js';
|
|
8
9
|
import './chunk-64XODP7M.js';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-7HW4TZB5.js';
|
|
10
|
+
import './chunk-VXCUXHZO.js';
|
|
11
11
|
import './chunk-W7OPEMGJ.js';
|
|
12
|
-
import './chunk-F6WLHVMQ.js';
|
|
13
12
|
import './chunk-PKBMQBKP.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { SitePopups } from './chunk-EBEM5BI5.js';
|
|
2
|
+
import './chunk-27FISYK4.js';
|
|
3
|
+
import './chunk-PVY7X5UR.js';
|
|
4
|
+
import './chunk-JT7GHHMV.js';
|
|
5
|
+
import './chunk-PMXQPO5Q.js';
|
|
6
|
+
import './chunk-NHDRA4Y5.js';
|
|
7
|
+
import './chunk-D4M5K6JN.js';
|
|
8
|
+
import './chunk-GJWI74ZZ.js';
|
|
9
|
+
import './chunk-NZOJHERI.js';
|
|
10
|
+
import './chunk-KMNHNCVG.js';
|
|
11
|
+
import './chunk-5IVD6G77.js';
|
|
12
|
+
import './chunk-DXE6SXWW.js';
|
|
13
|
+
import './chunk-7643MCD2.js';
|
|
14
|
+
import './chunk-64XODP7M.js';
|
|
15
|
+
import './chunk-VXCUXHZO.js';
|
|
16
|
+
import './chunk-W7OPEMGJ.js';
|
|
17
|
+
import './chunk-A4CC4ZG3.js';
|
|
18
|
+
import './chunk-FRY6PBT6.js';
|
|
19
|
+
import './chunk-PKBMQBKP.js';
|
package/dist/SitemapSync.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* import { SitemapSync } from '@sonordev/site-kit/seo'
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
import { type AnalyticsGateOptions } from
|
|
15
|
+
import { type AnalyticsGateOptions } from "./shared/reporting-gate.js";
|
|
16
16
|
interface SitemapSyncProps extends AnalyticsGateOptions {
|
|
17
17
|
/** Custom sitemap URL (defaults to /sitemap.xml) */
|
|
18
18
|
sitemapUrl?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { BookingWidgetProps } from
|
|
2
|
+
import type { BookingWidgetProps } from "../sync/types.js";
|
|
3
3
|
export declare function BookingWidget({ orgSlug, apiKey: propApiKey, apiUrl: propApiUrl, bookingTypeSlug, timezone: propTimezone, className, daysToShow, onBookingComplete, onError, hideTypeSelector, autoSelectFirstDay, styles, }: BookingWidgetProps): React.JSX.Element;
|
|
4
4
|
export default BookingWidget;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { BookingWidget, BookingWidget_default as default } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-7HW4TZB5.js';
|
|
2
|
+
export { BookingWidget, BookingWidget_default as default } from '../chunk-MP35JETP.js';
|
|
3
|
+
import '../chunk-ZRSXCT4O.js';
|
|
4
|
+
import '../chunk-PVY7X5UR.js';
|
|
5
|
+
import '../chunk-5IVD6G77.js';
|
|
6
|
+
import '../chunk-VXCUXHZO.js';
|
|
8
7
|
import '../chunk-W7OPEMGJ.js';
|
|
9
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-FRY6PBT6.js';
|
|
10
9
|
import '../chunk-PKBMQBKP.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SignalExperimentProps } from "../signal/SignalExperiment.js";
|
|
3
|
+
type ReviewedProps = SignalExperimentProps & {
|
|
4
|
+
reviewedContext: NonNullable<SignalExperimentProps['reviewedContext']>;
|
|
5
|
+
};
|
|
6
|
+
/** Private reviewed-copy boundary. Existing Signal owns assignment; the existing
|
|
7
|
+
* controller owns occurrences, retries and accepted form receipt references. */
|
|
8
|
+
export default function ReviewedSignalExperiment({ experimentId, variants, fallback, trackImpression, reviewedContext, children }: ReviewedProps): React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { experimentMeasurementPermitted } from '../chunk-KMNHNCVG.js';
|
|
3
|
+
import { useSignalExperiment, useSignal } from '../chunk-HJD6KXKH.js';
|
|
4
|
+
import { releaseRenderedResonanceExposure, recordRenderedResonanceExposure } from '../chunk-MOACHHOJ.js';
|
|
5
|
+
import { subscribeMeasurementPolicy, measurementPolicySnapshot, serverMeasurementPolicySnapshot, analyticsPurposePermitted } from '../chunk-FRY6PBT6.js';
|
|
6
|
+
import '../chunk-PKBMQBKP.js';
|
|
7
|
+
import { useRef, useSyncExternalStore, useEffect, useLayoutEffect } from 'react';
|
|
8
|
+
import { usePathname } from 'next/navigation';
|
|
9
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
var useRenderCleanup = typeof window === "undefined" ? useEffect : useLayoutEffect;
|
|
12
|
+
function ReviewedSignalExperiment({ experimentId, variants, fallback, trackImpression = true, reviewedContext, children }) {
|
|
13
|
+
const { assignment, variant } = useSignalExperiment(experimentId);
|
|
14
|
+
const { config: signalConfig, loading, error } = useSignal();
|
|
15
|
+
const pathname = usePathname();
|
|
16
|
+
const currentRender = useRef(null);
|
|
17
|
+
const policy = useSyncExternalStore(subscribeMeasurementPolicy, measurementPolicySnapshot, serverMeasurementPolicySnapshot);
|
|
18
|
+
const reviewedAssignment = signalConfig?.enabled === true && !loading && !error && policy.policy === "configured" && analyticsPurposePermitted() && experimentMeasurementPermitted() && policy.config?.site === reviewedContext.site && pathname === reviewedContext.pagePath && assignment?.experiment_id === experimentId && assignment.site === reviewedContext.site && !!assignment.assignment_id && assignment.expires > Date.now() && assignment.experiment_revision === reviewedContext.experimentRevision && !!variant && Object.prototype.hasOwnProperty.call(variants, variant) && variants[variant] !== void 0;
|
|
19
|
+
useRenderCleanup(() => () => {
|
|
20
|
+
if (currentRender.current) releaseRenderedResonanceExposure(currentRender.current);
|
|
21
|
+
currentRender.current = null;
|
|
22
|
+
}, [
|
|
23
|
+
reviewedContext.site,
|
|
24
|
+
reviewedContext.pagePath,
|
|
25
|
+
reviewedContext.pageVersionId,
|
|
26
|
+
reviewedContext.experimentRevision,
|
|
27
|
+
reviewedContext.controlVariantKey,
|
|
28
|
+
reviewedAssignment,
|
|
29
|
+
assignment?.assignment_id,
|
|
30
|
+
variant,
|
|
31
|
+
pathname,
|
|
32
|
+
trackImpression,
|
|
33
|
+
policy.config?.configRevision,
|
|
34
|
+
policy.config?.policyRevision,
|
|
35
|
+
policy.proof?.currentConsentRevision
|
|
36
|
+
]);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
if (!trackImpression || !reviewedAssignment || children || !variant || !assignment || !policy.config) return;
|
|
39
|
+
const exposure = {
|
|
40
|
+
projectId: policy.config.projectId,
|
|
41
|
+
site: policy.config.site,
|
|
42
|
+
experimentId,
|
|
43
|
+
experimentRevision: assignment.experiment_revision,
|
|
44
|
+
assignmentId: assignment.assignment_id,
|
|
45
|
+
variantKey: variant,
|
|
46
|
+
occurredAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
47
|
+
};
|
|
48
|
+
let closed = false, recorded = false;
|
|
49
|
+
queueMicrotask(() => {
|
|
50
|
+
if (!closed) {
|
|
51
|
+
recorded = recordRenderedResonanceExposure(exposure, { pagePath: reviewedContext.pagePath, pageVersionId: reviewedContext.pageVersionId });
|
|
52
|
+
if (recorded) currentRender.current = exposure;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
return () => {
|
|
56
|
+
closed = true;
|
|
57
|
+
if (recorded) releaseRenderedResonanceExposure(exposure);
|
|
58
|
+
if (currentRender.current === exposure) currentRender.current = null;
|
|
59
|
+
};
|
|
60
|
+
}, [
|
|
61
|
+
experimentId,
|
|
62
|
+
variant,
|
|
63
|
+
assignment?.assignment_id,
|
|
64
|
+
pathname,
|
|
65
|
+
trackImpression,
|
|
66
|
+
!!children,
|
|
67
|
+
reviewedContext.site,
|
|
68
|
+
reviewedContext.pagePath,
|
|
69
|
+
reviewedContext.pageVersionId,
|
|
70
|
+
reviewedContext.experimentRevision,
|
|
71
|
+
reviewedContext.controlVariantKey,
|
|
72
|
+
reviewedAssignment,
|
|
73
|
+
policy.config?.projectId,
|
|
74
|
+
policy.config?.site,
|
|
75
|
+
policy.config?.configRevision,
|
|
76
|
+
policy.config?.policyRevision,
|
|
77
|
+
policy.proof?.currentConsentRevision
|
|
78
|
+
]);
|
|
79
|
+
if (children) return /* @__PURE__ */ jsx(Fragment, { children: children({
|
|
80
|
+
variant: reviewedAssignment ? variant : reviewedContext.controlVariantKey,
|
|
81
|
+
isControl: !reviewedAssignment || variant === reviewedContext.controlVariantKey
|
|
82
|
+
}) });
|
|
83
|
+
const key = reviewedAssignment ? variant : reviewedContext.controlVariantKey;
|
|
84
|
+
const content = Object.prototype.hasOwnProperty.call(variants, key) ? variants[key] : void 0;
|
|
85
|
+
if (content !== void 0) return /* @__PURE__ */ jsx(Fragment, { children: content });
|
|
86
|
+
return /* @__PURE__ */ jsx(Fragment, { children: fallback || null });
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export { ReviewedSignalExperiment as default };
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
* Minimal styling - let site CSS control appearance
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import type { TestimonialSectionProps } from
|
|
10
|
+
import type { TestimonialSectionProps } from "../reputation/types.js";
|
|
11
11
|
export declare function TestimonialSection({ title, subtitle, autoplay, autoplayInterval, showRating, showPhoto, maxReviews, featuredOnly, service, className, }: TestimonialSectionProps): React.JSX.Element | null;
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
* chars; rotating it signs everyone out), NEXT_PUBLIC_SITE_URL.
|
|
41
41
|
*/
|
|
42
42
|
import { NextResponse, type NextRequest } from 'next/server';
|
|
43
|
-
import { type SonorSession } from
|
|
44
|
-
export type { SonorSession } from
|
|
45
|
-
export { signSession, verifySessionToken } from
|
|
43
|
+
import { type SonorSession } from "./session.js";
|
|
44
|
+
export type { SonorSession } from "./session.js";
|
|
45
|
+
export { signSession, verifySessionToken } from "./session.js";
|
|
46
46
|
export interface SonorSsoConfig {
|
|
47
47
|
/**
|
|
48
48
|
* The gated area(s). Every path equal to or under one of these needs a
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Client sites can wrap this or use it directly with their own styling.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import type { AffiliateWithOffers } from
|
|
8
|
+
import type { AffiliateWithOffers } from "./types.js";
|
|
9
9
|
export interface AffiliateCardProps {
|
|
10
10
|
affiliate: AffiliateWithOffers;
|
|
11
11
|
className?: string;
|
package/dist/affiliates/api.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* API functions for fetching affiliate data for client sites.
|
|
5
5
|
* All data goes through Sonor API with API key auth - never Supabase directly.
|
|
6
6
|
*/
|
|
7
|
-
import type { AffiliateWithOffers, FetchAffiliatesOptions } from
|
|
7
|
+
import type { AffiliateWithOffers, FetchAffiliatesOptions } from "./types.js";
|
|
8
8
|
/**
|
|
9
9
|
* Fetch all active affiliates for the project
|
|
10
10
|
*
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Exports all affiliate tracking components and utilities.
|
|
5
5
|
*/
|
|
6
|
-
export type { Affiliate, AffiliateOffer, AffiliateWithOffers, FetchAffiliatesOptions } from
|
|
7
|
-
export { fetchAffiliates, getTrackingUrl } from
|
|
8
|
-
export { useAffiliates } from
|
|
9
|
-
export type { UseAffiliatesResult } from
|
|
10
|
-
export { AffiliatesWidget, AffiliateCard } from
|
|
11
|
-
export type { AffiliatesWidgetProps, AffiliateCardProps } from
|
|
6
|
+
export type { Affiliate, AffiliateOffer, AffiliateWithOffers, FetchAffiliatesOptions } from "./types.js";
|
|
7
|
+
export { fetchAffiliates, getTrackingUrl } from "./api.js";
|
|
8
|
+
export { useAffiliates } from "./useAffiliates.js";
|
|
9
|
+
export type { UseAffiliatesResult } from "./useAffiliates.js";
|
|
10
|
+
export { AffiliatesWidget, AffiliateCard } from "./AffiliatesWidget.js";
|
|
11
|
+
export type { AffiliatesWidgetProps, AffiliateCardProps } from "./AffiliatesWidget.js";
|
package/dist/affiliates/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { sonorFetch } from '../chunk-
|
|
3
|
-
import '../chunk-7HW4TZB5.js';
|
|
2
|
+
import { sonorFetch } from '../chunk-VXCUXHZO.js';
|
|
4
3
|
import { getClientApiConfig } from '../chunk-W7OPEMGJ.js';
|
|
5
|
-
import '../chunk-F6WLHVMQ.js';
|
|
6
4
|
import '../chunk-PKBMQBKP.js';
|
|
7
5
|
import { useState, useEffect } from 'react';
|
|
8
6
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* React hook for fetching and displaying affiliates on client sites.
|
|
5
5
|
*/
|
|
6
|
-
import type { AffiliateWithOffers } from
|
|
6
|
+
import type { AffiliateWithOffers } from "./types.js";
|
|
7
7
|
export interface UseAffiliatesResult {
|
|
8
8
|
affiliates: AffiliateWithOffers[];
|
|
9
9
|
isLoading: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { AnalyticsContextValue, TrackEventOptions, TrackConversionOptions } from
|
|
2
|
+
import type { AnalyticsContextValue, TrackEventOptions, TrackConversionOptions } from "./types.js";
|
|
3
3
|
interface AnalyticsProviderProps {
|
|
4
4
|
/**
|
|
5
5
|
* Optional. AnalyticsProvider is normally mounted as a CHILDLESS sibling of
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* below queue until it does. If the provider never mounts, calls no-op after
|
|
14
14
|
* the queue cap — tracking must never break a page.
|
|
15
15
|
*/
|
|
16
|
-
import type { TrackEventOptions, TrackConversionOptions } from
|
|
16
|
+
import type { TrackEventOptions, TrackConversionOptions } from "./types.js";
|
|
17
17
|
interface AnalyticsDispatcher {
|
|
18
18
|
trackEvent: (options: TrackEventOptions) => void;
|
|
19
19
|
trackConversion: (options: TrackConversionOptions) => void;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Analytics tracking for client sites - page views, events, conversions, web vitals
|
|
5
5
|
*/
|
|
6
|
-
export { AnalyticsProvider, useAnalytics, useAnalyticsOptional, useTrackEvent } from
|
|
7
|
-
export { trackEvent, trackConversion } from
|
|
8
|
-
export { WebVitals } from
|
|
9
|
-
export { isCrossOriginFrame, isFramed, isTopFrameSameOrigin } from
|
|
10
|
-
export { useContactTracking, ContactTracking } from
|
|
11
|
-
export * from
|
|
6
|
+
export { AnalyticsProvider, useAnalytics, useAnalyticsOptional, useTrackEvent } from "./AnalyticsProvider.js";
|
|
7
|
+
export { trackEvent, trackConversion } from "./dispatch.js";
|
|
8
|
+
export { WebVitals } from "./WebVitals.js";
|
|
9
|
+
export { isCrossOriginFrame, isFramed, isTopFrameSameOrigin } from "./send-gate.js";
|
|
10
|
+
export { useContactTracking, ContactTracking } from "./useContactTracking.js";
|
|
11
|
+
export * from "./types.js";
|
package/dist/analytics/index.js
CHANGED
|
@@ -1,23 +1,31 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { AnalyticsProvider, WebVitals, useAnalytics, useAnalyticsOptional, useTrackEvent } from '../chunk-
|
|
3
|
-
import { trackConversion } from '../chunk-
|
|
4
|
-
export { trackConversion, trackEvent } from '../chunk-
|
|
5
|
-
import '../chunk-
|
|
2
|
+
export { AnalyticsProvider, WebVitals, useAnalytics, useAnalyticsOptional, useTrackEvent } from '../chunk-SO6RSRUP.js';
|
|
3
|
+
import { trackConversion } from '../chunk-AG2RDHYZ.js';
|
|
4
|
+
export { trackConversion, trackEvent } from '../chunk-AG2RDHYZ.js';
|
|
5
|
+
import '../chunk-JT7GHHMV.js';
|
|
6
6
|
import '../chunk-L2V5PUFN.js';
|
|
7
|
+
import '../chunk-PMXQPO5Q.js';
|
|
8
|
+
import '../chunk-NHDRA4Y5.js';
|
|
9
|
+
import '../chunk-D4M5K6JN.js';
|
|
7
10
|
import '../chunk-GJWI74ZZ.js';
|
|
8
|
-
import '../chunk-
|
|
9
|
-
|
|
11
|
+
import '../chunk-NZOJHERI.js';
|
|
12
|
+
import '../chunk-KMNHNCVG.js';
|
|
13
|
+
import '../chunk-5IVD6G77.js';
|
|
14
|
+
import '../chunk-DXE6SXWW.js';
|
|
15
|
+
export { isCrossOriginFrame, isFramed, isTopFrameSameOrigin } from '../chunk-7643MCD2.js';
|
|
10
16
|
import '../chunk-64XODP7M.js';
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import '../chunk-7HW4TZB5.js';
|
|
17
|
+
import '../chunk-VXCUXHZO.js';
|
|
13
18
|
import '../chunk-W7OPEMGJ.js';
|
|
14
|
-
import '../chunk-
|
|
19
|
+
import '../chunk-A4CC4ZG3.js';
|
|
20
|
+
import { subscribeMeasurementPolicy, measurementPolicySnapshot, serverMeasurementPolicySnapshot, analyticsPurposePermitted } from '../chunk-FRY6PBT6.js';
|
|
15
21
|
import '../chunk-PKBMQBKP.js';
|
|
16
|
-
import { useCallback, useEffect } from 'react';
|
|
22
|
+
import { useSyncExternalStore, useCallback, useEffect } from 'react';
|
|
17
23
|
|
|
18
24
|
function useContactTracking(options = {}) {
|
|
19
25
|
const { autoTrack = true, debug = false } = options;
|
|
26
|
+
const policy = useSyncExternalStore(subscribeMeasurementPolicy, measurementPolicySnapshot, serverMeasurementPolicySnapshot);
|
|
20
27
|
const trackPhoneClick = useCallback((phoneNumber, metadata) => {
|
|
28
|
+
if (!analyticsPurposePermitted()) return;
|
|
21
29
|
if (debug) console.log("[Analytics] Phone click:", phoneNumber);
|
|
22
30
|
trackConversion({
|
|
23
31
|
type: "phone_call",
|
|
@@ -30,6 +38,7 @@ function useContactTracking(options = {}) {
|
|
|
30
38
|
});
|
|
31
39
|
}, [debug]);
|
|
32
40
|
const trackEmailClick = useCallback((email, metadata) => {
|
|
41
|
+
if (!analyticsPurposePermitted()) return;
|
|
33
42
|
if (debug) console.log("[Analytics] Email click:", email);
|
|
34
43
|
trackConversion({
|
|
35
44
|
type: "email_click",
|
|
@@ -40,8 +49,9 @@ function useContactTracking(options = {}) {
|
|
|
40
49
|
});
|
|
41
50
|
}, [debug]);
|
|
42
51
|
useEffect(() => {
|
|
43
|
-
if (!autoTrack || typeof document === "undefined") return;
|
|
52
|
+
if (!autoTrack || typeof document === "undefined" || !analyticsPurposePermitted()) return;
|
|
44
53
|
const handleClick = (e) => {
|
|
54
|
+
if (!analyticsPurposePermitted()) return;
|
|
45
55
|
const target = e.target;
|
|
46
56
|
const anchor = target.closest("a");
|
|
47
57
|
if (!anchor) return;
|
|
@@ -65,7 +75,7 @@ function useContactTracking(options = {}) {
|
|
|
65
75
|
return () => {
|
|
66
76
|
document.removeEventListener("click", handleClick, { capture: true });
|
|
67
77
|
};
|
|
68
|
-
}, [autoTrack, trackPhoneClick, trackEmailClick]);
|
|
78
|
+
}, [autoTrack, trackPhoneClick, trackEmailClick, policy.collectionEpoch]);
|
|
69
79
|
return {
|
|
70
80
|
trackPhoneClick,
|
|
71
81
|
trackEmailClick
|