@pixldocs/canvas-renderer 0.5.191 → 0.5.192

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.
@@ -16889,9 +16889,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
16889
16889
  }
16890
16890
  return svgString;
16891
16891
  }
16892
- const resolvedPackageVersion = "0.5.191";
16892
+ const resolvedPackageVersion = "0.5.192";
16893
16893
  const PACKAGE_VERSION = resolvedPackageVersion;
16894
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.191";
16894
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.192";
16895
16895
  const roundParityValue = (value) => {
16896
16896
  if (typeof value !== "number") return value;
16897
16897
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -17518,7 +17518,7 @@ class PixldocsRenderer {
17518
17518
  await this.waitForCanvasScene(container, cloned, i);
17519
17519
  }
17520
17520
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
17521
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CrTGqxx6.js");
17521
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DuVMxQSS.js");
17522
17522
  const prepared = preparePagesForExport(
17523
17523
  cloned.pages,
17524
17524
  canvasWidth,
@@ -17529,7 +17529,27 @@ class PixldocsRenderer {
17529
17529
  watermark: !!options.watermark,
17530
17530
  returnBlob: true,
17531
17531
  pdfTextMode: options.textMode ?? (cloned == null ? void 0 : cloned.pdfTextMode) ?? ((_a = cloned.canvas) == null ? void 0 : _a.n) ?? "auto",
17532
- skipLiveCanvasSvgFastPath: shouldForcePerElement
17532
+ // IMPORTANT: We intentionally do NOT skip the live-canvas SVG fast path
17533
+ // here, even when `shouldForcePerElement` is true via auto-detection.
17534
+ //
17535
+ // Reason: skipping the fast path forces the config-space export, which
17536
+ // computes positions from stored values rather than the live Fabric
17537
+ // layout (post auto-shrink, post text-init, post crop-group bake).
17538
+ // That drift causes severe text overlap / mis-positioning in the PDF
17539
+ // while the on-screen preview (which uses the live canvas) still looks
17540
+ // correct. v0.5.191 shipped with this skip enabled and produced exactly
17541
+ // that regression.
17542
+ //
17543
+ // The Safari/iOS "missing photo" issue is solved end-to-end by the
17544
+ // `downscaleConfigRasterImages()` pre-pass above, which shrinks large
17545
+ // `data:image/*` JPEGs to a safe edge length before the canvas mounts.
17546
+ // That alone keeps Safari's SVG capture reliable without altering the
17547
+ // layout pipeline.
17548
+ //
17549
+ // We still honor an explicit `forcePerElementPdf: true` from the host
17550
+ // app (advanced opt-in for niche cases), but the auto path no longer
17551
+ // toggles this flag.
17552
+ skipLiveCanvasSvgFastPath: forceMode === true
17533
17553
  });
17534
17554
  if (!result || typeof result === "undefined") {
17535
17555
  throw new Error("exportMultiPagePdf returned no blob (returnBlob path failed)");
@@ -19664,7 +19684,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
19664
19684
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
19665
19685
  sanitizeSvgTreeForPdf(svgToDraw);
19666
19686
  try {
19667
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CrTGqxx6.js");
19687
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DuVMxQSS.js");
19668
19688
  try {
19669
19689
  await logTextMeasurementDiagnostic(svgToDraw);
19670
19690
  } catch {
@@ -20064,4 +20084,4 @@ export {
20064
20084
  buildTeaserBlurFlatKeys as y,
20065
20085
  collectFontDescriptorsFromConfig as z
20066
20086
  };
20067
- //# sourceMappingURL=index-C3kuDISv.js.map
20087
+ //# sourceMappingURL=index-CqgOWYwR.js.map