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