@pixldocs/canvas-renderer 0.5.195 → 0.5.197

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-dXQP21w2.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-6bqq7X_L.js";
2
2
  export {
3
3
  D as DEPLOYMENT_VERSION_MARKER,
4
4
  F as FONT_FALLBACK_DEVANAGARI,
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jspdf = require("jspdf");
4
4
  const svg2pdf_js = require("svg2pdf.js");
5
5
  const fabric = require("fabric");
6
- const index = require("./index-DsCBhthJ.cjs");
6
+ const index = require("./index-dXQP21w2.cjs");
7
7
  const pdfFonts = require("./pdfFonts-BTj2f465.cjs");
8
8
  function _interopNamespaceDefault(e) {
9
9
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -2571,7 +2571,7 @@ async function fetchSvgAsElement(imageUrl, colorMap) {
2571
2571
  async function getRecoloredSvgDataUrl(imageUrl, colorMap) {
2572
2572
  if (!colorMap || Object.keys(colorMap).length === 0) return null;
2573
2573
  try {
2574
- const { getNormalizedSvgUrl } = await Promise.resolve().then(() => require("./index-DsCBhthJ.cjs")).then((n) => n.canvasImageLoader);
2574
+ const { getNormalizedSvgUrl } = await Promise.resolve().then(() => require("./index-dXQP21w2.cjs")).then((n) => n.canvasImageLoader);
2575
2575
  return await getNormalizedSvgUrl(imageUrl, colorMap);
2576
2576
  } catch {
2577
2577
  return null;
@@ -3362,7 +3362,7 @@ async function fetchImageAsBase64(imageUrl, opts = {}) {
3362
3362
  }
3363
3363
  let fetchUrl = imageUrl;
3364
3364
  if (imageUrl.startsWith("http://") || imageUrl.startsWith("https://")) {
3365
- const { isPrivateUrl } = await Promise.resolve().then(() => require("./index-DsCBhthJ.cjs")).then((n) => n.canvasImageLoader);
3365
+ const { isPrivateUrl } = await Promise.resolve().then(() => require("./index-dXQP21w2.cjs")).then((n) => n.canvasImageLoader);
3366
3366
  if (isPrivateUrl(imageUrl)) return null;
3367
3367
  const proxyUrl = new URL(`${index.API_URL}/image-proxy`);
3368
3368
  proxyUrl.searchParams.set("url", imageUrl);
@@ -5369,4 +5369,4 @@ exports.exportMultiPagePdf = exportMultiPagePdf;
5369
5369
  exports.logTextMeasurementDiagnostic = logTextMeasurementDiagnostic;
5370
5370
  exports.preparePagesForExport = preparePagesForExport;
5371
5371
  exports.rewriteSvgFontsForJsPDFWithSourceMeta = rewriteSvgFontsForJsPDFWithSourceMeta;
5372
- //# sourceMappingURL=vectorPdfExport-DOflxvRE.cjs.map
5372
+ //# sourceMappingURL=vectorPdfExport-CMSo382K.cjs.map