@pixldocs/canvas-renderer 0.5.437 → 0.5.439

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.
@@ -15123,14 +15123,15 @@ const PageCanvas = forwardRef(
15123
15123
  const normalizedScaleAngle = ((obj.angle ?? 0) % 360 + 360) % 360;
15124
15124
  const isRotatedActiveSelectionCorner = obj instanceof fabric.ActiveSelection && isCornerResizeHandle(corner) && Math.min(normalizedScaleAngle, 360 - normalizedScaleAngle) > 0.5;
15125
15125
  const isRotatedActiveSelectionSide = obj instanceof fabric.ActiveSelection && (corner === "mt" || corner === "mb" || corner === "ml" || corner === "mr") && Math.min(normalizedScaleAngle, 360 - normalizedScaleAngle) > 0.5;
15126
- if (!isRotatedActiveSelectionCorner && !isRotatedActiveSelectionSide) {
15126
+ const isRotatedSingleObjectScale = !(obj instanceof fabric.ActiveSelection) && (isCornerResizeHandle(corner) || corner === "mt" || corner === "mb" || corner === "ml" || corner === "mr") && Math.min(normalizedScaleAngle, 360 - normalizedScaleAngle) > 0.5;
15127
+ if (!isRotatedActiveSelectionCorner && !isRotatedActiveSelectionSide && !isRotatedSingleObjectScale) {
15127
15128
  snapDuringScaleCallback(obj, corner);
15128
15129
  }
15129
- const scaleGuides = isRotatedActiveSelectionCorner || isRotatedActiveSelectionSide ? [] : calculateScaleSnapGuidesCallback(obj, corner);
15130
+ const scaleGuides = isRotatedActiveSelectionCorner || isRotatedActiveSelectionSide || isRotatedSingleObjectScale ? [] : calculateScaleSnapGuidesCallback(obj, corner);
15130
15131
  const gridGuidesForScale = [];
15131
15132
  try {
15132
15133
  const psGrid = projectSettingsRef.current;
15133
- const canApplyGridSnap = psGrid.snapToGrid && corner && !isRotatedActiveSelectionCorner && !isRotatedActiveSelectionSide && !obj.__cropGroup && !obj.__resizeSnapHandler;
15134
+ const canApplyGridSnap = psGrid.snapToGrid && corner && !isRotatedActiveSelectionCorner && !isRotatedActiveSelectionSide && !isRotatedSingleObjectScale && !obj.__cropGroup && !obj.__resizeSnapHandler;
15134
15135
  if (canApplyGridSnap) {
15135
15136
  const gridX = psGrid.gridSizeX ?? psGrid.gridSize ?? 0;
15136
15137
  const gridY = psGrid.gridSizeY ?? psGrid.gridSize ?? 0;
@@ -15247,8 +15248,12 @@ const PageCanvas = forwardRef(
15247
15248
  const sourceEl = objId ? elementsRef.current.find((el) => el.id === objId) : void 0;
15248
15249
  bakeTextboxScaleIntoTypography(obj, sourceEl);
15249
15250
  }
15250
- snapDuringScaleCallback(obj, corner);
15251
- const scaleGuides = calculateScaleSnapGuidesCallback(obj, corner);
15251
+ const normResizeAngle = ((obj.angle ?? 0) % 360 + 360) % 360;
15252
+ const isRotatedSingleResize = !(obj instanceof fabric.ActiveSelection) && Math.min(normResizeAngle, 360 - normResizeAngle) > 0.5;
15253
+ if (!isRotatedSingleResize) {
15254
+ snapDuringScaleCallback(obj, corner);
15255
+ }
15256
+ const scaleGuides = isRotatedSingleResize ? [] : calculateScaleSnapGuidesCallback(obj, corner);
15252
15257
  const gridGuidesForTextResize = [];
15253
15258
  try {
15254
15259
  const psGrid = projectSettingsRef.current;
@@ -25830,9 +25835,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
25830
25835
  }
25831
25836
  return svgString;
25832
25837
  }
25833
- const resolvedPackageVersion = "0.5.437";
25838
+ const resolvedPackageVersion = "0.5.439";
25834
25839
  const PACKAGE_VERSION = resolvedPackageVersion;
25835
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.437";
25840
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.439";
25836
25841
  const roundParityValue = (value) => {
25837
25842
  if (typeof value !== "number") return value;
25838
25843
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -26646,7 +26651,7 @@ class PixldocsRenderer {
26646
26651
  await this.waitForCanvasScene(container, cloned, i);
26647
26652
  }
26648
26653
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
26649
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-Go5IZl-i.js");
26654
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DNxCx3pQ.js");
26650
26655
  const prepared = preparePagesForExport(
26651
26656
  cloned.pages,
26652
26657
  canvasWidth,
@@ -28966,7 +28971,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
28966
28971
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
28967
28972
  sanitizeSvgTreeForPdf(svgToDraw);
28968
28973
  try {
28969
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-Go5IZl-i.js");
28974
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DNxCx3pQ.js");
28970
28975
  try {
28971
28976
  await logTextMeasurementDiagnostic(svgToDraw);
28972
28977
  } catch {
@@ -29366,4 +29371,4 @@ export {
29366
29371
  buildTeaserBlurFlatKeys as y,
29367
29372
  collectFontDescriptorsFromConfig as z
29368
29373
  };
29369
- //# sourceMappingURL=index-CiXC9Gkl.js.map
29374
+ //# sourceMappingURL=index-C7_iudsO.js.map