@vue-pdf-viewer/viewer 2.5.0-beta.1 → 2.5.0-beta.11

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.
Files changed (36) hide show
  1. package/dist/assets/pdf-annotations/altText_add.svg +3 -0
  2. package/dist/assets/pdf-annotations/altText_disclaimer.svg +3 -0
  3. package/dist/assets/pdf-annotations/altText_done.svg +3 -0
  4. package/dist/assets/pdf-annotations/altText_spinner.svg +30 -0
  5. package/dist/assets/pdf-annotations/altText_warning.svg +3 -0
  6. package/dist/assets/pdf-annotations/annotation-check.svg +11 -0
  7. package/dist/assets/pdf-annotations/annotation-comment.svg +16 -0
  8. package/dist/assets/pdf-annotations/annotation-help.svg +26 -0
  9. package/dist/assets/pdf-annotations/annotation-insert.svg +10 -0
  10. package/dist/assets/pdf-annotations/annotation-key.svg +11 -0
  11. package/dist/assets/pdf-annotations/annotation-newparagraph.svg +11 -0
  12. package/dist/assets/pdf-annotations/annotation-noicon.svg +7 -0
  13. package/dist/assets/pdf-annotations/annotation-note.svg +42 -0
  14. package/dist/assets/pdf-annotations/annotation-paperclip.svg +6 -0
  15. package/dist/assets/pdf-annotations/annotation-paragraph.svg +16 -0
  16. package/dist/assets/pdf-annotations/annotation-pushpin.svg +7 -0
  17. package/dist/assets/pdf-annotations/cursor-editorFreeHighlight.svg +6 -0
  18. package/dist/assets/pdf-annotations/cursor-editorFreeText.svg +3 -0
  19. package/dist/assets/pdf-annotations/cursor-editorInk.svg +4 -0
  20. package/dist/assets/pdf-annotations/cursor-editorTextHighlight.svg +8 -0
  21. package/dist/assets/pdf-annotations/editor-toolbar-delete.svg +5 -0
  22. package/dist/assets/pdf-annotations/loading-icon.gif +0 -0
  23. package/dist/assets/pdf-annotations/messageBar_closingButton.svg +3 -0
  24. package/dist/assets/pdf-annotations/messageBar_warning.svg +3 -0
  25. package/dist/assets/pdf-annotations/secondaryToolbarButton-documentProperties.svg +3 -0
  26. package/dist/assets/pdf-annotations/toolbarButton-editorHighlight.svg +6 -0
  27. package/dist/assets/pdf-annotations/toolbarButton-menuArrow.svg +3 -0
  28. package/dist/index.js +5801 -5718
  29. package/dist/index.umd.cjs +16 -16
  30. package/dist/types/assets/pdf-annotations/index.d.ts +33 -0
  31. package/dist/types/components/VPdfComments.vue.d.ts +2 -0
  32. package/dist/types/components/ui/popover/PopoverContent.vue.d.ts +3 -3
  33. package/dist/types/composables/useVirtualPages.d.ts +2 -2
  34. package/dist/types/const.d.ts +3 -1
  35. package/dist/types/utils/types.d.ts +7 -0
  36. package/package.json +2 -2
@@ -0,0 +1,33 @@
1
+ declare let annoImageResourcesPath: string;
2
+ declare const annoImageResources: {
3
+ annotationNoicon: string;
4
+ annotationNote: string;
5
+ annotationPaperclip: string;
6
+ annotationParagraph: string;
7
+ annotationPushpin: string;
8
+ annotationKey: string;
9
+ annotationInsert: string;
10
+ annotationHelp: string;
11
+ annotationComment: string;
12
+ annotationCheck: string;
13
+ altTextWarning: string;
14
+ altTextSpinner: string;
15
+ altTextDone: string;
16
+ altTextDisclaimer: string;
17
+ altTextAdd: string;
18
+ cursorEditorTextHighlight: string;
19
+ cursorEditorInk: string;
20
+ cursorEditorFreeText: string;
21
+ cursorEditorFreeHighlight: string;
22
+ editorToolbarDelete: string;
23
+ loadingIcon: string;
24
+ messageBarWarning: string;
25
+ messageBarClosingButton: string;
26
+ secondaryToolbarButtonDocumentProperties: string;
27
+ toolbarButtonMenuArrow: string;
28
+ toolbarButtonEditorHighlight: string;
29
+ };
30
+ declare const annotationImageResources: Record<string, string>;
31
+ declare let annotationImageResourcesPath: string;
32
+ export { annoImageResources, annotationImageResources, annotationImageResourcesPath };
33
+ export default annoImageResourcesPath;
@@ -1,5 +1,6 @@
1
1
  import type { PdfCommentPage } from '@/utils/types';
2
2
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
3
+ height: string | number;
3
4
  repliedCommentPages: PdfCommentPage[] | undefined;
4
5
  }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
6
  navigate: (target: {
@@ -7,6 +8,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
7
8
  rect: [number, number, number, number];
8
9
  }) => void;
9
10
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
11
+ height: string | number;
10
12
  repliedCommentPages: PdfCommentPage[] | undefined;
