@pixldocs/canvas-renderer 0.5.174 → 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.
@@ -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-DLAkGTqW.js";
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-CTIPncpy.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;
@@ -2500,7 +2500,7 @@ async function fetchSvgAsElement(imageUrl, colorMap) {
2500
2500
  async function getRecoloredSvgDataUrl(imageUrl, colorMap) {
2501
2501
  if (!colorMap || Object.keys(colorMap).length === 0) return null;
2502
2502
  try {
2503
- const { getNormalizedSvgUrl } = await import("./index-DLAkGTqW.js").then((n) => n.a2);
2503
+ const { getNormalizedSvgUrl } = await import("./index-CTIPncpy.js").then((n) => n.a2);
2504
2504
  return await getNormalizedSvgUrl(imageUrl, colorMap);
2505
2505
  } catch {
2506
2506
  return null;
@@ -3291,7 +3291,7 @@ async function fetchImageAsBase64(imageUrl, opts = {}) {
3291
3291
  }
3292
3292
  let fetchUrl = imageUrl;
3293
3293
  if (imageUrl.startsWith("http://") || imageUrl.startsWith("https://")) {
3294
- const { isPrivateUrl } = await import("./index-DLAkGTqW.js").then((n) => n.a2);
3294
+ const { isPrivateUrl } = await import("./index-CTIPncpy.js").then((n) => n.a2);
3295
3295
  if (isPrivateUrl(imageUrl)) return null;
3296
3296
  const proxyUrl = new URL(`${API_URL}/image-proxy`);
3297
3297
  proxyUrl.searchParams.set("url", imageUrl);
@@ -5059,7 +5059,14 @@ async function exportMultiPagePdf(pages, options) {
5059
5059
  }
5060
5060
  let preppedSvgString = liveSvgString;
5061
5061
  try {
5062
- if (pdfTextMode === "auto" || pdfTextMode === "pixel-perfect") {
5062
+ if (pdfTextMode === "pixel-perfect") {
5063
+ const { convertDevanagariTextToPath } = await import("./svgTextToPath-ra4EhtBL.js");
5064
+ preppedSvgString = await convertDevanagariTextToPath(
5065
+ liveSvgString,
5066
+ void 0,
5067
+ { mode: "all" }
5068
+ );
5069
+ } else if (pdfTextMode === "auto") {
5063
5070
  const { convertDevanagariTextToPath } = await import("./svgTextToPath-ra4EhtBL.js");
5064
5071
  preppedSvgString = await convertDevanagariTextToPath(
5065
5072
  liveSvgString,
@@ -5072,7 +5079,8 @@ async function exportMultiPagePdf(pages, options) {
5072
5079
  }
5073
5080
  console.log("[client-pdf-export] gradient text mode", {
5074
5081
  pdfTextMode,
5075
- outlinedGradientText: pdfTextMode === "auto" || pdfTextMode === "pixel-perfect"
5082
+ outlinedAllText: pdfTextMode === "pixel-perfect",
5083
+ outlinedGradientText: pdfTextMode === "auto"
5076
5084
  });
5077
5085
  } catch (gradErr) {
5078
5086
  console.warn("[client-pdf-export] gradient-text fill resolution failed", gradErr);
@@ -5295,4 +5303,4 @@ export {
5295
5303
  preparePagesForExport,
5296
5304
  rewriteSvgFontsForJsPDFWithSourceMeta
5297
5305
  };
5298
- //# sourceMappingURL=vectorPdfExport-B4B0CPjW.js.map
5306
+ //# sourceMappingURL=vectorPdfExport-COqBgUXt.js.map