@pixldocs/canvas-renderer 0.5.191 → 0.5.192
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-C3kuDISv.js → index-CqgOWYwR.js} +26 -6
- package/dist/{index-C3kuDISv.js.map → index-CqgOWYwR.js.map} +1 -1
- package/dist/{index-BJR7zaam.cjs → index-UIDDdWwb.cjs} +26 -6
- package/dist/{index-BJR7zaam.cjs.map → index-UIDDdWwb.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-CrTGqxx6.js → vectorPdfExport-DuVMxQSS.js} +4 -4
- package/dist/{vectorPdfExport-CrTGqxx6.js.map → vectorPdfExport-DuVMxQSS.js.map} +1 -1
- package/dist/{vectorPdfExport-D_2mdcwO.cjs → vectorPdfExport-O8vRHBlU.cjs} +4 -4
- package/dist/{vectorPdfExport-D_2mdcwO.cjs.map → vectorPdfExport-O8vRHBlU.cjs.map} +1 -1
- package/package.json +1 -1
|
@@ -16907,9 +16907,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16907
16907
|
}
|
|
16908
16908
|
return svgString;
|
|
16909
16909
|
}
|
|
16910
|
-
const resolvedPackageVersion = "0.5.
|
|
16910
|
+
const resolvedPackageVersion = "0.5.192";
|
|
16911
16911
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16912
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16912
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.192";
|
|
16913
16913
|
const roundParityValue = (value) => {
|
|
16914
16914
|
if (typeof value !== "number") return value;
|
|
16915
16915
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -17536,7 +17536,7 @@ class PixldocsRenderer {
|
|
|
17536
17536
|
await this.waitForCanvasScene(container, cloned, i);
|
|
17537
17537
|
}
|
|
17538
17538
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
17539
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
17539
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-O8vRHBlU.cjs"));
|
|
17540
17540
|
const prepared = preparePagesForExport(
|
|
17541
17541
|
cloned.pages,
|
|
17542
17542
|
canvasWidth,
|
|
@@ -17547,7 +17547,27 @@ class PixldocsRenderer {
|
|
|
17547
17547
|
watermark: !!options.watermark,
|
|
17548
17548
|
returnBlob: true,
|
|
17549
17549
|
pdfTextMode: options.textMode ?? (cloned == null ? void 0 : cloned.pdfTextMode) ?? ((_a = cloned.canvas) == null ? void 0 : _a.n) ?? "auto",
|
|
17550
|
-
|
|
17550
|
+
// IMPORTANT: We intentionally do NOT skip the live-canvas SVG fast path
|
|
17551
|
+
// here, even when `shouldForcePerElement` is true via auto-detection.
|
|
17552
|
+
//
|
|
17553
|
+
// Reason: skipping the fast path forces the config-space export, which
|
|
17554
|
+
// computes positions from stored values rather than the live Fabric
|
|
17555
|
+
// layout (post auto-shrink, post text-init, post crop-group bake).
|
|
17556
|
+
// That drift causes severe text overlap / mis-positioning in the PDF
|
|
17557
|
+
// while the on-screen preview (which uses the live canvas) still looks
|
|
17558
|
+
// correct. v0.5.191 shipped with this skip enabled and produced exactly
|
|
17559
|
+
// that regression.
|
|
17560
|
+
//
|
|
17561
|
+
// The Safari/iOS "missing photo" issue is solved end-to-end by the
|
|
17562
|
+
// `downscaleConfigRasterImages()` pre-pass above, which shrinks large
|
|
17563
|
+
// `data:image/*` JPEGs to a safe edge length before the canvas mounts.
|
|
17564
|
+
// That alone keeps Safari's SVG capture reliable without altering the
|
|
17565
|
+
// layout pipeline.
|
|
17566
|
+
//
|
|
17567
|
+
// We still honor an explicit `forcePerElementPdf: true` from the host
|
|
17568
|
+
// app (advanced opt-in for niche cases), but the auto path no longer
|
|
17569
|
+
// toggles this flag.
|
|
17570
|
+
skipLiveCanvasSvgFastPath: forceMode === true
|
|
17551
17571
|
});
|
|
17552
17572
|
if (!result || typeof result === "undefined") {
|
|
17553
17573
|
throw new Error("exportMultiPagePdf returned no blob (returnBlob path failed)");
|
|
@@ -19682,7 +19702,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
19682
19702
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
19683
19703
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
19684
19704
|
try {
|
|
19685
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
19705
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-O8vRHBlU.cjs"));
|
|
19686
19706
|
try {
|
|
19687
19707
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
19688
19708
|
} catch {
|
|
@@ -20079,4 +20099,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
20079
20099
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
20080
20100
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
20081
20101
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
20082
|
-
//# sourceMappingURL=index-
|
|
20102
|
+
//# sourceMappingURL=index-UIDDdWwb.cjs.map
|