@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.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/{svgTextToPath-CeL46_ks.cjs → svgTextToPath-4Y_THSBg.cjs} +36 -4
- package/dist/svgTextToPath-4Y_THSBg.cjs.map +1 -0
- package/dist/{svgTextToPath-B2UVS22F.js → svgTextToPath-CQ2Tp03U.js} +36 -4
- package/dist/svgTextToPath-CQ2Tp03U.js.map +1 -0
- package/package.json +1 -1
- package/dist/svgTextToPath-B2UVS22F.js.map +0 -1
- package/dist/svgTextToPath-CeL46_ks.cjs.map +0 -1
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.
|
|
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:
|
|
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.
|
|
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) ??
|
|
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 ??
|
|
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-
|
|
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");
|