@pixldocs/canvas-renderer 0.5.212 → 0.5.214
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-B1QDVK5k.js → index-CDdfs3IB.js} +31 -25
- package/dist/index-CDdfs3IB.js.map +1 -0
- package/dist/{index-DB8j0PV0.cjs → index-Cy2_ElDZ.cjs} +31 -25
- package/dist/index-Cy2_ElDZ.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-zGrrm-iT.cjs → vectorPdfExport-BBG0QRse.cjs} +7 -5
- package/dist/vectorPdfExport-BBG0QRse.cjs.map +1 -0
- package/dist/{vectorPdfExport-CN-N0DE8.js → vectorPdfExport-CjIUU8on.js} +7 -5
- package/dist/vectorPdfExport-CjIUU8on.js.map +1 -0
- package/package.json +1 -1
- package/dist/index-B1QDVK5k.js.map +0 -1
- package/dist/index-DB8j0PV0.cjs.map +0 -1
- package/dist/vectorPdfExport-CN-N0DE8.js.map +0 -1
- package/dist/vectorPdfExport-zGrrm-iT.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-Cy2_ElDZ.cjs");
|
|
4
4
|
exports.DEPLOYMENT_VERSION_MARKER = index.DEPLOYMENT_VERSION_MARKER;
|
|
5
5
|
exports.FONT_FALLBACK_DEVANAGARI = index.FONT_FALLBACK_DEVANAGARI;
|
|
6
6
|
exports.FONT_FALLBACK_MATH = index.FONT_FALLBACK_MATH;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D, F, o, q, s, P, t, u, v, w, x, y, z, B, C, E, G, H, I, J, K, L, M, b, N, O, Q, R, S, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5 } from "./index-
|
|
1
|
+
import { D, F, o, q, s, P, t, u, v, w, x, y, z, B, C, E, G, H, I, J, K, L, M, b, N, O, Q, R, S, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5 } from "./index-CDdfs3IB.js";
|
|
2
2
|
export {
|
|
3
3
|
D as DEPLOYMENT_VERSION_MARKER,
|
|
4
4
|
F as FONT_FALLBACK_DEVANAGARI,
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jspdf = require("jspdf");
|
|
4
4
|
const svg2pdf_js = require("svg2pdf.js");
|
|
5
5
|
const fabric = require("fabric");
|
|
6
|
-
const index = require("./index-
|
|
6
|
+
const index = require("./index-Cy2_ElDZ.cjs");
|
|
7
7
|
const pdfFonts = require("./pdfFonts-BTj2f465.cjs");
|
|
8
8
|
function _interopNamespaceDefault(e) {
|
|
9
9
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -2134,10 +2134,12 @@ async function rasterizeShadowMarkers(svg) {
|
|
|
2134
2134
|
img.setAttribute("y", String(by));
|
|
2135
2135
|
img.setAttribute("width", String(bw));
|
|
2136
2136
|
img.setAttribute("height", String(bh));
|
|
2137
|
-
img.setAttribute("opacity", String(SHADOW_RASTER_ALPHA_COMPENSATION));
|
|
2138
2137
|
img.setAttribute("preserveAspectRatio", "none");
|
|
2139
2138
|
img.setAttributeNS(XLINK_NS, "xlink:href", dataUrl);
|
|
2140
2139
|
img.setAttribute("href", dataUrl);
|
|
2140
|
+
const alphaRaw = parseFloat(marker.getAttribute("data-alpha") || "1");
|
|
2141
|
+
const shadowAlpha = Number.isFinite(alphaRaw) ? Math.max(0, Math.min(1, alphaRaw)) : 1;
|
|
2142
|
+
img.setAttribute("opacity", String(SHADOW_RASTER_ALPHA_COMPENSATION * shadowAlpha));
|
|
2141
2143
|
(_e = marker.parentNode) == null ? void 0 : _e.replaceChild(img, marker);
|
|
2142
2144
|
} catch (error) {
|
|
2143
2145
|
console.warn("[Vector PDF] text shadow rasterization failed for one marker:", error);
|
|
@@ -2970,7 +2972,7 @@ async function fetchSvgAsElement(imageUrl, colorMap) {
|
|
|
2970
2972
|
async function getRecoloredSvgDataUrl(imageUrl, colorMap) {
|
|
2971
2973
|
if (!colorMap || Object.keys(colorMap).length === 0) return null;
|
|
2972
2974
|
try {
|
|
2973
|
-
const { getNormalizedSvgUrl } = await Promise.resolve().then(() => require("./index-
|
|
2975
|
+
const { getNormalizedSvgUrl } = await Promise.resolve().then(() => require("./index-Cy2_ElDZ.cjs")).then((n) => n.canvasImageLoader);
|
|
2974
2976
|
return await getNormalizedSvgUrl(imageUrl, colorMap);
|
|
2975
2977
|
} catch {
|
|
2976
2978
|
return null;
|
|
@@ -3779,7 +3781,7 @@ async function fetchImageAsBase64(imageUrl, opts = {}) {
|
|
|
3779
3781
|
}
|
|
3780
3782
|
let fetchUrl = imageUrl;
|
|
3781
3783
|
if (imageUrl.startsWith("http://") || imageUrl.startsWith("https://")) {
|
|
3782
|
-
const { isPrivateUrl } = await Promise.resolve().then(() => require("./index-
|
|
3784
|
+
const { isPrivateUrl } = await Promise.resolve().then(() => require("./index-Cy2_ElDZ.cjs")).then((n) => n.canvasImageLoader);
|
|
3783
3785
|
if (isPrivateUrl(imageUrl)) return null;
|
|
3784
3786
|
const proxyUrl = new URL(`${index.API_URL}/image-proxy`);
|
|
3785
3787
|
proxyUrl.searchParams.set("url", imageUrl);
|
|
@@ -5878,4 +5880,4 @@ exports.exportMultiPagePdf = exportMultiPagePdf;
|
|
|
5878
5880
|
exports.logTextMeasurementDiagnostic = logTextMeasurementDiagnostic;
|
|
5879
5881
|
exports.preparePagesForExport = preparePagesForExport;
|
|
5880
5882
|
exports.rewriteSvgFontsForJsPDFWithSourceMeta = rewriteSvgFontsForJsPDFWithSourceMeta;
|
|
5881
|
-
//# sourceMappingURL=vectorPdfExport-
|
|
5883
|
+
//# sourceMappingURL=vectorPdfExport-BBG0QRse.cjs.map
|