@highlight-run/rrweb 1.0.8 → 1.1.0
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/record/observers/canvas/2d.d.ts +2 -0
- package/dist/record/observers/canvas/canvas.d.ts +2 -0
- package/dist/record/observers/canvas/serialize-args.d.ts +4 -0
- package/dist/record/observers/canvas/webgl.d.ts +2 -0
- package/dist/replay/canvas/2d.d.ts +9 -0
- package/dist/replay/canvas/index.d.ts +9 -0
- package/dist/replay/canvas/webgl.d.ts +10 -0
- package/dist/replay/index.d.ts +2 -0
- package/dist/replay/timer.d.ts +4 -1
- package/dist/snapshot/types.d.ts +3 -0
- package/dist/types.d.ts +21 -0
- package/package.json +4 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SerializedWebGlArg } from '../../../types';
|
|
2
|
+
export declare function serializeArg(value: any): SerializedWebGlArg;
|
|
3
|
+
export declare const serializeArgs: (args: Array<any>) => SerializedWebGlArg[];
|
|
4
|
+
export declare const saveWebGLVar: (value: any) => number | void;
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
errorHandler: Replayer['warnCanvasMutationFailed'];
|
|
9
|
+
}): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
errorHandler: Replayer['warnCanvasMutationFailed'];
|
|
9
|
+
}): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Replayer } from '../';
|
|
2
|
+
import { canvasMutationData, SerializedWebGlArg } from '../../types';
|
|
3
|
+
export declare function variableListFor(ctor: string): any[];
|
|
4
|
+
export declare function deserializeArg(imageMap: Replayer['imageMap']): (arg: SerializedWebGlArg) => any;
|
|
5
|
+
export default function webglMutation({ mutation, target, imageMap, errorHandler, }: {
|
|
6
|
+
mutation: canvasMutationData;
|
|
7
|
+
target: HTMLCanvasElement;
|
|
8
|
+
imageMap: Replayer['imageMap'];
|
|
9
|
+
errorHandler: Replayer['warnCanvasMutationFailed'];
|
|
10
|
+
}): void;
|
package/dist/replay/index.d.ts
CHANGED
|
@@ -54,6 +54,8 @@ export declare class Replayer {
|
|
|
54
54
|
private insertStyleRules;
|
|
55
55
|
private attachDocumentToIframe;
|
|
56
56
|
private collectIframeAndAttachDocument;
|
|
57
|
+
private hasImageArg;
|
|
58
|
+
private getImageArgs;
|
|
57
59
|
private waitForStylesheetLoad;
|
|
58
60
|
private preloadAllImages;
|
|
59
61
|
private applyIncremental;
|
package/dist/replay/timer.d.ts
CHANGED
|
@@ -15,4 +15,7 @@ export declare class Timer {
|
|
|
15
15
|
isActive(): boolean;
|
|
16
16
|
private findActionIndex;
|
|
17
17
|
}
|
|
18
|
-
export declare
|
|
18
|
+
export declare type LastDelay = {
|
|
19
|
+
at: number | null;
|
|
20
|
+
};
|
|
21
|
+
export declare function addDelay(event: eventWithTime, baselineTime: number, lastDelay?: LastDelay): number;
|
package/dist/snapshot/types.d.ts
CHANGED
|
@@ -55,6 +55,9 @@ export declare type tagMap = {
|
|
|
55
55
|
export interface INode extends Node {
|
|
56
56
|
__sn: serializedNodeWithId;
|
|
57
57
|
}
|
|
58
|
+
export interface ICanvas extends HTMLCanvasElement {
|
|
59
|
+
__context: string;
|
|
60
|
+
}
|
|
58
61
|
export declare type idNodeMap = {
|
|
59
62
|
[key: number]: INode;
|
|
60
63
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -288,6 +288,24 @@ export declare enum MouseInteractions {
|
|
|
288
288
|
TouchEnd = 9,
|
|
289
289
|
TouchCancel = 10
|
|
290
290
|
}
|
|
291
|
+
export declare enum CanvasContext {
|
|
292
|
+
'2D' = 0,
|
|
293
|
+
WebGL = 1,
|
|
294
|
+
WebGL2 = 2
|
|
295
|
+
}
|
|
296
|
+
export declare type SerializedWebGlArg = {
|
|
297
|
+
rr_type: 'ArrayBuffer';
|
|
298
|
+
base64: string;
|
|
299
|
+
} | {
|
|
300
|
+
rr_type: string;
|
|
301
|
+
src: string;
|
|
302
|
+
} | {
|
|
303
|
+
rr_type: string;
|
|
304
|
+
args: Array<SerializedWebGlArg>;
|
|
305
|
+
} | {
|
|
306
|
+
rr_type: string;
|
|
307
|
+
index: number;
|
|
308
|
+
} | string | number | boolean | null | SerializedWebGlArg[];
|
|
291
309
|
declare type mouseInteractionParam = {
|
|
292
310
|
type: MouseInteractions;
|
|
293
311
|
id: number;
|
|
@@ -330,9 +348,11 @@ export declare type styleDeclarationCallback = (s: styleDeclarationParam) => voi
|
|
|
330
348
|
export declare type canvasMutationCallback = (p: canvasMutationParam) => void;
|
|
331
349
|
export declare type canvasMutationParam = {
|
|
332
350
|
id: number;
|
|
351
|
+
type: CanvasContext;
|
|
333
352
|
property: string;
|
|
334
353
|
args: Array<unknown>;
|
|
335
354
|
setter?: true;
|
|
355
|
+
newFrame?: true;
|
|
336
356
|
};
|
|
337
357
|
export declare type fontParam = {
|
|
338
358
|
family: string;
|
|
@@ -430,6 +450,7 @@ export declare type missingNodeMap = {
|
|
|
430
450
|
export declare type actionWithDelay = {
|
|
431
451
|
doAction: () => void;
|
|
432
452
|
delay: number;
|
|
453
|
+
newFrame: boolean;
|
|
433
454
|
};
|
|
434
455
|
export declare type Handler = (event?: unknown) => void;
|
|
435
456
|
export declare type Emitter = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@highlight-run/rrweb",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "record and replay the web",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register -r ignore-styles -r jsdom-global/register test/**.test.ts",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"chai": "^4.2.0",
|
|
44
44
|
"cross-env": "^5.2.0",
|
|
45
45
|
"css-loader": "^5.0.1",
|
|
46
|
-
"mini-css-extract-plugin": "^1.3.8",
|
|
47
46
|
"fast-mhtml": "^1.1.9",
|
|
48
47
|
"ignore-styles": "^5.0.1",
|
|
49
48
|
"inquirer": "^6.2.1",
|
|
50
49
|
"jest-snapshot": "^23.6.0",
|
|
51
50
|
"jsdom": "^16.6.0",
|
|
52
51
|
"jsdom-global": "^3.0.2",
|
|
52
|
+
"mini-css-extract-plugin": "^1.3.8",
|
|
53
53
|
"mocha": "^5.2.0",
|
|
54
54
|
"node-libtidy": "^0.4.0",
|
|
55
55
|
"prettier": "2.2.1",
|
|
@@ -76,7 +76,9 @@
|
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@types/css-font-loading-module": "0.0.4",
|
|
78
78
|
"@xstate/fsm": "^1.4.0",
|
|
79
|
+
"base64-arraybuffer": "^1.0.1",
|
|
79
80
|
"fflate": "^0.4.4",
|
|
81
|
+
"identity-obj-proxy": "^3.0.0",
|
|
80
82
|
"mitt": "^1.1.3"
|
|
81
83
|
}
|
|
82
84
|
}
|