@spotify-confidence/session-recording 0.18.9 → 0.18.10

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.18.10](https://github.com/spotify/confidence-sdk-js/compare/session-recording-v0.18.9...session-recording-v0.18.10) (2026-08-20)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * The following workspace dependencies were updated
9
+ * dependencies
10
+ * @spotify-confidence/csr-recorder bumped to 0.17.15
11
+
3
12
  ## [0.18.9](https://github.com/spotify/confidence-sdk-js/compare/session-recording-v0.18.8...session-recording-v0.18.9) (2026-08-20)
4
13
 
5
14
 
package/dist/index.cjs CHANGED
@@ -83,6 +83,7 @@ var Recorder = class Recorder {
83
83
  onEvent;
84
84
  state = "idle";
85
85
  visibilityHandler = null;
86
+ pageShowHandler = null;
86
87
  originalFetch = null;
87
88
  originalXhrOpen = null;
88
89
  originalXhrSend = null;
@@ -128,6 +129,12 @@ var Recorder = class Recorder {
128
129
  };
129
130
  document.addEventListener("visibilitychange", this.visibilityHandler);
130
131
  }
132
+ if (typeof window !== "undefined") {
133
+ this.pageShowHandler = (event) => {
134
+ if (event.persisted) this.engine.takeFullSnapshot();
135
+ };
136
+ window.addEventListener("pageshow", this.pageShowHandler);
137
+ }
131
138
  if (config?.captureNetworkRequests) this.patchNetwork();
132
139
  if (config?.captureRouteChanges !== false) this.patchRouting();
133
140
  }
@@ -314,6 +321,10 @@ var Recorder = class Recorder {
314
321
  document.removeEventListener("visibilitychange", this.visibilityHandler);
315
322
  this.visibilityHandler = null;
316
323
  }
324
+ if (this.pageShowHandler) {
325
+ window.removeEventListener("pageshow", this.pageShowHandler);
326
+ this.pageShowHandler = null;
327
+ }
317
328
  this.restoreNetwork();
318
329
  this.restoreRouting();
319
330
  this.engine.stop();
@@ -11201,6 +11212,9 @@ var RrwebEngine = class {
11201
11212
  slimDOMOptions: "all"
11202
11213
  }) ?? null;
11203
11214
  }
11215
+ takeFullSnapshot() {
11216
+ takeFullSnapshot(true);
11217
+ }
11204
11218
  stop() {
11205
11219
  this.stopFn?.();
11206
11220
  this.stopFn = null;
@@ -11251,7 +11265,7 @@ function observeFlags(onFlagWrite) {
11251
11265
  }
11252
11266
  //#endregion
11253
11267
  //#region src/version.ts
11254
- const SDK_VERSION = "0.18.9";
11268
+ const SDK_VERSION = "0.18.10";
11255
11269
  //#endregion
11256
11270
  //#region src/index.ts
11257
11271
  const DEFAULT_API_URL = "https://recording.confidence.dev";
package/dist/index.js CHANGED
@@ -82,6 +82,7 @@ var Recorder = class Recorder {
82
82
  onEvent;
83
83
  state = "idle";
84
84
  visibilityHandler = null;
85
+ pageShowHandler = null;
85
86
  originalFetch = null;
86
87
  originalXhrOpen = null;
87
88
  originalXhrSend = null;
@@ -127,6 +128,12 @@ var Recorder = class Recorder {
127
128
  };
128
129
  document.addEventListener("visibilitychange", this.visibilityHandler);
129
130
  }
131
+ if (typeof window !== "undefined") {
132
+ this.pageShowHandler = (event) => {
133
+ if (event.persisted) this.engine.takeFullSnapshot();
134
+ };
135
+ window.addEventListener("pageshow", this.pageShowHandler);
136
+ }
130
137
  if (config?.captureNetworkRequests) this.patchNetwork();
131
138
  if (config?.captureRouteChanges !== false) this.patchRouting();
132
139
  }
@@ -313,6 +320,10 @@ var Recorder = class Recorder {
313
320
  document.removeEventListener("visibilitychange", this.visibilityHandler);
314
321
  this.visibilityHandler = null;
315
322
  }
323
+ if (this.pageShowHandler) {
324
+ window.removeEventListener("pageshow", this.pageShowHandler);
325
+ this.pageShowHandler = null;
326
+ }
316
327
  this.restoreNetwork();
317
328
  this.restoreRouting();
318
329
  this.engine.stop();
@@ -11182,6 +11193,9 @@ var RrwebEngine = class {
11182
11193
  slimDOMOptions: "all"
11183
11194
  }) ?? null;
11184
11195
  }
11196
+ takeFullSnapshot() {
11197
+ takeFullSnapshot(true);
11198
+ }
11185
11199
  stop() {
11186
11200
  this.stopFn?.();
11187
11201
  this.stopFn = null;
@@ -11232,7 +11246,7 @@ function observeFlags(onFlagWrite) {
11232
11246
  }
11233
11247
  //#endregion
11234
11248
  //#region src/version.ts
11235
- const SDK_VERSION = "0.18.9";
11249
+ const SDK_VERSION = "0.18.10";
11236
11250
  //#endregion
11237
11251
  //#region src/index.ts
11238
11252
  const DEFAULT_API_URL = "https://recording.confidence.dev";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spotify-confidence/session-recording",
3
3
  "license": "Apache-2.0",
4
- "version": "0.18.9",
4
+ "version": "0.18.10",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/spotify/confidence-sdk-js.git",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@spotify-confidence/csr-common": "0.18.7",
45
- "@spotify-confidence/csr-recorder": "0.17.14"
45
+ "@spotify-confidence/csr-recorder": "0.17.15"
46
46
  },
47
47
  "module": "./dist/index.js",
48
48
  "exports": {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const SDK_VERSION = '0.18.9';
1
+ export const SDK_VERSION = '0.18.10';