@appsurify-testmap/rrweb-all 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.
@@ -18238,7 +18238,7 @@ class ProcessedNodeManager {
18238
18238
  destroy() {
18239
18239
  }
18240
18240
  }
18241
- const version$1 = "3.5.0-alpha.1";
18241
+ const version$1 = "3.6.0-alpha.1";
18242
18242
  let wrappedEmit;
18243
18243
  let takeFullSnapshot$1;
18244
18244
  let canvasManager;
@@ -18361,6 +18361,11 @@ function record(options = {}) {
18361
18361
  let checkoutPending = false;
18362
18362
  let checkoutDebounceTimer = null;
18363
18363
  let checkoutFreezeTimestamp = null;
18364
+ let lastScrollEmitTime = 0;
18365
+ const scrollSettleTime = (sampling.scroll || 100) * 2;
18366
+ let lastSignificantMutationTime = 0;
18367
+ const mutationGracePeriod = 500;
18368
+ let hadVisibilityCheckoutInGrace = false;
18364
18369
  const eventProcessor = (e2) => {
18365
18370
  for (const plugin3 of plugins || []) {
18366
18371
  if (plugin3.eventProcessor) {
@@ -18451,6 +18456,12 @@ function record(options = {}) {
18451
18456
  }
18452
18457
  };
18453
18458
  const wrappedMutationEmit = (m) => {
18459
+ var _a2, _b2;
18460
+ const totalChanges = (((_a2 = m.adds) == null ? void 0 : _a2.length) ?? 0) + (((_b2 = m.removes) == null ? void 0 : _b2.length) ?? 0);
18461
+ if (totalChanges > 10) {
18462
+ lastSignificantMutationTime = nowTimestamp();
18463
+ hadVisibilityCheckoutInGrace = false;
18464
+ }
18454
18465
  wrappedEmit({
18455
18466
  type: EventType.IncrementalSnapshot,
18456
18467
  data: {
@@ -18468,13 +18479,16 @@ function record(options = {}) {
18468
18479
  }
18469
18480
  });
18470
18481
  };
18471
- const wrappedScrollEmit = (p) => wrappedEmit({
18472
- type: EventType.IncrementalSnapshot,
18473
- data: {
18474
- source: IncrementalSource.Scroll,
18475
- ...p
18476
- }
18477
- });
18482
+ const wrappedScrollEmit = (p) => {
18483
+ lastScrollEmitTime = nowTimestamp();
18484
+ wrappedEmit({
18485
+ type: EventType.IncrementalSnapshot,
18486
+ data: {
18487
+ source: IncrementalSource.Scroll,
18488
+ ...p
18489
+ }
18490
+ });
18491
+ };
18478
18492
  const wrappedCanvasMutationEmit = (p) => wrappedEmit({
18479
18493
  type: EventType.IncrementalSnapshot,
18480
18494
  data: {
@@ -18558,9 +18572,19 @@ function record(options = {}) {
18558
18572
  mutationCb: recordVisibility ? wrappedVisibilityEmit : () => {
18559
18573
  },
18560
18574
  notifyActivity: checkoutEveryNvm != null ? (count) => {
18575
+ const now = nowTimestamp();
18576
+ const scrollRecent = now - lastScrollEmitTime < scrollSettleTime;
18577
+ const mutationRecent = now - lastSignificantMutationTime < mutationGracePeriod;
18578
+ if (scrollRecent && !mutationRecent) {
18579
+ return;
18580
+ }
18581
+ if (mutationRecent && hadVisibilityCheckoutInGrace) {
18582
+ return;
18583
+ }
18561
18584
  visibilityMutationCount += count;
18562
18585
  if (visibilityMutationCount >= checkoutEveryNvm) {
18563
18586
  visibilityMutationCount = 0;
18587
+ hadVisibilityCheckoutInGrace = true;
18564
18588
  if (checkoutDebounce) {
18565
18589
  if (!checkoutPending) {
18566
18590
  checkoutPending = true;
@@ -21809,7 +21833,7 @@ class Replayer {
21809
21833
  this.config.logger.log(REPLAY_CONSOLE_PREFIX, ...args);
21810
21834
  }
21811
21835
  }
21812
- const version = "3.5.0-alpha.1";
21836
+ const version = "3.6.0-alpha.1";
21813
21837
  const { getVersion } = record;
21814
21838
  const { isRecording } = record;
21815
21839
  const { flushCustomEventQueue } = record;