@vue-pdf-viewer/viewer 4.3.0-beta.4 → 4.3.0-rc.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_8748e302_lang-W7bQl_oR.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_8748e302_lang-DklZ_CZ-.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_8748e302_lang-DjfnNAmK.js";
1
+ import { L as a, a as c, u as L } from "./VPdfViewer.vue_vue_type_style_index_1_scoped_8748e302_lang-DFcLx3sM.js";
2
2
  export {
3
3
  a as LicenseProduct,
4
4
  c as LicenseType,
@@ -10,7 +10,7 @@ declare const _default: {
10
10
  sideOffset: number;
11
11
  }>>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
12
12
  sideOffset: number;
13
- align: "start" | "center" | "end";
13
+ align: "start" | "end" | "center";
14
14
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
15
15
  P: {};
16
16
  B: {};
@@ -27,7 +27,7 @@ declare const _default: {
27
27
  sideOffset: number;
28
28
  }>>> & Readonly<{}>, {}, {}, {}, {}, {
29
29
  sideOffset: number;
30
- align: "start" | "center" | "end";
30
+ align: "start" | "end" | "center";
31
31
  }>;
32
32
  __isFragment?: undefined;
33
33
  __isTeleport?: undefined;
@@ -41,7 +41,7 @@ declare const _default: {
41
41
  sideOffset: number;
42
42
  }>>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
43
43
  sideOffset: number;
44
- align: "start" | "center" | "end";
44
+ align: "start" | "end" | "center";
45
45
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
46
46
  $slots: {
47
47
  default: (_: {}) => any;
@@ -36,6 +36,19 @@ export declare function quadPointsToBoxesForRect(quadPoints: number[], rect: num
36
36
  width: number;
37
37
  height: number;
38
38
  }[];
39
+ /**
40
+ * Reconstruct PDF-coordinate highlight `outlines` from `quadPoints` + `rect`.
41
+ *
42
+ * PDF.js's print/appearance generator (HighlightAnnotation.createNewAppearanceStream)
43
+ * iterates the `outlines` field; a highlight without it throws "n is not iterable",
44
+ * blanking the whole print preview. Highlights imported from XFDF carry only
45
+ * `quadPoints`, so this rebuilds the missing `outlines` using the same outline
46
+ * machinery as tool-created highlights — but normalized against the rect, so no live
47
+ * viewport/DOM is required (safe to call from the print path).
48
+ *
49
+ * @returns serialized outlines (array of point arrays in PDF coords), or null if input is unusable.
50
+ */
51
+ export declare function buildHighlightOutlines(quadPoints: ArrayLike<number> | null | undefined, rect: ArrayLike<number> | null | undefined): number[][] | null;
39
52
  /**
40
53
  * Get selection boxes from text layer with proper rotation handling.
41
54
  * Adapted from PDF.js display/editor/tools.js
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue-pdf-viewer/viewer",
3
3
  "private": false,
4
- "version": "4.3.0-beta.4",
4
+ "version": "4.3.0-rc.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.6.0-rc.1",
68
+ "@vue-pdf-viewer/shared": "1.6.0",
69
69
  "@vueuse/core": "^13.6.0",
70
70
  "node-forge": "^1.3.2",
71
71
  "pdfjs-dist": "5.4.530",
@@ -129,4 +129,4 @@
129
129
  "pnpm": ">=8.8.0",
130
130
  "yarn": ">=1.20.0"
131
131
  }
132
- }
132
+ }