UNPKG

@useviber/plugin

Version:

Universal Viber Plugin - Works with any framework (React, Vue, Angular, Svelte, Vanilla)

68 lines (67 loc) 1.85 kB
export interface ViberConfig { port?: number; viberPort?: number; workspace: string; debug?: boolean; autoConnect?: boolean; } export interface ElementInfo { tagName: string; className: string; id: string; innerText: string; attributes: Record<string, string>; boundingBox?: DOMRect; } export interface StatusUpdate { status: 'processing' | 'completed' | 'failed'; progress: number; message: string; timestamp: string; data?: any; } export declare class UniversalViber { private config; private storage; private webSocket; private floatingIcon; private chatInterface; private isConnected; private wsConnected; private selectedElement; private parentChain; private availableExtensions; private selectedExtensionId; private aiProvider; constructor(config: ViberConfig); private log; private init; private getCliPort; private getCurrentWorkspace; private connect; private openWebSocket; private handleWebSocketMessage; private handleStatusUpdate; private createFloatingIcon; private createChatInterface; private setupGlobalListeners; private handleGlobalElementSelect; private handleElementClick; private toggleChat; private updateConnectionStatus; private handleInstructionSubmit; private analyzeElement; private getCurrentFile; selectElement(element: HTMLElement): void; showChat(): void; hideChat(): void; toggleChatPublic(): void; destroy(): void; getSelectedElement(): HTMLElement | null; getParentChain(): any[]; isPluginInitialized(): boolean; isWebSocketConnected(): boolean; getWebSocketState(): string; getFrameworkInfo(): any; } export declare function createUniversalViber(config: ViberConfig): UniversalViber;