/** * Search & Replace Engine * Full-text search, regex support, document-wide replace, search history */ export interface SearchResult { id: string; text: string; position: number; length: number; lineNumber: number; context: string; documentId?: string; userId?: string; } export interface SearchOptions { caseSensitive?: boolean; wholeWord?: boolean; regex?: boolean; maxResults?: number; contextLength?: number; } export interface ReplaceResult { replacedCount: number; skippedCount: number; results: SearchResult[]; } export interface SearchHistory { query: string; timestamp: number; resultCount: number; isRegex: boolean; } export declare class SearchEngine { private history; private maxHistorySize; /** * Search for text in content */ search(content: string, query: string, options?: SearchOptions): SearchResult[]; /** * Replace text in content */ replace(content: string, query: string, replacement: string, options?: SearchOptions & { replaceAll?: boolean; }): ReplaceResult; /** * Find and replace with callback */ replaceWithCallback(content: string, query: string, callback: (match: string, index: number) => string, options?: SearchOptions): string; /** * Find all occurrences in text */ findAll(text: string, query: string, caseSensitive?: boolean): number[]; /** * Get search history */ getHistory(): SearchHistory[]; /** * Add to search history */ private addToHistory; /** * Clear search history */ clearHistory(): void; /** * Get suggestions based on history */ getSuggestions(prefix: string, limit?: number): string[]; /** * Validate regex pattern */ validateRegex(pattern: string): { valid: boolean; error?: string; }; } export declare class MultiDocumentSearch { private engine; /** * Search across multiple documents */ searchMultiple(documents: Map, query: string, options?: SearchOptions): Map; /** * Replace across multiple documents */ replaceMultiple(documents: Map, query: string, replacement: string, options?: SearchOptions & { replaceAll?: boolean; }): Map; /** * Get statistics for search across documents */ getStatistics(documents: Map, query: string, options?: SearchOptions): { totalMatches: number; documentsMatched: number; averageMatchesPerDoc: number; }; /** * Get engine for advanced usage */ getEngine(): SearchEngine; } //# sourceMappingURL=index.d.ts.map