@spotify-confidence/session-recording 0.18.7 → 0.18.8

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,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.18.8](https://github.com/spotify/confidence-sdk-js/compare/session-recording-v0.18.7...session-recording-v0.18.8) (2026-08-18)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * The following workspace dependencies were updated
9
+ * dependencies
10
+ * @spotify-confidence/csr-common bumped to 0.18.7
11
+ * @spotify-confidence/csr-recorder bumped to 0.17.13
12
+
3
13
  ## [0.18.7](https://github.com/spotify/confidence-sdk-js/compare/session-recording-v0.18.6...session-recording-v0.18.7) (2026-08-18)
4
14
 
5
15
 
package/dist/index.cjs CHANGED
@@ -11128,6 +11128,49 @@ const ALL_CONSOLE_LEVELS = [
11128
11128
  "info"
11129
11129
  ];
11130
11130
  /**
11131
+ * rrweb does not include modifier keys in mouse-interaction events. Capture
11132
+ * the native click first, then add its safe, non-text metadata to the rrweb
11133
+ * event emitted during the same browser event dispatch.
11134
+ */
11135
+ function clickModifiersPlugin() {
11136
+ let pendingClick = null;
11137
+ return {
11138
+ name: "csr/click-modifiers@1",
11139
+ options: {},
11140
+ observer: (_callback, win) => {
11141
+ const onClick = (event) => {
11142
+ const click = event;
11143
+ pendingClick = {
11144
+ button: click.button,
11145
+ altKey: click.altKey,
11146
+ ctrlKey: click.ctrlKey,
11147
+ metaKey: click.metaKey,
11148
+ shiftKey: click.shiftKey
11149
+ };
11150
+ queueMicrotask(() => {
11151
+ pendingClick = null;
11152
+ });
11153
+ };
11154
+ win.addEventListener("click", onClick, true);
11155
+ return () => win.removeEventListener("click", onClick, true);
11156
+ },
11157
+ eventProcessor: (event) => {
11158
+ if (pendingClick && event.type === EventType.IncrementalSnapshot && event.data.source === IncrementalSource.MouseInteraction && event.data.type === MouseInteractions.Click) {
11159
+ const click = pendingClick;
11160
+ pendingClick = null;
11161
+ return {
11162
+ ...event,
11163
+ data: {
11164
+ ...event.data,
11165
+ ...click
11166
+ }
11167
+ };
11168
+ }
11169
+ return event;
11170
+ }
11171
+ };
11172
+ }
11173
+ /**
11131
11174
  * rrweb adapter — bundles rrweb so consumers don't take a peer-dep on it.
11132
11175
  */
11133
11176
  var RrwebEngine = class {
@@ -11135,7 +11178,7 @@ var RrwebEngine = class {
11135
11178
  start(config, onEvent) {
11136
11179
  const maskSelectors = config.maskSelectors ?? DEFAULT_MASK_SELECTORS;
11137
11180
  const blockSelectors = config.blockSelectors ?? DEFAULT_BLOCK_SELECTORS;
11138
- const plugins = [];
11181
+ const plugins = [clickModifiersPlugin()];
11139
11182
  const { captureConsoleLogs } = config;
11140
11183
  if (captureConsoleLogs) {
11141
11184
  const levels = captureConsoleLogs === true ? ALL_CONSOLE_LEVELS : captureConsoleLogs.levels;
@@ -11207,7 +11250,7 @@ function observeFlags(onFlagWrite) {
11207
11250
  }
11208
11251
  //#endregion
11209
11252
  //#region src/version.ts
11210
- const SDK_VERSION = "0.18.7";
11253
+ const SDK_VERSION = "0.18.8";
11211
11254
  //#endregion
11212
11255
  //#region src/index.ts
11213
11256
  const DEFAULT_API_URL = "https://recording.confidence.dev";
package/dist/index.js CHANGED
@@ -11109,6 +11109,49 @@ const ALL_CONSOLE_LEVELS = [
11109
11109
  "info"
11110
11110
  ];
11111
11111
  /**
11112
+ * rrweb does not include modifier keys in mouse-interaction events. Capture
11113
+ * the native click first, then add its safe, non-text metadata to the rrweb
11114
+ * event emitted during the same browser event dispatch.
11115
+ */
11116
+ function clickModifiersPlugin() {
11117
+ let pendingClick = null;
11118
+ return {
11119
+ name: "csr/click-modifiers@1",
11120
+ options: {},
11121
+ observer: (_callback, win) => {
11122
+ const onClick = (event) => {
11123
+ const click = event;
11124
+ pendingClick = {
11125
+ button: click.button,
11126
+ altKey: click.altKey,
11127
+ ctrlKey: click.ctrlKey,
11128
+ metaKey: click.metaKey,
11129
+ shiftKey: click.shiftKey
11130
+ };
11131
+ queueMicrotask(() => {
11132
+ pendingClick = null;
11133
+ });
11134
+ };
11135
+ win.addEventListener("click", onClick, true);
11136
+ return () => win.removeEventListener("click", onClick, true);
11137
+ },
11138
+ eventProcessor: (event) => {
11139
+ if (pendingClick && event.type === EventType.IncrementalSnapshot && event.data.source === IncrementalSource.MouseInteraction && event.data.type === MouseInteractions.Click) {
11140
+ const click = pendingClick;
11141
+ pendingClick = null;
11142
+ return {
11143
+ ...event,
11144
+ data: {
11145
+ ...event.data,
11146
+ ...click
11147
+ }
11148
+ };
11149
+ }
11150
+ return event;
11151
+ }
11152
+ };
11153
+ }
11154
+ /**
11112
11155
  * rrweb adapter — bundles rrweb so consumers don't take a peer-dep on it.
11113
11156
  */
11114
11157
  var RrwebEngine = class {
@@ -11116,7 +11159,7 @@ var RrwebEngine = class {
11116
11159
  start(config, onEvent) {
11117
11160
  const maskSelectors = config.maskSelectors ?? DEFAULT_MASK_SELECTORS;
11118
11161
  const blockSelectors = config.blockSelectors ?? DEFAULT_BLOCK_SELECTORS;
11119
- const plugins = [];
11162
+ const plugins = [clickModifiersPlugin()];
11120
11163
  const { captureConsoleLogs } = config;
11121
11164
  if (captureConsoleLogs) {
11122
11165
  const levels = captureConsoleLogs === true ? ALL_CONSOLE_LEVELS : captureConsoleLogs.levels;
@@ -11188,7 +11231,7 @@ function observeFlags(onFlagWrite) {
11188
11231
  }
11189
11232
  //#endregion
11190
11233
  //#region src/version.ts
11191
- const SDK_VERSION = "0.18.7";
11234
+ const SDK_VERSION = "0.18.8";
11192
11235
  //#endregion
11193
11236
  //#region src/index.ts
11194
11237
  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.7",
4
+ "version": "0.18.8",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/spotify/confidence-sdk-js.git",
@@ -41,8 +41,8 @@
41
41
  }
42
42
  },
43
43
  "dependencies": {
44
- "@spotify-confidence/csr-common": "0.18.6",
45
- "@spotify-confidence/csr-recorder": "0.17.12"
44
+ "@spotify-confidence/csr-common": "0.18.7",
45
+ "@spotify-confidence/csr-recorder": "0.17.13"
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.7';
1
+ export const SDK_VERSION = '0.18.8';