kicadts 0.0.42 → 0.0.44
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 +37 -1
- package/dist/index.js +110 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1169,6 +1169,23 @@ declare class SymbolPinNumber extends SxClass {
|
|
|
1169
1169
|
getChildren(): SxClass[];
|
|
1170
1170
|
getString(): string;
|
|
1171
1171
|
}
|
|
1172
|
+
interface SymbolPinAlternateConstructorParams {
|
|
1173
|
+
alternateName: string;
|
|
1174
|
+
pinElectricalType: PinElectricalType;
|
|
1175
|
+
pinGraphicStyle: PinGraphicStyle;
|
|
1176
|
+
}
|
|
1177
|
+
declare class SymbolPinAlternate extends SxClass {
|
|
1178
|
+
static token: string;
|
|
1179
|
+
static parentToken: string;
|
|
1180
|
+
token: string;
|
|
1181
|
+
alternateName: string;
|
|
1182
|
+
pinElectricalType: PinElectricalType;
|
|
1183
|
+
pinGraphicStyle: PinGraphicStyle;
|
|
1184
|
+
constructor(params: SymbolPinAlternateConstructorParams);
|
|
1185
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): SymbolPinAlternate;
|
|
1186
|
+
getChildren(): SxClass[];
|
|
1187
|
+
getString(): string;
|
|
1188
|
+
}
|
|
1172
1189
|
declare class SymbolPin extends SxClass {
|
|
1173
1190
|
static token: string;
|
|
1174
1191
|
static parentToken: string;
|
|
@@ -1182,6 +1199,7 @@ declare class SymbolPin extends SxClass {
|
|
|
1182
1199
|
_sxUuid?: Uuid;
|
|
1183
1200
|
private inlineNumber?;
|
|
1184
1201
|
private _sxHide?;
|
|
1202
|
+
private _alternates;
|
|
1185
1203
|
static fromSexprPrimitives(args: PrimitiveSExpr[]): SymbolPin;
|
|
1186
1204
|
get at(): At | undefined;
|
|
1187
1205
|
set at(value: AtInput | undefined);
|
|
@@ -1195,6 +1213,8 @@ declare class SymbolPin extends SxClass {
|
|
|
1195
1213
|
set uuid(value: string | undefined);
|
|
1196
1214
|
get hidden(): boolean;
|
|
1197
1215
|
set hidden(value: boolean);
|
|
1216
|
+
get alternates(): SymbolPinAlternate[];
|
|
1217
|
+
set alternates(value: SymbolPinAlternate[]);
|
|
1198
1218
|
getChildren(): SxClass[];
|
|
1199
1219
|
getString(): string;
|
|
1200
1220
|
}
|
|
@@ -1274,6 +1294,8 @@ declare class KicadSymbolLib extends SxClass {
|
|
|
1274
1294
|
set symbols(value: SchematicSymbol[]);
|
|
1275
1295
|
getChildren(): SxClass[];
|
|
1276
1296
|
}
|
|
1297
|
+
declare const KicadSym: typeof KicadSymbolLib;
|
|
1298
|
+
type KicadSym = KicadSymbolLib;
|
|
1277
1299
|
|
|
1278
1300
|
declare class LibSymbols extends SxClass {
|
|
1279
1301
|
static token: string;
|
|
@@ -3986,6 +4008,15 @@ declare class ZoneKeepout extends SxClass {
|
|
|
3986
4008
|
getChildren(): SxClass[];
|
|
3987
4009
|
}
|
|
3988
4010
|
|
|
4011
|
+
declare class ZoneLocked extends SxPrimitiveBoolean {
|
|
4012
|
+
static token: string;
|
|
4013
|
+
static parentToken: string;
|
|
4014
|
+
token: string;
|
|
4015
|
+
constructor(value: boolean);
|
|
4016
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): ZoneLocked;
|
|
4017
|
+
getString(): string;
|
|
4018
|
+
}
|
|
4019
|
+
|
|
3989
4020
|
declare class ZoneMinThickness extends SxPrimitiveNumber {
|
|
3990
4021
|
static token: string;
|
|
3991
4022
|
static parentToken: string;
|
|
@@ -4065,6 +4096,7 @@ interface ZoneConstructorParams {
|
|
|
4065
4096
|
layers?: Layers | string[];
|
|
4066
4097
|
tstamp?: Tstamp | string;
|
|
4067
4098
|
uuid?: Uuid | string;
|
|
4099
|
+
locked?: ZoneLocked | boolean;
|
|
4068
4100
|
name?: ZoneName | string;
|
|
4069
4101
|
hatch?: ZoneHatch;
|
|
4070
4102
|
priority?: ZonePriority | number;
|
|
@@ -4087,6 +4119,7 @@ declare class Zone extends SxClass {
|
|
|
4087
4119
|
private _sxLayers?;
|
|
4088
4120
|
private _sxTstamp?;
|
|
4089
4121
|
private _sxUuid?;
|
|
4122
|
+
private _sxLocked?;
|
|
4090
4123
|
private _sxName?;
|
|
4091
4124
|
private _sxHatch?;
|
|
4092
4125
|
private _sxPriority?;
|
|
@@ -4114,6 +4147,8 @@ declare class Zone extends SxClass {
|
|
|
4114
4147
|
set tstamp(value: Tstamp | string | undefined);
|
|
4115
4148
|
get uuid(): Uuid | undefined;
|
|
4116
4149
|
set uuid(value: Uuid | string | undefined);
|
|
4150
|
+
get locked(): boolean;
|
|
4151
|
+
set locked(value: ZoneLocked | boolean | undefined);
|
|
4117
4152
|
get name(): string | undefined;
|
|
4118
4153
|
set name(value: ZoneName | string | undefined);
|
|
4119
4154
|
get hatch(): ZoneHatch | undefined;
|
|
@@ -6439,6 +6474,7 @@ declare class KicadPcb extends SxClass {
|
|
|
6439
6474
|
declare const parseKicadSexpr: (sexpr: string) => SxClass[];
|
|
6440
6475
|
declare const parseKicadSch: (sexpr: string) => KicadSch;
|
|
6441
6476
|
declare const parseKicadPcb: (sexpr: string) => KicadPcb;
|
|
6477
|
+
declare const parseKicadSym: (sexpr: string) => KicadSymbolLib;
|
|
6442
6478
|
declare const parseKicadMod: (sexpr: string) => Footprint;
|
|
6443
6479
|
|
|
6444
|
-
export { At, type AtInput, Back, Bus, type BusConstructorParams, BusEntry, type BusEntryConstructorParams, BusEntrySize, Capping, Color, Covering, Dimension, DimensionFormat, DimensionStyle, Dnp, EmbeddedFile, EmbeddedFileChecksum, type EmbeddedFileConstructorParams, EmbeddedFileData, EmbeddedFileName, EmbeddedFileType, EmbeddedFiles, type EmbeddedFilesConstructorParams, EmbeddedFonts, ExcludeFromSim, FieldsAutoplaced, Filling, Footprint, FootprintAttr, FootprintAutoplaceCost180, FootprintAutoplaceCost90, FootprintClearance, type FootprintConstructorParams, FootprintDescr, FootprintDuplicatePadNumbersAreJumpers, FootprintGenerator, FootprintGeneratorVersion, FootprintLocked, FootprintModel, FootprintNetTiePadGroups, FootprintPad, type FootprintPadConstructorParams, FootprintPath, FootprintPlaced, FootprintPoint, FootprintPointSize, FootprintPrivateLayers, FootprintSheetfile, FootprintSheetname, FootprintSolderMaskMargin, FootprintSolderPasteMargin, FootprintSolderPasteMarginRatio, FootprintSolderPasteRatio, FootprintTags, FootprintTedit, FootprintThermalGap, FootprintThermalWidth, FootprintUnit, FootprintUnitName, FootprintUnitPins, FootprintUnits, FootprintVersion, FootprintZoneConnect, FpArc, type FpArcConstructorParams, FpArcEnd, FpArcMid, FpArcStart, FpCircle, FpCircleCenter, type FpCircleConstructorParams, FpCircleEnd, FpCircleFill, FpCircleNet, FpCurve, type FpCurveConstructorParams, FpCurveLocked, FpLine, type FpLineConstructorParams, FpLineEnd, FpLineNet, FpLineStart, FpPoly, type FpPolyConstructorParams, FpPolyFill, FpPolyLocked, FpRect, type FpRectConstructorParams, FpRectEnd, FpRectFill, FpRectNet, FpRectStart, FpText, FpTextBox, FpTextBoxAngle, type FpTextBoxConstructorParams, FpTextBoxEnd, FpTextBoxStart, type FpTextConstructorParams, type FpTextType, Front, Generated, GlobalLabel, type GlobalLabelConstructorParams, type GlobalLabelShape, GrArc, type GrArcConstructorParams, GrArcEnd, GrArcLocked, 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, GrPolyNet, GrRect, type GrRectConstructorParams, GrRectEnd, GrRectFill, GrRectLocked, GrRectStart, GrText, type GrTextConstructorParams, GrTextLocked, type GrTextPosition, GrTextRenderCache, GrTextRenderCachePolygon, Group, type GroupConstructorParams, GroupLocked, GroupMembers, Image, type ImageConstructorParams, ImageData, ImageScale, InBom, InPosFiles, Junction, type JunctionConstructorParams, JunctionDiameter, KicadPcb, type KicadPcbConstructorParams, KicadSch, type KicadSchConstructorParams, KicadSchGenerator, KicadSchGeneratorVersion, KicadSchVersion, KicadSymbolLib, type KicadSymbolLibConstructorParams, KicadSymbolLibGenerator, KicadSymbolLibGeneratorVersion, 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, PadProperty, PadRectDelta, PadRoundrectRratio, PadSize, type PadSizeInput, PadSolderMaskMargin, PadSolderPasteMargin, PadSolderPasteMarginRatio, PadTeardrops, PadThermalBridgeAngle, PadThermalGap, PadThermalWidth, PadZoneConnect, PadZoneLayerConnections, Paper, PcbArc, type PcbArcConstructorParams, type PcbArcPoint, 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, PlotParamPlotFpText, PlotParamPlotFrameRef, PlotParamPlotInvisible, PlotParamPlotInvisibleText, PlotParamPlotOnAllLayers, PlotParamPlotOnAllLayersSelection, PlotParamPlotOtherText, PlotParamPlotPadNumbers, PlotParamPlotReference, PlotParamPlotValue, PlotParamProperty, PlotParamPsA4Output, PlotParamPsNegative, PlotParamScaleSelection, PlotParamSketchDnpOnFab, PlotParamSketchPadsOnFab, PlotParamSubtractMaskFromSilk, PlotParamSvgPrecision, PlotParamSvgUseInch, PlotParamUseAuxOrigin, PlotParamUseGerberAdvancedAttributes, PlotParamUseGerberAttributes, PlotParamUseGerberExtensions, PlotParamViaOnMask, Plugging, Polyline, type PolylineConstructorParams, Property, type PropertyConstructorParams, PropertyDoNotAutoplace, PropertyHide, PropertyShowName, PropertyUnlocked, Pts, PtsArc, PtsArcEnd, PtsArcMid, PtsArcStart, type RGBAColor, RenderCache, SchematicPolyline, SchematicRectangle, SchematicSymbol, type SchematicSymbolConstructorParams, SchematicText, SchematicTextBox, 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, SymbolBodyStyle, SymbolBodyStyles, SymbolCircle, SymbolCircleCenter, SymbolCircleFill, SymbolCircleRadius, SymbolDuplicatePinNumbersAreJumpers, SymbolFillType, SymbolInstancePath, SymbolInstanceReference, SymbolInstanceUnit, SymbolInstances, SymbolInstancesProject, SymbolLibId, SymbolLibName, SymbolPin, SymbolPinLength, SymbolPinName, SymbolPinNames, SymbolPinNamesHide, SymbolPinNamesOffset, SymbolPinNumber, SymbolPinNumbers, SymbolPinNumbersHide, SymbolPolyline, SymbolPolylineFill, type SymbolPolylineFillLike, SymbolPower, SymbolProperty, SymbolPropertyId, SymbolRectangle, SymbolRectangleEnd, SymbolRectangleFill, SymbolRectangleStart, SymbolText, SymbolTextBox, SymbolUnit, Target, TextBoxFill, TextBoxSize, 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, ZoneAttr, ZoneAttrTeardrop, ZoneAttrTeardropType, ZoneConnectPads, ZoneConnectPadsClearance, type ZoneConnectPadsMode, type ZoneConstructorParams, ZoneFill, ZoneFillIslandAreaMin, ZoneFillIslandRemovalMode, ZoneFillRadius, ZoneFillSmoothing, ZoneFillThermalBridgeWidth, ZoneFillThermalGap, ZoneFilledAreasThickness, ZoneFilledPolygon, ZoneFilledPolygonIsland, ZoneHatch, ZoneKeepout, ZoneKeepoutCopperpour, ZoneKeepoutFootprints, ZoneKeepoutPads, ZoneKeepoutTracks, ZoneKeepoutVias, ZoneMinThickness, ZoneName, ZoneNet, ZoneNetName, ZonePlacement, ZonePlacementEnabled, ZonePlacementSheetname, ZonePolygon, ZonePriority, parseKicadMod, parseKicadPcb, parseKicadSch, parseKicadSexpr };
|
|
6480
|
+
export { At, type AtInput, Back, Bus, type BusConstructorParams, BusEntry, type BusEntryConstructorParams, BusEntrySize, Capping, Color, Covering, Dimension, DimensionFormat, DimensionStyle, Dnp, EmbeddedFile, EmbeddedFileChecksum, type EmbeddedFileConstructorParams, EmbeddedFileData, EmbeddedFileName, EmbeddedFileType, EmbeddedFiles, type EmbeddedFilesConstructorParams, EmbeddedFonts, ExcludeFromSim, FieldsAutoplaced, Filling, Footprint, FootprintAttr, FootprintAutoplaceCost180, FootprintAutoplaceCost90, FootprintClearance, type FootprintConstructorParams, FootprintDescr, FootprintDuplicatePadNumbersAreJumpers, FootprintGenerator, FootprintGeneratorVersion, FootprintLocked, FootprintModel, FootprintNetTiePadGroups, FootprintPad, type FootprintPadConstructorParams, FootprintPath, FootprintPlaced, FootprintPoint, FootprintPointSize, FootprintPrivateLayers, FootprintSheetfile, FootprintSheetname, FootprintSolderMaskMargin, FootprintSolderPasteMargin, FootprintSolderPasteMarginRatio, FootprintSolderPasteRatio, FootprintTags, FootprintTedit, FootprintThermalGap, FootprintThermalWidth, FootprintUnit, FootprintUnitName, FootprintUnitPins, FootprintUnits, FootprintVersion, FootprintZoneConnect, FpArc, type FpArcConstructorParams, FpArcEnd, FpArcMid, FpArcStart, FpCircle, FpCircleCenter, type FpCircleConstructorParams, FpCircleEnd, FpCircleFill, FpCircleNet, FpCurve, type FpCurveConstructorParams, FpCurveLocked, FpLine, type FpLineConstructorParams, FpLineEnd, FpLineNet, FpLineStart, FpPoly, type FpPolyConstructorParams, FpPolyFill, FpPolyLocked, FpRect, type FpRectConstructorParams, FpRectEnd, FpRectFill, FpRectNet, FpRectStart, FpText, FpTextBox, FpTextBoxAngle, type FpTextBoxConstructorParams, FpTextBoxEnd, FpTextBoxStart, type FpTextConstructorParams, type FpTextType, Front, Generated, GlobalLabel, type GlobalLabelConstructorParams, type GlobalLabelShape, GrArc, type GrArcConstructorParams, GrArcEnd, GrArcLocked, 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, GrPolyNet, GrRect, type GrRectConstructorParams, GrRectEnd, GrRectFill, GrRectLocked, GrRectStart, GrText, type GrTextConstructorParams, GrTextLocked, type GrTextPosition, GrTextRenderCache, GrTextRenderCachePolygon, Group, type GroupConstructorParams, GroupLocked, GroupMembers, Image, type ImageConstructorParams, ImageData, ImageScale, InBom, InPosFiles, Junction, type JunctionConstructorParams, JunctionDiameter, KicadPcb, type KicadPcbConstructorParams, KicadSch, type KicadSchConstructorParams, KicadSchGenerator, KicadSchGeneratorVersion, KicadSchVersion, KicadSym, KicadSymbolLib, type KicadSymbolLibConstructorParams, KicadSymbolLibGenerator, KicadSymbolLibGeneratorVersion, 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, PadProperty, PadRectDelta, PadRoundrectRratio, PadSize, type PadSizeInput, PadSolderMaskMargin, PadSolderPasteMargin, PadSolderPasteMarginRatio, PadTeardrops, PadThermalBridgeAngle, PadThermalGap, PadThermalWidth, PadZoneConnect, PadZoneLayerConnections, Paper, PcbArc, type PcbArcConstructorParams, type PcbArcPoint, PcbGeneral, PcbGeneralLegacyTeardrops, PcbGeneralThickness, PcbGenerator, PcbGeneratorVersion, PcbLayerDefinition, PcbLayers, PcbNet, PcbPlotParams, PcbVersion, type PinElectricalType, type PinGraphicStyle, 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, PlotParamPlotFpText, PlotParamPlotFrameRef, PlotParamPlotInvisible, PlotParamPlotInvisibleText, PlotParamPlotOnAllLayers, PlotParamPlotOnAllLayersSelection, PlotParamPlotOtherText, PlotParamPlotPadNumbers, PlotParamPlotReference, PlotParamPlotValue, PlotParamProperty, PlotParamPsA4Output, PlotParamPsNegative, PlotParamScaleSelection, PlotParamSketchDnpOnFab, PlotParamSketchPadsOnFab, PlotParamSubtractMaskFromSilk, PlotParamSvgPrecision, PlotParamSvgUseInch, PlotParamUseAuxOrigin, PlotParamUseGerberAdvancedAttributes, PlotParamUseGerberAttributes, PlotParamUseGerberExtensions, PlotParamViaOnMask, Plugging, Polyline, type PolylineConstructorParams, Property, type PropertyConstructorParams, PropertyDoNotAutoplace, PropertyHide, PropertyShowName, PropertyUnlocked, Pts, PtsArc, PtsArcEnd, PtsArcMid, PtsArcStart, type RGBAColor, RenderCache, SchematicPolyline, SchematicRectangle, SchematicSymbol, type SchematicSymbolConstructorParams, SchematicText, SchematicTextBox, 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, SymbolBodyStyle, SymbolBodyStyles, SymbolCircle, SymbolCircleCenter, SymbolCircleFill, SymbolCircleRadius, SymbolDuplicatePinNumbersAreJumpers, SymbolFillType, SymbolInstancePath, SymbolInstanceReference, SymbolInstanceUnit, SymbolInstances, SymbolInstancesProject, SymbolLibId, SymbolLibName, SymbolPin, SymbolPinAlternate, type SymbolPinAlternateConstructorParams, SymbolPinLength, SymbolPinName, SymbolPinNames, SymbolPinNamesHide, SymbolPinNamesOffset, SymbolPinNumber, SymbolPinNumbers, SymbolPinNumbersHide, SymbolPolyline, SymbolPolylineFill, type SymbolPolylineFillLike, SymbolPower, SymbolProperty, SymbolPropertyId, SymbolRectangle, SymbolRectangleEnd, SymbolRectangleFill, SymbolRectangleStart, SymbolText, SymbolTextBox, SymbolUnit, Target, TextBoxFill, TextBoxSize, 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, ZoneAttr, ZoneAttrTeardrop, ZoneAttrTeardropType, ZoneConnectPads, ZoneConnectPadsClearance, type ZoneConnectPadsMode, type ZoneConstructorParams, ZoneFill, ZoneFillIslandAreaMin, ZoneFillIslandRemovalMode, ZoneFillRadius, ZoneFillSmoothing, ZoneFillThermalBridgeWidth, ZoneFillThermalGap, ZoneFilledAreasThickness, ZoneFilledPolygon, ZoneFilledPolygonIsland, ZoneHatch, ZoneKeepout, ZoneKeepoutCopperpour, ZoneKeepoutFootprints, ZoneKeepoutPads, ZoneKeepoutTracks, ZoneKeepoutVias, ZoneLocked, ZoneMinThickness, ZoneName, ZoneNet, ZoneNetName, ZonePlacement, ZonePlacementEnabled, ZonePlacementSheetname, ZonePolygon, ZonePriority, parseKicadMod, parseKicadPcb, parseKicadSch, parseKicadSexpr, parseKicadSym };
|
package/dist/index.js
CHANGED
|
@@ -3495,6 +3495,51 @@ var SymbolPinNumber = class _SymbolPinNumber extends SxClass {
|
|
|
3495
3495
|
}
|
|
3496
3496
|
};
|
|
3497
3497
|
SxClass.register(SymbolPinNumber);
|
|
3498
|
+
var SymbolPinAlternate = class _SymbolPinAlternate extends SxClass {
|
|
3499
|
+
static token = "alternate";
|
|
3500
|
+
static parentToken = "pin";
|
|
3501
|
+
token = "alternate";
|
|
3502
|
+
alternateName;
|
|
3503
|
+
pinElectricalType;
|
|
3504
|
+
pinGraphicStyle;
|
|
3505
|
+
constructor(params) {
|
|
3506
|
+
super();
|
|
3507
|
+
this.alternateName = params.alternateName;
|
|
3508
|
+
this.pinElectricalType = params.pinElectricalType;
|
|
3509
|
+
this.pinGraphicStyle = params.pinGraphicStyle;
|
|
3510
|
+
}
|
|
3511
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
3512
|
+
const [namePrimitive, electricalTypePrimitive, graphicStylePrimitive] = primitiveSexprs;
|
|
3513
|
+
const alternateName = toStringValue(namePrimitive);
|
|
3514
|
+
const electricalType = toStringValue(electricalTypePrimitive);
|
|
3515
|
+
const graphicStyle = toStringValue(graphicStylePrimitive);
|
|
3516
|
+
if (alternateName === void 0) {
|
|
3517
|
+
throw new Error("alternate expects a string name");
|
|
3518
|
+
}
|
|
3519
|
+
if (electricalType === void 0 || !electricalTypeSet.has(electricalType)) {
|
|
3520
|
+
throw new Error(
|
|
3521
|
+
`alternate encountered unsupported electrical type "${electricalType}"`
|
|
3522
|
+
);
|
|
3523
|
+
}
|
|
3524
|
+
if (graphicStyle === void 0 || !graphicStyleSet.has(graphicStyle)) {
|
|
3525
|
+
throw new Error(
|
|
3526
|
+
`alternate encountered unsupported graphic style "${graphicStyle}"`
|
|
3527
|
+
);
|
|
3528
|
+
}
|
|
3529
|
+
return new _SymbolPinAlternate({
|
|
3530
|
+
alternateName,
|
|
3531
|
+
pinElectricalType: electricalType,
|
|
3532
|
+
pinGraphicStyle: graphicStyle
|
|
3533
|
+
});
|
|
3534
|
+
}
|
|
3535
|
+
getChildren() {
|
|
3536
|
+
return [];
|
|
3537
|
+
}
|
|
3538
|
+
getString() {
|
|
3539
|
+
return `(alternate ${quoteSExprString(this.alternateName)} ${this.pinElectricalType} ${this.pinGraphicStyle})`;
|
|
3540
|
+
}
|
|
3541
|
+
};
|
|
3542
|
+
SxClass.register(SymbolPinAlternate);
|
|
3498
3543
|
var SymbolPin = class _SymbolPin extends SxClass {
|
|
3499
3544
|
static token = "pin";
|
|
3500
3545
|
static parentToken = "symbol";
|
|
@@ -3508,6 +3553,7 @@ var SymbolPin = class _SymbolPin extends SxClass {
|
|
|
3508
3553
|
_sxUuid;
|
|
3509
3554
|
inlineNumber;
|
|
3510
3555
|
_sxHide;
|
|
3556
|
+
_alternates = [];
|
|
3511
3557
|
static fromSexprPrimitives(args) {
|
|
3512
3558
|
const symbolPin = new _SymbolPin();
|
|
3513
3559
|
let index = 0;
|
|
@@ -3536,16 +3582,14 @@ var SymbolPin = class _SymbolPin extends SxClass {
|
|
|
3536
3582
|
}
|
|
3537
3583
|
primitiveNodes.push(primitive);
|
|
3538
3584
|
}
|
|
3539
|
-
const { propertyMap } = SxClass.parsePrimitivesToClassProperties(
|
|
3540
|
-
primitiveNodes,
|
|
3541
|
-
this.token
|
|
3542
|
-
);
|
|
3585
|
+
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveNodes, this.token);
|
|
3543
3586
|
symbolPin._sxAt = propertyMap.at;
|
|
3544
3587
|
symbolPin._sxLength = propertyMap.length;
|
|
3545
3588
|
symbolPin._sxName = propertyMap.name;
|
|
3546
3589
|
symbolPin._sxNumber = propertyMap.number;
|
|
3547
3590
|
symbolPin._sxUuid = propertyMap.uuid;
|
|
3548
3591
|
symbolPin._sxHide = propertyMap.hide;
|
|
3592
|
+
symbolPin.alternates = arrayPropertyMap.alternate ?? [];
|
|
3549
3593
|
for (const flag of primitiveStrings) {
|
|
3550
3594
|
if (flag === "hide") {
|
|
3551
3595
|
symbolPin._sxHide = new SymbolPinHide(true, { inline: true });
|
|
@@ -3601,6 +3645,12 @@ var SymbolPin = class _SymbolPin extends SxClass {
|
|
|
3601
3645
|
set hidden(value) {
|
|
3602
3646
|
this._sxHide = value ? new SymbolPinHide(value) : void 0;
|
|
3603
3647
|
}
|
|
3648
|
+
get alternates() {
|
|
3649
|
+
return [...this._alternates];
|
|
3650
|
+
}
|
|
3651
|
+
set alternates(value) {
|
|
3652
|
+
this._alternates = [...value];
|
|
3653
|
+
}
|
|
3604
3654
|
getChildren() {
|
|
3605
3655
|
const children = [];
|
|
3606
3656
|
if (this._sxAt) children.push(this._sxAt);
|
|
@@ -3609,6 +3659,7 @@ var SymbolPin = class _SymbolPin extends SxClass {
|
|
|
3609
3659
|
if (this._sxNumber) children.push(this._sxNumber);
|
|
3610
3660
|
if (this._sxUuid) children.push(this._sxUuid);
|
|
3611
3661
|
if (this._sxHide) children.push(this._sxHide);
|
|
3662
|
+
children.push(...this._alternates);
|
|
3612
3663
|
return children;
|
|
3613
3664
|
}
|
|
3614
3665
|
getString() {
|
|
@@ -3901,6 +3952,7 @@ var KicadSymbolLib = class _KicadSymbolLib extends SxClass {
|
|
|
3901
3952
|
}
|
|
3902
3953
|
};
|
|
3903
3954
|
SxClass.register(KicadSymbolLib);
|
|
3955
|
+
var KicadSym = KicadSymbolLib;
|
|
3904
3956
|
|
|
3905
3957
|
// lib/sexpr/classes/LibSymbols.ts
|
|
3906
3958
|
var SUPPORTED_ARRAY_TOKENS = /* @__PURE__ */ new Set(["symbol"]);
|
|
@@ -12833,6 +12885,26 @@ var ZoneKeepout = class _ZoneKeepout extends SxClass {
|
|
|
12833
12885
|
};
|
|
12834
12886
|
SxClass.register(ZoneKeepout);
|
|
12835
12887
|
|
|
12888
|
+
// lib/sexpr/classes/ZoneLocked.ts
|
|
12889
|
+
var ZoneLocked = class _ZoneLocked extends SxPrimitiveBoolean {
|
|
12890
|
+
static token = "locked";
|
|
12891
|
+
static parentToken = "zone";
|
|
12892
|
+
token = "locked";
|
|
12893
|
+
constructor(value) {
|
|
12894
|
+
super(value);
|
|
12895
|
+
}
|
|
12896
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
12897
|
+
if (primitiveSexprs.length === 0) {
|
|
12898
|
+
return new _ZoneLocked(true);
|
|
12899
|
+
}
|
|
12900
|
+
return new _ZoneLocked(parseYesNo(primitiveSexprs[0]) ?? false);
|
|
12901
|
+
}
|
|
12902
|
+
getString() {
|
|
12903
|
+
return `(locked ${this.value ? "yes" : "no"})`;
|
|
12904
|
+
}
|
|
12905
|
+
};
|
|
12906
|
+
SxClass.register(ZoneLocked);
|
|
12907
|
+
|
|
12836
12908
|
// lib/sexpr/classes/ZoneMinThickness.ts
|
|
12837
12909
|
var ZoneMinThickness = class extends SxPrimitiveNumber {
|
|
12838
12910
|
static token = "min_thickness";
|
|
@@ -12997,6 +13069,7 @@ var SINGLE_TOKENS4 = /* @__PURE__ */ new Set([
|
|
|
12997
13069
|
"layers",
|
|
12998
13070
|
"tstamp",
|
|
12999
13071
|
"uuid",
|
|
13072
|
+
"locked",
|
|
13000
13073
|
"name",
|
|
13001
13074
|
"hatch",
|
|
13002
13075
|
"priority",
|
|
@@ -13019,6 +13092,7 @@ var Zone = class _Zone extends SxClass {
|
|
|
13019
13092
|
_sxLayers;
|
|
13020
13093
|
_sxTstamp;
|
|
13021
13094
|
_sxUuid;
|
|
13095
|
+
_sxLocked;
|
|
13022
13096
|
_sxName;
|
|
13023
13097
|
_sxHatch;
|
|
13024
13098
|
_sxPriority;
|
|
@@ -13039,6 +13113,7 @@ var Zone = class _Zone extends SxClass {
|
|
|
13039
13113
|
if (params.layers !== void 0) this.layers = params.layers;
|
|
13040
13114
|
if (params.tstamp !== void 0) this.tstamp = params.tstamp;
|
|
13041
13115
|
if (params.uuid !== void 0) this.uuid = params.uuid;
|
|
13116
|
+
if (params.locked !== void 0) this.locked = params.locked;
|
|
13042
13117
|
if (params.name !== void 0) this.name = params.name;
|
|
13043
13118
|
if (params.hatch !== void 0) this.hatch = params.hatch;
|
|
13044
13119
|
if (params.priority !== void 0) this.priority = params.priority;
|
|
@@ -13082,6 +13157,8 @@ var Zone = class _Zone extends SxClass {
|
|
|
13082
13157
|
}
|
|
13083
13158
|
zone._sxTstamp = propertyMap.tstamp;
|
|
13084
13159
|
zone._sxUuid = propertyMap.uuid;
|
|
13160
|
+
const locked = propertyMap.locked;
|
|
13161
|
+
zone._sxLocked = locked && locked.value ? locked : void 0;
|
|
13085
13162
|
zone._sxName = propertyMap.name;
|
|
13086
13163
|
zone._sxHatch = propertyMap.hatch;
|
|
13087
13164
|
zone._sxPriority = propertyMap.priority;
|
|
@@ -13145,6 +13222,20 @@ var Zone = class _Zone extends SxClass {
|
|
|
13145
13222
|
set uuid(value) {
|
|
13146
13223
|
this._sxUuid = value === void 0 ? void 0 : value instanceof Uuid ? value : new Uuid(value);
|
|
13147
13224
|
}
|
|
13225
|
+
get locked() {
|
|
13226
|
+
return this._sxLocked?.value ?? false;
|
|
13227
|
+
}
|
|
13228
|
+
set locked(value) {
|
|
13229
|
+
if (value === void 0) {
|
|
13230
|
+
this._sxLocked = void 0;
|
|
13231
|
+
return;
|
|
13232
|
+
}
|
|
13233
|
+
if (value instanceof ZoneLocked) {
|
|
13234
|
+
this._sxLocked = value.value ? value : void 0;
|
|
13235
|
+
return;
|
|
13236
|
+
}
|
|
13237
|
+
this._sxLocked = value ? new ZoneLocked(true) : void 0;
|
|
13238
|
+
}
|
|
13148
13239
|
get name() {
|
|
13149
13240
|
return this._sxName?.value;
|
|
13150
13241
|
}
|
|
@@ -13225,6 +13316,7 @@ var Zone = class _Zone extends SxClass {
|
|
|
13225
13316
|
if (this._sxLayers) children.push(this._sxLayers);
|
|
13226
13317
|
if (this._sxTstamp) children.push(this._sxTstamp);
|
|
13227
13318
|
if (this._sxUuid) children.push(this._sxUuid);
|
|
13319
|
+
if (this._sxLocked) children.push(this._sxLocked);
|
|
13228
13320
|
if (this._sxName) children.push(this._sxName);
|
|
13229
13321
|
if (this._sxHatch) children.push(this._sxHatch);
|
|
13230
13322
|
if (this._sxPriority) children.push(this._sxPriority);
|
|
@@ -15589,9 +15681,6 @@ var GrText = class _GrText extends SxClass {
|
|
|
15589
15681
|
if (!grText._sxLayer) {
|
|
15590
15682
|
throw new Error("gr_text requires a layer child token");
|
|
15591
15683
|
}
|
|
15592
|
-
if (!grText._sxUuid && !grText._sxTstamp) {
|
|
15593
|
-
throw new Error("gr_text requires a uuid or tstamp child token");
|
|
15594
|
-
}
|
|
15595
15684
|
if (!grText._sxEffects) {
|
|
15596
15685
|
throw new Error("gr_text requires an effects child token");
|
|
15597
15686
|
}
|
|
@@ -20465,6 +20554,15 @@ var parseKicadPcb = (sexpr) => {
|
|
|
20465
20554
|
}
|
|
20466
20555
|
return root;
|
|
20467
20556
|
};
|
|
20557
|
+
var parseKicadSym = (sexpr) => {
|
|
20558
|
+
const [root] = parseKicadSexpr(sexpr);
|
|
20559
|
+
if (!(root instanceof KicadSymbolLib)) {
|
|
20560
|
+
throw new Error(
|
|
20561
|
+
`Expected KicadSym root, got ${root?.constructor.name ?? "undefined"}`
|
|
20562
|
+
);
|
|
20563
|
+
}
|
|
20564
|
+
return root;
|
|
20565
|
+
};
|
|
20468
20566
|
var parseKicadMod = (sexpr) => {
|
|
20469
20567
|
const [root] = parseKicadSexpr(sexpr);
|
|
20470
20568
|
if (!(root instanceof Footprint)) {
|
|
@@ -20604,6 +20702,7 @@ export {
|
|
|
20604
20702
|
KicadSchGenerator,
|
|
20605
20703
|
KicadSchGeneratorVersion,
|
|
20606
20704
|
KicadSchVersion,
|
|
20705
|
+
KicadSym,
|
|
20607
20706
|
KicadSymbolLib,
|
|
20608
20707
|
KicadSymbolLibGenerator,
|
|
20609
20708
|
KicadSymbolLibGeneratorVersion,
|
|
@@ -20816,6 +20915,7 @@ export {
|
|
|
20816
20915
|
SymbolLibId,
|
|
20817
20916
|
SymbolLibName,
|
|
20818
20917
|
SymbolPin,
|
|
20918
|
+
SymbolPinAlternate,
|
|
20819
20919
|
SymbolPinLength,
|
|
20820
20920
|
SymbolPinName,
|
|
20821
20921
|
SymbolPinNames,
|
|
@@ -20885,6 +20985,7 @@ export {
|
|
|
20885
20985
|
ZoneKeepoutPads,
|
|
20886
20986
|
ZoneKeepoutTracks,
|
|
20887
20987
|
ZoneKeepoutVias,
|
|
20988
|
+
ZoneLocked,
|
|
20888
20989
|
ZoneMinThickness,
|
|
20889
20990
|
ZoneName,
|
|
20890
20991
|
ZoneNet,
|
|
@@ -20897,5 +20998,6 @@ export {
|
|
|
20897
20998
|
parseKicadMod,
|
|
20898
20999
|
parseKicadPcb,
|
|
20899
21000
|
parseKicadSch,
|
|
20900
|
-
parseKicadSexpr
|
|
21001
|
+
parseKicadSexpr,
|
|
21002
|
+
parseKicadSym
|
|
20901
21003
|
};
|