@posthog/rrweb-record 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.
@@ -1136,6 +1136,14 @@ function slimDOMExcluded(sn, slimDOMOptions) {
1136
1136
  }
1137
1137
  const DEFAULT_MAX_DEPTH = 50;
1138
1138
  let _maxDepthWarned = false;
1139
+ let _maxDepthReached = false;
1140
+ function wasMaxDepthReached() {
1141
+ return _maxDepthReached;
1142
+ }
1143
+ function resetMaxDepthState() {
1144
+ _maxDepthReached = false;
1145
+ _maxDepthWarned = false;
1146
+ }
1139
1147
  function serializeNodeWithId(n2, options) {
1140
1148
  const {
1141
1149
  doc,
@@ -1166,6 +1174,7 @@ function serializeNodeWithId(n2, options) {
1166
1174
  let { needsMask } = options;
1167
1175
  let { preserveWhiteSpace = true } = options;
1168
1176
  if (depth >= maxDepth) {
1177
+ _maxDepthReached = true;
1169
1178
  if (!_maxDepthWarned) {
1170
1179
  _maxDepthWarned = true;
1171
1180
  console.warn(
@@ -13193,6 +13202,8 @@ const { addCustomEvent } = record;
13193
13202
  const { freezePage } = record;
13194
13203
  const { takeFullSnapshot } = record;
13195
13204
  export {
13196
- record
13205
+ record,
13206
+ resetMaxDepthState,
13207
+ wasMaxDepthReached
13197
13208
  };
13198
13209
  //# sourceMappingURL=rrweb-record.js.map