import { Extension, Range } from '@tiptap/core';
import { PluginKey } from '@tiptap/pm/state';
declare module '@tiptap/core' {
    interface Commands<ReturnType> {
        searchAndReplace: {
            /**
             * Set search term in extension.
             */
            setSearchTerm: (searchTerm: string) => ReturnType;
            /**
             * Set replace term in extension.
             */
            setReplaceTerm: (replaceTerm: string) => ReturnType;
            /**
             * Set case sensitivity in extension.
             */
            setCaseSensitive: (caseSensitive: boolean) => ReturnType;
            /**
             * Reset current search result to first instance.
             */
            resetIndex: () => ReturnType;
            /**
             * Find next instance of search result.
             */
            nextSearchResult: () => ReturnType;
            /**
             * Find previous instance of search result.
             */
            previousSearchResult: () => ReturnType;
            /**
             * Replace first instance of search result with given replace term.
             */
            replace: () => ReturnType;
            /**
             * Replace all instances of search result with given replace term.
             */
            replaceAll: () => ReturnType;
        };
    }
    /**
     * Augment TipTap's Storage interface to include our custom extension storage.
     */
    interface Storage {
        searchAndReplace: {
            searchTerm: string;
            replaceTerm: string;
            results: Range[];
            lastSearchTerm: string;
            caseSensitive: boolean;
            lastCaseSensitive: boolean;
            resultIndex: number;
            lastResultIndex: number;
        };
    }
}
/**
 * Plugin key for the search and replace plugin.
 */
export declare const searchAndReplacePluginKey: PluginKey<any>;
/**
 * Options for the SearchAndReplace extension.
 */
export interface SearchAndReplaceOptions {
    /**
     * CSS class name for search result highlighting.
     */
    searchResultClass: string;
    /**
     * Whether to disable regex and treat search as literal text.
     */
    disableRegex: boolean;
}
/**
 * Storage interface for the SearchAndReplace extension.
 */
export interface SearchAndReplaceStorage {
    /**
     * Current search term.
     */
    searchTerm: string;
    /**
     * Current replace term.
     */
    replaceTerm: string;
    /**
     * Array of search result ranges in the document.
     */
    results: Range[];
    /**
     * Last search term (used for comparison).
     */
    lastSearchTerm: string;
    /**
     * Whether the search is case sensitive.
     */
    caseSensitive: boolean;
    /**
     * Last case sensitivity setting (used for comparison).
     */
    lastCaseSensitive: boolean;
    /**
     * Index of the currently active search result.
     */
    resultIndex: number;
    /**
     * Last result index (used for comparison).
     */
    lastResultIndex: number;
}
/**
 * SearchAndReplace extension for TipTap.
 *
 * Provides search and replace functionality with:
 * - Text search with regex support
 * - Case sensitivity toggle
 * - Navigation through search results
 * - Replace single or all occurrences
 * - Visual highlighting of search results
 */
export declare const SearchAndReplaceExtension: Extension<SearchAndReplaceOptions, SearchAndReplaceStorage>;
export default SearchAndReplaceExtension;
