@pixldocs/canvas-renderer 0.5.51 → 0.5.52

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
@@ -12340,7 +12340,7 @@ function PixldocsPreview(props) {
12340
12340
  !canvasSettled && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "absolute", inset: 0, display: "flex", alignItems: "center", justifyContent: "center", minHeight: 200 }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "#888", fontSize: 14 }, children: "Loading preview..." }) })
12341
12341
  ] });
12342
12342
  }
12343
- const PACKAGE_VERSION = "0.5.50";
12343
+ const PACKAGE_VERSION = "0.5.52";
12344
12344
  let __underlineFixInstalled = false;
12345
12345
  function installUnderlineFix(fab) {
12346
12346
  var _a;
@@ -14004,6 +14004,7 @@ const SVG_STYLE_PROPS = /* @__PURE__ */ new Set([
14004
14004
  const GRADIENT_ATTRS_LINEAR = ["x1", "y1", "x2", "y2", "gradientUnits", "gradientTransform", "spreadMethod"];
14005
14005
  const GRADIENT_ATTRS_RADIAL = ["cx", "cy", "r", "fx", "fy", "gradientUnits", "gradientTransform", "spreadMethod"];
14006
14006
  const URL_GRADIENT_RE = /^\s*url\s*\(\s*(['"]?)([^)]+?)\1\s*\)/i;
14007
+ const SHADOW_RASTER_ALPHA_COMPENSATION = 0.84;
14007
14008
  function parseColor(color) {
14008
14009
  if (!color) return null;
14009
14010
  const raw = color.trim().toLowerCase();
@@ -15049,6 +15050,7 @@ async function rasterizeShadowMarkers(svg) {
15049
15050
  img.setAttribute("y", String(by));
15050
15051
  img.setAttribute("width", String(bw));
15051
15052
  img.setAttribute("height", String(bh));
15053
+ img.setAttribute("opacity", String(SHADOW_RASTER_ALPHA_COMPENSATION));
15052
15054
  img.setAttribute("preserveAspectRatio", "none");
15053
15055
  img.setAttributeNS(XLINK_NS, "xlink:href", dataUrl);
15054
15056
  img.setAttribute("href", dataUrl);