@pixldocs/canvas-renderer 0.5.209 → 0.5.210

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.
@@ -10558,14 +10558,15 @@ const PageCanvas = forwardRef(
10558
10558
  const storePos = absoluteToStorePosition(absoluteLeft, absoluteTop, objId, pageChildrenForSave);
10559
10559
  const isLineObj = obj instanceof fabric.Line;
10560
10560
  const isAutoShrinkText = (sourceElement == null ? void 0 : sourceElement.type) === "text" && sourceElement.overflowPolicy === "auto-shrink";
10561
- const autoShrinkStoredWidth = isAutoShrinkText ? sourceElement.width : void 0;
10562
10561
  const autoShrinkStoredHeight = isAutoShrinkText ? sourceElement.height : void 0;
10563
10562
  const elementUpdate = {
10564
10563
  left: storePos.left,
10565
10564
  top: storePos.top,
10566
- // Auto-shrink: lock width, but let height shrink to actual rendered height for proper stack reflow.
10567
- width: isAutoShrinkText ? autoShrinkStoredWidth ?? finalWidth : finalWidth,
10568
- height: isLineObj ? 0 : isAutoShrinkText ? typeof autoShrinkStoredHeight === "number" ? Math.min(autoShrinkStoredHeight, finalHeight) : finalHeight : finalHeight,
10565
+ // Auto-shrink: persist width from the user-driven resize handles (ml/mr/corners).
10566
+ // Fabric's Textbox 'resizing' event updates obj.width directly with scaleX=1,
10567
+ // so finalWidth already reflects the new width chosen by the user.
10568
+ width: finalWidth,
10569
+ height: isLineObj ? 0 : isAutoShrinkText ? typeof autoShrinkStoredHeight === "number" ? autoShrinkStoredHeight : finalHeight : finalHeight,
10569
10570
  angle: decomposed.angle,
10570
10571
  skewX: isLineObj ? 0 : decomposed.skewX,
10571
10572
  skewY: isLineObj ? 0 : decomposed.skewY,
@@ -18946,9 +18947,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
18946
18947
  }
18947
18948
  return svgString;
18948
18949
  }
18949
- const resolvedPackageVersion = "0.5.209";
18950
+ const resolvedPackageVersion = "0.5.210";
18950
18951
  const PACKAGE_VERSION = resolvedPackageVersion;
18951
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.209";
18952
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.210";
18952
18953
  const roundParityValue = (value) => {
18953
18954
  if (typeof value !== "number") return value;
18954
18955
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -19627,7 +19628,7 @@ class PixldocsRenderer {
19627
19628
  await this.waitForCanvasScene(container, cloned, i);
19628
19629
  }
19629
19630
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
19630
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-C0GsER0C.js");
19631
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-Ch6GbQqO.js");
19631
19632
  const prepared = preparePagesForExport(
19632
19633
  cloned.pages,
19633
19634
  canvasWidth,
@@ -21811,7 +21812,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
21811
21812
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
21812
21813
  sanitizeSvgTreeForPdf(svgToDraw);
21813
21814
  try {
21814
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-C0GsER0C.js");
21815
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-Ch6GbQqO.js");
21815
21816
  try {
21816
21817
  await logTextMeasurementDiagnostic(svgToDraw);
21817
21818
  } catch {
@@ -22211,4 +22212,4 @@ export {
22211
22212
  buildTeaserBlurFlatKeys as y,
22212
22213
  collectFontDescriptorsFromConfig as z
22213
22214
  };
22214
- //# sourceMappingURL=index-DOIdbh-Q.js.map
22215
+ //# sourceMappingURL=index-DwYUddYW.js.map