@pixldocs/canvas-renderer 0.5.123 → 0.5.124
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-BIjYOVnw.cjs → index-DpsVjlDU.cjs} +5 -5
- package/dist/{index-BIjYOVnw.cjs.map → index-DpsVjlDU.cjs.map} +1 -1
- package/dist/{index-CL09cdqm.js → index-HIMi3Y6V.js} +5 -5
- package/dist/{index-CL09cdqm.js.map → index-HIMi3Y6V.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-Cn3c_VYZ.js → vectorPdfExport-CWJRsyl0.js} +6 -6
- package/dist/vectorPdfExport-CWJRsyl0.js.map +1 -0
- package/dist/{vectorPdfExport-G2Yz66tj.cjs → vectorPdfExport-DzfRoSxz.cjs} +6 -6
- package/dist/vectorPdfExport-DzfRoSxz.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/vectorPdfExport-Cn3c_VYZ.js.map +0 -1
- package/dist/vectorPdfExport-G2Yz66tj.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-DpsVjlDU.cjs");
|
|
4
4
|
exports.FONT_FALLBACK_DEVANAGARI = index.FONT_FALLBACK_DEVANAGARI;
|
|
5
5
|
exports.FONT_FALLBACK_MATH = index.FONT_FALLBACK_MATH;
|
|
6
6
|
exports.FONT_FALLBACK_SYMBOLS = index.FONT_FALLBACK_SYMBOLS;
|
package/dist/index.d.ts
CHANGED
|
@@ -259,7 +259,7 @@ export declare function normalizeFontFamily(fontStack: string): string;
|
|
|
259
259
|
* Package version banner. Bump alongside package.json so we can confirm
|
|
260
260
|
* (via browser:log) that the deployed bundle matches the expected build.
|
|
261
261
|
*/
|
|
262
|
-
export declare const PACKAGE_VERSION = "0.5.
|
|
262
|
+
export declare const PACKAGE_VERSION = "0.5.124";
|
|
263
263
|
|
|
264
264
|
export declare interface PageSettings {
|
|
265
265
|
backgroundColor?: string;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F, m, o, q, P, s, t, u, v, w, x, y, z, B, C, D, E, G, H, I, J, b, K, L, M, N, O, Q, R, S, U, V, W, X, Y } from "./index-
|
|
1
|
+
import { F, m, o, q, P, s, t, u, v, w, x, y, z, B, C, D, E, G, H, I, J, b, K, L, M, N, O, Q, R, S, U, V, W, X, Y } from "./index-HIMi3Y6V.js";
|
|
2
2
|
export {
|
|
3
3
|
F as FONT_FALLBACK_DEVANAGARI,
|
|
4
4
|
m as FONT_FALLBACK_MATH,
|
|
@@ -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, f as findNodeById, a as getAbsoluteBounds, p as parseTextMarkdown, r as renderSmartElementToSvg, n as normalizeShapeType, h as hasEdgeFade, b as getProxiedImageUrl, c as bakeEdgeFade, i as isElement, d as isGroup, e as buildRoundedTrianglePath, A as API_URL, j as getImageProxyFetchOptions, k as getRoundedRectRadii, T as TRIANGLE_STROKE_MITER_LIMIT, l as getTrianglePoints } from "./index-
|
|
4
|
+
import { g as getCanvasForPage, f as findNodeById, a as getAbsoluteBounds, p as parseTextMarkdown, r as renderSmartElementToSvg, n as normalizeShapeType, h as hasEdgeFade, b as getProxiedImageUrl, c as bakeEdgeFade, i as isElement, d as isGroup, e as buildRoundedTrianglePath, A as API_URL, j as getImageProxyFetchOptions, k as getRoundedRectRadii, T as TRIANGLE_STROKE_MITER_LIMIT, l as getTrianglePoints } from "./index-HIMi3Y6V.js";
|
|
5
5
|
import { r as resetPdfFontRegistry, F as FONT_FALLBACK_SYMBOLS, a as FONT_FALLBACK_MATH, b as FONT_FALLBACK_DEVANAGARI, e as embedFontWithGoogleFallback, g as getEmbeddedVariantsList, i as isFontAvailable, c as isFamilyEmbedded, d as resolveBestRegisteredVariant, f as getEmbeddedJsPDFFontName, h as resolveFontWeight, j as doesVariantSupportChar } from "./pdfFonts-CZpNVjX9.js";
|
|
6
6
|
async function bakeEdgeFadeIntoDataUrl(dataUrl, element) {
|
|
7
7
|
const fade = element;
|
|
@@ -858,10 +858,10 @@ function inlineNestedSvgImageDataUris(svgString, domParser = new DOMParser()) {
|
|
|
858
858
|
}
|
|
859
859
|
}
|
|
860
860
|
function hasInvalidSvgNumericToken(value) {
|
|
861
|
-
return typeof value === "string" && /\b(?:NaN|-?Infinity)\b/.test(value);
|
|
861
|
+
return typeof value === "string" && /\b(?:NaN|-?Infinity|undefined|null)\b/.test(value);
|
|
862
862
|
}
|
|
863
863
|
function sanitizeSvgNumericTokens(value) {
|
|
864
|
-
return value.replace(/\bNaN\b/g, "0").replace(/\b-?Infinity\b/g, "0");
|
|
864
|
+
return value.replace(/\bNaN\b/g, "0").replace(/\b-?Infinity\b/g, "0").replace(/\bundefined\b/g, "0").replace(/\bnull\b/g, "0");
|
|
865
865
|
}
|
|
866
866
|
function sanitizeSvgTreeForPdf(svg) {
|
|
867
867
|
const attrsToSanitize = [
|
|
@@ -2022,7 +2022,7 @@ async function fetchSvgAsElement(imageUrl, colorMap) {
|
|
|
2022
2022
|
async function getRecoloredSvgDataUrl(imageUrl, colorMap) {
|
|
2023
2023
|
if (!colorMap || Object.keys(colorMap).length === 0) return null;
|
|
2024
2024
|
try {
|
|
2025
|
-
const { getNormalizedSvgUrl } = await import("./index-
|
|
2025
|
+
const { getNormalizedSvgUrl } = await import("./index-HIMi3Y6V.js").then((n) => n.Z);
|
|
2026
2026
|
return await getNormalizedSvgUrl(imageUrl, colorMap);
|
|
2027
2027
|
} catch {
|
|
2028
2028
|
return null;
|
|
@@ -2803,7 +2803,7 @@ async function fetchImageAsBase64(imageUrl, opts = {}) {
|
|
|
2803
2803
|
}
|
|
2804
2804
|
let fetchUrl = imageUrl;
|
|
2805
2805
|
if (imageUrl.startsWith("http://") || imageUrl.startsWith("https://")) {
|
|
2806
|
-
const { isPrivateUrl } = await import("./index-
|
|
2806
|
+
const { isPrivateUrl } = await import("./index-HIMi3Y6V.js").then((n) => n.Z);
|
|
2807
2807
|
if (isPrivateUrl(imageUrl)) return null;
|
|
2808
2808
|
const proxyUrl = new URL(`${API_URL}/image-proxy`);
|
|
2809
2809
|
proxyUrl.searchParams.set("url", imageUrl);
|
|
@@ -4786,4 +4786,4 @@ export {
|
|
|
4786
4786
|
preparePagesForExport,
|
|
4787
4787
|
rewriteSvgFontsForJsPDFWithSourceMeta
|
|
4788
4788
|
};
|
|
4789
|
-
//# sourceMappingURL=vectorPdfExport-
|
|
4789
|
+
//# sourceMappingURL=vectorPdfExport-CWJRsyl0.js.map
|