@pixldocs/canvas-renderer 0.5.178 → 0.5.179
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-DTcFAvP2.cjs → index-BBOaToIA.cjs} +11 -7
- package/dist/{index-DTcFAvP2.cjs.map → index-BBOaToIA.cjs.map} +1 -1
- package/dist/{index-Dj7Bs3EZ.js → index-C3W71an-.js} +11 -7
- package/dist/{index-Dj7Bs3EZ.js.map → index-C3W71an-.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-Qffqnh7w.cjs → vectorPdfExport-Be8MJ_2c.cjs} +12 -6
- package/dist/vectorPdfExport-Be8MJ_2c.cjs.map +1 -0
- package/dist/{vectorPdfExport-3KWX0dvS.js → vectorPdfExport-FmQQMHmX.js} +12 -6
- package/dist/vectorPdfExport-FmQQMHmX.js.map +1 -0
- package/package.json +1 -1
- package/dist/vectorPdfExport-3KWX0dvS.js.map +0 -1
- package/dist/vectorPdfExport-Qffqnh7w.cjs.map +0 -1
|
@@ -16342,9 +16342,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16342
16342
|
}
|
|
16343
16343
|
return svgString;
|
|
16344
16344
|
}
|
|
16345
|
-
const resolvedPackageVersion = "0.5.
|
|
16345
|
+
const resolvedPackageVersion = "0.5.179";
|
|
16346
16346
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16347
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16347
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.179";
|
|
16348
16348
|
const roundParityValue = (value) => {
|
|
16349
16349
|
if (typeof value !== "number") return value;
|
|
16350
16350
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -16846,7 +16846,7 @@ class PixldocsRenderer {
|
|
|
16846
16846
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16847
16847
|
}
|
|
16848
16848
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
16849
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
16849
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-FmQQMHmX.js");
|
|
16850
16850
|
const prepared = preparePagesForExport(
|
|
16851
16851
|
cloned.pages,
|
|
16852
16852
|
canvasWidth,
|
|
@@ -18047,7 +18047,7 @@ function normalizeSvgExplicitColors(svg) {
|
|
|
18047
18047
|
function bakeGroupOpacityIntoChildren(svg) {
|
|
18048
18048
|
const DRAWABLE = /* @__PURE__ */ new Set(["path", "rect", "circle", "ellipse", "polygon", "polyline", "line", "text", "tspan"]);
|
|
18049
18049
|
function walkAndBake(el, inheritedOpacity) {
|
|
18050
|
-
var _a, _b, _c;
|
|
18050
|
+
var _a, _b, _c, _d;
|
|
18051
18051
|
if (isInSvgDefinitionSubtree(el)) {
|
|
18052
18052
|
for (let i = 0; i < el.children.length; i++) walkAndBake(el.children[i], 1);
|
|
18053
18053
|
return;
|
|
@@ -18057,7 +18057,7 @@ function bakeGroupOpacityIntoChildren(svg) {
|
|
|
18057
18057
|
const styleOpacity = parseSvgOpacity(((_b = el.style) == null ? void 0 : _b.getPropertyValue("opacity")) || null);
|
|
18058
18058
|
const ownOpacity = opacityAttr ?? styleOpacity ?? 1;
|
|
18059
18059
|
const combinedOpacity = inheritedOpacity * ownOpacity;
|
|
18060
|
-
if (ownOpacity < 0.999) {
|
|
18060
|
+
if (ownOpacity < 0.999 && tag !== "image") {
|
|
18061
18061
|
el.removeAttribute("opacity");
|
|
18062
18062
|
if ((_c = el.style) == null ? void 0 : _c.opacity) el.style.removeProperty("opacity");
|
|
18063
18063
|
}
|
|
@@ -18065,6 +18065,10 @@ function bakeGroupOpacityIntoChildren(svg) {
|
|
|
18065
18065
|
multiplySvgOpacityAttr(el, "fill-opacity", combinedOpacity);
|
|
18066
18066
|
multiplySvgOpacityAttr(el, "stroke-opacity", combinedOpacity);
|
|
18067
18067
|
}
|
|
18068
|
+
if (tag === "image" && combinedOpacity < 0.999) {
|
|
18069
|
+
el.setAttribute("opacity", String(Number(combinedOpacity.toFixed(4))));
|
|
18070
|
+
if ((_d = el.style) == null ? void 0 : _d.opacity) el.style.removeProperty("opacity");
|
|
18071
|
+
}
|
|
18068
18072
|
if (tag === "stop" && ownOpacity < 0.999) {
|
|
18069
18073
|
multiplySvgOpacityAttr(el, "stop-opacity", ownOpacity);
|
|
18070
18074
|
}
|
|
@@ -18987,7 +18991,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
18987
18991
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
18988
18992
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
18989
18993
|
try {
|
|
18990
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
18994
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-FmQQMHmX.js");
|
|
18991
18995
|
try {
|
|
18992
18996
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
18993
18997
|
} catch {
|
|
@@ -19383,4 +19387,4 @@ export {
|
|
|
19383
19387
|
collectFontDescriptorsFromConfig as y,
|
|
19384
19388
|
collectFontsFromConfig as z
|
|
19385
19389
|
};
|
|
19386
|
-
//# sourceMappingURL=index-
|
|
19390
|
+
//# sourceMappingURL=index-C3W71an-.js.map
|