@posthog/rrweb 0.0.41 → 0.0.42

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.d.cts CHANGED
@@ -26,6 +26,7 @@ import { PackFn } from '@posthog/rrweb-types';
26
26
  import { playerMetaData } from '@posthog/rrweb-types';
27
27
  import { RecordPlugin } from '@posthog/rrweb-types';
28
28
  import { ReplayerEvents } from '@posthog/rrweb-types';
29
+ import { resetMaxDepthState } from '@posthog/rrweb-snapshot';
29
30
  import { RRDocument } from '@posthog/rrdom';
30
31
  import { RRIFrameElement } from '@posthog/rrdom';
31
32
  import { RRNode } from '@posthog/rrdom';
@@ -35,6 +36,7 @@ import { StateMachine } from '@xstate/fsm';
35
36
  import { textMutation } from '@posthog/rrweb-types';
36
37
  import { throttleOptions } from '@posthog/rrweb-types';
37
38
  import { UnpackFn } from '@posthog/rrweb-types';
39
+ import { wasMaxDepthReached } from '@posthog/rrweb-snapshot';
38
40
 
39
41
  export declare const addCustomEvent: <T>(tag: string, payload: T) => void;
40
42
 
@@ -355,6 +357,8 @@ export declare type ReplayPlugin = {
355
357
  }) => void;
356
358
  };
357
359
 
360
+ export { resetMaxDepthState }
361
+
358
362
  declare type ResolveTree = {
359
363
  value: addedNodeMutation;
360
364
  children: ResolveTree[];
@@ -464,6 +468,8 @@ declare namespace utils {
464
468
  }
465
469
  export { utils }
466
470
 
471
+ export { wasMaxDepthReached }
472
+
467
473
  export { }
468
474
 
469
475
 
package/dist/rrweb.d.ts CHANGED
@@ -26,6 +26,7 @@ import { PackFn } from '@posthog/rrweb-types';
26
26
  import { playerMetaData } from '@posthog/rrweb-types';
27
27
  import { RecordPlugin } from '@posthog/rrweb-types';
28
28
  import { ReplayerEvents } from '@posthog/rrweb-types';
29
+ import { resetMaxDepthState } from '@posthog/rrweb-snapshot';
29
30
  import { RRDocument } from '@posthog/rrdom';
30
31
  import { RRIFrameElement } from '@posthog/rrdom';
31
32
  import { RRNode } from '@posthog/rrdom';
@@ -35,6 +36,7 @@ import { StateMachine } from '@xstate/fsm';
35
36
  import { textMutation } from '@posthog/rrweb-types';
36
37
  import { throttleOptions } from '@posthog/rrweb-types';
37
38
  import { UnpackFn } from '@posthog/rrweb-types';
39
+ import { wasMaxDepthReached } from '@posthog/rrweb-snapshot';
38
40
 
39
41
  export declare const addCustomEvent: <T>(tag: string, payload: T) => void;
40
42
 
@@ -355,6 +357,8 @@ export declare type ReplayPlugin = {
355
357
  }) => void;
356
358
  };
357
359
 
360
+ export { resetMaxDepthState }
361
+
358
362
  declare type ResolveTree = {
359
363
  value: addedNodeMutation;
360
364
  children: ResolveTree[];
@@ -464,6 +468,8 @@ declare namespace utils {
464
468
  }
465
469
  export { utils }
466
470
 
471
+ export { wasMaxDepthReached }
472
+
467
473
  export { }
468
474
 
469
475
 
package/dist/rrweb.js CHANGED
@@ -1148,6 +1148,14 @@ function slimDOMExcluded(sn, slimDOMOptions) {
1148
1148
  }
1149
1149
  const DEFAULT_MAX_DEPTH = 50;
1150
1150
  let _maxDepthWarned = false;
1151
+ let _maxDepthReached = false;
1152
+ function wasMaxDepthReached() {
1153
+ return _maxDepthReached;
1154
+ }
1155
+ function resetMaxDepthState() {
1156
+ _maxDepthReached = false;
1157
+ _maxDepthWarned = false;
1158
+ }
1151
1159
  function serializeNodeWithId(n2, options) {
1152
1160
  const {
1153
1161
  doc,
@@ -1178,6 +1186,7 @@ function serializeNodeWithId(n2, options) {
1178
1186
  let { needsMask } = options;
1179
1187
  let { preserveWhiteSpace = true } = options;
1180
1188
  if (depth >= maxDepth) {
1189
+ _maxDepthReached = true;
1181
1190
  if (!_maxDepthWarned) {
1182
1191
  _maxDepthWarned = true;
1183
1192
  console.warn(
@@ -18202,7 +18211,9 @@ export {
18202
18211
  freezePage,
18203
18212
  _mirror as mirror,
18204
18213
  record,
18214
+ resetMaxDepthState,
18205
18215
  takeFullSnapshot,
18206
- utils
18216
+ utils,
18217
+ wasMaxDepthReached
18207
18218
  };
18208
18219
  //# sourceMappingURL=rrweb.js.map