@jager-ai/holy-editor
Version:
Rich text editor with Bible verse slash commands and PWA keyboard tracking, extracted from Holy Habit project
72 lines • 1.74 kB
TypeScript
/**
* Toast Manager
*
* Toast notification system for user feedback
* Extracted from Holy Habit holy-editor-pro.js
*/
export declare class ToastManager {
private static instance;
private toastContainer;
private constructor();
/**
* Get singleton instance
*/
static getInstance(): ToastManager;
/**
* Show toast message
*/
show(message: string, duration?: number, type?: 'info' | 'success' | 'warning' | 'error'): void;
/**
* Show success toast
*/
success(message: string, duration?: number): void;
/**
* Show error toast
*/
error(message: string, duration?: number): void;
/**
* Show warning toast
*/
warning(message: string, duration?: number): void;
/**
* Show info toast
*/
info(message: string, duration?: number): void;
/**
* Remove all toasts
*/
clear(): void;
/**
* Create toast container if needed
*/
private createToastContainer;
/**
* Apply styles to toast element
*/
private applyToastStyles;
/**
* Get type-specific styles
*/
private getTypeStyles;
/**
* Remove toast with animation
*/
private removeToast;
/**
* Handle API error and show appropriate toast
*/
handleApiError(error: Error, ref?: string): void;
/**
* Show loading toast (returns cleanup function)
*/
showLoading(message?: string): () => void;
/**
* Add spinner animation CSS
*/
private addSpinnerStyles;
/**
* Show toast with custom HTML content
*/
showCustom(htmlContent: string, duration?: number, className?: string): void;
}
//# sourceMappingURL=ToastManager.d.ts.map