@pixldocs/canvas-renderer 0.5.377 → 0.5.378

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.
@@ -11024,7 +11024,7 @@ try {
11024
11024
  const originalCursorHandler = ControlProto.cursorStyleHandler;
11025
11025
  ControlProto.cursorStyleHandler = function(eventData, control, fabricObject) {
11026
11026
  const actionName = String(this.actionName ?? (control == null ? void 0 : control.actionName) ?? "");
11027
- const isRotateHandle = actionName === "rotate" || Math.abs(Number(this.x ?? 0)) < 1e-3 && Math.abs(Number(this.y ?? 0) + 0.5) < 1e-3 && Number(this.offsetY ?? 0) < 0;
11027
+ const isRotateHandle = actionName === "rotate" || Math.abs(Number(this.x ?? (control == null ? void 0 : control.x) ?? 0)) < 1e-3 && Math.abs(Number(this.y ?? (control == null ? void 0 : control.y) ?? 0) + 0.5) < 1e-3 && Number(this.offsetY ?? (control == null ? void 0 : control.offsetY) ?? 0) < 0;
11028
11028
  if (isRotateHandle) {
11029
11029
  const cursor = getRotateCursor(fabricObject);
11030
11030
  try {
@@ -11036,7 +11036,8 @@ try {
11036
11036
  }
11037
11037
  return cursor;
11038
11038
  }
11039
- const key = inferControlKey(this);
11039
+ const activeCorner = typeof (fabricObject == null ? void 0 : fabricObject.__corner) === "string" ? fabricObject.__corner : null;
11040
+ const key = activeCorner && baseAngleFor[activeCorner] !== void 0 ? activeCorner : inferControlKey(this) ?? inferControlKey(control);
11040
11041
  if (key && baseAngleFor[key] !== void 0) {
11041
11042
  return getRotatedCursor(key, fabricObject);
11042
11043
  }
@@ -11086,6 +11087,18 @@ try {
11086
11087
  const prev = target && target.__corner;
11087
11088
  const res = origSet.call(this, e, target);
11088
11089
  const next = target && target.__corner;
11090
+ try {
11091
+ const control = next && (target == null ? void 0 : target.controls) ? target.controls[next] : null;
11092
+ const actionName = String((control == null ? void 0 : control.actionName) ?? "");
11093
+ const isRotateHandle = next === "mtr" || actionName === "rotate" || control && Math.abs(Number(control.x ?? 0)) < 1e-3 && Math.abs(Number(control.y ?? 0) + 0.5) < 1e-3 && Number(control.offsetY ?? 0) < 0;
11094
+ const key = typeof next === "string" && baseAngleFor[next] !== void 0 ? next : inferControlKey(control);
11095
+ const cursor = isRotateHandle ? getRotateCursor(target) : key ? getRotatedCursor(key, target) : null;
11096
+ if (cursor) {
11097
+ if (typeof this.setCursor === "function") this.setCursor(cursor);
11098
+ else if (this.upperCanvasEl) this.upperCanvasEl.style.cursor = cursor;
11099
+ }
11100
+ } catch {
11101
+ }
11089
11102
  if (prev !== next) {
11090
11103
  try {
11091
11104
  this.requestRenderAll();
@@ -24768,9 +24781,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
24768
24781
  }
24769
24782
  return svgString;
24770
24783
  }
24771
- const resolvedPackageVersion = "0.5.377";
24784
+ const resolvedPackageVersion = "0.5.378";
24772
24785
  const PACKAGE_VERSION = resolvedPackageVersion;
24773
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.377";
24786
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.378";
24774
24787
  const roundParityValue = (value) => {
24775
24788
  if (typeof value !== "number") return value;
24776
24789
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -25584,7 +25597,7 @@ class PixldocsRenderer {
25584
25597
  await this.waitForCanvasScene(container, cloned, i);
25585
25598
  }
25586
25599
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
25587
- const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-DvH_Vhmg.cjs"));
25600
+ const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BShYUaFY.cjs"));
25588
25601
  const prepared = preparePagesForExport(
25589
25602
  cloned.pages,
25590
25603
  canvasWidth,
@@ -27904,7 +27917,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
27904
27917
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
27905
27918
  sanitizeSvgTreeForPdf(svgToDraw);
27906
27919
  try {
27907
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-DvH_Vhmg.cjs"));
27920
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BShYUaFY.cjs"));
27908
27921
  try {
27909
27922
  await logTextMeasurementDiagnostic(svgToDraw);
27910
27923
  } catch {
@@ -28301,4 +28314,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
28301
28314
  exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
28302
28315
  exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
28303
28316
  exports.warmTemplateFromForm = warmTemplateFromForm;
28304
- //# sourceMappingURL=index-DFJKBhgU.cjs.map
28317
+ //# sourceMappingURL=index-DHsYlRj5.cjs.map