@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
|
@@ -16939,9 +16939,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16939
16939
|
}
|
|
16940
16940
|
return svgString;
|
|
16941
16941
|
}
|
|
16942
|
-
const resolvedPackageVersion = "0.5.
|
|
16942
|
+
const resolvedPackageVersion = "0.5.200";
|
|
16943
16943
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16944
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16944
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.200";
|
|
16945
16945
|
const roundParityValue = (value) => {
|
|
16946
16946
|
if (typeof value !== "number") return value;
|
|
16947
16947
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -17541,7 +17541,7 @@ class PixldocsRenderer {
|
|
|
17541
17541
|
const forceMode = callForce !== void 0 ? callForce : cfgForce !== void 0 ? cfgForce : "auto";
|
|
17542
17542
|
const hasUserDataImage = configHasUserDataImage(cloned);
|
|
17543
17543
|
const isSafariLike = detectSafariOrIos();
|
|
17544
|
-
const shouldForcePerElement = forceMode === true ? true : forceMode === false ? false :
|
|
17544
|
+
const shouldForcePerElement = forceMode === true ? true : forceMode === false ? false : false;
|
|
17545
17545
|
const maxEdgeOpt = options.maxImageEdgePx ?? this.config.maxImageEdgePx;
|
|
17546
17546
|
const effectiveMaxEdge = typeof maxEdgeOpt === "number" ? Math.max(0, maxEdgeOpt | 0) : hasUserDataImage ? 2048 : 0;
|
|
17547
17547
|
if (effectiveMaxEdge > 0) {
|
|
@@ -17620,7 +17620,7 @@ class PixldocsRenderer {
|
|
|
17620
17620
|
await this.waitForCanvasScene(container, cloned, i);
|
|
17621
17621
|
}
|
|
17622
17622
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
17623
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
17623
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-CV6GxECJ.cjs"));
|
|
17624
17624
|
const prepared = preparePagesForExport(
|
|
17625
17625
|
cloned.pages,
|
|
17626
17626
|
canvasWidth,
|
|
@@ -17631,26 +17631,13 @@ class PixldocsRenderer {
|
|
|
17631
17631
|
watermark: !!options.watermark,
|
|
17632
17632
|
returnBlob: true,
|
|
17633
17633
|
pdfTextMode: options.textMode ?? (cloned == null ? void 0 : cloned.pdfTextMode) ?? ((_a = cloned.canvas) == null ? void 0 : _a.n) ?? "auto",
|
|
17634
|
-
//
|
|
17635
|
-
//
|
|
17636
|
-
//
|
|
17637
|
-
//
|
|
17638
|
-
//
|
|
17639
|
-
|
|
17640
|
-
|
|
17641
|
-
// while the on-screen preview (which uses the live canvas) still looks
|
|
17642
|
-
// correct. v0.5.191 shipped with this skip enabled and produced exactly
|
|
17643
|
-
// that regression.
|
|
17644
|
-
//
|
|
17645
|
-
// The large-photo missing/corrupt image issue is solved by the
|
|
17646
|
-
// `downscaleConfigRasterImages()` pre-pass above, which shrinks and
|
|
17647
|
-
// recompresses oversized `data:image/*` sources before the canvas
|
|
17648
|
-
// mounts. That keeps SVG capture reliable without altering layout.
|
|
17649
|
-
//
|
|
17650
|
-
// We still honor an explicit `forcePerElementPdf: true` from the host
|
|
17651
|
-
// app (advanced opt-in for niche cases), but the auto path no longer
|
|
17652
|
-
// toggles this flag.
|
|
17653
|
-
skipLiveCanvasSvgFastPath: forceMode === true
|
|
17634
|
+
// Safari/WebKit can still let svg2pdf silently drop valid JPEG data-URL
|
|
17635
|
+
// <image> nodes even after the data is compressed and Fabric has loaded
|
|
17636
|
+
// it. For auto Safari mode, bypass only the full-page SVG->svg2pdf fast
|
|
17637
|
+
// path and use the live Fabric object PDF path instead, preserving live
|
|
17638
|
+
// matrices/order so we do not regress into stale config-space layout.
|
|
17639
|
+
skipLiveCanvasSvgFastPath: forceMode === true,
|
|
17640
|
+
useLiveCanvasObjectPdfPath: shouldForcePerElement && forceMode !== true
|
|
17654
17641
|
});
|
|
17655
17642
|
if (!result || typeof result === "undefined") {
|
|
17656
17643
|
throw new Error("exportMultiPagePdf returned no blob (returnBlob path failed)");
|
|
@@ -19817,7 +19804,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
19817
19804
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
19818
19805
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
19819
19806
|
try {
|
|
19820
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
19807
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-CV6GxECJ.cjs"));
|
|
19821
19808
|
try {
|
|
19822
19809
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
19823
19810
|
} catch {
|
|
@@ -20214,4 +20201,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
20214
20201
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
20215
20202
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
20216
20203
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
20217
|
-
//# sourceMappingURL=index-
|
|
20204
|
+
//# sourceMappingURL=index-B0b3u83I.cjs.map
|