@pdf-viewer/react
Version:
A react-pdf-viewer component for React and Next.js. Suitable for react-pdf document.
15 lines (14 loc) • 920 B
TypeScript
import { TextContent } from 'pdfjs-dist/types/src/display/text_layer';
import { SearchOptions, Match, MatchHighlight } from './types';
export declare function findMatches(queries: (string | RegExp)[], textContent: TextContent, pageIndex: number, options: SearchOptions): Match[];
export declare function isMatchEntireWord(content: string, startIdx: number, length: number): boolean;
export declare function highlightMatches(matches: Match[], textContent: TextContent, textDivs: HTMLElement[]): {
element: HTMLElement;
index: number;
}[];
export declare function resetDivs(textContent: TextContent, textDivs: HTMLElement[]): void;
export declare function getHighlightOptionsWithDefaults(options?: SearchOptions): SearchOptions;
export declare function highlightMultipleColorMatches(matches: MatchHighlight[], textContent: TextContent, textDivs: HTMLElement[]): {
element: HTMLElement;
index: number;
}[];