@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
package/dist/chunk-7HW4TZB5.js
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { SITE_KIT_VERSION } from './chunk-F6WLHVMQ.js';
|
|
2
|
-
|
|
3
|
-
// src/shared/siteToken.ts
|
|
4
|
-
var SITE_TOKEN_PREFIX = "st1.";
|
|
5
|
-
var REFRESH_SKEW_MS = 5 * 6e4;
|
|
6
|
-
var REFRESH_TIMEOUT_MS = 6e3;
|
|
7
|
-
var STORAGE_KEY = "__sonor_site_token__";
|
|
8
|
-
function isSiteToken(credential) {
|
|
9
|
-
return typeof credential === "string" && credential.startsWith(SITE_TOKEN_PREFIX);
|
|
10
|
-
}
|
|
11
|
-
function decodeSiteTokenClaims(token) {
|
|
12
|
-
if (!isSiteToken(token)) return null;
|
|
13
|
-
const seg = token.split(".")[1];
|
|
14
|
-
if (!seg) return null;
|
|
15
|
-
try {
|
|
16
|
-
const b64 = seg.replace(/-/g, "+").replace(/_/g, "/");
|
|
17
|
-
const json = typeof atob === "function" ? atob(b64) : Buffer.from(seg, "base64url").toString("utf8");
|
|
18
|
-
const claims = JSON.parse(json);
|
|
19
|
-
return typeof claims === "object" && claims ? claims : null;
|
|
20
|
-
} catch {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function credentialBreakerId(credential) {
|
|
25
|
-
if (!credential) return "(anonymous)";
|
|
26
|
-
const claims = decodeSiteTokenClaims(credential);
|
|
27
|
-
if (claims?.pid) return `pid:${claims.pid}`;
|
|
28
|
-
return credential.slice(0, 16);
|
|
29
|
-
}
|
|
30
|
-
function initialTokenState() {
|
|
31
|
-
return {
|
|
32
|
-
seed: void 0,
|
|
33
|
-
isToken: false,
|
|
34
|
-
apiUrl: "https://api.sonor.io",
|
|
35
|
-
token: null,
|
|
36
|
-
refreshing: null
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
var TOKEN_STATE_KEY = "__SONOR_SITE_TOKEN_STATE__";
|
|
40
|
-
var state = (() => {
|
|
41
|
-
if (typeof window === "undefined") return initialTokenState();
|
|
42
|
-
const w = window;
|
|
43
|
-
return w[TOKEN_STATE_KEY] ?? (w[TOKEN_STATE_KEY] = initialTokenState());
|
|
44
|
-
})();
|
|
45
|
-
function readStoredToken() {
|
|
46
|
-
if (typeof window === "undefined") return null;
|
|
47
|
-
try {
|
|
48
|
-
const raw = window.sessionStorage.getItem(STORAGE_KEY);
|
|
49
|
-
if (!raw) return null;
|
|
50
|
-
const parsed = JSON.parse(raw);
|
|
51
|
-
return typeof parsed?.token === "string" ? parsed.token : null;
|
|
52
|
-
} catch {
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function storeToken(token) {
|
|
57
|
-
if (typeof window === "undefined") return;
|
|
58
|
-
try {
|
|
59
|
-
window.sessionStorage.setItem(STORAGE_KEY, JSON.stringify({ token }));
|
|
60
|
-
} catch {
|
|
61
|
-
}
|
|
62
|
-
try {
|
|
63
|
-
;
|
|
64
|
-
window.__SITE_KIT_API_KEY__ = token;
|
|
65
|
-
} catch {
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
function tokenExp(token) {
|
|
69
|
-
const claims = decodeSiteTokenClaims(token);
|
|
70
|
-
return typeof claims?.exp === "number" ? claims.exp * 1e3 : 0;
|
|
71
|
-
}
|
|
72
|
-
function configureSiteCredential(opts) {
|
|
73
|
-
state.seed = opts.credential;
|
|
74
|
-
state.isToken = isSiteToken(opts.credential);
|
|
75
|
-
if (opts.apiUrl) state.apiUrl = opts.apiUrl.replace(/\/+$/, "");
|
|
76
|
-
if (!state.isToken) {
|
|
77
|
-
state.token = null;
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
const prior = state.token;
|
|
81
|
-
let best = opts.credential ?? null;
|
|
82
|
-
const stored = readStoredToken();
|
|
83
|
-
if (stored && tokenExp(stored) > tokenExp(best)) best = stored;
|
|
84
|
-
if (prior && tokenExp(prior) > tokenExp(best)) best = prior;
|
|
85
|
-
state.token = best;
|
|
86
|
-
}
|
|
87
|
-
function needsRefresh() {
|
|
88
|
-
if (!state.isToken) return false;
|
|
89
|
-
if (!state.token) return true;
|
|
90
|
-
return Date.now() >= tokenExp(state.token) - REFRESH_SKEW_MS;
|
|
91
|
-
}
|
|
92
|
-
async function doRefresh() {
|
|
93
|
-
const current = state.token;
|
|
94
|
-
if (!current) return null;
|
|
95
|
-
try {
|
|
96
|
-
const res = await fetch(`${state.apiUrl}/api/public/site-token/refresh`, {
|
|
97
|
-
method: "POST",
|
|
98
|
-
headers: {
|
|
99
|
-
"content-type": "application/json",
|
|
100
|
-
"x-sitekit-version": SITE_KIT_VERSION,
|
|
101
|
-
// Send the current token as x-api-key too, so the server's key-scoped
|
|
102
|
-
// throttler buckets refreshes by token rather than by shared CDN IP.
|
|
103
|
-
"x-api-key": current
|
|
104
|
-
},
|
|
105
|
-
body: JSON.stringify({ token: current }),
|
|
106
|
-
signal: typeof AbortSignal !== "undefined" && AbortSignal.timeout ? AbortSignal.timeout(REFRESH_TIMEOUT_MS) : void 0
|
|
107
|
-
});
|
|
108
|
-
if (!res.ok) return null;
|
|
109
|
-
const data = await res.json().catch(() => null);
|
|
110
|
-
const next = data?.token;
|
|
111
|
-
if (typeof next === "string" && isSiteToken(next)) {
|
|
112
|
-
state.token = next;
|
|
113
|
-
storeToken(next);
|
|
114
|
-
return next;
|
|
115
|
-
}
|
|
116
|
-
return null;
|
|
117
|
-
} catch {
|
|
118
|
-
return null;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
function refreshSiteToken() {
|
|
122
|
-
if (!state.isToken) return Promise.resolve(null);
|
|
123
|
-
if (state.refreshing) return state.refreshing;
|
|
124
|
-
state.refreshing = doRefresh().finally(() => {
|
|
125
|
-
state.refreshing = null;
|
|
126
|
-
});
|
|
127
|
-
return state.refreshing;
|
|
128
|
-
}
|
|
129
|
-
async function getFreshCredential(seed) {
|
|
130
|
-
if (!state.isToken && isSiteToken(seed)) {
|
|
131
|
-
configureSiteCredential({ credential: seed });
|
|
132
|
-
}
|
|
133
|
-
if (!state.isToken) return seed ?? state.seed;
|
|
134
|
-
if (needsRefresh()) {
|
|
135
|
-
const refreshed = await refreshSiteToken();
|
|
136
|
-
if (refreshed) return refreshed;
|
|
137
|
-
}
|
|
138
|
-
return state.token ?? seed ?? state.seed;
|
|
139
|
-
}
|
|
140
|
-
function isTokenMode() {
|
|
141
|
-
return state.isToken;
|
|
142
|
-
}
|
|
143
|
-
function currentCredential(seed) {
|
|
144
|
-
if (!state.isToken) return seed ?? state.seed;
|
|
145
|
-
return state.token ?? seed ?? state.seed;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export { configureSiteCredential, credentialBreakerId, currentCredential, getFreshCredential, isSiteToken, isTokenMode, refreshSiteToken };
|
package/dist/chunk-IPQKQEWI.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { uuid } from './chunk-GJWI74ZZ.js';
|
|
3
|
-
import { VISITOR_ID_KEY, memoryIdentity, SESSION_ID_KEY, SESSION_TIME_KEY } from './chunk-5TM3WPCI.js';
|
|
4
|
-
import { useState } from 'react';
|
|
5
|
-
|
|
6
|
-
function getOrCreateVisitorId() {
|
|
7
|
-
var _a;
|
|
8
|
-
if (typeof window === "undefined") return "";
|
|
9
|
-
let stored = null;
|
|
10
|
-
try {
|
|
11
|
-
stored = window.localStorage.getItem(VISITOR_ID_KEY);
|
|
12
|
-
const visitorId = stored || uuid();
|
|
13
|
-
window.localStorage.setItem(VISITOR_ID_KEY, visitorId);
|
|
14
|
-
return visitorId;
|
|
15
|
-
} catch {
|
|
16
|
-
return (_a = memoryIdentity).visitorId || (_a.visitorId = stored || uuid());
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
function getOrCreateSessionId(timeoutMinutes = 30) {
|
|
20
|
-
var _a;
|
|
21
|
-
if (typeof window === "undefined") return "";
|
|
22
|
-
const now = Date.now();
|
|
23
|
-
const timeoutMs = timeoutMinutes * 60 * 1e3;
|
|
24
|
-
let existingSession = null;
|
|
25
|
-
try {
|
|
26
|
-
existingSession = window.sessionStorage.getItem(SESSION_ID_KEY);
|
|
27
|
-
const lastActivity = window.sessionStorage.getItem(SESSION_TIME_KEY);
|
|
28
|
-
if (existingSession && lastActivity) {
|
|
29
|
-
const elapsed = now - parseInt(lastActivity, 10);
|
|
30
|
-
if (elapsed < timeoutMs) {
|
|
31
|
-
window.sessionStorage.setItem(SESSION_TIME_KEY, now.toString());
|
|
32
|
-
window.sessionStorage.setItem(SESSION_ID_KEY, existingSession);
|
|
33
|
-
return existingSession;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
const newSession = uuid();
|
|
37
|
-
window.sessionStorage.setItem(SESSION_ID_KEY, newSession);
|
|
38
|
-
window.sessionStorage.setItem(SESSION_TIME_KEY, now.toString());
|
|
39
|
-
return newSession;
|
|
40
|
-
} catch {
|
|
41
|
-
return (_a = memoryIdentity).sessionId || (_a.sessionId = existingSession || uuid());
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function useSiteKitIdentity() {
|
|
45
|
-
const [identity] = useState(() => ({
|
|
46
|
-
visitorId: getOrCreateVisitorId(),
|
|
47
|
-
sessionId: getOrCreateSessionId()
|
|
48
|
-
}));
|
|
49
|
-
return identity;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export { getOrCreateSessionId, getOrCreateVisitorId, useSiteKitIdentity };
|
package/dist/chunk-LCDVPAMR.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// src/analytics/dispatch.ts
|
|
2
|
-
var MAX_QUEUE = 50;
|
|
3
|
-
var dispatcher = null;
|
|
4
|
-
var queue = [];
|
|
5
|
-
function registerAnalyticsDispatcher(next) {
|
|
6
|
-
dispatcher = next;
|
|
7
|
-
if (!next) return;
|
|
8
|
-
const pending = queue;
|
|
9
|
-
queue = [];
|
|
10
|
-
for (const call of pending) {
|
|
11
|
-
if (call.kind === "event") next.trackEvent(call.options);
|
|
12
|
-
else next.trackConversion(call.options);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
function trackEvent(options) {
|
|
16
|
-
if (dispatcher) dispatcher.trackEvent(options);
|
|
17
|
-
else if (queue.length < MAX_QUEUE) queue.push({ kind: "event", options });
|
|
18
|
-
}
|
|
19
|
-
function trackConversion(options) {
|
|
20
|
-
if (dispatcher) dispatcher.trackConversion(options);
|
|
21
|
-
else if (queue.length < MAX_QUEUE) queue.push({ kind: "conversion", options });
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { registerAnalyticsDispatcher, trackConversion, trackEvent };
|
package/dist/chunk-SHAUX2MQ.js
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { useSyncExternalStore, useState, useRef, useCallback, useMemo, useEffect } from 'react';
|
|
3
|
-
import dynamic from 'next/dynamic';
|
|
4
|
-
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
// src/signal/store.ts
|
|
7
|
-
var pendingEvents = [];
|
|
8
|
-
var pendingOutcomes = [];
|
|
9
|
-
var MAX_PENDING = 100;
|
|
10
|
-
var warnedNoBridge = false;
|
|
11
|
-
var STUB = Object.freeze({
|
|
12
|
-
config: null,
|
|
13
|
-
loading: true,
|
|
14
|
-
error: null,
|
|
15
|
-
trackEvent: (event) => {
|
|
16
|
-
if (pendingEvents.length < MAX_PENDING) pendingEvents.push(event);
|
|
17
|
-
else if (!warnedNoBridge) {
|
|
18
|
-
warnedNoBridge = true;
|
|
19
|
-
console.warn("[site-kit] Signal events are queuing but no SignalBridge has mounted \u2014 is signal enabled on SiteKitLayout?");
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
trackOutcome: (outcome) => {
|
|
23
|
-
if (pendingOutcomes.length < MAX_PENDING) pendingOutcomes.push(outcome);
|
|
24
|
-
},
|
|
25
|
-
getExperiment: () => null,
|
|
26
|
-
refreshConfig: async () => {
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
var current = STUB;
|
|
30
|
-
var listeners = /* @__PURE__ */ new Set();
|
|
31
|
-
function emit() {
|
|
32
|
-
for (const l of listeners) l();
|
|
33
|
-
}
|
|
34
|
-
function publishSignal(value) {
|
|
35
|
-
const firstPublish = current === STUB;
|
|
36
|
-
current = value;
|
|
37
|
-
if (firstPublish) {
|
|
38
|
-
pendingEvents.splice(0).forEach((e) => value.trackEvent(e));
|
|
39
|
-
pendingOutcomes.splice(0).forEach((o) => value.trackOutcome(o));
|
|
40
|
-
}
|
|
41
|
-
emit();
|
|
42
|
-
}
|
|
43
|
-
function resetSignal() {
|
|
44
|
-
current = STUB;
|
|
45
|
-
emit();
|
|
46
|
-
}
|
|
47
|
-
function subscribe(onChange) {
|
|
48
|
-
listeners.add(onChange);
|
|
49
|
-
return () => listeners.delete(onChange);
|
|
50
|
-
}
|
|
51
|
-
var getSnapshot = () => current;
|
|
52
|
-
var getServerSnapshot = () => STUB;
|
|
53
|
-
function useSignal() {
|
|
54
|
-
return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
55
|
-
}
|
|
56
|
-
var LazySignalCore = dynamic(
|
|
57
|
-
() => import('./SignalCore-OW3YIH6M.js').then((m) => ({ default: m.SignalCore })),
|
|
58
|
-
{ ssr: false }
|
|
59
|
-
);
|
|
60
|
-
function SignalBridge({
|
|
61
|
-
enabled = true,
|
|
62
|
-
realtime = true,
|
|
63
|
-
experiments = true,
|
|
64
|
-
behaviorTracking = true,
|
|
65
|
-
visitorId: externalVisitorId,
|
|
66
|
-
sessionId: externalSessionId,
|
|
67
|
-
pageMetadataRef,
|
|
68
|
-
children
|
|
69
|
-
}) {
|
|
70
|
-
const [config, setConfig] = useState(null);
|
|
71
|
-
const [loading, setLoading] = useState(true);
|
|
72
|
-
const [error, setError] = useState(null);
|
|
73
|
-
const coreRef = useRef(null);
|
|
74
|
-
const pendingEventsRef = useRef([]);
|
|
75
|
-
const pendingOutcomesRef = useRef([]);
|
|
76
|
-
const handleState = useCallback((state) => {
|
|
77
|
-
setConfig(state.config);
|
|
78
|
-
setLoading(state.loading);
|
|
79
|
-
setError(state.error);
|
|
80
|
-
}, []);
|
|
81
|
-
const handleRegister = useCallback((api) => {
|
|
82
|
-
coreRef.current = api;
|
|
83
|
-
if (api) {
|
|
84
|
-
pendingEventsRef.current.splice(0).forEach((event) => api.trackEvent(event));
|
|
85
|
-
pendingOutcomesRef.current.splice(0).forEach((outcome) => api.trackOutcome(outcome));
|
|
86
|
-
}
|
|
87
|
-
}, []);
|
|
88
|
-
const trackEvent = useCallback((event) => {
|
|
89
|
-
if (coreRef.current) {
|
|
90
|
-
coreRef.current.trackEvent(event);
|
|
91
|
-
} else {
|
|
92
|
-
pendingEventsRef.current.push(event);
|
|
93
|
-
}
|
|
94
|
-
}, []);
|
|
95
|
-
const trackOutcome = useCallback((outcome) => {
|
|
96
|
-
if (coreRef.current) {
|
|
97
|
-
coreRef.current.trackOutcome(outcome);
|
|
98
|
-
} else {
|
|
99
|
-
pendingOutcomesRef.current.push(outcome);
|
|
100
|
-
}
|
|
101
|
-
}, []);
|
|
102
|
-
const getExperiment = useCallback((experimentId) => {
|
|
103
|
-
return coreRef.current?.getExperiment(experimentId) ?? null;
|
|
104
|
-
}, []);
|
|
105
|
-
const refreshConfig = useCallback(async () => {
|
|
106
|
-
await coreRef.current?.refreshConfig();
|
|
107
|
-
}, []);
|
|
108
|
-
const contextValue = useMemo(() => ({
|
|
109
|
-
config,
|
|
110
|
-
loading,
|
|
111
|
-
error,
|
|
112
|
-
trackEvent,
|
|
113
|
-
trackOutcome,
|
|
114
|
-
getExperiment,
|
|
115
|
-
refreshConfig
|
|
116
|
-
}), [config, loading, error, trackEvent, trackOutcome, getExperiment, refreshConfig]);
|
|
117
|
-
useEffect(() => {
|
|
118
|
-
publishSignal(contextValue);
|
|
119
|
-
}, [contextValue]);
|
|
120
|
-
useEffect(() => () => resetSignal(), []);
|
|
121
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
122
|
-
children,
|
|
123
|
-
enabled && /* @__PURE__ */ jsx(
|
|
124
|
-
LazySignalCore,
|
|
125
|
-
{
|
|
126
|
-
enabled,
|
|
127
|
-
realtime,
|
|
128
|
-
experiments,
|
|
129
|
-
behaviorTracking,
|
|
130
|
-
externalVisitorId,
|
|
131
|
-
externalSessionId,
|
|
132
|
-
pageMetadataRef,
|
|
133
|
-
onRegister: handleRegister,
|
|
134
|
-
onState: handleState
|
|
135
|
-
}
|
|
136
|
-
)
|
|
137
|
-
] });
|
|
138
|
-
}
|
|
139
|
-
function useSignalConfig() {
|
|
140
|
-
const { config } = useSignal();
|
|
141
|
-
return config;
|
|
142
|
-
}
|
|
143
|
-
function useSignalEvent() {
|
|
144
|
-
const { trackEvent } = useSignal();
|
|
145
|
-
return trackEvent;
|
|
146
|
-
}
|
|
147
|
-
function useSignalOutcome() {
|
|
148
|
-
const { trackOutcome } = useSignal();
|
|
149
|
-
return { trackOutcome };
|
|
150
|
-
}
|
|
151
|
-
function useSignalExperiment(experimentId) {
|
|
152
|
-
const { getExperiment, config } = useSignal();
|
|
153
|
-
const assignment = getExperiment(experimentId);
|
|
154
|
-
const experiment = config?.experiments?.find((e) => e.id === experimentId);
|
|
155
|
-
const isRunning = experiment?.status === "running";
|
|
156
|
-
return {
|
|
157
|
-
assignment: isRunning ? assignment : null,
|
|
158
|
-
variant: isRunning && assignment ? assignment.variant_key : null,
|
|
159
|
-
isControl: !assignment || assignment.variant_key === "control"
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export { SignalBridge, useSignal, useSignalConfig, useSignalEvent, useSignalExperiment, useSignalOutcome };
|
|
File without changes
|