@vue-pdf-viewer/viewer 1.4.0-beta.5 → 1.4.0-beta.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.
@@ -1,10 +1,8 @@
1
- import { ViewerPdfPage } from '../utils/types';
2
1
  declare const _default: {
3
2
  new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
3
  rootContainer: HTMLDivElement;
5
4
  textSelection: boolean;
6
5
  isCancel: boolean;
7
- pages: ViewerPdfPage[];
8
6
  }>>> & {
9
7
  onProgress?: ((percent: number) => any) | undefined;
10
8
  onLoading?: (() => any) | undefined;
@@ -34,7 +32,6 @@ declare const _default: {
34
32
  rootContainer: HTMLDivElement;
35
33
  textSelection: boolean;
36
34
  isCancel: boolean;
37
- pages: ViewerPdfPage[];
38
35
  }>>> & {
39
36
  onProgress?: ((percent: number) => any) | undefined;
40
37
  onLoading?: (() => any) | undefined;
@@ -55,7 +52,6 @@ declare const _default: {
55
52
  rootContainer: HTMLDivElement;
56
53
  textSelection: boolean;
57
54
  isCancel: boolean;
58
- pages: ViewerPdfPage[];
59
55
  }>>> & {
60
56
  onProgress?: ((percent: number) => any) | undefined;
61
57
  onLoading?: (() => any) | undefined;
@@ -73,7 +69,6 @@ declare const _default: {
73
69
  rootContainer: HTMLDivElement;
74
70
  textSelection: boolean;
75
71
  isCancel: boolean;
76
- pages: ViewerPdfPage[];
77
72
  }>>> & {
78
73
  onProgress?: ((percent: number) => any) | undefined;
79
74
  onLoading?: (() => any) | undefined;
@@ -1,7 +1,5 @@
1
- import { ViewerPdfPage } from '../utils/types';
2
1
  declare const _default: {
3
2
  new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
- pages: ViewerPdfPage[];
5
3
  isCancel: boolean;
6
4
  }>>> & {
7
5
  onProgress?: ((percent: number) => any) | undefined;
@@ -14,7 +12,6 @@ declare const _default: {
14
12
  } & {
15
13
  progress: (percent: number) => void;
16
14
  }, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
17
- pages: ViewerPdfPage[];
18
15
  isCancel: boolean;
19
16
  }>>> & {
20
17
  onProgress?: ((percent: number) => any) | undefined;
@@ -28,7 +25,6 @@ declare const _default: {
28
25
  M: {};
29
26
  Defaults: {};
30
27
  }, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
31
- pages: ViewerPdfPage[];
32
28
  isCancel: boolean;
33
29
  }>>> & {
34
30
  onProgress?: ((percent: number) => any) | undefined;
@@ -39,7 +35,6 @@ declare const _default: {
39
35
  __isTeleport?: undefined;
40
36
  __isSuspense?: undefined;
41
37
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
42
- pages: ViewerPdfPage[];
43
38
  isCancel: boolean;
44
39
  }>>> & {
45
40
  onProgress?: ((percent: number) => any) | undefined;
@@ -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<Omit<ViewerPdfPage, "page">[]>;
7
7
  actualPdfPages: import("vue").ShallowRef<ViewerPdfPage[]>;
8
- defaultScale: import("vue").Ref<number>;
8
+ defaultScale: import("vue").Ref<number, 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, PdfProperties | undefined>;
24
24
  export {};
@@ -1,5 +1,5 @@
1
- import { ViewerPdfPage } from '@/components';
2
- import { Ref } from 'vue';
1
+ import { type Ref } from 'vue';
2
+ import type { ViewerPdfPage } from '@/utils/types';
3
3
  export declare const usePrint: (isCancel: Ref<boolean>, pages: Ref<ViewerPdfPage[]>, emit: {
4
4
  (event: 'loading'): void;
5
5
  (event: 'loaded'): void;
@@ -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;
@@ -4,5 +4,5 @@ export declare function useRenderTask(dto: {
4
4
  viewport: PageViewport;
5
5
  canvas: HTMLCanvasElement;
6
6
  }): {
7
- rendered: import("vue").Ref<boolean>;
7
+ rendered: import("vue").Ref<boolean, boolean>;
8
8
  };
@@ -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, number>;
7
7
  calculateCurrentPage: (range?: VirtualRange) => number;
8
8
  };
@@ -30,10 +30,28 @@ 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;
33
51
  }, {}, {}>, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | undefined>>;
34
52
  export declare const EMPTY_KEYWORD_REGEXP: NormalizedKeyword;
35
53
  export declare const CURRENT_MATCH_CSS_CLASS = "vpv-highlight__text-current";
36
- export declare const LATEST_MATCH_POSITION: InjectionKey<Ref<HighlightMatchPosition | undefined>>;
54
+ export declare const LATEST_MATCH_POSITION: InjectionKey<Ref<HighlightMatchPosition | undefined, HighlightMatchPosition | undefined>>;
37
55
  export declare const GET_PAGE: InjectionKey<(doc: PDFDocumentProxy, pageIndex: number) => Promise<PDFPageProxy>>;
38
56
  export declare const VIEWER_STATE: InjectionKey<{
39
57
  pdfDocument: PDFDocumentProxy | undefined;
@@ -44,17 +62,17 @@ export declare const VIEWER_STATE: InjectionKey<{
44
62
  scale: number;
45
63
  rotation: number;
46
64
  }>;
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>>;
65
+ export declare const VIEWER_PAGES_PER_ROW: InjectionKey<Ref<number, number>>;
66
+ export declare const TOOLBAR_OPTIONS: InjectionKey<Ref<ToolbarOptions | undefined, ToolbarOptions | undefined>>;
67
+ export declare const TOTAL_TOOL_OTHERS_MENU: InjectionKey<Ref<number, number>>;
68
+ export declare const IS_DARK: InjectionKey<Ref<boolean, boolean>>;
69
+ export declare const IS_MOBILE_VIEW: InjectionKey<Ref<boolean, boolean>>;
52
70
  export declare const CONTAINER: InjectionKey<ShallowRef<HTMLDivElement | undefined>>;
53
71
  export declare const PAGES_CONTAINER: InjectionKey<ShallowRef<HTMLDivElement | undefined>>;
54
- export declare const pdfPagesKey: InjectionKey<ViewerPdfPage[] | null>;
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>>;
72
+ export declare const ACTUAL_PDF_PAGES: InjectionKey<Ref<ViewerPdfPage[], ViewerPdfPage[]>>;
73
+ export declare const FOCUSED_PAGE_NUMBER: InjectionKey<Ref<number, number>>;
74
+ export declare const ROTATION_DEGREE: InjectionKey<Ref<number, number>>;
75
+ export declare const TOTAL_PAGE: InjectionKey<Ref<number, number>>;
58
76
  export declare const INITIAL_TEXT_LAYER: InjectionKey<boolean>;
59
77
  export declare const DOWNLOAD_FILE: InjectionKey<() => Promise<void>>;
60
78
  export declare const LICENSE: InjectionKey<ShallowRef<License | undefined>>;
@@ -63,5 +81,5 @@ export declare const SLOT_ICON_OPEN_FILE: InjectionKey<Slot<any> | undefined>;
63
81
  export declare const SLOT_ICON_DOWNLOAD: InjectionKey<Slot<any> | undefined>;
64
82
  export declare const SLOT_ICON_PRINT: InjectionKey<Slot<any> | undefined>;
65
83
  export declare const SLOT_ICON_FULLSCREEN: InjectionKey<Slot<any> | undefined>;
66
- export declare const LANG: InjectionKey<Ref<Localization> | undefined>;
84
+ export declare const LANG: InjectionKey<Ref<Localization, Localization> | undefined>;
67
85
  export declare const FUNC_GO_TO_PAGE: InjectionKey<(page: number) => void>;
@@ -3,5 +3,5 @@ import { Locales } from './const';
3
3
  export declare const VPdfViewerPlugin: Plugin;
4
4
  export { Locales };
5
5
  export * from './components';
6
- export { type VPVInstance } from '@/utils/types';
6
+ export { type VPVInstance } from './utils/types';
7
7
  export default VPdfViewerPlugin;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue-pdf-viewer/viewer",
3
3
  "private": false,
4
- "version": "1.4.0-beta.5",
4
+ "version": "1.4.0-beta.7",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.cjs",
7
7
  "module": "./dist/index.js",