easyeda 0.0.254 → 0.0.255
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/browser/index.js +13 -6
- package/dist/browser/index.js.map +1 -1
- package/dist/index.js +13 -6
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +15 -8
- package/dist/main.cjs.map +1 -1
- package/package.json +2 -2
package/dist/browser/index.js
CHANGED
|
@@ -8882,6 +8882,11 @@ var unitToMm = {
|
|
|
8882
8882
|
ft: 304.8,
|
|
8883
8883
|
feet: 304.8
|
|
8884
8884
|
};
|
|
8885
|
+
var mmNumberFormatter = new Intl.NumberFormat("en-US", {
|
|
8886
|
+
useGrouping: false,
|
|
8887
|
+
notation: "standard",
|
|
8888
|
+
maximumFractionDigits: 12
|
|
8889
|
+
});
|
|
8885
8890
|
var mm = (n) => {
|
|
8886
8891
|
let unit = typeof n === "number" ? "mm" : n.replace(/^[^a-zA-Z]+/g, "").toLowerCase();
|
|
8887
8892
|
if (!unit)
|
|
@@ -8893,7 +8898,14 @@ var mm = (n) => {
|
|
|
8893
8898
|
throw new Error(`Unsupported unit: ${unit}`);
|
|
8894
8899
|
};
|
|
8895
8900
|
var mmStr = (n) => {
|
|
8896
|
-
return `${mm(n)}mm`;
|
|
8901
|
+
return `${mmNumberFormatter.format(mm(n))}mm`;
|
|
8902
|
+
};
|
|
8903
|
+
var mil2mm = (mil) => {
|
|
8904
|
+
if (typeof mil === "number")
|
|
8905
|
+
return mm(`${mil}mil`);
|
|
8906
|
+
if (mil.match(/^\d+$/))
|
|
8907
|
+
return mm(`${mil}mil`);
|
|
8908
|
+
return mm(mil);
|
|
8897
8909
|
};
|
|
8898
8910
|
|
|
8899
8911
|
// lib/math/arc-utils.ts
|
|
@@ -9028,11 +9040,6 @@ var DEFAULT_PCB_THICKNESS_MM = 1.6;
|
|
|
9028
9040
|
var EASYEDA_STEP_MODEL_URL = "https://modules.easyeda.com/qAxj6KHrDKw4blvCG8QJPs7Y";
|
|
9029
9041
|
var EASYEDA_OBJ_MODEL_URL = "https://modules.easyeda.com/3dmodel";
|
|
9030
9042
|
var TSCIRCUIT_MODEL_CDN_URL = "https://modelcdn.tscircuit.com/easyeda_models";
|
|
9031
|
-
var mil2mm = (mil) => {
|
|
9032
|
-
if (typeof mil === "number") return mm(`${mil}mil`);
|
|
9033
|
-
if (mil.match(/^\d+$/)) return mm(`${mil}mil`);
|
|
9034
|
-
return mm(mil);
|
|
9035
|
-
};
|
|
9036
9043
|
var milx10 = (mil10) => {
|
|
9037
9044
|
if (typeof mil10 === "number") return mil2mm(mil10) * 10;
|
|
9038
9045
|
if (mil10.match(/^\d+$/)) return mil2mm(mil10) * 10;
|