@vue-pdf-viewer/viewer 3.8.0-beta.4 → 3.8.0-beta.6

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,5 @@
1
1
  import type { PDFDocumentProxy } from 'pdfjs-dist';
2
2
  import type { AnnotationEventPayload } from '@/utils/types';
3
3
  declare const EVENTS_TO_HANDLER: string[];
4
- declare function annotationEventsHandler(evt: Event, PDFDoc: PDFDocumentProxy, Annotations: Object[], viewerRotation: number): AnnotationEventPayload | Promise<AnnotationEventPayload | undefined> | undefined;
4
+ declare function annotationEventsHandler(evt: Event, PDFDoc: PDFDocumentProxy, Annotations: Object[], viewerRotation: number, annotationStorage?: any): AnnotationEventPayload | Promise<AnnotationEventPayload | undefined> | undefined;
5
5
  export { EVENTS_TO_HANDLER, annotationEventsHandler };
@@ -1,6 +1,6 @@
1
1
  import { type Ref } from 'vue';
2
2
  import { type AnnotationPluginApi } from '@vue-pdf-viewer/shared';
3
- import type { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
3
+ import type { PDFDocumentProxy, PDFPageProxy } from 'pdfjs-dist/types/src/display/api';
4
4
  /**
5
5
  * Set the global annotation plugin API reference
6
6
  * Called from usePlugins when the plugin is registered
@@ -71,6 +71,18 @@ export interface UseAnnotationStorageReturn {
71
71
  findEditorAnnotationKey: (annotationId: string) => string | undefined;
72
72
  }
73
73
  export declare const getGlobalStorageEntries: () => unknown[];
74
+ /**
75
+ * Pre-set noView flag for Underline/StrikeOut annotations before canvas rendering.
76
+ * This prevents race condition where canvas renders these annotations before
77
+ * LayerAnnotationEditor has a chance to hide them.
78
+ *
79
+ * Why this is needed:
80
+ * - Highlight annotations are supported by PDF.js for editing, so they respond to isEditing flag
81
+ * - Underline (type 10) and StrikeOut (type 12) are NOT supported by PDF.js for editing
82
+ * - PDF.js renders them on canvas but does NOT respond to isEditing flag
83
+ * - We need to set noView: true BEFORE canvas rendering starts
84
+ */
85
+ export declare function prepareTextMarkupAnnotationsForCanvas(pageProxy: PDFPageProxy, isTextSelectionActive: boolean): Promise<void>;
74
86
  /**
75
87
  * Creates a serializable version of the annotation data
76
88
  * @param value - The annotation data to serialize
@@ -34,8 +34,8 @@ export declare const PERCENTAGE = 100;
34
34
  export declare const MIN_ZOOM_SCALE = 0.25;
35
35
  export declare const MAX_ZOOM_SCALE = 10;
36
36
  export declare const DEFAULT_SCALE_DELTA = 1.1;
37
- export declare const ANNOTATION_OUTLINE_BORDER_WIDTH = 0;
38
- export declare const ANNOTATION_OUTLINE_INNER_MARGIN = 0;
37
+ export declare const ANNOTATION_OUTLINE_BORDER_WIDTH = 0.0025;
38
+ export declare const ANNOTATION_OUTLINE_INNER_MARGIN = 0.00025;
39
39
  export declare const TEXT_MARKUP_LINE_THICKNESS = 0.15;
40
40
  export declare const SCROLL_BAR_WIDTH = 20;
41
41
  export declare const PAGE_PADDING = 1;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue-pdf-viewer/viewer",
3
3
  "private": false,
4
- "version": "3.8.0-beta.4",
4
+ "version": "3.8.0-beta.6",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.cjs",
7
7
  "module": "./dist/index.js",