@8btc/xcanvas 0.0.14-beta.17 → 0.0.14-beta.18

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.js CHANGED
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { atom, useAtom, useAtomValue, useSetAtom } from "jotai";
3
3
  import { Excalidraw, convertToExcalidrawElements, exportToCanvas } from "@8btc/excalidraw";
4
4
  import { useEffect } from "react";
5
- const version = "0.0.14-beta.17";
5
+ const version = "0.0.14-beta.18";
6
6
  const packageJson = {
7
7
  version
8
8
  };
@@ -7863,8 +7863,8 @@ async function fetchSvgAsDataUrl(src) {
7863
7863
  throw new Error("Failed to parse SVG");
7864
7864
  }
7865
7865
  const viewBox = svgElement.getAttribute("viewBox");
7866
- let width = parseFloat(svgElement.getAttribute("width") || "0");
7867
- let height = parseFloat(svgElement.getAttribute("height") || "0");
7866
+ let width = parseFloat(svgElement.getAttribute("width") || "0") / 0.2;
7867
+ let height = parseFloat(svgElement.getAttribute("height") || "0") / 0.2;
7868
7868
  if (!width || !height) {
7869
7869
  if (viewBox) {
7870
7870
  const [, , vbWidth, vbHeight] = viewBox.split(/\s+/).map(Number);
@@ -2,7 +2,7 @@
2
2
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("jotai"), require("@8btc/excalidraw"), require("react")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "jotai", "@8btc/excalidraw", "react"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.XCanvas = {}, global.jsxRuntime, global.Jotai, global.Excalidraw, global.React));
3
3
  })(this, (function(exports2, jsxRuntime, jotai, excalidraw, react) {
4
4
  "use strict";
5
- const version = "0.0.14-beta.17";
5
+ const version = "0.0.14-beta.18";
6
6
  const packageJson = {
7
7
  version
8
8
  };
@@ -7863,8 +7863,8 @@
7863
7863
  throw new Error("Failed to parse SVG");
7864
7864
  }
7865
7865
  const viewBox = svgElement.getAttribute("viewBox");
7866
- let width = parseFloat(svgElement.getAttribute("width") || "0");
7867
- let height = parseFloat(svgElement.getAttribute("height") || "0");
7866
+ let width = parseFloat(svgElement.getAttribute("width") || "0") / 0.2;
7867
+ let height = parseFloat(svgElement.getAttribute("height") || "0") / 0.2;
7868
7868
  if (!width || !height) {
7869
7869
  if (viewBox) {
7870
7870
  const [, , vbWidth, vbHeight] = viewBox.split(/\s+/).map(Number);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8btc/xcanvas",
3
3
  "private": false,
4
- "version": "0.0.14-beta.17",
4
+ "version": "0.0.14-beta.18",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "exports": {