@vue-pdf-viewer/viewer 1.2.0-rc.0 → 1.3.0-beta.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 +5455 -4737
- package/dist/index.umd.cjs +11 -11
- package/dist/page-view-dual-DzyLa1r0.js +21 -0
- package/dist/page-view-single-CAQXbP-i.js +21 -0
- package/dist/scrolling-horizontal-D1qDwmpQ.js +23 -0
- package/dist/scrolling-page-lV73lZIc.js +23 -0
- package/dist/scrolling-vertical-DzrChdnV.js +23 -0
- package/dist/scrolling-wrapped-CvhUpxbI.js +23 -0
- package/dist/types/components/LayerCanvas.vue.d.ts +22 -0
- package/dist/types/components/LayerPage.vue.d.ts +30 -0
- package/dist/types/components/{layers/TextLayer.vue.d.ts → LayerText.vue.d.ts} +1 -1
- package/dist/types/components/LayerTextSearchHighlight.vue.d.ts +29 -0
- package/dist/types/components/ToolMenuOthers.vue.d.ts +2 -2
- package/dist/types/components/ToolPrint.vue.d.ts +1 -1
- package/dist/types/components/ToolZoom.vue.d.ts +5 -5
- package/dist/types/components/ToolZoomPercentageMenu.vue.d.ts +3 -3
- package/dist/types/components/VPdfPage.vue.d.ts +2 -2
- package/dist/types/components/VPdfThumbnails.vue.d.ts +1 -1
- package/dist/types/components/VPdfViewer.vue.d.ts +257 -67
- package/dist/types/components/index.d.ts +2 -1
- package/dist/types/components/layers/AnnotationLayer.vue.d.ts +1 -1
- package/dist/types/components/utils/annotations.d.ts +1 -11
- package/dist/types/components/utils/destination.d.ts +1 -1
- package/dist/types/components/utils/highlight.d.ts +1 -1
- package/dist/types/composables/useLicense.d.ts +1 -1
- package/dist/types/composables/usePDF.d.ts +3 -1
- package/dist/types/composables/usePdfPagesSizes.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 +2 -2
- package/dist/types/composables/useSearch.d.ts +12 -21
- package/dist/types/composables/useVirtual.d.ts +36 -0
- package/dist/types/composables/useVirtualPages.d.ts +29 -0
- package/dist/types/composables/useVirtualScroll.d.ts +18 -0
- package/dist/types/const.d.ts +21 -3
- package/dist/types/utils/enumerators.d.ts +35 -0
- package/dist/types/utils/smoothScroll.d.ts +2 -0
- package/dist/types/{components → utils}/types.d.ts +81 -25
- package/dist/types/utils/validators.d.ts +4 -0
- package/dist/types/utils.d.ts +2 -0
- package/package.json +2 -2
- package/dist/types/composables/useCalculatePages.d.ts +0 -12
|
@@ -1,18 +1,63 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type AnnotationEventPayload, type HighlightEventPayload, type TextLayerLoadedEventPayload, type RotateEvent, type ToolbarOptions, type Localization } from '@/utils/types';
|
|
2
|
+
import { ScrollMode, ViewMode, ZoomLevel } from '@/utils/enumerators';
|
|
2
3
|
import '../style.scss';
|
|
3
4
|
declare const _default: {
|
|
4
|
-
new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
|
6
|
+
readonly src: {
|
|
7
|
+
readonly type: import("vue").PropType<string | import("@/utils/types").VPVSrc>;
|
|
8
|
+
readonly required: true;
|
|
9
|
+
};
|
|
10
|
+
readonly workerUrl: {
|
|
11
|
+
readonly type: import("vue").PropType<string>;
|
|
12
|
+
readonly default: undefined;
|
|
13
|
+
};
|
|
14
|
+
readonly initialPage: {
|
|
15
|
+
readonly type: import("vue").PropType<number>;
|
|
16
|
+
readonly default: () => number;
|
|
17
|
+
};
|
|
18
|
+
readonly initialScale: {
|
|
19
|
+
readonly type: import("vue").PropType<number | ZoomLevel>;
|
|
20
|
+
readonly default: () => ZoomLevel;
|
|
21
|
+
};
|
|
22
|
+
readonly initialScrollMode: {
|
|
23
|
+
readonly type: import("vue").PropType<ScrollMode>;
|
|
24
|
+
readonly default: () => ScrollMode;
|
|
25
|
+
readonly validator: (initialScrollMode: ScrollMode, args: unknown) => boolean;
|
|
26
|
+
};
|
|
27
|
+
readonly initialViewMode: {
|
|
28
|
+
readonly type: import("vue").PropType<ViewMode>;
|
|
29
|
+
readonly default: () => ViewMode;
|
|
30
|
+
readonly validator: (initialViewMode: ViewMode, args: unknown) => boolean;
|
|
31
|
+
};
|
|
32
|
+
readonly initialRotation: {
|
|
33
|
+
readonly type: import("vue").PropType<number>;
|
|
34
|
+
readonly default: () => number;
|
|
35
|
+
};
|
|
36
|
+
readonly initialThumbnailsVisible: {
|
|
37
|
+
readonly type: import("vue").PropType<boolean>;
|
|
38
|
+
readonly default: undefined;
|
|
39
|
+
};
|
|
40
|
+
readonly textLayer: {
|
|
41
|
+
readonly type: import("vue").PropType<boolean>;
|
|
42
|
+
readonly default: () => boolean;
|
|
43
|
+
};
|
|
44
|
+
readonly characterMap: {
|
|
45
|
+
readonly type: import("vue").PropType<import("@/utils/types").CharacterMap>;
|
|
46
|
+
readonly default: undefined;
|
|
47
|
+
};
|
|
48
|
+
readonly toolbarOptions: {
|
|
49
|
+
readonly type: import("vue").PropType<false | Partial<ToolbarOptions>>;
|
|
50
|
+
readonly default: () => ToolbarOptions;
|
|
51
|
+
};
|
|
52
|
+
readonly localization: {
|
|
53
|
+
readonly type: import("vue").PropType<Record<string, Localization>>;
|
|
54
|
+
readonly default: () => Record<string, Localization>;
|
|
55
|
+
};
|
|
56
|
+
}>> & {
|
|
14
57
|
onAnnotation?: ((payload: AnnotationEventPayload) => any) | undefined;
|
|
15
58
|
onAnnotationLoaded?: ((payload: any[]) => any) | undefined;
|
|
59
|
+
onHighlight?: ((payload: HighlightEventPayload) => any) | undefined;
|
|
60
|
+
onTextLoaded?: ((payload: TextLayerLoadedEventPayload) => any) | undefined;
|
|
16
61
|
onLoaded?: (() => any) | undefined;
|
|
17
62
|
onRotate?: ((payload: RotateEvent) => any) | undefined;
|
|
18
63
|
onLoadProgress?: ((payload: number) => any) | undefined;
|
|
@@ -35,27 +80,78 @@ declare const _default: {
|
|
|
35
80
|
xfaLoaded: () => void;
|
|
36
81
|
} & {
|
|
37
82
|
rotate: (payload: RotateEvent) => void;
|
|
38
|
-
}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
83
|
+
}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
84
|
+
readonly src: {
|
|
85
|
+
readonly type: import("vue").PropType<string | import("@/utils/types").VPVSrc>;
|
|
86
|
+
readonly required: true;
|
|
87
|
+
};
|
|
88
|
+
readonly workerUrl: {
|
|
89
|
+
readonly type: import("vue").PropType<string>;
|
|
90
|
+
readonly default: undefined;
|
|
91
|
+
};
|
|
92
|
+
readonly initialPage: {
|
|
93
|
+
readonly type: import("vue").PropType<number>;
|
|
94
|
+
readonly default: () => number;
|
|
95
|
+
};
|
|
96
|
+
readonly initialScale: {
|
|
97
|
+
readonly type: import("vue").PropType<number | ZoomLevel>;
|
|
98
|
+
readonly default: () => ZoomLevel;
|
|
99
|
+
};
|
|
100
|
+
readonly initialScrollMode: {
|
|
101
|
+
readonly type: import("vue").PropType<ScrollMode>;
|
|
102
|
+
readonly default: () => ScrollMode;
|
|
103
|
+
readonly validator: (initialScrollMode: ScrollMode, args: unknown) => boolean;
|
|
104
|
+
};
|
|
105
|
+
readonly initialViewMode: {
|
|
106
|
+
readonly type: import("vue").PropType<ViewMode>;
|
|
107
|
+
readonly default: () => ViewMode;
|
|
108
|
+
readonly validator: (initialViewMode: ViewMode, args: unknown) => boolean;
|
|
109
|
+
};
|
|
110
|
+
readonly initialRotation: {
|
|
111
|
+
readonly type: import("vue").PropType<number>;
|
|
112
|
+
readonly default: () => number;
|
|
113
|
+
};
|
|
114
|
+
readonly initialThumbnailsVisible: {
|
|
115
|
+
readonly type: import("vue").PropType<boolean>;
|
|
116
|
+
readonly default: undefined;
|
|
117
|
+
};
|
|
118
|
+
readonly textLayer: {
|
|
119
|
+
readonly type: import("vue").PropType<boolean>;
|
|
120
|
+
readonly default: () => boolean;
|
|
121
|
+
};
|
|
122
|
+
readonly characterMap: {
|
|
123
|
+
readonly type: import("vue").PropType<import("@/utils/types").CharacterMap>;
|
|
124
|
+
readonly default: undefined;
|
|
125
|
+
};
|
|
126
|
+
readonly toolbarOptions: {
|
|
127
|
+
readonly type: import("vue").PropType<false | Partial<ToolbarOptions>>;
|
|
128
|
+
readonly default: () => ToolbarOptions;
|
|
129
|
+
};
|
|
130
|
+
readonly localization: {
|
|
131
|
+
readonly type: import("vue").PropType<Record<string, Localization>>;
|
|
132
|
+
readonly default: () => Record<string, Localization>;
|
|
133
|
+
};
|
|
134
|
+
}>> & {
|
|
48
135
|
onAnnotation?: ((payload: AnnotationEventPayload) => any) | undefined;
|
|
49
136
|
onAnnotationLoaded?: ((payload: any[]) => any) | undefined;
|
|
137
|
+
onHighlight?: ((payload: HighlightEventPayload) => any) | undefined;
|
|
138
|
+
onTextLoaded?: ((payload: TextLayerLoadedEventPayload) => any) | undefined;
|
|
50
139
|
onLoaded?: (() => any) | undefined;
|
|
51
140
|
onRotate?: ((payload: RotateEvent) => any) | undefined;
|
|
52
141
|
onLoadProgress?: ((payload: number) => any) | undefined;
|
|
53
142
|
onXfaLoaded?: (() => any) | undefined;
|
|
54
143
|
}, {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
144
|
+
readonly initialViewMode: ViewMode;
|
|
145
|
+
readonly initialScrollMode: ScrollMode;
|
|
146
|
+
readonly workerUrl: string;
|
|
147
|
+
readonly initialPage: number;
|
|
148
|
+
readonly initialScale: number | ZoomLevel;
|
|
149
|
+
readonly initialRotation: number;
|
|
150
|
+
readonly initialThumbnailsVisible: boolean;
|
|
151
|
+
readonly textLayer: boolean;
|
|
152
|
+
readonly characterMap: import("@/utils/types").CharacterMap;
|
|
153
|
+
readonly toolbarOptions: false | Partial<ToolbarOptions>;
|
|
154
|
+
readonly localization: Record<string, Localization>;
|
|
59
155
|
}, true, {}, {}, {
|
|
60
156
|
P: {};
|
|
61
157
|
B: {};
|
|
@@ -63,18 +159,62 @@ declare const _default: {
|
|
|
63
159
|
C: {};
|
|
64
160
|
M: {};
|
|
65
161
|
Defaults: {};
|
|
66
|
-
}, Readonly<import("vue").ExtractPropTypes<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
162
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
163
|
+
readonly src: {
|
|
164
|
+
readonly type: import("vue").PropType<string | import("@/utils/types").VPVSrc>;
|
|
165
|
+
readonly required: true;
|
|
166
|
+
};
|
|
167
|
+
readonly workerUrl: {
|
|
168
|
+
readonly type: import("vue").PropType<string>;
|
|
169
|
+
readonly default: undefined;
|
|
170
|
+
};
|
|
171
|
+
readonly initialPage: {
|
|
172
|
+
readonly type: import("vue").PropType<number>;
|
|
173
|
+
readonly default: () => number;
|
|
174
|
+
};
|
|
175
|
+
readonly initialScale: {
|
|
176
|
+
readonly type: import("vue").PropType<number | ZoomLevel>;
|
|
177
|
+
readonly default: () => ZoomLevel;
|
|
178
|
+
};
|
|
179
|
+
readonly initialScrollMode: {
|
|
180
|
+
readonly type: import("vue").PropType<ScrollMode>;
|
|
181
|
+
readonly default: () => ScrollMode;
|
|
182
|
+
readonly validator: (initialScrollMode: ScrollMode, args: unknown) => boolean;
|
|
183
|
+
};
|
|
184
|
+
readonly initialViewMode: {
|
|
185
|
+
readonly type: import("vue").PropType<ViewMode>;
|
|
186
|
+
readonly default: () => ViewMode;
|
|
187
|
+
readonly validator: (initialViewMode: ViewMode, args: unknown) => boolean;
|
|
188
|
+
};
|
|
189
|
+
readonly initialRotation: {
|
|
190
|
+
readonly type: import("vue").PropType<number>;
|
|
191
|
+
readonly default: () => number;
|
|
192
|
+
};
|
|
193
|
+
readonly initialThumbnailsVisible: {
|
|
194
|
+
readonly type: import("vue").PropType<boolean>;
|
|
195
|
+
readonly default: undefined;
|
|
196
|
+
};
|
|
197
|
+
readonly textLayer: {
|
|
198
|
+
readonly type: import("vue").PropType<boolean>;
|
|
199
|
+
readonly default: () => boolean;
|
|
200
|
+
};
|
|
201
|
+
readonly characterMap: {
|
|
202
|
+
readonly type: import("vue").PropType<import("@/utils/types").CharacterMap>;
|
|
203
|
+
readonly default: undefined;
|
|
204
|
+
};
|
|
205
|
+
readonly toolbarOptions: {
|
|
206
|
+
readonly type: import("vue").PropType<false | Partial<ToolbarOptions>>;
|
|
207
|
+
readonly default: () => ToolbarOptions;
|
|
208
|
+
};
|
|
209
|
+
readonly localization: {
|
|
210
|
+
readonly type: import("vue").PropType<Record<string, Localization>>;
|
|
211
|
+
readonly default: () => Record<string, Localization>;
|
|
212
|
+
};
|
|
213
|
+
}>> & {
|
|
76
214
|
onAnnotation?: ((payload: AnnotationEventPayload) => any) | undefined;
|
|
77
215
|
onAnnotationLoaded?: ((payload: any[]) => any) | undefined;
|
|
216
|
+
onHighlight?: ((payload: HighlightEventPayload) => any) | undefined;
|
|
217
|
+
onTextLoaded?: ((payload: TextLayerLoadedEventPayload) => any) | undefined;
|
|
78
218
|
onLoaded?: (() => any) | undefined;
|
|
79
219
|
onRotate?: ((payload: RotateEvent) => any) | undefined;
|
|
80
220
|
onLoadProgress?: ((payload: number) => any) | undefined;
|
|
@@ -82,26 +222,77 @@ declare const _default: {
|
|
|
82
222
|
}, {
|
|
83
223
|
goToPage: (page: number) => void;
|
|
84
224
|
}, {}, {}, {}, {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
225
|
+
readonly initialViewMode: ViewMode;
|
|
226
|
+
readonly initialScrollMode: ScrollMode;
|
|
227
|
+
readonly workerUrl: string;
|
|
228
|
+
readonly initialPage: number;
|
|
229
|
+
readonly initialScale: number | ZoomLevel;
|
|
230
|
+
readonly initialRotation: number;
|
|
231
|
+
readonly initialThumbnailsVisible: boolean;
|
|
232
|
+
readonly textLayer: boolean;
|
|
233
|
+
readonly characterMap: import("@/utils/types").CharacterMap;
|
|
234
|
+
readonly toolbarOptions: false | Partial<ToolbarOptions>;
|
|
235
|
+
readonly localization: Record<string, Localization>;
|
|
89
236
|
}>;
|
|
90
237
|
__isFragment?: undefined;
|
|
91
238
|
__isTeleport?: undefined;
|
|
92
239
|
__isSuspense?: undefined;
|
|
93
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
240
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
241
|
+
readonly src: {
|
|
242
|
+
readonly type: import("vue").PropType<string | import("@/utils/types").VPVSrc>;
|
|
243
|
+
readonly required: true;
|
|
244
|
+
};
|
|
245
|
+
readonly workerUrl: {
|
|
246
|
+
readonly type: import("vue").PropType<string>;
|
|
247
|
+
readonly default: undefined;
|
|
248
|
+
};
|
|
249
|
+
readonly initialPage: {
|
|
250
|
+
readonly type: import("vue").PropType<number>;
|
|
251
|
+
readonly default: () => number;
|
|
252
|
+
};
|
|
253
|
+
readonly initialScale: {
|
|
254
|
+
readonly type: import("vue").PropType<number | ZoomLevel>;
|
|
255
|
+
readonly default: () => ZoomLevel;
|
|
256
|
+
};
|
|
257
|
+
readonly initialScrollMode: {
|
|
258
|
+
readonly type: import("vue").PropType<ScrollMode>;
|
|
259
|
+
readonly default: () => ScrollMode;
|
|
260
|
+
readonly validator: (initialScrollMode: ScrollMode, args: unknown) => boolean;
|
|
261
|
+
};
|
|
262
|
+
readonly initialViewMode: {
|
|
263
|
+
readonly type: import("vue").PropType<ViewMode>;
|
|
264
|
+
readonly default: () => ViewMode;
|
|
265
|
+
readonly validator: (initialViewMode: ViewMode, args: unknown) => boolean;
|
|
266
|
+
};
|
|
267
|
+
readonly initialRotation: {
|
|
268
|
+
readonly type: import("vue").PropType<number>;
|
|
269
|
+
readonly default: () => number;
|
|
270
|
+
};
|
|
271
|
+
readonly initialThumbnailsVisible: {
|
|
272
|
+
readonly type: import("vue").PropType<boolean>;
|
|
273
|
+
readonly default: undefined;
|
|
274
|
+
};
|
|
275
|
+
readonly textLayer: {
|
|
276
|
+
readonly type: import("vue").PropType<boolean>;
|
|
277
|
+
readonly default: () => boolean;
|
|
278
|
+
};
|
|
279
|
+
readonly characterMap: {
|
|
280
|
+
readonly type: import("vue").PropType<import("@/utils/types").CharacterMap>;
|
|
281
|
+
readonly default: undefined;
|
|
282
|
+
};
|
|
283
|
+
readonly toolbarOptions: {
|
|
284
|
+
readonly type: import("vue").PropType<false | Partial<ToolbarOptions>>;
|
|
285
|
+
readonly default: () => ToolbarOptions;
|
|
286
|
+
};
|
|
287
|
+
readonly localization: {
|
|
288
|
+
readonly type: import("vue").PropType<Record<string, Localization>>;
|
|
289
|
+
readonly default: () => Record<string, Localization>;
|
|
290
|
+
};
|
|
291
|
+
}>> & {
|
|
103
292
|
onAnnotation?: ((payload: AnnotationEventPayload) => any) | undefined;
|
|
104
293
|
onAnnotationLoaded?: ((payload: any[]) => any) | undefined;
|
|
294
|
+
onHighlight?: ((payload: HighlightEventPayload) => any) | undefined;
|
|
295
|
+
onTextLoaded?: ((payload: TextLayerLoadedEventPayload) => any) | undefined;
|
|
105
296
|
onLoaded?: (() => any) | undefined;
|
|
106
297
|
onRotate?: ((payload: RotateEvent) => any) | undefined;
|
|
107
298
|
onLoadProgress?: ((payload: number) => any) | undefined;
|
|
@@ -125,10 +316,17 @@ declare const _default: {
|
|
|
125
316
|
} & {
|
|
126
317
|
rotate: (payload: RotateEvent) => void;
|
|
127
318
|
}, string, {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
319
|
+
readonly initialViewMode: ViewMode;
|
|
320
|
+
readonly initialScrollMode: ScrollMode;
|
|
321
|
+
readonly workerUrl: string;
|
|
322
|
+
readonly initialPage: number;
|
|
323
|
+
readonly initialScale: number | ZoomLevel;
|
|
324
|
+
readonly initialRotation: number;
|
|
325
|
+
readonly initialThumbnailsVisible: boolean;
|
|
326
|
+
readonly textLayer: boolean;
|
|
327
|
+
readonly characterMap: import("@/utils/types").CharacterMap;
|
|
328
|
+
readonly toolbarOptions: false | Partial<ToolbarOptions>;
|
|
329
|
+
readonly localization: Record<string, Localization>;
|
|
132
330
|
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
133
331
|
$slots: {
|
|
134
332
|
dropFileZone: (_: {
|
|
@@ -192,21 +390,13 @@ declare const _default: {
|
|
|
192
390
|
iconRotateCounterClockwise: (_: {}) => any;
|
|
193
391
|
iconTextSelection: (_: {}) => any;
|
|
194
392
|
iconHandMode: (_: {}) => any;
|
|
393
|
+
iconScrollingPage: (_: {}) => any;
|
|
394
|
+
iconScrollingVertical: (_: {}) => any;
|
|
395
|
+
iconScrollingHorizontal: (_: {}) => any;
|
|
396
|
+
iconScrollingWrapped: (_: {}) => any;
|
|
397
|
+
iconPageViewSingle: (_: {}) => any;
|
|
398
|
+
iconPageViewDual: (_: {}) => any;
|
|
195
399
|
iconDocProperties: (_: {}) => any;
|
|
196
400
|
};
|
|
197
401
|
});
|
|
198
402
|
export default _default;
|
|
199
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
200
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
201
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
202
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
203
|
-
} : {
|
|
204
|
-
type: import('vue').PropType<T[K]>;
|
|
205
|
-
required: true;
|
|
206
|
-
};
|
|
207
|
-
};
|
|
208
|
-
type __VLS_WithDefaults<P, D> = {
|
|
209
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
210
|
-
default: D[K];
|
|
211
|
-
} : P[K];
|
|
212
|
-
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnnotationEventPayload } from '
|
|
1
|
+
import type { AnnotationEventPayload } from '../../utils/types';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
3
3
|
page?: import("pdfjs-dist/types/src/display/api").PDFPageProxy | undefined;
|
|
4
4
|
viewport?: import("pdfjs-dist/types/src/display/display_utils").PageViewport | undefined;
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import type { PDFDocumentProxy } from 'pdfjs-dist';
|
|
2
|
-
import { type AnnotationEventPayload } from '
|
|
3
|
-
export declare enum VPVAnnotationType {
|
|
4
|
-
INTERNAL_LINK = "internal-link",
|
|
5
|
-
LINK = "link",
|
|
6
|
-
FILE_ATTACHMENT = "file-attachment",
|
|
7
|
-
FORM_TEXT = "form-text",
|
|
8
|
-
FORM_SELECT = "form-select",
|
|
9
|
-
FORM_CHECKBOX = "form-checkbox",
|
|
10
|
-
FORM_RADIO = "form-radio",
|
|
11
|
-
FORM_BUTTON = "form-button"
|
|
12
|
-
}
|
|
2
|
+
import { type AnnotationEventPayload } from '@/utils/types';
|
|
13
3
|
declare const EVENTS_TO_HANDLER: string[];
|
|
14
4
|
declare function annotationEventsHandler(evt: Event, PDFDoc: PDFDocumentProxy, Annotations: Object[]): AnnotationEventPayload | Promise<AnnotationEventPayload | undefined> | undefined;
|
|
15
5
|
export { EVENTS_TO_HANDLER, annotationEventsHandler };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PDFDocumentProxy, RefProxy } from 'pdfjs-dist/types/src/display/api';
|
|
2
|
-
import type { PDFLocation } from '
|
|
2
|
+
import type { PDFLocation } from '../../utils/types';
|
|
3
3
|
declare function getDestinationArray(doc: PDFDocumentProxy, dest: string | any[] | null): Promise<any[] | null>;
|
|
4
4
|
declare function getDestinationRef(doc: PDFDocumentProxy, destArray: any[] | null): Promise<RefProxy | null>;
|
|
5
5
|
declare function getLocation(type: string, spec: number[]): PDFLocation | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TextContent } from 'pdfjs-dist/types/src/display/text_layer';
|
|
2
|
-
import type { HighlightOptions, Match } from '
|
|
2
|
+
import type { HighlightOptions, Match } from '../../utils/types';
|
|
3
3
|
declare function highlightMatches(matches: Match[], textContent: TextContent, textDivs: HTMLElement[], className?: string): void;
|
|
4
4
|
declare function resetDivs(textContent: TextContent, textDivs: HTMLElement[]): void;
|
|
5
5
|
declare function findMatches(query: string, textContent: TextContent, options: HighlightOptions): Match[];
|
|
@@ -6,5 +6,5 @@ type UseLicenseProps = {
|
|
|
6
6
|
export declare const useLicense: (props?: UseLicenseProps) => {
|
|
7
7
|
license: import("vue").ShallowRef<License | undefined>;
|
|
8
8
|
};
|
|
9
|
-
export declare function useInjectedLicense(pagesContainer: Ref<HTMLDivElement |
|
|
9
|
+
export declare function useInjectedLicense(pagesContainer: Ref<HTMLDivElement | undefined>): import("vue").ShallowRef<License | undefined>;
|
|
10
10
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { MaybeRef } from 'vue';
|
|
2
|
-
import type { PDFDestination, PDFInfo, PDFOptions, PDFSrc } from '../
|
|
2
|
+
import type { PDFDestination, PDFInfo, PDFOptions, PDFSrc } from '../utils/types';
|
|
3
|
+
import type { PDFDocumentProxy, PDFPageProxy } from 'pdfjs-dist/types/src/display/api';
|
|
3
4
|
/**
|
|
4
5
|
* @typedef {Object} UsePDFParameters
|
|
5
6
|
* @property {string} password
|
|
@@ -22,5 +23,6 @@ export declare function usePDF(src: MaybeRef<PDFSrc>, options?: PDFOptions, work
|
|
|
22
23
|
pdf: import("vue").ShallowRef<import("pdfjs-dist/types/src/display/api").PDFDocumentLoadingTask | undefined>;
|
|
23
24
|
totalPages: import("vue").ShallowRef<number>;
|
|
24
25
|
info: import("vue").ShallowRef<{}> | import("vue").ShallowRef<PDFInfo>;
|
|
26
|
+
getPage: (doc: PDFDocumentProxy, pageIndex: number) => Promise<PDFPageProxy>;
|
|
25
27
|
getPDFDestination: (destination: string | any[] | null) => Promise<PDFDestination | null>;
|
|
26
28
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MaybeRef, UnwrapRef } from 'vue';
|
|
2
|
+
import { ViewerPdfPage, ViewerState } from '@/utils/types';
|
|
3
|
+
import { ZoomLevel } from '@/utils/enumerators';
|
|
4
|
+
export declare function usePdfPageSizes(props: UnwrapRef<ViewerState>, initialScale: MaybeRef<number | ZoomLevel>): {
|
|
5
|
+
pdfPages: import("vue").ShallowRef<ViewerPdfPage[]>;
|
|
6
|
+
actualPdfPages: import("vue").ShallowRef<ViewerPdfPage[]>;
|
|
7
|
+
defaultScale: import("vue").Ref<number, number>;
|
|
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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
1
2
|
import { RotateEvent } from '..';
|
|
2
|
-
export declare const useRotation: (
|
|
3
|
-
pageRotate: import("vue").Ref<number, number>;
|
|
3
|
+
export declare const useRotation: (currentRotation: Ref<number>, rotateCallback?: ((event: RotateEvent) => void) | undefined) => {
|
|
4
4
|
onRotateClockwise: () => void;
|
|
5
5
|
onRotateCounterclockwise: () => void;
|
|
6
6
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { Match } from '@/components';
|
|
2
|
-
import { ShallowRef } from 'vue';
|
|
1
|
+
import { Match, PdfPageSize } from '@/components';
|
|
2
|
+
import { MaybeRef, Ref, ShallowRef } from 'vue';
|
|
3
3
|
import type { PDFDocumentProxy } from 'pdfjs-dist';
|
|
4
4
|
interface MatchValue extends Match {
|
|
5
5
|
page: number;
|
|
6
|
+
pageMatchIdx: number;
|
|
6
7
|
}
|
|
7
|
-
export declare const useSearch: (pdfDoc: ShallowRef<PDFDocumentProxy | undefined>) => {
|
|
8
|
-
searchValue:
|
|
9
|
-
matches:
|
|
8
|
+
export declare const useSearch: (pdfDoc: ShallowRef<PDFDocumentProxy | undefined>, pageSizes: Ref<PdfPageSize[] | undefined>, elementRef: MaybeRef<HTMLElement | undefined>) => {
|
|
9
|
+
searchValue: Ref<string, string>;
|
|
10
|
+
matches: Ref<{
|
|
10
11
|
page: number;
|
|
12
|
+
pageMatchIdx: number;
|
|
11
13
|
start: {
|
|
12
14
|
idx: number;
|
|
13
15
|
offset: number;
|
|
@@ -20,6 +22,7 @@ export declare const useSearch: (pdfDoc: ShallowRef<PDFDocumentProxy | undefined
|
|
|
20
22
|
oIndex: number;
|
|
21
23
|
}[], MatchValue[] | {
|
|
22
24
|
page: number;
|
|
25
|
+
pageMatchIdx: number;
|
|
23
26
|
start: {
|
|
24
27
|
idx: number;
|
|
25
28
|
offset: number;
|
|
@@ -32,22 +35,10 @@ export declare const useSearch: (pdfDoc: ShallowRef<PDFDocumentProxy | undefined
|
|
|
32
35
|
oIndex: number;
|
|
33
36
|
}[]>;
|
|
34
37
|
matchCount: import("vue").ComputedRef<number>;
|
|
35
|
-
currentMatchIndex:
|
|
36
|
-
currentMatch: import("vue").ComputedRef<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
idx: number;
|
|
40
|
-
offset: number;
|
|
41
|
-
};
|
|
42
|
-
end: {
|
|
43
|
-
idx: number;
|
|
44
|
-
offset: number;
|
|
45
|
-
};
|
|
46
|
-
str: string;
|
|
47
|
-
oIndex: number;
|
|
48
|
-
} | undefined>;
|
|
49
|
-
searching: import("vue").Ref<boolean, boolean>;
|
|
50
|
-
openSearch: import("vue").Ref<boolean, boolean>;
|
|
38
|
+
currentMatchIndex: Ref<number | undefined, number | undefined>;
|
|
39
|
+
currentMatch: import("vue").ComputedRef<MatchValue | undefined>;
|
|
40
|
+
searching: Ref<boolean, boolean>;
|
|
41
|
+
openSearch: Ref<boolean, boolean>;
|
|
51
42
|
onOpenSearch: () => void;
|
|
52
43
|
onCloseSearch: () => void;
|
|
53
44
|
handleSelectNext: () => void;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Ref, UnwrapRef, CSSProperties } from 'vue';
|
|
2
|
+
import { ScrollMode, ViewMode } from '@/utils/enumerators';
|
|
3
|
+
import { VirtualItem, Offset, ViewerPdfPage } from '@/utils/types';
|
|
4
|
+
export interface VisiblePagesRange {
|
|
5
|
+
endPage: number;
|
|
6
|
+
numPages: number;
|
|
7
|
+
startPage: number;
|
|
8
|
+
}
|
|
9
|
+
export type SetRenderRange = (visiblePagesRange: VisiblePagesRange) => {
|
|
10
|
+
endPage: number;
|
|
11
|
+
startPage: number;
|
|
12
|
+
};
|
|
13
|
+
interface UseVirtualProps {
|
|
14
|
+
pages: Ref<ViewerPdfPage[]>;
|
|
15
|
+
viewerRef: Ref<HTMLElement | undefined>;
|
|
16
|
+
scrollMode: Ref<ScrollMode>;
|
|
17
|
+
viewMode: Ref<ViewMode>;
|
|
18
|
+
isRtl: boolean;
|
|
19
|
+
smoothScroll: Ref<boolean>;
|
|
20
|
+
}
|
|
21
|
+
export declare const useVirtual: (props: UnwrapRef<UseVirtualProps>) => {
|
|
22
|
+
visibilities: import("vue").WritableComputedRef<any[]>;
|
|
23
|
+
virtualItems: import("vue").ComputedRef<VirtualItem[]>;
|
|
24
|
+
getContainerStyles: () => CSSProperties;
|
|
25
|
+
getItemContainerStyles: (item: VirtualItem) => CSSProperties;
|
|
26
|
+
getItemStyles: (item: VirtualItem) => CSSProperties;
|
|
27
|
+
virtualRangeState: import("vue").ComputedRef<{
|
|
28
|
+
startPage: number;
|
|
29
|
+
endPage: number;
|
|
30
|
+
maxVisibilityIndex: number;
|
|
31
|
+
} | undefined>;
|
|
32
|
+
isScrolling: Ref<boolean, boolean>;
|
|
33
|
+
scrollToItem: (index: number, offset?: Offset) => void;
|
|
34
|
+
zoom: (scale: number, index: number) => void;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ComputedRef, CSSProperties, Ref, StyleValue, UnwrapRef } from 'vue';
|
|
2
|
+
import { ViewerPdfPage, ScrollMode, ViewMode } from '..';
|
|
3
|
+
export interface UseVirtualListItem<T> {
|
|
4
|
+
data: T;
|
|
5
|
+
index: number;
|
|
6
|
+
}
|
|
7
|
+
export interface UseVirtualListReturn {
|
|
8
|
+
list: Ref<UseVirtualListItem<ViewerPdfPage>[]>;
|
|
9
|
+
scrollTo: (index: number) => void;
|
|
10
|
+
pageGroups: ComputedRef<Array<UseVirtualListItem<ViewerPdfPage>[]> | undefined>;
|
|
11
|
+
containerProps: {
|
|
12
|
+
ref: Ref<HTMLElement | null>;
|
|
13
|
+
onScroll: () => void;
|
|
14
|
+
style: StyleValue;
|
|
15
|
+
};
|
|
16
|
+
wrapperProps: ComputedRef<{
|
|
17
|
+
style: CSSProperties;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
interface UseVirtualPagesProps {
|
|
21
|
+
pages: Ref<ViewerPdfPage[]>;
|
|
22
|
+
viewerRef: Ref<HTMLElement | undefined>;
|
|
23
|
+
scrollMode: Ref<ScrollMode>;
|
|
24
|
+
viewMode: Ref<ViewMode>;
|
|
25
|
+
isRtl: boolean;
|
|
26
|
+
smoothScroll: Ref<boolean>;
|
|
27
|
+
}
|
|
28
|
+
export declare function useVirtualPages(props: UnwrapRef<UseVirtualPagesProps>): UseVirtualListReturn;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Ref, UnwrapRef } from 'vue';
|
|
2
|
+
import { Offset } from '../utils/types';
|
|
3
|
+
import { ScrollDirection, ScrollMode, ViewMode } from '../utils/enumerators';
|
|
4
|
+
interface UseScrollReturn {
|
|
5
|
+
scrollOffset: Ref<Offset>;
|
|
6
|
+
scrollDirection: Ref<ScrollDirection>;
|
|
7
|
+
isScrolling: Ref<boolean>;
|
|
8
|
+
scrollTo: (target: Offset, smooth?: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
interface UseScrollProps {
|
|
11
|
+
viewerRef: Ref<HTMLElement | undefined>;
|
|
12
|
+
scrollMode: Ref<ScrollMode>;
|
|
13
|
+
viewMode: Ref<ViewMode>;
|
|
14
|
+
isRtl: boolean;
|
|
15
|
+
smooth: Ref<boolean>;
|
|
16
|
+
}
|
|
17
|
+
export declare const useVirtualScroll: (props: UnwrapRef<UseScrollProps>) => UseScrollReturn;
|
|
18
|
+
export {};
|