@vue-pdf-viewer/viewer 1.5.0-beta.1 → 1.5.0-beta.2
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 +3225 -3306
- package/dist/index.umd.cjs +8 -8
- package/dist/types/composables/usePdfPagesSizes.d.ts +1 -1
- package/dist/types/composables/usePdfProperties.d.ts +1 -1
- package/dist/types/composables/usePrint.d.ts +1 -1
- package/dist/types/composables/usePrintProcess.d.ts +3 -3
- package/dist/types/composables/useRenderTask.d.ts +1 -1
- package/dist/types/composables/useVisibilities.d.ts +1 -1
- package/dist/types/const.d.ts +11 -29
- package/dist/types/utils/types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -5,5 +5,5 @@ export declare function usePdfPageSizes(props: UnwrapRef<ViewerState>, initialSc
|
|
|
5
5
|
pdfPages: import("vue").ComputedRef<ViewerPdfPage[]>;
|
|
6
6
|
estimatedPdfPages: import("vue").ShallowRef<ViewerPdfPage[]>;
|
|
7
7
|
actualPdfPages: import("vue").ShallowRef<ViewerPdfPage[]>;
|
|
8
|
-
defaultScale: import("vue").Ref<number
|
|
8
|
+
defaultScale: import("vue").Ref<number>;
|
|
9
9
|
};
|
|
@@ -20,5 +20,5 @@ type CMapSource = {
|
|
|
20
20
|
cMapPacked: boolean;
|
|
21
21
|
cMapUrl: string;
|
|
22
22
|
};
|
|
23
|
-
export declare const usePdfProperties: (pdfDoc: ShallowRef<PDFDocumentProxy | undefined>, source: Ref<PDFSrc | CMapSource>, filename: Ref<string | undefined>) => Ref<PdfProperties | undefined
|
|
23
|
+
export declare const usePdfProperties: (pdfDoc: ShallowRef<PDFDocumentProxy | undefined>, source: Ref<PDFSrc | CMapSource>, filename: Ref<string | undefined>) => Ref<PdfProperties | undefined>;
|
|
24
24
|
export {};
|
|
@@ -3,6 +3,6 @@ export declare const usePrint: (isCancel: Ref<boolean>, emit: {
|
|
|
3
3
|
(event: 'loading'): void;
|
|
4
4
|
(event: 'loaded'): void;
|
|
5
5
|
(event: 'progress', percent: number): void;
|
|
6
|
-
}, afterCanvasLoaded: Ref<Record<number, (element: HTMLCanvasElement) => void> | undefined
|
|
6
|
+
}, afterCanvasLoaded: Ref<Record<number, (element: HTMLCanvasElement) => void> | undefined>) => {
|
|
7
7
|
onClick: () => Promise<void>;
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const usePrintProcess: () => {
|
|
2
|
-
isCancel: import("vue").Ref<boolean
|
|
3
|
-
percent: import("vue").Ref<number
|
|
4
|
-
showPrintProcess: import("vue").Ref<boolean
|
|
2
|
+
isCancel: import("vue").Ref<boolean>;
|
|
3
|
+
percent: import("vue").Ref<number>;
|
|
4
|
+
showPrintProcess: import("vue").Ref<boolean>;
|
|
5
5
|
onCancel: () => void;
|
|
6
6
|
onLoading: () => void;
|
|
7
7
|
changePercent: (value: number) => void;
|
|
@@ -3,6 +3,6 @@ import { VirtualRange, VisibilityInfo } from '@/utils/types';
|
|
|
3
3
|
export declare function useVisibilities(totalPages: Ref<number>): {
|
|
4
4
|
resetVisibility: (preserveRange?: VirtualRange) => void;
|
|
5
5
|
updateVisibility: (info: VisibilityInfo) => void;
|
|
6
|
-
currentPage: Ref<number
|
|
6
|
+
currentPage: Ref<number>;
|
|
7
7
|
calculateCurrentPage: (range?: VirtualRange) => number;
|
|
8
8
|
};
|
package/dist/types/const.d.ts
CHANGED
|
@@ -30,28 +30,10 @@ export declare const FILE_INPUT: InjectionKey<Ref<ComponentPublicInstance<import
|
|
|
30
30
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
31
31
|
onChange?: ((file: string) => any) | undefined;
|
|
32
32
|
onFilenameChange?: ((file: string) => any) | undefined;
|
|
33
|
-
}, {}, {}>, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | undefined, ComponentPublicInstance<import("vue").DefineComponent<{}, {
|
|
34
|
-
triggerClick: () => void;
|
|
35
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
|
-
change: (file: string) => void;
|
|
37
|
-
} & {
|
|
38
|
-
filenameChange: (file: string) => void;
|
|
39
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
40
|
-
onChange?: ((file: string) => any) | undefined;
|
|
41
|
-
onFilenameChange?: ((file: string) => any) | undefined;
|
|
42
|
-
}, {}, {}>, {}, {}, {}, {}, {}, import("vue").DefineComponent<{}, {
|
|
43
|
-
triggerClick: () => void;
|
|
44
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
45
|
-
change: (file: string) => void;
|
|
46
|
-
} & {
|
|
47
|
-
filenameChange: (file: string) => void;
|
|
48
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
49
|
-
onChange?: ((file: string) => any) | undefined;
|
|
50
|
-
onFilenameChange?: ((file: string) => any) | undefined;
|
|
51
33
|
}, {}, {}>, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | undefined>>;
|
|
52
34
|
export declare const EMPTY_KEYWORD_REGEXP: NormalizedKeyword;
|
|
53
35
|
export declare const CURRENT_MATCH_CSS_CLASS = "vpv-highlight__text-current";
|
|
54
|
-
export declare const LATEST_MATCH_POSITION: InjectionKey<Ref<HighlightMatchPosition | undefined
|
|
36
|
+
export declare const LATEST_MATCH_POSITION: InjectionKey<Ref<HighlightMatchPosition | undefined>>;
|
|
55
37
|
export declare const GET_PAGE: InjectionKey<(doc: PDFDocumentProxy, pageIndex: number) => Promise<PDFPageProxy>>;
|
|
56
38
|
export declare const VIEWER_STATE: InjectionKey<{
|
|
57
39
|
pdfDocument: PDFDocumentProxy | undefined;
|
|
@@ -62,17 +44,17 @@ export declare const VIEWER_STATE: InjectionKey<{
|
|
|
62
44
|
scale: number;
|
|
63
45
|
rotation: number;
|
|
64
46
|
}>;
|
|
65
|
-
export declare const VIEWER_PAGES_PER_ROW: InjectionKey<Ref<number
|
|
66
|
-
export declare const TOOLBAR_OPTIONS: InjectionKey<Ref<ToolbarOptions | undefined
|
|
67
|
-
export declare const TOTAL_TOOL_OTHERS_MENU: InjectionKey<Ref<number
|
|
68
|
-
export declare const IS_DARK: InjectionKey<Ref<boolean
|
|
69
|
-
export declare const IS_MOBILE_VIEW: InjectionKey<Ref<boolean
|
|
47
|
+
export declare const VIEWER_PAGES_PER_ROW: InjectionKey<Ref<number>>;
|
|
48
|
+
export declare const TOOLBAR_OPTIONS: InjectionKey<Ref<ToolbarOptions | undefined>>;
|
|
49
|
+
export declare const TOTAL_TOOL_OTHERS_MENU: InjectionKey<Ref<number>>;
|
|
50
|
+
export declare const IS_DARK: InjectionKey<Ref<boolean>>;
|
|
51
|
+
export declare const IS_MOBILE_VIEW: InjectionKey<Ref<boolean>>;
|
|
70
52
|
export declare const CONTAINER: InjectionKey<ShallowRef<HTMLDivElement | undefined>>;
|
|
71
53
|
export declare const PAGES_CONTAINER: InjectionKey<ShallowRef<HTMLDivElement | undefined>>;
|
|
72
|
-
export declare const ACTUAL_PDF_PAGES: InjectionKey<Ref<ViewerPdfPage[]
|
|
73
|
-
export declare const FOCUSED_PAGE_NUMBER: InjectionKey<Ref<number
|
|
74
|
-
export declare const ROTATION_DEGREE: InjectionKey<Ref<number
|
|
75
|
-
export declare const TOTAL_PAGE: InjectionKey<Ref<number
|
|
54
|
+
export declare const ACTUAL_PDF_PAGES: InjectionKey<Ref<ViewerPdfPage[]>>;
|
|
55
|
+
export declare const FOCUSED_PAGE_NUMBER: InjectionKey<Ref<number>>;
|
|
56
|
+
export declare const ROTATION_DEGREE: InjectionKey<Ref<number>>;
|
|
57
|
+
export declare const TOTAL_PAGE: InjectionKey<Ref<number>>;
|
|
76
58
|
export declare const INITIAL_TEXT_LAYER: InjectionKey<boolean>;
|
|
77
59
|
export declare const DOWNLOAD_FILE: InjectionKey<() => Promise<void>>;
|
|
78
60
|
export declare const LICENSE: InjectionKey<ShallowRef<License | undefined>>;
|
|
@@ -81,5 +63,5 @@ export declare const SLOT_ICON_OPEN_FILE: InjectionKey<Slot<any> | undefined>;
|
|
|
81
63
|
export declare const SLOT_ICON_DOWNLOAD: InjectionKey<Slot<any> | undefined>;
|
|
82
64
|
export declare const SLOT_ICON_PRINT: InjectionKey<Slot<any> | undefined>;
|
|
83
65
|
export declare const SLOT_ICON_FULLSCREEN: InjectionKey<Slot<any> | undefined>;
|
|
84
|
-
export declare const LANG: InjectionKey<Ref<Localization
|
|
66
|
+
export declare const LANG: InjectionKey<Ref<Localization> | undefined>;
|
|
85
67
|
export declare const FUNC_GO_TO_PAGE: InjectionKey<(page: number) => void>;
|
|
@@ -467,6 +467,10 @@ export interface HighlightMatchPosition {
|
|
|
467
467
|
export interface AfterLoadedViewport {
|
|
468
468
|
width: number;
|
|
469
469
|
height: number;
|
|
470
|
+
canvasWidth: number;
|
|
471
|
+
canvasHeight: number;
|
|
472
|
+
widthRatio: number;
|
|
473
|
+
heightRatio: number;
|
|
470
474
|
}
|
|
471
475
|
export type AfterLoadedCallback = (element: HTMLCanvasElement, viewport: AfterLoadedViewport) => void;
|
|
472
476
|
export declare const VPVBaseProps: {
|