/**
 * Whitespace reconciliation for AI text edits.
 *
 * AI models return replacement/insert text without the boundary whitespace of
 * the location it lands in: double-click selections include the trailing
 * space of a word, and cursor insertions sit directly between two characters.
 * Splicing the model output in verbatim glues words together ("HelloWorld").
 */
/**
 * Re-attach the leading/trailing whitespace of the original selected text to
 * a replacement that lacks it, so replacing e.g. "world " (double-click
 * selection) with "planet" does not glue "planet" to the following word.
 */
export declare function preserveSelectionBoundaryWhitespace(originalText: string | undefined, replacementText: string): string;
/**
 * Pad text inserted at a collapsed cursor with the spaces required by its
 * immediate neighbours, e.g. inserting "new text" at "Hello|world" yields
 * " new text " rather than "Hellonew textworld". Markup characters (<, >, =)
 * never trigger padding, so raw HTML field values stay untouched.
 */
export declare function padInsertedTextWhitespace(newText: string, charBefore: string, charAfter: string): string;
