@pixldocs/canvas-renderer 0.5.173 → 0.5.174

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.
@@ -16331,9 +16331,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
16331
16331
  }
16332
16332
  return svgString;
16333
16333
  }
16334
- const resolvedPackageVersion = "0.5.173";
16334
+ const resolvedPackageVersion = "0.5.174";
16335
16335
  const PACKAGE_VERSION = resolvedPackageVersion;
16336
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.173";
16336
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.174";
16337
16337
  const roundParityValue = (value) => {
16338
16338
  if (typeof value !== "number") return value;
16339
16339
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -16707,7 +16707,8 @@ class PixldocsRenderer {
16707
16707
  */
16708
16708
  async renderPdf(templateConfig, options) {
16709
16709
  return this.renderPdfViaClientExport(templateConfig, {
16710
- title: options == null ? void 0 : options.title
16710
+ title: options == null ? void 0 : options.title,
16711
+ textMode: options == null ? void 0 : options.textMode
16711
16712
  });
16712
16713
  }
16713
16714
  /**
@@ -16715,7 +16716,7 @@ class PixldocsRenderer {
16715
16716
  * This is the primary PDF export API — mirrors renderFromForm() but returns a PDF.
16716
16717
  */
16717
16718
  async renderPdfFromForm(options) {
16718
- const { templateId, formSchemaId, sectionState, themeId, watermark, watermarkOptions, prefetched, title, fontBaseUrl } = options;
16719
+ const { templateId, formSchemaId, sectionState, themeId, watermark, watermarkOptions, prefetched, title, fontBaseUrl, textMode } = options;
16719
16720
  const resolved = await resolveFromForm({
16720
16721
  templateId,
16721
16722
  formSchemaId,
@@ -16733,7 +16734,8 @@ class PixldocsRenderer {
16733
16734
  }
16734
16735
  return this.renderPdfViaClientExport(configToRender, {
16735
16736
  title: title ?? resolved.config.name,
16736
- watermark: shouldWatermark
16737
+ watermark: shouldWatermark,
16738
+ textMode
16737
16739
  });
16738
16740
  }
16739
16741
  async renderById(templateId, formData, options) {
@@ -16832,7 +16834,7 @@ class PixldocsRenderer {
16832
16834
  await this.waitForCanvasScene(container, cloned, i);
16833
16835
  }
16834
16836
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
16835
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CyTa-D1p.js");
16837
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-B4B0CPjW.js");
16836
16838
  const prepared = preparePagesForExport(
16837
16839
  cloned.pages,
16838
16840
  canvasWidth,
@@ -16842,7 +16844,7 @@ class PixldocsRenderer {
16842
16844
  title: options.title,
16843
16845
  watermark: !!options.watermark,
16844
16846
  returnBlob: true,
16845
- pdfTextMode: ((_a = cloned.canvas) == null ? void 0 : _a.n) ?? "selectable"
16847
+ pdfTextMode: options.textMode ?? (cloned == null ? void 0 : cloned.pdfTextMode) ?? ((_a = cloned.canvas) == null ? void 0 : _a.n) ?? "auto"
16846
16848
  });
16847
16849
  if (!result || typeof result === "undefined") {
16848
16850
  throw new Error("exportMultiPagePdf returned no blob (returnBlob path failed)");
@@ -18968,7 +18970,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
18968
18970
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
18969
18971
  sanitizeSvgTreeForPdf(svgToDraw);
18970
18972
  try {
18971
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CyTa-D1p.js");
18973
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-B4B0CPjW.js");
18972
18974
  try {
18973
18975
  await logTextMeasurementDiagnostic(svgToDraw);
18974
18976
  } catch {
@@ -19381,4 +19383,4 @@ export {
19381
19383
  collectFontDescriptorsFromConfig as y,
19382
19384
  collectFontsFromConfig as z
19383
19385
  };
19384
- //# sourceMappingURL=index-ChHYFk0E.js.map
19386
+ //# sourceMappingURL=index-DLAkGTqW.js.map