feat: refactor clicks to generic mouse interactions with click/hover subtypes

This commit is contained in:
2026-02-15 18:17:10 +01:00
parent 65f8b2c485
commit 483dfabe10
3 changed files with 112 additions and 27 deletions

View File

@@ -1,6 +1,7 @@
export interface RecordEvent {
id: string;
type: 'click' | 'scroll' | 'wait' | 'hover';
type: 'mouse' | 'scroll' | 'wait';
interactionType?: 'click' | 'hover';
selector?: string; // CSS selector
timestamp: number; // Time in ms since start of recording
duration: number; // Duration allocated for this action in playback
@@ -9,6 +10,7 @@ export interface RecordEvent {
motionBlur?: boolean; // Enable motion blur effect
rect?: { x: number; y: number; width: number; height: number }; // Element position for rendering
clickOrigin?: 'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
realClick?: boolean; // Trigger real browser action (navigation)
}
export interface RecordingSession {