easyeda 0.0.172 → 0.0.173
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 +8 -4
- package/dist/browser/index.js.map +1 -1
- package/dist/{chunk-5J7QOD5Y.js → chunk-SRGPYV5T.js} +9 -5
- package/dist/{chunk-5J7QOD5Y.js.map → chunk-SRGPYV5T.js.map} +1 -1
- package/dist/cli/main.js +2 -2
- package/dist/cli/main.js.map +1 -1
- package/dist/lib/index.d.ts +700 -700
- package/dist/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -2618,7 +2618,8 @@ var ShapeItemSchema = z84.object({
|
|
|
2618
2618
|
let points, rotation2;
|
|
2619
2619
|
if (padShape === "RECT") {
|
|
2620
2620
|
points = parsePoints(rest[0]);
|
|
2621
|
-
|
|
2621
|
+
const r = Number(rest[1]);
|
|
2622
|
+
rotation2 = Number.isNaN(r) ? void 0 : r;
|
|
2622
2623
|
}
|
|
2623
2624
|
const padInputParams = {
|
|
2624
2625
|
type: "PAD",
|
|
@@ -2714,6 +2715,7 @@ var ShapeItemSchema = z84.object({
|
|
|
2714
2715
|
}
|
|
2715
2716
|
case "RECT": {
|
|
2716
2717
|
const [x, y, width, height, lineWidth, id, rotation2, layer, fillStyle] = shape.data.split("~");
|
|
2718
|
+
const r = rotation2 ? Number(rotation2) : void 0;
|
|
2717
2719
|
return RectSchema.parse({
|
|
2718
2720
|
type: "RECT",
|
|
2719
2721
|
x,
|
|
@@ -2722,13 +2724,14 @@ var ShapeItemSchema = z84.object({
|
|
|
2722
2724
|
height,
|
|
2723
2725
|
lineWidth: Number(lineWidth),
|
|
2724
2726
|
id,
|
|
2725
|
-
rotation:
|
|
2727
|
+
rotation: Number.isNaN(r) ? void 0 : r,
|
|
2726
2728
|
layer: layer ? Number(layer) : void 0,
|
|
2727
2729
|
fillStyle: fillStyle || void 0
|
|
2728
2730
|
});
|
|
2729
2731
|
}
|
|
2730
2732
|
case "TEXT": {
|
|
2731
2733
|
const [textAnchor, x, y, size2, layer, id, rotation2, , font, text] = shape.data.split("~");
|
|
2734
|
+
const r = rotation2 ? Number(rotation2) : void 0;
|
|
2732
2735
|
return TextSchema.parse({
|
|
2733
2736
|
type: "TEXT",
|
|
2734
2737
|
text,
|
|
@@ -2738,7 +2741,7 @@ var ShapeItemSchema = z84.object({
|
|
|
2738
2741
|
// empirically this seems to match, C5248081 is a good test case
|
|
2739
2742
|
layer: layer ? Number(layer) : void 0,
|
|
2740
2743
|
id,
|
|
2741
|
-
rotation:
|
|
2744
|
+
rotation: Number.isNaN(r) ? void 0 : r,
|
|
2742
2745
|
textAnchor,
|
|
2743
2746
|
font: font || void 0
|
|
2744
2747
|
});
|
|
@@ -2859,6 +2862,7 @@ var parsePin = (pinString) => {
|
|
|
2859
2862
|
const path2 = pathMatch ? pathMatch[1] : "";
|
|
2860
2863
|
const arrowMatch = pinString.match(/\^\^0~(.+)$/);
|
|
2861
2864
|
const arrow = arrowMatch ? arrowMatch[1] : "";
|
|
2865
|
+
const r = parseFloat(rotation2);
|
|
2862
2866
|
return {
|
|
2863
2867
|
type: "PIN",
|
|
2864
2868
|
visibility,
|
|
@@ -2866,7 +2870,7 @@ var parsePin = (pinString) => {
|
|
|
2866
2870
|
pinNumber: isNaN(Number(pinNumber)) ? pinNumber : Number(pinNumber),
|
|
2867
2871
|
x: parseFloat(x),
|
|
2868
2872
|
y: parseFloat(y),
|
|
2869
|
-
rotation:
|
|
2873
|
+
rotation: Number.isNaN(r) ? 0 : r,
|
|
2870
2874
|
label,
|
|
2871
2875
|
labelColor,
|
|
2872
2876
|
path: path2,
|
|
@@ -3423,4 +3427,4 @@ export {
|
|
|
3423
3427
|
convertRawEasyToTsx,
|
|
3424
3428
|
convertEasyEdaJsonToVariousFormats
|
|
3425
3429
|
};
|
|
3426
|
-
//# sourceMappingURL=chunk-
|
|
3430
|
+
//# sourceMappingURL=chunk-SRGPYV5T.js.map
|