@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.
- package/dist/{index-ZehEOqUB.cjs → index-BH1kJLpb.cjs} +11 -9
- package/dist/{index-ZehEOqUB.cjs.map → index-BH1kJLpb.cjs.map} +1 -1
- package/dist/{index-ChHYFk0E.js → index-DLAkGTqW.js} +11 -9
- package/dist/{index-ChHYFk0E.js.map → index-DLAkGTqW.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-CyTa-D1p.js → vectorPdfExport-B4B0CPjW.js} +8 -4
- package/dist/{vectorPdfExport-CyTa-D1p.js.map → vectorPdfExport-B4B0CPjW.js.map} +1 -1
- package/dist/{vectorPdfExport-BWDj55kq.cjs → vectorPdfExport-wyGn4ybk.cjs} +8 -4
- package/dist/{vectorPdfExport-BWDj55kq.cjs.map → vectorPdfExport-wyGn4ybk.cjs.map} +1 -1
- package/package.json +1 -1
|
@@ -16349,9 +16349,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16349
16349
|
}
|
|
16350
16350
|
return svgString;
|
|
16351
16351
|
}
|
|
16352
|
-
const resolvedPackageVersion = "0.5.
|
|
16352
|
+
const resolvedPackageVersion = "0.5.174";
|
|
16353
16353
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16354
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16354
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.174";
|
|
16355
16355
|
const roundParityValue = (value) => {
|
|
16356
16356
|
if (typeof value !== "number") return value;
|
|
16357
16357
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -16725,7 +16725,8 @@ class PixldocsRenderer {
|
|
|
16725
16725
|
*/
|
|
16726
16726
|
async renderPdf(templateConfig, options) {
|
|
16727
16727
|
return this.renderPdfViaClientExport(templateConfig, {
|
|
16728
|
-
title: options == null ? void 0 : options.title
|
|
16728
|
+
title: options == null ? void 0 : options.title,
|
|
16729
|
+
textMode: options == null ? void 0 : options.textMode
|
|
16729
16730
|
});
|
|
16730
16731
|
}
|
|
16731
16732
|
/**
|
|
@@ -16733,7 +16734,7 @@ class PixldocsRenderer {
|
|
|
16733
16734
|
* This is the primary PDF export API — mirrors renderFromForm() but returns a PDF.
|
|
16734
16735
|
*/
|
|
16735
16736
|
async renderPdfFromForm(options) {
|
|
16736
|
-
const { templateId, formSchemaId, sectionState, themeId, watermark, watermarkOptions, prefetched, title, fontBaseUrl } = options;
|
|
16737
|
+
const { templateId, formSchemaId, sectionState, themeId, watermark, watermarkOptions, prefetched, title, fontBaseUrl, textMode } = options;
|
|
16737
16738
|
const resolved = await resolveFromForm({
|
|
16738
16739
|
templateId,
|
|
16739
16740
|
formSchemaId,
|
|
@@ -16751,7 +16752,8 @@ class PixldocsRenderer {
|
|
|
16751
16752
|
}
|
|
16752
16753
|
return this.renderPdfViaClientExport(configToRender, {
|
|
16753
16754
|
title: title ?? resolved.config.name,
|
|
16754
|
-
watermark: shouldWatermark
|
|
16755
|
+
watermark: shouldWatermark,
|
|
16756
|
+
textMode
|
|
16755
16757
|
});
|
|
16756
16758
|
}
|
|
16757
16759
|
async renderById(templateId, formData, options) {
|
|
@@ -16850,7 +16852,7 @@ class PixldocsRenderer {
|
|
|
16850
16852
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16851
16853
|
}
|
|
16852
16854
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
16853
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
16855
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-wyGn4ybk.cjs"));
|
|
16854
16856
|
const prepared = preparePagesForExport(
|
|
16855
16857
|
cloned.pages,
|
|
16856
16858
|
canvasWidth,
|
|
@@ -16860,7 +16862,7 @@ class PixldocsRenderer {
|
|
|
16860
16862
|
title: options.title,
|
|
16861
16863
|
watermark: !!options.watermark,
|
|
16862
16864
|
returnBlob: true,
|
|
16863
|
-
pdfTextMode: ((_a = cloned.canvas) == null ? void 0 : _a.n) ?? "
|
|
16865
|
+
pdfTextMode: options.textMode ?? (cloned == null ? void 0 : cloned.pdfTextMode) ?? ((_a = cloned.canvas) == null ? void 0 : _a.n) ?? "auto"
|
|
16864
16866
|
});
|
|
16865
16867
|
if (!result || typeof result === "undefined") {
|
|
16866
16868
|
throw new Error("exportMultiPagePdf returned no blob (returnBlob path failed)");
|
|
@@ -18986,7 +18988,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
18986
18988
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
18987
18989
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
18988
18990
|
try {
|
|
18989
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
18991
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-wyGn4ybk.cjs"));
|
|
18990
18992
|
try {
|
|
18991
18993
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
18992
18994
|
} catch {
|
|
@@ -19396,4 +19398,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
19396
19398
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
19397
19399
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
19398
19400
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
19399
|
-
//# sourceMappingURL=index-
|
|
19401
|
+
//# sourceMappingURL=index-BH1kJLpb.cjs.map
|