@highlight-run/rrweb 2.0.16 → 2.0.19

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 (42) hide show
  1. package/dist/record/rrweb-record.js +3 -3
  2. package/dist/record/rrweb-record.min.js +3 -3
  3. package/dist/record/rrweb-record.min.js.map +1 -1
  4. package/dist/replay/rrweb-replay-unpack.css +1 -1
  5. package/dist/replay/rrweb-replay-unpack.js +3 -3
  6. package/dist/replay/rrweb-replay-unpack.min.css +1 -1
  7. package/dist/replay/rrweb-replay-unpack.min.css.map +1 -1
  8. package/dist/replay/rrweb-replay-unpack.min.js +3 -3
  9. package/dist/replay/rrweb-replay-unpack.min.js.map +1 -1
  10. package/dist/replay/rrweb-replay.css +1 -1
  11. package/dist/replay/rrweb-replay.js +3 -3
  12. package/dist/replay/rrweb-replay.min.css +1 -1
  13. package/dist/replay/rrweb-replay.min.css.map +1 -1
  14. package/dist/replay/rrweb-replay.min.js +3 -3
  15. package/dist/replay/rrweb-replay.min.js.map +1 -1
  16. package/dist/rrweb-all.css +1 -1
  17. package/dist/rrweb-all.js +8 -8
  18. package/dist/rrweb-all.min.css +1 -1
  19. package/dist/rrweb-all.min.css.map +1 -1
  20. package/dist/rrweb-all.min.js +8 -8
  21. package/dist/rrweb-all.min.js.map +1 -1
  22. package/dist/rrweb.css +1 -1
  23. package/dist/rrweb.js +5 -5
  24. package/dist/rrweb.min.css +1 -1
  25. package/dist/rrweb.min.css.map +1 -1
  26. package/dist/rrweb.min.js +5 -5
  27. package/dist/rrweb.min.js.map +1 -1
  28. package/es/rrweb/all.css +1 -1
  29. package/es/rrweb/packages/rrdom/es/rrdom.js +0 -4
  30. package/es/rrweb/packages/rrweb/src/record/index.js +3 -3
  31. package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas-manager.js +3 -0
  32. package/es/rrweb/packages/rrweb/src/replay/styles/inject-style.js +0 -1
  33. package/lib/record/rrweb-record.js +5 -2
  34. package/lib/replay/rrweb-replay-unpack.css +1 -1
  35. package/lib/replay/rrweb-replay-unpack.js +0 -5
  36. package/lib/replay/rrweb-replay.css +1 -1
  37. package/lib/replay/rrweb-replay.js +0 -5
  38. package/lib/rrweb-all.css +1 -1
  39. package/lib/rrweb-all.js +5 -7
  40. package/lib/rrweb.css +1 -1
  41. package/lib/rrweb.js +5 -7
  42. package/package.json +3 -3
