@pixldocs/canvas-renderer 0.5.136 → 0.5.137

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.
@@ -16358,7 +16358,7 @@ class PixldocsRenderer {
16358
16358
  await this.waitForCanvasScene(container, cloned, i);
16359
16359
  }
16360
16360
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
16361
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-D3L64sAJ.js");
16361
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CP-0GqFj.js");
16362
16362
  const prepared = preparePagesForExport(
16363
16363
  cloned.pages,
16364
16364
  canvasWidth,
@@ -16975,6 +16975,12 @@ class PixldocsRenderer {
16975
16975
  const waitForPaint = () => new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(() => r())));
16976
16976
  const primeCharBounds = (obj) => {
16977
16977
  if (obj instanceof fabric.Textbox) {
16978
+ try {
16979
+ obj.__lineWidths = [];
16980
+ obj.__lineHeights = [];
16981
+ obj.__charBounds = [];
16982
+ } catch {
16983
+ }
16978
16984
  const lines = obj._textLines;
16979
16985
  if (Array.isArray(lines)) {
16980
16986
  for (let i = 0; i < lines.length; i++) {
@@ -18450,7 +18456,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
18450
18456
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
18451
18457
  sanitizeSvgTreeForPdf(svgToDraw);
18452
18458
  try {
18453
- const { bakeTextAnchorPositionsFromLiveSvg } = await import("./vectorPdfExport-D3L64sAJ.js");
18459
+ const { bakeTextAnchorPositionsFromLiveSvg } = await import("./vectorPdfExport-CP-0GqFj.js");
18454
18460
  await bakeTextAnchorPositionsFromLiveSvg(svgToDraw);
18455
18461
  } catch (e) {
18456
18462
  console.warn("[canvas-renderer][pdf-export] anchor-bake pass failed (continuing):", e);
@@ -18795,4 +18801,4 @@ export {
18795
18801
  collectFontDescriptorsFromConfig as y,
18796
18802
  collectFontsFromConfig as z
18797
18803
  };
18798
- //# sourceMappingURL=index-BHa3ekoF.js.map
18804
+ //# sourceMappingURL=index-Dr5P178V.js.map