@pixldocs/canvas-renderer 0.5.214 → 0.5.215

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-Cy2_ElDZ.cjs");
3
+ const index = require("./index-CzwZcfGF.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.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-CDdfs3IB.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-BV_MP9XQ.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 { p as parseTextMarkdown, r as renderSmartElementToSvg, g as getCanvasForPage, c as captureFabricCanvasSvgForPdf, f as findNodeById, a as getAbsoluteBounds, b as getProxiedImageUrl, d as getImageProxyFetchOptions, A as API_URL, n as normalizeShapeType, i as isElement, e as isGroup, h as buildRoundedTrianglePath, j as hasEdgeFade, k as bakeEdgeFade, l as getRoundedRectRadii, T as TRIANGLE_STROKE_MITER_LIMIT, m as getTrianglePoints } from "./index-CDdfs3IB.js";
4
+ import { p as parseTextMarkdown, r as renderSmartElementToSvg, g as getCanvasForPage, c as captureFabricCanvasSvgForPdf, f as findNodeById, a as getAbsoluteBounds, b as getProxiedImageUrl, d as getImageProxyFetchOptions, A as API_URL, n as normalizeShapeType, i as isElement, e as isGroup, h as buildRoundedTrianglePath, j as hasEdgeFade, k as bakeEdgeFade, l as getRoundedRectRadii, T as TRIANGLE_STROKE_MITER_LIMIT, m as getTrianglePoints } from "./index-BV_MP9XQ.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;
@@ -150,7 +150,7 @@ async function ensureImageDecoded(img) {
150
150
  } catch {
151
151
  }
152
152
  }
153
- const SHADOW_RASTER_ALPHA_COMPENSATION = 0.84;
153
+ const SHADOW_RASTER_ALPHA_COMPENSATION = 1;
154
154
  function collectFontSpecsFromShadowMarkup(markup) {
155
155
  const specs = /* @__PURE__ */ new Set();
156
156
  const re = /<(?:text|tspan)\b[^>]*>/gi;
@@ -2118,9 +2118,7 @@ async function rasterizeShadowMarkers(svg) {
2118
2118
  img.setAttribute("preserveAspectRatio", "none");
2119
2119
  img.setAttributeNS(XLINK_NS, "xlink:href", dataUrl);
2120
2120
  img.setAttribute("href", dataUrl);
2121
- const alphaRaw = parseFloat(marker.getAttribute("data-alpha") || "1");
2122
- const shadowAlpha = Number.isFinite(alphaRaw) ? Math.max(0, Math.min(1, alphaRaw)) : 1;
2123
- img.setAttribute("opacity", String(SHADOW_RASTER_ALPHA_COMPENSATION * shadowAlpha));
2121
+ img.setAttribute("opacity", String(SHADOW_RASTER_ALPHA_COMPENSATION));
2124
2122
  (_e = marker.parentNode) == null ? void 0 : _e.replaceChild(img, marker);
2125
2123
  } catch (error) {
2126
2124
  console.warn("[Vector PDF] text shadow rasterization failed for one marker:", error);
@@ -2953,7 +2951,7 @@ async function fetchSvgAsElement(imageUrl, colorMap) {
2953
2951
  async function getRecoloredSvgDataUrl(imageUrl, colorMap) {
2954
2952
  if (!colorMap || Object.keys(colorMap).length === 0) return null;
2955
2953
  try {
2956
- const { getNormalizedSvgUrl } = await import("./index-CDdfs3IB.js").then((n) => n.a6);
2954
+ const { getNormalizedSvgUrl } = await import("./index-BV_MP9XQ.js").then((n) => n.a6);
2957
2955
  return await getNormalizedSvgUrl(imageUrl, colorMap);
2958
2956
  } catch {
2959
2957
  return null;
@@ -3762,7 +3760,7 @@ async function fetchImageAsBase64(imageUrl, opts = {}) {
3762
3760
  }
3763
3761
  let fetchUrl = imageUrl;
3764
3762
  if (imageUrl.startsWith("http://") || imageUrl.startsWith("https://")) {
3765
- const { isPrivateUrl } = await import("./index-CDdfs3IB.js").then((n) => n.a6);
3763
+ const { isPrivateUrl } = await import("./index-BV_MP9XQ.js").then((n) => n.a6);
3766
3764
  if (isPrivateUrl(imageUrl)) return null;
3767
3765
  const proxyUrl = new URL(`${API_URL}/image-proxy`);
3768
3766
  proxyUrl.searchParams.set("url", imageUrl);
@@ -5863,4 +5861,4 @@ export {
5863
5861
  preparePagesForExport,
5864
5862
  rewriteSvgFontsForJsPDFWithSourceMeta
5865
5863
  };
5866
- //# sourceMappingURL=vectorPdfExport-CjIUU8on.js.map
5864
+ //# sourceMappingURL=vectorPdfExport-CN1fcrfR.js.map