@pixldocs/canvas-renderer 0.5.419 → 0.5.420

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.
@@ -14354,7 +14354,7 @@ const PageCanvas = forwardRef(
14354
14354
  fabricCanvas.on("selection:cleared", () => {
14355
14355
  });
14356
14356
  fabricCanvas.on("object:scaling", (e) => {
14357
- var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
14357
+ var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
14358
14358
  if (!isActiveRef.current) return;
14359
14359
  const t = e.target;
14360
14360
  if (t) lastResizeScaleTargetRef.current = t;
@@ -14647,9 +14647,12 @@ const PageCanvas = forwardRef(
14647
14647
  if (child.__asLiveOrigAngle == null) {
14648
14648
  const childId = getObjectId(child);
14649
14649
  const sourceChild = childId ? elementsRef.current.find((el) => el.id === childId) : void 0;
14650
- child.__asLiveOrigAngle = Number.isFinite(sourceChild == null ? void 0 : sourceChild.angle) ? sourceChild.angle ?? 0 : child.angle ?? 0;
14650
+ const storedWorldAngle = Number.isFinite(sourceChild == null ? void 0 : sourceChild.angle) ? sourceChild.angle ?? 0 : void 0;
14651
+ const logicalGroupId = obj.__pixldocsGroupSelection;
14652
+ const groupWorldAngle = logicalGroupId ? ((_k = groupSelectionTransformStartRef.current) == null ? void 0 : _k.groupId) === logicalGroupId ? groupSelectionTransformStartRef.current.groupAngle : obj.__pixldocsFrozenGroupAngle ?? (obj.angle ?? 0) : 0;
14653
+ child.__asLiveOrigAngle = storedWorldAngle !== void 0 ? storedWorldAngle - groupWorldAngle : child.angle ?? 0;
14651
14654
  }
14652
- if (child instanceof fabric.Group && (child.__cropGroup || ((_k = child._ct) == null ? void 0 : _k.isCropGroup))) {
14655
+ if (child instanceof fabric.Group && (child.__cropGroup || ((_l = child._ct) == null ? void 0 : _l.isCropGroup))) {
14653
14656
  const ct = child.__cropData;
14654
14657
  if (!ct) continue;
14655
14658
  if (child.__asLiveOrigAngle == null) {
@@ -14818,7 +14821,7 @@ const PageCanvas = forwardRef(
14818
14821
  child.dirty = true;
14819
14822
  didReflowTextChild = true;
14820
14823
  }
14821
- if (isXSide && ((_l = groupShiftReflowSnapshotRef.current) == null ? void 0 : _l.selection) === obj) {
14824
+ if (isXSide && ((_m = groupShiftReflowSnapshotRef.current) == null ? void 0 : _m.selection) === obj) {
14822
14825
  const snap = groupShiftReflowSnapshotRef.current;
14823
14826
  const anchorEntry = snap.children[0];
14824
14827
  const anchorTopLive = anchorEntry.obj.top ?? 0;
@@ -14979,7 +14982,7 @@ const PageCanvas = forwardRef(
14979
14982
  setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
14980
14983
  if (drilledGroupIdRef.current) {
14981
14984
  try {
14982
- (_m = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _m.call(fabricCanvas);
14985
+ (_n = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _n.call(fabricCanvas);
14983
14986
  } catch {
14984
14987
  }
14985
14988
  }
@@ -25547,9 +25550,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
25547
25550
  }
25548
25551
  return svgString;
25549
25552
  }
25550
- const resolvedPackageVersion = "0.5.419";
25553
+ const resolvedPackageVersion = "0.5.420";
25551
25554
  const PACKAGE_VERSION = resolvedPackageVersion;
25552
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.419";
25555
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.420";
25553
25556
  const roundParityValue = (value) => {
25554
25557
  if (typeof value !== "number") return value;
25555
25558
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -26363,7 +26366,7 @@ class PixldocsRenderer {
26363
26366
  await this.waitForCanvasScene(container, cloned, i);
26364
26367
  }
26365
26368
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
26366
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BVOocc4a.js");
26369
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-B-fqxnfz.js");
26367
26370
  const prepared = preparePagesForExport(
26368
26371
  cloned.pages,
26369
26372
  canvasWidth,
@@ -28683,7 +28686,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
28683
28686
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
28684
28687
  sanitizeSvgTreeForPdf(svgToDraw);
28685
28688
  try {
28686
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-BVOocc4a.js");
28689
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-B-fqxnfz.js");
28687
28690
  try {
28688
28691
  await logTextMeasurementDiagnostic(svgToDraw);
28689
28692
  } catch {
@@ -29083,4 +29086,4 @@ export {
29083
29086
  buildTeaserBlurFlatKeys as y,
29084
29087
  collectFontDescriptorsFromConfig as z
29085
29088
  };
29086
- //# sourceMappingURL=index-dbWkHXNX.js.map
29089
+ //# sourceMappingURL=index-Bk-8sAnE.js.map