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 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).map((point) => point.slice(2).split(/[ ,]/).map(Number));
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.18",
29179
+ version: "0.0.19",
29177
29180
  files: ["dist"],
29178
29181
  repository: {
29179
29182
  type: "git",