@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.
@@ -1011,10 +1011,14 @@ function groupBoundsFromChildren(group, pageChildren, options) {
1011
1011
  if (isStack) {
1012
1012
  const padRight = group.paddingRight ?? 0;
1013
1013
  const padBottom = group.paddingBottom ?? 0;
1014
- return {
1015
- width: Math.max(1, maxX + padRight),
1016
- height: Math.max(1, maxY + padBottom)
1017
- };
1014
+ const contentW = Math.max(1, maxX + padRight);
1015
+ const contentH = Math.max(1, maxY + padBottom);
1016
+ if (group.hugContent === false) {
1017
+ const storedW = typeof group.width === "number" && group.width > 0 ? group.width : contentW;
1018
+ const storedH = typeof group.height === "number" && group.height > 0 ? group.height : contentH;
1019
+ return { width: Math.max(1, storedW), height: Math.max(1, storedH) };
1020
+ }
1021
+ return { width: contentW, height: contentH };
1018
1022
  }
1019
1023
  return {
1020
1024
  width: Math.max(1, maxX - minX),
@@ -26373,9 +26377,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
26373
26377
  }
26374
26378
  return svgString;
26375
26379
  }
26376
- const resolvedPackageVersion = "0.5.478";
26380
+ const resolvedPackageVersion = "0.5.479";
26377
26381
  const PACKAGE_VERSION = resolvedPackageVersion;
26378
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.478";
26382
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.479";
26379
26383
  const roundParityValue = (value) => {
26380
26384
  if (typeof value !== "number") return value;
26381
26385
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -27189,7 +27193,7 @@ class PixldocsRenderer {
27189
27193
  await this.waitForCanvasScene(container, cloned, i);
27190
27194
  }
27191
27195
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
27192
- const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-B19SgYHz.cjs"));
27196
+ const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-DtQDA2s0.cjs"));
27193
27197
  const prepared = preparePagesForExport(
27194
27198
  cloned.pages,
27195
27199
  canvasWidth,
@@ -29509,7 +29513,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
29509
29513
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
29510
29514
  sanitizeSvgTreeForPdf(svgToDraw);
29511
29515
  try {
29512
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-B19SgYHz.cjs"));
29516
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-DtQDA2s0.cjs"));
29513
29517
  try {
29514
29518
  await logTextMeasurementDiagnostic(svgToDraw);
29515
29519
  } catch {
@@ -29823,4 +29827,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
29823
29827
  exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
29824
29828
  exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
29825
29829
  exports.warmTemplateFromForm = warmTemplateFromForm;
29826
- //# sourceMappingURL=index-DfgZSWwY.cjs.map
29830
+ //# sourceMappingURL=index-HdyrEZYv.cjs.map