@pixldocs/canvas-renderer 0.5.168 → 0.5.169

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.
@@ -6356,6 +6356,8 @@ function createText(element) {
6356
6356
  const fixedWidth = Math.max(baseWidth, 1);
6357
6357
  const splitByGrapheme = overflowPolicy === "auto-shrink" ? false : element.splitByGrapheme ?? element.wordWrap === "break-word";
6358
6358
  if (overflowPolicy === "auto-shrink") {
6359
+ const minBoxHForShrink = Math.max(0, Number(element.minBoxHeight) || 0);
6360
+ const heightBound = Math.max(baseHeight || 0, minBoxHForShrink);
6359
6361
  const explicitLineCount = Math.max(1, text.split("\n").length);
6360
6362
  const debugAutoShrink = typeof window !== "undefined" && window.__pixldocsDebugAutoShrink === true;
6361
6363
  const startFontSize = fontSize;
@@ -6378,7 +6380,7 @@ function createText(element) {
6378
6380
  const textHeight = testTextbox.height || 0;
6379
6381
  const renderedLineCount = ((_a = testTextbox.textLines) == null ? void 0 : _a.length) || 1;
6380
6382
  const hasNoImplicitWrap = renderedLineCount <= explicitLineCount;
6381
- const fitsHeight = !baseHeight || textHeight <= baseHeight;
6383
+ const fitsHeight = heightBound <= 0 || textHeight <= heightBound;
6382
6384
  const widthMetrics = getTextboxWidthFitMetrics(testTextbox, fixedWidth);
6383
6385
  const { maxLineWidth, widthDidGrow, fitsWidth } = widthMetrics;
6384
6386
  if (debugAutoShrink) {
@@ -16100,9 +16102,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
16100
16102
  }
16101
16103
  return svgString;
16102
16104
  }
16103
- const resolvedPackageVersion = "0.5.168";
16105
+ const resolvedPackageVersion = "0.5.169";
16104
16106
  const PACKAGE_VERSION = resolvedPackageVersion;
16105
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.168";
16107
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.169";
16106
16108
  const roundParityValue = (value) => {
16107
16109
  if (typeof value !== "number") return value;
16108
16110
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -16600,7 +16602,7 @@ class PixldocsRenderer {
16600
16602
  await this.waitForCanvasScene(container, cloned, i);
16601
16603
  }
16602
16604
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
16603
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DCy1uYUF.js");
16605
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-C2jE125-.js");
16604
16606
  const prepared = preparePagesForExport(
16605
16607
  cloned.pages,
16606
16608
  canvasWidth,
@@ -18702,7 +18704,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
18702
18704
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
18703
18705
  sanitizeSvgTreeForPdf(svgToDraw);
18704
18706
  try {
18705
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DCy1uYUF.js");
18707
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-C2jE125-.js");
18706
18708
  try {
18707
18709
  await logTextMeasurementDiagnostic(svgToDraw);
18708
18710
  } catch {
@@ -19104,4 +19106,4 @@ export {
19104
19106
  collectFontDescriptorsFromConfig as y,
19105
19107
  collectFontsFromConfig as z
19106
19108
  };
19107
- //# sourceMappingURL=index-oFnROAcT.js.map
19109
+ //# sourceMappingURL=index-qJRuErt-.js.map