@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
package/dist/plugins/types.d.ts
DELETED
|
@@ -1,509 +0,0 @@
|
|
|
1
|
-
import { serializedNodeWithId, idNodeMap, INode, MaskInputOptions, SlimDOMOptions, MaskInputFn, MaskTextFn } from './snapshot';
|
|
2
|
-
import { PackFn, UnpackFn } from './packer/base';
|
|
3
|
-
import { FontFaceDescriptors } from 'css-font-loading-module';
|
|
4
|
-
import { IframeManager } from './record/iframe-manager';
|
|
5
|
-
import { ShadowDomManager } from './record/shadow-dom-manager';
|
|
6
|
-
import type { Replayer } from './replay';
|
|
7
|
-
import { CanvasManager } from './record/observers/canvas/canvas-manager';
|
|
8
|
-
export declare enum EventType {
|
|
9
|
-
DomContentLoaded = 0,
|
|
10
|
-
Load = 1,
|
|
11
|
-
FullSnapshot = 2,
|
|
12
|
-
IncrementalSnapshot = 3,
|
|
13
|
-
Meta = 4,
|
|
14
|
-
Custom = 5,
|
|
15
|
-
Plugin = 6
|
|
16
|
-
}
|
|
17
|
-
export declare type SessionInterval = {
|
|
18
|
-
startTime: number;
|
|
19
|
-
endTime: number;
|
|
20
|
-
duration: number;
|
|
21
|
-
active: boolean;
|
|
22
|
-
};
|
|
23
|
-
export declare type domContentLoadedEvent = {
|
|
24
|
-
type: EventType.DomContentLoaded;
|
|
25
|
-
data: {};
|
|
26
|
-
};
|
|
27
|
-
export declare type loadedEvent = {
|
|
28
|
-
type: EventType.Load;
|
|
29
|
-
data: {};
|
|
30
|
-
};
|
|
31
|
-
export declare type fullSnapshotEvent = {
|
|
32
|
-
type: EventType.FullSnapshot;
|
|
33
|
-
data: {
|
|
34
|
-
node: serializedNodeWithId;
|
|
35
|
-
initialOffset: {
|
|
36
|
-
top: number;
|
|
37
|
-
left: number;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
export declare type incrementalSnapshotEvent = {
|
|
42
|
-
type: EventType.IncrementalSnapshot;
|
|
43
|
-
data: incrementalData;
|
|
44
|
-
};
|
|
45
|
-
export declare type metaEvent = {
|
|
46
|
-
type: EventType.Meta;
|
|
47
|
-
data: {
|
|
48
|
-
href: string;
|
|
49
|
-
width: number;
|
|
50
|
-
height: number;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
export declare type customEvent<T = unknown> = {
|
|
54
|
-
type: EventType.Custom;
|
|
55
|
-
data: {
|
|
56
|
-
tag: string;
|
|
57
|
-
payload: T;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
export declare type pluginEvent<T = unknown> = {
|
|
61
|
-
type: EventType.Plugin;
|
|
62
|
-
data: {
|
|
63
|
-
plugin: string;
|
|
64
|
-
payload: T;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
export declare type styleSheetEvent = {};
|
|
68
|
-
export declare enum IncrementalSource {
|
|
69
|
-
Mutation = 0,
|
|
70
|
-
MouseMove = 1,
|
|
71
|
-
MouseInteraction = 2,
|
|
72
|
-
Scroll = 3,
|
|
73
|
-
ViewportResize = 4,
|
|
74
|
-
Input = 5,
|
|
75
|
-
TouchMove = 6,
|
|
76
|
-
MediaInteraction = 7,
|
|
77
|
-
StyleSheetRule = 8,
|
|
78
|
-
CanvasMutation = 9,
|
|
79
|
-
Font = 10,
|
|
80
|
-
Log = 11,
|
|
81
|
-
Drag = 12,
|
|
82
|
-
StyleDeclaration = 13
|
|
83
|
-
}
|
|
84
|
-
export declare type mutationData = {
|
|
85
|
-
source: IncrementalSource.Mutation;
|
|
86
|
-
} & mutationCallbackParam;
|
|
87
|
-
export declare type mousemoveData = {
|
|
88
|
-
source: IncrementalSource.MouseMove | IncrementalSource.TouchMove | IncrementalSource.Drag;
|
|
89
|
-
positions: mousePosition[];
|
|
90
|
-
};
|
|
91
|
-
export declare type mouseInteractionData = {
|
|
92
|
-
source: IncrementalSource.MouseInteraction;
|
|
93
|
-
} & mouseInteractionParam;
|
|
94
|
-
export declare type scrollData = {
|
|
95
|
-
source: IncrementalSource.Scroll;
|
|
96
|
-
} & scrollPosition;
|
|
97
|
-
export declare type viewportResizeData = {
|
|
98
|
-
source: IncrementalSource.ViewportResize;
|
|
99
|
-
} & viewportResizeDimension;
|
|
100
|
-
export declare type inputData = {
|
|
101
|
-
source: IncrementalSource.Input;
|
|
102
|
-
id: number;
|
|
103
|
-
} & inputValue;
|
|
104
|
-
export declare type mediaInteractionData = {
|
|
105
|
-
source: IncrementalSource.MediaInteraction;
|
|
106
|
-
} & mediaInteractionParam;
|
|
107
|
-
export declare type styleSheetRuleData = {
|
|
108
|
-
source: IncrementalSource.StyleSheetRule;
|
|
109
|
-
} & styleSheetRuleParam;
|
|
110
|
-
export declare type styleDeclarationData = {
|
|
111
|
-
source: IncrementalSource.StyleDeclaration;
|
|
112
|
-
} & styleDeclarationParam;
|
|
113
|
-
export declare type canvasMutationData = {
|
|
114
|
-
source: IncrementalSource.CanvasMutation;
|
|
115
|
-
} & canvasMutationParam;
|
|
116
|
-
export declare type fontData = {
|
|
117
|
-
source: IncrementalSource.Font;
|
|
118
|
-
} & fontParam;
|
|
119
|
-
export declare type incrementalData = mutationData | mousemoveData | mouseInteractionData | scrollData | viewportResizeData | inputData | mediaInteractionData | styleSheetRuleData | canvasMutationData | fontData | styleDeclarationData;
|
|
120
|
-
export declare type event = domContentLoadedEvent | loadedEvent | fullSnapshotEvent | incrementalSnapshotEvent | metaEvent | customEvent | pluginEvent;
|
|
121
|
-
export declare type eventWithTime = event & {
|
|
122
|
-
timestamp: number;
|
|
123
|
-
delay?: number;
|
|
124
|
-
};
|
|
125
|
-
export declare type blockClass = string | RegExp;
|
|
126
|
-
export declare type maskTextClass = string | RegExp;
|
|
127
|
-
export declare type SamplingStrategy = Partial<{
|
|
128
|
-
mousemove: boolean | number;
|
|
129
|
-
mousemoveCallback: number;
|
|
130
|
-
mouseInteraction: boolean | Record<string, boolean | undefined>;
|
|
131
|
-
scroll: number;
|
|
132
|
-
media: number;
|
|
133
|
-
input: 'all' | 'last';
|
|
134
|
-
}>;
|
|
135
|
-
export declare type RecordPlugin<TOptions = unknown> = {
|
|
136
|
-
name: string;
|
|
137
|
-
observer?: (cb: Function, win: IWindow, options: TOptions) => listenerHandler;
|
|
138
|
-
eventProcessor?: <TExtend>(event: eventWithTime) => eventWithTime & TExtend;
|
|
139
|
-
options: TOptions;
|
|
140
|
-
};
|
|
141
|
-
export declare type recordOptions<T> = {
|
|
142
|
-
emit?: (e: T, isCheckout?: boolean) => void;
|
|
143
|
-
checkoutEveryNth?: number;
|
|
144
|
-
checkoutEveryNms?: number;
|
|
145
|
-
blockClass?: blockClass;
|
|
146
|
-
blockSelector?: string;
|
|
147
|
-
ignoreClass?: string;
|
|
148
|
-
maskTextClass?: maskTextClass;
|
|
149
|
-
maskTextSelector?: string;
|
|
150
|
-
maskAllInputs?: boolean;
|
|
151
|
-
maskInputOptions?: MaskInputOptions;
|
|
152
|
-
maskInputFn?: MaskInputFn;
|
|
153
|
-
maskTextFn?: MaskTextFn;
|
|
154
|
-
slimDOMOptions?: SlimDOMOptions | 'all' | true;
|
|
155
|
-
inlineStylesheet?: boolean;
|
|
156
|
-
hooks?: hooksParam;
|
|
157
|
-
packFn?: PackFn;
|
|
158
|
-
sampling?: SamplingStrategy;
|
|
159
|
-
recordCanvas?: boolean;
|
|
160
|
-
userTriggeredOnInput?: boolean;
|
|
161
|
-
collectFonts?: boolean;
|
|
162
|
-
plugins?: RecordPlugin[];
|
|
163
|
-
mousemoveWait?: number;
|
|
164
|
-
keepIframeSrcFn?: KeepIframeSrcFn;
|
|
165
|
-
enableStrictPrivacy?: boolean;
|
|
166
|
-
};
|
|
167
|
-
export declare type observerParam = {
|
|
168
|
-
mutationCb: mutationCallBack;
|
|
169
|
-
mousemoveCb: mousemoveCallBack;
|
|
170
|
-
mouseInteractionCb: mouseInteractionCallBack;
|
|
171
|
-
scrollCb: scrollCallback;
|
|
172
|
-
viewportResizeCb: viewportResizeCallback;
|
|
173
|
-
inputCb: inputCallback;
|
|
174
|
-
mediaInteractionCb: mediaInteractionCallback;
|
|
175
|
-
blockClass: blockClass;
|
|
176
|
-
blockSelector: string | null;
|
|
177
|
-
ignoreClass: string;
|
|
178
|
-
maskTextClass: maskTextClass;
|
|
179
|
-
maskTextSelector: string | null;
|
|
180
|
-
maskInputOptions: MaskInputOptions;
|
|
181
|
-
maskInputFn?: MaskInputFn;
|
|
182
|
-
maskTextFn?: MaskTextFn;
|
|
183
|
-
inlineStylesheet: boolean;
|
|
184
|
-
styleSheetRuleCb: styleSheetRuleCallback;
|
|
185
|
-
styleDeclarationCb: styleDeclarationCallback;
|
|
186
|
-
canvasMutationCb: canvasMutationCallback;
|
|
187
|
-
fontCb: fontCallback;
|
|
188
|
-
sampling: SamplingStrategy;
|
|
189
|
-
recordCanvas: boolean;
|
|
190
|
-
userTriggeredOnInput: boolean;
|
|
191
|
-
collectFonts: boolean;
|
|
192
|
-
slimDOMOptions: SlimDOMOptions;
|
|
193
|
-
doc: Document;
|
|
194
|
-
mirror: Mirror;
|
|
195
|
-
iframeManager: IframeManager;
|
|
196
|
-
shadowDomManager: ShadowDomManager;
|
|
197
|
-
canvasManager: CanvasManager;
|
|
198
|
-
plugins: Array<{
|
|
199
|
-
observer: Function;
|
|
200
|
-
callback: Function;
|
|
201
|
-
options: unknown;
|
|
202
|
-
}>;
|
|
203
|
-
enableStrictPrivacy: boolean;
|
|
204
|
-
};
|
|
205
|
-
export declare type hooksParam = {
|
|
206
|
-
mutation?: mutationCallBack;
|
|
207
|
-
mousemove?: mousemoveCallBack;
|
|
208
|
-
mouseInteraction?: mouseInteractionCallBack;
|
|
209
|
-
scroll?: scrollCallback;
|
|
210
|
-
viewportResize?: viewportResizeCallback;
|
|
211
|
-
input?: inputCallback;
|
|
212
|
-
mediaInteaction?: mediaInteractionCallback;
|
|
213
|
-
styleSheetRule?: styleSheetRuleCallback;
|
|
214
|
-
styleDeclaration?: styleDeclarationCallback;
|
|
215
|
-
canvasMutation?: canvasMutationCallback;
|
|
216
|
-
font?: fontCallback;
|
|
217
|
-
};
|
|
218
|
-
export declare type mutationRecord = {
|
|
219
|
-
type: string;
|
|
220
|
-
target: Node;
|
|
221
|
-
oldValue: string | null;
|
|
222
|
-
addedNodes: NodeList;
|
|
223
|
-
removedNodes: NodeList;
|
|
224
|
-
attributeName: string | null;
|
|
225
|
-
};
|
|
226
|
-
export declare type textCursor = {
|
|
227
|
-
node: Node;
|
|
228
|
-
value: string | null;
|
|
229
|
-
};
|
|
230
|
-
export declare type textMutation = {
|
|
231
|
-
id: number;
|
|
232
|
-
value: string | null;
|
|
233
|
-
};
|
|
234
|
-
export declare type styleAttributeValue = {
|
|
235
|
-
[key: string]: styleValueWithPriority | string | false;
|
|
236
|
-
};
|
|
237
|
-
export declare type styleValueWithPriority = [string, string];
|
|
238
|
-
export declare type attributeCursor = {
|
|
239
|
-
node: Node;
|
|
240
|
-
attributes: {
|
|
241
|
-
[key: string]: string | styleAttributeValue | null;
|
|
242
|
-
};
|
|
243
|
-
};
|
|
244
|
-
export declare type attributeMutation = {
|
|
245
|
-
id: number;
|
|
246
|
-
attributes: {
|
|
247
|
-
[key: string]: string | styleAttributeValue | null;
|
|
248
|
-
};
|
|
249
|
-
};
|
|
250
|
-
export declare type removedNodeMutation = {
|
|
251
|
-
parentId: number;
|
|
252
|
-
id: number;
|
|
253
|
-
isShadow?: boolean;
|
|
254
|
-
};
|
|
255
|
-
export declare type addedNodeMutation = {
|
|
256
|
-
parentId: number;
|
|
257
|
-
previousId?: number | null;
|
|
258
|
-
nextId: number | null;
|
|
259
|
-
node: serializedNodeWithId;
|
|
260
|
-
};
|
|
261
|
-
export declare type mutationCallbackParam = {
|
|
262
|
-
texts: textMutation[];
|
|
263
|
-
attributes: attributeMutation[];
|
|
264
|
-
removes: removedNodeMutation[];
|
|
265
|
-
adds: addedNodeMutation[];
|
|
266
|
-
isAttachIframe?: true;
|
|
267
|
-
};
|
|
268
|
-
export declare type mutationCallBack = (m: mutationCallbackParam) => void;
|
|
269
|
-
export declare type mousemoveCallBack = (p: mousePosition[], source: IncrementalSource.MouseMove | IncrementalSource.TouchMove | IncrementalSource.Drag) => void;
|
|
270
|
-
export declare type mousePosition = {
|
|
271
|
-
x: number;
|
|
272
|
-
y: number;
|
|
273
|
-
id: number;
|
|
274
|
-
timeOffset: number;
|
|
275
|
-
};
|
|
276
|
-
export declare type mouseMovePos = {
|
|
277
|
-
x: number;
|
|
278
|
-
y: number;
|
|
279
|
-
id: number;
|
|
280
|
-
debugData: incrementalData;
|
|
281
|
-
};
|
|
282
|
-
export declare enum MouseInteractions {
|
|
283
|
-
MouseUp = 0,
|
|
284
|
-
MouseDown = 1,
|
|
285
|
-
Click = 2,
|
|
286
|
-
ContextMenu = 3,
|
|
287
|
-
DblClick = 4,
|
|
288
|
-
Focus = 5,
|
|
289
|
-
Blur = 6,
|
|
290
|
-
TouchStart = 7,
|
|
291
|
-
TouchMove_Departed = 8,
|
|
292
|
-
TouchEnd = 9,
|
|
293
|
-
TouchCancel = 10
|
|
294
|
-
}
|
|
295
|
-
export declare enum CanvasContext {
|
|
296
|
-
'2D' = 0,
|
|
297
|
-
WebGL = 1,
|
|
298
|
-
WebGL2 = 2
|
|
299
|
-
}
|
|
300
|
-
export declare type SerializedWebGlArg = {
|
|
301
|
-
rr_type: 'ArrayBuffer';
|
|
302
|
-
base64: string;
|
|
303
|
-
} | {
|
|
304
|
-
rr_type: string;
|
|
305
|
-
src: string;
|
|
306
|
-
} | {
|
|
307
|
-
rr_type: string;
|
|
308
|
-
args: Array<SerializedWebGlArg>;
|
|
309
|
-
} | {
|
|
310
|
-
rr_type: string;
|
|
311
|
-
index: number;
|
|
312
|
-
} | string | number | boolean | null | SerializedWebGlArg[];
|
|
313
|
-
declare type mouseInteractionParam = {
|
|
314
|
-
type: MouseInteractions;
|
|
315
|
-
id: number;
|
|
316
|
-
x: number;
|
|
317
|
-
y: number;
|
|
318
|
-
};
|
|
319
|
-
export declare type mouseInteractionCallBack = (d: mouseInteractionParam) => void;
|
|
320
|
-
export declare type scrollPosition = {
|
|
321
|
-
id: number;
|
|
322
|
-
x: number;
|
|
323
|
-
y: number;
|
|
324
|
-
};
|
|
325
|
-
export declare type scrollCallback = (p: scrollPosition) => void;
|
|
326
|
-
export declare type styleSheetAddRule = {
|
|
327
|
-
rule: string;
|
|
328
|
-
index?: number | number[];
|
|
329
|
-
};
|
|
330
|
-
export declare type styleSheetDeleteRule = {
|
|
331
|
-
index: number | number[];
|
|
332
|
-
};
|
|
333
|
-
export declare type styleSheetRuleParam = {
|
|
334
|
-
id: number;
|
|
335
|
-
removes?: styleSheetDeleteRule[];
|
|
336
|
-
adds?: styleSheetAddRule[];
|
|
337
|
-
};
|
|
338
|
-
export declare type styleSheetRuleCallback = (s: styleSheetRuleParam) => void;
|
|
339
|
-
export declare type styleDeclarationParam = {
|
|
340
|
-
id: number;
|
|
341
|
-
index: number[];
|
|
342
|
-
set?: {
|
|
343
|
-
property: string;
|
|
344
|
-
value: string | null;
|
|
345
|
-
priority: string | undefined;
|
|
346
|
-
};
|
|
347
|
-
remove?: {
|
|
348
|
-
property: string;
|
|
349
|
-
};
|
|
350
|
-
};
|
|
351
|
-
export declare type styleDeclarationCallback = (s: styleDeclarationParam) => void;
|
|
352
|
-
export declare type canvasMutationCommand = {
|
|
353
|
-
property: string;
|
|
354
|
-
args: Array<unknown>;
|
|
355
|
-
setter?: true;
|
|
356
|
-
};
|
|
357
|
-
export declare type canvasMutationParam = {
|
|
358
|
-
id: number;
|
|
359
|
-
type: CanvasContext;
|
|
360
|
-
commands: canvasMutationCommand[];
|
|
361
|
-
} | ({
|
|
362
|
-
id: number;
|
|
363
|
-
type: CanvasContext;
|
|
364
|
-
} & canvasMutationCommand);
|
|
365
|
-
export declare type canvasMutationWithType = {
|
|
366
|
-
type: CanvasContext;
|
|
367
|
-
} & canvasMutationCommand;
|
|
368
|
-
export declare type canvasMutationCallback = (p: canvasMutationParam) => void;
|
|
369
|
-
export declare type canvasManagerMutationCallback = (target: HTMLCanvasElement, p: canvasMutationWithType) => void;
|
|
370
|
-
export declare type fontParam = {
|
|
371
|
-
family: string;
|
|
372
|
-
fontSource: string;
|
|
373
|
-
buffer: boolean;
|
|
374
|
-
descriptors?: FontFaceDescriptors;
|
|
375
|
-
};
|
|
376
|
-
export declare type fontCallback = (p: fontParam) => void;
|
|
377
|
-
export declare type viewportResizeDimension = {
|
|
378
|
-
width: number;
|
|
379
|
-
height: number;
|
|
380
|
-
};
|
|
381
|
-
export declare type viewportResizeCallback = (d: viewportResizeDimension) => void;
|
|
382
|
-
export declare type inputValue = {
|
|
383
|
-
text: string;
|
|
384
|
-
isChecked: boolean;
|
|
385
|
-
userTriggered?: boolean;
|
|
386
|
-
};
|
|
387
|
-
export declare type inputCallback = (v: inputValue & {
|
|
388
|
-
id: number;
|
|
389
|
-
}) => void;
|
|
390
|
-
export declare const enum MediaInteractions {
|
|
391
|
-
Play = 0,
|
|
392
|
-
Pause = 1,
|
|
393
|
-
Seeked = 2,
|
|
394
|
-
VolumeChange = 3
|
|
395
|
-
}
|
|
396
|
-
export declare type mediaInteractionParam = {
|
|
397
|
-
type: MediaInteractions;
|
|
398
|
-
id: number;
|
|
399
|
-
currentTime?: number;
|
|
400
|
-
volume?: number;
|
|
401
|
-
muted?: boolean;
|
|
402
|
-
};
|
|
403
|
-
export declare type mediaInteractionCallback = (p: mediaInteractionParam) => void;
|
|
404
|
-
export declare type DocumentDimension = {
|
|
405
|
-
x: number;
|
|
406
|
-
y: number;
|
|
407
|
-
relativeScale: number;
|
|
408
|
-
absoluteScale: number;
|
|
409
|
-
};
|
|
410
|
-
export declare type Mirror = {
|
|
411
|
-
map: idNodeMap;
|
|
412
|
-
getId: (n: INode) => number;
|
|
413
|
-
getNode: (id: number) => INode | null;
|
|
414
|
-
removeNodeFromMap: (n: INode) => void;
|
|
415
|
-
has: (id: number) => boolean;
|
|
416
|
-
reset: () => void;
|
|
417
|
-
};
|
|
418
|
-
export declare type throttleOptions = {
|
|
419
|
-
leading?: boolean;
|
|
420
|
-
trailing?: boolean;
|
|
421
|
-
};
|
|
422
|
-
export declare type listenerHandler = () => void;
|
|
423
|
-
export declare type hookResetter = () => void;
|
|
424
|
-
export declare type ReplayPlugin = {
|
|
425
|
-
handler: (event: eventWithTime, isSync: boolean, context: {
|
|
426
|
-
replayer: Replayer;
|
|
427
|
-
}) => void;
|
|
428
|
-
};
|
|
429
|
-
export declare type playerConfig = {
|
|
430
|
-
speed: number;
|
|
431
|
-
maxSpeed: number;
|
|
432
|
-
root: Element;
|
|
433
|
-
loadTimeout: number;
|
|
434
|
-
skipInactive: boolean;
|
|
435
|
-
showWarning: boolean;
|
|
436
|
-
showDebug: boolean;
|
|
437
|
-
blockClass: string;
|
|
438
|
-
liveMode: boolean;
|
|
439
|
-
insertStyleRules: string[];
|
|
440
|
-
triggerFocus: boolean;
|
|
441
|
-
UNSAFE_replayCanvas: boolean;
|
|
442
|
-
pauseAnimation?: boolean;
|
|
443
|
-
mouseTail: boolean | {
|
|
444
|
-
duration?: number;
|
|
445
|
-
lineCap?: string;
|
|
446
|
-
lineWidth?: number;
|
|
447
|
-
strokeStyle?: string;
|
|
448
|
-
};
|
|
449
|
-
unpackFn?: UnpackFn;
|
|
450
|
-
plugins?: ReplayPlugin[];
|
|
451
|
-
inactiveThreshold: number;
|
|
452
|
-
inactiveSkipTime: number;
|
|
453
|
-
};
|
|
454
|
-
export declare type playerMetaData = {
|
|
455
|
-
startTime: number;
|
|
456
|
-
endTime: number;
|
|
457
|
-
totalTime: number;
|
|
458
|
-
};
|
|
459
|
-
export declare type missingNode = {
|
|
460
|
-
node: Node;
|
|
461
|
-
mutation: addedNodeMutation;
|
|
462
|
-
};
|
|
463
|
-
export declare type missingNodeMap = {
|
|
464
|
-
[id: number]: missingNode;
|
|
465
|
-
};
|
|
466
|
-
export declare type actionWithDelay = {
|
|
467
|
-
doAction: () => void;
|
|
468
|
-
delay: number;
|
|
469
|
-
};
|
|
470
|
-
export declare type Handler = (event?: unknown) => void;
|
|
471
|
-
export declare type Emitter = {
|
|
472
|
-
on(type: string, handler: Handler): void;
|
|
473
|
-
emit(type: string, event?: unknown): void;
|
|
474
|
-
off(type: string, handler: Handler): void;
|
|
475
|
-
};
|
|
476
|
-
export declare type Arguments<T> = T extends (...payload: infer U) => unknown ? U : unknown;
|
|
477
|
-
export declare enum ReplayerEvents {
|
|
478
|
-
Start = "start",
|
|
479
|
-
Pause = "pause",
|
|
480
|
-
Resume = "resume",
|
|
481
|
-
Resize = "resize",
|
|
482
|
-
Finish = "finish",
|
|
483
|
-
FullsnapshotRebuilded = "fullsnapshot-rebuilded",
|
|
484
|
-
LoadStylesheetStart = "load-stylesheet-start",
|
|
485
|
-
LoadStylesheetEnd = "load-stylesheet-end",
|
|
486
|
-
SkipStart = "skip-start",
|
|
487
|
-
SkipEnd = "skip-end",
|
|
488
|
-
MouseInteraction = "mouse-interaction",
|
|
489
|
-
EventCast = "event-cast",
|
|
490
|
-
CustomEvent = "custom-event",
|
|
491
|
-
Flush = "flush",
|
|
492
|
-
StateChange = "state-change",
|
|
493
|
-
PlayBack = "play-back"
|
|
494
|
-
}
|
|
495
|
-
export declare type ElementState = {
|
|
496
|
-
scroll?: [number, number];
|
|
497
|
-
};
|
|
498
|
-
export declare type KeepIframeSrcFn = (src: string) => boolean;
|
|
499
|
-
export interface HighlightConfiguration {
|
|
500
|
-
enableOnHoverClass?: boolean;
|
|
501
|
-
}
|
|
502
|
-
declare global {
|
|
503
|
-
interface Window {
|
|
504
|
-
HIG_CONFIGURATION: HighlightConfiguration;
|
|
505
|
-
FontFace: typeof FontFace;
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
export declare type IWindow = Window & typeof globalThis;
|
|
509
|
-
export {};
|
package/dist/plugins/utils.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { Mirror, throttleOptions, listenerHandler, hookResetter, blockClass, addedNodeMutation, removedNodeMutation, textMutation, attributeMutation, mutationData, scrollData, inputData, DocumentDimension, IWindow } from './types';
|
|
2
|
-
import { INode, serializedNodeWithId } from './snapshot';
|
|
3
|
-
export declare function on(type: string, fn: EventListenerOrEventListenerObject, target?: Document | IWindow): listenerHandler;
|
|
4
|
-
export declare function createMirror(): Mirror;
|
|
5
|
-
export declare let _mirror: Mirror;
|
|
6
|
-
export declare function throttle<T>(func: (arg: T) => void, wait: number, options?: throttleOptions): (arg: T) => void;
|
|
7
|
-
export declare function hookSetter<T>(target: T, key: string | number | symbol, d: PropertyDescriptor, isRevoked?: boolean, win?: IWindow): hookResetter;
|
|
8
|
-
export declare function patch(source: {
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}, name: string, replacement: (...args: any[]) => any): () => void;
|
|
11
|
-
export declare function getWindowHeight(): number;
|
|
12
|
-
export declare function getWindowWidth(): number;
|
|
13
|
-
export declare const isCanvasNode: (node: Node | null) => boolean;
|
|
14
|
-
export declare function isBlocked(node: Node | null, blockClass: blockClass): boolean;
|
|
15
|
-
export declare function isIgnored(n: Node | INode): boolean;
|
|
16
|
-
export declare function isAncestorRemoved(target: INode, mirror: Mirror): boolean;
|
|
17
|
-
export declare function isTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent;
|
|
18
|
-
export declare function polyfill(win?: IWindow): void;
|
|
19
|
-
export declare type TreeNode = {
|
|
20
|
-
id: number;
|
|
21
|
-
mutation: addedNodeMutation;
|
|
22
|
-
parent?: TreeNode;
|
|
23
|
-
children: Record<number, TreeNode>;
|
|
24
|
-
texts: textMutation[];
|
|
25
|
-
attributes: attributeMutation[];
|
|
26
|
-
};
|
|
27
|
-
export declare class TreeIndex {
|
|
28
|
-
tree: Record<number, TreeNode>;
|
|
29
|
-
private removeNodeMutations;
|
|
30
|
-
private textMutations;
|
|
31
|
-
private attributeMutations;
|
|
32
|
-
private indexes;
|
|
33
|
-
private removeIdSet;
|
|
34
|
-
private scrollMap;
|
|
35
|
-
private inputMap;
|
|
36
|
-
constructor();
|
|
37
|
-
add(mutation: addedNodeMutation): void;
|
|
38
|
-
remove(mutation: removedNodeMutation, mirror: Mirror): void;
|
|
39
|
-
text(mutation: textMutation): void;
|
|
40
|
-
attribute(mutation: attributeMutation): void;
|
|
41
|
-
scroll(d: scrollData): void;
|
|
42
|
-
input(d: inputData): void;
|
|
43
|
-
flush(): {
|
|
44
|
-
mutationData: mutationData;
|
|
45
|
-
scrollMap: TreeIndex['scrollMap'];
|
|
46
|
-
inputMap: TreeIndex['inputMap'];
|
|
47
|
-
};
|
|
48
|
-
private reset;
|
|
49
|
-
idRemoved(id: number): boolean;
|
|
50
|
-
}
|
|
51
|
-
declare type ResolveTree = {
|
|
52
|
-
value: addedNodeMutation;
|
|
53
|
-
children: ResolveTree[];
|
|
54
|
-
parent: ResolveTree | null;
|
|
55
|
-
};
|
|
56
|
-
export declare function queueToResolveTrees(queue: addedNodeMutation[]): ResolveTree[];
|
|
57
|
-
export declare function iterateResolveTree(tree: ResolveTree, cb: (mutation: addedNodeMutation) => unknown): void;
|
|
58
|
-
declare type HTMLIFrameINode = HTMLIFrameElement & {
|
|
59
|
-
__sn: serializedNodeWithId;
|
|
60
|
-
};
|
|
61
|
-
export declare type AppendedIframe = {
|
|
62
|
-
mutationInQueue: addedNodeMutation;
|
|
63
|
-
builtNode: HTMLIFrameINode;
|
|
64
|
-
};
|
|
65
|
-
export declare function isIframeINode(node: INode | ShadowRoot): node is HTMLIFrameINode;
|
|
66
|
-
export declare function getBaseDimension(node: Node, rootIframe: Node): DocumentDimension;
|
|
67
|
-
export declare function hasShadowRoot<T extends Node>(n: T): n is T & {
|
|
68
|
-
shadowRoot: ShadowRoot;
|
|
69
|
-
};
|
|
70
|
-
export declare function obfuscateText(text: string): string;
|
|
71
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { MaskInputOptions, SlimDOMOptions, MaskInputFn, MaskTextFn } from '../snapshot';
|
|
2
|
-
import { mutationCallBack, observerParam, listenerHandler, scrollCallback, blockClass, maskTextClass, hooksParam, SamplingStrategy, Mirror } from '../types';
|
|
3
|
-
import MutationBuffer from './mutation';
|
|
4
|
-
import { IframeManager } from './iframe-manager';
|
|
5
|
-
import { ShadowDomManager } from './shadow-dom-manager';
|
|
6
|
-
import { CanvasManager } from './observers/canvas/canvas-manager';
|
|
7
|
-
export declare const mutationBuffers: MutationBuffer[];
|
|
8
|
-
export declare function initMutationObserver(cb: mutationCallBack, doc: Document, blockClass: blockClass, blockSelector: string | null, maskTextClass: maskTextClass, maskTextSelector: string | null, inlineStylesheet: boolean, maskInputOptions: MaskInputOptions, maskTextFn: MaskTextFn | undefined, maskInputFn: MaskInputFn | undefined, recordCanvas: boolean, slimDOMOptions: SlimDOMOptions, mirror: Mirror, iframeManager: IframeManager, shadowDomManager: ShadowDomManager, canvasManager: CanvasManager, rootEl: Node, enableStrictPrivacy: boolean): MutationObserver;
|
|
9
|
-
export declare function initScrollObserver(cb: scrollCallback, doc: Document, mirror: Mirror, blockClass: blockClass, sampling: SamplingStrategy): listenerHandler;
|
|
10
|
-
export declare const INPUT_TAGS: string[];
|
|
11
|
-
export declare function initObservers(o: observerParam, hooks?: hooksParam): listenerHandler;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { mutationCallBack, blockClass, maskTextClass, Mirror, scrollCallback, SamplingStrategy } from '../types';
|
|
2
|
-
import { MaskInputOptions, SlimDOMOptions, MaskTextFn, MaskInputFn } from '../snapshot';
|
|
3
|
-
import { IframeManager } from './iframe-manager';
|
|
4
|
-
import { CanvasManager } from './observers/canvas/canvas-manager';
|
|
5
|
-
declare type BypassOptions = {
|
|
6
|
-
blockClass: blockClass;
|
|
7
|
-
blockSelector: string | null;
|
|
8
|
-
maskTextClass: maskTextClass;
|
|
9
|
-
maskTextSelector: string | null;
|
|
10
|
-
inlineStylesheet: boolean;
|
|
11
|
-
maskInputOptions: MaskInputOptions;
|
|
12
|
-
maskTextFn: MaskTextFn | undefined;
|
|
13
|
-
maskInputFn: MaskInputFn | undefined;
|
|
14
|
-
recordCanvas: boolean;
|
|
15
|
-
sampling: SamplingStrategy;
|
|
16
|
-
slimDOMOptions: SlimDOMOptions;
|
|
17
|
-
iframeManager: IframeManager;
|
|
18
|
-
canvasManager: CanvasManager;
|
|
19
|
-
enableStrictPrivacy: boolean;
|
|
20
|
-
};
|
|
21
|
-
export declare class ShadowDomManager {
|
|
22
|
-
private mutationCb;
|
|
23
|
-
private scrollCb;
|
|
24
|
-
private bypassOptions;
|
|
25
|
-
private mirror;
|
|
26
|
-
constructor(options: {
|
|
27
|
-
mutationCb: mutationCallBack;
|
|
28
|
-
scrollCb: scrollCallback;
|
|
29
|
-
bypassOptions: BypassOptions;
|
|
30
|
-
mirror: Mirror;
|
|
31
|
-
});
|
|
32
|
-
addShadowRoot(shadowRoot: ShadowRoot, doc: Document): void;
|
|
33
|
-
}
|
|
34
|
-
export {};
|