@scalebun/web 1.0.0 → 1.2.1

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.
Files changed (291) hide show
  1. package/dist/bootstrap/SDKBootstrapper.d.ts +6 -6
  2. package/dist/bootstrap/SDKBootstrapper.js +8 -8
  3. package/dist/browser.d.ts +1 -1
  4. package/dist/browser.d.ts.map +1 -1
  5. package/dist/browser.js +8 -6
  6. package/dist/browser.js.map +1 -1
  7. package/dist/config/endpoints.d.ts +12 -0
  8. package/dist/config/endpoints.d.ts.map +1 -0
  9. package/dist/config/endpoints.js +12 -0
  10. package/dist/config/endpoints.js.map +1 -0
  11. package/dist/config/schema.d.ts.map +1 -1
  12. package/dist/config/schema.js +5 -3
  13. package/dist/config/schema.js.map +1 -1
  14. package/dist/core/breadcrumbs.js +1 -1
  15. package/dist/core/index.d.ts +13 -13
  16. package/dist/core/index.js +13 -13
  17. package/dist/core/observe.js +1 -1
  18. package/dist/core/pageContext.d.ts +1 -1
  19. package/dist/features/analytics/AnalyticsFeature.d.ts +2 -2
  20. package/dist/features/analytics/AnalyticsFeature.js +10 -10
  21. package/dist/features/analytics/autocapture.js +4 -4
  22. package/dist/features/analytics/sampler.js +1 -1
  23. package/dist/features/bugreport/BugReportFeature.d.ts +1 -1
  24. package/dist/features/bugreport/BugReportFeature.js +1 -1
  25. package/dist/features/bugreport/collect.js +1 -1
  26. package/dist/features/bugreport/widget.js +9 -9
  27. package/dist/features/coach/CoachmarkFeature.d.ts +1 -1
  28. package/dist/features/coach/CoachmarkFeature.js +5 -5
  29. package/dist/features/coach/anchor.d.ts +1 -1
  30. package/dist/features/coach/overlay.d.ts +1 -1
  31. package/dist/features/coach/overlay.js +21 -21
  32. package/dist/features/coach/position.d.ts +1 -1
  33. package/dist/features/coach/predicate.d.ts +1 -1
  34. package/dist/features/coach/tour.d.ts +4 -4
  35. package/dist/features/coach/tour.js +1 -1
  36. package/dist/features/coach/types.d.ts +1 -1
  37. package/dist/features/coach/wait.d.ts +2 -2
  38. package/dist/features/config/ConfigFeature.d.ts +1 -1
  39. package/dist/features/config/ConfigFeature.js +5 -5
  40. package/dist/features/config/configStore.d.ts +1 -1
  41. package/dist/features/config/targeting.d.ts +1 -1
  42. package/dist/features/console/ConsoleFeature.js +3 -3
  43. package/dist/features/console/normalize.js +2 -2
  44. package/dist/features/console/throttle.d.ts +1 -1
  45. package/dist/features/crash/CrashFeature.js +2 -2
  46. package/dist/features/engage/EngageFeature.d.ts +3 -3
  47. package/dist/features/engage/EngageFeature.js +5 -5
  48. package/dist/features/engage/attachments.d.ts +1 -1
  49. package/dist/features/engage/attachments.js +3 -3
  50. package/dist/features/engage/gameLogic.d.ts +1 -1
  51. package/dist/features/engage/gameResolver.d.ts +2 -2
  52. package/dist/features/engage/gameResolver.js +1 -1
  53. package/dist/features/engage/inappSlots.d.ts +1 -1
  54. package/dist/features/engage/inappSlots.js +1 -1
  55. package/dist/features/engage/normalize.d.ts +1 -1
  56. package/dist/features/engage/richInApp.d.ts +3 -3
  57. package/dist/features/engage/richInApp.js +6 -6
  58. package/dist/features/engage/runtime.d.ts +3 -3
  59. package/dist/features/engage/runtime.js +7 -7
  60. package/dist/features/engage/shakeDetector.js +1 -1
  61. package/dist/features/engage/throttle.d.ts +1 -1
  62. package/dist/features/engage/transport.d.ts +1 -1
  63. package/dist/features/engage/transport.js +1 -1
  64. package/dist/features/engage/triggerEngine.d.ts +1 -1
  65. package/dist/features/engage/widget/InAppWidget.d.ts +1 -1
  66. package/dist/features/engage/widget/InAppWidget.js +18 -18
  67. package/dist/features/engage/widget/SurveyWidget.d.ts +1 -1
  68. package/dist/features/engage/widget/SurveyWidget.js +66 -66
  69. package/dist/features/errors/ErrorsFeature.d.ts +1 -1
  70. package/dist/features/errors/ErrorsFeature.js +6 -6
  71. package/dist/features/errors/group/fingerprint.js +1 -1
  72. package/dist/features/errors/lazy.d.ts +3 -3
  73. package/dist/features/errors/lazy.js +3 -3
  74. package/dist/features/errors/normalize.d.ts +2 -2
  75. package/dist/features/errors/normalize.js +2 -2
  76. package/dist/features/errors/redact.js +1 -1
  77. package/dist/features/errors/sampling.js +1 -1
  78. package/dist/features/exit-intent/ExitIntentFeature.js +1 -1
  79. package/dist/features/exit-intent/engine.js +1 -1
  80. package/dist/features/forms/index.js +1 -1
  81. package/dist/features/inapp/InApp2Feature.js +1 -1
  82. package/dist/features/inapp/anchor/controller.d.ts +2 -2
  83. package/dist/features/inapp/anchor/controller.js +3 -3
  84. package/dist/features/inapp/api.d.ts +5 -5
  85. package/dist/features/inapp/api.js +3 -3
  86. package/dist/features/inapp/blocks/blocks.d.ts +1 -1
  87. package/dist/features/inapp/blocks/blocks.js +1 -1
  88. package/dist/features/inapp/blocks/feedback.d.ts +1 -1
  89. package/dist/features/inapp/blocks/heavy/carousel.d.ts +1 -1
  90. package/dist/features/inapp/blocks/heavy/chart.d.ts +1 -1
  91. package/dist/features/inapp/blocks/heavy/code.d.ts +1 -1
  92. package/dist/features/inapp/blocks/heavy/confetti.d.ts +1 -1
  93. package/dist/features/inapp/blocks/heavy/countdown.d.ts +1 -1
  94. package/dist/features/inapp/blocks/heavy/index.d.ts +1 -1
  95. package/dist/features/inapp/blocks/heavy/index.js +18 -18
  96. package/dist/features/inapp/blocks/heavy/markdown.d.ts +1 -1
  97. package/dist/features/inapp/blocks/heavy/productgrid.d.ts +1 -1
  98. package/dist/features/inapp/blocks/heavy/qr.d.ts +1 -1
  99. package/dist/features/inapp/blocks/heavy/scratch.d.ts +1 -1
  100. package/dist/features/inapp/blocks/heavy/scratch.js +1 -1
  101. package/dist/features/inapp/blocks/heavy/slot.d.ts +1 -1
  102. package/dist/features/inapp/blocks/heavy/slot.js +1 -1
  103. package/dist/features/inapp/blocks/heavy/spinwheel.d.ts +1 -1
  104. package/dist/features/inapp/blocks/heavy/spinwheel.js +1 -1
  105. package/dist/features/inapp/blocks/heavy/steps.d.ts +1 -1
  106. package/dist/features/inapp/blocks/heavy/streak.d.ts +1 -1
  107. package/dist/features/inapp/blocks/heavy/table.d.ts +1 -1
  108. package/dist/features/inapp/blocks/heavy/unavailable.d.ts +1 -1
  109. package/dist/features/inapp/blocks/heavy/video.d.ts +1 -1
  110. package/dist/features/inapp/blocks/styles.js +191 -191
  111. package/dist/features/inapp/center/bridge.d.ts +3 -3
  112. package/dist/features/inapp/center/bridge.js +1 -1
  113. package/dist/features/inapp/center/panel.d.ts +2 -2
  114. package/dist/features/inapp/center/panel.js +33 -33
  115. package/dist/features/inapp/center/store.d.ts +1 -1
  116. package/dist/features/inapp/center/sync.d.ts +1 -1
  117. package/dist/features/inapp/center/types.d.ts +1 -1
  118. package/dist/features/inapp/core/analytics.d.ts +3 -3
  119. package/dist/features/inapp/core/analytics.js +1 -1
  120. package/dist/features/inapp/core/compat.d.ts +2 -2
  121. package/dist/features/inapp/core/debugOverlay.d.ts +2 -2
  122. package/dist/features/inapp/core/debugOverlay.js +12 -12
  123. package/dist/features/inapp/core/engine.d.ts +3 -3
  124. package/dist/features/inapp/core/engine.js +10 -10
  125. package/dist/features/inapp/core/host.js +22 -22
  126. package/dist/features/inapp/core/metrics.d.ts +1 -1
  127. package/dist/features/inapp/core/migration.d.ts +2 -2
  128. package/dist/features/inapp/core/migration.js +2 -2
  129. package/dist/features/inapp/core/orchestrator.d.ts +1 -1
  130. package/dist/features/inapp/core/respect.d.ts +1 -1
  131. package/dist/features/inapp/core/targeting.d.ts +1 -1
  132. package/dist/features/inapp/core/targeting.js +1 -1
  133. package/dist/features/inapp/core/triggers.d.ts +1 -1
  134. package/dist/features/inapp/core/triggers.js +2 -2
  135. package/dist/features/inapp/inappContract.web.d.ts +1 -1
  136. package/dist/features/inapp/index.d.ts +15 -15
  137. package/dist/features/inapp/index.js +10 -10
  138. package/dist/features/inapp/registry.web.canonical.d.ts +1 -1
  139. package/dist/features/inapp/registry.web.catalog.d.ts +1 -1
  140. package/dist/features/inapp/surfaces/banner.d.ts +1 -1
  141. package/dist/features/inapp/surfaces/banner.js +1 -1
  142. package/dist/features/inapp/surfaces/checklist.d.ts +1 -1
  143. package/dist/features/inapp/surfaces/coachmark.d.ts +1 -1
  144. package/dist/features/inapp/surfaces/coachmark.js +2 -2
  145. package/dist/features/inapp/surfaces/hotspot.d.ts +1 -1
  146. package/dist/features/inapp/surfaces/hotspot.js +2 -2
  147. package/dist/features/inapp/surfaces/inline.d.ts +4 -4
  148. package/dist/features/inapp/surfaces/inline.js +11 -11
  149. package/dist/features/inapp/surfaces/launcher.d.ts +1 -1
  150. package/dist/features/inapp/surfaces/modal.d.ts +1 -1
  151. package/dist/features/inapp/surfaces/modal.js +2 -2
  152. package/dist/features/inapp/surfaces/mount.d.ts +4 -4
  153. package/dist/features/inapp/surfaces/mount.js +4 -4
  154. package/dist/features/inapp/surfaces/palette.d.ts +1 -1
  155. package/dist/features/inapp/surfaces/palette.js +1 -1
  156. package/dist/features/inapp/surfaces/panel.d.ts +1 -1
  157. package/dist/features/inapp/surfaces/popover.d.ts +1 -1
  158. package/dist/features/inapp/surfaces/popover.js +2 -2
  159. package/dist/features/inapp/surfaces/render.d.ts +4 -4
  160. package/dist/features/inapp/surfaces/render.d.ts.map +1 -1
  161. package/dist/features/inapp/surfaces/render.js +23 -19
  162. package/dist/features/inapp/surfaces/render.js.map +1 -1
  163. package/dist/features/inapp/surfaces/slideover.d.ts +1 -1
  164. package/dist/features/inapp/surfaces/slideover.js +1 -1
  165. package/dist/features/inapp/surfaces/styles.js +179 -179
  166. package/dist/features/inapp/surfaces/surface.d.ts +4 -4
  167. package/dist/features/inapp/surfaces/surface.js +2 -2
  168. package/dist/features/inapp/surfaces/takeover.d.ts +1 -1
  169. package/dist/features/inapp/surfaces/takeover.js +2 -2
  170. package/dist/features/inapp/surfaces/toast.d.ts +1 -1
  171. package/dist/features/inapp/surfaces/toast.js +1 -1
  172. package/dist/features/inapp/surfaces/toolbar.d.ts +1 -1
  173. package/dist/features/inapp/surfaces/toolbar.js +2 -2
  174. package/dist/features/inapp/surfaces/tour.d.ts +1 -1
  175. package/dist/features/inapp/surfaces/tour.js +5 -5
  176. package/dist/features/inbox/InboxFeature.d.ts +1 -1
  177. package/dist/features/inbox/InboxFeature.js +5 -5
  178. package/dist/features/inbox/runtime.d.ts +2 -2
  179. package/dist/features/inbox/runtime.js +3 -3
  180. package/dist/features/inbox/store.d.ts +1 -1
  181. package/dist/features/inbox/sync.d.ts +2 -2
  182. package/dist/features/inbox/sync.js +1 -1
  183. package/dist/features/inbox/widget/InboxWidget.d.ts +1 -1
  184. package/dist/features/inbox/widget/InboxWidget.js +85 -85
  185. package/dist/features/journey/InteractionTracker.js +1 -1
  186. package/dist/features/journey/JourneyFeature.js +3 -3
  187. package/dist/features/manifest.d.ts +1 -1
  188. package/dist/features/manifest.js +18 -18
  189. package/dist/features/network/NetworkFeature.d.ts +1 -1
  190. package/dist/features/network/NetworkFeature.js +10 -10
  191. package/dist/features/network/capture/body.d.ts +1 -1
  192. package/dist/features/network/capture/body.js +1 -1
  193. package/dist/features/network/classify.d.ts +1 -1
  194. package/dist/features/network/fetchInterceptor.d.ts +1 -1
  195. package/dist/features/network/fetchInterceptor.js +1 -1
  196. package/dist/features/network/intercept/beacon.d.ts +1 -1
  197. package/dist/features/network/intercept/sse.d.ts +1 -1
  198. package/dist/features/network/intercept/streams.d.ts +4 -4
  199. package/dist/features/network/intercept/streams.js +3 -3
  200. package/dist/features/network/intercept/websocket.d.ts +1 -1
  201. package/dist/features/network/lazy.d.ts +3 -3
  202. package/dist/features/network/lazy.js +2 -2
  203. package/dist/features/network/normalize.d.ts +1 -1
  204. package/dist/features/network/normalize.js +3 -3
  205. package/dist/features/network/parse/graphql.d.ts +1 -1
  206. package/dist/features/network/sampler.js +1 -1
  207. package/dist/features/network/timing.d.ts +1 -1
  208. package/dist/features/network/xhrInterceptor.d.ts +1 -1
  209. package/dist/features/network/xhrInterceptor.js +1 -1
  210. package/dist/features/performance/PerformanceFeature.d.ts +2 -2
  211. package/dist/features/performance/PerformanceFeature.js +11 -11
  212. package/dist/features/performance/longTasks.js +1 -1
  213. package/dist/features/performance/normalize.js +1 -1
  214. package/dist/features/performance/sampler.js +1 -1
  215. package/dist/features/performance/trace/index.d.ts +4 -4
  216. package/dist/features/performance/trace/index.js +3 -3
  217. package/dist/features/performance/trace/pageload.d.ts +1 -1
  218. package/dist/features/performance/trace/pageload.js +1 -1
  219. package/dist/features/performance/trace/transaction.d.ts +2 -2
  220. package/dist/features/performance/trace/transaction.js +2 -2
  221. package/dist/features/profiler/ProfilerFeature.js +1 -1
  222. package/dist/features/push/PushFeature.d.ts +4 -4
  223. package/dist/features/push/PushFeature.js +3 -3
  224. package/dist/features/push/softAsk.d.ts +1 -1
  225. package/dist/features/push/softAsk.js +26 -26
  226. package/dist/features/replay/ReplayFeature.d.ts +1 -1
  227. package/dist/features/replay/ReplayFeature.js +12 -12
  228. package/dist/features/replay/engine/canvas.d.ts +2 -2
  229. package/dist/features/replay/engine/crossOrigin.d.ts +1 -1
  230. package/dist/features/replay/engine/crossOrigin.js +3 -3
  231. package/dist/features/replay/engine/cssom.d.ts +2 -2
  232. package/dist/features/replay/engine/iframe.d.ts +2 -2
  233. package/dist/features/replay/engine/iframe.js +3 -3
  234. package/dist/features/replay/engine/interactions.d.ts +1 -1
  235. package/dist/features/replay/engine/interactions.js +1 -1
  236. package/dist/features/replay/engine/mutations.d.ts +3 -3
  237. package/dist/features/replay/engine/mutations.js +2 -2
  238. package/dist/features/replay/engine/player.d.ts +2 -2
  239. package/dist/features/replay/engine/player.js +1 -1
  240. package/dist/features/replay/engine/rebuild.d.ts +1 -1
  241. package/dist/features/replay/engine/replayWorker.js +16 -16
  242. package/dist/features/replay/engine/resources.d.ts +1 -1
  243. package/dist/features/replay/engine/resources.js +1 -1
  244. package/dist/features/replay/engine/snapshot.d.ts +2 -2
  245. package/dist/features/replay/engine/snapshot.js +1 -1
  246. package/dist/features/replay/engine/traverse.d.ts +1 -1
  247. package/dist/features/replay/lifecycle/recorder.d.ts +1 -1
  248. package/dist/features/replay/lifecycle/recorder.js +20 -20
  249. package/dist/features/replay/lifecycle/sampling.js +1 -1
  250. package/dist/features/replay/lifecycle/viewContext.js +1 -1
  251. package/dist/features/scroll/index.js +1 -1
  252. package/dist/features/session/sessionManager.d.ts +1 -1
  253. package/dist/features/session/sessionManager.js +2 -2
  254. package/dist/features/session/sessionStore.js +1 -1
  255. package/dist/features/watchdog/WatchdogFeature.d.ts +1 -1
  256. package/dist/features/watchdog/WatchdogFeature.js +1 -1
  257. package/dist/features/watchdog/collectors.d.ts +1 -1
  258. package/dist/features/watchdog/collectors.js +1 -1
  259. package/dist/features/watchdog/engine.js +8 -8
  260. package/dist/features/watchdog/incidents.d.ts +1 -1
  261. package/dist/features/watchdog/incidents.js +1 -1
  262. package/dist/features/watchdog/rollup.d.ts +1 -1
  263. package/dist/features/watchdog/rollup.js +1 -1
  264. package/dist/features/webVitals/WebVitalsFeature.js +4 -4
  265. package/dist/features/webVitals/observe.d.ts +1 -1
  266. package/dist/features/webVitals/observe.js +1 -1
  267. package/dist/features/webperf/WebPerfFeature.d.ts +1 -1
  268. package/dist/features/webperf/WebPerfFeature.js +3 -3
  269. package/dist/features/webperf/collectors.js +1 -1
  270. package/dist/inapp.d.ts +1 -1
  271. package/dist/inapp.js +1 -1
  272. package/dist/index.d.ts +3 -3
  273. package/dist/index.js +1 -1
  274. package/dist/pipeline/index.d.ts +1 -1
  275. package/dist/pipeline/index.js +1 -1
  276. package/dist/pipeline/pipeline.d.ts +3 -3
  277. package/dist/pipeline/pipeline.js +4 -4
  278. package/dist/public/ScaleBunFacade.d.ts +18 -18
  279. package/dist/public/ScaleBunFacade.js +11 -11
  280. package/dist/public/index.d.ts +4 -4
  281. package/dist/public/index.js +2 -2
  282. package/dist/scalebun-push-sw.js +236 -236
  283. package/dist/scalebun.min.js +17 -17
  284. package/dist/scalebun.min.js.map +4 -4
  285. package/dist/storage/index.d.ts +1 -1
  286. package/dist/storage/index.js +1 -1
  287. package/dist/transport/httpClient.d.ts +1 -1
  288. package/dist/transport/httpClient.js +3 -3
  289. package/dist/transport/index.d.ts +1 -1
  290. package/dist/transport/index.js +1 -1
  291. package/package.json +7 -7
