@scalebun-release/web 2.2.2
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/LICENSE +21 -0
- package/README.md +57 -0
- package/dist/bootstrap/FeatureRegistry.d.ts +44 -0
- package/dist/bootstrap/FeatureRegistry.d.ts.map +1 -0
- package/dist/bootstrap/FeatureRegistry.js +85 -0
- package/dist/bootstrap/FeatureRegistry.js.map +1 -0
- package/dist/bootstrap/SDKBootstrapper.d.ts +37 -0
- package/dist/bootstrap/SDKBootstrapper.d.ts.map +1 -0
- package/dist/bootstrap/SDKBootstrapper.js +346 -0
- package/dist/bootstrap/SDKBootstrapper.js.map +1 -0
- package/dist/browser.d.ts +51 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +86 -0
- package/dist/browser.js.map +1 -0
- package/dist/config/endpoints.d.ts +12 -0
- package/dist/config/endpoints.d.ts.map +1 -0
- package/dist/config/endpoints.js +12 -0
- package/dist/config/endpoints.js.map +1 -0
- package/dist/config/schema.d.ts +120 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +117 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/core/breadcrumbs.d.ts +56 -0
- package/dist/core/breadcrumbs.d.ts.map +1 -0
- package/dist/core/breadcrumbs.js +141 -0
- package/dist/core/breadcrumbs.js.map +1 -0
- package/dist/core/capabilities.d.ts +38 -0
- package/dist/core/capabilities.d.ts.map +1 -0
- package/dist/core/capabilities.js +78 -0
- package/dist/core/capabilities.js.map +1 -0
- package/dist/core/consent.d.ts +17 -0
- package/dist/core/consent.d.ts.map +1 -0
- package/dist/core/consent.js +38 -0
- package/dist/core/consent.js.map +1 -0
- package/dist/core/csp.d.ts +31 -0
- package/dist/core/csp.d.ts.map +1 -0
- package/dist/core/csp.js +74 -0
- package/dist/core/csp.js.map +1 -0
- package/dist/core/evalContext.d.ts +7 -0
- package/dist/core/evalContext.d.ts.map +1 -0
- package/dist/core/evalContext.js +22 -0
- package/dist/core/evalContext.js.map +1 -0
- package/dist/core/ids.d.ts +6 -0
- package/dist/core/ids.d.ts.map +1 -0
- package/dist/core/ids.js +35 -0
- package/dist/core/ids.js.map +1 -0
- package/dist/core/index.d.ts +16 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +16 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/lifecycle.d.ts +4 -0
- package/dist/core/lifecycle.d.ts.map +1 -0
- package/dist/core/lifecycle.js +24 -0
- package/dist/core/lifecycle.js.map +1 -0
- package/dist/core/logger.d.ts +12 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +14 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/observe.d.ts +3 -0
- package/dist/core/observe.d.ts.map +1 -0
- package/dist/core/observe.js +22 -0
- package/dist/core/observe.js.map +1 -0
- package/dist/core/pageContext.d.ts +13 -0
- package/dist/core/pageContext.d.ts.map +1 -0
- package/dist/core/pageContext.js +90 -0
- package/dist/core/pageContext.js.map +1 -0
- package/dist/core/prune.d.ts +31 -0
- package/dist/core/prune.d.ts.map +1 -0
- package/dist/core/prune.js +112 -0
- package/dist/core/prune.js.map +1 -0
- package/dist/core/redact.d.ts +15 -0
- package/dist/core/redact.d.ts.map +1 -0
- package/dist/core/redact.js +72 -0
- package/dist/core/redact.js.map +1 -0
- package/dist/core/replayCoord.d.ts +22 -0
- package/dist/core/replayCoord.d.ts.map +1 -0
- package/dist/core/replayCoord.js +20 -0
- package/dist/core/replayCoord.js.map +1 -0
- package/dist/core/retry.d.ts +25 -0
- package/dist/core/retry.d.ts.map +1 -0
- package/dist/core/retry.js +44 -0
- package/dist/core/retry.js.map +1 -0
- package/dist/core/runtime.d.ts +28 -0
- package/dist/core/runtime.d.ts.map +1 -0
- package/dist/core/runtime.js +67 -0
- package/dist/core/runtime.js.map +1 -0
- package/dist/core/scrollDepth.d.ts +48 -0
- package/dist/core/scrollDepth.d.ts.map +1 -0
- package/dist/core/scrollDepth.js +63 -0
- package/dist/core/scrollDepth.js.map +1 -0
- package/dist/core/uiStateReader.d.ts +35 -0
- package/dist/core/uiStateReader.d.ts.map +1 -0
- package/dist/core/uiStateReader.js +47 -0
- package/dist/core/uiStateReader.js.map +1 -0
- package/dist/core/version.generated.d.ts +9 -0
- package/dist/core/version.generated.d.ts.map +1 -0
- package/dist/core/version.generated.js +9 -0
- package/dist/core/version.generated.js.map +1 -0
- package/dist/debug/index.d.ts +6 -0
- package/dist/debug/index.d.ts.map +1 -0
- package/dist/debug/index.js +2 -0
- package/dist/debug/index.js.map +1 -0
- package/dist/features/analytics/AnalyticsFeature.d.ts +123 -0
- package/dist/features/analytics/AnalyticsFeature.d.ts.map +1 -0
- package/dist/features/analytics/AnalyticsFeature.js +785 -0
- package/dist/features/analytics/AnalyticsFeature.js.map +1 -0
- package/dist/features/analytics/autocapture.d.ts +13 -0
- package/dist/features/analytics/autocapture.d.ts.map +1 -0
- package/dist/features/analytics/autocapture.js +436 -0
- package/dist/features/analytics/autocapture.js.map +1 -0
- package/dist/features/analytics/governance.d.ts +15 -0
- package/dist/features/analytics/governance.d.ts.map +1 -0
- package/dist/features/analytics/governance.js +30 -0
- package/dist/features/analytics/governance.js.map +1 -0
- package/dist/features/analytics/revenue.d.ts +77 -0
- package/dist/features/analytics/revenue.d.ts.map +1 -0
- package/dist/features/analytics/revenue.js +56 -0
- package/dist/features/analytics/revenue.js.map +1 -0
- package/dist/features/analytics/sampler.d.ts +2 -0
- package/dist/features/analytics/sampler.d.ts.map +1 -0
- package/dist/features/analytics/sampler.js +24 -0
- package/dist/features/analytics/sampler.js.map +1 -0
- package/dist/features/analytics/subscription.d.ts +35 -0
- package/dist/features/analytics/subscription.d.ts.map +1 -0
- package/dist/features/analytics/subscription.js +95 -0
- package/dist/features/analytics/subscription.js.map +1 -0
- package/dist/features/attention/index.d.ts +29 -0
- package/dist/features/attention/index.d.ts.map +1 -0
- package/dist/features/attention/index.js +128 -0
- package/dist/features/attention/index.js.map +1 -0
- package/dist/features/bugreport/BugReportFeature.d.ts +37 -0
- package/dist/features/bugreport/BugReportFeature.d.ts.map +1 -0
- package/dist/features/bugreport/BugReportFeature.js +56 -0
- package/dist/features/bugreport/BugReportFeature.js.map +1 -0
- package/dist/features/bugreport/collect.d.ts +33 -0
- package/dist/features/bugreport/collect.d.ts.map +1 -0
- package/dist/features/bugreport/collect.js +30 -0
- package/dist/features/bugreport/collect.js.map +1 -0
- package/dist/features/bugreport/widget.d.ts +40 -0
- package/dist/features/bugreport/widget.d.ts.map +1 -0
- package/dist/features/bugreport/widget.js +145 -0
- package/dist/features/bugreport/widget.js.map +1 -0
- package/dist/features/coach/CoachmarkFeature.d.ts +78 -0
- package/dist/features/coach/CoachmarkFeature.d.ts.map +1 -0
- package/dist/features/coach/CoachmarkFeature.js +161 -0
- package/dist/features/coach/CoachmarkFeature.js.map +1 -0
- package/dist/features/coach/anchor.d.ts +32 -0
- package/dist/features/coach/anchor.d.ts.map +1 -0
- package/dist/features/coach/anchor.js +128 -0
- package/dist/features/coach/anchor.js.map +1 -0
- package/dist/features/coach/observers.d.ts +17 -0
- package/dist/features/coach/observers.d.ts.map +1 -0
- package/dist/features/coach/observers.js +49 -0
- package/dist/features/coach/observers.js.map +1 -0
- package/dist/features/coach/overlay.d.ts +15 -0
- package/dist/features/coach/overlay.d.ts.map +1 -0
- package/dist/features/coach/overlay.js +205 -0
- package/dist/features/coach/overlay.js.map +1 -0
- package/dist/features/coach/position.d.ts +9 -0
- package/dist/features/coach/position.d.ts.map +1 -0
- package/dist/features/coach/position.js +83 -0
- package/dist/features/coach/position.js.map +1 -0
- package/dist/features/coach/predicate.d.ts +10 -0
- package/dist/features/coach/predicate.d.ts.map +1 -0
- package/dist/features/coach/predicate.js +36 -0
- package/dist/features/coach/predicate.js.map +1 -0
- package/dist/features/coach/tour.d.ts +55 -0
- package/dist/features/coach/tour.d.ts.map +1 -0
- package/dist/features/coach/tour.js +181 -0
- package/dist/features/coach/tour.js.map +1 -0
- package/dist/features/coach/types.d.ts +161 -0
- package/dist/features/coach/types.d.ts.map +1 -0
- package/dist/features/coach/types.js +2 -0
- package/dist/features/coach/types.js.map +1 -0
- package/dist/features/coach/wait.d.ts +34 -0
- package/dist/features/coach/wait.d.ts.map +1 -0
- package/dist/features/coach/wait.js +107 -0
- package/dist/features/coach/wait.js.map +1 -0
- package/dist/features/config/ConfigFeature.d.ts +117 -0
- package/dist/features/config/ConfigFeature.d.ts.map +1 -0
- package/dist/features/config/ConfigFeature.js +437 -0
- package/dist/features/config/ConfigFeature.js.map +1 -0
- package/dist/features/config/bucketing.d.ts +20 -0
- package/dist/features/config/bucketing.d.ts.map +1 -0
- package/dist/features/config/bucketing.js +37 -0
- package/dist/features/config/bucketing.js.map +1 -0
- package/dist/features/config/configStore.d.ts +11 -0
- package/dist/features/config/configStore.d.ts.map +1 -0
- package/dist/features/config/configStore.js +66 -0
- package/dist/features/config/configStore.js.map +1 -0
- package/dist/features/config/targeting.d.ts +11 -0
- package/dist/features/config/targeting.d.ts.map +1 -0
- package/dist/features/config/targeting.js +57 -0
- package/dist/features/config/targeting.js.map +1 -0
- package/dist/features/config/types.d.ts +100 -0
- package/dist/features/config/types.d.ts.map +1 -0
- package/dist/features/config/types.js +9 -0
- package/dist/features/config/types.js.map +1 -0
- package/dist/features/console/ConsoleFeature.d.ts +31 -0
- package/dist/features/console/ConsoleFeature.d.ts.map +1 -0
- package/dist/features/console/ConsoleFeature.js +98 -0
- package/dist/features/console/ConsoleFeature.js.map +1 -0
- package/dist/features/console/normalize.d.ts +18 -0
- package/dist/features/console/normalize.d.ts.map +1 -0
- package/dist/features/console/normalize.js +64 -0
- package/dist/features/console/normalize.js.map +1 -0
- package/dist/features/console/serialize.d.ts +24 -0
- package/dist/features/console/serialize.d.ts.map +1 -0
- package/dist/features/console/serialize.js +99 -0
- package/dist/features/console/serialize.js.map +1 -0
- package/dist/features/console/throttle.d.ts +27 -0
- package/dist/features/console/throttle.d.ts.map +1 -0
- package/dist/features/console/throttle.js +37 -0
- package/dist/features/console/throttle.js.map +1 -0
- package/dist/features/crash/CrashFeature.d.ts +46 -0
- package/dist/features/crash/CrashFeature.d.ts.map +1 -0
- package/dist/features/crash/CrashFeature.js +173 -0
- package/dist/features/crash/CrashFeature.js.map +1 -0
- package/dist/features/crash/liveness.d.ts +30 -0
- package/dist/features/crash/liveness.d.ts.map +1 -0
- package/dist/features/crash/liveness.js +131 -0
- package/dist/features/crash/liveness.js.map +1 -0
- package/dist/features/engage/EngageFeature.d.ts +67 -0
- package/dist/features/engage/EngageFeature.d.ts.map +1 -0
- package/dist/features/engage/EngageFeature.js +243 -0
- package/dist/features/engage/EngageFeature.js.map +1 -0
- package/dist/features/engage/attachments.d.ts +24 -0
- package/dist/features/engage/attachments.d.ts.map +1 -0
- package/dist/features/engage/attachments.js +209 -0
- package/dist/features/engage/attachments.js.map +1 -0
- package/dist/features/engage/gameLogic.d.ts +60 -0
- package/dist/features/engage/gameLogic.d.ts.map +1 -0
- package/dist/features/engage/gameLogic.js +213 -0
- package/dist/features/engage/gameLogic.js.map +1 -0
- package/dist/features/engage/gameResolver.d.ts +35 -0
- package/dist/features/engage/gameResolver.d.ts.map +1 -0
- package/dist/features/engage/gameResolver.js +81 -0
- package/dist/features/engage/gameResolver.js.map +1 -0
- package/dist/features/engage/gameTypes.d.ts +76 -0
- package/dist/features/engage/gameTypes.d.ts.map +1 -0
- package/dist/features/engage/gameTypes.js +17 -0
- package/dist/features/engage/gameTypes.js.map +1 -0
- package/dist/features/engage/inappSlots.d.ts +39 -0
- package/dist/features/engage/inappSlots.d.ts.map +1 -0
- package/dist/features/engage/inappSlots.js +50 -0
- package/dist/features/engage/inappSlots.js.map +1 -0
- package/dist/features/engage/normalize.d.ts +11 -0
- package/dist/features/engage/normalize.d.ts.map +1 -0
- package/dist/features/engage/normalize.js +210 -0
- package/dist/features/engage/normalize.js.map +1 -0
- package/dist/features/engage/richInApp.d.ts +64 -0
- package/dist/features/engage/richInApp.d.ts.map +1 -0
- package/dist/features/engage/richInApp.js +1082 -0
- package/dist/features/engage/richInApp.js.map +1 -0
- package/dist/features/engage/runtime.d.ts +89 -0
- package/dist/features/engage/runtime.d.ts.map +1 -0
- package/dist/features/engage/runtime.js +364 -0
- package/dist/features/engage/runtime.js.map +1 -0
- package/dist/features/engage/shakeDetector.d.ts +6 -0
- package/dist/features/engage/shakeDetector.d.ts.map +1 -0
- package/dist/features/engage/shakeDetector.js +105 -0
- package/dist/features/engage/shakeDetector.js.map +1 -0
- package/dist/features/engage/theme.d.ts +129 -0
- package/dist/features/engage/theme.d.ts.map +1 -0
- package/dist/features/engage/theme.js +270 -0
- package/dist/features/engage/theme.js.map +1 -0
- package/dist/features/engage/throttle.d.ts +41 -0
- package/dist/features/engage/throttle.d.ts.map +1 -0
- package/dist/features/engage/throttle.js +220 -0
- package/dist/features/engage/throttle.js.map +1 -0
- package/dist/features/engage/transport.d.ts +62 -0
- package/dist/features/engage/transport.d.ts.map +1 -0
- package/dist/features/engage/transport.js +185 -0
- package/dist/features/engage/transport.js.map +1 -0
- package/dist/features/engage/triggerEngine.d.ts +39 -0
- package/dist/features/engage/triggerEngine.d.ts.map +1 -0
- package/dist/features/engage/triggerEngine.js +105 -0
- package/dist/features/engage/triggerEngine.js.map +1 -0
- package/dist/features/engage/types.d.ts +271 -0
- package/dist/features/engage/types.d.ts.map +1 -0
- package/dist/features/engage/types.js +3 -0
- package/dist/features/engage/types.js.map +1 -0
- package/dist/features/engage/widget/InAppWidget.d.ts +10 -0
- package/dist/features/engage/widget/InAppWidget.d.ts.map +1 -0
- package/dist/features/engage/widget/InAppWidget.js +137 -0
- package/dist/features/engage/widget/InAppWidget.js.map +1 -0
- package/dist/features/engage/widget/SurveyWidget.d.ts +11 -0
- package/dist/features/engage/widget/SurveyWidget.d.ts.map +1 -0
- package/dist/features/engage/widget/SurveyWidget.js +547 -0
- package/dist/features/engage/widget/SurveyWidget.js.map +1 -0
- package/dist/features/errors/ErrorsFeature.d.ts +62 -0
- package/dist/features/errors/ErrorsFeature.d.ts.map +1 -0
- package/dist/features/errors/ErrorsFeature.js +209 -0
- package/dist/features/errors/ErrorsFeature.js.map +1 -0
- package/dist/features/errors/causes.d.ts +15 -0
- package/dist/features/errors/causes.d.ts.map +1 -0
- package/dist/features/errors/causes.js +29 -0
- package/dist/features/errors/causes.js.map +1 -0
- package/dist/features/errors/dedup.d.ts +28 -0
- package/dist/features/errors/dedup.d.ts.map +1 -0
- package/dist/features/errors/dedup.js +42 -0
- package/dist/features/errors/dedup.js.map +1 -0
- package/dist/features/errors/group/fingerprint.d.ts +13 -0
- package/dist/features/errors/group/fingerprint.d.ts.map +1 -0
- package/dist/features/errors/group/fingerprint.js +45 -0
- package/dist/features/errors/group/fingerprint.js.map +1 -0
- package/dist/features/errors/lazy.d.ts +8 -0
- package/dist/features/errors/lazy.d.ts.map +1 -0
- package/dist/features/errors/lazy.js +8 -0
- package/dist/features/errors/lazy.js.map +1 -0
- package/dist/features/errors/normalize.d.ts +26 -0
- package/dist/features/errors/normalize.d.ts.map +1 -0
- package/dist/features/errors/normalize.js +58 -0
- package/dist/features/errors/normalize.js.map +1 -0
- package/dist/features/errors/parse/stacktrace.d.ts +13 -0
- package/dist/features/errors/parse/stacktrace.d.ts.map +1 -0
- package/dist/features/errors/parse/stacktrace.js +85 -0
- package/dist/features/errors/parse/stacktrace.js.map +1 -0
- package/dist/features/errors/redact.d.ts +7 -0
- package/dist/features/errors/redact.d.ts.map +1 -0
- package/dist/features/errors/redact.js +39 -0
- package/dist/features/errors/redact.js.map +1 -0
- package/dist/features/errors/sampling.d.ts +2 -0
- package/dist/features/errors/sampling.d.ts.map +1 -0
- package/dist/features/errors/sampling.js +24 -0
- package/dist/features/errors/sampling.js.map +1 -0
- package/dist/features/errors/scope.d.ts +26 -0
- package/dist/features/errors/scope.d.ts.map +1 -0
- package/dist/features/errors/scope.js +30 -0
- package/dist/features/errors/scope.js.map +1 -0
- package/dist/features/exit-intent/ExitIntentFeature.d.ts +16 -0
- package/dist/features/exit-intent/ExitIntentFeature.d.ts.map +1 -0
- package/dist/features/exit-intent/ExitIntentFeature.js +25 -0
- package/dist/features/exit-intent/ExitIntentFeature.js.map +1 -0
- package/dist/features/exit-intent/engine.d.ts +127 -0
- package/dist/features/exit-intent/engine.d.ts.map +1 -0
- package/dist/features/exit-intent/engine.js +227 -0
- package/dist/features/exit-intent/engine.js.map +1 -0
- package/dist/features/forms/index.d.ts +83 -0
- package/dist/features/forms/index.d.ts.map +1 -0
- package/dist/features/forms/index.js +405 -0
- package/dist/features/forms/index.js.map +1 -0
- package/dist/features/inapp/InApp2Feature.d.ts +24 -0
- package/dist/features/inapp/InApp2Feature.d.ts.map +1 -0
- package/dist/features/inapp/InApp2Feature.js +44 -0
- package/dist/features/inapp/InApp2Feature.js.map +1 -0
- package/dist/features/inapp/a11y/focus.d.ts +24 -0
- package/dist/features/inapp/a11y/focus.d.ts.map +1 -0
- package/dist/features/inapp/a11y/focus.js +112 -0
- package/dist/features/inapp/a11y/focus.js.map +1 -0
- package/dist/features/inapp/anchor/controller.d.ts +64 -0
- package/dist/features/inapp/anchor/controller.d.ts.map +1 -0
- package/dist/features/inapp/anchor/controller.js +155 -0
- package/dist/features/inapp/anchor/controller.js.map +1 -0
- package/dist/features/inapp/api.d.ts +28 -0
- package/dist/features/inapp/api.d.ts.map +1 -0
- package/dist/features/inapp/api.js +41 -0
- package/dist/features/inapp/api.js.map +1 -0
- package/dist/features/inapp/blocks/blocks.d.ts +65 -0
- package/dist/features/inapp/blocks/blocks.d.ts.map +1 -0
- package/dist/features/inapp/blocks/blocks.js +196 -0
- package/dist/features/inapp/blocks/blocks.js.map +1 -0
- package/dist/features/inapp/blocks/feedback.d.ts +13 -0
- package/dist/features/inapp/blocks/feedback.d.ts.map +1 -0
- package/dist/features/inapp/blocks/feedback.js +154 -0
- package/dist/features/inapp/blocks/feedback.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/carousel.d.ts +8 -0
- package/dist/features/inapp/blocks/heavy/carousel.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/carousel.js +67 -0
- package/dist/features/inapp/blocks/heavy/carousel.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/chart.d.ts +9 -0
- package/dist/features/inapp/blocks/heavy/chart.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/chart.js +83 -0
- package/dist/features/inapp/blocks/heavy/chart.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/code.d.ts +8 -0
- package/dist/features/inapp/blocks/heavy/code.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/code.js +47 -0
- package/dist/features/inapp/blocks/heavy/code.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/confetti.d.ts +9 -0
- package/dist/features/inapp/blocks/heavy/confetti.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/confetti.js +76 -0
- package/dist/features/inapp/blocks/heavy/confetti.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/countdown.d.ts +9 -0
- package/dist/features/inapp/blocks/heavy/countdown.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/countdown.js +59 -0
- package/dist/features/inapp/blocks/heavy/countdown.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/index.d.ts +11 -0
- package/dist/features/inapp/blocks/heavy/index.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/index.js +45 -0
- package/dist/features/inapp/blocks/heavy/index.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/markdown.d.ts +9 -0
- package/dist/features/inapp/blocks/heavy/markdown.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/markdown.js +76 -0
- package/dist/features/inapp/blocks/heavy/markdown.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/productgrid.d.ts +8 -0
- package/dist/features/inapp/blocks/heavy/productgrid.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/productgrid.js +46 -0
- package/dist/features/inapp/blocks/heavy/productgrid.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/qr.d.ts +10 -0
- package/dist/features/inapp/blocks/heavy/qr.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/qr.js +69 -0
- package/dist/features/inapp/blocks/heavy/qr.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/scratch.d.ts +8 -0
- package/dist/features/inapp/blocks/heavy/scratch.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/scratch.js +141 -0
- package/dist/features/inapp/blocks/heavy/scratch.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/slot.d.ts +8 -0
- package/dist/features/inapp/blocks/heavy/slot.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/slot.js +96 -0
- package/dist/features/inapp/blocks/heavy/slot.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/spinwheel.d.ts +9 -0
- package/dist/features/inapp/blocks/heavy/spinwheel.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/spinwheel.js +127 -0
- package/dist/features/inapp/blocks/heavy/spinwheel.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/steps.d.ts +27 -0
- package/dist/features/inapp/blocks/heavy/steps.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/steps.js +135 -0
- package/dist/features/inapp/blocks/heavy/steps.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/streak.d.ts +18 -0
- package/dist/features/inapp/blocks/heavy/streak.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/streak.js +52 -0
- package/dist/features/inapp/blocks/heavy/streak.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/table.d.ts +7 -0
- package/dist/features/inapp/blocks/heavy/table.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/table.js +30 -0
- package/dist/features/inapp/blocks/heavy/table.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/unavailable.d.ts +28 -0
- package/dist/features/inapp/blocks/heavy/unavailable.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/unavailable.js +33 -0
- package/dist/features/inapp/blocks/heavy/unavailable.js.map +1 -0
- package/dist/features/inapp/blocks/heavy/video.d.ts +7 -0
- package/dist/features/inapp/blocks/heavy/video.d.ts.map +1 -0
- package/dist/features/inapp/blocks/heavy/video.js +38 -0
- package/dist/features/inapp/blocks/heavy/video.js.map +1 -0
- package/dist/features/inapp/blocks/styles.d.ts +7 -0
- package/dist/features/inapp/blocks/styles.d.ts.map +1 -0
- package/dist/features/inapp/blocks/styles.js +225 -0
- package/dist/features/inapp/blocks/styles.js.map +1 -0
- package/dist/features/inapp/center/bridge.d.ts +12 -0
- package/dist/features/inapp/center/bridge.d.ts.map +1 -0
- package/dist/features/inapp/center/bridge.js +59 -0
- package/dist/features/inapp/center/bridge.js.map +1 -0
- package/dist/features/inapp/center/panel.d.ts +20 -0
- package/dist/features/inapp/center/panel.d.ts.map +1 -0
- package/dist/features/inapp/center/panel.js +228 -0
- package/dist/features/inapp/center/panel.js.map +1 -0
- package/dist/features/inapp/center/store.d.ts +50 -0
- package/dist/features/inapp/center/store.d.ts.map +1 -0
- package/dist/features/inapp/center/store.js +188 -0
- package/dist/features/inapp/center/store.js.map +1 -0
- package/dist/features/inapp/center/sync.d.ts +32 -0
- package/dist/features/inapp/center/sync.d.ts.map +1 -0
- package/dist/features/inapp/center/sync.js +60 -0
- package/dist/features/inapp/center/sync.js.map +1 -0
- package/dist/features/inapp/center/types.d.ts +46 -0
- package/dist/features/inapp/center/types.d.ts.map +1 -0
- package/dist/features/inapp/center/types.js +5 -0
- package/dist/features/inapp/center/types.js.map +1 -0
- package/dist/features/inapp/core/analytics.d.ts +35 -0
- package/dist/features/inapp/core/analytics.d.ts.map +1 -0
- package/dist/features/inapp/core/analytics.js +70 -0
- package/dist/features/inapp/core/analytics.js.map +1 -0
- package/dist/features/inapp/core/compat.d.ts +28 -0
- package/dist/features/inapp/core/compat.d.ts.map +1 -0
- package/dist/features/inapp/core/compat.js +104 -0
- package/dist/features/inapp/core/compat.js.map +1 -0
- package/dist/features/inapp/core/debugOverlay.d.ts +5 -0
- package/dist/features/inapp/core/debugOverlay.d.ts.map +1 -0
- package/dist/features/inapp/core/debugOverlay.js +79 -0
- package/dist/features/inapp/core/debugOverlay.js.map +1 -0
- package/dist/features/inapp/core/engine.d.ts +72 -0
- package/dist/features/inapp/core/engine.d.ts.map +1 -0
- package/dist/features/inapp/core/engine.js +248 -0
- package/dist/features/inapp/core/engine.js.map +1 -0
- package/dist/features/inapp/core/environment.d.ts +21 -0
- package/dist/features/inapp/core/environment.d.ts.map +1 -0
- package/dist/features/inapp/core/environment.js +57 -0
- package/dist/features/inapp/core/environment.js.map +1 -0
- package/dist/features/inapp/core/host.d.ts +53 -0
- package/dist/features/inapp/core/host.d.ts.map +1 -0
- package/dist/features/inapp/core/host.js +243 -0
- package/dist/features/inapp/core/host.js.map +1 -0
- package/dist/features/inapp/core/keyboard.d.ts +27 -0
- package/dist/features/inapp/core/keyboard.d.ts.map +1 -0
- package/dist/features/inapp/core/keyboard.js +69 -0
- package/dist/features/inapp/core/keyboard.js.map +1 -0
- package/dist/features/inapp/core/metrics.d.ts +73 -0
- package/dist/features/inapp/core/metrics.d.ts.map +1 -0
- package/dist/features/inapp/core/metrics.js +125 -0
- package/dist/features/inapp/core/metrics.js.map +1 -0
- package/dist/features/inapp/core/migration.d.ts +32 -0
- package/dist/features/inapp/core/migration.d.ts.map +1 -0
- package/dist/features/inapp/core/migration.js +28 -0
- package/dist/features/inapp/core/migration.js.map +1 -0
- package/dist/features/inapp/core/orchestrator.d.ts +77 -0
- package/dist/features/inapp/core/orchestrator.d.ts.map +1 -0
- package/dist/features/inapp/core/orchestrator.js +144 -0
- package/dist/features/inapp/core/orchestrator.js.map +1 -0
- package/dist/features/inapp/core/respect.d.ts +51 -0
- package/dist/features/inapp/core/respect.d.ts.map +1 -0
- package/dist/features/inapp/core/respect.js +78 -0
- package/dist/features/inapp/core/respect.js.map +1 -0
- package/dist/features/inapp/core/slots.d.ts +19 -0
- package/dist/features/inapp/core/slots.d.ts.map +1 -0
- package/dist/features/inapp/core/slots.js +53 -0
- package/dist/features/inapp/core/slots.js.map +1 -0
- package/dist/features/inapp/core/targeting.d.ts +85 -0
- package/dist/features/inapp/core/targeting.d.ts.map +1 -0
- package/dist/features/inapp/core/targeting.js +255 -0
- package/dist/features/inapp/core/targeting.js.map +1 -0
- package/dist/features/inapp/core/transport.d.ts +66 -0
- package/dist/features/inapp/core/transport.d.ts.map +1 -0
- package/dist/features/inapp/core/transport.js +154 -0
- package/dist/features/inapp/core/transport.js.map +1 -0
- package/dist/features/inapp/core/triggers.d.ts +94 -0
- package/dist/features/inapp/core/triggers.d.ts.map +1 -0
- package/dist/features/inapp/core/triggers.js +368 -0
- package/dist/features/inapp/core/triggers.js.map +1 -0
- package/dist/features/inapp/inappContract.web.d.ts +47 -0
- package/dist/features/inapp/inappContract.web.d.ts.map +1 -0
- package/dist/features/inapp/inappContract.web.js +230 -0
- package/dist/features/inapp/inappContract.web.js.map +1 -0
- package/dist/features/inapp/index.d.ts +23 -0
- package/dist/features/inapp/index.d.ts.map +1 -0
- package/dist/features/inapp/index.js +23 -0
- package/dist/features/inapp/index.js.map +1 -0
- package/dist/features/inapp/registry.canonical.hash.d.ts +7 -0
- package/dist/features/inapp/registry.canonical.hash.d.ts.map +1 -0
- package/dist/features/inapp/registry.canonical.hash.js +7 -0
- package/dist/features/inapp/registry.canonical.hash.js.map +1 -0
- package/dist/features/inapp/registry.web.canonical.d.ts +21 -0
- package/dist/features/inapp/registry.web.canonical.d.ts.map +1 -0
- package/dist/features/inapp/registry.web.canonical.js +136 -0
- package/dist/features/inapp/registry.web.canonical.js.map +1 -0
- package/dist/features/inapp/registry.web.catalog.d.ts +12 -0
- package/dist/features/inapp/registry.web.catalog.d.ts.map +1 -0
- package/dist/features/inapp/registry.web.catalog.js +208 -0
- package/dist/features/inapp/registry.web.catalog.js.map +1 -0
- package/dist/features/inapp/surfaces/banner.d.ts +7 -0
- package/dist/features/inapp/surfaces/banner.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/banner.js +30 -0
- package/dist/features/inapp/surfaces/banner.js.map +1 -0
- package/dist/features/inapp/surfaces/checklist.d.ts +13 -0
- package/dist/features/inapp/surfaces/checklist.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/checklist.js +127 -0
- package/dist/features/inapp/surfaces/checklist.js.map +1 -0
- package/dist/features/inapp/surfaces/coachmark.d.ts +10 -0
- package/dist/features/inapp/surfaces/coachmark.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/coachmark.js +95 -0
- package/dist/features/inapp/surfaces/coachmark.js.map +1 -0
- package/dist/features/inapp/surfaces/hotspot.d.ts +8 -0
- package/dist/features/inapp/surfaces/hotspot.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/hotspot.js +91 -0
- package/dist/features/inapp/surfaces/hotspot.js.map +1 -0
- package/dist/features/inapp/surfaces/inline.d.ts +13 -0
- package/dist/features/inapp/surfaces/inline.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/inline.js +78 -0
- package/dist/features/inapp/surfaces/inline.js.map +1 -0
- package/dist/features/inapp/surfaces/launcher.d.ts +9 -0
- package/dist/features/inapp/surfaces/launcher.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/launcher.js +54 -0
- package/dist/features/inapp/surfaces/launcher.js.map +1 -0
- package/dist/features/inapp/surfaces/modal.d.ts +8 -0
- package/dist/features/inapp/surfaces/modal.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/modal.js +70 -0
- package/dist/features/inapp/surfaces/modal.js.map +1 -0
- package/dist/features/inapp/surfaces/mount.d.ts +19 -0
- package/dist/features/inapp/surfaces/mount.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/mount.js +29 -0
- package/dist/features/inapp/surfaces/mount.js.map +1 -0
- package/dist/features/inapp/surfaces/palette.d.ts +9 -0
- package/dist/features/inapp/surfaces/palette.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/palette.js +127 -0
- package/dist/features/inapp/surfaces/palette.js.map +1 -0
- package/dist/features/inapp/surfaces/panel.d.ts +14 -0
- package/dist/features/inapp/surfaces/panel.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/panel.js +91 -0
- package/dist/features/inapp/surfaces/panel.js.map +1 -0
- package/dist/features/inapp/surfaces/popover.d.ts +10 -0
- package/dist/features/inapp/surfaces/popover.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/popover.js +69 -0
- package/dist/features/inapp/surfaces/popover.js.map +1 -0
- package/dist/features/inapp/surfaces/render.d.ts +34 -0
- package/dist/features/inapp/surfaces/render.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/render.js +56 -0
- package/dist/features/inapp/surfaces/render.js.map +1 -0
- package/dist/features/inapp/surfaces/slideover.d.ts +9 -0
- package/dist/features/inapp/surfaces/slideover.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/slideover.js +144 -0
- package/dist/features/inapp/surfaces/slideover.js.map +1 -0
- package/dist/features/inapp/surfaces/styles.d.ts +7 -0
- package/dist/features/inapp/surfaces/styles.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/styles.js +235 -0
- package/dist/features/inapp/surfaces/styles.js.map +1 -0
- package/dist/features/inapp/surfaces/surface.d.ts +69 -0
- package/dist/features/inapp/surfaces/surface.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/surface.js +80 -0
- package/dist/features/inapp/surfaces/surface.js.map +1 -0
- package/dist/features/inapp/surfaces/takeover.d.ts +9 -0
- package/dist/features/inapp/surfaces/takeover.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/takeover.js +60 -0
- package/dist/features/inapp/surfaces/takeover.js.map +1 -0
- package/dist/features/inapp/surfaces/toast.d.ts +7 -0
- package/dist/features/inapp/surfaces/toast.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/toast.js +48 -0
- package/dist/features/inapp/surfaces/toast.js.map +1 -0
- package/dist/features/inapp/surfaces/toolbar.d.ts +8 -0
- package/dist/features/inapp/surfaces/toolbar.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/toolbar.js +65 -0
- package/dist/features/inapp/surfaces/toolbar.js.map +1 -0
- package/dist/features/inapp/surfaces/tour.d.ts +14 -0
- package/dist/features/inapp/surfaces/tour.d.ts.map +1 -0
- package/dist/features/inapp/surfaces/tour.js +202 -0
- package/dist/features/inapp/surfaces/tour.js.map +1 -0
- package/dist/features/inapp/types.d.ts +165 -0
- package/dist/features/inapp/types.d.ts.map +1 -0
- package/dist/features/inapp/types.js +12 -0
- package/dist/features/inapp/types.js.map +1 -0
- package/dist/features/inbox/InboxFeature.d.ts +57 -0
- package/dist/features/inbox/InboxFeature.d.ts.map +1 -0
- package/dist/features/inbox/InboxFeature.js +225 -0
- package/dist/features/inbox/InboxFeature.js.map +1 -0
- package/dist/features/inbox/runtime.d.ts +67 -0
- package/dist/features/inbox/runtime.d.ts.map +1 -0
- package/dist/features/inbox/runtime.js +376 -0
- package/dist/features/inbox/runtime.js.map +1 -0
- package/dist/features/inbox/store.d.ts +37 -0
- package/dist/features/inbox/store.d.ts.map +1 -0
- package/dist/features/inbox/store.js +149 -0
- package/dist/features/inbox/store.js.map +1 -0
- package/dist/features/inbox/sync.d.ts +49 -0
- package/dist/features/inbox/sync.d.ts.map +1 -0
- package/dist/features/inbox/sync.js +131 -0
- package/dist/features/inbox/sync.js.map +1 -0
- package/dist/features/inbox/types.d.ts +275 -0
- package/dist/features/inbox/types.d.ts.map +1 -0
- package/dist/features/inbox/types.js +42 -0
- package/dist/features/inbox/types.js.map +1 -0
- package/dist/features/inbox/widget/InboxWidget.d.ts +16 -0
- package/dist/features/inbox/widget/InboxWidget.d.ts.map +1 -0
- package/dist/features/inbox/widget/InboxWidget.js +609 -0
- package/dist/features/inbox/widget/InboxWidget.js.map +1 -0
- package/dist/features/index.d.ts +21 -0
- package/dist/features/index.d.ts.map +1 -0
- package/dist/features/index.js +2 -0
- package/dist/features/index.js.map +1 -0
- package/dist/features/journey/InteractionTracker.d.ts +87 -0
- package/dist/features/journey/InteractionTracker.d.ts.map +1 -0
- package/dist/features/journey/InteractionTracker.js +466 -0
- package/dist/features/journey/InteractionTracker.js.map +1 -0
- package/dist/features/journey/JourneyFeature.d.ts +18 -0
- package/dist/features/journey/JourneyFeature.d.ts.map +1 -0
- package/dist/features/journey/JourneyFeature.js +71 -0
- package/dist/features/journey/JourneyFeature.js.map +1 -0
- package/dist/features/journey/NavigationTracker.d.ts +16 -0
- package/dist/features/journey/NavigationTracker.d.ts.map +1 -0
- package/dist/features/journey/NavigationTracker.js +92 -0
- package/dist/features/journey/NavigationTracker.js.map +1 -0
- package/dist/features/journey/friction.d.ts +28 -0
- package/dist/features/journey/friction.d.ts.map +1 -0
- package/dist/features/journey/friction.js +64 -0
- package/dist/features/journey/friction.js.map +1 -0
- package/dist/features/journey/positionContext.d.ts +30 -0
- package/dist/features/journey/positionContext.d.ts.map +1 -0
- package/dist/features/journey/positionContext.js +116 -0
- package/dist/features/journey/positionContext.js.map +1 -0
- package/dist/features/journey/uiState.d.ts +44 -0
- package/dist/features/journey/uiState.d.ts.map +1 -0
- package/dist/features/journey/uiState.js +158 -0
- package/dist/features/journey/uiState.js.map +1 -0
- package/dist/features/manifest.d.ts +41 -0
- package/dist/features/manifest.d.ts.map +1 -0
- package/dist/features/manifest.js +93 -0
- package/dist/features/manifest.js.map +1 -0
- package/dist/features/network/NetworkFeature.d.ts +60 -0
- package/dist/features/network/NetworkFeature.d.ts.map +1 -0
- package/dist/features/network/NetworkFeature.js +260 -0
- package/dist/features/network/NetworkFeature.js.map +1 -0
- package/dist/features/network/capture/body.d.ts +31 -0
- package/dist/features/network/capture/body.d.ts.map +1 -0
- package/dist/features/network/capture/body.js +81 -0
- package/dist/features/network/capture/body.js.map +1 -0
- package/dist/features/network/classify.d.ts +21 -0
- package/dist/features/network/classify.d.ts.map +1 -0
- package/dist/features/network/classify.js +50 -0
- package/dist/features/network/classify.js.map +1 -0
- package/dist/features/network/dedup.d.ts +36 -0
- package/dist/features/network/dedup.d.ts.map +1 -0
- package/dist/features/network/dedup.js +68 -0
- package/dist/features/network/dedup.js.map +1 -0
- package/dist/features/network/fetchInterceptor.d.ts +20 -0
- package/dist/features/network/fetchInterceptor.d.ts.map +1 -0
- package/dist/features/network/fetchInterceptor.js +158 -0
- package/dist/features/network/fetchInterceptor.js.map +1 -0
- package/dist/features/network/intercept/beacon.d.ts +14 -0
- package/dist/features/network/intercept/beacon.d.ts.map +1 -0
- package/dist/features/network/intercept/beacon.js +56 -0
- package/dist/features/network/intercept/beacon.js.map +1 -0
- package/dist/features/network/intercept/sse.d.ts +16 -0
- package/dist/features/network/intercept/sse.d.ts.map +1 -0
- package/dist/features/network/intercept/sse.js +74 -0
- package/dist/features/network/intercept/sse.js.map +1 -0
- package/dist/features/network/intercept/streams.d.ts +23 -0
- package/dist/features/network/intercept/streams.d.ts.map +1 -0
- package/dist/features/network/intercept/streams.js +25 -0
- package/dist/features/network/intercept/streams.js.map +1 -0
- package/dist/features/network/intercept/websocket.d.ts +14 -0
- package/dist/features/network/intercept/websocket.d.ts.map +1 -0
- package/dist/features/network/intercept/websocket.js +97 -0
- package/dist/features/network/intercept/websocket.js.map +1 -0
- package/dist/features/network/lazy.d.ts +23 -0
- package/dist/features/network/lazy.d.ts.map +1 -0
- package/dist/features/network/lazy.js +65 -0
- package/dist/features/network/lazy.js.map +1 -0
- package/dist/features/network/normalize.d.ts +9 -0
- package/dist/features/network/normalize.d.ts.map +1 -0
- package/dist/features/network/normalize.js +49 -0
- package/dist/features/network/normalize.js.map +1 -0
- package/dist/features/network/parse/graphql.d.ts +17 -0
- package/dist/features/network/parse/graphql.d.ts.map +1 -0
- package/dist/features/network/parse/graphql.js +106 -0
- package/dist/features/network/parse/graphql.js.map +1 -0
- package/dist/features/network/parse/url.d.ts +12 -0
- package/dist/features/network/parse/url.d.ts.map +1 -0
- package/dist/features/network/parse/url.js +52 -0
- package/dist/features/network/parse/url.js.map +1 -0
- package/dist/features/network/sampler.d.ts +21 -0
- package/dist/features/network/sampler.d.ts.map +1 -0
- package/dist/features/network/sampler.js +25 -0
- package/dist/features/network/sampler.js.map +1 -0
- package/dist/features/network/size.d.ts +21 -0
- package/dist/features/network/size.d.ts.map +1 -0
- package/dist/features/network/size.js +63 -0
- package/dist/features/network/size.js.map +1 -0
- package/dist/features/network/thirdParty.d.ts +95 -0
- package/dist/features/network/thirdParty.d.ts.map +1 -0
- package/dist/features/network/thirdParty.js +126 -0
- package/dist/features/network/thirdParty.js.map +1 -0
- package/dist/features/network/timing.d.ts +41 -0
- package/dist/features/network/timing.d.ts.map +1 -0
- package/dist/features/network/timing.js +134 -0
- package/dist/features/network/timing.js.map +1 -0
- package/dist/features/network/tracing.d.ts +18 -0
- package/dist/features/network/tracing.d.ts.map +1 -0
- package/dist/features/network/tracing.js +46 -0
- package/dist/features/network/tracing.js.map +1 -0
- package/dist/features/network/types.d.ts +75 -0
- package/dist/features/network/types.d.ts.map +1 -0
- package/dist/features/network/types.js +2 -0
- package/dist/features/network/types.js.map +1 -0
- package/dist/features/network/xhrInterceptor.d.ts +12 -0
- package/dist/features/network/xhrInterceptor.d.ts.map +1 -0
- package/dist/features/network/xhrInterceptor.js +108 -0
- package/dist/features/network/xhrInterceptor.js.map +1 -0
- package/dist/features/performance/PerformanceFeature.d.ts +76 -0
- package/dist/features/performance/PerformanceFeature.d.ts.map +1 -0
- package/dist/features/performance/PerformanceFeature.js +265 -0
- package/dist/features/performance/PerformanceFeature.js.map +1 -0
- package/dist/features/performance/jankTap.d.ts +23 -0
- package/dist/features/performance/jankTap.d.ts.map +1 -0
- package/dist/features/performance/jankTap.js +20 -0
- package/dist/features/performance/jankTap.js.map +1 -0
- package/dist/features/performance/longTasks.d.ts +14 -0
- package/dist/features/performance/longTasks.d.ts.map +1 -0
- package/dist/features/performance/longTasks.js +55 -0
- package/dist/features/performance/longTasks.js.map +1 -0
- package/dist/features/performance/normalize.d.ts +15 -0
- package/dist/features/performance/normalize.d.ts.map +1 -0
- package/dist/features/performance/normalize.js +30 -0
- package/dist/features/performance/normalize.js.map +1 -0
- package/dist/features/performance/resources.d.ts +19 -0
- package/dist/features/performance/resources.d.ts.map +1 -0
- package/dist/features/performance/resources.js +78 -0
- package/dist/features/performance/resources.js.map +1 -0
- package/dist/features/performance/sampler.d.ts +10 -0
- package/dist/features/performance/sampler.d.ts.map +1 -0
- package/dist/features/performance/sampler.js +23 -0
- package/dist/features/performance/sampler.js.map +1 -0
- package/dist/features/performance/spa.d.ts +2 -0
- package/dist/features/performance/spa.d.ts.map +1 -0
- package/dist/features/performance/spa.js +40 -0
- package/dist/features/performance/spa.js.map +1 -0
- package/dist/features/performance/throttle.d.ts +21 -0
- package/dist/features/performance/throttle.d.ts.map +1 -0
- package/dist/features/performance/throttle.js +26 -0
- package/dist/features/performance/throttle.js.map +1 -0
- package/dist/features/performance/trace/context.d.ts +17 -0
- package/dist/features/performance/trace/context.d.ts.map +1 -0
- package/dist/features/performance/trace/context.js +33 -0
- package/dist/features/performance/trace/context.js.map +1 -0
- package/dist/features/performance/trace/index.d.ts +7 -0
- package/dist/features/performance/trace/index.d.ts.map +1 -0
- package/dist/features/performance/trace/index.js +6 -0
- package/dist/features/performance/trace/index.js.map +1 -0
- package/dist/features/performance/trace/pageload.d.ts +3 -0
- package/dist/features/performance/trace/pageload.d.ts.map +1 -0
- package/dist/features/performance/trace/pageload.js +34 -0
- package/dist/features/performance/trace/pageload.js.map +1 -0
- package/dist/features/performance/trace/transaction.d.ts +61 -0
- package/dist/features/performance/trace/transaction.d.ts.map +1 -0
- package/dist/features/performance/trace/transaction.js +90 -0
- package/dist/features/performance/trace/transaction.js.map +1 -0
- package/dist/features/performance/trace/types.d.ts +23 -0
- package/dist/features/performance/trace/types.d.ts.map +1 -0
- package/dist/features/performance/trace/types.js +10 -0
- package/dist/features/performance/trace/types.js.map +1 -0
- package/dist/features/performance/traces.d.ts +36 -0
- package/dist/features/performance/traces.d.ts.map +1 -0
- package/dist/features/performance/traces.js +50 -0
- package/dist/features/performance/traces.js.map +1 -0
- package/dist/features/profiler/ProfilerFeature.d.ts +28 -0
- package/dist/features/profiler/ProfilerFeature.d.ts.map +1 -0
- package/dist/features/profiler/ProfilerFeature.js +82 -0
- package/dist/features/profiler/ProfilerFeature.js.map +1 -0
- package/dist/features/profiler/capture.d.ts +8 -0
- package/dist/features/profiler/capture.d.ts.map +1 -0
- package/dist/features/profiler/capture.js +21 -0
- package/dist/features/profiler/capture.js.map +1 -0
- package/dist/features/push/PushFeature.d.ts +120 -0
- package/dist/features/push/PushFeature.d.ts.map +1 -0
- package/dist/features/push/PushFeature.js +319 -0
- package/dist/features/push/PushFeature.js.map +1 -0
- package/dist/features/push/diagnostics.d.ts +55 -0
- package/dist/features/push/diagnostics.d.ts.map +1 -0
- package/dist/features/push/diagnostics.js +383 -0
- package/dist/features/push/diagnostics.js.map +1 -0
- package/dist/features/push/pushState.d.ts +58 -0
- package/dist/features/push/pushState.d.ts.map +1 -0
- package/dist/features/push/pushState.js +75 -0
- package/dist/features/push/pushState.js.map +1 -0
- package/dist/features/push/softAsk.d.ts +68 -0
- package/dist/features/push/softAsk.d.ts.map +1 -0
- package/dist/features/push/softAsk.js +142 -0
- package/dist/features/push/softAsk.js.map +1 -0
- package/dist/features/replay/ReplayFeature.d.ts +52 -0
- package/dist/features/replay/ReplayFeature.d.ts.map +1 -0
- package/dist/features/replay/ReplayFeature.js +282 -0
- package/dist/features/replay/ReplayFeature.js.map +1 -0
- package/dist/features/replay/engine/canvas.d.ts +45 -0
- package/dist/features/replay/engine/canvas.d.ts.map +1 -0
- package/dist/features/replay/engine/canvas.js +122 -0
- package/dist/features/replay/engine/canvas.js.map +1 -0
- package/dist/features/replay/engine/crossOrigin.d.ts +23 -0
- package/dist/features/replay/engine/crossOrigin.d.ts.map +1 -0
- package/dist/features/replay/engine/crossOrigin.js +108 -0
- package/dist/features/replay/engine/crossOrigin.js.map +1 -0
- package/dist/features/replay/engine/cssom.d.ts +31 -0
- package/dist/features/replay/engine/cssom.d.ts.map +1 -0
- package/dist/features/replay/engine/cssom.js +128 -0
- package/dist/features/replay/engine/cssom.js.map +1 -0
- package/dist/features/replay/engine/iframe.d.ts +65 -0
- package/dist/features/replay/engine/iframe.d.ts.map +1 -0
- package/dist/features/replay/engine/iframe.js +186 -0
- package/dist/features/replay/engine/iframe.js.map +1 -0
- package/dist/features/replay/engine/interactions.d.ts +172 -0
- package/dist/features/replay/engine/interactions.d.ts.map +1 -0
- package/dist/features/replay/engine/interactions.js +437 -0
- package/dist/features/replay/engine/interactions.js.map +1 -0
- package/dist/features/replay/engine/mutations.d.ts +65 -0
- package/dist/features/replay/engine/mutations.d.ts.map +1 -0
- package/dist/features/replay/engine/mutations.js +304 -0
- package/dist/features/replay/engine/mutations.js.map +1 -0
- package/dist/features/replay/engine/nodeRegistry.d.ts +23 -0
- package/dist/features/replay/engine/nodeRegistry.d.ts.map +1 -0
- package/dist/features/replay/engine/nodeRegistry.js +51 -0
- package/dist/features/replay/engine/nodeRegistry.js.map +1 -0
- package/dist/features/replay/engine/player.d.ts +11 -0
- package/dist/features/replay/engine/player.d.ts.map +1 -0
- package/dist/features/replay/engine/player.js +284 -0
- package/dist/features/replay/engine/player.js.map +1 -0
- package/dist/features/replay/engine/rebuild.d.ts +8 -0
- package/dist/features/replay/engine/rebuild.d.ts.map +1 -0
- package/dist/features/replay/engine/rebuild.js +46 -0
- package/dist/features/replay/engine/rebuild.js.map +1 -0
- package/dist/features/replay/engine/replayWorker.d.ts +33 -0
- package/dist/features/replay/engine/replayWorker.d.ts.map +1 -0
- package/dist/features/replay/engine/replayWorker.js +175 -0
- package/dist/features/replay/engine/replayWorker.js.map +1 -0
- package/dist/features/replay/engine/resources.d.ts +52 -0
- package/dist/features/replay/engine/resources.d.ts.map +1 -0
- package/dist/features/replay/engine/resources.js +132 -0
- package/dist/features/replay/engine/resources.js.map +1 -0
- package/dist/features/replay/engine/snapshot.d.ts +103 -0
- package/dist/features/replay/engine/snapshot.d.ts.map +1 -0
- package/dist/features/replay/engine/snapshot.js +459 -0
- package/dist/features/replay/engine/snapshot.js.map +1 -0
- package/dist/features/replay/engine/traverse.d.ts +19 -0
- package/dist/features/replay/engine/traverse.d.ts.map +1 -0
- package/dist/features/replay/engine/traverse.js +39 -0
- package/dist/features/replay/engine/traverse.js.map +1 -0
- package/dist/features/replay/engine/types.d.ts +149 -0
- package/dist/features/replay/engine/types.d.ts.map +1 -0
- package/dist/features/replay/engine/types.js +6 -0
- package/dist/features/replay/engine/types.js.map +1 -0
- package/dist/features/replay/engine/webglPatch.d.ts +26 -0
- package/dist/features/replay/engine/webglPatch.d.ts.map +1 -0
- package/dist/features/replay/engine/webglPatch.js +83 -0
- package/dist/features/replay/engine/webglPatch.js.map +1 -0
- package/dist/features/replay/lifecycle/adaptive.d.ts +38 -0
- package/dist/features/replay/lifecycle/adaptive.d.ts.map +1 -0
- package/dist/features/replay/lifecycle/adaptive.js +90 -0
- package/dist/features/replay/lifecycle/adaptive.js.map +1 -0
- package/dist/features/replay/lifecycle/cadence.d.ts +35 -0
- package/dist/features/replay/lifecycle/cadence.d.ts.map +1 -0
- package/dist/features/replay/lifecycle/cadence.js +149 -0
- package/dist/features/replay/lifecycle/cadence.js.map +1 -0
- package/dist/features/replay/lifecycle/deltaBatcher.d.ts +31 -0
- package/dist/features/replay/lifecycle/deltaBatcher.d.ts.map +1 -0
- package/dist/features/replay/lifecycle/deltaBatcher.js +32 -0
- package/dist/features/replay/lifecycle/deltaBatcher.js.map +1 -0
- package/dist/features/replay/lifecycle/deviceSignals.d.ts +35 -0
- package/dist/features/replay/lifecycle/deviceSignals.d.ts.map +1 -0
- package/dist/features/replay/lifecycle/deviceSignals.js +61 -0
- package/dist/features/replay/lifecycle/deviceSignals.js.map +1 -0
- package/dist/features/replay/lifecycle/offloadDomFrames.d.ts +69 -0
- package/dist/features/replay/lifecycle/offloadDomFrames.d.ts.map +1 -0
- package/dist/features/replay/lifecycle/offloadDomFrames.js +107 -0
- package/dist/features/replay/lifecycle/offloadDomFrames.js.map +1 -0
- package/dist/features/replay/lifecycle/pii.d.ts +14 -0
- package/dist/features/replay/lifecycle/pii.d.ts.map +1 -0
- package/dist/features/replay/lifecycle/pii.js +52 -0
- package/dist/features/replay/lifecycle/pii.js.map +1 -0
- package/dist/features/replay/lifecycle/recorder.d.ts +178 -0
- package/dist/features/replay/lifecycle/recorder.d.ts.map +1 -0
- package/dist/features/replay/lifecycle/recorder.js +644 -0
- package/dist/features/replay/lifecycle/recorder.js.map +1 -0
- package/dist/features/replay/lifecycle/sampling.d.ts +28 -0
- package/dist/features/replay/lifecycle/sampling.d.ts.map +1 -0
- package/dist/features/replay/lifecycle/sampling.js +31 -0
- package/dist/features/replay/lifecycle/sampling.js.map +1 -0
- package/dist/features/replay/lifecycle/segmentBuffer.d.ts +75 -0
- package/dist/features/replay/lifecycle/segmentBuffer.d.ts.map +1 -0
- package/dist/features/replay/lifecycle/segmentBuffer.js +130 -0
- package/dist/features/replay/lifecycle/segmentBuffer.js.map +1 -0
- package/dist/features/replay/lifecycle/viewContext.d.ts +7 -0
- package/dist/features/replay/lifecycle/viewContext.d.ts.map +1 -0
- package/dist/features/replay/lifecycle/viewContext.js +51 -0
- package/dist/features/replay/lifecycle/viewContext.js.map +1 -0
- package/dist/features/scroll/index.d.ts +33 -0
- package/dist/features/scroll/index.d.ts.map +1 -0
- package/dist/features/scroll/index.js +106 -0
- package/dist/features/scroll/index.js.map +1 -0
- package/dist/features/session/sessionManager.d.ts +41 -0
- package/dist/features/session/sessionManager.d.ts.map +1 -0
- package/dist/features/session/sessionManager.js +67 -0
- package/dist/features/session/sessionManager.js.map +1 -0
- package/dist/features/session/sessionStore.d.ts +137 -0
- package/dist/features/session/sessionStore.d.ts.map +1 -0
- package/dist/features/session/sessionStore.js +323 -0
- package/dist/features/session/sessionStore.js.map +1 -0
- package/dist/features/watchdog/WatchdogFeature.d.ts +23 -0
- package/dist/features/watchdog/WatchdogFeature.d.ts.map +1 -0
- package/dist/features/watchdog/WatchdogFeature.js +29 -0
- package/dist/features/watchdog/WatchdogFeature.js.map +1 -0
- package/dist/features/watchdog/collectors.d.ts +18 -0
- package/dist/features/watchdog/collectors.d.ts.map +1 -0
- package/dist/features/watchdog/collectors.js +107 -0
- package/dist/features/watchdog/collectors.js.map +1 -0
- package/dist/features/watchdog/config.d.ts +51 -0
- package/dist/features/watchdog/config.d.ts.map +1 -0
- package/dist/features/watchdog/config.js +28 -0
- package/dist/features/watchdog/config.js.map +1 -0
- package/dist/features/watchdog/engine.d.ts +22 -0
- package/dist/features/watchdog/engine.d.ts.map +1 -0
- package/dist/features/watchdog/engine.js +123 -0
- package/dist/features/watchdog/engine.js.map +1 -0
- package/dist/features/watchdog/incidents.d.ts +79 -0
- package/dist/features/watchdog/incidents.d.ts.map +1 -0
- package/dist/features/watchdog/incidents.js +204 -0
- package/dist/features/watchdog/incidents.js.map +1 -0
- package/dist/features/watchdog/rollup.d.ts +41 -0
- package/dist/features/watchdog/rollup.d.ts.map +1 -0
- package/dist/features/watchdog/rollup.js +76 -0
- package/dist/features/watchdog/rollup.js.map +1 -0
- package/dist/features/webVitals/WebVitalsFeature.d.ts +46 -0
- package/dist/features/webVitals/WebVitalsFeature.d.ts.map +1 -0
- package/dist/features/webVitals/WebVitalsFeature.js +252 -0
- package/dist/features/webVitals/WebVitalsFeature.js.map +1 -0
- package/dist/features/webVitals/attribution.d.ts +50 -0
- package/dist/features/webVitals/attribution.d.ts.map +1 -0
- package/dist/features/webVitals/attribution.js +186 -0
- package/dist/features/webVitals/attribution.js.map +1 -0
- package/dist/features/webVitals/observe.d.ts +6 -0
- package/dist/features/webVitals/observe.d.ts.map +1 -0
- package/dist/features/webVitals/observe.js +6 -0
- package/dist/features/webVitals/observe.js.map +1 -0
- package/dist/features/webVitals/vitals.d.ts +99 -0
- package/dist/features/webVitals/vitals.d.ts.map +1 -0
- package/dist/features/webVitals/vitals.js +166 -0
- package/dist/features/webVitals/vitals.js.map +1 -0
- package/dist/features/webperf/WebPerfFeature.d.ts +19 -0
- package/dist/features/webperf/WebPerfFeature.d.ts.map +1 -0
- package/dist/features/webperf/WebPerfFeature.js +48 -0
- package/dist/features/webperf/WebPerfFeature.js.map +1 -0
- package/dist/features/webperf/collectors.d.ts +3 -0
- package/dist/features/webperf/collectors.d.ts.map +1 -0
- package/dist/features/webperf/collectors.js +118 -0
- package/dist/features/webperf/collectors.js.map +1 -0
- package/dist/features/webperf/math.d.ts +12 -0
- package/dist/features/webperf/math.d.ts.map +1 -0
- package/dist/features/webperf/math.js +26 -0
- package/dist/features/webperf/math.js.map +1 -0
- package/dist/inapp.d.ts +6 -0
- package/dist/inapp.d.ts.map +1 -0
- package/dist/inapp.js +6 -0
- package/dist/inapp.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/index.d.ts +7 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/index.js +2 -0
- package/dist/integrations/index.js.map +1 -0
- package/dist/pipeline/index.d.ts +3 -0
- package/dist/pipeline/index.d.ts.map +1 -0
- package/dist/pipeline/index.js +3 -0
- package/dist/pipeline/index.js.map +1 -0
- package/dist/pipeline/pipeline.d.ts +263 -0
- package/dist/pipeline/pipeline.d.ts.map +1 -0
- package/dist/pipeline/pipeline.js +783 -0
- package/dist/pipeline/pipeline.js.map +1 -0
- package/dist/public/ScaleBunFacade.d.ts +436 -0
- package/dist/public/ScaleBunFacade.d.ts.map +1 -0
- package/dist/public/ScaleBunFacade.js +857 -0
- package/dist/public/ScaleBunFacade.js.map +1 -0
- package/dist/public/index.d.ts +5 -0
- package/dist/public/index.d.ts.map +1 -0
- package/dist/public/index.js +4 -0
- package/dist/public/index.js.map +1 -0
- package/dist/public/typedTracker.d.ts +91 -0
- package/dist/public/typedTracker.d.ts.map +1 -0
- package/dist/public/typedTracker.js +60 -0
- package/dist/public/typedTracker.js.map +1 -0
- package/dist/scalebun-push-sw.js +236 -0
- package/dist/scalebun.min.js +717 -0
- package/dist/scalebun.min.js.map +7 -0
- package/dist/storage/idb.d.ts +16 -0
- package/dist/storage/idb.d.ts.map +1 -0
- package/dist/storage/idb.js +76 -0
- package/dist/storage/idb.js.map +1 -0
- package/dist/storage/index.d.ts +3 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +3 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/transport/gzip.d.ts +2 -0
- package/dist/transport/gzip.d.ts.map +1 -0
- package/dist/transport/gzip.js +20 -0
- package/dist/transport/gzip.js.map +1 -0
- package/dist/transport/httpClient.d.ts +156 -0
- package/dist/transport/httpClient.d.ts.map +1 -0
- package/dist/transport/httpClient.js +277 -0
- package/dist/transport/httpClient.js.map +1 -0
- package/dist/transport/index.d.ts +3 -0
- package/dist/transport/index.d.ts.map +1 -0
- package/dist/transport/index.js +3 -0
- package/dist/transport/index.js.map +1 -0
- package/dist/transport/sign.d.ts +25 -0
- package/dist/transport/sign.d.ts.map +1 -0
- package/dist/transport/sign.js +58 -0
- package/dist/transport/sign.js.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI STATE AT INTERACTION TIME — which visual surface the visitor was actually looking at.
|
|
3
|
+
*
|
|
4
|
+
* A page is not just `/products`. It is `/products` with the cart drawer shut, or with it open, or
|
|
5
|
+
* with the reviews tab selected. Those are different interaction surfaces, and a click on one must
|
|
6
|
+
* never be counted on another: heat from the open drawer painted over the closed layout is a picture
|
|
7
|
+
* of something that never existed.
|
|
8
|
+
*
|
|
9
|
+
* WHAT WAS WRONG WITH THE PREVIOUS SHAPE. State was captured as an opaque set of the things that
|
|
10
|
+
* happened to be OPEN — `menu|dialog`, sorted and joined. Two consequences:
|
|
11
|
+
*
|
|
12
|
+
* 1. `sidebar = closed` was not representable. Absence meant "nothing open", which conflates a shut
|
|
13
|
+
* sidebar with a page that has no sidebar. But the click that OPENS a drawer belongs to the
|
|
14
|
+
* closed state — that is what the visitor saw when they reached for it — so the closed value has
|
|
15
|
+
* to exist to receive it.
|
|
16
|
+
* 2. It could not be queried by dimension. Asking for `sidebar=open` meant matching the whole
|
|
17
|
+
* signature, so every unrelated dimension had to match too and the buckets fragmented
|
|
18
|
+
* combinatorially.
|
|
19
|
+
*
|
|
20
|
+
* THE SHAPE NOW: `name:value` pairs, sorted, joined with `;`. Still ONE short string on the wire — no
|
|
21
|
+
* new field — but the backend can split it and match one dimension without constraining the others.
|
|
22
|
+
*
|
|
23
|
+
* DELIBERATELY NARROW, because every byte here is eager. Only `aria-expanded` (read in BOTH states,
|
|
24
|
+
* which is what makes "closed" a value rather than an absence) and `dialog` (likewise). No
|
|
25
|
+
* `aria-selected`, no `aria-current`, no `details` — those were measured at ~90 B of bundle for
|
|
26
|
+
* dimensions the host can declare explicitly for free. No class-name guessing at any price: `.is-open`
|
|
27
|
+
* is right on some sites and silently wrong on others, and a wrong state key partitions clicks into
|
|
28
|
+
* buckets that correspond to nothing.
|
|
29
|
+
*
|
|
30
|
+
* Anything the platform does not express is `setUiState`'s job, and an explicit dimension WINS for the
|
|
31
|
+
* same name — a heuristic that silently overrode a declaration would make the API pointless.
|
|
32
|
+
*/
|
|
33
|
+
/** Explicit host-declared state, merged over automatic detection. */
|
|
34
|
+
const explicit = new Map();
|
|
35
|
+
/**
|
|
36
|
+
* `;` and `:` are the wire separators, so they cannot appear inside a name or value, and the length is
|
|
37
|
+
* bounded. Names and values are IDENTIFIERS, not content: they become query keys in the dashboard, so
|
|
38
|
+
* a value carrying a person's name would put user data into an aggregation key.
|
|
39
|
+
*/
|
|
40
|
+
const clean = (s) => typeof s === 'string' ? s.replace(/[;:|]/g, '').trim().slice(0, 32) : '';
|
|
41
|
+
/** Declare a UI state dimension the DOM does not express. */
|
|
42
|
+
export function setUiState(name, value) {
|
|
43
|
+
const n = clean(name);
|
|
44
|
+
const v = clean(value);
|
|
45
|
+
if (n && v)
|
|
46
|
+
explicit.set(n, v);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Stop reporting a dimension — or, with no name, every declared dimension.
|
|
50
|
+
*
|
|
51
|
+
* Later interactions carry no value for it, which is not the same as carrying a value. Clearing all is
|
|
52
|
+
* what a single-page app wants on route change: declarations from the previous screen would otherwise
|
|
53
|
+
* follow the visitor onto a surface where they mean nothing.
|
|
54
|
+
*/
|
|
55
|
+
export function clearUiState(name) {
|
|
56
|
+
if (name === undefined)
|
|
57
|
+
explicit.clear();
|
|
58
|
+
else
|
|
59
|
+
explicit.delete(clean(name));
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The state signature for the interaction happening RIGHT NOW.
|
|
63
|
+
*
|
|
64
|
+
* Read synchronously inside the event handler, never reconstructed afterwards: by the time a menu has
|
|
65
|
+
* closed, the DOM no longer knows it was open when the click landed.
|
|
66
|
+
*/
|
|
67
|
+
/**
|
|
68
|
+
* DEVELOPMENT OVERLAYS ARE NOT THE PRODUCT.
|
|
69
|
+
*
|
|
70
|
+
* Measured on a real app: 59 of 60 captured keyframes reported exactly one state dimension, and it
|
|
71
|
+
* was `nextjs-dev-tools-menu` — the framework's own dev-tools button, the only element on the page
|
|
72
|
+
* exposing `aria-expanded` with an id. So the entire state lane was describing a development tool
|
|
73
|
+
* while the app's own drawer went unrecorded.
|
|
74
|
+
*
|
|
75
|
+
* WHY IT HAS TO BE EXCLUDED AT CAPTURE rather than filtered later. A dimension is part of the state
|
|
76
|
+
* KEY: `sidebar:closed` and `nextjs-dev-tools-menu:closed;sidebar:closed` are two different states,
|
|
77
|
+
* so leaving it in fragments every count. It also spends the 96-character budget — 28 of it — and
|
|
78
|
+
* sorts before most real names, so a page with several dimensions could lose a real one to make room
|
|
79
|
+
* for a dev tool.
|
|
80
|
+
*
|
|
81
|
+
* DELIBERATELY A PREFIX LIST, not a heuristic. Matching on class names or visibility was rejected
|
|
82
|
+
* elsewhere in this file for inventing states; the same objection applies to guessing at what is
|
|
83
|
+
* "probably a dev tool". These are exact, published names owned by the frameworks that inject them.
|
|
84
|
+
*/
|
|
85
|
+
const DEV_OVERLAY = /^(nextjs-|__next|vercel-live)/;
|
|
86
|
+
/**
|
|
87
|
+
* A GENERATED ID IS NOT A NAME — it is a new dimension on every page load.
|
|
88
|
+
*
|
|
89
|
+
* Measured on production (joint web, 30 days): alongside `sidebar:open|closed`, the catalogue
|
|
90
|
+
* carried `headlessui-popover-button-v-0:closed;headlessui-popover-button-v-10:closed`. Those
|
|
91
|
+
* numbers are allocated by the component library in mount order, so the SAME control is a different
|
|
92
|
+
* dimension after a route change, a re-render, or one extra popover appearing earlier in the tree.
|
|
93
|
+
*
|
|
94
|
+
* The damage is not cosmetic. A dimension is part of the state KEY, so a wandering name fragments
|
|
95
|
+
* one control's counts across many states that each look real and none of which can be filtered on
|
|
96
|
+
* usefully — and it spends the 96-character budget while doing it. It then reaches the operator's
|
|
97
|
+
* state picker as a row named after a library's internal counter.
|
|
98
|
+
*
|
|
99
|
+
* SKIPPED, NOT RENAMED. There is no honest way to recover what that control is from the id, and
|
|
100
|
+
* inventing a name here is the same error this file rejects everywhere else. An app that wants the
|
|
101
|
+
* dimension names it instead — `data-scalebun-state` has always been the first thing read, and
|
|
102
|
+
* `data-testid` is now read before the id so the common case needs no new markup at all.
|
|
103
|
+
*
|
|
104
|
+
* `aria-label` is deliberately NOT a fallback. It is the control's visible, LOCALISED text, so the
|
|
105
|
+
* same control would be `القائمة` to one visitor and `Menu` to another and the two would never
|
|
106
|
+
* reconcile. Production still carries exactly that pair from the pre-`name:value` format.
|
|
107
|
+
*
|
|
108
|
+
* A prefix/shape list, not a heuristic, for the same reason DEV_OVERLAY is one: `:r0:` is React's
|
|
109
|
+
* own useId output, the rest are the published prefixes of the libraries that generate them.
|
|
110
|
+
*/
|
|
111
|
+
const GENERATED_ID = /^(headlessui-|radix-|mui-|:r[0-9a-z]*:|react-aria)/;
|
|
112
|
+
export function uiStateSignature() {
|
|
113
|
+
const dims = new Map();
|
|
114
|
+
document.querySelectorAll('[aria-expanded],dialog').forEach((e) => {
|
|
115
|
+
const x = e.getAttribute('aria-expanded');
|
|
116
|
+
const v = x === 'true' || (x === null && e.hasAttribute('open')) ? 'open' : 'closed';
|
|
117
|
+
// `aria-controls` names the thing being controlled — the dimension — rather than the control
|
|
118
|
+
// doing the controlling. A dimension with no stable name is skipped: a generated one would
|
|
119
|
+
// fragment the same state across every page load.
|
|
120
|
+
/* FIRST CANDIDATE THAT YIELDS A USABLE NAME — a candidate that cleans away, or that is a
|
|
121
|
+
library-generated id, falls through to the next rather than aborting the element. Two bugs
|
|
122
|
+
were caught here by heatmap:statekey rather than by reading: `||` over RAW values let a
|
|
123
|
+
whitespace-only data-scalebun-state win and then clean away to nothing, losing the id that
|
|
124
|
+
would have named it; and testing GENERATED_ID after clean() cannot work, because clean
|
|
125
|
+
strips `:` and React's `:r7:` arrives as `r7`, which no honest pattern separates from a
|
|
126
|
+
dimension genuinely called `r7`. */
|
|
127
|
+
let n = '';
|
|
128
|
+
for (const r of [
|
|
129
|
+
e.getAttribute('data-scalebun-state'),
|
|
130
|
+
e.getAttribute('data-testid'),
|
|
131
|
+
e.getAttribute('aria-controls'),
|
|
132
|
+
e.id,
|
|
133
|
+
]) {
|
|
134
|
+
if (r && !GENERATED_ID.test(r) && (n = clean(r)))
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
if (n && !DEV_OVERLAY.test(n))
|
|
138
|
+
dims.set(n, v);
|
|
139
|
+
});
|
|
140
|
+
for (const [k, v] of explicit)
|
|
141
|
+
dims.set(k, v);
|
|
142
|
+
if (!dims.size)
|
|
143
|
+
return undefined;
|
|
144
|
+
/* SORTED, or the same surface produces different signatures depending on DOM order and every
|
|
145
|
+
count fragments into several that mean nothing. */
|
|
146
|
+
const pairs = [...dims.keys()]
|
|
147
|
+
.sort()
|
|
148
|
+
.map((k) => `${k}:${dims.get(k)}`);
|
|
149
|
+
let signature = '';
|
|
150
|
+
for (const pair of pairs) {
|
|
151
|
+
const next = signature ? `${signature};${pair}` : pair;
|
|
152
|
+
if (next.length > 96)
|
|
153
|
+
break;
|
|
154
|
+
signature = next;
|
|
155
|
+
}
|
|
156
|
+
return signature || undefined;
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=uiState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uiState.js","sourceRoot":"","sources":["../../../src/features/journey/uiState.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { IFeature } from '@scalebun/sdk-contracts';
|
|
2
|
+
import type { Capabilities } from '../core/capabilities.js';
|
|
3
|
+
/**
|
|
4
|
+
* The feature registry source. Each capture feature vertical (errors, network, webVitals, replay,
|
|
5
|
+
* …) appends its instance here — this is the append-only seam from WEB-SDK-PLAN.md §1. Bootstrap
|
|
6
|
+
* only registers a feature when config.features[name] !== false (replay is off by default).
|
|
7
|
+
*/
|
|
8
|
+
export declare const FEATURES: IFeature[];
|
|
9
|
+
/**
|
|
10
|
+
* P5a — features that are OFF BY DEFAULT, loaded only when a host turns one on.
|
|
11
|
+
*
|
|
12
|
+
* WHY THESE FIVE AND NOT OTHERS: `resolveConfig` defaults `replay`, `inbox`, `profiler`, `watchdog`
|
|
13
|
+
* and `inapp2` to `false`. Every other feature defaults to `true`, so lazy-loading it would trade
|
|
14
|
+
* eager bytes for a round trip on the path virtually every site takes — a bad exchange. These five are
|
|
15
|
+
* the only ones the typical site never uses, and they were nonetheless constructed and bundled into
|
|
16
|
+
* the eager core on every page load.
|
|
17
|
+
*
|
|
18
|
+
* MEASURED: removing their shells takes the eager core from 33,602 B to 32,219 B gzipped — **1,383 B**,
|
|
19
|
+
* which is 7× the headroom that existed before this change (190 B). That budget is what a minimal
|
|
20
|
+
* eager keyframe needs, and it did not exist until now.
|
|
21
|
+
*
|
|
22
|
+
* A dynamic `import()` here is what actually moves the bytes; a `() => new X()` factory would not,
|
|
23
|
+
* because the static import would still pull the module into the eager chunk.
|
|
24
|
+
*
|
|
25
|
+
* The cost is one round trip when a host opts in, paid during `activate()` before `setupAll` — so an
|
|
26
|
+
* enabled feature still sets up before the pipeline starts, exactly as an eager one does. The ordering
|
|
27
|
+
* F-VIT depends on is unchanged.
|
|
28
|
+
*/
|
|
29
|
+
export declare const OPTIONAL_FEATURES: Record<string, () => Promise<IFeature>>;
|
|
30
|
+
/**
|
|
31
|
+
* The MINIMAL capability each feature fundamentally needs — bootstrap skips a feature whose required
|
|
32
|
+
* capabilities are absent in the current runtime (e.g. DOM features on the edge). CONSERVATIVE by
|
|
33
|
+
* design: gate on the core capability only, so a browser missing an optional API (say
|
|
34
|
+
* IntersectionObserver) still registers DOM features (they degrade internally) — browser behavior never
|
|
35
|
+
* changes. Only edge/worker runtimes (no DOM) filter the DOM features out. `network`-only features
|
|
36
|
+
* (analytics, config) are the edge-eligible surface. See core/capabilities.ts.
|
|
37
|
+
*/
|
|
38
|
+
export declare const FEATURE_CAPS: Record<string, Array<keyof Capabilities>>;
|
|
39
|
+
/** A feature's required capabilities. Unmapped (future) features default to DOM — browser-only, conservative. */
|
|
40
|
+
export declare function featureRequirements(name: string): Array<keyof Capabilities>;
|
|
41
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/features/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAezD;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,EAc9B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,CAMrE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,YAAY,CAAC,CAmBlE,CAAC;AAEF,iHAAiH;AACjH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,YAAY,CAAC,CAE3E"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { AnalyticsFeature } from './analytics/AnalyticsFeature.js';
|
|
2
|
+
import { ConfigFeature } from './config/ConfigFeature.js';
|
|
3
|
+
import { ErrorsFeature } from './errors/ErrorsFeature.js';
|
|
4
|
+
import { NetworkFeature } from './network/NetworkFeature.js';
|
|
5
|
+
import { WebVitalsFeature } from './webVitals/WebVitalsFeature.js';
|
|
6
|
+
import { PerformanceFeature } from './performance/PerformanceFeature.js';
|
|
7
|
+
import { JourneyFeature } from './journey/JourneyFeature.js';
|
|
8
|
+
import { ConsoleFeature } from './console/ConsoleFeature.js';
|
|
9
|
+
import { BugReportFeature } from './bugreport/BugReportFeature.js';
|
|
10
|
+
import { CrashFeature } from './crash/CrashFeature.js';
|
|
11
|
+
import { EngageFeature } from './engage/EngageFeature.js';
|
|
12
|
+
import { WebPerfFeature } from './webperf/WebPerfFeature.js';
|
|
13
|
+
import { ExitIntentFeature } from './exit-intent/ExitIntentFeature.js';
|
|
14
|
+
/**
|
|
15
|
+
* The feature registry source. Each capture feature vertical (errors, network, webVitals, replay,
|
|
16
|
+
* …) appends its instance here — this is the append-only seam from WEB-SDK-PLAN.md §1. Bootstrap
|
|
17
|
+
* only registers a feature when config.features[name] !== false (replay is off by default).
|
|
18
|
+
*/
|
|
19
|
+
export const FEATURES = [
|
|
20
|
+
new ConfigFeature(), // F-CFG flags/config/rollouts/experiments (early: cache loads sync in setup)
|
|
21
|
+
new AnalyticsFeature(), // F-ANL product-analytics + revenue lane → POST /batch (Event)
|
|
22
|
+
new ErrorsFeature(), // F-ERR
|
|
23
|
+
new NetworkFeature(), // F-NET
|
|
24
|
+
new WebVitalsFeature(), // F-VIT
|
|
25
|
+
new WebPerfFeature(), // web RUM: page-load + FPS + LoAF (F-PERFWEB)
|
|
26
|
+
new PerformanceFeature(), // performance traces (F-PERF)
|
|
27
|
+
new JourneyFeature(), // F-JRN
|
|
28
|
+
new ConsoleFeature(), // console breadcrumbs (F-CON)
|
|
29
|
+
new BugReportFeature(), // bug-report widget (F-BUG)
|
|
30
|
+
new CrashFeature(), // crash detection: ReportingObserver + session-liveness recovery (F-CRASH)
|
|
31
|
+
new EngageFeature(), // surveys/NPS — shell in core, runtime lazy-loaded when a campaign is active (F-ENG)
|
|
32
|
+
new ExitIntentFeature(), // exit-intent CRO detector → $exit_intent + signal (F-EXIT, opt-in)
|
|
33
|
+
];
|
|
34
|
+
/**
|
|
35
|
+
* P5a — features that are OFF BY DEFAULT, loaded only when a host turns one on.
|
|
36
|
+
*
|
|
37
|
+
* WHY THESE FIVE AND NOT OTHERS: `resolveConfig` defaults `replay`, `inbox`, `profiler`, `watchdog`
|
|
38
|
+
* and `inapp2` to `false`. Every other feature defaults to `true`, so lazy-loading it would trade
|
|
39
|
+
* eager bytes for a round trip on the path virtually every site takes — a bad exchange. These five are
|
|
40
|
+
* the only ones the typical site never uses, and they were nonetheless constructed and bundled into
|
|
41
|
+
* the eager core on every page load.
|
|
42
|
+
*
|
|
43
|
+
* MEASURED: removing their shells takes the eager core from 33,602 B to 32,219 B gzipped — **1,383 B**,
|
|
44
|
+
* which is 7× the headroom that existed before this change (190 B). That budget is what a minimal
|
|
45
|
+
* eager keyframe needs, and it did not exist until now.
|
|
46
|
+
*
|
|
47
|
+
* A dynamic `import()` here is what actually moves the bytes; a `() => new X()` factory would not,
|
|
48
|
+
* because the static import would still pull the module into the eager chunk.
|
|
49
|
+
*
|
|
50
|
+
* The cost is one round trip when a host opts in, paid during `activate()` before `setupAll` — so an
|
|
51
|
+
* enabled feature still sets up before the pipeline starts, exactly as an eager one does. The ordering
|
|
52
|
+
* F-VIT depends on is unchanged.
|
|
53
|
+
*/
|
|
54
|
+
export const OPTIONAL_FEATURES = {
|
|
55
|
+
replay: async () => new (await import('./replay/ReplayFeature.js')).ReplayFeature(),
|
|
56
|
+
inbox: async () => new (await import('./inbox/InboxFeature.js')).InboxFeature(),
|
|
57
|
+
profiler: async () => new (await import('./profiler/ProfilerFeature.js')).ProfilerFeature(),
|
|
58
|
+
watchdog: async () => new (await import('./watchdog/WatchdogFeature.js')).WatchdogFeature(),
|
|
59
|
+
inapp2: async () => new (await import('./inapp/InApp2Feature.js')).InApp2Feature(),
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* The MINIMAL capability each feature fundamentally needs — bootstrap skips a feature whose required
|
|
63
|
+
* capabilities are absent in the current runtime (e.g. DOM features on the edge). CONSERVATIVE by
|
|
64
|
+
* design: gate on the core capability only, so a browser missing an optional API (say
|
|
65
|
+
* IntersectionObserver) still registers DOM features (they degrade internally) — browser behavior never
|
|
66
|
+
* changes. Only edge/worker runtimes (no DOM) filter the DOM features out. `network`-only features
|
|
67
|
+
* (analytics, config) are the edge-eligible surface. See core/capabilities.ts.
|
|
68
|
+
*/
|
|
69
|
+
export const FEATURE_CAPS = {
|
|
70
|
+
config: ['network'],
|
|
71
|
+
analytics: ['network'],
|
|
72
|
+
errors: ['dom'],
|
|
73
|
+
network: ['dom'],
|
|
74
|
+
webVitals: ['performanceObserver'],
|
|
75
|
+
webPerf: ['performanceObserver'],
|
|
76
|
+
performance: ['performance'],
|
|
77
|
+
journey: ['dom'],
|
|
78
|
+
console: ['dom'],
|
|
79
|
+
bugReport: ['dom'],
|
|
80
|
+
crash: ['dom'],
|
|
81
|
+
engage: ['dom'],
|
|
82
|
+
inbox: ['dom'],
|
|
83
|
+
profiler: ['dom'],
|
|
84
|
+
watchdog: ['performanceObserver'],
|
|
85
|
+
exitIntent: ['dom'],
|
|
86
|
+
inapp2: ['dom'],
|
|
87
|
+
replay: ['dom'],
|
|
88
|
+
};
|
|
89
|
+
/** A feature's required capabilities. Unmapped (future) features default to DOM — browser-only, conservative. */
|
|
90
|
+
export function featureRequirements(name) {
|
|
91
|
+
return FEATURE_CAPS[name] ?? ['dom'];
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/features/manifest.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* F-NET — captures fetch + XHR (+ WebSocket/SSE/beacon) requests and emits contract `network` items
|
|
3
|
+
* onto the unified pipeline. Metadata by default (method/url/status/duration/sizes + N0 failure
|
|
4
|
+
* taxonomy/slow/route); bodies/headers are off by default (privacy) and an opt-in (N4). Self-excludes
|
|
5
|
+
* the SDK's own ingestion traffic. Thin shell: interceptors + normalize + stats.
|
|
6
|
+
*/
|
|
7
|
+
import type { IFeature, FeatureContext } from '@scalebun/sdk-contracts';
|
|
8
|
+
import type { NetProtocol, NetFailure } from './types.js';
|
|
9
|
+
/** Self-observability snapshot (N5) — the SDK's own network-capture health. */
|
|
10
|
+
export interface NetworkStats {
|
|
11
|
+
/** emitted to the pipeline */
|
|
12
|
+
captured: number;
|
|
13
|
+
/** count per protocol */
|
|
14
|
+
byProtocol: Record<NetProtocol, number>;
|
|
15
|
+
/** count per failure class (successful requests aren't counted here) */
|
|
16
|
+
byFailure: Record<NetFailure, number>;
|
|
17
|
+
/** dropped by third-party filter / denyUrls / sampling / beforeSend(null) */
|
|
18
|
+
dropped: number;
|
|
19
|
+
/** of `dropped`, how many were known telemetry beacons -- so the filter is observable */
|
|
20
|
+
droppedThirdParty: number;
|
|
21
|
+
/** kept by the success-sampler (failed/slow are always kept, counted in `captured`) */
|
|
22
|
+
sampledIn: number;
|
|
23
|
+
/** how many emitted items carried captured bodies */
|
|
24
|
+
bodiesCaptured: number;
|
|
25
|
+
}
|
|
26
|
+
export declare class NetworkFeature implements IFeature {
|
|
27
|
+
readonly name = "network";
|
|
28
|
+
private active;
|
|
29
|
+
private uninstalls;
|
|
30
|
+
private slowMs;
|
|
31
|
+
private sampleRate;
|
|
32
|
+
private dedupMs;
|
|
33
|
+
private deduper?;
|
|
34
|
+
private denyUrls;
|
|
35
|
+
private keepThirdParty;
|
|
36
|
+
private thirdPartyHosts;
|
|
37
|
+
private beforeSend?;
|
|
38
|
+
private readonly timingIndex;
|
|
39
|
+
private timingOn;
|
|
40
|
+
/** N4 — resolved body-capture options when `captureBodies` is on; undefined ⇒ bodies off. */
|
|
41
|
+
private bodyOpts?;
|
|
42
|
+
private readonly counters;
|
|
43
|
+
/** Self-observability — the SDK's own network-capture health. */
|
|
44
|
+
stats(): NetworkStats;
|
|
45
|
+
get isActive(): boolean;
|
|
46
|
+
setup(ctx: FeatureContext): void;
|
|
47
|
+
/** Normalize → third-party/denyUrls gate → beforeSend → emit. The single emit point. */
|
|
48
|
+
private handle;
|
|
49
|
+
private finalize;
|
|
50
|
+
/** Tiny core-side gate: only the cheapest signals, so the GraphQL chunk loads on demand. */
|
|
51
|
+
private maybeGraphql;
|
|
52
|
+
private emit;
|
|
53
|
+
/** Final emit. With dedup on (opt-in), a burst of identical requests collapses into one trailing
|
|
54
|
+
* `repeat` item (see {@link Deduper}); the first of the burst still emits immediately. */
|
|
55
|
+
private emitItem;
|
|
56
|
+
/** Update self-observability counters from an item about to be emitted. */
|
|
57
|
+
private record;
|
|
58
|
+
teardown(): void;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=NetworkFeature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkFeature.d.ts","sourceRoot":"","sources":["../../../src/features/network/NetworkFeature.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAWxE,OAAO,KAAK,EAAc,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEnE,+EAA+E;AAC/E,MAAM,WAAW,YAAY;IAC3B,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,UAAU,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACxC,wEAAwE;IACxE,SAAS,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACtC,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,yFAAyF;IACzF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,uFAAuF;IACvF,SAAS,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,cAAc,EAAE,MAAM,CAAC;CACxB;AAMD,qBAAa,cAAe,YAAW,QAAQ;IAC7C,QAAQ,CAAC,IAAI,aAAa;IAC1B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,UAAU,CAAyB;IAC3C,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,OAAO,CAAC,CAAU;IAC1B,OAAO,CAAC,QAAQ,CAAsC;IACtD,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,UAAU,CAAC,CAA4C;IAC/D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA6B;IACzD,OAAO,CAAC,QAAQ,CAAS;IACzB,6FAA6F;IAC7F,OAAO,CAAC,QAAQ,CAAC,CAA2D;IAC5E,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAQvB;IAEF,iEAAiE;IACjE,KAAK,IAAI,YAAY;IAYrB,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,KAAK,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI;IAwFhC,wFAAwF;IACxF,OAAO,CAAC,MAAM;IAwCd,OAAO,CAAC,QAAQ;IAmBhB,4FAA4F;IAC5F,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,IAAI;IAiCZ;+FAC2F;IAC3F,OAAO,CAAC,QAAQ;IAShB,2EAA2E;IAC3E,OAAO,CAAC,MAAM;IASd,QAAQ,IAAI,IAAI;CASjB"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* F-NET — captures fetch + XHR (+ WebSocket/SSE/beacon) requests and emits contract `network` items
|
|
3
|
+
* onto the unified pipeline. Metadata by default (method/url/status/duration/sizes + N0 failure
|
|
4
|
+
* taxonomy/slow/route); bodies/headers are off by default (privacy) and an opt-in (N4). Self-excludes
|
|
5
|
+
* the SDK's own ingestion traffic. Thin shell: interceptors + normalize + stats.
|
|
6
|
+
*/
|
|
7
|
+
import { installFetch } from './fetchInterceptor.js';
|
|
8
|
+
import { installXhr } from './xhrInterceptor.js';
|
|
9
|
+
import { toNetworkItem } from './normalize.js';
|
|
10
|
+
import { makeTraceInjector } from './tracing.js';
|
|
11
|
+
import { DEFAULT_SLOW_MS } from './classify.js';
|
|
12
|
+
import { ResourceTimingIndex } from './timing.js';
|
|
13
|
+
import { shouldKeep } from './sampler.js';
|
|
14
|
+
import { Deduper } from './dedup.js';
|
|
15
|
+
import { isThirdPartyBeacon } from './thirdParty.js';
|
|
16
|
+
function matchUrl(pat, url) {
|
|
17
|
+
return typeof pat === 'string' ? url.includes(pat) : pat.test(url);
|
|
18
|
+
}
|
|
19
|
+
export class NetworkFeature {
|
|
20
|
+
constructor() {
|
|
21
|
+
this.name = 'network';
|
|
22
|
+
this.active = false;
|
|
23
|
+
this.uninstalls = [];
|
|
24
|
+
this.slowMs = DEFAULT_SLOW_MS;
|
|
25
|
+
this.sampleRate = 1;
|
|
26
|
+
this.dedupMs = 0; // opt-in (network.dedupWindowMs); 0 = off
|
|
27
|
+
this.denyUrls = [];
|
|
28
|
+
this.keepThirdParty = false;
|
|
29
|
+
this.timingIndex = new ResourceTimingIndex();
|
|
30
|
+
this.timingOn = false;
|
|
31
|
+
this.counters = {
|
|
32
|
+
captured: 0,
|
|
33
|
+
byProtocol: { http: 0, ws: 0, sse: 0, beacon: 0 },
|
|
34
|
+
byFailure: { http_4xx: 0, http_5xx: 0, network_error: 0, timeout: 0, cors: 0, abort: 0 },
|
|
35
|
+
dropped: 0,
|
|
36
|
+
droppedThirdParty: 0,
|
|
37
|
+
sampledIn: 0,
|
|
38
|
+
bodiesCaptured: 0,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/** Self-observability — the SDK's own network-capture health. */
|
|
42
|
+
stats() {
|
|
43
|
+
return {
|
|
44
|
+
captured: this.counters.captured,
|
|
45
|
+
byProtocol: { ...this.counters.byProtocol },
|
|
46
|
+
byFailure: { ...this.counters.byFailure },
|
|
47
|
+
dropped: this.counters.dropped,
|
|
48
|
+
droppedThirdParty: this.counters.droppedThirdParty,
|
|
49
|
+
sampledIn: this.counters.sampledIn,
|
|
50
|
+
bodiesCaptured: this.counters.bodiesCaptured,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
get isActive() {
|
|
54
|
+
return this.active;
|
|
55
|
+
}
|
|
56
|
+
setup(ctx) {
|
|
57
|
+
if (typeof window === 'undefined')
|
|
58
|
+
return;
|
|
59
|
+
const opts = ctx.networkOptions ?? {};
|
|
60
|
+
this.slowMs = opts.slowRequestMs ?? DEFAULT_SLOW_MS;
|
|
61
|
+
this.sampleRate = typeof opts.sampleRate === 'number' ? opts.sampleRate : 1;
|
|
62
|
+
// dedup is opt-in; read defensively so it works before the contract type formally lists it.
|
|
63
|
+
const dw = opts.dedupWindowMs;
|
|
64
|
+
this.dedupMs = typeof dw === 'number' && dw > 0 ? dw : 0;
|
|
65
|
+
if (this.dedupMs > 0) {
|
|
66
|
+
this.deduper = new Deduper(this.dedupMs, (item) => {
|
|
67
|
+
this.record(item);
|
|
68
|
+
ctx.emit(item);
|
|
69
|
+
}, () => {
|
|
70
|
+
this.counters.dropped++;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
this.denyUrls = opts.denyUrls ?? [];
|
|
74
|
+
// Opt OUT, not in: the default is the useful one, and a team that genuinely wants to watch
|
|
75
|
+
// its own pixels can say so. `thirdPartyHosts` replaces the built-in list wholesale when set.
|
|
76
|
+
this.keepThirdParty = opts.captureThirdParty === true;
|
|
77
|
+
this.thirdPartyHosts = opts.thirdPartyHosts;
|
|
78
|
+
this.beforeSend = opts.beforeSend;
|
|
79
|
+
// N4 — body capture is opt-in (privacy). Resolve the cap/allowlist once; the heavy redaction +
|
|
80
|
+
// read logic lives in the lazy chunk. Cap is ceiling-enforced there too.
|
|
81
|
+
if (opts.captureBodies) {
|
|
82
|
+
this.bodyOpts = {
|
|
83
|
+
bodyMaxBytes: Math.min(Math.max(0, opts.bodyMaxBytes ?? 8192), 64 * 1024),
|
|
84
|
+
contentTypeAllowlist: opts.contentTypeAllowlist && opts.contentTypeAllowlist.length
|
|
85
|
+
? opts.contentTypeAllowlist
|
|
86
|
+
: ['application/json', 'text/plain'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
// N1 — buffered ResourceTiming observer (DNS/TCP/TLS/TTFB/transferSize). Graceful no-op where
|
|
90
|
+
// the API is missing. The entry lands AFTER the response settles, so the merge is deferred.
|
|
91
|
+
this.timingOn = this.timingIndex.install();
|
|
92
|
+
const base = ctx.apiBaseUrl;
|
|
93
|
+
const isOwnUrl = (url) => !!base && url.startsWith(base);
|
|
94
|
+
const onRecord = (c) => this.handle(ctx, c);
|
|
95
|
+
// P4.3 — W3C traceparent injection for the allowlisted origins (FE→BE correlation handoff).
|
|
96
|
+
// ctx.traceOrigins is the resolved allowlist (same-origin by default; empty = tracing off).
|
|
97
|
+
//
|
|
98
|
+
// N5 cross-vertical seam (trace handoff): today Network MINTS a fresh trace per request (the
|
|
99
|
+
// makeTrace() inside makeTraceInjector). The end state is that when a Perf/RUM transaction is
|
|
100
|
+
// OPEN, the request joins THAT transaction's trace (one traceId across FE txn ↔ FE request ↔ BE
|
|
101
|
+
// span) and falls back to a per-request mint when none is open. The accessor shape the Perf
|
|
102
|
+
// engineer should expose (read-only, no Network→Perf import):
|
|
103
|
+
//
|
|
104
|
+
// FeatureContext.getActiveTrace?: () => { traceId: string; parentSpanId: string } | null
|
|
105
|
+
//
|
|
106
|
+
// When present and non-null, makeTraceInjector should build the traceparent from it
|
|
107
|
+
// (`00-${traceId}-${childSpanId}-01`, a fresh child spanId) instead of minting a new traceId.
|
|
108
|
+
// Until that accessor lands, we KEEP the per-request mint (no behavior change).
|
|
109
|
+
// TODO(perf-seam): consume ctx.getActiveTrace() here once Perf provides it.
|
|
110
|
+
const injectTrace = makeTraceInjector(ctx.traceOrigins ?? []) ?? undefined;
|
|
111
|
+
this.uninstalls.push(installFetch(window, onRecord, isOwnUrl, injectTrace));
|
|
112
|
+
this.uninstalls.push(installXhr(window, onRecord, isOwnUrl, injectTrace));
|
|
113
|
+
// N3/N6 — WebSocket + SSE lifecycle + sendBeacon, all in ONE LAZY chunk (feature-detection +
|
|
114
|
+
// wiring live there, so core stays light). Default on; patched as soon as the chunk resolves.
|
|
115
|
+
const flags = {
|
|
116
|
+
ws: opts.trackWebSocket !== false,
|
|
117
|
+
sse: opts.trackSse !== false,
|
|
118
|
+
beacon: true,
|
|
119
|
+
};
|
|
120
|
+
const nav = typeof navigator !== 'undefined' ? navigator : undefined;
|
|
121
|
+
void import('./intercept/streams.js')
|
|
122
|
+
.then((m) => {
|
|
123
|
+
if (this.active)
|
|
124
|
+
this.uninstalls.push(...m.installStreams(window, nav, onRecord, isOwnUrl, flags));
|
|
125
|
+
})
|
|
126
|
+
.catch(() => {
|
|
127
|
+
/* chunk failed to load — WS/SSE/beacon simply not tracked */
|
|
128
|
+
});
|
|
129
|
+
this.active = true;
|
|
130
|
+
}
|
|
131
|
+
/** Normalize → third-party/denyUrls gate → beforeSend → emit. The single emit point. */
|
|
132
|
+
handle(ctx, c) {
|
|
133
|
+
/**
|
|
134
|
+
* Telemetry never reaches the pipeline: anything sent with sendBeacon (whoever sent it — no
|
|
135
|
+
* response, nothing to score), and the known tracker hosts. These are about half of all web
|
|
136
|
+
* requests, so dropping them here saves the visitor the upload.
|
|
137
|
+
*
|
|
138
|
+
* The FULL rule — framework page payloads, static assets, non-web schemes too (requestKind in
|
|
139
|
+
* thirdParty.ts) — is applied by the backend at ingest, for every SDK version. It is not applied
|
|
140
|
+
* here on purpose: its patterns cost ~300 B of eager bundle (measured 2026-09-22), and what it
|
|
141
|
+
* would add over this subset is only upload bandwidth, never what is stored.
|
|
142
|
+
* Set `captureThirdParty: true` to keep everything.
|
|
143
|
+
*/
|
|
144
|
+
if (!this.keepThirdParty &&
|
|
145
|
+
(c.protocol === 'beacon' || isThirdPartyBeacon(c.url, this.thirdPartyHosts))) {
|
|
146
|
+
this.counters.dropped++;
|
|
147
|
+
this.counters.droppedThirdParty++;
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
if (this.denyUrls.some((p) => matchUrl(p, c.url))) {
|
|
151
|
+
this.counters.dropped++;
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
// N1 — ResourceTiming lands just after settle. For http captures, defer one macrotask so the
|
|
155
|
+
// entry is available, then merge DNS/TCP/TLS/TTFB/transferSize. WS/SSE/beacon have no entry.
|
|
156
|
+
const proto = c.protocol ?? 'http';
|
|
157
|
+
if (this.timingOn && proto === 'http' && c.timing === undefined) {
|
|
158
|
+
setTimeout(() => {
|
|
159
|
+
if (!this.active)
|
|
160
|
+
return;
|
|
161
|
+
const merged = this.timingIndex.match(c.url, c.startedAt);
|
|
162
|
+
if (merged.timing)
|
|
163
|
+
c.timing = merged.timing;
|
|
164
|
+
if (merged.transferSize !== undefined && c.transferSize === undefined)
|
|
165
|
+
c.transferSize = merged.transferSize;
|
|
166
|
+
this.finalize(ctx, c);
|
|
167
|
+
}, 0);
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
this.finalize(ctx, c);
|
|
171
|
+
}
|
|
172
|
+
finalize(ctx, c) {
|
|
173
|
+
// N2/N4 — http captures may need GraphQL op-awareness and/or body capture, both in the LAZY
|
|
174
|
+
// chunk (a single pass reads the one-shot response clone once). Cheap inline gates the import so
|
|
175
|
+
// ordinary REST traffic with bodies off never loads it.
|
|
176
|
+
const proto = c.protocol ?? 'http';
|
|
177
|
+
const wantGraphql = proto === 'http' && c.graphql === undefined && this.maybeGraphql(c);
|
|
178
|
+
const wantBody = !!this.bodyOpts && proto === 'http';
|
|
179
|
+
if (wantGraphql || wantBody) {
|
|
180
|
+
import('./lazy.js')
|
|
181
|
+
.then((m) => m.enrichHttpCapture(c, { graphql: wantGraphql, body: wantBody ? this.bodyOpts : undefined }))
|
|
182
|
+
.catch(() => { })
|
|
183
|
+
.finally(() => {
|
|
184
|
+
if (this.active)
|
|
185
|
+
this.emit(ctx, c);
|
|
186
|
+
});
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
this.emit(ctx, c);
|
|
190
|
+
}
|
|
191
|
+
/** Tiny core-side gate: only the cheapest signals, so the GraphQL chunk loads on demand. */
|
|
192
|
+
maybeGraphql(c) {
|
|
193
|
+
if (c.method !== 'POST')
|
|
194
|
+
return false;
|
|
195
|
+
return /graphql/i.test(c.url) || (!!c.reqBody && c.reqBody.includes('query'));
|
|
196
|
+
}
|
|
197
|
+
emit(ctx, c) {
|
|
198
|
+
let item = toNetworkItem(c, { slowMs: this.slowMs });
|
|
199
|
+
// N5 — adaptive sampling: always keep failed/slow, deterministically thin successful requests to
|
|
200
|
+
// the base rate. Sampled-out items are dropped (counted), never emitted.
|
|
201
|
+
if (this.sampleRate < 1) {
|
|
202
|
+
const kept = shouldKeep({ failed: !!item.failure, slow: !!item.slow, key: `${c.url}|${c.startedAt}` }, this.sampleRate);
|
|
203
|
+
if (!kept) {
|
|
204
|
+
this.counters.dropped++;
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
this.counters.sampledIn++;
|
|
208
|
+
}
|
|
209
|
+
if (this.beforeSend) {
|
|
210
|
+
try {
|
|
211
|
+
const out = this.beforeSend(item);
|
|
212
|
+
if (out == null) {
|
|
213
|
+
this.counters.dropped++;
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
item = out;
|
|
217
|
+
}
|
|
218
|
+
catch {
|
|
219
|
+
/* a throwing host hook keeps the original item — never lose the capture */
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
// E1 (engage) — nudge the capture-signal bus on a genuine request failure (not a user-abort) so a
|
|
223
|
+
// `network_error`-triggered campaign can fire. Fire-and-forget; the signaller isolates listener throws.
|
|
224
|
+
if (item.failure && item.failure !== 'abort')
|
|
225
|
+
ctx.signal('network_error');
|
|
226
|
+
this.emitItem(ctx, item);
|
|
227
|
+
}
|
|
228
|
+
/** Final emit. With dedup on (opt-in), a burst of identical requests collapses into one trailing
|
|
229
|
+
* `repeat` item (see {@link Deduper}); the first of the burst still emits immediately. */
|
|
230
|
+
emitItem(ctx, item) {
|
|
231
|
+
if (this.deduper) {
|
|
232
|
+
this.deduper.push(item); // record + ctx.emit happen via the Deduper's emit callback
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
this.record(item);
|
|
236
|
+
ctx.emit(item);
|
|
237
|
+
}
|
|
238
|
+
/** Update self-observability counters from an item about to be emitted. */
|
|
239
|
+
record(item) {
|
|
240
|
+
this.counters.captured++;
|
|
241
|
+
const proto = item.protocol ?? 'http';
|
|
242
|
+
this.counters.byProtocol[proto]++;
|
|
243
|
+
const failure = item.failure;
|
|
244
|
+
if (failure)
|
|
245
|
+
this.counters.byFailure[failure]++;
|
|
246
|
+
if (item.request || item.response)
|
|
247
|
+
this.counters.bodiesCaptured++;
|
|
248
|
+
}
|
|
249
|
+
teardown() {
|
|
250
|
+
for (const u of this.uninstalls)
|
|
251
|
+
u();
|
|
252
|
+
this.uninstalls = [];
|
|
253
|
+
this.deduper?.dispose();
|
|
254
|
+
this.deduper = undefined;
|
|
255
|
+
this.timingIndex.teardown();
|
|
256
|
+
this.timingOn = false;
|
|
257
|
+
this.active = false;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
//# sourceMappingURL=NetworkFeature.js.map
|