@pixldocs/canvas-renderer 0.5.155 → 0.5.157

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.
@@ -5786,14 +5786,12 @@ function bakeTextSvgToFabricLineStarts(svg, obj, w) {
5786
5786
  if (canUseAlignmentAnchor && Number.isFinite(lineW) && lineW > 0) {
5787
5787
  lineAnchors.push({
5788
5788
  x: alignmentAnchor === "end" ? baseStart + lineW : baseStart + lineW / 2,
5789
- anchor: alignmentAnchor,
5790
- width: lineW
5789
+ anchor: alignmentAnchor
5791
5790
  });
5792
5791
  } else {
5793
5792
  lineAnchors.push({
5794
5793
  x: baseStart + (Number.isFinite(firstGlyphAdjust) ? firstGlyphAdjust : 0),
5795
- anchor: "start",
5796
- width: lineW
5794
+ anchor: "start"
5797
5795
  });
5798
5796
  }
5799
5797
  }
@@ -5831,8 +5829,7 @@ function bakeTextSvgToFabricLineStarts(svg, obj, w) {
5831
5829
  if (!lineAnchor || typeof lineAnchor.x !== "number" || !Number.isFinite(lineAnchor.x)) return _m;
5832
5830
  const cleanPre = stripAnchorAttrs(pre);
5833
5831
  const cleanPost = stripAnchorAttrs(post);
5834
- const widthAttr = Number.isFinite(lineAnchor.width) && lineAnchor.width > 0 ? ` data-pd-line-width="${lineAnchor.width.toFixed(3)}"` : "";
5835
- return `<tspan${cleanPre} x="${lineAnchor.x.toFixed(3)}" text-anchor="${lineAnchor.anchor}" data-pd-line-anchor="1"${widthAttr}${cleanPost}>`;
5832
+ return `<tspan${cleanPre} x="${lineAnchor.x.toFixed(3)}" text-anchor="${lineAnchor.anchor}" data-pd-line-anchor="1"${cleanPost}>`;
5836
5833
  }
5837
5834
  );
5838
5835
  return newSvg;
@@ -16061,9 +16058,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
16061
16058
  }
16062
16059
  return svgString;
16063
16060
  }
16064
- const resolvedPackageVersion = "0.5.155";
16061
+ const resolvedPackageVersion = "0.5.157";
16065
16062
  const PACKAGE_VERSION = resolvedPackageVersion;
16066
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.155";
16063
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.157";
16067
16064
  const roundParityValue = (value) => {
16068
16065
  if (typeof value !== "number") return value;
16069
16066
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -16498,7 +16495,7 @@ class PixldocsRenderer {
16498
16495
  await this.waitForCanvasScene(container, cloned, i);
16499
16496
  }
16500
16497
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
16501
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-vCax992V.js");
16498
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CZyyQbwm.js");
16502
16499
  const prepared = preparePagesForExport(
16503
16500
  cloned.pages,
16504
16501
  canvasWidth,
@@ -18600,7 +18597,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
18600
18597
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
18601
18598
  sanitizeSvgTreeForPdf(svgToDraw);
18602
18599
  try {
18603
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-vCax992V.js");
18600
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CZyyQbwm.js");
18604
18601
  try {
18605
18602
  await logTextMeasurementDiagnostic(svgToDraw);
18606
18603
  } catch {
@@ -18610,12 +18607,6 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
18610
18607
  console.warn("[canvas-renderer][pdf-export] anchor-bake pass failed (continuing):", e);
18611
18608
  }
18612
18609
  await rasterizeShadowMarkers(svgToDraw);
18613
- try {
18614
- const { promoteFabricLineAnchorsToSelectableText } = await import("./vectorPdfExport-vCax992V.js");
18615
- promoteFabricLineAnchorsToSelectableText(svgToDraw);
18616
- } catch (e) {
18617
- console.warn("[canvas-renderer][pdf-export] selectable anchor promotion failed (continuing):", e);
18618
- }
18619
18610
  return svgToDraw;
18620
18611
  } catch {
18621
18612
  return null;
@@ -18741,7 +18732,7 @@ async function assemblePdfFromSvgs(svgResults, options = {}) {
18741
18732
  }
18742
18733
  if (shouldOutlineText) {
18743
18734
  try {
18744
- const { convertAllTextToPath } = await import("./svgTextToPath-BXAzwaaR.js");
18735
+ const { convertAllTextToPath } = await import("./svgTextToPath-V1vC0SQt.js").then((n) => n.s);
18745
18736
  pageSvg = await convertAllTextToPath(pageSvg, fontBaseUrl, { mode: outlineSubMode });
18746
18737
  try {
18747
18738
  dumpSvgTextDiagnostics(pageSvg, i, PARITY_TAG, "STAGE-1b-after-text-to-path-raw");
@@ -18956,4 +18947,4 @@ export {
18956
18947
  collectFontDescriptorsFromConfig as y,
18957
18948
  collectFontsFromConfig as z
18958
18949
  };
18959
- //# sourceMappingURL=index-BQA8_wgq.js.map
18950
+ //# sourceMappingURL=index-xn-L7QHB.js.map