@pixldocs/canvas-renderer 0.5.123 → 0.5.125
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-BIjYOVnw.cjs → index-CNN2CRQh.cjs} +7 -6
- package/dist/{index-BIjYOVnw.cjs.map → index-CNN2CRQh.cjs.map} +1 -1
- package/dist/{index-CL09cdqm.js → index-D7cGwzxX.js} +7 -6
- package/dist/{index-CL09cdqm.js.map → index-D7cGwzxX.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-Cn3c_VYZ.js → vectorPdfExport-BBV3abJi.js} +6 -6
- package/dist/vectorPdfExport-BBV3abJi.js.map +1 -0
- package/dist/{vectorPdfExport-G2Yz66tj.cjs → vectorPdfExport-DVISwrvS.cjs} +6 -6
- package/dist/vectorPdfExport-DVISwrvS.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/vectorPdfExport-Cn3c_VYZ.js.map +0 -1
- package/dist/vectorPdfExport-G2Yz66tj.cjs.map +0 -1
|
@@ -15642,7 +15642,7 @@ function PixldocsPreview(props) {
|
|
|
15642
15642
|
!canvasSettled && /* @__PURE__ */ jsx("div", { style: { position: "absolute", inset: 0, display: "flex", alignItems: "center", justifyContent: "center", minHeight: 200 }, children: /* @__PURE__ */ jsx("div", { style: { color: "#888", fontSize: 14 }, children: "Loading preview..." }) })
|
|
15643
15643
|
] });
|
|
15644
15644
|
}
|
|
15645
|
-
const PACKAGE_VERSION = "0.5.
|
|
15645
|
+
const PACKAGE_VERSION = "0.5.125";
|
|
15646
15646
|
const roundParityValue = (value) => {
|
|
15647
15647
|
if (typeof value !== "number") return value;
|
|
15648
15648
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -16061,7 +16061,7 @@ class PixldocsRenderer {
|
|
|
16061
16061
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16062
16062
|
}
|
|
16063
16063
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
16064
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
16064
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BBV3abJi.js");
|
|
16065
16065
|
const prepared = preparePagesForExport(
|
|
16066
16066
|
cloned.pages,
|
|
16067
16067
|
canvasWidth,
|
|
@@ -16555,7 +16555,8 @@ class PixldocsRenderer {
|
|
|
16555
16555
|
try {
|
|
16556
16556
|
const objs = fabricInstance.getObjects().slice();
|
|
16557
16557
|
for (const obj of objs) {
|
|
16558
|
-
const
|
|
16558
|
+
const isGroupLike = obj instanceof fabric.Group || (obj == null ? void 0 : obj.type) === "group" || Array.isArray(obj == null ? void 0 : obj._objects);
|
|
16559
|
+
const isFadedCropGroup = isGroupLike && (Boolean(obj.__edgeFadeRenderConfig) || Boolean(obj.__edgeFadeKey) || Boolean(obj.__edgeFadeInputKey));
|
|
16559
16560
|
if (!isFadedCropGroup) continue;
|
|
16560
16561
|
try {
|
|
16561
16562
|
const baked = obj.toCanvasElement({
|
|
@@ -17316,10 +17317,10 @@ function bakeGroupOpacityIntoChildren(svg) {
|
|
|
17316
17317
|
walkAndBake(svg, 1);
|
|
17317
17318
|
}
|
|
17318
17319
|
function hasInvalidSvgNumericToken(value) {
|
|
17319
|
-
return typeof value === "string" && /\b(?:NaN|-?Infinity)\b/.test(value);
|
|
17320
|
+
return typeof value === "string" && /\b(?:NaN|-?Infinity|undefined|null)\b/.test(value);
|
|
17320
17321
|
}
|
|
17321
17322
|
function sanitizeSvgNumericTokens(value) {
|
|
17322
|
-
return value.replace(/\bNaN\b/g, "0").replace(/\b-?Infinity\b/g, "0");
|
|
17323
|
+
return value.replace(/\bNaN\b/g, "0").replace(/\b-?Infinity\b/g, "0").replace(/\bundefined\b/g, "0").replace(/\bnull\b/g, "0");
|
|
17323
17324
|
}
|
|
17324
17325
|
function sanitizeSvgTreeForPdf(svg) {
|
|
17325
17326
|
const attrsToSanitize = [
|
|
@@ -18469,4 +18470,4 @@ export {
|
|
|
18469
18470
|
collectFontsFromConfig as y,
|
|
18470
18471
|
collectImageUrls as z
|
|
18471
18472
|
};
|
|
18472
|
-
//# sourceMappingURL=index-
|
|
18473
|
+
//# sourceMappingURL=index-D7cGwzxX.js.map
|