@pixldocs/canvas-renderer 0.5.405 → 0.5.406

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.
@@ -13240,6 +13240,24 @@ const PageCanvas = forwardRef(
13240
13240
  var _a2, _b2, _c2;
13241
13241
  const active = target instanceof fabric.ActiveSelection ? target : fabricCanvas.getActiveObject();
13242
13242
  if (!(active instanceof fabric.ActiveSelection)) return;
13243
+ try {
13244
+ const asScaleX = Math.abs(active.scaleX ?? 1);
13245
+ const asScaleY = Math.abs(active.scaleY ?? 1);
13246
+ if (Math.abs(asScaleX - 1) > 1e-4 || Math.abs(asScaleY - 1) > 1e-4) {
13247
+ const newW = Math.max(1, (active.width ?? 0) * asScaleX);
13248
+ const newH = Math.max(1, (active.height ?? 0) * asScaleY);
13249
+ active.set({ width: newW, height: newH, scaleX: 1, scaleY: 1 });
13250
+ active.setCoords();
13251
+ const ct = fabricCanvas._currentTransform;
13252
+ if (ct && ct.target === active && ct.original) {
13253
+ ct.original.scaleX = 1;
13254
+ ct.original.scaleY = 1;
13255
+ ct.original.width = newW;
13256
+ ct.original.height = newH;
13257
+ }
13258
+ }
13259
+ } catch {
13260
+ }
13243
13261
  if (!activeSelectionMoveStartRef.current || activeSelectionMoveStartRef.current.selection !== active) {
13244
13262
  const rect2 = active.getBoundingRect();
13245
13263
  activeSelectionMoveStartRef.current = {
@@ -25138,9 +25156,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
25138
25156
  }
25139
25157
  return svgString;
25140
25158
  }
25141
- const resolvedPackageVersion = "0.5.405";
25159
+ const resolvedPackageVersion = "0.5.406";
25142
25160
  const PACKAGE_VERSION = resolvedPackageVersion;
25143
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.405";
25161
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.406";
25144
25162
  const roundParityValue = (value) => {
25145
25163
  if (typeof value !== "number") return value;
25146
25164
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -25954,7 +25972,7 @@ class PixldocsRenderer {
25954
25972
  await this.waitForCanvasScene(container, cloned, i);
25955
25973
  }
25956
25974
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
25957
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-C3La67Vw.js");
25975
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BSFv6jYQ.js");
25958
25976
  const prepared = preparePagesForExport(
25959
25977
  cloned.pages,
25960
25978
  canvasWidth,
@@ -28274,7 +28292,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
28274
28292
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
28275
28293
  sanitizeSvgTreeForPdf(svgToDraw);
28276
28294
  try {
28277
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-C3La67Vw.js");
28295
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-BSFv6jYQ.js");
28278
28296
  try {
28279
28297
  await logTextMeasurementDiagnostic(svgToDraw);
28280
28298
  } catch {
@@ -28674,4 +28692,4 @@ export {
28674
28692
  buildTeaserBlurFlatKeys as y,
28675
28693
  collectFontDescriptorsFromConfig as z
28676
28694
  };
28677
- //# sourceMappingURL=index-A1mT_rQo.js.map
28695
+ //# sourceMappingURL=index-D-UEBi3B.js.map