@vue-pdf-viewer/viewer 3.0.0-alpha.5 → 3.0.0-alpha.7
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/dist/index.js +10299 -10018
- package/dist/index.umd.cjs +18 -18
- package/dist/types/assets/pdf-annotations/index.d.ts +2 -0
- package/dist/types/components/AppButton.vue.d.ts +18 -0
- package/dist/types/components/AppFormControl.vue.d.ts +30 -0
- package/dist/types/components/AppIcon.vue.d.ts +15 -0
- package/dist/types/components/AppInput.vue.d.ts +12 -0
- package/dist/types/components/AppLoader.vue.d.ts +19 -0
- package/dist/types/components/AppPopover.vue.d.ts +93 -0
- package/dist/types/components/AppTooltip.vue.d.ts +34 -0
- package/dist/types/components/ColorButton.vue.d.ts +15 -0
- package/dist/types/components/DragFileMask.vue.d.ts +55 -0
- package/dist/types/components/FreeTextPanel.vue.d.ts +16 -0
- package/dist/types/components/FreeTextPanelFontColors.vue.d.ts +2 -0
- package/dist/types/components/FreeTextPanelFontFamilySelector.vue.d.ts +2 -0
- package/dist/types/components/FreeTextPanelFontSizeSelector.vue.d.ts +2 -0
- package/dist/types/components/FreeTextPanelTextStyle.vue.d.ts +2 -0
- package/dist/types/components/HighlightColorPicker.vue.d.ts +2 -0
- package/dist/types/components/LayerAnnotation.vue.d.ts +47 -0
- package/dist/types/components/LayerAnnotationEditor.vue.d.ts +26 -0
- package/dist/types/components/LayerAnnotationEditorFreeText.vue.d.ts +34 -0
- package/dist/types/components/LayerAnnotationEditorFreeTextItem.vue.d.ts +27 -0
- package/dist/types/components/LayerAnnotationEditorHighlight.vue.d.ts +37 -0
- package/dist/types/components/LayerAnnotationEditorHighlightItem.vue.d.ts +26 -0
- package/dist/types/components/LayerAnnotationEditorImage.vue.d.ts +28 -0
- package/dist/types/components/LayerAnnotationStampResizer.vue.d.ts +28 -0
- package/dist/types/components/LayerCanvas.vue.d.ts +25 -0
- package/dist/types/components/LayerText.vue.d.ts +30 -0
- package/dist/types/components/LayerTextHighlight.vue.d.ts +20 -0
- package/dist/types/components/LayerTextSearchHighlight.vue.d.ts +19 -0
- package/dist/types/components/LayerXFA.vue.d.ts +23 -0
- package/dist/types/components/ModalPassword.vue.d.ts +19 -0
- package/dist/types/components/ModalPdfProperties.vue.d.ts +18 -0
- package/dist/types/components/ModalPrintLoadingProgress.vue.d.ts +20 -0
- package/dist/types/components/Signatures.vue.d.ts +2 -0
- package/dist/types/components/SwitchAppearance.vue.d.ts +23 -0
- package/dist/types/components/ToolCommentPanel.vue.d.ts +31 -0
- package/dist/types/components/ToolDownload.vue.d.ts +21 -0
- package/dist/types/components/ToolFullscreen.vue.d.ts +22 -0
- package/dist/types/components/ToolMenuOthers.vue.d.ts +88 -0
- package/dist/types/components/ToolMenuOthersMobile.vue.d.ts +21 -0
- package/dist/types/components/ToolOpenFile.vue.d.ts +21 -0
- package/dist/types/components/ToolOpenFileInput.vue.d.ts +11 -0
- package/dist/types/components/ToolPagination.vue.d.ts +68 -0
- package/dist/types/components/ToolPrint.vue.d.ts +35 -0
- package/dist/types/components/ToolSearch.vue.d.ts +73 -0
- package/dist/types/components/ToolThumbnail.vue.d.ts +43 -0
- package/dist/types/components/ToolZoom.vue.d.ts +55 -0
- package/dist/types/components/ToolZoomPercentageMenu.vue.d.ts +25 -0
- 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 +44 -0
- package/dist/types/components/VPdfSplitter.vue.d.ts +2 -0
- package/dist/types/components/VPdfThumbnail.vue.d.ts +26 -0
- package/dist/types/components/VPdfThumbnails.vue.d.ts +22 -0
- package/dist/types/components/VPdfViewer.vue.d.ts +606 -0
- package/dist/types/components/index.d.ts +4 -0
- package/dist/types/components/ui/button/Button.vue.d.ts +52 -0
- package/dist/types/components/ui/button/index.d.ts +7 -0
- 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 +28 -0
- package/dist/types/components/ui/dialog/DialogClose.vue.d.ts +28 -0
- package/dist/types/components/ui/dialog/DialogContent.vue.d.ts +35 -0
- package/dist/types/components/ui/dialog/DialogDescription.vue.d.ts +35 -0
- package/dist/types/components/ui/dialog/DialogFooter.vue.d.ts +34 -0
- package/dist/types/components/ui/dialog/DialogHeader.vue.d.ts +34 -0
- package/dist/types/components/ui/dialog/DialogTitle.vue.d.ts +35 -0
- package/dist/types/components/ui/dialog/DialogTrigger.vue.d.ts +28 -0
- package/dist/types/components/ui/dialog/index.d.ts +8 -0
- package/dist/types/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +28 -0
- package/dist/types/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +35 -0
- package/dist/types/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +52 -0
- package/dist/types/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +28 -0
- package/dist/types/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +41 -0
- package/dist/types/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +38 -0
- package/dist/types/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +28 -0
- package/dist/types/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +38 -0
- package/dist/types/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +17 -0
- package/dist/types/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +34 -0
- package/dist/types/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +28 -0
- package/dist/types/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +35 -0
- package/dist/types/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +35 -0
- package/dist/types/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +28 -0
- package/dist/types/components/ui/dropdown-menu/index.d.ts +15 -0
- package/dist/types/components/ui/input/Input.vue.d.ts +16 -0
- package/dist/types/components/ui/input/index.d.ts +7 -0
- package/dist/types/components/ui/popover/Popover.vue.d.ts +28 -0
- package/dist/types/components/ui/popover/PopoverContent.vue.d.ts +64 -0
- package/dist/types/components/ui/popover/PopoverTrigger.vue.d.ts +28 -0
- package/dist/types/components/ui/popover/index.d.ts +3 -0
- package/dist/types/components/ui/progress/Progress.vue.d.ts +28 -0
- package/dist/types/components/ui/progress/index.d.ts +1 -0
- package/dist/types/components/ui/select/Select.vue.d.ts +28 -0
- package/dist/types/components/ui/select/SelectContent.vue.d.ts +52 -0
- package/dist/types/components/ui/select/SelectGroup.vue.d.ts +35 -0
- package/dist/types/components/ui/select/SelectItem.vue.d.ts +35 -0
- package/dist/types/components/ui/select/SelectItemText.vue.d.ts +28 -0
- package/dist/types/components/ui/select/SelectLabel.vue.d.ts +35 -0
- package/dist/types/components/ui/select/SelectScrollDownButton.vue.d.ts +35 -0
- package/dist/types/components/ui/select/SelectScrollUpButton.vue.d.ts +35 -0
- package/dist/types/components/ui/select/SelectSeparator.vue.d.ts +17 -0
- package/dist/types/components/ui/select/SelectTrigger.vue.d.ts +35 -0
- package/dist/types/components/ui/select/SelectValue.vue.d.ts +28 -0
- package/dist/types/components/ui/select/index.d.ts +11 -0
- package/dist/types/components/ui/toast/Toast.vue.d.ts +28 -0
- package/dist/types/components/ui/toast/ToastAction.vue.d.ts +35 -0
- package/dist/types/components/ui/toast/ToastClose.vue.d.ts +17 -0
- package/dist/types/components/ui/toast/ToastDescription.vue.d.ts +35 -0
- package/dist/types/components/ui/toast/ToastProvider.vue.d.ts +28 -0
- package/dist/types/components/ui/toast/ToastTitle.vue.d.ts +35 -0
- package/dist/types/components/ui/toast/ToastViewport.vue.d.ts +17 -0
- package/dist/types/components/ui/toast/Toaster.vue.d.ts +2 -0
- package/dist/types/components/ui/toast/index.d.ts +21 -0
- package/dist/types/components/ui/toast/use-toast.d.ts +272 -0
- package/dist/types/components/ui/tooltip/Tooltip.vue.d.ts +28 -0
- package/dist/types/components/ui/tooltip/TooltipContent.vue.d.ts +52 -0
- package/dist/types/components/ui/tooltip/TooltipProvider.vue.d.ts +28 -0
- package/dist/types/components/ui/tooltip/TooltipTrigger.vue.d.ts +28 -0
- package/dist/types/components/ui/tooltip/index.d.ts +4 -0
- package/dist/types/components/utils/annotations.d.ts +5 -0
- package/dist/types/components/utils/destination.d.ts +7 -0
- package/dist/types/components/utils/helpers.d.ts +2 -0
- package/dist/types/components/utils/link_service.d.ts +71 -0
- package/dist/types/components/utils/sanitizeExternalURL.d.ts +1 -0
- package/dist/types/composables/useAnnotationDrag.d.ts +72 -0
- package/dist/types/composables/useAnnotationFreeText.d.ts +464 -0
- package/dist/types/composables/useAnnotationHighlight.d.ts +389 -0
- package/dist/types/composables/useAnnotationStamp.d.ts +493 -0
- package/dist/types/composables/useAnnotationStorage.d.ts +72 -0
- package/dist/types/composables/useCommandHistory.d.ts +6 -0
- package/dist/types/composables/useDownload.d.ts +13 -0
- package/dist/types/composables/useHighlight.d.ts +11 -0
- package/dist/types/composables/useLicense.d.ts +22 -0
- package/dist/types/composables/usePdf.d.ts +28 -0
- 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 +10 -0
- package/dist/types/composables/usePinch.d.ts +3 -0
- 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 +8 -0
- 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 +7 -0
- package/dist/types/composables/useScale.d.ts +21 -0
- package/dist/types/composables/useSearch.d.ts +5 -0
- 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 +151 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/utils/annotation-command.d.ts +18 -0
- package/dist/types/utils/annotation-display.d.ts +28 -0
- package/dist/types/utils/annotation-free-text.d.ts +4 -0
- package/dist/types/utils/annotation-highlight.d.ts +81 -0
- package/dist/types/utils/annotation-image.d.ts +111 -0
- package/dist/types/utils/annotation-pdf.d.ts +35 -0
- package/dist/types/utils/appConsole.d.ts +24 -0
- package/dist/types/utils/characters.d.ts +16 -0
- package/dist/types/utils/color.d.ts +4 -0
- package/dist/types/utils/convertPDFDate.d.ts +1 -0
- package/dist/types/utils/enumerators.d.ts +81 -0
- package/dist/types/utils/highlight.d.ts +8 -0
- package/dist/types/utils/historyManager.d.ts +55 -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 +724 -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 +20 -0
- package/package.json +2 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UnwrapRef } from 'vue';
|
|
2
|
+
import { ViewerPdfPage, ViewerState } from '@/utils/types';
|
|
3
|
+
declare function usePdfPageSizes(props: UnwrapRef<ViewerState>): {
|
|
4
|
+
pdfPages: import("vue").ComputedRef<ViewerPdfPage[]>;
|
|
5
|
+
estimatedPdfPages: import("vue").ShallowRef<ViewerPdfPage[], ViewerPdfPage[]>;
|
|
6
|
+
actualPdfPages: import("vue").ShallowRef<ViewerPdfPage[], ViewerPdfPage[]>;
|
|
7
|
+
};
|
|
8
|
+
export default usePdfPageSizes;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PDFDocumentProxy } from 'pdfjs-dist';
|
|
2
|
+
import { Ref, ShallowRef } from 'vue';
|
|
3
|
+
import type { PdfProperties, PDFSrc } from '@/utils/types';
|
|
4
|
+
type CMapSource = {
|
|
5
|
+
url: string;
|
|
6
|
+
cMapPacked: boolean;
|
|
7
|
+
cMapUrl: string;
|
|
8
|
+
};
|
|
9
|
+
declare const usePdfProperties: (pdfDoc: ShallowRef<PDFDocumentProxy | undefined>, source: Ref<PDFSrc | CMapSource>, filename: Ref<string | undefined>) => Ref<PdfProperties | undefined, PdfProperties | undefined>;
|
|
10
|
+
export default usePdfProperties;
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import type { Reactive } from 'vue';
|
|
3
|
+
import type { Localization, PluginItem, Plugin } from '@vue-pdf-viewer/shared';
|
|
4
|
+
declare const usePlugins: (plugins?: Reactive<Plugin[]>, viewerLocalization?: ComputedRef<Localization>) => {
|
|
5
|
+
currentInstance: import("vue").ComponentInternalInstance | null;
|
|
6
|
+
sidebarItems: import("vue").Ref<{
|
|
7
|
+
id: string;
|
|
8
|
+
component: {
|
|
9
|
+
new (...args: any[]): any;
|
|
10
|
+
__isFragment?: undefined;
|
|
11
|
+
__isTeleport?: undefined;
|
|
12
|
+
__isSuspense?: undefined;
|
|
13
|
+
} | import("vue").FunctionalComponent<any, {}, any, {}> | {
|
|
14
|
+
[x: string]: any;
|
|
15
|
+
setup?: ((this: void, props: import("@vue/shared").LooseRequired<any>, ctx: {
|
|
16
|
+
attrs: {
|
|
17
|
+
[x: string]: unknown;
|
|
18
|
+
};
|
|
19
|
+
slots: Readonly<{
|
|
20
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
emit: ((event: unknown, ...args: any[]) => void) | ((event: string, ...args: any[]) => void);
|
|
23
|
+
expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed | undefined) => void;
|
|
24
|
+
}) => any) | undefined;
|
|
25
|
+
name?: string | undefined;
|
|
26
|
+
template?: string | object | undefined;
|
|
27
|
+
render?: Function | undefined;
|
|
28
|
+
components?: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>> | undefined;
|
|
29
|
+
directives?: Record<string, import("vue").Directive<any, any, string, string>> | undefined;
|
|
30
|
+
inheritAttrs?: boolean | undefined;
|
|
31
|
+
emits?: any;
|
|
32
|
+
slots?: {} | undefined;
|
|
33
|
+
expose?: string[] | undefined;
|
|
34
|
+
serverPrefetch?: (() => void | Promise<any>) | undefined;
|
|
35
|
+
compilerOptions?: {
|
|
36
|
+
isCustomElement?: ((tag: string) => boolean) | undefined;
|
|
37
|
+
whitespace?: "preserve" | "condense" | undefined;
|
|
38
|
+
comments?: boolean | undefined;
|
|
39
|
+
delimiters?: [string, string] | undefined;
|
|
40
|
+
} | undefined;
|
|
41
|
+
call?: ((this: unknown, ...args: unknown[]) => never) | undefined;
|
|
42
|
+
__isFragment?: undefined;
|
|
43
|
+
__isTeleport?: undefined;
|
|
44
|
+
__isSuspense?: undefined;
|
|
45
|
+
__defaults?: {} | undefined;
|
|
46
|
+
compatConfig?: {
|
|
47
|
+
GLOBAL_MOUNT?: boolean | "suppress-warning" | undefined;
|
|
48
|
+
GLOBAL_MOUNT_CONTAINER?: boolean | "suppress-warning" | undefined;
|
|
49
|
+
GLOBAL_EXTEND?: boolean | "suppress-warning" | undefined;
|
|
50
|
+
GLOBAL_PROTOTYPE?: boolean | "suppress-warning" | undefined;
|
|
51
|
+
GLOBAL_SET?: boolean | "suppress-warning" | undefined;
|
|
52
|
+
GLOBAL_DELETE?: boolean | "suppress-warning" | undefined;
|
|
53
|
+
GLOBAL_OBSERVABLE?: boolean | "suppress-warning" | undefined;
|
|
54
|
+
GLOBAL_PRIVATE_UTIL?: boolean | "suppress-warning" | undefined;
|
|
55
|
+
CONFIG_SILENT?: boolean | "suppress-warning" | undefined;
|
|
56
|
+
CONFIG_DEVTOOLS?: boolean | "suppress-warning" | undefined;
|
|
57
|
+
CONFIG_KEY_CODES?: boolean | "suppress-warning" | undefined;
|
|
58
|
+
CONFIG_PRODUCTION_TIP?: boolean | "suppress-warning" | undefined;
|
|
59
|
+
CONFIG_IGNORED_ELEMENTS?: boolean | "suppress-warning" | undefined;
|
|
60
|
+
CONFIG_WHITESPACE?: boolean | "suppress-warning" | undefined;
|
|
61
|
+
CONFIG_OPTION_MERGE_STRATS?: boolean | "suppress-warning" | undefined;
|
|
62
|
+
INSTANCE_SET?: boolean | "suppress-warning" | undefined;
|
|
63
|
+
INSTANCE_DELETE?: boolean | "suppress-warning" | undefined;
|
|
64
|
+
INSTANCE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
65
|
+
INSTANCE_EVENT_EMITTER?: boolean | "suppress-warning" | undefined;
|
|
66
|
+
INSTANCE_EVENT_HOOKS?: boolean | "suppress-warning" | undefined;
|
|
67
|
+
INSTANCE_CHILDREN?: boolean | "suppress-warning" | undefined;
|
|
68
|
+
INSTANCE_LISTENERS?: boolean | "suppress-warning" | undefined;
|
|
69
|
+
INSTANCE_SCOPED_SLOTS?: boolean | "suppress-warning" | undefined;
|
|
70
|
+
INSTANCE_ATTRS_CLASS_STYLE?: boolean | "suppress-warning" | undefined;
|
|
71
|
+
OPTIONS_DATA_FN?: boolean | "suppress-warning" | undefined;
|
|
72
|
+
OPTIONS_DATA_MERGE?: boolean | "suppress-warning" | undefined;
|
|
73
|
+
OPTIONS_BEFORE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
74
|
+
OPTIONS_DESTROYED?: boolean | "suppress-warning" | undefined;
|
|
75
|
+
WATCH_ARRAY?: boolean | "suppress-warning" | undefined;
|
|
76
|
+
PROPS_DEFAULT_THIS?: boolean | "suppress-warning" | undefined;
|
|
77
|
+
V_ON_KEYCODE_MODIFIER?: boolean | "suppress-warning" | undefined;
|
|
78
|
+
CUSTOM_DIR?: boolean | "suppress-warning" | undefined;
|
|
79
|
+
ATTR_FALSE_VALUE?: boolean | "suppress-warning" | undefined;
|
|
80
|
+
ATTR_ENUMERATED_COERCION?: boolean | "suppress-warning" | undefined;
|
|
81
|
+
TRANSITION_CLASSES?: boolean | "suppress-warning" | undefined;
|
|
82
|
+
TRANSITION_GROUP_ROOT?: boolean | "suppress-warning" | undefined;
|
|
83
|
+
COMPONENT_ASYNC?: boolean | "suppress-warning" | undefined;
|
|
84
|
+
COMPONENT_FUNCTIONAL?: boolean | "suppress-warning" | undefined;
|
|
85
|
+
COMPONENT_V_MODEL?: boolean | "suppress-warning" | undefined;
|
|
86
|
+
RENDER_FUNCTION?: boolean | "suppress-warning" | undefined;
|
|
87
|
+
FILTERS?: boolean | "suppress-warning" | undefined;
|
|
88
|
+
PRIVATE_APIS?: boolean | "suppress-warning" | undefined;
|
|
89
|
+
MODE?: 3 | 2 | ((comp: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | null) => 3 | 2) | undefined;
|
|
90
|
+
} | undefined;
|
|
91
|
+
data?: ((this: any, vm: any) => any) | undefined;
|
|
92
|
+
computed?: import("vue").ComputedOptions | undefined;
|
|
93
|
+
methods?: import("vue").MethodOptions | undefined;
|
|
94
|
+
watch?: {
|
|
95
|
+
[x: string]: (string | import("vue").WatchCallback<any, any> | ({
|
|
96
|
+
handler: string | import("vue").WatchCallback<any, any>;
|
|
97
|
+
} & import("vue").WatchOptions<boolean>)) | (string | import("vue").WatchCallback<any, any> | ({
|
|
98
|
+
handler: string | import("vue").WatchCallback<any, any>;
|
|
99
|
+
} & import("vue").WatchOptions<boolean>))[];
|
|
100
|
+
} | undefined;
|
|
101
|
+
provide?: import("vue").ComponentProvideOptions | undefined;
|
|
102
|
+
inject?: {} | string[] | undefined;
|
|
103
|
+
filters?: Record<string, Function> | undefined;
|
|
104
|
+
mixins?: any[] | undefined;
|
|
105
|
+
extends?: any;
|
|
106
|
+
beforeCreate?: (() => void) | undefined;
|
|
107
|
+
created?: (() => void) | undefined;
|
|
108
|
+
beforeMount?: (() => void) | undefined;
|
|
109
|
+
mounted?: (() => void) | undefined;
|
|
110
|
+
beforeUpdate?: (() => void) | undefined;
|
|
111
|
+
updated?: (() => void) | undefined;
|
|
112
|
+
activated?: (() => void) | undefined;
|
|
113
|
+
deactivated?: (() => void) | undefined;
|
|
114
|
+
beforeDestroy?: (() => void) | undefined;
|
|
115
|
+
beforeUnmount?: (() => void) | undefined;
|
|
116
|
+
destroyed?: (() => void) | undefined;
|
|
117
|
+
unmounted?: (() => void) | undefined;
|
|
118
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
119
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
120
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void) | undefined;
|
|
121
|
+
delimiters?: [string, string] | undefined;
|
|
122
|
+
__differentiator?: string | number | symbol | undefined;
|
|
123
|
+
__isBuiltIn?: boolean | undefined;
|
|
124
|
+
__file?: string | undefined;
|
|
125
|
+
__name?: string | undefined;
|
|
126
|
+
};
|
|
127
|
+
toolbarDirection: import("@vue-pdf-viewer/shared").ToolbarDirection;
|
|
128
|
+
}[], PluginItem[] | {
|
|
129
|
+
id: string;
|
|
130
|
+
component: {
|
|
131
|
+
new (...args: any[]): any;
|
|
132
|
+
__isFragment?: undefined;
|
|
133
|
+
__isTeleport?: undefined;
|
|
134
|
+
__isSuspense?: undefined;
|
|
135
|
+
} | import("vue").FunctionalComponent<any, {}, any, {}> | {
|
|
136
|
+
[x: string]: any;
|
|
137
|
+
setup?: ((this: void, props: import("@vue/shared").LooseRequired<any>, ctx: {
|
|
138
|
+
attrs: {
|
|
139
|
+
[x: string]: unknown;
|
|
140
|
+
};
|
|
141
|
+
slots: Readonly<{
|
|
142
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
143
|
+
}>;
|
|
144
|
+
emit: ((event: unknown, ...args: any[]) => void) | ((event: string, ...args: any[]) => void);
|
|
145
|
+
expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed | undefined) => void;
|
|
146
|
+
}) => any) | undefined;
|
|
147
|
+
name?: string | undefined;
|
|
148
|
+
template?: string | object | undefined;
|
|
149
|
+
render?: Function | undefined;
|
|
150
|
+
components?: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>> | undefined;
|
|
151
|
+
directives?: Record<string, import("vue").Directive<any, any, string, string>> | undefined;
|
|
152
|
+
inheritAttrs?: boolean | undefined;
|
|
153
|
+
emits?: any;
|
|
154
|
+
slots?: {} | undefined;
|
|
155
|
+
expose?: string[] | undefined;
|
|
156
|
+
serverPrefetch?: (() => void | Promise<any>) | undefined;
|
|
157
|
+
compilerOptions?: {
|
|
158
|
+
isCustomElement?: ((tag: string) => boolean) | undefined;
|
|
159
|
+
whitespace?: "preserve" | "condense" | undefined;
|
|
160
|
+
comments?: boolean | undefined;
|
|
161
|
+
delimiters?: [string, string] | undefined;
|
|
162
|
+
} | undefined;
|
|
163
|
+
call?: ((this: unknown, ...args: unknown[]) => never) | undefined;
|
|
164
|
+
__isFragment?: undefined;
|
|
165
|
+
__isTeleport?: undefined;
|
|
166
|
+
__isSuspense?: undefined;
|
|
167
|
+
__defaults?: {} | undefined;
|
|
168
|
+
compatConfig?: {
|
|
169
|
+
GLOBAL_MOUNT?: boolean | "suppress-warning" | undefined;
|
|
170
|
+
GLOBAL_MOUNT_CONTAINER?: boolean | "suppress-warning" | undefined;
|
|
171
|
+
GLOBAL_EXTEND?: boolean | "suppress-warning" | undefined;
|
|
172
|
+
GLOBAL_PROTOTYPE?: boolean | "suppress-warning" | undefined;
|
|
173
|
+
GLOBAL_SET?: boolean | "suppress-warning" | undefined;
|
|
174
|
+
GLOBAL_DELETE?: boolean | "suppress-warning" | undefined;
|
|
175
|
+
GLOBAL_OBSERVABLE?: boolean | "suppress-warning" | undefined;
|
|
176
|
+
GLOBAL_PRIVATE_UTIL?: boolean | "suppress-warning" | undefined;
|
|
177
|
+
CONFIG_SILENT?: boolean | "suppress-warning" | undefined;
|
|
178
|
+
CONFIG_DEVTOOLS?: boolean | "suppress-warning" | undefined;
|
|
179
|
+
CONFIG_KEY_CODES?: boolean | "suppress-warning" | undefined;
|
|
180
|
+
CONFIG_PRODUCTION_TIP?: boolean | "suppress-warning" | undefined;
|
|
181
|
+
CONFIG_IGNORED_ELEMENTS?: boolean | "suppress-warning" | undefined;
|
|
182
|
+
CONFIG_WHITESPACE?: boolean | "suppress-warning" | undefined;
|
|
183
|
+
CONFIG_OPTION_MERGE_STRATS?: boolean | "suppress-warning" | undefined;
|
|
184
|
+
INSTANCE_SET?: boolean | "suppress-warning" | undefined;
|
|
185
|
+
INSTANCE_DELETE?: boolean | "suppress-warning" | undefined;
|
|
186
|
+
INSTANCE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
187
|
+
INSTANCE_EVENT_EMITTER?: boolean | "suppress-warning" | undefined;
|
|
188
|
+
INSTANCE_EVENT_HOOKS?: boolean | "suppress-warning" | undefined;
|
|
189
|
+
INSTANCE_CHILDREN?: boolean | "suppress-warning" | undefined;
|
|
190
|
+
INSTANCE_LISTENERS?: boolean | "suppress-warning" | undefined;
|
|
191
|
+
INSTANCE_SCOPED_SLOTS?: boolean | "suppress-warning" | undefined;
|
|
192
|
+
INSTANCE_ATTRS_CLASS_STYLE?: boolean | "suppress-warning" | undefined;
|
|
193
|
+
OPTIONS_DATA_FN?: boolean | "suppress-warning" | undefined;
|
|
194
|
+
OPTIONS_DATA_MERGE?: boolean | "suppress-warning" | undefined;
|
|
195
|
+
OPTIONS_BEFORE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
196
|
+
OPTIONS_DESTROYED?: boolean | "suppress-warning" | undefined;
|
|
197
|
+
WATCH_ARRAY?: boolean | "suppress-warning" | undefined;
|
|
198
|
+
PROPS_DEFAULT_THIS?: boolean | "suppress-warning" | undefined;
|
|
199
|
+
V_ON_KEYCODE_MODIFIER?: boolean | "suppress-warning" | undefined;
|
|
200
|
+
CUSTOM_DIR?: boolean | "suppress-warning" | undefined;
|
|
201
|
+
ATTR_FALSE_VALUE?: boolean | "suppress-warning" | undefined;
|
|
202
|
+
ATTR_ENUMERATED_COERCION?: boolean | "suppress-warning" | undefined;
|
|
203
|
+
TRANSITION_CLASSES?: boolean | "suppress-warning" | undefined;
|
|
204
|
+
TRANSITION_GROUP_ROOT?: boolean | "suppress-warning" | undefined;
|
|
205
|
+
COMPONENT_ASYNC?: boolean | "suppress-warning" | undefined;
|
|
206
|
+
COMPONENT_FUNCTIONAL?: boolean | "suppress-warning" | undefined;
|
|
207
|
+
COMPONENT_V_MODEL?: boolean | "suppress-warning" | undefined;
|
|
208
|
+
RENDER_FUNCTION?: boolean | "suppress-warning" | undefined;
|
|
209
|
+
FILTERS?: boolean | "suppress-warning" | undefined;
|
|
210
|
+
PRIVATE_APIS?: boolean | "suppress-warning" | undefined;
|
|
211
|
+
MODE?: 3 | 2 | ((comp: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | null) => 3 | 2) | undefined;
|
|
212
|
+
} | undefined;
|
|
213
|
+
data?: ((this: any, vm: any) => any) | undefined;
|
|
214
|
+
computed?: import("vue").ComputedOptions | undefined;
|
|
215
|
+
methods?: import("vue").MethodOptions | undefined;
|
|
216
|
+
watch?: {
|
|
217
|
+
[x: string]: (string | import("vue").WatchCallback<any, any> | ({
|
|
218
|
+
handler: string | import("vue").WatchCallback<any, any>;
|
|
219
|
+
} & import("vue").WatchOptions<boolean>)) | (string | import("vue").WatchCallback<any, any> | ({
|
|
220
|
+
handler: string | import("vue").WatchCallback<any, any>;
|
|
221
|
+
} & import("vue").WatchOptions<boolean>))[];
|
|
222
|
+
} | undefined;
|
|
223
|
+
provide?: import("vue").ComponentProvideOptions | undefined;
|
|
224
|
+
inject?: {} | string[] | undefined;
|
|
225
|
+
filters?: Record<string, Function> | undefined;
|
|
226
|
+
mixins?: any[] | undefined;
|
|
227
|
+
extends?: any;
|
|
228
|
+
beforeCreate?: (() => void) | undefined;
|
|
229
|
+
created?: (() => void) | undefined;
|
|
230
|
+
beforeMount?: (() => void) | undefined;
|
|
231
|
+
mounted?: (() => void) | undefined;
|
|
232
|
+
beforeUpdate?: (() => void) | undefined;
|
|
233
|
+
updated?: (() => void) | undefined;
|
|
234
|
+
activated?: (() => void) | undefined;
|
|
235
|
+
deactivated?: (() => void) | undefined;
|
|
236
|
+
beforeDestroy?: (() => void) | undefined;
|
|
237
|
+
beforeUnmount?: (() => void) | undefined;
|
|
238
|
+
destroyed?: (() => void) | undefined;
|
|
239
|
+
unmounted?: (() => void) | undefined;
|
|
240
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
241
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
242
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void) | undefined;
|
|
243
|
+
delimiters?: [string, string] | undefined;
|
|
244
|
+
__differentiator?: string | number | symbol | undefined;
|
|
245
|
+
__isBuiltIn?: boolean | undefined;
|
|
246
|
+
__file?: string | undefined;
|
|
247
|
+
__name?: string | undefined;
|
|
248
|
+
};
|
|
249
|
+
toolbarDirection: import("@vue-pdf-viewer/shared").ToolbarDirection;
|
|
250
|
+
}[]>;
|
|
251
|
+
};
|
|
252
|
+
export default usePlugins;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type { CanvasLoadedCallback, PreparePrintProgress, ViewerPdfPage } from '@/utils/types';
|
|
3
|
+
import { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
|
|
4
|
+
declare const usePrintControl: (pdfDocument: Ref<PDFDocumentProxy | undefined>, pages: Ref<ViewerPdfPage[]>, afterCanvasLoaded?: Ref<Record<number, CanvasLoadedCallback> | undefined>) => {
|
|
5
|
+
print: (showProgress?: boolean) => Promise<void>;
|
|
6
|
+
printControl: {
|
|
7
|
+
print: (options?: {
|
|
8
|
+
visibleDefaultProgress: boolean;
|
|
9
|
+
} | undefined) => void;
|
|
10
|
+
cancel: () => void;
|
|
11
|
+
onProgress?: ((progress: PreparePrintProgress) => void) | undefined;
|
|
12
|
+
onError?: ((error: Error) => void) | undefined;
|
|
13
|
+
onComplete?: (() => void) | undefined;
|
|
14
|
+
};
|
|
15
|
+
visiblePrintProcess: Ref<boolean, boolean>;
|
|
16
|
+
cancelPrint: Ref<boolean, boolean>;
|
|
17
|
+
onPrintCancel: () => void;
|
|
18
|
+
onPrintLoading: () => void;
|
|
19
|
+
changePercent: (value: number) => void;
|
|
20
|
+
printProgressPercentage: Ref<number, number>;
|
|
21
|
+
};
|
|
22
|
+
export default usePrintControl;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const usePrintProcess: () => {
|
|
2
|
+
isCancel: import("vue").Ref<boolean, boolean>;
|
|
3
|
+
percent: import("vue").Ref<number, number>;
|
|
4
|
+
showPrintProcess: import("vue").Ref<boolean, boolean>;
|
|
5
|
+
onCancel: () => void;
|
|
6
|
+
onLoading: () => void;
|
|
7
|
+
changePercent: (value: number) => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
|
|
2
|
+
import { MaybeRef } from 'vue';
|
|
3
|
+
export interface UseRenderQueueReturn {
|
|
4
|
+
getHighestPriorityPage: () => number;
|
|
5
|
+
isInRange: (pageIndex: number) => boolean;
|
|
6
|
+
markNotRendered: () => void;
|
|
7
|
+
markRendered: (pageIndex: number) => void;
|
|
8
|
+
markRendering: (pageIndex: number) => void;
|
|
9
|
+
setOutOfRange: (pageIndex: number) => void;
|
|
10
|
+
setRange: (startIndex: number, endIndex: number) => void;
|
|
11
|
+
setVisibility: (pageIndex: number, visibility: number) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const useRenderQueue: (doc: MaybeRef<PDFDocumentProxy | undefined>) => UseRenderQueueReturn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useRequestAnimationFrame: <T extends unknown[]>(callback: (...args: T) => void, recurring?: boolean) => (...args: T) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { RotateEvent } from '..';
|
|
3
|
+
declare const useRotation: (currentRotation: Ref<number>, rotateCallback?: ((event: RotateEvent) => void) | undefined) => {
|
|
4
|
+
onRotateClockwise: () => void;
|
|
5
|
+
onRotateCounterclockwise: () => void;
|
|
6
|
+
};
|
|
7
|
+
export default useRotation;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MaybeRef, Ref, ShallowRef, UnwrapRef } from 'vue';
|
|
2
|
+
import type { UseScaleCallback, ViewerPdfPage } from '@/utils/types';
|
|
3
|
+
import { ViewMode, ZoomLevel } from '@/utils/enumerators';
|
|
4
|
+
import type { PDFDocumentProxy } from 'pdfjs-dist';
|
|
5
|
+
interface UseScaleProps {
|
|
6
|
+
pdfDocument: ShallowRef<PDFDocumentProxy | undefined>;
|
|
7
|
+
pagesContainerRef: ShallowRef<HTMLDivElement | undefined>;
|
|
8
|
+
viewMode: Ref<ViewMode>;
|
|
9
|
+
initialScale: MaybeRef<number | ZoomLevel>;
|
|
10
|
+
focusedPage: MaybeRef<ViewerPdfPage | undefined>;
|
|
11
|
+
leftToolbar?: Ref<boolean>;
|
|
12
|
+
}
|
|
13
|
+
declare const useScale: (props: UnwrapRef<UseScaleProps>, scaleCallback?: ((event: UseScaleCallback) => void) | undefined) => {
|
|
14
|
+
currentScale: Ref<number, number>;
|
|
15
|
+
zoom: (scale: number | ZoomLevel) => void;
|
|
16
|
+
zoomControl: {
|
|
17
|
+
scale: number;
|
|
18
|
+
zoom: (scale: number | ZoomLevel) => void;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default useScale;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ShallowRef } from 'vue';
|
|
2
|
+
import type { PDFDocumentProxy } from 'pdfjs-dist';
|
|
3
|
+
import type { SearchControlValue, HighlightOptions } from '@/utils/types';
|
|
4
|
+
declare const useSearch: (pdfDoc: ShallowRef<PDFDocumentProxy | undefined>, initialSearch?: string, options?: ShallowRef<HighlightOptions>) => SearchControlValue;
|
|
5
|
+
export default useSearch;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComputedRef, CSSProperties, Ref, StyleValue, UnwrapRef } from 'vue';
|
|
2
|
+
import type { ViewerPdfPage, VirtualRange, ElementRect } from '@/utils/types';
|
|
3
|
+
import { ScrollMode, ViewMode } from '@/utils/enumerators';
|
|
4
|
+
interface UseVirtualListItem<T> {
|
|
5
|
+
data: T;
|
|
6
|
+
index: number;
|
|
7
|
+
}
|
|
8
|
+
export interface UseVirtualListReturn {
|
|
9
|
+
list: Ref<UseVirtualListItem<ViewerPdfPage>[]>;
|
|
10
|
+
scrollTo: (index: number, rect?: ElementRect) => void;
|
|
11
|
+
pageGroups: ComputedRef<Array<UseVirtualListItem<ViewerPdfPage>[]> | undefined>;
|
|
12
|
+
containerProps: {
|
|
13
|
+
ref: Ref<HTMLElement | null>;
|
|
14
|
+
onScroll: () => void;
|
|
15
|
+
style: StyleValue;
|
|
16
|
+
};
|
|
17
|
+
wrapperProps: ComputedRef<{
|
|
18
|
+
style: CSSProperties;
|
|
19
|
+
}>;
|
|
20
|
+
range: Ref<VirtualRange>;
|
|
21
|
+
pagesPerRow: Ref<number>;
|
|
22
|
+
}
|
|
23
|
+
interface UseVirtualPagesProps {
|
|
24
|
+
pages: Ref<ViewerPdfPage[]>;
|
|
25
|
+
viewerRef: Ref<HTMLElement | undefined>;
|
|
26
|
+
scrollMode: Ref<ScrollMode>;
|
|
27
|
+
viewMode: Ref<ViewMode>;
|
|
28
|
+
isRtl: boolean;
|
|
29
|
+
smoothScroll: Ref<boolean>;
|
|
30
|
+
}
|
|
31
|
+
declare function useVirtualPages(props: UnwrapRef<UseVirtualPagesProps>): UseVirtualListReturn;
|
|
32
|
+
export default useVirtualPages;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import { VirtualRange, VisibilityInfo } from '@/utils/types';
|
|
3
|
+
declare function useVisibilities(totalPages: Ref<number>): {
|
|
4
|
+
resetVisibility: (preserveRange?: VirtualRange) => void;
|
|
5
|
+
updateVisibility: (info: VisibilityInfo) => void;
|
|
6
|
+
currentPage: Ref<number, number>;
|
|
7
|
+
calculateCurrentPage: (range?: VirtualRange) => number;
|
|
8
|
+
};
|
|
9
|
+
export default useVisibilities;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
|
|
2
|
+
import type { PDFPageProxy } from 'pdfjs-dist/types/web/interfaces';
|
|
3
|
+
import { type InjectionKey, type Slot, type Ref, type ComponentPublicInstance, type ShallowRef, type Reactive, type ComputedRef } from 'vue';
|
|
4
|
+
import type { HighlightMatchPosition, HighlightOptions, NormalizedKeyword, Offset, PdfProperties, ToolbarOptions, ViewerPdfPage, ViewerState, Comment } from './utils/types';
|
|
5
|
+
import { LicenseProduct } from './utils/enumerators';
|
|
6
|
+
import { LicenseType, ScrollMode, ViewMode, ZoomLevel } from './components';
|
|
7
|
+
import { AnnotationHighlightColors } from '@vue-pdf-viewer/shared';
|
|
8
|
+
import { AnnotationImageManager } from './utils/annotation-image';
|
|
9
|
+
import { HistoryManager } from './utils/historyManager';
|
|
10
|
+
export declare const CSS_CLASSES: {
|
|
11
|
+
SELECTING: string;
|
|
12
|
+
END_OF_CONTENT: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const DEFAULT_TOOLBAR_OPTIONS: ToolbarOptions;
|
|
15
|
+
export declare const DEFAULT_PROPS: {
|
|
16
|
+
workerUrl: undefined;
|
|
17
|
+
initialPage: number;
|
|
18
|
+
initialScale: ZoomLevel;
|
|
19
|
+
initialScrollMode: ScrollMode;
|
|
20
|
+
initialViewMode: ViewMode;
|
|
21
|
+
initialRotation: number;
|
|
22
|
+
initialThumbnailsVisible: boolean;
|
|
23
|
+
initialSearch: undefined;
|
|
24
|
+
textLayer: boolean;
|
|
25
|
+
characterMap: undefined;
|
|
26
|
+
toolbarOptions: ToolbarOptions;
|
|
27
|
+
localization: Record<string, import("@vue-pdf-viewer/shared").Localization>;
|
|
28
|
+
afterCanvasLoaded: undefined;
|
|
29
|
+
};
|
|
30
|
+
export declare const DEFAULT_OFFSET: Offset;
|
|
31
|
+
export declare const PERCENTAGE = 100;
|
|
32
|
+
export declare const MIN_ZOOM_SCALE = 0.25;
|
|
33
|
+
export declare const MAX_ZOOM_SCALE = 10;
|
|
34
|
+
export declare const SCROLL_BAR_WIDTH = 20;
|
|
35
|
+
export declare const PAGE_PADDING = 1;
|
|
36
|
+
export declare const PAGE_OFFSET = 0;
|
|
37
|
+
export declare const LAST_PAGE_OFFSET = 4;
|
|
38
|
+
export declare const SEARCH_MAX_HEIGHT = 97;
|
|
39
|
+
export declare const FILE_INPUT: InjectionKey<Ref<ComponentPublicInstance<import("vue").DefineComponent<{}, {
|
|
40
|
+
triggerClick: () => void;
|
|
41
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
42
|
+
change: (file: string) => void;
|
|
43
|
+
} & {
|
|
44
|
+
filenameChange: (file: string) => void;
|
|
45
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
46
|
+
onChange?: ((file: string) => any) | undefined;
|
|
47
|
+
onFilenameChange?: ((file: string) => any) | undefined;
|
|
48
|
+
}>, {}, {}, {}, {}, 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<{}, {
|
|
49
|
+
triggerClick: () => void;
|
|
50
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
|
+
change: (file: string) => void;
|
|
52
|
+
} & {
|
|
53
|
+
filenameChange: (file: string) => void;
|
|
54
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
55
|
+
onChange?: ((file: string) => any) | undefined;
|
|
56
|
+
onFilenameChange?: ((file: string) => any) | undefined;
|
|
57
|
+
}>, {}, {}, {}, {}, 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>>;
|
|
58
|
+
export declare const EMPTY_KEYWORD_REGEXP: NormalizedKeyword;
|
|
59
|
+
export declare const CURRENT_MATCH_CSS_CLASS = "vpv-highlight__text-current";
|
|
60
|
+
export declare const LATEST_MATCH_POSITION: InjectionKey<Ref<HighlightMatchPosition | undefined, HighlightMatchPosition | undefined>>;
|
|
61
|
+
export declare const GET_PAGE: InjectionKey<(doc: PDFDocumentProxy, pageIndex: number) => Promise<PDFPageProxy>>;
|
|
62
|
+
export declare const RESTRICTED_CUSTOM: InjectionKey<Ref<boolean, boolean>>;
|
|
63
|
+
export declare const VIEWER_STATE: InjectionKey<{
|
|
64
|
+
pdfDocument: PDFDocumentProxy | undefined;
|
|
65
|
+
pagesContainerRef: HTMLElement | undefined;
|
|
66
|
+
pageIndex: number;
|
|
67
|
+
viewMode: ViewMode;
|
|
68
|
+
scrollMode: ScrollMode;
|
|
69
|
+
scale: number;
|
|
70
|
+
rotation: number;
|
|
71
|
+
isEditing: boolean;
|
|
72
|
+
updateViewerState: (state: Partial<ViewerState>) => void;
|
|
73
|
+
}>;
|
|
74
|
+
export declare const VIEWER_PAGES_PER_ROW: InjectionKey<Ref<number, number>>;
|
|
75
|
+
export declare const TOOLBAR_OPTIONS: InjectionKey<Ref<ToolbarOptions | undefined, ToolbarOptions | undefined>>;
|
|
76
|
+
export declare const TOTAL_TOOL_OTHERS_MENU: InjectionKey<Ref<number, number>>;
|
|
77
|
+
export declare const IS_DARK: InjectionKey<Ref<boolean, boolean>>;
|
|
78
|
+
export declare const IS_MOBILE_VIEW: InjectionKey<Ref<boolean, boolean>>;
|
|
79
|
+
export declare const CONTAINER: InjectionKey<ShallowRef<HTMLDivElement | undefined, HTMLDivElement | undefined>>;
|
|
80
|
+
export declare const PAGES_CONTAINER: InjectionKey<ShallowRef<HTMLDivElement | undefined, HTMLDivElement | undefined>>;
|
|
81
|
+
export declare const ACTUAL_PDF_PAGES: InjectionKey<ShallowRef<ViewerPdfPage[], ViewerPdfPage[]>>;
|
|
82
|
+
export declare const FOCUSED_PAGE_NUMBER: InjectionKey<Ref<number, number>>;
|
|
83
|
+
export declare const ROTATION_DEGREE: InjectionKey<Ref<number, number>>;
|
|
84
|
+
export declare const TOTAL_PAGE: InjectionKey<Ref<number, number>>;
|
|
85
|
+
export declare const INITIAL_TEXT_LAYER: InjectionKey<boolean>;
|
|
86
|
+
export declare const DOWNLOAD_FILE: InjectionKey<() => Promise<void>>;
|
|
87
|
+
export declare const LICENSE: InjectionKey<{
|
|
88
|
+
invalidatedMessage?: string | undefined;
|
|
89
|
+
isValidating: boolean;
|
|
90
|
+
isValidated: boolean;
|
|
91
|
+
isValidKey: boolean;
|
|
92
|
+
type: LicenseType;
|
|
93
|
+
product: LicenseProduct;
|
|
94
|
+
}>;
|
|
95
|
+
export declare const LICENSE_KEY: InjectionKey<ComputedRef<string | null | undefined>>;
|
|
96
|
+
export declare const HIGHLIGHT_OPTIONS: InjectionKey<ShallowRef<HighlightOptions, HighlightOptions>>;
|
|
97
|
+
export declare const PDF_PROPERTIES: InjectionKey<Ref<PdfProperties | undefined, PdfProperties | undefined>>;
|
|
98
|
+
export declare const SLOT_LOADER_IMAGE: InjectionKey<Slot<any> | undefined>;
|
|
99
|
+
export declare const SLOT_ICON_OPEN_FILE: InjectionKey<Slot<any> | undefined>;
|
|
100
|
+
export declare const SLOT_ICON_DOWNLOAD: InjectionKey<Slot<any> | undefined>;
|
|
101
|
+
export declare const SLOT_ICON_PRINT: InjectionKey<Slot<any> | undefined>;
|
|
102
|
+
export declare const SLOT_ICON_FULLSCREEN: InjectionKey<Slot<any> | undefined>;
|
|
103
|
+
export declare const HISTORY_MANAGER: InjectionKey<HistoryManager>;
|
|
104
|
+
export declare const SYMBOL_ANNOTATION_KEYS: {
|
|
105
|
+
ANNOTATION_IMAGE_MANAGER: InjectionKey<AnnotationImageManager>;
|
|
106
|
+
ENABLE_ANNOTATION_EDITOR: InjectionKey<Ref<boolean, boolean>>;
|
|
107
|
+
ACTIVE_ANNOTATION: InjectionKey<{
|
|
108
|
+
Text: boolean;
|
|
109
|
+
Link: boolean;
|
|
110
|
+
FreeText: boolean;
|
|
111
|
+
Line: boolean;
|
|
112
|
+
Square: boolean;
|
|
113
|
+
Circle: boolean;
|
|
114
|
+
Polygon: boolean;
|
|
115
|
+
Polyline: boolean;
|
|
116
|
+
Highlight: boolean;
|
|
117
|
+
Underline: boolean;
|
|
118
|
+
Squiggly: boolean;
|
|
119
|
+
StrikeOut: boolean;
|
|
120
|
+
Stamp: boolean;
|
|
121
|
+
Caret: boolean;
|
|
122
|
+
Ink: boolean;
|
|
123
|
+
Popup: boolean;
|
|
124
|
+
FileAttachment: boolean;
|
|
125
|
+
Widget: boolean;
|
|
126
|
+
}>;
|
|
127
|
+
HIGHLIGHT_COLOR: InjectionKey<Ref<string | null, string | null>>;
|
|
128
|
+
HIGHLIGHT_COLORS: InjectionKey<Ref<AnnotationHighlightColors, AnnotationHighlightColors>>;
|
|
129
|
+
ENABLE_ANNOTATION_IMAGE_EDITOR: InjectionKey<Ref<boolean, boolean>>;
|
|
130
|
+
};
|
|
131
|
+
export declare const FUNC_GO_TO_PAGE: InjectionKey<(page: number) => void>;
|
|
132
|
+
export declare const LICENSE_DEFAULT: {
|
|
133
|
+
isValidated: boolean;
|
|
134
|
+
isValidating: boolean;
|
|
135
|
+
isValidKey: boolean;
|
|
136
|
+
licenseKey: null;
|
|
137
|
+
type: LicenseType;
|
|
138
|
+
product: LicenseProduct;
|
|
139
|
+
};
|
|
140
|
+
export declare const PDF_COMMENTS: InjectionKey<{
|
|
141
|
+
comments: Map<number, Comment[]>;
|
|
142
|
+
repliedCommentPages: import("./components").PdfCommentPage[];
|
|
143
|
+
}>;
|
|
144
|
+
export declare const ANNOTATION_CANVAS_MAP: InjectionKey<Reactive<Map<string, HTMLCanvasElement>>>;
|
|
145
|
+
export declare const DEFAULT_VIEWER_STATE: Reactive<ViewerState>;
|
|
146
|
+
export declare const SUPPORTED_IMAGE_MIME_TYPES: readonly ["image/apng", "image/avif", "image/bmp", "image/gif", "image/jpeg", "image/png", "image/svg+xml", "image/webp", "image/x-icon"];
|
|
147
|
+
export declare const PIXELS_PER_INCH: {
|
|
148
|
+
CSS: number;
|
|
149
|
+
PDF: number;
|
|
150
|
+
PDF_TO_CSS_UNITS: number;
|
|
151
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Plugin } from 'vue';
|
|
2
|
+
import { Locales } from '@vue-pdf-viewer/shared';
|
|
3
|
+
export declare const VPdfViewerPlugin: Plugin;
|
|
4
|
+
export { Locales };
|
|
5
|
+
export * from './components';
|
|
6
|
+
export type { VPVInstance, CanvasLoadedCallback, PrintControl, ToolbarOptions, MatchHighlightResult } from './utils/types';
|
|
7
|
+
export type { Localization } from '@vue-pdf-viewer/shared';
|
|
8
|
+
export default VPdfViewerPlugin;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Command Manager for Undo/Redo functionality
|
|
3
|
+
*/
|
|
4
|
+
export declare class CommandManager {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(maxSize?: number);
|
|
7
|
+
add({ cmd, undo, post, mustExec }: {
|
|
8
|
+
cmd: () => void;
|
|
9
|
+
undo: () => void;
|
|
10
|
+
post?: () => void;
|
|
11
|
+
mustExec?: boolean;
|
|
12
|
+
}): void;
|
|
13
|
+
undo(): void;
|
|
14
|
+
redo(): void;
|
|
15
|
+
hasSomethingToUndo(): boolean;
|
|
16
|
+
hasSomethingToRedo(): boolean;
|
|
17
|
+
clear(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PDFPageProxy } from 'pdfjs-dist';
|
|
2
|
+
import { Annotation } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Scale factors for the canvas, necessary with HiDPI displays.
|
|
5
|
+
*/
|
|
6
|
+
export declare class OutputScale {
|
|
7
|
+
sx: number;
|
|
8
|
+
sy: number;
|
|
9
|
+
constructor();
|
|
10
|
+
/**
|
|
11
|
+
* @type {boolean} Returns `true` when scaling is required, `false` otherwise.
|
|
12
|
+
*/
|
|
13
|
+
get scaled(): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @type {boolean} Returns `true` when scaling is symmetric,
|
|
16
|
+
* `false` otherwise.
|
|
17
|
+
*/
|
|
18
|
+
get symmetric(): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @returns {boolean} Returns `true` if scaling was limited,
|
|
21
|
+
* `false` otherwise.
|
|
22
|
+
*/
|
|
23
|
+
limitCanvas(width: number, height: number, maxPixels: number, maxDim: number, capAreaFactor?: number): boolean;
|
|
24
|
+
static get pixelRatio(): number;
|
|
25
|
+
static capPixels(maxPixels: number, capAreaFactor: number): number;
|
|
26
|
+
}
|
|
27
|
+
export declare const getBaseTranslation: (parentDimensions: [number, number], rotation: number, outlineWidth?: number) => [number, number];
|
|
28
|
+
export declare function setAnnotationPosition(page: PDFPageProxy, annotationElement: any, annotation: Annotation): void;
|