@pixldocs/canvas-renderer 0.5.421 → 0.5.423

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, _n;
14357
+ var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
14358
14358
  if (!isActiveRef.current) return;
14359
14359
  const t = e.target;
14360
14360
  if (t) lastResizeScaleTargetRef.current = t;
@@ -14644,15 +14644,12 @@ const PageCanvas = forwardRef(
14644
14644
  const asRect0 = obj.getBoundingRect();
14645
14645
  let didReflowTextChild = false;
14646
14646
  for (const child of obj.getObjects()) {
14647
- if (child.__asLiveOrigAngle == null) {
14648
- const childId = getObjectId(child);
14649
- const sourceChild = childId ? elementsRef.current.find((el) => el.id === childId) : void 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;
14647
+ const liveGestureKey = `${obj.__pixldocsGroupSelection ?? "selection"}:${corner}:${((_k = groupSelectionTransformStartRef.current) == null ? void 0 : _k.selectionLeft) ?? obj.left ?? 0}:${((_l = groupSelectionTransformStartRef.current) == null ? void 0 : _l.selectionTop) ?? obj.top ?? 0}`;
14648
+ if (child.__asLiveGestureKey !== liveGestureKey) {
14649
+ child.__asLiveGestureKey = liveGestureKey;
14650
+ child.__asLiveOrigAngle = Number.isFinite(child.angle) ? child.angle ?? 0 : 0;
14654
14651
  }
14655
- if (child instanceof fabric.Group && (child.__cropGroup || ((_l = child._ct) == null ? void 0 : _l.isCropGroup))) {
14652
+ if (child instanceof fabric.Group && (child.__cropGroup || ((_m = child._ct) == null ? void 0 : _m.isCropGroup))) {
14656
14653
  const ct = child.__cropData;
14657
14654
  if (!ct) continue;
14658
14655
  if (child.__asLiveOrigAngle == null) {
@@ -14821,7 +14818,7 @@ const PageCanvas = forwardRef(
14821
14818
  child.dirty = true;
14822
14819
  didReflowTextChild = true;
14823
14820
  }
14824
- if (isXSide && ((_m = groupShiftReflowSnapshotRef.current) == null ? void 0 : _m.selection) === obj) {
14821
+ if (isXSide && ((_n = groupShiftReflowSnapshotRef.current) == null ? void 0 : _n.selection) === obj) {
14825
14822
  const snap = groupShiftReflowSnapshotRef.current;
14826
14823
  const anchorEntry = snap.children[0];
14827
14824
  const anchorTopLive = anchorEntry.obj.top ?? 0;
@@ -14982,7 +14979,7 @@ const PageCanvas = forwardRef(
14982
14979
  setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
14983
14980
  if (drilledGroupIdRef.current) {
14984
14981
  try {
14985
- (_n = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _n.call(fabricCanvas);
14982
+ (_o = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _o.call(fabricCanvas);
14986
14983
  } catch {
14987
14984
  }
14988
14985
  }
@@ -15206,6 +15203,7 @@ const PageCanvas = forwardRef(
15206
15203
  delete child.__asLiveOrigW;
15207
15204
  delete child.__asLiveOrigH;
15208
15205
  delete child.__asLiveRotSnap;
15206
+ delete child.__asLiveGestureKey;
15209
15207
  }
15210
15208
  }
15211
15209
  } catch {
@@ -16482,6 +16480,7 @@ const PageCanvas = forwardRef(
16482
16480
  if (t instanceof fabric.ActiveSelection) {
16483
16481
  for (const child of t.getObjects()) {
16484
16482
  delete child.__asLiveOrigAngle;
16483
+ delete child.__asLiveGestureKey;
16485
16484
  delete child.__asLiveWorldAngle;
16486
16485
  delete child.__asLiveWorldCenterX;
16487
16486
  delete child.__asLiveWorldCenterY;
@@ -25559,9 +25558,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
25559
25558
  }
25560
25559
  return svgString;
25561
25560
  }
25562
- const resolvedPackageVersion = "0.5.421";
25561
+ const resolvedPackageVersion = "0.5.423";
25563
25562
  const PACKAGE_VERSION = resolvedPackageVersion;
25564
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.421";
25563
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.423";
25565
25564
  const roundParityValue = (value) => {
25566
25565
  if (typeof value !== "number") return value;
25567
25566
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -26375,7 +26374,7 @@ class PixldocsRenderer {
26375
26374
  await this.waitForCanvasScene(container, cloned, i);
26376
26375
  }
26377
26376
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
26378
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BehYdYkb.js");
26377
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CpifSUUc.js");
26379
26378
  const prepared = preparePagesForExport(
26380
26379
  cloned.pages,
26381
26380
  canvasWidth,
@@ -28695,7 +28694,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
28695
28694
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
28696
28695
  sanitizeSvgTreeForPdf(svgToDraw);
28697
28696
  try {
28698
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-BehYdYkb.js");
28697
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CpifSUUc.js");
28699
28698
  try {
28700
28699
  await logTextMeasurementDiagnostic(svgToDraw);
28701
28700
  } catch {
@@ -29095,4 +29094,4 @@ export {
29095
29094
  buildTeaserBlurFlatKeys as y,
29096
29095
  collectFontDescriptorsFromConfig as z
29097
29096
  };
29098
- //# sourceMappingURL=index-DTK00FP2.js.map
29097
+ //# sourceMappingURL=index-Bai6zGgn.js.map