@pixldocs/canvas-renderer 0.5.422 → 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;
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,20 +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 currentLocalAngle = Number.isFinite(child.angle) ? child.angle ?? 0 : void 0;
14667
- let matrixLocalAngle;
14668
- try {
14669
- const selectionMatrix = obj.calcTransformMatrix();
14670
- const childMatrix = child.calcOwnMatrix();
14671
- const worldMatrix = fabric__namespace.util.multiplyTransformMatrices(selectionMatrix, childMatrix);
14672
- const liveWorldAngle = fabric__namespace.util.qrDecompose(worldMatrix).angle ?? 0;
14673
- matrixLocalAngle = liveWorldAngle - (obj.angle ?? 0);
14674
- } catch {
14675
- }
14676
- child.__asLiveOrigAngle = currentLocalAngle ?? matrixLocalAngle ?? 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;
14677
14669
  }
14678
- if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((_k = child._ct) == null ? void 0 : _k.isCropGroup))) {
14670
+ if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((_m = child._ct) == null ? void 0 : _m.isCropGroup))) {
14679
14671
  const ct = child.__cropData;
14680
14672
  if (!ct) continue;
14681
14673
  if (child.__asLiveOrigAngle == null) {
@@ -14844,7 +14836,7 @@ const PageCanvas = react.forwardRef(
14844
14836
  child.dirty = true;
14845
14837
  didReflowTextChild = true;
14846
14838
  }
14847
- if (isXSide && ((_l = groupShiftReflowSnapshotRef.current) == null ? void 0 : _l.selection) === obj) {
14839
+ if (isXSide && ((_n = groupShiftReflowSnapshotRef.current) == null ? void 0 : _n.selection) === obj) {
14848
14840
  const snap = groupShiftReflowSnapshotRef.current;
14849
14841
  const anchorEntry = snap.children[0];
14850
14842
  const anchorTopLive = anchorEntry.obj.top ?? 0;
@@ -15005,7 +14997,7 @@ const PageCanvas = react.forwardRef(
15005
14997
  setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
15006
14998
  if (drilledGroupIdRef.current) {
15007
14999
  try {
15008
- (_m = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _m.call(fabricCanvas);
15000
+ (_o = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _o.call(fabricCanvas);
15009
15001
  } catch {
15010
15002
  }
15011
15003
  }
@@ -15229,6 +15221,7 @@ const PageCanvas = react.forwardRef(
15229
15221
  delete child.__asLiveOrigW;
15230
15222
  delete child.__asLiveOrigH;
15231
15223
  delete child.__asLiveRotSnap;
15224
+ delete child.__asLiveGestureKey;
15232
15225
  }
15233
15226
  }
15234
15227
  } catch {
@@ -16505,6 +16498,7 @@ const PageCanvas = react.forwardRef(
16505
16498
  if (t instanceof fabric__namespace.ActiveSelection) {
16506
16499
  for (const child of t.getObjects()) {
16507
16500
  delete child.__asLiveOrigAngle;
16501
+ delete child.__asLiveGestureKey;
16508
16502
  delete child.__asLiveWorldAngle;
16509
16503
  delete child.__asLiveWorldCenterX;
16510
16504
  delete child.__asLiveWorldCenterY;
@@ -25582,9 +25576,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
25582
25576
  }
25583
25577
  return svgString;
25584
25578
  }
25585
- const resolvedPackageVersion = "0.5.422";
25579
+ const resolvedPackageVersion = "0.5.423";
25586
25580
  const PACKAGE_VERSION = resolvedPackageVersion;
25587
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.422";
25581
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.423";
25588
25582
  const roundParityValue = (value) => {
25589
25583
  if (typeof value !== "number") return value;
25590
25584
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -26398,7 +26392,7 @@ class PixldocsRenderer {
26398
26392
  await this.waitForCanvasScene(container, cloned, i);
26399
26393
  }
26400
26394
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
26401
- const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-DdBfenYt.cjs"));
26395
+ const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-DiLsMhi9.cjs"));
26402
26396
  const prepared = preparePagesForExport(
26403
26397
  cloned.pages,
26404
26398
  canvasWidth,
@@ -28718,7 +28712,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
28718
28712
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
28719
28713
  sanitizeSvgTreeForPdf(svgToDraw);
28720
28714
  try {
28721
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-DdBfenYt.cjs"));
28715
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-DiLsMhi9.cjs"));
28722
28716
  try {
28723
28717
  await logTextMeasurementDiagnostic(svgToDraw);
28724
28718
  } catch {
@@ -29115,4 +29109,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
29115
29109
  exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
29116
29110
  exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
29117
29111
  exports.warmTemplateFromForm = warmTemplateFromForm;
29118
- //# sourceMappingURL=index-yOZRi1jo.cjs.map
29112
+ //# sourceMappingURL=index-DNExytIw.cjs.map