@pixldocs/canvas-renderer 0.5.320 → 0.5.322

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.
@@ -13590,6 +13590,30 @@ const PageCanvas = react.forwardRef(
13590
13590
  }
13591
13591
  const obj = t;
13592
13592
  if (!obj) return;
13593
+ try {
13594
+ const transformInfo = e.transform;
13595
+ const cornerEarly = (transformInfo == null ? void 0 : transformInfo.corner) || "";
13596
+ const isSideHandle = cornerEarly === "ml" || cornerEarly === "mr" || cornerEarly === "mt" || cornerEarly === "mb";
13597
+ const isGroupLike = obj instanceof fabric__namespace.Group && !obj.__cropGroup && !obj.__docuforgeSectionGroup;
13598
+ if (isSideHandle && isGroupLike && typeof obj.getObjects === "function") {
13599
+ const kids = obj.getObjects();
13600
+ const hasRotatedChild = kids.some(
13601
+ (c) => Math.abs((c.angle ?? 0) % 360) > 0.5
13602
+ );
13603
+ if (hasRotatedChild) {
13604
+ const isXSideEarly = cornerEarly === "ml" || cornerEarly === "mr";
13605
+ if (isXSideEarly) {
13606
+ obj._set("scaleY", obj.scaleX ?? 1);
13607
+ } else {
13608
+ obj._set("scaleX", obj.scaleY ?? 1);
13609
+ }
13610
+ obj.setCoords();
13611
+ obj.dirty = true;
13612
+ return;
13613
+ }
13614
+ }
13615
+ } catch {
13616
+ }
13593
13617
  if (obj instanceof fabric__namespace.Rect || obj instanceof fabric__namespace.Path || obj instanceof fabric__namespace.Circle || obj instanceof fabric__namespace.Triangle || obj instanceof fabric__namespace.Line) {
13594
13618
  obj.set({ strokeUniform: true });
13595
13619
  }
@@ -13754,6 +13778,19 @@ const PageCanvas = react.forwardRef(
13754
13778
  const isXSide = corner === "ml" || corner === "mr";
13755
13779
  const sAxis = isXSide ? Math.abs(obj.scaleX ?? 1) : Math.abs(obj.scaleY ?? 1);
13756
13780
  if (sAxis > 1e-3) {
13781
+ const hasRotatedChild = obj.getObjects().some(
13782
+ (c) => Math.abs((c.angle ?? 0) % 360) > 0.5
13783
+ );
13784
+ if (hasRotatedChild) {
13785
+ if (isXSide) {
13786
+ obj._set("scaleY", obj.scaleX ?? 1);
13787
+ } else {
13788
+ obj._set("scaleX", obj.scaleY ?? 1);
13789
+ }
13790
+ obj.setCoords();
13791
+ obj.dirty = true;
13792
+ return;
13793
+ }
13757
13794
  if (isXSide && ((_b2 = groupShiftReflowSnapshotRef.current) == null ? void 0 : _b2.selection) !== obj) {
13758
13795
  groupShiftReflowSnapshotRef.current = null;
13759
13796
  const logicalGroupId = obj.__pixldocsGroupSelection;
@@ -24281,9 +24318,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
24281
24318
  }
24282
24319
  return svgString;
24283
24320
  }
24284
- const resolvedPackageVersion = "0.5.320";
24321
+ const resolvedPackageVersion = "0.5.322";
24285
24322
  const PACKAGE_VERSION = resolvedPackageVersion;
24286
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.320";
24323
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.322";
24287
24324
  const roundParityValue = (value) => {
24288
24325
  if (typeof value !== "number") return value;
24289
24326
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -25097,7 +25134,7 @@ class PixldocsRenderer {
25097
25134
  await this.waitForCanvasScene(container, cloned, i);
25098
25135
  }
25099
25136
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
25100
- const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BFpf44ad.cjs"));
25137
+ const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-ChGwOWZr.cjs"));
25101
25138
  const prepared = preparePagesForExport(
25102
25139
  cloned.pages,
25103
25140
  canvasWidth,
@@ -27417,7 +27454,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
27417
27454
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
27418
27455
  sanitizeSvgTreeForPdf(svgToDraw);
27419
27456
  try {
27420
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BFpf44ad.cjs"));
27457
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-ChGwOWZr.cjs"));
27421
27458
  try {
27422
27459
  await logTextMeasurementDiagnostic(svgToDraw);
27423
27460
  } catch {
@@ -27814,4 +27851,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
27814
27851
  exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
27815
27852
  exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
27816
27853
  exports.warmTemplateFromForm = warmTemplateFromForm;
27817
- //# sourceMappingURL=index-wHNXUueq.cjs.map
27854
+ //# sourceMappingURL=index-CALomPaP.cjs.map