@highlight-run/rrweb 1.2.1 → 2.0.4
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 +454 -0
- package/dist/plugins/console-record.min.js +12 -15
- package/dist/plugins/console-record.min.js.map +1 -1
- package/dist/plugins/console-replay.js +164 -0
- package/dist/plugins/console-replay.min.js +5 -0
- package/dist/plugins/console-replay.min.js.map +1 -0
- package/dist/plugins/sequential-id-record.js +30 -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 +33 -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 +664 -0
- package/dist/record/rrweb-record-pack.min.js +4 -0
- package/dist/record/rrweb-record-pack.min.js.map +1 -0
- package/dist/record/rrweb-record.js +3202 -0
- package/dist/record/rrweb-record.min.js +5 -0
- package/dist/record/rrweb-record.min.js.map +1 -0
- package/dist/replay/rrweb-replay-unpack.js +4926 -0
- package/dist/replay/rrweb-replay-unpack.min.js +18 -0
- package/dist/replay/rrweb-replay-unpack.min.js.map +1 -0
- package/dist/replay/rrweb-replay.js +4518 -0
- package/dist/replay/rrweb-replay.min.js +18 -0
- package/dist/replay/rrweb-replay.min.js.map +1 -0
- package/dist/rrweb-all.js +8889 -0
- package/dist/rrweb-all.min.js +29 -0
- package/dist/rrweb-all.min.js.map +1 -0
- package/dist/rrweb.js +7558 -0
- package/dist/rrweb.min.js +6 -17
- package/dist/rrweb.min.js.map +1 -1
- package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__auto__createBase64WorkerFactory.js +12 -0
- package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__auto__isNodeJS.js +7 -0
- package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +31 -0
- package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__node__WorkerClass.js +11 -0
- package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__node__createBase64WorkerFactory.js +18 -0
- package/es/rrweb/_virtual/image-bitmap-data-url-worker.js +6 -0
- 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/ext/tslib/tslib.es6.js +38 -0
- package/es/rrweb/packages/rrdom/es/virtual-dom.js +1099 -0
- package/es/rrweb/packages/rrweb/src/entries/all.js +13 -0
- package/es/rrweb/packages/rrweb/src/index.js +14 -0
- package/es/rrweb/packages/rrweb/src/packer/base.js +3 -0
- package/es/rrweb/packages/rrweb/src/packer/pack.js +9 -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 +178 -0
- package/es/rrweb/packages/rrweb/src/plugins/console/record/index.js +115 -0
- package/es/rrweb/packages/rrweb/src/plugins/console/record/stringify.js +128 -0
- package/es/rrweb/packages/rrweb/src/plugins/console/replay/index.js +94 -0
- package/es/rrweb/packages/rrweb/src/plugins/sequential-id/record/index.js +22 -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 +31 -0
- package/es/rrweb/packages/rrweb/src/record/index.js +356 -0
- package/es/rrweb/packages/rrweb/src/record/mutation.js +491 -0
- package/es/rrweb/packages/rrweb/src/record/observer.js +590 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/2d.js +49 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas-manager.js +172 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas.js +25 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/serialize-args.js +123 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/webgl.js +59 -0
- package/es/rrweb/packages/rrweb/src/record/shadow-dom-manager.js +43 -0
- package/es/rrweb/packages/rrweb/src/record/stylesheet-manager.js +31 -0
- package/es/rrweb/packages/rrweb/src/replay/canvas/2d.js +29 -0
- package/es/rrweb/packages/rrweb/src/replay/canvas/deserialize-args.js +67 -0
- package/es/rrweb/packages/rrweb/src/replay/canvas/index.js +43 -0
- package/es/rrweb/packages/rrweb/src/replay/canvas/webgl.js +62 -0
- package/es/rrweb/packages/rrweb/src/replay/index.js +1555 -0
- package/es/rrweb/packages/rrweb/src/replay/machine.js +281 -0
- package/es/rrweb/packages/rrweb/src/replay/smoothscroll.js +219 -0
- package/es/rrweb/packages/rrweb/src/replay/styles/inject-style.js +8 -0
- package/es/rrweb/packages/rrweb/src/replay/timer.js +92 -0
- package/es/rrweb/packages/rrweb/src/types.js +75 -0
- package/es/rrweb/packages/rrweb/src/utils.js +315 -0
- package/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js +1821 -0
- package/lib/plugins/console-record.js +492 -0
- package/lib/plugins/console-replay.js +218 -0
- package/lib/plugins/sequential-id-record.js +27 -0
- package/lib/plugins/sequential-id-replay.js +32 -0
- package/lib/record/rrweb-record-pack.js +787 -0
- package/lib/record/rrweb-record.js +3363 -0
- package/lib/replay/rrweb-replay-unpack.js +5075 -0
- package/lib/replay/rrweb-replay.js +4665 -0
- package/lib/rrweb-all.js +9181 -0
- package/lib/rrweb.js +7814 -0
- package/package.json +41 -42
- 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 +1 -1
- 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 +4 -3
- package/{dist → typings}/plugins/console/record/stringify.d.ts +1 -1
- package/{dist → typings}/plugins/console/replay/index.d.ts +2 -2
- package/{dist → typings}/plugins/sequential-id/record/index.d.ts +1 -1
- package/{dist → typings}/plugins/sequential-id/replay/index.d.ts +1 -1
- package/{dist → typings}/record/iframe-manager.d.ts +3 -3
- package/{dist/plugins → typings}/record/index.d.ts +9 -9
- package/{dist → typings}/record/mutation.d.ts +6 -8
- package/typings/record/observer.d.ts +7 -0
- package/{dist/plugins → typings}/record/observers/canvas/2d.d.ts +3 -2
- package/{dist → typings}/record/observers/canvas/canvas-manager.d.ts +5 -2
- package/{dist/plugins → typings}/record/observers/canvas/canvas.d.ts +2 -2
- package/typings/record/observers/canvas/serialize-args.d.ts +6 -0
- package/{dist/plugins → typings}/record/observers/canvas/webgl.d.ts +3 -2
- package/typings/record/observers/canvas/webgl2.d.ts +2 -0
- package/typings/record/shadow-dom-manager.d.ts +22 -0
- package/typings/record/stylesheet-manager.d.ts +12 -0
- package/typings/record/workers/image-bitmap-data-url-worker.d.ts +5 -0
- package/{dist → typings}/replay/canvas/2d.d.ts +3 -3
- package/typings/replay/canvas/deserialize-args.d.ts +7 -0
- package/{dist/plugins → typings}/replay/canvas/index.d.ts +10 -9
- package/typings/replay/canvas/webgl.d.ts +9 -0
- package/{dist → typings}/replay/index.d.ts +7 -9
- 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}/rrdom/index.d.ts +0 -0
- package/{dist → typings}/rrdom/tree-node.d.ts +0 -0
- package/{dist/plugins → typings}/types.d.ts +536 -509
- package/typings/utils.d.ts +43 -0
- 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/mutation.d.ts +0 -45
- package/dist/plugins/record/observer.d.ts +0 -11
- package/dist/plugins/record/observers/canvas/canvas-manager.d.ts +0 -32
- package/dist/plugins/record/observers/canvas/serialize-args.d.ts +0 -6
- 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/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/utils.d.ts +0 -71
- package/dist/record/index.d.ts +0 -9
- package/dist/record/observer.d.ts +0 -11
- package/dist/record/observers/canvas/2d.d.ts +0 -2
- package/dist/record/observers/canvas/canvas.d.ts +0 -2
- package/dist/record/observers/canvas/serialize-args.d.ts +0 -6
- package/dist/record/observers/canvas/webgl.d.ts +0 -2
- package/dist/record/shadow-dom-manager.d.ts +0 -34
- package/dist/replay/canvas/index.d.ts +0 -9
- package/dist/replay/canvas/webgl.d.ts +0 -11
- package/dist/replay/virtual-styles.d.ts +0 -43
- 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
- package/dist/types.d.ts +0 -509
- package/dist/utils.d.ts +0 -71
package/package.json
CHANGED
|
@@ -1,32 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@highlight-run/rrweb",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "record and replay the web",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"test
|
|
9
|
-
"
|
|
6
|
+
"prepare": "npm run prepack",
|
|
7
|
+
"prepack": "npm run bundle",
|
|
8
|
+
"test": "npm run bundle:browser && jest",
|
|
9
|
+
"test:headless": "npm run bundle:browser && PUPPETEER_HEADLESS=true jest",
|
|
10
|
+
"test:watch": "PUPPETEER_HEADLESS=true npm run test -- --watch",
|
|
11
|
+
"repl": "npm run bundle:browser && node scripts/repl.js",
|
|
12
|
+
"dev": "yarn bundle:browser --watch",
|
|
10
13
|
"bundle:browser": "cross-env BROWSER_ONLY=true rollup --config",
|
|
11
14
|
"bundle": "rollup --config",
|
|
12
|
-
"bundle:dev": "rollup --config --watch",
|
|
13
15
|
"typings": "tsc -d --declarationDir typings",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
16
|
+
"check-types": "tsc -noEmit",
|
|
17
|
+
"prepublish": "npm run typings && npm run bundle",
|
|
18
|
+
"lint": "yarn eslint src"
|
|
17
19
|
},
|
|
18
20
|
"repository": {
|
|
19
21
|
"type": "git",
|
|
20
|
-
"url": "git+ssh://git@github.com/
|
|
22
|
+
"url": "git+ssh://git@github.com/rrweb-io/rrweb.git"
|
|
21
23
|
},
|
|
22
24
|
"keywords": [
|
|
23
25
|
"rrweb"
|
|
24
26
|
],
|
|
25
|
-
"main": "
|
|
27
|
+
"main": "lib/rrweb-all.js",
|
|
28
|
+
"module": "es/rrweb/packages/rrweb/src/entries/all.js",
|
|
26
29
|
"unpkg": "dist/rrweb.js",
|
|
27
30
|
"sideEffects": false,
|
|
31
|
+
"typings": "typings/entries/all.d.ts",
|
|
28
32
|
"files": [
|
|
29
|
-
"dist"
|
|
33
|
+
"dist",
|
|
34
|
+
"lib",
|
|
35
|
+
"es",
|
|
36
|
+
"typings"
|
|
30
37
|
],
|
|
31
38
|
"author": "yanzhen@smartx.com",
|
|
32
39
|
"license": "MIT",
|
|
@@ -38,50 +45,42 @@
|
|
|
38
45
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
39
46
|
"@types/chai": "^4.1.6",
|
|
40
47
|
"@types/inquirer": "0.0.43",
|
|
41
|
-
"@types/
|
|
42
|
-
"@types/
|
|
43
|
-
"@types/node": "^
|
|
44
|
-
"@types/
|
|
45
|
-
"
|
|
48
|
+
"@types/jest": "^27.4.1",
|
|
49
|
+
"@types/jest-image-snapshot": "^4.3.1",
|
|
50
|
+
"@types/node": "^17.0.21",
|
|
51
|
+
"@types/offscreencanvas": "^2019.6.4",
|
|
52
|
+
"@types/prettier": "^2.3.2",
|
|
53
|
+
"@types/puppeteer": "^5.4.4",
|
|
46
54
|
"cross-env": "^5.2.0",
|
|
47
|
-
"
|
|
55
|
+
"esbuild": "^0.14.38",
|
|
48
56
|
"fast-mhtml": "^1.1.9",
|
|
57
|
+
"identity-obj-proxy": "^3.0.0",
|
|
49
58
|
"ignore-styles": "^5.0.1",
|
|
50
59
|
"inquirer": "^6.2.1",
|
|
60
|
+
"jest": "^27.5.1",
|
|
61
|
+
"jest-image-snapshot": "^4.5.1",
|
|
51
62
|
"jest-snapshot": "^23.6.0",
|
|
52
|
-
"jsdom": "^16.6.0",
|
|
53
|
-
"jsdom-global": "^3.0.2",
|
|
54
|
-
"mini-css-extract-plugin": "^1.3.8",
|
|
55
|
-
"mocha": "^5.2.0",
|
|
56
|
-
"node-libtidy": "^0.4.0",
|
|
57
63
|
"prettier": "2.2.1",
|
|
58
64
|
"puppeteer": "^9.1.1",
|
|
59
|
-
"rollup": "^2.
|
|
60
|
-
"rollup-plugin-
|
|
61
|
-
"rollup-plugin-node-resolve": "^3.4.0",
|
|
65
|
+
"rollup": "^2.68.0",
|
|
66
|
+
"rollup-plugin-esbuild": "^4.9.1",
|
|
62
67
|
"rollup-plugin-postcss": "^3.1.1",
|
|
63
|
-
"rollup-plugin-rename-node-modules": "^1.1
|
|
64
|
-
"rollup-plugin-terser": "^5.3.0",
|
|
68
|
+
"rollup-plugin-rename-node-modules": "^1.3.1",
|
|
65
69
|
"rollup-plugin-typescript2": "^0.31.2",
|
|
66
70
|
"rollup-plugin-web-worker-loader": "^1.6.1",
|
|
67
|
-
"
|
|
68
|
-
"ts-
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"tslint": "^4.5.1",
|
|
72
|
-
"typescript": "^3.9.5",
|
|
73
|
-
"webpack": "^5.10.1",
|
|
74
|
-
"webpack-bundle-analyzer": "^4.4.2",
|
|
75
|
-
"webpack-cli": "^4.2.0",
|
|
76
|
-
"webpack-dev-server": "^3.11.0",
|
|
77
|
-
"webpack-merge": "^5.7.0"
|
|
71
|
+
"ts-jest": "^27.1.3",
|
|
72
|
+
"ts-node": "^10.7.0",
|
|
73
|
+
"tslib": "^2.3.1",
|
|
74
|
+
"typescript": "^4.6.2"
|
|
78
75
|
},
|
|
79
76
|
"dependencies": {
|
|
80
|
-
"@
|
|
77
|
+
"@highlight-run/rrdom": "^0.1.3",
|
|
78
|
+
"@highlight-run/rrweb-snapshot": "^1.1.16",
|
|
79
|
+
"@types/css-font-loading-module": "0.0.7",
|
|
81
80
|
"@xstate/fsm": "^1.4.0",
|
|
82
81
|
"base64-arraybuffer": "^1.0.1",
|
|
83
82
|
"fflate": "^0.4.4",
|
|
84
|
-
"identity-obj-proxy": "^3.0.0",
|
|
85
83
|
"mitt": "^1.1.3"
|
|
86
|
-
}
|
|
84
|
+
},
|
|
85
|
+
"gitHead": "313812f5e01a2a5140b99a138dc13467c26b5f3a"
|
|
87
86
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from '../index';
|
|
2
|
+
export * from '../packer';
|
|
3
|
+
export * from '../plugins/console/record';
|
|
4
|
+
export * from '../plugins/console/replay';
|
|
5
|
+
export { getRecordSequentialIdPlugin } from '../plugins/sequential-id/record';
|
|
6
|
+
export { getReplaySequentialIdPlugin } from '../plugins/sequential-id/replay';
|
|
File without changes
|
|
File without changes
|
|
@@ -2,8 +2,7 @@ import record from './record';
|
|
|
2
2
|
import { Replayer } from './replay';
|
|
3
3
|
import { _mirror } from './utils';
|
|
4
4
|
import * as utils from './utils';
|
|
5
|
-
export { EventType, IncrementalSource, MouseInteractions, ReplayerEvents,
|
|
5
|
+
export { EventType, IncrementalSource, MouseInteractions, ReplayerEvents, } from './types';
|
|
6
6
|
declare const addCustomEvent: <T>(tag: string, payload: T) => void;
|
|
7
7
|
declare const freezePage: () => void;
|
|
8
8
|
export { record, addCustomEvent, freezePage, Replayer, _mirror as mirror, utils, };
|
|
9
|
-
export { getRecordSequentialIdPlugin } from './plugins/sequential-id/record';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { eventWithTime } from '../types';
|
|
1
|
+
import type { eventWithTime } from '../types';
|
|
2
2
|
export declare type PackFn = (event: eventWithTime) => string;
|
|
3
3
|
export declare type UnpackFn = (raw: string) => eventWithTime;
|
|
4
4
|
export declare type eventWithTimeAndPacker = eventWithTime & {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { RecordPlugin } from '../../../types';
|
|
1
|
+
import type { RecordPlugin } from '../../../types';
|
|
2
2
|
export declare type StringifyOptions = {
|
|
3
3
|
stringLengthLimit?: number;
|
|
4
4
|
numOfKeysLimit: number;
|
|
5
|
+
depthOfLimit: number;
|
|
5
6
|
};
|
|
6
7
|
declare type LogRecordOptions = {
|
|
7
|
-
level?: LogLevel[]
|
|
8
|
+
level?: LogLevel[];
|
|
8
9
|
lengthThreshold?: number;
|
|
9
10
|
stringifyOptions?: StringifyOptions;
|
|
10
|
-
logger?: Logger |
|
|
11
|
+
logger?: Logger | 'console';
|
|
11
12
|
};
|
|
12
13
|
export declare type LogData = {
|
|
13
14
|
level: LogLevel;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StringifyOptions } from './index';
|
|
1
|
+
import type { StringifyOptions } from './index';
|
|
2
2
|
export declare function stringify(obj: any, stringifyOptions?: StringifyOptions): string;
|
|
@@ -2,8 +2,8 @@ import { LogLevel, LogData } from '../record';
|
|
|
2
2
|
import { ReplayPlugin } from '../../../types';
|
|
3
3
|
declare type ReplayLogger = Partial<Record<LogLevel, (data: LogData) => void>>;
|
|
4
4
|
declare type LogReplayConfig = {
|
|
5
|
-
level?: LogLevel[]
|
|
6
|
-
replayLogger
|
|
5
|
+
level?: LogLevel[];
|
|
6
|
+
replayLogger?: ReplayLogger;
|
|
7
7
|
};
|
|
8
8
|
export declare const getReplayConsolePlugin: (options?: LogReplayConfig) => ReplayPlugin;
|
|
9
9
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { mutationCallBack } from '../types';
|
|
1
|
+
import type { Mirror, serializedNodeWithId } from '@highlight-run/rrweb-snapshot';
|
|
2
|
+
import type { mutationCallBack } from '../types';
|
|
3
3
|
export declare class IframeManager {
|
|
4
4
|
private iframes;
|
|
5
5
|
private mutationCb;
|
|
@@ -9,5 +9,5 @@ export declare class IframeManager {
|
|
|
9
9
|
});
|
|
10
10
|
addIframe(iframeEl: HTMLIFrameElement): void;
|
|
11
11
|
addLoadListener(cb: (iframeEl: HTMLIFrameElement) => unknown): void;
|
|
12
|
-
attachIframe(iframeEl:
|
|
12
|
+
attachIframe(iframeEl: HTMLIFrameElement, childSn: serializedNodeWithId, mirror: Mirror): void;
|
|
13
13
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { eventWithTime, recordOptions, listenerHandler } from '../types';
|
|
2
|
-
declare function record<T = eventWithTime>(options?: recordOptions<T>): listenerHandler | undefined;
|
|
3
|
-
declare namespace record {
|
|
4
|
-
var addCustomEvent: <T>(tag: string, payload: T) => void;
|
|
5
|
-
var freezePage: () => void;
|
|
6
|
-
var takeFullSnapshot: (isCheckout?: boolean | undefined) => void;
|
|
7
|
-
var mirror: import("
|
|
8
|
-
}
|
|
9
|
-
export default record;
|
|
1
|
+
import { eventWithTime, recordOptions, listenerHandler } from '../types';
|
|
2
|
+
declare function record<T = eventWithTime>(options?: recordOptions<T>): listenerHandler | undefined;
|
|
3
|
+
declare namespace record {
|
|
4
|
+
var addCustomEvent: <T>(tag: string, payload: T) => void;
|
|
5
|
+
var freezePage: () => void;
|
|
6
|
+
var takeFullSnapshot: (isCheckout?: boolean | undefined) => void;
|
|
7
|
+
var mirror: import("@highlight-run/rrweb-snapshot").Mirror;
|
|
8
|
+
}
|
|
9
|
+
export default record;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { mutationRecord, blockClass, maskTextClass, mutationCallBack, Mirror } from '../types';
|
|
3
|
-
import { IframeManager } from './iframe-manager';
|
|
4
|
-
import { CanvasManager } from './observers/canvas/canvas-manager';
|
|
5
|
-
import { ShadowDomManager } from './shadow-dom-manager';
|
|
1
|
+
import type { mutationRecord, MutationBufferParam } from '../types';
|
|
6
2
|
export default class MutationBuffer {
|
|
7
3
|
private frozen;
|
|
8
4
|
private locked;
|
|
@@ -14,7 +10,7 @@ export default class MutationBuffer {
|
|
|
14
10
|
private addedSet;
|
|
15
11
|
private movedSet;
|
|
16
12
|
private droppedSet;
|
|
17
|
-
private
|
|
13
|
+
private mutationCb;
|
|
18
14
|
private blockClass;
|
|
19
15
|
private blockSelector;
|
|
20
16
|
private maskTextClass;
|
|
@@ -24,14 +20,16 @@ export default class MutationBuffer {
|
|
|
24
20
|
private maskTextFn;
|
|
25
21
|
private maskInputFn;
|
|
26
22
|
private recordCanvas;
|
|
27
|
-
private
|
|
23
|
+
private inlineImages;
|
|
28
24
|
private slimDOMOptions;
|
|
29
25
|
private doc;
|
|
30
26
|
private mirror;
|
|
31
27
|
private iframeManager;
|
|
28
|
+
private stylesheetManager;
|
|
32
29
|
private shadowDomManager;
|
|
33
30
|
private canvasManager;
|
|
34
|
-
|
|
31
|
+
private enableStrictPrivacy;
|
|
32
|
+
init(options: MutationBufferParam): void;
|
|
35
33
|
freeze(): void;
|
|
36
34
|
unfreeze(): void;
|
|
37
35
|
isFrozen(): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { observerParam, listenerHandler, hooksParam, MutationBufferParam } from '../types';
|
|
2
|
+
import MutationBuffer from './mutation';
|
|
3
|
+
export declare const mutationBuffers: MutationBuffer[];
|
|
4
|
+
export declare function initMutationObserver(options: MutationBufferParam, rootEl: Node): MutationObserver;
|
|
5
|
+
export declare function initScrollObserver({ scrollCb, doc, mirror, blockClass, sampling, }: Pick<observerParam, 'scrollCb' | 'doc' | 'mirror' | 'blockClass' | 'sampling'>): listenerHandler;
|
|
6
|
+
export declare const INPUT_TAGS: string[];
|
|
7
|
+
export declare function initObservers(o: observerParam, hooks?: hooksParam): listenerHandler;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { Mirror } from '@highlight-run/rrweb-snapshot';
|
|
2
|
+
import { blockClass, canvasManagerMutationCallback, IWindow, listenerHandler } from '../../../types';
|
|
3
|
+
export default function initCanvas2DMutationObserver(cb: canvasManagerMutationCallback, win: IWindow, blockClass: blockClass, mirror: Mirror): listenerHandler;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Mirror } from '@highlight-run/rrweb-snapshot';
|
|
2
|
+
import type { blockClass, canvasMutationCallback, IWindow } from '../../../types';
|
|
2
3
|
export declare type RafStamps = {
|
|
3
4
|
latestId: number;
|
|
4
5
|
invokeId: number | null;
|
|
@@ -17,13 +18,15 @@ export declare class CanvasManager {
|
|
|
17
18
|
lock(): void;
|
|
18
19
|
unlock(): void;
|
|
19
20
|
constructor(options: {
|
|
20
|
-
recordCanvas: boolean
|
|
21
|
+
recordCanvas: boolean;
|
|
21
22
|
mutationCb: canvasMutationCallback;
|
|
22
23
|
win: IWindow;
|
|
23
24
|
blockClass: blockClass;
|
|
24
25
|
mirror: Mirror;
|
|
26
|
+
sampling?: 'all' | number;
|
|
25
27
|
});
|
|
26
28
|
private processMutation;
|
|
29
|
+
private initCanvasFPSObserver;
|
|
27
30
|
private initCanvasMutationObserver;
|
|
28
31
|
private startPendingCanvasMutationFlusher;
|
|
29
32
|
private startRAFTimestamping;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { blockClass, IWindow, listenerHandler } from '../../../types';
|
|
2
|
-
export default function initCanvasContextObserver(win: IWindow, blockClass: blockClass): listenerHandler;
|
|
1
|
+
import type { blockClass, IWindow, listenerHandler } from '../../../types';
|
|
2
|
+
export default function initCanvasContextObserver(win: IWindow, blockClass: blockClass): listenerHandler;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IWindow, CanvasArg } from '../../../types';
|
|
2
|
+
export declare function variableListFor(ctx: RenderingContext, ctor: string): any[];
|
|
3
|
+
export declare const saveWebGLVar: (value: any, win: IWindow, ctx: RenderingContext) => number | void;
|
|
4
|
+
export declare function serializeArg(value: any, win: IWindow, ctx: RenderingContext): CanvasArg;
|
|
5
|
+
export declare const serializeArgs: (args: Array<any>, win: IWindow, ctx: RenderingContext) => CanvasArg[];
|
|
6
|
+
export declare const isInstanceOfWebGLObject: (value: any, win: IWindow) => value is WebGLTexture | WebGLShader | WebGLBuffer | WebGLVertexArrayObject | WebGLProgram | WebGLActiveInfo | WebGLUniformLocation | WebGLFramebuffer | WebGLRenderbuffer | WebGLShaderPrecisionFormat;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { Mirror } from '@highlight-run/rrweb-snapshot';
|
|
2
|
+
import { blockClass, canvasManagerMutationCallback, IWindow, listenerHandler } from '../../../types';
|
|
3
|
+
export default function initCanvasWebGLMutationObserver(cb: canvasManagerMutationCallback, win: IWindow, blockClass: blockClass, mirror: Mirror): listenerHandler;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { mutationCallBack, scrollCallback, MutationBufferParam, SamplingStrategy } from '../types';
|
|
2
|
+
import type { Mirror } from '@highlight-run/rrweb-snapshot';
|
|
3
|
+
declare type BypassOptions = Omit<MutationBufferParam, 'doc' | 'mutationCb' | 'mirror' | 'shadowDomManager'> & {
|
|
4
|
+
sampling: SamplingStrategy;
|
|
5
|
+
};
|
|
6
|
+
export declare class ShadowDomManager {
|
|
7
|
+
private mutationCb;
|
|
8
|
+
private scrollCb;
|
|
9
|
+
private bypassOptions;
|
|
10
|
+
private mirror;
|
|
11
|
+
private restorePatches;
|
|
12
|
+
constructor(options: {
|
|
13
|
+
mutationCb: mutationCallBack;
|
|
14
|
+
scrollCb: scrollCallback;
|
|
15
|
+
bypassOptions: BypassOptions;
|
|
16
|
+
mirror: Mirror;
|
|
17
|
+
});
|
|
18
|
+
addShadowRoot(shadowRoot: ShadowRoot, doc: Document): void;
|
|
19
|
+
observeAttachShadow(iframeElement: HTMLIFrameElement): void;
|
|
20
|
+
reset(): void;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Mirror, serializedNodeWithId } from '@highlight-run/rrweb-snapshot';
|
|
2
|
+
import type { mutationCallBack } from '../types';
|
|
3
|
+
export declare class StylesheetManager {
|
|
4
|
+
private trackedStylesheets;
|
|
5
|
+
private mutationCb;
|
|
6
|
+
constructor(options: {
|
|
7
|
+
mutationCb: mutationCallBack;
|
|
8
|
+
});
|
|
9
|
+
addStylesheet(linkEl: HTMLLinkElement): void;
|
|
10
|
+
private trackStylesheet;
|
|
11
|
+
attachStylesheet(linkEl: HTMLLinkElement, childSn: serializedNodeWithId, mirror: Mirror): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ImageBitmapDataURLWorkerParams, ImageBitmapDataURLWorkerResponse } from '../../types';
|
|
2
|
+
export interface ImageBitmapDataURLRequestWorker {
|
|
3
|
+
postMessage: (message: ImageBitmapDataURLWorkerParams, transfer?: [ImageBitmap]) => void;
|
|
4
|
+
onmessage: (message: MessageEvent<ImageBitmapDataURLWorkerResponse>) => void;
|
|
5
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Replayer } from '../';
|
|
2
|
-
import { canvasMutationCommand } from '../../types';
|
|
1
|
+
import type { Replayer } from '../';
|
|
2
|
+
import type { canvasMutationCommand } from '../../types';
|
|
3
3
|
export default function canvasMutation({ event, mutation, target, imageMap, errorHandler, }: {
|
|
4
4
|
event: Parameters<Replayer['applyIncremental']>[0];
|
|
5
5
|
mutation: canvasMutationCommand;
|
|
6
6
|
target: HTMLCanvasElement;
|
|
7
7
|
imageMap: Replayer['imageMap'];
|
|
8
8
|
errorHandler: Replayer['warnCanvasMutationFailed'];
|
|
9
|
-
}): void
|
|
9
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Replayer } from '../';
|
|
2
|
+
import type { CanvasArg, SerializedCanvasArg } from '../../types';
|
|
3
|
+
export declare function variableListFor(ctx: CanvasRenderingContext2D | WebGLRenderingContext | WebGL2RenderingContext, ctor: string): any[];
|
|
4
|
+
export declare function isSerializedArg(arg: unknown): arg is SerializedCanvasArg;
|
|
5
|
+
export declare function deserializeArg(imageMap: Replayer['imageMap'], ctx: CanvasRenderingContext2D | WebGLRenderingContext | WebGL2RenderingContext | null, preload?: {
|
|
6
|
+
isUnchanged: boolean;
|
|
7
|
+
}): (arg: CanvasArg) => Promise<any>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Replayer } from '..';
|
|
2
|
-
import { canvasMutationData } from '../../types';
|
|
3
|
-
export default function canvasMutation({ event, mutation, target, imageMap, errorHandler, }: {
|
|
4
|
-
event: Parameters<Replayer['applyIncremental']>[0];
|
|
5
|
-
mutation: canvasMutationData;
|
|
6
|
-
target: HTMLCanvasElement;
|
|
7
|
-
imageMap: Replayer['imageMap'];
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import type { Replayer } from '..';
|
|
2
|
+
import { canvasMutationData } from '../../types';
|
|
3
|
+
export default function canvasMutation({ event, mutation, target, imageMap, canvasEventMap, errorHandler, }: {
|
|
4
|
+
event: Parameters<Replayer['applyIncremental']>[0];
|
|
5
|
+
mutation: canvasMutationData;
|
|
6
|
+
target: HTMLCanvasElement;
|
|
7
|
+
imageMap: Replayer['imageMap'];
|
|
8
|
+
canvasEventMap: Replayer['canvasEventMap'];
|
|
9
|
+
errorHandler: Replayer['warnCanvasMutationFailed'];
|
|
10
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Replayer } from '../';
|
|
2
|
+
import { CanvasContext, canvasMutationCommand } from '../../types';
|
|
3
|
+
export default function webglMutation({ mutation, target, type, imageMap, errorHandler, }: {
|
|
4
|
+
mutation: canvasMutationCommand;
|
|
5
|
+
target: HTMLCanvasElement;
|
|
6
|
+
type: CanvasContext;
|
|
7
|
+
imageMap: Replayer['imageMap'];
|
|
8
|
+
errorHandler: Replayer['warnCanvasMutationFailed'];
|
|
9
|
+
}): Promise<void>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Mirror } from '@highlight-run/rrweb-snapshot';
|
|
2
|
+
import { RRDocument } from '@highlight-run/rrdom/es/virtual-dom';
|
|
1
3
|
import { Timer } from './timer';
|
|
2
4
|
import { createPlayerService, createSpeedService } from './machine';
|
|
3
|
-
import { eventWithTime, playerConfig, playerMetaData, Handler,
|
|
5
|
+
import { eventWithTime, playerConfig, playerMetaData, Handler, SessionInterval } from '../types';
|
|
4
6
|
import './styles/style.css';
|
|
5
7
|
export declare class Replayer {
|
|
6
8
|
wrapper: HTMLDivElement;
|
|
@@ -9,6 +11,8 @@ export declare class Replayer {
|
|
|
9
11
|
speedService: ReturnType<typeof createSpeedService>;
|
|
10
12
|
get timer(): Timer;
|
|
11
13
|
config: playerConfig;
|
|
14
|
+
usingVirtualDom: boolean;
|
|
15
|
+
virtualDom: RRDocument;
|
|
12
16
|
private mouse;
|
|
13
17
|
private mouseTail;
|
|
14
18
|
private tailPositions;
|
|
@@ -17,12 +21,9 @@ export declare class Replayer {
|
|
|
17
21
|
private activityIntervals;
|
|
18
22
|
private inactiveEndTimestamp;
|
|
19
23
|
private legacy_missingNodeRetryMap;
|
|
20
|
-
private treeIndex;
|
|
21
|
-
private fragmentParentMap;
|
|
22
|
-
private elementStateMap;
|
|
23
|
-
private virtualStyleRulesMap;
|
|
24
24
|
private cache;
|
|
25
25
|
private imageMap;
|
|
26
|
+
private canvasEventMap;
|
|
26
27
|
private mirror;
|
|
27
28
|
private firstFullSnapshot;
|
|
28
29
|
private newDocumentQueue;
|
|
@@ -60,6 +61,7 @@ export declare class Replayer {
|
|
|
60
61
|
private getImageArgs;
|
|
61
62
|
private preloadAllImages;
|
|
62
63
|
private preloadImages;
|
|
64
|
+
private deserializeAndPreloadCanvasEvents;
|
|
63
65
|
private applyIncremental;
|
|
64
66
|
private applyMutation;
|
|
65
67
|
private applyScroll;
|
|
@@ -70,10 +72,6 @@ export declare class Replayer {
|
|
|
70
72
|
private hoverElements;
|
|
71
73
|
private isUserInteraction;
|
|
72
74
|
private backToNormal;
|
|
73
|
-
private restoreRealParent;
|
|
74
|
-
private storeState;
|
|
75
|
-
private restoreState;
|
|
76
|
-
private restoreNodeSheet;
|
|
77
75
|
private warnNodeNotFound;
|
|
78
76
|
private warnCanvasMutationFailed;
|
|
79
77
|
private debugNodeNotFound;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|