kicadts 0.0.22 → 0.0.24

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
@@ -601,6 +601,21 @@ declare class KicadSchGeneratorVersion extends SxPrimitiveString {
601
601
  getString(): string;
602
602
  }
603
603
 
604
+ declare class KicadSymbolLibGenerator extends SxPrimitiveString {
605
+ static token: string;
606
+ static parentToken: string;
607
+ token: string;
608
+ static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): KicadSymbolLibGenerator;
609
+ getString(): string;
610
+ }
611
+
612
+ declare class KicadSymbolLibVersion extends SxPrimitiveNumber {
613
+ static token: string;
614
+ static parentToken: string;
615
+ token: string;
616
+ static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): KicadSymbolLibVersion;
617
+ }
618
+
604
619
  declare class Dnp extends SxPrimitiveBoolean {
605
620
  static token: string;
606
621
  token: string;
@@ -1131,6 +1146,28 @@ declare class SymbolInstanceUnit extends SxPrimitiveNumber {
1131
1146
  token: string;
1132
1147
  }
1133
1148
 
1149
+ interface KicadSymbolLibConstructorParams {
1150
+ version?: number | KicadSymbolLibVersion;
1151
+ generator?: string | KicadSymbolLibGenerator;
1152
+ symbols?: SchematicSymbol[];
1153
+ }
1154
+ declare class KicadSymbolLib extends SxClass {
1155
+ static token: string;
1156
+ token: string;
1157
+ private _sxVersion?;
1158
+ private _sxGenerator?;
1159
+ private _symbols;
1160
+ constructor(params?: KicadSymbolLibConstructorParams);
1161
+ static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): KicadSymbolLib;
1162
+ get version(): number | undefined;
1163
+ set version(value: number | undefined);
1164
+ get generator(): string | undefined;
1165
+ set generator(value: string | undefined);
1166
+ get symbols(): SchematicSymbol[];
1167
+ set symbols(value: SchematicSymbol[]);
1168
+ getChildren(): SxClass[];
1169
+ }
1170
+
1134
1171
  declare class LibSymbols extends SxClass {
1135
1172
  static token: string;
1136
1173
  static parentToken: string;
@@ -1795,6 +1832,26 @@ declare class FootprintAttr extends SxClass {
1795
1832
  getString(): string;
1796
1833
  }
1797
1834
 
1835
+ declare class FootprintVersion extends SxPrimitiveNumber {
1836
+ static token: string;
1837
+ static parentToken: string;
1838
+ token: string;
1839
+ }
1840
+
1841
+ declare class FootprintGenerator extends SxPrimitiveString {
1842
+ static token: string;
1843
+ static parentToken: string;
1844
+ token: string;
1845
+ getString(): string;
1846
+ }
1847
+
1848
+ declare class FootprintGeneratorVersion extends SxPrimitiveString {
1849
+ static token: string;
1850
+ static parentToken: string;
1851
+ token: string;
1852
+ getString(): string;
1853
+ }
1854
+
1798
1855
  declare class FootprintAutoplaceCost180 extends SxPrimitiveNumber {
1799
1856
  static token: string;
1800
1857
  static parentToken: string;
@@ -3220,6 +3277,9 @@ declare class FootprintPlaced extends SxPrimitiveBoolean {
3220
3277
 
3221
3278
  interface FootprintConstructorParams {
3222
3279
  libraryLink?: string;
3280
+ version?: number | FootprintVersion;
3281
+ generator?: string | FootprintGenerator;
3282
+ generatorVersion?: string | FootprintGeneratorVersion;
3223
3283
  locked?: boolean;
3224
3284
  placed?: boolean;
3225
3285
  layer?: Layer | string | string[];
@@ -3259,6 +3319,9 @@ declare class Footprint extends SxClass {
3259
3319
  static token: string;
3260
3320
  token: string;
3261
3321
  private _libraryLink?;
3322
+ private _sxVersion?;
3323
+ private _sxGenerator?;
3324
+ private _sxGeneratorVersion?;
3262
3325
  private _sxLocked?;
3263
3326
  private _sxPlaced?;
3264
3327
  private _sxLayer?;
@@ -3299,6 +3362,12 @@ declare class Footprint extends SxClass {
3299
3362
  static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): Footprint;
3300
3363
  get libraryLink(): string | undefined;
3301
3364
  set libraryLink(value: string | undefined);
3365
+ get version(): number | undefined;
3366
+ set version(value: number | FootprintVersion | undefined);
3367
+ get generator(): string | undefined;
3368
+ set generator(value: string | FootprintGenerator | undefined);
3369
+ get generatorVersion(): string | undefined;
3370
+ set generatorVersion(value: string | FootprintGeneratorVersion | undefined);
3302
3371
  get locked(): boolean;
3303
3372
  set locked(value: FootprintLocked | boolean | undefined);
3304
3373
  get placed(): boolean;
@@ -5196,4 +5265,4 @@ declare const parseKicadSch: (sexpr: string) => KicadSch;
5196
5265
  declare const parseKicadPcb: (sexpr: string) => KicadPcb;
5197
5266
  declare const parseKicadMod: (sexpr: string) => Footprint;
5198
5267
 
5199
- export { At, type AtInput, Bus, type BusConstructorParams, BusEntry, type BusEntryConstructorParams, BusEntrySize, Color, Dnp, EmbeddedFonts, ExcludeFromSim, FieldsAutoplaced, Footprint, FootprintAttr, FootprintAutoplaceCost180, FootprintAutoplaceCost90, FootprintClearance, type FootprintConstructorParams, FootprintDescr, FootprintLocked, FootprintModel, FootprintNetTiePadGroups, FootprintPad, type FootprintPadConstructorParams, FootprintPath, FootprintPlaced, FootprintPrivateLayers, FootprintSheetfile, FootprintSheetname, FootprintSolderMaskMargin, FootprintSolderPasteMargin, FootprintSolderPasteRatio, FootprintTags, FootprintTedit, FootprintThermalGap, FootprintThermalWidth, FootprintZoneConnect, FpArc, type FpArcConstructorParams, FpArcEnd, FpArcMid, FpArcStart, FpCircle, FpCircleCenter, type FpCircleConstructorParams, FpCircleEnd, FpCircleFill, FpLine, type FpLineConstructorParams, FpLineEnd, FpLineStart, FpPoly, type FpPolyConstructorParams, FpPolyFill, FpPolyLocked, FpRect, type FpRectConstructorParams, FpRectEnd, FpRectFill, FpRectStart, FpText, FpTextBox, FpTextBoxAngle, type FpTextBoxConstructorParams, FpTextBoxEnd, FpTextBoxStart, type FpTextConstructorParams, type FpTextType, GlobalLabel, type GlobalLabelConstructorParams, type GlobalLabelShape, GrArc, type GrArcConstructorParams, GrArcEnd, GrArcMid, type GrArcPoint, GrArcStart, GrCircle, GrCircleCenter, type GrCircleConstructorParams, GrCircleEnd, GrCircleLocked, type GrCirclePoint, GrCurve, type GrCurveConstructorParams, GrLine, GrLineAngle, type GrLineConstructorParams, GrLineEnd, GrLineLocked, type GrLinePoint, GrLineStart, GrPoly, type GrPolyConstructorParams, GrPolyFill, GrRect, type GrRectConstructorParams, GrRectEnd, GrRectFill, GrRectLocked, GrRectStart, GrText, type GrTextConstructorParams, type GrTextPosition, GrTextRenderCache, GrTextRenderCachePolygon, Group, type GroupConstructorParams, GroupLocked, GroupMembers, Image, type ImageConstructorParams, ImageData, ImageScale, InBom, Junction, type JunctionConstructorParams, JunctionDiameter, KicadPcb, type KicadPcbConstructorParams, KicadSch, type KicadSchConstructorParams, KicadSchGenerator, KicadSchGeneratorVersion, KicadSchVersion, Label, type LabelConstructorParams, Layer, Layers, LibSymbols, Mirror, type ModelVector, NoConnect, type NoConnectConstructorParams, OnBoard, PadChamfer, PadChamferRatio, PadClearance, PadDieLength, PadDrill, PadDrillOffset, PadLayers, type PadLayersInput, PadNet, PadOptions, type PadOptionsAnchorShape, type PadOptionsClearanceType, PadPinFunction, PadPinType, PadPrimitiveGrArc, type PadPrimitiveGrArcConstructorParams, PadPrimitiveGrCircle, type PadPrimitiveGrCircleConstructorParams, PadPrimitiveGrCircleFill, PadPrimitiveGrLine, PadPrimitiveGrPoly, PadPrimitives, PadRectDelta, PadRoundrectRratio, PadSize, type PadSizeInput, PadSolderMaskMargin, PadSolderPasteMargin, PadSolderPasteMarginRatio, PadTeardrops, PadThermalBridgeAngle, PadThermalGap, PadThermalWidth, PadZoneConnect, Paper, PcbGeneral, PcbGeneralLegacyTeardrops, PcbGeneralThickness, PcbGenerator, PcbGeneratorVersion, PcbLayerDefinition, PcbLayers, PcbNet, PcbPlotParams, PcbVersion, PlotParamCreateGerberJobFile, PlotParamCrossoutDnpOnFab, PlotParamDashedLineDashRatio, PlotParamDashedLineGapRatio, PlotParamDisableApertMacros, PlotParamDrillShape, PlotParamDxfImperialUnits, PlotParamDxfPolygonMode, PlotParamDxfUsePcbnewFont, PlotParamExcludeEdgeLayer, PlotParamHideDnpOnFab, PlotParamHpglPenDiameter, PlotParamHpglPenNumber, PlotParamHpglPenOverlay, PlotParamHpglPenSpeed, PlotParamLayerSelection, PlotParamLineWidth, PlotParamMirror, PlotParamMode, PlotParamOutputDirectory, PlotParamOutputFormat, PlotParamPadOnSilk, PlotParamPdfBackFpPropertyPopups, PlotParamPdfFrontFpPropertyPopups, PlotParamPdfMetadata, PlotParamPdfSingleDocument, PlotParamPlotBlackAndWhite, PlotParamPlotFrameRef, PlotParamPlotInvisible, PlotParamPlotInvisibleText, PlotParamPlotOnAllLayers, PlotParamPlotOnAllLayersSelection, PlotParamPlotOtherText, PlotParamPlotPadNumbers, PlotParamPlotReference, PlotParamPlotValue, PlotParamProperty, PlotParamPsA4Output, PlotParamPsNegative, PlotParamScaleSelection, PlotParamSketchDnpOnFab, PlotParamSketchPadsOnFab, PlotParamSubtractMaskFromSilk, PlotParamSvgPrecision, PlotParamUseAuxOrigin, PlotParamUseGerberAdvancedAttributes, PlotParamUseGerberAttributes, PlotParamUseGerberExtensions, PlotParamViaOnMask, Polyline, type PolylineConstructorParams, Property, type PropertyConstructorParams, PropertyHide, PropertyUnlocked, Pts, PtsArc, PtsArcEnd, PtsArcMid, PtsArcStart, type RGBAColor, RenderCache, SchematicPolyline, SchematicSymbol, type SchematicSymbolConstructorParams, SchematicText, type SchematicTextConstructorParams, Segment, type SegmentConstructorParams, SegmentEnd, SegmentLocked, SegmentNet, SegmentStart, Setup, SetupAllowSoldermaskBridgesInFootprints, SetupAuxAxisOrigin, SetupEdgeWidth, SetupGridOrigin, SetupLastTraceWidth, SetupModEdgeWidth, SetupModTextSize, SetupModTextWidth, SetupPadDrill, SetupPadSize, SetupPadToMaskClearance, SetupPadToPasteClearance, SetupPadToPasteClearanceRatio, SetupPadToPasteClearanceValues, SetupPcbTextSize, SetupPcbTextWidth, type SetupProperty, type SetupPropertyValues, SetupSegmentWidth, SetupSolderMaskMinWidth, SetupTenting, SetupTraceClearance, SetupTraceMin, SetupTraceWidth, SetupUviaDrill, SetupUviaMinDrill, SetupUviaMinSize, SetupUviaSize, SetupUviasAllowed, SetupViaDrill, SetupViaMinDrill, SetupViaMinSize, SetupViaSize, SetupVisibleElements, SetupZone45Only, SetupZoneClearance, Sheet, type SheetConstructorParams, SheetFill, SheetInstancePage, SheetInstancePath, SheetInstances, SheetInstancesForSheet, SheetInstancesProject, SheetInstancesRoot, SheetInstancesRootPage, SheetInstancesRootPath, SheetPin, type SheetPinElectricalType, SheetProperty, SheetSize, Stackup, StackupCastellatedPads, StackupCopperFinish, StackupDielectricConstraints, StackupEdgeConnector, StackupEdgePlating, StackupLayer, StackupLayerColor, StackupLayerEpsilonR, StackupLayerLossTangent, StackupLayerMaterial, StackupLayerThickness, StackupLayerType, type StandardPaperSize, Stroke, type StrokeProperty, StrokeType, type StrokeTypeString, SxClass, SymbolArc, SymbolArcEnd, SymbolArcFill, SymbolArcMid, SymbolArcStart, SymbolCircle, SymbolCircleCenter, SymbolCircleFill, SymbolCircleRadius, SymbolDuplicatePinNumbersAreJumpers, SymbolFillType, SymbolInstancePath, SymbolInstanceReference, SymbolInstanceUnit, SymbolInstances, SymbolInstancesProject, SymbolLibId, SymbolPin, SymbolPinLength, SymbolPinName, SymbolPinNames, SymbolPinNamesHide, SymbolPinNamesOffset, SymbolPinNumber, SymbolPinNumbers, SymbolPinNumbersHide, SymbolPolyline, SymbolPolylineFill, type SymbolPolylineFillLike, SymbolPower, SymbolProperty, SymbolPropertyId, SymbolRectangle, SymbolRectangleEnd, SymbolRectangleFill, SymbolRectangleStart, SymbolText, SymbolUnit, TextEffects, type TextEffectsConstructorParams, TextEffectsFont, TextEffectsFontBold, TextEffectsFontFace, TextEffectsFontItalic, TextEffectsFontLineSpacing, type TextEffectsFontProperty, TextEffectsFontSize, TextEffectsFontThickness, TextEffectsJustify, type TextEffectsProperty, TitleBlock, TitleBlockComment, TitleBlockCompany, type TitleBlockConstructorParams, TitleBlockDate, TitleBlockRevision, TitleBlockTitle, Tstamp, Unit, type UnitString, Uuid, Via, type ViaConstructorParams, ViaNet, Width, Wire, type WireConstructorParams, Xy, Zone, parseKicadMod, parseKicadPcb, parseKicadSch, parseKicadSexpr };
5268
+ export { At, type AtInput, Bus, type BusConstructorParams, BusEntry, type BusEntryConstructorParams, BusEntrySize, Color, Dnp, EmbeddedFonts, ExcludeFromSim, FieldsAutoplaced, Footprint, FootprintAttr, FootprintAutoplaceCost180, FootprintAutoplaceCost90, FootprintClearance, type FootprintConstructorParams, FootprintDescr, FootprintGenerator, FootprintGeneratorVersion, FootprintLocked, FootprintModel, FootprintNetTiePadGroups, FootprintPad, type FootprintPadConstructorParams, FootprintPath, FootprintPlaced, FootprintPrivateLayers, FootprintSheetfile, FootprintSheetname, FootprintSolderMaskMargin, FootprintSolderPasteMargin, FootprintSolderPasteRatio, FootprintTags, FootprintTedit, FootprintThermalGap, FootprintThermalWidth, FootprintVersion, FootprintZoneConnect, FpArc, type FpArcConstructorParams, FpArcEnd, FpArcMid, FpArcStart, FpCircle, FpCircleCenter, type FpCircleConstructorParams, FpCircleEnd, FpCircleFill, FpLine, type FpLineConstructorParams, FpLineEnd, FpLineStart, FpPoly, type FpPolyConstructorParams, FpPolyFill, FpPolyLocked, FpRect, type FpRectConstructorParams, FpRectEnd, FpRectFill, FpRectStart, FpText, FpTextBox, FpTextBoxAngle, type FpTextBoxConstructorParams, FpTextBoxEnd, FpTextBoxStart, type FpTextConstructorParams, type FpTextType, GlobalLabel, type GlobalLabelConstructorParams, type GlobalLabelShape, GrArc, type GrArcConstructorParams, GrArcEnd, GrArcMid, type GrArcPoint, GrArcStart, GrCircle, GrCircleCenter, type GrCircleConstructorParams, GrCircleEnd, GrCircleLocked, type GrCirclePoint, GrCurve, type GrCurveConstructorParams, GrLine, GrLineAngle, type GrLineConstructorParams, GrLineEnd, GrLineLocked, type GrLinePoint, GrLineStart, GrPoly, type GrPolyConstructorParams, GrPolyFill, GrRect, type GrRectConstructorParams, GrRectEnd, GrRectFill, GrRectLocked, GrRectStart, GrText, type GrTextConstructorParams, type GrTextPosition, GrTextRenderCache, GrTextRenderCachePolygon, Group, type GroupConstructorParams, GroupLocked, GroupMembers, Image, type ImageConstructorParams, ImageData, ImageScale, InBom, Junction, type JunctionConstructorParams, JunctionDiameter, KicadPcb, type KicadPcbConstructorParams, KicadSch, type KicadSchConstructorParams, KicadSchGenerator, KicadSchGeneratorVersion, KicadSchVersion, KicadSymbolLib, type KicadSymbolLibConstructorParams, KicadSymbolLibGenerator, KicadSymbolLibVersion, Label, type LabelConstructorParams, Layer, Layers, LibSymbols, Mirror, type ModelVector, NoConnect, type NoConnectConstructorParams, OnBoard, PadChamfer, PadChamferRatio, PadClearance, PadDieLength, PadDrill, PadDrillOffset, PadLayers, type PadLayersInput, PadNet, PadOptions, type PadOptionsAnchorShape, type PadOptionsClearanceType, PadPinFunction, PadPinType, PadPrimitiveGrArc, type PadPrimitiveGrArcConstructorParams, PadPrimitiveGrCircle, type PadPrimitiveGrCircleConstructorParams, PadPrimitiveGrCircleFill, PadPrimitiveGrLine, PadPrimitiveGrPoly, PadPrimitives, PadRectDelta, PadRoundrectRratio, PadSize, type PadSizeInput, PadSolderMaskMargin, PadSolderPasteMargin, PadSolderPasteMarginRatio, PadTeardrops, PadThermalBridgeAngle, PadThermalGap, PadThermalWidth, PadZoneConnect, Paper, PcbGeneral, PcbGeneralLegacyTeardrops, PcbGeneralThickness, PcbGenerator, PcbGeneratorVersion, PcbLayerDefinition, PcbLayers, PcbNet, PcbPlotParams, PcbVersion, PlotParamCreateGerberJobFile, PlotParamCrossoutDnpOnFab, PlotParamDashedLineDashRatio, PlotParamDashedLineGapRatio, PlotParamDisableApertMacros, PlotParamDrillShape, PlotParamDxfImperialUnits, PlotParamDxfPolygonMode, PlotParamDxfUsePcbnewFont, PlotParamExcludeEdgeLayer, PlotParamHideDnpOnFab, PlotParamHpglPenDiameter, PlotParamHpglPenNumber, PlotParamHpglPenOverlay, PlotParamHpglPenSpeed, PlotParamLayerSelection, PlotParamLineWidth, PlotParamMirror, PlotParamMode, PlotParamOutputDirectory, PlotParamOutputFormat, PlotParamPadOnSilk, PlotParamPdfBackFpPropertyPopups, PlotParamPdfFrontFpPropertyPopups, PlotParamPdfMetadata, PlotParamPdfSingleDocument, PlotParamPlotBlackAndWhite, PlotParamPlotFrameRef, PlotParamPlotInvisible, PlotParamPlotInvisibleText, PlotParamPlotOnAllLayers, PlotParamPlotOnAllLayersSelection, PlotParamPlotOtherText, PlotParamPlotPadNumbers, PlotParamPlotReference, PlotParamPlotValue, PlotParamProperty, PlotParamPsA4Output, PlotParamPsNegative, PlotParamScaleSelection, PlotParamSketchDnpOnFab, PlotParamSketchPadsOnFab, PlotParamSubtractMaskFromSilk, PlotParamSvgPrecision, PlotParamUseAuxOrigin, PlotParamUseGerberAdvancedAttributes, PlotParamUseGerberAttributes, PlotParamUseGerberExtensions, PlotParamViaOnMask, Polyline, type PolylineConstructorParams, Property, type PropertyConstructorParams, PropertyHide, PropertyUnlocked, Pts, PtsArc, PtsArcEnd, PtsArcMid, PtsArcStart, type RGBAColor, RenderCache, SchematicPolyline, SchematicSymbol, type SchematicSymbolConstructorParams, SchematicText, type SchematicTextConstructorParams, Segment, type SegmentConstructorParams, SegmentEnd, SegmentLocked, SegmentNet, SegmentStart, Setup, SetupAllowSoldermaskBridgesInFootprints, SetupAuxAxisOrigin, SetupEdgeWidth, SetupGridOrigin, SetupLastTraceWidth, SetupModEdgeWidth, SetupModTextSize, SetupModTextWidth, SetupPadDrill, SetupPadSize, SetupPadToMaskClearance, SetupPadToPasteClearance, SetupPadToPasteClearanceRatio, SetupPadToPasteClearanceValues, SetupPcbTextSize, SetupPcbTextWidth, type SetupProperty, type SetupPropertyValues, SetupSegmentWidth, SetupSolderMaskMinWidth, SetupTenting, SetupTraceClearance, SetupTraceMin, SetupTraceWidth, SetupUviaDrill, SetupUviaMinDrill, SetupUviaMinSize, SetupUviaSize, SetupUviasAllowed, SetupViaDrill, SetupViaMinDrill, SetupViaMinSize, SetupViaSize, SetupVisibleElements, SetupZone45Only, SetupZoneClearance, Sheet, type SheetConstructorParams, SheetFill, SheetInstancePage, SheetInstancePath, SheetInstances, SheetInstancesForSheet, SheetInstancesProject, SheetInstancesRoot, SheetInstancesRootPage, SheetInstancesRootPath, SheetPin, type SheetPinElectricalType, SheetProperty, SheetSize, Stackup, StackupCastellatedPads, StackupCopperFinish, StackupDielectricConstraints, StackupEdgeConnector, StackupEdgePlating, StackupLayer, StackupLayerColor, StackupLayerEpsilonR, StackupLayerLossTangent, StackupLayerMaterial, StackupLayerThickness, StackupLayerType, type StandardPaperSize, Stroke, type StrokeProperty, StrokeType, type StrokeTypeString, SxClass, SymbolArc, SymbolArcEnd, SymbolArcFill, SymbolArcMid, SymbolArcStart, SymbolCircle, SymbolCircleCenter, SymbolCircleFill, SymbolCircleRadius, SymbolDuplicatePinNumbersAreJumpers, SymbolFillType, SymbolInstancePath, SymbolInstanceReference, SymbolInstanceUnit, SymbolInstances, SymbolInstancesProject, SymbolLibId, SymbolPin, SymbolPinLength, SymbolPinName, SymbolPinNames, SymbolPinNamesHide, SymbolPinNamesOffset, SymbolPinNumber, SymbolPinNumbers, SymbolPinNumbersHide, SymbolPolyline, SymbolPolylineFill, type SymbolPolylineFillLike, SymbolPower, SymbolProperty, SymbolPropertyId, SymbolRectangle, SymbolRectangleEnd, SymbolRectangleFill, SymbolRectangleStart, SymbolText, SymbolUnit, TextEffects, type TextEffectsConstructorParams, TextEffectsFont, TextEffectsFontBold, TextEffectsFontFace, TextEffectsFontItalic, TextEffectsFontLineSpacing, type TextEffectsFontProperty, TextEffectsFontSize, TextEffectsFontThickness, TextEffectsJustify, type TextEffectsProperty, TitleBlock, TitleBlockComment, TitleBlockCompany, type TitleBlockConstructorParams, TitleBlockDate, TitleBlockRevision, TitleBlockTitle, Tstamp, Unit, type UnitString, Uuid, Via, type ViaConstructorParams, ViaNet, Width, Wire, type WireConstructorParams, Xy, Zone, parseKicadMod, parseKicadPcb, parseKicadSch, parseKicadSexpr };
package/dist/index.js CHANGED
@@ -200,7 +200,7 @@ var SxClass = class _SxClass {
200
200
  get [Symbol.toStringTag]() {
201
201
  return this.getString();
202
202
  }
203
- [Symbol.for("nodejs.util.inspect.custom")]() {
203
+ [/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() {
204
204
  return this.getString();
205
205
  }
206
206
  // =========================== STATIC METHODS ===========================
@@ -1984,6 +1984,42 @@ var KicadSchGeneratorVersion = class _KicadSchGeneratorVersion extends SxPrimiti
1984
1984
  };
1985
1985
  SxClass.register(KicadSchGeneratorVersion);
1986
1986
 
1987
+ // lib/sexpr/classes/KicadSymbolLibGenerator.ts
1988
+ var isSymbolToken2 = (value) => /^[A-Za-z0-9._-]+$/.test(value);
1989
+ var KicadSymbolLibGenerator = class _KicadSymbolLibGenerator extends SxPrimitiveString {
1990
+ static token = "generator";
1991
+ static parentToken = "kicad_symbol_lib";
1992
+ token = "generator";
1993
+ static fromSexprPrimitives(primitiveSexprs) {
1994
+ const [rawValue] = primitiveSexprs;
1995
+ const parsedValue = toStringValue(rawValue);
1996
+ if (parsedValue === void 0) {
1997
+ throw new Error("generator expects a string argument");
1998
+ }
1999
+ return new _KicadSymbolLibGenerator(parsedValue);
2000
+ }
2001
+ getString() {
2002
+ const serialized = isSymbolToken2(this.value) ? this.value : quoteSExprString(this.value);
2003
+ return `(generator ${serialized})`;
2004
+ }
2005
+ };
2006
+ SxClass.register(KicadSymbolLibGenerator);
2007
+
2008
+ // lib/sexpr/classes/KicadSymbolLibVersion.ts
2009
+ var KicadSymbolLibVersion = class _KicadSymbolLibVersion extends SxPrimitiveNumber {
2010
+ static token = "version";
2011
+ static parentToken = "kicad_symbol_lib";
2012
+ token = "version";
2013
+ static fromSexprPrimitives(primitiveSexprs) {
2014
+ const [value] = primitiveSexprs;
2015
+ if (typeof value !== "number") {
2016
+ throw new Error("version expects a numeric argument");
2017
+ }
2018
+ return new _KicadSymbolLibVersion(value);
2019
+ }
2020
+ };
2021
+ SxClass.register(KicadSymbolLibVersion);
2022
+
1987
2023
  // lib/sexpr/utils/indentLines.ts
1988
2024
  var indentLines = (value, indent = " ") => {
1989
2025
  return value.split("\n").map((line) => `${indent}${line}`);
@@ -3430,6 +3466,102 @@ var SymbolInstanceUnit = class extends SxPrimitiveNumber {
3430
3466
  };
3431
3467
  SxClass.register(SymbolInstanceUnit);
3432
3468
 
3469
+ // lib/sexpr/classes/KicadSymbolLib.ts
3470
+ var SINGLE_CHILD_TOKENS = /* @__PURE__ */ new Set(["version", "generator"]);
3471
+ var MULTI_CHILD_TOKENS = /* @__PURE__ */ new Set(["symbol"]);
3472
+ var SUPPORTED_CHILD_TOKENS = /* @__PURE__ */ new Set([
3473
+ ...SINGLE_CHILD_TOKENS,
3474
+ ...MULTI_CHILD_TOKENS
3475
+ ]);
3476
+ var KicadSymbolLib = class _KicadSymbolLib extends SxClass {
3477
+ static token = "kicad_symbol_lib";
3478
+ token = "kicad_symbol_lib";
3479
+ _sxVersion;
3480
+ _sxGenerator;
3481
+ _symbols = [];
3482
+ constructor(params = {}) {
3483
+ super();
3484
+ if (params.version instanceof KicadSymbolLibVersion) {
3485
+ this._sxVersion = params.version;
3486
+ } else if (params.version !== void 0) {
3487
+ this.version = params.version;
3488
+ }
3489
+ if (params.generator instanceof KicadSymbolLibGenerator) {
3490
+ this._sxGenerator = params.generator;
3491
+ } else if (params.generator !== void 0) {
3492
+ this.generator = params.generator;
3493
+ }
3494
+ if (params.symbols !== void 0) {
3495
+ this.symbols = params.symbols;
3496
+ }
3497
+ }
3498
+ static fromSexprPrimitives(primitiveSexprs) {
3499
+ for (const primitive of primitiveSexprs) {
3500
+ if (!Array.isArray(primitive)) {
3501
+ throw new Error(
3502
+ `kicad_symbol_lib encountered unexpected primitive child: ${JSON.stringify(primitive)}`
3503
+ );
3504
+ }
3505
+ if (primitive.length === 0 || typeof primitive[0] !== "string") {
3506
+ throw new Error(
3507
+ `kicad_symbol_lib encountered invalid child expression: ${JSON.stringify(primitive)}`
3508
+ );
3509
+ }
3510
+ }
3511
+ const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
3512
+ for (const token of Object.keys(propertyMap)) {
3513
+ if (!SUPPORTED_CHILD_TOKENS.has(token)) {
3514
+ throw new Error(
3515
+ `kicad_symbol_lib encountered unsupported child token "${token}"`
3516
+ );
3517
+ }
3518
+ }
3519
+ for (const [token, entries] of Object.entries(arrayPropertyMap)) {
3520
+ if (!SUPPORTED_CHILD_TOKENS.has(token)) {
3521
+ throw new Error(
3522
+ `kicad_symbol_lib encountered unsupported child token "${token}"`
3523
+ );
3524
+ }
3525
+ if (!MULTI_CHILD_TOKENS.has(token) && entries.length > 1) {
3526
+ throw new Error(
3527
+ `kicad_symbol_lib does not support repeated child token "${token}"`
3528
+ );
3529
+ }
3530
+ }
3531
+ return new _KicadSymbolLib({
3532
+ version: propertyMap.version,
3533
+ generator: propertyMap.generator,
3534
+ symbols: arrayPropertyMap.symbol ?? []
3535
+ });
3536
+ }
3537
+ get version() {
3538
+ return this._sxVersion?.value;
3539
+ }
3540
+ set version(value) {
3541
+ this._sxVersion = value === void 0 ? void 0 : new KicadSymbolLibVersion(value);
3542
+ }
3543
+ get generator() {
3544
+ return this._sxGenerator?.value;
3545
+ }
3546
+ set generator(value) {
3547
+ this._sxGenerator = value === void 0 ? void 0 : new KicadSymbolLibGenerator(value);
3548
+ }
3549
+ get symbols() {
3550
+ return [...this._symbols];
3551
+ }
3552
+ set symbols(value) {
3553
+ this._symbols = [...value];
3554
+ }
3555
+ getChildren() {
3556
+ const children = [];
3557
+ if (this._sxVersion) children.push(this._sxVersion);
3558
+ if (this._sxGenerator) children.push(this._sxGenerator);
3559
+ children.push(...this._symbols);
3560
+ return children;
3561
+ }
3562
+ };
3563
+ SxClass.register(KicadSymbolLib);
3564
+
3433
3565
  // lib/sexpr/classes/LibSymbols.ts
3434
3566
  var SUPPORTED_ARRAY_TOKENS = /* @__PURE__ */ new Set(["symbol"]);
3435
3567
  var LibSymbols = class _LibSymbols extends SxClass {
@@ -4713,11 +4845,11 @@ var SheetInstancesRootPage = class _SheetInstancesRootPage extends SxPrimitiveSt
4713
4845
  SxClass.register(SheetInstancesRootPage);
4714
4846
 
4715
4847
  // lib/sexpr/classes/SheetInstances.ts
4716
- var SUPPORTED_CHILD_TOKENS = /* @__PURE__ */ new Set(["project", "path"]);
4848
+ var SUPPORTED_CHILD_TOKENS2 = /* @__PURE__ */ new Set(["project", "path"]);
4717
4849
  var parseSheetInstancesChildren = (primitiveSexprs) => {
4718
4850
  const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, "sheet_instances");
4719
4851
  const unsupportedSingularTokens = Object.keys(propertyMap).filter(
4720
- (token) => !SUPPORTED_CHILD_TOKENS.has(token)
4852
+ (token) => !SUPPORTED_CHILD_TOKENS2.has(token)
4721
4853
  );
4722
4854
  if (unsupportedSingularTokens.length > 0) {
4723
4855
  throw new Error(
@@ -4725,7 +4857,7 @@ var parseSheetInstancesChildren = (primitiveSexprs) => {
4725
4857
  );
4726
4858
  }
4727
4859
  const unsupportedArrayTokens = Object.keys(arrayPropertyMap).filter(
4728
- (token) => !SUPPORTED_CHILD_TOKENS.has(token)
4860
+ (token) => !SUPPORTED_CHILD_TOKENS2.has(token)
4729
4861
  );
4730
4862
  if (unsupportedArrayTokens.length > 0) {
4731
4863
  throw new Error(
@@ -5306,7 +5438,7 @@ var Sheet = class _Sheet extends SxClass {
5306
5438
  SxClass.register(Sheet);
5307
5439
 
5308
5440
  // lib/sexpr/classes/KicadSch.ts
5309
- var SINGLE_CHILD_TOKENS = /* @__PURE__ */ new Set([
5441
+ var SINGLE_CHILD_TOKENS2 = /* @__PURE__ */ new Set([
5310
5442
  "version",
5311
5443
  "generator",
5312
5444
  "generator_version",
@@ -5316,7 +5448,7 @@ var SINGLE_CHILD_TOKENS = /* @__PURE__ */ new Set([
5316
5448
  "lib_symbols",
5317
5449
  "embedded_fonts"
5318
5450
  ]);
5319
- var MULTI_CHILD_TOKENS = /* @__PURE__ */ new Set([
5451
+ var MULTI_CHILD_TOKENS2 = /* @__PURE__ */ new Set([
5320
5452
  "property",
5321
5453
  "image",
5322
5454
  "sheet",
@@ -5330,9 +5462,9 @@ var MULTI_CHILD_TOKENS = /* @__PURE__ */ new Set([
5330
5462
  "sheet_instances",
5331
5463
  "polyline"
5332
5464
  ]);
5333
- var SUPPORTED_CHILD_TOKENS2 = /* @__PURE__ */ new Set([
5334
- ...SINGLE_CHILD_TOKENS,
5335
- ...MULTI_CHILD_TOKENS
5465
+ var SUPPORTED_CHILD_TOKENS3 = /* @__PURE__ */ new Set([
5466
+ ...SINGLE_CHILD_TOKENS2,
5467
+ ...MULTI_CHILD_TOKENS2
5336
5468
  ]);
5337
5469
  var KicadSch = class _KicadSch extends SxClass {
5338
5470
  static token = "kicad_sch";
@@ -5441,19 +5573,19 @@ var KicadSch = class _KicadSch extends SxClass {
5441
5573
  }
5442
5574
  const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
5443
5575
  for (const token of Object.keys(propertyMap)) {
5444
- if (!SUPPORTED_CHILD_TOKENS2.has(token)) {
5576
+ if (!SUPPORTED_CHILD_TOKENS3.has(token)) {
5445
5577
  throw new Error(
5446
5578
  `kicad_sch encountered unsupported child token "${token}"`
5447
5579
  );
5448
5580
  }
5449
5581
  }
5450
5582
  for (const [token, entries] of Object.entries(arrayPropertyMap)) {
5451
- if (!SUPPORTED_CHILD_TOKENS2.has(token)) {
5583
+ if (!SUPPORTED_CHILD_TOKENS3.has(token)) {
5452
5584
  throw new Error(
5453
5585
  `kicad_sch encountered unsupported child token "${token}"`
5454
5586
  );
5455
5587
  }
5456
- if (!MULTI_CHILD_TOKENS.has(token) && entries.length > 1) {
5588
+ if (!MULTI_CHILD_TOKENS2.has(token) && entries.length > 1) {
5457
5589
  throw new Error(
5458
5590
  `kicad_sch does not support repeated child token "${token}"`
5459
5591
  );
@@ -5736,6 +5868,38 @@ var FootprintAttr = class _FootprintAttr extends SxClass {
5736
5868
  };
5737
5869
  SxClass.register(FootprintAttr);
5738
5870
 
5871
+ // lib/sexpr/classes/FootprintVersion.ts
5872
+ var FootprintVersion = class extends SxPrimitiveNumber {
5873
+ static token = "version";
5874
+ static parentToken = "footprint";
5875
+ token = "version";
5876
+ };
5877
+ SxClass.register(FootprintVersion);
5878
+
5879
+ // lib/sexpr/classes/FootprintGenerator.ts
5880
+ var isSymbol = (value) => /^[A-Za-z0-9._-]+$/.test(value);
5881
+ var FootprintGenerator = class extends SxPrimitiveString {
5882
+ static token = "generator";
5883
+ static parentToken = "footprint";
5884
+ token = "generator";
5885
+ getString() {
5886
+ return `(generator ${isSymbol(this.value) ? this.value : quoteSExprString(this.value)})`;
5887
+ }
5888
+ };
5889
+ SxClass.register(FootprintGenerator);
5890
+
5891
+ // lib/sexpr/classes/FootprintGeneratorVersion.ts
5892
+ var isSymbol2 = (value) => /^[A-Za-z0-9._-]+$/.test(value);
5893
+ var FootprintGeneratorVersion = class extends SxPrimitiveString {
5894
+ static token = "generator_version";
5895
+ static parentToken = "footprint";
5896
+ token = "generator_version";
5897
+ getString() {
5898
+ return `(generator_version ${isSymbol2(this.value) ? this.value : quoteSExprString(this.value)})`;
5899
+ }
5900
+ };
5901
+ SxClass.register(FootprintGeneratorVersion);
5902
+
5739
5903
  // lib/sexpr/classes/FootprintAutoplaceCost180.ts
5740
5904
  var FootprintAutoplaceCost180 = class extends SxPrimitiveNumber {
5741
5905
  static token = "autoplace_cost180";
@@ -10452,6 +10616,9 @@ SxClass.register(FootprintPlaced);
10452
10616
 
10453
10617
  // lib/sexpr/classes/Footprint.ts
10454
10618
  var SINGLE_TOKENS2 = /* @__PURE__ */ new Set([
10619
+ "version",
10620
+ "generator",
10621
+ "generator_version",
10455
10622
  "layer",
10456
10623
  "locked",
10457
10624
  "placed",
@@ -10496,6 +10663,9 @@ var Footprint = class _Footprint extends SxClass {
10496
10663
  static token = "footprint";
10497
10664
  token = "footprint";
10498
10665
  _libraryLink;
10666
+ _sxVersion;
10667
+ _sxGenerator;
10668
+ _sxGeneratorVersion;
10499
10669
  _sxLocked;
10500
10670
  _sxPlaced;
10501
10671
  _sxLayer;
@@ -10535,6 +10705,10 @@ var Footprint = class _Footprint extends SxClass {
10535
10705
  constructor(params = {}) {
10536
10706
  super();
10537
10707
  if (params.libraryLink !== void 0) this.libraryLink = params.libraryLink;
10708
+ if (params.version !== void 0) this.version = params.version;
10709
+ if (params.generator !== void 0) this.generator = params.generator;
10710
+ if (params.generatorVersion !== void 0)
10711
+ this.generatorVersion = params.generatorVersion;
10538
10712
  if (params.locked !== void 0) this.locked = params.locked;
10539
10713
  if (params.placed !== void 0) this.placed = params.placed;
10540
10714
  if (params.layer !== void 0) this.layer = params.layer;
@@ -10621,6 +10795,9 @@ var Footprint = class _Footprint extends SxClass {
10621
10795
  );
10622
10796
  }
10623
10797
  }
10798
+ footprint._sxVersion = propertyMap.version;
10799
+ footprint._sxGenerator = propertyMap.generator;
10800
+ footprint._sxGeneratorVersion = propertyMap.generator_version;
10624
10801
  footprint._sxLocked = propertyMap.locked;
10625
10802
  if (footprint._sxLocked && !footprint._sxLocked.value) {
10626
10803
  footprint._sxLocked = void 0;
@@ -10691,6 +10868,36 @@ var Footprint = class _Footprint extends SxClass {
10691
10868
  set libraryLink(value) {
10692
10869
  this._libraryLink = value;
10693
10870
  }
10871
+ get version() {
10872
+ return this._sxVersion?.value;
10873
+ }
10874
+ set version(value) {
10875
+ if (value === void 0) {
10876
+ this._sxVersion = void 0;
10877
+ return;
10878
+ }
10879
+ this._sxVersion = value instanceof FootprintVersion ? value : new FootprintVersion(value);
10880
+ }
10881
+ get generator() {
10882
+ return this._sxGenerator?.value;
10883
+ }
10884
+ set generator(value) {
10885
+ if (value === void 0) {
10886
+ this._sxGenerator = void 0;
10887
+ return;
10888
+ }
10889
+ this._sxGenerator = value instanceof FootprintGenerator ? value : new FootprintGenerator(value);
10890
+ }
10891
+ get generatorVersion() {
10892
+ return this._sxGeneratorVersion?.value;
10893
+ }
10894
+ set generatorVersion(value) {
10895
+ if (value === void 0) {
10896
+ this._sxGeneratorVersion = void 0;
10897
+ return;
10898
+ }
10899
+ this._sxGeneratorVersion = value instanceof FootprintGeneratorVersion ? value : new FootprintGeneratorVersion(value);
10900
+ }
10694
10901
  get locked() {
10695
10902
  return this._sxLocked?.value ?? false;
10696
10903
  }
@@ -11020,6 +11227,9 @@ var Footprint = class _Footprint extends SxClass {
11020
11227
  }
11021
11228
  getChildren() {
11022
11229
  const children = [];
11230
+ if (this._sxVersion) children.push(this._sxVersion);
11231
+ if (this._sxGenerator) children.push(this._sxGenerator);
11232
+ if (this._sxGeneratorVersion) children.push(this._sxGeneratorVersion);
11023
11233
  if (this._sxLocked) children.push(this._sxLocked);
11024
11234
  if (this._sxPlaced) children.push(this._sxPlaced);
11025
11235
  if (this._sxLayer) children.push(this._sxLayer);
@@ -15707,25 +15917,25 @@ var PcbVersion = class extends SxPrimitiveNumber {
15707
15917
  SxClass.register(PcbVersion);
15708
15918
 
15709
15919
  // lib/sexpr/classes/PcbGenerator.ts
15710
- var isSymbol = (value) => /^[A-Za-z0-9._-]+$/.test(value);
15920
+ var isSymbol3 = (value) => /^[A-Za-z0-9._-]+$/.test(value);
15711
15921
  var PcbGenerator = class extends SxPrimitiveString {
15712
15922
  static token = "generator";
15713
15923
  static parentToken = "kicad_pcb";
15714
15924
  token = "generator";
15715
15925
  getString() {
15716
- return `(generator ${isSymbol(this.value) ? this.value : quoteSExprString(this.value)})`;
15926
+ return `(generator ${isSymbol3(this.value) ? this.value : quoteSExprString(this.value)})`;
15717
15927
  }
15718
15928
  };
15719
15929
  SxClass.register(PcbGenerator);
15720
15930
 
15721
15931
  // lib/sexpr/classes/PcbGeneratorVersion.ts
15722
- var isSymbol2 = (value) => /^[A-Za-z0-9._-]+$/.test(value);
15932
+ var isSymbol4 = (value) => /^[A-Za-z0-9._-]+$/.test(value);
15723
15933
  var PcbGeneratorVersion = class extends SxPrimitiveString {
15724
15934
  static token = "generator_version";
15725
15935
  static parentToken = "kicad_pcb";
15726
15936
  token = "generator_version";
15727
15937
  getString() {
15728
- return `(generator_version ${isSymbol2(this.value) ? this.value : quoteSExprString(this.value)})`;
15938
+ return `(generator_version ${isSymbol4(this.value) ? this.value : quoteSExprString(this.value)})`;
15729
15939
  }
15730
15940
  };
15731
15941
  SxClass.register(PcbGeneratorVersion);
@@ -16419,6 +16629,8 @@ export {
16419
16629
  FootprintAutoplaceCost90,
16420
16630
  FootprintClearance,
16421
16631
  FootprintDescr,
16632
+ FootprintGenerator,
16633
+ FootprintGeneratorVersion,
16422
16634
  FootprintLocked,
16423
16635
  FootprintModel,
16424
16636
  FootprintNetTiePadGroups,
@@ -16435,6 +16647,7 @@ export {
16435
16647
  FootprintTedit,
16436
16648
  FootprintThermalGap,
16437
16649
  FootprintThermalWidth,
16650
+ FootprintVersion,
16438
16651
  FootprintZoneConnect,
16439
16652
  FpArc,
16440
16653
  FpArcEnd,
@@ -16498,6 +16711,9 @@ export {
16498
16711
  KicadSchGenerator,
16499
16712
  KicadSchGeneratorVersion,
16500
16713
  KicadSchVersion,
16714
+ KicadSymbolLib,
16715
+ KicadSymbolLibGenerator,
16716
+ KicadSymbolLibVersion,
16501
16717
  Label,
16502
16718
  Layer,
16503
16719
  Layers,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kicadts",
3
3
  "main": "dist/index.js",
4
- "version": "0.0.22",
4
+ "version": "0.0.24",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",