@posthog/rrweb-snapshot 0.0.37 → 0.0.38

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.
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const record = require("./record.cjs");
4
4
  const replay = require("./replay.cjs");
5
- const types = require("./types-pLXhbZlp.cjs");
5
+ const types = require("./types-B7TTv7Jc.cjs");
6
6
  exports.IGNORED_NODE = record.IGNORED_NODE;
7
7
  exports.classMatchesRegex = record.classMatchesRegex;
8
8
  exports.cleanupSnapshot = record.cleanupSnapshot;
@@ -1,6 +1,6 @@
1
1
  import { IGNORED_NODE, classMatchesRegex, cleanupSnapshot, genId, ignoreAttribute, needMaskingText, serializeNodeWithId, snapshot, transformAttribute, visitSnapshot } from "./record.js";
2
2
  import { adaptCssForReplay, buildNodeWithSN, createCache, rebuild } from "./replay.js";
3
- import { M, N, o, p, h, e, n, f, l, j, d, g, i, b, k, a, m, r, c, s, t } from "./types-FDk_ocpu.js";
3
+ import { M, N, o, p, h, e, n, f, l, j, d, g, i, b, k, a, m, r, c, s, t } from "./types-OLXvwyjP.js";
4
4
  export {
5
5
  IGNORED_NODE,
6
6
  M as Mirror,
@@ -36,9 +36,9 @@ var __commonJS = (cb, mod) => function __require() {
36
36
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
37
37
  };
38
38
 
39
- // dist/types-pLXhbZlp.cjs
40
- var require_types_pLXhbZlp = __commonJS({
41
- "dist/types-pLXhbZlp.cjs"(exports2) {
39
+ // dist/types-B7TTv7Jc.cjs
40
+ var require_types_B7TTv7Jc = __commonJS({
41
+ "dist/types-B7TTv7Jc.cjs"(exports2) {
42
42
  "use strict";
43
43
  var __defProp2 = Object.defineProperty;
44
44
  var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -358,6 +358,17 @@ var require_types_pLXhbZlp = __commonJS({
358
358
  (childNode) => this.removeNodeFromMap(childNode)
359
359
  );
360
360
  }
361
+ if (isElement(n)) {
362
+ const shadowRootEl = index.shadowRoot(n);
363
+ if (shadowRootEl) {
364
+ this.removeNodeFromMap(shadowRootEl);
365
+ }
366
+ if (n.nodeName === "IFRAME" && n.contentDocument) {
367
+ this.removeNodeFromMap(
368
+ n.contentDocument
369
+ );
370
+ }
371
+ }
361
372
  }
362
373
  has(id) {
363
374
  return this.idNodeMap.has(id);
@@ -581,7 +592,7 @@ var require_record = __commonJS({
581
592
  "dist/record.cjs"(exports2) {
582
593
  "use strict";
583
594
  Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
584
- var types2 = require_types_pLXhbZlp();
595
+ var types2 = require_types_B7TTv7Jc();
585
596
  var _id = 1;
586
597
  var tagNameRegex = new RegExp("[^a-z0-9-_:]");
587
598
  var IGNORED_NODE = -2;
@@ -1569,7 +1580,7 @@ var require_replay = __commonJS({
1569
1580
  "dist/replay.cjs"(exports2) {
1570
1581
  "use strict";
1571
1582
  Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
1572
- var types2 = require_types_pLXhbZlp();
1583
+ var types2 = require_types_B7TTv7Jc();
1573
1584
  var MEDIA_SELECTOR = /(max|min)-device-(width|height)/;
1574
1585
  var MEDIA_SELECTOR_GLOBAL = new RegExp(MEDIA_SELECTOR.source, "g");
1575
1586
  var mediaSelectorPlugin = {
@@ -5964,7 +5975,7 @@ var require_replay = __commonJS({
5964
5975
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
5965
5976
  var record = require_record();
5966
5977
  var replay = require_replay();
5967
- var types = require_types_pLXhbZlp();
5978
+ var types = require_types_B7TTv7Jc();
5968
5979
  exports.IGNORED_NODE = record.IGNORED_NODE;
5969
5980
  exports.classMatchesRegex = record.classMatchesRegex;
5970
5981
  exports.cleanupSnapshot = record.cleanupSnapshot;