@appsurify-testmap/rrweb-record 2.1.3-alpha.3 → 2.1.3-alpha.4
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/rrweb-record.cjs +28 -9
- package/dist/rrweb-record.cjs.map +1 -1
- package/dist/rrweb-record.js +28 -9
- package/dist/rrweb-record.js.map +1 -1
- package/dist/rrweb-record.umd.cjs +28 -9
- package/dist/rrweb-record.umd.cjs.map +2 -2
- package/dist/rrweb-record.umd.min.cjs +24 -24
- package/dist/rrweb-record.umd.min.cjs.map +3 -3
- package/package.json +4 -4
package/dist/rrweb-record.cjs
CHANGED
|
@@ -12609,7 +12609,7 @@ class VisibilityManager {
|
|
|
12609
12609
|
}
|
|
12610
12610
|
}
|
|
12611
12611
|
}
|
|
12612
|
-
const version$1 = "2.1.3-alpha.
|
|
12612
|
+
const version$1 = "2.1.3-alpha.4";
|
|
12613
12613
|
let wrappedEmit;
|
|
12614
12614
|
let takeFullSnapshot$1;
|
|
12615
12615
|
let canvasManager;
|
|
@@ -12771,13 +12771,27 @@ function record(options = {}) {
|
|
|
12771
12771
|
}
|
|
12772
12772
|
return e2;
|
|
12773
12773
|
};
|
|
12774
|
+
let lastMetaHref = null;
|
|
12775
|
+
let navSnapshotInProgress = false;
|
|
12774
12776
|
wrappedEmit = (r2, isCheckout) => {
|
|
12775
|
-
var _a2;
|
|
12777
|
+
var _a2, _b;
|
|
12776
12778
|
const e2 = r2;
|
|
12777
12779
|
e2.timestamp = nowTimestamp();
|
|
12780
|
+
let navTriggeredFS = false;
|
|
12778
12781
|
if (((_a2 = mutationBuffers[0]) == null ? void 0 : _a2.isFrozen()) && e2.type !== EventType.FullSnapshot && !(e2.type === EventType.IncrementalSnapshot && e2.data.source === IncrementalSource.Mutation)) {
|
|
12779
12782
|
mutationBuffers.forEach((buf) => buf.unfreeze());
|
|
12780
12783
|
}
|
|
12784
|
+
if (!navSnapshotInProgress && e2.type !== EventType.Meta && e2.type !== EventType.FullSnapshot && lastMetaHref && window.location.href !== lastMetaHref) {
|
|
12785
|
+
navSnapshotInProgress = true;
|
|
12786
|
+
try {
|
|
12787
|
+
recentVisibilityChanges = 0;
|
|
12788
|
+
incrementalSnapshotCount = 0;
|
|
12789
|
+
navTriggeredFS = true;
|
|
12790
|
+
takeFullSnapshot$1(true);
|
|
12791
|
+
} finally {
|
|
12792
|
+
navSnapshotInProgress = false;
|
|
12793
|
+
}
|
|
12794
|
+
}
|
|
12781
12795
|
if (inEmittingFrame) {
|
|
12782
12796
|
emit == null ? void 0 : emit(eventProcessor(e2), isCheckout);
|
|
12783
12797
|
} else if (passEmitsToParent) {
|
|
@@ -12789,6 +12803,9 @@ function record(options = {}) {
|
|
|
12789
12803
|
};
|
|
12790
12804
|
window.parent.postMessage(message, "*");
|
|
12791
12805
|
}
|
|
12806
|
+
if (e2.type === EventType.Meta) {
|
|
12807
|
+
lastMetaHref = ((_b = e2.data) == null ? void 0 : _b.href) || window.location.href;
|
|
12808
|
+
}
|
|
12792
12809
|
if (e2.type === EventType.FullSnapshot) {
|
|
12793
12810
|
lastFullSnapshotEvent = e2;
|
|
12794
12811
|
incrementalSnapshotCount = 0;
|
|
@@ -12797,14 +12814,16 @@ function record(options = {}) {
|
|
|
12797
12814
|
return;
|
|
12798
12815
|
}
|
|
12799
12816
|
incrementalSnapshotCount++;
|
|
12800
|
-
|
|
12801
|
-
|
|
12802
|
-
|
|
12803
|
-
|
|
12804
|
-
if (exceedVisibility) {
|
|
12805
|
-
|
|
12817
|
+
if (!navTriggeredFS) {
|
|
12818
|
+
const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;
|
|
12819
|
+
const exceedTime = checkoutEveryNms && e2.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;
|
|
12820
|
+
const exceedVisibility = checkoutEveryNvm && recentVisibilityChanges >= checkoutEveryNvm;
|
|
12821
|
+
if (exceedCount || exceedTime || exceedVisibility) {
|
|
12822
|
+
if (exceedVisibility) {
|
|
12823
|
+
recentVisibilityChanges = 0;
|
|
12824
|
+
}
|
|
12825
|
+
takeFullSnapshot$1(true);
|
|
12806
12826
|
}
|
|
12807
|
-
takeFullSnapshot$1(true);
|
|
12808
12827
|
}
|
|
12809
12828
|
}
|
|
12810
12829
|
};
|