@vue-pdf-viewer/viewer 3.6.1 → 3.7.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/README.md +1 -1
- package/dist/index-CEzhAcTI.js +29278 -0
- package/dist/{index-XJzcdPc7.js → index-w0TesC4F.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/index.umd.cjs +37 -37
- package/dist/lib/assets/pdf-legacy/pdf.worker.min.mjs +21 -0
- package/dist/lib/assets/pdf.worker.min.mjs +21 -0
- package/dist/types/components/LayerAnnotationEditorTextSelectionItem.vue.d.ts +26 -0
- package/dist/types/components/LayerAnnotationEditorTextSelectionItemMenu.vue.d.ts +31 -0
- package/dist/types/components/VPdfViewer.vue.d.ts +16 -9
- package/dist/types/components/ui/button/index.d.ts +1 -1
- package/dist/types/components/ui/popover/PopoverContent.vue.d.ts +3 -3
- package/dist/types/composables/useAnnotationHighlight.d.ts +42 -1
- package/dist/types/composables/useAnnotationStrikethrough.d.ts +790 -0
- package/dist/types/composables/useAnnotationTextSelection.d.ts +30 -0
- package/dist/types/composables/useAnnotationUnderline.d.ts +790 -0
- package/dist/types/composables/usePlugins.d.ts +2 -1
- package/dist/types/composables/useVirtualPages.d.ts +12 -0
- package/dist/types/const.d.ts +734 -5
- package/dist/types/utils/types.d.ts +14 -3
- package/package.json +5 -4
- package/dist/index-Dz7QxyDX.js +0 -28020
- /package/dist/types/components/{HighlightColorPicker.vue.d.ts → AppColorPicker.vue.d.ts} +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AnnotationHighlight } from '@/utils/types';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
isSelected: boolean;
|
|
4
|
+
drawLayer: any | null;
|
|
5
|
+
element: HTMLElement | null;
|
|
6
|
+
annotation: AnnotationHighlight;
|
|
7
|
+
clipPathUrl: string;
|
|
8
|
+
outlineId: number;
|
|
9
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
isSelected: boolean;
|
|
11
|
+
drawLayer: any | null;
|
|
12
|
+
element: HTMLElement | null;
|
|
13
|
+
annotation: AnnotationHighlight;
|
|
14
|
+
clipPathUrl: string;
|
|
15
|
+
outlineId: number;
|
|
16
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
19
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
20
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
21
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
22
|
+
} : {
|
|
23
|
+
type: import('vue').PropType<T[K]>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { SelectionBounds } from '@/composables/useAnnotationTextSelection';
|
|
2
|
+
import type { AnnotationHighlight, AnnotationTextSelectionType } from '@/utils/types';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
open: boolean;
|
|
5
|
+
selectionBounds: SelectionBounds | null;
|
|
6
|
+
rotation: number;
|
|
7
|
+
annotation?: AnnotationHighlight | null | undefined;
|
|
8
|
+
color: string;
|
|
9
|
+
}>>, {
|
|
10
|
+
currentColor: import("vue").WritableComputedRef<string, string>;
|
|
11
|
+
handleSelect: (type: AnnotationTextSelectionType) => void;
|
|
12
|
+
handleClose: () => void;
|
|
13
|
+
handleDelete: () => void;
|
|
14
|
+
handleColorButtonClick: () => void;
|
|
15
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
16
|
+
open: boolean;
|
|
17
|
+
selectionBounds: SelectionBounds | null;
|
|
18
|
+
rotation: number;
|
|
19
|
+
annotation?: AnnotationHighlight | null | undefined;
|
|
20
|
+
color: string;
|
|
21
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
24
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
25
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
26
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
27
|
+
} : {
|
|
28
|
+
type: import('vue').PropType<T[K]>;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
|
|
1
2
|
import type { AnnotationEventPayload, TextLayerLoadedEventPayload, RotateEvent, ToolbarOptions, PdfProperties } from '@/utils/types';
|
|
2
3
|
import { ScrollMode, ViewMode, ZoomLevel } from '@/utils/enumerators';
|
|
3
4
|
import '../style.scss';
|
|
@@ -58,7 +59,9 @@ declare const _default: {
|
|
|
58
59
|
};
|
|
59
60
|
readonly localization: {
|
|
60
61
|
readonly type: import("vue").PropType<Record<string, Localization>>;
|
|
61
|
-
readonly default: () => Record<string, Localization>;
|
|
62
|
+
readonly default: () => Record<string, Localization>; /**
|
|
63
|
+
* Free & Freemium cannot utilize other props except `src`
|
|
64
|
+
*/
|
|
62
65
|
};
|
|
63
66
|
readonly initialSearch: {
|
|
64
67
|
readonly type: StringConstructor;
|
|
@@ -78,7 +81,7 @@ declare const _default: {
|
|
|
78
81
|
readonly default: undefined;
|
|
79
82
|
};
|
|
80
83
|
readonly plugins: {
|
|
81
|
-
readonly type: import("vue").PropType<import("@vue-pdf-viewer/shared").Plugin[]>;
|
|
84
|
+
readonly type: import("vue").PropType<import("@vue-pdf-viewer/shared").Plugin<PDFDocumentProxy>[]>;
|
|
82
85
|
readonly default: undefined;
|
|
83
86
|
};
|
|
84
87
|
readonly documentOptions: {
|
|
@@ -202,7 +205,7 @@ declare const _default: {
|
|
|
202
205
|
readonly localization: Record<string, Localization>;
|
|
203
206
|
readonly afterCanvasLoaded: Record<number, import("@/utils/types").CanvasLoadedCallback>;
|
|
204
207
|
readonly textHighlights: import("@/utils/types").TextHighlight[];
|
|
205
|
-
readonly plugins: import("@vue-pdf-viewer/shared").Plugin[];
|
|
208
|
+
readonly plugins: import("@vue-pdf-viewer/shared").Plugin<PDFDocumentProxy>[];
|
|
206
209
|
readonly documentOptions: import("@/utils/types").PDFDocumentOptions;
|
|
207
210
|
readonly downloadFilename: string;
|
|
208
211
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
@@ -267,7 +270,9 @@ declare const _default: {
|
|
|
267
270
|
};
|
|
268
271
|
readonly localization: {
|
|
269
272
|
readonly type: import("vue").PropType<Record<string, Localization>>;
|
|
270
|
-
readonly default: () => Record<string, Localization>;
|
|
273
|
+
readonly default: () => Record<string, Localization>; /**
|
|
274
|
+
* Free & Freemium cannot utilize other props except `src`
|
|
275
|
+
*/
|
|
271
276
|
};
|
|
272
277
|
readonly initialSearch: {
|
|
273
278
|
readonly type: StringConstructor;
|
|
@@ -287,7 +292,7 @@ declare const _default: {
|
|
|
287
292
|
readonly default: undefined;
|
|
288
293
|
};
|
|
289
294
|
readonly plugins: {
|
|
290
|
-
readonly type: import("vue").PropType<import("@vue-pdf-viewer/shared").Plugin[]>;
|
|
295
|
+
readonly type: import("vue").PropType<import("@vue-pdf-viewer/shared").Plugin<PDFDocumentProxy>[]>;
|
|
291
296
|
readonly default: undefined;
|
|
292
297
|
};
|
|
293
298
|
readonly documentOptions: {
|
|
@@ -383,7 +388,7 @@ declare const _default: {
|
|
|
383
388
|
readonly localization: Record<string, Localization>;
|
|
384
389
|
readonly afterCanvasLoaded: Record<number, import("@/utils/types").CanvasLoadedCallback>;
|
|
385
390
|
readonly textHighlights: import("@/utils/types").TextHighlight[];
|
|
386
|
-
readonly plugins: import("@vue-pdf-viewer/shared").Plugin[];
|
|
391
|
+
readonly plugins: import("@vue-pdf-viewer/shared").Plugin<PDFDocumentProxy>[];
|
|
387
392
|
readonly documentOptions: import("@/utils/types").PDFDocumentOptions;
|
|
388
393
|
readonly downloadFilename: string;
|
|
389
394
|
}>;
|
|
@@ -445,7 +450,9 @@ declare const _default: {
|
|
|
445
450
|
};
|
|
446
451
|
readonly localization: {
|
|
447
452
|
readonly type: import("vue").PropType<Record<string, Localization>>;
|
|
448
|
-
readonly default: () => Record<string, Localization>;
|
|
453
|
+
readonly default: () => Record<string, Localization>; /**
|
|
454
|
+
* Free & Freemium cannot utilize other props except `src`
|
|
455
|
+
*/
|
|
449
456
|
};
|
|
450
457
|
readonly initialSearch: {
|
|
451
458
|
readonly type: StringConstructor;
|
|
@@ -465,7 +472,7 @@ declare const _default: {
|
|
|
465
472
|
readonly default: undefined;
|
|
466
473
|
};
|
|
467
474
|
readonly plugins: {
|
|
468
|
-
readonly type: import("vue").PropType<import("@vue-pdf-viewer/shared").Plugin[]>;
|
|
475
|
+
readonly type: import("vue").PropType<import("@vue-pdf-viewer/shared").Plugin<PDFDocumentProxy>[]>;
|
|
469
476
|
readonly default: undefined;
|
|
470
477
|
};
|
|
471
478
|
readonly documentOptions: {
|
|
@@ -589,7 +596,7 @@ declare const _default: {
|
|
|
589
596
|
readonly localization: Record<string, Localization>;
|
|
590
597
|
readonly afterCanvasLoaded: Record<number, import("@/utils/types").CanvasLoadedCallback>;
|
|
591
598
|
readonly textHighlights: import("@/utils/types").TextHighlight[];
|
|
592
|
-
readonly plugins: import("@vue-pdf-viewer/shared").Plugin[];
|
|
599
|
+
readonly plugins: import("@vue-pdf-viewer/shared").Plugin<PDFDocumentProxy>[];
|
|
593
600
|
readonly documentOptions: import("@/utils/types").PDFDocumentOptions;
|
|
594
601
|
readonly downloadFilename: string;
|
|
595
602
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
@@ -2,6 +2,6 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
export { default as Button } from './Button.vue';
|
|
3
3
|
export declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "link" | "default" | "outline" | "destructive" | "secondary" | "ghost" | null | undefined;
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "icon" | "default" | "sm" | "lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
7
|
export type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
@@ -10,7 +10,7 @@ declare const _default: {
|
|
|
10
10
|
sideOffset: number;
|
|
11
11
|
}>>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
12
12
|
sideOffset: number;
|
|
13
|
-
align: "
|
|
13
|
+
align: "start" | "end" | "center";
|
|
14
14
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
15
15
|
P: {};
|
|
16
16
|
B: {};
|
|
@@ -27,7 +27,7 @@ declare const _default: {
|
|
|
27
27
|
sideOffset: number;
|
|
28
28
|
}>>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
29
29
|
sideOffset: number;
|
|
30
|
-
align: "
|
|
30
|
+
align: "start" | "end" | "center";
|
|
31
31
|
}>;
|
|
32
32
|
__isFragment?: undefined;
|
|
33
33
|
__isTeleport?: undefined;
|
|
@@ -41,7 +41,7 @@ declare const _default: {
|
|
|
41
41
|
sideOffset: number;
|
|
42
42
|
}>>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
43
43
|
sideOffset: number;
|
|
44
|
-
align: "
|
|
44
|
+
align: "start" | "end" | "center";
|
|
45
45
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
46
46
|
$slots: {
|
|
47
47
|
default: (_: {}) => any;
|
|
@@ -44,6 +44,12 @@ export declare const useAnnotationHighlight: (props: UseAnnotationHighlightProps
|
|
|
44
44
|
drawLayerId: number;
|
|
45
45
|
outlineId: number;
|
|
46
46
|
pageIndex?: number | undefined;
|
|
47
|
+
boxes?: {
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
width: number;
|
|
51
|
+
height: number;
|
|
52
|
+
}[] | undefined;
|
|
47
53
|
id: string | null;
|
|
48
54
|
annotationType: AnnotationType;
|
|
49
55
|
rotation: number;
|
|
@@ -372,6 +378,12 @@ export declare const useAnnotationHighlight: (props: UseAnnotationHighlightProps
|
|
|
372
378
|
drawLayerId: number;
|
|
373
379
|
outlineId: number;
|
|
374
380
|
pageIndex?: number | undefined;
|
|
381
|
+
boxes?: {
|
|
382
|
+
x: number;
|
|
383
|
+
y: number;
|
|
384
|
+
width: number;
|
|
385
|
+
height: number;
|
|
386
|
+
}[] | undefined;
|
|
375
387
|
id: string | null;
|
|
376
388
|
annotationType: AnnotationType;
|
|
377
389
|
rotation: number;
|
|
@@ -706,6 +718,35 @@ export declare const useAnnotationHighlight: (props: UseAnnotationHighlightProps
|
|
|
706
718
|
handleHighlightClick: (annotation: AnnotationHighlight) => void;
|
|
707
719
|
onSelectedHighlightColorUpdate: (color: string, annotation: AnnotationHighlight) => void;
|
|
708
720
|
handleHighlightRemove: (annotation: AnnotationHighlight) => void;
|
|
709
|
-
|
|
721
|
+
createHighlightFromBoxes: (boxes: Array<{
|
|
722
|
+
x: number;
|
|
723
|
+
y: number;
|
|
724
|
+
width: number;
|
|
725
|
+
height: number;
|
|
726
|
+
}>, text: string, showPopup?: boolean) => {
|
|
727
|
+
pageIndex: number;
|
|
728
|
+
id: string;
|
|
729
|
+
annotationType: AnnotationType;
|
|
730
|
+
quadPoints: Float32Array;
|
|
731
|
+
rect: number[];
|
|
732
|
+
color: Uint8ClampedArray;
|
|
733
|
+
hexColor: string;
|
|
734
|
+
drawLayerId: number;
|
|
735
|
+
outlineId: number;
|
|
736
|
+
rotation: number;
|
|
737
|
+
contents: string;
|
|
738
|
+
creationDate: string;
|
|
739
|
+
user: string;
|
|
740
|
+
popup: {
|
|
741
|
+
contents: string;
|
|
742
|
+
};
|
|
743
|
+
outlines: any[][];
|
|
744
|
+
boxes: {
|
|
745
|
+
x: number;
|
|
746
|
+
y: number;
|
|
747
|
+
width: number;
|
|
748
|
+
height: number;
|
|
749
|
+
}[];
|
|
750
|
+
};
|
|
710
751
|
};
|
|
711
752
|
export {};
|