@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.
@@ -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, _n;
14375
+ var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
14376
14376
  if (!isActiveRef.current) return;
14377
14377
  const t = e.target;
14378
14378
  if (t) lastResizeScaleTargetRef.current = t;
@@ -14662,15 +14662,12 @@ const PageCanvas = react.forwardRef(
14662
14662
  const asRect0 = obj.getBoundingRect();
14663
14663
  let didReflowTextChild = false;
14664
14664
  for (const child of obj.getObjects()) {
14665
- if (child.__asLiveOrigAngle == null) {
14666
- const childId = getObjectId(child);
14667
- const sourceChild = childId ? elementsRef.current.find((el) => el.id === childId) : void 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;
14665
+ 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}`;
14666
+ if (child.__asLiveGestureKey !== liveGestureKey) {
14667
+ child.__asLiveGestureKey = liveGestureKey;
14668
+ child.__asLiveOrigAngle = Number.isFinite(child.angle) ? child.angle ?? 0 : 0;
14672
14669
  }
14673
- if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((_l = child._ct) == null ? void 0 : _l.isCropGroup))) {
14670
+ if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((_m = child._ct) == null ? void 0 : _m.isCropGroup))) {
14674
14671
  const ct = child.__cropData;
14675
14672
  if (!ct) continue;
14676
14673
  if (child.__asLiveOrigAngle == null) {
@@ -14839,7 +14836,7 @@ const PageCanvas = react.forwardRef(
14839
14836
  child.dirty = true;
14840
14837
  didReflowTextChild = true;
14841
14838
  }
14842
- if (isXSide && ((_m = groupShiftReflowSnapshotRef.current) == null ? void 0 : _m.selection) === obj) {
14839
+ if (isXSide && ((_n = groupShiftReflowSnapshotRef.current) == null ? void 0 : _n.selection) === obj) {
14843
14840
  const snap = groupShiftReflowSnapshotRef.current;
14844
14841
  const anchorEntry = snap.children[0];
14845
14842
  const anchorTopLive = anchorEntry.obj.top ?? 0;
@@ -15000,7 +14997,7 @@ const PageCanvas = react.forwardRef(
15000
14997
  setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
15001
14998
  if (drilledGroupIdRef.current) {
15002
14999
  try {
15003
- (_n = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _n.call(fabricCanvas);
15000
+ (_o = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _o.call(fabricCanvas);
15004
15001
  } catch {
15005
15002
  }
15006
15003
  }
@@ -15224,6 +15221,7 @@ const PageCanvas = react.forwardRef(
15224
15221
  delete child.__asLiveOrigW;
15225
15222
  delete child.__asLiveOrigH;
15226
15223
  delete child.__asLiveRotSnap;
15224
+ delete child.__asLiveGestureKey;
15227
15225
  }
15228
15226
  }
15229
15227
  } catch {
@@ -16500,6 +16498,7 @@ const PageCanvas = react.forwardRef(
16500
16498
  if (t instanceof fabric__namespace.ActiveSelection) {
16501
16499
  for (const child of t.getObjects()) {
16502
16500
  delete child.__asLiveOrigAngle;
16501
+ delete child.__asLiveGestureKey;
16503
16502
  delete child.__asLiveWorldAngle;
16504
16503
  delete child.__asLiveWorldCenterX;
16505
16504
  delete child.__asLiveWorldCenterY;
@@ -25577,9 +25576,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
25577
25576
  }
25578
25577
  return svgString;
25579
25578
  }
25580
- const resolvedPackageVersion = "0.5.421";
25579
+ const resolvedPackageVersion = "0.5.423";
25581
25580
  const PACKAGE_VERSION = resolvedPackageVersion;
25582
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.421";
25581
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.423";
25583
25582
  const roundParityValue = (value) => {
25584
25583
  if (typeof value !== "number") return value;
25585
25584
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -26393,7 +26392,7 @@ class PixldocsRenderer {
26393
26392
  await this.waitForCanvasScene(container, cloned, i);
26394
26393
  }
26395
26394
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
26396
- const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-CVTsNdX0.cjs"));
26395
+ const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-DiLsMhi9.cjs"));
26397
26396
  const prepared = preparePagesForExport(
26398
26397
  cloned.pages,
26399
26398
  canvasWidth,
@@ -28713,7 +28712,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
28713
28712
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
28714
28713
  sanitizeSvgTreeForPdf(svgToDraw);
28715
28714
  try {
28716
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-CVTsNdX0.cjs"));
28715
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-DiLsMhi9.cjs"));
28717
28716
  try {
28718
28717
  await logTextMeasurementDiagnostic(svgToDraw);
28719
28718
  } catch {
@@ -29110,4 +29109,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
29110
29109
  exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
29111
29110
  exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
29112
29111
  exports.warmTemplateFromForm = warmTemplateFromForm;
29113
- //# sourceMappingURL=index-CHFRo3xN.cjs.map
29112
+ //# sourceMappingURL=index-DNExytIw.cjs.map