easyeda 0.0.19 → 0.0.20
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 +5 -2
- package/dist/cli/main.cjs.map +1 -1
- package/dist/lib/index.cjs +4 -1
- package/dist/lib/index.cjs.map +1 -1
- package/package.json +1 -1
package/dist/lib/index.cjs
CHANGED
|
@@ -28870,7 +28870,10 @@ var ShapeItemSchema = import_zod.z.object({
|
|
|
28870
28870
|
}
|
|
28871
28871
|
case "SOLIDREGION": {
|
|
28872
28872
|
const [layermask, , pathData, fillStyle, id] = shape.data.split("~");
|
|
28873
|
-
const points = pathData.match(/[ML] ?([\d.]+[ ,][\d.]+)/g)
|
|
28873
|
+
const points = pathData.match(/[ML] ?(-?[\d.]+)[ ,](-?[\d.]+)/g)?.map((point) => {
|
|
28874
|
+
const [, x, y] = point.match(/[ML]? ?(-?[\d.]+)[ ,](-?[\d.]+)/) || [];
|
|
28875
|
+
return [Number(x), Number(y)];
|
|
28876
|
+
}) || [];
|
|
28874
28877
|
return SolidRegionSchema.parse({
|
|
28875
28878
|
type: "SOLIDREGION",
|
|
28876
28879
|
layermask: Number(layermask),
|