@highlight-run/rrweb 1.2.0 → 2.0.1
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/plugins/console-record.js +655 -0
- package/dist/plugins/console-record.min.js +1 -1
- package/dist/plugins/console-record.min.js.map +1 -1
- package/dist/plugins/console-replay.js +293 -0
- package/dist/plugins/console-replay.min.js +16 -0
- package/dist/plugins/console-replay.min.js.map +1 -0
- package/dist/plugins/sequential-id-record.js +33 -0
- package/dist/plugins/sequential-id-record.min.js +2 -0
- package/dist/plugins/sequential-id-record.min.js.map +1 -0
- package/dist/plugins/sequential-id-replay.js +37 -0
- package/dist/plugins/sequential-id-replay.min.js +2 -0
- package/dist/plugins/sequential-id-replay.min.js.map +1 -0
- package/dist/record/rrweb-record-pack.js +747 -0
- package/dist/record/rrweb-record-pack.min.js +16 -0
- package/dist/record/rrweb-record-pack.min.js.map +1 -0
- package/dist/record/rrweb-record.js +3318 -0
- package/dist/record/rrweb-record.min.js +16 -0
- package/dist/record/rrweb-record.min.js.map +1 -0
- package/dist/replay/rrweb-replay-unpack.js +4626 -0
- package/dist/replay/rrweb-replay-unpack.min.css +2 -0
- package/dist/replay/rrweb-replay-unpack.min.css.map +1 -0
- package/dist/replay/rrweb-replay-unpack.min.js +30 -0
- package/dist/replay/rrweb-replay-unpack.min.js.map +1 -0
- package/dist/replay/rrweb-replay.js +4216 -0
- package/dist/replay/rrweb-replay.min.css +2 -0
- package/dist/replay/rrweb-replay.min.css.map +1 -0
- package/dist/replay/rrweb-replay.min.js +30 -0
- package/dist/replay/rrweb-replay.min.js.map +1 -0
- package/dist/rrweb-all.js +8708 -0
- package/dist/rrweb-all.min.css +2 -0
- package/dist/rrweb-all.min.css.map +1 -0
- package/dist/rrweb-all.min.js +30 -0
- package/dist/rrweb-all.min.js.map +1 -0
- package/dist/rrweb.js +7294 -0
- package/dist/rrweb.min.css +2 -0
- package/dist/rrweb.min.css.map +1 -0
- package/dist/rrweb.min.js +2 -2
- package/dist/rrweb.min.js.map +1 -1
- package/es/rrweb/ext/@xstate/fsm/es/index.js +17 -0
- package/es/rrweb/ext/base64-arraybuffer/dist/base64-arraybuffer.es5.js +49 -0
- package/es/rrweb/ext/fflate/esm/browser.js +777 -0
- package/es/rrweb/ext/mitt/dist/mitt.es.js +63 -0
- package/es/rrweb/packages/rrweb/ext/tslib/tslib.es6.js +78 -0
- package/es/rrweb/packages/rrweb/src/entries/all.js +13 -0
- package/es/rrweb/packages/rrweb/src/index.js +12 -0
- package/es/rrweb/packages/rrweb/src/packer/base.js +3 -0
- package/es/rrweb/packages/rrweb/src/packer/pack.js +10 -0
- package/es/rrweb/packages/rrweb/src/packer/unpack.js +29 -0
- package/es/rrweb/packages/rrweb/src/plugins/console/record/error-stack-parser.js +179 -0
- package/es/rrweb/packages/rrweb/src/plugins/console/record/index.js +134 -0
- package/es/rrweb/packages/rrweb/src/plugins/console/record/stringify.js +141 -0
- package/es/rrweb/packages/rrweb/src/plugins/console/replay/index.js +111 -0
- package/es/rrweb/packages/rrweb/src/plugins/sequential-id/record/index.js +23 -0
- package/es/rrweb/packages/rrweb/src/plugins/sequential-id/replay/index.js +28 -0
- package/es/rrweb/packages/rrweb/src/record/iframe-manager.js +32 -0
- package/es/rrweb/packages/rrweb/src/record/index.js +381 -0
- package/es/rrweb/packages/rrweb/src/record/mutation.js +532 -0
- package/es/rrweb/packages/rrweb/src/record/observer.js +665 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/2d.js +78 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas-manager.js +93 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas.js +30 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/serialize-args.js +116 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/webgl.js +78 -0
- package/es/rrweb/packages/rrweb/src/record/shadow-dom-manager.js +45 -0
- package/es/rrweb/packages/rrweb/src/replay/canvas/2d.js +25 -0
- package/es/rrweb/packages/rrweb/src/replay/canvas/index.js +35 -0
- package/es/rrweb/packages/rrweb/src/replay/canvas/webgl.js +124 -0
- package/es/rrweb/packages/rrweb/src/replay/index.js +1864 -0
- package/es/rrweb/packages/rrweb/src/replay/machine.js +321 -0
- package/es/rrweb/packages/rrweb/src/replay/smoothscroll.js +221 -0
- package/es/rrweb/packages/rrweb/src/replay/styles/inject-style.js +8 -0
- package/es/rrweb/packages/rrweb/src/replay/timer.js +96 -0
- package/es/rrweb/packages/rrweb/src/replay/virtual-styles.js +121 -0
- package/es/rrweb/packages/rrweb/src/types.js +75 -0
- package/es/rrweb/packages/rrweb/src/utils.js +509 -0
- package/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js +1697 -0
- package/lib/plugins/console-record.js +650 -0
- package/lib/plugins/console-replay.js +288 -0
- package/lib/plugins/sequential-id-record.js +28 -0
- package/lib/plugins/sequential-id-replay.js +32 -0
- package/lib/record/rrweb-record-pack.js +742 -0
- package/lib/record/rrweb-record.js +3315 -0
- package/lib/replay/rrweb-replay-unpack.js +4621 -0
- package/lib/replay/rrweb-replay.js +4211 -0
- package/lib/rrweb-all.js +8703 -0
- package/lib/rrweb.js +7289 -0
- package/package.json +41 -43
- package/typings/entries/all.d.ts +6 -0
- package/{dist → typings}/entries/record-pack.d.ts +0 -0
- package/{dist → typings}/entries/replay-unpack.d.ts +0 -0
- package/{dist → typings}/index.d.ts +1 -2
- package/{dist → typings}/packer/base.d.ts +0 -0
- package/{dist → typings}/packer/index.d.ts +0 -0
- package/{dist → typings}/packer/pack.d.ts +0 -0
- package/{dist → typings}/packer/unpack.d.ts +0 -0
- package/{dist → typings}/plugins/console/record/error-stack-parser.d.ts +0 -0
- package/{dist → typings}/plugins/console/record/index.d.ts +3 -2
- package/{dist → typings}/plugins/console/record/stringify.d.ts +0 -0
- package/{dist → typings}/plugins/console/replay/index.d.ts +2 -2
- package/{dist → typings}/plugins/sequential-id/record/index.d.ts +0 -0
- package/{dist → typings}/plugins/sequential-id/replay/index.d.ts +0 -0
- package/{dist → typings}/record/iframe-manager.d.ts +1 -1
- package/{dist → typings}/record/index.d.ts +0 -0
- package/{dist → typings}/record/mutation.d.ts +5 -8
- package/typings/record/observer.d.ts +7 -0
- package/{dist → typings}/record/observers/canvas/2d.d.ts +0 -0
- package/{dist → typings}/record/observers/canvas/canvas-manager.d.ts +0 -0
- package/{dist → typings}/record/observers/canvas/canvas.d.ts +0 -0
- package/{dist → typings}/record/observers/canvas/serialize-args.d.ts +1 -1
- package/{dist → typings}/record/observers/canvas/webgl.d.ts +0 -0
- package/typings/record/observers/canvas/webgl2.d.ts +2 -0
- package/typings/record/shadow-dom-manager.d.ts +21 -0
- package/{dist → typings}/replay/canvas/2d.d.ts +0 -0
- package/{dist → typings}/replay/canvas/index.d.ts +0 -0
- package/{dist → typings}/replay/canvas/webgl.d.ts +0 -0
- package/{dist → typings}/replay/index.d.ts +1 -0
- package/{dist → typings}/replay/machine.d.ts +0 -0
- package/{dist → typings}/replay/smoothscroll.d.ts +0 -0
- package/{dist → typings}/replay/styles/inject-style.d.ts +0 -0
- package/{dist → typings}/replay/timer.d.ts +0 -0
- package/{dist → typings}/replay/virtual-styles.d.ts +1 -1
- package/{dist → typings}/rrdom/index.d.ts +0 -0
- package/{dist → typings}/rrdom/tree-node.d.ts +0 -0
- package/{dist → typings}/types.d.ts +7 -8
- package/{dist → typings}/utils.d.ts +3 -4
- package/CHANGELOG.md +0 -26
- package/README.md +0 -124
- package/README.zh_CN.md +0 -122
- package/dist/entries/all.d.ts +0 -4
- package/dist/index.css +0 -82
- package/dist/index.css.map +0 -1
- package/dist/index.js +0 -3
- package/dist/index.js.LICENSE.txt +0 -14
- package/dist/index.js.map +0 -1
- package/dist/plugins/entries/all.d.ts +0 -4
- package/dist/plugins/entries/record-pack.d.ts +0 -2
- package/dist/plugins/entries/replay-unpack.d.ts +0 -2
- package/dist/plugins/index.d.ts +0 -9
- package/dist/plugins/packer/base.d.ts +0 -7
- package/dist/plugins/packer/index.d.ts +0 -2
- package/dist/plugins/packer/pack.d.ts +0 -2
- package/dist/plugins/packer/unpack.d.ts +0 -2
- package/dist/plugins/plugins/console/record/error-stack-parser.d.ts +0 -37
- package/dist/plugins/plugins/console/record/index.d.ts +0 -41
- package/dist/plugins/plugins/console/record/stringify.d.ts +0 -2
- package/dist/plugins/plugins/console/replay/index.d.ts +0 -9
- package/dist/plugins/plugins/sequential-id/record/index.d.ts +0 -6
- package/dist/plugins/plugins/sequential-id/replay/index.d.ts +0 -7
- package/dist/plugins/record/iframe-manager.d.ts +0 -13
- package/dist/plugins/record/index.d.ts +0 -9
- package/dist/plugins/record/mutation.d.ts +0 -45
- package/dist/plugins/record/observer.d.ts +0 -11
- package/dist/plugins/record/observers/canvas/2d.d.ts +0 -2
- package/dist/plugins/record/observers/canvas/canvas-manager.d.ts +0 -32
- package/dist/plugins/record/observers/canvas/canvas.d.ts +0 -2
- package/dist/plugins/record/observers/canvas/serialize-args.d.ts +0 -6
- package/dist/plugins/record/observers/canvas/webgl.d.ts +0 -2
- package/dist/plugins/record/shadow-dom-manager.d.ts +0 -34
- package/dist/plugins/replay/canvas/2d.d.ts +0 -9
- package/dist/plugins/replay/canvas/index.d.ts +0 -9
- package/dist/plugins/replay/canvas/webgl.d.ts +0 -11
- package/dist/plugins/replay/index.d.ts +0 -82
- package/dist/plugins/replay/machine.d.ts +0 -85
- package/dist/plugins/replay/smoothscroll.d.ts +0 -1
- package/dist/plugins/replay/styles/inject-style.d.ts +0 -2
- package/dist/plugins/replay/timer.d.ts +0 -19
- package/dist/plugins/replay/virtual-styles.d.ts +0 -43
- package/dist/plugins/rrdom/index.d.ts +0 -1
- package/dist/plugins/rrdom/tree-node.d.ts +0 -20
- package/dist/plugins/snapshot/css.d.ts +0 -92
- package/dist/plugins/snapshot/index.d.ts +0 -5
- package/dist/plugins/snapshot/rebuild.d.ts +0 -19
- package/dist/plugins/snapshot/snapshot.d.ts +0 -49
- package/dist/plugins/snapshot/types.d.ts +0 -99
- package/dist/plugins/snapshot/utils.d.ts +0 -11
- package/dist/plugins/types.d.ts +0 -509
- package/dist/plugins/utils.d.ts +0 -71
- package/dist/record/observer.d.ts +0 -11
- package/dist/record/shadow-dom-manager.d.ts +0 -34
- package/dist/snapshot/css.d.ts +0 -92
- package/dist/snapshot/index.d.ts +0 -5
- package/dist/snapshot/rebuild.d.ts +0 -19
- package/dist/snapshot/snapshot.d.ts +0 -49
- package/dist/snapshot/types.d.ts +0 -99
- package/dist/snapshot/utils.d.ts +0 -11
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var rrwebSequentialIdRecord = (function (exports) {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var defaultOptions = {
|
|
5
|
+
key: '_sid',
|
|
6
|
+
};
|
|
7
|
+
var PLUGIN_NAME = 'rrweb/sequential-id@1';
|
|
8
|
+
var getRecordSequentialIdPlugin = function (options) {
|
|
9
|
+
var _options = options
|
|
10
|
+
? Object.assign({}, defaultOptions, options)
|
|
11
|
+
: defaultOptions;
|
|
12
|
+
var id = 0;
|
|
13
|
+
return {
|
|
14
|
+
name: PLUGIN_NAME,
|
|
15
|
+
eventProcessor: function (event) {
|
|
16
|
+
var _a;
|
|
17
|
+
Object.assign(event, (_a = {},
|
|
18
|
+
_a[_options.key] = ++id,
|
|
19
|
+
_a));
|
|
20
|
+
return event;
|
|
21
|
+
},
|
|
22
|
+
options: _options,
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.PLUGIN_NAME = PLUGIN_NAME;
|
|
27
|
+
exports.getRecordSequentialIdPlugin = getRecordSequentialIdPlugin;
|
|
28
|
+
|
|
29
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
30
|
+
|
|
31
|
+
return exports;
|
|
32
|
+
|
|
33
|
+
}({}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var rrwebSequentialIdRecord=function(e){"use strict";var r={key:"_sid"},n="rrweb/sequential-id@1";return e.PLUGIN_NAME=n,e.getRecordSequentialIdPlugin=function(e){var t=e?Object.assign({},r,e):r,i=0;return{name:n,eventProcessor:function(e){var r;return Object.assign(e,((r={})[t.key]=++i,r)),e},options:t}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
|
|
2
|
+
//# sourceMappingURL=sequential-id-record.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sequential-id-record.min.js","sources":["../../../src/plugins/sequential-id/record/index.ts"],"sourcesContent":["import { RecordPlugin } from '../../../types';\n\nexport type SequentialIdOptions = {\n key: string;\n};\n\nconst defaultOptions: SequentialIdOptions = {\n key: '_sid',\n};\n\nexport const PLUGIN_NAME = 'rrweb/sequential-id@1';\n\nexport const getRecordSequentialIdPlugin: (\n options?: Partial<SequentialIdOptions>,\n) => RecordPlugin = (options) => {\n const _options = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let id = 0;\n\n return {\n name: PLUGIN_NAME,\n eventProcessor(event) {\n Object.assign(event, {\n [_options.key]: ++id,\n });\n return event;\n },\n options: _options,\n };\n};\n"],"names":["defaultOptions","key","PLUGIN_NAME","options","_options","Object","assign","id","name","eventProcessor","event"],"mappings":"qDAMA,IAAMA,EAAsC,CAC1CC,IAAK,QAGMC,EAAc,6EAIP,SAACC,GACnB,IAAMC,EAAWD,EACbE,OAAOC,OAAO,GAAIN,EAAgBG,GAClCH,EACAO,EAAK,EAET,MAAO,CACLC,KAAMN,EACNO,wBAAeC,SAIb,OAHAL,OAAOC,OAAOI,UACXN,EAASH,OAAQM,MAEbG,GAETP,QAASC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var rrwebSequentialIdReplay = (function (exports) {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var defaultOptions = {
|
|
5
|
+
key: '_sid',
|
|
6
|
+
warnOnMissingId: true,
|
|
7
|
+
};
|
|
8
|
+
var getReplaySequentialIdPlugin = function (options) {
|
|
9
|
+
var _a = options
|
|
10
|
+
? Object.assign({}, defaultOptions, options)
|
|
11
|
+
: defaultOptions, key = _a.key, warnOnMissingId = _a.warnOnMissingId;
|
|
12
|
+
var currentId = 1;
|
|
13
|
+
return {
|
|
14
|
+
handler: function (event) {
|
|
15
|
+
if (key in event) {
|
|
16
|
+
var id = event[key];
|
|
17
|
+
if (id !== currentId) {
|
|
18
|
+
console.error("[sequential-id-plugin]: expect to get an id with value \"".concat(currentId, "\", but got \"").concat(id, "\""));
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
currentId++;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
else if (warnOnMissingId) {
|
|
25
|
+
console.warn("[sequential-id-plugin]: failed to get id in key: \"".concat(key, "\""));
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.getReplaySequentialIdPlugin = getReplaySequentialIdPlugin;
|
|
32
|
+
|
|
33
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
34
|
+
|
|
35
|
+
return exports;
|
|
36
|
+
|
|
37
|
+
}({}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var rrwebSequentialIdReplay=function(e){"use strict";var n={key:"_sid",warnOnMissingId:!0};return e.getReplaySequentialIdPlugin=function(e){var i=e?Object.assign({},n,e):n,t=i.key,a=i.warnOnMissingId,r=1;return{handler:function(e){if(t in e){var n=e[t];n!==r?console.error('[sequential-id-plugin]: expect to get an id with value "'.concat(r,'", but got "').concat(n,'"')):r++}else a&&console.warn('[sequential-id-plugin]: failed to get id in key: "'.concat(t,'"'))}}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
|
|
2
|
+
//# sourceMappingURL=sequential-id-replay.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sequential-id-replay.min.js","sources":["../../../src/plugins/sequential-id/replay/index.ts"],"sourcesContent":["import type { SequentialIdOptions } from '../record';\nimport { ReplayPlugin, eventWithTime } from '../../../types';\n\ntype Options = SequentialIdOptions & {\n warnOnMissingId: boolean;\n};\n\nconst defaultOptions: Options = {\n key: '_sid',\n warnOnMissingId: true,\n};\n\nexport const getReplaySequentialIdPlugin: (\n options?: Partial<Options>,\n) => ReplayPlugin = (options) => {\n const { key, warnOnMissingId } = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let currentId = 1;\n\n return {\n handler(event: eventWithTime) {\n if (key in event) {\n const id = ((event as unknown) as Record<string, number>)[key];\n if (id !== currentId) {\n console.error(\n `[sequential-id-plugin]: expect to get an id with value \"${currentId}\", but got \"${id}\"`,\n );\n } else {\n currentId++;\n }\n } else if (warnOnMissingId) {\n console.warn(\n `[sequential-id-plugin]: failed to get id in key: \"${key}\"`,\n );\n }\n },\n };\n};\n"],"names":["defaultOptions","key","warnOnMissingId","options","_a","Object","assign","currentId","handler","event","id","console","error","warn"],"mappings":"qDAOA,IAAMA,EAA0B,CAC9BC,IAAK,OACLC,iBAAiB,wCAKC,SAACC,GACb,IAAAC,EAA2BD,EAC7BE,OAAOC,OAAO,GAAIN,EAAgBG,GAClCH,EAFIC,QAAKC,oBAGTK,EAAY,EAEhB,MAAO,CACLC,QAAA,SAAQC,GACN,GAAIR,KAAOQ,EAAO,CAChB,IAAMC,EAAOD,EAA6CR,GACtDS,IAAOH,EACTI,QAAQC,MACN,kEAA2DL,yBAAwBG,QAGrFH,SAEOL,GACTS,QAAQE,KACN,4DAAqDZ"}
|