@vue-pdf-viewer/viewer 4.2.0 → 4.3.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/dist/license.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./VPdfViewer.vue_vue_type_style_index_1_scoped_f3ec81b9_lang-BCpt_D_8.cjs");exports.LicenseProduct=e.L;exports.LicenseType=e.a;exports.useLicense=e.u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./VPdfViewer.vue_vue_type_style_index_1_scoped_d10ca785_lang-DuuxD2PM.cjs");exports.LicenseProduct=e.L;exports.LicenseType=e.a;exports.useLicense=e.u;
package/dist/license.js CHANGED
@@ -1,4 +1,4 @@
1
- import { L as a, a as c, u as L } from "./VPdfViewer.vue_vue_type_style_index_1_scoped_f3ec81b9_lang-D2_mw9CP.js";
1
+ import { L as a, a as c, u as L } from "./VPdfViewer.vue_vue_type_style_index_1_scoped_d10ca785_lang-CrxRkuYo.js";
2
2
  export {
3
3
  a as LicenseProduct,
4
4
  c as LicenseType,
@@ -2,7 +2,7 @@ import type { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
2
2
  import type { AnnotationEventPayload, TextLayerLoadedEventPayload, RotateEvent, ToolbarOptions, PdfProperties, PasswordRequiredPayload } from '@/utils/types';
3
3
  import { ScrollMode, SelectionMode, ViewMode, ZoomLevel } from '@/utils/enumerators';
4
4
  import '../style.scss';
5
- import { Localization, AnnotationStrikethroughColors, AnnotationHighlightColors, AnnotationUnderlineColors } from '@vue-pdf-viewer/shared';
5
+ import { Localization, AnnotationStrikethroughColors, AnnotationHighlightColors, AnnotationUnderlineColors, type XfdfImportResult, type Annotation } from '@vue-pdf-viewer/shared';
6
6
  declare const _default: {
7
7
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
8
8
  readonly src: {
@@ -208,6 +208,19 @@ declare const _default: {
208
208
  setFontColor: (color: string) => void;
209
209
  setFontSize: (size: number) => void;
210
210
  };
211
+ annotationXfdfControl: {
212
+ exportToXfdf: (options?: {
213
+ pdfFilename?: string;
214
+ download?: boolean;
215
+ }) => string;
216
+ importFromXfdf: (xfdfString: string) => XfdfImportResult;
217
+ };
218
+ annotationControl: {
219
+ getAnnotations: () => Annotation[];
220
+ clearAnnotations: () => void;
221
+ };
222
+ pdfDocument: import("vue").ShallowRef<PDFDocumentProxy | undefined, PDFDocumentProxy | undefined>;
223
+ totalPages: import("vue").Ref<number, number>;
211
224
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
212
225
  annotation: (data: AnnotationEventPayload) => void;
213
226
  } & {
@@ -472,6 +485,19 @@ declare const _default: {
472
485
  setFontColor: (color: string) => void;
473
486
  setFontSize: (size: number) => void;
474
487
  };
488
+ annotationXfdfControl: {
489
+ exportToXfdf: (options?: {
490
+ pdfFilename?: string;
491
+ download?: boolean;
492
+ }) => string;
493
+ importFromXfdf: (xfdfString: string) => XfdfImportResult;
494
+ };
495
+ annotationControl: {
496
+ getAnnotations: () => Annotation[];
497
+ clearAnnotations: () => void;
498
+ };
499
+ pdfDocument: import("vue").ShallowRef<PDFDocumentProxy | undefined, PDFDocumentProxy | undefined>;
500
+ totalPages: import("vue").Ref<number, number>;
475
501
  }, {}, {}, {}, {
476
502
  readonly workerUrl: string;
477
503
  readonly wasmUrl: string;
@@ -699,6 +725,19 @@ declare const _default: {
699
725
  setFontColor: (color: string) => void;
700
726
  setFontSize: (size: number) => void;
701
727
  };
728
+ annotationXfdfControl: {
729
+ exportToXfdf: (options?: {
730
+ pdfFilename?: string;
731
+ download?: boolean;
732
+ }) => string;
733
+ importFromXfdf: (xfdfString: string) => XfdfImportResult;
734
+ };
735
+ annotationControl: {
736
+ getAnnotations: () => Annotation[];
737
+ clearAnnotations: () => void;
738
+ };
739
+ pdfDocument: import("vue").ShallowRef<PDFDocumentProxy | undefined, PDFDocumentProxy | undefined>;
740
+ totalPages: import("vue").Ref<number, number>;
702
741
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
703
742
  annotation: (data: AnnotationEventPayload) => void;
704
743
  } & {
@@ -1,5 +1,5 @@
1
1
  import { type Ref } from 'vue';
2
- import { type AnnotationPluginApi } from '@vue-pdf-viewer/shared';
2
+ import { type AnnotationPluginApi, type Annotation } from '@vue-pdf-viewer/shared';
3
3
  import type { PDFDocumentProxy, PDFPageProxy } from 'pdfjs-dist/types/src/display/api';
4
4
  /**
5
5
  * Set the global annotation plugin API reference
@@ -65,6 +65,12 @@ export interface UseAnnotationStorageReturn {
65
65
  renderTrigger: Ref<number>;
66
66
  canvasRenderTrigger: Ref<number>;
67
67
  cancelBatchUpdate: () => void;
68
+ /** Bulk-insert parsed annotations into the editor storage map. Returns generated keys. */
69
+ bulkImportAnnotations: (annotations: Annotation[]) => string[];
70
+ /** Remove all editor annotations from storage. Returns count of cleared entries. */
71
+ clearAllAnnotations: () => number;
72
+ /** The active annotation plugin API, or null when the plugin is not loaded. */
73
+ pluginApi: Ref<AnnotationPluginApi | null>;
68
74
  ensureStorageInitialized: () => boolean;
69
75
  getEditorKey: () => string;
70
76
  getAnnotationById: (id: string) => any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue-pdf-viewer/viewer",
3
3
  "private": false,
4
- "version": "4.2.0",
4
+ "version": "4.3.0-beta.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -65,7 +65,7 @@
65
65
  "prepare": "husky"
66
66
  },
67
67
  "dependencies": {
68
- "@vue-pdf-viewer/shared": "1.5.0",
68
+ "@vue-pdf-viewer/shared": "1.6.0-rc.0",
69
69
  "@vueuse/core": "^13.6.0",
70
70
  "node-forge": "^1.3.2",
71
71
  "pdfjs-dist": "5.4.530",