@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,142 @@
|
|
|
1
|
+
const STORE_KEY = 'scalebun.push.softAsk.snoozedUntil';
|
|
2
|
+
const DAY_MS = 86400000;
|
|
3
|
+
const DEFAULTS = {
|
|
4
|
+
title: 'Stay in the loop',
|
|
5
|
+
body: 'Get notified about important updates. You can turn this off any time.',
|
|
6
|
+
allowText: 'Allow notifications',
|
|
7
|
+
denyText: 'Not now',
|
|
8
|
+
remindAfterDays: 7,
|
|
9
|
+
accent: '#5B4FE0',
|
|
10
|
+
};
|
|
11
|
+
/** A dismissal is a real answer and is honoured across sessions. Storage failures never block. */
|
|
12
|
+
function snoozed() {
|
|
13
|
+
try {
|
|
14
|
+
const until = Number(localStorage.getItem(STORE_KEY) || 0);
|
|
15
|
+
return Number.isFinite(until) && until > Date.now();
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function snooze(days) {
|
|
22
|
+
try {
|
|
23
|
+
localStorage.setItem(STORE_KEY, String(Date.now() + days * DAY_MS));
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
/* private mode — the worst case is asking again next session */
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Render the dialog and resolve with what the visitor chose.
|
|
31
|
+
*
|
|
32
|
+
* Shadow DOM so the host's CSS cannot break it and ours cannot leak into the host — the same
|
|
33
|
+
* containment rule the in-app surfaces follow.
|
|
34
|
+
*/
|
|
35
|
+
function ask(o) {
|
|
36
|
+
return new Promise((resolve) => {
|
|
37
|
+
const host = document.createElement('div');
|
|
38
|
+
host.setAttribute('data-scalebun-softask', '');
|
|
39
|
+
host.setAttribute('data-scalebun', '');
|
|
40
|
+
// Above ordinary page chrome, below the browser's own prompt (which the OS draws anyway).
|
|
41
|
+
host.style.cssText = 'position:fixed;z-index:2147483000;inset:auto 16px 16px auto';
|
|
42
|
+
const root = host.attachShadow({ mode: 'open' });
|
|
43
|
+
root.innerHTML = `
|
|
44
|
+
<style>
|
|
45
|
+
:host{all:initial}
|
|
46
|
+
.c{width:min(340px,calc(100vw - 32px));box-sizing:border-box;padding:16px 18px;border-radius:14px;
|
|
47
|
+
background:#fff;color:#172033;box-shadow:0 18px 48px rgba(3,7,18,.28);
|
|
48
|
+
font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
|
|
49
|
+
animation:in .22s ease-out both}
|
|
50
|
+
@keyframes in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
|
|
51
|
+
.t{font-size:15px;font-weight:700;margin:0 0 4px}
|
|
52
|
+
.b{margin:0 0 14px;color:#5b6472}
|
|
53
|
+
.r{display:flex;gap:8px;justify-content:flex-end}
|
|
54
|
+
button{font:inherit;font-weight:600;border-radius:9px;padding:8px 14px;cursor:pointer;border:0}
|
|
55
|
+
.no{background:transparent;color:#5b6472}
|
|
56
|
+
.yes{background:var(--a);color:#fff}
|
|
57
|
+
@media (prefers-color-scheme:dark){
|
|
58
|
+
.c{background:#1a1e27;color:#f2f4f8}.b{color:#aab2c0}.no{color:#aab2c0}
|
|
59
|
+
}
|
|
60
|
+
@media (prefers-reduced-motion:reduce){.c{animation-duration:1ms}}
|
|
61
|
+
</style>
|
|
62
|
+
<div class="c" role="dialog" aria-modal="false" style="--a:${o.accent}">
|
|
63
|
+
<p class="t"></p>
|
|
64
|
+
<p class="b"></p>
|
|
65
|
+
<div class="r">
|
|
66
|
+
<button class="no" type="button"></button>
|
|
67
|
+
<button class="yes" type="button"></button>
|
|
68
|
+
</div>
|
|
69
|
+
</div>`;
|
|
70
|
+
// textContent, never innerHTML: these strings come from tenant config and must not be able to
|
|
71
|
+
// inject markup into a host page.
|
|
72
|
+
root.querySelector('.t').textContent = o.title;
|
|
73
|
+
root.querySelector('.b').textContent = o.body;
|
|
74
|
+
const no = root.querySelector('.no');
|
|
75
|
+
const yes = root.querySelector('.yes');
|
|
76
|
+
no.textContent = o.denyText;
|
|
77
|
+
yes.textContent = o.allowText;
|
|
78
|
+
const close = (accepted) => {
|
|
79
|
+
host.remove();
|
|
80
|
+
resolve(accepted);
|
|
81
|
+
};
|
|
82
|
+
no.addEventListener('click', () => close(false));
|
|
83
|
+
// ⚠️ This click IS the user activation the browser requires. `enable()` must be called from
|
|
84
|
+
// inside this handler's task — deferring it (setTimeout, await before the call) drops the
|
|
85
|
+
// activation and the real prompt silently never appears.
|
|
86
|
+
yes.addEventListener('click', () => close(true));
|
|
87
|
+
document.body.appendChild(host);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Arm the soft-ask. Resolves once a decision is made (or immediately when it should not run).
|
|
92
|
+
*
|
|
93
|
+
* Every early return is a case where asking would be wrong, not merely unnecessary:
|
|
94
|
+
* • already `granted` — they are subscribed; a dialog would be noise
|
|
95
|
+
* • already `denied` — the browser prompt is unavailable, so "Allow" could not work. Offering a
|
|
96
|
+
* button that cannot succeed is worse than offering nothing.
|
|
97
|
+
* • snoozed — they said not now, and meant it
|
|
98
|
+
*/
|
|
99
|
+
export async function armSoftAsk(opts, deps) {
|
|
100
|
+
if (typeof document === 'undefined' || typeof Notification === 'undefined')
|
|
101
|
+
return;
|
|
102
|
+
const perm = deps.permission();
|
|
103
|
+
if (perm !== 'default')
|
|
104
|
+
return;
|
|
105
|
+
if (snoozed())
|
|
106
|
+
return;
|
|
107
|
+
const o = { ...DEFAULTS, ...opts };
|
|
108
|
+
const run = async () => {
|
|
109
|
+
if (deps.permission() !== 'default' || snoozed())
|
|
110
|
+
return;
|
|
111
|
+
const accepted = await ask(o);
|
|
112
|
+
if (!accepted) {
|
|
113
|
+
snooze(o.remindAfterDays);
|
|
114
|
+
deps.log?.('soft-ask declined — snoozed');
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const r = await deps.enable();
|
|
118
|
+
deps.log?.(`soft-ask accepted → enable() = ${r}`);
|
|
119
|
+
// A browser-level block is permanent, so there is nothing to snooze and nothing to retry.
|
|
120
|
+
if (r === 'denied')
|
|
121
|
+
deps.log?.('browser permission denied — the SDK cannot re-ask');
|
|
122
|
+
};
|
|
123
|
+
const t = opts.trigger ?? 'immediate';
|
|
124
|
+
if (t === 'immediate')
|
|
125
|
+
return void run();
|
|
126
|
+
if (typeof t === 'object' && 'afterMs' in t) {
|
|
127
|
+
setTimeout(() => void run(), Math.max(0, t.afterMs));
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
if (typeof t === 'object' && 'onSelector' in t) {
|
|
131
|
+
// Delegated, so it still works for elements added after init (SPA routes, late hydration).
|
|
132
|
+
const onClick = (e) => {
|
|
133
|
+
const el = e.target;
|
|
134
|
+
if (el && el.closest && el.closest(t.onSelector)) {
|
|
135
|
+
document.removeEventListener('click', onClick, true);
|
|
136
|
+
void run();
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
document.addEventListener('click', onClick, true);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=softAsk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"softAsk.js","sourceRoot":"","sources":["../../../src/features/push/softAsk.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* F-RPL — the thin eager shell. Registered in the manifest so the SDK knows replay exists, but it
|
|
3
|
+
* carries almost no code: it makes the deterministic SAMPLING decision (lazy `sampling.ts`) and, only
|
|
4
|
+
* for a sampled session, lazy-loads the full `RecorderController` (`lifecycle/recorder.ts`). All the
|
|
5
|
+
* recording lifecycle — snapshot, segments, checkpoints, cadence, engine wiring — lives in that lazy
|
|
6
|
+
* chunk, so it never weighs down the core bundle. A non-sampled session loads only `sampling.ts`.
|
|
7
|
+
*/
|
|
8
|
+
import type { IFeature, FeatureContext } from '@scalebun/sdk-contracts';
|
|
9
|
+
import type { ReplayStats } from './lifecycle/recorder.js';
|
|
10
|
+
export declare class ReplayFeature implements IFeature {
|
|
11
|
+
readonly name = "replay";
|
|
12
|
+
private controller?;
|
|
13
|
+
private uninstallWebGL?;
|
|
14
|
+
private watchdog?;
|
|
15
|
+
get isActive(): boolean;
|
|
16
|
+
setup(ctx: FeatureContext): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Resolves when arming has finished — succeeded OR reported its failure. Never rejects (`arm` owns
|
|
19
|
+
* its own error handling), so awaiting it is always safe.
|
|
20
|
+
*
|
|
21
|
+
* Deliberately not on `IFeature`: nothing in the SDK awaits it, and adding it to the interface would
|
|
22
|
+
* imply every feature has an async tail. It exists because `setup()` returning early made "the
|
|
23
|
+
* recorder is now live" unobservable, which the replay suites legitimately need to assert — the
|
|
24
|
+
* alternative was weakening eleven behavioural tests into timing guesses, which would trade a real
|
|
25
|
+
* contract for a green tick.
|
|
26
|
+
*/
|
|
27
|
+
armed?: Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Load the recorder and start capturing. Runs detached from `setup()` — see the note above.
|
|
30
|
+
*
|
|
31
|
+
* Every failure here is terminal for replay and silent everywhere else, so this method owns its own
|
|
32
|
+
* reporting: nothing upstream is awaiting it to notice a rejection.
|
|
33
|
+
*/
|
|
34
|
+
private arm;
|
|
35
|
+
private load;
|
|
36
|
+
/** Capture-on-signal flush (promote pre-roll → live). No-op until a recorder is active. */
|
|
37
|
+
flush(): void;
|
|
38
|
+
/** Live diagnostics (null when not recording — off, or a non-sampled session). */
|
|
39
|
+
stats(): ReplayStats | null;
|
|
40
|
+
/** Force a re-keyframe (e.g. before a risky flow), so the player gets a clean seek point. */
|
|
41
|
+
checkpoint(reason?: string): void;
|
|
42
|
+
/** Pause capture (keep the session + buffered pre-roll). No-op until a recorder is active. */
|
|
43
|
+
pause(): void;
|
|
44
|
+
/** Resume capture after pause() with a fresh keyframe. No-op unless paused. */
|
|
45
|
+
resume(): void;
|
|
46
|
+
/** Change replay text-masking at runtime (re-keyframes so it applies from here on). */
|
|
47
|
+
setPrivacy(policy: {
|
|
48
|
+
maskAllText?: boolean;
|
|
49
|
+
}): void;
|
|
50
|
+
teardown(): void;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=ReplayFeature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReplayFeature.d.ts","sourceRoot":"","sources":["../../../src/features/replay/ReplayFeature.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAsB,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAsD5E,qBAAa,aAAc,YAAW,QAAQ;IAC5C,QAAQ,CAAC,IAAI,YAAY;IACzB,OAAO,CAAC,UAAU,CAAC,CAAqB;IACxC,OAAO,CAAC,cAAc,CAAC,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,CAAgC;IAEjD,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAEK,KAAK,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAgF/C;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtB;;;;;OAKG;YACW,GAAG;YAgBH,IAAI;IA+FlB,2FAA2F;IAC3F,KAAK,IAAI,IAAI;IAIb,kFAAkF;IAClF,KAAK,IAAI,WAAW,GAAG,IAAI;IAI3B,6FAA6F;IAC7F,UAAU,CAAC,MAAM,SAAW,GAAG,IAAI;IAInC,8FAA8F;IAC9F,KAAK,IAAI,IAAI;IAIb,+EAA+E;IAC/E,MAAM,IAAI,IAAI;IAId,uFAAuF;IACvF,UAAU,CAAC,MAAM,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI;IAInD,QAAQ,IAAI,IAAI;CAUjB"}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* P5 — `decideSampling` is imported STATICALLY, not fetched.
|
|
3
|
+
*
|
|
4
|
+
* It used to be `await import('./lifecycle/sampling.js')`, which put a whole round trip in front of the
|
|
5
|
+
* recorder import: init → fetch sampling → decide → fetch recorder → create. Measured, that waterfall
|
|
6
|
+
* is what sets the capture floor, and the floor is set by LATENCY rather than by session duration —
|
|
7
|
+
* with instant chunks a 100 ms visit captures, at 300 ms per chunk the floor rises to 500 ms and at
|
|
8
|
+
* 600 ms it rises to 2 s. Time-to-first-keyframe scales at roughly 8× per-chunk latency because the
|
|
9
|
+
* graph is deep, so removing a hop from it is worth more than shaving bytes anywhere else.
|
|
10
|
+
*
|
|
11
|
+
* This costs the EAGER core nothing. Since P5a moved `ReplayFeature` itself into a lazy chunk, its
|
|
12
|
+
* static imports are bundled into that chunk — which is already being fetched by the time this runs.
|
|
13
|
+
* The module is ~40 lines and its only runtime dependency, `bucketOf`, is in eager core already for
|
|
14
|
+
* flags and experiments.
|
|
15
|
+
*
|
|
16
|
+
* The guarantee the dynamic import was protecting is preserved and in fact strengthened: a
|
|
17
|
+
* non-sampled session still installs nothing beyond the decision, and now fetches nothing extra to
|
|
18
|
+
* make it.
|
|
19
|
+
*/
|
|
20
|
+
import { decideSampling } from './lifecycle/sampling.js';
|
|
21
|
+
// Already in the eager core (FeatureRegistry), so reusing it here costs the identifier and nothing
|
|
22
|
+
// more — and keeps ONE definition of "was this a chunk that never arrived" across both reporters.
|
|
23
|
+
import { isModuleLoadFailure } from '../../bootstrap/FeatureRegistry.js';
|
|
24
|
+
/** Gap before the single recorder-import retry (A3). Long enough to outlast a blip, short enough that a
|
|
25
|
+
* bouncing visitor is not what decides the outcome. */
|
|
26
|
+
const RECORDER_RETRY_MS = 400;
|
|
27
|
+
/**
|
|
28
|
+
* P1b — the capture-failure report. SAME NAME as the React Native SDK, with platform-specific
|
|
29
|
+
* `reason` values, so one dashboard breakdown reads both without a concept-map alias.
|
|
30
|
+
*
|
|
31
|
+
* Hoisted to a const because it appears three times: repeating the literal costs more gzipped bytes
|
|
32
|
+
* than the identifier, and the eager budget it comes out of is 468 B.
|
|
33
|
+
*/
|
|
34
|
+
const FAIL = 'sdk_replay_capture_failed';
|
|
35
|
+
/**
|
|
36
|
+
* How long a session may be ARMED with zero frames before that is a defect rather than latency.
|
|
37
|
+
*
|
|
38
|
+
* Measured, not chosen. Of sessions that produced a keyframe, the capture offset is p50 0 ms, p95
|
|
39
|
+
* 2,453 ms, p99 6,821 ms. 5 s sits above p95 and below p99: late enough that a merely slow session is
|
|
40
|
+
* not accused, early enough to still fire inside the 5–10 s bucket — which is where readiness collapses
|
|
41
|
+
* to 31.4% against 77% at 10–30 s, i.e. the one bucket this watchdog exists to explain.
|
|
42
|
+
*
|
|
43
|
+
* A page that unloads before this fires reports nothing, and that is correct: the session ended, it did
|
|
44
|
+
* not fail. Those are `bounced`, and they are counted from duration, not from here.
|
|
45
|
+
*/
|
|
46
|
+
const FIRST_FRAME_WATCHDOG_MS = 5000;
|
|
47
|
+
/** Extracted so the retry awaits the SAME specifier — two spellings would defeat the module cache. */
|
|
48
|
+
const loadRecorder = () => import('./lifecycle/recorder.js');
|
|
49
|
+
export class ReplayFeature {
|
|
50
|
+
constructor() {
|
|
51
|
+
this.name = 'replay';
|
|
52
|
+
}
|
|
53
|
+
get isActive() {
|
|
54
|
+
return this.controller?.isActive ?? false;
|
|
55
|
+
}
|
|
56
|
+
async setup(ctx) {
|
|
57
|
+
/**
|
|
58
|
+
* P1b — the three exits below used to be SILENT, and that silence is the whole diagnostic gap.
|
|
59
|
+
*
|
|
60
|
+
* Measured on 275 live web sessions: 64 lasted a second or more and stored zero frames, and 57 of
|
|
61
|
+
* those 64 uploaded events, web vitals and `first_open` in the same session — so the SDK
|
|
62
|
+
* demonstrably ran, authenticated and delivered. Yet `sdk_feature_setup_failed` appears zero times
|
|
63
|
+
* across 2,736 analytics events and 2,317 replay events. The reason is now known: that event only
|
|
64
|
+
* fires when `setup()` THROWS, and these paths `return`. A failure that returns normally is
|
|
65
|
+
* indistinguishable from a healthy session that simply had nothing to say.
|
|
66
|
+
*
|
|
67
|
+
* Sampling is deliberately NOT reported. It is a legitimate decision rather than a failure, and it
|
|
68
|
+
* is already recoverable server-side — the bucket is `fnv1a32(sessionId + ':wzb-replay-v1') % 100`,
|
|
69
|
+
* byte-identical in the backend, so "should this session have recorded" is re-derivable without
|
|
70
|
+
* spending a single eager byte or trusting the client. Verified against this dataset: `missing`
|
|
71
|
+
* sessions are spread evenly across all 100 buckets (33 below 50, 31 above), which is what ruled
|
|
72
|
+
* sampling out as the cause. Calling a sampled-out session a capture failure would also poison the
|
|
73
|
+
* one metric this event exists to feed.
|
|
74
|
+
*/
|
|
75
|
+
if (typeof document === 'undefined' || typeof MutationObserver === 'undefined') {
|
|
76
|
+
ctx.trackEvent(FAIL, { stage: 'init', reason: 'ENV_UNSUPPORTED' });
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
// Deterministic sampling gate (server-reconcilable fnv1a) — decide BEFORE loading the recorder,
|
|
80
|
+
// so a non-sampled session installs nothing beyond this tiny decision. Statically imported: see
|
|
81
|
+
// the note on the import.
|
|
82
|
+
const decision = decideSampling(ctx.replaySampling, ctx.sessionId ?? '');
|
|
83
|
+
ctx.log('[replay] sampling:', decision.reason, '(bucket', decision.bucket + ')');
|
|
84
|
+
if (!decision.record)
|
|
85
|
+
return;
|
|
86
|
+
// D3 — honor GPC / Do-Not-Track (opt-in via privacy.respectDnt). If the user signalled opt-out,
|
|
87
|
+
// don't record replay at all. Lazy-imported so it costs nothing unless the host opted in.
|
|
88
|
+
if (ctx.respectDnt) {
|
|
89
|
+
const { userOptedOutOfTracking } = await import('./lifecycle/deviceSignals.js');
|
|
90
|
+
if (userOptedOutOfTracking()) {
|
|
91
|
+
ctx.log('[replay] dnt: skip');
|
|
92
|
+
// Not a defect — a respected opt-out. Reported anyway so it lands in the ATTRIBUTED column
|
|
93
|
+
// instead of the residual; an unexplained gap is what this phase exists to remove.
|
|
94
|
+
ctx.trackEvent(FAIL, { stage: 'init', reason: 'DNT_OPTED_OUT' });
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// P3/D1 cost-aware egress (Save-Data/slow/low-mem → buffer instead of stream) is applied inside the
|
|
99
|
+
// lazy recorder so it costs zero eager-core bytes.
|
|
100
|
+
// WebGL replay: force preserveDrawingBuffer as EARLY as possible (must precede the app creating its
|
|
101
|
+
// WebGL context) so the canvas recorder can snapshot 3D/WebGL canvases instead of capturing blank.
|
|
102
|
+
// Gated on canvas capture — we only pay the GPU cost for sampled sessions that record canvases.
|
|
103
|
+
if (ctx.replayCanvas) {
|
|
104
|
+
const { installWebGLPreserve } = await import('./engine/webglPatch.js');
|
|
105
|
+
this.uninstallWebGL = installWebGLPreserve();
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* P3 — ARM WITHOUT BLOCKING THE BOOTSTRAP. Everything below this line is deliberately NOT awaited.
|
|
109
|
+
*
|
|
110
|
+
* `SDKBootstrapper.activate()` runs `await registry.setupAll(ctx)` and only then
|
|
111
|
+
* `await pipeline.start()` — and `setupAll` is a sequential for-loop. So every millisecond replay
|
|
112
|
+
* spends fetching its recorder chunk is a millisecond before the SESSION IS OPENED. A slow chunk
|
|
113
|
+
* therefore does not merely lose replay: it loses the whole visit, including analytics, errors and
|
|
114
|
+
* performance, because nothing has a session to attach to yet.
|
|
115
|
+
*
|
|
116
|
+
* MEASURED, Phase 2 browser matrix: with the recorder chunk stalled 6 s, visits of 3 s and 5 s
|
|
117
|
+
* produced NO SESSION ROW AT ALL — not a session missing replay, no session. At 8 s and 15 s (long
|
|
118
|
+
* enough to outlast the stall) the same scenario reached PLAYBACK_READY, which is what identifies
|
|
119
|
+
* the stall as the cause rather than anything about capture itself.
|
|
120
|
+
*
|
|
121
|
+
* The `setupAll` ordering it relies on cannot simply be reversed: F-VIT documents a dependency on
|
|
122
|
+
* setup running before `pipeline.start`. Making replay's own tail non-blocking fixes the defect
|
|
123
|
+
* without touching that contract or any other feature.
|
|
124
|
+
*
|
|
125
|
+
* The cost of not awaiting is that a rejection no longer reaches `FeatureRegistry.setupAll`, which
|
|
126
|
+
* is what produced `sdk_feature_setup_failed` for replay. `arm()` therefore reports its own failure
|
|
127
|
+
* with a MORE specific reason than the registry could, so attribution improves rather than
|
|
128
|
+
* regresses.
|
|
129
|
+
*/
|
|
130
|
+
this.armed = this.arm(ctx, decision);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Load the recorder and start capturing. Runs detached from `setup()` — see the note above.
|
|
134
|
+
*
|
|
135
|
+
* Every failure here is terminal for replay and silent everywhere else, so this method owns its own
|
|
136
|
+
* reporting: nothing upstream is awaiting it to notice a rejection.
|
|
137
|
+
*/
|
|
138
|
+
async arm(ctx, decision) {
|
|
139
|
+
try {
|
|
140
|
+
await this.load(ctx, decision);
|
|
141
|
+
}
|
|
142
|
+
catch (err) {
|
|
143
|
+
const message = String(err?.message ?? err).slice(0, 300);
|
|
144
|
+
ctx.trackEvent(FAIL, {
|
|
145
|
+
stage: 'init',
|
|
146
|
+
// Separates "the chunk never arrived" (CSP, 404 after a deploy, chunk-hash skew, dropped
|
|
147
|
+
// request) from "the recorder itself threw" — completely different fixes, and the message is
|
|
148
|
+
// the only signal the three engines agree on.
|
|
149
|
+
reason: isModuleLoadFailure(message) ? 'ENGINE_CHUNK_LOAD_FAILED' : 'RECORDER_INIT_FAILED',
|
|
150
|
+
message,
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
async load(ctx, decision) {
|
|
155
|
+
/**
|
|
156
|
+
* R3 — WARM the engine chunks concurrently instead of letting them waterfall.
|
|
157
|
+
*
|
|
158
|
+
* Time-to-first-keyframe was five SEQUENTIAL await points: sampling → recorder →
|
|
159
|
+
* worker+segmentBuffer → the engine modules → iframe → only then `takeSnapshot`. Each is a module
|
|
160
|
+
* fetch, so on a cold cache the first keyframe waits on a chain of round trips — which is why
|
|
161
|
+
* sessions under 1s reach only 12% replay coverage while sessions over 30s reach 88%. Nothing is
|
|
162
|
+
* broken; the recorder simply is not loaded yet when a bouncing visitor leaves.
|
|
163
|
+
*
|
|
164
|
+
* These are fire-and-forget: the module registry dedupes, so when `arm()` later awaits the same
|
|
165
|
+
* specifiers they are already resolved and the waterfall collapses to roughly one round trip.
|
|
166
|
+
* Deliberately placed AFTER the sampling gate, so a non-sampled session still fetches nothing —
|
|
167
|
+
* that guarantee is the reason the gate is first, and warming ahead of it would break it.
|
|
168
|
+
*
|
|
169
|
+
* `catch` per import: a warm that fails must stay silent. `arm()` awaits these same specifiers and
|
|
170
|
+
* will surface a genuine failure there; an unhandled rejection here would be noise on a page that
|
|
171
|
+
* is about to record perfectly well from a retried fetch.
|
|
172
|
+
*/
|
|
173
|
+
const warm = (p) => { void p.catch(() => { }); };
|
|
174
|
+
warm(import('../replay/engine/nodeRegistry.js'));
|
|
175
|
+
warm(import('../replay/engine/snapshot.js'));
|
|
176
|
+
warm(import('../replay/engine/mutations.js'));
|
|
177
|
+
warm(import('../replay/engine/interactions.js'));
|
|
178
|
+
warm(import('../replay/engine/cssom.js'));
|
|
179
|
+
warm(import('../replay/engine/iframe.js'));
|
|
180
|
+
warm(import('../replay/engine/replayWorker.js'));
|
|
181
|
+
warm(import('./lifecycle/segmentBuffer.js'));
|
|
182
|
+
/**
|
|
183
|
+
* A3 — retry the recorder import before giving up.
|
|
184
|
+
*
|
|
185
|
+
* This one import decides whether the session records at all: everything above it is warming, and
|
|
186
|
+
* `createRecorder` is what installs the observers. A single transient failure here loses the WHOLE
|
|
187
|
+
* session's replay while every other lane (events, perf, network — all eager core) keeps working
|
|
188
|
+
* normally, which is exactly the signature of the 43-of-47 unexplained sessions measured live
|
|
189
|
+
* (`npm run replay:diagnose`): SDK demonstrably ran, zero frames stored.
|
|
190
|
+
*
|
|
191
|
+
* Two attempts, ~400ms apart. Deliberately modest: a chunk that 404s (deploy skew, bad CDN path) will
|
|
192
|
+
* fail identically on retry, so this only buys back the transient cases — a dropped request, a
|
|
193
|
+
* network blip, a cold cache under contention. It costs nothing when the first attempt succeeds,
|
|
194
|
+
* which is the overwhelmingly common path.
|
|
195
|
+
*
|
|
196
|
+
* When the retry SUCCEEDS it says so. Without that event a retry is an unfalsifiable fix: coverage
|
|
197
|
+
* might improve and nobody could tell whether this was why. `sdk_replay_recovered` makes it
|
|
198
|
+
* measurable, and pairs with the `sdk_replay_capture_failed` its caller emits when the second
|
|
199
|
+
* attempt fails too, so both outcomes are visible instead of neither.
|
|
200
|
+
*/
|
|
201
|
+
let createRecorder;
|
|
202
|
+
try {
|
|
203
|
+
({ createRecorder } = await loadRecorder());
|
|
204
|
+
}
|
|
205
|
+
catch (first) {
|
|
206
|
+
await new Promise((r) => setTimeout(r, RECORDER_RETRY_MS));
|
|
207
|
+
({ createRecorder } = await loadRecorder()); // a second failure propagates → reported by the registry
|
|
208
|
+
ctx.trackEvent('sdk_replay_recovered', {
|
|
209
|
+
stage: 'recorder-import',
|
|
210
|
+
message: String(first?.message ?? first).slice(0, 300),
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
this.controller = await createRecorder(ctx, decision);
|
|
214
|
+
/**
|
|
215
|
+
* P1b — the ARMED-BUT-SILENT watchdog. This is the case nothing else can see.
|
|
216
|
+
*
|
|
217
|
+
* Every gate above reports by returning or throwing. Once `createRecorder` resolves the feature is
|
|
218
|
+
* live and, as far as any existing signal is concerned, healthy — so a recorder that attaches and
|
|
219
|
+
* then never produces a frame (root never resolved, snapshot threw inside an observer callback,
|
|
220
|
+
* serialization died on a hostile DOM) is invisible on the client AND on the server, because
|
|
221
|
+
* nothing is ever sent. That is the exact residue this phase has to attribute.
|
|
222
|
+
*
|
|
223
|
+
* Tests `captured`, NOT `frames`. `frames` is the segment-buffer occupancy: while streaming, frames
|
|
224
|
+
* leave the buffer as they ship, so a healthy session reports 0 and an earlier revision of this
|
|
225
|
+
* watchdog accused every one of them — measured in the Phase 2 browser matrix, `normal` at 5 s, 8 s
|
|
226
|
+
* and 15 s all reached PLAYBACK_READY while reporting NO_FRAME_AFTER_ARM. A false positive here is
|
|
227
|
+
* worse than no watchdog: it would fill the attribution table this phase exists to build with
|
|
228
|
+
* sessions that captured perfectly.
|
|
229
|
+
*
|
|
230
|
+
* `recording` is still required: a paused or torn-down recorder has a legitimate reason to hold no
|
|
231
|
+
* keyframe and must not be accused either.
|
|
232
|
+
*/
|
|
233
|
+
this.watchdog = setTimeout(() => {
|
|
234
|
+
const s = this.controller?.stats();
|
|
235
|
+
if (s?.recording && !s.captured) {
|
|
236
|
+
ctx.trackEvent(FAIL, {
|
|
237
|
+
stage: 'first-frame',
|
|
238
|
+
reason: 'NO_FRAME_AFTER_ARM',
|
|
239
|
+
// Carried so the server can separate "armed and streaming" from "armed and buffering the
|
|
240
|
+
// pre-roll", which is a legitimate zero-frame state under onError mode.
|
|
241
|
+
streaming: s.streaming,
|
|
242
|
+
bucket: s.sampleBucket,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
}, FIRST_FRAME_WATCHDOG_MS);
|
|
246
|
+
}
|
|
247
|
+
/** Capture-on-signal flush (promote pre-roll → live). No-op until a recorder is active. */
|
|
248
|
+
flush() {
|
|
249
|
+
this.controller?.flush();
|
|
250
|
+
}
|
|
251
|
+
/** Live diagnostics (null when not recording — off, or a non-sampled session). */
|
|
252
|
+
stats() {
|
|
253
|
+
return this.controller?.stats() ?? null;
|
|
254
|
+
}
|
|
255
|
+
/** Force a re-keyframe (e.g. before a risky flow), so the player gets a clean seek point. */
|
|
256
|
+
checkpoint(reason = 'manual') {
|
|
257
|
+
this.controller?.forceCheckpoint(reason);
|
|
258
|
+
}
|
|
259
|
+
/** Pause capture (keep the session + buffered pre-roll). No-op until a recorder is active. */
|
|
260
|
+
pause() {
|
|
261
|
+
this.controller?.pause();
|
|
262
|
+
}
|
|
263
|
+
/** Resume capture after pause() with a fresh keyframe. No-op unless paused. */
|
|
264
|
+
resume() {
|
|
265
|
+
this.controller?.resume();
|
|
266
|
+
}
|
|
267
|
+
/** Change replay text-masking at runtime (re-keyframes so it applies from here on). */
|
|
268
|
+
setPrivacy(policy) {
|
|
269
|
+
this.controller?.setPrivacy(policy);
|
|
270
|
+
}
|
|
271
|
+
teardown() {
|
|
272
|
+
// Before the controller goes: a fired-after-teardown watchdog would read `stats()` as undefined and
|
|
273
|
+
// report nothing, but the timer would still hold this instance alive until it elapsed.
|
|
274
|
+
clearTimeout(this.watchdog);
|
|
275
|
+
this.watchdog = undefined;
|
|
276
|
+
this.controller?.teardown();
|
|
277
|
+
this.controller = undefined;
|
|
278
|
+
this.uninstallWebGL?.();
|
|
279
|
+
this.uninstallWebGL = undefined;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
//# sourceMappingURL=ReplayFeature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReplayFeature.js","sourceRoot":"","sources":["../../../src/features/replay/ReplayFeature.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CanvasRecorder — opt-in <canvas> pixel capture. The DOM serializer captures a <canvas> element but
|
|
3
|
+
* not its pixels (they live in a 2D/WebGL context), so canvases replay blank. This throttled loop
|
|
4
|
+
* snapshots each canvas to a compact image and emits an `op:'canvas'` delta keyed by the node id; the
|
|
5
|
+
* player draws it back. Off by default (pixels can't be masked) + a per-canvas blocklist.
|
|
6
|
+
*
|
|
7
|
+
* Handles BOTH 2D and WebGL/3D canvases: a WebGL canvas would normally read back blank from this async
|
|
8
|
+
* loop (`preserveDrawingBuffer:false` clears the buffer after compositing), so `webglPatch.ts` forces
|
|
9
|
+
* `preserveDrawingBuffer:true` at context creation — the same `drawImage`/`toDataURL` path then captures
|
|
10
|
+
* WebGL pixels unchanged. A tainted (cross-origin texture) canvas still throws → skipped.
|
|
11
|
+
*
|
|
12
|
+
* v1 encodes on the main thread (`toDataURL`), bounded by the fps throttle + downscale. Moving the
|
|
13
|
+
* encode into the RPL-WORKER (OffscreenCanvas.convertToBlob) is a follow-up.
|
|
14
|
+
*/
|
|
15
|
+
import type { Mutation } from './types.js';
|
|
16
|
+
import { NodeRegistry } from './nodeRegistry.js';
|
|
17
|
+
export interface CanvasOptions {
|
|
18
|
+
fps?: number;
|
|
19
|
+
maxDim?: number;
|
|
20
|
+
quality?: number;
|
|
21
|
+
/** Documents to scan for canvases. Defaults to the top document; the ReplayFeature also passes the
|
|
22
|
+
* observed same-origin iframe sub-documents so in-iframe canvases are captured too (A7). */
|
|
23
|
+
getDocs?: () => Document[];
|
|
24
|
+
}
|
|
25
|
+
export declare class CanvasRecorder {
|
|
26
|
+
private readonly reg;
|
|
27
|
+
private readonly onMutations;
|
|
28
|
+
private readonly log;
|
|
29
|
+
private timer;
|
|
30
|
+
private readonly last;
|
|
31
|
+
private readonly tainted;
|
|
32
|
+
private readonly intervalMs;
|
|
33
|
+
private readonly maxDim;
|
|
34
|
+
private readonly quality;
|
|
35
|
+
private readonly getDocs?;
|
|
36
|
+
private scratch;
|
|
37
|
+
constructor(reg: NodeRegistry, onMutations: (m: Mutation[]) => void, log?: (...a: unknown[]) => void, opts?: CanvasOptions);
|
|
38
|
+
start(): void;
|
|
39
|
+
disconnect(): void;
|
|
40
|
+
private capture;
|
|
41
|
+
/** Encode to a (possibly downscaled) webp data URL. `w/h` stay the ORIGINAL dims so the player
|
|
42
|
+
* redraws at full size. Throws (SecurityError) on a tainted canvas → caller skips. */
|
|
43
|
+
private encode;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=canvas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas.d.ts","sourceRoot":"","sources":["../../../../src/features/replay/engine/canvas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;iGAC6F;IAC7F,OAAO,CAAC,EAAE,MAAM,QAAQ,EAAE,CAAC;CAC5B;AAID,qBAAa,cAAc;IAWvB,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,GAAG;IAZtB,OAAO,CAAC,KAAK,CAA+C;IAC5D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA6B;IAClD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAmB;IAC5C,OAAO,CAAC,OAAO,CAAkC;gBAG9B,GAAG,EAAE,YAAY,EACjB,WAAW,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,IAAI,EACpC,GAAG,GAAE,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,IAAe,EAC1D,IAAI,GAAE,aAAkB;IAQ1B,KAAK,IAAI,IAAI;IAMb,UAAU,IAAI,IAAI;IAQlB,OAAO,CAAC,OAAO;IAkDf;2FACuF;IACvF,OAAO,CAAC,MAAM;CAcf"}
|