@pixldocs/canvas-renderer 0.5.407 → 0.5.408

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.
@@ -13251,19 +13251,13 @@ const PageCanvas = forwardRef(
13251
13251
  const liveDeltaY = Math.abs(rawScaleY / originalScaleY);
13252
13252
  const hasResidualOriginal = Math.abs(Math.abs(originalScaleX) - 1) > 1e-4 || Math.abs(Math.abs(originalScaleY) - 1) > 1e-4;
13253
13253
  const hasNoLiveDragDelta = Math.abs(liveDeltaX - 1) < 5e-4 && Math.abs(liveDeltaY - 1) < 5e-4;
13254
- const canBakeResidual = (ct == null ? void 0 : ct.target) === active ? hasResidualOriginal && hasNoLiveDragDelta : Math.abs(Math.abs(rawScaleX) - 1) > 1e-4 || Math.abs(Math.abs(rawScaleY) - 1) > 1e-4;
13255
- if (canBakeResidual) {
13256
- const asScaleX = Math.abs((ct == null ? void 0 : ct.target) === active ? originalScaleX : rawScaleX);
13257
- const asScaleY = Math.abs((ct == null ? void 0 : ct.target) === active ? originalScaleY : rawScaleY);
13258
- const newW = Math.max(1, (active.width ?? 0) * asScaleX);
13259
- const newH = Math.max(1, (active.height ?? 0) * asScaleY);
13260
- active.set({ width: newW, height: newH, scaleX: 1, scaleY: 1 });
13254
+ const canNormalize = (ct == null ? void 0 : ct.target) === active ? hasResidualOriginal && hasNoLiveDragDelta : Math.abs(Math.abs(rawScaleX) - 1) > 1e-4 || Math.abs(Math.abs(rawScaleY) - 1) > 1e-4;
13255
+ if (canNormalize) {
13256
+ active.set({ scaleX: 1, scaleY: 1 });
13261
13257
  active.setCoords();
13262
13258
  if (ct && ct.target === active && ct.original) {
13263
13259
  ct.original.scaleX = 1;
13264
13260
  ct.original.scaleY = 1;
13265
- ct.original.width = newW;
13266
- ct.original.height = newH;
13267
13261
  }
13268
13262
  }
13269
13263
  } catch {
@@ -25167,9 +25161,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
25167
25161
  }
25168
25162
  return svgString;
25169
25163
  }
25170
- const resolvedPackageVersion = "0.5.407";
25164
+ const resolvedPackageVersion = "0.5.408";
25171
25165
  const PACKAGE_VERSION = resolvedPackageVersion;
25172
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.407";
25166
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.408";
25173
25167
  const roundParityValue = (value) => {
25174
25168
  if (typeof value !== "number") return value;
25175
25169
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -25983,7 +25977,7 @@ class PixldocsRenderer {
25983
25977
  await this.waitForCanvasScene(container, cloned, i);
25984
25978
  }
25985
25979
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
25986
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DuXVrbKW.js");
25980
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-PXI2Nd-d.js");
25987
25981
  const prepared = preparePagesForExport(
25988
25982
  cloned.pages,
25989
25983
  canvasWidth,
@@ -28303,7 +28297,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
28303
28297
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
28304
28298
  sanitizeSvgTreeForPdf(svgToDraw);
28305
28299
  try {
28306
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DuXVrbKW.js");
28300
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-PXI2Nd-d.js");
28307
28301
  try {
28308
28302
  await logTextMeasurementDiagnostic(svgToDraw);
28309
28303
  } catch {
@@ -28703,4 +28697,4 @@ export {
28703
28697
  buildTeaserBlurFlatKeys as y,
28704
28698
  collectFontDescriptorsFromConfig as z
28705
28699
  };
28706
- //# sourceMappingURL=index-Dxlbnksl.js.map
28700
+ //# sourceMappingURL=index-D_anatnh.js.map