@pixldocs/canvas-renderer 0.5.291 → 0.5.292

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.
@@ -14521,6 +14521,25 @@ const PageCanvas = react.forwardRef(
14521
14521
  obj.setCoords();
14522
14522
  } catch {
14523
14523
  }
14524
+ try {
14525
+ const angleRad = (decomposed.angle ?? 0) * Math.PI / 180;
14526
+ const cos = Math.cos(angleRad);
14527
+ const sin = Math.sin(angleRad);
14528
+ const hw = finalWidth / 2;
14529
+ const hh = finalHeight / 2;
14530
+ const corners = [
14531
+ { x: -hw, y: -hh },
14532
+ { x: hw, y: -hh },
14533
+ { x: hw, y: hh },
14534
+ { x: -hw, y: hh }
14535
+ ].map((p) => ({
14536
+ x: decomposed.translateX + p.x * cos - p.y * sin,
14537
+ y: decomposed.translateY + p.x * sin + p.y * cos
14538
+ }));
14539
+ absoluteLeft = Math.min(...corners.map((p) => p.x));
14540
+ absoluteTop = Math.min(...corners.map((p) => p.y));
14541
+ } catch {
14542
+ }
14524
14543
  finalAbsoluteMatrix = fabric__namespace.util.composeMatrix({
14525
14544
  translateX: decomposed.translateX,
14526
14545
  translateY: decomposed.translateY,
@@ -23676,9 +23695,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
23676
23695
  }
23677
23696
  return svgString;
23678
23697
  }
23679
- const resolvedPackageVersion = "0.5.291";
23698
+ const resolvedPackageVersion = "0.5.292";
23680
23699
  const PACKAGE_VERSION = resolvedPackageVersion;
23681
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.291";
23700
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.292";
23682
23701
  const roundParityValue = (value) => {
23683
23702
  if (typeof value !== "number") return value;
23684
23703
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -24492,7 +24511,7 @@ class PixldocsRenderer {
24492
24511
  await this.waitForCanvasScene(container, cloned, i);
24493
24512
  }
24494
24513
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
24495
- const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-CFg39g3k.cjs"));
24514
+ const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-Q0sI218Z.cjs"));
24496
24515
  const prepared = preparePagesForExport(
24497
24516
  cloned.pages,
24498
24517
  canvasWidth,
@@ -26812,7 +26831,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
26812
26831
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
26813
26832
  sanitizeSvgTreeForPdf(svgToDraw);
26814
26833
  try {
26815
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-CFg39g3k.cjs"));
26834
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-Q0sI218Z.cjs"));
26816
26835
  try {
26817
26836
  await logTextMeasurementDiagnostic(svgToDraw);
26818
26837
  } catch {
@@ -27209,4 +27228,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
27209
27228
  exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
27210
27229
  exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
27211
27230
  exports.warmTemplateFromForm = warmTemplateFromForm;
27212
- //# sourceMappingURL=index-DUC4YCF2.cjs.map
27231
+ //# sourceMappingURL=index-BnsuaZL0.cjs.map