@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
|
@@ -16360,9 +16360,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16360
16360
|
}
|
|
16361
16361
|
return svgString;
|
|
16362
16362
|
}
|
|
16363
|
-
const resolvedPackageVersion = "0.5.
|
|
16363
|
+
const resolvedPackageVersion = "0.5.179";
|
|
16364
16364
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16365
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16365
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.179";
|
|
16366
16366
|
const roundParityValue = (value) => {
|
|
16367
16367
|
if (typeof value !== "number") return value;
|
|
16368
16368
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -16864,7 +16864,7 @@ class PixldocsRenderer {
|
|
|
16864
16864
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16865
16865
|
}
|
|
16866
16866
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
16867
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
16867
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-Be8MJ_2c.cjs"));
|
|
16868
16868
|
const prepared = preparePagesForExport(
|
|
16869
16869
|
cloned.pages,
|
|
16870
16870
|
canvasWidth,
|
|
@@ -18065,7 +18065,7 @@ function normalizeSvgExplicitColors(svg) {
|
|
|
18065
18065
|
function bakeGroupOpacityIntoChildren(svg) {
|
|
18066
18066
|
const DRAWABLE = /* @__PURE__ */ new Set(["path", "rect", "circle", "ellipse", "polygon", "polyline", "line", "text", "tspan"]);
|
|
18067
18067
|
function walkAndBake(el, inheritedOpacity) {
|
|
18068
|
-
var _a, _b, _c;
|
|
18068
|
+
var _a, _b, _c, _d;
|
|
18069
18069
|
if (isInSvgDefinitionSubtree(el)) {
|
|
18070
18070
|
for (let i = 0; i < el.children.length; i++) walkAndBake(el.children[i], 1);
|
|
18071
18071
|
return;
|
|
@@ -18075,7 +18075,7 @@ function bakeGroupOpacityIntoChildren(svg) {
|
|
|
18075
18075
|
const styleOpacity = parseSvgOpacity(((_b = el.style) == null ? void 0 : _b.getPropertyValue("opacity")) || null);
|
|
18076
18076
|
const ownOpacity = opacityAttr ?? styleOpacity ?? 1;
|
|
18077
18077
|
const combinedOpacity = inheritedOpacity * ownOpacity;
|
|
18078
|
-
if (ownOpacity < 0.999) {
|
|
18078
|
+
if (ownOpacity < 0.999 && tag !== "image") {
|
|
18079
18079
|
el.removeAttribute("opacity");
|
|
18080
18080
|
if ((_c = el.style) == null ? void 0 : _c.opacity) el.style.removeProperty("opacity");
|
|
18081
18081
|
}
|
|
@@ -18083,6 +18083,10 @@ function bakeGroupOpacityIntoChildren(svg) {
|
|
|
18083
18083
|
multiplySvgOpacityAttr(el, "fill-opacity", combinedOpacity);
|
|
18084
18084
|
multiplySvgOpacityAttr(el, "stroke-opacity", combinedOpacity);
|
|
18085
18085
|
}
|
|
18086
|
+
if (tag === "image" && combinedOpacity < 0.999) {
|
|
18087
|
+
el.setAttribute("opacity", String(Number(combinedOpacity.toFixed(4))));
|
|
18088
|
+
if ((_d = el.style) == null ? void 0 : _d.opacity) el.style.removeProperty("opacity");
|
|
18089
|
+
}
|
|
18086
18090
|
if (tag === "stop" && ownOpacity < 0.999) {
|
|
18087
18091
|
multiplySvgOpacityAttr(el, "stop-opacity", ownOpacity);
|
|
18088
18092
|
}
|
|
@@ -19005,7 +19009,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
19005
19009
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
19006
19010
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
19007
19011
|
try {
|
|
19008
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
19012
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-Be8MJ_2c.cjs"));
|
|
19009
19013
|
try {
|
|
19010
19014
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
19011
19015
|
} catch {
|
|
@@ -19398,4 +19402,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
19398
19402
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
19399
19403
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
19400
19404
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
19401
|
-
//# sourceMappingURL=index-
|
|
19405
|
+
//# sourceMappingURL=index-BBOaToIA.cjs.map
|