@highlight-run/rrweb 2.0.0-lambda.7 → 2.0.0-lambda.8
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/rrweb.cjs +590 -34
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.d.cts +175 -0
- package/dist/rrweb.d.ts +175 -0
- package/dist/rrweb.js +590 -34
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +582 -34
- package/dist/rrweb.umd.cjs.map +4 -4
- package/dist/rrweb.umd.min.cjs +55 -45
- package/dist/rrweb.umd.min.cjs.map +4 -4
- package/package.json +5 -5
- package/umd/rrweb.js +582 -34
- package/umd/rrweb.min.js +55 -45
package/dist/rrweb.d.cts
CHANGED
|
@@ -9,6 +9,7 @@ import { Emitter } from '../../../../node_modules/@highlight-run/rrweb-types/dis
|
|
|
9
9
|
import { EventType } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
10
10
|
import { eventWithTime } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
11
11
|
import { eventWithTime as eventWithTime_2 } from '../../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
12
|
+
import { eventWithTime as eventWithTime_3 } from '../../../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
12
13
|
import { Handler } from '../../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
13
14
|
import { hookResetter } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
14
15
|
import { hooksParam } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
@@ -29,6 +30,7 @@ import { MouseInteractions } from '../../../node_modules/@highlight-run/rrweb-ty
|
|
|
29
30
|
import { nowTimestamp } from '../../../node_modules/@highlight-run/rrweb-utils/dist/rrweb-utils.js';
|
|
30
31
|
import { PackFn } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
31
32
|
import { playerMetaData } from '../../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
33
|
+
import { playerMetaData as playerMetaData_2 } from '../../../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
32
34
|
import { RecordPlugin } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
33
35
|
import { ReplayerEvents } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
34
36
|
import { RRDocument } from '../../../../node_modules/@highlight-run/rrdom/dist/rrdom.js';
|
|
@@ -36,6 +38,7 @@ import { RRIFrameElement } from '../../../node_modules/@highlight-run/rrdom/dist
|
|
|
36
38
|
import { RRNode } from '../../../node_modules/@highlight-run/rrdom/dist/rrdom.js';
|
|
37
39
|
import { SamplingStrategy } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
38
40
|
import { SessionInterval } from '../../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
41
|
+
import { SessionInterval as SessionInterval_2 } from '../../../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
39
42
|
import { SlimDOMOptions } from '../../../node_modules/@highlight-run/rrweb-snapshot/dist/rrweb-snapshot.js';
|
|
40
43
|
import { StateMachine } from '@xstate/fsm';
|
|
41
44
|
import { textMutation } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
@@ -49,6 +52,8 @@ declare type AppendedIframe = {
|
|
|
49
52
|
builtNode: HTMLIFrameElement | RRIFrameElement;
|
|
50
53
|
};
|
|
51
54
|
|
|
55
|
+
export declare function buildHostDocument(options: HostDocumentOptions): string;
|
|
56
|
+
|
|
52
57
|
export declare function canvasMutation({ event, mutation, target, imageMap, canvasEventMap, errorHandler, }: {
|
|
53
58
|
event: Parameters<Replayer['applyIncremental']>[0];
|
|
54
59
|
mutation: canvasMutationData;
|
|
@@ -64,6 +69,84 @@ declare function createPlayerService(context: PlayerContext, { getCastFn, applyE
|
|
|
64
69
|
|
|
65
70
|
declare function createSpeedService(context: SpeedContext): StateMachine.Service<SpeedContext, SpeedEvent, SpeedState>;
|
|
66
71
|
|
|
72
|
+
export declare class EmbeddedReplayerClient {
|
|
73
|
+
private readonly iframe;
|
|
74
|
+
private readonly hostOrigin;
|
|
75
|
+
private readonly listeners;
|
|
76
|
+
private metadata;
|
|
77
|
+
private activityIntervals;
|
|
78
|
+
private dimensions;
|
|
79
|
+
private lastCurrentTime;
|
|
80
|
+
private ready;
|
|
81
|
+
private readyResolvers;
|
|
82
|
+
private disposed;
|
|
83
|
+
private pending;
|
|
84
|
+
constructor(iframe: HTMLIFrameElement, options?: EmbeddedReplayerClientOptions);
|
|
85
|
+
whenReady(): Promise<void>;
|
|
86
|
+
init(events: eventWithTime_3[], config?: SerializableReplayerConfig, autoplay?: boolean): void;
|
|
87
|
+
play(timeOffset?: number): void;
|
|
88
|
+
pause(timeOffset?: number): void;
|
|
89
|
+
resume(timeOffset?: number): void;
|
|
90
|
+
setConfig(config: SerializableReplayerConfig): void;
|
|
91
|
+
setLayout(scale: number, anchor?: ReplayAnchor): void;
|
|
92
|
+
replaceEvents(events: eventWithTime_3[]): void;
|
|
93
|
+
addEvent(event: eventWithTime_3): void;
|
|
94
|
+
enableInteract(): void;
|
|
95
|
+
disableInteract(): void;
|
|
96
|
+
destroy(): void;
|
|
97
|
+
on(event: string, listener: Listener): void;
|
|
98
|
+
off(event: string, listener: Listener): void;
|
|
99
|
+
getCurrentTime(): number;
|
|
100
|
+
getMetaData(): playerMetaData_2 | null;
|
|
101
|
+
getActivityIntervals(): SessionInterval_2[];
|
|
102
|
+
getDimensions(): ReplayDimensions | null;
|
|
103
|
+
private send;
|
|
104
|
+
private postToHost;
|
|
105
|
+
private flushPending;
|
|
106
|
+
private probe;
|
|
107
|
+
private onMessage;
|
|
108
|
+
private handle;
|
|
109
|
+
private emit;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export declare interface EmbeddedReplayerClientOptions {
|
|
113
|
+
hostOrigin?: string;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export declare class EmbeddedReplayerHost {
|
|
117
|
+
private readonly root;
|
|
118
|
+
private readonly parentWindow;
|
|
119
|
+
private readonly timeUpdateIntervalMs;
|
|
120
|
+
private readonly expectedParentOrigin;
|
|
121
|
+
private replayer;
|
|
122
|
+
private playing;
|
|
123
|
+
private timer;
|
|
124
|
+
private started;
|
|
125
|
+
private layout;
|
|
126
|
+
constructor(options?: EmbeddedReplayerHostOptions);
|
|
127
|
+
start(): void;
|
|
128
|
+
stop(): void;
|
|
129
|
+
private onMessage;
|
|
130
|
+
private handle;
|
|
131
|
+
private init;
|
|
132
|
+
private applyLayout;
|
|
133
|
+
private postDimensions;
|
|
134
|
+
private postInitialized;
|
|
135
|
+
private wireEvents;
|
|
136
|
+
private setPlaying;
|
|
137
|
+
private startTimePump;
|
|
138
|
+
private postTime;
|
|
139
|
+
private stopTimePump;
|
|
140
|
+
private post;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export declare interface EmbeddedReplayerHostOptions {
|
|
144
|
+
expectedParentOrigin?: string;
|
|
145
|
+
root?: HTMLElement;
|
|
146
|
+
parentWindow?: Window;
|
|
147
|
+
timeUpdateIntervalMs?: number;
|
|
148
|
+
}
|
|
149
|
+
|
|
67
150
|
declare type ErrorHandler = (error: unknown) => void | boolean;
|
|
68
151
|
|
|
69
152
|
export { EventType }
|
|
@@ -100,6 +183,73 @@ declare function hasShadowRoot<T extends Node | RRNode>(n: T): n is T & {
|
|
|
100
183
|
|
|
101
184
|
declare function hookSetter<T>(target: T, key: string | number | symbol, d: PropertyDescriptor, isRevoked?: boolean, win?: Window & typeof globalThis): hookResetter;
|
|
102
185
|
|
|
186
|
+
export declare type HostCommand = {
|
|
187
|
+
type: 'ping';
|
|
188
|
+
} | {
|
|
189
|
+
type: 'init';
|
|
190
|
+
events: eventWithTime_3[];
|
|
191
|
+
config?: SerializableReplayerConfig;
|
|
192
|
+
autoplay?: boolean;
|
|
193
|
+
} | {
|
|
194
|
+
type: 'setLayout';
|
|
195
|
+
scale: number;
|
|
196
|
+
anchor?: ReplayAnchor;
|
|
197
|
+
} | {
|
|
198
|
+
type: 'play';
|
|
199
|
+
timeOffset?: number;
|
|
200
|
+
} | {
|
|
201
|
+
type: 'pause';
|
|
202
|
+
timeOffset?: number;
|
|
203
|
+
} | {
|
|
204
|
+
type: 'resume';
|
|
205
|
+
timeOffset?: number;
|
|
206
|
+
} | {
|
|
207
|
+
type: 'setConfig';
|
|
208
|
+
config: SerializableReplayerConfig;
|
|
209
|
+
} | {
|
|
210
|
+
type: 'replaceEvents';
|
|
211
|
+
events: eventWithTime_3[];
|
|
212
|
+
} | {
|
|
213
|
+
type: 'addEvent';
|
|
214
|
+
event: eventWithTime_3;
|
|
215
|
+
} | {
|
|
216
|
+
type: 'enableInteract';
|
|
217
|
+
} | {
|
|
218
|
+
type: 'disableInteract';
|
|
219
|
+
} | {
|
|
220
|
+
type: 'destroy';
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
export declare interface HostDocumentOptions {
|
|
224
|
+
scriptUrl: string;
|
|
225
|
+
styleUrl?: string;
|
|
226
|
+
extraStyleSources?: string[];
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export declare type HostMessage = {
|
|
230
|
+
type: 'ready';
|
|
231
|
+
} | {
|
|
232
|
+
type: 'initialized';
|
|
233
|
+
metadata: playerMetaData_2;
|
|
234
|
+
activityIntervals: SessionInterval_2[];
|
|
235
|
+
} | {
|
|
236
|
+
type: 'replayer-event';
|
|
237
|
+
event: string;
|
|
238
|
+
payload?: unknown;
|
|
239
|
+
} | {
|
|
240
|
+
type: 'time';
|
|
241
|
+
currentTime: number;
|
|
242
|
+
} | {
|
|
243
|
+
type: 'dimensions';
|
|
244
|
+
width: number;
|
|
245
|
+
height: number;
|
|
246
|
+
top: number;
|
|
247
|
+
left: number;
|
|
248
|
+
} | {
|
|
249
|
+
type: 'error';
|
|
250
|
+
message: string;
|
|
251
|
+
};
|
|
252
|
+
|
|
103
253
|
export { IncrementalSource }
|
|
104
254
|
|
|
105
255
|
declare function inDom(n: Node): boolean;
|
|
@@ -122,12 +272,16 @@ declare function iterateResolveTree(tree: ResolveTree, cb: (mutation: addedNodeM
|
|
|
122
272
|
|
|
123
273
|
declare function legacy_isTouchEvent(event: MouseEvent | TouchEvent | PointerEvent): event is TouchEvent;
|
|
124
274
|
|
|
275
|
+
declare type Listener = (payload?: unknown) => void;
|
|
276
|
+
|
|
125
277
|
export declare let mirror: DeprecatedMirror;
|
|
126
278
|
|
|
127
279
|
export { MouseInteractions }
|
|
128
280
|
|
|
129
281
|
declare function on(type: string, fn: EventListenerOrEventListenerObject, target?: Document | IWindow): listenerHandler_2;
|
|
130
282
|
|
|
283
|
+
export declare function pickSerializableConfig(config: unknown): SerializableReplayerConfig;
|
|
284
|
+
|
|
131
285
|
declare type PlayerAssets = {
|
|
132
286
|
emitter: Emitter;
|
|
133
287
|
applyEventsSynchronously(events: Array<eventWithTime_2>): void;
|
|
@@ -275,6 +429,15 @@ export declare type recordOptions<T> = {
|
|
|
275
429
|
};
|
|
276
430
|
};
|
|
277
431
|
|
|
432
|
+
export declare type ReplayAnchor = 'top' | 'center';
|
|
433
|
+
|
|
434
|
+
export declare interface ReplayDimensions {
|
|
435
|
+
width: number;
|
|
436
|
+
height: number;
|
|
437
|
+
top: number;
|
|
438
|
+
left: number;
|
|
439
|
+
}
|
|
440
|
+
|
|
278
441
|
export declare class Replayer {
|
|
279
442
|
wrapper: HTMLDivElement;
|
|
280
443
|
iframe: HTMLIFrameElement;
|
|
@@ -383,6 +546,16 @@ declare type ResolveTree = {
|
|
|
383
546
|
parent: ResolveTree | null;
|
|
384
547
|
};
|
|
385
548
|
|
|
549
|
+
export declare const RRWEB_EMBEDDED_CHANNEL: "rrweb-embedded";
|
|
550
|
+
|
|
551
|
+
export declare const RRWEB_EMBEDDED_PROTOCOL_VERSION: 1;
|
|
552
|
+
|
|
553
|
+
declare const SERIALIZABLE_CONFIG_KEYS: readonly ["speed", "maxSpeed", "loadTimeout", "skipInactive", "inactivePeriodThreshold", "showWarning", "showDebug", "blockClass", "liveMode", "insertStyleRules", "triggerFocus", "UNSAFE_replayCanvas", "cspContent", "pauseAnimation", "mouseTail", "useVirtualDom", "inactiveThreshold", "inactiveSkipTime"];
|
|
554
|
+
|
|
555
|
+
declare type SerializableConfigKey = (typeof SERIALIZABLE_CONFIG_KEYS)[number];
|
|
556
|
+
|
|
557
|
+
export declare type SerializableReplayerConfig = Partial<Pick<playerConfig, SerializableConfigKey>>;
|
|
558
|
+
|
|
386
559
|
declare function shadowHostInDom(n: Node): boolean;
|
|
387
560
|
|
|
388
561
|
declare type SpeedContext = {
|
|
@@ -414,6 +587,8 @@ declare type SpeedState = {
|
|
|
414
587
|
context: SpeedContext;
|
|
415
588
|
};
|
|
416
589
|
|
|
590
|
+
export declare function startEmbeddedReplayerHost(options?: EmbeddedReplayerHostOptions): EmbeddedReplayerHost;
|
|
591
|
+
|
|
417
592
|
declare class StyleSheetMirror {
|
|
418
593
|
private id;
|
|
419
594
|
private styleIDMap;
|
package/dist/rrweb.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { Emitter } from '../../../../node_modules/@highlight-run/rrweb-types/dis
|
|
|
9
9
|
import { EventType } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
10
10
|
import { eventWithTime } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
11
11
|
import { eventWithTime as eventWithTime_2 } from '../../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
12
|
+
import { eventWithTime as eventWithTime_3 } from '../../../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
12
13
|
import { Handler } from '../../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
13
14
|
import { hookResetter } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
14
15
|
import { hooksParam } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
@@ -29,6 +30,7 @@ import { MouseInteractions } from '../../../node_modules/@highlight-run/rrweb-ty
|
|
|
29
30
|
import { nowTimestamp } from '../../../node_modules/@highlight-run/rrweb-utils/dist/rrweb-utils.js';
|
|
30
31
|
import { PackFn } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
31
32
|
import { playerMetaData } from '../../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
33
|
+
import { playerMetaData as playerMetaData_2 } from '../../../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
32
34
|
import { RecordPlugin } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
33
35
|
import { ReplayerEvents } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
34
36
|
import { RRDocument } from '../../../../node_modules/@highlight-run/rrdom/dist/rrdom.js';
|
|
@@ -36,6 +38,7 @@ import { RRIFrameElement } from '../../../node_modules/@highlight-run/rrdom/dist
|
|
|
36
38
|
import { RRNode } from '../../../node_modules/@highlight-run/rrdom/dist/rrdom.js';
|
|
37
39
|
import { SamplingStrategy } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
38
40
|
import { SessionInterval } from '../../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
41
|
+
import { SessionInterval as SessionInterval_2 } from '../../../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
39
42
|
import { SlimDOMOptions } from '../../../node_modules/@highlight-run/rrweb-snapshot/dist/rrweb-snapshot.js';
|
|
40
43
|
import { StateMachine } from '@xstate/fsm';
|
|
41
44
|
import { textMutation } from '../../../node_modules/@highlight-run/rrweb-types/dist/rrweb-types.js';
|
|
@@ -49,6 +52,8 @@ declare type AppendedIframe = {
|
|
|
49
52
|
builtNode: HTMLIFrameElement | RRIFrameElement;
|
|
50
53
|
};
|
|
51
54
|
|
|
55
|
+
export declare function buildHostDocument(options: HostDocumentOptions): string;
|
|
56
|
+
|
|
52
57
|
export declare function canvasMutation({ event, mutation, target, imageMap, canvasEventMap, errorHandler, }: {
|
|
53
58
|
event: Parameters<Replayer['applyIncremental']>[0];
|
|
54
59
|
mutation: canvasMutationData;
|
|
@@ -64,6 +69,84 @@ declare function createPlayerService(context: PlayerContext, { getCastFn, applyE
|
|
|
64
69
|
|
|
65
70
|
declare function createSpeedService(context: SpeedContext): StateMachine.Service<SpeedContext, SpeedEvent, SpeedState>;
|
|
66
71
|
|
|
72
|
+
export declare class EmbeddedReplayerClient {
|
|
73
|
+
private readonly iframe;
|
|
74
|
+
private readonly hostOrigin;
|
|
75
|
+
private readonly listeners;
|
|
76
|
+
private metadata;
|
|
77
|
+
private activityIntervals;
|
|
78
|
+
private dimensions;
|
|
79
|
+
private lastCurrentTime;
|
|
80
|
+
private ready;
|
|
81
|
+
private readyResolvers;
|
|
82
|
+
private disposed;
|
|
83
|
+
private pending;
|
|
84
|
+
constructor(iframe: HTMLIFrameElement, options?: EmbeddedReplayerClientOptions);
|
|
85
|
+
whenReady(): Promise<void>;
|
|
86
|
+
init(events: eventWithTime_3[], config?: SerializableReplayerConfig, autoplay?: boolean): void;
|
|
87
|
+
play(timeOffset?: number): void;
|
|
88
|
+
pause(timeOffset?: number): void;
|
|
89
|
+
resume(timeOffset?: number): void;
|
|
90
|
+
setConfig(config: SerializableReplayerConfig): void;
|
|
91
|
+
setLayout(scale: number, anchor?: ReplayAnchor): void;
|
|
92
|
+
replaceEvents(events: eventWithTime_3[]): void;
|
|
93
|
+
addEvent(event: eventWithTime_3): void;
|
|
94
|
+
enableInteract(): void;
|
|
95
|
+
disableInteract(): void;
|
|
96
|
+
destroy(): void;
|
|
97
|
+
on(event: string, listener: Listener): void;
|
|
98
|
+
off(event: string, listener: Listener): void;
|
|
99
|
+
getCurrentTime(): number;
|
|
100
|
+
getMetaData(): playerMetaData_2 | null;
|
|
101
|
+
getActivityIntervals(): SessionInterval_2[];
|
|
102
|
+
getDimensions(): ReplayDimensions | null;
|
|
103
|
+
private send;
|
|
104
|
+
private postToHost;
|
|
105
|
+
private flushPending;
|
|
106
|
+
private probe;
|
|
107
|
+
private onMessage;
|
|
108
|
+
private handle;
|
|
109
|
+
private emit;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export declare interface EmbeddedReplayerClientOptions {
|
|
113
|
+
hostOrigin?: string;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export declare class EmbeddedReplayerHost {
|
|
117
|
+
private readonly root;
|
|
118
|
+
private readonly parentWindow;
|
|
119
|
+
private readonly timeUpdateIntervalMs;
|
|
120
|
+
private readonly expectedParentOrigin;
|
|
121
|
+
private replayer;
|
|
122
|
+
private playing;
|
|
123
|
+
private timer;
|
|
124
|
+
private started;
|
|
125
|
+
private layout;
|
|
126
|
+
constructor(options?: EmbeddedReplayerHostOptions);
|
|
127
|
+
start(): void;
|
|
128
|
+
stop(): void;
|
|
129
|
+
private onMessage;
|
|
130
|
+
private handle;
|
|
131
|
+
private init;
|
|
132
|
+
private applyLayout;
|
|
133
|
+
private postDimensions;
|
|
134
|
+
private postInitialized;
|
|
135
|
+
private wireEvents;
|
|
136
|
+
private setPlaying;
|
|
137
|
+
private startTimePump;
|
|
138
|
+
private postTime;
|
|
139
|
+
private stopTimePump;
|
|
140
|
+
private post;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export declare interface EmbeddedReplayerHostOptions {
|
|
144
|
+
expectedParentOrigin?: string;
|
|
145
|
+
root?: HTMLElement;
|
|
146
|
+
parentWindow?: Window;
|
|
147
|
+
timeUpdateIntervalMs?: number;
|
|
148
|
+
}
|
|
149
|
+
|
|
67
150
|
declare type ErrorHandler = (error: unknown) => void | boolean;
|
|
68
151
|
|
|
69
152
|
export { EventType }
|
|
@@ -100,6 +183,73 @@ declare function hasShadowRoot<T extends Node | RRNode>(n: T): n is T & {
|
|
|
100
183
|
|
|
101
184
|
declare function hookSetter<T>(target: T, key: string | number | symbol, d: PropertyDescriptor, isRevoked?: boolean, win?: Window & typeof globalThis): hookResetter;
|
|
102
185
|
|
|
186
|
+
export declare type HostCommand = {
|
|
187
|
+
type: 'ping';
|
|
188
|
+
} | {
|
|
189
|
+
type: 'init';
|
|
190
|
+
events: eventWithTime_3[];
|
|
191
|
+
config?: SerializableReplayerConfig;
|
|
192
|
+
autoplay?: boolean;
|
|
193
|
+
} | {
|
|
194
|
+
type: 'setLayout';
|
|
195
|
+
scale: number;
|
|
196
|
+
anchor?: ReplayAnchor;
|
|
197
|
+
} | {
|
|
198
|
+
type: 'play';
|
|
199
|
+
timeOffset?: number;
|
|
200
|
+
} | {
|
|
201
|
+
type: 'pause';
|
|
202
|
+
timeOffset?: number;
|
|
203
|
+
} | {
|
|
204
|
+
type: 'resume';
|
|
205
|
+
timeOffset?: number;
|
|
206
|
+
} | {
|
|
207
|
+
type: 'setConfig';
|
|
208
|
+
config: SerializableReplayerConfig;
|
|
209
|
+
} | {
|
|
210
|
+
type: 'replaceEvents';
|
|
211
|
+
events: eventWithTime_3[];
|
|
212
|
+
} | {
|
|
213
|
+
type: 'addEvent';
|
|
214
|
+
event: eventWithTime_3;
|
|
215
|
+
} | {
|
|
216
|
+
type: 'enableInteract';
|
|
217
|
+
} | {
|
|
218
|
+
type: 'disableInteract';
|
|
219
|
+
} | {
|
|
220
|
+
type: 'destroy';
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
export declare interface HostDocumentOptions {
|
|
224
|
+
scriptUrl: string;
|
|
225
|
+
styleUrl?: string;
|
|
226
|
+
extraStyleSources?: string[];
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export declare type HostMessage = {
|
|
230
|
+
type: 'ready';
|
|
231
|
+
} | {
|
|
232
|
+
type: 'initialized';
|
|
233
|
+
metadata: playerMetaData_2;
|
|
234
|
+
activityIntervals: SessionInterval_2[];
|
|
235
|
+
} | {
|
|
236
|
+
type: 'replayer-event';
|
|
237
|
+
event: string;
|
|
238
|
+
payload?: unknown;
|
|
239
|
+
} | {
|
|
240
|
+
type: 'time';
|
|
241
|
+
currentTime: number;
|
|
242
|
+
} | {
|
|
243
|
+
type: 'dimensions';
|
|
244
|
+
width: number;
|
|
245
|
+
height: number;
|
|
246
|
+
top: number;
|
|
247
|
+
left: number;
|
|
248
|
+
} | {
|
|
249
|
+
type: 'error';
|
|
250
|
+
message: string;
|
|
251
|
+
};
|
|
252
|
+
|
|
103
253
|
export { IncrementalSource }
|
|
104
254
|
|
|
105
255
|
declare function inDom(n: Node): boolean;
|
|
@@ -122,12 +272,16 @@ declare function iterateResolveTree(tree: ResolveTree, cb: (mutation: addedNodeM
|
|
|
122
272
|
|
|
123
273
|
declare function legacy_isTouchEvent(event: MouseEvent | TouchEvent | PointerEvent): event is TouchEvent;
|
|
124
274
|
|
|
275
|
+
declare type Listener = (payload?: unknown) => void;
|
|
276
|
+
|
|
125
277
|
export declare let mirror: DeprecatedMirror;
|
|
126
278
|
|
|
127
279
|
export { MouseInteractions }
|
|
128
280
|
|
|
129
281
|
declare function on(type: string, fn: EventListenerOrEventListenerObject, target?: Document | IWindow): listenerHandler_2;
|
|
130
282
|
|
|
283
|
+
export declare function pickSerializableConfig(config: unknown): SerializableReplayerConfig;
|
|
284
|
+
|
|
131
285
|
declare type PlayerAssets = {
|
|
132
286
|
emitter: Emitter;
|
|
133
287
|
applyEventsSynchronously(events: Array<eventWithTime_2>): void;
|
|
@@ -275,6 +429,15 @@ export declare type recordOptions<T> = {
|
|
|
275
429
|
};
|
|
276
430
|
};
|
|
277
431
|
|
|
432
|
+
export declare type ReplayAnchor = 'top' | 'center';
|
|
433
|
+
|
|
434
|
+
export declare interface ReplayDimensions {
|
|
435
|
+
width: number;
|
|
436
|
+
height: number;
|
|
437
|
+
top: number;
|
|
438
|
+
left: number;
|
|
439
|
+
}
|
|
440
|
+
|
|
278
441
|
export declare class Replayer {
|
|
279
442
|
wrapper: HTMLDivElement;
|
|
280
443
|
iframe: HTMLIFrameElement;
|
|
@@ -383,6 +546,16 @@ declare type ResolveTree = {
|
|
|
383
546
|
parent: ResolveTree | null;
|
|
384
547
|
};
|
|
385
548
|
|
|
549
|
+
export declare const RRWEB_EMBEDDED_CHANNEL: "rrweb-embedded";
|
|
550
|
+
|
|
551
|
+
export declare const RRWEB_EMBEDDED_PROTOCOL_VERSION: 1;
|
|
552
|
+
|
|
553
|
+
declare const SERIALIZABLE_CONFIG_KEYS: readonly ["speed", "maxSpeed", "loadTimeout", "skipInactive", "inactivePeriodThreshold", "showWarning", "showDebug", "blockClass", "liveMode", "insertStyleRules", "triggerFocus", "UNSAFE_replayCanvas", "cspContent", "pauseAnimation", "mouseTail", "useVirtualDom", "inactiveThreshold", "inactiveSkipTime"];
|
|
554
|
+
|
|
555
|
+
declare type SerializableConfigKey = (typeof SERIALIZABLE_CONFIG_KEYS)[number];
|
|
556
|
+
|
|
557
|
+
export declare type SerializableReplayerConfig = Partial<Pick<playerConfig, SerializableConfigKey>>;
|
|
558
|
+
|
|
386
559
|
declare function shadowHostInDom(n: Node): boolean;
|
|
387
560
|
|
|
388
561
|
declare type SpeedContext = {
|
|
@@ -414,6 +587,8 @@ declare type SpeedState = {
|
|
|
414
587
|
context: SpeedContext;
|
|
415
588
|
};
|
|
416
589
|
|
|
590
|
+
export declare function startEmbeddedReplayerHost(options?: EmbeddedReplayerHostOptions): EmbeddedReplayerHost;
|
|
591
|
+
|
|
417
592
|
declare class StyleSheetMirror {
|
|
418
593
|
private id;
|
|
419
594
|
private styleIDMap;
|