UNPKG

@paperlinkai/chat

Version:

PaperLink AI Chat Widget - Easy integration for any website

55 lines (53 loc) 1.2 kB
import { CustomIcons } from '../types/widget'; interface LoadedIcon { success: boolean; dataUrl?: string; error?: string; } export declare class IconLoader { private cache; private loadingPromises; constructor(); /** * Load and validate a custom icon */ loadIcon(iconType: keyof CustomIcons, url: string): Promise<LoadedIcon>; /** * Internal icon loading logic */ private loadIconInternal; /** * Load image with validation */ private loadImageWithValidation; /** * Create timeout promise */ private timeoutPromise; /** * Extract file extension from URL */ private getFileExtension; /** * Get cached icon if valid */ private getCachedIcon; /** * Load cache from sessionStorage */ private loadCacheFromStorage; /** * Save cache to sessionStorage */ private saveCacheToStorage; /** * Get troubleshooting tips based on error message */ private getTroubleshootingTips; /** * Clear all cached icons (useful for development) */ clearCache(): void; } export declare const iconLoader: IconLoader; export {};