@pixldocs/canvas-renderer 0.5.259 → 0.5.260

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.
@@ -13481,6 +13481,12 @@ const PageCanvas = forwardRef(
13481
13481
  const isXSide = corner === "ml" || corner === "mr";
13482
13482
  const sAxis = isXSide ? Math.abs(obj.scaleX ?? 1) : Math.abs(obj.scaleY ?? 1);
13483
13483
  if (sAxis > 1e-3) {
13484
+ const asW0 = obj.width ?? 0;
13485
+ const asH0 = obj.height ?? 0;
13486
+ const asSx0 = obj.scaleX ?? 1;
13487
+ const asSy0 = obj.scaleY ?? 1;
13488
+ const asLeft0 = obj.left ?? 0;
13489
+ const asTop0 = obj.top ?? 0;
13484
13490
  for (const child of obj.getObjects()) {
13485
13491
  if (!(child instanceof fabric.Textbox)) continue;
13486
13492
  if (isXSide) {
@@ -13490,7 +13496,8 @@ const PageCanvas = forwardRef(
13490
13496
  const origW = child.__asLiveOrigW;
13491
13497
  const newW = Math.max(20, origW * sAxis);
13492
13498
  if (Math.abs((child.width ?? 0) - newW) > 0.5) {
13493
- child.set({ width: newW, scaleX: 1 / sAxis });
13499
+ child._set("width", newW);
13500
+ child._set("scaleX", 1 / sAxis);
13494
13501
  try {
13495
13502
  child.initDimensions();
13496
13503
  } catch {
@@ -13504,7 +13511,7 @@ const PageCanvas = forwardRef(
13504
13511
  const origH = child.__asLiveOrigH;
13505
13512
  const newH = Math.max(20, origH * sAxis);
13506
13513
  child.minBoxHeight = newH;
13507
- child.set({ scaleY: 1 / sAxis });
13514
+ child._set("scaleY", 1 / sAxis);
13508
13515
  try {
13509
13516
  child.initDimensions();
13510
13517
  } catch {
@@ -13512,6 +13519,13 @@ const PageCanvas = forwardRef(
13512
13519
  child.dirty = true;
13513
13520
  }
13514
13521
  }
13522
+ obj._set("width", asW0);
13523
+ obj._set("height", asH0);
13524
+ obj._set("scaleX", asSx0);
13525
+ obj._set("scaleY", asSy0);
13526
+ obj._set("left", asLeft0);
13527
+ obj._set("top", asTop0);
13528
+ obj.setCoords();
13515
13529
  }
13516
13530
  }
13517
13531
  snapDuringScaleCallback(obj, corner);
@@ -23528,9 +23542,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
23528
23542
  }
23529
23543
  return svgString;
23530
23544
  }
23531
- const resolvedPackageVersion = "0.5.259";
23545
+ const resolvedPackageVersion = "0.5.260";
23532
23546
  const PACKAGE_VERSION = resolvedPackageVersion;
23533
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.259";
23547
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.260";
23534
23548
  const roundParityValue = (value) => {
23535
23549
  if (typeof value !== "number") return value;
23536
23550
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -24344,7 +24358,7 @@ class PixldocsRenderer {
24344
24358
  await this.waitForCanvasScene(container, cloned, i);
24345
24359
  }
24346
24360
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
24347
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CNA_nPL_.js");
24361
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-D4Vl-GPD.js");
24348
24362
  const prepared = preparePagesForExport(
24349
24363
  cloned.pages,
24350
24364
  canvasWidth,
@@ -26664,7 +26678,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
26664
26678
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
26665
26679
  sanitizeSvgTreeForPdf(svgToDraw);
26666
26680
  try {
26667
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CNA_nPL_.js");
26681
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-D4Vl-GPD.js");
26668
26682
  try {
26669
26683
  await logTextMeasurementDiagnostic(svgToDraw);
26670
26684
  } catch {
@@ -27064,4 +27078,4 @@ export {
27064
27078
  buildTeaserBlurFlatKeys as y,
27065
27079
  collectFontDescriptorsFromConfig as z
27066
27080
  };
27067
- //# sourceMappingURL=index-DhFcz1Sq.js.map
27081
+ //# sourceMappingURL=index-Dh9WY10e.js.map