UNPKG

armor-editor

Version:

Advanced rich text editor with premium armor-grade security, real-time collaboration, spell checking, track changes, and framework-agnostic design for React, Vue, Angular, Next.js, Nuxt.js

54 lines (53 loc) 1.38 kB
export interface AIProvider { name: string; apiKey: string; models: string[]; defaultModel: string; } export interface AIConfig { enabled: boolean; providers?: { openai?: AIProvider; anthropic?: AIProvider; google?: AIProvider; cohere?: AIProvider; huggingface?: AIProvider; }; defaultProvider?: string; features?: { smartSuggestions?: boolean; contentGeneration?: boolean; grammarCheck?: boolean; toneAdjustment?: boolean; }; } export interface ContentTemplate { id: string; name: string; description: string; category: string; content: string; variables: string[]; } export declare class AIEnhancements { private editor; private config; private suggestionBox; private templates; private inputListener?; private keydownListener?; constructor(editor: any, config: AIConfig); private initializeTemplates; private setupSmartSuggestions; private checkForSuggestions; private getAISuggestions; private showSuggestions; private applySuggestion; private hideSuggestions; private showTemplateSelector; private applyTemplate; generateContent(prompt: string): Promise<string>; addTemplate(template: ContentTemplate): void; getTemplates(): ContentTemplate[]; destroy(): void; }