import type { CSSProperties } from 'react'; import type { Token } from '../adapters/types'; import type { LineColor, LineConfig, LineRange } from '../CodeSnippetContext'; export type LineTextStyles = { colorClass?: string; textStyleClass?: string; className?: string; style?: CSSProperties; }; /** * Build text styles for a line based on its configuration. * When ranges are present, the whole-line colorClass is suppressed * so that only individual ranges get colored text. */ export declare const getLineTextStyles: (lineConfig: LineConfig | undefined) => LineTextStyles; export type TextSegment = { content: string; rangeColor?: string; }; /** * Split a plain text string at range boundaries, tagging overlapping portions * with their range color class. * * Example: * splitTextByRanges("Accept: application/json", [{ start: 8, end: 24, color: 'danger' }]) * → [{ content: "Accept: " }, { content: "application/json", rangeColor: "text-..." }] */ export declare const splitTextByRanges: (text: string, ranges: LineRange[], lineColor?: LineColor) => TextSegment[]; export type EnrichedToken = Token & { rangeColor?: string; }; /** * Split syntax tokens at range boundaries, tagging overlapping portions * with their range color class. * * Iterates tokens tracking character position; splits any token that * overlaps a range boundary. */ export declare const splitTokensByRanges: (tokens: Token[], ranges: LineRange[], lineColor?: LineColor) => EnrichedToken[];