@vue-pdf-viewer/viewer 1.2.0-beta.8 → 1.2.0-rc.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/dist/index.js +2750 -2665
- package/dist/index.umd.cjs +7 -7
- package/dist/types/composables/usePdfProperties.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/useRotation.d.ts +1 -1
- package/dist/types/composables/useSearch.d.ts +21 -4
- package/dist/types/const.d.ts +26 -8
- package/package.json +1 -1
|
@@ -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, PdfProperties | undefined>;
|
|
24
24
|
export {};
|
|
@@ -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, boolean>;
|
|
3
|
+
percent: import("vue").Ref<number, number>;
|
|
4
|
+
showPrintProcess: import("vue").Ref<boolean, boolean>;
|
|
5
5
|
onCancel: () => void;
|
|
6
6
|
onLoading: () => void;
|
|
7
7
|
changePercent: (value: number) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RotateEvent } from '..';
|
|
2
2
|
export declare const useRotation: (initialRotate: number, rotateCallback?: ((event: RotateEvent) => void) | undefined) => {
|
|
3
|
-
pageRotate: import("vue").Ref<number>;
|
|
3
|
+
pageRotate: import("vue").Ref<number, number>;
|
|
4
4
|
onRotateClockwise: () => void;
|
|
5
5
|
onRotateCounterclockwise: () => void;
|
|
6
6
|
};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { Match } from '@/components';
|
|
1
2
|
import { ShallowRef } from 'vue';
|
|
2
3
|
import type { PDFDocumentProxy } from 'pdfjs-dist';
|
|
4
|
+
interface MatchValue extends Match {
|
|
5
|
+
page: number;
|
|
6
|
+
}
|
|
3
7
|
export declare const useSearch: (pdfDoc: ShallowRef<PDFDocumentProxy | undefined>) => {
|
|
4
|
-
searchValue: import("vue").Ref<string>;
|
|
8
|
+
searchValue: import("vue").Ref<string, string>;
|
|
5
9
|
matches: import("vue").Ref<{
|
|
6
10
|
page: number;
|
|
7
11
|
start: {
|
|
@@ -14,9 +18,21 @@ export declare const useSearch: (pdfDoc: ShallowRef<PDFDocumentProxy | undefined
|
|
|
14
18
|
};
|
|
15
19
|
str: string;
|
|
16
20
|
oIndex: number;
|
|
21
|
+
}[], MatchValue[] | {
|
|
22
|
+
page: number;
|
|
23
|
+
start: {
|
|
24
|
+
idx: number;
|
|
25
|
+
offset: number;
|
|
26
|
+
};
|
|
27
|
+
end: {
|
|
28
|
+
idx: number;
|
|
29
|
+
offset: number;
|
|
30
|
+
};
|
|
31
|
+
str: string;
|
|
32
|
+
oIndex: number;
|
|
17
33
|
}[]>;
|
|
18
34
|
matchCount: import("vue").ComputedRef<number>;
|
|
19
|
-
currentMatchIndex: import("vue").Ref<number | undefined>;
|
|
35
|
+
currentMatchIndex: import("vue").Ref<number | undefined, number | undefined>;
|
|
20
36
|
currentMatch: import("vue").ComputedRef<{
|
|
21
37
|
page: number;
|
|
22
38
|
start: {
|
|
@@ -30,10 +46,11 @@ export declare const useSearch: (pdfDoc: ShallowRef<PDFDocumentProxy | undefined
|
|
|
30
46
|
str: string;
|
|
31
47
|
oIndex: number;
|
|
32
48
|
} | undefined>;
|
|
33
|
-
searching: import("vue").Ref<boolean>;
|
|
34
|
-
openSearch: import("vue").Ref<boolean>;
|
|
49
|
+
searching: import("vue").Ref<boolean, boolean>;
|
|
50
|
+
openSearch: import("vue").Ref<boolean, boolean>;
|
|
35
51
|
onOpenSearch: () => void;
|
|
36
52
|
onCloseSearch: () => void;
|
|
37
53
|
handleSelectNext: () => void;
|
|
38
54
|
handleSelectPrev: () => void;
|
|
39
55
|
};
|
|
56
|
+
export {};
|
package/dist/types/const.d.ts
CHANGED
|
@@ -25,16 +25,34 @@ export declare const FILE_INPUT: InjectionKey<Ref<ComponentPublicInstance<import
|
|
|
25
25
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
26
26
|
onChange?: ((file: string) => any) | undefined;
|
|
27
27
|
onFilenameChange?: ((file: string) => any) | undefined;
|
|
28
|
+
}, {}, {}>, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | undefined, ComponentPublicInstance<import("vue").DefineComponent<{}, {
|
|
29
|
+
triggerClick: () => void;
|
|
30
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
+
change: (file: string) => void;
|
|
32
|
+
} & {
|
|
33
|
+
filenameChange: (file: string) => void;
|
|
34
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
35
|
+
onChange?: ((file: string) => any) | undefined;
|
|
36
|
+
onFilenameChange?: ((file: string) => any) | undefined;
|
|
37
|
+
}, {}, {}>, {}, {}, {}, {}, {}, import("vue").DefineComponent<{}, {
|
|
38
|
+
triggerClick: () => void;
|
|
39
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
40
|
+
change: (file: string) => void;
|
|
41
|
+
} & {
|
|
42
|
+
filenameChange: (file: string) => void;
|
|
43
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
44
|
+
onChange?: ((file: string) => any) | undefined;
|
|
45
|
+
onFilenameChange?: ((file: string) => any) | undefined;
|
|
28
46
|
}, {}, {}>, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | undefined>>;
|
|
29
|
-
export declare const TOOLBAR_OPTIONS: InjectionKey<Ref<ToolbarOptions | undefined>>;
|
|
30
|
-
export declare const TOTAL_TOOL_OTHERS_MENU: InjectionKey<Ref<number>>;
|
|
31
|
-
export declare const IS_DARK: InjectionKey<Ref<boolean>>;
|
|
32
|
-
export declare const IS_MOBILE_VIEW: InjectionKey<Ref<boolean>>;
|
|
47
|
+
export declare const TOOLBAR_OPTIONS: InjectionKey<Ref<ToolbarOptions | undefined, ToolbarOptions | undefined>>;
|
|
48
|
+
export declare const TOTAL_TOOL_OTHERS_MENU: InjectionKey<Ref<number, number>>;
|
|
49
|
+
export declare const IS_DARK: InjectionKey<Ref<boolean, boolean>>;
|
|
50
|
+
export declare const IS_MOBILE_VIEW: InjectionKey<Ref<boolean, boolean>>;
|
|
33
51
|
export declare const PAGES_CONTAINER: InjectionKey<ShallowRef<HTMLDivElement | null>>;
|
|
34
52
|
export declare const pdfPagesKey: InjectionKey<ViewerPdfPage[] | null>;
|
|
35
|
-
export declare const FOCUSED_PAGE_NUMBER: InjectionKey<Ref<number>>;
|
|
36
|
-
export declare const ROTATION_DEGREE: InjectionKey<Ref<number>>;
|
|
37
|
-
export declare const TOTAL_PAGE: InjectionKey<Ref<number>>;
|
|
53
|
+
export declare const FOCUSED_PAGE_NUMBER: InjectionKey<Ref<number, number>>;
|
|
54
|
+
export declare const ROTATION_DEGREE: InjectionKey<Ref<number, number>>;
|
|
55
|
+
export declare const TOTAL_PAGE: InjectionKey<Ref<number, number>>;
|
|
38
56
|
export declare const INITIAL_TEXT_LAYER: InjectionKey<boolean>;
|
|
39
57
|
export declare const DOWNLOAD_FILE: InjectionKey<() => Promise<void>>;
|
|
40
58
|
export declare const LICENSE: InjectionKey<ShallowRef<License | undefined>>;
|
|
@@ -43,4 +61,4 @@ export declare const SLOT_ICON_OPEN_FILE: InjectionKey<Slot<any> | undefined>;
|
|
|
43
61
|
export declare const SLOT_ICON_DOWNLOAD: InjectionKey<Slot<any> | undefined>;
|
|
44
62
|
export declare const SLOT_ICON_PRINT: InjectionKey<Slot<any> | undefined>;
|
|
45
63
|
export declare const SLOT_ICON_FULLSCREEN: InjectionKey<Slot<any> | undefined>;
|
|
46
|
-
export declare const LANG: InjectionKey<Ref<Localization> | undefined>;
|
|
64
|
+
export declare const LANG: InjectionKey<Ref<Localization, Localization> | undefined>;
|