@highlight-run/rrweb 2.0.15 → 2.0.18
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/dist/record/rrweb-record.js +1 -1
- package/dist/record/rrweb-record.min.js +1 -1
- package/dist/record/rrweb-record.min.js.map +1 -1
- package/dist/replay/rrweb-replay-unpack.css +1 -1
- package/dist/replay/rrweb-replay-unpack.js +4 -4
- package/dist/replay/rrweb-replay-unpack.min.css +1 -1
- package/dist/replay/rrweb-replay-unpack.min.css.map +1 -1
- package/dist/replay/rrweb-replay-unpack.min.js +4 -4
- package/dist/replay/rrweb-replay-unpack.min.js.map +1 -1
- package/dist/replay/rrweb-replay.css +1 -1
- package/dist/replay/rrweb-replay.js +4 -4
- package/dist/replay/rrweb-replay.min.css +1 -1
- package/dist/replay/rrweb-replay.min.css.map +1 -1
- package/dist/replay/rrweb-replay.min.js +4 -4
- package/dist/replay/rrweb-replay.min.js.map +1 -1
- package/dist/rrweb-all.css +1 -1
- package/dist/rrweb-all.js +5 -5
- package/dist/rrweb-all.min.css +1 -1
- package/dist/rrweb-all.min.css.map +1 -1
- package/dist/rrweb-all.min.js +5 -5
- package/dist/rrweb-all.min.js.map +1 -1
- package/dist/rrweb.css +1 -1
- package/dist/rrweb.js +5 -5
- package/dist/rrweb.min.css +1 -1
- package/dist/rrweb.min.css.map +1 -1
- package/dist/rrweb.min.js +5 -5
- package/dist/rrweb.min.js.map +1 -1
- package/es/rrweb/all.css +1 -1
- package/es/rrweb/packages/rrdom/es/rrdom.js +16 -5
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas-manager.js +3 -0
- package/es/rrweb/packages/rrweb/src/replay/styles/inject-style.js +0 -1
- package/lib/record/rrweb-record.js +3 -0
- package/lib/replay/rrweb-replay-unpack.css +1 -1
- package/lib/replay/rrweb-replay-unpack.js +16 -6
- package/lib/replay/rrweb-replay.css +1 -1
- package/lib/replay/rrweb-replay.js +16 -6
- package/lib/rrweb-all.css +1 -1
- package/lib/rrweb-all.js +19 -6
- package/lib/rrweb.css +1 -1
- package/lib/rrweb.js +19 -6
- 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}
|
|
@@ -629,29 +629,37 @@ function diffChildren(oldChildren, newChildren, parentNode, replayer, rrnodeMirr
|
|
|
629
629
|
let oldStartNode = oldChildren[oldStartIndex], oldEndNode = oldChildren[oldEndIndex], newStartNode = newChildren[newStartIndex], newEndNode = newChildren[newEndIndex];
|
|
630
630
|
let oldIdToIndex = undefined, indexInOld;
|
|
631
631
|
while (oldStartIndex <= oldEndIndex && newStartIndex <= newEndIndex) {
|
|
632
|
+
const oldStartId = replayer.mirror.getId(oldStartNode);
|
|
633
|
+
const oldEndId = replayer.mirror.getId(oldEndNode);
|
|
634
|
+
const newStartId = rrnodeMirror.getId(newStartNode);
|
|
635
|
+
const newEndId = rrnodeMirror.getId(newEndNode);
|
|
632
636
|
if (oldStartNode === undefined) {
|
|
633
637
|
oldStartNode = oldChildren[++oldStartIndex];
|
|
634
638
|
}
|
|
635
639
|
else if (oldEndNode === undefined) {
|
|
636
640
|
oldEndNode = oldChildren[--oldEndIndex];
|
|
637
641
|
}
|
|
638
|
-
else if (
|
|
642
|
+
else if (oldStartId !== -1 &&
|
|
643
|
+
oldStartId === newStartId) {
|
|
639
644
|
diff(oldStartNode, newStartNode, replayer, rrnodeMirror);
|
|
640
645
|
oldStartNode = oldChildren[++oldStartIndex];
|
|
641
646
|
newStartNode = newChildren[++newStartIndex];
|
|
642
647
|
}
|
|
643
|
-
else if (
|
|
648
|
+
else if (oldEndId !== -1 &&
|
|
649
|
+
oldEndId === newEndId) {
|
|
644
650
|
diff(oldEndNode, newEndNode, replayer, rrnodeMirror);
|
|
645
651
|
oldEndNode = oldChildren[--oldEndIndex];
|
|
646
652
|
newEndNode = newChildren[--newEndIndex];
|
|
647
653
|
}
|
|
648
|
-
else if (
|
|
654
|
+
else if (oldStartId !== -1 &&
|
|
655
|
+
oldStartId === newEndId) {
|
|
649
656
|
parentNode.insertBefore(oldStartNode, oldEndNode.nextSibling);
|
|
650
657
|
diff(oldStartNode, newEndNode, replayer, rrnodeMirror);
|
|
651
658
|
oldStartNode = oldChildren[++oldStartIndex];
|
|
652
659
|
newEndNode = newChildren[--newEndIndex];
|
|
653
660
|
}
|
|
654
|
-
else if (
|
|
661
|
+
else if (oldEndId !== -1 &&
|
|
662
|
+
oldEndId === newStartId) {
|
|
655
663
|
parentNode.insertBefore(oldEndNode, oldStartNode);
|
|
656
664
|
diff(oldEndNode, newStartNode, replayer, rrnodeMirror);
|
|
657
665
|
oldEndNode = oldChildren[--oldEndIndex];
|
|
@@ -713,8 +721,11 @@ function diffChildren(oldChildren, newChildren, parentNode, replayer, rrnodeMirr
|
|
|
713
721
|
}
|
|
714
722
|
}
|
|
715
723
|
function createOrGetNode(rrNode, domMirror, rrnodeMirror) {
|
|
716
|
-
|
|
724
|
+
const nodeId = rrnodeMirror.getId(rrNode);
|
|
717
725
|
const sn = rrnodeMirror.getMeta(rrNode);
|
|
726
|
+
let node = null;
|
|
727
|
+
if (nodeId > -1)
|
|
728
|
+
node = domMirror.getNode(nodeId);
|
|
718
729
|
if (node !== null)
|
|
719
730
|
return node;
|
|
720
731
|
switch (rrNode.RRNodeType) {
|
|
@@ -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,
|
|
@@ -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}
|
|
@@ -1548,29 +1548,37 @@ function diffChildren(oldChildren, newChildren, parentNode, replayer, rrnodeMirr
|
|
|
1548
1548
|
let oldStartNode = oldChildren[oldStartIndex], oldEndNode = oldChildren[oldEndIndex], newStartNode = newChildren[newStartIndex], newEndNode = newChildren[newEndIndex];
|
|
1549
1549
|
let oldIdToIndex = undefined, indexInOld;
|
|
1550
1550
|
while (oldStartIndex <= oldEndIndex && newStartIndex <= newEndIndex) {
|
|
1551
|
+
const oldStartId = replayer.mirror.getId(oldStartNode);
|
|
1552
|
+
const oldEndId = replayer.mirror.getId(oldEndNode);
|
|
1553
|
+
const newStartId = rrnodeMirror.getId(newStartNode);
|
|
1554
|
+
const newEndId = rrnodeMirror.getId(newEndNode);
|
|
1551
1555
|
if (oldStartNode === undefined) {
|
|
1552
1556
|
oldStartNode = oldChildren[++oldStartIndex];
|
|
1553
1557
|
}
|
|
1554
1558
|
else if (oldEndNode === undefined) {
|
|
1555
1559
|
oldEndNode = oldChildren[--oldEndIndex];
|
|
1556
1560
|
}
|
|
1557
|
-
else if (
|
|
1561
|
+
else if (oldStartId !== -1 &&
|
|
1562
|
+
oldStartId === newStartId) {
|
|
1558
1563
|
diff(oldStartNode, newStartNode, replayer, rrnodeMirror);
|
|
1559
1564
|
oldStartNode = oldChildren[++oldStartIndex];
|
|
1560
1565
|
newStartNode = newChildren[++newStartIndex];
|
|
1561
1566
|
}
|
|
1562
|
-
else if (
|
|
1567
|
+
else if (oldEndId !== -1 &&
|
|
1568
|
+
oldEndId === newEndId) {
|
|
1563
1569
|
diff(oldEndNode, newEndNode, replayer, rrnodeMirror);
|
|
1564
1570
|
oldEndNode = oldChildren[--oldEndIndex];
|
|
1565
1571
|
newEndNode = newChildren[--newEndIndex];
|
|
1566
1572
|
}
|
|
1567
|
-
else if (
|
|
1573
|
+
else if (oldStartId !== -1 &&
|
|
1574
|
+
oldStartId === newEndId) {
|
|
1568
1575
|
parentNode.insertBefore(oldStartNode, oldEndNode.nextSibling);
|
|
1569
1576
|
diff(oldStartNode, newEndNode, replayer, rrnodeMirror);
|
|
1570
1577
|
oldStartNode = oldChildren[++oldStartIndex];
|
|
1571
1578
|
newEndNode = newChildren[--newEndIndex];
|
|
1572
1579
|
}
|
|
1573
|
-
else if (
|
|
1580
|
+
else if (oldEndId !== -1 &&
|
|
1581
|
+
oldEndId === newStartId) {
|
|
1574
1582
|
parentNode.insertBefore(oldEndNode, oldStartNode);
|
|
1575
1583
|
diff(oldEndNode, newStartNode, replayer, rrnodeMirror);
|
|
1576
1584
|
oldEndNode = oldChildren[--oldEndIndex];
|
|
@@ -1632,8 +1640,11 @@ function diffChildren(oldChildren, newChildren, parentNode, replayer, rrnodeMirr
|
|
|
1632
1640
|
}
|
|
1633
1641
|
}
|
|
1634
1642
|
function createOrGetNode(rrNode, domMirror, rrnodeMirror) {
|
|
1635
|
-
|
|
1643
|
+
const nodeId = rrnodeMirror.getId(rrNode);
|
|
1636
1644
|
const sn = rrnodeMirror.getMeta(rrNode);
|
|
1645
|
+
let node = null;
|
|
1646
|
+
if (nodeId > -1)
|
|
1647
|
+
node = domMirror.getNode(nodeId);
|
|
1637
1648
|
if (node !== null)
|
|
1638
1649
|
return node;
|
|
1639
1650
|
switch (rrNode.RRNodeType) {
|
|
@@ -2910,7 +2921,6 @@ function uniqueTextMutations(mutations) {
|
|
|
2910
2921
|
}
|
|
2911
2922
|
|
|
2912
2923
|
const rules = (blockClass) => [
|
|
2913
|
-
`.${blockClass} { background: currentColor }`,
|
|
2914
2924
|
'noscript { display: none !important; }',
|
|
2915
2925
|
`.${blockClass} { background: currentColor; border-radius: 5px; }`,
|
|
2916
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}
|
|
@@ -1548,29 +1548,37 @@ function diffChildren(oldChildren, newChildren, parentNode, replayer, rrnodeMirr
|
|
|
1548
1548
|
let oldStartNode = oldChildren[oldStartIndex], oldEndNode = oldChildren[oldEndIndex], newStartNode = newChildren[newStartIndex], newEndNode = newChildren[newEndIndex];
|
|
1549
1549
|
let oldIdToIndex = undefined, indexInOld;
|
|
1550
1550
|
while (oldStartIndex <= oldEndIndex && newStartIndex <= newEndIndex) {
|
|
1551
|
+
const oldStartId = replayer.mirror.getId(oldStartNode);
|
|
1552
|
+
const oldEndId = replayer.mirror.getId(oldEndNode);
|
|
1553
|
+
const newStartId = rrnodeMirror.getId(newStartNode);
|
|
1554
|
+
const newEndId = rrnodeMirror.getId(newEndNode);
|
|
1551
1555
|
if (oldStartNode === undefined) {
|
|
1552
1556
|
oldStartNode = oldChildren[++oldStartIndex];
|
|
1553
1557
|
}
|
|
1554
1558
|
else if (oldEndNode === undefined) {
|
|
1555
1559
|
oldEndNode = oldChildren[--oldEndIndex];
|
|
1556
1560
|
}
|
|
1557
|
-
else if (
|
|
1561
|
+
else if (oldStartId !== -1 &&
|
|
1562
|
+
oldStartId === newStartId) {
|
|
1558
1563
|
diff(oldStartNode, newStartNode, replayer, rrnodeMirror);
|
|
1559
1564
|
oldStartNode = oldChildren[++oldStartIndex];
|
|
1560
1565
|
newStartNode = newChildren[++newStartIndex];
|
|
1561
1566
|
}
|
|
1562
|
-
else if (
|
|
1567
|
+
else if (oldEndId !== -1 &&
|
|
1568
|
+
oldEndId === newEndId) {
|
|
1563
1569
|
diff(oldEndNode, newEndNode, replayer, rrnodeMirror);
|
|
1564
1570
|
oldEndNode = oldChildren[--oldEndIndex];
|
|
1565
1571
|
newEndNode = newChildren[--newEndIndex];
|
|
1566
1572
|
}
|
|
1567
|
-
else if (
|
|
1573
|
+
else if (oldStartId !== -1 &&
|
|
1574
|
+
oldStartId === newEndId) {
|
|
1568
1575
|
parentNode.insertBefore(oldStartNode, oldEndNode.nextSibling);
|
|
1569
1576
|
diff(oldStartNode, newEndNode, replayer, rrnodeMirror);
|
|
1570
1577
|
oldStartNode = oldChildren[++oldStartIndex];
|
|
1571
1578
|
newEndNode = newChildren[--newEndIndex];
|
|
1572
1579
|
}
|
|
1573
|
-
else if (
|
|
1580
|
+
else if (oldEndId !== -1 &&
|
|
1581
|
+
oldEndId === newStartId) {
|
|
1574
1582
|
parentNode.insertBefore(oldEndNode, oldStartNode);
|
|
1575
1583
|
diff(oldEndNode, newStartNode, replayer, rrnodeMirror);
|
|
1576
1584
|
oldEndNode = oldChildren[--oldEndIndex];
|
|
@@ -1632,8 +1640,11 @@ function diffChildren(oldChildren, newChildren, parentNode, replayer, rrnodeMirr
|
|
|
1632
1640
|
}
|
|
1633
1641
|
}
|
|
1634
1642
|
function createOrGetNode(rrNode, domMirror, rrnodeMirror) {
|
|
1635
|
-
|
|
1643
|
+
const nodeId = rrnodeMirror.getId(rrNode);
|
|
1636
1644
|
const sn = rrnodeMirror.getMeta(rrNode);
|
|
1645
|
+
let node = null;
|
|
1646
|
+
if (nodeId > -1)
|
|
1647
|
+
node = domMirror.getNode(nodeId);
|
|
1637
1648
|
if (node !== null)
|
|
1638
1649
|
return node;
|
|
1639
1650
|
switch (rrNode.RRNodeType) {
|
|
@@ -2910,7 +2921,6 @@ function uniqueTextMutations(mutations) {
|
|
|
2910
2921
|
}
|
|
2911
2922
|
|
|
2912
2923
|
const rules = (blockClass) => [
|
|
2913
|
-
`.${blockClass} { background: currentColor }`,
|
|
2914
2924
|
'noscript { display: none !important; }',
|
|
2915
2925
|
`.${blockClass} { background: currentColor; border-radius: 5px; }`,
|
|
2916
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,
|
|
@@ -5011,29 +5014,37 @@ function diffChildren(oldChildren, newChildren, parentNode, replayer, rrnodeMirr
|
|
|
5011
5014
|
let oldStartNode = oldChildren[oldStartIndex], oldEndNode = oldChildren[oldEndIndex], newStartNode = newChildren[newStartIndex], newEndNode = newChildren[newEndIndex];
|
|
5012
5015
|
let oldIdToIndex = undefined, indexInOld;
|
|
5013
5016
|
while (oldStartIndex <= oldEndIndex && newStartIndex <= newEndIndex) {
|
|
5017
|
+
const oldStartId = replayer.mirror.getId(oldStartNode);
|
|
5018
|
+
const oldEndId = replayer.mirror.getId(oldEndNode);
|
|
5019
|
+
const newStartId = rrnodeMirror.getId(newStartNode);
|
|
5020
|
+
const newEndId = rrnodeMirror.getId(newEndNode);
|
|
5014
5021
|
if (oldStartNode === undefined) {
|
|
5015
5022
|
oldStartNode = oldChildren[++oldStartIndex];
|
|
5016
5023
|
}
|
|
5017
5024
|
else if (oldEndNode === undefined) {
|
|
5018
5025
|
oldEndNode = oldChildren[--oldEndIndex];
|
|
5019
5026
|
}
|
|
5020
|
-
else if (
|
|
5027
|
+
else if (oldStartId !== -1 &&
|
|
5028
|
+
oldStartId === newStartId) {
|
|
5021
5029
|
diff(oldStartNode, newStartNode, replayer, rrnodeMirror);
|
|
5022
5030
|
oldStartNode = oldChildren[++oldStartIndex];
|
|
5023
5031
|
newStartNode = newChildren[++newStartIndex];
|
|
5024
5032
|
}
|
|
5025
|
-
else if (
|
|
5033
|
+
else if (oldEndId !== -1 &&
|
|
5034
|
+
oldEndId === newEndId) {
|
|
5026
5035
|
diff(oldEndNode, newEndNode, replayer, rrnodeMirror);
|
|
5027
5036
|
oldEndNode = oldChildren[--oldEndIndex];
|
|
5028
5037
|
newEndNode = newChildren[--newEndIndex];
|
|
5029
5038
|
}
|
|
5030
|
-
else if (
|
|
5039
|
+
else if (oldStartId !== -1 &&
|
|
5040
|
+
oldStartId === newEndId) {
|
|
5031
5041
|
parentNode.insertBefore(oldStartNode, oldEndNode.nextSibling);
|
|
5032
5042
|
diff(oldStartNode, newEndNode, replayer, rrnodeMirror);
|
|
5033
5043
|
oldStartNode = oldChildren[++oldStartIndex];
|
|
5034
5044
|
newEndNode = newChildren[--newEndIndex];
|
|
5035
5045
|
}
|
|
5036
|
-
else if (
|
|
5046
|
+
else if (oldEndId !== -1 &&
|
|
5047
|
+
oldEndId === newStartId) {
|
|
5037
5048
|
parentNode.insertBefore(oldEndNode, oldStartNode);
|
|
5038
5049
|
diff(oldEndNode, newStartNode, replayer, rrnodeMirror);
|
|
5039
5050
|
oldEndNode = oldChildren[--oldEndIndex];
|
|
@@ -5095,8 +5106,11 @@ function diffChildren(oldChildren, newChildren, parentNode, replayer, rrnodeMirr
|
|
|
5095
5106
|
}
|
|
5096
5107
|
}
|
|
5097
5108
|
function createOrGetNode(rrNode, domMirror, rrnodeMirror) {
|
|
5098
|
-
|
|
5109
|
+
const nodeId = rrnodeMirror.getId(rrNode);
|
|
5099
5110
|
const sn = rrnodeMirror.getMeta(rrNode);
|
|
5111
|
+
let node = null;
|
|
5112
|
+
if (nodeId > -1)
|
|
5113
|
+
node = domMirror.getNode(nodeId);
|
|
5100
5114
|
if (node !== null)
|
|
5101
5115
|
return node;
|
|
5102
5116
|
switch (rrNode.RRNodeType) {
|
|
@@ -6143,7 +6157,6 @@ function createSpeedService(context) {
|
|
|
6143
6157
|
}
|
|
6144
6158
|
|
|
6145
6159
|
const rules = (blockClass) => [
|
|
6146
|
-
`.${blockClass} { background: currentColor }`,
|
|
6147
6160
|
'noscript { display: none !important; }',
|
|
6148
6161
|
`.${blockClass} { background: currentColor; border-radius: 5px; }`,
|
|
6149
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,
|
|
@@ -5011,29 +5014,37 @@ function diffChildren(oldChildren, newChildren, parentNode, replayer, rrnodeMirr
|
|
|
5011
5014
|
let oldStartNode = oldChildren[oldStartIndex], oldEndNode = oldChildren[oldEndIndex], newStartNode = newChildren[newStartIndex], newEndNode = newChildren[newEndIndex];
|
|
5012
5015
|
let oldIdToIndex = undefined, indexInOld;
|
|
5013
5016
|
while (oldStartIndex <= oldEndIndex && newStartIndex <= newEndIndex) {
|
|
5017
|
+
const oldStartId = replayer.mirror.getId(oldStartNode);
|
|
5018
|
+
const oldEndId = replayer.mirror.getId(oldEndNode);
|
|
5019
|
+
const newStartId = rrnodeMirror.getId(newStartNode);
|
|
5020
|
+
const newEndId = rrnodeMirror.getId(newEndNode);
|
|
5014
5021
|
if (oldStartNode === undefined) {
|
|
5015
5022
|
oldStartNode = oldChildren[++oldStartIndex];
|
|
5016
5023
|
}
|
|
5017
5024
|
else if (oldEndNode === undefined) {
|
|
5018
5025
|
oldEndNode = oldChildren[--oldEndIndex];
|
|
5019
5026
|
}
|
|
5020
|
-
else if (
|
|
5027
|
+
else if (oldStartId !== -1 &&
|
|
5028
|
+
oldStartId === newStartId) {
|
|
5021
5029
|
diff(oldStartNode, newStartNode, replayer, rrnodeMirror);
|
|
5022
5030
|
oldStartNode = oldChildren[++oldStartIndex];
|
|
5023
5031
|
newStartNode = newChildren[++newStartIndex];
|
|
5024
5032
|
}
|
|
5025
|
-
else if (
|
|
5033
|
+
else if (oldEndId !== -1 &&
|
|
5034
|
+
oldEndId === newEndId) {
|
|
5026
5035
|
diff(oldEndNode, newEndNode, replayer, rrnodeMirror);
|
|
5027
5036
|
oldEndNode = oldChildren[--oldEndIndex];
|
|
5028
5037
|
newEndNode = newChildren[--newEndIndex];
|
|
5029
5038
|
}
|
|
5030
|
-
else if (
|
|
5039
|
+
else if (oldStartId !== -1 &&
|
|
5040
|
+
oldStartId === newEndId) {
|
|
5031
5041
|
parentNode.insertBefore(oldStartNode, oldEndNode.nextSibling);
|
|
5032
5042
|
diff(oldStartNode, newEndNode, replayer, rrnodeMirror);
|
|
5033
5043
|
oldStartNode = oldChildren[++oldStartIndex];
|
|
5034
5044
|
newEndNode = newChildren[--newEndIndex];
|
|
5035
5045
|
}
|
|
5036
|
-
else if (
|
|
5046
|
+
else if (oldEndId !== -1 &&
|
|
5047
|
+
oldEndId === newStartId) {
|
|
5037
5048
|
parentNode.insertBefore(oldEndNode, oldStartNode);
|
|
5038
5049
|
diff(oldEndNode, newStartNode, replayer, rrnodeMirror);
|
|
5039
5050
|
oldEndNode = oldChildren[--oldEndIndex];
|
|
@@ -5095,8 +5106,11 @@ function diffChildren(oldChildren, newChildren, parentNode, replayer, rrnodeMirr
|
|
|
5095
5106
|
}
|
|
5096
5107
|
}
|
|
5097
5108
|
function createOrGetNode(rrNode, domMirror, rrnodeMirror) {
|
|
5098
|
-
|
|
5109
|
+
const nodeId = rrnodeMirror.getId(rrNode);
|
|
5099
5110
|
const sn = rrnodeMirror.getMeta(rrNode);
|
|
5111
|
+
let node = null;
|
|
5112
|
+
if (nodeId > -1)
|
|
5113
|
+
node = domMirror.getNode(nodeId);
|
|
5100
5114
|
if (node !== null)
|
|
5101
5115
|
return node;
|
|
5102
5116
|
switch (rrNode.RRNodeType) {
|
|
@@ -6143,7 +6157,6 @@ function createSpeedService(context) {
|
|
|
6143
6157
|
}
|
|
6144
6158
|
|
|
6145
6159
|
const rules = (blockClass) => [
|
|
6146
|
-
`.${blockClass} { background: currentColor }`,
|
|
6147
6160
|
'noscript { display: none !important; }',
|
|
6148
6161
|
`.${blockClass} { background: currentColor; border-radius: 5px; }`,
|
|
6149
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.
|
|
3
|
+
"version": "2.0.18",
|
|
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.
|
|
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": "
|
|
85
|
+
"gitHead": "8168bc623f8f3587201ad767a5a39820d2dda67c"
|
|
86
86
|
}
|