saltfish
Version:
An interactive video-guided tour system for web applications
66 lines • 2.01 kB
TypeScript
import type { ButtonOverlay, DOMInteraction } from '../types';
/**
* Manager class for handling user interactions.
* Now subscribes to store changes for automatic state management.
*/
export declare class InteractionManager {
private container;
private buttons;
private buttonContainer;
private domEventListeners;
private storeUnsubscribe;
/**
* Creates interaction elements
* @param container - The container element for interactions
*/
create(container: HTMLElement): void;
/**
* Creates interactive buttons positioned within the shadow DOM
* @param buttons - Button configurations
*/
createButtons(buttons: ButtonOverlay[]): void;
/**
* Clears all interactive buttons
*/
clearButtons(): void;
/**
* Updates button visibility and positions based on player state
*/
updateButtonPositions(): void;
/**
* Sets up DOM interactions
* @param interactions - DOM interaction configurations
*/
setupDOMInteractions(interactions: DOMInteraction[]): void;
/**
* Clears all DOM interaction listeners
*/
clearDOMInteractions(): void;
/**
* Handles button clicks
* @param event - The click event
* @param buttonConfig - The button configuration
*/
private handleButtonClick;
/**
* Handles DOM interactions
* @param event - The event
* @param interaction - The interaction configuration
*/
private handleDOMInteraction;
/**
* Checks if the current step is the last step in the playlist
* @param store - The current store state
* @returns true if current step is the last step, false otherwise
*/
private isCurrentStepLast;
/**
* Flushes analytics events to ensure they're sent before player destruction
*/
private flushAnalytics;
/**
* Cleans up resources used by the interaction manager
*/
destroy(): void;
}
//# sourceMappingURL=InteractionManager.d.ts.map