@highlight-run/rrweb 2.1.0 → 2.1.3

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 (65) hide show
  1. package/dist/plugins/console-record.js +3 -3
  2. package/dist/plugins/console-record.min.js +3 -3
  3. package/dist/plugins/console-record.min.js.map +1 -1
  4. package/dist/plugins/console-replay.min.js.map +1 -1
  5. package/dist/record/rrweb-record-pack.min.js.map +1 -1
  6. package/dist/record/rrweb-record.js +3 -3
  7. package/dist/record/rrweb-record.min.js +3 -3
  8. package/dist/record/rrweb-record.min.js.map +1 -1
  9. package/dist/replay/rrweb-replay-unpack.js +3 -3
  10. package/dist/replay/rrweb-replay-unpack.min.js +3 -3
  11. package/dist/replay/rrweb-replay-unpack.min.js.map +1 -1
  12. package/dist/replay/rrweb-replay.js +4 -4
  13. package/dist/replay/rrweb-replay.min.js +4 -4
  14. package/dist/replay/rrweb-replay.min.js.map +1 -1
  15. package/dist/rrweb-all.js +9 -9
  16. package/dist/rrweb-all.min.js +9 -9
  17. package/dist/rrweb-all.min.js.map +1 -1
  18. package/dist/rrweb.js +5 -5
  19. package/dist/rrweb.min.js +5 -5
  20. package/dist/rrweb.min.js.map +1 -1
  21. package/es/rrweb/packages/rrweb/src/record/index.js +3 -3
  22. package/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js +4 -2
  23. package/lib/record/rrweb-record.js +6 -4
  24. package/lib/rrweb-all.js +6 -4
  25. package/lib/rrweb.js +6 -4
  26. package/package.json +4 -4
  27. package/typings/entries/all.d.ts +0 -0
  28. package/typings/entries/record-pack.d.ts +0 -0
  29. package/typings/entries/replay-unpack.d.ts +0 -0
  30. package/typings/index.d.ts +0 -0
  31. package/typings/packer/base.d.ts +0 -0
  32. package/typings/packer/index.d.ts +0 -0
  33. package/typings/packer/pack.d.ts +0 -0
  34. package/typings/packer/unpack.d.ts +0 -0
  35. package/typings/plugins/console/record/error-stack-parser.d.ts +0 -0
  36. package/typings/plugins/console/record/index.d.ts +0 -0
  37. package/typings/plugins/console/record/stringify.d.ts +0 -0
  38. package/typings/plugins/console/replay/index.d.ts +0 -0
  39. package/typings/plugins/sequential-id/record/index.d.ts +0 -0
  40. package/typings/plugins/sequential-id/replay/index.d.ts +0 -0
  41. package/typings/record/iframe-manager.d.ts +0 -0
  42. package/typings/record/index.d.ts +0 -0
  43. package/typings/record/mutation.d.ts +0 -0
  44. package/typings/record/observer.d.ts +0 -0
  45. package/typings/record/observers/canvas/2d.d.ts +0 -0
  46. package/typings/record/observers/canvas/canvas-manager.d.ts +0 -0
  47. package/typings/record/observers/canvas/canvas.d.ts +0 -0
  48. package/typings/record/observers/canvas/serialize-args.d.ts +0 -0
  49. package/typings/record/observers/canvas/webgl.d.ts +0 -0
  50. package/typings/record/shadow-dom-manager.d.ts +0 -0
  51. package/typings/record/stylesheet-manager.d.ts +0 -0
  52. package/typings/record/workers/image-bitmap-data-url-worker.d.ts +0 -0
  53. package/typings/replay/canvas/2d.d.ts +0 -0
  54. package/typings/replay/canvas/deserialize-args.d.ts +0 -0
  55. package/typings/replay/canvas/index.d.ts +0 -0
  56. package/typings/replay/canvas/webgl.d.ts +0 -0
  57. package/typings/replay/index.d.ts +0 -0
  58. package/typings/replay/machine.d.ts +0 -0
  59. package/typings/replay/smoothscroll.d.ts +0 -0
  60. package/typings/replay/styles/inject-style.d.ts +0 -0
  61. package/typings/replay/timer.d.ts +0 -0
  62. package/typings/rrdom/index.d.ts +0 -0
  63. package/typings/rrdom/tree-node.d.ts +0 -0
  64. package/typings/types.d.ts +0 -0
  65. package/typings/utils.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { createMirror, snapshot } from '../../../rrweb-snapshot/es/rrweb-snapshot.js';
