UNPKG

@vue-pdf-viewer/viewer

Version:

The PDF Viewer component for Vue 3 and Nuxt

103 lines (102 loc) 6.03 kB
import { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api'; import type { PDFPageProxy } from 'pdfjs-dist/types/web/interfaces'; import type { InjectionKey, Slot, Ref, ComponentPublicInstance, ShallowRef, ComputedRef } from 'vue'; import type { HighlightMatchPosition, HighlightOptions, Localization, NormalizedKeyword, Offset, PdfProperties, ToolbarOptions, ViewerPdfPage } from './utils/types'; import { LicenseType, ScrollMode, ViewMode, ZoomLevel } from './components'; export declare const DEFAULT_TOOLBAR_OPTIONS: ToolbarOptions; export declare const Locales: Record<string, Localization>; export declare const DEFAULT_PROPS: { workerUrl: undefined; initialPage: number; initialScale: ZoomLevel; initialScrollMode: ScrollMode; initialViewMode: ViewMode; initialRotation: number; initialThumbnailsVisible: boolean; initialSearch: undefined; textLayer: boolean; characterMap: undefined; toolbarOptions: ToolbarOptions; localization: Record<string, Localization>; afterCanvasLoaded: undefined; }; export declare const DEFAULT_OFFSET: Offset; export declare const PERCENTAGE = 100; export declare const MIN_ZOOM_SCALE = 0.25; export declare const MAX_ZOOM_SCALE = 10; export declare const SCROLL_BAR_WIDTH = 20; export declare const PAGE_PADDING = 1; export declare const PAGE_OFFSET = 0; export declare const LAST_PAGE_OFFSET = 4; export declare const FILE_INPUT: InjectionKey<Ref<ComponentPublicInstance<import("vue").DefineComponent<{}, { triggerClick: () => void; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { change: (file: string) => void; } & { filenameChange: (file: string) => void; }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{ onChange?: ((file: string) => any) | undefined; onFilenameChange?: ((file: string) => any) | undefined; }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | undefined, ComponentPublicInstance<import("vue").DefineComponent<{}, { triggerClick: () => void; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { change: (file: string) => void; } & { filenameChange: (file: string) => void; }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{ onChange?: ((file: string) => any) | undefined; onFilenameChange?: ((file: string) => any) | undefined; }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | undefined>>; export declare const EMPTY_KEYWORD_REGEXP: NormalizedKeyword; export declare const CURRENT_MATCH_CSS_CLASS = "vpv-highlight__text-current"; export declare const LATEST_MATCH_POSITION: InjectionKey<Ref<HighlightMatchPosition | undefined, HighlightMatchPosition | undefined>>; export declare const GET_PAGE: InjectionKey<(doc: PDFDocumentProxy, pageIndex: number) => Promise<PDFPageProxy>>; export declare const RESTRICTED_CUSTOM: InjectionKey<Ref<boolean, boolean>>; export declare const VIEWER_STATE: InjectionKey<{ pdfDocument: PDFDocumentProxy | undefined; pagesContainerRef: HTMLElement | undefined; pageIndex: number; viewMode: ViewMode; scrollMode: ScrollMode; scale: number; rotation: number; }>; export declare const VIEWER_PAGES_PER_ROW: InjectionKey<Ref<number, number>>; export declare const TOOLBAR_OPTIONS: InjectionKey<Ref<ToolbarOptions | undefined, ToolbarOptions | undefined>>; export declare const TOTAL_TOOL_OTHERS_MENU: InjectionKey<Ref<number, number>>; export declare const IS_DARK: InjectionKey<Ref<boolean, boolean>>; export declare const IS_MOBILE_VIEW: InjectionKey<Ref<boolean, boolean>>; export declare const CONTAINER: InjectionKey<ShallowRef<HTMLDivElement | undefined, HTMLDivElement | undefined>>; export declare const PAGES_CONTAINER: InjectionKey<ShallowRef<HTMLDivElement | undefined, HTMLDivElement | undefined>>; export declare const ACTUAL_PDF_PAGES: InjectionKey<ShallowRef<ViewerPdfPage[], ViewerPdfPage[]>>; export declare const FOCUSED_PAGE_NUMBER: InjectionKey<Ref<number, number>>; export declare const ROTATION_DEGREE: InjectionKey<Ref<number, number>>; export declare const TOTAL_PAGE: InjectionKey<Ref<number, number>>; export declare const INITIAL_TEXT_LAYER: InjectionKey<boolean>; export declare const DOWNLOAD_FILE: InjectionKey<() => Promise<void>>; export declare const LICENSE: InjectionKey<{ isValidating: boolean; isValid: boolean; invalidatedMessage?: string | undefined; }>; export declare const LICENSE_KEY: InjectionKey<ComputedRef<string | null | undefined>>; export declare const HIGHLIGHT_OPTIONS: InjectionKey<ShallowRef<HighlightOptions, HighlightOptions>>; export declare const PDF_PROPERTIES: InjectionKey<Ref<PdfProperties | undefined, PdfProperties | undefined>>; export declare const SLOT_LOADER_IMAGE: InjectionKey<Slot<any> | undefined>; export declare const SLOT_ICON_OPEN_FILE: InjectionKey<Slot<any> | undefined>; export declare const SLOT_ICON_DOWNLOAD: InjectionKey<Slot<any> | undefined>; export declare const SLOT_ICON_PRINT: InjectionKey<Slot<any> | undefined>; export declare const SLOT_ICON_FULLSCREEN: InjectionKey<Slot<any> | undefined>; export declare const LANG: InjectionKey<Ref<Localization, Localization> | undefined>; export declare const FUNC_GO_TO_PAGE: InjectionKey<(page: number) => void>; export declare const LICENSE_DEFAULT: { isValidated: boolean; isValidating: boolean; isValidKey: boolean; licenseKey: null; type: LicenseType; }; export declare const APP_LICENSE_DEFAULT: { isValidating: boolean; isValid: boolean; };