@chialab/pdfjs-lib 1.0.0-alpha.23 → 1.0.0-alpha.24

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.
@@ -25273,7 +25273,10 @@ var SvgCanvasContext = class {
25273
25273
  this._currentStyle.miterLimit = value;
25274
25274
  }
25275
25275
  getNode() {
25276
- return this._root;
25276
+ if (typeof structuredClone === "function") {
25277
+ return structuredClone(this._root);
25278
+ }
25279
+ return JSON.parse(JSON.stringify(this._root));
25277
25280
  }
25278
25281
  resize(width, height) {
25279
25282
  this._width = width;
@@ -26019,6 +26022,8 @@ var SvgCanvasContext = class {
26019
26022
  this._currentMarked = null;
26020
26023
  this._currentPosition = {};
26021
26024
  this._transformMatrix = new DOMMatrix();
26025
+ this._root.children = [];
26026
+ this._defs.children = [];
26022
26027
  this._parents.clear();
26023
26028
  }
26024
26029
  };
@@ -24317,7 +24317,10 @@ var SvgCanvasContext = class {
24317
24317
  this._currentStyle.miterLimit = value;
24318
24318
  }
24319
24319
  getNode() {
24320
- return this._root;
24320
+ if (typeof structuredClone === "function") {
24321
+ return structuredClone(this._root);
24322
+ }
24323
+ return JSON.parse(JSON.stringify(this._root));
24321
24324
  }
24322
24325
  resize(width, height) {
24323
24326
  this._width = width;
@@ -25063,6 +25066,8 @@ var SvgCanvasContext = class {
25063
25066
  this._currentMarked = null;
25064
25067
  this._currentPosition = {};
25065
25068
  this._transformMatrix = new DOMMatrix();
25069
+ this._root.children = [];
25070
+ this._defs.children = [];
25066
25071
  this._parents.clear();
25067
25072
  }
25068
25073
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chialab/pdfjs-lib",
3
3
  "description": "A custom Mozilla's PDF.js build with better Node support and extras.",
4
- "version": "1.0.0-alpha.23",
4
+ "version": "1.0.0-alpha.24",
5
5
  "type": "module",
6
6
  "author": "Chialab <dev@chialab.it>",
7
7
  "license": "MIT",