@pixldocs/canvas-renderer 0.5.109 → 0.5.110

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.
package/dist/index.d.ts CHANGED
@@ -256,7 +256,7 @@ export declare function normalizeFontFamily(fontStack: string): string;
256
256
  * Package version banner. Bump alongside package.json so we can confirm
257
257
  * (via browser:log) that the deployed bundle matches the expected build.
258
258
  */
259
- export declare const PACKAGE_VERSION = "0.5.105";
259
+ export declare const PACKAGE_VERSION = "0.5.110";
260
260
 
261
261
  export declare interface PageSettings {
262
262
  backgroundColor?: string;
@@ -302,7 +302,7 @@ export declare interface PdfFromFormOptions {
302
302
  title?: string;
303
303
  /** Base URL for TTF font files for PDF font embedding */
304
304
  fontBaseUrl?: string;
305
- /** PDF text rendering mode. Default: selectable real text. */
305
+ /** PDF text rendering mode. Default: pixel-perfect path text for canvas parity. */
306
306
  textMode?: 'auto' | 'selectable' | 'pixel-perfect';
307
307
  }
308
308
 
package/dist/index.js CHANGED
@@ -13998,7 +13998,7 @@ function PixldocsPreview(props) {
13998
13998
  !canvasSettled && /* @__PURE__ */ jsx("div", { style: { position: "absolute", inset: 0, display: "flex", alignItems: "center", justifyContent: "center", minHeight: 200 }, children: /* @__PURE__ */ jsx("div", { style: { color: "#888", fontSize: 14 }, children: "Loading preview..." }) })
13999
13999
  ] });
14000
14000
  }
14001
- const PACKAGE_VERSION = "0.5.105";
14001
+ const PACKAGE_VERSION = "0.5.110";
14002
14002
  const roundParityValue = (value) => {
14003
14003
  if (typeof value !== "number") return value;
14004
14004
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -14285,7 +14285,7 @@ class PixldocsRenderer {
14285
14285
  async renderPdf(templateConfig, options) {
14286
14286
  const svgs = await this.renderAllPageSvgs(templateConfig);
14287
14287
  const { assemblePdfFromSvgs: assemblePdfFromSvgs2 } = await Promise.resolve().then(() => pdfExport);
14288
- return assemblePdfFromSvgs2(svgs, { title: options == null ? void 0 : options.title, fontBaseUrl: options == null ? void 0 : options.fontBaseUrl, textMode: (options == null ? void 0 : options.textMode) ?? templateConfig.pdfTextMode ?? "selectable" });
14288
+ return assemblePdfFromSvgs2(svgs, { title: options == null ? void 0 : options.title, fontBaseUrl: options == null ? void 0 : options.fontBaseUrl, textMode: (options == null ? void 0 : options.textMode) ?? "pixel-perfect" });
14289
14289
  }
14290
14290
  /**
14291
14291
  * Resolve from V2 sectionState and render a vector PDF.
@@ -14310,7 +14310,7 @@ class PixldocsRenderer {
14310
14310
  }
14311
14311
  const svgs = await this.renderAllPageSvgs(configToRender);
14312
14312
  const { assemblePdfFromSvgs: assemblePdfFromSvgs2 } = await Promise.resolve().then(() => pdfExport);
14313
- return assemblePdfFromSvgs2(svgs, { title: title ?? resolved.config.name, fontBaseUrl, textMode: options.textMode ?? configToRender.pdfTextMode ?? "selectable" });
14313
+ return assemblePdfFromSvgs2(svgs, { title: title ?? resolved.config.name, fontBaseUrl, textMode: options.textMode ?? "pixel-perfect" });
14314
14314
  }
14315
14315
  async renderById(templateId, formData, options) {
14316
14316
  const resolved = await resolveTemplateData({
@@ -17667,7 +17667,7 @@ async function assemblePdfFromSvgs(svgResults, options = {}) {
17667
17667
  }
17668
17668
  if (shouldOutlineText) {
17669
17669
  try {
17670
- const { convertAllTextToPath } = await import("./svgTextToPath-B2UVS22F.js");
17670
+ const { convertAllTextToPath } = await import("./svgTextToPath-CQ2Tp03U.js");
17671
17671
  pageSvg = await convertAllTextToPath(pageSvg, fontBaseUrl, { mode: outlineSubMode });
17672
17672
  try {
17673
17673
  dumpSvgTextDiagnostics(pageSvg, i, PARITY_TAG, "STAGE-1b-after-text-to-path-raw");