@pixldocs/canvas-renderer 0.5.195 → 0.5.196

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.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-DsCBhthJ.cjs");
3
+ const index = require("./index-DQnFS9GV.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.d.ts CHANGED
@@ -657,13 +657,12 @@ export declare interface RendererConfig {
657
657
  */
658
658
  forcePerElementPdf?: boolean | 'auto';
659
659
  /**
660
- * PDF export: cap the longest edge (in pixels) of any rasterised user
661
- * image (data URLs only) before handing it to the PDF exporter. Larger
662
- * images are JPEG-recompressed in-browser to fit. Prevents Safari from
663
- * silently failing to embed multi-megapixel camera-roll JPEGs.
660
+ * PDF export: cap raster user images (data URLs only) before handing them
661
+ * to the PDF exporter. Larger images are JPEG-recompressed in-browser by
662
+ * edge and encoded-byte size so svg2pdf does not corrupt/drop multi-megapixel
663
+ * camera/gallery photos.
664
664
  *
665
- * Default: `0` unless explicitly set. BioMaker-style PDF hosts should pass
666
- * `2048` so large camera/gallery photos are normalized before mount.
665
+ * Default: auto-normalize data:image sources to `2048`; pass `0` to disable.
667
666
  */
668
667
  maxImageEdgePx?: number;
669
668
  }
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-BggTMIGH.js";
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-KqyAyv91.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-BggTMIGH.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-KqyAyv91.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;
@@ -2552,7 +2552,7 @@ async function fetchSvgAsElement(imageUrl, colorMap) {
2552
2552
  async function getRecoloredSvgDataUrl(imageUrl, colorMap) {
2553
2553
  if (!colorMap || Object.keys(colorMap).length === 0) return null;
2554
2554
  try {
2555
- const { getNormalizedSvgUrl } = await import("./index-BggTMIGH.js").then((n) => n.a6);
2555
+ const { getNormalizedSvgUrl } = await import("./index-KqyAyv91.js").then((n) => n.a6);
2556
2556
  return await getNormalizedSvgUrl(imageUrl, colorMap);
2557
2557
  } catch {
2558
2558
  return null;
@@ -3343,7 +3343,7 @@ async function fetchImageAsBase64(imageUrl, opts = {}) {
3343
3343
  }
3344
3344
  let fetchUrl = imageUrl;
3345
3345
  if (imageUrl.startsWith("http://") || imageUrl.startsWith("https://")) {
3346
- const { isPrivateUrl } = await import("./index-BggTMIGH.js").then((n) => n.a6);
3346
+ const { isPrivateUrl } = await import("./index-KqyAyv91.js").then((n) => n.a6);
3347
3347
  if (isPrivateUrl(imageUrl)) return null;
3348
3348
  const proxyUrl = new URL(`${API_URL}/image-proxy`);
3349
3349
  proxyUrl.searchParams.set("url", imageUrl);
@@ -5352,4 +5352,4 @@ export {
5352
5352
  preparePagesForExport,
5353
5353
  rewriteSvgFontsForJsPDFWithSourceMeta
5354
5354
  };
5355
- //# sourceMappingURL=vectorPdfExport-eV507wxX.js.map
5355
+ //# sourceMappingURL=vectorPdfExport-BBQHeFKb.js.map