@highlight-run/rrweb 2.0.11 → 2.0.12

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.
Files changed (41) hide show
  1. package/dist/plugins/console-record.js +5 -5
  2. package/dist/plugins/console-record.min.js +5 -5
  3. package/dist/plugins/console-record.min.js.map +1 -1
  4. package/dist/plugins/console-replay.js +3 -3
  5. package/dist/plugins/console-replay.min.js +3 -3
  6. package/dist/plugins/console-replay.min.js.map +1 -1
  7. package/dist/record/rrweb-record-pack.js +2 -2
  8. package/dist/record/rrweb-record-pack.min.js +2 -2
  9. package/dist/record/rrweb-record-pack.min.js.map +1 -1
  10. package/dist/record/rrweb-record.js +3 -3
  11. package/dist/record/rrweb-record.min.js +3 -3
  12. package/dist/record/rrweb-record.min.js.map +1 -1
  13. package/dist/replay/rrweb-replay-unpack.js +4 -3
  14. package/dist/replay/rrweb-replay-unpack.min.js +4 -3
  15. package/dist/replay/rrweb-replay-unpack.min.js.map +1 -1
  16. package/dist/replay/rrweb-replay.js +4 -3
  17. package/dist/replay/rrweb-replay.min.js +4 -3
  18. package/dist/replay/rrweb-replay.min.js.map +1 -1
  19. package/dist/rrweb-all.js +25 -24
  20. package/dist/rrweb-all.min.js +25 -24
  21. package/dist/rrweb-all.min.js.map +1 -1
  22. package/dist/rrweb.js +15 -14
  23. package/dist/rrweb.min.js +15 -14
  24. package/dist/rrweb.min.js.map +1 -1
  25. package/es/rrweb/packages/rrdom/es/virtual-dom.js +63 -1
  26. package/es/rrweb/packages/rrweb/src/index.js +1 -1
  27. package/es/rrweb/packages/rrweb/src/record/index.js +1 -1
  28. package/es/rrweb/packages/rrweb/src/record/mutation.js +1 -1
  29. package/es/rrweb/packages/rrweb/src/record/observer.js +1 -1
  30. package/es/rrweb/packages/rrweb/src/replay/index.js +1 -1
  31. package/es/rrweb/packages/rrweb/src/utils.js +1 -1
  32. package/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js +1871 -0
  33. package/lib/plugins/console-record.js +9 -1
  34. package/lib/plugins/console-replay.js +9 -1
  35. package/lib/record/rrweb-record-pack.js +9 -3
  36. package/lib/record/rrweb-record.js +1063 -17
  37. package/lib/replay/rrweb-replay-unpack.js +999 -47
  38. package/lib/replay/rrweb-replay.js +999 -47
  39. package/lib/rrweb-all.js +2020 -88
  40. package/lib/rrweb.js +2020 -88
  41. package/package.json +3 -3
@@ -1,4 +1,66 @@
1
- import { NodeType as NodeType$1, createMirror as createMirror$1 } from '@highlight-run/rrweb-snapshot';
1
+ var NodeType$1;
2
+ (function (NodeType) {
3
+ NodeType[NodeType["Document"] = 0] = "Document";
4
+ NodeType[NodeType["DocumentType"] = 1] = "DocumentType";
5
+ NodeType[NodeType["Element"] = 2] = "Element";
6
+ NodeType[NodeType["Text"] = 3] = "Text";
7
+ NodeType[NodeType["CDATA"] = 4] = "CDATA";
8
+ NodeType[NodeType["Comment"] = 5] = "Comment";
9
+ })(NodeType$1 || (NodeType$1 = {}));
10
+ var Mirror$1 = (function () {
11
+ function Mirror() {
12
+ this.idNodeMap = new Map();
13
+ this.nodeMetaMap = new WeakMap();
14
+ }
15
+ Mirror.prototype.getId = function (n) {
16
+ var _a;
17
+ if (!n)
18
+ return -1;
19
+ var id = (_a = this.getMeta(n)) === null || _a === void 0 ? void 0 : _a.id;
20
+ return id !== null && id !== void 0 ? id : -1;
21
+ };
22
+ Mirror.prototype.getNode = function (id) {
23
+ return this.idNodeMap.get(id) || null;
24
+ };
25
+ Mirror.prototype.getIds = function () {
26
+ return Array.from(this.idNodeMap.keys());
27
+ };
28
+ Mirror.prototype.getMeta = function (n) {
29
+ return this.nodeMetaMap.get(n) || null;
30
+ };
31
+ Mirror.prototype.removeNodeFromMap = function (n) {
32
+ var _this = this;
33
+ var id = this.getId(n);
34
+ this.idNodeMap["delete"](id);
35
+ if (n.childNodes) {
36
+ n.childNodes.forEach(function (childNode) {
37
+ return _this.removeNodeFromMap(childNode);
38
+ });
39
+ }
40
+ };
41
+ Mirror.prototype.has = function (id) {
42
+ return this.idNodeMap.has(id);
43
+ };
44
+ Mirror.prototype.hasNode = function (node) {
45
+ return this.nodeMetaMap.has(node);
46
+ };
47
+ Mirror.prototype.add = function (n, meta) {
48
+ var id = meta.id;
49
+ this.idNodeMap.set(id, n);
50
+ this.nodeMetaMap.set(n, meta);
51
+ };
52
+ Mirror.prototype.replace = function (id, n) {
53
+ this.idNodeMap.set(id, n);
54
+ };
55
+ Mirror.prototype.reset = function () {
56
+ this.idNodeMap = new Map();
57
+ this.nodeMetaMap = new WeakMap();
58
+ };
59
+ return Mirror;
60
+ }());
61
+ function createMirror$1() {
62
+ return new Mirror$1();
63
+ }
2
64
 