package/es/rrweb/all.css CHANGED
@@ -1 +1 @@
1
- .replayer-wrapper{position:relative}.replayer-mouse{position:absolute;width:20px;height:20px;transition:left .05s linear,top .05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjcgNSAxOCAxOCIgaGVpZ2h0PSIzMDAiIHdpZHRoPSIzMDAiPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik04LjIgMjAuOXYtMTZsMTEuNiAxMS42SDEzbC0uNC4xeiIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xNy4zIDIxLjZsLTMuNiAxLjVMOSAxMmwzLjctMS41eiIvPjxwYXRoIGQ9Ik0xMS4wMyAxNC4yOTNsMS44NDUtLjc3NCAzLjA5NiA3LjM3Ni0xLjg0NC43NzV6Ii8+PHBhdGggZD0iTTkuMiA3LjN2MTEuMmwzLTIuOS40LS4xaDQuOHoiLz48L3N2Zz4=");border-color:transparent}.replayer-mouse:after{background:transparent}.replayer-mouse.active:after{animation:click .2s ease-in-out 1}.replayer-mouse.touch-device{background-image:none;width:70px;height:70px;border-radius:100%;margin-left:-37px;margin-top:-37px;border:4px solid rgba(73,80,246,0);transition:left 0s linear,top 0s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device.touch-active{border-color:#4950f6;transition:left .25s linear,top .25s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device:after{opacity:0}.replayer-mouse.touch-device.active:after{animation:touch-click .2s ease-in-out 1}.replayer-mouse-tail{position:absolute;pointer-events:none}@keyframes click{0%{opacity:.3;width:20px;height:20px;background:transparent}75%{width:24px;height:24px;opacity:.8;background:#dc2626}to{background:transparent}}@keyframes touch-click{0%{opacity:0;width:20px;height:20px}50%{opacity:.5;width:10px;height:10px}}
1
+ .replayer-wrapper{position:relative}.replayer-mouse{position:absolute;width:20px;height:20px;transition:left .05s linear,top .05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjcgNSAxOCAxOCIgaGVpZ2h0PSIzMDAiIHdpZHRoPSIzMDAiPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik04LjIgMjAuOXYtMTZsMTEuNiAxMS42SDEzbC0uNC4xeiIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xNy4zIDIxLjZsLTMuNiAxLjVMOSAxMmwzLjctMS41eiIvPjxwYXRoIGQ9Ik0xMS4wMyAxNC4yOTNsMS44NDUtLjc3NCAzLjA5NiA3LjM3Ni0xLjg0NC43NzV6Ii8+PHBhdGggZD0iTTkuMiA3LjN2MTEuMmwzLTIuOS40LS4xaDQuOHoiLz48L3N2Zz4=");border-color:transparent}.replayer-mouse:after{background:transparent}.replayer-mouse.active:after{animation:click .2s ease-in-out 1}.replayer-mouse.touch-device{background-image:none;width:70px;height:70px;border-radius:100%;margin-left:-37px;margin-top:-37px;border:4px solid rgba(73,80,246,0);transition:left 0s linear,top 0s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device.touch-active{border-color:#4950f6;transition:left .25s linear,top .25s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device:after{opacity:0}.replayer-mouse.touch-device.active:after{animation:touch-click .2s ease-in-out 1}.replayer-mouse-tail{position:absolute;pointer-events:none}@keyframes click{0%{opacity:.3;width:20px;height:20px;background:transparent}75%{width:24px;height:24px;opacity:.8;background:#dc2626}to{background:transparent}}@keyframes touch-click{0%{opacity:0;width:20px;height:20px}50%{opacity:.5;width:10px;height:10px}}.rr-player{position:relative;background:#fff;float:left;border-radius:5px;box-shadow:0 24px 48px rgba(17,16,62,.12)}.rr-player__frame{overflow:hidden}
@@ -633,10 +633,6 @@ function diffChildren(oldChildren, newChildren, parentNode, replayer, rrnodeMirr
633
633
  const oldEndId = replayer.mirror.getId(oldEndNode);
634
634
  const newStartId = rrnodeMirror.getId(newStartNode);
635
635
  const newEndId = rrnodeMirror.getId(newEndNode);
636
- console.log('oldStartId', oldStartId);
637
- console.log('oldEndId', oldEndId);
638
- console.log('newStartId', newStartId);
639
- console.log('newEndId', newEndId);
640
636
  if (oldStartNode === undefined) {
641
637
  oldStartNode = oldChildren[++oldStartIndex];
642
638
  }
@@ -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
  });
@@ -107,6 +107,9 @@ class CanvasManager {
107
107
  context === null || context === void 0 ? void 0 : context.clear(context.COLOR_BUFFER_BIT);
108
108
  }
109
109
  }
110
+ if (canvas.width === 0 || canvas.height === 0) {
111
+ return;
112
+ }
110
113
  const bitmap = yield createImageBitmap(canvas);
