@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.
@@ -14372,7 +14372,7 @@ const PageCanvas = react.forwardRef(
14372
14372
  fabricCanvas.on("selection:cleared", () => {
14373
14373
  });
14374
14374
  fabricCanvas.on("object:scaling", (e) => {
14375
- var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
14375
+ var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
14376
14376
  if (!isActiveRef.current) return;
14377
14377
  const t = e.target;
14378
14378
  if (t) lastResizeScaleTargetRef.current = t;
@@ -14665,9 +14665,12 @@ const PageCanvas = react.forwardRef(
14665
14665
  if (child.__asLiveOrigAngle == null) {
14666
14666
  const childId = getObjectId(child);
14667
14667
  const sourceChild = childId ? elementsRef.current.find((el) => el.id === childId) : void 0;
14668
- child.__asLiveOrigAngle = Number.isFinite(sourceChild == null ? void 0 : sourceChild.angle) ? sourceChild.angle ?? 0 : child.angle ?? 0;
14668
+ const storedWorldAngle = Number.isFinite(sourceChild == null ? void 0 : sourceChild.angle) ? sourceChild.angle ?? 0 : void 0;
14669
+ const logicalGroupId = obj.__pixldocsGroupSelection;
14670
+ const groupWorldAngle = logicalGroupId ? ((_k = groupSelectionTransformStartRef.current) == null ? void 0 : _k.groupId) === logicalGroupId ? groupSelectionTransformStartRef.current.groupAngle : obj.__pixldocsFrozenGroupAngle ?? (obj.angle ?? 0) : 0;
14671
+ child.__asLiveOrigAngle = storedWorldAngle !== void 0 ? storedWorldAngle - groupWorldAngle : child.angle ?? 0;
14669
14672
  }
14670
- if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((_k = child._ct) == null ? void 0 : _k.isCropGroup))) {
14673
+ if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((_l = child._ct) == null ? void 0 : _l.isCropGroup))) {
14671
14674
  const ct = child.__cropData;
14672
14675
  if (!ct) continue;
14673
14676
  if (child.__asLiveOrigAngle == null) {
@@ -14836,7 +14839,7 @@ const PageCanvas = react.forwardRef(
14836
14839
  child.dirty = true;
14837
14840
  didReflowTextChild = true;
14838
14841
  }
14839
- if (isXSide && ((_l = groupShiftReflowSnapshotRef.current) == null ? void 0 : _l.selection) === obj) {
14842
+ if (isXSide && ((_m = groupShiftReflowSnapshotRef.current) == null ? void 0 : _m.selection) === obj) {
14840
14843
  const snap = groupShiftReflowSnapshotRef.current;
14841
14844
  const anchorEntry = snap.children[0];
14842
14845
  const anchorTopLive = anchorEntry.obj.top ?? 0;
@@ -14997,7 +15000,7 @@ const PageCanvas = react.forwardRef(
14997
15000
  setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
14998
15001
  if (drilledGroupIdRef.current) {
14999
15002
  try {
15000
- (_m = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _m.call(fabricCanvas);
15003
+ (_n = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _n.call(fabricCanvas);
15001
15004
  } catch {
15002
15005
  }
15003
15006
  }
@@ -25565,9 +25568,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
25565
25568
  }
25566
25569
  return svgString;
25567
25570
  }
25568
- const resolvedPackageVersion = "0.5.419";
25571
+ const resolvedPackageVersion = "0.5.420";
25569
25572
  const PACKAGE_VERSION = resolvedPackageVersion;
25570
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.419";
25573
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.420";
25571
25574
  const roundParityValue = (value) => {
25572
25575
  if (typeof value !== "number") return value;
25573
25576
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -26381,7 +26384,7 @@ class PixldocsRenderer {
26381
26384
  await this.waitForCanvasScene(container, cloned, i);
26382
26385
  }
26383
26386
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
26384
- const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-ftEgzh_b.cjs"));
26387
+ const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-Cq4TBhox.cjs"));
26385
26388
  const prepared = preparePagesForExport(
26386
26389
  cloned.pages,
26387
26390
  canvasWidth,
@@ -28701,7 +28704,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
28701
28704
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
28702
28705
  sanitizeSvgTreeForPdf(svgToDraw);
28703
28706
  try {
28704
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-ftEgzh_b.cjs"));
28707
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-Cq4TBhox.cjs"));
28705
28708
  try {
28706
28709
  await logTextMeasurementDiagnostic(svgToDraw);
28707
28710
  } catch {
@@ -29098,4 +29101,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
29098
29101
  exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
29099
29102
  exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
29100
29103
  exports.warmTemplateFromForm = warmTemplateFromForm;
29101
- //# sourceMappingURL=index-7_yV-1gx.cjs.map
29104
+ //# sourceMappingURL=index-yZYb0Y4m.cjs.map