easyeda 0.0.203 → 0.0.205
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 +5 -2
- package/dist/browser/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +7 -4
- package/dist/main.cjs.map +1 -1
- package/package.json +2 -2
package/dist/browser/index.js
CHANGED
|
@@ -36663,8 +36663,11 @@ var PinShapeOutputSchema = z2.object({
|
|
|
36663
36663
|
var parsePin = (pinString) => {
|
|
36664
36664
|
const parts = pinString.split("~");
|
|
36665
36665
|
const [, visibility, , pinNumber, x, y, rotation2, id] = parts;
|
|
36666
|
-
const nameMatch = pinString.match(/~(\w+)~(start|end)~/);
|
|
36667
|
-
|
|
36666
|
+
const nameMatch = pinString.match(/~([\w+-]+)~(start|end)~/);
|
|
36667
|
+
let label = nameMatch ? nameMatch[1] : "";
|
|
36668
|
+
if (label.endsWith("+")) label = label.slice(0, -1) + "_POS";
|
|
36669
|
+
if (label.endsWith("-")) label = label.slice(0, -1) + "_NEG";
|
|
36670
|
+
if (/^\+\d+(?:\.\d+)?V$/i.test(label)) label = `V${label.slice(1, -1)}`;
|
|
36668
36671
|
const colorMatch = pinString.match(/#[0-9A-F]{6}/);
|
|
36669
36672
|
const labelColor = colorMatch ? colorMatch[0] : "";
|
|
36670
36673
|
const pathMatch = pinString.match(/\^\^([^~]+)/);
|