update typescript to 3.9.5
This commit is contained in:
@@ -55,7 +55,7 @@
|
|||||||
"ts-node": "^7.0.1",
|
"ts-node": "^7.0.1",
|
||||||
"tslib": "^1.9.3",
|
"tslib": "^1.9.3",
|
||||||
"tslint": "^4.5.1",
|
"tslint": "^4.5.1",
|
||||||
"typescript": "^3.8.3"
|
"typescript": "^3.9.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/smoothscroll-polyfill": "^0.3.0",
|
"@types/smoothscroll-polyfill": "^0.3.0",
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ export class Replayer {
|
|||||||
private setupDom() {
|
private setupDom() {
|
||||||
this.wrapper = document.createElement('div');
|
this.wrapper = document.createElement('div');
|
||||||
this.wrapper.classList.add('replayer-wrapper');
|
this.wrapper.classList.add('replayer-wrapper');
|
||||||
this.config.root.appendChild(this.wrapper);
|
this.config.root!.appendChild(this.wrapper);
|
||||||
|
|
||||||
this.mouse = document.createElement('div');
|
this.mouse = document.createElement('div');
|
||||||
this.mouse.classList.add('replayer-mouse');
|
this.mouse.classList.add('replayer-mouse');
|
||||||
@@ -554,7 +554,7 @@ export class Replayer {
|
|||||||
const { triggerFocus } = this.config;
|
const { triggerFocus } = this.config;
|
||||||
switch (d.type) {
|
switch (d.type) {
|
||||||
case MouseInteractions.Blur:
|
case MouseInteractions.Blur:
|
||||||
if (((target as Node) as HTMLElement).blur) {
|
if ('blur' in ((target as Node) as HTMLElement)) {
|
||||||
((target as Node) as HTMLElement).blur();
|
((target as Node) as HTMLElement).blur();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
2
typings/boost.d.ts
vendored
Normal file
2
typings/boost.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
export * from './index';
|
||||||
|
export * from './packer';
|
||||||
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
@@ -2,6 +2,5 @@ import record from './record';
|
|||||||
import { Replayer } from './replay';
|
import { Replayer } from './replay';
|
||||||
import { mirror } from './utils';
|
import { mirror } from './utils';
|
||||||
export { EventType, IncrementalSource, MouseInteractions, ReplayerEvents, } from './types';
|
export { EventType, IncrementalSource, MouseInteractions, ReplayerEvents, } from './types';
|
||||||
export { pack, unpack } from './packer';
|
|
||||||
declare const addCustomEvent: <T>(tag: string, payload: T) => void;
|
declare const addCustomEvent: <T>(tag: string, payload: T) => void;
|
||||||
export { record, addCustomEvent, Replayer, mirror };
|
export { record, addCustomEvent, Replayer, mirror };
|
||||||
|
|||||||
4
typings/record/mutation.d.ts
vendored
4
typings/record/mutation.d.ts
vendored
@@ -13,8 +13,8 @@ export default class MutationBuffer {
|
|||||||
private inlineStylesheet;
|
private inlineStylesheet;
|
||||||
private maskAllInputs;
|
private maskAllInputs;
|
||||||
constructor(cb: mutationCallBack, blockClass: blockClass, inlineStylesheet: boolean, maskAllInputs: boolean);
|
constructor(cb: mutationCallBack, blockClass: blockClass, inlineStylesheet: boolean, maskAllInputs: boolean);
|
||||||
processMutations(mutations: mutationRecord[]): void;
|
processMutations: (mutations: mutationRecord[]) => void;
|
||||||
private processMutation;
|
private processMutation;
|
||||||
private genAdds;
|
private genAdds;
|
||||||
emit(): void;
|
emit: () => void;
|
||||||
}
|
}
|
||||||
|
|||||||
17
typings/replay/index.d.ts
vendored
17
typings/replay/index.d.ts
vendored
@@ -1,20 +1,17 @@
|
|||||||
import Timer from './timer';
|
import { Timer } from './timer';
|
||||||
import { eventWithTime, playerConfig, playerMetaData, Handler } from '../types';
|
import { eventWithTime, playerConfig, playerMetaData, Handler } from '../types';
|
||||||
import './styles/style.css';
|
import './styles/style.css';
|
||||||
export declare class Replayer {
|
export declare class Replayer {
|
||||||
wrapper: HTMLDivElement;
|
wrapper: HTMLDivElement;
|
||||||
iframe: HTMLIFrameElement;
|
iframe: HTMLIFrameElement;
|
||||||
timer: Timer;
|
get timer(): Timer;
|
||||||
private events;
|
|
||||||
private config;
|
private config;
|
||||||
private mouse;
|
private mouse;
|
||||||
private emitter;
|
private emitter;
|
||||||
private baselineTime;
|
|
||||||
private lastPlayedEvent;
|
|
||||||
private nextUserInteractionEvent;
|
private nextUserInteractionEvent;
|
||||||
private noramlSpeed;
|
private noramlSpeed;
|
||||||
private missingNodeRetryMap;
|
private legacy_missingNodeRetryMap;
|
||||||
private playing;
|
private service;
|
||||||
constructor(events: Array<eventWithTime | string>, config?: Partial<playerConfig>);
|
constructor(events: Array<eventWithTime | string>, config?: Partial<playerConfig>);
|
||||||
on(event: string, handler: Handler): void;
|
on(event: string, handler: Handler): void;
|
||||||
setConfig(config: Partial<playerConfig>): void;
|
setConfig(config: Partial<playerConfig>): void;
|
||||||
@@ -24,15 +21,17 @@ export declare class Replayer {
|
|||||||
play(timeOffset?: number): void;
|
play(timeOffset?: number): void;
|
||||||
pause(): void;
|
pause(): void;
|
||||||
resume(timeOffset?: number): void;
|
resume(timeOffset?: number): void;
|
||||||
|
startLive(baselineTime?: number): void;
|
||||||
addEvent(rawEvent: eventWithTime | string): void;
|
addEvent(rawEvent: eventWithTime | string): void;
|
||||||
|
enableInteract(): void;
|
||||||
|
disableInteract(): void;
|
||||||
private setupDom;
|
private setupDom;
|
||||||
private handleResize;
|
private handleResize;
|
||||||
private getDelay;
|
|
||||||
private getCastFn;
|
private getCastFn;
|
||||||
private rebuildFullSnapshot;
|
private rebuildFullSnapshot;
|
||||||
private waitForStylesheetLoad;
|
private waitForStylesheetLoad;
|
||||||
private applyIncremental;
|
private applyIncremental;
|
||||||
private resolveMissingNode;
|
private legacy_resolveMissingNode;
|
||||||
private moveAndHover;
|
private moveAndHover;
|
||||||
private hoverElements;
|
private hoverElements;
|
||||||
private isUserInteraction;
|
private isUserInteraction;
|
||||||
|
|||||||
71
typings/replay/machine.d.ts
vendored
Normal file
71
typings/replay/machine.d.ts
vendored
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
import { playerConfig, eventWithTime, Emitter } from '../types';
|
||||||
|
import { Timer } from './timer';
|
||||||
|
export declare type PlayerContext = {
|
||||||
|
events: eventWithTime[];
|
||||||
|
timer: Timer;
|
||||||
|
speed: playerConfig['speed'];
|
||||||
|
timeOffset: number;
|
||||||
|
baselineTime: number;
|
||||||
|
lastPlayedEvent: eventWithTime | null;
|
||||||
|
};
|
||||||
|
export declare type PlayerEvent = {
|
||||||
|
type: 'PLAY';
|
||||||
|
payload: {
|
||||||
|
timeOffset: number;
|
||||||
|
};
|
||||||
|
} | {
|
||||||
|
type: 'CAST_EVENT';
|
||||||
|
payload: {
|
||||||
|
event: eventWithTime;
|
||||||
|
};
|
||||||
|
} | {
|
||||||
|
type: 'PAUSE';
|
||||||
|
} | {
|
||||||
|
type: 'RESUME';
|
||||||
|
payload: {
|
||||||
|
timeOffset: number;
|
||||||
|
};
|
||||||
|
} | {
|
||||||
|
type: 'END';
|
||||||
|
} | {
|
||||||
|
type: 'REPLAY';
|
||||||
|
} | {
|
||||||
|
type: 'FAST_FORWARD';
|
||||||
|
} | {
|
||||||
|
type: 'BACK_TO_NORMAL';
|
||||||
|
} | {
|
||||||
|
type: 'TO_LIVE';
|
||||||
|
payload: {
|
||||||
|
baselineTime?: number;
|
||||||
|
};
|
||||||
|
} | {
|
||||||
|
type: 'ADD_EVENT';
|
||||||
|
payload: {
|
||||||
|
event: eventWithTime;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export declare type PlayerState = {
|
||||||
|
value: 'inited';
|
||||||
|
context: PlayerContext;
|
||||||
|
} | {
|
||||||
|
value: 'playing';
|
||||||
|
context: PlayerContext;
|
||||||
|
} | {
|
||||||
|
value: 'paused';
|
||||||
|
context: PlayerContext;
|
||||||
|
} | {
|
||||||
|
value: 'ended';
|
||||||
|
context: PlayerContext;
|
||||||
|
} | {
|
||||||
|
value: 'skipping';
|
||||||
|
context: PlayerContext;
|
||||||
|
} | {
|
||||||
|
value: 'live';
|
||||||
|
context: PlayerContext;
|
||||||
|
};
|
||||||
|
declare type PlayerAssets = {
|
||||||
|
emitter: Emitter;
|
||||||
|
getCastFn(event: eventWithTime, isSync: boolean): () => void;
|
||||||
|
};
|
||||||
|
export declare function createPlayerService(context: PlayerContext, { getCastFn, emitter }: PlayerAssets): import("@xstate/fsm").StateMachine.Service<PlayerContext, PlayerEvent, PlayerState>;
|
||||||
|
export {};
|
||||||
5
typings/replay/timer.d.ts
vendored
5
typings/replay/timer.d.ts
vendored
@@ -1,5 +1,5 @@
|
|||||||
import { playerConfig, actionWithDelay } from '../types';
|
import { playerConfig, actionWithDelay, eventWithTime } from '../types';
|
||||||
export default class Timer {
|
export declare class Timer {
|
||||||
timeOffset: number;
|
timeOffset: number;
|
||||||
private actions;
|
private actions;
|
||||||
private config;
|
private config;
|
||||||
@@ -11,3 +11,4 @@ export default class Timer {
|
|||||||
clear(): void;
|
clear(): void;
|
||||||
private findActionIndex;
|
private findActionIndex;
|
||||||
}
|
}
|
||||||
|
export declare function getDelay(event: eventWithTime, baselineTime: number): number;
|
||||||
|
|||||||
5
typings/types.d.ts
vendored
5
typings/types.d.ts
vendored
@@ -161,7 +161,7 @@ export declare type removedNodeMutation = {
|
|||||||
};
|
};
|
||||||
export declare type addedNodeMutation = {
|
export declare type addedNodeMutation = {
|
||||||
parentId: number;
|
parentId: number;
|
||||||
previousId: number | null;
|
previousId?: number | null;
|
||||||
nextId: number | null;
|
nextId: number | null;
|
||||||
node: serializedNodeWithId;
|
node: serializedNodeWithId;
|
||||||
};
|
};
|
||||||
@@ -296,6 +296,7 @@ export declare enum ReplayerEvents {
|
|||||||
SkipStart = "skip-start",
|
SkipStart = "skip-start",
|
||||||
SkipEnd = "skip-end",
|
SkipEnd = "skip-end",
|
||||||
MouseInteraction = "mouse-interaction",
|
MouseInteraction = "mouse-interaction",
|
||||||
EventCast = "event-cast"
|
EventCast = "event-cast",
|
||||||
|
CustomEvent = "custom-event"
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
|
|||||||
Reference in New Issue
Block a user