@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.
@@ -1171,6 +1171,14 @@ function slimDOMExcluded(sn, slimDOMOptions) {
1171
1171
  }
1172
1172
  const DEFAULT_MAX_DEPTH = 50;
1173
1173
  let _maxDepthWarned = false;
1174
+ let _maxDepthReached = false;
1175
+ function wasMaxDepthReached() {
1176
+ return _maxDepthReached;
1177
+ }
1178
+ function resetMaxDepthState() {
1179
+ _maxDepthReached = false;
1180
+ _maxDepthWarned = false;
1181
+ }
1174
1182
  function serializeNodeWithId(n2, options) {
1175
1183
  const {
1176
1184
  doc,
@@ -1201,6 +1209,7 @@ function serializeNodeWithId(n2, options) {
1201
1209
  let { needsMask } = options;
1202
1210
  let { preserveWhiteSpace = true } = options;
1203
1211
  if (depth >= maxDepth) {
1212
+ _maxDepthReached = true;
1204
1213
  if (!_maxDepthWarned) {
1205
1214
  _maxDepthWarned = true;
1206
1215
  console.warn(
@@ -13209,6 +13218,8 @@ const { addCustomEvent } = record;
13209
13218
  const { freezePage } = record;
13210
13219
  const { takeFullSnapshot } = record;
13211
13220
  exports.record = record;
13221
+ exports.resetMaxDepthState = resetMaxDepthState;
13222
+ exports.wasMaxDepthReached = wasMaxDepthReached;
13212
13223
  ;if (typeof module.exports == "object" && typeof exports == "object") {
13213
13224
  var __cp = (to, from, except, desc) => {
13214
13225
  if ((from && typeof from === "object") || typeof from === "function") {