@sprig-technologies/sprig-bundled 1.1.4 → 1.1.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/index-CY2H9MX9.cjs +66 -0
- package/dist/index-_6NzDQiF.js +8399 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +673 -1485
- package/dist/index.js +7 -1
- package/dist/view-C4MmvYWa.cjs +12 -0
- package/dist/view-IAeZSBGR.js +1916 -0
- package/package.json +2 -2
- package/dist/index-Ce9gtwb7.js +0 -37
- package/dist/index-ZlfwE4U0.cjs +0 -37
- package/dist/view-BLX4LEzJ.js +0 -28
- package/dist/view-DqFVd4zL.cjs +0 -28
package/dist/index.d.ts
CHANGED
|
@@ -1,1432 +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
|
-
};
|
|
36
|
-
type cdataNode = {
|
|
37
|
-
type: NodeType.CDATA;
|
|
38
|
-
textContent: '';
|
|
39
|
-
};
|
|
40
|
-
type commentNode = {
|
|
41
|
-
type: NodeType.Comment;
|
|
42
|
-
textContent: string;
|
|
43
|
-
};
|
|
44
|
-
type serializedNode = (documentNode | documentTypeNode | elementNode | textNode | cdataNode | commentNode) & {
|
|
45
|
-
rootId?: number;
|
|
46
|
-
isShadowHost?: boolean;
|
|
47
|
-
isShadow?: boolean;
|
|
48
|
-
};
|
|
49
|
-
type serializedNodeWithId = serializedNode & {
|
|
50
|
-
id: number;
|
|
51
|
-
};
|
|
52
|
-
interface INode extends Node {
|
|
53
|
-
__sn: serializedNodeWithId;
|
|
54
|
-
}
|
|
55
|
-
interface IMirror<TNode> {
|
|
56
|
-
getId(n: TNode | undefined | null): number;
|
|
57
|
-
getNode(id: number): TNode | null;
|
|
58
|
-
getIds(): number[];
|
|
59
|
-
getMeta(n: TNode): serializedNodeWithId | null;
|
|
60
|
-
removeNodeFromMap(n: TNode): void;
|
|
61
|
-
has(id: number): boolean;
|
|
62
|
-
hasNode(node: TNode): boolean;
|
|
63
|
-
add(n: TNode, meta: serializedNodeWithId): void;
|
|
64
|
-
replace(id: number, n: TNode): void;
|
|
65
|
-
reset(): void;
|
|
66
|
-
}
|
|
67
|
-
type MaskInputOptions = Partial<{
|
|
68
|
-
color: boolean;
|
|
69
|
-
date: boolean;
|
|
70
|
-
'datetime-local': boolean;
|
|
71
|
-
email: boolean;
|
|
72
|
-
month: boolean;
|
|
73
|
-
number: boolean;
|
|
74
|
-
range: boolean;
|
|
75
|
-
search: boolean;
|
|
76
|
-
tel: boolean;
|
|
77
|
-
text: boolean;
|
|
78
|
-
time: boolean;
|
|
79
|
-
url: boolean;
|
|
80
|
-
week: boolean;
|
|
81
|
-
textarea: boolean;
|
|
82
|
-
select: boolean;
|
|
83
|
-
password: boolean;
|
|
84
|
-
}>;
|
|
85
|
-
type SlimDOMOptions = Partial<{
|
|
86
|
-
script: boolean;
|
|
87
|
-
comment: boolean;
|
|
88
|
-
headFavicon: boolean;
|
|
89
|
-
headWhitespace: boolean;
|
|
90
|
-
headMetaDescKeywords: boolean;
|
|
91
|
-
headMetaSocial: boolean;
|
|
92
|
-
headMetaRobots: boolean;
|
|
93
|
-
headMetaHttpEquiv: boolean;
|
|
94
|
-
headMetaAuthorship: boolean;
|
|
95
|
-
headMetaVerification: boolean;
|
|
96
|
-
}>;
|
|
97
|
-
type DataURLOptions = Partial<{
|
|
98
|
-
type: string;
|
|
99
|
-
quality: number;
|
|
100
|
-
}>;
|
|
101
|
-
type MaskTextFn = (text: string) => string;
|
|
102
|
-
type MaskInputFn = (text: string, element: HTMLElement) => string;
|
|
103
|
-
|
|
104
|
-
declare class Mirror$1 implements IMirror<Node> {
|
|
105
|
-
private idNodeMap;
|
|
106
|
-
private nodeMetaMap;
|
|
107
|
-
getId(n: Node | undefined | null): number;
|
|
108
|
-
getNode(id: number): Node | null;
|
|
109
|
-
getIds(): number[];
|
|
110
|
-
getMeta(n: Node): serializedNodeWithId | null;
|
|
111
|
-
removeNodeFromMap(n: Node): void;
|
|
112
|
-
has(id: number): boolean;
|
|
113
|
-
hasNode(node: Node): boolean;
|
|
114
|
-
add(n: Node, meta: serializedNodeWithId): void;
|
|
115
|
-
replace(id: number, n: Node): void;
|
|
116
|
-
reset(): void;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
declare enum EventType {
|
|
120
|
-
DomContentLoaded = 0,
|
|
121
|
-
Load = 1,
|
|
122
|
-
FullSnapshot = 2,
|
|
123
|
-
IncrementalSnapshot = 3,
|
|
124
|
-
Meta = 4,
|
|
125
|
-
Custom = 5,
|
|
126
|
-
Plugin = 6
|
|
127
|
-
}
|
|
128
|
-
type domContentLoadedEvent = {
|
|
129
|
-
type: EventType.DomContentLoaded;
|
|
130
|
-
data: unknown;
|
|
131
|
-
};
|
|
132
|
-
type loadedEvent = {
|
|
133
|
-
type: EventType.Load;
|
|
134
|
-
data: unknown;
|
|
135
|
-
};
|
|
136
|
-
type fullSnapshotEvent = {
|
|
137
|
-
type: EventType.FullSnapshot;
|
|
138
|
-
data: {
|
|
139
|
-
node: serializedNodeWithId;
|
|
140
|
-
initialOffset: {
|
|
141
|
-
top: number;
|
|
142
|
-
left: number;
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
type incrementalSnapshotEvent = {
|
|
147
|
-
type: EventType.IncrementalSnapshot;
|
|
148
|
-
data: incrementalData;
|
|
149
|
-
};
|
|
150
|
-
type metaEvent = {
|
|
151
|
-
type: EventType.Meta;
|
|
152
|
-
data: {
|
|
153
|
-
href: string;
|
|
154
|
-
width: number;
|
|
155
|
-
height: number;
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
type customEvent<T = unknown> = {
|
|
159
|
-
type: EventType.Custom;
|
|
160
|
-
data: {
|
|
161
|
-
tag: string;
|
|
162
|
-
payload: T;
|
|
163
|
-
};
|
|
164
|
-
};
|
|
165
|
-
type pluginEvent<T = unknown> = {
|
|
166
|
-
type: EventType.Plugin;
|
|
167
|
-
data: {
|
|
168
|
-
plugin: string;
|
|
169
|
-
payload: T;
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
declare enum IncrementalSource {
|
|
173
|
-
Mutation = 0,
|
|
174
|
-
MouseMove = 1,
|
|
175
|
-
MouseInteraction = 2,
|
|
176
|
-
Scroll = 3,
|
|
177
|
-
ViewportResize = 4,
|
|
178
|
-
Input = 5,
|
|
179
|
-
TouchMove = 6,
|
|
180
|
-
MediaInteraction = 7,
|
|
181
|
-
StyleSheetRule = 8,
|
|
182
|
-
CanvasMutation = 9,
|
|
183
|
-
Font = 10,
|
|
184
|
-
Log = 11,
|
|
185
|
-
Drag = 12,
|
|
186
|
-
StyleDeclaration = 13,
|
|
187
|
-
Selection = 14,
|
|
188
|
-
AdoptedStyleSheet = 15
|
|
189
|
-
}
|
|
190
|
-
type mutationData = {
|
|
191
|
-
source: IncrementalSource.Mutation;
|
|
192
|
-
} & mutationCallbackParam;
|
|
193
|
-
type mousemoveData = {
|
|
194
|
-
source: IncrementalSource.MouseMove | IncrementalSource.TouchMove | IncrementalSource.Drag;
|
|
195
|
-
positions: mousePosition[];
|
|
196
|
-
};
|
|
197
|
-
type mouseInteractionData = {
|
|
198
|
-
source: IncrementalSource.MouseInteraction;
|
|
199
|
-
} & mouseInteractionParam;
|
|
200
|
-
type scrollData = {
|
|
201
|
-
source: IncrementalSource.Scroll;
|
|
202
|
-
} & scrollPosition;
|
|
203
|
-
type viewportResizeData = {
|
|
204
|
-
source: IncrementalSource.ViewportResize;
|
|
205
|
-
} & viewportResizeDimension;
|
|
206
|
-
type inputData = {
|
|
207
|
-
source: IncrementalSource.Input;
|
|
208
|
-
id: number;
|
|
209
|
-
} & inputValue;
|
|
210
|
-
type mediaInteractionData = {
|
|
211
|
-
source: IncrementalSource.MediaInteraction;
|
|
212
|
-
} & mediaInteractionParam;
|
|
213
|
-
type styleSheetRuleData = {
|
|
214
|
-
source: IncrementalSource.StyleSheetRule;
|
|
215
|
-
} & styleSheetRuleParam;
|
|
216
|
-
type styleDeclarationData = {
|
|
217
|
-
source: IncrementalSource.StyleDeclaration;
|
|
218
|
-
} & styleDeclarationParam;
|
|
219
|
-
type canvasMutationData = {
|
|
220
|
-
source: IncrementalSource.CanvasMutation;
|
|
221
|
-
} & canvasMutationParam;
|
|
222
|
-
type fontData = {
|
|
223
|
-
source: IncrementalSource.Font;
|
|
224
|
-
} & fontParam;
|
|
225
|
-
type selectionData = {
|
|
226
|
-
source: IncrementalSource.Selection;
|
|
227
|
-
} & selectionParam;
|
|
228
|
-
type adoptedStyleSheetData = {
|
|
229
|
-
source: IncrementalSource.AdoptedStyleSheet;
|
|
230
|
-
} & adoptedStyleSheetParam;
|
|
231
|
-
type incrementalData = mutationData | mousemoveData | mouseInteractionData | scrollData | viewportResizeData | inputData | mediaInteractionData | styleSheetRuleData | canvasMutationData | fontData | selectionData | styleDeclarationData | adoptedStyleSheetData;
|
|
232
|
-
type event = domContentLoadedEvent | loadedEvent | fullSnapshotEvent | incrementalSnapshotEvent | metaEvent | customEvent | pluginEvent;
|
|
233
|
-
type eventWithTime = event & {
|
|
234
|
-
timestamp: number;
|
|
235
|
-
delay?: number;
|
|
236
|
-
};
|
|
237
|
-
type canvasEventWithTime = eventWithTime & {
|
|
238
|
-
type: EventType.IncrementalSnapshot;
|
|
239
|
-
data: canvasMutationData;
|
|
240
|
-
};
|
|
241
|
-
type blockClass = string | RegExp;
|
|
242
|
-
type maskTextClass = string | RegExp;
|
|
243
|
-
type SamplingStrategy = Partial<{
|
|
244
|
-
mousemove: boolean | number;
|
|
245
|
-
mousemoveCallback: number;
|
|
246
|
-
mouseInteraction: boolean | Record<string, boolean | undefined>;
|
|
247
|
-
scroll: number;
|
|
248
|
-
media: number;
|
|
249
|
-
input: 'all' | 'last';
|
|
250
|
-
canvas: 'all' | number;
|
|
251
|
-
}>;
|
|
252
|
-
interface ICrossOriginIframeMirror {
|
|
253
|
-
getId(iframe: HTMLIFrameElement, remoteId: number, parentToRemoteMap?: Map<number, number>, remoteToParentMap?: Map<number, number>): number;
|
|
254
|
-
getIds(iframe: HTMLIFrameElement, remoteId: number[]): number[];
|
|
255
|
-
getRemoteId(iframe: HTMLIFrameElement, parentId: number, map?: Map<number, number>): number;
|
|
256
|
-
getRemoteIds(iframe: HTMLIFrameElement, parentId: number[]): number[];
|
|
257
|
-
reset(iframe?: HTMLIFrameElement): void;
|
|
258
|
-
}
|
|
259
|
-
type RecordPlugin<TOptions = unknown> = {
|
|
260
|
-
name: string;
|
|
261
|
-
observer?: (cb: (...args: Array<unknown>) => void, win: IWindow, options: TOptions) => listenerHandler;
|
|
262
|
-
eventProcessor?: <TExtend>(event: eventWithTime) => eventWithTime & TExtend;
|
|
263
|
-
getMirror?: (mirrors: {
|
|
264
|
-
nodeMirror: Mirror$1;
|
|
265
|
-
crossOriginIframeMirror: ICrossOriginIframeMirror;
|
|
266
|
-
crossOriginIframeStyleMirror: ICrossOriginIframeMirror;
|
|
267
|
-
}) => void;
|
|
268
|
-
options: TOptions;
|
|
269
|
-
};
|
|
270
|
-
type hooksParam = {
|
|
271
|
-
mutation?: mutationCallBack;
|
|
272
|
-
mousemove?: mousemoveCallBack;
|
|
273
|
-
mouseInteraction?: mouseInteractionCallBack;
|
|
274
|
-
scroll?: scrollCallback;
|
|
275
|
-
viewportResize?: viewportResizeCallback;
|
|
276
|
-
input?: inputCallback;
|
|
277
|
-
mediaInteaction?: mediaInteractionCallback;
|
|
278
|
-
styleSheetRule?: styleSheetRuleCallback;
|
|
279
|
-
styleDeclaration?: styleDeclarationCallback;
|
|
280
|
-
canvasMutation?: canvasMutationCallback;
|
|
281
|
-
font?: fontCallback;
|
|
282
|
-
selection?: selectionCallback;
|
|
283
|
-
};
|
|
284
|
-
type textMutation = {
|
|
285
|
-
id: number;
|
|
286
|
-
value: string | null;
|
|
287
|
-
};
|
|
288
|
-
type styleOMValue = {
|
|
289
|
-
[key: string]: styleValueWithPriority | string | false;
|
|
290
|
-
};
|
|
291
|
-
type styleValueWithPriority = [string, string];
|
|
292
|
-
type attributeMutation = {
|
|
293
|
-
id: number;
|
|
294
|
-
attributes: {
|
|
295
|
-
[key: string]: string | styleOMValue | null;
|
|
296
|
-
};
|
|
297
|
-
};
|
|
298
|
-
type removedNodeMutation = {
|
|
299
|
-
parentId: number;
|
|
300
|
-
id: number;
|
|
301
|
-
isShadow?: boolean;
|
|
302
|
-
};
|
|
303
|
-
type addedNodeMutation = {
|
|
304
|
-
parentId: number;
|
|
305
|
-
previousId?: number | null;
|
|
306
|
-
nextId: number | null;
|
|
307
|
-
node: serializedNodeWithId;
|
|
308
|
-
};
|
|
309
|
-
type mutationCallbackParam = {
|
|
310
|
-
texts: textMutation[];
|
|
311
|
-
attributes: attributeMutation[];
|
|
312
|
-
removes: removedNodeMutation[];
|
|
313
|
-
adds: addedNodeMutation[];
|
|
314
|
-
isAttachIframe?: true;
|
|
315
|
-
};
|
|
316
|
-
type mutationCallBack = (m: mutationCallbackParam) => void;
|
|
317
|
-
type mousemoveCallBack = (p: mousePosition[], source: IncrementalSource.MouseMove | IncrementalSource.TouchMove | IncrementalSource.Drag) => void;
|
|
318
|
-
type mousePosition = {
|
|
319
|
-
x: number;
|
|
320
|
-
y: number;
|
|
321
|
-
id: number;
|
|
322
|
-
timeOffset: number;
|
|
323
|
-
};
|
|
324
|
-
declare enum MouseInteractions {
|
|
325
|
-
MouseUp = 0,
|
|
326
|
-
MouseDown = 1,
|
|
327
|
-
Click = 2,
|
|
328
|
-
ContextMenu = 3,
|
|
329
|
-
DblClick = 4,
|
|
330
|
-
Focus = 5,
|
|
331
|
-
Blur = 6,
|
|
332
|
-
TouchStart = 7,
|
|
333
|
-
TouchMove_Departed = 8,
|
|
334
|
-
TouchEnd = 9,
|
|
335
|
-
TouchCancel = 10
|
|
336
|
-
}
|
|
337
|
-
declare enum PointerTypes {
|
|
338
|
-
Mouse = 0,
|
|
339
|
-
Pen = 1,
|
|
340
|
-
Touch = 2
|
|
341
|
-
}
|
|
342
|
-
declare enum CanvasContext {
|
|
343
|
-
'2D' = 0,
|
|
344
|
-
WebGL = 1,
|
|
345
|
-
WebGL2 = 2
|
|
346
|
-
}
|
|
347
|
-
type mouseInteractionParam = {
|
|
348
|
-
type: MouseInteractions;
|
|
349
|
-
id: number;
|
|
350
|
-
x: number;
|
|
351
|
-
y: number;
|
|
352
|
-
pointerType?: PointerTypes;
|
|
353
|
-
};
|
|
354
|
-
type mouseInteractionCallBack = (d: mouseInteractionParam) => void;
|
|
355
|
-
type scrollPosition = {
|
|
356
|
-
id: number;
|
|
357
|
-
x: number;
|
|
358
|
-
y: number;
|
|
359
|
-
};
|
|
360
|
-
type scrollCallback = (p: scrollPosition) => void;
|
|
361
|
-
type styleSheetAddRule = {
|
|
362
|
-
rule: string;
|
|
363
|
-
index?: number | number[];
|
|
364
|
-
};
|
|
365
|
-
type styleSheetDeleteRule = {
|
|
366
|
-
index: number | number[];
|
|
367
|
-
};
|
|
368
|
-
type styleSheetRuleParam = {
|
|
369
|
-
id?: number;
|
|
370
|
-
styleId?: number;
|
|
371
|
-
removes?: styleSheetDeleteRule[];
|
|
372
|
-
adds?: styleSheetAddRule[];
|
|
373
|
-
replace?: string;
|
|
374
|
-
replaceSync?: string;
|
|
375
|
-
};
|
|
376
|
-
type styleSheetRuleCallback = (s: styleSheetRuleParam) => void;
|
|
377
|
-
type adoptedStyleSheetParam = {
|
|
378
|
-
id: number;
|
|
379
|
-
styles?: {
|
|
380
|
-
styleId: number;
|
|
381
|
-
rules: styleSheetAddRule[];
|
|
382
|
-
}[];
|
|
383
|
-
styleIds: number[];
|
|
384
|
-
};
|
|
385
|
-
type styleDeclarationParam = {
|
|
386
|
-
id?: number;
|
|
387
|
-
styleId?: number;
|
|
388
|
-
index: number[];
|
|
389
|
-
set?: {
|
|
390
|
-
property: string;
|
|
391
|
-
value: string | null;
|
|
392
|
-
priority: string | undefined;
|
|
393
|
-
};
|
|
394
|
-
remove?: {
|
|
395
|
-
property: string;
|
|
396
|
-
};
|
|
397
|
-
};
|
|
398
|
-
type styleDeclarationCallback = (s: styleDeclarationParam) => void;
|
|
399
|
-
type canvasMutationCommand = {
|
|
400
|
-
property: string;
|
|
401
|
-
args: Array<unknown>;
|
|
402
|
-
setter?: true;
|
|
403
|
-
};
|
|
404
|
-
type canvasMutationParam = {
|
|
405
|
-
id: number;
|
|
406
|
-
type: CanvasContext;
|
|
407
|
-
commands: canvasMutationCommand[];
|
|
408
|
-
} | ({
|
|
409
|
-
id: number;
|
|
410
|
-
type: CanvasContext;
|
|
411
|
-
} & canvasMutationCommand);
|
|
412
|
-
type canvasMutationCallback = (p: canvasMutationParam) => void;
|
|
413
|
-
type fontParam = {
|
|
414
|
-
family: string;
|
|
415
|
-
fontSource: string;
|
|
416
|
-
buffer: boolean;
|
|
417
|
-
descriptors?: FontFaceDescriptors;
|
|
418
|
-
};
|
|
419
|
-
type fontCallback = (p: fontParam) => void;
|
|
420
|
-
type viewportResizeDimension = {
|
|
421
|
-
width: number;
|
|
422
|
-
height: number;
|
|
423
|
-
};
|
|
424
|
-
type viewportResizeCallback = (d: viewportResizeDimension) => void;
|
|
425
|
-
type inputValue = {
|
|
426
|
-
text: string;
|
|
427
|
-
isChecked: boolean;
|
|
428
|
-
userTriggered?: boolean;
|
|
429
|
-
};
|
|
430
|
-
type inputCallback = (v: inputValue & {
|
|
431
|
-
id: number;
|
|
432
|
-
}) => void;
|
|
433
|
-
declare const enum MediaInteractions {
|
|
434
|
-
Play = 0,
|
|
435
|
-
Pause = 1,
|
|
436
|
-
Seeked = 2,
|
|
437
|
-
VolumeChange = 3,
|
|
438
|
-
RateChange = 4
|
|
439
|
-
}
|
|
440
|
-
type mediaInteractionParam = {
|
|
441
|
-
type: MediaInteractions;
|
|
442
|
-
id: number;
|
|
443
|
-
currentTime?: number;
|
|
444
|
-
volume?: number;
|
|
445
|
-
muted?: boolean;
|
|
446
|
-
playbackRate?: number;
|
|
447
|
-
};
|
|
448
|
-
type mediaInteractionCallback = (p: mediaInteractionParam) => void;
|
|
449
|
-
type DocumentDimension = {
|
|
450
|
-
x: number;
|
|
451
|
-
y: number;
|
|
452
|
-
relativeScale: number;
|
|
453
|
-
absoluteScale: number;
|
|
454
|
-
};
|
|
455
|
-
type SelectionRange = {
|
|
456
|
-
start: number;
|
|
457
|
-
startOffset: number;
|
|
458
|
-
end: number;
|
|
459
|
-
endOffset: number;
|
|
460
|
-
};
|
|
461
|
-
type selectionParam = {
|
|
462
|
-
ranges: Array<SelectionRange>;
|
|
463
|
-
};
|
|
464
|
-
type selectionCallback = (p: selectionParam) => void;
|
|
465
|
-
type DeprecatedMirror = {
|
|
466
|
-
map: {
|
|
467
|
-
[key: number]: INode;
|
|
468
|
-
};
|
|
469
|
-
getId: (n: Node) => number;
|
|
470
|
-
getNode: (id: number) => INode | null;
|
|
471
|
-
removeNodeFromMap: (n: Node) => void;
|
|
472
|
-
has: (id: number) => boolean;
|
|
473
|
-
reset: () => void;
|
|
474
|
-
};
|
|
475
|
-
type throttleOptions = {
|
|
476
|
-
leading?: boolean;
|
|
477
|
-
trailing?: boolean;
|
|
478
|
-
};
|
|
479
|
-
type listenerHandler = () => void;
|
|
480
|
-
type hookResetter = () => void;
|
|
481
|
-
type playerMetaData = {
|
|
482
|
-
startTime: number;
|
|
483
|
-
endTime: number;
|
|
484
|
-
totalTime: number;
|
|
485
|
-
};
|
|
486
|
-
type actionWithDelay = {
|
|
487
|
-
doAction: () => void;
|
|
488
|
-
delay: number;
|
|
489
|
-
};
|
|
490
|
-
type Handler = (event?: unknown) => void;
|
|
491
|
-
type Emitter$1 = {
|
|
492
|
-
on(type: string, handler: Handler): void;
|
|
493
|
-
emit(type: string, event?: unknown): void;
|
|
494
|
-
off(type: string, handler: Handler): void;
|
|
495
|
-
};
|
|
496
|
-
declare enum ReplayerEvents {
|
|
497
|
-
Start = "start",
|
|
498
|
-
Pause = "pause",
|
|
499
|
-
Resume = "resume",
|
|
500
|
-
Resize = "resize",
|
|
501
|
-
Finish = "finish",
|
|
502
|
-
FullsnapshotRebuilded = "fullsnapshot-rebuilded",
|
|
503
|
-
LoadStylesheetStart = "load-stylesheet-start",
|
|
504
|
-
LoadStylesheetEnd = "load-stylesheet-end",
|
|
505
|
-
SkipStart = "skip-start",
|
|
506
|
-
SkipEnd = "skip-end",
|
|
507
|
-
MouseInteraction = "mouse-interaction",
|
|
508
|
-
EventCast = "event-cast",
|
|
509
|
-
CustomEvent = "custom-event",
|
|
510
|
-
Flush = "flush",
|
|
511
|
-
StateChange = "state-change",
|
|
512
|
-
PlayBack = "play-back",
|
|
513
|
-
Destroy = "destroy"
|
|
514
|
-
}
|
|
515
|
-
type KeepIframeSrcFn = (src: string) => boolean;
|
|
516
|
-
declare global {
|
|
517
|
-
interface Window {
|
|
518
|
-
FontFace: typeof FontFace;
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
type IWindow = Window & typeof globalThis;
|
|
522
|
-
|
|
523
|
-
type PackFn = (event: eventWithTime) => string;
|
|
524
|
-
type UnpackFn = (raw: string) => eventWithTime;
|
|
525
|
-
|
|
526
|
-
interface IRRNode {
|
|
527
|
-
parentElement: IRRNode | null;
|
|
528
|
-
parentNode: IRRNode | null;
|
|
529
|
-
ownerDocument: IRRDocument;
|
|
530
|
-
readonly childNodes: IRRNode[];
|
|
531
|
-
readonly ELEMENT_NODE: number;
|
|
532
|
-
readonly TEXT_NODE: number;
|
|
533
|
-
readonly nodeType: number;
|
|
534
|
-
readonly nodeName: string;
|
|
535
|
-
readonly RRNodeType: NodeType;
|
|
536
|
-
firstChild: IRRNode | null;
|
|
537
|
-
lastChild: IRRNode | null;
|
|
538
|
-
previousSibling: IRRNode | null;
|
|
539
|
-
nextSibling: IRRNode | null;
|
|
540
|
-
textContent: string | null;
|
|
541
|
-
contains(node: IRRNode): boolean;
|
|
542
|
-
appendChild(newChild: IRRNode): IRRNode;
|
|
543
|
-
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
544
|
-
removeChild(node: IRRNode): IRRNode;
|
|
545
|
-
toString(): string;
|
|
546
|
-
}
|
|
547
|
-
interface IRRDocument extends IRRNode {
|
|
548
|
-
documentElement: IRRElement | null;
|
|
549
|
-
body: IRRElement | null;
|
|
550
|
-
head: IRRElement | null;
|
|
551
|
-
implementation: IRRDocument;
|
|
552
|
-
firstElementChild: IRRElement | null;
|
|
553
|
-
readonly nodeName: '#document';
|
|
554
|
-
compatMode: 'BackCompat' | 'CSS1Compat';
|
|
555
|
-
createDocument(_namespace: string | null, _qualifiedName: string | null, _doctype?: DocumentType | null): IRRDocument;
|
|
556
|
-
createDocumentType(qualifiedName: string, publicId: string, systemId: string): IRRDocumentType;
|
|
557
|
-
createElement(tagName: string): IRRElement;
|
|
558
|
-
createElementNS(_namespaceURI: string, qualifiedName: string): IRRElement;
|
|
559
|
-
createTextNode(data: string): IRRText;
|
|
560
|
-
createComment(data: string): IRRComment;
|
|
561
|
-
createCDATASection(data: string): IRRCDATASection;
|
|
562
|
-
open(): void;
|
|
563
|
-
close(): void;
|
|
564
|
-
write(content: string): void;
|
|
565
|
-
}
|
|
566
|
-
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;
|
|
567
35
|
tagName: string;
|
|
568
|
-
attributes:
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
readonly systemId: string;
|
|
587
|
-
}
|
|
588
|
-
interface IRRText extends IRRNode {
|
|
589
|
-
readonly nodeName: '#text';
|
|
590
|
-
data: string;
|
|
591
|
-
}
|
|
592
|
-
interface IRRComment extends IRRNode {
|
|
593
|
-
readonly nodeName: '#comment';
|
|
594
|
-
data: string;
|
|
595
|
-
}
|
|
596
|
-
interface IRRCDATASection extends IRRNode {
|
|
597
|
-
readonly nodeName: '#cdata-section';
|
|
598
|
-
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;
|
|
599
54
|
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
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;
|
|
621
92
|
}
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
93
|
+
|
|
94
|
+
declare enum NodeType {
|
|
95
|
+
Document = 0,
|
|
96
|
+
DocumentType = 1,
|
|
97
|
+
Element = 2,
|
|
98
|
+
Text = 3,
|
|
99
|
+
CDATA = 4,
|
|
100
|
+
Comment = 5
|
|
628
101
|
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
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;
|
|
632
131
|
};
|
|
633
132
|
|
|
634
|
-
declare
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
toString(): string;
|
|
659
|
-
parentElement: IRRNode | null;
|
|
660
|
-
parentNode: IRRNode | null;
|
|
661
|
-
ownerDocument: IRRDocument;
|
|
662
|
-
readonly childNodes: IRRNode[];
|
|
663
|
-
readonly ELEMENT_NODE: number;
|
|
664
|
-
readonly TEXT_NODE: number;
|
|
665
|
-
firstChild: IRRNode | null;
|
|
666
|
-
lastChild: IRRNode | null;
|
|
667
|
-
previousSibling: IRRNode | null;
|
|
668
|
-
nextSibling: IRRNode | null;
|
|
669
|
-
textContent: string | null;
|
|
670
|
-
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;
|
|
671
157
|
};
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
createDocument(_namespace: string | null, _qualifiedName: string | null, _doctype?: DocumentType | null): RRDocument;
|
|
681
|
-
createDocumentType(qualifiedName: string, publicId: string, systemId: string): {
|
|
682
|
-
readonly nodeType: number;
|
|
683
|
-
readonly RRNodeType: NodeType.DocumentType;
|
|
684
|
-
readonly nodeName: string;
|
|
685
|
-
readonly name: string;
|
|
686
|
-
readonly publicId: string;
|
|
687
|
-
readonly systemId: string;
|
|
688
|
-
toString(): string;
|
|
689
|
-
parentElement: IRRNode | null;
|
|
690
|
-
parentNode: IRRNode | null;
|
|
691
|
-
ownerDocument: IRRDocument;
|
|
692
|
-
readonly childNodes: IRRNode[];
|
|
693
|
-
readonly ELEMENT_NODE: number;
|
|
694
|
-
readonly TEXT_NODE: number;
|
|
695
|
-
firstChild: IRRNode | null;
|
|
696
|
-
lastChild: IRRNode | null;
|
|
697
|
-
previousSibling: IRRNode | null;
|
|
698
|
-
nextSibling: IRRNode | null;
|
|
699
|
-
textContent: string | null;
|
|
700
|
-
contains(node: IRRNode): boolean;
|
|
701
|
-
appendChild(newChild: IRRNode): IRRNode;
|
|
702
|
-
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
703
|
-
removeChild(node: IRRNode): IRRNode;
|
|
704
|
-
} & BaseRRNode;
|
|
705
|
-
createElement<K extends keyof HTMLElementTagNameMap>(tagName: K): RRElementType<K>;
|
|
706
|
-
createElement(tagName: string): RRElement;
|
|
707
|
-
createComment(data: string): {
|
|
708
|
-
readonly nodeType: number;
|
|
709
|
-
readonly nodeName: "#comment";
|
|
710
|
-
readonly RRNodeType: NodeType.Comment;
|
|
711
|
-
data: string;
|
|
712
|
-
textContent: string;
|
|
713
|
-
toString(): string;
|
|
714
|
-
parentElement: IRRNode | null;
|
|
715
|
-
parentNode: IRRNode | null;
|
|
716
|
-
ownerDocument: IRRDocument;
|
|
717
|
-
readonly childNodes: IRRNode[];
|
|
718
|
-
readonly ELEMENT_NODE: number;
|
|
719
|
-
readonly TEXT_NODE: number;
|
|
720
|
-
firstChild: IRRNode | null;
|
|
721
|
-
lastChild: IRRNode | null;
|
|
722
|
-
previousSibling: IRRNode | null;
|
|
723
|
-
nextSibling: IRRNode | null;
|
|
724
|
-
contains(node: IRRNode): boolean;
|
|
725
|
-
appendChild(newChild: IRRNode): IRRNode;
|
|
726
|
-
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
727
|
-
removeChild(node: IRRNode): IRRNode;
|
|
728
|
-
} & BaseRRNode;
|
|
729
|
-
createCDATASection(data: string): {
|
|
730
|
-
readonly nodeName: "#cdata-section";
|
|
731
|
-
readonly nodeType: number;
|
|
732
|
-
readonly RRNodeType: NodeType.CDATA;
|
|
733
|
-
data: string;
|
|
734
|
-
textContent: string;
|
|
735
|
-
toString(): string;
|
|
736
|
-
parentElement: IRRNode | null;
|
|
737
|
-
parentNode: IRRNode | null;
|
|
738
|
-
ownerDocument: IRRDocument;
|
|
739
|
-
readonly childNodes: IRRNode[];
|
|
740
|
-
readonly ELEMENT_NODE: number;
|
|
741
|
-
readonly TEXT_NODE: number;
|
|
742
|
-
firstChild: IRRNode | null;
|
|
743
|
-
lastChild: IRRNode | null;
|
|
744
|
-
previousSibling: IRRNode | null;
|
|
745
|
-
nextSibling: IRRNode | null;
|
|
746
|
-
contains(node: IRRNode): boolean;
|
|
747
|
-
appendChild(newChild: IRRNode): IRRNode;
|
|
748
|
-
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
749
|
-
removeChild(node: IRRNode): IRRNode;
|
|
750
|
-
} & BaseRRNode;
|
|
751
|
-
createTextNode(data: string): {
|
|
752
|
-
readonly nodeType: number;
|
|
753
|
-
readonly nodeName: "#text";
|
|
754
|
-
readonly RRNodeType: NodeType.Text;
|
|
755
|
-
data: string;
|
|
756
|
-
textContent: string;
|
|
757
|
-
toString(): string;
|
|
758
|
-
parentElement: IRRNode | null;
|
|
759
|
-
parentNode: IRRNode | null;
|
|
760
|
-
ownerDocument: IRRDocument;
|
|
761
|
-
readonly childNodes: IRRNode[];
|
|
762
|
-
readonly ELEMENT_NODE: number;
|
|
763
|
-
readonly TEXT_NODE: number;
|
|
764
|
-
firstChild: IRRNode | null;
|
|
765
|
-
lastChild: IRRNode | null;
|
|
766
|
-
previousSibling: IRRNode | null;
|
|
767
|
-
nextSibling: IRRNode | null;
|
|
768
|
-
contains(node: IRRNode): boolean;
|
|
769
|
-
appendChild(newChild: IRRNode): IRRNode;
|
|
770
|
-
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
771
|
-
removeChild(node: IRRNode): IRRNode;
|
|
772
|
-
} & BaseRRNode;
|
|
773
|
-
destroyTree(): void;
|
|
774
|
-
open(): void;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
declare type blockClass = string | RegExp;
|
|
161
|
+
|
|
162
|
+
declare enum CanvasContext {
|
|
163
|
+
'2D' = 0,
|
|
164
|
+
WebGL = 1,
|
|
165
|
+
WebGL2 = 2
|
|
775
166
|
}
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
firstChild: IRRNode | null;
|
|
808
|
-
lastChild: IRRNode | null;
|
|
809
|
-
previousSibling: IRRNode | null;
|
|
810
|
-
nextSibling: IRRNode | null;
|
|
811
|
-
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;
|
|
812
198
|
};
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
currentTime?: number | undefined;
|
|
821
|
-
volume?: number | undefined;
|
|
822
|
-
paused?: boolean | undefined;
|
|
823
|
-
muted?: boolean | undefined;
|
|
824
|
-
playbackRate?: number | undefined;
|
|
825
|
-
attachShadow(_init: ShadowRootInit): IRRElement;
|
|
826
|
-
play(): void;
|
|
827
|
-
pause(): void;
|
|
828
|
-
tagName: string;
|
|
829
|
-
attributes: Record<string, string>;
|
|
830
|
-
shadowRoot: IRRElement | null;
|
|
831
|
-
scrollLeft?: number | undefined;
|
|
832
|
-
scrollTop?: number | undefined;
|
|
833
|
-
id: string;
|
|
834
|
-
className: string;
|
|
835
|
-
classList: ClassList;
|
|
836
|
-
style: CSSStyleDeclaration;
|
|
837
|
-
getAttribute(name: string): string | null;
|
|
838
|
-
setAttribute(name: string, attribute: string): void;
|
|
839
|
-
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
840
|
-
removeAttribute(name: string): void;
|
|
841
|
-
dispatchEvent(event: Event): boolean;
|
|
842
|
-
parentElement: IRRNode | null;
|
|
843
|
-
parentNode: IRRNode | null;
|
|
844
|
-
ownerDocument: IRRDocument;
|
|
845
|
-
readonly childNodes: IRRNode[];
|
|
846
|
-
readonly ELEMENT_NODE: number;
|
|
847
|
-
readonly TEXT_NODE: number;
|
|
848
|
-
readonly nodeType: number;
|
|
849
|
-
readonly nodeName: string;
|
|
850
|
-
readonly RRNodeType: NodeType;
|
|
851
|
-
firstChild: IRRNode | null;
|
|
852
|
-
lastChild: IRRNode | null;
|
|
853
|
-
previousSibling: IRRNode | null;
|
|
854
|
-
nextSibling: IRRNode | null;
|
|
855
|
-
textContent: string | null;
|
|
856
|
-
contains(node: IRRNode): boolean;
|
|
857
|
-
appendChild(newChild: IRRNode): IRRNode;
|
|
858
|
-
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
859
|
-
removeChild(node: IRRNode): IRRNode;
|
|
860
|
-
toString(): string;
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
declare type customEvent<T = unknown> = {
|
|
202
|
+
type: EventType.Custom;
|
|
203
|
+
data: {
|
|
204
|
+
tag: string;
|
|
205
|
+
payload: T;
|
|
861
206
|
};
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
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
|
|
872
222
|
}
|
|
873
|
-
|
|
874
|
-
|
|
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;
|
|
875
277
|
}
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
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
|
|
879
304
|
}
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
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
|
|
886
356
|
}
|
|
887
|
-
|
|
888
|
-
declare
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
declare
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
declare function polyfill(win?: Window & typeof globalThis): void;
|
|
924
|
-
type ResolveTree = {
|
|
925
|
-
value: addedNodeMutation;
|
|
926
|
-
children: ResolveTree[];
|
|
927
|
-
parent: ResolveTree | null;
|
|
928
|
-
};
|
|
929
|
-
declare function queueToResolveTrees(queue: addedNodeMutation[]): ResolveTree[];
|
|
930
|
-
declare function iterateResolveTree(tree: ResolveTree, cb: (mutation: addedNodeMutation) => unknown): void;
|
|
931
|
-
type AppendedIframe = {
|
|
932
|
-
mutationInQueue: addedNodeMutation;
|
|
933
|
-
builtNode: HTMLIFrameElement | RRIFrameElement;
|
|
934
|
-
};
|
|
935
|
-
declare function isSerializedIframe<TNode extends Node | BaseRRNode>(n: TNode, mirror: IMirror<TNode>): boolean;
|
|
936
|
-
declare function isSerializedStylesheet<TNode extends Node | BaseRRNode>(n: TNode, mirror: IMirror<TNode>): boolean;
|
|
937
|
-
declare function getBaseDimension(node: Node, rootIframe: Node): DocumentDimension;
|
|
938
|
-
declare function hasShadowRoot<T extends Node | BaseRRNode>(n: T): n is T & {
|
|
939
|
-
shadowRoot: ShadowRoot;
|
|
940
|
-
};
|
|
941
|
-
declare function getNestedRule(rules: CSSRuleList, position: number[]): CSSGroupingRule;
|
|
942
|
-
declare function getPositionsAndIndex(nestedIndex: number[]): {
|
|
943
|
-
positions: number[];
|
|
944
|
-
index: number | undefined;
|
|
945
|
-
};
|
|
946
|
-
declare function uniqueTextMutations(mutations: textMutation[]): textMutation[];
|
|
947
|
-
declare class StyleSheetMirror {
|
|
948
|
-
private id;
|
|
949
|
-
private styleIDMap;
|
|
950
|
-
private idStyleMap;
|
|
951
|
-
getId(stylesheet: CSSStyleSheet): number;
|
|
952
|
-
has(stylesheet: CSSStyleSheet): boolean;
|
|
953
|
-
add(stylesheet: CSSStyleSheet, id?: number): number;
|
|
954
|
-
getStyle(id: number): CSSStyleSheet | null;
|
|
955
|
-
reset(): void;
|
|
956
|
-
generateId(): number;
|
|
957
|
-
}
|
|
958
|
-
declare function getShadowHost(n: Node): Element | null;
|
|
959
|
-
declare function getRootShadowHost(n: Node): Node;
|
|
960
|
-
declare function shadowHostInDom(n: Node): boolean;
|
|
961
|
-
declare function inDom(n: Node): boolean;
|
|
962
|
-
|
|
963
|
-
type utils_d_AppendedIframe = AppendedIframe;
|
|
964
|
-
type utils_d_StyleSheetMirror = StyleSheetMirror;
|
|
965
|
-
declare const utils_d_StyleSheetMirror: typeof StyleSheetMirror;
|
|
966
|
-
declare const utils_d__mirror: typeof _mirror;
|
|
967
|
-
declare const utils_d_getBaseDimension: typeof getBaseDimension;
|
|
968
|
-
declare const utils_d_getNestedRule: typeof getNestedRule;
|
|
969
|
-
declare const utils_d_getPositionsAndIndex: typeof getPositionsAndIndex;
|
|
970
|
-
declare const utils_d_getRootShadowHost: typeof getRootShadowHost;
|
|
971
|
-
declare const utils_d_getShadowHost: typeof getShadowHost;
|
|
972
|
-
declare const utils_d_getWindowHeight: typeof getWindowHeight;
|
|
973
|
-
declare const utils_d_getWindowScroll: typeof getWindowScroll;
|
|
974
|
-
declare const utils_d_getWindowWidth: typeof getWindowWidth;
|
|
975
|
-
declare const utils_d_hasShadowRoot: typeof hasShadowRoot;
|
|
976
|
-
declare const utils_d_hookSetter: typeof hookSetter;
|
|
977
|
-
declare const utils_d_inDom: typeof inDom;
|
|
978
|
-
declare const utils_d_isAncestorRemoved: typeof isAncestorRemoved;
|
|
979
|
-
declare const utils_d_isBlocked: typeof isBlocked;
|
|
980
|
-
declare const utils_d_isIgnored: typeof isIgnored;
|
|
981
|
-
declare const utils_d_isSerialized: typeof isSerialized;
|
|
982
|
-
declare const utils_d_isSerializedIframe: typeof isSerializedIframe;
|
|
983
|
-
declare const utils_d_isSerializedStylesheet: typeof isSerializedStylesheet;
|
|
984
|
-
declare const utils_d_iterateResolveTree: typeof iterateResolveTree;
|
|
985
|
-
declare const utils_d_legacy_isTouchEvent: typeof legacy_isTouchEvent;
|
|
986
|
-
declare const utils_d_nowTimestamp: typeof nowTimestamp;
|
|
987
|
-
declare const utils_d_on: typeof on;
|
|
988
|
-
declare const utils_d_patch: typeof patch;
|
|
989
|
-
declare const utils_d_polyfill: typeof polyfill;
|
|
990
|
-
declare const utils_d_queueToResolveTrees: typeof queueToResolveTrees;
|
|
991
|
-
declare const utils_d_shadowHostInDom: typeof shadowHostInDom;
|
|
992
|
-
declare const utils_d_throttle: typeof throttle;
|
|
993
|
-
declare const utils_d_uniqueTextMutations: typeof uniqueTextMutations;
|
|
994
|
-
declare namespace utils_d {
|
|
995
|
-
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 };
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
declare class Timer {
|
|
999
|
-
timeOffset: number;
|
|
1000
|
-
speed: number;
|
|
1001
|
-
private actions;
|
|
1002
|
-
private raf;
|
|
1003
|
-
private lastTimestamp;
|
|
1004
|
-
constructor(actions: actionWithDelay[] | undefined, config: {
|
|
1005
|
-
speed: number;
|
|
1006
|
-
});
|
|
1007
|
-
addAction(action: actionWithDelay): void;
|
|
1008
|
-
start(): void;
|
|
1009
|
-
private rafCheck;
|
|
1010
|
-
clear(): void;
|
|
1011
|
-
setSpeed(speed: number): void;
|
|
1012
|
-
isActive(): boolean;
|
|
1013
|
-
private findActionIndex;
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
declare enum InterpreterStatus {
|
|
1017
|
-
NotStarted = 0,
|
|
1018
|
-
Running = 1,
|
|
1019
|
-
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
|
|
1020
393
|
}
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
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
|
|
1024
437
|
}
|
|
1025
|
-
|
|
1026
|
-
|
|
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>;
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
declare type SelectionRange = {
|
|
490
|
+
start: number;
|
|
491
|
+
startOffset: number;
|
|
492
|
+
end: number;
|
|
493
|
+
endOffset: number;
|
|
1027
494
|
};
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
target?: string;
|
|
1044
|
-
actions?: SingleOrArray<Action<TContext, TEvent>>;
|
|
1045
|
-
cond?: (context: TContext, event: TEvent) => boolean;
|
|
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;
|
|
1046
510
|
};
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
context: TContext;
|
|
1050
|
-
actions: Array<ActionObject<TContext, TEvent>>;
|
|
1051
|
-
changed?: boolean | undefined;
|
|
1052
|
-
matches: <TSV extends TState['value']>(value: TSV) => this is TState extends {
|
|
1053
|
-
value: TSV;
|
|
1054
|
-
} ? TState & {
|
|
1055
|
-
value: TSV;
|
|
1056
|
-
} : never;
|
|
1057
|
-
}
|
|
1058
|
-
type AnyState = State<any, any, any>;
|
|
1059
|
-
interface Config<TContext extends object, TEvent extends EventObject, TState extends Typestate<TContext> = {
|
|
1060
|
-
value: any;
|
|
1061
|
-
context: TContext;
|
|
1062
|
-
}> {
|
|
1063
|
-
id?: string;
|
|
1064
|
-
initial: string;
|
|
1065
|
-
context?: TContext;
|
|
1066
|
-
states: {
|
|
1067
|
-
[key in TState['value']]: {
|
|
1068
|
-
on?: {
|
|
1069
|
-
[K in TEvent['type']]?: SingleOrArray<Transition<TContext, TEvent extends {
|
|
1070
|
-
type: K;
|
|
1071
|
-
} ? TEvent : never>>;
|
|
1072
|
-
};
|
|
1073
|
-
exit?: SingleOrArray<Action<TContext, TEvent>>;
|
|
1074
|
-
entry?: SingleOrArray<Action<TContext, TEvent>>;
|
|
1075
|
-
};
|
|
1076
|
-
};
|
|
1077
|
-
}
|
|
1078
|
-
interface Machine<TContext extends object, TEvent extends EventObject, TState extends Typestate<TContext>> {
|
|
1079
|
-
config: StateMachine.Config<TContext, TEvent, TState>;
|
|
1080
|
-
initialState: State<TContext, TEvent, TState>;
|
|
1081
|
-
transition: (state: string | State<TContext, TEvent, TState>, event: TEvent['type'] | TEvent) => State<TContext, TEvent, TState>;
|
|
1082
|
-
}
|
|
1083
|
-
type StateListener<T extends AnyState> = (state: T) => void;
|
|
1084
|
-
interface Service<TContext extends object, TEvent extends EventObject, TState extends Typestate<TContext> = {
|
|
1085
|
-
value: any;
|
|
1086
|
-
context: TContext;
|
|
1087
|
-
}> {
|
|
1088
|
-
send: (event: TEvent | TEvent['type']) => void;
|
|
1089
|
-
subscribe: (listener: StateListener<State<TContext, TEvent, TState>>) => {
|
|
1090
|
-
unsubscribe: () => void;
|
|
1091
|
-
};
|
|
1092
|
-
start: (initialState?: TState['value'] | {
|
|
1093
|
-
context: TContext;
|
|
1094
|
-
value: TState['value'];
|
|
1095
|
-
}) => Service<TContext, TEvent, TState>;
|
|
1096
|
-
stop: () => Service<TContext, TEvent, TState>;
|
|
1097
|
-
readonly status: InterpreterStatus;
|
|
1098
|
-
readonly state: State<TContext, TEvent, TState>;
|
|
1099
|
-
}
|
|
1100
|
-
type Assigner<TContext extends object, TEvent extends EventObject> = (context: TContext, event: TEvent) => Partial<TContext>;
|
|
1101
|
-
type PropertyAssigner<TContext extends object, TEvent extends EventObject> = {
|
|
1102
|
-
[K in keyof TContext]?: ((context: TContext, event: TEvent) => TContext[K]) | TContext[K];
|
|
511
|
+
remove?: {
|
|
512
|
+
property: string;
|
|
1103
513
|
};
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
type
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
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
|
-
type PlayerAssets = {
|
|
1153
|
-
emitter: Emitter$1;
|
|
1154
|
-
applyEventsSynchronously(events: Array<eventWithTime>): void;
|
|
1155
|
-
getCastFn(event: eventWithTime, isSync: boolean): () => void;
|
|
1156
|
-
};
|
|
1157
|
-
declare function createPlayerService(context: PlayerContext, { getCastFn, applyEventsSynchronously, emitter }: PlayerAssets): StateMachine.Service<PlayerContext, PlayerEvent, PlayerState>;
|
|
1158
|
-
type SpeedContext = {
|
|
1159
|
-
normalSpeed: playerConfig['speed'];
|
|
1160
|
-
timer: Timer;
|
|
1161
|
-
};
|
|
1162
|
-
type SpeedEvent = {
|
|
1163
|
-
type: 'FAST_FORWARD';
|
|
1164
|
-
payload: {
|
|
1165
|
-
speed: playerConfig['speed'];
|
|
1166
|
-
};
|
|
1167
|
-
} | {
|
|
1168
|
-
type: 'BACK_TO_NORMAL';
|
|
1169
|
-
} | {
|
|
1170
|
-
type: 'SET_SPEED';
|
|
1171
|
-
payload: {
|
|
1172
|
-
speed: playerConfig['speed'];
|
|
1173
|
-
};
|
|
1174
|
-
};
|
|
1175
|
-
type SpeedState = {
|
|
1176
|
-
value: 'normal';
|
|
1177
|
-
context: SpeedContext;
|
|
1178
|
-
} | {
|
|
1179
|
-
value: 'skipping';
|
|
1180
|
-
context: SpeedContext;
|
|
1181
|
-
};
|
|
1182
|
-
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
|
+
|
|
1183
562
|
|
|
1184
|
-
declare class Replayer {
|
|
1185
|
-
wrapper: HTMLDivElement;
|
|
1186
|
-
iframe: HTMLIFrameElement;
|
|
1187
|
-
service: ReturnType<typeof createPlayerService>;
|
|
1188
|
-
speedService: ReturnType<typeof createSpeedService>;
|
|
1189
|
-
get timer(): Timer;
|
|
1190
|
-
config: playerConfig;
|
|
1191
|
-
usingVirtualDom: boolean;
|
|
1192
|
-
virtualDom: RRDocument;
|
|
1193
|
-
private mouse;
|
|
1194
|
-
private mouseTail;
|
|
1195
|
-
private tailPositions;
|
|
1196
|
-
private emitter;
|
|
1197
|
-
private nextUserInteractionEvent;
|
|
1198
|
-
private legacy_missingNodeRetryMap;
|
|
1199
|
-
private cache;
|
|
1200
|
-
private imageMap;
|
|
1201
|
-
private canvasEventMap;
|
|
1202
|
-
private mirror;
|
|
1203
|
-
private styleMirror;
|
|
1204
|
-
private firstFullSnapshot;
|
|
1205
|
-
private newDocumentQueue;
|
|
1206
|
-
private mousePos;
|
|
1207
|
-
private touchActive;
|
|
1208
|
-
private lastMouseDownEvent;
|
|
1209
|
-
private lastHoveredRootNode;
|
|
1210
|
-
private lastSelectionData;
|
|
1211
|
-
private constructedStyleMutations;
|
|
1212
|
-
private adoptedStyleSheets;
|
|
1213
|
-
constructor(events: Array<eventWithTime | string>, config?: Partial<playerConfig>);
|
|
1214
|
-
on(event: string, handler: Handler): this;
|
|
1215
|
-
off(event: string, handler: Handler): this;
|
|
1216
|
-
setConfig(config: Partial<playerConfig>): void;
|
|
1217
|
-
getMetaData(): playerMetaData;
|
|
1218
|
-
getCurrentTime(): number;
|
|
1219
|
-
getTimeOffset(): number;
|
|
1220
|
-
getMirror(): Mirror$1;
|
|
1221
|
-
play(timeOffset?: number): void;
|
|
1222
|
-
pause(timeOffset?: number): void;
|
|
1223
|
-
resume(timeOffset?: number): void;
|
|
1224
|
-
destroy(): void;
|
|
1225
|
-
startLive(baselineTime?: number): void;
|
|
1226
|
-
addEvent(rawEvent: eventWithTime | string): void;
|
|
1227
|
-
enableInteract(): void;
|
|
1228
|
-
disableInteract(): void;
|
|
1229
|
-
resetCache(): void;
|
|
1230
|
-
private setupDom;
|
|
1231
|
-
private handleResize;
|
|
1232
|
-
private applyEventsSynchronously;
|
|
1233
|
-
private getCastFn;
|
|
1234
|
-
private rebuildFullSnapshot;
|
|
1235
|
-
private insertStyleRules;
|
|
1236
|
-
private attachDocumentToIframe;
|
|
1237
|
-
private collectIframeAndAttachDocument;
|
|
1238
|
-
private waitForStylesheetLoad;
|
|
1239
|
-
private preloadAllImages;
|
|
1240
|
-
private preloadImages;
|
|
1241
|
-
private deserializeAndPreloadCanvasEvents;
|
|
1242
|
-
private applyIncremental;
|
|
1243
|
-
private applyMutation;
|
|
1244
|
-
private applyScroll;
|
|
1245
|
-
private applyInput;
|
|
1246
|
-
private applySelection;
|
|
1247
|
-
private applyStyleSheetMutation;
|
|
1248
|
-
private applyStyleSheetRule;
|
|
1249
|
-
private applyStyleDeclaration;
|
|
1250
|
-
private applyAdoptedStyleSheet;
|
|
1251
|
-
private legacy_resolveMissingNode;
|
|
1252
|
-
private moveAndHover;
|
|
1253
|
-
private drawMouseTail;
|
|
1254
|
-
private hoverElements;
|
|
1255
|
-
private isUserInteraction;
|
|
1256
|
-
private backToNormal;
|
|
1257
|
-
private warnNodeNotFound;
|
|
1258
|
-
private warnCanvasMutationFailed;
|
|
1259
|
-
private debugNodeNotFound;
|
|
1260
|
-
private warn;
|
|
1261
|
-
private debug;
|
|
1262
|
-
}
|
|
1263
563
|
|
|
1264
|
-
type recordOptions<T> = {
|
|
1265
|
-
emit?: (e: T, isCheckout?: boolean) => void;
|
|
1266
|
-
checkoutEveryNth?: number;
|
|
1267
|
-
checkoutEveryNms?: number;
|
|
1268
|
-
blockClass?: blockClass;
|
|
1269
|
-
blockSelector?: string;
|
|
1270
|
-
ignoreClass?: string;
|
|
1271
|
-
ignoreSelector?: string;
|
|
1272
|
-
maskTextClass?: maskTextClass;
|
|
1273
|
-
maskTextSelector?: string;
|
|
1274
|
-
maskAllInputs?: boolean;
|
|
1275
|
-
maskInputOptions?: MaskInputOptions;
|
|
1276
|
-
maskInputFn?: MaskInputFn;
|
|
1277
|
-
maskTextFn?: MaskTextFn;
|
|
1278
|
-
slimDOMOptions?: SlimDOMOptions | 'all' | true;
|
|
1279
|
-
ignoreCSSAttributes?: Set<string>;
|
|
1280
|
-
inlineStylesheet?: boolean;
|
|
1281
|
-
hooks?: hooksParam;
|
|
1282
|
-
packFn?: PackFn;
|
|
1283
|
-
sampling?: SamplingStrategy;
|
|
1284
|
-
dataURLOptions?: DataURLOptions;
|
|
1285
|
-
recordCanvas?: boolean;
|
|
1286
|
-
recordCrossOriginIframes?: boolean;
|
|
1287
|
-
recordAfter?: 'DOMContentLoaded' | 'load';
|
|
1288
|
-
userTriggeredOnInput?: boolean;
|
|
1289
|
-
collectFonts?: boolean;
|
|
1290
|
-
inlineImages?: boolean;
|
|
1291
|
-
plugins?: RecordPlugin[];
|
|
1292
|
-
mousemoveWait?: number;
|
|
1293
|
-
keepIframeSrcFn?: KeepIframeSrcFn;
|
|
1294
|
-
errorHandler?: ErrorHandler;
|
|
1295
|
-
};
|
|
1296
|
-
type ReplayPlugin = {
|
|
1297
|
-
handler?: (event: eventWithTime, isSync: boolean, context: {
|
|
1298
|
-
replayer: Replayer;
|
|
1299
|
-
}) => void;
|
|
1300
|
-
onBuild?: (node: Node | BaseRRNode, context: {
|
|
1301
|
-
id: number;
|
|
1302
|
-
replayer: Replayer;
|
|
1303
|
-
}) => void;
|
|
1304
|
-
getMirror?: (mirrors: {
|
|
1305
|
-
nodeMirror: Mirror$1;
|
|
1306
|
-
}) => void;
|
|
1307
|
-
};
|
|
1308
|
-
type playerConfig = {
|
|
1309
|
-
speed: number;
|
|
1310
|
-
maxSpeed: number;
|
|
1311
|
-
root: Element;
|
|
1312
|
-
loadTimeout: number;
|
|
1313
|
-
skipInactive: boolean;
|
|
1314
|
-
showWarning: boolean;
|
|
1315
|
-
showDebug: boolean;
|
|
1316
|
-
blockClass: string;
|
|
1317
|
-
liveMode: boolean;
|
|
1318
|
-
insertStyleRules: string[];
|
|
1319
|
-
triggerFocus: boolean;
|
|
1320
|
-
UNSAFE_replayCanvas: boolean;
|
|
1321
|
-
pauseAnimation?: boolean;
|
|
1322
|
-
mouseTail: boolean | {
|
|
1323
|
-
duration?: number;
|
|
1324
|
-
lineCap?: string;
|
|
1325
|
-
lineWidth?: number;
|
|
1326
|
-
strokeStyle?: string;
|
|
1327
|
-
};
|
|
1328
|
-
unpackFn?: UnpackFn;
|
|
1329
|
-
useVirtualDom: boolean;
|
|
1330
|
-
logger: {
|
|
1331
|
-
log: (...args: Parameters<typeof console.log>) => void;
|
|
1332
|
-
warn: (...args: Parameters<typeof console.warn>) => void;
|
|
1333
|
-
};
|
|
1334
|
-
plugins?: ReplayPlugin[];
|
|
1335
|
-
};
|
|
1336
564
|
declare global {
|
|
1337
565
|
interface Window {
|
|
1338
566
|
FontFace: typeof FontFace;
|
|
1339
567
|
}
|
|
1340
568
|
}
|
|
1341
|
-
type ErrorHandler = (error: unknown) => void | boolean;
|
|
1342
569
|
|
|
1343
|
-
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
|
+
|
|
1344
617
|
declare namespace record {
|
|
1345
618
|
var addCustomEvent: <T>(tag: string, payload: T) => void;
|
|
1346
619
|
var freezePage: () => void;
|
|
1347
620
|
var takeFullSnapshot: (isCheckout?: boolean | undefined) => void;
|
|
1348
|
-
var mirror: Mirror
|
|
621
|
+
var mirror: Mirror;
|
|
1349
622
|
}
|
|
1350
623
|
|
|
1351
|
-
declare const addCustomEvent: <T>(tag: string, payload: T) => void;
|
|
1352
|
-
declare const freezePage: () => void;
|
|
1353
624
|
|
|
1354
|
-
declare
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
numOfKeysLimit: number;
|
|
1361
|
-
depthOfLimit: number;
|
|
1362
|
-
};
|
|
1363
|
-
type LogRecordOptions = {
|
|
1364
|
-
level?: LogLevel$1[];
|
|
1365
|
-
lengthThreshold?: number;
|
|
1366
|
-
stringifyOptions?: StringifyOptions;
|
|
1367
|
-
logger?: Logger | 'console';
|
|
1368
|
-
};
|
|
1369
|
-
type LogData = {
|
|
1370
|
-
level: LogLevel$1;
|
|
1371
|
-
trace: string[];
|
|
1372
|
-
payload: string[];
|
|
1373
|
-
};
|
|
1374
|
-
type Logger = {
|
|
1375
|
-
assert?: typeof console.assert;
|
|
1376
|
-
clear?: typeof console.clear;
|
|
1377
|
-
count?: typeof console.count;
|
|
1378
|
-
countReset?: typeof console.countReset;
|
|
1379
|
-
debug?: typeof console.debug;
|
|
1380
|
-
dir?: typeof console.dir;
|
|
1381
|
-
dirxml?: typeof console.dirxml;
|
|
1382
|
-
error?: typeof console.error;
|
|
1383
|
-
group?: typeof console.group;
|
|
1384
|
-
groupCollapsed?: typeof console.groupCollapsed;
|
|
1385
|
-
groupEnd?: () => void;
|
|
1386
|
-
info?: typeof console.info;
|
|
1387
|
-
log?: typeof console.log;
|
|
1388
|
-
table?: typeof console.table;
|
|
1389
|
-
time?: typeof console.time;
|
|
1390
|
-
timeEnd?: typeof console.timeEnd;
|
|
1391
|
-
timeLog?: typeof console.timeLog;
|
|
1392
|
-
trace?: typeof console.trace;
|
|
1393
|
-
warn?: typeof console.warn;
|
|
1394
|
-
};
|
|
1395
|
-
type LogLevel$1 = keyof Logger;
|
|
1396
|
-
declare const PLUGIN_NAME = "rrweb/console@1";
|
|
1397
|
-
declare const getRecordConsolePlugin: (options?: LogRecordOptions) => RecordPlugin;
|
|
1398
|
-
|
|
1399
|
-
type ReplayLogger = Partial<Record<LogLevel$1, (data: LogData) => void>>;
|
|
1400
|
-
type LogReplayConfig = {
|
|
1401
|
-
level?: LogLevel$1[];
|
|
1402
|
-
replayLogger?: ReplayLogger;
|
|
1403
|
-
};
|
|
1404
|
-
declare const getReplayConsolePlugin: (options?: LogReplayConfig) => ReplayPlugin;
|
|
625
|
+
declare global {
|
|
626
|
+
interface Window {
|
|
627
|
+
FontFace: typeof FontFace;
|
|
628
|
+
Array: typeof Array;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
1405
631
|
|
|
1406
|
-
|
|
1407
|
-
declare
|
|
1408
|
-
|
|
1409
|
-
declare const rrweb_IncrementalSource: typeof IncrementalSource;
|
|
1410
|
-
type rrweb_LogData = LogData;
|
|
1411
|
-
type rrweb_Logger = Logger;
|
|
1412
|
-
type rrweb_MouseInteractions = MouseInteractions;
|
|
1413
|
-
declare const rrweb_MouseInteractions: typeof MouseInteractions;
|
|
1414
|
-
declare const rrweb_PLUGIN_NAME: typeof PLUGIN_NAME;
|
|
1415
|
-
type rrweb_Replayer = Replayer;
|
|
1416
|
-
declare const rrweb_Replayer: typeof Replayer;
|
|
1417
|
-
type rrweb_ReplayerEvents = ReplayerEvents;
|
|
1418
|
-
declare const rrweb_ReplayerEvents: typeof ReplayerEvents;
|
|
1419
|
-
type rrweb_StringifyOptions = StringifyOptions;
|
|
1420
|
-
declare const rrweb_addCustomEvent: typeof addCustomEvent;
|
|
1421
|
-
declare const rrweb_freezePage: typeof freezePage;
|
|
1422
|
-
declare const rrweb_getRecordConsolePlugin: typeof getRecordConsolePlugin;
|
|
1423
|
-
declare const rrweb_getReplayConsolePlugin: typeof getReplayConsolePlugin;
|
|
1424
|
-
declare const rrweb_pack: typeof pack;
|
|
1425
|
-
declare const rrweb_record: typeof record;
|
|
1426
|
-
type rrweb_recordOptions<T> = recordOptions<T>;
|
|
1427
|
-
declare const rrweb_unpack: typeof unpack;
|
|
1428
|
-
declare namespace rrweb {
|
|
1429
|
-
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 };
|
|
1430
635
|
}
|
|
1431
636
|
|
|
1432
637
|
interface XhrResponse {
|
|
@@ -1442,14 +647,6 @@ interface XhrHeaders {
|
|
|
1442
647
|
[key: string]: string;
|
|
1443
648
|
}
|
|
1444
649
|
|
|
1445
|
-
declare const isValidChunkSize: (chunkSize: any, { minChunkSize, maxChunkSize, }?: {
|
|
1446
|
-
minChunkSize?: number | undefined;
|
|
1447
|
-
maxChunkSize?: number | undefined;
|
|
1448
|
-
}) => chunkSize is number | null | undefined;
|
|
1449
|
-
declare const getChunkSizeError: (chunkSize: any, { minChunkSize, maxChunkSize, }?: {
|
|
1450
|
-
minChunkSize?: number | undefined;
|
|
1451
|
-
maxChunkSize?: number | undefined;
|
|
1452
|
-
}) => TypeError;
|
|
1453
650
|
declare type ChunkedStreamIterableOptions = {
|
|
1454
651
|
defaultChunkSize?: number;
|
|
1455
652
|
minChunkSize?: number;
|
|
@@ -1467,11 +664,6 @@ declare class ChunkedStreamIterable implements AsyncIterable<Blob> {
|
|
|
1467
664
|
get chunkByteSize(): number;
|
|
1468
665
|
[Symbol.asyncIterator](): AsyncIterator<Blob>;
|
|
1469
666
|
}
|
|
1470
|
-
/**
|
|
1471
|
-
* Checks if an upload chunk was partially received (HTTP 308) and needs a retry.
|
|
1472
|
-
* Validates against the 'Range' header to ensure the full chunk was processed.
|
|
1473
|
-
*/
|
|
1474
|
-
declare const isIncompleteChunkUploadNeedingRetry: (res: XhrResponse | undefined, _options?: any) => res is XhrResponse;
|
|
1475
667
|
declare type EventName = 'attempt' | 'attemptFailure' | 'chunkSuccess' | 'error' | 'offline' | 'online' | 'progress' | 'success';
|
|
1476
668
|
declare type AllowedMethods = 'PUT' | 'POST' | 'PATCH';
|
|
1477
669
|
interface UpChunkOptions {
|
|
@@ -1560,20 +752,7 @@ declare class UpChunk {
|
|
|
1560
752
|
*/
|
|
1561
753
|
private sendChunks;
|
|
1562
754
|
}
|
|
1563
|
-
declare
|
|
1564
|
-
|
|
1565
|
-
type _mux_upchunk_ChunkedStreamIterable = ChunkedStreamIterable;
|
|
1566
|
-
declare const _mux_upchunk_ChunkedStreamIterable: typeof ChunkedStreamIterable;
|
|
1567
|
-
type _mux_upchunk_ChunkedStreamIterableOptions = ChunkedStreamIterableOptions;
|
|
1568
|
-
type _mux_upchunk_UpChunk = UpChunk;
|
|
1569
|
-
declare const _mux_upchunk_UpChunk: typeof UpChunk;
|
|
1570
|
-
type _mux_upchunk_UpChunkOptions = UpChunkOptions;
|
|
1571
|
-
declare const _mux_upchunk_getChunkSizeError: typeof getChunkSizeError;
|
|
1572
|
-
declare const _mux_upchunk_isIncompleteChunkUploadNeedingRetry: typeof isIncompleteChunkUploadNeedingRetry;
|
|
1573
|
-
declare const _mux_upchunk_isValidChunkSize: typeof isValidChunkSize;
|
|
1574
|
-
declare namespace _mux_upchunk {
|
|
1575
|
-
export { _mux_upchunk_ChunkedStreamIterable as ChunkedStreamIterable, type _mux_upchunk_ChunkedStreamIterableOptions as ChunkedStreamIterableOptions, _mux_upchunk_UpChunk as UpChunk, type _mux_upchunk_UpChunkOptions as UpChunkOptions, createUpload$1 as createUpload, _mux_upchunk_getChunkSizeError as getChunkSizeError, _mux_upchunk_isIncompleteChunkUploadNeedingRetry as isIncompleteChunkUploadNeedingRetry, _mux_upchunk_isValidChunkSize as isValidChunkSize };
|
|
1576
|
-
}
|
|
755
|
+
declare const createUpload: typeof UpChunk.createUpload;
|
|
1577
756
|
|
|
1578
757
|
declare enum NOTIFICATION_TYPES {
|
|
1579
758
|
ACTIVATE = "ACTIVATE:experiment, user_id,attributes, variation, event",
|
|
@@ -1887,6 +1066,7 @@ interface TextUrlPromptCard extends BaseCard {
|
|
|
1887
1066
|
promptActionType: PromptActionType;
|
|
1888
1067
|
required: boolean;
|
|
1889
1068
|
richTextBody: RichTextBody;
|
|
1069
|
+
questionHtml?: string;
|
|
1890
1070
|
};
|
|
1891
1071
|
routingOptions: RoutingOptions;
|
|
1892
1072
|
};
|
|
@@ -1912,6 +1092,7 @@ interface ConsentLegalCard extends BaseCard {
|
|
|
1912
1092
|
richTextBody: RichTextBody;
|
|
1913
1093
|
skipButtonText: string;
|
|
1914
1094
|
submitButtonText: string;
|
|
1095
|
+
questionHtml?: string;
|
|
1915
1096
|
};
|
|
1916
1097
|
routingOptions: RoutingOptions;
|
|
1917
1098
|
};
|
|
@@ -2078,6 +1259,7 @@ interface MatrixCard extends BaseCard {
|
|
|
2078
1259
|
buttonText?: string;
|
|
2079
1260
|
captionText: string;
|
|
2080
1261
|
conceptUrl: ConceptUrl;
|
|
1262
|
+
displayMatrixAsAccordion?: boolean;
|
|
2081
1263
|
matrixColumn: {
|
|
2082
1264
|
label: string;
|
|
2083
1265
|
value: string;
|
|
@@ -2151,11 +1333,11 @@ interface PageUrlEvent {
|
|
|
2151
1333
|
}
|
|
2152
1334
|
|
|
2153
1335
|
declare enum DismissReason {
|
|
2154
|
-
Closed = "close.click"
|
|
2155
|
-
Complete = "survey.completed"
|
|
2156
|
-
FeedbackClosed = "feedback.closed"
|
|
2157
|
-
PageChange = "page.change"
|
|
2158
|
-
API = "api"
|
|
1336
|
+
Closed = "close.click",// user clicked the close button
|
|
1337
|
+
Complete = "survey.completed",// user answered all questions
|
|
1338
|
+
FeedbackClosed = "feedback.closed",// user either clicked on feedback button or close button
|
|
1339
|
+
PageChange = "page.change",// productConfig.dismissOnPageChange == true and we detected a page change (excludes hash/query param changes)
|
|
1340
|
+
API = "api",// JS called Sprig('dismissActiveSurvey')
|
|
2159
1341
|
Override = "override"
|
|
2160
1342
|
}
|
|
2161
1343
|
type StudyType = "feedbackButton" | "inProductSurvey";
|
|
@@ -2206,7 +1388,7 @@ declare const EVENTS: {
|
|
|
2206
1388
|
};
|
|
2207
1389
|
};
|
|
2208
1390
|
|
|
2209
|
-
type Metric = "sdk_event_queue_latency_seconds" | "sdk_replay_add_event_batch_seconds" | "sdk_replay_cleanup_seconds" | "sdk_replay_compression_seconds" | "sdk_replay_get_events_between_seconds" | "sdk_replay_snapshot_seconds";
|
|
1391
|
+
type Metric = "sdk_event_queue_latency_seconds" | "sdk_replay_add_event_batch_seconds" | "sdk_replay_cleanup_seconds" | "sdk_replay_compression_seconds" | "sdk_replay_get_events_between_seconds" | "sdk_replay_snapshot_seconds" | "sdk_mutations_nodes_added" | "sdk_mutations_nodes_removed" | "sdk_mutations_attributes_changed" | "sdk_mutations_character_data" | "sdk_dom_nodes_count" | "sdk_page_html_characters";
|
|
2210
1392
|
type ThresholdType = "max" | "min";
|
|
2211
1393
|
interface MetricThreshold {
|
|
2212
1394
|
metric: Metric;
|
|
@@ -2214,34 +1396,15 @@ interface MetricThreshold {
|
|
|
2214
1396
|
value: number;
|
|
2215
1397
|
}
|
|
2216
1398
|
|
|
2217
|
-
type ReplayDurationType = "after" | "before" | "beforeAndAfter";
|
|
2218
|
-
type EventDigest = {
|
|
2219
|
-
timestamp: number;
|
|
2220
|
-
type: "Sprig_Click";
|
|
2221
|
-
} | {
|
|
2222
|
-
timestamp: number;
|
|
2223
|
-
name: string;
|
|
2224
|
-
type: "Sprig_TrackEvent";
|
|
2225
|
-
} | {
|
|
2226
|
-
timestamp: number;
|
|
2227
|
-
type: "Sprig_PageView";
|
|
2228
|
-
url: string;
|
|
2229
|
-
} | {
|
|
2230
|
-
timestamp: number;
|
|
2231
|
-
surveyId: string;
|
|
2232
|
-
type: "Sprig_ShowSurvey";
|
|
2233
|
-
} | {
|
|
2234
|
-
timestamp: number;
|
|
2235
|
-
surveyId: string;
|
|
2236
|
-
type: "Sprig_SubmitSurvey";
|
|
2237
|
-
};
|
|
2238
|
-
|
|
2239
1399
|
interface RecordedTaskResponseType {
|
|
2240
1400
|
questionId: number;
|
|
2241
1401
|
type: CardType;
|
|
2242
1402
|
value: RecordedTaskResponseValueType;
|
|
2243
1403
|
}
|
|
2244
1404
|
|
|
1405
|
+
type SurveyState = "ready" | "no survey";
|
|
1406
|
+
type ReplayDurationType = "after" | "before" | "beforeAndAfter";
|
|
1407
|
+
|
|
2245
1408
|
interface MobileReplayConfig {
|
|
2246
1409
|
mobileMetricsReportingEnabled?: boolean;
|
|
2247
1410
|
metricsReportingInterval?: number;
|
|
@@ -2287,6 +1450,7 @@ type SprigEventMap = {
|
|
|
2287
1450
|
contentFrameHeight: number;
|
|
2288
1451
|
contentFrameWidth: number;
|
|
2289
1452
|
name: string;
|
|
1453
|
+
"survey.id": number;
|
|
2290
1454
|
}
|
|
2291
1455
|
];
|
|
2292
1456
|
[SprigEvent.SurveyClosed]: [
|
|
@@ -2294,6 +1458,7 @@ type SprigEventMap = {
|
|
|
2294
1458
|
initiator?: string;
|
|
2295
1459
|
name: string;
|
|
2296
1460
|
studyType?: StudyType;
|
|
1461
|
+
"survey.id": number;
|
|
2297
1462
|
}
|
|
2298
1463
|
];
|
|
2299
1464
|
[SprigEvent.SurveyFadingOut]: [];
|
|
@@ -2301,12 +1466,14 @@ type SprigEventMap = {
|
|
|
2301
1466
|
{
|
|
2302
1467
|
name: string;
|
|
2303
1468
|
contentFrameHeight: number;
|
|
1469
|
+
"survey.id": number;
|
|
2304
1470
|
}
|
|
2305
1471
|
];
|
|
2306
1472
|
[SprigEvent.SurveyWidth]: [
|
|
2307
1473
|
{
|
|
2308
1474
|
name: string;
|
|
2309
1475
|
contentFrameWidth: number;
|
|
1476
|
+
"survey.id": number;
|
|
2310
1477
|
}
|
|
2311
1478
|
];
|
|
2312
1479
|
[SprigEvent.SurveyLifeCycle]: [{
|
|
@@ -2323,6 +1490,7 @@ type SprigEventMap = {
|
|
|
2323
1490
|
initiator: DismissReason;
|
|
2324
1491
|
name?: string;
|
|
2325
1492
|
studyType?: StudyType;
|
|
1493
|
+
"survey.id": number;
|
|
2326
1494
|
}
|
|
2327
1495
|
];
|
|
2328
1496
|
[SprigEvent.SurveyWillPresent]: [
|
|
@@ -2339,6 +1507,7 @@ type SprigEventMap = {
|
|
|
2339
1507
|
answeredAt?: number;
|
|
2340
1508
|
questionIndex?: number;
|
|
2341
1509
|
value: unknown;
|
|
1510
|
+
"survey.id": number;
|
|
2342
1511
|
}
|
|
2343
1512
|
];
|
|
2344
1513
|
[SprigEvent.ReplayCapture]: [
|
|
@@ -2402,14 +1571,6 @@ type SprigEventMap = {
|
|
|
2402
1571
|
declare const eventEmitter: Emitter<SprigEventMap>;
|
|
2403
1572
|
type SprigEventEmitter = typeof eventEmitter;
|
|
2404
1573
|
|
|
2405
|
-
declare const LogLevels: {
|
|
2406
|
-
readonly Error: 1;
|
|
2407
|
-
readonly Warn: 2;
|
|
2408
|
-
readonly Info: 3;
|
|
2409
|
-
readonly Debug: 4;
|
|
2410
|
-
};
|
|
2411
|
-
type LogLevel = (typeof LogLevels)[keyof typeof LogLevels];
|
|
2412
|
-
|
|
2413
1574
|
type FramePosition = "bottomLeft" | "bottomRight" | "center" | "topLeft" | "topRight";
|
|
2414
1575
|
type Platform = "email" | "link" | "web";
|
|
2415
1576
|
type InstallationMethod = "web-npm" | "web-npm-bundled" | "web-gtm" | "web-segment" | "android-segment" | "react-native-segment" | "ios-segment" | "web-snippet";
|
|
@@ -2442,7 +1603,7 @@ interface Config extends MobileReplayConfig {
|
|
|
2442
1603
|
};
|
|
2443
1604
|
};
|
|
2444
1605
|
customMetadata?: Record<string, unknown>;
|
|
2445
|
-
customStyles
|
|
1606
|
+
customStyles?: string;
|
|
2446
1607
|
dismissOnPageChange: boolean;
|
|
2447
1608
|
forceBrandedLogo?: boolean;
|
|
2448
1609
|
endCard?: {
|
|
@@ -2469,6 +1630,7 @@ interface Config extends MobileReplayConfig {
|
|
|
2469
1630
|
Authorization?: string;
|
|
2470
1631
|
"Content-Type"?: string;
|
|
2471
1632
|
"userleap-platform": Platform | "ios" | "android" | "video_recorder";
|
|
1633
|
+
"sprig-modules"?: string;
|
|
2472
1634
|
/** @example "SJcVfq-7QQ" */
|
|
2473
1635
|
"x-ul-environment-id"?: string;
|
|
2474
1636
|
"x-ul-installation-method": InstallationMethod;
|
|
@@ -2489,7 +1651,6 @@ interface Config extends MobileReplayConfig {
|
|
|
2489
1651
|
isPreview?: boolean;
|
|
2490
1652
|
launchDarklyEnabled?: boolean;
|
|
2491
1653
|
locale: string;
|
|
2492
|
-
logLevel?: LogLevel;
|
|
2493
1654
|
logBufferLimit?: number;
|
|
2494
1655
|
marketingUrl?: string;
|
|
2495
1656
|
maxAttrNameLength: number;
|
|
@@ -2508,9 +1669,8 @@ interface Config extends MobileReplayConfig {
|
|
|
2508
1669
|
path?: string;
|
|
2509
1670
|
platform?: Platform;
|
|
2510
1671
|
previewKey?: string | null;
|
|
2511
|
-
|
|
1672
|
+
previewMode?: boolean;
|
|
2512
1673
|
productConfig?: AppProductConfig;
|
|
2513
|
-
replayNonce?: string;
|
|
2514
1674
|
replaySettings?: object;
|
|
2515
1675
|
requireUserIdForTracking: boolean;
|
|
2516
1676
|
responseGroupUid: UUID;
|
|
@@ -2522,8 +1682,10 @@ interface Config extends MobileReplayConfig {
|
|
|
2522
1682
|
studyType?: StudyType;
|
|
2523
1683
|
surveyId: number;
|
|
2524
1684
|
tabTitle: string;
|
|
1685
|
+
trackPageViewUrl?: string;
|
|
2525
1686
|
ulEvents: typeof SprigEvent;
|
|
2526
1687
|
UpChunk: Window["UpChunk"];
|
|
1688
|
+
upchunkLibraryURL?: string;
|
|
2527
1689
|
useDesktopPrototype?: boolean;
|
|
2528
1690
|
useMobileStyling: boolean;
|
|
2529
1691
|
userId: UUID | null;
|
|
@@ -2559,7 +1721,26 @@ declare class SprigQueue {
|
|
|
2559
1721
|
empty(): void;
|
|
2560
1722
|
}
|
|
2561
1723
|
|
|
2562
|
-
type
|
|
1724
|
+
type EventDigest = {
|
|
1725
|
+
timestamp: number;
|
|
1726
|
+
type: "Sprig_Click";
|
|
1727
|
+
} | {
|
|
1728
|
+
timestamp: number;
|
|
1729
|
+
name: string;
|
|
1730
|
+
type: "Sprig_TrackEvent";
|
|
1731
|
+
} | {
|
|
1732
|
+
timestamp: number;
|
|
1733
|
+
type: "Sprig_PageView";
|
|
1734
|
+
url: string;
|
|
1735
|
+
} | {
|
|
1736
|
+
timestamp: number;
|
|
1737
|
+
surveyId: string;
|
|
1738
|
+
type: "Sprig_ShowSurvey";
|
|
1739
|
+
} | {
|
|
1740
|
+
timestamp: number;
|
|
1741
|
+
surveyId: string;
|
|
1742
|
+
type: "Sprig_SubmitSurvey";
|
|
1743
|
+
};
|
|
2563
1744
|
|
|
2564
1745
|
declare namespace optimizely {
|
|
2565
1746
|
interface Optimizely {
|
|
@@ -2646,6 +1827,7 @@ declare namespace sprigConfig {
|
|
|
2646
1827
|
// external apis
|
|
2647
1828
|
addListener: (event: SprigEvent, listener: SprigListener) => Promise<void>;
|
|
2648
1829
|
addSurveyListener: (listener: SprigListener) => Promise<void>;
|
|
1830
|
+
applyFeedbackStyles: (styles: { button?: string; view?: string }) => void;
|
|
2649
1831
|
applyStyles: (styleString: string) => void;
|
|
2650
1832
|
dismissActiveSurvey: (reason?: DismissReason) => void;
|
|
2651
1833
|
displaySurvey: (surveyId: number) => IdentifyResult;
|
|
@@ -2704,6 +1886,7 @@ declare namespace sprigConfig {
|
|
|
2704
1886
|
url: string,
|
|
2705
1887
|
properties?: SprigProperties,
|
|
2706
1888
|
showSurveyCallback?: (surveyId?: number) => Promise<boolean>,
|
|
1889
|
+
calledFromApi?: boolean,
|
|
2707
1890
|
) => void;
|
|
2708
1891
|
unmute: () => void;
|
|
2709
1892
|
}
|
|
@@ -2718,7 +1901,10 @@ declare namespace sprigConfig {
|
|
|
2718
1901
|
SprigAPIActions &
|
|
2719
1902
|
SprigCommands & {
|
|
2720
1903
|
_API_URL: string;
|
|
2721
|
-
_config: Config
|
|
1904
|
+
_config: Config & {
|
|
1905
|
+
desktopDisplay?: string;
|
|
1906
|
+
previewLanguage?: string;
|
|
1907
|
+
};
|
|
2722
1908
|
_gtm: unknown; // TODO: determine if boolean?
|
|
2723
1909
|
_queue: SprigQueue;
|
|
2724
1910
|
_segment: unknown; // TODO: determine if boolean?
|
|
@@ -2730,7 +1916,10 @@ declare namespace sprigConfig {
|
|
|
2730
1916
|
email?: string | null;
|
|
2731
1917
|
envId: string;
|
|
2732
1918
|
error?: Error;
|
|
1919
|
+
feedbackCustomStyles?: string;
|
|
1920
|
+
forceDirectEmbed?: boolean;
|
|
2733
1921
|
frameId: string;
|
|
1922
|
+
isMobileSDK?: boolean;
|
|
2734
1923
|
loaded: boolean;
|
|
2735
1924
|
locale?: string;
|
|
2736
1925
|
maxHeight?: number | string;
|
|
@@ -2738,10 +1927,17 @@ declare namespace sprigConfig {
|
|
|
2738
1927
|
mobileHeadersJSON?: string;
|
|
2739
1928
|
nonce?: string;
|
|
2740
1929
|
partnerAnonymousId: string | null;
|
|
2741
|
-
|
|
2742
|
-
|
|
1930
|
+
pointerDownTarget?: EventTarget | null;
|
|
1931
|
+
replayLibraryURL?: string;
|
|
1932
|
+
reportError: (
|
|
1933
|
+
name: string,
|
|
1934
|
+
err: Error,
|
|
1935
|
+
extraInfo?: object,
|
|
1936
|
+
bodyInfo?: object,
|
|
1937
|
+
) => void;
|
|
2743
1938
|
sampleRate?: number;
|
|
2744
1939
|
token: string | null;
|
|
1940
|
+
upchunkLibraryURL?: string;
|
|
2745
1941
|
UPDATES: typeof EVENTS;
|
|
2746
1942
|
viewSDKURL?: string;
|
|
2747
1943
|
windowDimensions?: {
|
|
@@ -2750,14 +1946,7 @@ declare namespace sprigConfig {
|
|
|
2750
1946
|
};
|
|
2751
1947
|
};
|
|
2752
1948
|
}
|
|
2753
|
-
|
|
2754
|
-
type ArgumentType<T> = T extends (arg1: infer U, ...args: unknown[]) => unknown
|
|
2755
|
-
? U
|
|
2756
|
-
: unknown;
|
|
2757
|
-
type PublicOf<T> = { [K in keyof T]: T[K] };
|
|
2758
|
-
type createUpload = (typeof _mux_upchunk)["createUpload"];
|
|
2759
|
-
type rrwebRecord = (typeof rrweb)["record"];
|
|
2760
|
-
type rrwebCustomEvent = (typeof rrweb)["record"]["addCustomEvent"];
|
|
1949
|
+
|
|
2761
1950
|
declare global {
|
|
2762
1951
|
interface Window {
|
|
2763
1952
|
__cfg: Config;
|
|
@@ -2773,27 +1962,26 @@ declare global {
|
|
|
2773
1962
|
optimizelyDatafile?: object;
|
|
2774
1963
|
previewMode?: unknown;
|
|
2775
1964
|
UpChunk: {
|
|
2776
|
-
createUpload:
|
|
2777
|
-
...args: ArgumentTypes<createUpload>
|
|
2778
|
-
) => PublicOf<ReturnType<createUpload>>;
|
|
1965
|
+
createUpload: typeof createUpload;
|
|
2779
1966
|
};
|
|
2780
1967
|
_Sprig?: sprigConfig.WindowSprig;
|
|
2781
1968
|
Sprig: sprigConfig.WindowSprig;
|
|
2782
1969
|
UserLeap: sprigConfig.WindowSprig;
|
|
2783
|
-
rrwebRecord?:
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
) => PublicOf<ReturnType<rrwebCustomEvent>>;
|
|
2787
|
-
} & ((
|
|
2788
|
-
arg: Omit<ArgumentType<rrwebRecord>, "hooks">,
|
|
2789
|
-
) => PublicOf<ReturnType<rrwebRecord>>);
|
|
2790
|
-
sprigAPI?: object;
|
|
1970
|
+
rrwebRecord?: (typeof _rrweb_record)["record"];
|
|
1971
|
+
sprigAPI?: { openUrl: (url: string) => void };
|
|
1972
|
+
SprigLoggerCallback?: (message: string) => void;
|
|
2791
1973
|
}
|
|
2792
1974
|
|
|
2793
1975
|
type WindowSprig = sprigConfig.WindowSprig;
|
|
2794
1976
|
type SprigAttributes = Record<string, boolean | number | string>;
|
|
2795
1977
|
type SprigListener = Listener<unknown[]>;
|
|
2796
|
-
type SprigMetadata =
|
|
1978
|
+
type SprigMetadata = {
|
|
1979
|
+
url?: string;
|
|
1980
|
+
trackPageView?: boolean;
|
|
1981
|
+
optimizelyExperiments?: object;
|
|
1982
|
+
launchDarklyFlags?: object;
|
|
1983
|
+
eventProperties?: SprigProperties;
|
|
1984
|
+
};
|
|
2797
1985
|
type SprigProperties = Record<string, unknown>;
|
|
2798
1986
|
type SprigAPIActions = sprigConfig.SprigAPIActions;
|
|
2799
1987
|
type TrackPayload = sprigConfig.TrackPayload;
|