@vue-pdf-viewer/viewer 1.5.0-beta.2 → 1.5.0-beta.20

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.
Files changed (86) hide show
  1. package/dist/assets/arrow-up.bfb87c81.svg +3 -0
  2. package/dist/assets/check.001dcbd1.svg +7 -0
  3. package/dist/assets/chevron-down.affe596c.svg +7 -0
  4. package/dist/assets/clear.c423e636.svg +10 -0
  5. package/dist/assets/close.790ea275.svg +3 -0
  6. package/dist/assets/download.5502266f.svg +7 -0
  7. package/dist/assets/drag-icon-dark.23f11bfa.svg +93 -0
  8. package/dist/assets/drag-icon.5f93aec6.svg +130 -0
  9. package/dist/assets/ellipsis-vertical.0b64b40c.svg +7 -0
  10. package/dist/assets/file.6b4c29ed.svg +7 -0
  11. package/dist/assets/first-page.00620c16.svg +3 -0
  12. package/dist/assets/fullscreen.0b32986a.svg +5 -0
  13. package/dist/assets/hand.d2bf7c6f.svg +7 -0
  14. package/dist/assets/info.0efaa487.svg +3 -0
  15. package/dist/assets/last-page.953677ef.svg +3 -0
  16. package/dist/assets/loader.bdf4866e.png +0 -0
  17. package/dist/assets/magnifier.fcd65955.svg +7 -0
  18. package/dist/assets/moon.ac440dac.svg +7 -0
  19. package/dist/assets/page-view-dual.cf5781a5.svg +7 -0
  20. package/dist/assets/page-view-single.77744c56.svg +7 -0
  21. package/dist/assets/pointer.c583fdee.svg +7 -0
  22. package/dist/assets/printer.9827c97c.svg +7 -0
  23. package/dist/assets/rotate-counter-clockwise.3255dbde.svg +7 -0
  24. package/dist/assets/scrolling-horizontal.72cf7abd.svg +7 -0
  25. package/dist/assets/scrolling-page.4f38d9a0.svg +7 -0
  26. package/dist/assets/scrolling-vertical.b5afa9a8.svg +7 -0
  27. package/dist/assets/scrolling-wrapped.3de3be7b.svg +7 -0
  28. package/dist/assets/sun.b38bccba.svg +7 -0
  29. package/dist/assets/thumbnail.74bd1ac8.svg +10 -0
  30. package/dist/assets/watermark.51b1f7e3.webp +0 -0
  31. package/dist/assets/zoom-in.ba8615b9.svg +7 -0
  32. package/dist/assets/zoom-out.b03b35fb.svg +7 -0
  33. package/dist/index.js +6524 -6159
  34. package/dist/index.umd.cjs +11 -11
  35. package/dist/types/components/LayerCanvas.vue.d.ts +2 -2
  36. package/dist/types/components/LayerTextSearchHighlight.vue.d.ts +2 -0
  37. package/dist/types/components/ToolMenuOthers.vue.d.ts +9 -32
  38. package/dist/types/components/ToolPrint.vue.d.ts +9 -44
  39. package/dist/types/components/VPdfPage.vue.d.ts +3 -2
  40. package/dist/types/components/VPdfViewer.vue.d.ts +61 -18
  41. package/dist/types/components/ui/popover/PopoverContent.vue.d.ts +3 -3
  42. package/dist/types/composables/useLicense.d.ts +17 -3
  43. package/dist/types/composables/usePdfPagesSizes.d.ts +1 -1
  44. package/dist/types/composables/usePdfProperties.d.ts +1 -1
  45. package/dist/types/composables/usePrintControl.d.ts +21 -0
  46. package/dist/types/composables/usePrintProcess.d.ts +3 -3
  47. package/dist/types/composables/useRenderTask.d.ts +1 -1
  48. package/dist/types/composables/useVisibilities.d.ts +1 -1
  49. package/dist/types/const.d.ts +64 -16
  50. package/dist/types/index.d.ts +1 -1
  51. package/dist/types/utils/enumerators.d.ts +5 -0
  52. package/dist/types/utils/promiseWithResolvers.d.ts +7 -0
  53. package/dist/types/utils/types.d.ts +30 -7
  54. package/dist/types/utils/uiViewer.d.ts +3 -1
  55. package/package.json +5 -10
  56. package/dist/arrow-up-CZcWar0V.js +0 -20
  57. package/dist/check-BDQ_1xOK.js +0 -21
  58. package/dist/chevron-down-BGvKkqoz.js +0 -21
  59. package/dist/clear-BdBsR989.js +0 -31
  60. package/dist/close-CbywujCY.js +0 -20
  61. package/dist/download-DwxdC2cz.js +0 -21
  62. package/dist/drag-icon-CJSwJaYj.js +0 -18
  63. package/dist/drag-icon-dark-DslxK0op.js +0 -17
  64. package/dist/ellipsis-vertical-DU4RrfN8.js +0 -21
  65. package/dist/file-CKOtlAnB.js +0 -21
  66. package/dist/first-page-D2sUix1F.js +0 -20
  67. package/dist/fullscreen-CDD3D91y.js +0 -21
  68. package/dist/hand-BdufQ7PJ.js +0 -21
  69. package/dist/info-CnzWbChw.js +0 -20
  70. package/dist/last-page-BlLcdVDC.js +0 -20
  71. package/dist/magnifier-D5effak1.js +0 -21
  72. package/dist/moon-jjKfhCeP.js +0 -21
  73. package/dist/page-view-dual-DzyLa1r0.js +0 -21
  74. package/dist/page-view-single-CAQXbP-i.js +0 -21
  75. package/dist/pointer-CosfQ2Bj.js +0 -21
  76. package/dist/printer-CZndb-XY.js +0 -21
  77. package/dist/rotate-counter-clockwise-BnC8SAwc.js +0 -21
  78. package/dist/scrolling-horizontal-D1qDwmpQ.js +0 -23
  79. package/dist/scrolling-page-lV73lZIc.js +0 -23
  80. package/dist/scrolling-vertical-DzrChdnV.js +0 -23
  81. package/dist/scrolling-wrapped-CvhUpxbI.js +0 -23
  82. package/dist/sun-f_yo-49i.js +0 -21
  83. package/dist/thumbnail-BrLTlvMi.js +0 -21
  84. package/dist/types/composables/usePrint.d.ts +0 -8
  85. package/dist/zoom-in-MHWLskY5.js +0 -21
  86. package/dist/zoom-out-BOe91xpp.js +0 -21