11
13
  }>>> & Readonly<{
12
14
  onNavigate?: ((target: {
@@ -9,7 +9,7 @@ declare const _default: {
9
9
  sideOffset: number;
10
10
  }>>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
11
11
  sideOffset: number;
12
- align: "end" | "center" | "start";
12
+ align: "start" | "end" | "center";
13
13
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
14
14
  P: {};
15
15
  B: {};
@@ -25,7 +25,7 @@ declare const _default: {
25
25
  sideOffset: number;
26
26
  }>>> & Readonly<{}>, {}, {}, {}, {}, {
27
27
  sideOffset: number;
28
- align: "end" | "center" | "start";
28
+ align: "start" | "end" | "center";
29
29
  }>;
30
30
  __isFragment?: undefined;
31
31
  __isTeleport?: undefined;
@@ -38,7 +38,7 @@ declare const _default: {
38
38
  sideOffset: number;
39
39
  }>>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
40
40
  sideOffset: number;
41
- align: "end" | "center" | "start";
41
+ align: "start" | "end" | "center";
42
42
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
43
43
  $slots: {
44
44
  default: (_: {}) => any;
@@ -1,5 +1,5 @@
1
1
  import { ComputedRef, CSSProperties, Ref, StyleValue, UnwrapRef } from 'vue';
2
- import type { ViewerPdfPage, VirtualRange } from '@/utils/types';
2
+ import type { ViewerPdfPage, VirtualRange, ElementRect } from '@/utils/types';
3
3
  import { ScrollMode, ViewMode } from '@/utils/enumerators';
4
4
  interface UseVirtualListItem<T> {
5
5
  data: T;
@@ -7,7 +7,7 @@ interface UseVirtualListItem<T> {
7
7
  }
8
8
  export interface UseVirtualListReturn {
9
9
  list: Ref<UseVirtualListItem<ViewerPdfPage>[]>;
10
- scrollTo: (index: number, rect?: [number, number, number, number]) => void;
10
+ scrollTo: (index: number, rect?: ElementRect) => void;
11
11
  pageGroups: ComputedRef<Array<UseVirtualListItem<ViewerPdfPage>[]> | undefined>;
12
12
  containerProps: {
13
13
  ref: Ref<HTMLElement | null>;
@@ -1,6 +1,6 @@
1
1
  import { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
2
2
  import type { PDFPageProxy } from 'pdfjs-dist/types/web/interfaces';
3
- import type { InjectionKey, Slot, Ref, ComponentPublicInstance, ShallowRef, ComputedRef } from 'vue';
3
+ import type { InjectionKey, Slot, Ref, ComponentPublicInstance, ShallowRef, Reactive, ComputedRef } from 'vue';
4
4
  import type { HighlightMatchPosition, HighlightOptions, Localization, NormalizedKeyword, Offset, PdfProperties, ToolbarOptions, ViewerPdfPage, Comment } from './utils/types';
5
5
  import { LicenseType, ScrollMode, ViewMode, ZoomLevel } from './components';
6
6
  export declare const DEFAULT_TOOLBAR_OPTIONS: ToolbarOptions;
@@ -28,6 +28,7 @@ export declare const SCROLL_BAR_WIDTH = 20;
28
28
  export declare const PAGE_PADDING = 1;
29
29
  export declare const PAGE_OFFSET = 0;
30
30
  export declare const LAST_PAGE_OFFSET = 4;
31
+ export declare const SEARCH_MAX_HEIGHT = 97;
31
32
  export declare const FILE_INPUT: InjectionKey<Ref<ComponentPublicInstance<import("vue").DefineComponent<{}, {
32
33
  triggerClick: () => void;
33
34
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -102,3 +103,4 @@ export declare const PDF_COMMENTS: InjectionKey<{
102
103
  comments: Map<number, Comment[]>;
103
104
  repliedCommentPages: import("./components").PdfCommentPage[];
104
105
  }>;
106
+ export declare const ANNOTATION_CANVAS_MAP: InjectionKey<Reactive<Map<string, HTMLCanvasElement>>>;
@@ -7,6 +7,12 @@ export interface VirtualRange {
7
7
  start: number;
8
8
  end: number;
9
9
  }
10
+ export interface ElementRect {
11
+ left: number;
12
+ top: number;
13
+ width: number;
14
+ height: number;
15
+ }
10
16
  export interface Match {
11
17
  start: {
12
18
  idx: number;
@@ -19,6 +25,7 @@ export interface Match {
19
25
  str: string;
20
26
  oIndex: number;
21
27
  pageIndex: number;
28
+ rect: ElementRect;
22
29
  }
23
30
  export type LoadedEventPayload = number;
24
31
  export type FocusedPageEventPayload = number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue-pdf-viewer/viewer",
3
3
  "private": false,
4
- "version": "2.5.0-beta.1",
4
+ "version": "2.5.0-beta.11",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.cjs",
7
7
  "module": "./dist/index.js",
@@ -111,4 +111,4 @@
111
111
  "pnpm": ">=8.8.0",
112
112
  "yarn": ">=1.20.0"
113
113
  }
114
- }
114
+ }