kicadts 0.0.43 → 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 +24 -1
- package/dist/index.js +69 -5
- 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;
|
|
@@ -6452,6 +6474,7 @@ declare class KicadPcb extends SxClass {
|
|
|
6452
6474
|
declare const parseKicadSexpr: (sexpr: string) => SxClass[];
|
|
6453
6475
|
declare const parseKicadSch: (sexpr: string) => KicadSch;
|
|
6454
6476
|
declare const parseKicadPcb: (sexpr: string) => KicadPcb;
|
|
6477
|
+
declare const parseKicadSym: (sexpr: string) => KicadSymbolLib;
|
|
6455
6478
|
declare const parseKicadMod: (sexpr: string) => Footprint;
|
|
6456
6479
|
|
|
6457
|
-
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, ZoneLocked, 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"]);
|
|
@@ -20502,6 +20554,15 @@ var parseKicadPcb = (sexpr) => {
|
|
|
20502
20554
|
}
|
|
20503
20555
|
return root;
|
|
20504
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
|
+
};
|
|
20505
20566
|
var parseKicadMod = (sexpr) => {
|
|
20506
20567
|
const [root] = parseKicadSexpr(sexpr);
|
|
20507
20568
|
if (!(root instanceof Footprint)) {
|
|
@@ -20641,6 +20702,7 @@ export {
|
|
|
20641
20702
|
KicadSchGenerator,
|
|
20642
20703
|
KicadSchGeneratorVersion,
|
|
20643
20704
|
KicadSchVersion,
|
|
20705
|
+
KicadSym,
|
|
20644
20706
|
KicadSymbolLib,
|
|
20645
20707
|
KicadSymbolLibGenerator,
|
|
20646
20708
|
KicadSymbolLibGeneratorVersion,
|
|
@@ -20853,6 +20915,7 @@ export {
|
|
|
20853
20915
|
SymbolLibId,
|
|
20854
20916
|
SymbolLibName,
|
|
20855
20917
|
SymbolPin,
|
|
20918
|
+
SymbolPinAlternate,
|
|
20856
20919
|
SymbolPinLength,
|
|
20857
20920
|
SymbolPinName,
|
|
20858
20921
|
SymbolPinNames,
|
|
@@ -20935,5 +20998,6 @@ export {
|
|
|
20935
20998
|
parseKicadMod,
|
|
20936
20999
|
parseKicadPcb,
|
|
20937
21000
|
parseKicadSch,
|
|
20938
|
-
parseKicadSexpr
|
|
21001
|
+
parseKicadSexpr,
|
|
21002
|
+
parseKicadSym
|
|
20939
21003
|
};
|