@@ -1,12 +1,12 @@
1
1
  import type { PDFPageProxy } from 'pdfjs-dist';
2
- import { AfterLoadedCallback } from '@/utils/types';
2
+ import { CanvasLoadedCallback } from '@/utils/types';
3
3
  interface OwnProps {
4
4
  page: PDFPageProxy;
5
5
  width: number;
6
6
  height: number;
7
7
  pageIndex: number;
8
8
  intersecting: boolean;
9
- afterCanvasLoaded?: AfterLoadedCallback;
9
+ afterCanvasLoaded?: CanvasLoadedCallback;
10
10
  }
11
11
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<OwnProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
12
  rendered: () => void;
@@ -1,5 +1,7 @@
1
+ import type { PageViewport } from 'pdfjs-dist';
1
2
  interface OwnProps {
2
3
  pageIndex: number;
4
+ viewport: PageViewport;
3
5
  searchKeyword?: string;
4
6
  }
5
7
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<OwnProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<OwnProps>>>, {}, {}>;
@@ -1,13 +1,11 @@
1
+ import { CanvasLoadedCallback } from '../utils/types';
1
2
  declare const _default: {
2
3
  new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
3
4
  rootContainer: HTMLDivElement;
4
5
  textSelection: boolean;
5
- isCancel: boolean;
6
- afterCanvasLoaded?: Record<number, any> | undefined;
6
+ print: (showProgress?: boolean) => Promise<void>;
7
+ afterCanvasLoaded?: Record<number, CanvasLoadedCallback> | undefined;
7
8
  }>>> & {
8
- onProgress?: ((percent: number) => any) | undefined;
9
- onLoading?: (() => any) | undefined;
10
- onLoaded?: (() => any) | undefined;
11
9
  onRotateClockwise?: (() => any) | undefined;
12
10
  onRotateCounterclockwise?: (() => any) | undefined;
13
11
  onTextSelection?: ((isTextSelection: boolean) => any) | undefined;
@@ -23,21 +21,12 @@ declare const _default: {
23
21
  gotoFirstPage: () => void;
24
22
  } & {
25
23
  gotoLastPage: () => void;
26
- } & {
27
- loading: () => void;
28
- } & {
29
- loaded: () => void;
30
- } & {
31
- progress: (percent: number) => void;
32
24
  }, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
33
25
  rootContainer: HTMLDivElement;
34
26
  textSelection: boolean;
35
- isCancel: boolean;
36
- afterCanvasLoaded?: Record<number, any> | undefined;
27
+ print: (showProgress?: boolean) => Promise<void>;
28
+ afterCanvasLoaded?: Record<number, CanvasLoadedCallback> | undefined;
37
29
  }>>> & {
38
- onProgress?: ((percent: number) => any) | undefined;
39
- onLoading?: (() => any) | undefined;
40
- onLoaded?: (() => any) | undefined;
41
30
  onRotateClockwise?: (() => any) | undefined;
42
31
  onRotateCounterclockwise?: (() => any) | undefined;
43
32
  onTextSelection?: ((isTextSelection: boolean) => any) | undefined;
@@ -53,12 +42,9 @@ declare const _default: {
53
42
  }, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
54
43
  rootContainer: HTMLDivElement;
55
44
  textSelection: boolean;
56
- isCancel: boolean;
57
- afterCanvasLoaded?: Record<number, any> | undefined;
45
+ print: (showProgress?: boolean) => Promise<void>;
46
+ afterCanvasLoaded?: Record<number, CanvasLoadedCallback> | undefined;
58
47
  }>>> & {
59
- onProgress?: ((percent: number) => any) | undefined;
60
- onLoading?: (() => any) | undefined;
61
- onLoaded?: (() => any) | undefined;
62
48
  onRotateClockwise?: (() => any) | undefined;
63
49
  onRotateCounterclockwise?: (() => any) | undefined;
64
50
  onTextSelection?: ((isTextSelection: boolean) => any) | undefined;
@@ -71,12 +57,9 @@ declare const _default: {
71
57
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
72
58
  rootContainer: HTMLDivElement;
73
59
  textSelection: boolean;
74
- isCancel: boolean;
75
- afterCanvasLoaded?: Record<number, any> | undefined;
60
+ print: (showProgress?: boolean) => Promise<void>;
61
+ afterCanvasLoaded?: Record<number, CanvasLoadedCallback> | undefined;
76
62
  }>>> & {
77
- onProgress?: ((percent: number) => any) | undefined;
78
- onLoading?: (() => any) | undefined;
79
- onLoaded?: (() => any) | undefined;
80
63
  onRotateClockwise?: (() => any) | undefined;
81
64
  onRotateCounterclockwise?: (() => any) | undefined;
82
65
  onTextSelection?: ((isTextSelection: boolean) => any) | undefined;
@@ -92,12 +75,6 @@ declare const _default: {
92
75
  gotoFirstPage: () => void;
93
76
  } & {
94
77
  gotoLastPage: () => void;
95
- } & {
96
- loading: () => void;
97
- } & {
98
- loaded: () => void;
99
- } & {
100
- progress: (percent: number) => void;
101
78
  }, string, {}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
102
79
  $slots: Record<string, {}> & Record<string, {}> & {
103
80
  icon: (_: {}) => any;
@@ -1,59 +1,24 @@
1
+ import type { CanvasLoadedCallback } from '../utils/types';
2
+ interface OwnProps {
3
+ print: (showProgress?: boolean) => Promise<void>;
4
+ afterCanvasLoaded?: Record<number, CanvasLoadedCallback>;
5
+ }
1
6
  declare const _default: {
2
- new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
3
- isCancel: boolean;
4
- afterCanvasLoaded?: Record<number, any> | undefined;
5
- }>>> & {
6
- onProgress?: ((percent: number) => any) | undefined;
7
- onLoading?: (() => any) | undefined;
8
- onLoaded?: (() => any) | undefined;
9
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
- loading: () => void;
11
- } & {
12
- loaded: () => void;
13
- } & {
14
- progress: (percent: number) => void;
15
- }, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
16
- isCancel: boolean;
17
- afterCanvasLoaded?: Record<number, any> | undefined;
18
- }>>> & {
19
- onProgress?: ((percent: number) => any) | undefined;
20
- onLoading?: (() => any) | undefined;
21
- onLoaded?: (() => any) | undefined;
22
- }, {}, true, {}, {}, {
7
+ new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<OwnProps>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<OwnProps>>>, {}, true, {}, {}, {
23
8
  P: {};
24
9
  B: {};
25
10
  D: {};
26
11
  C: {};
27
12
  M: {};
28
13
  Defaults: {};
29
- }, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
30
- isCancel: boolean;
31
- afterCanvasLoaded?: Record<number, any> | undefined;
32
- }>>> & {
33
- onProgress?: ((percent: number) => any) | undefined;
34
- onLoading?: (() => any) | undefined;
35
- onLoaded?: (() => any) | undefined;
36
- }, {}, {}, {}, {}, {}>;
14
+ }, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<OwnProps>>>, {}, {}, {}, {}, {}>;
37
15
  __isFragment?: undefined;
38
16
  __isTeleport?: undefined;
39
17
  __isSuspense?: undefined;
40
- } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
41
- isCancel: boolean;
42
- afterCanvasLoaded?: Record<number, any> | undefined;
43
- }>>> & {
44
- onProgress?: ((percent: number) => any) | undefined;
45
- onLoading?: (() => any) | undefined;
46
- onLoaded?: (() => any) | undefined;
47
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
48
- loading: () => void;
49
- } & {
50
- loaded: () => void;
51
- } & {
52
- progress: (percent: number) => void;
53
- }, string, {}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
18
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<OwnProps>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
54
19
  $slots: {
55
20
  default: (_: {
56
- onClick: () => Promise<void>;
21
+ onClick: ((showProgress?: boolean | undefined) => Promise<void>) & Promise<void>;
57
22
  }) => any;
58
23
  icon: (_: {}) => any;
59
24
  };
