Skip to content

Commit

Permalink
ref(rrweb): allow multi touch gestures to be shown for mobile replays
Browse files Browse the repository at this point in the history
  • Loading branch information
michellewzhang committed May 16, 2024
1 parent aa9adb5 commit 5f4dfd3
Show file tree
Hide file tree
Showing 9 changed files with 334 additions and 63 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"prettier": "2.8.4",
"size-limit": "~8.2.6",
"turbo": "^1.2.4",
"typescript": "^4.9.5"
"typescript": "^4.9.5",
"yalc": "^1.0.0-pre.53"
},
"scripts": {
"build:all": "NODE_OPTIONS='--max-old-space-size=4096' yarn run concurrently --success=all -r -m=1 'yarn workspaces-to-typescript-project-references' 'yarn turbo run prepare'",
Expand Down
11 changes: 11 additions & 0 deletions packages/rrweb-player/src/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/rrweb-player/src/main.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

146 changes: 146 additions & 0 deletions packages/rrweb-player/src/utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/rrweb-player/src/utils.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions packages/rrweb-player/typings/src/main.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { eventWithTime } from '@sentry-internal/rrweb-types';
import _Player from './Player.svelte';
type PlayerProps = {
events: eventWithTime[];
};
declare class Player extends _Player {
constructor(options: {
target: Element;
props: PlayerProps;
data?: PlayerProps;
});
}
export default Player;
30 changes: 30 additions & 0 deletions packages/rrweb-player/typings/src/utils.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
declare global {
interface Document {
mozExitFullscreen: Document['exitFullscreen'];
webkitExitFullscreen: Document['exitFullscreen'];
msExitFullscreen: Document['exitFullscreen'];
webkitIsFullScreen: Document['fullscreen'];
mozFullScreen: Document['fullscreen'];
msFullscreenElement: Document['fullscreen'];
}
interface HTMLElement {
mozRequestFullScreen: Element['requestFullscreen'];
webkitRequestFullscreen: Element['requestFullscreen'];
msRequestFullscreen: Element['requestFullscreen'];
}
}
import type { eventWithTime } from '@sentry-internal/rrweb-types';
export declare function inlineCss(cssObj: Record<string, string>): string;
export declare function formatTime(ms: number): string;
export declare function openFullscreen(el: HTMLElement): Promise<void>;
export declare function exitFullscreen(): Promise<void>;
export declare function isFullscreen(): boolean;
export declare function onFullscreenChange(handler: () => unknown): () => void;
export declare function typeOf(obj: unknown): 'boolean' | 'number' | 'string' | 'function' | 'array' | 'date' | 'regExp' | 'undefined' | 'null' | 'object';
/**
* Get periods of time when no user interaction happened from a list of events.
* @param events - all events
* @param inactivePeriodThreshold - threshold of inactive time in milliseconds
* @returns periods of time consist with [start time, end time]
*/
export declare function getInactivePeriods(events: eventWithTime[], inactivePeriodThreshold: number): [number, number][];
Loading

0 comments on commit 5f4dfd3

Please sign in to comment.