@pixldocs/canvas-renderer 0.5.365 → 0.5.367

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.
@@ -11534,6 +11534,7 @@ const PageCanvas = forwardRef(
11534
11534
  }, [restoreSuppressedGroupMemberVisuals]);
11535
11535
  const skipSelectionClearOnDiscardRef = useRef(false);
11536
11536
  const skipActiveSelectionBakeOnClearRef = useRef(false);
11537
+ const suppressObjectModifiedDuringInternalReselectRef = useRef(false);
11537
11538
  const preserveEditingScopeOnSelectionClearRef = useRef(false);
11538
11539
  const preserveActiveSelectionAfterTransformRef = useRef(null);
11539
11540
  const recentGroupSelectionRestoreRef = useRef(null);
@@ -12821,6 +12822,7 @@ const PageCanvas = forwardRef(
12821
12822
  };
12822
12823
  fabricCanvas.on("selection:created", () => {
12823
12824
  var _a2;
12825
+ if (suppressObjectModifiedDuringInternalReselectRef.current) return;
12824
12826
  syncSelectionToStore();
12825
12827
  const activeObj = fabricCanvas.getActiveObject();
12826
12828
  if (activeObj instanceof fabric.ActiveSelection) applyWarpAwareSelectionBorders(activeObj);
@@ -12833,6 +12835,7 @@ const PageCanvas = forwardRef(
12833
12835
  });
12834
12836
  fabricCanvas.on("selection:updated", () => {
12835
12837
  var _a2;
12838
+ if (suppressObjectModifiedDuringInternalReselectRef.current) return;
12836
12839
  const next = fabricCanvas.getActiveObject();
12837
12840
  const isLogicalGroupSel = next instanceof fabric.ActiveSelection && (next.__pixldocsGroupSelection || Array.isArray(next.__pixldocsLogicalGroupIds));
12838
12841
  if (!isLogicalGroupSel) restoreSuppressedGroupBorders();
@@ -14520,6 +14523,7 @@ const PageCanvas = forwardRef(
14520
14523
  fabricCanvas.on("object:modified", (e) => {
14521
14524
  var _a2, _b2, _c, _d, _e, _f, _g, _h, _i;
14522
14525
  try {
14526
+ if (suppressObjectModifiedDuringInternalReselectRef.current) return;
14523
14527
  dragStarted = false;
14524
14528
  setGuides([]);
14525
14529
  setGroupOverlayLiveBoundsRef.current(null);
@@ -15496,6 +15500,7 @@ const PageCanvas = forwardRef(
15496
15500
  });
15497
15501
  const prevRenderOnAddRemove = fabricCanvas.renderOnAddRemove;
15498
15502
  fabricCanvas.renderOnAddRemove = false;
15503
+ suppressObjectModifiedDuringInternalReselectRef.current = true;
15499
15504
  skipSelectionClearOnDiscardRef.current = true;
15500
15505
  skipActiveSelectionBakeOnClearRef.current = true;
15501
15506
  try {
@@ -15547,13 +15552,15 @@ const PageCanvas = forwardRef(
15547
15552
  }
15548
15553
  skipSelectionClearOnDiscardRef.current = false;
15549
15554
  fabricCanvas.renderOnAddRemove = prevRenderOnAddRemove;
15555
+ suppressObjectModifiedDuringInternalReselectRef.current = false;
15550
15556
  if (wasGroupSel) {
15551
15557
  const resizeRestoreSnapshot = {
15552
15558
  memberIds: membersToReselect.map((obj) => getObjectId(obj)).filter((id) => !!id && id !== "__background__"),
15553
15559
  groupSelectionId: wasGroupSel,
15554
15560
  expiresAt: Date.now() + 1200
15555
15561
  };
15556
- recentGroupSelectionRestoreRef.current = resizeRestoreSnapshot;
15562
+ preserveActiveSelectionAfterTransformRef.current = null;
15563
+ recentGroupSelectionRestoreRef.current = null;
15557
15564
  }
15558
15565
  fabricCanvas.requestRenderAll();
15559
15566
  }
@@ -15564,6 +15571,9 @@ const PageCanvas = forwardRef(
15564
15571
  commitHistory();
15565
15572
  unlockEditsSoon();
15566
15573
  } catch (e2) {
15574
+ suppressObjectModifiedDuringInternalReselectRef.current = false;
15575
+ skipSelectionClearOnDiscardRef.current = false;
15576
+ skipActiveSelectionBakeOnClearRef.current = false;
15567
15577
  unlockEditsSoon();
15568
15578
  }
15569
15579
  });
@@ -24599,9 +24609,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
24599
24609
  }
24600
24610
  return svgString;
24601
24611
  }
24602
- const resolvedPackageVersion = "0.5.365";
24612
+ const resolvedPackageVersion = "0.5.367";
24603
24613
  const PACKAGE_VERSION = resolvedPackageVersion;
24604
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.365";
24614
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.367";
24605
24615
  const roundParityValue = (value) => {
24606
24616
  if (typeof value !== "number") return value;
24607
24617
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -25415,7 +25425,7 @@ class PixldocsRenderer {
25415
25425
  await this.waitForCanvasScene(container, cloned, i);
25416
25426
  }
25417
25427
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
25418
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-D9N1YQOw.js");
25428
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DvcAOjPg.js");
25419
25429
  const prepared = preparePagesForExport(
25420
25430
  cloned.pages,
25421
25431
  canvasWidth,
@@ -27735,7 +27745,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
27735
27745
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
27736
27746
  sanitizeSvgTreeForPdf(svgToDraw);
27737
27747
  try {
27738
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-D9N1YQOw.js");
27748
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DvcAOjPg.js");
27739
27749
  try {
27740
27750
  await logTextMeasurementDiagnostic(svgToDraw);
27741
27751
  } catch {
@@ -28135,4 +28145,4 @@ export {
28135
28145
  buildTeaserBlurFlatKeys as y,
28136
28146
  collectFontDescriptorsFromConfig as z
28137
28147
  };
28138
- //# sourceMappingURL=index-ZXhxxB18.js.map
28148
+ //# sourceMappingURL=index-BeQl1M5I.js.map