import React from 'react'; import Animated from 'react-native-reanimated'; import type { TextStyle } from 'react-native'; interface TextCompProps { word: string; i: number; addRange: (y: number, layout: { x: number; y: number; width: number; height: number; }, word: string) => void; values: Animated.SharedValue>; textColor: string; highlightedTextColor: string; highlightColor: string; lineBreakHeight?: number; lineSpace?: number; textStyle?: TextStyle; textBackgroundColor?: string; } interface BreakTextProps extends Omit { words: string[]; } interface HighlightTextProps extends Omit { /** * The text content to be displayed in the HighlightText component. */ text: string; /** * Finger press delay before highlighting the text. Default is 150ms. */ highlightInitialDelay?: number; /** * An array specifying the initial highlight data, this is used to render text highlight initially. */ initialHighlightData?: Array<{ start: number; end: number; }>; /** * The margin of the HighlightText component. */ margin?: number; /** * The margin at the bottom of the HighlightText component. */ marginBottom?: number; /** * The margin at the top of the HighlightText component. */ marginTop?: number; /** * The margin at the left of the HighlightText component. */ marginLeft?: number; /** * The margin at the right of the HighlightText component. */ marginRight?: number; /** * A callback function triggered when the highlighting process starts. */ onHighlightStart?: () => void; /** * A callback function triggered when the highlighting process ends. * It receives the id of the highlighted area as a parameter. This id can be used to delete the highlighted area. */ onHighlightEnd?: (id: number) => void; /** * A callback function triggered when a highlighted region is tapped. * It receives the id of the tapped region and the event object. */ onHighlightTapped?: (id: number, e: { absoluteX: number; absoluteY: number; }) => void; /** * If true, clears the highlight when a region is tapped. * Default is false. */ clearHighlightOnTap?: boolean; /** * The backgroundColor of the HighlightText Component */ backgroundColor?: string; } export interface HighlightTextRef { getHighlightedData: () => Array<{ start: number; end: number; }>; deleteHighlight: (id: number) => void; } declare const HighlightText: React.ForwardRefExoticComponent>; export default HighlightText; //# sourceMappingURL=HighlightText.d.ts.map