@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.
@@ -10576,14 +10576,15 @@ const PageCanvas = react.forwardRef(
10576
10576
  const storePos = absoluteToStorePosition(absoluteLeft, absoluteTop, objId, pageChildrenForSave);
10577
10577
  const isLineObj = obj instanceof fabric__namespace.Line;
10578
10578
  const isAutoShrinkText = (sourceElement == null ? void 0 : sourceElement.type) === "text" && sourceElement.overflowPolicy === "auto-shrink";
10579
- const autoShrinkStoredWidth = isAutoShrinkText ? sourceElement.width : void 0;
10580
10579
  const autoShrinkStoredHeight = isAutoShrinkText ? sourceElement.height : void 0;
10581
10580
  const elementUpdate = {
10582
10581
  left: storePos.left,
10583
10582
  top: storePos.top,
10584
- // Auto-shrink: lock width, but let height shrink to actual rendered height for proper stack reflow.
10585
- width: isAutoShrinkText ? autoShrinkStoredWidth ?? finalWidth : finalWidth,
10586
- height: isLineObj ? 0 : isAutoShrinkText ? typeof autoShrinkStoredHeight === "number" ? Math.min(autoShrinkStoredHeight, finalHeight) : finalHeight : finalHeight,
10583
+ // Auto-shrink: persist width from the user-driven resize handles (ml/mr/corners).
10584
+ // Fabric's Textbox 'resizing' event updates obj.width directly with scaleX=1,
10585
+ // so finalWidth already reflects the new width chosen by the user.
10586
+ width: finalWidth,
10587
+ height: isLineObj ? 0 : isAutoShrinkText ? typeof autoShrinkStoredHeight === "number" ? autoShrinkStoredHeight : finalHeight : finalHeight,
10587
10588
  angle: decomposed.angle,
10588
10589
  skewX: isLineObj ? 0 : decomposed.skewX,
10589
10590
  skewY: isLineObj ? 0 : decomposed.skewY,
@@ -18964,9 +18965,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
18964
18965
  }
18965
18966
  return svgString;
18966
18967
  }
18967
- const resolvedPackageVersion = "0.5.209";
18968
+ const resolvedPackageVersion = "0.5.210";
18968
18969
  const PACKAGE_VERSION = resolvedPackageVersion;
18969
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.209";
18970
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.210";
18970
18971
  const roundParityValue = (value) => {
18971
18972
  if (typeof value !== "number") return value;
18972
18973
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -19645,7 +19646,7 @@ class PixldocsRenderer {
19645
19646
  await this.waitForCanvasScene(container, cloned, i);
19646
19647
  }
19647
19648
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
19648
- const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-B04JIcJr.cjs"));
19649
+ const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BSK-Z1p4.cjs"));
19649
19650
  const prepared = preparePagesForExport(
19650
19651
  cloned.pages,
19651
19652
  canvasWidth,
@@ -21829,7 +21830,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
21829
21830
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
21830
21831
  sanitizeSvgTreeForPdf(svgToDraw);
21831
21832
  try {
21832
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-B04JIcJr.cjs"));
21833
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BSK-Z1p4.cjs"));
21833
21834
  try {
21834
21835
  await logTextMeasurementDiagnostic(svgToDraw);
21835
21836
  } catch {
@@ -22226,4 +22227,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
22226
22227
  exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
22227
22228
  exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
22228
22229
  exports.warmTemplateFromForm = warmTemplateFromForm;
22229
- //# sourceMappingURL=index-DQF_on2h.cjs.map
22230
+ //# sourceMappingURL=index-54CXM_hR.cjs.map