@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
|
@@ -2,7 +2,7 @@ import { ComputedRef, MaybeRef, PropType, Reactive, Ref } from 'vue';
|
|
|
2
2
|
import type { PageViewport, RenderTask } from 'pdfjs-dist';
|
|
3
3
|
import type { DocumentInitParameters, OnProgressParameters, PDFDataRangeTransport, TextContent, TypedArray, PDFPageProxy, PDFDocumentProxy, RenderParameters } from 'pdfjs-dist/types/src/display/api';
|
|
4
4
|
import type { Metadata } from 'pdfjs-dist/types/src/display/metadata';
|
|
5
|
-
import type { Annotation } from '@vue-pdf-viewer/shared';
|
|
5
|
+
import type { Annotation, AnnotationToolOption, TextSelectionOption } from '@vue-pdf-viewer/shared';
|
|
6
6
|
import { ZoomLevel, ViewMode, ScrollMode, VPVAnnotationType, LicenseType, LicenseProduct } from './enumerators';
|
|
7
7
|
import { Localization, Plugin, AnnotationType } from '@vue-pdf-viewer/shared';
|
|
8
8
|
export interface VirtualRange {
|
|
@@ -36,6 +36,7 @@ export interface PageShowRatioChangePayload {
|
|
|
36
36
|
ratio: number;
|
|
37
37
|
}
|
|
38
38
|
export type AnnotationIconType = keyof typeof AnnotationType | 'Signature';
|
|
39
|
+
export type AnnotationTextSelectionType = 'highlight' | 'underline' | 'strikethrough';
|
|
39
40
|
export interface AnnotationEventPayload {
|
|
40
41
|
type: VPVAnnotationType;
|
|
41
42
|
data: any;
|
|
@@ -421,7 +422,7 @@ export interface VPdfViewerProps {
|
|
|
421
422
|
/**
|
|
422
423
|
* The plugins to be used in the VPV.
|
|
423
424
|
*/
|
|
424
|
-
plugins?: Plugin[];
|
|
425
|
+
plugins?: Plugin<PDFDocumentProxy>[];
|
|
425
426
|
/**
|
|
426
427
|
* Document loading options for configuring how the PDF is fetched and loaded.
|
|
427
428
|
* Controls chunk size, streaming, and auto-fetch behavior.
|
|
@@ -459,6 +460,8 @@ export interface PdfProperties {
|
|
|
459
460
|
pdfVersion: string;
|
|
460
461
|
pageCount?: number;
|
|
461
462
|
}
|
|
463
|
+
export type TextSelectionMenuOption = Pick<TextSelectionOption, 'highlight' | 'underline' | 'strikethrough'>;
|
|
464
|
+
export type TextSelectionMenuItemOption = AnnotationToolOption;
|
|
462
465
|
export declare const VPVBaseProps: {
|
|
463
466
|
readonly src: {
|
|
464
467
|
readonly type: PropType<string | VPVSrc>;
|
|
@@ -537,7 +540,7 @@ export declare const VPVBaseProps: {
|
|
|
537
540
|
readonly default: undefined;
|
|
538
541
|
};
|
|
539
542
|
readonly plugins: {
|
|
540
|
-
readonly type: PropType<Plugin[]>;
|
|
543
|
+
readonly type: PropType<Plugin<PDFDocumentProxy>[]>;
|
|
541
544
|
readonly default: undefined;
|
|
542
545
|
};
|
|
543
546
|
readonly documentOptions: {
|
|
@@ -702,7 +705,15 @@ export interface AnnotationHighlight extends Annotation {
|
|
|
702
705
|
drawLayerId: number;
|
|
703
706
|
outlineId: number;
|
|
704
707
|
pageIndex?: number;
|
|
708
|
+
boxes?: Array<{
|
|
709
|
+
x: number;
|
|
710
|
+
y: number;
|
|
711
|
+
width: number;
|
|
712
|
+
height: number;
|
|
713
|
+
}>;
|
|
705
714
|
}
|
|
715
|
+
export type AnnotationUnderline = AnnotationHighlight;
|
|
716
|
+
export type AnnotationStrikethrough = AnnotationHighlight;
|
|
706
717
|
export interface AnnotationStamp extends Annotation {
|
|
707
718
|
hasOwnCanvas: boolean;
|
|
708
719
|
originalAnnotation?: any;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-pdf-viewer/viewer",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.7.0-beta.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.umd.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"vue pdf viewer",
|
|
22
22
|
"web component",
|
|
23
23
|
"vue-pdf",
|
|
24
|
-
"vue-pdf-viewer
|
|
24
|
+
"vue-pdf-viewer",
|
|
25
25
|
"pdf-viewer",
|
|
26
26
|
"nuxt-pdf"
|
|
27
27
|
],
|
|
28
|
-
"author": "Vue PDF Viewer <
|
|
28
|
+
"author": "Vue PDF Viewer <support@vue-pdf-viewer.dev>",
|
|
29
29
|
"license": "See license section",
|
|
30
30
|
"homepage": "https://www.vue-pdf-viewer.dev",
|
|
31
31
|
"url": "https://github.com/vue-pdf-viewer/vue-pdf-viewer",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"prepare": "husky"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@vue-pdf-viewer/shared": "1.
|
|
63
|
+
"@vue-pdf-viewer/shared": "1.2.0-rc.10",
|
|
64
64
|
"@vueuse/core": "^13.6.0",
|
|
65
65
|
"node-forge": "^1.3.2",
|
|
66
66
|
"pdfjs-dist": "4.10.38",
|
|
@@ -106,6 +106,7 @@
|
|
|
106
106
|
"unocss-preset-shadcn": "^0.3.1",
|
|
107
107
|
"vite": "^5.2.8",
|
|
108
108
|
"vite-plugin-node-polyfills": "^0.21.0",
|
|
109
|
+
"vite-plugin-static-copy": "^3.1.2",
|
|
109
110
|
"vite-svg-loader": "^5.1.0",
|
|
110
111
|
"vitest": "^3.2.4",
|
|
111
112
|
"vitest-browser-vue": "^1.1.0",
|