kicadts 0.0.24 → 0.0.25

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/index.d.ts CHANGED
@@ -5189,6 +5189,7 @@ interface KicadPcbConstructorParams {
5189
5189
  graphicRects?: GrRect[];
5190
5190
  vias?: Via[];
5191
5191
  zones?: Zone[];
5192
+ embeddedFonts?: EmbeddedFonts;
5192
5193
  otherChildren?: SxClass[];
5193
5194
  }
5194
5195
  declare class KicadPcb extends SxClass {
@@ -5213,6 +5214,7 @@ declare class KicadPcb extends SxClass {
5213
5214
  private _grRects;
5214
5215
  private _vias;
5215
5216
  private _zones;
5217
+ private _sxEmbeddedFonts?;
5216
5218
  private _otherChildren;
5217
5219
  constructor(params?: KicadPcbConstructorParams);
5218
5220
  static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): KicadPcb;
@@ -5255,6 +5257,8 @@ declare class KicadPcb extends SxClass {
5255
5257
  set vias(value: Via[]);
5256
5258
  get zones(): Zone[];
5257
5259
  set zones(value: Zone[]);
5260
+ get embeddedFonts(): EmbeddedFonts | undefined;
5261
+ set embeddedFonts(value: EmbeddedFonts | undefined);
5258
5262
  get otherChildren(): SxClass[];
5259
5263
  set otherChildren(value: SxClass[]);
5260
5264
  getChildren(): SxClass[];
package/dist/index.js CHANGED
@@ -799,7 +799,7 @@ var TextEffects = class _TextEffects extends SxClass {
799
799
  const effects = new _TextEffects();
800
800
  const { propertyMap } = SxClass.parsePrimitivesToClassProperties(
801
801
  primitiveSexprs,
802
- this.token
802
+ _TextEffects.token
803
803
  );
804
804
  effects._sxFont = propertyMap.font;
805
805
  effects._sxJustify = propertyMap.justify;
@@ -906,7 +906,7 @@ var TextEffectsFont = class _TextEffectsFont extends SxClass {
906
906
  const font = new _TextEffectsFont();
907
907
  const { propertyMap } = SxClass.parsePrimitivesToClassProperties(
908
908
  primitiveSexprs,
909
- this.token
909
+ _TextEffectsFont.token
910
910
  );
911
911
  font._sxFace = propertyMap.face;
912
912
  font._sxSize = propertyMap.size;
@@ -1026,7 +1026,7 @@ var TextEffectsFontBold = class extends SxPrimitiveBoolean {
1026
1026
  super(value ?? true);
1027
1027
  }
1028
1028
  getString() {
1029
- return this.value ? "bold" : "";
1029
+ return `(bold ${this.value ? "yes" : "no"})`;
1030
1030
  }
1031
1031
  };
1032
1032
  SxClass.register(TextEffectsFontBold);
@@ -1038,7 +1038,7 @@ var TextEffectsFontItalic = class extends SxPrimitiveBoolean {
1038
1038
  super(value ?? true);
1039
1039
  }
1040
1040
  getString() {
1041
- return this.value ? "italic" : "";
1041
+ return `(italic ${this.value ? "yes" : "no"})`;
1042
1042
  }
1043
1043
  };
1044
1044
  SxClass.register(TextEffectsFontItalic);
@@ -16306,6 +16306,7 @@ var KicadPcb = class _KicadPcb extends SxClass {
16306
16306
  _grRects = [];
16307
16307
  _vias = [];
16308
16308
  _zones = [];
16309
+ _sxEmbeddedFonts;
16309
16310
  _otherChildren = [];
16310
16311
  constructor(params = {}) {
16311
16312
  super();
@@ -16333,6 +16334,8 @@ var KicadPcb = class _KicadPcb extends SxClass {
16333
16334
  this.graphicRects = params.graphicRects;
16334
16335
  if (params.vias !== void 0) this.vias = params.vias;
16335
16336
  if (params.zones !== void 0) this.zones = params.zones;
16337
+ if (params.embeddedFonts !== void 0)
16338
+ this.embeddedFonts = params.embeddedFonts;
16336
16339
  if (params.otherChildren !== void 0)
16337
16340
  this.otherChildren = params.otherChildren;
16338
16341
  }
@@ -16345,7 +16348,7 @@ var KicadPcb = class _KicadPcb extends SxClass {
16345
16348
  );
16346
16349
  }
16347
16350
  const parsed = SxClass.parsePrimitiveSexpr(primitive, {
16348
- parentToken: this.token
16351
+ parentToken: _KicadPcb.token
16349
16352
  });
16350
16353
  if (!(parsed instanceof SxClass)) {
16351
16354
  throw new Error(
@@ -16433,6 +16436,10 @@ var KicadPcb = class _KicadPcb extends SxClass {
16433
16436
  this._zones.push(child);
16434
16437
  return;
16435
16438
  }
16439
+ if (child instanceof EmbeddedFonts) {
16440
+ this._sxEmbeddedFonts = child;
16441
+ return;
16442
+ }
16436
16443
  this._otherChildren.push(child);
16437
16444
  }
16438
16445
  get version() {
@@ -16549,6 +16556,12 @@ var KicadPcb = class _KicadPcb extends SxClass {
16549
16556
  set zones(value) {
16550
16557
  this._zones = [...value];
16551
16558
  }
16559
+ get embeddedFonts() {
16560
+ return this._sxEmbeddedFonts;
16561
+ }
16562
+ set embeddedFonts(value) {
16563
+ this._sxEmbeddedFonts = value;
16564
+ }
16552
16565
  get otherChildren() {
16553
16566
  return [...this._otherChildren];
16554
16567
  }
@@ -16576,6 +16589,7 @@ var KicadPcb = class _KicadPcb extends SxClass {
16576
16589
  children.push(...this._grRects);
16577
16590
  children.push(...this._vias);
16578
16591
  children.push(...this._zones);
16592
+ if (this._sxEmbeddedFonts) children.push(this._sxEmbeddedFonts);
16579
16593
  children.push(...this._otherChildren);
16580
16594
  return children;
16581
16595
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kicadts",
3
3
  "main": "dist/index.js",
4
- "version": "0.0.24",
4
+ "version": "0.0.25",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",