@appsurify-testmap/rrweb-record 3.5.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 +32 -8
- package/dist/rrweb-record.cjs.map +1 -1
- package/dist/rrweb-record.js +32 -8
- package/dist/rrweb-record.js.map +1 -1
- package/dist/rrweb-record.umd.cjs +32 -7
- 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
|
@@ -16217,7 +16217,7 @@ class ProcessedNodeManager {
|
|
|
16217
16217
|
destroy() {
|
|
16218
16218
|
}
|
|
16219
16219
|
}
|
|
16220
|
-
const version$1 = "3.
|
|
16220
|
+
const version$1 = "3.6.0-alpha.1";
|
|
16221
16221
|
let wrappedEmit;
|
|
16222
16222
|
let takeFullSnapshot$1;
|
|
16223
16223
|
let canvasManager;
|
|
@@ -16340,6 +16340,11 @@ function record(options = {}) {
|
|
|
16340
16340
|
let checkoutPending = false;
|
|
16341
16341
|
let checkoutDebounceTimer = null;
|
|
16342
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;
|
|
16343
16348
|
const eventProcessor = (e2) => {
|
|
16344
16349
|
for (const plugin3 of plugins || []) {
|
|
16345
16350
|
if (plugin3.eventProcessor) {
|
|
@@ -16430,6 +16435,12 @@ function record(options = {}) {
|
|
|
16430
16435
|
}
|
|
16431
16436
|
};
|
|
16432
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
|
+
}
|
|
16433
16444
|
wrappedEmit({
|
|
16434
16445
|
type: EventType.IncrementalSnapshot,
|
|
16435
16446
|
data: {
|
|
@@ -16447,13 +16458,16 @@ function record(options = {}) {
|
|
|
16447
16458
|
}
|
|
16448
16459
|
});
|
|
16449
16460
|
};
|
|
16450
|
-
const wrappedScrollEmit = (p) =>
|
|
16451
|
-
|
|
16452
|
-
|
|
16453
|
-
|
|
16454
|
-
|
|
16455
|
-
|
|
16456
|
-
|
|
16461
|
+
const wrappedScrollEmit = (p) => {
|
|
16462
|
+
lastScrollEmitTime = nowTimestamp();
|
|
16463
|
+
wrappedEmit({
|
|
16464
|
+
type: EventType.IncrementalSnapshot,
|
|
16465
|
+
data: {
|
|
16466
|
+
source: IncrementalSource.Scroll,
|
|
16467
|
+
...p
|
|
16468
|
+
}
|
|
16469
|
+
});
|
|
16470
|
+
};
|
|
16457
16471
|
const wrappedCanvasMutationEmit = (p) => wrappedEmit({
|
|
16458
16472
|
type: EventType.IncrementalSnapshot,
|
|
16459
16473
|
data: {
|
|
@@ -16537,9 +16551,19 @@ function record(options = {}) {
|
|
|
16537
16551
|
mutationCb: recordVisibility ? wrappedVisibilityEmit : () => {
|
|
16538
16552
|
},
|
|
16539
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
|
+
}
|
|
16540
16563
|
visibilityMutationCount += count;
|
|
16541
16564
|
if (visibilityMutationCount >= checkoutEveryNvm) {
|
|
16542
16565
|
visibilityMutationCount = 0;
|
|
16566
|
+
hadVisibilityCheckoutInGrace = true;
|
|
16543
16567
|
if (checkoutDebounce) {
|
|
16544
16568
|
if (!checkoutPending) {
|
|
16545
16569
|
checkoutPending = true;
|