@pixldocs/canvas-renderer 0.5.478 → 0.5.479

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.
@@ -993,10 +993,14 @@ function groupBoundsFromChildren(group, pageChildren, options) {
993
993
  if (isStack) {
994
994
  const padRight = group.paddingRight ?? 0;
995
995
  const padBottom = group.paddingBottom ?? 0;
996
- return {
997
- width: Math.max(1, maxX + padRight),
998
- height: Math.max(1, maxY + padBottom)
999
- };
996
+ const contentW = Math.max(1, maxX + padRight);
997
+ const contentH = Math.max(1, maxY + padBottom);
998
+ if (group.hugContent === false) {
999
+ const storedW = typeof group.width === "number" && group.width > 0 ? group.width : contentW;
1000
+ const storedH = typeof group.height === "number" && group.height > 0 ? group.height : contentH;
1001
+ return { width: Math.max(1, storedW), height: Math.max(1, storedH) };
1002
+ }
1003
+ return { width: contentW, height: contentH };
1000
1004
  }
1001
1005
  return {
1002
1006
  width: Math.max(1, maxX - minX),
@@ -26355,9 +26359,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
26355
26359
  }
26356
26360
  return svgString;
26357
26361
  }
26358
- const resolvedPackageVersion = "0.5.478";
26362
+ const resolvedPackageVersion = "0.5.479";
26359
26363
  const PACKAGE_VERSION = resolvedPackageVersion;
26360
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.478";
26364
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.479";
26361
26365
  const roundParityValue = (value) => {
26362
26366
  if (typeof value !== "number") return value;
26363
26367
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -27171,7 +27175,7 @@ class PixldocsRenderer {
27171
27175
  await this.waitForCanvasScene(container, cloned, i);
27172
27176
  }
27173
27177
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
27174
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BWLQD50V.js");
27178
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DRfak0Ck.js");
27175
27179
  const prepared = preparePagesForExport(
27176
27180
  cloned.pages,
27177
27181
  canvasWidth,
@@ -29491,7 +29495,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
29491
29495
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
29492
29496
  sanitizeSvgTreeForPdf(svgToDraw);
29493
29497
  try {
29494
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-BWLQD50V.js");
29498
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DRfak0Ck.js");
29495
29499
  try {
29496
29500
  await logTextMeasurementDiagnostic(svgToDraw);
29497
29501
  } catch {
@@ -29808,4 +29812,4 @@ export {
29808
29812
  buildTeaserBlurFlatKeys as y,
29809
29813
  collectFontDescriptorsFromConfig as z
29810
29814
  };
29811
- //# sourceMappingURL=index-dIB1dZvd.js.map
29815
+ //# sourceMappingURL=index-Dqwkt9nO.js.map