@component-hook/pdf-canvas 1.3.2-alpha.0 → 1.4.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.
@@ -187,7 +187,7 @@ const xe = () => Oo || (Oo = { document, window, isTouchSupported: "ontouchstart
187
187
  const { perfLimitSizeTotal: t } = q, e = Math.sqrt(t * a);
188
188
  return [Math.floor(e), Math.floor(t / e)];
189
189
  }
190
- }(), mr = "6.9.0";
190
+ }(), mr = "6.9.1";
191
191
  function rs() {
192
192
  }
193
193
  const Ve = Math.PI / 2, Fe = 2 * Math.PI, Hr = Math.PI / 180, Bt = Object.freeze([1, 0, 0, 1, 0, 0]), zr = 16, Be = 0.4477152502, X = "center", J = "left", Wt = "top", br = "bottom", ut = "right", It = "none", Gr = /\r?\n/, Ga = "moving", wn = "scaling", Va = "rotating", Vr = "rotate", Xa = "skewing", oi = "resizing", ic = "modifyPoly", nc = "modifyPath", en = "changed", xn = "scale", Ht = "scaleX", Kt = "scaleY", Is = "skewX", Ns = "skewY", vt = "fill", Nt = "stroke", sn = "modified", vs = "json", Yn = "svg", F = new class {
@@ -4022,6 +4022,13 @@ class Er extends Dn {
4022
4022
  }
4023
4023
  return this._groupSelector = null, !0;
4024
4024
  }
4025
+ toCanvasElement() {
4026
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1, e = arguments.length > 1 ? arguments[1] : void 0;
4027
+ const { upper: s } = this.elements;
4028
+ s.ctx = void 0;
4029
+ const i = super.toCanvasElement(t, e);
4030
+ return s.ctx = s.el.getContext("2d"), i;
4031
+ }
4025
4032
  clear() {
4026
4033
  this.textEditingManager.clear(), super.clear();
4027
4034
  }
@@ -4759,7 +4766,7 @@ class Ct extends tl {
4759
4766
  t.fillStyle = e, this._removeShadow(t);
4760
4767
  }
4761
4768
  _measureChar(t, e, s, i) {
4762
- const n = Zs.getFontCache(e), r = this._getFontDeclaration(e), o = s + t, h = s && r === this._getFontDeclaration(i), l = e.fontSize / this.CACHE_FONT_SIZE;
4769
+ const n = Zs.getFontCache(e), r = this._getFontDeclaration(e), o = s ? s + t : t, h = s && r === this._getFontDeclaration(i), l = e.fontSize / this.CACHE_FONT_SIZE;
4763
4770
  let c, u, d, f;
4764
4771
  if (s && n.has(s) && (d = n.get(s)), n.has(t) && (f = c = n.get(t)), h && n.has(o) && (u = n.get(o), f = u - d), c === void 0 || d === void 0 || u === void 0) {
4765
4772
  const g = (function() {