1
+ import { createMirror, obfuscateText, snapshot } from '../../../rrweb-snapshot/es/rrweb-snapshot.js';
2
2
  import { initObservers, mutationBuffers } from './observer.js';
3
3
  import { polyfill, on, getWindowWidth, getWindowHeight, isSerializedIframe, isSerializedStylesheet, hasShadowRoot } from '../utils.js';
4
4
  import { EventType, IncrementalSource } from '../types.js';
@@ -14,7 +14,7 @@ let wrappedEmit;
14
14
  let takeFullSnapshot;
15
15
  const mirror = createMirror();
16
16
  function record(options = {}) {
17
- const { emit, checkoutEveryNms, checkoutEveryNth, blockClass = 'highlight-block', blockSelector = null, ignoreClass = 'highlight-ignore', maskTextClass = 'highlight-mask', maskTextSelector = null, inlineStylesheet = true, maskAllInputs, maskInputOptions: _maskInputOptions, slimDOMOptions: _slimDOMOptions, maskInputFn, maskTextFn, hooks, packFn, sampling = {}, mousemoveWait, recordCanvas = false, userTriggeredOnInput = false, collectFonts = false, inlineImages = false, plugins, keepIframeSrcFn = () => false, enableStrictPrivacy = false, } = options;
17
+ const { emit, checkoutEveryNms, checkoutEveryNth, blockClass = 'highlight-block', blockSelector = null, ignoreClass = 'highlight-ignore', maskTextClass = 'highlight-mask', maskTextSelector = null, inlineStylesheet = true, maskAllInputs, maskInputOptions: _maskInputOptions, slimDOMOptions: _slimDOMOptions, maskInputFn, maskTextFn = obfuscateText, hooks, packFn, sampling = {}, mousemoveWait, recordCanvas = false, userTriggeredOnInput = false, collectFonts = false, inlineImages = false, plugins, keepIframeSrcFn = () => false, enableStrictPrivacy = false, } = options;
18
18
  if (!emit) {
19
19
  throw new Error('emit function is required');
20
20
  }
@@ -149,7 +149,7 @@ function record(options = {}) {
149
149
  stylesheetManager,
150
150
  canvasManager,
151
151
  keepIframeSrcFn,
152
- enableStrictPrivacy
152
+ enableStrictPrivacy,
153
153
  },
154
154
  mirror,
155
155
  });
@@ -471,6 +471,7 @@ function serializeNode(n, options) {
471
471
  inlineStylesheet: inlineStylesheet,
472
472
  maskInputOptions: maskInputOptions,
473
473
  maskInputFn: maskInputFn,
474
+ maskTextClass: maskTextClass,
474
475
  dataURLOptions: dataURLOptions,
475
476
  inlineImages: inlineImages,
476
477
  recordCanvas: recordCanvas,
@@ -569,8 +570,9 @@ function serializeTextNode(n, options) {
569
570
  };
570
571
  }
