@pixldocs/canvas-renderer 0.5.173 → 0.5.175
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-ChHYFk0E.js → index-CTIPncpy.js} +19 -15
- package/dist/{index-ChHYFk0E.js.map → index-CTIPncpy.js.map} +1 -1
- package/dist/{index-ZehEOqUB.cjs → index-DOxhZsjV.cjs} +19 -15
- package/dist/{index-ZehEOqUB.cjs.map → index-DOxhZsjV.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BWDj55kq.cjs → vectorPdfExport-BZAl0Pdr.cjs} +17 -5
- package/dist/{vectorPdfExport-BWDj55kq.cjs.map → vectorPdfExport-BZAl0Pdr.cjs.map} +1 -1
- package/dist/{vectorPdfExport-CyTa-D1p.js → vectorPdfExport-COqBgUXt.js} +17 -5
- package/dist/{vectorPdfExport-CyTa-D1p.js.map → vectorPdfExport-COqBgUXt.js.map} +1 -1
- package/package.json +1 -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-DOxhZsjV.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, _, $, a0, a1 } 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, _, $, a0, a1 } from "./index-CTIPncpy.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-DOxhZsjV.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" } });
|
|
@@ -2519,7 +2519,7 @@ async function fetchSvgAsElement(imageUrl, colorMap) {
|
|
|
2519
2519
|
async function getRecoloredSvgDataUrl(imageUrl, colorMap) {
|
|
2520
2520
|
if (!colorMap || Object.keys(colorMap).length === 0) return null;
|
|
2521
2521
|
try {
|
|
2522
|
-
const { getNormalizedSvgUrl } = await Promise.resolve().then(() => require("./index-
|
|
2522
|
+
const { getNormalizedSvgUrl } = await Promise.resolve().then(() => require("./index-DOxhZsjV.cjs")).then((n) => n.canvasImageLoader);
|
|
2523
2523
|
return await getNormalizedSvgUrl(imageUrl, colorMap);
|
|
2524
2524
|
} catch {
|
|
2525
2525
|
return null;
|
|
@@ -3310,7 +3310,7 @@ async function fetchImageAsBase64(imageUrl, opts = {}) {
|
|
|
3310
3310
|
}
|
|
3311
3311
|
let fetchUrl = imageUrl;
|
|
3312
3312
|
if (imageUrl.startsWith("http://") || imageUrl.startsWith("https://")) {
|
|
3313
|
-
const { isPrivateUrl } = await Promise.resolve().then(() => require("./index-
|
|
3313
|
+
const { isPrivateUrl } = await Promise.resolve().then(() => require("./index-DOxhZsjV.cjs")).then((n) => n.canvasImageLoader);
|
|
3314
3314
|
if (isPrivateUrl(imageUrl)) return null;
|
|
3315
3315
|
const proxyUrl = new URL(`${index.API_URL}/image-proxy`);
|
|
3316
3316
|
proxyUrl.searchParams.set("url", imageUrl);
|
|
@@ -5078,7 +5078,14 @@ async function exportMultiPagePdf(pages, options) {
|
|
|
5078
5078
|
}
|
|
5079
5079
|
let preppedSvgString = liveSvgString;
|
|
5080
5080
|
try {
|
|
5081
|
-
if (pdfTextMode === "
|
|
5081
|
+
if (pdfTextMode === "pixel-perfect") {
|
|
5082
|
+
const { convertDevanagariTextToPath } = await Promise.resolve().then(() => require("./svgTextToPath-BLk_mcqi.cjs"));
|
|
5083
|
+
preppedSvgString = await convertDevanagariTextToPath(
|
|
5084
|
+
liveSvgString,
|
|
5085
|
+
void 0,
|
|
5086
|
+
{ mode: "all" }
|
|
5087
|
+
);
|
|
5088
|
+
} else if (pdfTextMode === "auto") {
|
|
5082
5089
|
const { convertDevanagariTextToPath } = await Promise.resolve().then(() => require("./svgTextToPath-BLk_mcqi.cjs"));
|
|
5083
5090
|
preppedSvgString = await convertDevanagariTextToPath(
|
|
5084
5091
|
liveSvgString,
|
|
@@ -5089,6 +5096,11 @@ async function exportMultiPagePdf(pages, options) {
|
|
|
5089
5096
|
const { replaceGradientTextFillsWithFirstStop } = await Promise.resolve().then(() => require("./svgTextToPath-BLk_mcqi.cjs"));
|
|
5090
5097
|
preppedSvgString = replaceGradientTextFillsWithFirstStop(liveSvgString);
|
|
5091
5098
|
}
|
|
5099
|
+
console.log("[client-pdf-export] gradient text mode", {
|
|
5100
|
+
pdfTextMode,
|
|
5101
|
+
outlinedAllText: pdfTextMode === "pixel-perfect",
|
|
5102
|
+
outlinedGradientText: pdfTextMode === "auto"
|
|
5103
|
+
});
|
|
5092
5104
|
} catch (gradErr) {
|
|
5093
5105
|
console.warn("[client-pdf-export] gradient-text fill resolution failed", gradErr);
|
|
5094
5106
|
}
|
|
@@ -5308,4 +5320,4 @@ exports.exportMultiPagePdf = exportMultiPagePdf;
|
|
|
5308
5320
|
exports.logTextMeasurementDiagnostic = logTextMeasurementDiagnostic;
|
|
5309
5321
|
exports.preparePagesForExport = preparePagesForExport;
|
|
5310
5322
|
exports.rewriteSvgFontsForJsPDFWithSourceMeta = rewriteSvgFontsForJsPDFWithSourceMeta;
|
|
5311
|
-
//# sourceMappingURL=vectorPdfExport-
|
|
5323
|
+
//# sourceMappingURL=vectorPdfExport-BZAl0Pdr.cjs.map
|