@appsurify-testmap/rrweb-record 3.4.0-alpha.1 → 3.6.0-alpha.1
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 +33 -11
- package/dist/rrweb-record.cjs.map +1 -1
- package/dist/rrweb-record.js +33 -11
- package/dist/rrweb-record.js.map +1 -1
- package/dist/rrweb-record.umd.cjs +33 -10
- package/dist/rrweb-record.umd.cjs.map +3 -3
- package/dist/rrweb-record.umd.min.cjs +30 -30
- package/dist/rrweb-record.umd.min.cjs.map +3 -3
- package/package.json +4 -4
|
@@ -16582,9 +16582,7 @@ class NavigationManager {
|
|
|
16582
16582
|
});
|
|
16583
16583
|
this.settlingObserver.observe(this.doc, {
|
|
16584
16584
|
childList: true,
|
|
16585
|
-
subtree: true
|
|
16586
|
-
attributes: true,
|
|
16587
|
-
characterData: true
|
|
16585
|
+
subtree: true
|
|
16588
16586
|
});
|
|
16589
16587
|
this.settleCheckTimer = setTimeout(
|
|
16590
16588
|
() => this.checkSettled(),
|
|
@@ -16725,7 +16723,7 @@ class ProcessedNodeManager {
|
|
|
16725
16723
|
destroy() {
|
|
16726
16724
|
}
|
|
16727
16725
|
}
|
|
16728
|
-
const version$1 = "3.
|
|
16726
|
+
const version$1 = "3.6.0-alpha.1";
|
|
16729
16727
|
let wrappedEmit;
|
|
16730
16728
|
let takeFullSnapshot$1;
|
|
16731
16729
|
let canvasManager;
|
|
@@ -16848,6 +16846,11 @@ function record(options = {}) {
|
|
|
16848
16846
|
let checkoutPending = false;
|
|
16849
16847
|
let checkoutDebounceTimer = null;
|
|
16850
16848
|
let checkoutFreezeTimestamp = null;
|
|
16849
|
+
let lastScrollEmitTime = 0;
|
|
16850
|
+
const scrollSettleTime = (sampling.scroll || 100) * 2;
|
|
16851
|
+
let lastSignificantMutationTime = 0;
|
|
16852
|
+
const mutationGracePeriod = 500;
|
|
16853
|
+
let hadVisibilityCheckoutInGrace = false;
|
|
16851
16854
|
const eventProcessor = (e2) => {
|
|
16852
16855
|
for (const plugin3 of plugins || []) {
|
|
16853
16856
|
if (plugin3.eventProcessor) {
|
|
@@ -16938,6 +16941,13 @@ function record(options = {}) {
|
|
|
16938
16941
|
}
|
|
16939
16942
|
};
|
|
16940
16943
|
const wrappedMutationEmit = (m) => {
|
|
16944
|
+
var _a3, _b2;
|
|
16945
|
+
var _a2, _b;
|
|
16946
|
+
const totalChanges = ((_a3 = (_a2 = m.adds) == null ? void 0 : _a2.length) != null ? _a3 : 0) + ((_b2 = (_b = m.removes) == null ? void 0 : _b.length) != null ? _b2 : 0);
|
|
16947
|
+
if (totalChanges > 10) {
|
|
16948
|
+
lastSignificantMutationTime = nowTimestamp();
|
|
16949
|
+
hadVisibilityCheckoutInGrace = false;
|
|
16950
|
+
}
|
|
16941
16951
|
wrappedEmit({
|
|
16942
16952
|
type: EventType.IncrementalSnapshot,
|
|
16943
16953
|
data: __spreadValues({
|
|
@@ -16953,12 +16963,15 @@ function record(options = {}) {
|
|
|
16953
16963
|
}, v2)
|
|
16954
16964
|
});
|
|
16955
16965
|
};
|
|
16956
|
-
const wrappedScrollEmit = (p) =>
|
|
16957
|
-
|
|
16958
|
-
|
|
16959
|
-
|
|
16960
|
-
|
|
16961
|
-
|
|
16966
|
+
const wrappedScrollEmit = (p) => {
|
|
16967
|
+
lastScrollEmitTime = nowTimestamp();
|
|
16968
|
+
wrappedEmit({
|
|
16969
|
+
type: EventType.IncrementalSnapshot,
|
|
16970
|
+
data: __spreadValues({
|
|
16971
|
+
source: IncrementalSource.Scroll
|
|
16972
|
+
}, p)
|
|
16973
|
+
});
|
|
16974
|
+
};
|
|
16962
16975
|
const wrappedCanvasMutationEmit = (p) => wrappedEmit({
|
|
16963
16976
|
type: EventType.IncrementalSnapshot,
|
|
16964
16977
|
data: __spreadValues({
|
|
@@ -17040,9 +17053,19 @@ function record(options = {}) {
|
|
|
17040
17053
|
mutationCb: recordVisibility ? wrappedVisibilityEmit : () => {
|
|
17041
17054
|
},
|
|
17042
17055
|
notifyActivity: checkoutEveryNvm != null ? (count) => {
|
|
17056
|
+
const now = nowTimestamp();
|
|
17057
|
+
const scrollRecent = now - lastScrollEmitTime < scrollSettleTime;
|
|
17058
|
+
const mutationRecent = now - lastSignificantMutationTime < mutationGracePeriod;
|
|
17059
|
+
if (scrollRecent && !mutationRecent) {
|
|
17060
|
+
return;
|
|
17061
|
+
}
|
|
17062
|
+
if (mutationRecent && hadVisibilityCheckoutInGrace) {
|
|
17063
|
+
return;
|
|
17064
|
+
}
|
|
17043
17065
|
visibilityMutationCount += count;
|
|
17044
17066
|
if (visibilityMutationCount >= checkoutEveryNvm) {
|
|
17045
17067
|
visibilityMutationCount = 0;
|
|
17068
|
+
hadVisibilityCheckoutInGrace = true;
|
|
17046
17069
|
if (checkoutDebounce) {
|
|
17047
17070
|
if (!checkoutPending) {
|
|
17048
17071
|
checkoutPending = true;
|