/**
 * Unicode-aware text utilities for terminal rendering
 *
 * These utilities work at the code-point level rather than UTF-16 code units,
 * so that surrogate-pair emoji count as one "column".
 */
/**
 * Convert a string to an array of code points (handles surrogate pairs correctly)
 */
export declare function toCodePoints(str: string): string[];
/**
 * Get the code-point length of a string
 */
export declare function cpLen(str: string): number;
/**
 * Slice a string by code-point indices
 */
export declare function cpSlice(str: string, start: number, end?: number): string;
/**
 * Strip characters that can break terminal rendering.
 *
 * Characters stripped:
 * - ANSI escape sequences
 * - C0 control chars (0x00-0x1F) except CR/LF/TAB
 * - C1 control chars (0x80-0x9F)
 *
 * Characters preserved:
 * - All printable Unicode including emojis
 * - CR/LF (0x0D/0x0A) - needed for line breaks
 * - TAB (0x09)
 */
export declare function stripUnsafeCharacters(str: string): string;
/**
 * Cached version of stringWidth function for better performance
 */
export declare function getCachedStringWidth(str: string): number;
/**
 * Clear the string width cache
 */
export declare function clearStringWidthCache(): void;
export declare const isWordCharStrict: (char: string | undefined) => boolean;
export declare const isWhitespace: (char: string | undefined) => boolean;
export declare const isCombiningMark: (char: string | undefined) => boolean;
export declare const isWordCharWithCombining: (char: string | undefined) => boolean;
export declare const getCharScript: (char: string | undefined) => string;
export declare const isDifferentScript: (char1: string | undefined, char2: string | undefined) => boolean;
/**
 * Find previous word boundary in a line
 */
export declare function findPrevWordBoundary(line: string, cursorCol: number): number;
/**
 * Find next word boundary in a line
 */
export declare function findNextWordBoundary(line: string, cursorCol: number): number;
/**
 * Find next word start within a line, starting from col
 */
export declare function findNextWordStartInLine(line: string, col: number): number | null;
/**
 * Find previous word start within a line
 */
export declare function findPrevWordStartInLine(line: string, col: number): number | null;
//# sourceMappingURL=textUtils.d.ts.map