/** * Slide Controls Type Definitions * * Types for manual slide navigation controls and command sending. */ /** * Position options for the slide controls */ export type SlideControlsPosition = 'bottom-right' | 'bottom-center' | 'top-right'; /** * Slide command types that can be sent */ export type SlideCommandType = 'next' | 'prev' | 'goto'; /** * Source of the slide command */ export type CommandSource = 'manual' | 'ai' | 'system'; /** * Command to control slide navigation */ export interface SlideCommand { /** * Type of slide command */ type: SlideCommandType; /** * Target slide number (required for 'goto' commands) */ slide_number?: number; /** * Deck ID being controlled */ deck_id: string; /** * Session ID for the presentation */ session_id: string; /** * Source of the command */ source: CommandSource; /** * Timestamp when command was created */ timestamp?: Date; } /** * Options for initializing SlideControls component */ export interface SlideControlsOptions { /** * Position of the controls on screen * @default 'bottom-right' */ position?: SlideControlsPosition; /** * Whether to show the slide counter display * @default false */ showCounter?: boolean; /** * Session ID for the presentation */ sessionId: string; /** * Deck ID being controlled */ deckId: string; /** * Supabase project URL */ supabaseUrl: string; /** * Supabase anonymous key */ supabaseKey: string; /** * Callback when a command is successfully sent */ onCommandSent?: (command: SlideCommand) => void; /** * Callback when an error occurs */ onError?: (error: Error) => void; /** * Debounce time in milliseconds for rapid button clicks * @default 300 */ debounceMs?: number; /** * Theme variant for styling * @default 'light' */ theme?: 'light' | 'dark'; } /** * Current state of the slide controls */ export interface SlideControlsState { /** * Current slide number (0-indexed) */ currentSlide: number; /** * Total number of slides */ totalSlides: number; /** * Whether controls are currently enabled */ enabled: boolean; /** * Whether controls are disabled due to AI speaking */ disabledByAI: boolean; /** * Whether a command is currently being sent */ sending: boolean; } /** * Options for initializing SlideCommander */ export interface SlideCommanderOptions { /** * Session ID for the presentation */ sessionId: string; /** * Deck ID being controlled */ deckId: string; /** * Supabase project URL */ supabaseUrl: string; /** * Supabase anonymous key */ supabaseKey: string; /** * Callback when an error occurs */ onError?: (error: Error) => void; /** * Debounce time in milliseconds for rapid commands * @default 300 */ debounceMs?: number; } /** * Database record for slide control commands table */ export interface SlideControlCommandRecord { id?: string; deck_id: string; session_id: string; command_type: SlideCommandType; slide_number?: number; source: CommandSource; created_at?: string; }