@pixldocs/canvas-renderer 0.5.379 → 0.5.380

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.
@@ -11091,16 +11091,29 @@ try {
11091
11091
  };
11092
11092
  CanvasProto.__pixldocsCanvaSetCursorVersion = 1;
11093
11093
  }
11094
- if (CanvasProto && typeof CanvasProto._setCursorFromEvent === "function" && CanvasProto.__pixldocsCanvaCursorEventVersion !== 2) {
11094
+ if (CanvasProto && typeof CanvasProto._setCursorFromEvent === "function" && CanvasProto.__pixldocsCanvaCursorEventVersion !== 3) {
11095
11095
  const origSet = CanvasProto.__pixldocsOriginalSetCursorFromEvent ?? CanvasProto._setCursorFromEvent;
11096
11096
  CanvasProto.__pixldocsOriginalSetCursorFromEvent = origSet;
11097
11097
  CanvasProto._setCursorFromEvent = function(e, target) {
11098
+ var _a2, _b2, _c2, _d, _e, _f;
11098
11099
  const prev = target && target.__corner;
11099
11100
  const res = origSet.call(this, e, target);
11100
11101
  const next = target && target.__corner;
11101
11102
  try {
11103
+ let cursor = null;
11102
11104
  const control = next && (target == null ? void 0 : target.controls) ? target.controls[next] : null;
11103
- const cursor = resolveCanvaControlCursor(target, typeof next === "string" ? next : null, control);
11105
+ cursor = resolveCanvaControlCursor(target, typeof next === "string" ? next : null, control);
11106
+ if (!cursor) {
11107
+ const active = (_a2 = this.getActiveObject) == null ? void 0 : _a2.call(this);
11108
+ const isActiveSelection = active instanceof fabric.ActiveSelection;
11109
+ if (isActiveSelection && active !== target) {
11110
+ const pointer = (_b2 = this.getViewportPoint) == null ? void 0 : _b2.call(this, e);
11111
+ const activeCorner = pointer ? (_c2 = active.findControl) == null ? void 0 : _c2.call(active, pointer) : (_d = active.getActiveControl) == null ? void 0 : _d.call(active);
11112
+ const key = (activeCorner == null ? void 0 : activeCorner.key) ?? ((_f = (_e = active.getActiveControl) == null ? void 0 : _e.call(active)) == null ? void 0 : _f.key);
11113
+ const activeControl = (activeCorner == null ? void 0 : activeCorner.control) ?? (key && active.controls ? active.controls[key] : null);
11114
+ cursor = resolveCanvaControlCursor(active, typeof key === "string" ? key : null, activeControl);
11115
+ }
11116
+ }
11104
11117
  if (cursor) {
11105
11118
  if (typeof this.setCursor === "function") this.setCursor(cursor);
11106
11119
  else if (this.upperCanvasEl) this.upperCanvasEl.style.cursor = cursor;
@@ -11115,7 +11128,7 @@ try {
11115
11128
  }
11116
11129
  return res;
11117
11130
  };
11118
- CanvasProto.__pixldocsCanvaCursorEventVersion = 2;
11131
+ CanvasProto.__pixldocsCanvaCursorEventVersion = 3;
11119
11132
  }
11120
11133
  }
11121
11134
  } catch (e) {
@@ -24790,9 +24803,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
24790
24803
  }
24791
24804
  return svgString;
24792
24805
  }
24793
- const resolvedPackageVersion = "0.5.379";
24806
+ const resolvedPackageVersion = "0.5.380";
24794
24807
  const PACKAGE_VERSION = resolvedPackageVersion;
24795
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.379";
24808
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.380";
24796
24809
  const roundParityValue = (value) => {
24797
24810
  if (typeof value !== "number") return value;
24798
24811
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -25606,7 +25619,7 @@ class PixldocsRenderer {
25606
25619
  await this.waitForCanvasScene(container, cloned, i);
25607
25620
  }
25608
25621
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
25609
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CzLwUclq.js");
25622
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DR72C-Lv.js");
25610
25623
  const prepared = preparePagesForExport(
25611
25624
  cloned.pages,
25612
25625
  canvasWidth,
@@ -27926,7 +27939,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
27926
27939
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
27927
27940
  sanitizeSvgTreeForPdf(svgToDraw);
27928
27941
  try {
27929
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CzLwUclq.js");
27942
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DR72C-Lv.js");
27930
27943
  try {
27931
27944
  await logTextMeasurementDiagnostic(svgToDraw);
27932
27945
  } catch {
@@ -28326,4 +28339,4 @@ export {
28326
28339
  buildTeaserBlurFlatKeys as y,
28327
28340
  collectFontDescriptorsFromConfig as z
28328
28341
  };
28329
- //# sourceMappingURL=index-DQaiAXYK.js.map
28342
+ //# sourceMappingURL=index-8XP6VUfk.js.map