@pixldocs/canvas-renderer 0.5.155 → 0.5.156

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.
@@ -5804,14 +5804,12 @@ function bakeTextSvgToFabricLineStarts(svg, obj, w) {
5804
5804
  if (canUseAlignmentAnchor && Number.isFinite(lineW) && lineW > 0) {
5805
5805
  lineAnchors.push({
5806
5806
  x: alignmentAnchor === "end" ? baseStart + lineW : baseStart + lineW / 2,
5807
- anchor: alignmentAnchor,
5808
- width: lineW
5807
+ anchor: alignmentAnchor
5809
5808
  });
5810
5809
  } else {
5811
5810
  lineAnchors.push({
5812
5811
  x: baseStart + (Number.isFinite(firstGlyphAdjust) ? firstGlyphAdjust : 0),
5813
- anchor: "start",
5814
- width: lineW
5812
+ anchor: "start"
5815
5813
  });
5816
5814
  }
5817
5815
  }
@@ -5849,8 +5847,7 @@ function bakeTextSvgToFabricLineStarts(svg, obj, w) {
5849
5847
  if (!lineAnchor || typeof lineAnchor.x !== "number" || !Number.isFinite(lineAnchor.x)) return _m;
5850
5848
  const cleanPre = stripAnchorAttrs(pre);
5851
5849
  const cleanPost = stripAnchorAttrs(post);
5852
- const widthAttr = Number.isFinite(lineAnchor.width) && lineAnchor.width > 0 ? ` data-pd-line-width="${lineAnchor.width.toFixed(3)}"` : "";
5853
- return `<tspan${cleanPre} x="${lineAnchor.x.toFixed(3)}" text-anchor="${lineAnchor.anchor}" data-pd-line-anchor="1"${widthAttr}${cleanPost}>`;
5850
+ return `<tspan${cleanPre} x="${lineAnchor.x.toFixed(3)}" text-anchor="${lineAnchor.anchor}" data-pd-line-anchor="1"${cleanPost}>`;
5854
5851
  }
5855
5852
  );
5856
5853
  return newSvg;
@@ -16079,9 +16076,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
16079
16076
  }
16080
16077
  return svgString;
16081
16078
  }
16082
- const resolvedPackageVersion = "0.5.155";
16079
+ const resolvedPackageVersion = "0.5.156";
16083
16080
  const PACKAGE_VERSION = resolvedPackageVersion;
16084
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.155";
16081
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.156";
16085
16082
  const roundParityValue = (value) => {
16086
16083
  if (typeof value !== "number") return value;
16087
16084
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -16516,7 +16513,7 @@ class PixldocsRenderer {
16516
16513
  await this.waitForCanvasScene(container, cloned, i);
16517
16514
  }
16518
16515
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
16519
- const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-C5NmVmxB.cjs"));
16516
+ const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BbKisSsi.cjs"));
16520
16517
  const prepared = preparePagesForExport(
16521
16518
  cloned.pages,
16522
16519
  canvasWidth,
@@ -18618,7 +18615,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
18618
18615
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
18619
18616
  sanitizeSvgTreeForPdf(svgToDraw);
18620
18617
  try {
18621
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-C5NmVmxB.cjs"));
18618
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BbKisSsi.cjs"));
18622
18619
  try {
18623
18620
  await logTextMeasurementDiagnostic(svgToDraw);
18624
18621
  } catch {
@@ -18628,12 +18625,6 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
18628
18625
  console.warn("[canvas-renderer][pdf-export] anchor-bake pass failed (continuing):", e);
18629
18626
  }
18630
18627
  await rasterizeShadowMarkers(svgToDraw);
18631
- try {
18632
- const { promoteFabricLineAnchorsToSelectableText } = await Promise.resolve().then(() => require("./vectorPdfExport-C5NmVmxB.cjs"));
18633
- promoteFabricLineAnchorsToSelectableText(svgToDraw);
18634
- } catch (e) {
18635
- console.warn("[canvas-renderer][pdf-export] selectable anchor promotion failed (continuing):", e);
18636
- }
18637
18628
  return svgToDraw;
18638
18629
  } catch {
18639
18630
  return null;
@@ -18759,7 +18750,7 @@ async function assemblePdfFromSvgs(svgResults, options = {}) {
18759
18750
  }
18760
18751
  if (shouldOutlineText) {
18761
18752
  try {
18762
- const { convertAllTextToPath } = await Promise.resolve().then(() => require("./svgTextToPath-IM1f6F-f.cjs"));
18753
+ const { convertAllTextToPath } = await Promise.resolve().then(() => require("./svgTextToPath-7fhL08qs.cjs")).then((n) => n.svgTextToPath);
18763
18754
  pageSvg = await convertAllTextToPath(pageSvg, fontBaseUrl, { mode: outlineSubMode });
18764
18755
  try {
18765
18756
  dumpSvgTextDiagnostics(pageSvg, i, PARITY_TAG, "STAGE-1b-after-text-to-path-raw");
@@ -18971,4 +18962,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
18971
18962
  exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
18972
18963
  exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
18973
18964
  exports.warmTemplateFromForm = warmTemplateFromForm;
18974
- //# sourceMappingURL=index-BwHwQrnS.cjs.map
18965
+ //# sourceMappingURL=index-DhIDZFPx.cjs.map