export interface HighlightRange { /** Index of the first highlighted character. */ start: number; /** Index one past the last highlighted character. */ end: number; } export interface HighlightSegment { text: string; highlighted: boolean; } /** * Cut `value` into alternating plain and highlighted runs. * * Split out from the composer because it is the part that can be wrong in a way * nobody sees: the mirror it feeds sits behind a real text field, so a segment * boundary off by one paints the tint half a character adrift and everything * still looks like a working composer. Ranges arrive from a caller that is * matching text it does not control, so overlapping, unsorted, reversed and * out-of-bounds inputs are all normal here — none of them may drop or duplicate * a character, because the mirror has to lay out identically to the field it * sits behind or the tint drifts from the words. */ export declare function splitHighlightSegments(value: string, ranges: readonly HighlightRange[]): HighlightSegment[];