UNPKG

@vue-pdf-viewer/viewer

Version:

A vue-pdf-viewer component for Vue and Nuxt. Suitable for vue-pdf document.

12 lines (11 loc) 586 B
import { Ref, ShallowRef } from 'vue'; import { TextHighlight, MatchHighlightResult, FullMatchHighlightResult } from '@/components'; import type { PDFDocumentProxy } from 'pdfjs-dist'; export interface UseHighlight { highlight: (args: TextHighlight[]) => Promise<Record<string, MatchHighlightResult[]>>; highlightMatches: Ref<Record<string, FullMatchHighlightResult[]>>; highlightKeywords: Ref<TextHighlight[] | undefined>; clear: () => void; } declare const useHighlight: (pdfDoc: ShallowRef<PDFDocumentProxy | undefined>) => UseHighlight; export default useHighlight;