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.
@@ -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).map((point) => point.slice(2).split(/[ ,]/).map(Number));
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),