@pixldocs/canvas-renderer 0.5.197 → 0.5.198
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-dXQP21w2.cjs → index-CM6Bzcyx.cjs} +13 -8
- package/dist/index-CM6Bzcyx.cjs.map +1 -0
- package/dist/{index-6bqq7X_L.js → index-Cgi6Y_WS.js} +13 -8
- package/dist/index-Cgi6Y_WS.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-CMSo382K.cjs → vectorPdfExport-CBUSNaeP.cjs} +4 -4
- package/dist/{vectorPdfExport-CMSo382K.cjs.map → vectorPdfExport-CBUSNaeP.cjs.map} +1 -1
- package/dist/{vectorPdfExport-D4pUlnXw.js → vectorPdfExport-xj7xRXH7.js} +4 -4
- package/dist/{vectorPdfExport-D4pUlnXw.js.map → vectorPdfExport-xj7xRXH7.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-6bqq7X_L.js.map +0 -1
- package/dist/index-dXQP21w2.cjs.map +0 -1
|
@@ -3427,7 +3427,9 @@ function preloadImage(url) {
|
|
|
3427
3427
|
if (cached) return Promise.resolve(cached);
|
|
3428
3428
|
return new Promise((resolve, reject) => {
|
|
3429
3429
|
const img = new Image();
|
|
3430
|
-
|
|
3430
|
+
if (!url.startsWith("data:") && !url.startsWith("blob:")) {
|
|
3431
|
+
img.crossOrigin = "anonymous";
|
|
3432
|
+
}
|
|
3431
3433
|
img.onload = () => {
|
|
3432
3434
|
htmlImageCache.set(url, img);
|
|
3433
3435
|
trimCache(htmlImageCache);
|
|
@@ -3653,7 +3655,6 @@ function loadPlaceholderTile() {
|
|
|
3653
3655
|
if (placeholderTilePromise) return placeholderTilePromise;
|
|
3654
3656
|
placeholderTilePromise = new Promise((resolve, reject) => {
|
|
3655
3657
|
const img = new Image();
|
|
3656
|
-
img.crossOrigin = "anonymous";
|
|
3657
3658
|
img.onload = () => {
|
|
3658
3659
|
placeholderTileImage = img;
|
|
3659
3660
|
resolve(img);
|
|
@@ -3891,7 +3892,8 @@ async function loadImageAsync(element, placeholder, fc, fabricRef, syncLockedRef
|
|
|
3891
3892
|
resolvedUrl: url.slice(0, 240),
|
|
3892
3893
|
usedProxy: !url.startsWith("data:") && !url.startsWith("blob:") && url !== imageUrl
|
|
3893
3894
|
});
|
|
3894
|
-
const
|
|
3895
|
+
const imgLoadOptions = url.startsWith("data:") || url.startsWith("blob:") ? {} : { crossOrigin: "anonymous" };
|
|
3896
|
+
const img = await fabric.FabricImage.fromURL(url, imgLoadOptions);
|
|
3895
3897
|
if (!fabricRef.current) return;
|
|
3896
3898
|
await normalizeSvgImageDimensions(img, imageUrl, element.sourceFormat);
|
|
3897
3899
|
const isHidden = !element.visible;
|
|
@@ -16919,9 +16921,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16919
16921
|
}
|
|
16920
16922
|
return svgString;
|
|
16921
16923
|
}
|
|
16922
|
-
const resolvedPackageVersion = "0.5.
|
|
16924
|
+
const resolvedPackageVersion = "0.5.198";
|
|
16923
16925
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16924
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16926
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.198";
|
|
16925
16927
|
const roundParityValue = (value) => {
|
|
16926
16928
|
if (typeof value !== "number") return value;
|
|
16927
16929
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -17008,6 +17010,9 @@ async function downscaleConfigRasterImages(config, maxEdgePx, maxDataUrlBytes =
|
|
|
17008
17010
|
try {
|
|
17009
17011
|
const decode = async (src) => new Promise((resolve, reject) => {
|
|
17010
17012
|
const el = new Image();
|
|
17013
|
+
if (!src.startsWith("data:") && !src.startsWith("blob:")) {
|
|
17014
|
+
el.crossOrigin = "anonymous";
|
|
17015
|
+
}
|
|
17011
17016
|
el.onload = () => resolve(el);
|
|
17012
17017
|
el.onerror = (e) => reject(e);
|
|
17013
17018
|
el.decoding = "sync";
|
|
@@ -17597,7 +17602,7 @@ class PixldocsRenderer {
|
|
|
17597
17602
|
await this.waitForCanvasScene(container, cloned, i);
|
|
17598
17603
|
}
|
|
17599
17604
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
17600
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
17605
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-xj7xRXH7.js");
|
|
17601
17606
|
const prepared = preparePagesForExport(
|
|
17602
17607
|
cloned.pages,
|
|
17603
17608
|
canvasWidth,
|
|
@@ -19794,7 +19799,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
19794
19799
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
19795
19800
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
19796
19801
|
try {
|
|
19797
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
19802
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-xj7xRXH7.js");
|
|
19798
19803
|
try {
|
|
19799
19804
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
19800
19805
|
} catch {
|
|
@@ -20194,4 +20199,4 @@ export {
|
|
|
20194
20199
|
buildTeaserBlurFlatKeys as y,
|
|
20195
20200
|
collectFontDescriptorsFromConfig as z
|
|
20196
20201
|
};
|
|
20197
|
-
//# sourceMappingURL=index-
|
|
20202
|
+
//# sourceMappingURL=index-Cgi6Y_WS.js.map
|