@vue-pdf-viewer/viewer 3.8.0-beta.0 → 3.8.0-beta.1
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-DLtmGUpq.js → index-BFvkUr-W.js} +7284 -7178
- package/dist/{index-Bf0HX9JD.js → index-jEmzkFAm.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/index.umd.cjs +33 -33
- package/dist/types/composables/useAnnotationHighlight.d.ts +3 -28
- package/dist/types/composables/useAnnotationStrikethrough.d.ts +3 -28
- package/dist/types/composables/useAnnotationUnderline.d.ts +3 -28
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
1
|
+
import { Ref, ShallowRef } from 'vue';
|
|
2
2
|
import { AnnotationLayer, DrawLayer, PageViewport, PDFDocumentProxy, PDFPageProxy } from 'pdfjs-dist';
|
|
3
3
|
import { AnnotationType } from '@vue-pdf-viewer/shared';
|
|
4
4
|
import { AnnotationHighlight } from '@/utils/types';
|
|
@@ -9,35 +9,10 @@ interface UseAnnotationHighlightProps {
|
|
|
9
9
|
textLayer: Ref<HTMLDivElement>;
|
|
10
10
|
annotationLayer: Ref<AnnotationLayer>;
|
|
11
11
|
document: PDFDocumentProxy;
|
|
12
|
+
/** Shared DrawLayer from parent - ensures unique IDs across all text selection types */
|
|
13
|
+
sharedDrawLayer: ShallowRef<DrawLayer | null>;
|
|
12
14
|
}
|
|
13
15
|
export declare const useAnnotationHighlight: (props: UseAnnotationHighlightProps) => {
|
|
14
|
-
drawLayer: Ref<{
|
|
15
|
-
pageIndex: any;
|
|
16
|
-
setParent: (parent: any) => void;
|
|
17
|
-
draw: (properties: any, isPathUpdatable?: boolean | undefined, hasClip?: boolean | undefined) => {
|
|
18
|
-
id: number;
|
|
19
|
-
clipPathId: string;
|
|
20
|
-
};
|
|
21
|
-
drawOutline: (properties: any, mustRemoveSelfIntersections: any) => number;
|
|
22
|
-
finalizeDraw: (id: any, properties: any) => void;
|
|
23
|
-
updateProperties: (elementOrId: any, properties: any) => void;
|
|
24
|
-
updateParent: (id: any, layer: any) => void;
|
|
25
|
-
remove: (id: any) => void;
|
|
26
|
-
destroy: () => void;
|
|
27
|
-
} | null, DrawLayer | {
|
|
28
|
-
pageIndex: any;
|
|
29
|
-
setParent: (parent: any) => void;
|
|
30
|
-
draw: (properties: any, isPathUpdatable?: boolean | undefined, hasClip?: boolean | undefined) => {
|
|
31
|
-
id: number;
|
|
32
|
-
clipPathId: string;
|
|
33
|
-
};
|
|
34
|
-
drawOutline: (properties: any, mustRemoveSelfIntersections: any) => number;
|
|
35
|
-
finalizeDraw: (id: any, properties: any) => void;
|
|
36
|
-
updateProperties: (elementOrId: any, properties: any) => void;
|
|
37
|
-
updateParent: (id: any, layer: any) => void;
|
|
38
|
-
remove: (id: any) => void;
|
|
39
|
-
destroy: () => void;
|
|
40
|
-
} | null>;
|
|
41
16
|
isPrepared: Ref<boolean, boolean>;
|
|
42
17
|
highlightAnnotations: Ref<{
|
|
43
18
|
hexColor: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnnotationHighlight } from '@/utils/types';
|
|
2
2
|
import { AnnotationLayer, DrawLayer, PageViewport, PDFDocumentProxy, PDFPageProxy } from 'pdfjs-dist';
|
|
3
|
-
import { Ref } from 'vue';
|
|
3
|
+
import { Ref, ShallowRef } from 'vue';
|
|
4
4
|
import { AnnotationType } from '@vue-pdf-viewer/shared';
|
|
5
5
|
interface UseAnnotationStrikethroughProps {
|
|
6
6
|
page: Ref<PDFPageProxy>;
|
|
@@ -9,6 +9,8 @@ interface UseAnnotationStrikethroughProps {
|
|
|
9
9
|
textLayer: Ref<HTMLDivElement>;
|
|
10
10
|
annotationLayer: Ref<AnnotationLayer>;
|
|
11
11
|
document: PDFDocumentProxy;
|
|
12
|
+
/** Shared DrawLayer from parent - ensures unique IDs across all text selection types */
|
|
13
|
+
sharedDrawLayer: ShallowRef<DrawLayer | null>;
|
|
12
14
|
}
|
|
13
15
|
interface StrikethroughAnnotation extends AnnotationHighlight {
|
|
14
16
|
isAddedNew?: boolean;
|
|
@@ -696,33 +698,6 @@ export declare const useAnnotationStrikethrough: (props: UseAnnotationStrikethro
|
|
|
696
698
|
drawLayerId: number;
|
|
697
699
|
strikethroughSvg?: SVGSVGElement | undefined;
|
|
698
700
|
}>>;
|
|
699
|
-
drawLayer: Ref<{
|
|
700
|
-
pageIndex: any;
|
|
701
|
-
setParent: (parent: any) => void;
|
|
702
|
-
draw: (properties: any, isPathUpdatable?: boolean | undefined, hasClip?: boolean | undefined) => {
|
|
703
|
-
id: number;
|
|
704
|
-
clipPathId: string;
|
|
705
|
-
};
|
|
706
|
-
drawOutline: (properties: any, mustRemoveSelfIntersections: any) => number;
|
|
707
|
-
finalizeDraw: (id: any, properties: any) => void;
|
|
708
|
-
updateProperties: (elementOrId: any, properties: any) => void;
|
|
709
|
-
updateParent: (id: any, layer: any) => void;
|
|
710
|
-
remove: (id: any) => void;
|
|
711
|
-
destroy: () => void;
|
|
712
|
-
} | null, DrawLayer | {
|
|
713
|
-
pageIndex: any;
|
|
714
|
-
setParent: (parent: any) => void;
|
|
715
|
-
draw: (properties: any, isPathUpdatable?: boolean | undefined, hasClip?: boolean | undefined) => {
|
|
716
|
-
id: number;
|
|
717
|
-
clipPathId: string;
|
|
718
|
-
};
|
|
719
|
-
drawOutline: (properties: any, mustRemoveSelfIntersections: any) => number;
|
|
720
|
-
finalizeDraw: (id: any, properties: any) => void;
|
|
721
|
-
updateProperties: (elementOrId: any, properties: any) => void;
|
|
722
|
-
updateParent: (id: any, layer: any) => void;
|
|
723
|
-
remove: (id: any) => void;
|
|
724
|
-
destroy: () => void;
|
|
725
|
-
} | null>;
|
|
726
701
|
isPrepared: Ref<boolean, boolean>;
|
|
727
702
|
prepareStrikethroughElements: (editorActive: boolean) => Promise<void>;
|
|
728
703
|
createStrikethroughFromBoxes: (boxes: Array<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnnotationHighlight } from '@/utils/types';
|
|
2
2
|
import { AnnotationLayer, DrawLayer, PageViewport, PDFDocumentProxy, PDFPageProxy } from 'pdfjs-dist';
|
|
3
|
-
import { Ref } from 'vue';
|
|
3
|
+
import { Ref, ShallowRef } from 'vue';
|
|
4
4
|
import { AnnotationType } from '@vue-pdf-viewer/shared';
|
|
5
5
|
interface UseAnnotationUnderlineProps {
|
|
6
6
|
page: Ref<PDFPageProxy>;
|
|
@@ -9,6 +9,8 @@ interface UseAnnotationUnderlineProps {
|
|
|
9
9
|
textLayer: Ref<HTMLDivElement>;
|
|
10
10
|
annotationLayer: Ref<AnnotationLayer>;
|
|
11
11
|
document: PDFDocumentProxy;
|
|
12
|
+
/** Shared DrawLayer from parent - ensures unique IDs across all text selection types */
|
|
13
|
+
sharedDrawLayer: ShallowRef<DrawLayer | null>;
|
|
12
14
|
}
|
|
13
15
|
interface UnderlineAnnotation extends AnnotationHighlight {
|
|
14
16
|
isAddedNew?: boolean;
|
|
@@ -696,33 +698,6 @@ export declare const useAnnotationUnderline: (props: UseAnnotationUnderlineProps
|
|
|
696
698
|
drawLayerId: number;
|
|
697
699
|
underlineSvg?: SVGSVGElement | undefined;
|
|
698
700
|
}>>;
|
|
699
|
-
drawLayer: Ref<{
|
|
700
|
-
pageIndex: any;
|
|
701
|
-
setParent: (parent: any) => void;
|
|
702
|
-
draw: (properties: any, isPathUpdatable?: boolean | undefined, hasClip?: boolean | undefined) => {
|
|
703
|
-
id: number;
|
|
704
|
-
clipPathId: string;
|
|
705
|
-
};
|
|
706
|
-
drawOutline: (properties: any, mustRemoveSelfIntersections: any) => number;
|
|
707
|
-
finalizeDraw: (id: any, properties: any) => void;
|
|
708
|
-
updateProperties: (elementOrId: any, properties: any) => void;
|
|
709
|
-
updateParent: (id: any, layer: any) => void;
|
|
710
|
-
remove: (id: any) => void;
|
|
711
|
-
destroy: () => void;
|
|
712
|
-
} | null, DrawLayer | {
|
|
713
|
-
pageIndex: any;
|
|
714
|
-
setParent: (parent: any) => void;
|
|
715
|
-
draw: (properties: any, isPathUpdatable?: boolean | undefined, hasClip?: boolean | undefined) => {
|
|
716
|
-
id: number;
|
|
717
|
-
clipPathId: string;
|
|
718
|
-
};
|
|
719
|
-
drawOutline: (properties: any, mustRemoveSelfIntersections: any) => number;
|
|
720
|
-
finalizeDraw: (id: any, properties: any) => void;
|
|
721
|
-
updateProperties: (elementOrId: any, properties: any) => void;
|
|
722
|
-
updateParent: (id: any, layer: any) => void;
|
|
723
|
-
remove: (id: any) => void;
|
|
724
|
-
destroy: () => void;
|
|
725
|
-
} | null>;
|
|
726
701
|
isPrepared: Ref<boolean, boolean>;
|
|
727
702
|
prepareUnderlineElements: (editorActive: boolean) => Promise<void>;
|
|
728
703
|
createUnderlineFromBoxes: (boxes: Array<{
|