@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
package/dist/rrweb-record.cjs
CHANGED
|
@@ -16084,9 +16084,7 @@ class NavigationManager {
|
|
|
16084
16084
|
});
|
|
16085
16085
|
this.settlingObserver.observe(this.doc, {
|
|
16086
16086
|
childList: true,
|
|
16087
|
-
subtree: true
|
|
16088
|
-
attributes: true,
|
|
16089
|
-
characterData: true
|
|
16087
|
+
subtree: true
|
|
16090
16088
|
});
|
|
16091
16089
|
this.settleCheckTimer = setTimeout(
|
|
16092
16090
|
() => this.checkSettled(),
|
|
@@ -16221,7 +16219,7 @@ class ProcessedNodeManager {
|
|
|
16221
16219
|
destroy() {
|
|
16222
16220
|
}
|
|
16223
16221
|
}
|
|
16224
|
-
const version$1 = "3.
|
|
16222
|
+
const version$1 = "3.6.0-alpha.1";
|
|
16225
16223
|
let wrappedEmit;
|
|
16226
16224
|
let takeFullSnapshot$1;
|
|
16227
16225
|
let canvasManager;
|
|
@@ -16344,6 +16342,11 @@ function record(options = {}) {
|
|
|
16344
16342
|
let checkoutPending = false;
|
|
16345
16343
|
let checkoutDebounceTimer = null;
|
|
16346
16344
|
let checkoutFreezeTimestamp = null;
|
|
16345
|
+
let lastScrollEmitTime = 0;
|
|
16346
|
+
const scrollSettleTime = (sampling.scroll || 100) * 2;
|
|
16347
|
+
let lastSignificantMutationTime = 0;
|
|
16348
|
+
const mutationGracePeriod = 500;
|
|
16349
|
+
let hadVisibilityCheckoutInGrace = false;
|
|
16347
16350
|
const eventProcessor = (e2) => {
|
|
16348
16351
|
for (const plugin3 of plugins || []) {
|
|
16349
16352
|
if (plugin3.eventProcessor) {
|
|
@@ -16434,6 +16437,12 @@ function record(options = {}) {
|
|
|
16434
16437
|
}
|
|
16435
16438
|
};
|
|
16436
16439
|
const wrappedMutationEmit = (m) => {
|
|
16440
|
+
var _a2, _b;
|
|
16441
|
+
const totalChanges = (((_a2 = m.adds) == null ? void 0 : _a2.length) ?? 0) + (((_b = m.removes) == null ? void 0 : _b.length) ?? 0);
|
|
16442
|
+
if (totalChanges > 10) {
|
|
16443
|
+
lastSignificantMutationTime = nowTimestamp();
|
|
16444
|
+
hadVisibilityCheckoutInGrace = false;
|
|
16445
|
+
}
|
|
16437
16446
|
wrappedEmit({
|
|
16438
16447
|
type: EventType.IncrementalSnapshot,
|
|
16439
16448
|
data: {
|
|
@@ -16451,13 +16460,16 @@ function record(options = {}) {
|
|
|
16451
16460
|
}
|
|
16452
16461
|
});
|
|
16453
16462
|
};
|
|
16454
|
-
const wrappedScrollEmit = (p) =>
|
|
16455
|
-
|
|
16456
|
-
|
|
16457
|
-
|
|
16458
|
-
|
|
16459
|
-
|
|
16460
|
-
|
|
16463
|
+
const wrappedScrollEmit = (p) => {
|
|
16464
|
+
lastScrollEmitTime = nowTimestamp();
|
|
16465
|
+
wrappedEmit({
|
|
16466
|
+
type: EventType.IncrementalSnapshot,
|
|
16467
|
+
data: {
|
|
16468
|
+
source: IncrementalSource.Scroll,
|
|
16469
|
+
...p
|
|
16470
|
+
}
|
|
16471
|
+
});
|
|
16472
|
+
};
|
|
16461
16473
|
const wrappedCanvasMutationEmit = (p) => wrappedEmit({
|
|
16462
16474
|
type: EventType.IncrementalSnapshot,
|
|
16463
16475
|
data: {
|
|
@@ -16541,9 +16553,19 @@ function record(options = {}) {
|
|
|
16541
16553
|
mutationCb: recordVisibility ? wrappedVisibilityEmit : () => {
|
|
16542
16554
|
},
|
|
16543
16555
|
notifyActivity: checkoutEveryNvm != null ? (count) => {
|
|
16556
|
+
const now = nowTimestamp();
|
|
16557
|
+
const scrollRecent = now - lastScrollEmitTime < scrollSettleTime;
|
|
16558
|
+
const mutationRecent = now - lastSignificantMutationTime < mutationGracePeriod;
|
|
16559
|
+
if (scrollRecent && !mutationRecent) {
|
|
16560
|
+
return;
|
|
16561
|
+
}
|
|
16562
|
+
if (mutationRecent && hadVisibilityCheckoutInGrace) {
|
|
16563
|
+
return;
|
|
16564
|
+
}
|
|
16544
16565
|
visibilityMutationCount += count;
|
|
16545
16566
|
if (visibilityMutationCount >= checkoutEveryNvm) {
|
|
16546
16567
|
visibilityMutationCount = 0;
|
|
16568
|
+
hadVisibilityCheckoutInGrace = true;
|
|
16547
16569
|
if (checkoutDebounce) {
|
|
16548
16570
|
if (!checkoutPending) {
|
|
16549
16571
|
checkoutPending = true;
|