3
65
  function parseCSSText(cssText) {
4
66
  const res = {};
@@ -1,6 +1,6 @@
1
1
  import record from './record/index.js';
2
2
  export { default as record } from './record/index.js';
3
- import '@highlight-run/rrweb-snapshot';
3
+ import '../../rrweb-snapshot/es/rrweb-snapshot.js';
4
4
  import '../../rrdom/es/virtual-dom.js';
5
5
  export { EventType, IncrementalSource, MouseInteractions, ReplayerEvents } from './types.js';
6
6
  import * as utils from './utils.js';
@@ -1,4 +1,4 @@
1
- import { createMirror, snapshot } from '@highlight-run/rrweb-snapshot';
1
+ import { createMirror, snapshot } from '../../../rrweb-snapshot/es/rrweb-snapshot.js';
2
2
  import { initObservers, mutationBuffers } from './observer.js';
3
3
  import { polyfill, on, getWindowWidth, getWindowHeight, isSerializedIframe, isSerializedStylesheet, hasShadowRoot } from '../utils.js';
4
4
  import { EventType, IncrementalSource } from '../types.js';
@@ -1,4 +1,4 @@
1
- import { obfuscateText, isShadowRoot, maskInputValue, transformAttribute, needMaskingText, IGNORED_NODE, serializeNodeWithId } from '@highlight-run/rrweb-snapshot';
1
+ import { obfuscateText, isShadowRoot, maskInputValue, transformAttribute, needMaskingText, IGNORED_NODE, serializeNodeWithId } from '../../../rrweb-snapshot/es/rrweb-snapshot.js';
2
2
  import { isIgnored, isBlocked, isSerialized, isAncestorRemoved, isSerializedIframe, isSerializedStylesheet, hasShadowRoot } from '../utils.js';
3
3
 
4
4
  function isNodeInLinkedList(n) {
@@ -1,4 +1,4 @@
1
- import { maskInputValue } from '@highlight-run/rrweb-snapshot';
1
+ import { maskInputValue } from '../../../rrweb-snapshot/es/rrweb-snapshot.js';
2
2
  import { on, throttle, isBlocked, getWindowHeight, getWindowWidth, hookSetter, patch, isTouchEvent, isCanvasNode } from '../utils.js';
3
3
  import { MouseInteractions, IncrementalSource } from '../types.js';
4
4
  import MutationBuffer from './mutation.js';
@@ -1,5 +1,5 @@
1
1
  import { __awaiter } from './../../../../ext/tslib/tslib.es6.js';
2
- import { createCache, createMirror, rebuild, buildNodeWithSN, NodeType } from '@highlight-run/rrweb-snapshot';
2
+ import { createCache, createMirror, rebuild, buildNodeWithSN, NodeType } from '../../../rrweb-snapshot/es/rrweb-snapshot.js';
3
3
  import { RRDocument, diff, createOrGetNode, getDefaultSN, StyleRuleType, buildFromDom, buildFromNode } from '../../../rrdom/es/virtual-dom.js';
4
4
  import * as mitt_es from './../../../../ext/mitt/dist/mitt.es.js';
5
5
  import mitt$1 from './../../../../ext/mitt/dist/mitt.es.js';
@@ -1,4 +1,4 @@
1
- import { classMatchesRegex, IGNORED_NODE, isShadowRoot } from '@highlight-run/rrweb-snapshot';
1
+ import { classMatchesRegex, IGNORED_NODE, isShadowRoot } from '../../rrweb-snapshot/es/rrweb-snapshot.js';
2
2
 
3
3
  function on(type, fn, target = document) {
4
4
  const options = { capture: true, passive: true };