@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.cjs
CHANGED
|
@@ -16219,7 +16219,7 @@ class ProcessedNodeManager {
|
|
|
16219
16219
|
destroy() {
|
|
16220
16220
|
}
|
|
16221
16221
|
}
|
|
16222
|
-
const version$1 = "3.
|
|
16222
|
+
const version$1 = "3.6.0-alpha.1";
|
|
16223
16223
|
let wrappedEmit;
|
|
16224
16224
|
let takeFullSnapshot$1;
|
|
16225
16225
|
let canvasManager;
|
|
@@ -16342,6 +16342,11 @@ function record(options = {}) {
|
|
|
16342
16342
|
let checkoutPending = false;
|
|
16343
16343
|
let checkoutDebounceTimer = null;
|
|
16344
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;
|
|
16345
16350
|
const eventProcessor = (e2) => {
|
|
16346
16351
|
for (const plugin3 of plugins || []) {
|
|
16347
16352
|
if (plugin3.eventProcessor) {
|
|
@@ -16432,6 +16437,12 @@ function record(options = {}) {
|
|
|
16432
16437
|
}
|
|
16433
16438
|
};
|
|
16434
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
|
+
}
|
|
16435
16446
|
wrappedEmit({
|
|
16436
16447
|
type: EventType.IncrementalSnapshot,
|
|
16437
16448
|
data: {
|
|
@@ -16449,13 +16460,16 @@ function record(options = {}) {
|
|
|
16449
16460
|
}
|
|
16450
16461
|
});
|
|
16451
16462
|
};
|
|
16452
|
-
const wrappedScrollEmit = (p) =>
|
|
16453
|
-
|
|
16454
|
-
|
|
16455
|
-
|
|
16456
|
-
|
|
16457
|
-
|
|
16458
|
-
|
|
16463
|
+
const wrappedScrollEmit = (p) => {
|
|
16464
|
+
lastScrollEmitTime = nowTimestamp();
|
|
16465
|
+
wrappedEmit({
|
|
16466
|
+
type: EventType.IncrementalSnapshot,
|
|
16467
|
+
data: {
|
|
16468
|
+
source: IncrementalSource.Scroll,
|
|
16469
|
+
...p
|
|
16470
|
+
}
|
|
16471
|
+
});
|
|
16472
|
+
};
|
|
16459
16473
|
const wrappedCanvasMutationEmit = (p) => wrappedEmit({
|
|
16460
16474
|
type: EventType.IncrementalSnapshot,
|
|
16461
16475
|
data: {
|
|
@@ -16539,9 +16553,19 @@ function record(options = {}) {
|
|
|
16539
16553
|
mutationCb: recordVisibility ? wrappedVisibilityEmit : () => {
|
|
16540
16554
|
},
|
|
16541
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
|
+
}
|
|
16542
16565
|
visibilityMutationCount += count;
|
|
16543
16566
|
if (visibilityMutationCount >= checkoutEveryNvm) {
|
|
16544
16567
|
visibilityMutationCount = 0;
|
|
16568
|
+
hadVisibilityCheckoutInGrace = true;
|
|
16545
16569
|
if (checkoutDebounce) {
|
|
16546
16570
|
if (!checkoutPending) {
|
|
16547
16571
|
checkoutPending = true;
|