@highlight-run/rrweb 0.12.14 → 1.1.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/index.css +10 -172
- package/dist/index.css.map +1 -1
- 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/record/stringify.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 +5 -1
- package/dist/replay/timer.d.ts +4 -1
- package/dist/snapshot/index.d.ts +2 -2
- package/dist/snapshot/rebuild.d.ts +5 -2
- package/dist/snapshot/types.d.ts +7 -0
- package/dist/stats.json +1 -0
- package/dist/types.d.ts +29 -3
- package/dist/utils.d.ts +5 -4
- 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
|
@@ -13,6 +13,7 @@ export declare class Replayer {
|
|
|
13
13
|
private mouseTail;
|
|
14
14
|
private tailPositions;
|
|
15
15
|
private emitter;
|
|
16
|
+
private nextUserInteractionEvent;
|
|
16
17
|
private activityIntervals;
|
|
17
18
|
private inactiveEndTimestamp;
|
|
18
19
|
private legacy_missingNodeRetryMap;
|
|
@@ -20,8 +21,8 @@ export declare class Replayer {
|
|
|
20
21
|
private fragmentParentMap;
|
|
21
22
|
private elementStateMap;
|
|
22
23
|
private virtualStyleRulesMap;
|
|
24
|
+
private cache;
|
|
23
25
|
private imageMap;
|
|
24
|
-
private nextUserInteractionEvent;
|
|
25
26
|
private mirror;
|
|
26
27
|
private firstFullSnapshot;
|
|
27
28
|
private newDocumentQueue;
|
|
@@ -43,6 +44,7 @@ export declare class Replayer {
|
|
|
43
44
|
addEvent(rawEvent: eventWithTime | string): void;
|
|
44
45
|
enableInteract(): void;
|
|
45
46
|
disableInteract(): void;
|
|
47
|
+
resetCache(): void;
|
|
46
48
|
private setupDom;
|
|
47
49
|
private handleResize;
|
|
48
50
|
private applyEventsSynchronously;
|
|
@@ -53,6 +55,8 @@ export declare class Replayer {
|
|
|
53
55
|
private attachDocumentToIframe;
|
|
54
56
|
private collectIframeAndAttachDocument;
|
|
55
57
|
private waitForStylesheetLoad;
|
|
58
|
+
private hasImageArg;
|
|
59
|
+
private getImageArgs;
|
|
56
60
|
private preloadAllImages;
|
|
57
61
|
private applyIncremental;
|
|
58
62
|
private applyMutation;
|
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/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import snapshot, { serializeNodeWithId, transformAttribute, visitSnapshot, cleanupSnapshot, needMaskingText, IGNORED_NODE } from './snapshot';
|
|
2
|
-
import rebuild, { buildNodeWithSN, addHoverClass } from './rebuild';
|
|
2
|
+
import rebuild, { buildNodeWithSN, addHoverClass, createCache } from './rebuild';
|
|
3
3
|
export * from './types';
|
|
4
4
|
export * from './utils';
|
|
5
|
-
export { snapshot, serializeNodeWithId, rebuild, buildNodeWithSN, addHoverClass, transformAttribute, visitSnapshot, cleanupSnapshot, needMaskingText, IGNORED_NODE, };
|
|
5
|
+
export { snapshot, serializeNodeWithId, rebuild, buildNodeWithSN, addHoverClass, createCache, transformAttribute, visitSnapshot, cleanupSnapshot, needMaskingText, IGNORED_NODE, };
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { serializedNodeWithId, idNodeMap, INode } from './types';
|
|
2
|
-
export declare function addHoverClass(cssText: string): string;
|
|
1
|
+
import { serializedNodeWithId, idNodeMap, INode, BuildCache } from './types';
|
|
2
|
+
export declare function addHoverClass(cssText: string, cache: BuildCache): string;
|
|
3
|
+
export declare function createCache(): BuildCache;
|
|
3
4
|
export declare function buildNodeWithSN(n: serializedNodeWithId, options: {
|
|
4
5
|
doc: Document;
|
|
5
6
|
map: idNodeMap;
|
|
6
7
|
skipChild?: boolean;
|
|
7
8
|
hackCss: boolean;
|
|
8
9
|
afterAppend?: (n: INode) => unknown;
|
|
10
|
+
cache: BuildCache;
|
|
9
11
|
}): INode | null;
|
|
10
12
|
declare function rebuild(n: serializedNodeWithId, options: {
|
|
11
13
|
doc: Document;
|
|
12
14
|
onVisit?: (node: INode) => unknown;
|
|
13
15
|
hackCss?: boolean;
|
|
14
16
|
afterAppend?: (n: INode) => unknown;
|
|
17
|
+
cache: BuildCache;
|
|
15
18
|
}): [Node | null, idNodeMap];
|
|
16
19
|
export default rebuild;
|
package/dist/snapshot/types.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare enum NodeType {
|
|
|
9
9
|
export declare type documentNode = {
|
|
10
10
|
type: NodeType.Document;
|
|
11
11
|
childNodes: serializedNodeWithId[];
|
|
12
|
+
compatMode?: string;
|
|
12
13
|
};
|
|
13
14
|
export declare type documentTypeNode = {
|
|
14
15
|
type: NodeType.DocumentType;
|
|
@@ -54,6 +55,9 @@ export declare type tagMap = {
|
|
|
54
55
|
export interface INode extends Node {
|
|
55
56
|
__sn: serializedNodeWithId;
|
|
56
57
|
}
|
|
58
|
+
export interface ICanvas extends HTMLCanvasElement {
|
|
59
|
+
__context: string;
|
|
60
|
+
}
|
|
57
61
|
export declare type idNodeMap = {
|
|
58
62
|
[key: number]: INode;
|
|
59
63
|
};
|
|
@@ -90,3 +94,6 @@ export declare type SlimDOMOptions = Partial<{
|
|
|
90
94
|
export declare type MaskTextFn = (text: string) => string;
|
|
91
95
|
export declare type MaskInputFn = (text: string) => string;
|
|
92
96
|
export declare type KeepIframeSrcFn = (src: string) => boolean;
|
|
97
|
+
export declare type BuildCache = {
|
|
98
|
+
stylesWithHoverClass: Map<string, string>;
|
|
99
|
+
};
|