/**
 * Utilities for extracting plain text context around a selection.
 * Used by AI text edit to display context in the dialog.
 */
/**
 * Sanitize text by removing Slate's internal invisible characters.
 * @param text - Text that may contain invisible characters
 * @returns Clean text with invisible characters removed
 */
export declare function sanitizeSlateText(text: string): string;
/**
 * Extract plain text context from a DOM container using global text offsets.
 * Works for contenteditable elements and Slate editor rendered output.
 *
 * @param container - The DOM container element
 * @param globalStartOffset - Global text offset where selection starts
 * @param globalEndOffset - Global text offset where selection ends
 * @param contextSize - Number of characters of context to extract (default 100)
 * @returns Object with contextBefore and contextAfter strings
 */
export declare function extractDOMSelectionContext(container: Node, globalStartOffset: number, globalEndOffset: number, contextSize?: number): {
    contextBefore: string;
    contextAfter: string;
};
/**
 * Extract plain text context from a string value using offsets.
 * Works for input and textarea elements.
 *
 * @param value - The full text value
 * @param startOffset - Offset where selection starts
 * @param endOffset - Offset where selection ends
 * @param contextSize - Number of characters of context to extract (default 100)
 * @returns Object with contextBefore and contextAfter strings
 */
export declare function extractPlainTextContext(value: string, startOffset: number, endOffset: number, contextSize?: number): {
    contextBefore: string;
    contextAfter: string;
};
