@pixldocs/canvas-renderer 0.5.206 → 0.5.207

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.
@@ -6968,6 +6968,18 @@ function applyTextBackground(obj, cfg) {
6968
6968
  bg.rxBR ?? 0,
6969
6969
  bg.rxBL ?? 0
6970
6970
  ) : null;
6971
+ let shearTransform = null;
6972
+ if (isShear) {
6973
+ const fs = this.fontSize || 16;
6974
+ const ep = tpAny.endpoints;
6975
+ const dL = fs * 1.5;
6976
+ const dR = fs * 0.5;
6977
+ const lY = ep && Number.isFinite(ep.leftY) ? ep.leftY : dL;
6978
+ const rY = ep && Number.isFinite(ep.rightY) ? ep.rightY : dR;
6979
+ const slope = w > 0 ? (rY - lY) / w : 0;
6980
+ const dy = (lY + rY) / 2 - h / 2;
6981
+ shearTransform = { slope, dy };
6982
+ }
6971
6983
  let bgBounds;
6972
6984
  let bgRectsForFill = null;
6973
6985
  if (ribbonD) {
@@ -6978,6 +6990,9 @@ function applyTextBackground(obj, cfg) {
6978
6990
  }
6979
6991
  if (blockShadowActive && bg.shadowAffectsBg !== false) {
6980
6992
  ctx.save();
6993
+ if (shearTransform) {
6994
+ ctx.transform(1, shearTransform.slope, 0, 1, 0, shearTransform.dy);
6995
+ }
6981
6996
  ctx.fillStyle = bg.shadowColor;
6982
6997
  for (let i = blockSteps; i >= 1; i--) {
6983
6998
  ctx.save();
@@ -7010,6 +7025,9 @@ function applyTextBackground(obj, cfg) {
7010
7025
  }
7011
7026
  if (lineShadowActive && bg.shadowAffectsBg !== false) {
7012
7027
  ctx.save();
7028
+ if (shearTransform) {
7029
+ ctx.transform(1, shearTransform.slope, 0, 1, 0, shearTransform.dy);
7030
+ }
7013
7031
  ctx.translate(extOX, extOY);
7014
7032
  ctx.strokeStyle = bg.shadowColor;
7015
7033
  ctx.lineWidth = 1;
@@ -7046,16 +7064,8 @@ function applyTextBackground(obj, cfg) {
7046
7064
  } catch {
7047
7065
  }
7048
7066
  } else {
7049
- if (isShear) {
7050
- const fs = this.fontSize || 16;
7051
- const ep = tpAny.endpoints;
7052
- const dL = fs * 1.5;
7053
- const dR = fs * 0.5;
7054
- const lY = ep && Number.isFinite(ep.leftY) ? ep.leftY : dL;
7055
- const rY = ep && Number.isFinite(ep.rightY) ? ep.rightY : dR;
7056
- const slope = w > 0 ? (rY - lY) / w : 0;
7057
- const dy = (lY + rY) / 2 - h / 2;
7058
- ctx.transform(1, slope, 0, 1, 0, dy);
7067
+ if (shearTransform) {
7068
+ ctx.transform(1, shearTransform.slope, 0, 1, 0, shearTransform.dy);
7059
7069
  }
7060
7070
  const rects = bgRectsForFill;
7061
7071
  for (const r of rects) {
@@ -18924,9 +18934,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
18924
18934
  }
18925
18935
  return svgString;
18926
18936
  }
18927
- const resolvedPackageVersion = "0.5.206";
18937
+ const resolvedPackageVersion = "0.5.207";
18928
18938
  const PACKAGE_VERSION = resolvedPackageVersion;
18929
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.206";
18939
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.207";
18930
18940
  const roundParityValue = (value) => {
18931
18941
  if (typeof value !== "number") return value;
18932
18942
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -19605,7 +19615,7 @@ class PixldocsRenderer {
19605
19615
  await this.waitForCanvasScene(container, cloned, i);
19606
19616
  }
19607
19617
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
19608
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CyNCzRhQ.js");
19618
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-HZVoeZf3.js");
19609
19619
  const prepared = preparePagesForExport(
19610
19620
  cloned.pages,
19611
19621
  canvasWidth,
@@ -21789,7 +21799,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
21789
21799
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
21790
21800
  sanitizeSvgTreeForPdf(svgToDraw);
21791
21801
  try {
21792
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CyNCzRhQ.js");
21802
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-HZVoeZf3.js");
21793
21803
  try {
21794
21804
  await logTextMeasurementDiagnostic(svgToDraw);
21795
21805
  } catch {
@@ -22189,4 +22199,4 @@ export {
22189
22199
  buildTeaserBlurFlatKeys as y,
22190
22200
  collectFontDescriptorsFromConfig as z
22191
22201
  };
22192
- //# sourceMappingURL=index-CyxNh5Y9.js.map
22202
+ //# sourceMappingURL=index-D4Dis-kD.js.map