@pixldocs/canvas-renderer 0.5.258 → 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.
@@ -11180,15 +11180,6 @@ const PageCanvas = forwardRef(
11180
11180
  }
11181
11181
  }
11182
11182
  applyWarpAwareSelectionBorders(selection);
11183
- try {
11184
- selection.setControlsVisibility({
11185
- ml: false,
11186
- mr: false,
11187
- mt: false,
11188
- mb: false
11189
- });
11190
- } catch {
11191
- }
11192
11183
  }, []);
11193
11184
  const pageBoundsOptions = useMemo(
11194
11185
  () => ({ pageContentWidth: canvasWidth, pageContentHeight: canvasHeight }),
@@ -13490,6 +13481,12 @@ const PageCanvas = forwardRef(
13490
13481
  const isXSide = corner === "ml" || corner === "mr";
13491
13482
  const sAxis = isXSide ? Math.abs(obj.scaleX ?? 1) : Math.abs(obj.scaleY ?? 1);
13492
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;
13493
13490
  for (const child of obj.getObjects()) {
13494
13491
  if (!(child instanceof fabric.Textbox)) continue;
13495
13492
  if (isXSide) {
@@ -13499,7 +13496,8 @@ const PageCanvas = forwardRef(
13499
13496
  const origW = child.__asLiveOrigW;
13500
13497
  const newW = Math.max(20, origW * sAxis);
13501
13498
  if (Math.abs((child.width ?? 0) - newW) > 0.5) {
13502
- child.set({ width: newW, scaleX: 1 / sAxis });
13499
+ child._set("width", newW);
13500
+ child._set("scaleX", 1 / sAxis);
13503
13501
  try {
13504
13502
  child.initDimensions();
13505
13503
  } catch {
@@ -13513,7 +13511,7 @@ const PageCanvas = forwardRef(
13513
13511
  const origH = child.__asLiveOrigH;
13514
13512
  const newH = Math.max(20, origH * sAxis);
13515
13513
  child.minBoxHeight = newH;
13516
- child.set({ scaleY: 1 / sAxis });
13514
+ child._set("scaleY", 1 / sAxis);
13517
13515
  try {
13518
13516
  child.initDimensions();
13519
13517
  } catch {
@@ -13521,6 +13519,13 @@ const PageCanvas = forwardRef(
13521
13519
  child.dirty = true;
13522
13520
  }
13523
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();
13524
13529
  }
13525
13530
  }
13526
13531
  snapDuringScaleCallback(obj, corner);
@@ -23537,9 +23542,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
23537
23542
  }
23538
23543
  return svgString;
23539
23544
  }
23540
- const resolvedPackageVersion = "0.5.258";
23545
+ const resolvedPackageVersion = "0.5.260";
23541
23546
  const PACKAGE_VERSION = resolvedPackageVersion;
23542
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.258";
23547
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.260";
23543
23548
  const roundParityValue = (value) => {
23544
23549
  if (typeof value !== "number") return value;
23545
23550
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -24353,7 +24358,7 @@ class PixldocsRenderer {
24353
24358
  await this.waitForCanvasScene(container, cloned, i);
24354
24359
  }
24355
24360
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
24356
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BrLwOuTP.js");
24361
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-D4Vl-GPD.js");
24357
24362
  const prepared = preparePagesForExport(
24358
24363
  cloned.pages,
24359
24364
  canvasWidth,
@@ -26673,7 +26678,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
26673
26678
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
26674
26679
  sanitizeSvgTreeForPdf(svgToDraw);
26675
26680
  try {
26676
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-BrLwOuTP.js");
26681
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-D4Vl-GPD.js");
26677
26682
  try {
26678
26683
  await logTextMeasurementDiagnostic(svgToDraw);
26679
26684
  } catch {
@@ -27073,4 +27078,4 @@ export {
27073
27078
  buildTeaserBlurFlatKeys as y,
27074
27079
  collectFontDescriptorsFromConfig as z
27075
27080
  };
27076
- //# sourceMappingURL=index-DZ8rlYH6.js.map
27081
+ //# sourceMappingURL=index-Dh9WY10e.js.map