kicadts 0.0.36 → 0.0.37

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7922,7 +7922,11 @@ var PadPrimitiveGrPoly = class _PadPrimitiveGrPoly extends SxClass {
7922
7922
  SxClass.register(PadPrimitiveGrPoly);
7923
7923
  var PadPrimitiveFill = class _PadPrimitiveFill extends SxPrimitiveBoolean {
7924
7924
  static token = "fill";
7925
- static parentToken = "gr_poly";
7925
+ // Pad primitive gr_poly shares the same token as board gr_poly, so its fill
7926
+ // class cannot also register under parentToken="gr_poly" without overriding
7927
+ // the board-level parser. PadPrimitiveGrPoly normalizes parsed fill tokens
7928
+ // into PadPrimitiveFill instances itself.
7929
+ static parentToken = "pad_primitive_gr_poly";
7926
7930
  token = "fill";
7927
7931
  constructor(options = {}) {
7928
7932
  super(options.value ?? false);
@@ -9941,7 +9945,7 @@ var FpRectFill = class _FpRectFill extends SxClass {
9941
9945
  }
9942
9946
  static fromSexprPrimitives(primitiveSexprs) {
9943
9947
  const state = toStringValue(primitiveSexprs[0]);
9944
- return new _FpRectFill(state === "yes");
9948
+ return new _FpRectFill(/^(yes|solid)$/iu.test(state ?? ""));
9945
9949
  }
9946
9950
  getString() {
9947
9951
  return `(fill ${this.filled ? "yes" : "no"})`;
@@ -10224,7 +10228,7 @@ var FpCircleFill = class _FpCircleFill extends SxClass {
10224
10228
  }
10225
10229
  static fromSexprPrimitives(primitiveSexprs) {
10226
10230
  const state = toStringValue(primitiveSexprs[0]);
10227
- return new _FpCircleFill(state === "yes");
10231
+ return new _FpCircleFill(/^(yes|solid)$/iu.test(state ?? ""));
10228
10232
  }
10229
10233
  getString() {
10230
10234
  return `(fill ${this.filled ? "yes" : "no"})`;
@@ -14937,7 +14941,7 @@ var GrRectFill = class _GrRectFill extends SxClass {
14937
14941
  }
14938
14942
  static fromSexprPrimitives(primitiveSexprs) {
14939
14943
  const state = toStringValue(primitiveSexprs[0]);
14940
- return new _GrRectFill(state === "yes");
14944
+ return new _GrRectFill(/^(yes|solid)$/iu.test(state ?? ""));
14941
14945
  }
14942
14946
  getString() {
14943
14947
  return `(fill ${this.filled ? "yes" : "no"})`;
@@ -15319,7 +15323,7 @@ var GrPolyFill = class _GrPolyFill extends SxClass {
15319
15323
  }
15320
15324
  static fromSexprPrimitives(primitiveSexprs) {
15321
15325
  const state = toStringValue(primitiveSexprs[0]);
15322
- return new _GrPolyFill(state === "yes");
15326
+ return new _GrPolyFill(/^(yes|solid)$/iu.test(state ?? ""));
15323
15327
  }
15324
15328
  getString() {
15325
15329
  return `(fill ${this.filled ? "yes" : "no"})`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kicadts",
3
3
  "main": "dist/index.js",
4
- "version": "0.0.36",
4
+ "version": "0.0.37",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",