@@ -1,4 +1,4 @@
1
- import type { AfterLoadedCallback, AnnotationEventPayload, HighlightEventPayload, HighlightOptions, Match, TextLayerLoadedEventPayload, VisibilityInfo } from '../utils/types';
1
+ import type { CanvasLoadedCallback, AnnotationEventPayload, HighlightEventPayload, HighlightOptions, Match, TextLayerLoadedEventPayload, VisibilityInfo } from '../utils/types';
2
2
  import type { PageViewport, PDFPageProxy } from 'pdfjs-dist/types/web/interfaces';
3
3
  import type { PDFDocumentProxy } from 'pdfjs-dist';
4
4
  interface BaseProps {
@@ -6,7 +6,8 @@ interface BaseProps {
6
6
  page: PDFPageProxy;
7
7
  viewport: PageViewport;
8
8
  document: PDFDocumentProxy;
9
- afterCanvasLoaded?: AfterLoadedCallback;
9
+ afterCanvasLoaded?: CanvasLoadedCallback;
10
+ annoImageResourcesPath?: string;
10
11
  }
11
12
  type TextProps = {
12
13
  textLayer: true;
@@ -58,24 +58,37 @@ declare const _default: {
58
58
  readonly default: undefined;
59
59
  };
60
60
  readonly afterCanvasLoaded: {
61
- readonly type: import("vue").PropType<Record<number, import("@/utils/types").AfterLoadedCallback>>;
61
+ readonly type: import("vue").PropType<Record<number, import("@/utils/types").CanvasLoadedCallback>>;
62
62
  readonly default: undefined;
63
63
  };
64
64
  }>> & {
65
65
  onAnnotation?: ((payload: AnnotationEventPayload) => any) | undefined;
66
66
  onAnnotationLoaded?: ((payload: any[]) => any) | undefined;
67
67
  onTextLoaded?: ((payload: TextLayerLoadedEventPayload) => any) | undefined;
68
- onLoaded?: (() => any) | undefined;
68
+ onLoading?: (() => any) | undefined;
69
69
  onRotate?: ((payload: RotateEvent) => any) | undefined;
70
+ onLoaded?: (() => any) | undefined;
70
71
  onLoadProgress?: ((payload: number) => any) | undefined;
72
+ onAfterGoToPage?: ((payload: number) => any) | undefined;
71
73
  onXfaLoaded?: (() => any) | undefined;
72
74
  }, {
73
- searchControl: import("@/utils/types").SearchControl;
74
- goToPage: (page: number) => void;
75
+ printControl: import("vue").ComputedRef<{
76
+ print: (options?: {
77
+ visibleDefaultProgress: boolean;
78
+ } | undefined) => void;
79
+ cancel: () => void;
80
+ onProgress?: ((progress: import("@/utils/types").PreparePrintProgress) => void) | undefined;
81
+ onError?: ((error: Error) => void) | undefined;
82
+ onComplete?: (() => void) | undefined;
83
+ } | undefined>;
84
+ searchControl: import("vue").ComputedRef<import("@/utils/types").SearchControl | undefined>;
85
+ pageControl: import("vue").ComputedRef<import("@/utils/types").PageControl | undefined>;
75
86
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
76
87
  annotation: (payload: AnnotationEventPayload) => void;
77
88
  } & {
78
89
  loaded: () => void;
90
+ } & {
91
+ loading: () => void;
79
92
  } & {
80
93
  loadProgress: (payload: number) => void;
81
94
  } & {
@@ -86,6 +99,8 @@ declare const _default: {
86
99
  xfaLoaded: () => void;
87
100
  } & {
88
101
  rotate: (payload: RotateEvent) => void;
102
+ } & {
103
+ afterGoToPage: (payload: number) => void;
89
104
  }, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
90
105
  readonly src: {
91
106
  readonly type: import("vue").PropType<string | import("@/utils/types").VPVSrc>;
@@ -142,16 +157,18 @@ declare const _default: {
142
157
  readonly default: undefined;
143
158
  };
144
159
  readonly afterCanvasLoaded: {
145
- readonly type: import("vue").PropType<Record<number, import("@/utils/types").AfterLoadedCallback>>;
160
+ readonly type: import("vue").PropType<Record<number, import("@/utils/types").CanvasLoadedCallback>>;
146
161
  readonly default: undefined;
147
162
  };
148
163
  }>> & {
149
164
  onAnnotation?: ((payload: AnnotationEventPayload) => any) | undefined;
150
165
  onAnnotationLoaded?: ((payload: any[]) => any) | undefined;
151
166
  onTextLoaded?: ((payload: TextLayerLoadedEventPayload) => any) | undefined;
152
- onLoaded?: (() => any) | undefined;
167
+ onLoading?: (() => any) | undefined;
153
168
  onRotate?: ((payload: RotateEvent) => any) | undefined;
169
+ onLoaded?: (() => any) | undefined;
154
170
  onLoadProgress?: ((payload: number) => any) | undefined;
171
+ onAfterGoToPage?: ((payload: number) => any) | undefined;
155
172
  onXfaLoaded?: (() => any) | undefined;
156
173
  }, {
157
174
  readonly initialViewMode: ViewMode;
@@ -166,7 +183,7 @@ declare const _default: {
166
183
  readonly characterMap: import("@/utils/types").CharacterMap;
167
184
  readonly toolbarOptions: false | Partial<ToolbarOptions>;
168
185
  readonly localization: Record<string, Localization>;
169
- readonly afterCanvasLoaded: Record<number, import("@/utils/types").AfterLoadedCallback>;
186
+ readonly afterCanvasLoaded: Record<number, import("@/utils/types").CanvasLoadedCallback>;
170
187
  }, true, {}, {}, {
171
188
  P: {};
172
189
  B: {};
@@ -230,20 +247,31 @@ declare const _default: {
230
247
  readonly default: undefined;
231
248
  };
232
249
  readonly afterCanvasLoaded: {
233
- readonly type: import("vue").PropType<Record<number, import("@/utils/types").AfterLoadedCallback>>;
250
+ readonly type: import("vue").PropType<Record<number, import("@/utils/types").CanvasLoadedCallback>>;
234
251
  readonly default: undefined;
235
252
  };
236
253
  }>> & {
237
254
  onAnnotation?: ((payload: AnnotationEventPayload) => any) | undefined;
238
255
  onAnnotationLoaded?: ((payload: any[]) => any) | undefined;
239
256
  onTextLoaded?: ((payload: TextLayerLoadedEventPayload) => any) | undefined;
240
- onLoaded?: (() => any) | undefined;
257
+ onLoading?: (() => any) | undefined;
241
258
  onRotate?: ((payload: RotateEvent) => any) | undefined;
259
+ onLoaded?: (() => any) | undefined;
242
260
  onLoadProgress?: ((payload: number) => any) | undefined;
261
+ onAfterGoToPage?: ((payload: number) => any) | undefined;
243
262
  onXfaLoaded?: (() => any) | undefined;
244
263
  }, {
245
- searchControl: import("@/utils/types").SearchControl;
246
- goToPage: (page: number) => void;
264
+ printControl: import("vue").ComputedRef<{
265
+ print: (options?: {
266
+ visibleDefaultProgress: boolean;
267
+ } | undefined) => void;
268
+ cancel: () => void;
269
+ onProgress?: ((progress: import("@/utils/types").PreparePrintProgress) => void) | undefined;
270
+ onError?: ((error: Error) => void) | undefined;
271
+ onComplete?: (() => void) | undefined;
272
+ } | undefined>;
273
+ searchControl: import("vue").ComputedRef<import("@/utils/types").SearchControl | undefined>;
274
+ pageControl: import("vue").ComputedRef<import("@/utils/types").PageControl | undefined>;
247
275
  }, {}, {}, {}, {
248
276
  readonly initialViewMode: ViewMode;
249
277
  readonly initialScrollMode: ScrollMode;
@@ -257,7 +285,7 @@ declare const _default: {
257
285
  readonly characterMap: import("@/utils/types").CharacterMap;
258
286
  readonly toolbarOptions: false | Partial<ToolbarOptions>;
259
287
  readonly localization: Record<string, Localization>;
260
- readonly afterCanvasLoaded: Record<number, import("@/utils/types").AfterLoadedCallback>;
288
+ readonly afterCanvasLoaded: Record<number, import("@/utils/types").CanvasLoadedCallback>;
261
289
  }>;
262
290
  __isFragment?: undefined;
263
291
  __isTeleport?: undefined;
@@ -318,24 +346,37 @@ declare const _default: {
318
346
  readonly default: undefined;
319
347
  };
320
348
  readonly afterCanvasLoaded: {
321
- readonly type: import("vue").PropType<Record<number, import("@/utils/types").AfterLoadedCallback>>;
349
+ readonly type: import("vue").PropType<Record<number, import("@/utils/types").CanvasLoadedCallback>>;
322
350
  readonly default: undefined;
323
351
  };
324
352
  }>> & {
325
353
  onAnnotation?: ((payload: AnnotationEventPayload) => any) | undefined;
326
354
  onAnnotationLoaded?: ((payload: any[]) => any) | undefined;
327
355
  onTextLoaded?: ((payload: TextLayerLoadedEventPayload) => any) | undefined;
328
- onLoaded?: (() => any) | undefined;
356
+ onLoading?: (() => any) | undefined;
329
357
  onRotate?: ((payload: RotateEvent) => any) | undefined;
358
+ onLoaded?: (() => any) | undefined;
330
359
  onLoadProgress?: ((payload: number) => any) | undefined;
360
+ onAfterGoToPage?: ((payload: number) => any) | undefined;
331
361
  onXfaLoaded?: (() => any) | undefined;
332
362
  }, {
333
- searchControl: import("@/utils/types").SearchControl;
334
- goToPage: (page: number) => void;
363
+ printControl: import("vue").ComputedRef<{
364
+ print: (options?: {
365
+ visibleDefaultProgress: boolean;
366
+ } | undefined) => void;
367
+ cancel: () => void;
368
+ onProgress?: ((progress: import("@/utils/types").PreparePrintProgress) => void) | undefined;
369
+ onError?: ((error: Error) => void) | undefined;
370
+ onComplete?: (() => void) | undefined;
371
+ } | undefined>;
372
+ searchControl: import("vue").ComputedRef<import("@/utils/types").SearchControl | undefined>;
373
+ pageControl: import("vue").ComputedRef<import("@/utils/types").PageControl | undefined>;
335
374
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
336
375
  annotation: (payload: AnnotationEventPayload) => void;
337
376
  } & {
338
377
  loaded: () => void;
378
+ } & {
379
+ loading: () => void;
339
380
  } & {
340
381
  loadProgress: (payload: number) => void;
341
382
  } & {
@@ -346,6 +387,8 @@ declare const _default: {
346
387
  xfaLoaded: () => void;
347
388
  } & {
348
389
  rotate: (payload: RotateEvent) => void;
390
+ } & {
391
+ afterGoToPage: (payload: number) => void;
349
392
  }, string, {
350
393
  readonly initialViewMode: ViewMode;
351
394
  readonly initialScrollMode: ScrollMode;
@@ -359,7 +402,7 @@ declare const _default: {
359
402
  readonly characterMap: import("@/utils/types").CharacterMap;
360
403
  readonly toolbarOptions: false | Partial<ToolbarOptions>;
361
404
  readonly localization: Record<string, Localization>;
362
- readonly afterCanvasLoaded: Record<number, import("@/utils/types").AfterLoadedCallback>;
405
+ readonly afterCanvasLoaded: Record<number, import("@/utils/types").CanvasLoadedCallback>;
363
406
  }, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
364
407
  $slots: {
365
408
  dropFileZone: (_: {
@@ -408,7 +451,7 @@ declare const _default: {
408
451
  }) => any;
409
452
  iconDownload: (_: {}) => any;
410
453
  printTool: (_: {
411
- onClick: () => Promise<void>;
454
+ onClick: ((showProgress?: boolean | undefined) => Promise<void>) & Promise<void>;
412
455
  }) => any;
413
456
  iconPrint: (_: {}) => any;
414
457
  fullScreenTool: (_: {
@@ -15,7 +15,7 @@ declare const _default: {
15
15
  sideOffset: number;
16
16
  }>>>, {
17
17
  sideOffset: number;
18
- align: "start" | "center" | "end";
18
+ align: "start" | "end" | "center";
19
19
  }, true, {}, {}, {
20
20
  P: {};
21
21
  B: {};
@@ -31,7 +31,7 @@ declare const _default: {
31
31
  sideOffset: number;
32
32
  }>>>, {}, {}, {}, {}, {
33
33
  sideOffset: number;
34
- align: "start" | "center" | "end";
34
+ align: "start" | "end" | "center";
35
35
  }>;
36
36
  __isFragment?: undefined;
37
37
  __isTeleport?: undefined;
@@ -44,7 +44,7 @@ declare const _default: {
44
44
  sideOffset: number;
45
45
  }>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
46
46
  sideOffset: number;
47
- align: "start" | "center" | "end";
47
+ align: "start" | "end" | "center";
48
48
  }, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
49
49
  $slots: {
50
50
  default: (_: {}) => any;
@@ -1,10 +1,24 @@
1
1
  import { MaybeRef, Ref } from 'vue';
2
- import { License } from '..';
2
+ import { LicenseType } from '..';
3
3
  type UseLicenseProps = {
4
4
  licenseKey: MaybeRef<string | undefined>;
5
5
  };
6
6
  export declare const useLicense: (props?: UseLicenseProps) => {
7
- license: import("vue").ShallowRef<License | undefined>;
7
+ license: {
8
+ isValidating: boolean;
9
+ isValidated: boolean;
10
+ isValidKey: boolean;
11
+ licenseKey: string | null;
12
+ type: LicenseType;
13
+ };
14
+ };
15
+ export declare function useInjectedLicense(pagesContainer: Ref<HTMLDivElement | undefined>): {
16
+ license: {
17
+ isValidating: boolean;
18
+ isValidated: boolean;
19
+ isValidKey: boolean;
20
+ licenseKey: string | null;
21
+ type: LicenseType;
22
+ };
8
23
  };
9
- export declare function useInjectedLicense(pagesContainer: Ref<HTMLDivElement | undefined>): import("vue").ShallowRef<License | undefined>;
10
24
  export {};
@@ -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, 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 {};
@@ -0,0 +1,21 @@
1
+ import { type Ref, ShallowRef } from 'vue';
2
+ import type { CanvasLoadedCallback, PreparePrintProgress, ViewerPdfPage } from '@/utils/types';
3
+ import { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
4
+ export declare const usePrintControl: (pdfDocument: ShallowRef<PDFDocumentProxy | undefined>, pages: ShallowRef<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
+ };
@@ -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
  };
@@ -1,9 +1,25 @@
1
1
  import { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
2
2
  import type { PDFPageProxy } from 'pdfjs-dist/types/web/interfaces';
3
- import type { InjectionKey, Slot, Ref, ComponentPublicInstance, ShallowRef } from 'vue';
4
- import type { HighlightMatchPosition, License, Localization, NormalizedKeyword, Offset, ToolbarOptions, ViewerPdfPage } from './utils/types';
3
+ import type { InjectionKey, Slot, Ref, ComponentPublicInstance, ShallowRef, ComputedRef } from 'vue';
4
+ import type { HighlightMatchPosition, Localization, NormalizedKeyword, Offset, ToolbarOptions, ViewerPdfPage } from './utils/types';
5
+ import { LicenseType, ScrollMode, ViewMode, ZoomLevel } from './components';
5
6
  export declare const DEFAULT_TOOLBAR_OPTIONS: ToolbarOptions;
6
7
  export declare const Locales: Record<string, Localization>;
8
+ export declare const DEFAULT_PROPS: {
9
+ workerUrl: undefined;
10
+ initialPage: number;
11
+ initialScale: ZoomLevel;
12
+ initialScrollMode: ScrollMode;
13
+ initialViewMode: ViewMode;
14
+ initialRotation: number;
15
+ initialThumbnailsVisible: boolean;
16
+ initialSearch: undefined;
17
+ textLayer: boolean;
18
+ characterMap: undefined;
19
+ toolbarOptions: ToolbarOptions;
20
+ localization: Record<string, Localization>;
21
+ afterCanvasLoaded: undefined;
22
+ };
7
23
  export declare const DEFAULT_OFFSET: Offset;
8
24
  export declare const PERCENTAGE = 100;
9
25
  export declare const MIN_ZOOM_SCALE = 0.25;
@@ -30,38 +46,70 @@ export declare const FILE_INPUT: InjectionKey<Ref<ComponentPublicInstance<import
30
46
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
31
47
  onChange?: ((file: string) => any) | undefined;
32
48
  onFilenameChange?: ((file: string) => any) | undefined;
49
+ }, {}, {}>, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | undefined, ComponentPublicInstance<import("vue").DefineComponent<{}, {
50
+ triggerClick: () => void;
51
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
52
+ change: (file: string) => void;
53
+ } & {
54
+ filenameChange: (file: string) => void;
55
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
56
+ onChange?: ((file: string) => any) | undefined;
57
+ onFilenameChange?: ((file: string) => any) | undefined;
58
+ }, {}, {}>, {}, {}, {}, {}, {}, import("vue").DefineComponent<{}, {
59
+ triggerClick: () => void;
60
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
61
+ change: (file: string) => void;
62
+ } & {
63
+ filenameChange: (file: string) => void;
64
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
65
+ onChange?: ((file: string) => any) | undefined;
66
+ onFilenameChange?: ((file: string) => any) | undefined;
33
67
  }, {}, {}>, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | undefined>>;
34
68
  export declare const EMPTY_KEYWORD_REGEXP: NormalizedKeyword;
35
69
  export declare const CURRENT_MATCH_CSS_CLASS = "vpv-highlight__text-current";
36
- export declare const LATEST_MATCH_POSITION: InjectionKey<Ref<HighlightMatchPosition | undefined>>;
70
+ export declare const LATEST_MATCH_POSITION: InjectionKey<Ref<HighlightMatchPosition | undefined, HighlightMatchPosition | undefined>>;
37
71
  export declare const GET_PAGE: InjectionKey<(doc: PDFDocumentProxy, pageIndex: number) => Promise<PDFPageProxy>>;
38
72
  export declare const VIEWER_STATE: InjectionKey<{
39
73
  pdfDocument: PDFDocumentProxy | undefined;
40
74
  pagesContainerRef: HTMLElement | undefined;
41
75
  pageIndex: number;
42
- viewMode: import("./components").ViewMode;
43
- scrollMode: import("./components").ScrollMode;
76
+ viewMode: ViewMode;
77
+ scrollMode: ScrollMode;
44
78
  scale: number;
45
79
  rotation: number;
46
80
  }>;
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>>;
81
+ export declare const VIEWER_PAGES_PER_ROW: InjectionKey<Ref<number, number>>;
82
+ export declare const TOOLBAR_OPTIONS: InjectionKey<Ref<ToolbarOptions | undefined, ToolbarOptions | undefined>>;
83
+ export declare const TOTAL_TOOL_OTHERS_MENU: InjectionKey<Ref<number, number>>;
84
+ export declare const IS_DARK: InjectionKey<Ref<boolean, boolean>>;
85
+ export declare const IS_MOBILE_VIEW: InjectionKey<Ref<boolean, boolean>>;
52
86
  export declare const CONTAINER: InjectionKey<ShallowRef<HTMLDivElement | undefined>>;
53
87
  export declare const PAGES_CONTAINER: InjectionKey<ShallowRef<HTMLDivElement | undefined>>;
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>>;
88
+ export declare const ACTUAL_PDF_PAGES: InjectionKey<ShallowRef<ViewerPdfPage[]>>;
89
+ export declare const FOCUSED_PAGE_NUMBER: InjectionKey<Ref<number, number>>;
90
+ export declare const ROTATION_DEGREE: InjectionKey<Ref<number, number>>;
91
+ export declare const TOTAL_PAGE: InjectionKey<Ref<number, number>>;
58
92
  export declare const INITIAL_TEXT_LAYER: InjectionKey<boolean>;
59
93
  export declare const DOWNLOAD_FILE: InjectionKey<() => Promise<void>>;
60
- export declare const LICENSE: InjectionKey<ShallowRef<License | undefined>>;
94
+ export declare const LICENSE: InjectionKey<{
95
+ isValidating: boolean;
96
+ isValidated: boolean;
97
+ isValidKey: boolean;
98
+ licenseKey: string | null;
99
+ type: LicenseType;
100
+ }>;
101
+ export declare const LICENSE_KEY: InjectionKey<ComputedRef<string | null | undefined>>;
61
102
  export declare const SLOT_LOADER_IMAGE: InjectionKey<Slot<any> | undefined>;
62
103
  export declare const SLOT_ICON_OPEN_FILE: InjectionKey<Slot<any> | undefined>;
63
104
  export declare const SLOT_ICON_DOWNLOAD: InjectionKey<Slot<any> | undefined>;
64
105
  export declare const SLOT_ICON_PRINT: InjectionKey<Slot<any> | undefined>;
65
106
  export declare const SLOT_ICON_FULLSCREEN: InjectionKey<Slot<any> | undefined>;
66
- export declare const LANG: InjectionKey<Ref<Localization> | undefined>;
107
+ export declare const LANG: InjectionKey<Ref<Localization, Localization> | undefined>;
67
108
  export declare const FUNC_GO_TO_PAGE: InjectionKey<(page: number) => void>;
109
+ export declare const LICENSE_DEFAULT: {
110
+ isValidated: boolean;
111
+ isValidating: boolean;
112
+ isValidKey: boolean;
113
+ licenseKey: null;
114
+ type: LicenseType;
115
+ };
@@ -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, type AfterLoadedCallback } from './utils/types';
6
+ export type { VPVInstance, CanvasLoadedCallback, Localization, PrintControl } from './utils/types';
7
7
  export default VPdfViewerPlugin;
@@ -1,3 +1,8 @@
1
+ export declare enum LicenseType {
2
+ Premium = "premium",
3
+ Freemium = "freemium",
4
+ Unlicense = "none"
5
+ }
1
6
  export declare enum ScrollMode {
2
7
  Vertical = "Vertical",
3
8
  Horizontal = "Horizontal",