@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.
@@ -447,7 +447,7 @@ const Ce = () => Wo || (Wo = { document, window, isTouchSupported: "ontouchstart
447
447
  const { perfLimitSizeTotal: t } = tt, e = Math.sqrt(t * a);
448
448
  return [Math.floor(e), Math.floor(t / e)];
449
449
  }
450
- }(), yr = "6.9.0";
450
+ }(), yr = "6.9.1";
451
451
  function os() {
452
452
  }
453
453
  const We = Math.PI / 2, Ne = 2 * Math.PI, Vr = Math.PI / 180, Gt = Object.freeze([1, 0, 0, 1, 0, 0]), Wr = 16, He = 0.4477152502, $ = "center", et = "left", qt = "top", _r = "bottom", pt = "right", Bt = "none", Xr = /\r?\n/, th = "moving", Tn = "scaling", eh = "rotating", Ur = "rotate", sh = "skewing", ci = "resizing", fc = "modifyPoly", gc = "modifyPath", an = "changed", En = "scale", Vt = "scaleX", te = "scaleY", Ns = "skewX", js = "skewY", wt = "fill", Ht = "stroke", hn = "modified", vs = "json", Kn = "svg", L = new class {
@@ -4282,6 +4282,13 @@ class Pr extends Nn {
4282
4282
  }
4283
4283
  return this._groupSelector = null, !0;
4284
4284
  }
4285
+ toCanvasElement() {
4286
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1, e = arguments.length > 1 ? arguments[1] : void 0;
4287
+ const { upper: s } = this.elements;
4288
+ s.ctx = void 0;
4289
+ const i = super.toCanvasElement(t, e);
4290
+ return s.ctx = s.el.getContext("2d"), i;
4291
+ }
4285
4292
  clear() {
4286
4293
  this.textEditingManager.clear(), super.clear();
4287
4294
  }
@@ -5019,7 +5026,7 @@ class kt extends dl {
5019
5026
  t.fillStyle = e, this._removeShadow(t);
5020
5027
  }
5021
5028
  _measureChar(t, e, s, i) {
5022
- const n = si.getFontCache(e), r = this._getFontDeclaration(e), o = s + t, h = s && r === this._getFontDeclaration(i), l = e.fontSize / this.CACHE_FONT_SIZE;
5029
+ const n = si.getFontCache(e), r = this._getFontDeclaration(e), o = s ? s + t : t, h = s && r === this._getFontDeclaration(i), l = e.fontSize / this.CACHE_FONT_SIZE;
5023
5030
  let c, u, d, f;
5024
5031
  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) {
5025
5032
  const g = (function() {
@@ -22521,10 +22528,14 @@ function lp(a) {
22521
22528
  };
22522
22529
  }
22523
22530
  function cp(a) {
22524
- const t = ws(0), e = Wg(() => {
22525
- t.current !== window.innerWidth && (t.current = window.innerWidth, a());
22526
- });
22527
- Js(() => (window.addEventListener("resize", e), () => window.removeEventListener("resize", e)), []);
22531
+ const t = ws(0);
22532
+ return Js(() => {
22533
+ const e = Wg(() => {
22534
+ const { innerWidth: s } = globalThis;
22535
+ s !== t.current && (t.current = s, a());
22536
+ });
22537
+ return t.current = window.innerWidth, window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
22538
+ }, []), null;
22528
22539
  }
22529
22540
  const gp = Ql(up);
22530
22541
  function up({