111
114
  worker.postMessage({
112
115
  id,
@@ -1,5 +1,4 @@
1
1
  const rules = (blockClass) => [
2
- `.${blockClass} { background: currentColor }`,
3
2
  'noscript { display: none !important; }',
4
3
  `.${blockClass} { background: currentColor; border-radius: 5px; }`,
5
4
  `.${blockClass}:hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}`,
@@ -2976,6 +2976,9 @@ class CanvasManager {
2976
2976
  context === null || context === void 0 ? void 0 : context.clear(context.COLOR_BUFFER_BIT);
2977
2977
  }
2978
2978
  }
2979
+ if (canvas.width === 0 || canvas.height === 0) {
2980
+ return;
2981
+ }
2979
2982
  const bitmap = yield createImageBitmap(canvas);
2980
2983
  worker.postMessage({
2981
2984
  id,
@@ -3075,7 +3078,7 @@ let wrappedEmit;
3075
3078
  let takeFullSnapshot;
3076
3079
  const mirror = createMirror();
3077
3080
  function record(options = {}) {
3078
- 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;
3081
+ 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;
3079
3082
  if (!emit) {
3080
3083
  throw new Error('emit function is required');
3081
3084
  }
@@ -3210,7 +3213,7 @@ function record(options = {}) {
3210
3213
  stylesheetManager,
3211
3214
  canvasManager,
3212
3215
  keepIframeSrcFn,
3213
- enableStrictPrivacy
3216
+ enableStrictPrivacy,
3214
3217
  },
3215
3218
  mirror,
3216
3219
  });
@@ -1 +1 @@
1
- .replayer-wrapper{position:relative}.replayer-mouse{position:absolute;width:20px;height:20px;transition:left .05s linear,top .05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjcgNSAxOCAxOCIgaGVpZ2h0PSIzMDAiIHdpZHRoPSIzMDAiPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik04LjIgMjAuOXYtMTZsMTEuNiAxMS42SDEzbC0uNC4xeiIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xNy4zIDIxLjZsLTMuNiAxLjVMOSAxMmwzLjctMS41eiIvPjxwYXRoIGQ9Ik0xMS4wMyAxNC4yOTNsMS44NDUtLjc3NCAzLjA5NiA3LjM3Ni0xLjg0NC43NzV6Ii8+PHBhdGggZD0iTTkuMiA3LjN2MTEuMmwzLTIuOS40LS4xaDQuOHoiLz48L3N2Zz4=");border-color:transparent}.replayer-mouse:after{background:transparent}.replayer-mouse.active:after{animation:click .2s ease-in-out 1}.replayer-mouse.touch-device{background-image:none;width:70px;height:70px;border-radius:100%;margin-left:-37px;margin-top:-37px;border:4px solid rgba(73,80,246,0);transition:left 0s linear,top 0s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device.touch-active{border-color:#4950f6;transition:left .25s linear,top .25s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device:after{opacity:0}.replayer-mouse.touch-device.active:after{animation:touch-click .2s ease-in-out 1}.replayer-mouse-tail{position:absolute;pointer-events:none}@keyframes click{0%{opacity:.3;width:20px;height:20px;background:transparent}75%{width:24px;height:24px;opacity:.8;background:#dc2626}to{background:transparent}}@keyframes touch-click{0%{opacity:0;width:20px;height:20px}50%{opacity:.5;width:10px;height:10px}}
1
+ .replayer-wrapper{position:relative}.replayer-mouse{position:absolute;width:20px;height:20px;transition:left .05s linear,top .05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjcgNSAxOCAxOCIgaGVpZ2h0PSIzMDAiIHdpZHRoPSIzMDAiPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik04LjIgMjAuOXYtMTZsMTEuNiAxMS42SDEzbC0uNC4xeiIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xNy4zIDIxLjZsLTMuNiAxLjVMOSAxMmwzLjctMS41eiIvPjxwYXRoIGQ9Ik0xMS4wMyAxNC4yOTNsMS44NDUtLjc3NCAzLjA5NiA3LjM3Ni0xLjg0NC43NzV6Ii8+PHBhdGggZD0iTTkuMiA3LjN2MTEuMmwzLTIuOS40LS4xaDQuOHoiLz48L3N2Zz4=");border-color:transparent}.replayer-mouse:after{background:transparent}.replayer-mouse.active:after{animation:click .2s ease-in-out 1}.replayer-mouse.touch-device{background-image:none;width:70px;height:70px;border-radius:100%;margin-left:-37px;margin-top:-37px;border:4px solid rgba(73,80,246,0);transition:left 0s linear,top 0s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device.touch-active{border-color:#4950f6;transition:left .25s linear,top .25s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device:after{opacity:0}.replayer-mouse.touch-device.active:after{animation:touch-click .2s ease-in-out 1}.replayer-mouse-tail{position:absolute;pointer-events:none}@keyframes click{0%{opacity:.3;width:20px;height:20px;background:transparent}75%{width:24px;height:24px;opacity:.8;background:#dc2626}to{background:transparent}}@keyframes touch-click{0%{opacity:0;width:20px;height:20px}50%{opacity:.5;width:10px;height:10px}}.rr-player{position:relative;background:#fff;float:left;border-radius:5px;box-shadow:0 24px 48px rgba(17,16,62,.12)}.rr-player__frame{overflow:hidden}
@@ -1552,10 +1552,6 @@ function diffChildren(oldChildren, newChildren, parentNode, replayer, rrnodeMirr
1552
1552
  const oldEndId = replayer.mirror.getId(oldEndNode);
1553
1553
  const newStartId = rrnodeMirror.getId(newStartNode);
1554
1554
  const newEndId = rrnodeMirror.getId(newEndNode);
1555
- console.log('oldStartId', oldStartId);
1556
- console.log('oldEndId', oldEndId);
1557
- console.log('newStartId', newStartId);
1558
- console.log('newEndId', newEndId);
1559
1555
  if (oldStartNode === undefined) {
1560
1556
  oldStartNode = oldChildren[++oldStartIndex];
1561
1557
  }
@@ -2925,7 +2921,6 @@ function uniqueTextMutations(mutations) {
2925
2921
  }
2926
2922
 
2927
2923
  const rules = (blockClass) => [
2928
- `.${blockClass} { background: currentColor }`,
2929
2924
  'noscript { display: none !important; }',
2930
2925
  `.${blockClass} { background: currentColor; border-radius: 5px; }`,
2931
2926
  `.${blockClass}:hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}`,
@@ -1 +1 @@
1
- .replayer-wrapper{position:relative}.replayer-mouse{position:absolute;width:20px;height:20px;transition:left .05s linear,top .05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjcgNSAxOCAxOCIgaGVpZ2h0PSIzMDAiIHdpZHRoPSIzMDAiPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik04LjIgMjAuOXYtMTZsMTEuNiAxMS42SDEzbC0uNC4xeiIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xNy4zIDIxLjZsLTMuNiAxLjVMOSAxMmwzLjctMS41eiIvPjxwYXRoIGQ9Ik0xMS4wMyAxNC4yOTNsMS44NDUtLjc3NCAzLjA5NiA3LjM3Ni0xLjg0NC43NzV6Ii8+PHBhdGggZD0iTTkuMiA3LjN2MTEuMmwzLTIuOS40LS4xaDQuOHoiLz48L3N2Zz4=");border-color:transparent}.replayer-mouse:after{background:transparent}.replayer-mouse.active:after{animation:click .2s ease-in-out 1}.replayer-mouse.touch-device{background-image:none;width:70px;height:70px;border-radius:100%;margin-left:-37px;margin-top:-37px;border:4px solid rgba(73,80,246,0);transition:left 0s linear,top 0s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device.touch-active{border-color:#4950f6;transition:left .25s linear,top .25s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device:after{opacity:0}.replayer-mouse.touch-device.active:after{animation:touch-click .2s ease-in-out 1}.replayer-mouse-tail{position:absolute;pointer-events:none}@keyframes click{0%{opacity:.3;width:20px;height:20px;background:transparent}75%{width:24px;height:24px;opacity:.8;background:#dc2626}to{background:transparent}}@keyframes touch-click{0%{opacity:0;width:20px;height:20px}50%{opacity:.5;width:10px;height:10px}}
1
+ .replayer-wrapper{position:relative}.replayer-mouse{position:absolute;width:20px;height:20px;transition:left .05s linear,top .05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjcgNSAxOCAxOCIgaGVpZ2h0PSIzMDAiIHdpZHRoPSIzMDAiPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik04LjIgMjAuOXYtMTZsMTEuNiAxMS42SDEzbC0uNC4xeiIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xNy4zIDIxLjZsLTMuNiAxLjVMOSAxMmwzLjctMS41eiIvPjxwYXRoIGQ9Ik0xMS4wMyAxNC4yOTNsMS44NDUtLjc3NCAzLjA5NiA3LjM3Ni0xLjg0NC43NzV6Ii8+PHBhdGggZD0iTTkuMiA3LjN2MTEuMmwzLTIuOS40LS4xaDQuOHoiLz48L3N2Zz4=");border-color:transparent}.replayer-mouse:after{background:transparent}.replayer-mouse.active:after{animation:click .2s ease-in-out 1}.replayer-mouse.touch-device{background-image:none;width:70px;height:70px;border-radius:100%;margin-left:-37px;margin-top:-37px;border:4px solid rgba(73,80,246,0);transition:left 0s linear,top 0s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device.touch-active{border-color:#4950f6;transition:left .25s linear,top .25s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device:after{opacity:0}.replayer-mouse.touch-device.active:after{animation:touch-click .2s ease-in-out 1}.replayer-mouse-tail{position:absolute;pointer-events:none}@keyframes click{0%{opacity:.3;width:20px;height:20px;background:transparent}75%{width:24px;height:24px;opacity:.8;background:#dc2626}to{background:transparent}}@keyframes touch-click{0%{opacity:0;width:20px;height:20px}50%{opacity:.5;width:10px;height:10px}}.rr-player{position:relative;background:#fff;float:left;border-radius:5px;box-shadow:0 24px 48px rgba(17,16,62,.12)}.rr-player__frame{overflow:hidden}
@@ -1552,10 +1552,6 @@ function diffChildren(oldChildren, newChildren, parentNode, replayer, rrnodeMirr
1552
1552
  const oldEndId = replayer.mirror.getId(oldEndNode);
1553
1553
  const newStartId = rrnodeMirror.getId(newStartNode);
1554
1554
  const newEndId = rrnodeMirror.getId(newEndNode);
1555
- console.log('oldStartId', oldStartId);
1556
- console.log('oldEndId', oldEndId);
1557
- console.log('newStartId', newStartId);
1558
- console.log('newEndId', newEndId);
1559
1555
  if (oldStartNode === undefined) {
1560
1556
  oldStartNode = oldChildren[++oldStartIndex];
1561
1557
  }
@@ -2925,7 +2921,6 @@ function uniqueTextMutations(mutations) {
2925
2921
  }
2926
2922
 
2927
2923
  const rules = (blockClass) => [
2928
- `.${blockClass} { background: currentColor }`,
2929
2924
  'noscript { display: none !important; }',
2930
2925
  `.${blockClass} { background: currentColor; border-radius: 5px; }`,
2931
2926
  `.${blockClass}:hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}`,
package/lib/rrweb-all.css CHANGED
@@ -1 +1 @@
1
- .replayer-wrapper{position:relative}.replayer-mouse{position:absolute;width:20px;height:20px;transition:left .05s linear,top .05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjcgNSAxOCAxOCIgaGVpZ2h0PSIzMDAiIHdpZHRoPSIzMDAiPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik04LjIgMjAuOXYtMTZsMTEuNiAxMS42SDEzbC0uNC4xeiIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xNy4zIDIxLjZsLTMuNiAxLjVMOSAxMmwzLjctMS41eiIvPjxwYXRoIGQ9Ik0xMS4wMyAxNC4yOTNsMS44NDUtLjc3NCAzLjA5NiA3LjM3Ni0xLjg0NC43NzV6Ii8+PHBhdGggZD0iTTkuMiA3LjN2MTEuMmwzLTIuOS40LS4xaDQuOHoiLz48L3N2Zz4=");border-color:transparent}.replayer-mouse:after{background:transparent}.replayer-mouse.active:after{animation:click .2s ease-in-out 1}.replayer-mouse.touch-device{background-image:none;width:70px;height:70px;border-radius:100%;margin-left:-37px;margin-top:-37px;border:4px solid rgba(73,80,246,0);transition:left 0s linear,top 0s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device.touch-active{border-color:#4950f6;transition:left .25s linear,top .25s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device:after{opacity:0}.replayer-mouse.touch-device.active:after{animation:touch-click .2s ease-in-out 1}.replayer-mouse-tail{position:absolute;pointer-events:none}@keyframes click{0%{opacity:.3;width:20px;height:20px;background:transparent}75%{width:24px;height:24px;opacity:.8;background:#dc2626}to{background:transparent}}@keyframes touch-click{0%{opacity:0;width:20px;height:20px}50%{opacity:.5;width:10px;height:10px}}
1
+ .replayer-wrapper{position:relative}.replayer-mouse{position:absolute;width:20px;height:20px;transition:left .05s linear,top .05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjcgNSAxOCAxOCIgaGVpZ2h0PSIzMDAiIHdpZHRoPSIzMDAiPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik04LjIgMjAuOXYtMTZsMTEuNiAxMS42SDEzbC0uNC4xeiIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xNy4zIDIxLjZsLTMuNiAxLjVMOSAxMmwzLjctMS41eiIvPjxwYXRoIGQ9Ik0xMS4wMyAxNC4yOTNsMS44NDUtLjc3NCAzLjA5NiA3LjM3Ni0xLjg0NC43NzV6Ii8+PHBhdGggZD0iTTkuMiA3LjN2MTEuMmwzLTIuOS40LS4xaDQuOHoiLz48L3N2Zz4=");border-color:transparent}.replayer-mouse:after{background:transparent}.replayer-mouse.active:after{animation:click .2s ease-in-out 1}.replayer-mouse.touch-device{background-image:none;width:70px;height:70px;border-radius:100%;margin-left:-37px;margin-top:-37px;border:4px solid rgba(73,80,246,0);transition:left 0s linear,top 0s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device.touch-active{border-color:#4950f6;transition:left .25s linear,top .25s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device:after{opacity:0}.replayer-mouse.touch-device.active:after{animation:touch-click .2s ease-in-out 1}.replayer-mouse-tail{position:absolute;pointer-events:none}@keyframes click{0%{opacity:.3;width:20px;height:20px;background:transparent}75%{width:24px;height:24px;opacity:.8;background:#dc2626}to{background:transparent}}@keyframes touch-click{0%{opacity:0;width:20px;height:20px}50%{opacity:.5;width:10px;height:10px}}.rr-player{position:relative;background:#fff;float:left;border-radius:5px;box-shadow:0 24px 48px rgba(17,16,62,.12)}.rr-player__frame{overflow:hidden}
package/lib/rrweb-all.js CHANGED
@@ -3937,6 +3937,9 @@ class CanvasManager {
3937
3937
  context === null || context === void 0 ? void 0 : context.clear(context.COLOR_BUFFER_BIT);
3938
3938
  }
3939
3939
  }
3940
+ if (canvas.width === 0 || canvas.height === 0) {
3941
+ return;
3942
+ }
3940
3943
  const bitmap = yield createImageBitmap(canvas);
3941
3944
  worker.postMessage({
3942
3945
  id,
@@ -4036,7 +4039,7 @@ let wrappedEmit;
4036
4039
  let takeFullSnapshot;
4037
4040
  const mirror = createMirror$2();
4038
4041
  function record(options = {}) {
4039
- 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;
4042
+ 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;
4040
4043
  if (!emit) {
4041
4044
  throw new Error('emit function is required');
4042
4045
  }
@@ -4171,7 +4174,7 @@ function record(options = {}) {
4171
4174
  stylesheetManager,
4172
4175
  canvasManager,
4173
4176
  keepIframeSrcFn,
4174
- enableStrictPrivacy
4177
+ enableStrictPrivacy,
4175
4178
  },
4176
4179
  mirror,
4177
4180
  });
@@ -5015,10 +5018,6 @@ function diffChildren(oldChildren, newChildren, parentNode, replayer, rrnodeMirr
5015
5018
  const oldEndId = replayer.mirror.getId(oldEndNode);
5016
5019
  const newStartId = rrnodeMirror.getId(newStartNode);
5017
5020
  const newEndId = rrnodeMirror.getId(newEndNode);
5018
- console.log('oldStartId', oldStartId);
5019
- console.log('oldEndId', oldEndId);
5020
- console.log('newStartId', newStartId);
5021
- console.log('newEndId', newEndId);
5022
5021
  if (oldStartNode === undefined) {
5023
5022
  oldStartNode = oldChildren[++oldStartIndex];
5024
5023
  }
@@ -6158,7 +6157,6 @@ function createSpeedService(context) {
6158
6157
  }
6159
6158
 
6160
6159
  const rules = (blockClass) => [
6161
- `.${blockClass} { background: currentColor }`,
6162
6160
  'noscript { display: none !important; }',
6163
6161
  `.${blockClass} { background: currentColor; border-radius: 5px; }`,
6164
6162
  `.${blockClass}:hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}`,
package/lib/rrweb.css CHANGED
@@ -1 +1 @@
1
- .replayer-wrapper{position:relative}.replayer-mouse{position:absolute;width:20px;height:20px;transition:left .05s linear,top .05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjcgNSAxOCAxOCIgaGVpZ2h0PSIzMDAiIHdpZHRoPSIzMDAiPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik04LjIgMjAuOXYtMTZsMTEuNiAxMS42SDEzbC0uNC4xeiIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xNy4zIDIxLjZsLTMuNiAxLjVMOSAxMmwzLjctMS41eiIvPjxwYXRoIGQ9Ik0xMS4wMyAxNC4yOTNsMS44NDUtLjc3NCAzLjA5NiA3LjM3Ni0xLjg0NC43NzV6Ii8+PHBhdGggZD0iTTkuMiA3LjN2MTEuMmwzLTIuOS40LS4xaDQuOHoiLz48L3N2Zz4=");border-color:transparent}.replayer-mouse:after{background:transparent}.replayer-mouse.active:after{animation:click .2s ease-in-out 1}.replayer-mouse.touch-device{background-image:none;width:70px;height:70px;border-radius:100%;margin-left:-37px;margin-top:-37px;border:4px solid rgba(73,80,246,0);transition:left 0s linear,top 0s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device.touch-active{border-color:#4950f6;transition:left .25s linear,top .25s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device:after{opacity:0}.replayer-mouse.touch-device.active:after{animation:touch-click .2s ease-in-out 1}.replayer-mouse-tail{position:absolute;pointer-events:none}@keyframes click{0%{opacity:.3;width:20px;height:20px;background:transparent}75%{width:24px;height:24px;opacity:.8;background:#dc2626}to{background:transparent}}@keyframes touch-click{0%{opacity:0;width:20px;height:20px}50%{opacity:.5;width:10px;height:10px}}
1
+ .replayer-wrapper{position:relative}.replayer-mouse{position:absolute;width:20px;height:20px;transition:left .05s linear,top .05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjcgNSAxOCAxOCIgaGVpZ2h0PSIzMDAiIHdpZHRoPSIzMDAiPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik04LjIgMjAuOXYtMTZsMTEuNiAxMS42SDEzbC0uNC4xeiIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xNy4zIDIxLjZsLTMuNiAxLjVMOSAxMmwzLjctMS41eiIvPjxwYXRoIGQ9Ik0xMS4wMyAxNC4yOTNsMS44NDUtLjc3NCAzLjA5NiA3LjM3Ni0xLjg0NC43NzV6Ii8+PHBhdGggZD0iTTkuMiA3LjN2MTEuMmwzLTIuOS40LS4xaDQuOHoiLz48L3N2Zz4=");border-color:transparent}.replayer-mouse:after{background:transparent}.replayer-mouse.active:after{animation:click .2s ease-in-out 1}.replayer-mouse.touch-device{background-image:none;width:70px;height:70px;border-radius:100%;margin-left:-37px;margin-top:-37px;border:4px solid rgba(73,80,246,0);transition:left 0s linear,top 0s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device.touch-active{border-color:#4950f6;transition:left .25s linear,top .25s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device:after{opacity:0}.replayer-mouse.touch-device.active:after{animation:touch-click .2s ease-in-out 1}.replayer-mouse-tail{position:absolute;pointer-events:none}@keyframes click{0%{opacity:.3;width:20px;height:20px;background:transparent}75%{width:24px;height:24px;opacity:.8;background:#dc2626}to{background:transparent}}@keyframes touch-click{0%{opacity:0;width:20px;height:20px}50%{opacity:.5;width:10px;height:10px}}.rr-player{position:relative;background:#fff;float:left;border-radius:5px;box-shadow:0 24px 48px rgba(17,16,62,.12)}.rr-player__frame{overflow:hidden}
package/lib/rrweb.js CHANGED
@@ -3937,6 +3937,9 @@ class CanvasManager {
3937
3937
  context === null || context === void 0 ? void 0 : context.clear(context.COLOR_BUFFER_BIT);
3938
3938
  }
3939
3939
  }
3940
+ if (canvas.width === 0 || canvas.height === 0) {
3941
+ return;
3942
+ }
3940
3943
  const bitmap = yield createImageBitmap(canvas);
3941
3944
  worker.postMessage({
3942
3945
  id,
@@ -4036,7 +4039,7 @@ let wrappedEmit;
4036
4039
  let takeFullSnapshot;
4037
4040
  const mirror = createMirror$2();
4038
4041
  function record(options = {}) {
4039
- 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;
4042
+ 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;
4040
4043
  if (!emit) {
4041
4044
  throw new Error('emit function is required');
4042
4045
  }
@@ -4171,7 +4174,7 @@ function record(options = {}) {
4171
4174
  stylesheetManager,
4172
4175
  canvasManager,
4173
4176
  keepIframeSrcFn,
4174
- enableStrictPrivacy
4177
+ enableStrictPrivacy,
4175
4178
  },
4176
4179
  mirror,
4177
4180
  });
@@ -5015,10 +5018,6 @@ function diffChildren(oldChildren, newChildren, parentNode, replayer, rrnodeMirr
5015
5018
  const oldEndId = replayer.mirror.getId(oldEndNode);
5016
5019
  const newStartId = rrnodeMirror.getId(newStartNode);
5017
5020
  const newEndId = rrnodeMirror.getId(newEndNode);
5018
- console.log('oldStartId', oldStartId);
5019
- console.log('oldEndId', oldEndId);
5020
- console.log('newStartId', newStartId);
5021
- console.log('newEndId', newEndId);
5022
5021
  if (oldStartNode === undefined) {
5023
5022
  oldStartNode = oldChildren[++oldStartIndex];
5024
5023
  }
@@ -6158,7 +6157,6 @@ function createSpeedService(context) {
6158
6157
  }
6159
6158
 
6160
6159
  const rules = (blockClass) => [
6161
- `.${blockClass} { background: currentColor }`,
6162
6160
  'noscript { display: none !important; }',
6163
6161
  `.${blockClass} { background: currentColor; border-radius: 5px; }`,
6164
6162
  `.${blockClass}:hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@highlight-run/rrweb",
3
- "version": "2.0.16",
3
+ "version": "2.0.19",
4
4
  "description": "record and replay the web",
5
5
  "scripts": {
6
6
  "prepare": "npm run prepack",
@@ -74,7 +74,7 @@
74
74
  "typescript": "^4.7.3"
75
75
  },
76
76
  "dependencies": {
77
- "@highlight-run/rrdom": ">=0.1.13",
77
+ "@highlight-run/rrdom": ">=0.1.14",
78
78
  "@highlight-run/rrweb-snapshot": ">=1.1.22",
79
79
  "@types/css-font-loading-module": "0.0.7",
80
80
  "@xstate/fsm": "^1.4.0",
@@ -82,5 +82,5 @@
82
82
  "fflate": "^0.4.4",
83
83
  "mitt": "^1.1.3"
84
84
  },
85
- "gitHead": "563c1119c1eb935ab8dd07b1893143e5b2e4e59d"
85
+ "gitHead": "5970e6ace1e9ad241df8bf928c85577cdcf8f9d8"
86
86
  }