@vue-pdf-viewer/viewer 3.7.0-beta.2 → 3.7.0-beta.3

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.
@@ -1,5 +1,11 @@
1
1
  import { type Ref } from 'vue';
2
+ import { type AnnotationPluginApi } from '@vue-pdf-viewer/shared';
2
3
  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;
3
9
  /**
4
10
  * Annotation Storage Composable with Automatic Save Support
5
11
  *
@@ -50,7 +56,10 @@ export interface UseAnnotationStorageReturn {
50
56
  }>) => void;
51
57
  setAnnotationValue: (key: string, value: any, serialized?: boolean) => void;
52
58
  hasModifications: () => boolean;
59
+ /** Save all annotations including underline/strikethrough (main entry point) */
53
60
  saveAnnotationsToDocument: (documentProxy: PDFDocumentProxy) => Promise<Uint8Array | null>;
61
+ /** Save only regular PDF.js annotations (Highlight, FreeText, Stamp, Widget) */
62
+ saveAnnotationsToDocumentSimplified: (documentProxy: PDFDocumentProxy) => Promise<Uint8Array | null>;
54
63
  cleanAnnotationStorage: () => void;
55
64
  validateAnnotationData: (annotationData: any) => boolean;
56
65
  renderTrigger: Ref<number>;
@@ -2,3 +2,8 @@ export declare const makeHexColor: (r: number, g: number, b: number) => string;
2
2
  export declare const uint8ClampedArrayToRgb: (color: Uint8ClampedArray | number[]) => number[];
3
3
  export declare function rgbToUint8ClampedArray(hexColor: string): number[];
4
4
  export declare function hexToUint8ClampedArray(hexColor: string): Uint8ClampedArray;
5
+ export declare function hexToRgb(hexColor: string): {
6
+ r: number;
7
+ g: number;
8
+ b: number;
9
+ } | null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue-pdf-viewer/viewer",
3
3
  "private": false,
4
- "version": "3.7.0-beta.2",
4
+ "version": "3.7.0-beta.3",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.cjs",
7
7
  "module": "./dist/index.js",
@@ -60,7 +60,7 @@
60
60
  "prepare": "husky"
61
61
  },
62
62
  "dependencies": {
63
- "@vue-pdf-viewer/shared": "1.2.0-rc.10",
63
+ "@vue-pdf-viewer/shared": "1.2.0-rc.11",
64
64
  "@vueuse/core": "^13.6.0",
65
65
  "node-forge": "^1.3.2",
66
66
  "pdfjs-dist": "4.10.38",