@pixldocs/canvas-renderer 0.5.150 → 0.5.151
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-CczB1vpO.cjs → index-Clvky1Ne.cjs} +62 -9
- package/dist/index-Clvky1Ne.cjs.map +1 -0
- package/dist/{index-khnxviCH.js → index-Dp8yJxTW.js} +62 -9
- package/dist/index-Dp8yJxTW.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{svgTextToPath-ws6Fh3rx.js → svgTextToPath-BE8TxgiO.js} +2 -2
- package/dist/svgTextToPath-BE8TxgiO.js.map +1 -0
- package/dist/{svgTextToPath-DolCNU9g.cjs → svgTextToPath-qhinMiiS.cjs} +2 -2
- package/dist/svgTextToPath-qhinMiiS.cjs.map +1 -0
- package/dist/{vectorPdfExport-qAWd8i87.cjs → vectorPdfExport-BEohav7Y.cjs} +7 -7
- package/dist/vectorPdfExport-BEohav7Y.cjs.map +1 -0
- package/dist/{vectorPdfExport-CDnEStQk.js → vectorPdfExport-TF3IGImZ.js} +7 -7
- package/dist/vectorPdfExport-TF3IGImZ.js.map +1 -0
- package/package.json +1 -1
- package/dist/index-CczB1vpO.cjs.map +0 -1
- package/dist/index-khnxviCH.js.map +0 -1
- package/dist/svgTextToPath-DolCNU9g.cjs.map +0 -1
- package/dist/svgTextToPath-ws6Fh3rx.js.map +0 -1
- package/dist/vectorPdfExport-CDnEStQk.js.map +0 -1
- package/dist/vectorPdfExport-qAWd8i87.cjs.map +0 -1
|
@@ -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-Dp8yJxTW.js";
|
|
5
5
|
import { resetPdfFontRegistry, FONT_FALLBACK_SYMBOLS, FONT_FALLBACK_MATH, FONT_FALLBACK_DEVANAGARI, embedFontWithGoogleFallback, getEmbeddedVariantsList, isFontAvailable, isFamilyEmbedded, resolveBestRegisteredVariant, getEmbeddedJsPDFFontName, resolveFontWeight, doesVariantSupportChar } from "./pdfFonts-b3_bv7F0.js";
|
|
6
6
|
async function embedFontsForSvg(pdf, svgStr) {
|
|
7
7
|
var _a;
|
|
@@ -1874,8 +1874,8 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
1874
1874
|
}
|
|
1875
1875
|
await rasterizeShadowMarkers(svgToDraw);
|
|
1876
1876
|
try {
|
|
1877
|
-
if (svgToDraw.querySelector("g[data-pd-shadow-blur] text")) {
|
|
1878
|
-
const { convertAllTextToPath } = await import("./svgTextToPath-
|
|
1877
|
+
if (svgToDraw.querySelector("g[data-pd-shadow-blur] text, g[data-pd-text-bg] text")) {
|
|
1878
|
+
const { convertAllTextToPath } = await import("./svgTextToPath-BE8TxgiO.js");
|
|
1879
1879
|
const outlined = await convertAllTextToPath(
|
|
1880
1880
|
new XMLSerializer().serializeToString(svgToDraw),
|
|
1881
1881
|
void 0,
|
|
@@ -1884,7 +1884,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
1884
1884
|
const outlinedDoc = parser.parseFromString(outlined, "image/svg+xml");
|
|
1885
1885
|
if (!outlinedDoc.querySelector("parsererror") && ((_a = outlinedDoc.documentElement) == null ? void 0 : _a.tagName.toLowerCase()) === "svg") {
|
|
1886
1886
|
svgToDraw = outlinedDoc.documentElement;
|
|
1887
|
-
console.log("[Vector PDF][parity]
|
|
1887
|
+
console.log("[Vector PDF][parity] decorated text outlined for headless alignment");
|
|
1888
1888
|
}
|
|
1889
1889
|
}
|
|
1890
1890
|
} catch (outlineErr) {
|
|
@@ -2475,7 +2475,7 @@ async function fetchSvgAsElement(imageUrl, colorMap) {
|
|
|
2475
2475
|
async function getRecoloredSvgDataUrl(imageUrl, colorMap) {
|
|
2476
2476
|
if (!colorMap || Object.keys(colorMap).length === 0) return null;
|
|
2477
2477
|
try {
|
|
2478
|
-
const { getNormalizedSvgUrl } = await import("./index-
|
|
2478
|
+
const { getNormalizedSvgUrl } = await import("./index-Dp8yJxTW.js").then((n) => n.$);
|
|
2479
2479
|
return await getNormalizedSvgUrl(imageUrl, colorMap);
|
|
2480
2480
|
} catch {
|
|
2481
2481
|
return null;
|
|
@@ -3256,7 +3256,7 @@ async function fetchImageAsBase64(imageUrl, opts = {}) {
|
|
|
3256
3256
|
}
|
|
3257
3257
|
let fetchUrl = imageUrl;
|
|
3258
3258
|
if (imageUrl.startsWith("http://") || imageUrl.startsWith("https://")) {
|
|
3259
|
-
const { isPrivateUrl } = await import("./index-
|
|
3259
|
+
const { isPrivateUrl } = await import("./index-Dp8yJxTW.js").then((n) => n.$);
|
|
3260
3260
|
if (isPrivateUrl(imageUrl)) return null;
|
|
3261
3261
|
const proxyUrl = new URL(`${API_URL}/image-proxy`);
|
|
3262
3262
|
proxyUrl.searchParams.set("url", imageUrl);
|
|
@@ -5240,4 +5240,4 @@ export {
|
|
|
5240
5240
|
preparePagesForExport,
|
|
5241
5241
|
rewriteSvgFontsForJsPDFWithSourceMeta
|
|
5242
5242
|
};
|
|
5243
|
-
//# sourceMappingURL=vectorPdfExport-
|
|
5243
|
+
//# sourceMappingURL=vectorPdfExport-TF3IGImZ.js.map
|