@pixldocs/canvas-renderer 0.5.193 → 0.5.194
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-C1BrMJjh.js} +5 -5
- package/dist/{index-CDoyeKa8.js.map → index-C1BrMJjh.js.map} +1 -1
- package/dist/{index-uwKwubUL.cjs → index-pshD8xMc.cjs} +5 -5
- package/dist/{index-uwKwubUL.cjs.map → index-pshD8xMc.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-Cd--tBky.js → vectorPdfExport-CuD_Ax0x.js} +9 -9
- package/dist/vectorPdfExport-CuD_Ax0x.js.map +1 -0
- package/dist/{vectorPdfExport-BHKMcbVb.cjs → vectorPdfExport-D5Xagjna.cjs} +9 -9
- package/dist/vectorPdfExport-D5Xagjna.cjs.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-pshD8xMc.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-C1BrMJjh.js";
|
|
2
2
|
export {
|
|
3
3
|
D as DEPLOYMENT_VERSION_MARKER,
|
|
4
4
|
F as FONT_FALLBACK_DEVANAGARI,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsPDF, ShadingPattern } from "jspdf";
|
|
2
2
|
import { svg2pdf } from "svg2pdf.js";
|
|
3
3
|
import * as fabric from "fabric";
|
|
4
|
-
import { g as getCanvasForPage, c as captureFabricCanvasSvgForPdf, f as findNodeById, a as getAbsoluteBounds, p as parseTextMarkdown, r as renderSmartElementToSvg, n as normalizeShapeType, h as hasEdgeFade, b as getProxiedImageUrl, d as bakeEdgeFade, i as isElement, e as isGroup, j as buildRoundedTrianglePath, A as API_URL, k as getImageProxyFetchOptions, l as getRoundedRectRadii, T as TRIANGLE_STROKE_MITER_LIMIT, m as getTrianglePoints } from "./index-
|
|
4
|
+
import { g as getCanvasForPage, c as captureFabricCanvasSvgForPdf, f as findNodeById, a as getAbsoluteBounds, p as parseTextMarkdown, r as renderSmartElementToSvg, n as normalizeShapeType, h as hasEdgeFade, b as getProxiedImageUrl, d as bakeEdgeFade, i as isElement, e as isGroup, j as buildRoundedTrianglePath, A as API_URL, k as getImageProxyFetchOptions, l as getRoundedRectRadii, T as TRIANGLE_STROKE_MITER_LIMIT, m as getTrianglePoints } from "./index-C1BrMJjh.js";
|
|
5
5
|
import { resetPdfFontRegistry, FONT_FALLBACK_SYMBOLS, FONT_FALLBACK_MATH, FONT_FALLBACK_DEVANAGARI, embedFontWithGoogleFallback, getEmbeddedVariantsList, isFontAvailable, isFamilyEmbedded, resolveBestRegisteredVariant, getEmbeddedJsPDFFontName, resolveFontWeight, doesVariantSupportChar } from "./pdfFonts-DhEaMTZl.js";
|
|
6
6
|
async function embedFontsForSvg(pdf, svgStr) {
|
|
7
7
|
var _a;
|
|
@@ -499,9 +499,12 @@ async function preloadSvgImagesForPdf(svg, options) {
|
|
|
499
499
|
const present = new Set(images.map((image) => image.getAttribute("data-pixldocs-image-id") || "").filter(Boolean));
|
|
500
500
|
const missing = [...required].filter((id) => !present.has(id));
|
|
501
501
|
if (missing.length || failedRequired.length) {
|
|
502
|
-
|
|
502
|
+
console.warn(
|
|
503
|
+
`[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"}`
|
|
504
|
+
);
|
|
505
|
+
} else {
|
|
506
|
+
console.log("[client-pdf-export] SVG image ids ready", { context: options == null ? void 0 : options.context, count: required.size, ids: [...required] });
|
|
503
507
|
}
|
|
504
|
-
console.log("[client-pdf-export] SVG image ids ready", { context: options == null ? void 0 : options.context, count: required.size, ids: [...required] });
|
|
505
508
|
}
|
|
506
509
|
}
|
|
507
510
|
function resetPdfColorState(pdf, label) {
|
|
@@ -2549,7 +2552,7 @@ async function fetchSvgAsElement(imageUrl, colorMap) {
|
|
|
2549
2552
|
async function getRecoloredSvgDataUrl(imageUrl, colorMap) {
|
|
2550
2553
|
if (!colorMap || Object.keys(colorMap).length === 0) return null;
|
|
2551
2554
|
try {
|
|
2552
|
-
const { getNormalizedSvgUrl } = await import("./index-
|
|
2555
|
+
const { getNormalizedSvgUrl } = await import("./index-C1BrMJjh.js").then((n) => n.a6);
|
|
2553
2556
|
return await getNormalizedSvgUrl(imageUrl, colorMap);
|
|
2554
2557
|
} catch {
|
|
2555
2558
|
return null;
|
|
@@ -3340,7 +3343,7 @@ async function fetchImageAsBase64(imageUrl, opts = {}) {
|
|
|
3340
3343
|
}
|
|
3341
3344
|
let fetchUrl = imageUrl;
|
|
3342
3345
|
if (imageUrl.startsWith("http://") || imageUrl.startsWith("https://")) {
|
|
3343
|
-
const { isPrivateUrl } = await import("./index-
|
|
3346
|
+
const { isPrivateUrl } = await import("./index-C1BrMJjh.js").then((n) => n.a6);
|
|
3344
3347
|
if (isPrivateUrl(imageUrl)) return null;
|
|
3345
3348
|
const proxyUrl = new URL(`${API_URL}/image-proxy`);
|
|
3346
3349
|
proxyUrl.searchParams.set("url", imageUrl);
|
|
@@ -5161,9 +5164,6 @@ async function exportMultiPagePdf(pages, options) {
|
|
|
5161
5164
|
svgLength: (liveSvgString == null ? void 0 : liveSvgString.length) ?? 0
|
|
5162
5165
|
});
|
|
5163
5166
|
} catch (error) {
|
|
5164
|
-
if (error instanceof Error && /expected image\(s\) not ready for SVG PDF/i.test(error.message)) {
|
|
5165
|
-
throw error;
|
|
5166
|
-
}
|
|
5167
5167
|
allowLiveCanvasFallback = false;
|
|
5168
5168
|
console.error(`[client-pdf-export] live SVG export failed for page ${pageIndex + 1}`, error);
|
|
5169
5169
|
}
|
|
@@ -5352,4 +5352,4 @@ export {
|
|
|
5352
5352
|
preparePagesForExport,
|
|
5353
5353
|
rewriteSvgFontsForJsPDFWithSourceMeta
|
|
5354
5354
|
};
|
|
5355
|
-
//# sourceMappingURL=vectorPdfExport-
|
|
5355
|
+
//# sourceMappingURL=vectorPdfExport-CuD_Ax0x.js.map
|