@@ -3,11 +3,11 @@
3
3
  * Auto path (window.onerror + unhandledrejection) is throttled (anti-flood); the manual path
4
4
  * (captureError) is NOT — it's dev-intentional, not a loop.
5
5
  */
6
- import { toErrorItem } from './normalize';
7
- import { ErrorThrottle } from './dedup';
8
- import { resolveScope } from './scope';
9
- import { shouldSampleErrors } from './sampling';
10
- import { breadcrumbs } from '../../core';
6
+ import { toErrorItem } from './normalize.js';
7
+ import { ErrorThrottle } from './dedup.js';
8
+ import { resolveScope } from './scope.js';
9
+ import { shouldSampleErrors } from './sampling.js';
10
+ import { breadcrumbs } from '../../core/index.js';
11
11
  const noParse = () => [];
12
12
  function firstFrame(stack) {
13
13
  if (!stack)
@@ -65,7 +65,7 @@ export class ErrorsFeature {
65
65
  // Per-session sampling gates only the AUTO firehose; manual captureError always works.
66
66
  this.sampled = shouldSampleErrors(opts?.sampleRate, ctx.sessionId);
67
67
  // Load the enrichment chunk now (at init), so it's ready well before the first error.
68
- void import('./lazy')
68
+ void import('./lazy.js')
69
69
  .then((m) => {
70
70
  this.parseStack = m.parseStack;
71
71
  this.computeFingerprint = m.computeFingerprint;
@@ -1,4 +1,4 @@
1
- import { fnv1a32 } from '../../config/bucketing';
1
+ import { fnv1a32 } from '../../config/bucketing.js';
2
2
  const MAX_FP_FRAMES = 5; // top N frames define the group
3
3
  /** Drop the scheme://host from a URL file (keep the path) so the same error on staging vs prod —
4
4
  * or behind a CDN — fingerprints identically. Non-URL files (native, <anonymous>, relative) pass through. */
@@ -2,7 +2,7 @@
2
2
  * The error-enrichment helpers, bundled into ONE lazy chunk (loaded once in ErrorsFeature.setup) so
3
3
  * the parser + fingerprint (+ fnv1a) stay out of the core bundle. Add new heavy enrichers here.
4
4
  */
5
- export { parseStack } from './parse/stacktrace';
6
- export { computeFingerprint } from './group/fingerprint';
7
- export { extractCauses } from './causes';
5
+ export { parseStack } from './parse/stacktrace.js';
6
+ export { computeFingerprint } from './group/fingerprint.js';
7
+ export { extractCauses } from './causes.js';
8
8
  //# sourceMappingURL=lazy.d.ts.map
@@ -2,7 +2,7 @@
2
2
  * The error-enrichment helpers, bundled into ONE lazy chunk (loaded once in ErrorsFeature.setup) so
3
3
  * the parser + fingerprint (+ fnv1a) stay out of the core bundle. Add new heavy enrichers here.
4
4
  */
5
- export { parseStack } from './parse/stacktrace';
6
- export { computeFingerprint } from './group/fingerprint';
7
- export { extractCauses } from './causes';
5
+ export { parseStack } from './parse/stacktrace.js';
6
+ export { computeFingerprint } from './group/fingerprint.js';
7
+ export { extractCauses } from './causes.js';
8
8
  //# sourceMappingURL=lazy.js.map
@@ -1,7 +1,7 @@
1
1
  /** Builds a contract `error` Item from a raw browser error. Shared by the auto + manual paths. */
2
2
  import type { ErrorItem, StackFrame } from '@scalebun/protocol';
3
- import type { ResolvedScope } from './scope';
4
- import type { Cause } from './causes';
3
+ import type { ResolvedScope } from './scope.js';
4
+ import type { Cause } from './causes.js';
5
5
  /** How an error reached the SDK — provenance for the dashboard (handled vs unhandled vs resource). */
6
6
  export type ErrorMechanism = 'onerror' | 'onunhandledrejection' | 'captureError' | 'resource';
7
7
  export interface RawError {
@@ -1,6 +1,6 @@
1
1
  /** Builds a contract `error` Item from a raw browser error. Shared by the auto + manual paths. */
2
- import { uuid, now, scrubText, breadcrumbs, getReplayCoord } from '../../core';
3
- import { scrubStack, scrubExtra } from './redact';
2
+ import { uuid, now, scrubText, breadcrumbs, getReplayCoord } from '../../core/index.js';
3
+ import { scrubStack, scrubExtra } from './redact.js';
4
4
  const MAX_STACK = 16 * 1024; // protect payloads from pathological stacks
5
5
  export function toErrorItem(raw, enrich = {}) {
6
6
  const { droppedSince = 0, extra, frames, fingerprint, causes, scope } = enrich;
@@ -5,7 +5,7 @@
5
5
  * those intact), so we strip only emails + URL query strings — never the opaque-token pass.
6
6
  * - `scrubExtra`: scrub user-supplied `extra`/context string values (these ARE free-text PII).
7
7
  */
8
- import { scrubText } from '../../core';
8
+ import { scrubText } from '../../core/index.js';
9
9
  /** Scrub a stack conservatively: emails + URL query strings (which can carry tokens/PII), while
10
10
  * preserving `:line:col` and minified frame names so issue-grouping stays stable. */
11
11
  export function scrubStack(stack) {
@@ -7,7 +7,7 @@
7
7
  * Most apps should leave this at 1 and manage volume via grouping / `ignoreErrors` / `beforeSend`;
8
8
  * sampling trades error completeness for cost and should be an explicit choice.
9
9
  */
10
- import { bucketOf } from '../config/bucketing';
10
+ import { bucketOf } from '../config/bucketing.js';
11
11
  // NOTE: keeps the legacy `wzb-` prefix on purpose. This salt is a bucketing input, not
12
12
  // branding — nobody ever sees it, and changing the string reshuffles which sessions are
13
13
  // sampled. It was left untouched by the ScaleBun rebrand for that reason.
@@ -10,7 +10,7 @@ export class ExitIntentFeature {
10
10
  if (typeof window === 'undefined' || typeof document === 'undefined')
11
11
  return;
12
12
  this.active = true;
13
- const { startExitIntent } = await import('./engine');
13
+ const { startExitIntent } = await import('./engine.js');
14
14
  // Host-supplied thresholds (config.exitIntent) override REVERSAL_DEFAULTS per key; undefined = defaults.
15
15
  if (!this.active)
16
16
  return; // torn down while the chunk loaded
@@ -1,4 +1,4 @@
1
- import { scrollDepthPct } from '../../core/scrollDepth';
1
+ import { scrollDepthPct } from '../../core/scrollDepth.js';
2
2
  export const EXIT_WEIGHTS = {
3
3
  top_exit: 0.8, // pointer leaves the document at the top edge (toward the tab bar/URL)
4
4
  scroll_reversal: 0.5, // fast scroll-up after having scrolled down (works on touch)
@@ -19,7 +19,7 @@
19
19
  * VOLUME: terminal-summary model — `$form_start` plus ONE terminal event (`$submit` enriched, or
20
20
  * `$form_abandon`) carrying a per-field summary. ~2–3 events per form, not one per field.
21
21
  */
22
- import { scrubText } from '../../core';
22
+ import { scrubText } from '../../core/index.js';
23
23
  /** Inputs we never observe at all — not even metadata. */
24
24
  const SENSITIVE_TYPES = new Set(['password', 'hidden']);
25
25
  const SENSITIVE_AUTOCOMPLETE = /(^|\s|-)(cc-|new-password|current-password|one-time-code)/i;
@@ -12,7 +12,7 @@ export class InApp2Feature {
12
12
  if (!ctx.clientKey || !ctx.apiBaseUrl)
13
13
  return;
14
14
  this.active = true;
15
- const { InAppEngine } = await import('./core/engine');
15
+ const { InAppEngine } = await import('./core/engine.js');
16
16
  if (!this.active)
17
17
  return; // torn down while the chunk loaded
18
18
  this.engine = new InAppEngine({
@@ -1,5 +1,5 @@
1
- import { ObserverHub } from '../../coach/observers';
2
- import type { AnchorSpec, Placement, PositionResult } from '../../coach/types';
1
+ import { ObserverHub } from '../../coach/observers.js';
2
+ import type { AnchorSpec, Placement, PositionResult } from '../../coach/types.js';
3
3
  export interface LiveAnchorHooks {
4
4
  /** Apply the computed position to the surface (x/y in viewport coords). */
5
5
  onReposition(pos: PositionResult, anchorEl: Element): void;
@@ -12,9 +12,9 @@
12
12
  * vanishes and can't be re-found within a grace window, it calls `onLost` so the surface can degrade
13
13
  * gracefully (e.g. fall back to a toast) instead of floating in a dead spot.
14
14
  */
15
- import { resolveAnchor, didHeal } from '../../coach/anchor';
16
- import { computePosition } from '../../coach/position';
17
- import { ObserverHub } from '../../coach/observers';
15
+ import { resolveAnchor, didHeal } from '../../coach/anchor.js';
16
+ import { computePosition } from '../../coach/position.js';
17
+ import { ObserverHub } from '../../coach/observers.js';
18
18
  function viewportRect() {
19
19
  const w = typeof innerWidth !== 'undefined' ? innerWidth : 1024;
20
20
  const h = typeof innerHeight !== 'undefined' ? innerHeight : 768;
@@ -9,11 +9,11 @@
9
9
  * The engine (later) uses the same `render` path; adapters use `registerSlot`. One code path, many
10
10
  * front-ends.
11
11
  */
12
- import { ShadowHost, type ThemeMode } from './core/host';
13
- import { SlotRegistry } from './core/slots';
14
- import { type RenderedSurface } from './surfaces/render';
15
- import type { SurfaceHooks } from './surfaces/surface';
16
- import type { Variant } from './types';
12
+ import { ShadowHost, type ThemeMode } from './core/host.js';
13
+ import { SlotRegistry } from './core/slots.js';
14
+ import { type RenderedSurface } from './surfaces/render.js';
15
+ import type { SurfaceHooks } from './surfaces/surface.js';
16
+ import type { Variant } from './types.js';
17
17
  /** No-op hooks so callers can render without wiring analytics (e.g. dashboard preview). */
18
18
  export declare function noopHooks(): SurfaceHooks;
19
19
  export declare class InAppHeadless {
@@ -9,9 +9,9 @@
9
9
  * The engine (later) uses the same `render` path; adapters use `registerSlot`. One code path, many
10
10
  * front-ends.
11
11
  */
12
- import { ShadowHost } from './core/host';
13
- import { SlotRegistry } from './core/slots';
14
- import { renderVariant } from './surfaces/render';
12
+ import { ShadowHost } from './core/host.js';
13
+ import { SlotRegistry } from './core/slots.js';
14
+ import { renderVariant } from './surfaces/render.js';
15
15
  /** No-op hooks so callers can render without wiring analytics (e.g. dashboard preview). */
16
16
  export function noopHooks() {
17
17
  return { onImpression() { }, onView() { }, onCtaClick() { }, onInteraction() { }, onDismiss() { } };
@@ -10,7 +10,7 @@
10
10
  * Safety: text is always written via `textContent`/text nodes (the DOM escapes it) — never innerHTML.
11
11
  * Zero-dependency; the caller supplies the `Document` so it's jsdom-testable and SSR-inert.
12
12
  */
13
- import type { BlockKind, ContentBlock } from '../types';
13
+ import type { BlockKind, ContentBlock } from '../types.js';
14
14
  export interface BlockAction {
15
15
  action: string;
16
16
  label?: string;
@@ -1,4 +1,4 @@
1
- import { npsRenderer, ratingRenderer, emojiRenderer, pollRenderer, quizRenderer } from './feedback';
1
+ import { npsRenderer, ratingRenderer, emojiRenderer, pollRenderer, quizRenderer } from './feedback.js';
2
2
  const str = (v, fallback = '') => (typeof v === 'string' ? v : v == null ? fallback : String(v));
3
3
  /** Set multi-line text safely: text nodes + <br>, never innerHTML. */
4
4
  function setMultiline(el, text, doc) {
@@ -4,7 +4,7 @@
4
4
  * a poll shows the tally the server sends (`props.results`), a quiz reveals correctness only from the
5
5
  * server's `props.outcome`. The SDK never ships an answer key or computes results locally.
6
6
  */
7
- import type { BlockRenderer } from './blocks';
7
+ import type { BlockRenderer } from './blocks.js';
8
8
  export declare const npsRenderer: BlockRenderer;
9
9
  export declare const ratingRenderer: BlockRenderer;
10
10
  export declare const emojiRenderer: BlockRenderer;
@@ -3,6 +3,6 @@
3
3
  * prev/next. Each slide: optional image + title + text. CSS scroll-snap does the heavy lifting (no JS
4
4
  * animation), so it's smooth + reduced-motion friendly. Safe DOM; own lazy chunk.
5
5
  */
6
- import type { BlockRenderer } from '../blocks';
6
+ import type { BlockRenderer } from '../blocks.js';
7
7
  export declare const carouselRenderer: BlockRenderer;
8
8
  //# sourceMappingURL=carousel.d.ts.map
@@ -2,7 +2,7 @@
2
2
  * Heavy blocks: chart / sparkline / stat (P3.6). SVG-based, zero-dependency mini visualizations for
3
3
  * usage insights ("you used 82% of your limit"). Own lazy chunk.
4
4
  */
5
- import type { BlockRenderer } from '../blocks';
5
+ import type { BlockRenderer } from '../blocks.js';
6
6
  export declare const sparklineRenderer: BlockRenderer;
7
7
  export declare const statRenderer: BlockRenderer;
8
8
  export declare const chartRenderer: BlockRenderer;
@@ -3,6 +3,6 @@
3
3
  * fallback). No syntax-highlighting library — zero-dependency by design; a language label is shown.
4
4
  * Text is set via textContent (safe). Own lazy chunk.
5
5
  */
6
- import type { BlockRenderer } from '../blocks';
6
+ import type { BlockRenderer } from '../blocks.js';
7
7
  export declare const codeRenderer: BlockRenderer;
8
8
  //# sourceMappingURL=code.d.ts.map
@@ -4,6 +4,6 @@
4
4
  * of animating). Self-cleaning: the rAF loop stops when particles settle or the element leaves the
5
5
  * DOM. Zero-dependency; own lazy chunk.
6
6
  */
7
- import type { BlockRenderer } from '../blocks';
7
+ import type { BlockRenderer } from '../blocks.js';
8
8
  export declare const confettiRenderer: BlockRenderer;
9
9
  //# sourceMappingURL=confetti.d.ts.map
@@ -4,6 +4,6 @@
4
4
  * once the element leaves the DOM (surface closed), so it never leaks. Reduced-motion just skips the
5
5
  * pulse. Zero-dependency; own lazy chunk.
6
6
  */
7
- import type { BlockRenderer } from '../blocks';
7
+ import type { BlockRenderer } from '../blocks.js';
8
8
  export declare const countdownRenderer: BlockRenderer;
9
9
  //# sourceMappingURL=countdown.d.ts.map
@@ -3,7 +3,7 @@
3
3
  * into the shared BLOCK_RENDERERS only when a variant actually uses it — pay-per-capability. The engine
4
4
  * calls `ensureHeavyBlocks(variant's kinds)` before rendering; `renderBlocks` then picks them up.
5
5
  */
6
- import type { BlockKind } from '../../types';
6
+ import type { BlockKind } from '../../types.js';
7
7
  export declare const HEAVY_BLOCK_KINDS: BlockKind[];
8
8
  export declare function isHeavyBlock(kind: BlockKind): boolean;
9
9
  /** Lazy-load + register every requested heavy block that isn't already available. Idempotent. */
@@ -1,27 +1,27 @@
1
- import { BLOCK_RENDERERS } from '../blocks';
1
+ import { BLOCK_RENDERERS } from '../blocks.js';
2
2
  const HEAVY_LOADERS = {
3
- markdown: () => import('./markdown').then((m) => m.markdownRenderer),
4
- code: () => import('./code').then((m) => m.codeRenderer),
5
- chart: () => import('./chart').then((m) => m.chartRenderer),
6
- sparkline: () => import('./chart').then((m) => m.sparklineRenderer),
7
- stat: () => import('./chart').then((m) => m.statRenderer),
8
- table: () => import('./table').then((m) => m.tableRenderer),
9
- video: () => import('./video').then((m) => m.videoRenderer),
3
+ markdown: () => import('./markdown.js').then((m) => m.markdownRenderer),
4
+ code: () => import('./code.js').then((m) => m.codeRenderer),
5
+ chart: () => import('./chart.js').then((m) => m.chartRenderer),
6
+ sparkline: () => import('./chart.js').then((m) => m.sparklineRenderer),
7
+ stat: () => import('./chart.js').then((m) => m.statRenderer),
8
+ table: () => import('./table.js').then((m) => m.tableRenderer),
9
+ video: () => import('./video.js').then((m) => m.videoRenderer),
10
10
  // mechanic blocks (full-fidelity plan)
11
- countdown: () => import('./countdown').then((m) => m.countdownRenderer),
12
- carousel: () => import('./carousel').then((m) => m.carouselRenderer),
13
- 'product-grid': () => import('./productgrid').then((m) => m.productGridRenderer),
14
- confetti: () => import('./confetti').then((m) => m.confettiRenderer),
15
- spinwheel: () => import('./spinwheel').then((m) => m.spinwheelRenderer),
16
- scratch: () => import('./scratch').then((m) => m.scratchRenderer),
17
- slot: () => import('./slot').then((m) => m.slotRenderer),
18
- qr: () => import('./qr').then((m) => m.qrRenderer),
11
+ countdown: () => import('./countdown.js').then((m) => m.countdownRenderer),
12
+ carousel: () => import('./carousel.js').then((m) => m.carouselRenderer),
13
+ 'product-grid': () => import('./productgrid.js').then((m) => m.productGridRenderer),
14
+ confetti: () => import('./confetti.js').then((m) => m.confettiRenderer),
15
+ spinwheel: () => import('./spinwheel.js').then((m) => m.spinwheelRenderer),
16
+ scratch: () => import('./scratch.js').then((m) => m.scratchRenderer),
17
+ slot: () => import('./slot.js').then((m) => m.slotRenderer),
18
+ qr: () => import('./qr.js').then((m) => m.qrRenderer),
19
19
  // streak / daily check-in day cells. Lazy because only 2 of 100 variants use it and core has
20
20
  // ~560 B of headroom against the 32 KB gate.
21
- streak: () => import('./streak').then((m) => m.streakRenderer),
21
+ streak: () => import('./streak.js').then((m) => m.streakRenderer),
22
22
  // multiStepSheet's wizard paging. A block, not a surface: the registry calls that archetype
23
23
  // "a bottom sheet, just wizard-paged", so the container stays slideover[bottom].
24
- steps: () => import('./steps').then((m) => m.stepsRenderer),
24
+ steps: () => import('./steps.js').then((m) => m.stepsRenderer),
25
25
  };
26
26
  export const HEAVY_BLOCK_KINDS = Object.keys(HEAVY_LOADERS);
27
27
  export function isHeavyBlock(kind) {
@@ -4,6 +4,6 @@
4
4
  * innerHTML), so it's XSS-safe by construction. Zero-dependency; ships in its own lazy chunk (a plain
5
5
  * announcement never pays for it).
6
6
  */
7
- import type { BlockRenderer } from '../blocks';
7
+ import type { BlockRenderer } from '../blocks.js';
8
8
  export declare const markdownRenderer: BlockRenderer;
9
9
  //# sourceMappingURL=markdown.d.ts.map
@@ -3,6 +3,6 @@
3
3
  * (image + title + price + optional CTA), for cross-sell, bundles, video-commerce, compare-plans.
4
4
  * Clicking a card emits a select interaction. Safe DOM; own lazy chunk.
5
5
  */
6
- import type { BlockRenderer } from '../blocks';
6
+ import type { BlockRenderer } from '../blocks.js';
7
7
  export declare const productGridRenderer: BlockRenderer;
8
8
  //# sourceMappingURL=productgrid.d.ts.map
@@ -5,6 +5,6 @@
5
5
  * NOTE: a spec-compliant scannable encoder (Reed-Solomon + masking) is a production follow-up; this is
6
6
  * the faithful *preview* representation. Zero-dependency; own lazy chunk.
7
7
  */
8
- import type { BlockRenderer } from '../blocks';
8
+ import type { BlockRenderer } from '../blocks.js';
9
9
  export declare const qrRenderer: BlockRenderer;
10
10
  //# sourceMappingURL=qr.d.ts.map
@@ -3,6 +3,6 @@
3
3
  * **server-provided** prize (`props.prize`) — the outcome never comes from the client. Drag to erase.
4
4
  * Reduced-motion or no-canvas → the prize is shown directly. Zero-dependency; own lazy chunk.
5
5
  */
6
- import type { BlockRenderer } from '../blocks';
6
+ import type { BlockRenderer } from '../blocks.js';
7
7
  export declare const scratchRenderer: BlockRenderer;
8
8
  //# sourceMappingURL=scratch.d.ts.map
@@ -1,4 +1,4 @@
1
- import { showUnavailable, clearUnavailable } from './unavailable';
1
+ import { showUnavailable, clearUnavailable } from './unavailable.js';
2
2
  function reducedMotion() {
3
3
  try {
4
4
  return typeof matchMedia !== 'undefined' && matchMedia('(prefers-reduced-motion: reduce)').matches;
@@ -3,6 +3,6 @@
3
3
  * **server-provided** combo (`props.result` = 3 symbols) — never client-decided. Reduced-motion →
4
4
  * the result is shown without spinning. Zero-dependency; own lazy chunk.
5
5
  */
6
- import type { BlockRenderer } from '../blocks';
6
+ import type { BlockRenderer } from '../blocks.js';
7
7
  export declare const slotRenderer: BlockRenderer;
8
8
  //# sourceMappingURL=slot.d.ts.map
@@ -1,4 +1,4 @@
1
- import { showUnavailable, clearUnavailable } from './unavailable';
1
+ import { showUnavailable, clearUnavailable } from './unavailable.js';
2
2
  const DEFAULT_SYMBOLS = ['🍒', '🔔', '⭐', '7️⃣', '💎', '🍀'];
3
3
  function reducedMotion() {
4
4
  try {
@@ -4,6 +4,6 @@
4
4
  * wheel to land there (no client RNG, so it can't be gamed). Reduced-motion → no spin, reveal result.
5
5
  * Zero-dependency; own lazy chunk.
6
6
  */
7
- import type { BlockRenderer } from '../blocks';
7
+ import type { BlockRenderer } from '../blocks.js';
8
8
  export declare const spinwheelRenderer: BlockRenderer;
9
9
  //# sourceMappingURL=spinwheel.d.ts.map
@@ -1,4 +1,4 @@
1
- import { showUnavailable, clearUnavailable } from './unavailable';
1
+ import { showUnavailable, clearUnavailable } from './unavailable.js';
2
2
  const COLORS = ['#6C5CE7', '#8b7bff', '#5b4bd6', '#a99cff', '#4c3fb0', '#7c6ef0'];
3
3
  const labelOf = (x) => (typeof x === 'string' ? x : String(x?.label ?? ''));
4
4
  function polar(cx, cy, r, deg) {
@@ -13,7 +13,7 @@
13
13
  * Zero-dependency; own lazy chunk. No client state is persisted — a wizard that resumed mid-flow
14
14
  * after a dismiss would contradict the frequency/throttle contract that governs when it may show.
15
15
  */
16
- import type { BlockRenderer } from '../blocks';
16
+ import type { BlockRenderer } from '../blocks.js';
17
17
  /** Labels, resolved with the RN precedence so one authored payload reads the same on both platforms. */
18
18
  export declare function stepLabels(props: Record<string, unknown> | undefined): {
19
19
  back: string;
@@ -13,6 +13,6 @@
13
13
  *
14
14
  * Zero-dependency, own lazy chunk (2 of 100 variants use it, so it must not sit in core).
15
15
  */
16
- import type { BlockRenderer } from '../blocks';
16
+ import type { BlockRenderer } from '../blocks.js';
17
17
  export declare const streakRenderer: BlockRenderer;
18
18
  //# sourceMappingURL=streak.d.ts.map
@@ -2,6 +2,6 @@
2
2
  * Heavy block: table (P3.6). Renders a data/comparison/pricing table from columns + rows. Text via
3
3
  * textContent (safe). Own lazy chunk.
4
4
  */
5
- import type { BlockRenderer } from '../blocks';
5
+ import type { BlockRenderer } from '../blocks.js';
6
6
  export declare const tableRenderer: BlockRenderer;
7
7
  //# sourceMappingURL=table.d.ts.map
@@ -9,7 +9,7 @@
9
9
  * One element, one behaviour: say what happened, and offer a retry only when the host said the
10
10
  * failure was retryable. Lives with the heavy blocks so it costs core nothing.
11
11
  */
12
- import type { BlockOutcome } from '../blocks';
12
+ import type { BlockOutcome } from '../blocks.js';
13
13
  export interface UnavailableOptions {
14
14
  /** Called when the user asks to try again. Only wired when the outcome is retryable. */
15
15
  onRetry?: () => void;
@@ -2,6 +2,6 @@
2
2
  * Heavy block: video (P3.6). Poster + click-to-load — NO autoplay by default (respectful + light: the
3
3
  * <video> element and network fetch happen only on interaction). Own lazy chunk.
4
4
  */
5
- import type { BlockRenderer } from '../blocks';
5
+ import type { BlockRenderer } from '../blocks.js';
6
6
  export declare const videoRenderer: BlockRenderer;
7
7
  //# sourceMappingURL=video.d.ts.map