@pixldocs/canvas-renderer 0.5.153 → 0.5.154
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-Bp0cz5Mq.cjs → index-Cl1_1tTg.cjs} +5 -5
- package/dist/{index-Bp0cz5Mq.cjs.map → index-Cl1_1tTg.cjs.map} +1 -1
- package/dist/{index-CAH9akzI.js → index-CoH2Xntr.js} +5 -5
- package/dist/{index-CAH9akzI.js.map → index-CoH2Xntr.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-YSo453Ul.cjs → vectorPdfExport-BHADcvGH.cjs} +6 -23
- package/dist/vectorPdfExport-BHADcvGH.cjs.map +1 -0
- package/dist/{vectorPdfExport-DTssH1-U.js → vectorPdfExport-Db9b2C3K.js} +6 -23
- package/dist/vectorPdfExport-Db9b2C3K.js.map +1 -0
- package/package.json +1 -1
- package/dist/vectorPdfExport-DTssH1-U.js.map +0 -1
- package/dist/vectorPdfExport-YSo453Ul.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-Cl1_1tTg.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, b, M, N, O, Q, R, S, U, V, W, X, Y, Z, _ } 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, b, M, N, O, Q, R, S, U, V, W, X, Y, Z, _ } from "./index-CoH2Xntr.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-Cl1_1tTg.cjs");
|
|
7
7
|
const pdfFonts = require("./pdfFonts-BTEVnYX8.cjs");
|
|
8
8
|
function _interopNamespaceDefault(e) {
|
|
9
9
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -1855,7 +1855,7 @@ async function collectInlinedFontFaceCss() {
|
|
|
1855
1855
|
return cachedInlinedFontFaceCss;
|
|
1856
1856
|
}
|
|
1857
1857
|
async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey, options) {
|
|
1858
|
-
var _a
|
|
1858
|
+
var _a;
|
|
1859
1859
|
try {
|
|
1860
1860
|
const parser = new DOMParser();
|
|
1861
1861
|
const processedSvg = inlineNestedSvgImageDataUris(rawSvg, parser);
|
|
@@ -1893,27 +1893,10 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
1893
1893
|
console.warn("[Vector PDF] anchor-bake pass failed (continuing):", e);
|
|
1894
1894
|
}
|
|
1895
1895
|
await rasterizeShadowMarkers(svgToDraw);
|
|
1896
|
-
try {
|
|
1897
|
-
if (svgToDraw.querySelector("g[data-pd-shadow-blur] text, g[data-pd-text-bg] text")) {
|
|
1898
|
-
const { convertAllTextToPath } = await Promise.resolve().then(() => require("./svgTextToPath-IM1f6F-f.cjs"));
|
|
1899
|
-
const outlined = await convertAllTextToPath(
|
|
1900
|
-
new XMLSerializer().serializeToString(svgToDraw),
|
|
1901
|
-
void 0,
|
|
1902
|
-
{ mode: "shadow-bound" }
|
|
1903
|
-
);
|
|
1904
|
-
const outlinedDoc = parser.parseFromString(outlined, "image/svg+xml");
|
|
1905
|
-
if (!outlinedDoc.querySelector("parsererror") && ((_a = outlinedDoc.documentElement) == null ? void 0 : _a.tagName.toLowerCase()) === "svg") {
|
|
1906
|
-
svgToDraw = outlinedDoc.documentElement;
|
|
1907
|
-
console.log("[Vector PDF][parity] decorated text outlined for headless alignment");
|
|
1908
|
-
}
|
|
1909
|
-
}
|
|
1910
|
-
} catch (outlineErr) {
|
|
1911
|
-
console.warn("[Vector PDF] shadow-bound text outline failed (continuing):", outlineErr);
|
|
1912
|
-
}
|
|
1913
1896
|
await convertTextDecorationsToLines(svgToDraw);
|
|
1914
1897
|
const rewritten = rewriteSvgFontsForJsPDFWithSourceMeta(new XMLSerializer().serializeToString(svgToDraw));
|
|
1915
1898
|
const rewrittenDoc = parser.parseFromString(rewritten, "image/svg+xml");
|
|
1916
|
-
if (!rewrittenDoc.querySelector("parsererror") && ((
|
|
1899
|
+
if (!rewrittenDoc.querySelector("parsererror") && ((_a = rewrittenDoc.documentElement) == null ? void 0 : _a.tagName.toLowerCase()) === "svg") {
|
|
1917
1900
|
return rewrittenDoc.documentElement;
|
|
1918
1901
|
}
|
|
1919
1902
|
return svgToDraw;
|
|
@@ -2495,7 +2478,7 @@ async function fetchSvgAsElement(imageUrl, colorMap) {
|
|
|
2495
2478
|
async function getRecoloredSvgDataUrl(imageUrl, colorMap) {
|
|
2496
2479
|
if (!colorMap || Object.keys(colorMap).length === 0) return null;
|
|
2497
2480
|
try {
|
|
2498
|
-
const { getNormalizedSvgUrl } = await Promise.resolve().then(() => require("./index-
|
|
2481
|
+
const { getNormalizedSvgUrl } = await Promise.resolve().then(() => require("./index-Cl1_1tTg.cjs")).then((n) => n.canvasImageLoader);
|
|
2499
2482
|
return await getNormalizedSvgUrl(imageUrl, colorMap);
|
|
2500
2483
|
} catch {
|
|
2501
2484
|
return null;
|
|
@@ -3276,7 +3259,7 @@ async function fetchImageAsBase64(imageUrl, opts = {}) {
|
|
|
3276
3259
|
}
|
|
3277
3260
|
let fetchUrl = imageUrl;
|
|
3278
3261
|
if (imageUrl.startsWith("http://") || imageUrl.startsWith("https://")) {
|
|
3279
|
-
const { isPrivateUrl } = await Promise.resolve().then(() => require("./index-
|
|
3262
|
+
const { isPrivateUrl } = await Promise.resolve().then(() => require("./index-Cl1_1tTg.cjs")).then((n) => n.canvasImageLoader);
|
|
3280
3263
|
if (isPrivateUrl(imageUrl)) return null;
|
|
3281
3264
|
const proxyUrl = new URL(`${index.API_URL}/image-proxy`);
|
|
3282
3265
|
proxyUrl.searchParams.set("url", imageUrl);
|
|
@@ -5258,4 +5241,4 @@ exports.exportMultiPagePdf = exportMultiPagePdf;
|
|
|
5258
5241
|
exports.logTextMeasurementDiagnostic = logTextMeasurementDiagnostic;
|
|
5259
5242
|
exports.preparePagesForExport = preparePagesForExport;
|
|
5260
5243
|
exports.rewriteSvgFontsForJsPDFWithSourceMeta = rewriteSvgFontsForJsPDFWithSourceMeta;
|
|
5261
|
-
//# sourceMappingURL=vectorPdfExport-
|
|
5244
|
+
//# sourceMappingURL=vectorPdfExport-BHADcvGH.cjs.map
|