@vue-pdf-viewer/viewer 0.0.0-beta.8 → 0.0.0-experimental.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +185 -13
- package/dist/annotation-circle-tIpRci60.js +21 -0
- package/dist/annotation-freetext-zmKZ4GuW.js +21 -0
- package/dist/annotation-highlight-CBhenBLo.js +23 -0
- package/dist/annotation-ink-Cr5tjD8f.js +31 -0
- package/dist/annotation-line-CBubP1QZ.js +23 -0
- package/dist/annotation-link-DI9mj24Y.js +21 -0
- package/dist/annotation-signature-DQVfU7hJ.js +21 -0
- package/dist/annotation-square-_rIuUCHT.js +21 -0
- package/dist/annotation-squiggly-DfLrUnSa.js +23 -0
- package/dist/annotation-stamp-B5gaCO0X.js +21 -0
- package/dist/annotation-strikeout-Cn_VHn_N.js +21 -0
- package/dist/annotation-text-pKHfDK_Q.js +21 -0
- package/dist/annotation-underline-BDgmfJQk.js +21 -0
- package/dist/arrow-up-DhoV0HvK.js +21 -0
- package/dist/assets/pdf-annotations/altText_add.svg +3 -0
- package/dist/assets/pdf-annotations/altText_disclaimer.svg +3 -0
- package/dist/assets/pdf-annotations/altText_done.svg +3 -0
- package/dist/assets/pdf-annotations/altText_spinner.svg +37 -0
- package/dist/assets/pdf-annotations/altText_warning.svg +3 -0
- package/dist/assets/pdf-annotations/annotation-check.svg +11 -0
- package/dist/assets/pdf-annotations/annotation-comment.svg +16 -0
- package/dist/assets/pdf-annotations/annotation-help.svg +26 -0
- package/dist/assets/pdf-annotations/annotation-insert.svg +10 -0
- package/dist/assets/pdf-annotations/annotation-key.svg +11 -0
- package/dist/assets/pdf-annotations/annotation-noicon.svg +7 -0
- package/dist/assets/pdf-annotations/annotation-note.svg +44 -0
- package/dist/assets/pdf-annotations/annotation-paperclip.svg +6 -0
- package/dist/assets/pdf-annotations/annotation-paragraph.svg +16 -0
- package/dist/assets/pdf-annotations/annotation-pushpin.svg +7 -0
- package/dist/assets/pdf-annotations/cursor-editorFreeHighlight.svg +6 -0
- package/dist/assets/pdf-annotations/cursor-editorFreeText.svg +3 -0
- package/dist/assets/pdf-annotations/cursor-editorInk.svg +4 -0
- package/dist/assets/pdf-annotations/cursor-editorTextHighlight.svg +8 -0
- package/dist/assets/pdf-annotations/editor-toolbar-delete.svg +5 -0
- package/dist/assets/pdf-annotations/messageBar_closingButton.svg +3 -0
- package/dist/assets/pdf-annotations/messageBar_warning.svg +3 -0
- package/dist/assets/pdf-annotations/secondaryToolbarButton-documentProperties.svg +3 -0
- package/dist/assets/pdf-annotations/toolbarButton-editorHighlight.svg +6 -0
- package/dist/assets/pdf-annotations/toolbarButton-menuArrow.svg +3 -0
- package/dist/check-BRo7Q5UG.js +21 -0
- package/dist/chevron-down-BEs3P7KI.js +21 -0
- package/dist/clear-DP391aEz.js +31 -0
- package/dist/close-CnbAWKuA.js +21 -0
- package/dist/comment-panel-BkFw3FUB.js +21 -0
- package/dist/download-C45QpUvK.js +21 -0
- package/dist/{drag-icon-CJSwJaYj.mjs → drag-icon-CpENKa0y.js} +12 -11
- package/dist/drag-icon-dark-B0sqKXav.js +18 -0
- package/dist/ellipsis-vertical-X1VRRfZe.js +21 -0
- package/dist/empty-comment-dark-DdPeDeR5.js +18 -0
- package/dist/empty-comment-light-Dgc1r5xv.js +18 -0
- package/dist/file-C2gjRcLU.js +21 -0
- package/dist/first-page-32lvRrjG.js +21 -0
- package/dist/fullscreen-Cuegwls4.js +21 -0
- package/dist/hand-BvbzlDGf.js +21 -0
- package/dist/index.js +17710 -0
- package/dist/index.umd.cjs +71 -0
- package/dist/info-2-wEcru0.js +21 -0
- package/dist/last-page-DDJIJ2gp.js +21 -0
- package/dist/magnifier-shuB09Te.js +21 -0
- package/dist/moon-Cf7pmsnw.js +21 -0
- package/dist/page-view-dual-f5-I0-4D.js +21 -0
- package/dist/page-view-single-DTduusoS.js +21 -0
- package/dist/pointer-CdvbhXLR.js +21 -0
- package/dist/printer-ERNx1Q88.js +21 -0
- package/dist/rotate-counter-clockwise-CEN3P8nT.js +21 -0
- package/dist/scrolling-horizontal-CdariRpO.js +23 -0
- package/dist/scrolling-page-wFZlGv_K.js +23 -0
- package/dist/scrolling-vertical-B1Doxmyt.js +23 -0
- package/dist/scrolling-wrapped-BBipRQ-N.js +23 -0
- package/dist/sun-C0fX-A5U.js +21 -0
- package/dist/thumbnail-HzftUNEp.js +21 -0
- package/dist/types/assets/pdf-annotations/index.d.ts +2 -0
- package/dist/types/components/AppButton.vue.d.ts +3 -3
- package/dist/types/components/AppFormControl.vue.d.ts +30 -0
- package/dist/types/components/AppIcon.vue.d.ts +3 -3
- package/dist/types/components/AppInput.vue.d.ts +1 -1
- package/dist/types/components/AppLoader.vue.d.ts +3 -3
- package/dist/types/components/AppPopover.vue.d.ts +80 -0
- package/dist/types/components/AppTooltip.vue.d.ts +18 -3
- package/dist/types/components/DragFileMask.vue.d.ts +8 -12
- package/dist/types/components/HighlightColorPicker.vue.d.ts +2 -0
- package/dist/types/components/{layers/AnnotationLayer.vue.d.ts → LayerAnnotation.vue.d.ts} +15 -11
- package/dist/types/components/LayerCanvas.vue.d.ts +25 -0
- package/dist/types/components/{layers/TextLayer.vue.d.ts → LayerText.vue.d.ts} +9 -11
- package/dist/types/components/LayerTextHighlight.vue.d.ts +20 -0
- package/dist/types/components/LayerTextSearchHighlight.vue.d.ts +19 -0
- package/dist/types/components/{layers/XFALayer.vue.d.ts → LayerXFA.vue.d.ts} +4 -4
- package/dist/types/components/ModalPassword.vue.d.ts +19 -0
- package/dist/types/components/ModalPdfProperties.vue.d.ts +3 -3
- package/dist/types/components/ModalPrintLoadingProgress.vue.d.ts +3 -3
- package/dist/types/components/SwitchAppearance.vue.d.ts +5 -3
- package/dist/types/components/ToolCommentPanel.vue.d.ts +31 -0
- package/dist/types/components/ToolDownload.vue.d.ts +4 -3
- package/dist/types/components/ToolFullscreen.vue.d.ts +4 -3
- package/dist/types/components/ToolMenuOthers.vue.d.ts +67 -26
- package/dist/types/components/ToolMenuOthersMobile.vue.d.ts +2 -2
- package/dist/types/components/ToolOpenFile.vue.d.ts +4 -3
- package/dist/types/components/ToolOpenFileInput.vue.d.ts +2 -2
- package/dist/types/components/ToolPagination.vue.d.ts +14 -19
- package/dist/types/components/ToolPrint.vue.d.ts +10 -45
- package/dist/types/components/ToolSearch.vue.d.ts +43 -23
- package/dist/types/components/ToolThumbnail.vue.d.ts +8 -10
- package/dist/types/components/ToolZoom.vue.d.ts +24 -27
- package/dist/types/components/ToolZoomPercentageMenu.vue.d.ts +12 -11
- package/dist/types/components/VPdfComments.vue.d.ts +28 -0
- package/dist/types/components/VPdfCommentsDate.vue.d.ts +15 -0
- package/dist/types/components/VPdfCommentsHeader.vue.d.ts +16 -0
- package/dist/types/components/VPdfCommentsIcon.vue.d.ts +16 -0
- package/dist/types/components/VPdfCommentsReplies.vue.d.ts +16 -0
- package/dist/types/components/VPdfCommentsSidebar.vue.d.ts +15 -0
- package/dist/types/components/VPdfCommentsText.vue.d.ts +2 -0
- package/dist/types/components/VPdfPage.vue.d.ts +17 -32
- package/dist/types/components/VPdfSplitter.vue.d.ts +1 -1
- package/dist/types/components/VPdfThumbnail.vue.d.ts +7 -5
- package/dist/types/components/VPdfThumbnails.vue.d.ts +5 -5
- package/dist/types/components/VPdfViewer.vue.d.ts +522 -276
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/components/ui/button/Button.vue.d.ts +6 -8
- package/dist/types/components/ui/button/index.d.ts +1 -1
- package/dist/types/components/ui/checkbox/Checkbox.vue.d.ts +35 -0
- package/dist/types/components/ui/checkbox/index.d.ts +1 -0
- package/dist/types/components/ui/collapsible/Collapsible.vue.d.ts +30 -0
- package/dist/types/components/ui/collapsible/CollapsibleContent.vue.d.ts +28 -0
- package/dist/types/components/ui/collapsible/CollapsibleTrigger.vue.d.ts +28 -0
- package/dist/types/components/ui/collapsible/index.d.ts +3 -0
- package/dist/types/components/ui/dialog/Dialog.vue.d.ts +3 -3
- package/dist/types/components/ui/dialog/DialogClose.vue.d.ts +3 -3
- package/dist/types/components/ui/dialog/DialogContent.vue.d.ts +4 -6
- package/dist/types/components/ui/dialog/DialogDescription.vue.d.ts +4 -6
- package/dist/types/components/ui/dialog/DialogFooter.vue.d.ts +4 -6
- package/dist/types/components/ui/dialog/DialogHeader.vue.d.ts +4 -6
- package/dist/types/components/ui/dialog/DialogTitle.vue.d.ts +4 -6
- package/dist/types/components/ui/dialog/DialogTrigger.vue.d.ts +3 -3
- package/dist/types/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +3 -3
- package/dist/types/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +4 -6
- package/dist/types/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +6 -10
- package/dist/types/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +3 -3
- package/dist/types/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +7 -7
- package/dist/types/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +4 -7
- package/dist/types/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +3 -3
- package/dist/types/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +7 -6
- package/dist/types/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +3 -3
- package/dist/types/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +4 -6
- package/dist/types/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +3 -3
- package/dist/types/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +4 -6
- package/dist/types/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +4 -6
- package/dist/types/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +3 -3
- package/dist/types/components/ui/input/Input.vue.d.ts +3 -3
- package/dist/types/components/ui/popover/Popover.vue.d.ts +3 -3
- package/dist/types/components/ui/popover/PopoverContent.vue.d.ts +6 -12
- package/dist/types/components/ui/popover/PopoverTrigger.vue.d.ts +3 -3
- package/dist/types/components/ui/progress/Progress.vue.d.ts +4 -4
- package/dist/types/components/ui/tooltip/Tooltip.vue.d.ts +3 -3
- package/dist/types/components/ui/tooltip/TooltipContent.vue.d.ts +6 -10
- package/dist/types/components/ui/tooltip/TooltipProvider.vue.d.ts +3 -3
- package/dist/types/components/ui/tooltip/TooltipTrigger.vue.d.ts +3 -3
- package/dist/types/components/utils/annotations.d.ts +1 -11
- package/dist/types/components/utils/destination.d.ts +1 -1
- package/dist/types/components/utils/helpers.d.ts +0 -8
- package/dist/types/composables/useDownload.d.ts +11 -4
- package/dist/types/composables/useHighlight.d.ts +11 -0
- package/dist/types/composables/useLicense.d.ts +18 -8
- package/dist/types/composables/{usePDF.d.ts → usePdf.d.ts} +7 -5
- package/dist/types/composables/usePdfComments.d.ts +5 -0
- package/dist/types/composables/usePdfPagesSizes.d.ts +8 -0
- package/dist/types/composables/usePdfProperties.d.ts +3 -17
- package/dist/types/composables/usePinch.d.ts +2 -1
- package/dist/types/composables/usePlugins.d.ts +252 -0
- package/dist/types/composables/usePrintControl.d.ts +22 -0
- package/dist/types/composables/usePrintProcess.d.ts +3 -3
- package/dist/types/composables/useRenderQueue.d.ts +13 -0
- package/dist/types/composables/useRequestAnimationFrame.d.ts +1 -0
- package/dist/types/composables/useRotation.d.ts +3 -2
- package/dist/types/composables/useScale.d.ts +21 -0
- package/dist/types/composables/useSearch.d.ts +3 -37
- package/dist/types/composables/useTextLayers.d.ts +5 -0
- package/dist/types/composables/useVirtualPages.d.ts +32 -0
- package/dist/types/composables/useVisibilities.d.ts +9 -0
- package/dist/types/const.d.ts +86 -18
- package/dist/types/index.d.ts +4 -0
- package/dist/types/utils/appConsole.d.ts +24 -0
- package/dist/types/utils/characters.d.ts +16 -0
- package/dist/types/utils/enumerators.d.ts +76 -0
- package/dist/types/utils/highlight.d.ts +8 -0
- package/dist/types/utils/promiseWithResolvers.d.ts +7 -0
- package/dist/types/utils/searchHighlight.d.ts +10 -0
- package/dist/types/utils/smoothScroll.d.ts +2 -0
- package/dist/types/utils/types.d.ts +683 -0
- package/dist/types/utils/uiViewer.d.ts +4 -0
- package/dist/types/utils/validators.d.ts +26 -0
- package/dist/types/utils.d.ts +6 -3
- package/dist/zoom-in-CPqqALGr.js +21 -0
- package/dist/zoom-out-BpilF8O_.js +21 -0
- package/package.json +29 -30
- package/dist/arrow-up-CZcWar0V.mjs +0 -20
- package/dist/check-BDQ_1xOK.mjs +0 -21
- package/dist/chevron-down-BGvKkqoz.mjs +0 -21
- package/dist/clear-BdBsR989.mjs +0 -31
- package/dist/close-CbywujCY.mjs +0 -20
- package/dist/download-DwxdC2cz.mjs +0 -21
- package/dist/drag-icon-dark-DslxK0op.mjs +0 -17
- package/dist/ellipsis-vertical-DU4RrfN8.mjs +0 -21
- package/dist/first-page-D2sUix1F.mjs +0 -20
- package/dist/fullscreen-CDD3D91y.mjs +0 -21
- package/dist/hand-BdufQ7PJ.mjs +0 -21
- package/dist/index.mjs +0 -28779
- package/dist/index.umd.js +0 -54
- package/dist/info-CnzWbChw.mjs +0 -20
- package/dist/last-page-BlLcdVDC.mjs +0 -20
- package/dist/magnifier-D5effak1.mjs +0 -21
- package/dist/moon-jjKfhCeP.mjs +0 -21
- package/dist/pointer-CosfQ2Bj.mjs +0 -21
- package/dist/printer-CZndb-XY.mjs +0 -21
- package/dist/rotate-counter-clockwise-BnC8SAwc.mjs +0 -21
- package/dist/sun-f_yo-49i.mjs +0 -21
- package/dist/thumbnail-BrLTlvMi.mjs +0 -21
- package/dist/types/components/types.d.ts +0 -212
- package/dist/types/components/utils/highlight.d.ts +0 -6
- package/dist/types/composables/useCalculatePages.d.ts +0 -12
- package/dist/types/composables/usePageQueue.d.ts +0 -10
- package/dist/types/composables/usePrint.d.ts +0 -9
- package/dist/types/composables/useRenderTask.d.ts +0 -8
- package/dist/zoom-in-MHWLskY5.mjs +0 -21
- package/dist/zoom-out-BOe91xpp.mjs +0 -21
package/dist/types/const.d.ts
CHANGED
|
@@ -1,40 +1,108 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
1
|
+
import { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
|
|
2
|
+
import type { PDFPageProxy } from 'pdfjs-dist/types/web/interfaces';
|
|
3
|
+
import type { InjectionKey, Slot, Ref, ComponentPublicInstance, ShallowRef, Reactive, ComputedRef } from 'vue';
|
|
4
|
+
import type { HighlightMatchPosition, HighlightOptions, NormalizedKeyword, Offset, PdfProperties, ToolbarOptions, ViewerPdfPage, Comment } from './utils/types';
|
|
5
|
+
import { LicenseType, ScrollMode, ViewMode, ZoomLevel } from './components';
|
|
6
|
+
export declare const CSS_CLASSES: {
|
|
7
|
+
SELECTING: string;
|
|
8
|
+
END_OF_CONTENT: string;
|
|
9
|
+
};
|
|
3
10
|
export declare const DEFAULT_TOOLBAR_OPTIONS: ToolbarOptions;
|
|
11
|
+
export declare const DEFAULT_PROPS: {
|
|
12
|
+
workerUrl: undefined;
|
|
13
|
+
initialPage: number;
|
|
14
|
+
initialScale: ZoomLevel;
|
|
15
|
+
initialScrollMode: ScrollMode;
|
|
16
|
+
initialViewMode: ViewMode;
|
|
17
|
+
initialRotation: number;
|
|
18
|
+
initialThumbnailsVisible: boolean;
|
|
19
|
+
initialSearch: undefined;
|
|
20
|
+
textLayer: boolean;
|
|
21
|
+
characterMap: undefined;
|
|
22
|
+
toolbarOptions: ToolbarOptions;
|
|
23
|
+
localization: Record<string, import("@vue-pdf-viewer/shared").Localization>;
|
|
24
|
+
afterCanvasLoaded: undefined;
|
|
25
|
+
};
|
|
26
|
+
export declare const DEFAULT_OFFSET: Offset;
|
|
4
27
|
export declare const PERCENTAGE = 100;
|
|
5
28
|
export declare const MIN_ZOOM_SCALE = 0.25;
|
|
6
29
|
export declare const MAX_ZOOM_SCALE = 10;
|
|
7
30
|
export declare const SCROLL_BAR_WIDTH = 20;
|
|
8
|
-
export declare const PAGE_PADDING =
|
|
9
|
-
export declare const
|
|
31
|
+
export declare const PAGE_PADDING = 1;
|
|
32
|
+
export declare const PAGE_OFFSET = 0;
|
|
33
|
+
export declare const LAST_PAGE_OFFSET = 4;
|
|
34
|
+
export declare const SEARCH_MAX_HEIGHT = 97;
|
|
10
35
|
export declare const FILE_INPUT: InjectionKey<Ref<ComponentPublicInstance<import("vue").DefineComponent<{}, {
|
|
11
36
|
triggerClick: () => void;
|
|
12
37
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
38
|
change: (file: string) => void;
|
|
14
39
|
} & {
|
|
15
40
|
filenameChange: (file: string) => void;
|
|
16
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
41
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
17
42
|
onChange?: ((file: string) => any) | undefined;
|
|
18
43
|
onFilenameChange?: ((file: string) => any) | undefined;
|
|
19
|
-
}, {}, {}>, {}, {}, {}, {}, {}, import("vue").DefineComponent<{}, {
|
|
44
|
+
}>, {}, {}, {}, {}, 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<{}, {
|
|
20
45
|
triggerClick: () => void;
|
|
21
46
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
47
|
change: (file: string) => void;
|
|
23
48
|
} & {
|
|
24
49
|
filenameChange: (file: string) => void;
|
|
25
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
50
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
26
51
|
onChange?: ((file: string) => any) | undefined;
|
|
27
52
|
onFilenameChange?: ((file: string) => any) | undefined;
|
|
28
|
-
}, {}, {}>, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | undefined>>;
|
|
29
|
-
export declare const
|
|
30
|
-
export declare const
|
|
31
|
-
export declare const
|
|
32
|
-
export declare const
|
|
33
|
-
export declare const
|
|
34
|
-
export declare const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
53
|
+
}>, {}, {}, {}, {}, 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>>;
|
|
54
|
+
export declare const EMPTY_KEYWORD_REGEXP: NormalizedKeyword;
|
|
55
|
+
export declare const CURRENT_MATCH_CSS_CLASS = "vpv-highlight__text-current";
|
|
56
|
+
export declare const LATEST_MATCH_POSITION: InjectionKey<Ref<HighlightMatchPosition | undefined, HighlightMatchPosition | undefined>>;
|
|
57
|
+
export declare const GET_PAGE: InjectionKey<(doc: PDFDocumentProxy, pageIndex: number) => Promise<PDFPageProxy>>;
|
|
58
|
+
export declare const RESTRICTED_CUSTOM: InjectionKey<Ref<boolean, boolean>>;
|
|
59
|
+
export declare const VIEWER_STATE: InjectionKey<{
|
|
60
|
+
pdfDocument: PDFDocumentProxy | undefined;
|
|
61
|
+
pagesContainerRef: HTMLElement | undefined;
|
|
62
|
+
pageIndex: number;
|
|
63
|
+
viewMode: ViewMode;
|
|
64
|
+
scrollMode: ScrollMode;
|
|
65
|
+
scale: number;
|
|
66
|
+
rotation: number;
|
|
67
|
+
}>;
|
|
68
|
+
export declare const VIEWER_PAGES_PER_ROW: InjectionKey<Ref<number, number>>;
|
|
69
|
+
export declare const TOOLBAR_OPTIONS: InjectionKey<Ref<ToolbarOptions | undefined, ToolbarOptions | undefined>>;
|
|
70
|
+
export declare const TOTAL_TOOL_OTHERS_MENU: InjectionKey<Ref<number, number>>;
|
|
71
|
+
export declare const IS_DARK: InjectionKey<Ref<boolean, boolean>>;
|
|
72
|
+
export declare const IS_MOBILE_VIEW: InjectionKey<Ref<boolean, boolean>>;
|
|
73
|
+
export declare const CONTAINER: InjectionKey<ShallowRef<HTMLDivElement | undefined, HTMLDivElement | undefined>>;
|
|
74
|
+
export declare const PAGES_CONTAINER: InjectionKey<ShallowRef<HTMLDivElement | undefined, HTMLDivElement | undefined>>;
|
|
75
|
+
export declare const ACTUAL_PDF_PAGES: InjectionKey<ShallowRef<ViewerPdfPage[], ViewerPdfPage[]>>;
|
|
76
|
+
export declare const FOCUSED_PAGE_NUMBER: InjectionKey<Ref<number, number>>;
|
|
77
|
+
export declare const ROTATION_DEGREE: InjectionKey<Ref<number, number>>;
|
|
78
|
+
export declare const TOTAL_PAGE: InjectionKey<Ref<number, number>>;
|
|
38
79
|
export declare const INITIAL_TEXT_LAYER: InjectionKey<boolean>;
|
|
39
80
|
export declare const DOWNLOAD_FILE: InjectionKey<() => Promise<void>>;
|
|
40
|
-
export declare const LICENSE: InjectionKey<
|
|
81
|
+
export declare const LICENSE: InjectionKey<{
|
|
82
|
+
invalidatedMessage?: string | undefined;
|
|
83
|
+
isValidating: boolean;
|
|
84
|
+
isValidated: boolean;
|
|
85
|
+
isValidKey: boolean;
|
|
86
|
+
type: LicenseType;
|
|
87
|
+
}>;
|
|
88
|
+
export declare const LICENSE_KEY: InjectionKey<ComputedRef<string | null | undefined>>;
|
|
89
|
+
export declare const HIGHLIGHT_OPTIONS: InjectionKey<ShallowRef<HighlightOptions, HighlightOptions>>;
|
|
90
|
+
export declare const PDF_PROPERTIES: InjectionKey<Ref<PdfProperties | undefined, PdfProperties | undefined>>;
|
|
91
|
+
export declare const SLOT_LOADER_IMAGE: InjectionKey<Slot<any> | undefined>;
|
|
92
|
+
export declare const SLOT_ICON_OPEN_FILE: InjectionKey<Slot<any> | undefined>;
|
|
93
|
+
export declare const SLOT_ICON_DOWNLOAD: InjectionKey<Slot<any> | undefined>;
|
|
94
|
+
export declare const SLOT_ICON_PRINT: InjectionKey<Slot<any> | undefined>;
|
|
95
|
+
export declare const SLOT_ICON_FULLSCREEN: InjectionKey<Slot<any> | undefined>;
|
|
96
|
+
export declare const FUNC_GO_TO_PAGE: InjectionKey<(page: number) => void>;
|
|
97
|
+
export declare const LICENSE_DEFAULT: {
|
|
98
|
+
isValidated: boolean;
|
|
99
|
+
isValidating: boolean;
|
|
100
|
+
isValidKey: boolean;
|
|
101
|
+
licenseKey: null;
|
|
102
|
+
type: LicenseType;
|
|
103
|
+
};
|
|
104
|
+
export declare const PDF_COMMENTS: InjectionKey<{
|
|
105
|
+
comments: Map<number, Comment[]>;
|
|
106
|
+
repliedCommentPages: import("./components").PdfCommentPage[];
|
|
107
|
+
}>;
|
|
108
|
+
export declare const ANNOTATION_CANVAS_MAP: InjectionKey<Reactive<Map<string, HTMLCanvasElement>>>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { Plugin } from 'vue';
|
|
2
|
+
import { Locales } from '@vue-pdf-viewer/shared';
|
|
2
3
|
export declare const VPdfViewerPlugin: Plugin;
|
|
4
|
+
export { Locales };
|
|
3
5
|
export * from './components';
|
|
6
|
+
export type { VPVInstance, CanvasLoadedCallback, PrintControl, ToolbarOptions, MatchHighlightResult } from './utils/types';
|
|
7
|
+
export type { Localization } from '@vue-pdf-viewer/shared';
|
|
4
8
|
export default VPdfViewerPlugin;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare class Console {
|
|
2
|
+
private static instance;
|
|
3
|
+
private isProduction;
|
|
4
|
+
private constructor();
|
|
5
|
+
static getInstance(): Console;
|
|
6
|
+
/**
|
|
7
|
+
* Debug level logging - stripped in production
|
|
8
|
+
*/
|
|
9
|
+
debug(...args: any[]): void;
|
|
10
|
+
/**
|
|
11
|
+
* Info level logging
|
|
12
|
+
*/
|
|
13
|
+
info(...args: any[]): void;
|
|
14
|
+
/**
|
|
15
|
+
* Warning level logging
|
|
16
|
+
*/
|
|
17
|
+
warn(...args: any[]): void;
|
|
18
|
+
/**
|
|
19
|
+
* Error level logging
|
|
20
|
+
*/
|
|
21
|
+
error(...args: any[]): void;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: Console;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare enum CharacterType {
|
|
2
|
+
SPACE = 0,
|
|
3
|
+
ALPHA_LETTER = 1,
|
|
4
|
+
PUNCTUATION = 2,
|
|
5
|
+
HAN_LETTER = 3,
|
|
6
|
+
KATAKANA_LETTER = 4,
|
|
7
|
+
HIRAGANA_LETTER = 5,
|
|
8
|
+
HALF_WIDTH_KATAKANA_LETTER = 6,
|
|
9
|
+
THAI_LETTER = 7
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* This function is based on the word-break detection implemented in:
|
|
13
|
+
* https://hg.mozilla.org/mozilla-central/file/tip/intl/lwbrk/WordBreaker.cpp
|
|
14
|
+
*/
|
|
15
|
+
declare function getCharacterType(charCode: number): CharacterType;
|
|
16
|
+
export { CharacterType, getCharacterType };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export declare enum LicenseType {
|
|
2
|
+
All = "all",
|
|
3
|
+
Premium = "premium",
|
|
4
|
+
Freemium = "freemium",
|
|
5
|
+
Unlicense = "none",
|
|
6
|
+
Organization = "organization",
|
|
7
|
+
Developer = "developer"
|
|
8
|
+
}
|
|
9
|
+
export declare enum ScrollMode {
|
|
10
|
+
Vertical = "Vertical",
|
|
11
|
+
Horizontal = "Horizontal",
|
|
12
|
+
Page = "Page",
|
|
13
|
+
Wrapped = "Wrapped"
|
|
14
|
+
}
|
|
15
|
+
export declare enum ViewMode {
|
|
16
|
+
SinglePage = "Single",
|
|
17
|
+
DualPage = "Dual"
|
|
18
|
+
}
|
|
19
|
+
export declare enum ZoomLevel {
|
|
20
|
+
ActualSize = "actualSize",
|
|
21
|
+
PageFit = "pageFit",
|
|
22
|
+
PageWidth = "pageWidth"
|
|
23
|
+
}
|
|
24
|
+
export declare enum ScrollDirection {
|
|
25
|
+
Horizontal = "Horizontal",
|
|
26
|
+
Vertical = "Vertical",
|
|
27
|
+
Both = "Both"
|
|
28
|
+
}
|
|
29
|
+
export declare enum VPVAnnotationType {
|
|
30
|
+
INTERNAL_LINK = "internal-link",
|
|
31
|
+
LINK = "link",
|
|
32
|
+
FILE_ATTACHMENT = "file-attachment",
|
|
33
|
+
FORM_TEXT = "form-text",
|
|
34
|
+
FORM_SELECT = "form-select",
|
|
35
|
+
FORM_CHECKBOX = "form-checkbox",
|
|
36
|
+
FORM_RADIO = "form-radio",
|
|
37
|
+
FORM_BUTTON = "form-button",
|
|
38
|
+
BUTTON = "button",
|
|
39
|
+
NAVIGATION = "navigation"
|
|
40
|
+
}
|
|
41
|
+
export declare enum LayerRenderStatus {
|
|
42
|
+
PreRender = 0,
|
|
43
|
+
DidRender = 1
|
|
44
|
+
}
|
|
45
|
+
export declare enum AnnotationType {
|
|
46
|
+
Text = 1,
|
|
47
|
+
Link = 2,
|
|
48
|
+
FreeText = 3,
|
|
49
|
+
Line = 4,
|
|
50
|
+
Square = 5,
|
|
51
|
+
Circle = 6,
|
|
52
|
+
Polygon = 7,
|
|
53
|
+
Polyline = 8,
|
|
54
|
+
Highlight = 9,
|
|
55
|
+
Underline = 10,
|
|
56
|
+
Squiggly = 11,
|
|
57
|
+
StrikeOut = 12,
|
|
58
|
+
Stamp = 13,
|
|
59
|
+
Caret = 14,
|
|
60
|
+
Ink = 15,
|
|
61
|
+
Popup = 16,
|
|
62
|
+
FileAttachment = 17,
|
|
63
|
+
Widget = 20
|
|
64
|
+
}
|
|
65
|
+
export declare enum AnnotationFlag {
|
|
66
|
+
INVISIBLE = 1,
|
|
67
|
+
HIDDEN = 2,
|
|
68
|
+
PRINT = 4,
|
|
69
|
+
NOZOOM = 8,
|
|
70
|
+
NOROTATE = 16,
|
|
71
|
+
NOVIEW = 32,
|
|
72
|
+
READONLY = 64,
|
|
73
|
+
LOCKED = 128,
|
|
74
|
+
TOGGLENOVIEW = 256,
|
|
75
|
+
LOCKEDCONTENTS = 512
|
|
76
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TextContent } from 'pdfjs-dist/types/src/display/text_layer';
|
|
2
|
+
import type { HighlightOptions, Match } from './types';
|
|
3
|
+
declare function isMatchEntireWord(content: string, startIdx: number, length: number): boolean;
|
|
4
|
+
declare function highlightMatches(matches: Match[], textContent: TextContent, textDivs: HTMLElement[]): void;
|
|
5
|
+
declare function resetDivs(textContent: TextContent, textDivs: HTMLElement[]): void;
|
|
6
|
+
declare function findMatches(queries: (string | RegExp)[], textContent: TextContent, pageIndex: number, options: HighlightOptions): Match[];
|
|
7
|
+
declare function getHighlightOptionsWithDefaults(options?: HighlightOptions): HighlightOptions;
|
|
8
|
+
export { findMatches, highlightMatches, resetDivs, getHighlightOptionsWithDefaults, isMatchEntireWord };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CSSProperties } from 'vue';
|
|
2
|
+
import type { FlagKeyword, HighlightArea, HighlightMatchPosition, NormalizedKeyword, SingleKeyword } from './types';
|
|
3
|
+
export declare const normalizeFlagKeyword: (flagKeyword: FlagKeyword) => NormalizedKeyword;
|
|
4
|
+
export declare const normalizeSingleKeyword: (keyword: SingleKeyword, matchCase?: boolean, wholeWords?: boolean) => NormalizedKeyword;
|
|
5
|
+
export declare const sortHighlightPosition: (a: HighlightArea, b: HighlightArea) => 0 | 1 | -1;
|
|
6
|
+
export declare const getHighlightStyle: (area: HighlightArea) => CSSProperties;
|
|
7
|
+
export declare const unwrap: (ele: Node) => void;
|
|
8
|
+
export declare const getHighlightElement: (layerRef: HTMLElement, query: HighlightMatchPosition, selector?: string) => HTMLElement;
|
|
9
|
+
export declare const getHighlightElements: (layerRef: HTMLElement, querySelector: string) => Promise<NodeListOf<Element>>;
|
|
10
|
+
export declare function scrollHighlightIntoView(highlightEle: HTMLElement, pageContainer: HTMLElement, viewerContainer: HTMLElement): void;
|