@pixldocs/canvas-renderer 0.5.193 → 0.5.195
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-CDoyeKa8.js → index-BggTMIGH.js} +8 -7
- package/dist/{index-CDoyeKa8.js.map → index-BggTMIGH.js.map} +1 -1
- package/dist/{index-uwKwubUL.cjs → index-DsCBhthJ.cjs} +8 -7
- package/dist/{index-uwKwubUL.cjs.map → index-DsCBhthJ.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BHKMcbVb.cjs → vectorPdfExport-DOflxvRE.cjs} +9 -9
- package/dist/vectorPdfExport-DOflxvRE.cjs.map +1 -0
- package/dist/{vectorPdfExport-Cd--tBky.js → vectorPdfExport-eV507wxX.js} +9 -9
- package/dist/vectorPdfExport-eV507wxX.js.map +1 -0
- package/package.json +1 -1
- package/dist/vectorPdfExport-BHKMcbVb.cjs.map +0 -1
- package/dist/vectorPdfExport-Cd--tBky.js.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-DsCBhthJ.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-BggTMIGH.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-DsCBhthJ.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" } });
|
|
@@ -518,9 +518,12 @@ async function preloadSvgImagesForPdf(svg, options) {
|
|
|
518
518
|
const present = new Set(images.map((image) => image.getAttribute("data-pixldocs-image-id") || "").filter(Boolean));
|
|
519
519
|
const missing = [...required].filter((id) => !present.has(id));
|
|
520
520
|
if (missing.length || failedRequired.length) {
|
|
521
|
-
|
|
521
|
+
console.warn(
|
|
522
|
+
`[client-pdf-export] expected image(s) not ready for SVG PDF${(options == null ? void 0 : options.context) ? ` (${options.context})` : ""}: missing=${missing.join(",") || "none"} failed=${failedRequired.join(",") || "none"}`
|
|
523
|
+
);
|
|
524
|
+
} else {
|
|
525
|
+
console.log("[client-pdf-export] SVG image ids ready", { context: options == null ? void 0 : options.context, count: required.size, ids: [...required] });
|
|
522
526
|
}
|
|
523
|
-
console.log("[client-pdf-export] SVG image ids ready", { context: options == null ? void 0 : options.context, count: required.size, ids: [...required] });
|
|
524
527
|
}
|
|
525
528
|
}
|
|
526
529
|
function resetPdfColorState(pdf, label) {
|
|
@@ -2568,7 +2571,7 @@ async function fetchSvgAsElement(imageUrl, colorMap) {
|
|
|
2568
2571
|
async function getRecoloredSvgDataUrl(imageUrl, colorMap) {
|
|
2569
2572
|
if (!colorMap || Object.keys(colorMap).length === 0) return null;
|
|
2570
2573
|
try {
|
|
2571
|
-
const { getNormalizedSvgUrl } = await Promise.resolve().then(() => require("./index-
|
|
2574
|
+
const { getNormalizedSvgUrl } = await Promise.resolve().then(() => require("./index-DsCBhthJ.cjs")).then((n) => n.canvasImageLoader);
|
|
2572
2575
|
return await getNormalizedSvgUrl(imageUrl, colorMap);
|
|
2573
2576
|
} catch {
|
|
2574
2577
|
return null;
|
|
@@ -3359,7 +3362,7 @@ async function fetchImageAsBase64(imageUrl, opts = {}) {
|
|
|
3359
3362
|
}
|
|
3360
3363
|
let fetchUrl = imageUrl;
|
|
3361
3364
|
if (imageUrl.startsWith("http://") || imageUrl.startsWith("https://")) {
|
|
3362
|
-
const { isPrivateUrl } = await Promise.resolve().then(() => require("./index-
|
|
3365
|
+
const { isPrivateUrl } = await Promise.resolve().then(() => require("./index-DsCBhthJ.cjs")).then((n) => n.canvasImageLoader);
|
|
3363
3366
|
if (isPrivateUrl(imageUrl)) return null;
|
|
3364
3367
|
const proxyUrl = new URL(`${index.API_URL}/image-proxy`);
|
|
3365
3368
|
proxyUrl.searchParams.set("url", imageUrl);
|
|
@@ -5180,9 +5183,6 @@ async function exportMultiPagePdf(pages, options) {
|
|
|
5180
5183
|
svgLength: (liveSvgString == null ? void 0 : liveSvgString.length) ?? 0
|
|
5181
5184
|
});
|
|
5182
5185
|
} catch (error) {
|
|
5183
|
-
if (error instanceof Error && /expected image\(s\) not ready for SVG PDF/i.test(error.message)) {
|
|
5184
|
-
throw error;
|
|
5185
|
-
}
|
|
5186
5186
|
allowLiveCanvasFallback = false;
|
|
5187
5187
|
console.error(`[client-pdf-export] live SVG export failed for page ${pageIndex + 1}`, error);
|
|
5188
5188
|
}
|
|
@@ -5369,4 +5369,4 @@ exports.exportMultiPagePdf = exportMultiPagePdf;
|
|
|
5369
5369
|
exports.logTextMeasurementDiagnostic = logTextMeasurementDiagnostic;
|
|
5370
5370
|
exports.preparePagesForExport = preparePagesForExport;
|
|
5371
5371
|
exports.rewriteSvgFontsForJsPDFWithSourceMeta = rewriteSvgFontsForJsPDFWithSourceMeta;
|
|
5372
|
-
//# sourceMappingURL=vectorPdfExport-
|
|
5372
|
+
//# sourceMappingURL=vectorPdfExport-DOflxvRE.cjs.map
|