easyeda 0.0.306 → 0.0.308
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 +18 -3
- package/dist/browser/index.js.map +1 -1
- package/dist/index.js +18 -3
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +19 -4
- package/dist/main.cjs.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -10327,6 +10327,9 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, {
|
|
|
10327
10327
|
R: "bottom_right"
|
|
10328
10328
|
}[shape.textAnchor ?? "L"],
|
|
10329
10329
|
font_size: shape.size_mm || 1,
|
|
10330
|
+
...shape.rotation !== void 0 && {
|
|
10331
|
+
ccw_rotation: shape.rotation
|
|
10332
|
+
},
|
|
10330
10333
|
layer: "top"
|
|
10331
10334
|
})
|
|
10332
10335
|
);
|
|
@@ -10815,7 +10818,18 @@ var ShapeItemSchema = external_exports.object({
|
|
|
10815
10818
|
});
|
|
10816
10819
|
}
|
|
10817
10820
|
case "TEXT": {
|
|
10818
|
-
const [
|
|
10821
|
+
const [
|
|
10822
|
+
textAnchor,
|
|
10823
|
+
x,
|
|
10824
|
+
y,
|
|
10825
|
+
size2,
|
|
10826
|
+
rotation2,
|
|
10827
|
+
_mirror,
|
|
10828
|
+
layer,
|
|
10829
|
+
_net,
|
|
10830
|
+
font,
|
|
10831
|
+
text
|
|
10832
|
+
] = shape.data.split("~");
|
|
10819
10833
|
const r = rotation2 ? Number(rotation2) : void 0;
|
|
10820
10834
|
return TextSchema.parse({
|
|
10821
10835
|
type: "TEXT",
|
|
@@ -10825,7 +10839,6 @@ var ShapeItemSchema = external_exports.object({
|
|
|
10825
10839
|
size_mm: Number(size2) * 2.54,
|
|
10826
10840
|
// empirically this seems to match, C5248081 is a good test case
|
|
10827
10841
|
layer: layer ? Number(layer) : void 0,
|
|
10828
|
-
id,
|
|
10829
10842
|
rotation: Number.isNaN(r) ? void 0 : r,
|
|
10830
10843
|
textAnchor,
|
|
10831
10844
|
font: font || void 0
|
|
@@ -11521,8 +11534,10 @@ var generateFootprintTsx = (circuitJson, options = {}) => {
|
|
|
11521
11534
|
for (const silkscreenText of silkscreenTexts) {
|
|
11522
11535
|
const isRefDes = silkscreenText.text === "{NAME}";
|
|
11523
11536
|
const textValue = isRefDes ? JSON.stringify("{NAME}") : JSON.stringify(silkscreenText.text);
|
|
11537
|
+
const rotation2 = silkscreenText.ccw_rotation || 0;
|
|
11538
|
+
const rotationAttr = rotation2 ? ` pcbRotation="${rotation2}deg"` : "";
|
|
11524
11539
|
elementStrings.push(
|
|
11525
|
-
`<silkscreentext text=${textValue} pcbX="${mmStr(silkscreenText.anchor_position.x)}" pcbY="${mmStr(silkscreenText.anchor_position.y)}" anchorAlignment="${silkscreenText.anchor_alignment}"
|
|
11540
|
+
`<silkscreentext text=${textValue} pcbX="${mmStr(silkscreenText.anchor_position.x)}" pcbY="${mmStr(silkscreenText.anchor_position.y)}" anchorAlignment="${silkscreenText.anchor_alignment}"${rotationAttr}${silkscreenText.font_size ? ` fontSize="${mmStr(silkscreenText.font_size)}"` : ""} />`
|
|
11526
11541
|
);
|
|
11527
11542
|
}
|
|
11528
11543
|
for (const courtyardOutline of courtyardOutlines) {
|