@pixldocs/canvas-renderer 0.5.198 → 0.5.200
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-CM6Bzcyx.cjs → index-B0b3u83I.cjs} +13 -26
- package/dist/{index-CM6Bzcyx.cjs.map → index-B0b3u83I.cjs.map} +1 -1
- package/dist/{index-Cgi6Y_WS.js → index-oOW9gtoq.js} +13 -26
- package/dist/{index-Cgi6Y_WS.js.map → index-oOW9gtoq.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-xj7xRXH7.js → vectorPdfExport-BLeFZX_c.js} +10 -8
- package/dist/vectorPdfExport-BLeFZX_c.js.map +1 -0
- package/dist/{vectorPdfExport-CBUSNaeP.cjs → vectorPdfExport-CV6GxECJ.cjs} +10 -8
- package/dist/vectorPdfExport-CV6GxECJ.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/vectorPdfExport-CBUSNaeP.cjs.map +0 -1
- package/dist/vectorPdfExport-xj7xRXH7.js.map +0 -1
|
@@ -16921,9 +16921,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16921
16921
|
}
|
|
16922
16922
|
return svgString;
|
|
16923
16923
|
}
|
|
16924
|
-
const resolvedPackageVersion = "0.5.
|
|
16924
|
+
const resolvedPackageVersion = "0.5.200";
|
|
16925
16925
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16926
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16926
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.200";
|
|
16927
16927
|
const roundParityValue = (value) => {
|
|
16928
16928
|
if (typeof value !== "number") return value;
|
|
16929
16929
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -17523,7 +17523,7 @@ class PixldocsRenderer {
|
|
|
17523
17523
|
const forceMode = callForce !== void 0 ? callForce : cfgForce !== void 0 ? cfgForce : "auto";
|
|
17524
17524
|
const hasUserDataImage = configHasUserDataImage(cloned);
|
|
17525
17525
|
const isSafariLike = detectSafariOrIos();
|
|
17526
|
-
const shouldForcePerElement = forceMode === true ? true : forceMode === false ? false :
|
|
17526
|
+
const shouldForcePerElement = forceMode === true ? true : forceMode === false ? false : false;
|
|
17527
17527
|
const maxEdgeOpt = options.maxImageEdgePx ?? this.config.maxImageEdgePx;
|
|
17528
17528
|
const effectiveMaxEdge = typeof maxEdgeOpt === "number" ? Math.max(0, maxEdgeOpt | 0) : hasUserDataImage ? 2048 : 0;
|
|
17529
17529
|
if (effectiveMaxEdge > 0) {
|
|
@@ -17602,7 +17602,7 @@ class PixldocsRenderer {
|
|
|
17602
17602
|
await this.waitForCanvasScene(container, cloned, i);
|
|
17603
17603
|
}
|
|
17604
17604
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
17605
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
17605
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BLeFZX_c.js");
|
|
17606
17606
|
const prepared = preparePagesForExport(
|
|
17607
17607
|
cloned.pages,
|
|
17608
17608
|
canvasWidth,
|
|
@@ -17613,26 +17613,13 @@ class PixldocsRenderer {
|
|
|
17613
17613
|
watermark: !!options.watermark,
|
|
17614
17614
|
returnBlob: true,
|
|
17615
17615
|
pdfTextMode: options.textMode ?? (cloned == null ? void 0 : cloned.pdfTextMode) ?? ((_a = cloned.canvas) == null ? void 0 : _a.n) ?? "auto",
|
|
17616
|
-
//
|
|
17617
|
-
//
|
|
17618
|
-
//
|
|
17619
|
-
//
|
|
17620
|
-
//
|
|
17621
|
-
|
|
17622
|
-
|
|
17623
|
-
// while the on-screen preview (which uses the live canvas) still looks
|
|
17624
|
-
// correct. v0.5.191 shipped with this skip enabled and produced exactly
|
|
17625
|
-
// that regression.
|
|
17626
|
-
//
|
|
17627
|
-
// The large-photo missing/corrupt image issue is solved by the
|
|
17628
|
-
// `downscaleConfigRasterImages()` pre-pass above, which shrinks and
|
|
17629
|
-
// recompresses oversized `data:image/*` sources before the canvas
|
|
17630
|
-
// mounts. That keeps SVG capture reliable without altering layout.
|
|
17631
|
-
//
|
|
17632
|
-
// We still honor an explicit `forcePerElementPdf: true` from the host
|
|
17633
|
-
// app (advanced opt-in for niche cases), but the auto path no longer
|
|
17634
|
-
// toggles this flag.
|
|
17635
|
-
skipLiveCanvasSvgFastPath: forceMode === true
|
|
17616
|
+
// Safari/WebKit can still let svg2pdf silently drop valid JPEG data-URL
|
|
17617
|
+
// <image> nodes even after the data is compressed and Fabric has loaded
|
|
17618
|
+
// it. For auto Safari mode, bypass only the full-page SVG->svg2pdf fast
|
|
17619
|
+
// path and use the live Fabric object PDF path instead, preserving live
|
|
17620
|
+
// matrices/order so we do not regress into stale config-space layout.
|
|
17621
|
+
skipLiveCanvasSvgFastPath: forceMode === true,
|
|
17622
|
+
useLiveCanvasObjectPdfPath: shouldForcePerElement && forceMode !== true
|
|
17636
17623
|
});
|
|
17637
17624
|
if (!result || typeof result === "undefined") {
|
|
17638
17625
|
throw new Error("exportMultiPagePdf returned no blob (returnBlob path failed)");
|
|
@@ -19799,7 +19786,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
19799
19786
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
19800
19787
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
19801
19788
|
try {
|
|
19802
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
19789
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-BLeFZX_c.js");
|
|
19803
19790
|
try {
|
|
19804
19791
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
19805
19792
|
} catch {
|
|
@@ -20199,4 +20186,4 @@ export {
|
|
|
20199
20186
|
buildTeaserBlurFlatKeys as y,
|
|
20200
20187
|
collectFontDescriptorsFromConfig as z
|
|
20201
20188
|
};
|
|
20202
|
-
//# sourceMappingURL=index-
|
|
20189
|
+
//# sourceMappingURL=index-oOW9gtoq.js.map
|