UNPKG

@vue-pdf-viewer/viewer

Version:

The PDF Viewer component for Vue 3 and Nuxt

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