/** * Thai Text Utilities - Handle Thai combining characters * * Thai vowels and tone marks are combining characters that must * stay attached to their base consonant. */ /** * Check if a character is a Thai vowel or diacritic * * Thai Unicode ranges: * - 0x0E30-0x0E3A: Vowels (Sara) and tone marks * - 0x0E40-0x0E44: Leading vowels * - 0x0E47-0x0E4E: Tone marks and other diacritics */ export declare function isThaiVowelOrDiacritic(char: string): boolean; /** * Check if text contains ONLY Thai vowels/diacritics * IMPORTANT: Returns false if text contains any whitespace * This prevents merging parts that have spaces (which would lose the space) */ export declare function isOnlyThaiVowels(text: string): boolean; /** * Merge Thai vowels/diacritics with the previous word part * This prevents vowels from floating separately from their consonants * * @param parts Array of lyric parts * @returns Merged array where vowel-only parts are combined with previous parts */ export declare function mergeThaiVowelsWithPreviousParts(parts: T[]): T[]; /** * Normalize Thai text for consistent rendering * Applies Unicode normalization (NFC) to ensure combining characters * are properly composed with their base characters */ export declare function normalizeThaiText(text: string): string; /** * Split Thai text by words while keeping vowels attached * This is a simple implementation that respects Thai combining characters */ export declare function splitThaiText(text: string): string[];