571
572
  function serializeElementNode(n, options) {
572
- var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, _b = options.dataURLOptions, dataURLOptions = _b === void 0 ? {} : _b, inlineImages = options.inlineImages, recordCanvas = options.recordCanvas, keepIframeSrcFn = options.keepIframeSrcFn, _c = options.newlyAddedElement, newlyAddedElement = _c === void 0 ? false : _c, enableStrictPrivacy = options.enableStrictPrivacy, rootId = options.rootId;
573
- var needBlock = _isBlockedElement(n, blockClass, blockSelector);
573
+ var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, maskTextClass = options.maskTextClass, _b = options.dataURLOptions, dataURLOptions = _b === void 0 ? {} : _b, inlineImages = options.inlineImages, recordCanvas = options.recordCanvas, keepIframeSrcFn = options.keepIframeSrcFn, _c = options.newlyAddedElement, newlyAddedElement = _c === void 0 ? false : _c, enableStrictPrivacy = options.enableStrictPrivacy, rootId = options.rootId;
574
+ var needBlock = _isBlockedElement(n, blockClass, blockSelector) ||
575
+ _isBlockedElement(n, maskTextClass, blockSelector);
574
576
  var tagName = getValidTagName(n);
575
577
  var attributes = {};
576
578
  var len = n.attributes.length;
@@ -473,6 +473,7 @@ function serializeNode(n, options) {
473
473
  inlineStylesheet: inlineStylesheet,
474
474
  maskInputOptions: maskInputOptions,
475
475
  maskInputFn: maskInputFn,
476
+ maskTextClass: maskTextClass,
476
477
  dataURLOptions: dataURLOptions,
477
478
  inlineImages: inlineImages,
478
479
  recordCanvas: recordCanvas,
@@ -571,8 +572,9 @@ function serializeTextNode(n, options) {
571
572
  };
572
573
  }
573
574
  function serializeElementNode(n, options) {
574
- var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, _b = options.dataURLOptions, dataURLOptions = _b === void 0 ? {} : _b, inlineImages = options.inlineImages, recordCanvas = options.recordCanvas, keepIframeSrcFn = options.keepIframeSrcFn, _c = options.newlyAddedElement, newlyAddedElement = _c === void 0 ? false : _c, enableStrictPrivacy = options.enableStrictPrivacy, rootId = options.rootId;
575
- var needBlock = _isBlockedElement(n, blockClass, blockSelector);
575
+ var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, maskTextClass = options.maskTextClass, _b = options.dataURLOptions, dataURLOptions = _b === void 0 ? {} : _b, inlineImages = options.inlineImages, recordCanvas = options.recordCanvas, keepIframeSrcFn = options.keepIframeSrcFn, _c = options.newlyAddedElement, newlyAddedElement = _c === void 0 ? false : _c, enableStrictPrivacy = options.enableStrictPrivacy, rootId = options.rootId;
576
+ var needBlock = _isBlockedElement(n, blockClass, blockSelector) ||
577
+ _isBlockedElement(n, maskTextClass, blockSelector);
576
578
  var tagName = getValidTagName(n);
577
579
  var attributes = {};
578
580
  var len = n.attributes.length;
@@ -3138,7 +3140,7 @@ let wrappedEmit;
3138
3140
  let takeFullSnapshot;
3139
3141
  const mirror = createMirror();
3140
3142
  function record(options = {}) {
3141
- const { emit, checkoutEveryNms, checkoutEveryNth, blockClass = 'highlight-block', blockSelector = null, ignoreClass = 'highlight-ignore', maskTextClass = 'highlight-mask', maskTextSelector = null, inlineStylesheet = true, maskAllInputs, maskInputOptions: _maskInputOptions, slimDOMOptions: _slimDOMOptions, maskInputFn, maskTextFn, hooks, packFn, sampling = {}, mousemoveWait, recordCanvas = false, userTriggeredOnInput = false, collectFonts = false, inlineImages = false, plugins, keepIframeSrcFn = () => false, enableStrictPrivacy = false, } = options;
3143
+ const { emit, checkoutEveryNms, checkoutEveryNth, blockClass = 'highlight-block', blockSelector = null, ignoreClass = 'highlight-ignore', maskTextClass = 'highlight-mask', maskTextSelector = null, inlineStylesheet = true, maskAllInputs, maskInputOptions: _maskInputOptions, slimDOMOptions: _slimDOMOptions, maskInputFn, maskTextFn = obfuscateText, hooks, packFn, sampling = {}, mousemoveWait, recordCanvas = false, userTriggeredOnInput = false, collectFonts = false, inlineImages = false, plugins, keepIframeSrcFn = () => false, enableStrictPrivacy = false, } = options;
3142
3144
  if (!emit) {
3143
3145
  throw new Error('emit function is required');
3144
3146
  }
@@ -3273,7 +3275,7 @@ function record(options = {}) {
3273
3275
  stylesheetManager,
3274
3276
  canvasManager,
3275
3277
  keepIframeSrcFn,
3276
- enableStrictPrivacy
3278
+ enableStrictPrivacy,
3277
3279
  },
3278
3280
  mirror,
3279
3281
  });
package/lib/rrweb-all.js CHANGED
@@ -475,6 +475,7 @@ function serializeNode(n, options) {
475
475
  inlineStylesheet: inlineStylesheet,
476
476
  maskInputOptions: maskInputOptions,
477
477
  maskInputFn: maskInputFn,
478
+ maskTextClass: maskTextClass,
478
479
  dataURLOptions: dataURLOptions,
479
480
  inlineImages: inlineImages,
480
481
  recordCanvas: recordCanvas,
@@ -573,8 +574,9 @@ function serializeTextNode(n, options) {
573
574
  };
574
575
  }
575
576
  function serializeElementNode(n, options) {
576
- var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, _b = options.dataURLOptions, dataURLOptions = _b === void 0 ? {} : _b, inlineImages = options.inlineImages, recordCanvas = options.recordCanvas, keepIframeSrcFn = options.keepIframeSrcFn, _c = options.newlyAddedElement, newlyAddedElement = _c === void 0 ? false : _c, enableStrictPrivacy = options.enableStrictPrivacy, rootId = options.rootId;
577
- var needBlock = _isBlockedElement(n, blockClass, blockSelector);
577
+ var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, maskTextClass = options.maskTextClass, _b = options.dataURLOptions, dataURLOptions = _b === void 0 ? {} : _b, inlineImages = options.inlineImages, recordCanvas = options.recordCanvas, keepIframeSrcFn = options.keepIframeSrcFn, _c = options.newlyAddedElement, newlyAddedElement = _c === void 0 ? false : _c, enableStrictPrivacy = options.enableStrictPrivacy, rootId = options.rootId;
578
+ var needBlock = _isBlockedElement(n, blockClass, blockSelector) ||
579
+ _isBlockedElement(n, maskTextClass, blockSelector);
578
580
  var tagName = getValidTagName$1(n);
579
581
  var attributes = {};
580
582
  var len = n.attributes.length;
@@ -4103,7 +4105,7 @@ let wrappedEmit;
4103
4105
  let takeFullSnapshot;
4104
4106
  const mirror = createMirror$2();
4105
4107
  function record(options = {}) {
4106
- const { emit, checkoutEveryNms, checkoutEveryNth, blockClass = 'highlight-block', blockSelector = null, ignoreClass = 'highlight-ignore', maskTextClass = 'highlight-mask', maskTextSelector = null, inlineStylesheet = true, maskAllInputs, maskInputOptions: _maskInputOptions, slimDOMOptions: _slimDOMOptions, maskInputFn, maskTextFn, hooks, packFn, sampling = {}, mousemoveWait, recordCanvas = false, userTriggeredOnInput = false, collectFonts = false, inlineImages = false, plugins, keepIframeSrcFn = () => false, enableStrictPrivacy = false, } = options;
4108
+ const { emit, checkoutEveryNms, checkoutEveryNth, blockClass = 'highlight-block', blockSelector = null, ignoreClass = 'highlight-ignore', maskTextClass = 'highlight-mask', maskTextSelector = null, inlineStylesheet = true, maskAllInputs, maskInputOptions: _maskInputOptions, slimDOMOptions: _slimDOMOptions, maskInputFn, maskTextFn = obfuscateText, hooks, packFn, sampling = {}, mousemoveWait, recordCanvas = false, userTriggeredOnInput = false, collectFonts = false, inlineImages = false, plugins, keepIframeSrcFn = () => false, enableStrictPrivacy = false, } = options;
4107
4109
  if (!emit) {
4108
4110
  throw new Error('emit function is required');
4109
4111
  }
@@ -4238,7 +4240,7 @@ function record(options = {}) {
4238
4240
  stylesheetManager,
4239
4241
  canvasManager,
4240
4242
  keepIframeSrcFn,
4241
- enableStrictPrivacy
4243
+ enableStrictPrivacy,
4242
4244
  },
4243
4245
  mirror,
4244
4246
  });
package/lib/rrweb.js CHANGED
@@ -475,6 +475,7 @@ function serializeNode(n, options) {
475
475
  inlineStylesheet: inlineStylesheet,
476
476
  maskInputOptions: maskInputOptions,
477
477
  maskInputFn: maskInputFn,
478
+ maskTextClass: maskTextClass,
478
479
  dataURLOptions: dataURLOptions,
479
480
  inlineImages: inlineImages,
480
481
  recordCanvas: recordCanvas,
@@ -573,8 +574,9 @@ function serializeTextNode(n, options) {
573
574
  };
574
575
  }
575
576
  function serializeElementNode(n, options) {
576
- var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, _b = options.dataURLOptions, dataURLOptions = _b === void 0 ? {} : _b, inlineImages = options.inlineImages, recordCanvas = options.recordCanvas, keepIframeSrcFn = options.keepIframeSrcFn, _c = options.newlyAddedElement, newlyAddedElement = _c === void 0 ? false : _c, enableStrictPrivacy = options.enableStrictPrivacy, rootId = options.rootId;
577
- var needBlock = _isBlockedElement(n, blockClass, blockSelector);
577
+ var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, maskTextClass = options.maskTextClass, _b = options.dataURLOptions, dataURLOptions = _b === void 0 ? {} : _b, inlineImages = options.inlineImages, recordCanvas = options.recordCanvas, keepIframeSrcFn = options.keepIframeSrcFn, _c = options.newlyAddedElement, newlyAddedElement = _c === void 0 ? false : _c, enableStrictPrivacy = options.enableStrictPrivacy, rootId = options.rootId;
578
+ var needBlock = _isBlockedElement(n, blockClass, blockSelector) ||
579
+ _isBlockedElement(n, maskTextClass, blockSelector);
578
580
  var tagName = getValidTagName$1(n);
579
581
  var attributes = {};
580
582
  var len = n.attributes.length;
@@ -4103,7 +4105,7 @@ let wrappedEmit;
4103
4105
  let takeFullSnapshot;
4104
4106
  const mirror = createMirror$2();
4105
4107
  function record(options = {}) {
4106
- const { emit, checkoutEveryNms, checkoutEveryNth, blockClass = 'highlight-block', blockSelector = null, ignoreClass = 'highlight-ignore', maskTextClass = 'highlight-mask', maskTextSelector = null, inlineStylesheet = true, maskAllInputs, maskInputOptions: _maskInputOptions, slimDOMOptions: _slimDOMOptions, maskInputFn, maskTextFn, hooks, packFn, sampling = {}, mousemoveWait, recordCanvas = false, userTriggeredOnInput = false, collectFonts = false, inlineImages = false, plugins, keepIframeSrcFn = () => false, enableStrictPrivacy = false, } = options;
4108
+ const { emit, checkoutEveryNms, checkoutEveryNth, blockClass = 'highlight-block', blockSelector = null, ignoreClass = 'highlight-ignore', maskTextClass = 'highlight-mask', maskTextSelector = null, inlineStylesheet = true, maskAllInputs, maskInputOptions: _maskInputOptions, slimDOMOptions: _slimDOMOptions, maskInputFn, maskTextFn = obfuscateText, hooks, packFn, sampling = {}, mousemoveWait, recordCanvas = false, userTriggeredOnInput = false, collectFonts = false, inlineImages = false, plugins, keepIframeSrcFn = () => false, enableStrictPrivacy = false, } = options;
4107
4109
  if (!emit) {
4108
4110
  throw new Error('emit function is required');
4109
4111
  }
@@ -4238,7 +4240,7 @@ function record(options = {}) {
4238
4240
  stylesheetManager,
4239
4241
  canvasManager,
4240
4242
  keepIframeSrcFn,
4241
- enableStrictPrivacy
4243
+ enableStrictPrivacy,
4242
4244
  },
4243
4245
  mirror,
4244
4246
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@highlight-run/rrweb",
3
- "version": "2.1.0",
3
+ "version": "2.1.3",
4
4
  "description": "record and replay the web",
5
5
  "scripts": {
6
6
  "prepare": "npm run prepack",
@@ -75,13 +75,13 @@
75
75
  "typescript": "^4.7.3"
76
76
  },
77
77
  "dependencies": {
78
- "@highlight-run/rrdom": ">=0.1.14",
79
- "@highlight-run/rrweb-snapshot": ">=1.1.22",
78
+ "@highlight-run/rrdom": "0.1.17",
79
+ "@highlight-run/rrweb-snapshot": "1.1.26",
80
80
  "@types/css-font-loading-module": "0.0.7",
81
81
  "@xstate/fsm": "^1.4.0",
82
82
  "base64-arraybuffer": "^1.0.1",
83
83
  "fflate": "^0.4.4",
84
84
  "mitt": "^3.0.0"
85
85
  },
86
- "gitHead": "ba064a5eee3debbcea07dfe122ad9fd1f0607040"
86
+ "gitHead": "98757c19f85bda25f5c29047f67d32ab7fd851f3"
87
87
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes