@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.cjs
CHANGED
|
@@ -14017,7 +14017,7 @@ function PixldocsPreview(props) {
|
|
|
14017
14017
|
!canvasSettled && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "absolute", inset: 0, display: "flex", alignItems: "center", justifyContent: "center", minHeight: 200 }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "#888", fontSize: 14 }, children: "Loading preview..." }) })
|
|
14018
14018
|
] });
|
|
14019
14019
|
}
|
|
14020
|
-
const PACKAGE_VERSION = "0.5.
|
|
14020
|
+
const PACKAGE_VERSION = "0.5.110";
|
|
14021
14021
|
const roundParityValue = (value) => {
|
|
14022
14022
|
if (typeof value !== "number") return value;
|
|
14023
14023
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -14304,7 +14304,7 @@ class PixldocsRenderer {
|
|
|
14304
14304
|
async renderPdf(templateConfig, options) {
|
|
14305
14305
|
const svgs = await this.renderAllPageSvgs(templateConfig);
|
|
14306
14306
|
const { assemblePdfFromSvgs: assemblePdfFromSvgs2 } = await Promise.resolve().then(() => pdfExport);
|
|
14307
|
-
return assemblePdfFromSvgs2(svgs, { title: options == null ? void 0 : options.title, fontBaseUrl: options == null ? void 0 : options.fontBaseUrl, textMode: (options == null ? void 0 : options.textMode) ??
|
|
14307
|
+
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" });
|
|
14308
14308
|
}
|
|
14309
14309
|
/**
|
|
14310
14310
|
* Resolve from V2 sectionState and render a vector PDF.
|
|
@@ -14329,7 +14329,7 @@ class PixldocsRenderer {
|
|
|
14329
14329
|
}
|
|
14330
14330
|
const svgs = await this.renderAllPageSvgs(configToRender);
|
|
14331
14331
|
const { assemblePdfFromSvgs: assemblePdfFromSvgs2 } = await Promise.resolve().then(() => pdfExport);
|
|
14332
|
-
return assemblePdfFromSvgs2(svgs, { title: title ?? resolved.config.name, fontBaseUrl, textMode: options.textMode ??
|
|
14332
|
+
return assemblePdfFromSvgs2(svgs, { title: title ?? resolved.config.name, fontBaseUrl, textMode: options.textMode ?? "pixel-perfect" });
|
|
14333
14333
|
}
|
|
14334
14334
|
async renderById(templateId, formData, options) {
|
|
14335
14335
|
const resolved = await resolveTemplateData({
|
|
@@ -17686,7 +17686,7 @@ async function assemblePdfFromSvgs(svgResults, options = {}) {
|
|
|
17686
17686
|
}
|
|
17687
17687
|
if (shouldOutlineText) {
|
|
17688
17688
|
try {
|
|
17689
|
-
const { convertAllTextToPath } = await Promise.resolve().then(() => require("./svgTextToPath-
|
|
17689
|
+
const { convertAllTextToPath } = await Promise.resolve().then(() => require("./svgTextToPath-4Y_THSBg.cjs"));
|
|
17690
17690
|
pageSvg = await convertAllTextToPath(pageSvg, fontBaseUrl, { mode: outlineSubMode });
|
|
17691
17691
|
try {
|
|
17692
17692
|
dumpSvgTextDiagnostics(pageSvg, i, PARITY_TAG, "STAGE-1b-after-text-to-path-raw");
|