@pixldocs/canvas-renderer 0.5.441 → 0.5.442

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.
@@ -11857,6 +11857,7 @@ const PageCanvas = forwardRef(
11857
11857
  const selectAllTextOnEditingEnterRef = useRef(null);
11858
11858
  const suppressedTextEditObjectsRef = useRef([]);
11859
11859
  const suppressTextDoubleClickUntilRef = useRef(0);
11860
+ const cropGroupActivatedAtRef = useRef(/* @__PURE__ */ new WeakMap());
11860
11861
  const syncLockedRef = useRef(false);
11861
11862
  const editLockRef = useRef(false);
11862
11863
  const editLockCountRef = useRef(0);
@@ -16815,6 +16816,14 @@ const PageCanvas = forwardRef(
16815
16816
  obj.setCoords();
16816
16817
  }
16817
16818
  });
16819
+ const recordCropGroupActivation = () => {
16820
+ const active = fabricCanvas.getActiveObject();
16821
+ if (active && active instanceof fabric.Group && active.__cropGroup) {
16822
+ cropGroupActivatedAtRef.current.set(active, Date.now());
16823
+ }
16824
+ };
16825
+ fabricCanvas.on("selection:created", recordCropGroupActivation);
16826
+ fabricCanvas.on("selection:updated", recordCropGroupActivation);
16818
16827
  fabricCanvas.on("mouse:dblclick", (e) => {
16819
16828
  var _a2, _b2, _c2;
16820
16829
  if (!isActiveRef.current || !allowEditing) return;
@@ -16844,6 +16853,10 @@ const PageCanvas = forwardRef(
16844
16853
  }
16845
16854
  return;
16846
16855
  }
16856
+ const activatedAt = cropGroupActivatedAtRef.current.get(target) ?? 0;
16857
+ if (Date.now() - activatedAt < 400) {
16858
+ return;
16859
+ }
16847
16860
  }
16848
16861
  if (innerImg && !isPlaceholder && !isCropGroupInCropMode(target)) {
16849
16862
  enterCropMode(target);
@@ -25871,9 +25884,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
25871
25884
  }
25872
25885
  return svgString;
25873
25886
  }
25874
- const resolvedPackageVersion = "0.5.441";
25887
+ const resolvedPackageVersion = "0.5.442";
25875
25888
  const PACKAGE_VERSION = resolvedPackageVersion;
25876
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.441";
25889
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.442";
25877
25890
  const roundParityValue = (value) => {
25878
25891
  if (typeof value !== "number") return value;
25879
25892
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -26687,7 +26700,7 @@ class PixldocsRenderer {
26687
26700
  await this.waitForCanvasScene(container, cloned, i);
26688
26701
  }
26689
26702
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
26690
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DDz6_cPc.js");
26703
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-Hv54w3Cm.js");
26691
26704
  const prepared = preparePagesForExport(
26692
26705
  cloned.pages,
26693
26706
  canvasWidth,
@@ -29007,7 +29020,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
29007
29020
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
29008
29021
  sanitizeSvgTreeForPdf(svgToDraw);
29009
29022
  try {
29010
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DDz6_cPc.js");
29023
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-Hv54w3Cm.js");
29011
29024
  try {
29012
29025
  await logTextMeasurementDiagnostic(svgToDraw);
29013
29026
  } catch {
@@ -29407,4 +29420,4 @@ export {
29407
29420
  buildTeaserBlurFlatKeys as y,
29408
29421
  collectFontDescriptorsFromConfig as z
29409
29422
  };
29410
- //# sourceMappingURL=index-0kscM6nx.js.map
29423
+ //# sourceMappingURL=index-DFHTSlHV.js.map