/** * Velo Plot - Loading Indicator Module * * Provides visual loading/progress indicators for chart operations. * Supports progress bars, spinners, and skeleton placeholders. * * @module loading */ export type LoadingIndicatorType = 'spinner' | 'progress' | 'skeleton' | 'pulse'; export interface LoadingIndicatorOptions { /** Indicator type (default: 'spinner') */ type?: LoadingIndicatorType; /** Message to display (default: 'Loading...') */ message?: string; /** Show percentage for progress type (default: true) */ showPercentage?: boolean; /** Background overlay opacity (0-1, default: 0.7) */ overlayOpacity?: number; /** Accent color for spinner/progress (default: '#00f2ff') */ accentColor?: string; /** Background color (default: 'rgba(0,0,0,0.7)') */ backgroundColor?: string; /** Text color (default: '#ffffff') */ textColor?: string; /** Size: 'small', 'medium', 'large' (default: 'medium') */ size?: 'small' | 'medium' | 'large'; /** Custom CSS class */ className?: string; /** Auto-hide after completion (default: true) */ autoHide?: boolean; /** Hide delay in ms after completion (default: 300) */ hideDelay?: number; } export interface LoadingState { /** Whether loading is in progress */ isLoading: boolean; /** Progress value (0-100) */ progress: number; /** Current message */ message: string; /** Start time of loading */ startTime: number | null; /** Estimated time remaining in ms */ eta: number | null; } export declare class LoadingIndicator { private container; private element; private options; private state; private progressHistory; constructor(container: HTMLElement, options?: LoadingIndicatorOptions); /** * Show the loading indicator */ show(message?: string): void; /** * Hide the loading indicator */ hide(): void; /** * Update progress (0-100) */ setProgress(progress: number, message?: string): void; /** * Update message only */ setMessage(message: string): void; /** * Check if loading is in progress */ isLoading(): boolean; /** * Get current progress */ getProgress(): number; /** * Get current state */ getState(): LoadingState; /** * Destroy the indicator */ destroy(): void; private createElement; private destroyElement; private render; private getInnerHtml; private injectStyles; private calculateEta; private formatTime; } /** * Create a loading indicator for a container */ export declare function createLoadingIndicator(container: HTMLElement, options?: LoadingIndicatorOptions): LoadingIndicator; /** * Show loading with a simple spinner */ export declare function showLoading(container: HTMLElement, message?: string): LoadingIndicator; /** * Show progress loading */ export declare function showProgress(container: HTMLElement, message?: string): LoadingIndicator;