@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,319 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* F-PUSH — Web Push (VAPID) subscribe + device-token registration. LAZY: the facade dynamic-imports
|
|
3
|
+
* this module only when the host calls `ScaleBun.enablePush()` from a user gesture, so it stays out of
|
|
4
|
+
* the core bundle entirely (it is NOT in the FEATURES manifest).
|
|
5
|
+
*
|
|
6
|
+
* Flow: feature-detect → request Notification permission (host gesture) → register the host-served
|
|
7
|
+
* service worker (`/scalebun-push-sw.js`) → fetch the tenant VAPID public key (`/sdk/engage/push-config`)
|
|
8
|
+
* → `pushManager.subscribe({ userVisibleOnly, applicationServerKey })` → POST the browser
|
|
9
|
+
* PushSubscription JSON to `/sdk/engage/device-token` (platform:'web', pushProvider:'webpush').
|
|
10
|
+
*
|
|
11
|
+
* The differentiator vs OneSignal/Braze: the subscription is registered on the SAME device/session the
|
|
12
|
+
* recorder is capturing, so a push open is replay-correlated (E6 stamps the coord). Zero third-party:
|
|
13
|
+
* only ServiceWorker / PushManager / Notification / atob — degrades to a no-op (never throws) when the
|
|
14
|
+
* browser lacks support or the user denied permission.
|
|
15
|
+
*/
|
|
16
|
+
/** SW contract version this SDK build expects. Bump in lockstep with WZB_SW_VERSION in
|
|
17
|
+
* public/scalebun-push-sw.js — push.check() compares them to catch a stale hand-copied worker. */
|
|
18
|
+
export const EXPECTED_SW_VERSION = 5;
|
|
19
|
+
/** Default path the host serves the worker at. Shared by enable() and check() so a diagnostic can
|
|
20
|
+
* never disagree with what was actually registered. */
|
|
21
|
+
export const DEFAULT_SW_URL = '/scalebun-push-sw.js';
|
|
22
|
+
export { PUSH_STATE_COPY, resolvePushState } from './pushState.js';
|
|
23
|
+
import { resolvePushState } from './pushState.js';
|
|
24
|
+
/** Feature-detect the three APIs Web Push needs. Any missing ⇒ we no-op. */
|
|
25
|
+
function isSupported() {
|
|
26
|
+
return (typeof navigator !== 'undefined' &&
|
|
27
|
+
'serviceWorker' in navigator &&
|
|
28
|
+
typeof window !== 'undefined' &&
|
|
29
|
+
'PushManager' in window &&
|
|
30
|
+
'Notification' in window);
|
|
31
|
+
}
|
|
32
|
+
/** VAPID keys travel as base64url; PushManager wants a BufferSource. Dependency-free (atob only).
|
|
33
|
+
* Backed by an explicit ArrayBuffer so the result is a `Uint8Array<ArrayBuffer>` (assignable to
|
|
34
|
+
* applicationServerKey under lib.dom's generic-typed-array typings). */
|
|
35
|
+
function urlBase64ToUint8Array(base64) {
|
|
36
|
+
const padding = '='.repeat((4 - (base64.length % 4)) % 4);
|
|
37
|
+
const normalized = (base64 + padding).replace(/-/g, '+').replace(/_/g, '/');
|
|
38
|
+
const raw = atob(normalized);
|
|
39
|
+
const buffer = new ArrayBuffer(raw.length);
|
|
40
|
+
const out = new Uint8Array(buffer);
|
|
41
|
+
for (let i = 0; i < raw.length; i++)
|
|
42
|
+
out[i] = raw.charCodeAt(i);
|
|
43
|
+
return out;
|
|
44
|
+
}
|
|
45
|
+
export class PushFeature {
|
|
46
|
+
constructor(deps) {
|
|
47
|
+
this.reg = null;
|
|
48
|
+
this.lastEndpoint = null;
|
|
49
|
+
/** Remembers where enable() actually registered the worker, so check() diagnoses THAT path. */
|
|
50
|
+
this.swUrl = DEFAULT_SW_URL;
|
|
51
|
+
this.openedCbs = new Set();
|
|
52
|
+
this.swMessageBound = false;
|
|
53
|
+
this.deps = deps;
|
|
54
|
+
}
|
|
55
|
+
log(...args) {
|
|
56
|
+
this.deps.log?.('[scalebun:push]', ...args);
|
|
57
|
+
}
|
|
58
|
+
/** Current permission without prompting. */
|
|
59
|
+
permission() {
|
|
60
|
+
if (typeof Notification === 'undefined')
|
|
61
|
+
return 'default';
|
|
62
|
+
return Notification.permission;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Subscribe this browser to Web Push and register the subscription with the backend. MUST be called
|
|
66
|
+
* from a user gesture (browsers gate `Notification.requestPermission()`). Idempotent: a repeat call
|
|
67
|
+
* reuses the existing subscription and re-registers it (cheap upsert). Never throws.
|
|
68
|
+
*/
|
|
69
|
+
async enable(opts = {}) {
|
|
70
|
+
try {
|
|
71
|
+
if (!isSupported()) {
|
|
72
|
+
this.log('unsupported browser — skipping');
|
|
73
|
+
return 'unsupported';
|
|
74
|
+
}
|
|
75
|
+
if (!this.deps.clientKey || !this.deps.apiBaseUrl)
|
|
76
|
+
return 'error';
|
|
77
|
+
// Don't prompt if already denied — a second prompt is impossible and reads as spam.
|
|
78
|
+
if (this.permission() === 'denied')
|
|
79
|
+
return 'denied';
|
|
80
|
+
// 1. VAPID key first — no point prompting if the tenant hasn't set Web Push up.
|
|
81
|
+
const cfg = await this.fetchPushConfig();
|
|
82
|
+
if (!cfg || cfg.enabled === false || !cfg.vapidPublicKey) {
|
|
83
|
+
this.log('web push not configured for this app');
|
|
84
|
+
return 'not-configured';
|
|
85
|
+
}
|
|
86
|
+
// 2. Permission (host gesture drives this).
|
|
87
|
+
const permission = await Notification.requestPermission();
|
|
88
|
+
if (permission !== 'granted')
|
|
89
|
+
return permission === 'denied' ? 'denied' : 'error';
|
|
90
|
+
// 3. Register the host-served service worker.
|
|
91
|
+
const swUrl = opts.serviceWorkerUrl || DEFAULT_SW_URL;
|
|
92
|
+
this.swUrl = swUrl;
|
|
93
|
+
this.reg = await navigator.serviceWorker.register(swUrl, opts.serviceWorkerScope ? { scope: opts.serviceWorkerScope } : undefined);
|
|
94
|
+
await navigator.serviceWorker.ready;
|
|
95
|
+
this.bindSwMessages();
|
|
96
|
+
// 4. Subscribe (reuse an existing subscription if present).
|
|
97
|
+
const existing = await this.reg.pushManager.getSubscription();
|
|
98
|
+
const sub = existing ||
|
|
99
|
+
(await this.reg.pushManager.subscribe({
|
|
100
|
+
userVisibleOnly: true,
|
|
101
|
+
applicationServerKey: urlBase64ToUint8Array(cfg.vapidPublicKey),
|
|
102
|
+
}));
|
|
103
|
+
// 5. Register the subscription with the backend (idempotent device upsert).
|
|
104
|
+
const ok = await this.registerDeviceToken(sub);
|
|
105
|
+
this.lastEndpoint = sub.endpoint;
|
|
106
|
+
return ok ? 'subscribed' : 'error';
|
|
107
|
+
}
|
|
108
|
+
catch (err) {
|
|
109
|
+
this.log('enable failed', err);
|
|
110
|
+
return 'error';
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* P2 — opt out of Web Push. Unsubscribes this browser AND tells the backend to revoke the token, so
|
|
115
|
+
* the device stops being addressable immediately instead of lingering until a send eats a 410.
|
|
116
|
+
*
|
|
117
|
+
* Order matters: unsubscribe LOCALLY first (the part that must not fail), then revoke server-side.
|
|
118
|
+
* The revoke is best-effort — if it fails we simply fall back to the old 410-cleanup behaviour, so
|
|
119
|
+
* this is belt-and-braces rather than a correctness dependency. The return value reflects the local
|
|
120
|
+
* unsubscribe; a network failure must not tell the host their opt-out didn't work, because locally
|
|
121
|
+
* it did.
|
|
122
|
+
*/
|
|
123
|
+
async disable(opts = {}) {
|
|
124
|
+
try {
|
|
125
|
+
const reg = this.reg || (isSupported() ? await navigator.serviceWorker.getRegistration() : null);
|
|
126
|
+
const sub = reg ? await reg.pushManager.getSubscription() : null;
|
|
127
|
+
// Capture the endpoint BEFORE unsubscribing — the backend needs it as ownership proof, and it is
|
|
128
|
+
// unreadable once the subscription is gone.
|
|
129
|
+
const endpoint = sub?.endpoint ?? this.lastEndpoint ?? null;
|
|
130
|
+
const done = sub ? await sub.unsubscribe() : true;
|
|
131
|
+
this.lastEndpoint = null;
|
|
132
|
+
if (opts.revokeServerSide !== false)
|
|
133
|
+
await this.revokeDeviceToken(endpoint);
|
|
134
|
+
return done;
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
/** Tell the backend this device opted out. Best-effort; never throws. */
|
|
141
|
+
async revokeDeviceToken(endpoint) {
|
|
142
|
+
if (!this.deps.clientKey || !this.deps.apiBaseUrl)
|
|
143
|
+
return false;
|
|
144
|
+
try {
|
|
145
|
+
const res = await fetch(`${this.deps.apiBaseUrl}/sdk/engage/device-token/revoke`, {
|
|
146
|
+
method: 'POST',
|
|
147
|
+
headers: this.headers(),
|
|
148
|
+
// The host may be navigating away when they hit "unsubscribe" — keepalive lets it land anyway.
|
|
149
|
+
keepalive: true,
|
|
150
|
+
body: JSON.stringify({
|
|
151
|
+
deviceId: this.deps.deviceId,
|
|
152
|
+
...(endpoint ? { endpoint } : {}),
|
|
153
|
+
}),
|
|
154
|
+
});
|
|
155
|
+
return res.ok;
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
/** Subscribe to notification-open events (the SW postMessages the page on click). Returns an unsub. */
|
|
162
|
+
onNotificationOpened(cb) {
|
|
163
|
+
this.openedCbs.add(cb);
|
|
164
|
+
this.bindSwMessages();
|
|
165
|
+
return () => this.openedCbs.delete(cb);
|
|
166
|
+
}
|
|
167
|
+
/** The current subscription (or null). */
|
|
168
|
+
async getSubscription() {
|
|
169
|
+
try {
|
|
170
|
+
const reg = this.reg || (isSupported() ? await navigator.serviceWorker.getRegistration() : null);
|
|
171
|
+
const sub = reg ? await reg.pushManager.getSubscription() : null;
|
|
172
|
+
return sub ? sub.toJSON() : null;
|
|
173
|
+
}
|
|
174
|
+
catch {
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* P1 — full self-diagnosis: HTTPS, API support, worker reachable/registered/current, VAPID set up,
|
|
180
|
+
* permission, subscription validity (incl. VAPID-rotation detection), and what the SERVER thinks of
|
|
181
|
+
* this device. Returns a structured, self-describing report — never prompts, never throws.
|
|
182
|
+
*
|
|
183
|
+
* The diagnostics module is a SEPARATE dynamic chunk, so hosts that use push but never call check()
|
|
184
|
+
* do not download it.
|
|
185
|
+
*/
|
|
186
|
+
async check(opts = {}) {
|
|
187
|
+
const { runPushDiagnostics } = await import('./diagnostics.js');
|
|
188
|
+
return runPushDiagnostics({
|
|
189
|
+
apiBaseUrl: this.deps.apiBaseUrl,
|
|
190
|
+
clientKey: this.deps.clientKey,
|
|
191
|
+
deviceId: this.deps.deviceId,
|
|
192
|
+
serviceWorkerUrl: opts.serviceWorkerUrl || this.swUrl,
|
|
193
|
+
expectedSwVersion: EXPECTED_SW_VERSION,
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
everSubscribed() {
|
|
197
|
+
try {
|
|
198
|
+
return localStorage.getItem(PushFeature.EVER_KEY) === '1';
|
|
199
|
+
}
|
|
200
|
+
catch {
|
|
201
|
+
// Private mode / blocked storage — degrade, never throw out of a status read.
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
markEverSubscribed() {
|
|
206
|
+
try {
|
|
207
|
+
localStorage.setItem(PushFeature.EVER_KEY, '1');
|
|
208
|
+
}
|
|
209
|
+
catch {
|
|
210
|
+
/* storage is a nicety here, not a requirement */
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
/** A synchronous-ish snapshot for a Dev Panel / debugging. */
|
|
214
|
+
async status() {
|
|
215
|
+
const supported = isSupported();
|
|
216
|
+
const sub = supported ? await this.getSubscription() : null;
|
|
217
|
+
if (sub)
|
|
218
|
+
this.markEverSubscribed();
|
|
219
|
+
return {
|
|
220
|
+
supported,
|
|
221
|
+
permission: this.permission(),
|
|
222
|
+
subscribed: !!sub,
|
|
223
|
+
endpoint: sub?.endpoint ?? this.lastEndpoint ?? null,
|
|
224
|
+
// The actionable state. `permission` above is the raw browser value and keeps its old meaning;
|
|
225
|
+
// this is the one a product should branch on, because it separates the three situations
|
|
226
|
+
// `denied`/`granted` conflate. See `pushState.ts`.
|
|
227
|
+
state: resolvePushState({
|
|
228
|
+
supported,
|
|
229
|
+
permission: this.permission(),
|
|
230
|
+
hasSubscription: !!sub,
|
|
231
|
+
everSubscribed: this.everSubscribed(),
|
|
232
|
+
}),
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
// ── SW message bridge (click reports + subscription rotation) ──────────────────────────────────
|
|
236
|
+
bindSwMessages() {
|
|
237
|
+
if (this.swMessageBound || typeof navigator === 'undefined' || !('serviceWorker' in navigator))
|
|
238
|
+
return;
|
|
239
|
+
this.swMessageBound = true;
|
|
240
|
+
navigator.serviceWorker.addEventListener('message', (event) => {
|
|
241
|
+
const msg = event.data;
|
|
242
|
+
if (!msg || typeof msg.type !== 'string')
|
|
243
|
+
return;
|
|
244
|
+
if (msg.type === 'scalebun-push-click') {
|
|
245
|
+
const data = msg.data ?? {};
|
|
246
|
+
for (const cb of this.openedCbs) {
|
|
247
|
+
try {
|
|
248
|
+
cb({ data, action: msg.action ?? null });
|
|
249
|
+
}
|
|
250
|
+
catch {
|
|
251
|
+
/* never let a host callback break the bridge */
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
else if (msg.type === 'scalebun-push-resubscribe' && msg.subscription) {
|
|
256
|
+
// The browser rotated the subscription — re-register the new one with the backend.
|
|
257
|
+
void this.registerDeviceTokenJson(msg.subscription).then((ok) => {
|
|
258
|
+
if (ok && msg.subscription?.endpoint)
|
|
259
|
+
this.lastEndpoint = msg.subscription.endpoint;
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
// ── Backend lanes (self-contained; no core-transport coupling so core stays untouched) ──────────
|
|
265
|
+
headers() {
|
|
266
|
+
return { 'content-type': 'application/json', 'x-scalebun-client-key': this.deps.clientKey };
|
|
267
|
+
}
|
|
268
|
+
async fetchPushConfig() {
|
|
269
|
+
try {
|
|
270
|
+
const res = await fetch(`${this.deps.apiBaseUrl}/sdk/engage/push-config`, {
|
|
271
|
+
headers: this.headers(),
|
|
272
|
+
cache: 'no-store',
|
|
273
|
+
});
|
|
274
|
+
if (!res.ok)
|
|
275
|
+
return null;
|
|
276
|
+
return (await res.json());
|
|
277
|
+
}
|
|
278
|
+
catch {
|
|
279
|
+
return null;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
registerDeviceToken(sub) {
|
|
283
|
+
return this.registerDeviceTokenJson(sub.toJSON());
|
|
284
|
+
}
|
|
285
|
+
async registerDeviceTokenJson(sub) {
|
|
286
|
+
if (!sub || !sub.endpoint)
|
|
287
|
+
return false;
|
|
288
|
+
try {
|
|
289
|
+
const res = await fetch(`${this.deps.apiBaseUrl}/sdk/engage/device-token`, {
|
|
290
|
+
method: 'POST',
|
|
291
|
+
headers: this.headers(),
|
|
292
|
+
keepalive: true,
|
|
293
|
+
body: JSON.stringify({
|
|
294
|
+
schemaVersion: 1,
|
|
295
|
+
deviceId: this.deps.deviceId,
|
|
296
|
+
platform: 'web',
|
|
297
|
+
pushProvider: 'webpush',
|
|
298
|
+
pushToken: JSON.stringify(sub),
|
|
299
|
+
tokenStatus: 'active',
|
|
300
|
+
...(this.deps.sdkVersion ? { sdkVersion: this.deps.sdkVersion } : {}),
|
|
301
|
+
}),
|
|
302
|
+
});
|
|
303
|
+
return res.ok;
|
|
304
|
+
}
|
|
305
|
+
catch {
|
|
306
|
+
return false;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Has this browser EVER held a subscription?
|
|
312
|
+
*
|
|
313
|
+
* The one extra fact that makes `revoked` separable from `blocked`, and `expired` from
|
|
314
|
+
* `never-granted` — `Notification.permission` cannot tell those pairs apart on its own. Stored
|
|
315
|
+
* under the SDK's own key; a cleared storage degrades to "never", which is the safe direction (an
|
|
316
|
+
* opt-out reads as a first refusal rather than the reverse).
|
|
317
|
+
*/
|
|
318
|
+
PushFeature.EVER_KEY = 'scalebun.push.everSubscribed';
|
|
319
|
+
//# sourceMappingURL=PushFeature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PushFeature.js","sourceRoot":"","sources":["../../../src/features/push/PushFeature.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH;mGACmG;AACnG,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAErC;wDACwD;AACxD,MAAM,CAAC,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAGrD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAuC,MAAM,aAAa,CAAC;AAyCpF,4EAA4E;AAC5E,SAAS,WAAW;IAClB,OAAO,CACL,OAAO,SAAS,KAAK,WAAW;QAChC,eAAe,IAAI,SAAS;QAC5B,OAAO,MAAM,KAAK,WAAW;QAC7B,aAAa,IAAI,MAAM;QACvB,cAAc,IAAI,MAAM,CACzB,CAAC;AACJ,CAAC;AAED;;yEAEyE;AACzE,SAAS,qBAAqB,CAAC,MAAc;IAC3C,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,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uB,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IACpD,CAAC;IAEO,KAAK,CAAC,uBAAuB,CAAC,GAAyB;QAC7D,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC;QACxC,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,0BAA0B,EAAE;gBACzE,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;gBACvB,SAAS,EAAE,IAAI;gBACf,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,aAAa,EAAE,CAAC;oBAChB,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ;oBAC5B,QAAQ,EAAE,KAAK;oBACf,YAAY,EAAE,SAAS;oBACvB,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;oBAC9B,WAAW,EAAE,QAAQ;oBACrB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBACtE,CAAC;aACH,CAAC,CAAC;YACH,OAAO,GAAG,CAAC,EAAE,CAAC;QAChB,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;;AAvHD;;;;;;;GAOG;AACqB,oBAAQ,GAAG,8BAA8B,AAAjC,CAAkC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* P1 — Web Push self-diagnosis. `ScaleBun.push.check()` answers "why isn't push working?" without the
|
|
3
|
+
* customer opening a support ticket.
|
|
4
|
+
*
|
|
5
|
+
* Loaded as its own dynamic chunk from PushFeature.check(), so even hosts that DO use push pay nothing
|
|
6
|
+
* for diagnostics unless they ask for them. Core bundle untouched.
|
|
7
|
+
*
|
|
8
|
+
* Three rules this module must never break:
|
|
9
|
+
* 1. **It never prompts.** A diagnostic that calls Notification.requestPermission() is a bug — it
|
|
10
|
+
* burns the one prompt the host gets, from a non-gesture context, and can permanently deny.
|
|
11
|
+
* 2. **It never throws.** Every check is independently guarded; an indeterminate check reports
|
|
12
|
+
* `unknown`, which is information, not failure.
|
|
13
|
+
* 3. **The result is self-describing.** Each check carries its own label + fix copy so a dashboard
|
|
14
|
+
* can render the report generically, with no second copy of the vocabulary to drift.
|
|
15
|
+
*
|
|
16
|
+
* Checks are ordered by CAUSALITY: the first failure is the root cause, and everything downstream of
|
|
17
|
+
* it reports `unknown` rather than piling on derived failures. The list length is stable so a UI can
|
|
18
|
+
* render fixed rows.
|
|
19
|
+
*/
|
|
20
|
+
export type PushCheckId = 'secure_context' | 'api_support' | 'sw_reachable' | 'sw_registered' | 'sw_version' | 'vapid_configured' | 'permission' | 'subscription_valid' | 'device_registered' | 'identified';
|
|
21
|
+
export type PushCheckStatus = 'pass' | 'fail' | 'warn' | 'unknown';
|
|
22
|
+
export interface PushCheck {
|
|
23
|
+
id: PushCheckId;
|
|
24
|
+
status: PushCheckStatus;
|
|
25
|
+
/** Short human label — safe to render as-is. */
|
|
26
|
+
label: string;
|
|
27
|
+
/** What was actually observed. */
|
|
28
|
+
detail?: string;
|
|
29
|
+
/** What the developer should DO about it. Present on fail/warn. */
|
|
30
|
+
fix?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface PushDiagnostics {
|
|
33
|
+
/** True when nothing is failing (warnings are allowed — they do not stop delivery). */
|
|
34
|
+
ok: boolean;
|
|
35
|
+
/** The first failing check — the root cause to show the developer. */
|
|
36
|
+
blocking: PushCheckId | null;
|
|
37
|
+
checks: PushCheck[];
|
|
38
|
+
}
|
|
39
|
+
export interface DiagnosticsDeps {
|
|
40
|
+
apiBaseUrl: string;
|
|
41
|
+
clientKey: string;
|
|
42
|
+
deviceId: string;
|
|
43
|
+
/** Where the host serves the worker. Must match what enablePush() registered. */
|
|
44
|
+
serviceWorkerUrl: string;
|
|
45
|
+
/** The SW version this SDK build expects; a lower reported version means a stale copied file. */
|
|
46
|
+
expectedSwVersion: number;
|
|
47
|
+
}
|
|
48
|
+
export declare function runPushDiagnostics(deps: DiagnosticsDeps): Promise<PushDiagnostics>;
|
|
49
|
+
/**
|
|
50
|
+
* The report for "push.check() was called before ScaleBun.init()". Lives HERE rather than inline in
|
|
51
|
+
* the facade so its strings stay in this lazy chunk — the facade is eager core, and core is under a
|
|
52
|
+
* hard size gate.
|
|
53
|
+
*/
|
|
54
|
+
export declare function notInitializedReport(): PushDiagnostics;
|
|
55
|
+
//# sourceMappingURL=diagnostics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../src/features/push/diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,MAAM,WAAW,GACnB,gBAAgB,GAChB,aAAa,GACb,cAAc,GACd,eAAe,GACf,YAAY,GACZ,kBAAkB,GAClB,YAAY,GACZ,oBAAoB,GACpB,mBAAmB,GACnB,YAAY,CAAC;AAEjB,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAEnE,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,WAAW,CAAC;IAChB,MAAM,EAAE,eAAe,CAAC;IACxB,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,uFAAuF;IACvF,EAAE,EAAE,OAAO,CAAC;IACZ,sEAAsE;IACtE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,iFAAiF;IACjF,gBAAgB,EAAE,MAAM,CAAC;IACzB,iGAAiG;IACjG,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAgED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAqRxF;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,eAAe,CActD"}
|