@pixldocs/canvas-renderer 0.5.435 → 0.5.437

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.
@@ -14036,7 +14036,7 @@ const PageCanvas = forwardRef(
14036
14036
  };
14037
14037
  fabricCanvas.__updateDrilledGroupOutline = updateDrilledGroupOutline;
14038
14038
  fabricCanvas.on("mouse:down:before", (opt) => {
14039
- var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
14039
+ var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
14040
14040
  const activeBeforeMouseDown = fabricCanvas.getActiveObject();
14041
14041
  if (editLockRef.current) {
14042
14042
  const active = fabricCanvas.getActiveObject();
@@ -14165,8 +14165,9 @@ const PageCanvas = forwardRef(
14165
14165
  try {
14166
14166
  const activeForCornerCheck = fabricCanvas.getActiveObject();
14167
14167
  if (activeForCornerCheck) {
14168
- const ptrForCorner = fabricCanvas.getPointer(opt.e);
14169
- const cornerHit = ((_n = activeForCornerCheck.findControl) == null ? void 0 : _n.call(activeForCornerCheck, ptrForCorner)) || ((_o = activeForCornerCheck._findTargetCorner) == null ? void 0 : _o.call(activeForCornerCheck, ptrForCorner));
14168
+ const vpPtr = ((_n = fabricCanvas.getViewportPoint) == null ? void 0 : _n.call(fabricCanvas, opt.e)) ?? fabricCanvas.getPointer(opt.e);
14169
+ const scenePtr = fabricCanvas.getPointer(opt.e);
14170
+ const cornerHit = ((_o = activeForCornerCheck.findControl) == null ? void 0 : _o.call(activeForCornerCheck, vpPtr)) || ((_p = activeForCornerCheck.findControl) == null ? void 0 : _p.call(activeForCornerCheck, scenePtr)) || ((_q = activeForCornerCheck._findTargetCorner) == null ? void 0 : _q.call(activeForCornerCheck, scenePtr));
14170
14171
  if (cornerHit) {
14171
14172
  return;
14172
14173
  }
@@ -14366,10 +14367,11 @@ const PageCanvas = forwardRef(
14366
14367
  const pending = pendingGroupPromotionRef.current;
14367
14368
  if (!pending) return;
14368
14369
  const activeNow = fabricCanvas.getActiveObject();
14369
- if (activeNow === pending.selection) return;
14370
14370
  isSyncingSelectionToFabricRef.current = true;
14371
14371
  try {
14372
- fabricCanvas.setActiveObject(pending.selection);
14372
+ if (activeNow !== pending.selection) {
14373
+ fabricCanvas.setActiveObject(pending.selection);
14374
+ }
14373
14375
  pending.selection.setCoords();
14374
14376
  fabricCanvas._target = pending.selection;
14375
14377
  if (pending.selection instanceof fabric.ActiveSelection) {
@@ -25828,9 +25830,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
25828
25830
  }
25829
25831
  return svgString;
25830
25832
  }
25831
- const resolvedPackageVersion = "0.5.435";
25833
+ const resolvedPackageVersion = "0.5.437";
25832
25834
  const PACKAGE_VERSION = resolvedPackageVersion;
25833
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.435";
25835
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.437";
25834
25836
  const roundParityValue = (value) => {
25835
25837
  if (typeof value !== "number") return value;
25836
25838
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -26644,7 +26646,7 @@ class PixldocsRenderer {
26644
26646
  await this.waitForCanvasScene(container, cloned, i);
26645
26647
  }
26646
26648
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
26647
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DaUbsdKS.js");
26649
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-Go5IZl-i.js");
26648
26650
  const prepared = preparePagesForExport(
26649
26651
  cloned.pages,
26650
26652
  canvasWidth,
@@ -28964,7 +28966,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
28964
28966
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
28965
28967
  sanitizeSvgTreeForPdf(svgToDraw);
28966
28968
  try {
28967
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DaUbsdKS.js");
28969
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-Go5IZl-i.js");
28968
28970
  try {
28969
28971
  await logTextMeasurementDiagnostic(svgToDraw);
28970
28972
  } catch {
@@ -29364,4 +29366,4 @@ export {
29364
29366
  buildTeaserBlurFlatKeys as y,
29365
29367
  collectFontDescriptorsFromConfig as z
29366
29368
  };
29367
- //# sourceMappingURL=index-BtkdFbJD.js.map
29369
+ //# sourceMappingURL=index-CiXC9Gkl.js.map