easyeda 0.0.255 → 0.0.256
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.d.ts +2624 -1
- package/dist/browser/index.js +15 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +27 -29
- package/dist/main.cjs.map +1 -1
- package/package.json +3 -3
package/dist/browser/index.js
CHANGED
|
@@ -10873,12 +10873,26 @@ async function fetchEasyEDAComponent(jlcpcbPartNumber, {
|
|
|
10873
10873
|
return result;
|
|
10874
10874
|
}
|
|
10875
10875
|
export {
|
|
10876
|
+
BBoxSchema,
|
|
10877
|
+
DataStrSchema,
|
|
10878
|
+
EasyEdaJsonSchema,
|
|
10879
|
+
HeadSchema,
|
|
10880
|
+
LayerItemSchema,
|
|
10881
|
+
LcscSchema,
|
|
10882
|
+
ModelBoundsSchema,
|
|
10883
|
+
ObjectItemSchema,
|
|
10884
|
+
OwnerSchema,
|
|
10885
|
+
PackageDetailDataStrSchema,
|
|
10886
|
+
PackageDetailSchema,
|
|
10887
|
+
SzlcscSchema,
|
|
10876
10888
|
convertBetterEasyToTsx,
|
|
10889
|
+
convertEasyEdaJsonToCircuitJson,
|
|
10877
10890
|
convertRawEasyToTsx,
|
|
10878
10891
|
fetchEasyEDAComponent,
|
|
10879
10892
|
generateFootprintTsx,
|
|
10880
10893
|
getModelCdnUrl,
|
|
10881
10894
|
getModelObjCdnUrl,
|
|
10882
|
-
getModelStepCdnUrl
|
|
10895
|
+
getModelStepCdnUrl,
|
|
10896
|
+
maybeNumber
|
|
10883
10897
|
};
|
|
10884
10898
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js
CHANGED
|
@@ -5059,15 +5059,15 @@ function generateArcFromSweep(startX, startY, endX, endY, radius, largeArcFlag,
|
|
|
5059
5059
|
2,
|
|
5060
5060
|
Math.ceil(Math.abs(endAngle - startAngle) * radius)
|
|
5061
5061
|
);
|
|
5062
|
-
const
|
|
5062
|
+
const path = [];
|
|
5063
5063
|
for (let i = 0; i <= numPoints; i++) {
|
|
5064
5064
|
const t = i / numPoints;
|
|
5065
5065
|
const angle2 = startAngle + t * (endAngle - startAngle);
|
|
5066
5066
|
const x = centerX + radius * Math.cos(angle2);
|
|
5067
5067
|
const y = centerY + radius * Math.sin(angle2);
|
|
5068
|
-
|
|
5068
|
+
path.push({ x, y });
|
|
5069
5069
|
}
|
|
5070
|
-
return
|
|
5070
|
+
return path;
|
|
5071
5071
|
}
|
|
5072
5072
|
|
|
5073
5073
|
// lib/utils/easyeda-unit-to-mm.ts
|
|
@@ -6274,7 +6274,7 @@ var parsePin = (pinString) => {
|
|
|
6274
6274
|
const colorMatch = pinString.match(/#[0-9A-F]{6}/);
|
|
6275
6275
|
const labelColor = colorMatch ? colorMatch[0] : "";
|
|
6276
6276
|
const pathMatch = pinString.match(/\^\^([^~]+)/);
|
|
6277
|
-
const
|
|
6277
|
+
const path = pathMatch ? pathMatch[1] : "";
|
|
6278
6278
|
const arrowMatch = pinString.match(/\^\^0~(.+)$/);
|
|
6279
6279
|
const arrow = arrowMatch ? arrowMatch[1] : "";
|
|
6280
6280
|
const r = Number.parseFloat(rotation2);
|
|
@@ -6288,7 +6288,7 @@ var parsePin = (pinString) => {
|
|
|
6288
6288
|
rotation: Number.isNaN(r) ? 0 : r,
|
|
6289
6289
|
label,
|
|
6290
6290
|
labelColor,
|
|
6291
|
-
path
|
|
6291
|
+
path,
|
|
6292
6292
|
arrow
|
|
6293
6293
|
};
|
|
6294
6294
|
};
|
|
@@ -6996,13 +6996,13 @@ var checkModelObjUrlValidity = async (url) => {
|
|
|
6996
6996
|
};
|
|
6997
6997
|
|
|
6998
6998
|
// lib/convert-easyeda-json-to-various-formats.ts
|
|
6999
|
-
import fs from "fs/promises";
|
|
7000
|
-
import * as path from "path";
|
|
7001
6999
|
var convertEasyEdaJsonToVariousFormats = async ({
|
|
7002
7000
|
jlcpcbPartNumberOrFilepath,
|
|
7003
7001
|
outputFilename,
|
|
7004
7002
|
outputFormat
|
|
7005
7003
|
}) => {
|
|
7004
|
+
const fs = await import("fs/promises");
|
|
7005
|
+
const path = await import("path");
|
|
7006
7006
|
let rawEasyEdaJson;
|
|
7007
7007
|
if (jlcpcbPartNumberOrFilepath.includes(".") || jlcpcbPartNumberOrFilepath.includes("/")) {
|
|
7008
7008
|
rawEasyEdaJson = JSON.parse(
|