@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.
@@ -11109,16 +11109,29 @@ try {
11109
11109
  };
11110
11110
  CanvasProto.__pixldocsCanvaSetCursorVersion = 1;
11111
11111
  }
11112
- if (CanvasProto && typeof CanvasProto._setCursorFromEvent === "function" && CanvasProto.__pixldocsCanvaCursorEventVersion !== 2) {
11112
+ if (CanvasProto && typeof CanvasProto._setCursorFromEvent === "function" && CanvasProto.__pixldocsCanvaCursorEventVersion !== 3) {
11113
11113
  const origSet = CanvasProto.__pixldocsOriginalSetCursorFromEvent ?? CanvasProto._setCursorFromEvent;
11114
11114
  CanvasProto.__pixldocsOriginalSetCursorFromEvent = origSet;
11115
11115
  CanvasProto._setCursorFromEvent = function(e, target) {
11116
+ var _a2, _b2, _c2, _d, _e, _f;
11116
11117
  const prev = target && target.__corner;
11117
11118
  const res = origSet.call(this, e, target);
11118
11119
  const next = target && target.__corner;
11119
11120
  try {
11121
+ let cursor = null;
11120
11122
  const control = next && (target == null ? void 0 : target.controls) ? target.controls[next] : null;
11121
- const cursor = resolveCanvaControlCursor(target, typeof next === "string" ? next : null, control);
11123
+ cursor = resolveCanvaControlCursor(target, typeof next === "string" ? next : null, control);
11124
+ if (!cursor) {
11125
+ const active = (_a2 = this.getActiveObject) == null ? void 0 : _a2.call(this);
11126
+ const isActiveSelection = active instanceof fabric__namespace.ActiveSelection;
11127
+ if (isActiveSelection && active !== target) {
11128
+ const pointer = (_b2 = this.getViewportPoint) == null ? void 0 : _b2.call(this, e);
11129
+ const activeCorner = pointer ? (_c2 = active.findControl) == null ? void 0 : _c2.call(active, pointer) : (_d = active.getActiveControl) == null ? void 0 : _d.call(active);
11130
+ const key = (activeCorner == null ? void 0 : activeCorner.key) ?? ((_f = (_e = active.getActiveControl) == null ? void 0 : _e.call(active)) == null ? void 0 : _f.key);
11131
+ const activeControl = (activeCorner == null ? void 0 : activeCorner.control) ?? (key && active.controls ? active.controls[key] : null);
11132
+ cursor = resolveCanvaControlCursor(active, typeof key === "string" ? key : null, activeControl);
11133
+ }
11134
+ }
11122
11135
  if (cursor) {
11123
11136
  if (typeof this.setCursor === "function") this.setCursor(cursor);
11124
11137
  else if (this.upperCanvasEl) this.upperCanvasEl.style.cursor = cursor;
@@ -11133,7 +11146,7 @@ try {
11133
11146
  }
11134
11147
  return res;
11135
11148
  };
11136
- CanvasProto.__pixldocsCanvaCursorEventVersion = 2;
11149
+ CanvasProto.__pixldocsCanvaCursorEventVersion = 3;
11137
11150
  }
11138
11151
  }
11139
11152
  } catch (e) {
@@ -24808,9 +24821,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
24808
24821
  }
24809
24822
  return svgString;
24810
24823
  }
24811
- const resolvedPackageVersion = "0.5.379";
24824
+ const resolvedPackageVersion = "0.5.380";
24812
24825
  const PACKAGE_VERSION = resolvedPackageVersion;
24813
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.379";
24826
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.380";
24814
24827
  const roundParityValue = (value) => {
24815
24828
  if (typeof value !== "number") return value;
24816
24829
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -25624,7 +25637,7 @@ class PixldocsRenderer {
25624
25637
  await this.waitForCanvasScene(container, cloned, i);
25625
25638
  }
25626
25639
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
25627
- const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-C1UzGCn0.cjs"));
25640
+ const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-C4lbJ3r7.cjs"));
25628
25641
  const prepared = preparePagesForExport(
25629
25642
  cloned.pages,
25630
25643
  canvasWidth,
@@ -27944,7 +27957,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
27944
27957
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
27945
27958
  sanitizeSvgTreeForPdf(svgToDraw);
27946
27959
  try {
27947
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-C1UzGCn0.cjs"));
27960
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-C4lbJ3r7.cjs"));
27948
27961
  try {
27949
27962
  await logTextMeasurementDiagnostic(svgToDraw);
27950
27963
  } catch {
@@ -28341,4 +28354,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
28341
28354
  exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
28342
28355
  exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
28343
28356
  exports.warmTemplateFromForm = warmTemplateFromForm;
28344
- //# sourceMappingURL=index-D_l8rDHU.cjs.map
28357
+ //# sourceMappingURL=index-B-wkU613.cjs.map