UNPKG

@vue-pdf-viewer/viewer

Version:

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

21 lines (20 loc) 772 B
import { Ref } from 'vue'; import { PageViewport, PDFPageProxy } from 'pdfjs-dist'; import type { RectBox } from '@/utils/types'; import { type SelectionBounds } from '@/utils/annotation-menu-bounds'; interface UseAnnotationTextSelectionProps { page: Ref<PDFPageProxy>; viewport: Ref<PageViewport>; textLayer: Ref<HTMLDivElement>; } export interface UseAnnotationTextSelectionReturn { menuOpen: Ref<boolean>; selectionBounds: Ref<SelectionBounds | null>; selectedBoxes: Ref<RectBox[] | null>; selectedText: Ref<string>; showMenu: () => void; hideMenu: () => void; clearSelection: () => void; } export declare const useAnnotationTextSelection: (props: UseAnnotationTextSelectionProps) => UseAnnotationTextSelectionReturn; export {};