easyeda 0.0.19 → 0.0.21
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/cli/main.cjs +15 -10
- package/dist/cli/main.cjs.map +1 -1
- package/dist/lib/index.cjs +18 -11
- package/dist/lib/index.cjs.map +1 -1
- package/dist/lib/index.d.cts +3 -1
- package/package.json +1 -1
package/dist/cli/main.cjs
CHANGED
|
@@ -28913,7 +28913,10 @@ var ShapeItemSchema = import_zod.z.object({
|
|
|
28913
28913
|
}
|
|
28914
28914
|
case "SOLIDREGION": {
|
|
28915
28915
|
const [layermask, , pathData, fillStyle, id] = shape.data.split("~");
|
|
28916
|
-
const points = pathData.match(/[ML] ?([\d.]+[ ,][\d.]+)/g)
|
|
28916
|
+
const points = pathData.match(/[ML] ?(-?[\d.]+)[ ,](-?[\d.]+)/g)?.map((point) => {
|
|
28917
|
+
const [, x, y] = point.match(/[ML]? ?(-?[\d.]+)[ ,](-?[\d.]+)/) || [];
|
|
28918
|
+
return [Number(x), Number(y)];
|
|
28919
|
+
}) || [];
|
|
28917
28920
|
return SolidRegionSchema.parse({
|
|
28918
28921
|
type: "SOLIDREGION",
|
|
28919
28922
|
layermask: Number(layermask),
|
|
@@ -29173,7 +29176,7 @@ var import_promises = __toESM(require("fs/promises"), 1);
|
|
|
29173
29176
|
var package_default = {
|
|
29174
29177
|
name: "easyeda",
|
|
29175
29178
|
type: "module",
|
|
29176
|
-
version: "0.0.
|
|
29179
|
+
version: "0.0.19",
|
|
29177
29180
|
files: ["dist"],
|
|
29178
29181
|
repository: {
|
|
29179
29182
|
type: "git",
|
|
@@ -29592,6 +29595,16 @@ export const use${componentName} = createUseComponent(${componentName}, pinNames
|
|
|
29592
29595
|
`.trim();
|
|
29593
29596
|
};
|
|
29594
29597
|
|
|
29598
|
+
// lib/utils/normalize-manufacturer-part-number.ts
|
|
29599
|
+
function normalizeManufacturerPartNumber(partNumber) {
|
|
29600
|
+
let normalized = partNumber.replace(/-/g, "_");
|
|
29601
|
+
normalized = normalized.replace(/[^a-zA-Z0-9_$]/g, "");
|
|
29602
|
+
if (/^\d/.test(normalized)) {
|
|
29603
|
+
normalized = "A" + normalized;
|
|
29604
|
+
}
|
|
29605
|
+
return normalized;
|
|
29606
|
+
}
|
|
29607
|
+
|
|
29595
29608
|
// lib/convert-to-typescript-component/index.tsx
|
|
29596
29609
|
var convertRawEasyEdaToTs = (rawEasy) => {
|
|
29597
29610
|
const easyeda = EasyEdaJsonSchema.parse(rawEasy);
|
|
@@ -29639,14 +29652,6 @@ var convertToTypescriptComponent = ({
|
|
|
29639
29652
|
easyEdaJson
|
|
29640
29653
|
});
|
|
29641
29654
|
};
|
|
29642
|
-
function normalizeManufacturerPartNumber(partNumber) {
|
|
29643
|
-
let normalized = partNumber.replace(/-/g, "_");
|
|
29644
|
-
normalized = normalized.replace(/[^a-zA-Z0-9_$]/g, "");
|
|
29645
|
-
if (/^\d/.test(normalized)) {
|
|
29646
|
-
normalized = "A" + normalized;
|
|
29647
|
-
}
|
|
29648
|
-
return normalized;
|
|
29649
|
-
}
|
|
29650
29655
|
|
|
29651
29656
|
// cli/main.ts
|
|
29652
29657
|
var path = __toESM(require("path"), 1);
|