@sonordev/site-kit 8.8.0 → 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 +22 -0
- package/README.md +9 -0
- package/agent-manifest.json +8 -1
- 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-LQJC5S2M.js → chunk-J6D3NEDE.js} +57 -0
- 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/route.d.ts +8 -0
- package/dist/og/route.js +1 -1
- 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/route.d.ts +1 -1
- package/dist/seo/og/route.js +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/og/README.md +28 -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-SHAUX2MQ.js +0 -163
- /package/dist/{chunk-3MJNBOUO.js → chunk-2QPVU63T.js} +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** Single page-wide consent state, shared by direct readers and the policy facade. No I/O. */
|
|
2
|
+
import type { ResonanceMeasurementConfig, ResonanceConsentResponse } from "../contracts/resonance.js";
|
|
3
|
+
export declare const MEASUREMENT_PURPOSES: readonly ['analytics_storage', 'ad_storage', 'ad_user_data', 'ad_personalization'];
|
|
4
|
+
export type MeasurementPurpose = typeof MEASUREMENT_PURPOSES[number];
|
|
5
|
+
export type PurposeChoice = 'unknown' | 'granted' | 'denied' | 'withdrawn';
|
|
6
|
+
export type PurposeChoices = Record<MeasurementPurpose, PurposeChoice>;
|
|
7
|
+
export declare const unknownChoices: () => PurposeChoices;
|
|
8
|
+
export interface MeasurementPolicyState {
|
|
9
|
+
version: number;
|
|
10
|
+
collectionEpoch: number;
|
|
11
|
+
analyticsChoiceEpoch: number;
|
|
12
|
+
policy: 'legacy_unconfigured' | 'resolving' | 'configured';
|
|
13
|
+
config: ResonanceMeasurementConfig | null;
|
|
14
|
+
analyticsRequired: boolean;
|
|
15
|
+
choices: PurposeChoices;
|
|
16
|
+
cmpValid: boolean;
|
|
17
|
+
preferencePending: boolean;
|
|
18
|
+
proof: ResonanceConsentResponse | null;
|
|
19
|
+
identityScope: string | null;
|
|
20
|
+
}
|
|
21
|
+
export declare const initialMeasurementPolicy: MeasurementPolicyState;
|
|
22
|
+
interface MeasurementStore {
|
|
23
|
+
current: MeasurementPolicyState;
|
|
24
|
+
primed: boolean;
|
|
25
|
+
lastObservedAnalyticsChoice: PurposeChoice;
|
|
26
|
+
listeners: Set<() => void>;
|
|
27
|
+
}
|
|
28
|
+
export declare const measurementStore: MeasurementStore;
|
|
29
|
+
/** Prime the first browser runtime render before any child identity effects. No I/O or notifications. */
|
|
30
|
+
export declare function primeMeasurementPolicy(): void;
|
|
31
|
+
export declare const measurementPolicySnapshot: () => MeasurementPolicyState;
|
|
32
|
+
export declare const serverMeasurementPolicySnapshot: () => MeasurementPolicyState;
|
|
33
|
+
export declare const subscribeMeasurementPolicy: (listener: () => void) => (() => void);
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { MeasurementPolicyState } from "./measurement-store.js";
|
|
2
|
+
export declare function updateMeasurementPolicy(patch: Partial<Omit<MeasurementPolicyState, 'version'>>): void;
|
|
3
|
+
/** Used by the server-resolved layout only for first-party identity namespacing, never ad authority. */
|
|
4
|
+
export declare function setFirstPartyIdentityScope(projectId: string | undefined, site: string): void;
|
|
5
|
+
/** A reset never implies a grant; used at scope teardown and in isolated harnesses. */
|
|
6
|
+
export declare function resetMeasurementPolicy(): void;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* Client-safe: no `server-only` guard, SSR-safe (every write is window-gated).
|
|
19
19
|
* The minting half is server-only and lives in `../server/mint-site-token`.
|
|
20
20
|
*/
|
|
21
|
-
import { resolveSiteHost } from
|
|
21
|
+
import { resolveSiteHost } from "../sites/resolve.js";
|
|
22
22
|
/**
|
|
23
23
|
* Re-exported so the client-side callers below and every existing importer keep
|
|
24
24
|
* a single name for this. The implementation lives in `../sites/resolve` — the
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
/** A server-rendered marker keeps private drafts out of every reporting path. */
|
|
7
7
|
export declare function isPrivatePreview(): boolean;
|
|
8
|
+
/** Single source of truth for "this is a local browser host"; the gate and the Meta loader both ask it. */
|
|
9
|
+
export declare function isLocalHostname(raw: string): boolean;
|
|
8
10
|
/** Resolved destination for an analytics send. */
|
|
9
11
|
export interface AnalyticsTarget {
|
|
10
12
|
apiUrl: string;
|
|
@@ -30,7 +32,7 @@ export interface AnalyticsGateOptions {
|
|
|
30
32
|
/** Emit the one-time diagnostic when a send is suppressed. */
|
|
31
33
|
debug?: boolean;
|
|
32
34
|
}
|
|
33
|
-
export { isCrossOriginFrame, isFramed, isTopFrameSameOrigin } from
|
|
35
|
+
export { isCrossOriginFrame, isFramed, isTopFrameSameOrigin } from "./frame.js";
|
|
34
36
|
/** Test seam — resets the once-per-document log latch. */
|
|
35
37
|
export declare function __resetSendGate(): void;
|
|
36
38
|
/**
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Canonical pure token claim helpers; no state, storage or requests. */
|
|
2
|
+
export declare const SITE_TOKEN_PREFIX = "st1.";
|
|
3
|
+
export declare function isSiteToken(credential?: string | null): boolean;
|
|
4
|
+
interface DecodedClaims {
|
|
5
|
+
pid?: string;
|
|
6
|
+
iat?: number;
|
|
7
|
+
exp?: number;
|
|
8
|
+
}
|
|
9
|
+
/** Decode the (non-secret) token payload. Returns null if not a token / malformed. */
|
|
10
|
+
export declare function decodeSiteTokenClaims(token?: string | null): DecodedClaims | null;
|
|
11
|
+
/**
|
|
12
|
+
* Stable id for the auth circuit breaker. Tokens rotate, so keying the breaker
|
|
13
|
+
* by the raw value would reset it every refresh — key by the project id encoded
|
|
14
|
+
* in the token instead. Raw keys use a safe prefix.
|
|
15
|
+
*/
|
|
16
|
+
export declare function credentialBreakerId(credential?: string | null): string;
|
|
17
|
+
export declare function tokenExp(token: string | null): number;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function storeToken(token: string): void;
|
|
2
|
+
/**
|
|
3
|
+
* Configure the manager from the layout-injected values. Adopts a fresher token
|
|
4
|
+
* from sessionStorage if a prior page in this session already refreshed.
|
|
5
|
+
*/
|
|
6
|
+
export declare function configureSiteCredential(opts: {
|
|
7
|
+
credential?: string;
|
|
8
|
+
apiUrl?: string;
|
|
9
|
+
}): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Refresh now (deduped). Returns the new token, or null on failure. */
|
|
2
|
+
export declare function refreshSiteToken(): Promise<string | null>;
|
|
3
|
+
/**
|
|
4
|
+
* The credential to put on the next request. In token mode, refreshes a stale
|
|
5
|
+
* seed first. In raw-key mode, returns the seed unchanged (legacy passthrough).
|
|
6
|
+
*/
|
|
7
|
+
export declare function getFreshCredential(seed?: string): Promise<string | undefined>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Existing page-wide token state and synchronous read-only access. */
|
|
2
|
+
interface TokenState {
|
|
3
|
+
/** The credential injected by the layout (token or raw key). */
|
|
4
|
+
seed: string | undefined;
|
|
5
|
+
/** Whether we're in token mode (seed is a token). */
|
|
6
|
+
isToken: boolean;
|
|
7
|
+
/** Base API URL for the refresh endpoint. */
|
|
8
|
+
apiUrl: string;
|
|
9
|
+
/** The freshest known token (>= seed). Null in raw-key mode. */
|
|
10
|
+
token: string | null;
|
|
11
|
+
/** In-flight refresh, deduped. */
|
|
12
|
+
refreshing: Promise<string | null> | null;
|
|
13
|
+
}
|
|
14
|
+
export declare const siteTokenState: TokenState;
|
|
15
|
+
/** Whether the given credential is being managed as a token. */
|
|
16
|
+
export declare function isTokenMode(): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Best-known credential WITHOUT refreshing — for synchronous unload paths
|
|
19
|
+
* (sonorBeacon) that can't await. In token mode returns the freshest token held;
|
|
20
|
+
* in raw-key mode returns the seed.
|
|
21
|
+
*/
|
|
22
|
+
export declare function currentCredential(seed?: string): string | undefined;
|
|
23
|
+
export {};
|
|
@@ -1,39 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exp?: number;
|
|
7
|
-
}
|
|
8
|
-
/** Decode the (non-secret) token payload. Returns null if not a token / malformed. */
|
|
9
|
-
export declare function decodeSiteTokenClaims(token?: string | null): DecodedClaims | null;
|
|
10
|
-
/**
|
|
11
|
-
* Stable id for the auth circuit breaker. Tokens rotate, so keying the breaker
|
|
12
|
-
* by the raw value would reset it every refresh — key by the project id encoded
|
|
13
|
-
* in the token instead. Raw keys use a safe prefix.
|
|
14
|
-
*/
|
|
15
|
-
export declare function credentialBreakerId(credential?: string | null): string;
|
|
16
|
-
/**
|
|
17
|
-
* Configure the manager from the layout-injected values. Adopts a fresher token
|
|
18
|
-
* from sessionStorage if a prior page in this session already refreshed.
|
|
19
|
-
*/
|
|
20
|
-
export declare function configureSiteCredential(opts: {
|
|
21
|
-
credential?: string;
|
|
22
|
-
apiUrl?: string;
|
|
23
|
-
}): void;
|
|
24
|
-
/** Refresh now (deduped). Returns the new token, or null on failure. */
|
|
25
|
-
export declare function refreshSiteToken(): Promise<string | null>;
|
|
26
|
-
/**
|
|
27
|
-
* The credential to put on the next request. In token mode, refreshes a stale
|
|
28
|
-
* seed first. In raw-key mode, returns the seed unchanged (legacy passthrough).
|
|
29
|
-
*/
|
|
30
|
-
export declare function getFreshCredential(seed?: string): Promise<string | undefined>;
|
|
31
|
-
/** Whether the given credential is being managed as a token. */
|
|
32
|
-
export declare function isTokenMode(): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Best-known credential WITHOUT refreshing — for synchronous unload paths
|
|
35
|
-
* (sonorBeacon) that can't await. In token mode returns the freshest token held;
|
|
36
|
-
* in raw-key mode returns the seed.
|
|
37
|
-
*/
|
|
38
|
-
export declare function currentCredential(seed?: string): string | undefined;
|
|
39
|
-
export {};
|
|
1
|
+
/** Compatibility facade; state, claims, configuration and refresh each retain one owner. */
|
|
2
|
+
export { SITE_TOKEN_PREFIX, isSiteToken, decodeSiteTokenClaims, credentialBreakerId } from "./site-token-claims.js";
|
|
3
|
+
export { configureSiteCredential } from "./site-token-configuration.js";
|
|
4
|
+
export { isTokenMode, currentCredential } from "./site-token-state.js";
|
|
5
|
+
export { refreshSiteToken, getFreshCredential } from "./site-token-refresh.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fire-and-forget telemetry that survives page unload.
|
|
3
|
+
*
|
|
4
|
+
* Uses fetch({ keepalive: true }) so auth travels in headers. Falls back to
|
|
5
|
+
* navigator.sendBeacon (no auth headers possible — the server may reject it,
|
|
6
|
+
* but we never put the key in the URL) only when keepalive fetch is missing.
|
|
7
|
+
*
|
|
8
|
+
* Cannot await a refresh at unload time, so it sends the freshest token already
|
|
9
|
+
* held (currentCredential) rather than the possibly-stale seed the caller passed.
|
|
10
|
+
*/
|
|
11
|
+
export declare function sonorBeacon(url: string, payload: unknown, apiKey?: string): void;
|
|
12
|
+
/** Internal telemetry seam. Public sonorBeacon keeps its existing signature. */
|
|
13
|
+
export declare function sonorBeaconWithContext(url: string, payload: unknown, apiKey: string | undefined, contextHeaders: Record<string, string>): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Async public dispatch shell; permission is checked on both sides of deferred loading. */
|
|
2
|
+
import type { FetchRetryOptions } from './fetchWithRetry.js';
|
|
3
|
+
export interface SonorFetchOptions extends FetchRetryOptions {
|
|
4
|
+
/** Project credential, resolved through the existing token owner. */
|
|
5
|
+
apiKey?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function sonorFetch(url: string, init?: RequestInit, options?: SonorFetchOptions): Promise<Response>;
|
|
@@ -1,49 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* Every client-side module (analytics, forms, engage, maps, images,
|
|
6
|
-
* SitemapSync) routes through here instead of bare fetch(), and so do the kits
|
|
7
|
-
* that build on site-kit (commerce-kit), through `@sonordev/site-kit/runtime`.
|
|
8
|
-
* That gives the whole kit family, in one place:
|
|
9
|
-
*
|
|
10
|
-
* - per-attempt timeout + retry with backoff (via fetchWithRetry) — a hung
|
|
11
|
-
* request left to the browser's own network timeout logs a console error
|
|
12
|
-
* (net::ERR_TIMED_OUT) that fails Lighthouse best-practices
|
|
13
|
-
* - the x-sitekit-version header on every request, so the platform can see
|
|
14
|
-
* which kit version each site actually runs from live traffic
|
|
15
|
-
* - CREDENTIAL LIFECYCLE: sites on 3.2+ ship a short-lived minted token instead
|
|
16
|
-
* of the raw key. This transport resolves the freshest token (refreshing a
|
|
17
|
-
* stale seed transparently), and on a 401/403 for a token it refreshes once
|
|
18
|
-
* and retries before giving up. A raw key (2.x kit, or the mint-failed
|
|
19
|
-
* fallback) is a pure passthrough — legacy behavior is unchanged.
|
|
20
|
-
* - an auth circuit breaker: after a 401/403 the credential is paused for a few
|
|
21
|
-
* minutes and ONE friendly console.info is emitted — a site on a stale or
|
|
22
|
-
* canceled key must not spam the API or the visitor's console. Keyed by the
|
|
23
|
-
* project (from the token) so it survives token rotation.
|
|
24
|
-
* - sonorBeacon for unload-time telemetry that keeps the credential in headers;
|
|
25
|
-
* navigator.sendBeacon can't set headers and forced the key into the URL,
|
|
26
|
-
* where server and CDN access logs capture it
|
|
27
|
-
*
|
|
28
|
-
* Non-idempotent endpoints (checkout, payment intents, uploads) must pass
|
|
29
|
-
* { retries: 0 } — they still get the timeout, but never an automatic retry.
|
|
30
|
-
*/
|
|
31
|
-
import { type FetchRetryOptions } from './fetchWithRetry';
|
|
32
|
-
export interface SonorFetchOptions extends FetchRetryOptions {
|
|
33
|
-
/** Project credential — the minted token (3.2+) or raw key. Sent as x-api-key. */
|
|
34
|
-
apiKey?: string;
|
|
35
|
-
}
|
|
36
|
-
/** True when a previous 401/403 has paused this credential (browser only). */
|
|
37
|
-
export declare function isAuthPaused(credential?: string): boolean;
|
|
38
|
-
export declare function sonorFetch(url: string, init?: RequestInit, options?: SonorFetchOptions): Promise<Response>;
|
|
39
|
-
/**
|
|
40
|
-
* Fire-and-forget telemetry that survives page unload.
|
|
41
|
-
*
|
|
42
|
-
* Uses fetch({ keepalive: true }) so auth travels in headers. Falls back to
|
|
43
|
-
* navigator.sendBeacon (no auth headers possible — the server may reject it,
|
|
44
|
-
* but we never put the key in the URL) only when keepalive fetch is missing.
|
|
45
|
-
*
|
|
46
|
-
* Cannot await a refresh at unload time, so it sends the freshest token already
|
|
47
|
-
* held (currentCredential) rather than the possibly-stale seed the caller passed.
|
|
48
|
-
*/
|
|
49
|
-
export declare function sonorBeacon(url: string, payload: unknown, apiKey?: string): void;
|
|
1
|
+
/** Compatibility facade; fetch execution, synchronous breaker and unload behavior keep their canonical owners. */
|
|
2
|
+
export { sonorFetch, type SonorFetchOptions } from "./sonor-fetch.js";
|
|
3
|
+
export { isAuthPaused } from "./sonor-auth-state.js";
|
|
4
|
+
export { sonorBeacon, sonorBeaconWithContext } from "./sonor-beacon.js";
|
package/dist/shared/version.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SignalExperimentProps } from "./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 {};
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
* possible, so it starts loading on hydration.
|
|
20
20
|
*/
|
|
21
21
|
import React from 'react';
|
|
22
|
-
import type { SignalConfig, SignalBridgeProps,
|
|
23
|
-
export { useSignal } from
|
|
22
|
+
import type { SignalConfig, SignalBridgeProps, ExperimentAssignment } from "./types.js";
|
|
23
|
+
export { useSignal } from "./store.js";
|
|
24
24
|
export declare function SignalBridge({ enabled, realtime, experiments, behaviorTracking, visitorId: externalVisitorId, sessionId: externalSessionId, pageMetadataRef, children, }: SignalBridgeProps): React.JSX.Element;
|
|
25
25
|
/**
|
|
26
26
|
* Hook to access Signal config
|
|
@@ -29,12 +29,12 @@ export declare function useSignalConfig(): SignalConfig | null;
|
|
|
29
29
|
/**
|
|
30
30
|
* Hook for tracking events
|
|
31
31
|
*/
|
|
32
|
-
export declare function useSignalEvent(): (event: Partial<SignalEvent>) => void;
|
|
32
|
+
export declare function useSignalEvent(): (event: Partial<import("./types.js").SignalEvent>) => void;
|
|
33
33
|
/**
|
|
34
34
|
* Hook for tracking outcomes/conversions
|
|
35
35
|
*/
|
|
36
36
|
export declare function useSignalOutcome(): {
|
|
37
|
-
trackOutcome: (outcome: SignalOutcome) => void;
|
|
37
|
+
trackOutcome: (outcome: import("./types.js").SignalOutcome) => void;
|
|
38
38
|
};
|
|
39
39
|
/**
|
|
40
40
|
* Hook for experiment assignment
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* off the critical hydration chunk. It reports state up to the shell via
|
|
9
9
|
* `onState` and registers its imperative API via `onRegister`.
|
|
10
10
|
*/
|
|
11
|
-
import type { SignalConfig, SignalEvent, SignalOutcome, ExperimentAssignment } from
|
|
11
|
+
import type { SignalConfig, SignalEvent, SignalOutcome, ExperimentAssignment } from "./types.js";
|
|
12
12
|
export interface SignalCoreApi {
|
|
13
13
|
trackEvent: (event: Partial<SignalEvent>) => void;
|
|
14
14
|
trackOutcome: (outcome: SignalOutcome) => void;
|
|
@@ -16,6 +16,7 @@ export interface SignalCoreApi {
|
|
|
16
16
|
refreshConfig: () => Promise<void>;
|
|
17
17
|
}
|
|
18
18
|
export interface SignalCoreState {
|
|
19
|
+
assignmentRevision: number;
|
|
19
20
|
config: SignalConfig | null;
|
|
20
21
|
loading: boolean;
|
|
21
22
|
error: Error | null;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* @sonordev/site-kit/signal - SignalExperiment
|
|
3
3
|
*
|
|
4
4
|
* A/B test component that renders different variants based on Signal assignment.
|
|
5
|
-
* Uses
|
|
5
|
+
* Uses the assignment selected by the existing server experiment service.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
interface SignalExperimentProps {
|
|
8
|
+
export interface SignalExperimentProps {
|
|
9
9
|
/** Unique experiment ID */
|
|
10
10
|
experimentId: string;
|
|
11
11
|
/** Variants to test - keys are variant names, values are React nodes */
|
|
@@ -14,6 +14,15 @@ interface SignalExperimentProps {
|
|
|
14
14
|
fallback?: React.ReactNode;
|
|
15
15
|
/** Track impression automatically */
|
|
16
16
|
trackImpression?: boolean;
|
|
17
|
+
/** Reviewed bounded nodes only; native owners authenticate the content and
|
|
18
|
+
* original publication. Existing native version identity fences local cleanup. */
|
|
19
|
+
reviewedContext?: {
|
|
20
|
+
site: string;
|
|
21
|
+
pagePath: string;
|
|
22
|
+
pageVersionId: string;
|
|
23
|
+
experimentRevision: number;
|
|
24
|
+
controlVariantKey: string;
|
|
25
|
+
};
|
|
17
26
|
/** Children function for more control */
|
|
18
27
|
children?: (props: {
|
|
19
28
|
variant: string;
|
|
@@ -39,7 +48,7 @@ interface SignalExperimentProps {
|
|
|
39
48
|
* )}
|
|
40
49
|
* </SignalExperiment>
|
|
41
50
|
*/
|
|
42
|
-
export declare function SignalExperiment(
|
|
51
|
+
export declare function SignalExperiment(props: SignalExperimentProps): React.JSX.Element;
|
|
43
52
|
/**
|
|
44
53
|
* Hook for conditional experiment logic
|
|
45
54
|
*
|
|
@@ -51,7 +60,7 @@ export declare function SignalExperiment({ experimentId, variants, fallback, tra
|
|
|
51
60
|
* : <NewPricing showAnnual={variant === 'annual_first'} />
|
|
52
61
|
*/
|
|
53
62
|
export declare function useExperimentVariant(experimentId: string): {
|
|
54
|
-
assignment: import("./types").ExperimentAssignment | null;
|
|
63
|
+
assignment: import("./types.js").ExperimentAssignment | null;
|
|
55
64
|
variant: string | null;
|
|
56
65
|
isControl: boolean;
|
|
57
66
|
};
|
|
@@ -83,4 +92,3 @@ export declare function ExperimentConversion({ experimentId, outcomeType, value,
|
|
|
83
92
|
}): React.ReactElement<{
|
|
84
93
|
onClick?: (e: React.MouseEvent) => void;
|
|
85
94
|
}, string | React.JSXElementConstructor<any>>;
|
|
86
|
-
export {};
|
package/dist/signal/index.d.ts
CHANGED
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* Enable autonomous optimization, A/B testing, and real-time configuration
|
|
5
5
|
* updates powered by Signal AI.
|
|
6
6
|
*/
|
|
7
|
-
export { SignalBridge, useSignal, useSignalConfig, useSignalEvent, useSignalOutcome, useSignalExperiment, } from
|
|
8
|
-
export { SignalExperiment, useExperimentVariant, ExperimentConversion, } from
|
|
9
|
-
export * from
|
|
7
|
+
export { SignalBridge, useSignal, useSignalConfig, useSignalEvent, useSignalOutcome, useSignalExperiment, } from "./SignalBridge.js";
|
|
8
|
+
export { SignalExperiment, useExperimentVariant, ExperimentConversion, } from "./SignalExperiment.js";
|
|
9
|
+
export * from "./types.js";
|
package/dist/signal/index.js
CHANGED
|
@@ -1,75 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
export { SignalBridge, useSignal, useSignalConfig, useSignalEvent, useSignalExperiment, useSignalOutcome } from '../chunk-
|
|
2
|
+
export { ExperimentConversion, SignalExperiment, useExperimentVariant } from '../chunk-F3RKFGRW.js';
|
|
3
|
+
export { SignalBridge, useSignal, useSignalConfig, useSignalEvent, useSignalExperiment, useSignalOutcome } from '../chunk-HJD6KXKH.js';
|
|
4
|
+
import '../chunk-MOACHHOJ.js';
|
|
5
|
+
import '../chunk-FRY6PBT6.js';
|
|
4
6
|
import '../chunk-PKBMQBKP.js';
|
|
5
|
-
import React, { useEffect } from 'react';
|
|
6
|
-
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
function SignalExperiment({
|
|
9
|
-
experimentId,
|
|
10
|
-
variants,
|
|
11
|
-
fallback,
|
|
12
|
-
trackImpression = true,
|
|
13
|
-
children
|
|
14
|
-
}) {
|
|
15
|
-
const { assignment, variant, isControl } = useSignalExperiment(experimentId);
|
|
16
|
-
const trackEvent = useSignalEvent();
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
if (trackImpression && variant) {
|
|
19
|
-
trackEvent({
|
|
20
|
-
event_type: "experiment",
|
|
21
|
-
event_name: "impression",
|
|
22
|
-
event_data: {
|
|
23
|
-
experiment_id: experimentId,
|
|
24
|
-
variant_key: variant
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}, [experimentId, variant, trackImpression, trackEvent]);
|
|
29
|
-
if (children) {
|
|
30
|
-
return /* @__PURE__ */ jsx(Fragment, { children: children({ variant: variant || "control", isControl }) });
|
|
31
|
-
}
|
|
32
|
-
const selectedVariant = variant || "control";
|
|
33
|
-
const content = variants[selectedVariant];
|
|
34
|
-
if (content !== void 0) {
|
|
35
|
-
return /* @__PURE__ */ jsx(Fragment, { children: content });
|
|
36
|
-
}
|
|
37
|
-
if (fallback) {
|
|
38
|
-
return /* @__PURE__ */ jsx(Fragment, { children: fallback });
|
|
39
|
-
}
|
|
40
|
-
return /* @__PURE__ */ jsx(Fragment, { children: variants.control || null });
|
|
41
|
-
}
|
|
42
|
-
function useExperimentVariant(experimentId) {
|
|
43
|
-
return useSignalExperiment(experimentId);
|
|
44
|
-
}
|
|
45
|
-
function ExperimentConversion({
|
|
46
|
-
experimentId,
|
|
47
|
-
outcomeType = "click",
|
|
48
|
-
value,
|
|
49
|
-
children
|
|
50
|
-
}) {
|
|
51
|
-
const trackEvent = useSignalEvent();
|
|
52
|
-
const { variant } = useSignalExperiment(experimentId);
|
|
53
|
-
const handleInteraction = () => {
|
|
54
|
-
trackEvent({
|
|
55
|
-
event_type: "experiment",
|
|
56
|
-
event_name: "conversion",
|
|
57
|
-
event_data: {
|
|
58
|
-
experiment_id: experimentId,
|
|
59
|
-
variant_key: variant,
|
|
60
|
-
outcome_type: outcomeType,
|
|
61
|
-
value
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
return React.cloneElement(children, {
|
|
66
|
-
onClick: (e) => {
|
|
67
|
-
handleInteraction();
|
|
68
|
-
if (children.props.onClick) {
|
|
69
|
-
children.props.onClick(e);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export { ExperimentConversion, SignalExperiment, useExperimentVariant };
|
package/dist/signal/store.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { SignalCoreApi, SignalCoreState } from "./SignalCore.js";
|
|
2
|
+
import type { SignalContextValue } from "./types.js";
|
|
3
|
+
/** Stable methods survive pre-mount, pre-core and state publications without copying a queue. */
|
|
4
|
+
export declare const signalQueueApi: SignalCoreApi;
|
|
5
|
+
/** Core registration drains once, checking current permission/epoch before each queued item. */
|
|
6
|
+
export declare function registerSignalCore(api: SignalCoreApi | null): void;
|
|
7
|
+
/** State publication does not drain a second queue or replay registration. */
|
|
3
8
|
export declare function publishSignal(value: SignalContextValue): void;
|
|
4
|
-
/**
|
|
9
|
+
/** Existing core effect publishes UI state directly; assignment revisions still notify subscribers. */
|
|
10
|
+
export declare function publishSignalCoreState(state: SignalCoreState): void;
|
|
5
11
|
export declare function resetSignal(): void;
|
|
6
|
-
/**
|
|
7
|
-
* Access Signal (experiments, behavioral events) from anywhere in the tree.
|
|
8
|
-
* No provider required — see module docs for pre-mount buffering semantics.
|
|
9
|
-
*/
|
|
12
|
+
/** Available before a bridge mounts; content and hooks never wait for the core chunk. */
|
|
10
13
|
export declare function useSignal(): SignalContextValue;
|
package/dist/signal/types.d.ts
CHANGED
|
@@ -131,6 +131,10 @@ export interface ExperimentVariant {
|
|
|
131
131
|
description?: string;
|
|
132
132
|
}
|
|
133
133
|
export interface ExperimentAssignment {
|
|
134
|
+
/** Server-issued managed witness; absent on legacy assignments. */
|
|
135
|
+
assignment_id?: string;
|
|
136
|
+
experiment_revision?: number;
|
|
137
|
+
site?: string;
|
|
134
138
|
/** Experiment ID */
|
|
135
139
|
experiment_id: string;
|
|
136
140
|
/** Assigned variant key */
|
package/dist/sitemap/index.d.ts
CHANGED
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
* })
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
import type { PublicationRoutingOptions } from
|
|
24
|
-
import { type PageType } from
|
|
25
|
-
export type { PageType } from
|
|
23
|
+
import type { PublicationRoutingOptions } from "../articles/routes.js";
|
|
24
|
+
import { type PageType } from "./shared.js";
|
|
25
|
+
export type { PageType } from "./shared.js";
|
|
26
26
|
export interface SitemapEntry {
|
|
27
27
|
url: string;
|
|
28
28
|
lastModified?: Date | string;
|
|
@@ -140,7 +140,7 @@ export interface SitemapConfig {
|
|
|
140
140
|
*/
|
|
141
141
|
llmsAgentAccess?: boolean;
|
|
142
142
|
/** When Sonor returns empty services, use this to supply local site data for llms.txt */
|
|
143
|
-
getLocalData?: () => Promise<import(
|
|
143
|
+
getLocalData?: () => Promise<import("../llms/types.js").LLMsDataResponse | null>;
|
|
144
144
|
/** Pass-through to GET /api/public/llms/txt?publicSummaryOnly=true and local llms fallback */
|
|
145
145
|
llmsPublicSummaryOnly?: boolean;
|
|
146
146
|
/**
|
|
@@ -149,7 +149,7 @@ export interface SitemapConfig {
|
|
|
149
149
|
* to publish the site's verified citation registry as a "Sourced facts"
|
|
150
150
|
* section AI answer engines can quote with attribution.
|
|
151
151
|
*/
|
|
152
|
-
llmsCustomSections?: import(
|
|
152
|
+
llmsCustomSections?: import("../llms/writeLLMsTxt.js").WriteLLMsTxtOptions['customSections'];
|
|
153
153
|
/** Use Signal AI visibility scores to compute page priority (40% visibility + 30% depth + 30% base) */
|
|
154
154
|
intelligentPriority?: boolean;
|
|
155
155
|
/**
|
package/dist/sitemap/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { createSitemap, getPortfolioPaths, syncSitemapToPortal } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { createSitemap, getPortfolioPaths, syncSitemapToPortal } from '../chunk-YVEYO3OD.js';
|
|
2
|
+
import '../chunk-QLJ2SC3T.js';
|
|
3
3
|
import '../chunk-EK7P62DT.js';
|
|
4
4
|
import '../chunk-Z22QVHT4.js';
|
|
5
5
|
import '../chunk-7DYMM6SS.js';
|
|
@@ -13,6 +13,6 @@ import '../chunk-ZEGVKVD5.js';
|
|
|
13
13
|
import '../chunk-YVKRYQRG.js';
|
|
14
14
|
import '../chunk-DIKNRN34.js';
|
|
15
15
|
import '../chunk-FESKKJAS.js';
|
|
16
|
-
import '../chunk-A4CC4ZG3.js';
|
|
17
16
|
import '../chunk-W7OPEMGJ.js';
|
|
17
|
+
import '../chunk-A4CC4ZG3.js';
|
|
18
18
|
import '../chunk-PKBMQBKP.js';
|
package/dist/sites/contract.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "../contracts/sites.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "../contracts/sites-normalize.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type SlotLinkValue } from
|
|
3
|
-
import type { SlotResolveOptions } from
|
|
2
|
+
import { type SlotLinkValue } from "./contract.js";
|
|
3
|
+
import type { SlotResolveOptions } from "./server-api.js";
|
|
4
4
|
export interface ManagedLinkProps extends Omit<SlotResolveOptions, 'fallback' | 'type' | 'fallbackValue'> {
|
|
5
5
|
/** Stable slot id, e.g. "home-hero-cta". */
|
|
6
6
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type SlotListItem } from
|
|
3
|
-
import type { SlotResolveOptions } from
|
|
2
|
+
import { type SlotListItem } from "./contract.js";
|
|
3
|
+
import type { SlotResolveOptions } from "./server-api.js";
|
|
4
4
|
export interface ManagedListProps extends Omit<SlotResolveOptions, 'fallback' | 'type' | 'fallbackValue'> {
|
|
5
5
|
/** Stable slot id, e.g. "home-services" or "gallery". */
|
|
6
6
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { SlotResolveOptions } from
|
|
2
|
+
import type { SlotResolveOptions } from "./server-api.js";
|
|
3
3
|
export interface ManagedRichTextProps extends Omit<SlotResolveOptions, 'fallback' | 'type' | 'fallbackValue'> {
|
|
4
4
|
/** Stable slot id, lowercase, page-scoped by convention (e.g. "about-intro"). */
|
|
5
5
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { SlotResolveOptions } from
|
|
2
|
+
import type { SlotResolveOptions } from "./server-api.js";
|
|
3
3
|
export interface ManagedSlotProps extends Omit<SlotResolveOptions, 'fallback'> {
|
|
4
4
|
/** Stable slot id, lowercase, page-scoped by convention (e.g. "home-hero-headline"). */
|
|
5
5
|
id: string;
|
package/dist/slots/contract.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "../contracts/slots.js";
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* to serve one editor). The edit overlay finds each slot the way a person
|
|
8
8
|
* would, by its visible text, using the needles from `slotNeedles`.
|
|
9
9
|
*/
|
|
10
|
-
import { type EditableSlot } from
|
|
10
|
+
import { type EditableSlot } from "../../contracts/site-edit.js";
|
|
11
11
|
export interface LocatedSlot {
|
|
12
12
|
key: string;
|
|
13
13
|
/** The element to outline and click. */
|