@vue-pdf-viewer/viewer 3.7.0-beta.7 → 3.7.0-rc.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-D5Vct58x.js → index-CkNfIVah.js} +1 -1
- package/dist/index-DIDvNOvh.js +28053 -0
- package/dist/index.js +2 -2
- package/dist/index.umd.cjs +37 -37
- package/dist/types/components/VPdfViewer.vue.d.ts +6 -7
- 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 +1 -43
- package/dist/types/composables/useAnnotationStorage.d.ts +0 -9
- package/dist/types/composables/usePlugins.d.ts +1 -2
- package/dist/types/composables/useVirtualPages.d.ts +0 -12
- package/dist/types/const.d.ts +5 -734
- package/dist/types/utils/color.d.ts +0 -5
- package/dist/types/utils/types.d.ts +3 -14
- package/package.json +4 -5
- package/dist/index-CYad3DaA.js +0 -29500
- package/dist/lib/assets/pdf-legacy/pdf.worker.min.mjs +0 -21
- package/dist/lib/assets/pdf.worker.min.mjs +0 -21
- package/dist/types/components/LayerAnnotationEditorTextSelectionItem.vue.d.ts +0 -26
- package/dist/types/components/LayerAnnotationEditorTextSelectionItemMenu.vue.d.ts +0 -31
- package/dist/types/composables/useAnnotationStrikethrough.d.ts +0 -790
- package/dist/types/composables/useAnnotationTextSelection.d.ts +0 -30
- package/dist/types/composables/useAnnotationUnderline.d.ts +0 -790
- /package/dist/types/components/{AppColorPicker.vue.d.ts → HighlightColorPicker.vue.d.ts} +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
|
|
2
1
|
import type { AnnotationEventPayload, TextLayerLoadedEventPayload, RotateEvent, ToolbarOptions, PdfProperties } from '@/utils/types';
|
|
3
2
|
import { ScrollMode, ViewMode, ZoomLevel } from '@/utils/enumerators';
|
|
4
3
|
import '../style.scss';
|
|
@@ -79,7 +78,7 @@ declare const _default: {
|
|
|
79
78
|
readonly default: undefined;
|
|
80
79
|
};
|
|
81
80
|
readonly plugins: {
|
|
82
|
-
readonly type: import("vue").PropType<import("@vue-pdf-viewer/shared").Plugin
|
|
81
|
+
readonly type: import("vue").PropType<import("@vue-pdf-viewer/shared").Plugin[]>;
|
|
83
82
|
readonly default: undefined;
|
|
84
83
|
};
|
|
85
84
|
readonly documentOptions: {
|
|
@@ -203,7 +202,7 @@ declare const _default: {
|
|
|
203
202
|
readonly localization: Record<string, Localization>;
|
|
204
203
|
readonly afterCanvasLoaded: Record<number, import("@/utils/types").CanvasLoadedCallback>;
|
|
205
204
|
readonly textHighlights: import("@/utils/types").TextHighlight[];
|
|
206
|
-
readonly plugins: import("@vue-pdf-viewer/shared").Plugin
|
|
205
|
+
readonly plugins: import("@vue-pdf-viewer/shared").Plugin[];
|
|
207
206
|
readonly documentOptions: import("@/utils/types").PDFDocumentOptions;
|
|
208
207
|
readonly downloadFilename: string;
|
|
209
208
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
@@ -288,7 +287,7 @@ declare const _default: {
|
|
|
288
287
|
readonly default: undefined;
|
|
289
288
|
};
|
|
290
289
|
readonly plugins: {
|
|
291
|
-
readonly type: import("vue").PropType<import("@vue-pdf-viewer/shared").Plugin
|
|
290
|
+
readonly type: import("vue").PropType<import("@vue-pdf-viewer/shared").Plugin[]>;
|
|
292
291
|
readonly default: undefined;
|
|
293
292
|
};
|
|
294
293
|
readonly documentOptions: {
|
|
@@ -384,7 +383,7 @@ declare const _default: {
|
|
|
384
383
|
readonly localization: Record<string, Localization>;
|
|
385
384
|
readonly afterCanvasLoaded: Record<number, import("@/utils/types").CanvasLoadedCallback>;
|
|
386
385
|
readonly textHighlights: import("@/utils/types").TextHighlight[];
|
|
387
|
-
readonly plugins: import("@vue-pdf-viewer/shared").Plugin
|
|
386
|
+
readonly plugins: import("@vue-pdf-viewer/shared").Plugin[];
|
|
388
387
|
readonly documentOptions: import("@/utils/types").PDFDocumentOptions;
|
|
389
388
|
readonly downloadFilename: string;
|
|
390
389
|
}>;
|
|
@@ -466,7 +465,7 @@ declare const _default: {
|
|
|
466
465
|
readonly default: undefined;
|
|
467
466
|
};
|
|
468
467
|
readonly plugins: {
|
|
469
|
-
readonly type: import("vue").PropType<import("@vue-pdf-viewer/shared").Plugin
|
|
468
|
+
readonly type: import("vue").PropType<import("@vue-pdf-viewer/shared").Plugin[]>;
|
|
470
469
|
readonly default: undefined;
|
|
471
470
|
};
|
|
472
471
|
readonly documentOptions: {
|
|
@@ -590,7 +589,7 @@ declare const _default: {
|
|
|
590
589
|
readonly localization: Record<string, Localization>;
|
|
591
590
|
readonly afterCanvasLoaded: Record<number, import("@/utils/types").CanvasLoadedCallback>;
|
|
592
591
|
readonly textHighlights: import("@/utils/types").TextHighlight[];
|
|
593
|
-
readonly plugins: import("@vue-pdf-viewer/shared").Plugin
|
|
592
|
+
readonly plugins: import("@vue-pdf-viewer/shared").Plugin[];
|
|
594
593
|
readonly documentOptions: import("@/utils/types").PDFDocumentOptions;
|
|
595
594
|
readonly downloadFilename: string;
|
|
596
595
|
}, {}, 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?: "default" | "icon" | "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: "center" | "start" | "end";
|
|
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: "center" | "start" | "end";
|
|
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: "center" | "start" | "end";
|
|
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,12 +44,6 @@ 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;
|
|
53
47
|
id: string | null;
|
|
54
48
|
annotationType: AnnotationType;
|
|
55
49
|
rotation: number;
|
|
@@ -378,12 +372,6 @@ export declare const useAnnotationHighlight: (props: UseAnnotationHighlightProps
|
|
|
378
372
|
drawLayerId: number;
|
|
379
373
|
outlineId: number;
|
|
380
374
|
pageIndex?: number | undefined;
|
|
381
|
-
boxes?: {
|
|
382
|
-
x: number;
|
|
383
|
-
y: number;
|
|
384
|
-
width: number;
|
|
385
|
-
height: number;
|
|
386
|
-
}[] | undefined;
|
|
387
375
|
id: string | null;
|
|
388
376
|
annotationType: AnnotationType;
|
|
389
377
|
rotation: number;
|
|
@@ -718,36 +706,6 @@ export declare const useAnnotationHighlight: (props: UseAnnotationHighlightProps
|
|
|
718
706
|
handleHighlightClick: (annotation: AnnotationHighlight) => void;
|
|
719
707
|
onSelectedHighlightColorUpdate: (color: string, annotation: AnnotationHighlight) => void;
|
|
720
708
|
handleHighlightRemove: (annotation: AnnotationHighlight) => void;
|
|
721
|
-
|
|
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
|
-
};
|
|
751
|
-
prepareHighlightElements: (editorActive?: boolean) => Promise<void>;
|
|
709
|
+
handleTextSelection: () => void;
|
|
752
710
|
};
|
|
753
711
|
export {};
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
|
-
import { type AnnotationPluginApi } from '@vue-pdf-viewer/shared';
|
|
3
2
|
import type { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
|
|
4
|
-
/**
|
|
5
|
-
* Set the global annotation plugin API reference
|
|
6
|
-
* Called from usePlugins when the plugin is registered
|
|
7
|
-
*/
|
|
8
|
-
export declare const setGlobalAnnotationPluginApi: (api: AnnotationPluginApi | null) => void;
|
|
9
3
|
/**
|
|
10
4
|
* Annotation Storage Composable with Automatic Save Support
|
|
11
5
|
*
|
|
@@ -56,10 +50,7 @@ export interface UseAnnotationStorageReturn {
|
|
|
56
50
|
}>) => void;
|
|
57
51
|
setAnnotationValue: (key: string, value: any, serialized?: boolean) => void;
|
|
58
52
|
hasModifications: () => boolean;
|
|
59
|
-
/** Save all annotations including underline/strikethrough (main entry point) */
|
|
60
53
|
saveAnnotationsToDocument: (documentProxy: PDFDocumentProxy) => Promise<Uint8Array | null>;
|
|
61
|
-
/** Save only regular PDF.js annotations (Highlight, FreeText, Stamp, Widget) */
|
|
62
|
-
saveAnnotationsToDocumentSimplified: (documentProxy: PDFDocumentProxy) => Promise<Uint8Array | null>;
|
|
63
54
|
cleanAnnotationStorage: () => void;
|
|
64
55
|
validateAnnotationData: (annotationData: any) => boolean;
|
|
65
56
|
renderTrigger: Ref<number>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ComputedRef, type Reactive, type ComponentInternalInstance, type Ref } from 'vue';
|
|
2
2
|
import { type Localization, type PluginItem, type Plugin } from '@vue-pdf-viewer/shared';
|
|
3
|
-
|
|
4
|
-
declare const usePlugins: (instance: ComponentInternalInstance, plugins?: Reactive<Plugin<PDFDocumentProxy>[]>, viewerLocalization?: ComputedRef<Localization>, pdfDocument?: Ref<PDFDocumentProxy | undefined>, originalPdfBytes?: Ref<Uint8Array | null>) => {
|
|
3
|
+
declare const usePlugins: (instance: ComponentInternalInstance, plugins?: Reactive<Plugin[]>, viewerLocalization?: ComputedRef<Localization>) => {
|
|
5
4
|
sidebarItems: Ref<PluginItem[]>;
|
|
6
5
|
annotationMounted: Ref<boolean>;
|
|
7
6
|
};
|
|
@@ -27,18 +27,6 @@ export interface UseVirtualListReturn {
|
|
|
27
27
|
}) => Promise<void>;
|
|
28
28
|
pageVisibleAreas: Ref<Map<number, VisibleArea>>;
|
|
29
29
|
currentPageIndex: Ref<number>;
|
|
30
|
-
/**
|
|
31
|
-
* The focused page number (1-indexed) adjusted for view mode.
|
|
32
|
-
* Handles DualPage and DualPageWithCover offsets automatically.
|
|
33
|
-
* Use this instead of currentPageIndex for UI display.
|
|
34
|
-
*/
|
|
35
|
-
focusedPageNumber: ComputedRef<number>;
|
|
36
|
-
/**
|
|
37
|
-
* True during programmatic scroll (scrollTo).
|
|
38
|
-
* Used to prevent scroll events from updating focusedPageNumber
|
|
39
|
-
* until the scroll animation settles.
|
|
40
|
-
*/
|
|
41
|
-
isScrollSettling: Ref<boolean>;
|
|
42
30
|
}
|
|
43
31
|
interface UseVirtualPagesProps {
|
|
44
32
|
pages: Ref<ViewerPdfPage[]>;
|