@sprig-technologies/sprig-browser 2.31.4 → 2.31.6
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/core-CkasK3Wg.js +12 -0
- package/dist/core-D5rViL33.cjs +12 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +600 -1420
- package/dist/core.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +600 -1420
- package/dist/index.js +1 -1
- package/dist/metricsReporter-Bv4AKHDN.cjs +1 -0
- package/dist/metricsReporter-DKI8BwWD.js +1 -0
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +1 -1
- package/dist/{view-BiH5ieN8.cjs → view-BXXr8-Xk.cjs} +5 -5
- package/dist/view-Cabe-ObF.js +685 -0
- package/package.json +1 -1
- package/dist/core-CKpFNc0j.cjs +0 -12
- package/dist/core-GW2LwzDs.js +0 -12
- package/dist/metricsReporter-rnL9hFho.js +0 -2
- package/dist/metricsReporter-uYHd0jkA.cjs +0 -2
- package/dist/view-EbP48pkj.js +0 -685
package/dist/core.d.ts
CHANGED
|
@@ -1,1446 +1,637 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
CDATA
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
type
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
isStyle?: true;
|
|
36
|
-
};
|
|
37
|
-
type cdataNode = {
|
|
38
|
-
type: NodeType.CDATA;
|
|
39
|
-
textContent: '';
|
|
40
|
-
};
|
|
41
|
-
type commentNode = {
|
|
42
|
-
type: NodeType.Comment;
|
|
43
|
-
textContent: string;
|
|
44
|
-
};
|
|
45
|
-
type serializedNode = (documentNode | documentTypeNode | elementNode | textNode | cdataNode | commentNode) & {
|
|
46
|
-
rootId?: number;
|
|
47
|
-
isShadowHost?: boolean;
|
|
48
|
-
isShadow?: boolean;
|
|
49
|
-
};
|
|
50
|
-
type serializedNodeWithId = serializedNode & {
|
|
51
|
-
id: number;
|
|
52
|
-
};
|
|
53
|
-
interface INode extends Node {
|
|
54
|
-
__sn: serializedNodeWithId;
|
|
55
|
-
}
|
|
56
|
-
interface IMirror<TNode> {
|
|
57
|
-
getId(n: TNode | undefined | null): number;
|
|
58
|
-
getNode(id: number): TNode | null;
|
|
59
|
-
getIds(): number[];
|
|
60
|
-
getMeta(n: TNode): serializedNodeWithId | null;
|
|
61
|
-
removeNodeFromMap(n: TNode): void;
|
|
62
|
-
has(id: number): boolean;
|
|
63
|
-
hasNode(node: TNode): boolean;
|
|
64
|
-
add(n: TNode, meta: serializedNodeWithId): void;
|
|
65
|
-
replace(id: number, n: TNode): void;
|
|
66
|
-
reset(): void;
|
|
67
|
-
}
|
|
68
|
-
type MaskInputOptions = Partial<{
|
|
69
|
-
color: boolean;
|
|
70
|
-
date: boolean;
|
|
71
|
-
'datetime-local': boolean;
|
|
72
|
-
email: boolean;
|
|
73
|
-
month: boolean;
|
|
74
|
-
number: boolean;
|
|
75
|
-
range: boolean;
|
|
76
|
-
search: boolean;
|
|
77
|
-
tel: boolean;
|
|
78
|
-
text: boolean;
|
|
79
|
-
time: boolean;
|
|
80
|
-
url: boolean;
|
|
81
|
-
week: boolean;
|
|
82
|
-
textarea: boolean;
|
|
83
|
-
select: boolean;
|
|
84
|
-
password: boolean;
|
|
85
|
-
}>;
|
|
86
|
-
type SlimDOMOptions = Partial<{
|
|
87
|
-
script: boolean;
|
|
88
|
-
comment: boolean;
|
|
89
|
-
headFavicon: boolean;
|
|
90
|
-
headWhitespace: boolean;
|
|
91
|
-
headMetaDescKeywords: boolean;
|
|
92
|
-
headMetaSocial: boolean;
|
|
93
|
-
headMetaRobots: boolean;
|
|
94
|
-
headMetaHttpEquiv: boolean;
|
|
95
|
-
headMetaAuthorship: boolean;
|
|
96
|
-
headMetaVerification: boolean;
|
|
97
|
-
}>;
|
|
98
|
-
type DataURLOptions = Partial<{
|
|
99
|
-
type: string;
|
|
100
|
-
quality: number;
|
|
101
|
-
}>;
|
|
102
|
-
type MaskTextFn = (text: string, element: HTMLElement | null) => string;
|
|
103
|
-
type MaskInputFn = (text: string, element: HTMLElement) => string;
|
|
104
|
-
|
|
105
|
-
declare class Mirror$1 implements IMirror<Node> {
|
|
106
|
-
private idNodeMap;
|
|
107
|
-
private nodeMetaMap;
|
|
108
|
-
getId(n: Node | undefined | null): number;
|
|
109
|
-
getNode(id: number): Node | null;
|
|
110
|
-
getIds(): number[];
|
|
111
|
-
getMeta(n: Node): serializedNodeWithId | null;
|
|
112
|
-
removeNodeFromMap(n: Node): void;
|
|
113
|
-
has(id: number): boolean;
|
|
114
|
-
hasNode(node: Node): boolean;
|
|
115
|
-
add(n: Node, meta: serializedNodeWithId): void;
|
|
116
|
-
replace(id: number, n: Node): void;
|
|
117
|
-
reset(): void;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
declare enum EventType {
|
|
121
|
-
DomContentLoaded = 0,
|
|
122
|
-
Load = 1,
|
|
123
|
-
FullSnapshot = 2,
|
|
124
|
-
IncrementalSnapshot = 3,
|
|
125
|
-
Meta = 4,
|
|
126
|
-
Custom = 5,
|
|
127
|
-
Plugin = 6
|
|
128
|
-
}
|
|
129
|
-
type domContentLoadedEvent = {
|
|
130
|
-
type: EventType.DomContentLoaded;
|
|
131
|
-
data: unknown;
|
|
132
|
-
};
|
|
133
|
-
type loadedEvent = {
|
|
134
|
-
type: EventType.Load;
|
|
135
|
-
data: unknown;
|
|
136
|
-
};
|
|
137
|
-
type fullSnapshotEvent = {
|
|
138
|
-
type: EventType.FullSnapshot;
|
|
139
|
-
data: {
|
|
140
|
-
node: serializedNodeWithId;
|
|
141
|
-
initialOffset: {
|
|
142
|
-
top: number;
|
|
143
|
-
left: number;
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
type incrementalSnapshotEvent = {
|
|
148
|
-
type: EventType.IncrementalSnapshot;
|
|
149
|
-
data: incrementalData;
|
|
150
|
-
};
|
|
151
|
-
type metaEvent = {
|
|
152
|
-
type: EventType.Meta;
|
|
153
|
-
data: {
|
|
154
|
-
href: string;
|
|
155
|
-
width: number;
|
|
156
|
-
height: number;
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
type customEvent<T = unknown> = {
|
|
160
|
-
type: EventType.Custom;
|
|
161
|
-
data: {
|
|
162
|
-
tag: string;
|
|
163
|
-
payload: T;
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
type pluginEvent<T = unknown> = {
|
|
167
|
-
type: EventType.Plugin;
|
|
168
|
-
data: {
|
|
169
|
-
plugin: string;
|
|
170
|
-
payload: T;
|
|
171
|
-
};
|
|
172
|
-
};
|
|
173
|
-
declare enum IncrementalSource {
|
|
174
|
-
Mutation = 0,
|
|
175
|
-
MouseMove = 1,
|
|
176
|
-
MouseInteraction = 2,
|
|
177
|
-
Scroll = 3,
|
|
178
|
-
ViewportResize = 4,
|
|
179
|
-
Input = 5,
|
|
180
|
-
TouchMove = 6,
|
|
181
|
-
MediaInteraction = 7,
|
|
182
|
-
StyleSheetRule = 8,
|
|
183
|
-
CanvasMutation = 9,
|
|
184
|
-
Font = 10,
|
|
185
|
-
Log = 11,
|
|
186
|
-
Drag = 12,
|
|
187
|
-
StyleDeclaration = 13,
|
|
188
|
-
Selection = 14,
|
|
189
|
-
AdoptedStyleSheet = 15,
|
|
190
|
-
CustomElement = 16
|
|
191
|
-
}
|
|
192
|
-
type mutationData = {
|
|
193
|
-
source: IncrementalSource.Mutation;
|
|
194
|
-
} & mutationCallbackParam;
|
|
195
|
-
type mousemoveData = {
|
|
196
|
-
source: IncrementalSource.MouseMove | IncrementalSource.TouchMove | IncrementalSource.Drag;
|
|
197
|
-
positions: mousePosition[];
|
|
198
|
-
};
|
|
199
|
-
type mouseInteractionData = {
|
|
200
|
-
source: IncrementalSource.MouseInteraction;
|
|
201
|
-
} & mouseInteractionParam;
|
|
202
|
-
type scrollData = {
|
|
203
|
-
source: IncrementalSource.Scroll;
|
|
204
|
-
} & scrollPosition;
|
|
205
|
-
type viewportResizeData = {
|
|
206
|
-
source: IncrementalSource.ViewportResize;
|
|
207
|
-
} & viewportResizeDimension;
|
|
208
|
-
type inputData = {
|
|
209
|
-
source: IncrementalSource.Input;
|
|
210
|
-
id: number;
|
|
211
|
-
} & inputValue;
|
|
212
|
-
type mediaInteractionData = {
|
|
213
|
-
source: IncrementalSource.MediaInteraction;
|
|
214
|
-
} & mediaInteractionParam;
|
|
215
|
-
type styleSheetRuleData = {
|
|
216
|
-
source: IncrementalSource.StyleSheetRule;
|
|
217
|
-
} & styleSheetRuleParam;
|
|
218
|
-
type styleDeclarationData = {
|
|
219
|
-
source: IncrementalSource.StyleDeclaration;
|
|
220
|
-
} & styleDeclarationParam;
|
|
221
|
-
type canvasMutationData = {
|
|
222
|
-
source: IncrementalSource.CanvasMutation;
|
|
223
|
-
} & canvasMutationParam;
|
|
224
|
-
type fontData = {
|
|
225
|
-
source: IncrementalSource.Font;
|
|
226
|
-
} & fontParam;
|
|
227
|
-
type selectionData = {
|
|
228
|
-
source: IncrementalSource.Selection;
|
|
229
|
-
} & selectionParam;
|
|
230
|
-
type adoptedStyleSheetData = {
|
|
231
|
-
source: IncrementalSource.AdoptedStyleSheet;
|
|
232
|
-
} & adoptedStyleSheetParam;
|
|
233
|
-
type customElementData = {
|
|
234
|
-
source: IncrementalSource.CustomElement;
|
|
235
|
-
} & customElementParam;
|
|
236
|
-
type incrementalData = mutationData | mousemoveData | mouseInteractionData | scrollData | viewportResizeData | inputData | mediaInteractionData | styleSheetRuleData | canvasMutationData | fontData | selectionData | styleDeclarationData | adoptedStyleSheetData | customElementData;
|
|
237
|
-
type event = domContentLoadedEvent | loadedEvent | fullSnapshotEvent | incrementalSnapshotEvent | metaEvent | customEvent | pluginEvent;
|
|
238
|
-
type eventWithTime = event & {
|
|
239
|
-
timestamp: number;
|
|
240
|
-
delay?: number;
|
|
241
|
-
};
|
|
242
|
-
type canvasEventWithTime = eventWithTime & {
|
|
243
|
-
type: EventType.IncrementalSnapshot;
|
|
244
|
-
data: canvasMutationData;
|
|
245
|
-
};
|
|
246
|
-
type blockClass = string | RegExp;
|
|
247
|
-
type maskTextClass = string | RegExp;
|
|
248
|
-
type SamplingStrategy = Partial<{
|
|
249
|
-
mousemove: boolean | number;
|
|
250
|
-
mousemoveCallback: number;
|
|
251
|
-
mouseInteraction: boolean | Record<string, boolean | undefined>;
|
|
252
|
-
scroll: number;
|
|
253
|
-
media: number;
|
|
254
|
-
input: 'all' | 'last';
|
|
255
|
-
canvas: 'all' | number;
|
|
256
|
-
}>;
|
|
257
|
-
interface ICrossOriginIframeMirror {
|
|
258
|
-
getId(iframe: HTMLIFrameElement, remoteId: number, parentToRemoteMap?: Map<number, number>, remoteToParentMap?: Map<number, number>): number;
|
|
259
|
-
getIds(iframe: HTMLIFrameElement, remoteId: number[]): number[];
|
|
260
|
-
getRemoteId(iframe: HTMLIFrameElement, parentId: number, map?: Map<number, number>): number;
|
|
261
|
-
getRemoteIds(iframe: HTMLIFrameElement, parentId: number[]): number[];
|
|
262
|
-
reset(iframe?: HTMLIFrameElement): void;
|
|
263
|
-
}
|
|
264
|
-
type RecordPlugin<TOptions = unknown> = {
|
|
265
|
-
name: string;
|
|
266
|
-
observer?: (cb: (...args: Array<unknown>) => void, win: IWindow, options: TOptions) => listenerHandler;
|
|
267
|
-
eventProcessor?: <TExtend>(event: eventWithTime) => eventWithTime & TExtend;
|
|
268
|
-
getMirror?: (mirrors: {
|
|
269
|
-
nodeMirror: Mirror$1;
|
|
270
|
-
crossOriginIframeMirror: ICrossOriginIframeMirror;
|
|
271
|
-
crossOriginIframeStyleMirror: ICrossOriginIframeMirror;
|
|
272
|
-
}) => void;
|
|
273
|
-
options: TOptions;
|
|
274
|
-
};
|
|
275
|
-
type hooksParam = {
|
|
276
|
-
mutation?: mutationCallBack;
|
|
277
|
-
mousemove?: mousemoveCallBack;
|
|
278
|
-
mouseInteraction?: mouseInteractionCallBack;
|
|
279
|
-
scroll?: scrollCallback;
|
|
280
|
-
viewportResize?: viewportResizeCallback;
|
|
281
|
-
input?: inputCallback;
|
|
282
|
-
mediaInteaction?: mediaInteractionCallback;
|
|
283
|
-
styleSheetRule?: styleSheetRuleCallback;
|
|
284
|
-
styleDeclaration?: styleDeclarationCallback;
|
|
285
|
-
canvasMutation?: canvasMutationCallback;
|
|
286
|
-
font?: fontCallback;
|
|
287
|
-
selection?: selectionCallback;
|
|
288
|
-
customElement?: customElementCallback;
|
|
289
|
-
};
|
|
290
|
-
type textMutation = {
|
|
291
|
-
id: number;
|
|
292
|
-
value: string | null;
|
|
293
|
-
};
|
|
294
|
-
type styleOMValue = {
|
|
295
|
-
[key: string]: styleValueWithPriority | string | false;
|
|
296
|
-
};
|
|
297
|
-
type styleValueWithPriority = [string, string];
|
|
298
|
-
type attributeMutation = {
|
|
299
|
-
id: number;
|
|
300
|
-
attributes: {
|
|
301
|
-
[key: string]: string | styleOMValue | null;
|
|
302
|
-
};
|
|
303
|
-
};
|
|
304
|
-
type removedNodeMutation = {
|
|
305
|
-
parentId: number;
|
|
306
|
-
id: number;
|
|
307
|
-
isShadow?: boolean;
|
|
308
|
-
};
|
|
309
|
-
type addedNodeMutation = {
|
|
310
|
-
parentId: number;
|
|
311
|
-
previousId?: number | null;
|
|
312
|
-
nextId: number | null;
|
|
313
|
-
node: serializedNodeWithId;
|
|
314
|
-
};
|
|
315
|
-
type mutationCallbackParam = {
|
|
316
|
-
texts: textMutation[];
|
|
317
|
-
attributes: attributeMutation[];
|
|
318
|
-
removes: removedNodeMutation[];
|
|
319
|
-
adds: addedNodeMutation[];
|
|
320
|
-
isAttachIframe?: true;
|
|
321
|
-
};
|
|
322
|
-
type mutationCallBack = (m: mutationCallbackParam) => void;
|
|
323
|
-
type mousemoveCallBack = (p: mousePosition[], source: IncrementalSource.MouseMove | IncrementalSource.TouchMove | IncrementalSource.Drag) => void;
|
|
324
|
-
type mousePosition = {
|
|
325
|
-
x: number;
|
|
326
|
-
y: number;
|
|
327
|
-
id: number;
|
|
328
|
-
timeOffset: number;
|
|
329
|
-
};
|
|
330
|
-
declare enum MouseInteractions {
|
|
331
|
-
MouseUp = 0,
|
|
332
|
-
MouseDown = 1,
|
|
333
|
-
Click = 2,
|
|
334
|
-
ContextMenu = 3,
|
|
335
|
-
DblClick = 4,
|
|
336
|
-
Focus = 5,
|
|
337
|
-
Blur = 6,
|
|
338
|
-
TouchStart = 7,
|
|
339
|
-
TouchMove_Departed = 8,
|
|
340
|
-
TouchEnd = 9,
|
|
341
|
-
TouchCancel = 10
|
|
342
|
-
}
|
|
343
|
-
declare enum PointerTypes {
|
|
344
|
-
Mouse = 0,
|
|
345
|
-
Pen = 1,
|
|
346
|
-
Touch = 2
|
|
347
|
-
}
|
|
348
|
-
declare enum CanvasContext {
|
|
349
|
-
'2D' = 0,
|
|
350
|
-
WebGL = 1,
|
|
351
|
-
WebGL2 = 2
|
|
352
|
-
}
|
|
353
|
-
type mouseInteractionParam = {
|
|
354
|
-
type: MouseInteractions;
|
|
355
|
-
id: number;
|
|
356
|
-
x?: number;
|
|
357
|
-
y?: number;
|
|
358
|
-
pointerType?: PointerTypes;
|
|
359
|
-
};
|
|
360
|
-
type mouseInteractionCallBack = (d: mouseInteractionParam) => void;
|
|
361
|
-
type scrollPosition = {
|
|
362
|
-
id: number;
|
|
363
|
-
x: number;
|
|
364
|
-
y: number;
|
|
365
|
-
};
|
|
366
|
-
type scrollCallback = (p: scrollPosition) => void;
|
|
367
|
-
type styleSheetAddRule = {
|
|
368
|
-
rule: string;
|
|
369
|
-
index?: number | number[];
|
|
370
|
-
};
|
|
371
|
-
type styleSheetDeleteRule = {
|
|
372
|
-
index: number | number[];
|
|
373
|
-
};
|
|
374
|
-
type styleSheetRuleParam = {
|
|
375
|
-
id?: number;
|
|
376
|
-
styleId?: number;
|
|
377
|
-
removes?: styleSheetDeleteRule[];
|
|
378
|
-
adds?: styleSheetAddRule[];
|
|
379
|
-
replace?: string;
|
|
380
|
-
replaceSync?: string;
|
|
381
|
-
};
|
|
382
|
-
type styleSheetRuleCallback = (s: styleSheetRuleParam) => void;
|
|
383
|
-
type adoptedStyleSheetParam = {
|
|
384
|
-
id: number;
|
|
385
|
-
styles?: {
|
|
386
|
-
styleId: number;
|
|
387
|
-
rules: styleSheetAddRule[];
|
|
388
|
-
}[];
|
|
389
|
-
styleIds: number[];
|
|
390
|
-
};
|
|
391
|
-
type styleDeclarationParam = {
|
|
392
|
-
id?: number;
|
|
393
|
-
styleId?: number;
|
|
394
|
-
index: number[];
|
|
395
|
-
set?: {
|
|
396
|
-
property: string;
|
|
397
|
-
value: string | null;
|
|
398
|
-
priority: string | undefined;
|
|
399
|
-
};
|
|
400
|
-
remove?: {
|
|
401
|
-
property: string;
|
|
402
|
-
};
|
|
403
|
-
};
|
|
404
|
-
type styleDeclarationCallback = (s: styleDeclarationParam) => void;
|
|
405
|
-
type canvasMutationCommand = {
|
|
406
|
-
property: string;
|
|
407
|
-
args: Array<unknown>;
|
|
408
|
-
setter?: true;
|
|
409
|
-
};
|
|
410
|
-
type canvasMutationParam = {
|
|
411
|
-
id: number;
|
|
412
|
-
type: CanvasContext;
|
|
413
|
-
commands: canvasMutationCommand[];
|
|
414
|
-
} | ({
|
|
415
|
-
id: number;
|
|
416
|
-
type: CanvasContext;
|
|
417
|
-
} & canvasMutationCommand);
|
|
418
|
-
type canvasMutationCallback = (p: canvasMutationParam) => void;
|
|
419
|
-
type fontParam = {
|
|
420
|
-
family: string;
|
|
421
|
-
fontSource: string;
|
|
422
|
-
buffer: boolean;
|
|
423
|
-
descriptors?: FontFaceDescriptors;
|
|
424
|
-
};
|
|
425
|
-
type fontCallback = (p: fontParam) => void;
|
|
426
|
-
type viewportResizeDimension = {
|
|
427
|
-
width: number;
|
|
428
|
-
height: number;
|
|
429
|
-
};
|
|
430
|
-
type viewportResizeCallback = (d: viewportResizeDimension) => void;
|
|
431
|
-
type inputValue = {
|
|
432
|
-
text: string;
|
|
433
|
-
isChecked: boolean;
|
|
434
|
-
userTriggered?: boolean;
|
|
435
|
-
};
|
|
436
|
-
type inputCallback = (v: inputValue & {
|
|
437
|
-
id: number;
|
|
438
|
-
}) => void;
|
|
439
|
-
declare const enum MediaInteractions {
|
|
440
|
-
Play = 0,
|
|
441
|
-
Pause = 1,
|
|
442
|
-
Seeked = 2,
|
|
443
|
-
VolumeChange = 3,
|
|
444
|
-
RateChange = 4
|
|
445
|
-
}
|
|
446
|
-
type mediaInteractionParam = {
|
|
447
|
-
type: MediaInteractions;
|
|
448
|
-
id: number;
|
|
449
|
-
currentTime?: number;
|
|
450
|
-
volume?: number;
|
|
451
|
-
muted?: boolean;
|
|
452
|
-
loop?: boolean;
|
|
453
|
-
playbackRate?: number;
|
|
454
|
-
};
|
|
455
|
-
type mediaInteractionCallback = (p: mediaInteractionParam) => void;
|
|
456
|
-
type DocumentDimension = {
|
|
457
|
-
x: number;
|
|
458
|
-
y: number;
|
|
459
|
-
relativeScale: number;
|
|
460
|
-
absoluteScale: number;
|
|
461
|
-
};
|
|
462
|
-
type SelectionRange = {
|
|
463
|
-
start: number;
|
|
464
|
-
startOffset: number;
|
|
465
|
-
end: number;
|
|
466
|
-
endOffset: number;
|
|
467
|
-
};
|
|
468
|
-
type selectionParam = {
|
|
469
|
-
ranges: Array<SelectionRange>;
|
|
470
|
-
};
|
|
471
|
-
type selectionCallback = (p: selectionParam) => void;
|
|
472
|
-
type customElementParam = {
|
|
473
|
-
define?: {
|
|
474
|
-
name: string;
|
|
475
|
-
};
|
|
476
|
-
};
|
|
477
|
-
type customElementCallback = (c: customElementParam) => void;
|
|
478
|
-
type DeprecatedMirror = {
|
|
479
|
-
map: {
|
|
480
|
-
[key: number]: INode;
|
|
481
|
-
};
|
|
482
|
-
getId: (n: Node) => number;
|
|
483
|
-
getNode: (id: number) => INode | null;
|
|
484
|
-
removeNodeFromMap: (n: Node) => void;
|
|
485
|
-
has: (id: number) => boolean;
|
|
486
|
-
reset: () => void;
|
|
487
|
-
};
|
|
488
|
-
type throttleOptions = {
|
|
489
|
-
leading?: boolean;
|
|
490
|
-
trailing?: boolean;
|
|
491
|
-
};
|
|
492
|
-
type listenerHandler = () => void;
|
|
493
|
-
type hookResetter = () => void;
|
|
494
|
-
type playerMetaData = {
|
|
495
|
-
startTime: number;
|
|
496
|
-
endTime: number;
|
|
497
|
-
totalTime: number;
|
|
498
|
-
};
|
|
499
|
-
type actionWithDelay = {
|
|
500
|
-
doAction: () => void;
|
|
501
|
-
delay: number;
|
|
502
|
-
};
|
|
503
|
-
type Handler = (event?: unknown) => void;
|
|
504
|
-
type Emitter$1 = {
|
|
505
|
-
on(type: string, handler: Handler): void;
|
|
506
|
-
emit(type: string, event?: unknown): void;
|
|
507
|
-
off(type: string, handler: Handler): void;
|
|
508
|
-
};
|
|
509
|
-
declare enum ReplayerEvents {
|
|
510
|
-
Start = "start",
|
|
511
|
-
Pause = "pause",
|
|
512
|
-
Resume = "resume",
|
|
513
|
-
Resize = "resize",
|
|
514
|
-
Finish = "finish",
|
|
515
|
-
FullsnapshotRebuilded = "fullsnapshot-rebuilded",
|
|
516
|
-
LoadStylesheetStart = "load-stylesheet-start",
|
|
517
|
-
LoadStylesheetEnd = "load-stylesheet-end",
|
|
518
|
-
SkipStart = "skip-start",
|
|
519
|
-
SkipEnd = "skip-end",
|
|
520
|
-
MouseInteraction = "mouse-interaction",
|
|
521
|
-
EventCast = "event-cast",
|
|
522
|
-
CustomEvent = "custom-event",
|
|
523
|
-
Flush = "flush",
|
|
524
|
-
StateChange = "state-change",
|
|
525
|
-
PlayBack = "play-back",
|
|
526
|
-
Destroy = "destroy"
|
|
527
|
-
}
|
|
528
|
-
type KeepIframeSrcFn = (src: string) => boolean;
|
|
529
|
-
declare global {
|
|
530
|
-
interface Window {
|
|
531
|
-
FontFace: typeof FontFace;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
type IWindow = Window & typeof globalThis;
|
|
535
|
-
|
|
536
|
-
type PackFn = (event: eventWithTime) => string;
|
|
537
|
-
type UnpackFn = (raw: string) => eventWithTime;
|
|
538
|
-
|
|
539
|
-
interface IRRNode {
|
|
540
|
-
parentElement: IRRNode | null;
|
|
541
|
-
parentNode: IRRNode | null;
|
|
542
|
-
ownerDocument: IRRDocument;
|
|
543
|
-
readonly childNodes: IRRNode[];
|
|
544
|
-
readonly ELEMENT_NODE: number;
|
|
545
|
-
readonly TEXT_NODE: number;
|
|
546
|
-
readonly nodeType: number;
|
|
547
|
-
readonly nodeName: string;
|
|
548
|
-
readonly RRNodeType: NodeType;
|
|
549
|
-
firstChild: IRRNode | null;
|
|
550
|
-
lastChild: IRRNode | null;
|
|
551
|
-
previousSibling: IRRNode | null;
|
|
552
|
-
nextSibling: IRRNode | null;
|
|
553
|
-
textContent: string | null;
|
|
554
|
-
contains(node: IRRNode): boolean;
|
|
555
|
-
appendChild(newChild: IRRNode): IRRNode;
|
|
556
|
-
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
557
|
-
removeChild(node: IRRNode): IRRNode;
|
|
558
|
-
toString(): string;
|
|
559
|
-
}
|
|
560
|
-
interface IRRDocument extends IRRNode {
|
|
561
|
-
documentElement: IRRElement | null;
|
|
562
|
-
body: IRRElement | null;
|
|
563
|
-
head: IRRElement | null;
|
|
564
|
-
implementation: IRRDocument;
|
|
565
|
-
firstElementChild: IRRElement | null;
|
|
566
|
-
readonly nodeName: '#document';
|
|
567
|
-
compatMode: 'BackCompat' | 'CSS1Compat';
|
|
568
|
-
createDocument(_namespace: string | null, _qualifiedName: string | null, _doctype?: DocumentType | null): IRRDocument;
|
|
569
|
-
createDocumentType(qualifiedName: string, publicId: string, systemId: string): IRRDocumentType;
|
|
570
|
-
createElement(tagName: string): IRRElement;
|
|
571
|
-
createElementNS(_namespaceURI: string, qualifiedName: string): IRRElement;
|
|
572
|
-
createTextNode(data: string): IRRText;
|
|
573
|
-
createComment(data: string): IRRComment;
|
|
574
|
-
createCDATASection(data: string): IRRCDATASection;
|
|
575
|
-
open(): void;
|
|
576
|
-
close(): void;
|
|
577
|
-
write(content: string): void;
|
|
578
|
-
}
|
|
579
|
-
interface IRRElement extends IRRNode {
|
|
1
|
+
declare type attributes = {
|
|
2
|
+
[key: string]: string | number | true | null;
|
|
3
|
+
};
|
|
4
|
+
|
|
5
|
+
declare type cdataNode = {
|
|
6
|
+
type: NodeType.CDATA;
|
|
7
|
+
textContent: '';
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
declare type commentNode = {
|
|
11
|
+
type: NodeType.Comment;
|
|
12
|
+
textContent: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
declare type DataURLOptions = Partial<{
|
|
16
|
+
type: string;
|
|
17
|
+
quality: number;
|
|
18
|
+
}>;
|
|
19
|
+
|
|
20
|
+
declare type documentNode = {
|
|
21
|
+
type: NodeType.Document;
|
|
22
|
+
childNodes: serializedNodeWithId[];
|
|
23
|
+
compatMode?: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
declare type documentTypeNode = {
|
|
27
|
+
type: NodeType.DocumentType;
|
|
28
|
+
name: string;
|
|
29
|
+
publicId: string;
|
|
30
|
+
systemId: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
declare type elementNode = {
|
|
34
|
+
type: NodeType.Element;
|
|
580
35
|
tagName: string;
|
|
581
|
-
attributes:
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
readonly systemId: string;
|
|
600
|
-
}
|
|
601
|
-
interface IRRText extends IRRNode {
|
|
602
|
-
readonly nodeName: '#text';
|
|
603
|
-
data: string;
|
|
604
|
-
}
|
|
605
|
-
interface IRRComment extends IRRNode {
|
|
606
|
-
readonly nodeName: '#comment';
|
|
607
|
-
data: string;
|
|
608
|
-
}
|
|
609
|
-
interface IRRCDATASection extends IRRNode {
|
|
610
|
-
readonly nodeName: '#cdata-section';
|
|
611
|
-
data: string;
|
|
36
|
+
attributes: attributes;
|
|
37
|
+
childNodes: serializedNodeWithId[];
|
|
38
|
+
isSVG?: true;
|
|
39
|
+
needBlock?: boolean;
|
|
40
|
+
isCustom?: true;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
declare interface IMirror<TNode> {
|
|
44
|
+
getId(n: TNode | undefined | null): number;
|
|
45
|
+
getNode(id: number): TNode | null;
|
|
46
|
+
getIds(): number[];
|
|
47
|
+
getMeta(n: TNode): serializedNodeWithId | null;
|
|
48
|
+
removeNodeFromMap(n: TNode): void;
|
|
49
|
+
has(id: number): boolean;
|
|
50
|
+
hasNode(node: TNode): boolean;
|
|
51
|
+
add(n: TNode, meta: serializedNodeWithId): void;
|
|
52
|
+
replace(id: number, n: TNode): void;
|
|
53
|
+
reset(): void;
|
|
612
54
|
}
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
55
|
+
|
|
56
|
+
declare type MaskInputFn = (text: string, element: HTMLElement) => string;
|
|
57
|
+
|
|
58
|
+
declare type MaskInputOptions = Partial<{
|
|
59
|
+
color: boolean;
|
|
60
|
+
date: boolean;
|
|
61
|
+
'datetime-local': boolean;
|
|
62
|
+
email: boolean;
|
|
63
|
+
month: boolean;
|
|
64
|
+
number: boolean;
|
|
65
|
+
range: boolean;
|
|
66
|
+
search: boolean;
|
|
67
|
+
tel: boolean;
|
|
68
|
+
text: boolean;
|
|
69
|
+
time: boolean;
|
|
70
|
+
url: boolean;
|
|
71
|
+
week: boolean;
|
|
72
|
+
textarea: boolean;
|
|
73
|
+
select: boolean;
|
|
74
|
+
password: boolean;
|
|
75
|
+
}>;
|
|
76
|
+
|
|
77
|
+
declare type MaskTextFn = (text: string, element: HTMLElement | null) => string;
|
|
78
|
+
|
|
79
|
+
declare class Mirror implements IMirror<Node> {
|
|
80
|
+
private idNodeMap;
|
|
81
|
+
private nodeMetaMap;
|
|
82
|
+
getId(n: Node | undefined | null): number;
|
|
83
|
+
getNode(id: number): Node | null;
|
|
84
|
+
getIds(): number[];
|
|
85
|
+
getMeta(n: Node): serializedNodeWithId | null;
|
|
86
|
+
removeNodeFromMap(n: Node): void;
|
|
87
|
+
has(id: number): boolean;
|
|
88
|
+
hasNode(node: Node): boolean;
|
|
89
|
+
add(n: Node, meta: serializedNodeWithId): void;
|
|
90
|
+
replace(id: number, n: Node): void;
|
|
91
|
+
reset(): void;
|
|
634
92
|
}
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
93
|
+
|
|
94
|
+
declare enum NodeType {
|
|
95
|
+
Document = 0,
|
|
96
|
+
DocumentType = 1,
|
|
97
|
+
Element = 2,
|
|
98
|
+
Text = 3,
|
|
99
|
+
CDATA = 4,
|
|
100
|
+
Comment = 5
|
|
641
101
|
}
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
102
|
+
|
|
103
|
+
declare type serializedNode = (documentNode | documentTypeNode | elementNode | textNode | cdataNode | commentNode) & {
|
|
104
|
+
rootId?: number;
|
|
105
|
+
isShadowHost?: boolean;
|
|
106
|
+
isShadow?: boolean;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
declare type serializedNodeWithId = serializedNode & {
|
|
110
|
+
id: number;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
declare type SlimDOMOptions = Partial<{
|
|
114
|
+
script: boolean;
|
|
115
|
+
comment: boolean;
|
|
116
|
+
headFavicon: boolean;
|
|
117
|
+
headWhitespace: boolean;
|
|
118
|
+
headMetaDescKeywords: boolean;
|
|
119
|
+
headMetaSocial: boolean;
|
|
120
|
+
headMetaRobots: boolean;
|
|
121
|
+
headMetaHttpEquiv: boolean;
|
|
122
|
+
headMetaAuthorship: boolean;
|
|
123
|
+
headMetaVerification: boolean;
|
|
124
|
+
headTitleMutations: boolean;
|
|
125
|
+
}>;
|
|
126
|
+
|
|
127
|
+
declare type textNode = {
|
|
128
|
+
type: NodeType.Text;
|
|
129
|
+
textContent: string;
|
|
130
|
+
isStyle?: true;
|
|
645
131
|
};
|
|
646
132
|
|
|
647
|
-
declare
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
toString(): string;
|
|
672
|
-
parentElement: IRRNode | null;
|
|
673
|
-
parentNode: IRRNode | null;
|
|
674
|
-
ownerDocument: IRRDocument;
|
|
675
|
-
readonly childNodes: IRRNode[];
|
|
676
|
-
readonly ELEMENT_NODE: number;
|
|
677
|
-
readonly TEXT_NODE: number;
|
|
678
|
-
firstChild: IRRNode | null;
|
|
679
|
-
lastChild: IRRNode | null;
|
|
680
|
-
previousSibling: IRRNode | null;
|
|
681
|
-
nextSibling: IRRNode | null;
|
|
682
|
-
textContent: string | null;
|
|
683
|
-
contains(node: IRRNode): boolean;
|
|
133
|
+
declare type addedNodeMutation = {
|
|
134
|
+
parentId: number;
|
|
135
|
+
previousId?: number | null;
|
|
136
|
+
nextId: number | null;
|
|
137
|
+
node: serializedNodeWithId;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
declare type adoptedStyleSheetData = {
|
|
141
|
+
source: IncrementalSource.AdoptedStyleSheet;
|
|
142
|
+
} & adoptedStyleSheetParam;
|
|
143
|
+
|
|
144
|
+
declare type adoptedStyleSheetParam = {
|
|
145
|
+
id: number;
|
|
146
|
+
styles?: {
|
|
147
|
+
styleId: number;
|
|
148
|
+
rules: styleSheetAddRule[];
|
|
149
|
+
}[];
|
|
150
|
+
styleIds: number[];
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
declare type attributeMutation = {
|
|
154
|
+
id: number;
|
|
155
|
+
attributes: {
|
|
156
|
+
[key: string]: string | styleOMValue | null;
|
|
684
157
|
};
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
createDocument(_namespace: string | null, _qualifiedName: string | null, _doctype?: DocumentType | null): RRDocument;
|
|
694
|
-
createDocumentType(qualifiedName: string, publicId: string, systemId: string): {
|
|
695
|
-
readonly nodeType: number;
|
|
696
|
-
readonly RRNodeType: NodeType.DocumentType;
|
|
697
|
-
readonly nodeName: string;
|
|
698
|
-
readonly name: string;
|
|
699
|
-
readonly publicId: string;
|
|
700
|
-
readonly systemId: string;
|
|
701
|
-
toString(): string;
|
|
702
|
-
parentElement: IRRNode | null;
|
|
703
|
-
parentNode: IRRNode | null;
|
|
704
|
-
ownerDocument: IRRDocument;
|
|
705
|
-
readonly childNodes: IRRNode[];
|
|
706
|
-
readonly ELEMENT_NODE: number;
|
|
707
|
-
readonly TEXT_NODE: number;
|
|
708
|
-
firstChild: IRRNode | null;
|
|
709
|
-
lastChild: IRRNode | null;
|
|
710
|
-
previousSibling: IRRNode | null;
|
|
711
|
-
nextSibling: IRRNode | null;
|
|
712
|
-
textContent: string | null;
|
|
713
|
-
contains(node: IRRNode): boolean;
|
|
714
|
-
appendChild(newChild: IRRNode): IRRNode;
|
|
715
|
-
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
716
|
-
removeChild(node: IRRNode): IRRNode;
|
|
717
|
-
} & BaseRRNode;
|
|
718
|
-
createElement<K extends keyof HTMLElementTagNameMap>(tagName: K): RRElementType<K>;
|
|
719
|
-
createElement(tagName: string): RRElement;
|
|
720
|
-
createComment(data: string): {
|
|
721
|
-
readonly nodeType: number;
|
|
722
|
-
readonly nodeName: "#comment";
|
|
723
|
-
readonly RRNodeType: NodeType.Comment;
|
|
724
|
-
data: string;
|
|
725
|
-
textContent: string;
|
|
726
|
-
toString(): string;
|
|
727
|
-
parentElement: IRRNode | null;
|
|
728
|
-
parentNode: IRRNode | null;
|
|
729
|
-
ownerDocument: IRRDocument;
|
|
730
|
-
readonly childNodes: IRRNode[];
|
|
731
|
-
readonly ELEMENT_NODE: number;
|
|
732
|
-
readonly TEXT_NODE: number;
|
|
733
|
-
firstChild: IRRNode | null;
|
|
734
|
-
lastChild: IRRNode | null;
|
|
735
|
-
previousSibling: IRRNode | null;
|
|
736
|
-
nextSibling: IRRNode | null;
|
|
737
|
-
contains(node: IRRNode): boolean;
|
|
738
|
-
appendChild(newChild: IRRNode): IRRNode;
|
|
739
|
-
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
740
|
-
removeChild(node: IRRNode): IRRNode;
|
|
741
|
-
} & BaseRRNode;
|
|
742
|
-
createCDATASection(data: string): {
|
|
743
|
-
readonly nodeName: "#cdata-section";
|
|
744
|
-
readonly nodeType: number;
|
|
745
|
-
readonly RRNodeType: NodeType.CDATA;
|
|
746
|
-
data: string;
|
|
747
|
-
textContent: string;
|
|
748
|
-
toString(): string;
|
|
749
|
-
parentElement: IRRNode | null;
|
|
750
|
-
parentNode: IRRNode | null;
|
|
751
|
-
ownerDocument: IRRDocument;
|
|
752
|
-
readonly childNodes: IRRNode[];
|
|
753
|
-
readonly ELEMENT_NODE: number;
|
|
754
|
-
readonly TEXT_NODE: number;
|
|
755
|
-
firstChild: IRRNode | null;
|
|
756
|
-
lastChild: IRRNode | null;
|
|
757
|
-
previousSibling: IRRNode | null;
|
|
758
|
-
nextSibling: IRRNode | null;
|
|
759
|
-
contains(node: IRRNode): boolean;
|
|
760
|
-
appendChild(newChild: IRRNode): IRRNode;
|
|
761
|
-
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
762
|
-
removeChild(node: IRRNode): IRRNode;
|
|
763
|
-
} & BaseRRNode;
|
|
764
|
-
createTextNode(data: string): {
|
|
765
|
-
readonly nodeType: number;
|
|
766
|
-
readonly nodeName: "#text";
|
|
767
|
-
readonly RRNodeType: NodeType.Text;
|
|
768
|
-
data: string;
|
|
769
|
-
textContent: string;
|
|
770
|
-
toString(): string;
|
|
771
|
-
parentElement: IRRNode | null;
|
|
772
|
-
parentNode: IRRNode | null;
|
|
773
|
-
ownerDocument: IRRDocument;
|
|
774
|
-
readonly childNodes: IRRNode[];
|
|
775
|
-
readonly ELEMENT_NODE: number;
|
|
776
|
-
readonly TEXT_NODE: number;
|
|
777
|
-
firstChild: IRRNode | null;
|
|
778
|
-
lastChild: IRRNode | null;
|
|
779
|
-
previousSibling: IRRNode | null;
|
|
780
|
-
nextSibling: IRRNode | null;
|
|
781
|
-
contains(node: IRRNode): boolean;
|
|
782
|
-
appendChild(newChild: IRRNode): IRRNode;
|
|
783
|
-
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
784
|
-
removeChild(node: IRRNode): IRRNode;
|
|
785
|
-
} & BaseRRNode;
|
|
786
|
-
destroyTree(): void;
|
|
787
|
-
open(): void;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
declare type blockClass = string | RegExp;
|
|
161
|
+
|
|
162
|
+
declare enum CanvasContext {
|
|
163
|
+
'2D' = 0,
|
|
164
|
+
WebGL = 1,
|
|
165
|
+
WebGL2 = 2
|
|
788
166
|
}
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
firstChild: IRRNode | null;
|
|
821
|
-
lastChild: IRRNode | null;
|
|
822
|
-
previousSibling: IRRNode | null;
|
|
823
|
-
nextSibling: IRRNode | null;
|
|
824
|
-
contains(node: IRRNode): boolean;
|
|
167
|
+
|
|
168
|
+
declare type canvasMutationCallback = (p: canvasMutationParam) => void;
|
|
169
|
+
|
|
170
|
+
declare type canvasMutationCommand = {
|
|
171
|
+
property: string;
|
|
172
|
+
args: Array<unknown>;
|
|
173
|
+
setter?: true;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
declare type canvasMutationData = {
|
|
177
|
+
source: IncrementalSource.CanvasMutation;
|
|
178
|
+
} & canvasMutationParam;
|
|
179
|
+
|
|
180
|
+
declare type canvasMutationParam = {
|
|
181
|
+
id: number;
|
|
182
|
+
type: CanvasContext;
|
|
183
|
+
commands: canvasMutationCommand[];
|
|
184
|
+
} | ({
|
|
185
|
+
id: number;
|
|
186
|
+
type: CanvasContext;
|
|
187
|
+
} & canvasMutationCommand);
|
|
188
|
+
|
|
189
|
+
declare type customElementCallback = (c: customElementParam) => void;
|
|
190
|
+
|
|
191
|
+
declare type customElementData = {
|
|
192
|
+
source: IncrementalSource.CustomElement;
|
|
193
|
+
} & customElementParam;
|
|
194
|
+
|
|
195
|
+
declare type customElementParam = {
|
|
196
|
+
define?: {
|
|
197
|
+
name: string;
|
|
825
198
|
};
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
currentTime?: number | undefined;
|
|
834
|
-
volume?: number | undefined;
|
|
835
|
-
paused?: boolean | undefined;
|
|
836
|
-
muted?: boolean | undefined;
|
|
837
|
-
playbackRate?: number | undefined;
|
|
838
|
-
loop?: boolean | undefined;
|
|
839
|
-
attachShadow(_init: ShadowRootInit): IRRElement;
|
|
840
|
-
play(): void;
|
|
841
|
-
pause(): void;
|
|
842
|
-
tagName: string;
|
|
843
|
-
attributes: Record<string, string>;
|
|
844
|
-
shadowRoot: IRRElement | null;
|
|
845
|
-
scrollLeft?: number | undefined;
|
|
846
|
-
scrollTop?: number | undefined;
|
|
847
|
-
id: string;
|
|
848
|
-
className: string;
|
|
849
|
-
classList: ClassList;
|
|
850
|
-
style: CSSStyleDeclaration;
|
|
851
|
-
getAttribute(name: string): string | null;
|
|
852
|
-
setAttribute(name: string, attribute: string): void;
|
|
853
|
-
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
854
|
-
removeAttribute(name: string): void;
|
|
855
|
-
dispatchEvent(event: Event): boolean;
|
|
856
|
-
parentElement: IRRNode | null;
|
|
857
|
-
parentNode: IRRNode | null;
|
|
858
|
-
ownerDocument: IRRDocument;
|
|
859
|
-
readonly childNodes: IRRNode[];
|
|
860
|
-
readonly ELEMENT_NODE: number;
|
|
861
|
-
readonly TEXT_NODE: number;
|
|
862
|
-
readonly nodeType: number;
|
|
863
|
-
readonly nodeName: string;
|
|
864
|
-
readonly RRNodeType: NodeType;
|
|
865
|
-
firstChild: IRRNode | null;
|
|
866
|
-
lastChild: IRRNode | null;
|
|
867
|
-
previousSibling: IRRNode | null;
|
|
868
|
-
nextSibling: IRRNode | null;
|
|
869
|
-
textContent: string | null;
|
|
870
|
-
contains(node: IRRNode): boolean;
|
|
871
|
-
appendChild(newChild: IRRNode): IRRNode;
|
|
872
|
-
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
873
|
-
removeChild(node: IRRNode): IRRNode;
|
|
874
|
-
toString(): string;
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
declare type customEvent<T = unknown> = {
|
|
202
|
+
type: EventType.Custom;
|
|
203
|
+
data: {
|
|
204
|
+
tag: string;
|
|
205
|
+
payload: T;
|
|
875
206
|
};
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
declare type domContentLoadedEvent = {
|
|
210
|
+
type: EventType.DomContentLoaded;
|
|
211
|
+
data: unknown;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
declare enum EventType {
|
|
215
|
+
DomContentLoaded = 0,
|
|
216
|
+
Load = 1,
|
|
217
|
+
FullSnapshot = 2,
|
|
218
|
+
IncrementalSnapshot = 3,
|
|
219
|
+
Meta = 4,
|
|
220
|
+
Custom = 5,
|
|
221
|
+
Plugin = 6
|
|
886
222
|
}
|
|
887
|
-
|
|
888
|
-
|
|
223
|
+
|
|
224
|
+
declare type eventWithoutTime = domContentLoadedEvent | loadedEvent | fullSnapshotEvent | incrementalSnapshotEvent | metaEvent | customEvent | pluginEvent;
|
|
225
|
+
|
|
226
|
+
declare type eventWithTime = eventWithoutTime & {
|
|
227
|
+
timestamp: number;
|
|
228
|
+
delay?: number;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
declare type fontCallback = (p: fontParam) => void;
|
|
232
|
+
|
|
233
|
+
declare type fontData = {
|
|
234
|
+
source: IncrementalSource.Font;
|
|
235
|
+
} & fontParam;
|
|
236
|
+
|
|
237
|
+
declare type fontParam = {
|
|
238
|
+
family: string;
|
|
239
|
+
fontSource: string;
|
|
240
|
+
buffer: boolean;
|
|
241
|
+
descriptors?: FontFaceDescriptors;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
declare type fullSnapshotEvent = {
|
|
245
|
+
type: EventType.FullSnapshot;
|
|
246
|
+
data: {
|
|
247
|
+
node: serializedNodeWithId;
|
|
248
|
+
initialOffset: {
|
|
249
|
+
top: number;
|
|
250
|
+
left: number;
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
declare type hooksParam = {
|
|
256
|
+
mutation?: mutationCallBack;
|
|
257
|
+
mousemove?: mousemoveCallBack;
|
|
258
|
+
mouseInteraction?: mouseInteractionCallBack;
|
|
259
|
+
scroll?: scrollCallback;
|
|
260
|
+
viewportResize?: viewportResizeCallback;
|
|
261
|
+
input?: inputCallback;
|
|
262
|
+
mediaInteaction?: mediaInteractionCallback;
|
|
263
|
+
styleSheetRule?: styleSheetRuleCallback;
|
|
264
|
+
styleDeclaration?: styleDeclarationCallback;
|
|
265
|
+
canvasMutation?: canvasMutationCallback;
|
|
266
|
+
font?: fontCallback;
|
|
267
|
+
selection?: selectionCallback;
|
|
268
|
+
customElement?: customElementCallback;
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
declare interface ICrossOriginIframeMirror {
|
|
272
|
+
getId(iframe: HTMLIFrameElement, remoteId: number, parentToRemoteMap?: Map<number, number>, remoteToParentMap?: Map<number, number>): number;
|
|
273
|
+
getIds(iframe: HTMLIFrameElement, remoteId: number[]): number[];
|
|
274
|
+
getRemoteId(iframe: HTMLIFrameElement, parentId: number, map?: Map<number, number>): number;
|
|
275
|
+
getRemoteIds(iframe: HTMLIFrameElement, parentId: number[]): number[];
|
|
276
|
+
reset(iframe?: HTMLIFrameElement): void;
|
|
889
277
|
}
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
278
|
+
|
|
279
|
+
declare type incrementalData = mutationData | mousemoveData | mouseInteractionData | scrollData | viewportResizeData | inputData | mediaInteractionData | styleSheetRuleData | canvasMutationData | fontData | selectionData | styleDeclarationData | adoptedStyleSheetData | customElementData;
|
|
280
|
+
|
|
281
|
+
declare type incrementalSnapshotEvent = {
|
|
282
|
+
type: EventType.IncrementalSnapshot;
|
|
283
|
+
data: incrementalData;
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
declare enum IncrementalSource {
|
|
287
|
+
Mutation = 0,
|
|
288
|
+
MouseMove = 1,
|
|
289
|
+
MouseInteraction = 2,
|
|
290
|
+
Scroll = 3,
|
|
291
|
+
ViewportResize = 4,
|
|
292
|
+
Input = 5,
|
|
293
|
+
TouchMove = 6,
|
|
294
|
+
MediaInteraction = 7,
|
|
295
|
+
StyleSheetRule = 8,
|
|
296
|
+
CanvasMutation = 9,
|
|
297
|
+
Font = 10,
|
|
298
|
+
Log = 11,
|
|
299
|
+
Drag = 12,
|
|
300
|
+
StyleDeclaration = 13,
|
|
301
|
+
Selection = 14,
|
|
302
|
+
AdoptedStyleSheet = 15,
|
|
303
|
+
CustomElement = 16
|
|
893
304
|
}
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
305
|
+
|
|
306
|
+
declare type inputCallback = (v: inputValue & {
|
|
307
|
+
id: number;
|
|
308
|
+
}) => void;
|
|
309
|
+
|
|
310
|
+
declare type inputData = {
|
|
311
|
+
source: IncrementalSource.Input;
|
|
312
|
+
id: number;
|
|
313
|
+
} & inputValue;
|
|
314
|
+
|
|
315
|
+
declare type inputValue = {
|
|
316
|
+
text: string;
|
|
317
|
+
isChecked: boolean;
|
|
318
|
+
userTriggered?: boolean;
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
declare type IWindow = Window & typeof globalThis;
|
|
322
|
+
|
|
323
|
+
declare type KeepIframeSrcFn = (src: string) => boolean;
|
|
324
|
+
|
|
325
|
+
declare type listenerHandler = () => void;
|
|
326
|
+
|
|
327
|
+
declare type loadedEvent = {
|
|
328
|
+
type: EventType.Load;
|
|
329
|
+
data: unknown;
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
declare type maskTextClass = string | RegExp;
|
|
333
|
+
|
|
334
|
+
declare type mediaInteractionCallback = (p: mediaInteractionParam) => void;
|
|
335
|
+
|
|
336
|
+
declare type mediaInteractionData = {
|
|
337
|
+
source: IncrementalSource.MediaInteraction;
|
|
338
|
+
} & mediaInteractionParam;
|
|
339
|
+
|
|
340
|
+
declare type mediaInteractionParam = {
|
|
341
|
+
type: MediaInteractions;
|
|
342
|
+
id: number;
|
|
343
|
+
currentTime?: number;
|
|
344
|
+
volume?: number;
|
|
345
|
+
muted?: boolean;
|
|
346
|
+
loop?: boolean;
|
|
347
|
+
playbackRate?: number;
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
declare enum MediaInteractions {
|
|
351
|
+
Play = 0,
|
|
352
|
+
Pause = 1,
|
|
353
|
+
Seeked = 2,
|
|
354
|
+
VolumeChange = 3,
|
|
355
|
+
RateChange = 4
|
|
900
356
|
}
|
|
901
|
-
|
|
902
|
-
declare
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
declare
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
declare function polyfill(win?: Window & typeof globalThis): void;
|
|
938
|
-
type ResolveTree = {
|
|
939
|
-
value: addedNodeMutation;
|
|
940
|
-
children: ResolveTree[];
|
|
941
|
-
parent: ResolveTree | null;
|
|
942
|
-
};
|
|
943
|
-
declare function queueToResolveTrees(queue: addedNodeMutation[]): ResolveTree[];
|
|
944
|
-
declare function iterateResolveTree(tree: ResolveTree, cb: (mutation: addedNodeMutation) => unknown): void;
|
|
945
|
-
type AppendedIframe = {
|
|
946
|
-
mutationInQueue: addedNodeMutation;
|
|
947
|
-
builtNode: HTMLIFrameElement | RRIFrameElement;
|
|
948
|
-
};
|
|
949
|
-
declare function isSerializedIframe<TNode extends Node | BaseRRNode>(n: TNode, mirror: IMirror<TNode>): boolean;
|
|
950
|
-
declare function isSerializedStylesheet<TNode extends Node | BaseRRNode>(n: TNode, mirror: IMirror<TNode>): boolean;
|
|
951
|
-
declare function getBaseDimension(node: Node, rootIframe: Node): DocumentDimension;
|
|
952
|
-
declare function hasShadowRoot<T extends Node | BaseRRNode>(n: T): n is T & {
|
|
953
|
-
shadowRoot: ShadowRoot;
|
|
954
|
-
};
|
|
955
|
-
declare function getNestedRule(rules: CSSRuleList, position: number[]): CSSGroupingRule;
|
|
956
|
-
declare function getPositionsAndIndex(nestedIndex: number[]): {
|
|
957
|
-
positions: number[];
|
|
958
|
-
index: number | undefined;
|
|
959
|
-
};
|
|
960
|
-
declare function uniqueTextMutations(mutations: textMutation[]): textMutation[];
|
|
961
|
-
declare class StyleSheetMirror {
|
|
962
|
-
private id;
|
|
963
|
-
private styleIDMap;
|
|
964
|
-
private idStyleMap;
|
|
965
|
-
getId(stylesheet: CSSStyleSheet): number;
|
|
966
|
-
has(stylesheet: CSSStyleSheet): boolean;
|
|
967
|
-
add(stylesheet: CSSStyleSheet, id?: number): number;
|
|
968
|
-
getStyle(id: number): CSSStyleSheet | null;
|
|
969
|
-
reset(): void;
|
|
970
|
-
generateId(): number;
|
|
971
|
-
}
|
|
972
|
-
declare function getShadowHost(n: Node): Element | null;
|
|
973
|
-
declare function getRootShadowHost(n: Node): Node;
|
|
974
|
-
declare function shadowHostInDom(n: Node): boolean;
|
|
975
|
-
declare function inDom(n: Node): boolean;
|
|
976
|
-
|
|
977
|
-
type utils_d_AppendedIframe = AppendedIframe;
|
|
978
|
-
type utils_d_StyleSheetMirror = StyleSheetMirror;
|
|
979
|
-
declare const utils_d_StyleSheetMirror: typeof StyleSheetMirror;
|
|
980
|
-
declare const utils_d__mirror: typeof _mirror;
|
|
981
|
-
declare const utils_d_getBaseDimension: typeof getBaseDimension;
|
|
982
|
-
declare const utils_d_getNestedRule: typeof getNestedRule;
|
|
983
|
-
declare const utils_d_getPositionsAndIndex: typeof getPositionsAndIndex;
|
|
984
|
-
declare const utils_d_getRootShadowHost: typeof getRootShadowHost;
|
|
985
|
-
declare const utils_d_getShadowHost: typeof getShadowHost;
|
|
986
|
-
declare const utils_d_getWindowHeight: typeof getWindowHeight;
|
|
987
|
-
declare const utils_d_getWindowScroll: typeof getWindowScroll;
|
|
988
|
-
declare const utils_d_getWindowWidth: typeof getWindowWidth;
|
|
989
|
-
declare const utils_d_hasShadowRoot: typeof hasShadowRoot;
|
|
990
|
-
declare const utils_d_hookSetter: typeof hookSetter;
|
|
991
|
-
declare const utils_d_inDom: typeof inDom;
|
|
992
|
-
declare const utils_d_isAncestorRemoved: typeof isAncestorRemoved;
|
|
993
|
-
declare const utils_d_isBlocked: typeof isBlocked;
|
|
994
|
-
declare const utils_d_isIgnored: typeof isIgnored;
|
|
995
|
-
declare const utils_d_isSerialized: typeof isSerialized;
|
|
996
|
-
declare const utils_d_isSerializedIframe: typeof isSerializedIframe;
|
|
997
|
-
declare const utils_d_isSerializedStylesheet: typeof isSerializedStylesheet;
|
|
998
|
-
declare const utils_d_iterateResolveTree: typeof iterateResolveTree;
|
|
999
|
-
declare const utils_d_legacy_isTouchEvent: typeof legacy_isTouchEvent;
|
|
1000
|
-
declare const utils_d_nowTimestamp: typeof nowTimestamp;
|
|
1001
|
-
declare const utils_d_on: typeof on;
|
|
1002
|
-
declare const utils_d_patch: typeof patch;
|
|
1003
|
-
declare const utils_d_polyfill: typeof polyfill;
|
|
1004
|
-
declare const utils_d_queueToResolveTrees: typeof queueToResolveTrees;
|
|
1005
|
-
declare const utils_d_shadowHostInDom: typeof shadowHostInDom;
|
|
1006
|
-
declare const utils_d_throttle: typeof throttle;
|
|
1007
|
-
declare const utils_d_uniqueTextMutations: typeof uniqueTextMutations;
|
|
1008
|
-
declare namespace utils_d {
|
|
1009
|
-
export { type utils_d_AppendedIframe as AppendedIframe, utils_d_StyleSheetMirror as StyleSheetMirror, utils_d__mirror as _mirror, utils_d_getBaseDimension as getBaseDimension, utils_d_getNestedRule as getNestedRule, utils_d_getPositionsAndIndex as getPositionsAndIndex, utils_d_getRootShadowHost as getRootShadowHost, utils_d_getShadowHost as getShadowHost, utils_d_getWindowHeight as getWindowHeight, utils_d_getWindowScroll as getWindowScroll, utils_d_getWindowWidth as getWindowWidth, utils_d_hasShadowRoot as hasShadowRoot, utils_d_hookSetter as hookSetter, utils_d_inDom as inDom, utils_d_isAncestorRemoved as isAncestorRemoved, utils_d_isBlocked as isBlocked, utils_d_isIgnored as isIgnored, utils_d_isSerialized as isSerialized, utils_d_isSerializedIframe as isSerializedIframe, utils_d_isSerializedStylesheet as isSerializedStylesheet, utils_d_iterateResolveTree as iterateResolveTree, utils_d_legacy_isTouchEvent as legacy_isTouchEvent, utils_d_nowTimestamp as nowTimestamp, utils_d_on as on, utils_d_patch as patch, utils_d_polyfill as polyfill, utils_d_queueToResolveTrees as queueToResolveTrees, utils_d_shadowHostInDom as shadowHostInDom, utils_d_throttle as throttle, utils_d_uniqueTextMutations as uniqueTextMutations };
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
declare class Timer {
|
|
1013
|
-
timeOffset: number;
|
|
1014
|
-
speed: number;
|
|
1015
|
-
private actions;
|
|
1016
|
-
private raf;
|
|
1017
|
-
private lastTimestamp;
|
|
1018
|
-
constructor(actions: actionWithDelay[] | undefined, config: {
|
|
1019
|
-
speed: number;
|
|
1020
|
-
});
|
|
1021
|
-
addAction(action: actionWithDelay): void;
|
|
1022
|
-
start(): void;
|
|
1023
|
-
private rafCheck;
|
|
1024
|
-
clear(): void;
|
|
1025
|
-
setSpeed(speed: number): void;
|
|
1026
|
-
isActive(): boolean;
|
|
1027
|
-
private findActionIndex;
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
declare enum InterpreterStatus {
|
|
1031
|
-
NotStarted = 0,
|
|
1032
|
-
Running = 1,
|
|
1033
|
-
Stopped = 2
|
|
357
|
+
|
|
358
|
+
declare type metaEvent = {
|
|
359
|
+
type: EventType.Meta;
|
|
360
|
+
data: {
|
|
361
|
+
href: string;
|
|
362
|
+
width: number;
|
|
363
|
+
height: number;
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
declare type mouseInteractionCallBack = (d: mouseInteractionParam) => void;
|
|
368
|
+
|
|
369
|
+
declare type mouseInteractionData = {
|
|
370
|
+
source: IncrementalSource.MouseInteraction;
|
|
371
|
+
} & mouseInteractionParam;
|
|
372
|
+
|
|
373
|
+
declare type mouseInteractionParam = {
|
|
374
|
+
type: MouseInteractions;
|
|
375
|
+
id: number;
|
|
376
|
+
x?: number;
|
|
377
|
+
y?: number;
|
|
378
|
+
pointerType?: PointerTypes;
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
declare enum MouseInteractions {
|
|
382
|
+
MouseUp = 0,
|
|
383
|
+
MouseDown = 1,
|
|
384
|
+
Click = 2,
|
|
385
|
+
ContextMenu = 3,
|
|
386
|
+
DblClick = 4,
|
|
387
|
+
Focus = 5,
|
|
388
|
+
Blur = 6,
|
|
389
|
+
TouchStart = 7,
|
|
390
|
+
TouchMove_Departed = 8,
|
|
391
|
+
TouchEnd = 9,
|
|
392
|
+
TouchCancel = 10
|
|
1034
393
|
}
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
394
|
+
|
|
395
|
+
declare type mousemoveCallBack = (p: mousePosition[], source: IncrementalSource.MouseMove | IncrementalSource.TouchMove | IncrementalSource.Drag) => void;
|
|
396
|
+
|
|
397
|
+
declare type mousemoveData = {
|
|
398
|
+
source: IncrementalSource.MouseMove | IncrementalSource.TouchMove | IncrementalSource.Drag;
|
|
399
|
+
positions: mousePosition[];
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
declare type mousePosition = {
|
|
403
|
+
x: number;
|
|
404
|
+
y: number;
|
|
405
|
+
id: number;
|
|
406
|
+
timeOffset: number;
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
declare type mutationCallBack = (m: mutationCallbackParam) => void;
|
|
410
|
+
|
|
411
|
+
declare type mutationCallbackParam = {
|
|
412
|
+
texts: textMutation[];
|
|
413
|
+
attributes: attributeMutation[];
|
|
414
|
+
removes: removedNodeMutation[];
|
|
415
|
+
adds: addedNodeMutation[];
|
|
416
|
+
isAttachIframe?: true;
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
declare type mutationData = {
|
|
420
|
+
source: IncrementalSource.Mutation;
|
|
421
|
+
} & mutationCallbackParam;
|
|
422
|
+
|
|
423
|
+
declare type PackFn = (event: eventWithTime) => string;
|
|
424
|
+
|
|
425
|
+
declare type pluginEvent<T = unknown> = {
|
|
426
|
+
type: EventType.Plugin;
|
|
427
|
+
data: {
|
|
428
|
+
plugin: string;
|
|
429
|
+
payload: T;
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
declare enum PointerTypes {
|
|
434
|
+
Mouse = 0,
|
|
435
|
+
Pen = 1,
|
|
436
|
+
Touch = 2
|
|
1038
437
|
}
|
|
1039
|
-
|
|
1040
|
-
|
|
438
|
+
|
|
439
|
+
declare type RecordPlugin<TOptions = unknown> = {
|
|
440
|
+
name: string;
|
|
441
|
+
observer?: (cb: (...args: Array<unknown>) => void, win: IWindow, options: TOptions) => listenerHandler;
|
|
442
|
+
eventProcessor?: <TExtend>(event: eventWithTime) => eventWithTime & TExtend;
|
|
443
|
+
getMirror?: (mirrors: {
|
|
444
|
+
nodeMirror: Mirror;
|
|
445
|
+
crossOriginIframeMirror: ICrossOriginIframeMirror;
|
|
446
|
+
crossOriginIframeStyleMirror: ICrossOriginIframeMirror;
|
|
447
|
+
}) => void;
|
|
448
|
+
options: TOptions;
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
declare type removedNodeMutation = {
|
|
452
|
+
parentId: number;
|
|
453
|
+
id: number;
|
|
454
|
+
isShadow?: boolean;
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
declare type SamplingStrategy = Partial<{
|
|
458
|
+
mousemove: boolean | number;
|
|
459
|
+
mousemoveCallback: number;
|
|
460
|
+
mouseInteraction: boolean | Record<string, boolean | undefined>;
|
|
461
|
+
scroll: number;
|
|
462
|
+
media: number;
|
|
463
|
+
input: 'all' | 'last';
|
|
464
|
+
canvas: 'all' | number;
|
|
465
|
+
}>;
|
|
466
|
+
|
|
467
|
+
declare type scrollCallback = (p: scrollPosition) => void;
|
|
468
|
+
|
|
469
|
+
declare type scrollData = {
|
|
470
|
+
source: IncrementalSource.Scroll;
|
|
471
|
+
} & scrollPosition;
|
|
472
|
+
|
|
473
|
+
declare type scrollPosition = {
|
|
474
|
+
id: number;
|
|
475
|
+
x: number;
|
|
476
|
+
y: number;
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
declare type selectionCallback = (p: selectionParam) => void;
|
|
480
|
+
|
|
481
|
+
declare type selectionData = {
|
|
482
|
+
source: IncrementalSource.Selection;
|
|
483
|
+
} & selectionParam;
|
|
484
|
+
|
|
485
|
+
declare type selectionParam = {
|
|
486
|
+
ranges: Array<SelectionRange>;
|
|
1041
487
|
};
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
488
|
+
|
|
489
|
+
declare type SelectionRange = {
|
|
490
|
+
start: number;
|
|
491
|
+
startOffset: number;
|
|
492
|
+
end: number;
|
|
493
|
+
endOffset: number;
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
declare type styleDeclarationCallback = (s: styleDeclarationParam) => void;
|
|
497
|
+
|
|
498
|
+
declare type styleDeclarationData = {
|
|
499
|
+
source: IncrementalSource.StyleDeclaration;
|
|
500
|
+
} & styleDeclarationParam;
|
|
501
|
+
|
|
502
|
+
declare type styleDeclarationParam = {
|
|
503
|
+
id?: number;
|
|
504
|
+
styleId?: number;
|
|
505
|
+
index: number[];
|
|
506
|
+
set?: {
|
|
507
|
+
property: string;
|
|
508
|
+
value: string | null;
|
|
509
|
+
priority: string | undefined;
|
|
1060
510
|
};
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
context: TContext;
|
|
1064
|
-
actions: Array<ActionObject<TContext, TEvent>>;
|
|
1065
|
-
changed?: boolean | undefined;
|
|
1066
|
-
matches: <TSV extends TState['value']>(value: TSV) => this is TState extends {
|
|
1067
|
-
value: TSV;
|
|
1068
|
-
} ? TState & {
|
|
1069
|
-
value: TSV;
|
|
1070
|
-
} : never;
|
|
1071
|
-
}
|
|
1072
|
-
type AnyState = State<any, any, any>;
|
|
1073
|
-
interface Config<TContext extends object, TEvent extends EventObject, TState extends Typestate<TContext> = {
|
|
1074
|
-
value: any;
|
|
1075
|
-
context: TContext;
|
|
1076
|
-
}> {
|
|
1077
|
-
id?: string;
|
|
1078
|
-
initial: string;
|
|
1079
|
-
context?: TContext;
|
|
1080
|
-
states: {
|
|
1081
|
-
[key in TState['value']]: {
|
|
1082
|
-
on?: {
|
|
1083
|
-
[K in TEvent['type']]?: SingleOrArray<Transition<TContext, TEvent extends {
|
|
1084
|
-
type: K;
|
|
1085
|
-
} ? TEvent : never>>;
|
|
1086
|
-
};
|
|
1087
|
-
exit?: SingleOrArray<Action<TContext, TEvent>>;
|
|
1088
|
-
entry?: SingleOrArray<Action<TContext, TEvent>>;
|
|
1089
|
-
};
|
|
1090
|
-
};
|
|
1091
|
-
}
|
|
1092
|
-
interface Machine<TContext extends object, TEvent extends EventObject, TState extends Typestate<TContext>> {
|
|
1093
|
-
config: StateMachine.Config<TContext, TEvent, TState>;
|
|
1094
|
-
initialState: State<TContext, TEvent, TState>;
|
|
1095
|
-
transition: (state: string | State<TContext, TEvent, TState>, event: TEvent['type'] | TEvent) => State<TContext, TEvent, TState>;
|
|
1096
|
-
}
|
|
1097
|
-
type StateListener<T extends AnyState> = (state: T) => void;
|
|
1098
|
-
interface Service<TContext extends object, TEvent extends EventObject, TState extends Typestate<TContext> = {
|
|
1099
|
-
value: any;
|
|
1100
|
-
context: TContext;
|
|
1101
|
-
}> {
|
|
1102
|
-
send: (event: TEvent | TEvent['type']) => void;
|
|
1103
|
-
subscribe: (listener: StateListener<State<TContext, TEvent, TState>>) => {
|
|
1104
|
-
unsubscribe: () => void;
|
|
1105
|
-
};
|
|
1106
|
-
start: (initialState?: TState['value'] | {
|
|
1107
|
-
context: TContext;
|
|
1108
|
-
value: TState['value'];
|
|
1109
|
-
}) => Service<TContext, TEvent, TState>;
|
|
1110
|
-
stop: () => Service<TContext, TEvent, TState>;
|
|
1111
|
-
readonly status: InterpreterStatus;
|
|
1112
|
-
readonly state: State<TContext, TEvent, TState>;
|
|
1113
|
-
}
|
|
1114
|
-
type Assigner<TContext extends object, TEvent extends EventObject> = (context: TContext, event: TEvent) => Partial<TContext>;
|
|
1115
|
-
type PropertyAssigner<TContext extends object, TEvent extends EventObject> = {
|
|
1116
|
-
[K in keyof TContext]?: ((context: TContext, event: TEvent) => TContext[K]) | TContext[K];
|
|
511
|
+
remove?: {
|
|
512
|
+
property: string;
|
|
1117
513
|
};
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
type
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
type PlayerAssets = {
|
|
1167
|
-
emitter: Emitter$1;
|
|
1168
|
-
applyEventsSynchronously(events: Array<eventWithTime>): void;
|
|
1169
|
-
getCastFn(event: eventWithTime, isSync: boolean): () => void;
|
|
1170
|
-
};
|
|
1171
|
-
declare function createPlayerService(context: PlayerContext, { getCastFn, applyEventsSynchronously, emitter }: PlayerAssets): StateMachine.Service<PlayerContext, PlayerEvent, PlayerState>;
|
|
1172
|
-
type SpeedContext = {
|
|
1173
|
-
normalSpeed: playerConfig['speed'];
|
|
1174
|
-
timer: Timer;
|
|
1175
|
-
};
|
|
1176
|
-
type SpeedEvent = {
|
|
1177
|
-
type: 'FAST_FORWARD';
|
|
1178
|
-
payload: {
|
|
1179
|
-
speed: playerConfig['speed'];
|
|
1180
|
-
};
|
|
1181
|
-
} | {
|
|
1182
|
-
type: 'BACK_TO_NORMAL';
|
|
1183
|
-
} | {
|
|
1184
|
-
type: 'SET_SPEED';
|
|
1185
|
-
payload: {
|
|
1186
|
-
speed: playerConfig['speed'];
|
|
1187
|
-
};
|
|
1188
|
-
};
|
|
1189
|
-
type SpeedState = {
|
|
1190
|
-
value: 'normal';
|
|
1191
|
-
context: SpeedContext;
|
|
1192
|
-
} | {
|
|
1193
|
-
value: 'skipping';
|
|
1194
|
-
context: SpeedContext;
|
|
1195
|
-
};
|
|
1196
|
-
declare function createSpeedService(context: SpeedContext): StateMachine.Service<SpeedContext, SpeedEvent, SpeedState>;
|
|
514
|
+
};
|
|
515
|
+
|
|
516
|
+
declare type styleOMValue = {
|
|
517
|
+
[key: string]: styleValueWithPriority | string | false;
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
declare type styleSheetAddRule = {
|
|
521
|
+
rule: string;
|
|
522
|
+
index?: number | number[];
|
|
523
|
+
};
|
|
524
|
+
|
|
525
|
+
declare type styleSheetDeleteRule = {
|
|
526
|
+
index: number | number[];
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
declare type styleSheetRuleCallback = (s: styleSheetRuleParam) => void;
|
|
530
|
+
|
|
531
|
+
declare type styleSheetRuleData = {
|
|
532
|
+
source: IncrementalSource.StyleSheetRule;
|
|
533
|
+
} & styleSheetRuleParam;
|
|
534
|
+
|
|
535
|
+
declare type styleSheetRuleParam = {
|
|
536
|
+
id?: number;
|
|
537
|
+
styleId?: number;
|
|
538
|
+
removes?: styleSheetDeleteRule[];
|
|
539
|
+
adds?: styleSheetAddRule[];
|
|
540
|
+
replace?: string;
|
|
541
|
+
replaceSync?: string;
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
declare type styleValueWithPriority = [string, string];
|
|
545
|
+
|
|
546
|
+
declare type textMutation = {
|
|
547
|
+
id: number;
|
|
548
|
+
value: string | null;
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
declare type viewportResizeCallback = (d: viewportResizeDimension) => void;
|
|
552
|
+
|
|
553
|
+
declare type viewportResizeData = {
|
|
554
|
+
source: IncrementalSource.ViewportResize;
|
|
555
|
+
} & viewportResizeDimension;
|
|
556
|
+
|
|
557
|
+
declare type viewportResizeDimension = {
|
|
558
|
+
width: number;
|
|
559
|
+
height: number;
|
|
560
|
+
};
|
|
561
|
+
|
|
1197
562
|
|
|
1198
|
-
declare class Replayer {
|
|
1199
|
-
wrapper: HTMLDivElement;
|
|
1200
|
-
iframe: HTMLIFrameElement;
|
|
1201
|
-
service: ReturnType<typeof createPlayerService>;
|
|
1202
|
-
speedService: ReturnType<typeof createSpeedService>;
|
|
1203
|
-
get timer(): Timer;
|
|
1204
|
-
config: playerConfig;
|
|
1205
|
-
usingVirtualDom: boolean;
|
|
1206
|
-
virtualDom: RRDocument;
|
|
1207
|
-
private mouse;
|
|
1208
|
-
private mouseTail;
|
|
1209
|
-
private tailPositions;
|
|
1210
|
-
private emitter;
|
|
1211
|
-
private nextUserInteractionEvent;
|
|
1212
|
-
private legacy_missingNodeRetryMap;
|
|
1213
|
-
private cache;
|
|
1214
|
-
private imageMap;
|
|
1215
|
-
private canvasEventMap;
|
|
1216
|
-
private mirror;
|
|
1217
|
-
private styleMirror;
|
|
1218
|
-
private firstFullSnapshot;
|
|
1219
|
-
private newDocumentQueue;
|
|
1220
|
-
private mousePos;
|
|
1221
|
-
private touchActive;
|
|
1222
|
-
private lastMouseDownEvent;
|
|
1223
|
-
private lastHoveredRootNode;
|
|
1224
|
-
private lastSelectionData;
|
|
1225
|
-
private constructedStyleMutations;
|
|
1226
|
-
private adoptedStyleSheets;
|
|
1227
|
-
constructor(events: Array<eventWithTime | string>, config?: Partial<playerConfig>);
|
|
1228
|
-
on(event: string, handler: Handler): this;
|
|
1229
|
-
off(event: string, handler: Handler): this;
|
|
1230
|
-
setConfig(config: Partial<playerConfig>): void;
|
|
1231
|
-
getMetaData(): playerMetaData;
|
|
1232
|
-
getCurrentTime(): number;
|
|
1233
|
-
getTimeOffset(): number;
|
|
1234
|
-
getMirror(): Mirror$1;
|
|
1235
|
-
play(timeOffset?: number): void;
|
|
1236
|
-
pause(timeOffset?: number): void;
|
|
1237
|
-
resume(timeOffset?: number): void;
|
|
1238
|
-
destroy(): void;
|
|
1239
|
-
startLive(baselineTime?: number): void;
|
|
1240
|
-
addEvent(rawEvent: eventWithTime | string): void;
|
|
1241
|
-
enableInteract(): void;
|
|
1242
|
-
disableInteract(): void;
|
|
1243
|
-
resetCache(): void;
|
|
1244
|
-
private setupDom;
|
|
1245
|
-
private handleResize;
|
|
1246
|
-
private applyEventsSynchronously;
|
|
1247
|
-
private getCastFn;
|
|
1248
|
-
private rebuildFullSnapshot;
|
|
1249
|
-
private insertStyleRules;
|
|
1250
|
-
private attachDocumentToIframe;
|
|
1251
|
-
private collectIframeAndAttachDocument;
|
|
1252
|
-
private waitForStylesheetLoad;
|
|
1253
|
-
private preloadAllImages;
|
|
1254
|
-
private preloadImages;
|
|
1255
|
-
private deserializeAndPreloadCanvasEvents;
|
|
1256
|
-
private applyIncremental;
|
|
1257
|
-
private applyMutation;
|
|
1258
|
-
private applyScroll;
|
|
1259
|
-
private applyInput;
|
|
1260
|
-
private applySelection;
|
|
1261
|
-
private applyStyleSheetMutation;
|
|
1262
|
-
private applyStyleSheetRule;
|
|
1263
|
-
private applyStyleDeclaration;
|
|
1264
|
-
private applyAdoptedStyleSheet;
|
|
1265
|
-
private legacy_resolveMissingNode;
|
|
1266
|
-
private moveAndHover;
|
|
1267
|
-
private drawMouseTail;
|
|
1268
|
-
private hoverElements;
|
|
1269
|
-
private isUserInteraction;
|
|
1270
|
-
private backToNormal;
|
|
1271
|
-
private warnNodeNotFound;
|
|
1272
|
-
private warnCanvasMutationFailed;
|
|
1273
|
-
private debugNodeNotFound;
|
|
1274
|
-
private warn;
|
|
1275
|
-
private debug;
|
|
1276
|
-
}
|
|
1277
563
|
|
|
1278
|
-
type recordOptions<T> = {
|
|
1279
|
-
emit?: (e: T, isCheckout?: boolean) => void;
|
|
1280
|
-
checkoutEveryNth?: number;
|
|
1281
|
-
checkoutEveryNms?: number;
|
|
1282
|
-
blockClass?: blockClass;
|
|
1283
|
-
blockSelector?: string;
|
|
1284
|
-
ignoreClass?: string;
|
|
1285
|
-
ignoreSelector?: string;
|
|
1286
|
-
maskTextClass?: maskTextClass;
|
|
1287
|
-
maskTextSelector?: string;
|
|
1288
|
-
maskAllInputs?: boolean;
|
|
1289
|
-
maskInputOptions?: MaskInputOptions;
|
|
1290
|
-
maskInputFn?: MaskInputFn;
|
|
1291
|
-
maskTextFn?: MaskTextFn;
|
|
1292
|
-
slimDOMOptions?: SlimDOMOptions | 'all' | true;
|
|
1293
|
-
ignoreCSSAttributes?: Set<string>;
|
|
1294
|
-
inlineStylesheet?: boolean;
|
|
1295
|
-
hooks?: hooksParam;
|
|
1296
|
-
packFn?: PackFn;
|
|
1297
|
-
sampling?: SamplingStrategy;
|
|
1298
|
-
dataURLOptions?: DataURLOptions;
|
|
1299
|
-
recordCanvas?: boolean;
|
|
1300
|
-
recordCrossOriginIframes?: boolean;
|
|
1301
|
-
recordAfter?: 'DOMContentLoaded' | 'load';
|
|
1302
|
-
userTriggeredOnInput?: boolean;
|
|
1303
|
-
collectFonts?: boolean;
|
|
1304
|
-
inlineImages?: boolean;
|
|
1305
|
-
plugins?: RecordPlugin[];
|
|
1306
|
-
mousemoveWait?: number;
|
|
1307
|
-
keepIframeSrcFn?: KeepIframeSrcFn;
|
|
1308
|
-
errorHandler?: ErrorHandler;
|
|
1309
|
-
};
|
|
1310
|
-
type ReplayPlugin = {
|
|
1311
|
-
handler?: (event: eventWithTime, isSync: boolean, context: {
|
|
1312
|
-
replayer: Replayer;
|
|
1313
|
-
}) => void;
|
|
1314
|
-
onBuild?: (node: Node | BaseRRNode, context: {
|
|
1315
|
-
id: number;
|
|
1316
|
-
replayer: Replayer;
|
|
1317
|
-
}) => void;
|
|
1318
|
-
getMirror?: (mirrors: {
|
|
1319
|
-
nodeMirror: Mirror$1;
|
|
1320
|
-
}) => void;
|
|
1321
|
-
};
|
|
1322
|
-
type playerConfig = {
|
|
1323
|
-
speed: number;
|
|
1324
|
-
maxSpeed: number;
|
|
1325
|
-
root: Element;
|
|
1326
|
-
loadTimeout: number;
|
|
1327
|
-
skipInactive: boolean;
|
|
1328
|
-
showWarning: boolean;
|
|
1329
|
-
showDebug: boolean;
|
|
1330
|
-
blockClass: string;
|
|
1331
|
-
liveMode: boolean;
|
|
1332
|
-
insertStyleRules: string[];
|
|
1333
|
-
triggerFocus: boolean;
|
|
1334
|
-
UNSAFE_replayCanvas: boolean;
|
|
1335
|
-
pauseAnimation?: boolean;
|
|
1336
|
-
mouseTail: boolean | {
|
|
1337
|
-
duration?: number;
|
|
1338
|
-
lineCap?: string;
|
|
1339
|
-
lineWidth?: number;
|
|
1340
|
-
strokeStyle?: string;
|
|
1341
|
-
};
|
|
1342
|
-
unpackFn?: UnpackFn;
|
|
1343
|
-
useVirtualDom: boolean;
|
|
1344
|
-
logger: {
|
|
1345
|
-
log: (...args: Parameters<typeof console.log>) => void;
|
|
1346
|
-
warn: (...args: Parameters<typeof console.warn>) => void;
|
|
1347
|
-
};
|
|
1348
|
-
plugins?: ReplayPlugin[];
|
|
1349
|
-
};
|
|
1350
564
|
declare global {
|
|
1351
565
|
interface Window {
|
|
1352
566
|
FontFace: typeof FontFace;
|
|
1353
567
|
}
|
|
1354
568
|
}
|
|
1355
|
-
type ErrorHandler = (error: unknown) => void | boolean;
|
|
1356
569
|
|
|
1357
|
-
declare
|
|
570
|
+
declare type ErrorHandler = (error: unknown) => void | boolean;
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
declare type recordOptions<T> = {
|
|
574
|
+
emit?: (e: T, isCheckout?: boolean) => void;
|
|
575
|
+
checkoutEveryNth?: number;
|
|
576
|
+
checkoutEveryNms?: number;
|
|
577
|
+
blockClass?: blockClass;
|
|
578
|
+
blockSelector?: string;
|
|
579
|
+
ignoreClass?: string;
|
|
580
|
+
ignoreSelector?: string;
|
|
581
|
+
maskTextClass?: maskTextClass;
|
|
582
|
+
maskTextSelector?: string;
|
|
583
|
+
maskAllInputs?: boolean;
|
|
584
|
+
maskInputOptions?: MaskInputOptions;
|
|
585
|
+
maskInputFn?: MaskInputFn;
|
|
586
|
+
maskTextFn?: MaskTextFn;
|
|
587
|
+
slimDOMOptions?: SlimDOMOptions | 'all' | true;
|
|
588
|
+
ignoreCSSAttributes?: Set<string>;
|
|
589
|
+
inlineStylesheet?: boolean;
|
|
590
|
+
hooks?: hooksParam;
|
|
591
|
+
packFn?: PackFn;
|
|
592
|
+
sampling?: SamplingStrategy;
|
|
593
|
+
dataURLOptions?: DataURLOptions;
|
|
594
|
+
recordDOM?: boolean;
|
|
595
|
+
recordCanvas?: boolean;
|
|
596
|
+
recordCrossOriginIframes?: boolean;
|
|
597
|
+
recordAfter?: 'DOMContentLoaded' | 'load';
|
|
598
|
+
userTriggeredOnInput?: boolean;
|
|
599
|
+
collectFonts?: boolean;
|
|
600
|
+
inlineImages?: boolean;
|
|
601
|
+
plugins?: RecordPlugin[];
|
|
602
|
+
mousemoveWait?: number;
|
|
603
|
+
keepIframeSrcFn?: KeepIframeSrcFn;
|
|
604
|
+
errorHandler?: ErrorHandler;
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
declare function record<T = eventWithTime>(options?: recordOptions<T>): listenerHandler | undefined;
|
|
608
|
+
|
|
609
|
+
declare namespace record {
|
|
610
|
+
var addCustomEvent: <T>(tag: string, payload: T) => void;
|
|
611
|
+
var freezePage: () => void;
|
|
612
|
+
var takeFullSnapshot: (isCheckout?: boolean | undefined) => void;
|
|
613
|
+
var mirror: Mirror;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
|
|
1358
617
|
declare namespace record {
|
|
1359
618
|
var addCustomEvent: <T>(tag: string, payload: T) => void;
|
|
1360
619
|
var freezePage: () => void;
|
|
1361
620
|
var takeFullSnapshot: (isCheckout?: boolean | undefined) => void;
|
|
1362
|
-
var mirror: Mirror
|
|
621
|
+
var mirror: Mirror;
|
|
1363
622
|
}
|
|
1364
623
|
|
|
1365
|
-
declare const addCustomEvent: <T>(tag: string, payload: T) => void;
|
|
1366
|
-
declare const freezePage: () => void;
|
|
1367
|
-
|
|
1368
|
-
declare const pack: PackFn;
|
|
1369
624
|
|
|
1370
|
-
declare
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
};
|
|
1377
|
-
type LogRecordOptions = {
|
|
1378
|
-
level?: LogLevel$1[];
|
|
1379
|
-
lengthThreshold?: number;
|
|
1380
|
-
stringifyOptions?: StringifyOptions;
|
|
1381
|
-
logger?: Logger | 'console';
|
|
1382
|
-
};
|
|
1383
|
-
type LogData = {
|
|
1384
|
-
level: LogLevel$1;
|
|
1385
|
-
trace: string[];
|
|
1386
|
-
payload: string[];
|
|
1387
|
-
};
|
|
1388
|
-
type Logger = {
|
|
1389
|
-
assert?: typeof console.assert;
|
|
1390
|
-
clear?: typeof console.clear;
|
|
1391
|
-
count?: typeof console.count;
|
|
1392
|
-
countReset?: typeof console.countReset;
|
|
1393
|
-
debug?: typeof console.debug;
|
|
1394
|
-
dir?: typeof console.dir;
|
|
1395
|
-
dirxml?: typeof console.dirxml;
|
|
1396
|
-
error?: typeof console.error;
|
|
1397
|
-
group?: typeof console.group;
|
|
1398
|
-
groupCollapsed?: typeof console.groupCollapsed;
|
|
1399
|
-
groupEnd?: () => void;
|
|
1400
|
-
info?: typeof console.info;
|
|
1401
|
-
log?: typeof console.log;
|
|
1402
|
-
table?: typeof console.table;
|
|
1403
|
-
time?: typeof console.time;
|
|
1404
|
-
timeEnd?: typeof console.timeEnd;
|
|
1405
|
-
timeLog?: typeof console.timeLog;
|
|
1406
|
-
trace?: typeof console.trace;
|
|
1407
|
-
warn?: typeof console.warn;
|
|
1408
|
-
};
|
|
1409
|
-
type LogLevel$1 = keyof Logger;
|
|
1410
|
-
declare const PLUGIN_NAME = "rrweb/console@1";
|
|
1411
|
-
declare const getRecordConsolePlugin: (options?: LogRecordOptions) => RecordPlugin;
|
|
1412
|
-
|
|
1413
|
-
type ReplayLogger = Partial<Record<LogLevel$1, (data: LogData) => void>>;
|
|
1414
|
-
type LogReplayConfig = {
|
|
1415
|
-
level?: LogLevel$1[];
|
|
1416
|
-
replayLogger?: ReplayLogger;
|
|
1417
|
-
};
|
|
1418
|
-
declare const getReplayConsolePlugin: (options?: LogReplayConfig) => ReplayPlugin;
|
|
625
|
+
declare global {
|
|
626
|
+
interface Window {
|
|
627
|
+
FontFace: typeof FontFace;
|
|
628
|
+
Array: typeof Array;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
1419
631
|
|
|
1420
|
-
|
|
1421
|
-
declare
|
|
1422
|
-
|
|
1423
|
-
declare const rrweb_IncrementalSource: typeof IncrementalSource;
|
|
1424
|
-
type rrweb_LogData = LogData;
|
|
1425
|
-
type rrweb_Logger = Logger;
|
|
1426
|
-
type rrweb_MouseInteractions = MouseInteractions;
|
|
1427
|
-
declare const rrweb_MouseInteractions: typeof MouseInteractions;
|
|
1428
|
-
declare const rrweb_PLUGIN_NAME: typeof PLUGIN_NAME;
|
|
1429
|
-
type rrweb_Replayer = Replayer;
|
|
1430
|
-
declare const rrweb_Replayer: typeof Replayer;
|
|
1431
|
-
type rrweb_ReplayerEvents = ReplayerEvents;
|
|
1432
|
-
declare const rrweb_ReplayerEvents: typeof ReplayerEvents;
|
|
1433
|
-
type rrweb_StringifyOptions = StringifyOptions;
|
|
1434
|
-
declare const rrweb_addCustomEvent: typeof addCustomEvent;
|
|
1435
|
-
declare const rrweb_freezePage: typeof freezePage;
|
|
1436
|
-
declare const rrweb_getRecordConsolePlugin: typeof getRecordConsolePlugin;
|
|
1437
|
-
declare const rrweb_getReplayConsolePlugin: typeof getReplayConsolePlugin;
|
|
1438
|
-
declare const rrweb_pack: typeof pack;
|
|
1439
|
-
declare const rrweb_record: typeof record;
|
|
1440
|
-
type rrweb_recordOptions<T> = recordOptions<T>;
|
|
1441
|
-
declare const rrweb_unpack: typeof unpack;
|
|
1442
|
-
declare namespace rrweb {
|
|
1443
|
-
export { rrweb_EventType as EventType, rrweb_IncrementalSource as IncrementalSource, type rrweb_LogData as LogData, type LogLevel$1 as LogLevel, type rrweb_Logger as Logger, rrweb_MouseInteractions as MouseInteractions, rrweb_PLUGIN_NAME as PLUGIN_NAME, rrweb_Replayer as Replayer, rrweb_ReplayerEvents as ReplayerEvents, type rrweb_StringifyOptions as StringifyOptions, rrweb_addCustomEvent as addCustomEvent, rrweb_freezePage as freezePage, rrweb_getRecordConsolePlugin as getRecordConsolePlugin, rrweb_getReplayConsolePlugin as getReplayConsolePlugin, _mirror as mirror, rrweb_pack as pack, rrweb_record as record, type rrweb_recordOptions as recordOptions, rrweb_unpack as unpack, utils_d as utils };
|
|
632
|
+
declare const _rrweb_record_record: typeof record;
|
|
633
|
+
declare namespace _rrweb_record {
|
|
634
|
+
export { _rrweb_record_record as record };
|
|
1444
635
|
}
|
|
1445
636
|
|
|
1446
637
|
interface XhrResponse {
|
|
@@ -2376,14 +1567,6 @@ type SprigEventMap = {
|
|
|
2376
1567
|
declare const eventEmitter: Emitter<SprigEventMap>;
|
|
2377
1568
|
type SprigEventEmitter = typeof eventEmitter;
|
|
2378
1569
|
|
|
2379
|
-
declare const LogLevels: {
|
|
2380
|
-
readonly Error: 1;
|
|
2381
|
-
readonly Warn: 2;
|
|
2382
|
-
readonly Info: 3;
|
|
2383
|
-
readonly Debug: 4;
|
|
2384
|
-
};
|
|
2385
|
-
type LogLevel = (typeof LogLevels)[keyof typeof LogLevels];
|
|
2386
|
-
|
|
2387
1570
|
type FramePosition = "bottomLeft" | "bottomRight" | "center" | "topLeft" | "topRight";
|
|
2388
1571
|
type Platform = "email" | "link" | "web";
|
|
2389
1572
|
type InstallationMethod = "web-npm" | "web-npm-bundled" | "web-gtm" | "web-segment" | "android-segment" | "react-native-segment" | "ios-segment" | "web-snippet";
|
|
@@ -2464,7 +1647,6 @@ interface Config extends MobileReplayConfig {
|
|
|
2464
1647
|
isPreview?: boolean;
|
|
2465
1648
|
launchDarklyEnabled?: boolean;
|
|
2466
1649
|
locale: string;
|
|
2467
|
-
logLevel?: LogLevel;
|
|
2468
1650
|
logBufferLimit?: number;
|
|
2469
1651
|
marketingUrl?: string;
|
|
2470
1652
|
maxAttrNameLength: number;
|
|
@@ -2485,7 +1667,6 @@ interface Config extends MobileReplayConfig {
|
|
|
2485
1667
|
previewKey?: string | null;
|
|
2486
1668
|
previewMode?: boolean;
|
|
2487
1669
|
productConfig?: AppProductConfig;
|
|
2488
|
-
replayNonce?: string;
|
|
2489
1670
|
replaySettings?: object;
|
|
2490
1671
|
requireUserIdForTracking: boolean;
|
|
2491
1672
|
responseGroupUid: UUID;
|
|
@@ -2742,7 +1923,6 @@ declare namespace sprigConfig {
|
|
|
2742
1923
|
nonce?: string;
|
|
2743
1924
|
partnerAnonymousId: string | null;
|
|
2744
1925
|
replayLibraryURL?: string;
|
|
2745
|
-
replayNonce?: string;
|
|
2746
1926
|
reportError: (
|
|
2747
1927
|
name: string,
|
|
2748
1928
|
err: Error,
|
|
@@ -2781,7 +1961,7 @@ declare global {
|
|
|
2781
1961
|
_Sprig?: sprigConfig.WindowSprig;
|
|
2782
1962
|
Sprig: sprigConfig.WindowSprig;
|
|
2783
1963
|
UserLeap: sprigConfig.WindowSprig;
|
|
2784
|
-
rrwebRecord?: (typeof
|
|
1964
|
+
rrwebRecord?: (typeof _rrweb_record)["record"];
|
|
2785
1965
|
sprigAPI?: object;
|
|
2786
1966
|
}
|
|
2787
1967
|
|