@borurio-print/print-designer 1.0.27 → 1.0.28

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,4 +1,4 @@
1
- import { i as Mc, a as Ic, f as Bs, g as Rs, r as Ec, b as Cc, c as zu, d as Fc, e as jc, J as Oc, Q as Bc, l as Rc, h as Tc, j as nf, T as Dc, k as qc, m as Uc } from "./index-D-dyV9yP.js";
1
+ import { i as Mc, a as Ic, f as Bs, g as Rs, r as Ec, b as Cc, c as zu, d as Fc, e as jc, J as Oc, Q as Bc, l as Rc, h as Tc, j as nf, T as Dc, k as qc, m as Uc } from "./index-Bs5sZuzY.js";
2
2
  function xe(r) {
3
3
  "@babel/helpers - typeof";
4
4
  return xe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
@@ -8800,7 +8800,7 @@ endobj\r
8800
8800
  var d = f.getContext("2d");
8801
8801
  d.fillStyle = "#fff", d.fillRect(0, 0, f.width, f.height);
8802
8802
  var g = { ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0 }, x = this;
8803
- return (Jt.canvg ? Promise.resolve(Jt.canvg) : import("./index.es-BvMnr9eR.js")).catch(function(N) {
8803
+ return (Jt.canvg ? Promise.resolve(Jt.canvg) : import("./index.es-Ct2iyXSe.js")).catch(function(N) {
8804
8804
  return Promise.reject(new Error("Could not load canvg: " + N));
8805
8805
  }).then(function(N) {
8806
8806
  return N.default ? N.default : N;
@@ -9624,11 +9624,11 @@ function E2(r, t, e) {
9624
9624
  if (!e.trim()) return;
9625
9625
  const n = Rc(t, e), s = t.xMm + t.widthMm / 2, a = t.yMm + t.heightMm / 2;
9626
9626
  Zn(r, t.rotation, s, a, () => {
9627
- r.save(), r.beginPath(), r.rect(t.xMm, t.yMm, t.widthMm, t.heightMm), r.clip(), iu(r, n.fontSizeMm, t.fontWeight), r.fillStyle = "#000000", r.textBaseline = "top", r.textAlign = n.textAnchor === "middle" ? "center" : n.textAnchor === "end" ? "right" : "left", n.lines.forEach((c, u) => {
9627
+ r.save(), r.beginPath(), r.rect(t.xMm, t.yMm, t.widthMm, t.heightMm), r.clip(), iu(r, n.fontSizeMm, t.fontWeight), r.fillStyle = "#000000", r.textBaseline = "alphabetic", r.textAlign = n.textAnchor === "middle" ? "center" : n.textAnchor === "end" ? "right" : "left", n.lines.forEach((c, u) => {
9628
9628
  r.fillText(
9629
9629
  c || " ",
9630
9630
  t.xMm + n.textXOffsetMm,
9631
- t.yMm + n.textYOffsetMm + u * n.lineHeightMm
9631
+ t.yMm + n.textBaselineOffsetMm + u * n.lineHeightMm
9632
9632
  );
9633
9633
  }), r.restore();
9634
9634
  });
@@ -8,7 +8,8 @@ export interface TextBoxLayoutResult {
8
8
  truncated: boolean;
9
9
  textAnchor: 'start' | 'middle' | 'end';
10
10
  textXOffsetMm: number;
11
- textYOffsetMm: number;
11
+ /** 第一行文字的 alphabetic baseline,相对文本框顶部的偏移。 */
12
+ textBaselineOffsetMm: number;
12
13
  }
13
14
  export interface TextBoxInitialSize {
14
15
  widthMm: number;