kicadts 0.0.8 → 0.0.10

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 (3) hide show
  1. package/dist/index.d.ts +79 -34
  2. package/dist/index.js +317 -134
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -824,7 +824,7 @@ declare class SchematicSymbol extends SxClass {
824
824
  private _inlineLibId?;
825
825
  constructor(params?: SchematicSymbolConstructorParams);
826
826
  get libraryId(): string | undefined;
827
- set libraryId(value: string | undefined);
827
+ set libraryId(value: string | SymbolLibId | undefined);
828
828
  get at(): At | undefined;
829
829
  set at(value: AtInput | undefined);
830
830
  get unit(): number | undefined;
@@ -1195,38 +1195,6 @@ declare class Label extends SxClass {
1195
1195
  getString(): string;
1196
1196
  }
1197
1197
 
1198
- interface SchematicTextConstructorParams {
1199
- value?: string;
1200
- excludeFromSim?: boolean | ExcludeFromSim;
1201
- at?: AtInput;
1202
- effects?: TextEffects;
1203
- uuid?: string | Uuid;
1204
- }
1205
- declare class SchematicText extends SxClass {
1206
- static token: string;
1207
- static parentToken: string;
1208
- token: string;
1209
- private _value;
1210
- private _sxExcludeFromSim?;
1211
- private _sxAt?;
1212
- private _sxEffects?;
1213
- private _sxUuid?;
1214
- constructor(params?: SchematicTextConstructorParams);
1215
- static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): SchematicText;
1216
- get value(): string;
1217
- set value(newValue: string);
1218
- get excludeFromSim(): boolean;
1219
- set excludeFromSim(value: boolean);
1220
- get at(): At | undefined;
1221
- set at(value: AtInput | undefined);
1222
- get effects(): TextEffects | undefined;
1223
- set effects(value: TextEffects | undefined);
1224
- get uuid(): Uuid | undefined;
1225
- set uuid(value: Uuid | string | undefined);
1226
- getChildren(): SxClass[];
1227
- getString(): string;
1228
- }
1229
-
1230
1198
  declare class PropertyHide extends SxPrimitiveBoolean {
1231
1199
  static token: string;
1232
1200
  static parentToken: string;
@@ -1283,6 +1251,79 @@ declare class Property extends SxClass {
1283
1251
  getString(): string;
1284
1252
  }
1285
1253
 
1254
+ type GlobalLabelShape = "input" | "output" | "bidirectional" | "tri_state" | "passive";
1255
+ interface GlobalLabelConstructorParams {
1256
+ value?: string;
1257
+ shape?: GlobalLabelShape;
1258
+ at?: AtInput;
1259
+ effects?: TextEffects;
1260
+ uuid?: string | Uuid;
1261
+ fieldsAutoplaced?: boolean | FieldsAutoplaced;
1262
+ properties?: Property[];
1263
+ }
1264
+ declare class GlobalLabel extends SxClass {
1265
+ static token: string;
1266
+ static parentToken: string;
1267
+ token: string;
1268
+ private _value;
1269
+ private _shape;
1270
+ private _sxAt?;
1271
+ private _sxEffects?;
1272
+ private _sxUuid?;
1273
+ private _sxFieldsAutoplaced?;
1274
+ private _properties;
1275
+ constructor(params?: GlobalLabelConstructorParams);
1276
+ static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): GlobalLabel;
1277
+ get value(): string;
1278
+ set value(newValue: string);
1279
+ get shape(): GlobalLabelShape;
1280
+ set shape(value: GlobalLabelShape);
1281
+ get at(): At | undefined;
1282
+ set at(value: AtInput | undefined);
1283
+ get effects(): TextEffects | undefined;
1284
+ set effects(value: TextEffects | undefined);
1285
+ get uuid(): Uuid | undefined;
1286
+ set uuid(value: Uuid | string | undefined);
1287
+ get fieldsAutoplaced(): boolean;
1288
+ set fieldsAutoplaced(value: boolean);
1289
+ get properties(): Property[];
1290
+ set properties(value: Property[]);
1291
+ getChildren(): SxClass[];
1292
+ getString(): string;
1293
+ }
1294
+
1295
+ interface SchematicTextConstructorParams {
1296
+ value?: string;
1297
+ excludeFromSim?: boolean | ExcludeFromSim;
1298
+ at?: AtInput;
1299
+ effects?: TextEffects;
1300
+ uuid?: string | Uuid;
1301
+ }
1302
+ declare class SchematicText extends SxClass {
1303
+ static token: string;
1304
+ static parentToken: string;
1305
+ token: string;
1306
+ private _value;
1307
+ private _sxExcludeFromSim?;
1308
+ private _sxAt?;
1309
+ private _sxEffects?;
1310
+ private _sxUuid?;
1311
+ constructor(params?: SchematicTextConstructorParams);
1312
+ static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): SchematicText;
1313
+ get value(): string;
1314
+ set value(newValue: string);
1315
+ get excludeFromSim(): boolean;
1316
+ set excludeFromSim(value: boolean);
1317
+ get at(): At | undefined;
1318
+ set at(value: AtInput | undefined);
1319
+ get effects(): TextEffects | undefined;
1320
+ set effects(value: TextEffects | undefined);
1321
+ get uuid(): Uuid | undefined;
1322
+ set uuid(value: Uuid | string | undefined);
1323
+ getChildren(): SxClass[];
1324
+ getString(): string;
1325
+ }
1326
+
1286
1327
  declare class SheetInstancesRoot extends SxClass {
1287
1328
  static token: string;
1288
1329
  token: string;
@@ -1528,6 +1569,7 @@ interface KicadSchConstructorParams {
1528
1569
  symbols?: SchematicSymbol[];
1529
1570
  texts?: SchematicText[];
1530
1571
  labels?: Label[];
1572
+ globalLabels?: GlobalLabel[];
1531
1573
  wires?: Wire[];
1532
1574
  junctions?: Junction[];
1533
1575
  }
@@ -1549,6 +1591,7 @@ declare class KicadSch extends SxClass {
1549
1591
  private _symbols;
1550
1592
  private _texts;
1551
1593
  private _labels;
1594
+ private _globalLabels;
1552
1595
  private _wires;
1553
1596
  private _junctions;
1554
1597
  constructor(params?: KicadSchConstructorParams);
@@ -1583,6 +1626,8 @@ declare class KicadSch extends SxClass {
1583
1626
  set texts(value: SchematicText[]);
1584
1627
  get labels(): Label[];
1585
1628
  set labels(value: Label[]);
1629
+ get globalLabels(): GlobalLabel[];
1630
+ set globalLabels(value: GlobalLabel[]);
1586
1631
  get junctions(): Junction[];
1587
1632
  set junctions(value: Junction[]);
1588
1633
  get wires(): Wire[];
@@ -4474,4 +4519,4 @@ declare class KicadPcb extends SxClass {
4474
4519
 
4475
4520
  declare const parseKicadSexpr: (sexpr: string) => SxClass[];
4476
4521
 
4477
- 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, GrLine, GrLineAngle, type GrLineConstructorParams, GrLineEnd, GrLineLocked, type GrLinePoint, GrLineStart, GrText, type GrTextConstructorParams, type GrTextPosition, 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, 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, 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, Property, type PropertyConstructorParams, PropertyHide, PropertyUnlocked, Pts, type RGBAColor, RenderCache, 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, SymbolPower, SymbolProperty, SymbolPropertyId, SymbolRectangle, SymbolRectangleEnd, SymbolRectangleFill, SymbolRectangleStart, SymbolText, SymbolUnit, TextEffects, type TextEffectsConstructorParams, TextEffectsFont, TextEffectsFontFace, TextEffectsFontLineSpacing, type TextEffectsFontProperty, TextEffectsFontSize, TextEffectsFontThickness, TextEffectsJustify, type TextEffectsProperty, TitleBlock, TitleBlockComment, TitleBlockCompany, type TitleBlockConstructorParams, TitleBlockDate, TitleBlockRevision, TitleBlockTitle, Unit, type UnitString, Uuid, Via, type ViaConstructorParams, ViaNet, Width, Wire, type WireConstructorParams, Xy, Zone, parseKicadSexpr };
4522
+ 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, GrLine, GrLineAngle, type GrLineConstructorParams, GrLineEnd, GrLineLocked, type GrLinePoint, GrLineStart, GrText, type GrTextConstructorParams, type GrTextPosition, 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, 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, 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, Property, type PropertyConstructorParams, PropertyHide, PropertyUnlocked, Pts, type RGBAColor, RenderCache, 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, SymbolPower, SymbolProperty, SymbolPropertyId, SymbolRectangle, SymbolRectangleEnd, SymbolRectangleFill, SymbolRectangleStart, SymbolText, SymbolUnit, TextEffects, type TextEffectsConstructorParams, TextEffectsFont, TextEffectsFontFace, TextEffectsFontLineSpacing, type TextEffectsFontProperty, TextEffectsFontSize, TextEffectsFontThickness, TextEffectsJustify, type TextEffectsProperty, TitleBlock, TitleBlockComment, TitleBlockCompany, type TitleBlockConstructorParams, TitleBlockDate, TitleBlockRevision, TitleBlockTitle, Unit, type UnitString, Uuid, Via, type ViaConstructorParams, ViaNet, Width, Wire, type WireConstructorParams, Xy, Zone, parseKicadSexpr };
package/dist/index.js CHANGED
@@ -2478,6 +2478,11 @@ var SchematicSymbol = class _SchematicSymbol extends SxClass {
2478
2478
  return this._sxLibId?.value ?? this._inlineLibId;
2479
2479
  }
2480
2480
  set libraryId(value) {
2481
+ if (value && typeof value === "object") {
2482
+ this._sxLibId = value;
2483
+ this._inlineLibId = void 0;
2484
+ return;
2485
+ }
2481
2486
  if (value === void 0 || value === "") {
2482
2487
  this._inlineLibId = void 0;
2483
2488
  if (this._sxLibId) {
@@ -3771,121 +3776,6 @@ var Label = class _Label extends SxClass {
3771
3776
  };
3772
3777
  SxClass.register(Label);
3773
3778
 
3774
- // lib/sexpr/classes/SchematicText.ts
3775
- var SUPPORTED_TOKENS6 = /* @__PURE__ */ new Set(["exclude_from_sim", "at", "effects", "uuid"]);
3776
- var SchematicText = class _SchematicText extends SxClass {
3777
- static token = "text";
3778
- static parentToken = "kicad_sch";
3779
- token = "text";
3780
- _value = "";
3781
- _sxExcludeFromSim;
3782
- _sxAt;
3783
- _sxEffects;
3784
- _sxUuid;
3785
- constructor(params = {}) {
3786
- super();
3787
- if (params.value !== void 0) {
3788
- this.value = params.value;
3789
- }
3790
- if (params.excludeFromSim !== void 0) {
3791
- this.excludeFromSim = typeof params.excludeFromSim === "boolean" ? params.excludeFromSim : params.excludeFromSim.value;
3792
- }
3793
- if (params.at !== void 0) {
3794
- this.at = params.at;
3795
- }
3796
- if (params.effects !== void 0) {
3797
- this.effects = params.effects;
3798
- }
3799
- if (params.uuid !== void 0) {
3800
- this.uuid = params.uuid;
3801
- }
3802
- }
3803
- static fromSexprPrimitives(primitiveSexprs) {
3804
- const [textPrimitive, ...rest] = primitiveSexprs;
3805
- const value = toStringValue(textPrimitive);
3806
- if (value === void 0) {
3807
- throw new Error("text expects a string value");
3808
- }
3809
- const text = new _SchematicText();
3810
- text._value = value;
3811
- const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(rest, this.token);
3812
- const unsupportedTokens = Object.keys(propertyMap).filter(
3813
- (token) => !SUPPORTED_TOKENS6.has(token)
3814
- );
3815
- if (unsupportedTokens.length > 0) {
3816
- throw new Error(
3817
- `Unsupported child tokens inside text expression: ${unsupportedTokens.join(", ")}`
3818
- );
3819
- }
3820
- for (const [token, entries] of Object.entries(arrayPropertyMap)) {
3821
- if (!SUPPORTED_TOKENS6.has(token)) {
3822
- throw new Error(
3823
- `Unsupported child tokens inside text expression: ${token}`
3824
- );
3825
- }
3826
- if (entries.length > 1) {
3827
- throw new Error(`text does not support repeated child tokens: ${token}`);
3828
- }
3829
- }
3830
- text._sxExcludeFromSim = arrayPropertyMap.exclude_from_sim?.[0] ?? propertyMap.exclude_from_sim;
3831
- text._sxAt = arrayPropertyMap.at?.[0] ?? propertyMap.at;
3832
- text._sxEffects = arrayPropertyMap.effects?.[0] ?? propertyMap.effects;
3833
- text._sxUuid = arrayPropertyMap.uuid?.[0] ?? propertyMap.uuid;
3834
- return text;
3835
- }
3836
- get value() {
3837
- return this._value;
3838
- }
3839
- set value(newValue) {
3840
- this._value = newValue;
3841
- }
3842
- get excludeFromSim() {
3843
- return this._sxExcludeFromSim?.value ?? false;
3844
- }
3845
- set excludeFromSim(value) {
3846
- this._sxExcludeFromSim = value ? new ExcludeFromSim(true) : void 0;
3847
- }
3848
- get at() {
3849
- return this._sxAt;
3850
- }
3851
- set at(value) {
3852
- this._sxAt = value !== void 0 ? At.from(value) : void 0;
3853
- }
3854
- get effects() {
3855
- return this._sxEffects;
3856
- }
3857
- set effects(value) {
3858
- this._sxEffects = value;
3859
- }
3860
- get uuid() {
3861
- return this._sxUuid;
3862
- }
3863
- set uuid(value) {
3864
- if (value === void 0) {
3865
- this._sxUuid = void 0;
3866
- return;
3867
- }
3868
- this._sxUuid = value instanceof Uuid ? value : new Uuid(value);
3869
- }
3870
- getChildren() {
3871
- const children = [];
3872
- if (this._sxExcludeFromSim) children.push(this._sxExcludeFromSim);
3873
- if (this._sxAt) children.push(this._sxAt);
3874
- if (this._sxEffects) children.push(this._sxEffects);
3875
- if (this._sxUuid) children.push(this._sxUuid);
3876
- return children;
3877
- }
3878
- getString() {
3879
- const lines = [`(text ${quoteSExprString(this._value)}`];
3880
- for (const child of this.getChildren()) {
3881
- lines.push(child.getStringIndented());
3882
- }
3883
- lines.push(")");
3884
- return lines.join("\n");
3885
- }
3886
- };
3887
- SxClass.register(SchematicText);
3888
-
3889
3779
  // lib/sexpr/classes/PropertyHide.ts
3890
3780
  var PropertyHide = class extends SxPrimitiveBoolean {
3891
3781
  static token = "hide";
@@ -4133,6 +4023,285 @@ var Property = class _Property extends SxClass {
4133
4023
  };
4134
4024
  SxClass.register(Property);
4135
4025
 
4026
+ // lib/sexpr/classes/GlobalLabel.ts
4027
+ var SUPPORTED_TOKENS6 = /* @__PURE__ */ new Set([
4028
+ "shape",
4029
+ "at",
4030
+ "effects",
4031
+ "uuid",
4032
+ "fields_autoplaced",
4033
+ "property"
4034
+ ]);
4035
+ var GlobalLabel = class _GlobalLabel extends SxClass {
4036
+ static token = "global_label";
4037
+ static parentToken = "kicad_sch";
4038
+ token = "global_label";
4039
+ _value = "";
4040
+ _shape = "input";
4041
+ _sxAt;
4042
+ _sxEffects;
4043
+ _sxUuid;
4044
+ _sxFieldsAutoplaced;
4045
+ _properties = [];
4046
+ constructor(params = {}) {
4047
+ super();
4048
+ if (params.value !== void 0) {
4049
+ this.value = params.value;
4050
+ }
4051
+ if (params.shape !== void 0) {
4052
+ this.shape = params.shape;
4053
+ }
4054
+ if (params.at !== void 0) {
4055
+ this.at = params.at;
4056
+ }
4057
+ if (params.effects !== void 0) {
4058
+ this.effects = params.effects;
4059
+ }
4060
+ if (params.uuid !== void 0) {
4061
+ this.uuid = params.uuid;
4062
+ }
4063
+ if (params.fieldsAutoplaced !== void 0) {
4064
+ if (params.fieldsAutoplaced instanceof FieldsAutoplaced) {
4065
+ this._sxFieldsAutoplaced = params.fieldsAutoplaced;
4066
+ } else {
4067
+ this.fieldsAutoplaced = params.fieldsAutoplaced;
4068
+ }
4069
+ }
4070
+ if (params.properties !== void 0) {
4071
+ this.properties = params.properties;
4072
+ }
4073
+ }
4074
+ static fromSexprPrimitives(primitiveSexprs) {
4075
+ const [textPrimitive, ...rest] = primitiveSexprs;
4076
+ const value = toStringValue(textPrimitive);
4077
+ if (value === void 0) {
4078
+ throw new Error("global_label expects a string value");
4079
+ }
4080
+ const globalLabel = new _GlobalLabel();
4081
+ globalLabel._value = value;
4082
+ let shapeIndex = -1;
4083
+ for (let i = 0; i < rest.length; i++) {
4084
+ const item = rest[i];
4085
+ if (Array.isArray(item) && item[0] === "shape" && item.length === 2) {
4086
+ shapeIndex = i;
4087
+ const shapeValue = toStringValue(item[1]);
4088
+ if (shapeValue) {
4089
+ globalLabel._shape = shapeValue;
4090
+ }
4091
+ break;
4092
+ }
4093
+ }
4094
+ const restWithoutShape = shapeIndex >= 0 ? rest.filter((_, i) => i !== shapeIndex) : rest;
4095
+ const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(restWithoutShape, this.token);
4096
+ const unsupportedTokens = Object.keys(propertyMap).filter(
4097
+ (token) => !SUPPORTED_TOKENS6.has(token)
4098
+ );
4099
+ if (unsupportedTokens.length > 0) {
4100
+ throw new Error(
4101
+ `Unsupported child tokens inside global_label expression: ${unsupportedTokens.join(", ")}`
4102
+ );
4103
+ }
4104
+ for (const [token, entries] of Object.entries(arrayPropertyMap)) {
4105
+ if (!SUPPORTED_TOKENS6.has(token)) {
4106
+ throw new Error(
4107
+ `Unsupported child tokens inside global_label expression: ${token}`
4108
+ );
4109
+ }
4110
+ if (token !== "property" && entries.length > 1) {
4111
+ throw new Error(
4112
+ `global_label does not support repeated child tokens: ${token}`
4113
+ );
4114
+ }
4115
+ }
4116
+ globalLabel._sxAt = arrayPropertyMap.at?.[0] ?? propertyMap.at;
4117
+ globalLabel._sxEffects = arrayPropertyMap.effects?.[0] ?? propertyMap.effects;
4118
+ globalLabel._sxUuid = arrayPropertyMap.uuid?.[0] ?? propertyMap.uuid;
4119
+ globalLabel._sxFieldsAutoplaced = arrayPropertyMap.fields_autoplaced?.[0] ?? propertyMap.fields_autoplaced;
4120
+ globalLabel._properties = arrayPropertyMap.property ?? [];
4121
+ return globalLabel;
4122
+ }
4123
+ get value() {
4124
+ return this._value;
4125
+ }
4126
+ set value(newValue) {
4127
+ this._value = newValue;
4128
+ }
4129
+ get shape() {
4130
+ return this._shape;
4131
+ }
4132
+ set shape(value) {
4133
+ this._shape = value;
4134
+ }
4135
+ get at() {
4136
+ return this._sxAt;
4137
+ }
4138
+ set at(value) {
4139
+ this._sxAt = value !== void 0 ? At.from(value) : void 0;
4140
+ }
4141
+ get effects() {
4142
+ return this._sxEffects;
4143
+ }
4144
+ set effects(value) {
4145
+ this._sxEffects = value;
4146
+ }
4147
+ get uuid() {
4148
+ return this._sxUuid;
4149
+ }
4150
+ set uuid(value) {
4151
+ if (value === void 0) {
4152
+ this._sxUuid = void 0;
4153
+ return;
4154
+ }
4155
+ this._sxUuid = value instanceof Uuid ? value : new Uuid(value);
4156
+ }
4157
+ get fieldsAutoplaced() {
4158
+ return this._sxFieldsAutoplaced?.value ?? false;
4159
+ }
4160
+ set fieldsAutoplaced(value) {
4161
+ this._sxFieldsAutoplaced = new FieldsAutoplaced(value);
4162
+ }
4163
+ get properties() {
4164
+ return [...this._properties];
4165
+ }
4166
+ set properties(value) {
4167
+ this._properties = [...value];
4168
+ }
4169
+ getChildren() {
4170
+ const children = [];
4171
+ if (this._sxAt) children.push(this._sxAt);
4172
+ if (this._sxEffects) children.push(this._sxEffects);
4173
+ if (this._sxUuid) children.push(this._sxUuid);
4174
+ children.push(...this._properties);
4175
+ if (this._sxFieldsAutoplaced) children.push(this._sxFieldsAutoplaced);
4176
+ return children;
4177
+ }
4178
+ getString() {
4179
+ const lines = [`(global_label ${quoteSExprString(this._value)}`];
4180
+ lines.push(` (shape ${this._shape})`);
4181
+ for (const child of this.getChildren()) {
4182
+ lines.push(child.getStringIndented());
4183
+ }
4184
+ lines.push(")");
4185
+ return lines.join("\n");
4186
+ }
4187
+ };
4188
+ SxClass.register(GlobalLabel);
4189
+
4190
+ // lib/sexpr/classes/SchematicText.ts
4191
+ var SUPPORTED_TOKENS7 = /* @__PURE__ */ new Set(["exclude_from_sim", "at", "effects", "uuid"]);
4192
+ var SchematicText = class _SchematicText extends SxClass {
4193
+ static token = "text";
4194
+ static parentToken = "kicad_sch";
4195
+ token = "text";
4196
+ _value = "";
4197
+ _sxExcludeFromSim;
4198
+ _sxAt;
4199
+ _sxEffects;
4200
+ _sxUuid;
4201
+ constructor(params = {}) {
4202
+ super();
4203
+ if (params.value !== void 0) {
4204
+ this.value = params.value;
4205
+ }
4206
+ if (params.excludeFromSim !== void 0) {
4207
+ this.excludeFromSim = typeof params.excludeFromSim === "boolean" ? params.excludeFromSim : params.excludeFromSim.value;
4208
+ }
4209
+ if (params.at !== void 0) {
4210
+ this.at = params.at;
4211
+ }
4212
+ if (params.effects !== void 0) {
4213
+ this.effects = params.effects;
4214
+ }
4215
+ if (params.uuid !== void 0) {
4216
+ this.uuid = params.uuid;
4217
+ }
4218
+ }
4219
+ static fromSexprPrimitives(primitiveSexprs) {
4220
+ const [textPrimitive, ...rest] = primitiveSexprs;
4221
+ const value = toStringValue(textPrimitive);
4222
+ if (value === void 0) {
4223
+ throw new Error("text expects a string value");
4224
+ }
4225
+ const text = new _SchematicText();
4226
+ text._value = value;
4227
+ const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(rest, this.token);
4228
+ const unsupportedTokens = Object.keys(propertyMap).filter(
4229
+ (token) => !SUPPORTED_TOKENS7.has(token)
4230
+ );
4231
+ if (unsupportedTokens.length > 0) {
4232
+ throw new Error(
4233
+ `Unsupported child tokens inside text expression: ${unsupportedTokens.join(", ")}`
4234
+ );
4235
+ }
4236
+ for (const [token, entries] of Object.entries(arrayPropertyMap)) {
4237
+ if (!SUPPORTED_TOKENS7.has(token)) {
4238
+ throw new Error(
4239
+ `Unsupported child tokens inside text expression: ${token}`
4240
+ );
4241
+ }
4242
+ if (entries.length > 1) {
4243
+ throw new Error(`text does not support repeated child tokens: ${token}`);
4244
+ }
4245
+ }
4246
+ text._sxExcludeFromSim = arrayPropertyMap.exclude_from_sim?.[0] ?? propertyMap.exclude_from_sim;
4247
+ text._sxAt = arrayPropertyMap.at?.[0] ?? propertyMap.at;
4248
+ text._sxEffects = arrayPropertyMap.effects?.[0] ?? propertyMap.effects;
4249
+ text._sxUuid = arrayPropertyMap.uuid?.[0] ?? propertyMap.uuid;
4250
+ return text;
4251
+ }
4252
+ get value() {
4253
+ return this._value;
4254
+ }
4255
+ set value(newValue) {
4256
+ this._value = newValue;
4257
+ }
4258
+ get excludeFromSim() {
4259
+ return this._sxExcludeFromSim?.value ?? false;
4260
+ }
4261
+ set excludeFromSim(value) {
4262
+ this._sxExcludeFromSim = value ? new ExcludeFromSim(true) : void 0;
4263
+ }
4264
+ get at() {
4265
+ return this._sxAt;
4266
+ }
4267
+ set at(value) {
4268
+ this._sxAt = value !== void 0 ? At.from(value) : void 0;
4269
+ }
4270
+ get effects() {
4271
+ return this._sxEffects;
4272
+ }
4273
+ set effects(value) {
4274
+ this._sxEffects = value;
4275
+ }
4276
+ get uuid() {
4277
+ return this._sxUuid;
4278
+ }
4279
+ set uuid(value) {
4280
+ if (value === void 0) {
4281
+ this._sxUuid = void 0;
4282
+ return;
4283
+ }
4284
+ this._sxUuid = value instanceof Uuid ? value : new Uuid(value);
4285
+ }
4286
+ getChildren() {
4287
+ const children = [];
4288
+ if (this._sxExcludeFromSim) children.push(this._sxExcludeFromSim);
4289
+ if (this._sxAt) children.push(this._sxAt);
4290
+ if (this._sxEffects) children.push(this._sxEffects);
4291
+ if (this._sxUuid) children.push(this._sxUuid);
4292
+ return children;
4293
+ }
4294
+ getString() {
4295
+ const lines = [`(text ${quoteSExprString(this._value)}`];
4296
+ for (const child of this.getChildren()) {
4297
+ lines.push(child.getStringIndented());
4298
+ }
4299
+ lines.push(")");
4300
+ return lines.join("\n");
4301
+ }
4302
+ };
4303
+ SxClass.register(SchematicText);
4304
+
4136
4305
  // lib/sexpr/classes/SheetInstancesRoot.ts
4137
4306
  var SUPPORTED_ARRAY_TOKENS2 = /* @__PURE__ */ new Set(["page"]);
4138
4307
  var SheetInstancesRoot = class _SheetInstancesRoot extends SxClass {
@@ -4868,6 +5037,7 @@ var MULTI_CHILD_TOKENS = /* @__PURE__ */ new Set([
4868
5037
  "symbol",
4869
5038
  "text",
4870
5039
  "label",
5040
+ "global_label",
4871
5041
  "junction",
4872
5042
  "wire",
4873
5043
  "sheet_instances"
@@ -4894,6 +5064,7 @@ var KicadSch = class _KicadSch extends SxClass {
4894
5064
  _symbols = [];
4895
5065
  _texts = [];
4896
5066
  _labels = [];
5067
+ _globalLabels = [];
4897
5068
  _wires = [];
4898
5069
  _junctions = [];
4899
5070
  constructor(params = {}) {
@@ -4949,6 +5120,9 @@ var KicadSch = class _KicadSch extends SxClass {
4949
5120
  if (params.labels !== void 0) {
4950
5121
  this.labels = params.labels;
4951
5122
  }
5123
+ if (params.globalLabels !== void 0) {
5124
+ this.globalLabels = params.globalLabels;
5125
+ }
4952
5126
  if (params.wires !== void 0) {
4953
5127
  this.wires = params.wires;
4954
5128
  }
@@ -5005,6 +5179,7 @@ var KicadSch = class _KicadSch extends SxClass {
5005
5179
  symbols: arrayPropertyMap.symbol ?? [],
5006
5180
  texts: arrayPropertyMap.text ?? [],
5007
5181
  labels: arrayPropertyMap.label ?? [],
5182
+ globalLabels: arrayPropertyMap.global_label ?? [],
5008
5183
  junctions: arrayPropertyMap.junction ?? [],
5009
5184
  wires: arrayPropertyMap.wire ?? []
5010
5185
  });
@@ -5107,6 +5282,12 @@ var KicadSch = class _KicadSch extends SxClass {
5107
5282
  set labels(value) {
5108
5283
  this._labels = [...value];
5109
5284
  }
5285
+ get globalLabels() {
5286
+ return [...this._globalLabels];
5287
+ }
5288
+ set globalLabels(value) {
5289
+ this._globalLabels = [...value];
5290
+ }
5110
5291
  get junctions() {
5111
5292
  return [...this._junctions];
5112
5293
  }
@@ -5136,6 +5317,7 @@ var KicadSch = class _KicadSch extends SxClass {
5136
5317
  children.push(...this._symbols);
5137
5318
  children.push(...this._texts);
5138
5319
  children.push(...this._labels);
5320
+ children.push(...this._globalLabels);
5139
5321
  children.push(...this._junctions);
5140
5322
  children.push(...this._wires);
5141
5323
  return children;
@@ -6041,7 +6223,7 @@ var GrLineStart = class _GrLineStart extends SxClass {
6041
6223
  SxClass.register(GrLineStart);
6042
6224
 
6043
6225
  // lib/sexpr/classes/PadPrimitiveGrLine.ts
6044
- var SUPPORTED_TOKENS7 = /* @__PURE__ */ new Set(["start", "end", "width"]);
6226
+ var SUPPORTED_TOKENS8 = /* @__PURE__ */ new Set(["start", "end", "width"]);
6045
6227
  var PadPrimitiveGrLine = class _PadPrimitiveGrLine extends SxClass {
6046
6228
  static token = "gr_line";
6047
6229
  static parentToken = "primitives";
@@ -6053,14 +6235,14 @@ var PadPrimitiveGrLine = class _PadPrimitiveGrLine extends SxClass {
6053
6235
  const line = new _PadPrimitiveGrLine();
6054
6236
  const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
6055
6237
  for (const token of Object.keys(propertyMap)) {
6056
- if (!SUPPORTED_TOKENS7.has(token)) {
6238
+ if (!SUPPORTED_TOKENS8.has(token)) {
6057
6239
  throw new Error(
6058
6240
  `pad primitive gr_line encountered unsupported child token "${token}"`
6059
6241
  );
6060
6242
  }
6061
6243
  }
6062
6244
  for (const [token, entries] of Object.entries(arrayPropertyMap)) {
6063
- if (!SUPPORTED_TOKENS7.has(token)) {
6245
+ if (!SUPPORTED_TOKENS8.has(token)) {
6064
6246
  throw new Error(
6065
6247
  `pad primitive gr_line encountered unsupported child token "${token}"`
6066
6248
  );
@@ -6142,7 +6324,7 @@ var PadPrimitiveGrLine = class _PadPrimitiveGrLine extends SxClass {
6142
6324
  SxClass.register(PadPrimitiveGrLine);
6143
6325
 
6144
6326
  // lib/sexpr/classes/PadPrimitiveGrArc.ts
6145
- var SUPPORTED_TOKENS8 = /* @__PURE__ */ new Set(["start", "mid", "end", "width"]);
6327
+ var SUPPORTED_TOKENS9 = /* @__PURE__ */ new Set(["start", "mid", "end", "width"]);
6146
6328
  var PadPrimitiveGrArc = class _PadPrimitiveGrArc extends SxClass {
6147
6329
  static token = "gr_arc";
6148
6330
  static parentToken = "primitives";
@@ -6162,14 +6344,14 @@ var PadPrimitiveGrArc = class _PadPrimitiveGrArc extends SxClass {
6162
6344
  const arc = new _PadPrimitiveGrArc();
6163
6345
  const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
6164
6346
  for (const token of Object.keys(propertyMap)) {
6165
- if (!SUPPORTED_TOKENS8.has(token)) {
6347
+ if (!SUPPORTED_TOKENS9.has(token)) {
6166
6348
  throw new Error(
6167
6349
  `pad primitive gr_arc encountered unsupported child token "${token}"`
6168
6350
  );
6169
6351
  }
6170
6352
  }
6171
6353
  for (const [token, entries] of Object.entries(arrayPropertyMap)) {
6172
- if (!SUPPORTED_TOKENS8.has(token)) {
6354
+ if (!SUPPORTED_TOKENS9.has(token)) {
6173
6355
  throw new Error(
6174
6356
  `pad primitive gr_arc encountered unsupported child token "${token}"`
6175
6357
  );
@@ -6339,7 +6521,7 @@ var PadPrimitiveGrArcEnd = class _PadPrimitiveGrArcEnd extends PadPrimitiveGrArc
6339
6521
  SxClass.register(PadPrimitiveGrArcEnd);
6340
6522
 
6341
6523
  // lib/sexpr/classes/PadPrimitiveGrCircle.ts
6342
- var SUPPORTED_TOKENS9 = /* @__PURE__ */ new Set(["center", "end", "width", "fill"]);
6524
+ var SUPPORTED_TOKENS10 = /* @__PURE__ */ new Set(["center", "end", "width", "fill"]);
6343
6525
  var PadPrimitiveGrCircle = class _PadPrimitiveGrCircle extends SxClass {
6344
6526
  static token = "gr_circle";
6345
6527
  static parentToken = "primitives";
@@ -6359,14 +6541,14 @@ var PadPrimitiveGrCircle = class _PadPrimitiveGrCircle extends SxClass {
6359
6541
  const circle = new _PadPrimitiveGrCircle();
6360
6542
  const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
6361
6543
  for (const token of Object.keys(propertyMap)) {
6362
- if (!SUPPORTED_TOKENS9.has(token)) {
6544
+ if (!SUPPORTED_TOKENS10.has(token)) {
6363
6545
  throw new Error(
6364
6546
  `pad primitive gr_circle encountered unsupported child token "${token}"`
6365
6547
  );
6366
6548
  }
6367
6549
  }
6368
6550
  for (const [token, entries] of Object.entries(arrayPropertyMap)) {
6369
- if (!SUPPORTED_TOKENS9.has(token)) {
6551
+ if (!SUPPORTED_TOKENS10.has(token)) {
6370
6552
  throw new Error(
6371
6553
  `pad primitive gr_circle encountered unsupported child token "${token}"`
6372
6554
  );
@@ -7134,7 +7316,7 @@ var SINGLE_TOKENS = /* @__PURE__ */ new Set([
7134
7316
  "teardrops"
7135
7317
  ]);
7136
7318
  var MULTI_TOKENS = /* @__PURE__ */ new Set(["property"]);
7137
- var SUPPORTED_TOKENS10 = /* @__PURE__ */ new Set([...SINGLE_TOKENS, ...MULTI_TOKENS]);
7319
+ var SUPPORTED_TOKENS11 = /* @__PURE__ */ new Set([...SINGLE_TOKENS, ...MULTI_TOKENS]);
7138
7320
  var ensureSingle = (arrayPropertyMap, token) => {
7139
7321
  const entries = arrayPropertyMap[token];
7140
7322
  if (entries && entries.length > 1) {
@@ -7273,12 +7455,12 @@ var FootprintPad = class _FootprintPad extends SxClass {
7273
7455
  }
7274
7456
  const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveNodes, this.token);
7275
7457
  for (const token of Object.keys(propertyMap)) {
7276
- if (!SUPPORTED_TOKENS10.has(token)) {
7458
+ if (!SUPPORTED_TOKENS11.has(token)) {
7277
7459
  throw new Error(`pad encountered unsupported child token "${token}"`);
7278
7460
  }
7279
7461
  }
7280
7462
  for (const [token, entries] of Object.entries(arrayPropertyMap)) {
7281
- if (!SUPPORTED_TOKENS10.has(token)) {
7463
+ if (!SUPPORTED_TOKENS11.has(token)) {
7282
7464
  throw new Error(`pad encountered unsupported child token "${token}"`);
7283
7465
  }
7284
7466
  if (!MULTI_TOKENS.has(token) && entries.length > 1) {
@@ -9144,7 +9326,7 @@ var FpPolyLocked = class _FpPolyLocked extends SxPrimitiveBoolean {
9144
9326
  SxClass.register(FpPolyLocked);
9145
9327
 
9146
9328
  // lib/sexpr/classes/FpPoly.ts
9147
- var SUPPORTED_TOKENS11 = /* @__PURE__ */ new Set([
9329
+ var SUPPORTED_TOKENS12 = /* @__PURE__ */ new Set([
9148
9330
  "pts",
9149
9331
  "xy",
9150
9332
  "layer",
@@ -9179,12 +9361,12 @@ var FpPoly = class _FpPoly extends SxClass {
9179
9361
  const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
9180
9362
  const unexpectedTokens = /* @__PURE__ */ new Set();
9181
9363
  for (const token of Object.keys(propertyMap)) {
9182
- if (!SUPPORTED_TOKENS11.has(token)) {
9364
+ if (!SUPPORTED_TOKENS12.has(token)) {
9183
9365
  unexpectedTokens.add(token);
9184
9366
  }
9185
9367
  }
9186
9368
  for (const token of Object.keys(arrayPropertyMap)) {
9187
- if (!SUPPORTED_TOKENS11.has(token)) {
9369
+ if (!SUPPORTED_TOKENS12.has(token)) {
9188
9370
  unexpectedTokens.add(token);
9189
9371
  }
9190
9372
  if (token !== "xy" && arrayPropertyMap[token].length > 1) {
@@ -9237,7 +9419,7 @@ var FpPoly = class _FpPoly extends SxClass {
9237
9419
  `fp_poly child token must be a string, received: ${JSON.stringify(token)}`
9238
9420
  );
9239
9421
  }
9240
- if (!SUPPORTED_TOKENS11.has(token)) {
9422
+ if (!SUPPORTED_TOKENS12.has(token)) {
9241
9423
  throw new Error(
9242
9424
  `Unsupported child token inside fp_poly expression: ${token}`
9243
9425
  );
@@ -9862,7 +10044,7 @@ var MULTI_TOKENS2 = /* @__PURE__ */ new Set([
9862
10044
  "pad",
9863
10045
  "model"
9864
10046
  ]);
9865
- var SUPPORTED_TOKENS12 = /* @__PURE__ */ new Set([...SINGLE_TOKENS2, ...MULTI_TOKENS2]);
10047
+ var SUPPORTED_TOKENS13 = /* @__PURE__ */ new Set([...SINGLE_TOKENS2, ...MULTI_TOKENS2]);
9866
10048
  var Footprint = class _Footprint extends SxClass {
9867
10049
  static token = "footprint";
9868
10050
  token = "footprint";
@@ -9972,14 +10154,14 @@ var Footprint = class _Footprint extends SxClass {
9972
10154
  }
9973
10155
  const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(rawNodes, this.token);
9974
10156
  for (const token of Object.keys(propertyMap)) {
9975
- if (!SUPPORTED_TOKENS12.has(token)) {
10157
+ if (!SUPPORTED_TOKENS13.has(token)) {
9976
10158
  throw new Error(
9977
10159
  `footprint encountered unsupported child token "${token}"`
9978
10160
  );
9979
10161
  }
9980
10162
  }
9981
10163
  for (const [token, entries] of Object.entries(arrayPropertyMap)) {
9982
- if (!SUPPORTED_TOKENS12.has(token)) {
10164
+ if (!SUPPORTED_TOKENS13.has(token)) {
9983
10165
  throw new Error(
9984
10166
  `footprint encountered unsupported child token "${token}"`
9985
10167
  );
@@ -14067,6 +14249,7 @@ export {
14067
14249
  FpTextBoxAngle,
14068
14250
  FpTextBoxEnd,
14069
14251
  FpTextBoxStart,
14252
+ GlobalLabel,
14070
14253
  GrLine,
14071
14254
  GrLineAngle,
14072
14255
  GrLineEnd,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kicadts",
3
3
  "main": "dist/index.js",
4
- "version": "0.0.8",
4
+ "version": "0.0.10",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",