@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.
@@ -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.123";
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-Cn3c_VYZ.js");
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 isFadedCropGroup = obj instanceof fabric.Group && (Boolean(obj.__edgeFadeRenderConfig) || Boolean(obj.__edgeFadeKey) || Boolean(obj.__edgeFadeInputKey));
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-CL09cdqm.js.map
18473
+ //# sourceMappingURL=index-D7cGwzxX.js.map