@scalebun/web 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +59 -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 +248 -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 +81 -0
- package/dist/browser.js.map +1 -0
- package/dist/config/schema.d.ts +108 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +95 -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 +15 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +15 -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 +73 -0
- package/dist/core/pageContext.js.map +1 -0
- package/dist/core/prune.d.ts +7 -0
- package/dist/core/prune.d.ts.map +1 -0
- package/dist/core/prune.js +31 -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 +50 -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/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 +122 -0
- package/dist/features/analytics/AnalyticsFeature.d.ts.map +1 -0
- package/dist/features/analytics/AnalyticsFeature.js +757 -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 +398 -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 +38 -0
- package/dist/features/analytics/revenue.d.ts.map +1 -0
- package/dist/features/analytics/revenue.js +26 -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 +25 -0
- package/dist/features/analytics/subscription.d.ts.map +1 -0
- package/dist/features/analytics/subscription.js +51 -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 +36 -0
- package/dist/features/bugreport/BugReportFeature.d.ts.map +1 -0
- package/dist/features/bugreport/BugReportFeature.js +55 -0
- package/dist/features/bugreport/BugReportFeature.js.map +1 -0
- package/dist/features/bugreport/collect.d.ts +21 -0
- package/dist/features/bugreport/collect.d.ts.map +1 -0
- package/dist/features/bugreport/collect.js +27 -0
- package/dist/features/bugreport/collect.js.map +1 -0
- package/dist/features/bugreport/widget.d.ts +21 -0
- package/dist/features/bugreport/widget.d.ts.map +1 -0
- package/dist/features/bugreport/widget.js +111 -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 +183 -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 +61 -0
- package/dist/features/engage/EngageFeature.d.ts.map +1 -0
- package/dist/features/engage/EngageFeature.js +221 -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 +203 -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 +78 -0
- package/dist/features/engage/runtime.d.ts.map +1 -0
- package/dist/features/engage/runtime.js +349 -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 +31 -0
- package/dist/features/engage/throttle.d.ts.map +1 -0
- package/dist/features/engage/throttle.js +130 -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 +265 -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 +136 -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 +546 -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 +43 -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 +127 -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 +198 -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 +194 -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 +70 -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 +239 -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 +58 -0
- package/dist/features/inapp/core/targeting.d.ts.map +1 -0
- package/dist/features/inapp/core/targeting.js +181 -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 +219 -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 +92 -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 +88 -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 +72 -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 +66 -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 +52 -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 +186 -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 +62 -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 +199 -0
- package/dist/features/inapp/surfaces/tour.js.map +1 -0
- package/dist/features/inapp/types.d.ts +163 -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 +608 -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 +34 -0
- package/dist/features/journey/InteractionTracker.d.ts.map +1 -0
- package/dist/features/journey/InteractionTracker.js +125 -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 +57 -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 +29 -0
- package/dist/features/journey/friction.d.ts.map +1 -0
- package/dist/features/journey/friction.js +65 -0
- package/dist/features/journey/friction.js.map +1 -0
- package/dist/features/manifest.d.ts +20 -0
- package/dist/features/manifest.d.ts.map +1 -0
- package/dist/features/manifest.js +76 -0
- package/dist/features/manifest.js.map +1 -0
- package/dist/features/network/NetworkFeature.d.ts +56 -0
- package/dist/features/network/NetworkFeature.d.ts.map +1 -0
- package/dist/features/network/NetworkFeature.js +235 -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/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 +141 -0
- package/dist/features/push/softAsk.js.map +1 -0
- package/dist/features/replay/ReplayFeature.d.ts +32 -0
- package/dist/features/replay/ReplayFeature.d.ts.map +1 -0
- package/dist/features/replay/ReplayFeature.js +132 -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 +142 -0
- package/dist/features/replay/engine/interactions.d.ts.map +1 -0
- package/dist/features/replay/engine/interactions.js +371 -0
- package/dist/features/replay/engine/interactions.js.map +1 -0
- package/dist/features/replay/engine/mutations.d.ts +49 -0
- package/dist/features/replay/engine/mutations.d.ts.map +1 -0
- package/dist/features/replay/engine/mutations.js +261 -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 +409 -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 +137 -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 +20 -0
- package/dist/features/replay/lifecycle/cadence.d.ts.map +1 -0
- package/dist/features/replay/lifecycle/cadence.js +62 -0
- package/dist/features/replay/lifecycle/cadence.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/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 +129 -0
- package/dist/features/replay/lifecycle/recorder.d.ts.map +1 -0
- package/dist/features/replay/lifecycle/recorder.js +509 -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 +31 -0
- package/dist/features/scroll/index.d.ts.map +1 -0
- package/dist/features/scroll/index.js +102 -0
- package/dist/features/scroll/index.js.map +1 -0
- package/dist/features/session/sessionManager.d.ts +25 -0
- package/dist/features/session/sessionManager.d.ts.map +1 -0
- package/dist/features/session/sessionManager.js +36 -0
- package/dist/features/session/sessionManager.js.map +1 -0
- package/dist/features/session/sessionStore.d.ts +106 -0
- package/dist/features/session/sessionStore.d.ts.map +1 -0
- package/dist/features/session/sessionStore.js +265 -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 +31 -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 +84 -0
- package/dist/pipeline/pipeline.d.ts.map +1 -0
- package/dist/pipeline/pipeline.js +284 -0
- package/dist/pipeline/pipeline.js.map +1 -0
- package/dist/public/ScaleBunFacade.d.ts +382 -0
- package/dist/public/ScaleBunFacade.d.ts.map +1 -0
- package/dist/public/ScaleBunFacade.js +787 -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 +635 -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 +60 -0
- package/dist/transport/httpClient.d.ts.map +1 -0
- package/dist/transport/httpClient.js +154 -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 +60 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { showUnavailable, clearUnavailable } from './unavailable';
|
|
2
|
+
const COLORS = ['#6C5CE7', '#8b7bff', '#5b4bd6', '#a99cff', '#4c3fb0', '#7c6ef0'];
|
|
3
|
+
const labelOf = (x) => (typeof x === 'string' ? x : String(x?.label ?? ''));
|
|
4
|
+
function polar(cx, cy, r, deg) {
|
|
5
|
+
const a = ((deg - 90) * Math.PI) / 180;
|
|
6
|
+
return { x: cx + r * Math.cos(a), y: cy + r * Math.sin(a) };
|
|
7
|
+
}
|
|
8
|
+
function slicePath(cx, cy, r, a0, a1) {
|
|
9
|
+
const s = polar(cx, cy, r, a1);
|
|
10
|
+
const e = polar(cx, cy, r, a0);
|
|
11
|
+
const large = a1 - a0 <= 180 ? 0 : 1;
|
|
12
|
+
return `M ${cx} ${cy} L ${s.x} ${s.y} A ${r} ${r} 0 ${large} 0 ${e.x} ${e.y} Z`;
|
|
13
|
+
}
|
|
14
|
+
function reducedMotion() {
|
|
15
|
+
try {
|
|
16
|
+
return typeof matchMedia !== 'undefined' && matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const SVGNS = 'http://www.w3.org/2000/svg';
|
|
23
|
+
export const spinwheelRenderer = (block, ctx) => {
|
|
24
|
+
const segs = (Array.isArray(block.props?.segments) ? block.props.segments : []).map(labelOf).filter(Boolean);
|
|
25
|
+
const segments = segs.length ? segs : ['10% off', 'Free ship', 'Try again', '20% off', '$5 credit', 'Jackpot'];
|
|
26
|
+
const n = segments.length;
|
|
27
|
+
const result = Math.max(0, Math.min(n - 1, Number(block.props?.resultIndex) || 0));
|
|
28
|
+
const root = ctx.doc.createElement('div');
|
|
29
|
+
root.className = 'scalebun-wheel';
|
|
30
|
+
const size = 220;
|
|
31
|
+
const cx = size / 2;
|
|
32
|
+
const r = size / 2 - 4;
|
|
33
|
+
const step = 360 / n;
|
|
34
|
+
const svg = ctx.doc.createElementNS(SVGNS, 'svg');
|
|
35
|
+
svg.setAttribute('viewBox', `0 0 ${size} ${size}`);
|
|
36
|
+
svg.setAttribute('width', String(size));
|
|
37
|
+
svg.setAttribute('height', String(size));
|
|
38
|
+
svg.setAttribute('class', 'scalebun-wheel-svg');
|
|
39
|
+
segments.forEach((label, i) => {
|
|
40
|
+
const path = ctx.doc.createElementNS(SVGNS, 'path');
|
|
41
|
+
path.setAttribute('d', slicePath(cx, cx, r, i * step, (i + 1) * step));
|
|
42
|
+
path.setAttribute('fill', COLORS[i % COLORS.length]);
|
|
43
|
+
svg.appendChild(path);
|
|
44
|
+
const mid = polar(cx, cx, r * 0.62, i * step + step / 2);
|
|
45
|
+
const text = ctx.doc.createElementNS(SVGNS, 'text');
|
|
46
|
+
text.setAttribute('x', String(mid.x));
|
|
47
|
+
text.setAttribute('y', String(mid.y));
|
|
48
|
+
text.setAttribute('fill', '#fff');
|
|
49
|
+
text.setAttribute('font-size', '10');
|
|
50
|
+
text.setAttribute('text-anchor', 'middle');
|
|
51
|
+
text.setAttribute('transform', `rotate(${i * step + step / 2} ${mid.x} ${mid.y})`);
|
|
52
|
+
text.textContent = label.slice(0, 12);
|
|
53
|
+
svg.appendChild(text);
|
|
54
|
+
});
|
|
55
|
+
const pointer = ctx.doc.createElement('div');
|
|
56
|
+
pointer.className = 'scalebun-wheel-pointer';
|
|
57
|
+
const spinBtn = ctx.doc.createElement('button');
|
|
58
|
+
spinBtn.type = 'button';
|
|
59
|
+
spinBtn.className = 'scalebun-wheel-spin';
|
|
60
|
+
spinBtn.textContent = 'SPIN';
|
|
61
|
+
let spun = false;
|
|
62
|
+
const landAngle = (i) => 360 * 5 - (i * step + step / 2); // bring segment centre to the top pointer
|
|
63
|
+
/** Animate to a decided segment. Never called before the outcome is known. */
|
|
64
|
+
const landOn = (i, label) => {
|
|
65
|
+
const text = (label ?? segments[i] ?? '').slice(0, 14);
|
|
66
|
+
if (reducedMotion()) {
|
|
67
|
+
svg.style.transform = `rotate(${-(i * step + step / 2)}deg)`;
|
|
68
|
+
spinBtn.textContent = text;
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
svg.style.transition = 'transform 3.4s cubic-bezier(.17,.67,.16,.99)';
|
|
72
|
+
svg.style.transform = `rotate(${landAngle(i)}deg)`;
|
|
73
|
+
const done = () => { spinBtn.textContent = text; };
|
|
74
|
+
svg.addEventListener('transitionend', done, { once: true });
|
|
75
|
+
setTimeout(done, 3600); // fallback if transitionend doesn't fire
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* SERVER-RESOLVED spin. `ctx.requestOutcome` is present only for the eight gamified variants, and
|
|
79
|
+
* it is asked HERE — on the click — rather than at render, so an impression nobody played never
|
|
80
|
+
* spends an attempt or hits the customer's backend.
|
|
81
|
+
*
|
|
82
|
+
* The wheel starts turning immediately and the answer lands it. Waiting for the network before any
|
|
83
|
+
* motion reads as a dead button on a slow connection; the spin is presentation, and the segment it
|
|
84
|
+
* stops on is the only part that has to be authoritative.
|
|
85
|
+
*/
|
|
86
|
+
const spinResolved = (attempt) => {
|
|
87
|
+
spun = true;
|
|
88
|
+
spinBtn.disabled = true;
|
|
89
|
+
clearUnavailable(root);
|
|
90
|
+
if (!reducedMotion()) {
|
|
91
|
+
svg.style.transition = 'transform 1.1s linear';
|
|
92
|
+
svg.style.transform = 'rotate(400deg)';
|
|
93
|
+
}
|
|
94
|
+
void ctx.requestOutcome(attempt).then((outcome) => {
|
|
95
|
+
if (!outcome.ok) {
|
|
96
|
+
// The button stays a button; the explanation is its own element. A retry is a NEW attempt,
|
|
97
|
+
// so the host sees a fresh attempt number and its idempotency key changes with it.
|
|
98
|
+
svg.style.transition = '';
|
|
99
|
+
svg.style.transform = '';
|
|
100
|
+
spun = false;
|
|
101
|
+
spinBtn.disabled = false;
|
|
102
|
+
showUnavailable(root, ctx.doc, outcome, { onRetry: () => spinResolved(attempt + 1) });
|
|
103
|
+
ctx.onInteraction?.('spin_unavailable');
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const landed = Math.max(0, Math.min(n - 1, Number(outcome.index ?? 0)));
|
|
107
|
+
ctx.onInteraction?.(`spin:${landed}`);
|
|
108
|
+
landOn(landed, outcome.label);
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
spinBtn.addEventListener('click', () => {
|
|
112
|
+
if (spun)
|
|
113
|
+
return;
|
|
114
|
+
if (ctx.requestOutcome) {
|
|
115
|
+
spinResolved(1);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
// No resolver (a non-game use of this block): the authored `resultIndex` stands. Still never
|
|
119
|
+
// random — the client does not choose a prize under any path.
|
|
120
|
+
spun = true;
|
|
121
|
+
ctx.onInteraction?.(`spin:${result}`);
|
|
122
|
+
landOn(result);
|
|
123
|
+
});
|
|
124
|
+
root.append(pointer, svg, spinBtn);
|
|
125
|
+
return root;
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=spinwheel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinwheel.js","sourceRoot":"","sources":["../../../../../src/features/inapp/blocks/heavy/spinwheel.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAElE,MAAM,MAAM,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAClF,MAAM,OAAO,GAAG,CAAC,CAAU,EAAU,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAE,CAAwB,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC;AAErH,SAAS,KAAK,CAAC,EAAU,EAAE,EAAU,EAAE,CAAS,EAAE,GAAW;IAC3D,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;IACvC,OAAO,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9D,CAAC;AACD,SAAS,SAAS,CAAC,EAAU,EAAE,EAAU,EAAE,CAAS,EAAE,EAAU,EAAE,EAAU;IAC1E,MAAM,CAAC,GAAG,KAAK,C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IACL,CAAC,CAAC;IAEF,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;QACrC,IAAI,IAAI;YAAE,OAAO;QACjB,IAAI,GAAG,CAAC,cAAc,EAAE,CAAC;YAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YAAC,OAAO;QAAC,CAAC;QACpD,6FAA6F;QAC7F,8DAA8D;QAC9D,IAAI,GAAG,IAAI,CAAC;QACZ,GAAG,CAAC,aAAa,EAAE,CAAC,QAAQ,MAAM,EAAE,CAAC,CAAC;QACtC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mechanic block: multi-step wizard (`multiStepSheet`).
|
|
3
|
+
*
|
|
4
|
+
* The registry is explicit that this is not its own container — "multiStepSheet keeps the
|
|
5
|
+
* bottom-sheet defaults (it IS a bottom sheet, just wizard-paged)" — so the paging lives here as
|
|
6
|
+
* content and the sheet stays `slideover[placement=bottom]`. That also keeps the block library the
|
|
7
|
+
* source of distinctness, which is the registry's stated design.
|
|
8
|
+
*
|
|
9
|
+
* Semantics mirror the RN reference (`engageMultiStepSheet.ts`, read-only): the same label
|
|
10
|
+
* precedence, the same clamped index, and the same rule that a terminal CTA which isn't `dismiss`
|
|
11
|
+
* is handed to the host rather than resolved locally.
|
|
12
|
+
*
|
|
13
|
+
* Zero-dependency; own lazy chunk. No client state is persisted — a wizard that resumed mid-flow
|
|
14
|
+
* after a dismiss would contradict the frequency/throttle contract that governs when it may show.
|
|
15
|
+
*/
|
|
16
|
+
import type { BlockRenderer } from '../blocks';
|
|
17
|
+
/** Labels, resolved with the RN precedence so one authored payload reads the same on both platforms. */
|
|
18
|
+
export declare function stepLabels(props: Record<string, unknown> | undefined): {
|
|
19
|
+
back: string;
|
|
20
|
+
skip: string;
|
|
21
|
+
next: string;
|
|
22
|
+
finish: string;
|
|
23
|
+
};
|
|
24
|
+
/** Clamp a step move. Mirrors `resolveMultiStepSheetIndex`. */
|
|
25
|
+
export declare function nextStepIndex(current: number, count: number, dir: 'next' | 'back'): number;
|
|
26
|
+
export declare const stepsRenderer: BlockRenderer;
|
|
27
|
+
//# sourceMappingURL=steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../../../../src/features/inapp/blocks/heavy/steps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAU/C,wGAAwG;AACxG,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG;IACtE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;CAC1D,CAQA;AAED,+DAA+D;AAC/D,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAG1F;AAeD,eAAO,MAAM,aAAa,EAAE,aAoG3B,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
const str = (v) => typeof v === 'string' && v.trim() ? v.trim() : undefined;
|
|
2
|
+
/** Labels, resolved with the RN precedence so one authored payload reads the same on both platforms. */
|
|
3
|
+
export function stepLabels(props) {
|
|
4
|
+
const p = props ?? {};
|
|
5
|
+
return {
|
|
6
|
+
back: str(p.backLabel) ?? 'Back',
|
|
7
|
+
skip: str(p.skipLabel) ?? str(p.secondaryLabel) ?? 'Skip',
|
|
8
|
+
next: str(p.nextLabel) ?? 'Next',
|
|
9
|
+
finish: str(p.finalLabel) ?? str(p.ctaLabel) ?? 'Finish',
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/** Clamp a step move. Mirrors `resolveMultiStepSheetIndex`. */
|
|
13
|
+
export function nextStepIndex(current, count, dir) {
|
|
14
|
+
if (count <= 0)
|
|
15
|
+
return 0;
|
|
16
|
+
return Math.max(0, Math.min(current + (dir === 'next' ? 1 : -1), count - 1));
|
|
17
|
+
}
|
|
18
|
+
function readSteps(props) {
|
|
19
|
+
const raw = props?.steps;
|
|
20
|
+
const rows = Array.isArray(raw) ? raw : [];
|
|
21
|
+
const steps = rows.map((r) => {
|
|
22
|
+
if (typeof r === 'string')
|
|
23
|
+
return { title: r };
|
|
24
|
+
const o = (r && typeof r === 'object' ? r : {});
|
|
25
|
+
return { title: str(o.title) ?? str(o.label), body: str(o.body) ?? str(o.text) };
|
|
26
|
+
});
|
|
27
|
+
// A wizard with no authored steps is a single-page sheet, not an empty one — never render a
|
|
28
|
+
// pager over nothing.
|
|
29
|
+
return steps.length ? steps : [{}];
|
|
30
|
+
}
|
|
31
|
+
export const stepsRenderer = (block, ctx) => {
|
|
32
|
+
const props = block.props;
|
|
33
|
+
const steps = readSteps(props);
|
|
34
|
+
const labels = stepLabels(props);
|
|
35
|
+
const doc = ctx.doc;
|
|
36
|
+
let index = 0;
|
|
37
|
+
const root = doc.createElement('div');
|
|
38
|
+
root.className = 'scalebun-steps';
|
|
39
|
+
// ── progress ──
|
|
40
|
+
const rail = doc.createElement('div');
|
|
41
|
+
rail.className = 'scalebun-steps-rail';
|
|
42
|
+
rail.setAttribute('role', 'progressbar');
|
|
43
|
+
rail.setAttribute('aria-valuemin', '1');
|
|
44
|
+
rail.setAttribute('aria-valuemax', String(steps.length));
|
|
45
|
+
const dots = steps.map(() => {
|
|
46
|
+
const d = doc.createElement('span');
|
|
47
|
+
d.className = 'scalebun-steps-dot';
|
|
48
|
+
rail.appendChild(d);
|
|
49
|
+
return d;
|
|
50
|
+
});
|
|
51
|
+
root.appendChild(rail);
|
|
52
|
+
// ── page ──
|
|
53
|
+
const page = doc.createElement('div');
|
|
54
|
+
page.className = 'scalebun-steps-page';
|
|
55
|
+
const h = doc.createElement('div');
|
|
56
|
+
h.className = 'scalebun-steps-title';
|
|
57
|
+
const b = doc.createElement('div');
|
|
58
|
+
b.className = 'scalebun-steps-body';
|
|
59
|
+
page.appendChild(h);
|
|
60
|
+
page.appendChild(b);
|
|
61
|
+
root.appendChild(page);
|
|
62
|
+
// ── nav ──
|
|
63
|
+
const nav = doc.createElement('div');
|
|
64
|
+
nav.className = 'scalebun-steps-nav';
|
|
65
|
+
const mk = (label, cls) => {
|
|
66
|
+
const el = doc.createElement('button');
|
|
67
|
+
el.type = 'button';
|
|
68
|
+
el.className = cls;
|
|
69
|
+
el.textContent = label;
|
|
70
|
+
nav.appendChild(el);
|
|
71
|
+
return el;
|
|
72
|
+
};
|
|
73
|
+
const back = mk(labels.back, 'scalebun-btn-ghost');
|
|
74
|
+
const skip = mk(labels.skip, 'scalebun-btn-ghost');
|
|
75
|
+
const fwd = mk(labels.next, 'scalebun-btn-primary');
|
|
76
|
+
root.appendChild(nav);
|
|
77
|
+
const paint = () => {
|
|
78
|
+
// `readSteps` guarantees at least one entry and `index` is clamped, so this is always present —
|
|
79
|
+
// defaulted rather than asserted so a future refactor degrades to an empty page, not a throw
|
|
80
|
+
// inside a render.
|
|
81
|
+
const s = steps[index] ?? {};
|
|
82
|
+
h.textContent = s.title ?? '';
|
|
83
|
+
h.style.display = s.title ? '' : 'none';
|
|
84
|
+
b.textContent = s.body ?? '';
|
|
85
|
+
b.style.display = s.body ? '' : 'none';
|
|
86
|
+
const last = index + 1 >= steps.length;
|
|
87
|
+
fwd.textContent = last ? labels.finish : labels.next;
|
|
88
|
+
// `hidden` rather than removal: the nav keeps its shape, so the primary button doesn't jump
|
|
89
|
+
// horizontally between steps.
|
|
90
|
+
back.hidden = index === 0;
|
|
91
|
+
skip.hidden = last;
|
|
92
|
+
rail.setAttribute('aria-valuenow', String(index + 1));
|
|
93
|
+
rail.setAttribute('aria-label', `Step ${index + 1} of ${steps.length}`);
|
|
94
|
+
dots.forEach((d, i) => {
|
|
95
|
+
d.setAttribute('data-state', i < index ? 'done' : i === index ? 'current' : 'todo');
|
|
96
|
+
// aria-current names the step for a screen reader; the dots are otherwise decorative.
|
|
97
|
+
if (i === index)
|
|
98
|
+
d.setAttribute('aria-current', 'step');
|
|
99
|
+
else
|
|
100
|
+
d.removeAttribute('aria-current');
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
const go = (dir) => {
|
|
104
|
+
const moved = nextStepIndex(index, steps.length, dir);
|
|
105
|
+
if (moved === index)
|
|
106
|
+
return;
|
|
107
|
+
index = moved;
|
|
108
|
+
paint();
|
|
109
|
+
// `onInteraction` is name-only by contract. The step number rides the name so a funnel can be
|
|
110
|
+
// built per step, and it is bounded by the authored step count — not open cardinality.
|
|
111
|
+
ctx.onInteraction?.(`step-${index + 1}`);
|
|
112
|
+
};
|
|
113
|
+
back.addEventListener('click', () => go('back'));
|
|
114
|
+
// Skip and finish both END the flow. The host owns what "finish" MEANS — a link or custom action
|
|
115
|
+
// rides the surface's own CTA block; this block only reports that the flow reached its end.
|
|
116
|
+
skip.addEventListener('click', () => ctx.onInteraction?.('step-skip'));
|
|
117
|
+
fwd.addEventListener('click', () => {
|
|
118
|
+
if (index + 1 >= steps.length) {
|
|
119
|
+
ctx.onInteraction?.('step-finish');
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
go('next');
|
|
123
|
+
});
|
|
124
|
+
paint();
|
|
125
|
+
return root;
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=steps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../../../../../src/features/inapp/blocks/heavy/steps.ts"],"names":[],"mappings":"AAsBA,MAAM,GAAG,GAAG,CAAC,CAAU,EAAsB,EAAE,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,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IACvE,GAAG,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;QACjC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;YAC9B,GAAG,CAAC,aAAa,EAAE,CAAC,aAAa,CAAC,CAAC;YACnC,OAAO;QACT,CAAC;QACD,EAAE,CAAC,MAAM,CAAC,CAAC;IACb,CAAC,CAAC,CAAC;IAEH,KAAK,EAAE,CAAC;IACR,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mechanic block: streak / daily check-in — a row of day cells, filled up to a **server-decided**
|
|
3
|
+
* count.
|
|
4
|
+
*
|
|
5
|
+
* Why this exists: `streak_reward` and `daily_check_in` are two of eight variants the registry
|
|
6
|
+
* collapses onto the `checklistProgress` archetype, so both used to ship a progress bar and a
|
|
7
|
+
* to-do list. Neither is a to-do list. A streak is a run of consecutive days and a check-in is a
|
|
8
|
+
* calendar with a today cell — the shape IS the message, and a 40%-full bar says none of it.
|
|
9
|
+
*
|
|
10
|
+
* Outcome model matches every other mechanic here: `filled` and `today` come from the server. The
|
|
11
|
+
* block reflects state and never grants it — clicking the today cell reports an interaction, it does
|
|
12
|
+
* not mark the day complete locally.
|
|
13
|
+
*
|
|
14
|
+
* Zero-dependency, own lazy chunk (2 of 100 variants use it, so it must not sit in core).
|
|
15
|
+
*/
|
|
16
|
+
import type { BlockRenderer } from '../blocks';
|
|
17
|
+
export declare const streakRenderer: BlockRenderer;
|
|
18
|
+
//# sourceMappingURL=streak.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streak.d.ts","sourceRoot":"","sources":["../../../../../src/features/inapp/blocks/heavy/streak.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAO/C,eAAO,MAAM,cAAc,EAAE,aAyD5B,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const int = (v, fallback) => {
|
|
2
|
+
const n = Number(v);
|
|
3
|
+
return Number.isFinite(n) ? Math.trunc(n) : fallback;
|
|
4
|
+
};
|
|
5
|
+
export const streakRenderer = (block, ctx) => {
|
|
6
|
+
const p = block.props ?? {};
|
|
7
|
+
/** 'checkin' draws a calendar-ish grid with a today cell; anything else is a linear streak run. */
|
|
8
|
+
const checkin = p.mode === 'checkin';
|
|
9
|
+
const labels = Array.isArray(p.labels) ? p.labels.map((l) => String(l ?? '')) : [];
|
|
10
|
+
// Day count follows the labels when the author supplied them, so a 5-day challenge is 5 cells.
|
|
11
|
+
const days = Math.max(1, Math.min(31, int(p.days, labels.length || 7)));
|
|
12
|
+
const filled = Math.max(0, Math.min(days, int(p.filled, 0)));
|
|
13
|
+
// `today` is 1-based to match how authors count days; -1 means "no today cell".
|
|
14
|
+
const today = checkin ? Math.max(0, Math.min(days, int(p.today, filled + 1))) : 0;
|
|
15
|
+
const root = ctx.doc.createElement('div');
|
|
16
|
+
root.className = checkin ? 'scalebun-streak scalebun-streak-checkin' : 'scalebun-streak';
|
|
17
|
+
root.setAttribute('role', 'group');
|
|
18
|
+
root.setAttribute('aria-label', checkin ? `Checked in ${filled} of ${days} days` : `${filled} day streak of ${days}`);
|
|
19
|
+
for (let i = 1; i <= days; i++) {
|
|
20
|
+
const done = i <= filled;
|
|
21
|
+
const isToday = i === today && !done;
|
|
22
|
+
const cell = ctx.doc.createElement(isToday ? 'button' : 'div');
|
|
23
|
+
cell.className = 'scalebun-streak-day';
|
|
24
|
+
cell.setAttribute('data-done', done ? 'true' : 'false');
|
|
25
|
+
if (isToday) {
|
|
26
|
+
cell.type = 'button';
|
|
27
|
+
cell.setAttribute('data-today', 'true');
|
|
28
|
+
}
|
|
29
|
+
const mark = ctx.doc.createElement('span');
|
|
30
|
+
mark.className = 'scalebun-streak-mark';
|
|
31
|
+
mark.setAttribute('aria-hidden', 'true');
|
|
32
|
+
// A flame reads as "streak" and a tick as "checked in"; the empty cell stays empty rather than
|
|
33
|
+
// showing a greyed glyph, which tested as looking already-done.
|
|
34
|
+
mark.textContent = done ? (checkin ? '✓' : '🔥') : '';
|
|
35
|
+
cell.appendChild(mark);
|
|
36
|
+
const label = labels[i - 1];
|
|
37
|
+
if (label) {
|
|
38
|
+
const cap = ctx.doc.createElement('span');
|
|
39
|
+
cap.className = 'scalebun-streak-label';
|
|
40
|
+
cap.textContent = label;
|
|
41
|
+
cell.appendChild(cap);
|
|
42
|
+
}
|
|
43
|
+
// Screen readers get the state as words — the glyph alone does not convey it.
|
|
44
|
+
cell.setAttribute('aria-label', `${label || `Day ${i}`} — ${done ? 'done' : isToday ? 'today' : 'not done'}`);
|
|
45
|
+
if (isToday) {
|
|
46
|
+
cell.addEventListener('click', () => ctx.onInteraction?.(`check_in:${i}`), { once: true });
|
|
47
|
+
}
|
|
48
|
+
root.appendChild(cell);
|
|
49
|
+
}
|
|
50
|
+
return root;
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=streak.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streak.js","sourceRoot":"","sources":["../../../../../src/features/inapp/blocks/heavy/streak.ts"],"names":[],"mappings":"AAiBA,MAAM,GAAG,GAAG,CAAC,CAAU,EAAE,QAAgB,EAAU,EAAE;IACnD,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACpB,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;AACvD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAkB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC1D,MAAM,C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C5B,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YAC1C,GAAG,CAAC,SAAS,GAAG,uBAAuB,CAAC;YACxC,GAAG,CAAC,WAAW,GAAG,KAAK,CAAC;YACxB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QAED,8EAA8E;QAC9E,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,GAAG,KAAK,IAAI,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC;QAC9G,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7F,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Heavy block: table (P3.6). Renders a data/comparison/pricing table from columns + rows. Text via
|
|
3
|
+
* textContent (safe). Own lazy chunk.
|
|
4
|
+
*/
|
|
5
|
+
import type { BlockRenderer } from '../blocks';
|
|
6
|
+
export declare const tableRenderer: BlockRenderer;
|
|
7
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../../src/features/inapp/blocks/heavy/table.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,eAAO,MAAM,aAAa,EAAE,aA8B3B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const tableRenderer = (block, ctx) => {
|
|
2
|
+
const columns = Array.isArray(block.props?.columns) ? block.props.columns.map(String) : [];
|
|
3
|
+
const rows = Array.isArray(block.props?.rows) ? block.props.rows : [];
|
|
4
|
+
const table = ctx.doc.createElement('table');
|
|
5
|
+
table.className = 'scalebun-table';
|
|
6
|
+
if (columns.length) {
|
|
7
|
+
const thead = ctx.doc.createElement('thead');
|
|
8
|
+
const tr = ctx.doc.createElement('tr');
|
|
9
|
+
for (const c of columns) {
|
|
10
|
+
const th = ctx.doc.createElement('th');
|
|
11
|
+
th.textContent = c;
|
|
12
|
+
tr.appendChild(th);
|
|
13
|
+
}
|
|
14
|
+
thead.appendChild(tr);
|
|
15
|
+
table.appendChild(thead);
|
|
16
|
+
}
|
|
17
|
+
const tbody = ctx.doc.createElement('tbody');
|
|
18
|
+
for (const row of rows) {
|
|
19
|
+
const tr = ctx.doc.createElement('tr');
|
|
20
|
+
for (const cell of Array.isArray(row) ? row : [row]) {
|
|
21
|
+
const td = ctx.doc.createElement('td');
|
|
22
|
+
td.textContent = cell == null ? '' : String(cell);
|
|
23
|
+
tr.appendChild(td);
|
|
24
|
+
}
|
|
25
|
+
tbody.appendChild(tr);
|
|
26
|
+
}
|
|
27
|
+
table.appendChild(tbody);
|
|
28
|
+
return table;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../../../../src/features/inapp/blocks/heavy/table.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,aAAa,GAAkB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACzD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAE,KAAK,CAAC,KA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C,EAAE,CAAC;YACpD,MAAM,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YACvC,EAAE,CAAC,WAAW,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAClD,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QACrB,CAAC;QACD,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC;IACD,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACzB,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* G3 — the shared "we could not get your reward" state for the eight gamified mechanics.
|
|
3
|
+
*
|
|
4
|
+
* Before this, each block overwrote its own button's label. That worked but was three different
|
|
5
|
+
* failure presentations, and it destroyed the control's affordance: a SPIN button reading "Back
|
|
6
|
+
* shortly" is neither a message nor a button. Worse, a non-retryable failure left a dead control on
|
|
7
|
+
* screen with no explanation of why nothing happened.
|
|
8
|
+
*
|
|
9
|
+
* One element, one behaviour: say what happened, and offer a retry only when the host said the
|
|
10
|
+
* failure was retryable. Lives with the heavy blocks so it costs core nothing.
|
|
11
|
+
*/
|
|
12
|
+
import type { BlockOutcome } from '../blocks';
|
|
13
|
+
export interface UnavailableOptions {
|
|
14
|
+
/** Called when the user asks to try again. Only wired when the outcome is retryable. */
|
|
15
|
+
onRetry?: () => void;
|
|
16
|
+
/** Label for the retry control. */
|
|
17
|
+
retryLabel?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Render (or replace) the notice inside `root`.
|
|
21
|
+
*
|
|
22
|
+
* Replaces rather than appends: a user who retries twice should see one message, not a growing
|
|
23
|
+
* stack of them.
|
|
24
|
+
*/
|
|
25
|
+
export declare function showUnavailable(root: HTMLElement, doc: Document, outcome: BlockOutcome, opts?: UnavailableOptions): void;
|
|
26
|
+
/** Remove any notice — used when a retry succeeds. */
|
|
27
|
+
export declare function clearUnavailable(root: HTMLElement): void;
|
|
28
|
+
//# sourceMappingURL=unavailable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unavailable.d.ts","sourceRoot":"","sources":["../../../../../src/features/inapp/blocks/heavy/unavailable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,WAAW,kBAAkB;IACjC,wFAAwF;IACxF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,WAAW,EACjB,GAAG,EAAE,QAAQ,EACb,OAAO,EAAE,YAAY,EACrB,IAAI,GAAE,kBAAuB,GAC5B,IAAI,CAyBN;AAED,sDAAsD;AACtD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAExD"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render (or replace) the notice inside `root`.
|
|
3
|
+
*
|
|
4
|
+
* Replaces rather than appends: a user who retries twice should see one message, not a growing
|
|
5
|
+
* stack of them.
|
|
6
|
+
*/
|
|
7
|
+
export function showUnavailable(root, doc, outcome, opts = {}) {
|
|
8
|
+
root.querySelector('.scalebun-game-note')?.remove();
|
|
9
|
+
const note = doc.createElement('div');
|
|
10
|
+
note.className = 'scalebun-game-note';
|
|
11
|
+
// Announced, because the thing the user just clicked appears not to have worked.
|
|
12
|
+
note.setAttribute('role', 'status');
|
|
13
|
+
const text = doc.createElement('span');
|
|
14
|
+
text.textContent = outcome.message ?? 'Rewards are unavailable right now.';
|
|
15
|
+
note.appendChild(text);
|
|
16
|
+
if (outcome.retryable && opts.onRetry) {
|
|
17
|
+
const retry = doc.createElement('button');
|
|
18
|
+
retry.type = 'button';
|
|
19
|
+
retry.className = 'scalebun-game-retry';
|
|
20
|
+
retry.textContent = opts.retryLabel ?? 'Try again';
|
|
21
|
+
retry.addEventListener('click', () => {
|
|
22
|
+
note.remove();
|
|
23
|
+
opts.onRetry?.();
|
|
24
|
+
}, { once: true });
|
|
25
|
+
note.appendChild(retry);
|
|
26
|
+
}
|
|
27
|
+
root.appendChild(note);
|
|
28
|
+
}
|
|
29
|
+
/** Remove any notice — used when a retry succeeds. */
|
|
30
|
+
export function clearUnavailable(root) {
|
|
31
|
+
root.querySelector('.scalebun-game-note')?.remove();
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=unavailable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unavailable.js","sourceRoot":"","sources":["../../../../../src/features/inapp/blocks/heavy/unavailable.ts"],"names":[],"mappings":"AAoBA;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAC7B,IAAiB,EACjB,GAAa,EACb,OAAqB,EACrB,OAA2B,EAAE;IAE7B,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpD,MAAM,IAAI,GAAG,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACtC,IAAI,CAAC,SAAS,GAAG,oBAAoB,CAAC;IACtC,iFAAiF;IACjF,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAEpC,MAAM,IAAI,GAAG,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,OAAO,IAAI,oCAAoC,CAAC;IAC3E,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAEvB,IAAI,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QACtC,MAAM,KAAK,GAAG,GAAG,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAC1C,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC;QACtB,KAAK,CAAC,SAAS,GAAG,qBAAqB,CAAC;QACxC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,IAAI,WAAW,CAAC;QACnD,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;YACnC,IAAI,CAAC,MAAM,EAAE,CAAC;YACd,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC;QACnB,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACnB,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED,sDAAsD;AACtD,MAAM,UAAU,gBAAgB,CAAC,IAAiB;IAChD,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Heavy block: video (P3.6). Poster + click-to-load — NO autoplay by default (respectful + light: the
|
|
3
|
+
* <video> element and network fetch happen only on interaction). Own lazy chunk.
|
|
4
|
+
*/
|
|
5
|
+
import type { BlockRenderer } from '../blocks';
|
|
6
|
+
export declare const videoRenderer: BlockRenderer;
|
|
7
|
+
//# sourceMappingURL=video.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../../../src/features/inapp/blocks/heavy/video.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,eAAO,MAAM,aAAa,EAAE,aAqC3B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const videoRenderer = (block, ctx) => {
|
|
2
|
+
const src = typeof block.props?.src === 'string' ? block.props.src : '';
|
|
3
|
+
const poster = typeof block.props?.poster === 'string' ? block.props.poster : '';
|
|
4
|
+
const root = ctx.doc.createElement('div');
|
|
5
|
+
root.className = 'scalebun-video';
|
|
6
|
+
if (!src)
|
|
7
|
+
return root;
|
|
8
|
+
const mount = () => {
|
|
9
|
+
root.replaceChildren();
|
|
10
|
+
const video = ctx.doc.createElement('video');
|
|
11
|
+
video.className = 'scalebun-video-el';
|
|
12
|
+
video.src = src;
|
|
13
|
+
video.controls = true;
|
|
14
|
+
video.autoplay = true;
|
|
15
|
+
video.playsInline = true;
|
|
16
|
+
root.appendChild(video);
|
|
17
|
+
ctx.onInteraction?.('video_play');
|
|
18
|
+
};
|
|
19
|
+
const btn = ctx.doc.createElement('button');
|
|
20
|
+
btn.type = 'button';
|
|
21
|
+
btn.className = 'scalebun-video-poster';
|
|
22
|
+
btn.setAttribute('aria-label', 'Play video');
|
|
23
|
+
if (poster) {
|
|
24
|
+
const img = ctx.doc.createElement('img');
|
|
25
|
+
img.src = poster;
|
|
26
|
+
img.alt = '';
|
|
27
|
+
img.loading = 'lazy';
|
|
28
|
+
btn.appendChild(img);
|
|
29
|
+
}
|
|
30
|
+
const play = ctx.doc.createElement('span');
|
|
31
|
+
play.className = 'scalebun-video-play';
|
|
32
|
+
play.textContent = '▶';
|
|
33
|
+
btn.appendChild(play);
|
|
34
|
+
btn.addEventListener('click', mount);
|
|
35
|
+
root.appendChild(btn);
|
|
36
|
+
return root;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=video.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video.js","sourceRoot":"","sources":["../../../../../src/features/inapp/blocks/heavy/video.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,aAAa,GAAkB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACzD,MAAM,GAAG,GAAG,OAAO,KAAK,CAAC,KAAK,EAAE,GAAG,KAAK,QAAQ,CAAC,CAAC,CA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AAG,GAAG,MAAM,CAAC;QACjB,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC;QACrB,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;IACD,MAAM,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC3C,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC;IACvC,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC;IACvB,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACtB,GAAG,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACrC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACtB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IAM 2.0 block + shared control styles (P1.1). A single CSS string adopted once into the Shadow
|
|
3
|
+
* host (via `ShadowHost.addStyles`) — classes, not inline style attrs, so a strict CSP passes.
|
|
4
|
+
* All colors reference the theme CSS vars set on `:host` (§P0.2), so light/dark just works.
|
|
5
|
+
*/
|
|
6
|
+
export declare const BLOCKS_CSS = "\n.scalebun-h{ font-size:17px; font-weight:700; margin:0 0 6px; color:var(--scalebun-fg); }\n.scalebun-text{ font-size:14px; line-height:1.5; margin:0 0 6px; color:var(--scalebun-fg); }\n.scalebun-rich{ font-size:14px; line-height:1.5; color:var(--scalebun-fg); }\n.scalebun-img{ display:block; max-width:100%; height:auto; border-radius:8px; margin:0 0 10px; }\n.scalebun-list{ margin:0 0 8px; padding-left:18px; color:var(--scalebun-fg); font-size:14px; }\n.scalebun-list li{ margin:2px 0; }\n.scalebun-callout{ display:flex; gap:8px; align-items:flex-start; background:color-mix(in srgb, var(--scalebun-accent) 10%, transparent);\n border:1px solid var(--scalebun-border); border-radius:8px; padding:8px 10px; font-size:13.5px; color:var(--scalebun-fg); margin:0 0 8px; }\n.scalebun-badge{ display:inline-block; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px;\n background:var(--scalebun-accent); color:var(--scalebun-accent-fg); border-radius:999px; padding:2px 8px; }\n.scalebun-divider{ border:0; border-top:1px solid var(--scalebun-border); margin:10px 0; }\n.scalebun-progress{ height:8px; border-radius:4px; background:color-mix(in srgb, var(--scalebun-fg) 10%, transparent); overflow:hidden; margin:8px 0; }\n.scalebun-progress-fill{ height:100%; background:var(--scalebun-accent); border-radius:4px; transition:width .3s ease; }\n.scalebun-spacer{ height:8px; }\n.scalebun-cta-row{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }\n.scalebun-btn{ font:inherit; font-size:13.5px; font-weight:600; border-radius:8px; padding:8px 14px; cursor:pointer;\n border:1px solid transparent; transition:filter .12s ease; }\n.scalebun-btn:hover{ filter:brightness(1.06); }\n.scalebun-btn:focus-visible{ outline:2px solid var(--scalebun-accent); outline-offset:2px; }\n.scalebun-btn-primary{ background:var(--scalebun-accent); color:var(--scalebun-accent-fg); }\n.scalebun-btn-secondary{ background:transparent; color:var(--scalebun-fg); border-color:var(--scalebun-border); }\n.scalebun-btn-ghost{ background:transparent; color:var(--scalebun-fg); }\n.scalebun-btn-link{ background:transparent; color:var(--scalebun-accent); border:0; padding:8px 4px; text-decoration:underline; }\n.scalebun-btn-dismiss{ background:transparent; color:var(--scalebun-muted); border:0; }\n\n/* Checklist \u2014 state-reflecting, never state-granting (the mark comes from the server). */\n.scalebun-checklist{ list-style:none; margin:8px 0; padding:0; display:flex; flex-direction:column; gap:7px; }\n.scalebun-checklist-item{ display:flex; align-items:flex-start; gap:9px; font-size:14px; line-height:1.45; }\n.scalebun-checklist-mark{ flex-shrink:0; width:18px; height:18px; border-radius:50%; margin-top:1px;\n border:1.5px solid var(--scalebun-border); display:grid; place-items:center;\n font-size:11px; font-weight:700; line-height:1; }\n.scalebun-checklist-item[data-done=\"true\"] .scalebun-checklist-mark{\n background:var(--scalebun-accent); border-color:var(--scalebun-accent); color:var(--scalebun-accent-fg); }\n/* Done items recede but stay readable \u2014 struck-through text fails contrast for many readers. */\n.scalebun-checklist-item[data-done=\"true\"] .scalebun-checklist-label{ color:var(--scalebun-muted); }\n\n/* The engage theme contract names titleColor and bodyColor separately while IAM carries one\n foreground. Headings read their own var, which FALLS BACK to --scalebun-fg \u2014 so nothing changes\n unless a campaign actually set a distinct title colour. */\n.scalebun-h{ color:var(--scalebun-title, var(--scalebun-fg)); }\n\n/* multiStepSheet wizard paging. Buttons reuse .scalebun-btn-* above rather than restyling. */\n.scalebun-steps{ display:flex; flex-direction:column; gap:12px; }\n.scalebun-steps-rail{ display:flex; gap:6px; align-items:center; }\n.scalebun-steps-dot{ height:4px; flex:1; border-radius:99px; background:var(--scalebun-border);\n transition:background .18s ease; }\n.scalebun-steps-dot[data-state=\"current\"], .scalebun-steps-dot[data-state=\"done\"]{ background:var(--scalebun-accent); }\n.scalebun-steps-dot[data-state=\"todo\"]{ opacity:.55; }\n.scalebun-steps-title{ font-size:16px; font-weight:700; }\n.scalebun-steps-body{ font-size:14px; line-height:1.5; color:var(--scalebun-muted); }\n/* Back sits left, the primary action right; margin-left:auto on the forward button keeps that\n split stable when Back/Skip are hidden on the first and last steps. */\n.scalebun-steps-nav{ display:flex; gap:8px; align-items:center; margin-top:2px; }\n.scalebun-steps-nav .scalebun-btn-primary{ margin-left:auto; }\n@media (prefers-reduced-motion: reduce){ .scalebun-steps-dot{ transition:none; } }\n\n/* heavy blocks (P3.6) \u2014 styles live with the light sheet (adopted once); the renderers are lazy */\n.scalebun-md-h{ font-weight:700; margin:8px 0 6px; }\n.scalebun-md-p{ font-size:14px; line-height:1.5; margin:0 0 8px; }\n.scalebun-md-ul{ margin:0 0 8px; padding-left:18px; font-size:14px; }\n.scalebun-md code, .scalebun-code code{ font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }\n.scalebun-md code{ background:color-mix(in srgb, var(--scalebun-fg) 8%, transparent); padding:1px 5px; border-radius:5px; font-size:12.5px; }\n.scalebun-code{ border:1px solid var(--scalebun-border); border-radius:10px; overflow:hidden; margin:0 0 8px; }\n.scalebun-code-bar{ display:flex; align-items:center; justify-content:space-between; padding:6px 10px;\n background:color-mix(in srgb, var(--scalebun-fg) 6%, transparent); border-bottom:1px solid var(--scalebun-border); }\n.scalebun-code-lang{ font-size:11px; color:var(--scalebun-muted); text-transform:uppercase; letter-spacing:.04em; }\n.scalebun-code-copy{ background:none; border:0; color:var(--scalebun-accent); cursor:pointer; font:inherit; font-size:11.5px; }\n.scalebun-code-pre{ margin:0; padding:12px; overflow-x:auto; font-size:12.5px; line-height:1.5; }\n.scalebun-stat{ display:inline-flex; flex-direction:column; }\n.scalebun-stat-value{ font-size:26px; font-weight:800; line-height:1; }\n.scalebun-stat-label{ font-size:12px; color:var(--scalebun-muted); margin-top:3px; }\n.scalebun-stat-delta{ font-size:12px; font-weight:700; margin-top:2px; }\n.scalebun-stat-delta.up{ color:#2fa96b; } .scalebun-stat-delta.down{ color:#e0483d; }\n.scalebun-table{ width:100%; border-collapse:collapse; font-size:13px; margin:0 0 8px; }\n.scalebun-table th, .scalebun-table td{ text-align:left; padding:7px 10px; border-bottom:1px solid var(--scalebun-border); }\n.scalebun-table th{ color:var(--scalebun-muted); font-weight:600; font-size:11.5px; text-transform:uppercase; letter-spacing:.03em; }\n.scalebun-video{ position:relative; border-radius:10px; overflow:hidden; }\n.scalebun-video-poster{ display:block; position:relative; width:100%; padding:0; border:0; cursor:pointer; background:#000; }\n.scalebun-video-poster img{ display:block; width:100%; height:auto; opacity:.85; }\n.scalebun-video-play{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#fff; font-size:34px; }\n.scalebun-video-el{ display:block; width:100%; height:auto; }\n\n/* mechanic blocks \u2014 countdown */\n.scalebun-countdown{ display:flex; gap:8px; justify-content:center; margin:10px 0; }\n.scalebun-cd-cell{ min-width:52px; text-align:center; background:color-mix(in srgb, var(--scalebun-fg) 8%, transparent);\n border:1px solid var(--scalebun-border); border-radius:10px; padding:8px 6px; }\n.scalebun-cd-num{ font-size:22px; font-weight:800; font-variant-numeric:tabular-nums; line-height:1; }\n.scalebun-cd-lab{ font-size:10px; color:var(--scalebun-muted); text-transform:uppercase; letter-spacing:.05em; margin-top:4px; }\n/* carousel */\n.scalebun-carousel{ margin:0 0 8px; }\n.scalebun-car-track{ display:flex; gap:10px; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; padding-bottom:4px; }\n.scalebun-car-track::-webkit-scrollbar{ display:none; }\n.scalebun-car-slide{ flex:0 0 100%; scroll-snap-align:center; }\n.scalebun-car-img{ width:100%; height:auto; border-radius:10px; display:block; margin-bottom:8px; }\n.scalebun-car-title{ font-weight:700; font-size:14px; margin-bottom:4px; }\n.scalebun-car-text{ font-size:13px; color:var(--scalebun-muted); }\n.scalebun-car-dots{ display:flex; gap:6px; justify-content:center; margin-top:8px; }\n.scalebun-car-dot{ width:7px; height:7px; padding:0; border:0; border-radius:50%; cursor:pointer;\n background:color-mix(in srgb, var(--scalebun-fg) 25%, transparent); }\n.scalebun-car-dot.on{ background:var(--scalebun-accent); }\n/* product grid */\n.scalebun-pgrid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(120px, 1fr)); gap:10px; margin:0 0 8px; }\n.scalebun-pcard{ position:relative; text-align:left; background:var(--scalebun-bg); border:1px solid var(--scalebun-border);\n border-radius:10px; padding:8px; cursor:pointer; font:inherit; color:var(--scalebun-fg); }\n.scalebun-pcard:hover{ border-color:var(--scalebun-accent); }\n.scalebun-pcard-img{ width:100%; height:auto; border-radius:6px; display:block; margin-bottom:6px; }\n.scalebun-pcard-badge{ position:absolute; top:6px; left:6px; font-size:10px; font-weight:700; background:var(--scalebun-accent);\n color:var(--scalebun-accent-fg); border-radius:6px; padding:1px 6px; }\n.scalebun-pcard-title{ font-size:12.5px; font-weight:600; }\n.scalebun-pcard-price{ font-size:13px; font-weight:800; color:var(--scalebun-accent); margin-top:2px; }\n/* confetti */\n.scalebun-confetti{ position:absolute; inset:0; pointer-events:none; overflow:hidden; }\n.scalebun-confetti-canvas{ position:absolute; inset:0; width:100%; height:100%; }\n.scalebun-confetti-static{ position:static; display:flex; align-items:center; justify-content:center; font-size:40px; }\n/* spin wheel */\n.scalebun-wheel{ position:relative; display:flex; flex-direction:column; align-items:center; gap:12px; margin:8px 0; }\n.scalebun-wheel-svg{ display:block; transform-origin:50% 50%; }\n.scalebun-wheel-pointer{ position:absolute; top:-2px; left:50%; transform:translateX(-50%); width:0; height:0;\n border-left:9px solid transparent; border-right:9px solid transparent; border-top:14px solid var(--scalebun-fg); z-index:2; }\n.scalebun-wheel-spin{ font:inherit; font-weight:800; font-size:13px; letter-spacing:.04em; padding:9px 20px; border-radius:999px;\n border:0; background:var(--scalebun-accent); color:var(--scalebun-accent-fg); cursor:pointer; }\n/* scratch card */\n.scalebun-scratch{ position:relative; width:300px; max-width:100%; height:90px; margin:8px auto; border-radius:10px; overflow:hidden;\n border:1px dashed var(--scalebun-border); }\n.scalebun-scratch-prize{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-weight:800;\n font-size:18px; color:var(--scalebun-accent); }\n.scalebun-scratch-cover{ position:absolute; inset:0; width:100%; height:100%; cursor:crosshair; touch-action:none; }\n/* Mystery box: a lid you TAP, not a surface you drag. Same block, same server-decided prize. */\n.scalebun-scratch-box{ height:120px; }\n.scalebun-scratch-lid{ position:absolute; inset:0; width:100%; height:100%; border:0; cursor:pointer;\n display:grid; place-items:center; font-size:40px; line-height:1;\n background:linear-gradient(160deg, var(--scalebun-accent), color-mix(in srgb, var(--scalebun-accent) 60%, #000));\n transition:transform .3s ease, opacity .3s ease; }\n.scalebun-scratch-lid:focus-visible{ outline:2px solid var(--scalebun-accent); outline-offset:2px; }\n.scalebun-scratch-lid[data-open=\"true\"]{ transform:translateY(-100%) rotate(-6deg); opacity:0; pointer-events:none; }\n@media (prefers-reduced-motion: reduce){ .scalebun-scratch-lid{ transition:none; } }\n/* Gamified failure state \u2014 one presentation across every mechanic. */\n.scalebun-game-note{ display:flex; align-items:center; justify-content:center; gap:10px; flex-wrap:wrap;\n margin:10px 0 0; padding:9px 12px; border-radius:10px; font-size:13px; line-height:1.4; text-align:center;\n background:color-mix(in srgb, var(--scalebun-fg) 6%, transparent); color:var(--scalebun-muted); }\n.scalebun-game-retry{ border:0; cursor:pointer; font:inherit; font-weight:600; padding:5px 12px; border-radius:8px;\n background:var(--scalebun-accent); color:var(--scalebun-accent-fg, #fff); }\n.scalebun-game-retry:focus-visible{ outline:2px solid var(--scalebun-accent); outline-offset:2px; }\n/* streak / daily check-in: a run of day cells. Wraps, so a 31-day month does not overflow. */\n.scalebun-streak{ display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; }\n.scalebun-streak-day{ flex:0 0 auto; min-width:38px; padding:7px 4px; border-radius:9px; border:0;\n display:flex; flex-direction:column; align-items:center; gap:3px; font:inherit;\n background:color-mix(in srgb, var(--scalebun-fg) 7%, transparent); color:var(--scalebun-muted); }\n.scalebun-streak-mark{ font-size:16px; line-height:1.1; min-height:18px; }\n.scalebun-streak-label{ font-size:10px; letter-spacing:.02em; text-transform:uppercase; }\n.scalebun-streak-day[data-done=\"true\"]{ background:color-mix(in srgb, var(--scalebun-accent) 18%, transparent);\n color:var(--scalebun-accent); }\n/* Today is the only actionable cell, so it is the only one that looks pressable. */\n.scalebun-streak-day[data-today=\"true\"]{ cursor:pointer; color:var(--scalebun-fg);\n box-shadow:inset 0 0 0 2px var(--scalebun-accent); }\n.scalebun-streak-day[data-today=\"true\"]:focus-visible{ outline:2px solid var(--scalebun-accent); outline-offset:2px; }\n/* slot machine */\n.scalebun-slot{ display:flex; flex-direction:column; align-items:center; gap:12px; margin:8px 0; }\n.scalebun-slot-reels{ display:flex; gap:8px; }\n.scalebun-slot-reel{ width:48px; height:44px; overflow:hidden; border:1px solid var(--scalebun-border); border-radius:8px;\n background:color-mix(in srgb, var(--scalebun-fg) 6%, transparent); }\n.scalebun-slot-strip{ display:flex; flex-direction:column; transform:translateY(0); }\n.scalebun-slot-cell{ height:44px; display:flex; align-items:center; justify-content:center; font-size:24px; }\n.scalebun-slot-spin{ padding:8px 18px; }\n/* qr */\n.scalebun-qr{ display:flex; flex-direction:column; align-items:center; gap:8px; margin:8px 0; }\n.scalebun-qr-svg{ border-radius:8px; }\n.scalebun-qr-cap{ font-size:11.5px; color:var(--scalebun-muted); word-break:break-all; text-align:center; max-width:220px; }\n\n/* feedback / mechanic blocks (P4.2) */\n.scalebun-nps{ display:flex; gap:4px; flex-wrap:wrap; margin:6px 0; }\n.scalebun-nps-btn{ width:30px; height:30px; border:1px solid var(--scalebun-border); border-radius:7px; background:transparent;\n color:var(--scalebun-fg); cursor:pointer; font:inherit; font-size:12.5px; }\n.scalebun-nps-btn:hover{ background:var(--scalebun-accent); color:var(--scalebun-accent-fg); border-color:transparent; }\n.scalebun-rating{ display:flex; gap:2px; }\n.scalebun-star{ background:none; border:0; cursor:pointer; font-size:22px; color:var(--scalebun-border); padding:0 2px; }\n.scalebun-star.on{ color:#f5b301; }\n.scalebun-emoji{ display:flex; gap:8px; }\n.scalebun-emoji-btn{ background:none; border:0; cursor:pointer; font-size:24px; padding:2px; border-radius:8px; }\n.scalebun-emoji-btn:hover{ background:color-mix(in srgb, var(--scalebun-fg) 8%, transparent); }\n.scalebun-poll-q, .scalebun-quiz .scalebun-poll-q{ font-weight:600; font-size:13.5px; margin:0 0 8px; }\n.scalebun-poll-opt, .scalebun-quiz-opt{ position:relative; display:flex; align-items:center; width:100%; text-align:left;\n border:1px solid var(--scalebun-border); border-radius:8px; background:transparent; color:var(--scalebun-fg);\n padding:9px 12px; margin:0 0 6px; cursor:pointer; font:inherit; font-size:13.5px; overflow:hidden; }\n.scalebun-poll-opt:hover, .scalebun-quiz-opt:hover{ border-color:var(--scalebun-accent); }\n.scalebun-poll-label{ position:relative; z-index:1; flex:1; }\n.scalebun-poll-bar{ position:absolute; left:0; top:0; bottom:0; background:color-mix(in srgb, var(--scalebun-accent) 22%, transparent); }\n.scalebun-poll-pct{ position:relative; z-index:1; font-size:12px; color:var(--scalebun-muted); }\n.scalebun-quiz-opt.correct{ border-color:#2fa96b; background:color-mix(in srgb, #2fa96b 14%, transparent); }\n.scalebun-quiz-opt.incorrect{ border-color:#e0483d; background:color-mix(in srgb, #e0483d 14%, transparent); }\n";
|
|
7
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/features/inapp/blocks/styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,UAAU,qhgBA+LtB,CAAC"}
|