@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
|
@@ -3445,7 +3445,9 @@ function preloadImage(url) {
|
|
|
3445
3445
|
if (cached) return Promise.resolve(cached);
|
|
3446
3446
|
return new Promise((resolve, reject) => {
|
|
3447
3447
|
const img = new Image();
|
|
3448
|
-
|
|
3448
|
+
if (!url.startsWith("data:") && !url.startsWith("blob:")) {
|
|
3449
|
+
img.crossOrigin = "anonymous";
|
|
3450
|
+
}
|
|
3449
3451
|
img.onload = () => {
|
|
3450
3452
|
htmlImageCache.set(url, img);
|
|
3451
3453
|
trimCache(htmlImageCache);
|
|
@@ -3671,7 +3673,6 @@ function loadPlaceholderTile() {
|
|
|
3671
3673
|
if (placeholderTilePromise) return placeholderTilePromise;
|
|
3672
3674
|
placeholderTilePromise = new Promise((resolve, reject) => {
|
|
3673
3675
|
const img = new Image();
|
|
3674
|
-
img.crossOrigin = "anonymous";
|
|
3675
3676
|
img.onload = () => {
|
|
3676
3677
|
placeholderTileImage = img;
|
|
3677
3678
|
resolve(img);
|
|
@@ -3909,7 +3910,8 @@ async function loadImageAsync(element, placeholder, fc, fabricRef, syncLockedRef
|
|
|
3909
3910
|
resolvedUrl: url.slice(0, 240),
|
|
3910
3911
|
usedProxy: !url.startsWith("data:") && !url.startsWith("blob:") && url !== imageUrl
|
|
3911
3912
|
});
|
|
3912
|
-
const
|
|
3913
|
+
const imgLoadOptions = url.startsWith("data:") || url.startsWith("blob:") ? {} : { crossOrigin: "anonymous" };
|
|
3914
|
+
const img = await fabric__namespace.FabricImage.fromURL(url, imgLoadOptions);
|
|
3913
3915
|
if (!fabricRef.current) return;
|
|
3914
3916
|
await normalizeSvgImageDimensions(img, imageUrl, element.sourceFormat);
|
|
3915
3917
|
const isHidden = !element.visible;
|
|
@@ -16937,9 +16939,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16937
16939
|
}
|
|
16938
16940
|
return svgString;
|
|
16939
16941
|
}
|
|
16940
|
-
const resolvedPackageVersion = "0.5.
|
|
16942
|
+
const resolvedPackageVersion = "0.5.198";
|
|
16941
16943
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16942
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16944
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.198";
|
|
16943
16945
|
const roundParityValue = (value) => {
|
|
16944
16946
|
if (typeof value !== "number") return value;
|
|
16945
16947
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -17026,6 +17028,9 @@ async function downscaleConfigRasterImages(config, maxEdgePx, maxDataUrlBytes =
|
|
|
17026
17028
|
try {
|
|
17027
17029
|
const decode = async (src) => new Promise((resolve, reject) => {
|
|
17028
17030
|
const el = new Image();
|
|
17031
|
+
if (!src.startsWith("data:") && !src.startsWith("blob:")) {
|
|
17032
|
+
el.crossOrigin = "anonymous";
|
|
17033
|
+
}
|
|
17029
17034
|
el.onload = () => resolve(el);
|
|
17030
17035
|
el.onerror = (e) => reject(e);
|
|
17031
17036
|
el.decoding = "sync";
|
|
@@ -17615,7 +17620,7 @@ class PixldocsRenderer {
|
|
|
17615
17620
|
await this.waitForCanvasScene(container, cloned, i);
|
|
17616
17621
|
}
|
|
17617
17622
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
17618
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
17623
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-CBUSNaeP.cjs"));
|
|
17619
17624
|
const prepared = preparePagesForExport(
|
|
17620
17625
|
cloned.pages,
|
|
17621
17626
|
canvasWidth,
|
|
@@ -19812,7 +19817,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
19812
19817
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
19813
19818
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
19814
19819
|
try {
|
|
19815
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
19820
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-CBUSNaeP.cjs"));
|
|
19816
19821
|
try {
|
|
19817
19822
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
19818
19823
|
} catch {
|
|
@@ -20209,4 +20214,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
20209
20214
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
20210
20215
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
20211
20216
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
20212
|
-
//# sourceMappingURL=index-
|
|
20217
|
+
//# sourceMappingURL=index-CM6Bzcyx.cjs.map
|