@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,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser global entry — the no-build install target.
|
|
3
|
+
*
|
|
4
|
+
* esbuild bundles this as an IIFE (see scripts/build-browser.mjs) so a plain
|
|
5
|
+
* <script src="https://cdn…/scalebun.min.js"></script>
|
|
6
|
+
* exposes `window.ScaleBun` and `ScaleBun.init({...})` works with NO bundler. It is the SAME facade as
|
|
7
|
+
* the npm/ESM build — one runtime, no fork.
|
|
8
|
+
*
|
|
9
|
+
* IMPORTANT: this module is NOT imported by src/index.ts, so it never enters the eager-core bundle the
|
|
10
|
+
* `size:check` gate measures. The 30 KB ESM gate is unaffected by anything here.
|
|
11
|
+
*
|
|
12
|
+
* Two no-build install shapes are supported:
|
|
13
|
+
*
|
|
14
|
+
* 1. ASYNC LOADER SNIPPET (recommended) — an inline stub queues early calls, then loads this bundle:
|
|
15
|
+
* <script>
|
|
16
|
+
* !function(w,d){w.ScaleBun=w.ScaleBun||{q:[]};
|
|
17
|
+
* ['init','track','identify','trackPurchase','setConsent','reset','register','group','alias']
|
|
18
|
+
* .forEach(function(m){w.ScaleBun[m]=w.ScaleBun[m]||function(){w.ScaleBun.q.push([m,arguments]);};});
|
|
19
|
+
* var s=d.createElement('script');s.async=true;
|
|
20
|
+
* s.src='https://cdn.jsdelivr.net/npm/@scalebun/web@1/dist/scalebun.min.js';
|
|
21
|
+
* d.head.appendChild(s);}(window,document);
|
|
22
|
+
* ScaleBun.init({clientKey:'…'});
|
|
23
|
+
* </script>
|
|
24
|
+
* On load we replace the stub, replay `ScaleBun.q` in order — no race, no lost calls.
|
|
25
|
+
*
|
|
26
|
+
* 2. DECLARATIVE TAG (CSP-clean, zero inline JS) — config via data-* on the tag itself:
|
|
27
|
+
* <script async src="…/scalebun.min.js" data-client-key="…"></script>
|
|
28
|
+
* We read the loading script's dataset and auto-init.
|
|
29
|
+
*/
|
|
30
|
+
import { ScaleBun } from './public/ScaleBunFacade.js';
|
|
31
|
+
/** The async-loader stub captures pre-load calls as `[method, args]` on `.q`. */
|
|
32
|
+
interface ScaleBunStub {
|
|
33
|
+
q?: Array<[string, unknown[]]>;
|
|
34
|
+
}
|
|
35
|
+
declare global {
|
|
36
|
+
interface Window {
|
|
37
|
+
ScaleBun?: typeof ScaleBun | ScaleBunStub;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Install the real facade as `window.ScaleBun`: (1) drain any queued calls the loader stub captured
|
|
42
|
+
* before this bundle loaded, then (2) auto-init from the loading `<script>`'s data-* attributes.
|
|
43
|
+
* Exported for unit tests; the module runs it once on load below.
|
|
44
|
+
*/
|
|
45
|
+
export declare function installBrowserGlobal(win: {
|
|
46
|
+
ScaleBun?: typeof ScaleBun | ScaleBunStub;
|
|
47
|
+
}, currentScript: {
|
|
48
|
+
dataset?: DOMStringMap;
|
|
49
|
+
} | null): void;
|
|
50
|
+
export { ScaleBun as default, ScaleBun };
|
|
51
|
+
//# sourceMappingURL=browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGnD,iFAAiF;AACjF,UAAU,YAAY;IACpB,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;CAChC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,QAAQ,CAAC,EAAE,OAAO,QAAQ,GAAG,YAAY,CAAC;KAC3C;CACF;AAID;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,QAAQ,GAAG,YAAY,CAAA;CAAE,EAClD,aAAa,EAAE;IAAE,OAAO,CAAC,EAAE,YAAY,CAAA;CAAE,GAAG,IAAI,GAC/C,IAAI,CAqCN;AAaD,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/browser.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser global entry — the no-build install target.
|
|
3
|
+
*
|
|
4
|
+
* esbuild bundles this as an IIFE (see scripts/build-browser.mjs) so a plain
|
|
5
|
+
* <script src="https://cdn…/scalebun.min.js"></script>
|
|
6
|
+
* exposes `window.ScaleBun` and `ScaleBun.init({...})` works with NO bundler. It is the SAME facade as
|
|
7
|
+
* the npm/ESM build — one runtime, no fork.
|
|
8
|
+
*
|
|
9
|
+
* IMPORTANT: this module is NOT imported by src/index.ts, so it never enters the eager-core bundle the
|
|
10
|
+
* `size:check` gate measures. The 30 KB ESM gate is unaffected by anything here.
|
|
11
|
+
*
|
|
12
|
+
* Two no-build install shapes are supported:
|
|
13
|
+
*
|
|
14
|
+
* 1. ASYNC LOADER SNIPPET (recommended) — an inline stub queues early calls, then loads this bundle:
|
|
15
|
+
* <script>
|
|
16
|
+
* !function(w,d){w.ScaleBun=w.ScaleBun||{q:[]};
|
|
17
|
+
* ['init','track','identify','trackPurchase','setConsent','reset','register','group','alias']
|
|
18
|
+
* .forEach(function(m){w.ScaleBun[m]=w.ScaleBun[m]||function(){w.ScaleBun.q.push([m,arguments]);};});
|
|
19
|
+
* var s=d.createElement('script');s.async=true;
|
|
20
|
+
* s.src='https://cdn.jsdelivr.net/npm/@scalebun/web@1/dist/scalebun.min.js';
|
|
21
|
+
* d.head.appendChild(s);}(window,document);
|
|
22
|
+
* ScaleBun.init({clientKey:'…'});
|
|
23
|
+
* </script>
|
|
24
|
+
* On load we replace the stub, replay `ScaleBun.q` in order — no race, no lost calls.
|
|
25
|
+
*
|
|
26
|
+
* 2. DECLARATIVE TAG (CSP-clean, zero inline JS) — config via data-* on the tag itself:
|
|
27
|
+
* <script async src="…/scalebun.min.js" data-client-key="…"></script>
|
|
28
|
+
* We read the loading script's dataset and auto-init.
|
|
29
|
+
*/
|
|
30
|
+
import { ScaleBun } from './public/ScaleBunFacade.js';
|
|
31
|
+
import { setNonce } from './core/index.js';
|
|
32
|
+
/**
|
|
33
|
+
* Install the real facade as `window.ScaleBun`: (1) drain any queued calls the loader stub captured
|
|
34
|
+
* before this bundle loaded, then (2) auto-init from the loading `<script>`'s data-* attributes.
|
|
35
|
+
* Exported for unit tests; the module runs it once on load below.
|
|
36
|
+
*/
|
|
37
|
+
export function installBrowserGlobal(win, currentScript) {
|
|
38
|
+
const existing = win.ScaleBun;
|
|
39
|
+
win.ScaleBun = ScaleBun;
|
|
40
|
+
// (1) Replay the pre-load queue in order — generic over any facade method.
|
|
41
|
+
let queuedInit = false;
|
|
42
|
+
if (existing && Array.isArray(existing.q)) {
|
|
43
|
+
for (const entry of existing.q) {
|
|
44
|
+
const [method, args] = entry;
|
|
45
|
+
if (method === 'init')
|
|
46
|
+
queuedInit = true;
|
|
47
|
+
const fn = ScaleBun[method];
|
|
48
|
+
if (typeof fn === 'function') {
|
|
49
|
+
// `args` is array-LIKE: a real array (GTM createQueue pushes `['init', [cfg]]`) or an
|
|
50
|
+
// `arguments` object (the inline snippet pushes `[m, arguments]`). Normalize both.
|
|
51
|
+
const argv = args ? Array.prototype.slice.call(args) : [];
|
|
52
|
+
try {
|
|
53
|
+
fn.apply(ScaleBun, argv);
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
/* one bad queued call must never break the rest of the drain */
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// (2) Declarative auto-init (skipped if init already came through the queue). Only clientKey is
|
|
62
|
+
// required. `data-api-base-url` is forwarded VERBATIM — the lock lives in resolveConfig, the one
|
|
63
|
+
// enforcement point: a remote value is discarded there in favour of the cloud endpoint, while a
|
|
64
|
+
// loopback value is honoured for local development. Duplicating the lock here would just hide
|
|
65
|
+
// the loopback path from script-tag installs without adding any protection.
|
|
66
|
+
const ds = currentScript?.dataset;
|
|
67
|
+
if (!queuedInit && ds?.clientKey) {
|
|
68
|
+
const cfg = { clientKey: ds.clientKey };
|
|
69
|
+
if (ds.apiBaseUrl)
|
|
70
|
+
cfg.apiBaseUrl = ds.apiBaseUrl;
|
|
71
|
+
if (ds.environment)
|
|
72
|
+
cfg.environment = ds.environment;
|
|
73
|
+
if (ds.autocapture != null)
|
|
74
|
+
cfg.autocapture = ds.autocapture !== 'false';
|
|
75
|
+
void ScaleBun.init(cfg);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (typeof window !== 'undefined') {
|
|
79
|
+
const currentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
80
|
+
// CSP: auto-detect the nonce from the SDK's own <script> tag (script-tag install). An explicit
|
|
81
|
+
// init({ csp: { nonce } }) still wins — it runs setNonce() afterwards and only overrides when set.
|
|
82
|
+
setNonce(currentScript?.nonce);
|
|
83
|
+
installBrowserGlobal(window, currentScript);
|
|
84
|
+
}
|
|
85
|
+
export { ScaleBun as default, ScaleBun };
|
|
86
|
+
//# sourceMappingURL=browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAelC;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAClC,GAAkD,EAClD,aAAgD;IAEhD,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAoC,CAAC;IAC1D,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAExB,2EAA2E;IAC3E,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,IAAI,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1C,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,CAAC,EAAE,CAAC;YAC/B,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC;YAC7B,IAAI,MAAM,KAAK,MAAM;gBAAE,UAAU,GAAG,IAAI,CAAC;YACzC,MAAM,EAAE,GAAI,QAA+C,CAAC,MAAM,CAAC,CAAC;YACpE,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE,CAAC;gBAC7B,sFAAsF;gBACtF,mFAAmF;gBACnF,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC1D,IAAI,CAAC;oBACF,EAAmC,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;gBAC7D,CAAC;gBAAC,MAAM,CAAC;oBACP,gEAAgE;gBAClE,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,gGAAgG;IAChG,iGAAiG;IACjG,gGAAgG;IAChG,8FAA8F;IAC9F,4EAA4E;IAC5E,MAAM,EAAE,GAAG,aAAa,EAAE,OAAO,CAAC;IAClC,IAAI,CAAC,UAAU,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC;QACjC,MAAM,GAAG,GAAe,EAAE,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC;QACpD,IAAI,EAAE,CAAC,UAAU;YAAE,GAAG,CAAC,UAAU,GAAG,EAAE,CAAC,UAAU,CAAC;QAClD,IAAI,EAAE,CAAC,WAAW;YAAE,GAAG,CAAC,WAAW,GAAG,EAAE,CAAC,WAAW,CAAC;QACrD,IAAI,EAAE,CAAC,WAAW,IAAI,IAAI;YAAE,GAAG,CAAC,WAAW,GAAG,EAAE,CAAC,WAAW,KAAK,OAAO,CAAC;QACzE,KAAK,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;AACH,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,MAAM,aAAa,GAAG,OAAO,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC;IACtF,+FAA+F;IAC/F,mGAAmG;IACnG,QAAQ,CAAE,aAA2C,EAAE,KAAK,CAAC,CAAC;IAC9D,oBAAoB,CAClB,MAAkE,EAClE,aAAkD,CACnD,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ScaleBun cloud API base URL.
|
|
3
|
+
*
|
|
4
|
+
* Default for `apiBaseUrl` when a consumer does not supply one, so the common
|
|
5
|
+
* "just give me a client key" integration works without knowing the server
|
|
6
|
+
* address. Includes the `/api/v1` path segment because every SDK endpoint is
|
|
7
|
+
* built relative to this base (e.g. `${apiBaseUrl}/ingestion/sessions`,
|
|
8
|
+
* `${apiBaseUrl}/batch`). Override `apiBaseUrl` in init config to point at a
|
|
9
|
+
* staging environment or a self-hosted backend.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEFAULT_API_BASE_URL = "https://api.scalebun.com/api/v1";
|
|
12
|
+
//# sourceMappingURL=endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../src/config/endpoints.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ScaleBun cloud API base URL.
|
|
3
|
+
*
|
|
4
|
+
* Default for `apiBaseUrl` when a consumer does not supply one, so the common
|
|
5
|
+
* "just give me a client key" integration works without knowing the server
|
|
6
|
+
* address. Includes the `/api/v1` path segment because every SDK endpoint is
|
|
7
|
+
* built relative to this base (e.g. `${apiBaseUrl}/ingestion/sessions`,
|
|
8
|
+
* `${apiBaseUrl}/batch`). Override `apiBaseUrl` in init config to point at a
|
|
9
|
+
* staging environment or a self-hosted backend.
|
|
10
|
+
*/
|
|
11
|
+
export const DEFAULT_API_BASE_URL = 'https://api.scalebun.com/api/v1';
|
|
12
|
+
//# sourceMappingURL=endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../src/config/endpoints.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* config/schema — runtime config validation + defaults (mirrors RN core/config/schema).
|
|
3
|
+
* Public input types live in @scalebun/sdk-contracts; this produces the resolved internal config.
|
|
4
|
+
*/
|
|
5
|
+
import type { ScaleBunInitConfig } from '@scalebun/sdk-contracts';
|
|
6
|
+
export interface ResolvedConfig {
|
|
7
|
+
clientKey: string;
|
|
8
|
+
apiBaseUrl: string;
|
|
9
|
+
environment?: string;
|
|
10
|
+
release?: string;
|
|
11
|
+
appVersion?: string;
|
|
12
|
+
flushIntervalMs: number;
|
|
13
|
+
/** Inactivity after which the next page load starts a NEW session. Default 30 min. */
|
|
14
|
+
sessionTimeoutMs?: number;
|
|
15
|
+
/** Absolute cap on a single session, so a permanently-open tab cannot report one endless
|
|
16
|
+
* session. Default 24 h. */
|
|
17
|
+
sessionMaxDurationMs?: number;
|
|
18
|
+
maxBatchSize: number;
|
|
19
|
+
maxQueueSize: number;
|
|
20
|
+
/** Raw replay sampling config — defaults/clamping are applied lazily in `decideSampling` (keeps
|
|
21
|
+
* the resolution logic out of the core bundle; undefined = the 'sampled' @ rate-1 default). */
|
|
22
|
+
replay: ScaleBunInitConfig['replay'];
|
|
23
|
+
/** Opt-in: capture <canvas> pixels in replay (off by default — pixels can't be masked). */
|
|
24
|
+
replayCanvas: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Upload a DOM frame’s payload straight to object storage instead of inline in the batch.
|
|
27
|
+
*
|
|
28
|
+
* OFF BY DEFAULT, and it stays off until a deployment has the backend half: the presign
|
|
29
|
+
* endpoint must sign DOM keys and the ingest path must accept a client-supplied
|
|
30
|
+
* `domStorageKey`. Against an older backend the presign simply reports storage disabled and
|
|
31
|
+
* every frame goes inline, so the flag is safe to enable early — it just does nothing.
|
|
32
|
+
*
|
|
33
|
+
* Measured motivation: 154,235 of 163,644 frames stored in a 32h window are web DOM payloads
|
|
34
|
+
* that the SERVER uploaded on the request path, at 25-70ms per round trip.
|
|
35
|
+
*/
|
|
36
|
+
replayDirectUpload: boolean;
|
|
37
|
+
/** W1a — HMAC-sign the session/replay batches too (analytics lane always signs). Off by default:
|
|
38
|
+
* signing the (often multi-MB) replay uploads re-enables server-side rawBody double-buffering. */
|
|
39
|
+
signSessionLane: boolean;
|
|
40
|
+
/** Origin allowlist for cross-origin replay stitching (F-IFR P2). Default []. */
|
|
41
|
+
replayFrameOrigins: string[];
|
|
42
|
+
/** Error capture options — passthrough from cfg.errors; defaults resolved in ErrorsFeature. */
|
|
43
|
+
errors: ScaleBunInitConfig['errors'];
|
|
44
|
+
/** Network capture options — passthrough from cfg.network; defaults resolved in NetworkFeature. */
|
|
45
|
+
network: ScaleBunInitConfig['network'];
|
|
46
|
+
/** Performance/RUM options — passthrough from cfg.performance; defaults resolved in PerformanceFeature. */
|
|
47
|
+
performance: ScaleBunInitConfig['performance'];
|
|
48
|
+
/** Product-analytics options (tracking plan) — passthrough; read by AnalyticsFeature. */
|
|
49
|
+
analytics: ScaleBunInitConfig['analytics'];
|
|
50
|
+
/** F3 — flags/config options (bootstrap seed) — passthrough; read by ConfigFeature. */
|
|
51
|
+
flags: ScaleBunInitConfig['flags'];
|
|
52
|
+
/** Autocapture DOM interactions as analytics events (on by default; text is masked). */
|
|
53
|
+
autocapture: boolean;
|
|
54
|
+
/** Inject a W3C traceparent into outbound requests (FE→BE correlation). Default on (same-origin). */
|
|
55
|
+
tracePropagation: boolean;
|
|
56
|
+
/** Extra cross-origin origins to propagate the traceparent to (must CORS-allow it). Default []. */
|
|
57
|
+
tracePropagationOrigins: string[];
|
|
58
|
+
debug: boolean;
|
|
59
|
+
features: {
|
|
60
|
+
errors: boolean;
|
|
61
|
+
network: boolean;
|
|
62
|
+
console: boolean;
|
|
63
|
+
webVitals: boolean;
|
|
64
|
+
performance: boolean;
|
|
65
|
+
journey: boolean;
|
|
66
|
+
replay: boolean;
|
|
67
|
+
bugReport: boolean;
|
|
68
|
+
crash: boolean;
|
|
69
|
+
config: boolean;
|
|
70
|
+
engage: boolean;
|
|
71
|
+
analytics: boolean;
|
|
72
|
+
webPerf: boolean;
|
|
73
|
+
profiler: boolean;
|
|
74
|
+
watchdog: boolean;
|
|
75
|
+
inbox: boolean;
|
|
76
|
+
inapp2: boolean;
|
|
77
|
+
};
|
|
78
|
+
/** W5.2 — Resource Watchdog options passthrough (defaults resolved in WatchdogFeature). */
|
|
79
|
+
watchdog: ScaleBunInitConfig['watchdog'];
|
|
80
|
+
/** #25 P2 — exit-intent thresholds passthrough; defaults resolved in the engine (REVERSAL_DEFAULTS).
|
|
81
|
+
* Host-tunable so a site can retune from its own data without waiting for an SDK release. */
|
|
82
|
+
exitIntent: ScaleBunInitConfig['exitIntent'];
|
|
83
|
+
privacy: {
|
|
84
|
+
captureNetworkBodies: boolean;
|
|
85
|
+
denylist: string[];
|
|
86
|
+
maskSelectors: string[];
|
|
87
|
+
/** Mask all STATIC replay text. Default FALSE — text is captured so replays are readable. Set
|
|
88
|
+
* true to mask every text node. Form input values have their own flag (maskInputs). */
|
|
89
|
+
maskReplayText: boolean;
|
|
90
|
+
/** Mask form input VALUES in replay. Default TRUE, INDEPENDENT of maskReplayText (typed input is
|
|
91
|
+
* the real PII, so it stays masked even when static text is shown). Passwords always blanked. */
|
|
92
|
+
maskInputs: boolean;
|
|
93
|
+
/** Honor GPC / Do-Not-Track by not recording replay for opted-out users. Default false. */
|
|
94
|
+
respectDnt: boolean;
|
|
95
|
+
/** Mask the text LABEL on interaction events (USER_ACTION.label + $autocapture props.text).
|
|
96
|
+
* Default FALSE — the real label is sent, so clicks group per element instead of collapsing
|
|
97
|
+
* into one row. Was unconditional masking before. */
|
|
98
|
+
maskEventText: boolean;
|
|
99
|
+
};
|
|
100
|
+
consent: {
|
|
101
|
+
/** When true, capture + egress are deferred until consent is granted. */
|
|
102
|
+
required: boolean;
|
|
103
|
+
/** Initial consent state (host may pre-resolve via SSR/cookie). */
|
|
104
|
+
initial: 'granted' | 'denied' | 'unknown';
|
|
105
|
+
};
|
|
106
|
+
bugReport: {
|
|
107
|
+
/** Mount the floating launcher widget. */
|
|
108
|
+
launcher: boolean;
|
|
109
|
+
position: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
110
|
+
label: string;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Host resolver for the 8 gamified in-app formats. Passed through verbatim and NEVER given a
|
|
114
|
+
* default — a default here would be the SDK choosing a prize, which is the one thing it must not
|
|
115
|
+
* do. Absent → those formats render their unavailable state.
|
|
116
|
+
*/
|
|
117
|
+
onInAppGameRequest?: (request: unknown) => Promise<unknown>;
|
|
118
|
+
}
|
|
119
|
+
export declare function resolveConfig(cfg: ScaleBunInitConfig): ResolvedConfig;
|
|
120
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* config/schema — runtime config validation + defaults (mirrors RN core/config/schema).
|
|
3
|
+
* Public input types live in @scalebun/sdk-contracts; this produces the resolved internal config.
|
|
4
|
+
*/
|
|
5
|
+
import { DEFAULT_API_BASE_URL } from './endpoints.js';
|
|
6
|
+
// Header/body keys stripped before send, by default — denylist-by-default privacy.
|
|
7
|
+
const DEFAULT_DENYLIST = [
|
|
8
|
+
'authorization',
|
|
9
|
+
'cookie',
|
|
10
|
+
'set-cookie',
|
|
11
|
+
'x-api-key',
|
|
12
|
+
'x-csrf-token',
|
|
13
|
+
'password',
|
|
14
|
+
'token',
|
|
15
|
+
'secret',
|
|
16
|
+
];
|
|
17
|
+
export function resolveConfig(cfg) {
|
|
18
|
+
if (!cfg || !cfg.clientKey)
|
|
19
|
+
throw new Error('[scalebun] clientKey is required');
|
|
20
|
+
// apiBaseUrl is LOCKED to the ScaleBun cloud endpoint — a REMOTE value passed in
|
|
21
|
+
// `cfg.apiBaseUrl` is deliberately ignored so integrators cannot repoint the SDK.
|
|
22
|
+
// The single exception is LOOPBACK (localhost / 127.0.0.1; IPv6 [::1] deliberately
|
|
23
|
+
// omitted — the core size gate is byte-tight and no test or dev flow uses it):
|
|
24
|
+
// local mock servers are how the SDK's own integration tests and local development
|
|
25
|
+
// drive the full egress path, and a loopback target cannot repoint anyone's
|
|
26
|
+
// production data anywhere. To target a different real backend, change
|
|
27
|
+
// DEFAULT_API_BASE_URL at build time (keep it slash-free: it is used verbatim; a
|
|
28
|
+
// supplied loopback URL gets its trailing slash trimmed).
|
|
29
|
+
const supplied = cfg.apiBaseUrl?.replace(/\/$/, '');
|
|
30
|
+
const apiBaseUrl = supplied && /^https?:\/\/(localhost|127\.0\.0\.1)(:\d+)?([/?#]|$)/.test(supplied)
|
|
31
|
+
? supplied
|
|
32
|
+
: DEFAULT_API_BASE_URL;
|
|
33
|
+
return {
|
|
34
|
+
clientKey: cfg.clientKey,
|
|
35
|
+
apiBaseUrl,
|
|
36
|
+
environment: cfg.environment,
|
|
37
|
+
release: cfg.release,
|
|
38
|
+
appVersion: cfg.appVersion,
|
|
39
|
+
flushIntervalMs: cfg.flushIntervalMs ?? 5000,
|
|
40
|
+
sessionTimeoutMs: cfg.sessionTimeoutMs,
|
|
41
|
+
sessionMaxDurationMs: cfg.sessionMaxDurationMs,
|
|
42
|
+
replay: cfg.replay, // passthrough — resolved lazily in decideSampling
|
|
43
|
+
errors: cfg.errors, // passthrough — defaults resolved in ErrorsFeature
|
|
44
|
+
network: cfg.network, // passthrough — defaults resolved in NetworkFeature
|
|
45
|
+
performance: cfg.performance, // passthrough — defaults resolved in PerformanceFeature
|
|
46
|
+
analytics: cfg.analytics, // passthrough — tracking plan read in AnalyticsFeature
|
|
47
|
+
flags: cfg.flags, // passthrough — bootstrap seed read in ConfigFeature (F3)
|
|
48
|
+
replayCanvas: cfg.replayCanvas ?? false,
|
|
49
|
+
replayDirectUpload: cfg.replayDirectUpload ?? false,
|
|
50
|
+
signSessionLane: cfg.signSessionLane ?? false,
|
|
51
|
+
replayFrameOrigins: cfg.replayFrameOrigins ?? [],
|
|
52
|
+
autocapture: cfg.autocapture ?? true,
|
|
53
|
+
tracePropagation: cfg.tracePropagation ?? true,
|
|
54
|
+
tracePropagationOrigins: cfg.tracePropagationOrigins ?? [],
|
|
55
|
+
maxBatchSize: cfg.maxBatchSize ?? 50,
|
|
56
|
+
maxQueueSize: cfg.maxQueueSize ?? 1000,
|
|
57
|
+
debug: cfg.debug ?? false,
|
|
58
|
+
features: {
|
|
59
|
+
errors: cfg.features?.errors ?? true,
|
|
60
|
+
network: cfg.features?.network ?? true,
|
|
61
|
+
console: cfg.features?.console ?? true,
|
|
62
|
+
webVitals: cfg.features?.webVitals ?? true,
|
|
63
|
+
performance: cfg.features?.performance ?? true,
|
|
64
|
+
journey: cfg.features?.journey ?? true,
|
|
65
|
+
replay: cfg.features?.replay ?? false, // lazy/opt-in until capture-on-signal lands
|
|
66
|
+
bugReport: cfg.features?.bugReport ?? true,
|
|
67
|
+
crash: cfg.features?.crash ?? true,
|
|
68
|
+
config: cfg.features?.config ?? true,
|
|
69
|
+
engage: cfg.features?.engage ?? true,
|
|
70
|
+
analytics: cfg.features?.analytics ?? true,
|
|
71
|
+
webPerf: cfg.features?.webPerf ?? true,
|
|
72
|
+
profiler: cfg.features?.profiler ?? false, // opt-in (CPU cost + needs Document-Policy header)
|
|
73
|
+
watchdog: cfg.features?.watchdog ?? false, // W5.2 — opt-in until dogfooded (see WAVE5-DESIGN §18)
|
|
74
|
+
inbox: cfg.features?.inbox ?? false, // opt-in until GA (see INBOX-COACHMARKS-ARCHITECTURE.md)
|
|
75
|
+
inapp2: cfg.features?.inapp2 ?? false, // IAM 2.0 engine — opt-in until GA
|
|
76
|
+
},
|
|
77
|
+
watchdog: cfg.watchdog, // passthrough — defaults resolved in WatchdogFeature
|
|
78
|
+
exitIntent: cfg.exitIntent, // passthrough — defaults resolved in the exit-intent engine
|
|
79
|
+
privacy: {
|
|
80
|
+
captureNetworkBodies: cfg.privacy?.captureNetworkBodies ?? false,
|
|
81
|
+
denylist: [...DEFAULT_DENYLIST, ...(cfg.privacy?.denylist ?? [])].map((s) => s.toLowerCase()),
|
|
82
|
+
maskSelectors: cfg.privacy?.maskSelectors ?? [],
|
|
83
|
+
// STATIC text is SHOWN by default (maskReplayText: false) so replays are readable — matching
|
|
84
|
+
// the documented contract. Set true to mask every text node for a fully-redacted recording.
|
|
85
|
+
maskReplayText: cfg.privacy?.maskReplayText ?? false,
|
|
86
|
+
// Form INPUT values are masked by default and INDEPENDENTLY of maskReplayText: user-typed data
|
|
87
|
+
// is the real PII exposure, so it stays masked even when static text is shown. Set maskInputs
|
|
88
|
+
// false to capture raw input (dev/internal apps only). Passwords are ALWAYS blanked regardless.
|
|
89
|
+
maskInputs: cfg.privacy?.maskInputs ?? true,
|
|
90
|
+
respectDnt: cfg.privacy?.respectDnt ?? false,
|
|
91
|
+
// Deliberately does NOT follow maskReplayText the way maskInputs does. Replay text and an event
|
|
92
|
+
// label are different exposures: replay is a recording someone opens deliberately, whereas the
|
|
93
|
+
// label is an aggregate dimension shown on every dashboard. Coupling them would mean turning on
|
|
94
|
+
// replay masking silently also collapsed the Events explorer back to one row per element shape.
|
|
95
|
+
maskEventText: cfg.privacy?.maskEventText ?? false,
|
|
96
|
+
},
|
|
97
|
+
consent: {
|
|
98
|
+
// Consent mode is OPT-IN (requireConsent: true), not the default. A required-by-default
|
|
99
|
+
// gate silently stops ALL capture (sessions, replay, analytics) for every existing
|
|
100
|
+
// integrator the moment they upgrade, until they discover setConsent(true) — dashboards go
|
|
101
|
+
// dark with no error anywhere. The "default activates immediately — no regression" test
|
|
102
|
+
// pins this contract. PII protection lives in masking (maskInputs defaults true, so typed
|
|
103
|
+
// input is masked; static text stays readable), which protects PII without turning capture off.
|
|
104
|
+
required: cfg.requireConsent ?? false,
|
|
105
|
+
initial: cfg.initialConsent ?? 'unknown',
|
|
106
|
+
},
|
|
107
|
+
bugReport: {
|
|
108
|
+
launcher: cfg.bugReportOptions?.launcher ?? false,
|
|
109
|
+
position: cfg.bugReportOptions?.position ?? 'bottom-right',
|
|
110
|
+
label: cfg.bugReportOptions?.label ?? 'Report a bug',
|
|
111
|
+
},
|
|
112
|
+
...(cfg.engageOptions?.onInAppGameRequest
|
|
113
|
+
? { onInAppGameRequest: cfg.engageOptions.onInAppGameRequest }
|
|
114
|
+
: {}),
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breadcrumbs (M3) — the trail of what happened BEFORE an error, the single most useful context for
|
|
3
|
+
* "why did this break". Best-in-class design choices:
|
|
4
|
+
*
|
|
5
|
+
* - **Auto-captured at the ONE emit boundary** (the bootstrap routes every pipeline item through
|
|
6
|
+
* `recordBreadcrumb`), so console / network / navigation / clicks / custom events / prior errors
|
|
7
|
+
* all become crumbs automatically, in true chronological order, with ZERO per-feature wiring.
|
|
8
|
+
* - **Pre-redacted** — messages are scrubbed and network URLs lose their query string at capture, so
|
|
9
|
+
* PII never sits in the ring.
|
|
10
|
+
* - **Consecutive-dedup** — a burst of identical crumbs (e.g. a render-loop console.error) collapses
|
|
11
|
+
* to one with a `count`, keeping the trail readable and the ring useful.
|
|
12
|
+
* - **Bounded + configurable** — a fixed-size ring (default 50) snapshotted onto each error.
|
|
13
|
+
* - **Manual API** — `ScaleBun.addBreadcrumb(...)` for app-level milestones.
|
|
14
|
+
*
|
|
15
|
+
* Frame/performance items are intentionally NOT crumbs (too frequent; the mapper early-returns).
|
|
16
|
+
*/
|
|
17
|
+
import type { Item } from '@scalebun/protocol';
|
|
18
|
+
export type BreadcrumbLevel = 'debug' | 'info' | 'warning' | 'error';
|
|
19
|
+
export interface Breadcrumb {
|
|
20
|
+
/** epoch ms */
|
|
21
|
+
ts: number;
|
|
22
|
+
/** coarse source: 'console' | 'navigation' | 'network' | 'ui.click' | 'error' | 'custom' */
|
|
23
|
+
category: string;
|
|
24
|
+
/** finer type, e.g. 'http' | 'event' */
|
|
25
|
+
type?: string;
|
|
26
|
+
level?: BreadcrumbLevel;
|
|
27
|
+
message?: string;
|
|
28
|
+
data?: Record<string, unknown>;
|
|
29
|
+
/** consecutive identical crumbs collapsed into one */
|
|
30
|
+
count?: number;
|
|
31
|
+
}
|
|
32
|
+
/** Map a pipeline Item → a compact, redacted Breadcrumb (or null for kinds that aren't crumbs). */
|
|
33
|
+
export declare function crumbFromItem(item: Item): Breadcrumb | null;
|
|
34
|
+
/** A bounded ring of crumbs with consecutive-dedup. One instance per page (module singleton). */
|
|
35
|
+
declare class BreadcrumbBuffer {
|
|
36
|
+
private ring;
|
|
37
|
+
private max;
|
|
38
|
+
setMax(n: number): void;
|
|
39
|
+
add(c: Breadcrumb): void;
|
|
40
|
+
/** Chronological copy for attaching to an error (oldest → newest). */
|
|
41
|
+
snapshot(): Breadcrumb[];
|
|
42
|
+
clear(): void;
|
|
43
|
+
private trim;
|
|
44
|
+
}
|
|
45
|
+
/** The process-wide breadcrumb ring (single SDK instance per page). */
|
|
46
|
+
export declare const breadcrumbs: BreadcrumbBuffer;
|
|
47
|
+
export declare function setBeforeBreadcrumb(fn?: (c: Breadcrumb) => Breadcrumb | null): void;
|
|
48
|
+
/** Add a pre-formed crumb (manual API path fills `ts`/defaults before calling this). The host's
|
|
49
|
+
* message is scrubbed + clipped here so app-supplied crumbs are as PII-safe as the auto ones. */
|
|
50
|
+
export declare function addBreadcrumb(c: Breadcrumb): void;
|
|
51
|
+
/** Derive + record a crumb from a pipeline item (called at the emit boundary). Cheap no-op for
|
|
52
|
+
* non-crumb kinds (frame/performance) so it's safe on the hot replay path. */
|
|
53
|
+
export declare function recordBreadcrumb(item: Item): void;
|
|
54
|
+
export declare function clearBreadcrumbs(): void;
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=breadcrumbs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/core/breadcrumbs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAErE,MAAM,WAAW,UAAU;IACzB,eAAe;IACf,EAAE,EAAE,MAAM,CAAC;IACX,4FAA4F;IAC5F,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA4BD,mGAAmG;AACnG,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,GAAG,IAAI,CA0B3D;AAkBD,iGAAiG;AACjG,cAAM,gBAAgB;IACpB,OAAO,CAAC,IAAI,CAAoB;IAChC,OAAO,CAAC,GAAG,CAAe;IAE1B,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAKvB,GAAG,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAWxB,sEAAsE;IACtE,QAAQ,IAAI,UAAU,EAAE;IAIxB,KAAK,IAAI,IAAI;IAIb,OAAO,CAAC,IAAI;CAGb;AAED,uEAAuE;AACvE,eAAO,MAAM,WAAW,kBAAyB,CAAC;AAIlD,wBAAgB,mBAAmB,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,UAAU,GAAG,IAAI,GAAG,IAAI,CAEnF;AAWD;kGACkG;AAClG,wBAAgB,aAAa,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAIjD;AAED;+EAC+E;AAC/E,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAKjD;AAED,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { scrubText } from './redact.js';
|
|
2
|
+
const DEFAULT_MAX = 50;
|
|
3
|
+
const HARD_MAX = 200;
|
|
4
|
+
const MSG_CAP = 256;
|
|
5
|
+
function clip(s) {
|
|
6
|
+
return s.length > MSG_CAP ? s.slice(0, MSG_CAP) : s;
|
|
7
|
+
}
|
|
8
|
+
function stripQuery(url) {
|
|
9
|
+
return url.replace(/[?#].*$/, '');
|
|
10
|
+
}
|
|
11
|
+
function levelFor(l) {
|
|
12
|
+
return l === 'warn' ? 'warning' : l === 'debug' || l === 'info' || l === 'error' ? l : 'info';
|
|
13
|
+
}
|
|
14
|
+
/** Drop undefined values so crumb `data` stays compact on the wire. */
|
|
15
|
+
function prune(d) {
|
|
16
|
+
const out = {};
|
|
17
|
+
let any = false;
|
|
18
|
+
for (const k in d) {
|
|
19
|
+
if (d[k] !== undefined && d[k] !== null) {
|
|
20
|
+
out[k] = d[k];
|
|
21
|
+
any = true;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return any ? out : undefined;
|
|
25
|
+
}
|
|
26
|
+
/** Map a pipeline Item → a compact, redacted Breadcrumb (or null for kinds that aren't crumbs). */
|
|
27
|
+
export function crumbFromItem(item) {
|
|
28
|
+
// Hot path: frame (replay) + performance (RUM) items stream at high frequency and are never
|
|
29
|
+
// crumbs — bail before any allocation so the emit boundary stays cheap.
|
|
30
|
+
if (item.kind === 'frame' || item.kind === 'performance')
|
|
31
|
+
return null;
|
|
32
|
+
const ts = typeof item.timestamp === 'number' ? item.timestamp : Date.now();
|
|
33
|
+
switch (item.kind) {
|
|
34
|
+
case 'log':
|
|
35
|
+
return { ts, category: 'console', level: levelFor(item.level), message: clip(scrubText(item.message)) };
|
|
36
|
+
case 'network': {
|
|
37
|
+
const status = item.status;
|
|
38
|
+
return {
|
|
39
|
+
ts,
|
|
40
|
+
category: 'network',
|
|
41
|
+
type: 'http',
|
|
42
|
+
level: typeof status === 'number' && status >= 400 ? 'error' : 'info',
|
|
43
|
+
message: clip(scrubText(`${item.method} ${stripQuery(item.url)}`)),
|
|
44
|
+
data: prune({ status, duration: item.duration }),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
case 'event':
|
|
48
|
+
return eventCrumb(item.name, (item.props ?? {}), ts);
|
|
49
|
+
case 'error':
|
|
50
|
+
return { ts, category: 'error', type: item.type, level: 'error', message: clip(scrubText(item.message)) };
|
|
51
|
+
default:
|
|
52
|
+
return null; // frame / performance / rating / identify are not breadcrumbs
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function eventCrumb(name, p, ts) {
|
|
56
|
+
if (name === 'SCREEN_VIEW') {
|
|
57
|
+
return { ts, category: 'navigation', message: `${p.from ?? '?'} → ${p.to ?? '?'}` };
|
|
58
|
+
}
|
|
59
|
+
if (name === 'USER_ACTION') {
|
|
60
|
+
const action = typeof p.action === 'string' ? p.action : 'action';
|
|
61
|
+
return {
|
|
62
|
+
ts,
|
|
63
|
+
category: `ui.${action}`,
|
|
64
|
+
message: clip(scrubText(String(p.selector ?? p.label ?? action))),
|
|
65
|
+
data: prune({ dead: p.dead, rage: p.rage }),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
return { ts, category: 'custom', type: 'event', message: clip(scrubText(name)) };
|
|
69
|
+
}
|
|
70
|
+
/** A bounded ring of crumbs with consecutive-dedup. One instance per page (module singleton). */
|
|
71
|
+
class BreadcrumbBuffer {
|
|
72
|
+
constructor() {
|
|
73
|
+
this.ring = [];
|
|
74
|
+
this.max = DEFAULT_MAX;
|
|
75
|
+
}
|
|
76
|
+
setMax(n) {
|
|
77
|
+
this.max = Math.max(1, Math.min(HARD_MAX, Math.floor(n)));
|
|
78
|
+
this.trim();
|
|
79
|
+
}
|
|
80
|
+
add(c) {
|
|
81
|
+
const last = this.ring[this.ring.length - 1];
|
|
82
|
+
if (last && last.category === c.category && last.message === c.message && last.level === c.level) {
|
|
83
|
+
last.count = (last.count ?? 1) + 1; // collapse a burst of identical crumbs
|
|
84
|
+
last.ts = c.ts;
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
this.ring.push(c);
|
|
88
|
+
this.trim();
|
|
89
|
+
}
|
|
90
|
+
/** Chronological copy for attaching to an error (oldest → newest). */
|
|
91
|
+
snapshot() {
|
|
92
|
+
return this.ring.slice();
|
|
93
|
+
}
|
|
94
|
+
clear() {
|
|
95
|
+
this.ring = [];
|
|
96
|
+
}
|
|
97
|
+
trim() {
|
|
98
|
+
while (this.ring.length > this.max)
|
|
99
|
+
this.ring.shift();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/** The process-wide breadcrumb ring (single SDK instance per page). */
|
|
103
|
+
export const breadcrumbs = new BreadcrumbBuffer();
|
|
104
|
+
/** Host hook: inspect/modify a crumb before it enters the ring, or return null to drop it. */
|
|
105
|
+
let beforeCrumb;
|
|
106
|
+
export function setBeforeBreadcrumb(fn) {
|
|
107
|
+
beforeCrumb = fn;
|
|
108
|
+
}
|
|
109
|
+
/** Run the host hook (sandboxed). Returns the (possibly modified) crumb, or null to drop. */
|
|
110
|
+
function applyHook(c) {
|
|
111
|
+
if (!beforeCrumb)
|
|
112
|
+
return c;
|
|
113
|
+
try {
|
|
114
|
+
return beforeCrumb(c);
|
|
115
|
+
}
|
|
116
|
+
catch {
|
|
117
|
+
return c; // a throwing hook must not lose the crumb
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/** Add a pre-formed crumb (manual API path fills `ts`/defaults before calling this). The host's
|
|
121
|
+
* message is scrubbed + clipped here so app-supplied crumbs are as PII-safe as the auto ones. */
|
|
122
|
+
export function addBreadcrumb(c) {
|
|
123
|
+
const scrubbed = c.message ? { ...c, message: clip(scrubText(c.message)) } : c;
|
|
124
|
+
const final = applyHook(scrubbed);
|
|
125
|
+
if (final)
|
|
126
|
+
breadcrumbs.add(final);
|
|
127
|
+
}
|
|
128
|
+
/** Derive + record a crumb from a pipeline item (called at the emit boundary). Cheap no-op for
|
|
129
|
+
* non-crumb kinds (frame/performance) so it's safe on the hot replay path. */
|
|
130
|
+
export function recordBreadcrumb(item) {
|
|
131
|
+
const c = crumbFromItem(item);
|
|
132
|
+
if (!c)
|
|
133
|
+
return;
|
|
134
|
+
const final = applyHook(c);
|
|
135
|
+
if (final)
|
|
136
|
+
breadcrumbs.add(final);
|
|
137
|
+
}
|
|
138
|
+
export function clearBreadcrumbs() {
|
|
139
|
+
breadcrumbs.clear();
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=breadcrumbs.js.map
|