@vue-pdf-viewer/viewer 3.8.0-beta.4 → 3.8.0-beta.5
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-BbB6snFs.js → index--E-fgwci.js} +9059 -9019
- package/dist/{index-BNcQiIFT.js → index-wITdMX8a.js} +1 -1
- package/dist/index.js +13 -12
- package/dist/index.umd.cjs +37 -36
- package/dist/types/components/VPdfViewer.vue.d.ts +16 -1
- package/dist/types/composables/useAnnotationStorage.d.ts +13 -1
- package/dist/types/const.d.ts +13 -767
- package/dist/types/utils/enumerators.d.ts +4 -0
- package/dist/types/utils/types.d.ts +11 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
|
|
2
2
|
import type { AnnotationEventPayload, TextLayerLoadedEventPayload, RotateEvent, ToolbarOptions, PdfProperties } from '@/utils/types';
|
|
3
|
-
import { ScrollMode, ViewMode, ZoomLevel } from '@/utils/enumerators';
|
|
3
|
+
import { ScrollMode, SelectionMode, ViewMode, ZoomLevel } from '@/utils/enumerators';
|
|
4
4
|
import '../style.scss';
|
|
5
5
|
import { Localization } from '@vue-pdf-viewer/shared';
|
|
6
6
|
declare const _default: {
|
|
@@ -49,6 +49,10 @@ declare const _default: {
|
|
|
49
49
|
readonly type: import("vue").PropType<boolean>;
|
|
50
50
|
readonly default: () => boolean;
|
|
51
51
|
};
|
|
52
|
+
readonly selectionMode: {
|
|
53
|
+
readonly type: import("vue").PropType<SelectionMode>;
|
|
54
|
+
readonly default: undefined;
|
|
55
|
+
};
|
|
52
56
|
readonly characterMap: {
|
|
53
57
|
readonly type: import("vue").PropType<import("@/utils/types").CharacterMap>;
|
|
54
58
|
readonly default: undefined;
|
|
@@ -198,6 +202,7 @@ declare const _default: {
|
|
|
198
202
|
readonly initialThumbnailsVisible: boolean;
|
|
199
203
|
readonly initialSearch: string;
|
|
200
204
|
readonly textLayer: boolean;
|
|
205
|
+
readonly selectionMode: SelectionMode;
|
|
201
206
|
readonly characterMap: import("@/utils/types").CharacterMap;
|
|
202
207
|
readonly toolbarOptions: false | Partial<ToolbarOptions>;
|
|
203
208
|
readonly localization: Record<string, Localization>;
|
|
@@ -258,6 +263,10 @@ declare const _default: {
|
|
|
258
263
|
readonly type: import("vue").PropType<boolean>;
|
|
259
264
|
readonly default: () => boolean;
|
|
260
265
|
};
|
|
266
|
+
readonly selectionMode: {
|
|
267
|
+
readonly type: import("vue").PropType<SelectionMode>;
|
|
268
|
+
readonly default: undefined;
|
|
269
|
+
};
|
|
261
270
|
readonly characterMap: {
|
|
262
271
|
readonly type: import("vue").PropType<import("@/utils/types").CharacterMap>;
|
|
263
272
|
readonly default: undefined;
|
|
@@ -379,6 +388,7 @@ declare const _default: {
|
|
|
379
388
|
readonly initialThumbnailsVisible: boolean;
|
|
380
389
|
readonly initialSearch: string;
|
|
381
390
|
readonly textLayer: boolean;
|
|
391
|
+
readonly selectionMode: SelectionMode;
|
|
382
392
|
readonly characterMap: import("@/utils/types").CharacterMap;
|
|
383
393
|
readonly toolbarOptions: false | Partial<ToolbarOptions>;
|
|
384
394
|
readonly localization: Record<string, Localization>;
|
|
@@ -436,6 +446,10 @@ declare const _default: {
|
|
|
436
446
|
readonly type: import("vue").PropType<boolean>;
|
|
437
447
|
readonly default: () => boolean;
|
|
438
448
|
};
|
|
449
|
+
readonly selectionMode: {
|
|
450
|
+
readonly type: import("vue").PropType<SelectionMode>;
|
|
451
|
+
readonly default: undefined;
|
|
452
|
+
};
|
|
439
453
|
readonly characterMap: {
|
|
440
454
|
readonly type: import("vue").PropType<import("@/utils/types").CharacterMap>;
|
|
441
455
|
readonly default: undefined;
|
|
@@ -585,6 +599,7 @@ declare const _default: {
|
|
|
585
599
|
readonly initialThumbnailsVisible: boolean;
|
|
586
600
|
readonly initialSearch: string;
|
|
587
601
|
readonly textLayer: boolean;
|
|
602
|
+
readonly selectionMode: SelectionMode;
|
|
588
603
|
readonly characterMap: import("@/utils/types").CharacterMap;
|
|
589
604
|
readonly toolbarOptions: false | Partial<ToolbarOptions>;
|
|
590
605
|
readonly localization: Record<string, Localization>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
2
|
import { type AnnotationPluginApi } from '@vue-pdf-viewer/shared';
|
|
3
|
-
import type { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
|
|
3
|
+
import type { PDFDocumentProxy, PDFPageProxy } from 'pdfjs-dist/types/src/display/api';
|
|
4
4
|
/**
|
|
5
5
|
* Set the global annotation plugin API reference
|
|
6
6
|
* Called from usePlugins when the plugin is registered
|
|
@@ -71,6 +71,18 @@ export interface UseAnnotationStorageReturn {
|
|
|
71
71
|
findEditorAnnotationKey: (annotationId: string) => string | undefined;
|
|
72
72
|
}
|
|
73
73
|
export declare const getGlobalStorageEntries: () => unknown[];
|
|
74
|
+
/**
|
|
75
|
+
* Pre-set noView flag for Underline/StrikeOut annotations before canvas rendering.
|
|
76
|
+
* This prevents race condition where canvas renders these annotations before
|
|
77
|
+
* LayerAnnotationEditor has a chance to hide them.
|
|
78
|
+
*
|
|
79
|
+
* Why this is needed:
|
|
80
|
+
* - Highlight annotations are supported by PDF.js for editing, so they respond to isEditing flag
|
|
81
|
+
* - Underline (type 10) and StrikeOut (type 12) are NOT supported by PDF.js for editing
|
|
82
|
+
* - PDF.js renders them on canvas but does NOT respond to isEditing flag
|
|
83
|
+
* - We need to set noView: true BEFORE canvas rendering starts
|
|
84
|
+
*/
|
|
85
|
+
export declare function prepareTextMarkupAnnotationsForCanvas(pageProxy: PDFPageProxy, isTextSelectionActive: boolean): Promise<void>;
|
|
74
86
|
/**
|
|
75
87
|
* Creates a serializable version of the annotation data
|
|
76
88
|
* @param value - The annotation data to serialize
|