kicadts 0.0.26 → 0.0.28
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 +77 -1
- package/dist/index.js +546 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1815,6 +1815,7 @@ declare class FootprintAttr extends SxClass {
|
|
|
1815
1815
|
private _boardOnly;
|
|
1816
1816
|
private _excludeFromPosFiles;
|
|
1817
1817
|
private _excludeFromBom;
|
|
1818
|
+
private _allowMissingCourtyard;
|
|
1818
1819
|
private _allowSoldermaskBridges;
|
|
1819
1820
|
private _dnp;
|
|
1820
1821
|
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): FootprintAttr;
|
|
@@ -1829,6 +1830,8 @@ declare class FootprintAttr extends SxClass {
|
|
|
1829
1830
|
set excludeFromBom(value: boolean);
|
|
1830
1831
|
get allowSoldermaskBridges(): boolean;
|
|
1831
1832
|
set allowSoldermaskBridges(value: boolean);
|
|
1833
|
+
get allowMissingCourtyard(): boolean;
|
|
1834
|
+
set allowMissingCourtyard(value: boolean);
|
|
1832
1835
|
get dnp(): boolean;
|
|
1833
1836
|
set dnp(value: boolean);
|
|
1834
1837
|
getChildren(): SxClass[];
|
|
@@ -4109,6 +4112,72 @@ declare class GrPoly extends SxClass {
|
|
|
4109
4112
|
getChildren(): SxClass[];
|
|
4110
4113
|
}
|
|
4111
4114
|
|
|
4115
|
+
declare class DimensionFormat extends SxClass {
|
|
4116
|
+
static token: string;
|
|
4117
|
+
static parentToken: string;
|
|
4118
|
+
token: string;
|
|
4119
|
+
private _sxPrefix?;
|
|
4120
|
+
private _sxSuffix?;
|
|
4121
|
+
private _sxUnits?;
|
|
4122
|
+
private _sxUnitsFormat?;
|
|
4123
|
+
private _sxPrecision?;
|
|
4124
|
+
private _sxOverrideValue?;
|
|
4125
|
+
private _sxSuppressZeros?;
|
|
4126
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): DimensionFormat;
|
|
4127
|
+
getChildren(): SxClass[];
|
|
4128
|
+
}
|
|
4129
|
+
|
|
4130
|
+
declare class DimensionStyle extends SxClass {
|
|
4131
|
+
static token: string;
|
|
4132
|
+
static parentToken: string;
|
|
4133
|
+
token: string;
|
|
4134
|
+
private _sxThickness?;
|
|
4135
|
+
private _sxArrowLength?;
|
|
4136
|
+
private _sxTextPositionMode?;
|
|
4137
|
+
private _sxArrowDirection?;
|
|
4138
|
+
private _sxExtensionHeight?;
|
|
4139
|
+
private _sxTextFrame?;
|
|
4140
|
+
private _sxExtensionOffset?;
|
|
4141
|
+
private _sxKeepTextAligned?;
|
|
4142
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): DimensionStyle;
|
|
4143
|
+
getChildren(): SxClass[];
|
|
4144
|
+
}
|
|
4145
|
+
|
|
4146
|
+
declare class Dimension extends SxClass {
|
|
4147
|
+
static token: string;
|
|
4148
|
+
static parentToken: string;
|
|
4149
|
+
token: string;
|
|
4150
|
+
private _sxLocked?;
|
|
4151
|
+
private _sxType?;
|
|
4152
|
+
private _sxLayer?;
|
|
4153
|
+
private _sxUuid?;
|
|
4154
|
+
private _sxPts?;
|
|
4155
|
+
private _sxHeight?;
|
|
4156
|
+
private _sxOrientation?;
|
|
4157
|
+
private _sxLeaderLength?;
|
|
4158
|
+
private _sxFormat?;
|
|
4159
|
+
private _sxStyle?;
|
|
4160
|
+
private _sxGrText?;
|
|
4161
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): Dimension;
|
|
4162
|
+
getChildren(): SxClass[];
|
|
4163
|
+
}
|
|
4164
|
+
|
|
4165
|
+
declare class Target extends SxClass {
|
|
4166
|
+
static token: string;
|
|
4167
|
+
static parentToken: string;
|
|
4168
|
+
token: string;
|
|
4169
|
+
private _shape;
|
|
4170
|
+
private _sxAt?;
|
|
4171
|
+
private _sxSize?;
|
|
4172
|
+
private _sxWidth?;
|
|
4173
|
+
private _sxLayer?;
|
|
4174
|
+
private _sxUuid?;
|
|
4175
|
+
constructor(shape: string);
|
|
4176
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): Target;
|
|
4177
|
+
getChildren(): SxClass[];
|
|
4178
|
+
getString(): string;
|
|
4179
|
+
}
|
|
4180
|
+
|
|
4112
4181
|
interface GroupConstructorParams {
|
|
4113
4182
|
name?: string;
|
|
4114
4183
|
uuid?: string | Uuid;
|
|
@@ -4426,6 +4495,8 @@ declare class PcbPlotParams extends SxClass {
|
|
|
4426
4495
|
set plotreference(value: string | undefined);
|
|
4427
4496
|
get plotvalue(): string | undefined;
|
|
4428
4497
|
set plotvalue(value: string | undefined);
|
|
4498
|
+
get plotfptext(): string | undefined;
|
|
4499
|
+
set plotfptext(value: string | undefined);
|
|
4429
4500
|
get plotothertext(): string | undefined;
|
|
4430
4501
|
set plotothertext(value: string | undefined);
|
|
4431
4502
|
get plotinvisibletext(): string | undefined;
|
|
@@ -4754,6 +4825,11 @@ declare abstract class PlotParamProperty<T extends string | number> extends Sing
|
|
|
4754
4825
|
static parentToken: string;
|
|
4755
4826
|
}
|
|
4756
4827
|
|
|
4828
|
+
declare class PlotParamPlotFpText extends PlotParamProperty<string> {
|
|
4829
|
+
static token: string;
|
|
4830
|
+
token: string;
|
|
4831
|
+
}
|
|
4832
|
+
|
|
4757
4833
|
declare abstract class PlotParamNumberProperty extends PlotParamProperty<number> {
|
|
4758
4834
|
protected static parsePrimitiveValue(value: PrimitiveSExpr | undefined): number;
|
|
4759
4835
|
}
|
|
@@ -5446,4 +5522,4 @@ declare const parseKicadSch: (sexpr: string) => KicadSch;
|
|
|
5446
5522
|
declare const parseKicadPcb: (sexpr: string) => KicadPcb;
|
|
5447
5523
|
declare const parseKicadMod: (sexpr: string) => Footprint;
|
|
5448
5524
|
|
|
5449
|
-
export { At, type AtInput, Bus, type BusConstructorParams, BusEntry, type BusEntryConstructorParams, BusEntrySize, Color, Dnp, EmbeddedFile, EmbeddedFileChecksum, type EmbeddedFileConstructorParams, EmbeddedFileData, EmbeddedFileName, EmbeddedFileType, EmbeddedFiles, type EmbeddedFilesConstructorParams, EmbeddedFonts, ExcludeFromSim, FieldsAutoplaced, Footprint, FootprintAttr, FootprintAutoplaceCost180, FootprintAutoplaceCost90, FootprintClearance, type FootprintConstructorParams, FootprintDescr, FootprintGenerator, FootprintGeneratorVersion, FootprintLocked, FootprintModel, FootprintNetTiePadGroups, FootprintPad, type FootprintPadConstructorParams, FootprintPath, FootprintPlaced, FootprintPrivateLayers, FootprintSheetfile, FootprintSheetname, FootprintSolderMaskMargin, FootprintSolderPasteMargin, FootprintSolderPasteRatio, FootprintTags, FootprintTedit, FootprintThermalGap, FootprintThermalWidth, FootprintVersion, FootprintZoneConnect, FpArc, type FpArcConstructorParams, FpArcEnd, FpArcMid, FpArcStart, FpCircle, FpCircleCenter, type FpCircleConstructorParams, FpCircleEnd, FpCircleFill, FpLine, type FpLineConstructorParams, FpLineEnd, FpLineStart, FpPoly, type FpPolyConstructorParams, FpPolyFill, FpPolyLocked, FpRect, type FpRectConstructorParams, FpRectEnd, FpRectFill, FpRectStart, FpText, FpTextBox, FpTextBoxAngle, type FpTextBoxConstructorParams, FpTextBoxEnd, FpTextBoxStart, type FpTextConstructorParams, type FpTextType, Generated, GlobalLabel, type GlobalLabelConstructorParams, type GlobalLabelShape, GrArc, type GrArcConstructorParams, GrArcEnd, GrArcMid, type GrArcPoint, GrArcStart, GrCircle, GrCircleCenter, type GrCircleConstructorParams, GrCircleEnd, GrCircleLocked, type GrCirclePoint, GrCurve, type GrCurveConstructorParams, GrLine, GrLineAngle, type GrLineConstructorParams, GrLineEnd, GrLineLocked, type GrLinePoint, GrLineStart, GrPoly, type GrPolyConstructorParams, GrPolyFill, GrRect, type GrRectConstructorParams, GrRectEnd, GrRectFill, GrRectLocked, GrRectStart, GrText, type GrTextConstructorParams, type GrTextPosition, GrTextRenderCache, GrTextRenderCachePolygon, Group, type GroupConstructorParams, GroupLocked, GroupMembers, Image, type ImageConstructorParams, ImageData, ImageScale, InBom, Junction, type JunctionConstructorParams, JunctionDiameter, KicadPcb, type KicadPcbConstructorParams, KicadSch, type KicadSchConstructorParams, KicadSchGenerator, KicadSchGeneratorVersion, KicadSchVersion, KicadSymbolLib, type KicadSymbolLibConstructorParams, KicadSymbolLibGenerator, KicadSymbolLibVersion, Label, type LabelConstructorParams, Layer, Layers, LibSymbols, Mirror, type ModelVector, NoConnect, type NoConnectConstructorParams, OnBoard, PadChamfer, PadChamferRatio, PadClearance, PadDieLength, PadDrill, PadDrillOffset, PadLayers, type PadLayersInput, PadNet, PadOptions, type PadOptionsAnchorShape, type PadOptionsClearanceType, PadPinFunction, PadPinType, PadPrimitiveGrArc, type PadPrimitiveGrArcConstructorParams, PadPrimitiveGrCircle, type PadPrimitiveGrCircleConstructorParams, PadPrimitiveGrCircleFill, PadPrimitiveGrLine, PadPrimitiveGrPoly, PadPrimitives, PadProperty, PadRectDelta, PadRoundrectRratio, PadSize, type PadSizeInput, PadSolderMaskMargin, PadSolderPasteMargin, PadSolderPasteMarginRatio, PadTeardrops, PadThermalBridgeAngle, PadThermalGap, PadThermalWidth, PadZoneConnect, 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, PlotParamPlotFrameRef, PlotParamPlotInvisible, PlotParamPlotInvisibleText, PlotParamPlotOnAllLayers, PlotParamPlotOnAllLayersSelection, PlotParamPlotOtherText, PlotParamPlotPadNumbers, PlotParamPlotReference, PlotParamPlotValue, PlotParamProperty, PlotParamPsA4Output, PlotParamPsNegative, PlotParamScaleSelection, PlotParamSketchDnpOnFab, PlotParamSketchPadsOnFab, PlotParamSubtractMaskFromSilk, PlotParamSvgPrecision, PlotParamUseAuxOrigin, PlotParamUseGerberAdvancedAttributes, PlotParamUseGerberAttributes, PlotParamUseGerberExtensions, PlotParamViaOnMask, Polyline, type PolylineConstructorParams, Property, type PropertyConstructorParams, PropertyHide, PropertyUnlocked, Pts, PtsArc, PtsArcEnd, PtsArcMid, PtsArcStart, type RGBAColor, RenderCache, SchematicPolyline, SchematicSymbol, type SchematicSymbolConstructorParams, SchematicText, type SchematicTextConstructorParams, Segment, type SegmentConstructorParams, SegmentEnd, SegmentLocked, SegmentNet, SegmentStart, Setup, SetupAllowSoldermaskBridgesInFootprints, SetupAuxAxisOrigin, SetupEdgeWidth, SetupGridOrigin, SetupLastTraceWidth, SetupModEdgeWidth, SetupModTextSize, SetupModTextWidth, SetupPadDrill, SetupPadSize, SetupPadToMaskClearance, SetupPadToPasteClearance, SetupPadToPasteClearanceRatio, SetupPadToPasteClearanceValues, SetupPcbTextSize, SetupPcbTextWidth, type SetupProperty, type SetupPropertyValues, SetupSegmentWidth, SetupSolderMaskMinWidth, SetupTenting, SetupTraceClearance, SetupTraceMin, SetupTraceWidth, SetupUviaDrill, SetupUviaMinDrill, SetupUviaMinSize, SetupUviaSize, SetupUviasAllowed, SetupViaDrill, SetupViaMinDrill, SetupViaMinSize, SetupViaSize, SetupVisibleElements, SetupZone45Only, SetupZoneClearance, Sheet, type SheetConstructorParams, SheetFill, SheetInstancePage, SheetInstancePath, SheetInstances, SheetInstancesForSheet, SheetInstancesProject, SheetInstancesRoot, SheetInstancesRootPage, SheetInstancesRootPath, SheetPin, type SheetPinElectricalType, SheetProperty, SheetSize, Stackup, StackupCastellatedPads, StackupCopperFinish, StackupDielectricConstraints, StackupEdgeConnector, StackupEdgePlating, StackupLayer, StackupLayerColor, StackupLayerEpsilonR, StackupLayerLossTangent, StackupLayerMaterial, StackupLayerThickness, StackupLayerType, type StandardPaperSize, Stroke, type StrokeProperty, StrokeType, type StrokeTypeString, SxClass, SymbolArc, SymbolArcEnd, SymbolArcFill, SymbolArcMid, SymbolArcStart, SymbolCircle, SymbolCircleCenter, SymbolCircleFill, SymbolCircleRadius, SymbolDuplicatePinNumbersAreJumpers, SymbolFillType, SymbolInstancePath, SymbolInstanceReference, SymbolInstanceUnit, SymbolInstances, SymbolInstancesProject, SymbolLibId, SymbolPin, SymbolPinLength, SymbolPinName, SymbolPinNames, SymbolPinNamesHide, SymbolPinNamesOffset, SymbolPinNumber, SymbolPinNumbers, SymbolPinNumbersHide, SymbolPolyline, SymbolPolylineFill, type SymbolPolylineFillLike, SymbolPower, SymbolProperty, SymbolPropertyId, SymbolRectangle, SymbolRectangleEnd, SymbolRectangleFill, SymbolRectangleStart, SymbolText, SymbolUnit, TextEffects, type TextEffectsConstructorParams, TextEffectsFont, TextEffectsFontBold, TextEffectsFontFace, TextEffectsFontItalic, TextEffectsFontLineSpacing, type TextEffectsFontProperty, TextEffectsFontSize, TextEffectsFontThickness, TextEffectsJustify, type TextEffectsProperty, TitleBlock, TitleBlockComment, TitleBlockCompany, type TitleBlockConstructorParams, TitleBlockDate, TitleBlockRevision, TitleBlockTitle, Tstamp, Unit, type UnitString, Uuid, Via, type ViaConstructorParams, ViaNet, Width, Wire, type WireConstructorParams, Xy, Zone, parseKicadMod, parseKicadPcb, parseKicadSch, parseKicadSexpr };
|
|
5525
|
+
export { At, type AtInput, Bus, type BusConstructorParams, BusEntry, type BusEntryConstructorParams, BusEntrySize, Color, Dimension, DimensionFormat, DimensionStyle, Dnp, EmbeddedFile, EmbeddedFileChecksum, type EmbeddedFileConstructorParams, EmbeddedFileData, EmbeddedFileName, EmbeddedFileType, EmbeddedFiles, type EmbeddedFilesConstructorParams, EmbeddedFonts, ExcludeFromSim, FieldsAutoplaced, Footprint, FootprintAttr, FootprintAutoplaceCost180, FootprintAutoplaceCost90, FootprintClearance, type FootprintConstructorParams, FootprintDescr, FootprintGenerator, FootprintGeneratorVersion, FootprintLocked, FootprintModel, FootprintNetTiePadGroups, FootprintPad, type FootprintPadConstructorParams, FootprintPath, FootprintPlaced, FootprintPrivateLayers, FootprintSheetfile, FootprintSheetname, FootprintSolderMaskMargin, FootprintSolderPasteMargin, FootprintSolderPasteRatio, FootprintTags, FootprintTedit, FootprintThermalGap, FootprintThermalWidth, FootprintVersion, FootprintZoneConnect, FpArc, type FpArcConstructorParams, FpArcEnd, FpArcMid, FpArcStart, FpCircle, FpCircleCenter, type FpCircleConstructorParams, FpCircleEnd, FpCircleFill, FpLine, type FpLineConstructorParams, FpLineEnd, FpLineStart, FpPoly, type FpPolyConstructorParams, FpPolyFill, FpPolyLocked, FpRect, type FpRectConstructorParams, FpRectEnd, FpRectFill, FpRectStart, FpText, FpTextBox, FpTextBoxAngle, type FpTextBoxConstructorParams, FpTextBoxEnd, FpTextBoxStart, type FpTextConstructorParams, type FpTextType, Generated, GlobalLabel, type GlobalLabelConstructorParams, type GlobalLabelShape, GrArc, type GrArcConstructorParams, GrArcEnd, GrArcMid, type GrArcPoint, GrArcStart, GrCircle, GrCircleCenter, type GrCircleConstructorParams, GrCircleEnd, GrCircleLocked, type GrCirclePoint, GrCurve, type GrCurveConstructorParams, GrLine, GrLineAngle, type GrLineConstructorParams, GrLineEnd, GrLineLocked, type GrLinePoint, GrLineStart, GrPoly, type GrPolyConstructorParams, GrPolyFill, GrRect, type GrRectConstructorParams, GrRectEnd, GrRectFill, GrRectLocked, GrRectStart, GrText, type GrTextConstructorParams, type GrTextPosition, GrTextRenderCache, GrTextRenderCachePolygon, Group, type GroupConstructorParams, GroupLocked, GroupMembers, Image, type ImageConstructorParams, ImageData, ImageScale, InBom, Junction, type JunctionConstructorParams, JunctionDiameter, KicadPcb, type KicadPcbConstructorParams, KicadSch, type KicadSchConstructorParams, KicadSchGenerator, KicadSchGeneratorVersion, KicadSchVersion, KicadSymbolLib, type KicadSymbolLibConstructorParams, KicadSymbolLibGenerator, KicadSymbolLibVersion, Label, type LabelConstructorParams, Layer, Layers, LibSymbols, Mirror, type ModelVector, NoConnect, type NoConnectConstructorParams, OnBoard, PadChamfer, PadChamferRatio, PadClearance, PadDieLength, PadDrill, PadDrillOffset, PadLayers, type PadLayersInput, PadNet, PadOptions, type PadOptionsAnchorShape, type PadOptionsClearanceType, PadPinFunction, PadPinType, PadPrimitiveGrArc, type PadPrimitiveGrArcConstructorParams, PadPrimitiveGrCircle, type PadPrimitiveGrCircleConstructorParams, PadPrimitiveGrCircleFill, PadPrimitiveGrLine, PadPrimitiveGrPoly, PadPrimitives, PadProperty, PadRectDelta, PadRoundrectRratio, PadSize, type PadSizeInput, PadSolderMaskMargin, PadSolderPasteMargin, PadSolderPasteMarginRatio, PadTeardrops, PadThermalBridgeAngle, PadThermalGap, PadThermalWidth, PadZoneConnect, 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, PlotParamUseAuxOrigin, PlotParamUseGerberAdvancedAttributes, PlotParamUseGerberAttributes, PlotParamUseGerberExtensions, PlotParamViaOnMask, Polyline, type PolylineConstructorParams, Property, type PropertyConstructorParams, PropertyHide, PropertyUnlocked, Pts, PtsArc, PtsArcEnd, PtsArcMid, PtsArcStart, type RGBAColor, RenderCache, SchematicPolyline, SchematicSymbol, type SchematicSymbolConstructorParams, SchematicText, type SchematicTextConstructorParams, Segment, type SegmentConstructorParams, SegmentEnd, SegmentLocked, SegmentNet, SegmentStart, Setup, SetupAllowSoldermaskBridgesInFootprints, SetupAuxAxisOrigin, SetupEdgeWidth, SetupGridOrigin, SetupLastTraceWidth, SetupModEdgeWidth, SetupModTextSize, SetupModTextWidth, SetupPadDrill, SetupPadSize, SetupPadToMaskClearance, SetupPadToPasteClearance, SetupPadToPasteClearanceRatio, SetupPadToPasteClearanceValues, SetupPcbTextSize, SetupPcbTextWidth, type SetupProperty, type SetupPropertyValues, SetupSegmentWidth, SetupSolderMaskMinWidth, SetupTenting, SetupTraceClearance, SetupTraceMin, SetupTraceWidth, SetupUviaDrill, SetupUviaMinDrill, SetupUviaMinSize, SetupUviaSize, SetupUviasAllowed, SetupViaDrill, SetupViaMinDrill, SetupViaMinSize, SetupViaSize, SetupVisibleElements, SetupZone45Only, SetupZoneClearance, Sheet, type SheetConstructorParams, SheetFill, SheetInstancePage, SheetInstancePath, SheetInstances, SheetInstancesForSheet, SheetInstancesProject, SheetInstancesRoot, SheetInstancesRootPage, SheetInstancesRootPath, SheetPin, type SheetPinElectricalType, SheetProperty, SheetSize, Stackup, StackupCastellatedPads, StackupCopperFinish, StackupDielectricConstraints, StackupEdgeConnector, StackupEdgePlating, StackupLayer, StackupLayerColor, StackupLayerEpsilonR, StackupLayerLossTangent, StackupLayerMaterial, StackupLayerThickness, StackupLayerType, type StandardPaperSize, Stroke, type StrokeProperty, StrokeType, type StrokeTypeString, SxClass, SymbolArc, SymbolArcEnd, SymbolArcFill, SymbolArcMid, SymbolArcStart, SymbolCircle, SymbolCircleCenter, SymbolCircleFill, SymbolCircleRadius, SymbolDuplicatePinNumbersAreJumpers, SymbolFillType, SymbolInstancePath, SymbolInstanceReference, SymbolInstanceUnit, SymbolInstances, SymbolInstancesProject, SymbolLibId, SymbolPin, SymbolPinLength, SymbolPinName, SymbolPinNames, SymbolPinNamesHide, SymbolPinNamesOffset, SymbolPinNumber, SymbolPinNumbers, SymbolPinNumbersHide, SymbolPolyline, SymbolPolylineFill, type SymbolPolylineFillLike, SymbolPower, SymbolProperty, SymbolPropertyId, SymbolRectangle, SymbolRectangleEnd, SymbolRectangleFill, SymbolRectangleStart, SymbolText, SymbolUnit, Target, TextEffects, type TextEffectsConstructorParams, TextEffectsFont, TextEffectsFontBold, TextEffectsFontFace, TextEffectsFontItalic, TextEffectsFontLineSpacing, type TextEffectsFontProperty, TextEffectsFontSize, TextEffectsFontThickness, TextEffectsJustify, type TextEffectsProperty, TitleBlock, TitleBlockComment, TitleBlockCompany, type TitleBlockConstructorParams, TitleBlockDate, TitleBlockRevision, TitleBlockTitle, Tstamp, Unit, type UnitString, Uuid, Via, type ViaConstructorParams, ViaNet, Width, Wire, type WireConstructorParams, Xy, Zone, parseKicadMod, parseKicadPcb, parseKicadSch, parseKicadSexpr };
|
package/dist/index.js
CHANGED
|
@@ -5780,6 +5780,7 @@ var FLAG_TOKENS = /* @__PURE__ */ new Set([
|
|
|
5780
5780
|
"board_only",
|
|
5781
5781
|
"exclude_from_pos_files",
|
|
5782
5782
|
"exclude_from_bom",
|
|
5783
|
+
"allow_missing_courtyard",
|
|
5783
5784
|
"allow_soldermask_bridges",
|
|
5784
5785
|
"dnp"
|
|
5785
5786
|
]);
|
|
@@ -5791,6 +5792,7 @@ var FootprintAttr = class _FootprintAttr extends SxClass {
|
|
|
5791
5792
|
_boardOnly = false;
|
|
5792
5793
|
_excludeFromPosFiles = false;
|
|
5793
5794
|
_excludeFromBom = false;
|
|
5795
|
+
_allowMissingCourtyard = false;
|
|
5794
5796
|
_allowSoldermaskBridges = false;
|
|
5795
5797
|
_dnp = false;
|
|
5796
5798
|
static fromSexprPrimitives(primitiveSexprs) {
|
|
@@ -5826,6 +5828,9 @@ var FootprintAttr = class _FootprintAttr extends SxClass {
|
|
|
5826
5828
|
case "exclude_from_bom":
|
|
5827
5829
|
this._excludeFromBom = true;
|
|
5828
5830
|
break;
|
|
5831
|
+
case "allow_missing_courtyard":
|
|
5832
|
+
this._allowMissingCourtyard = true;
|
|
5833
|
+
break;
|
|
5829
5834
|
case "allow_soldermask_bridges":
|
|
5830
5835
|
this._allowSoldermaskBridges = true;
|
|
5831
5836
|
break;
|
|
@@ -5864,6 +5869,12 @@ var FootprintAttr = class _FootprintAttr extends SxClass {
|
|
|
5864
5869
|
set allowSoldermaskBridges(value) {
|
|
5865
5870
|
this._allowSoldermaskBridges = value;
|
|
5866
5871
|
}
|
|
5872
|
+
get allowMissingCourtyard() {
|
|
5873
|
+
return this._allowMissingCourtyard;
|
|
5874
|
+
}
|
|
5875
|
+
set allowMissingCourtyard(value) {
|
|
5876
|
+
this._allowMissingCourtyard = value;
|
|
5877
|
+
}
|
|
5867
5878
|
get dnp() {
|
|
5868
5879
|
return this._dnp;
|
|
5869
5880
|
}
|
|
@@ -5879,6 +5890,7 @@ var FootprintAttr = class _FootprintAttr extends SxClass {
|
|
|
5879
5890
|
if (this._boardOnly) tokens.push("board_only");
|
|
5880
5891
|
if (this._excludeFromPosFiles) tokens.push("exclude_from_pos_files");
|
|
5881
5892
|
if (this._excludeFromBom) tokens.push("exclude_from_bom");
|
|
5893
|
+
if (this._allowMissingCourtyard) tokens.push("allow_missing_courtyard");
|
|
5882
5894
|
if (this._allowSoldermaskBridges) tokens.push("allow_soldermask_bridges");
|
|
5883
5895
|
if (this._dnp) tokens.push("dnp");
|
|
5884
5896
|
return `(${tokens.join(" ")})`;
|
|
@@ -13603,6 +13615,520 @@ var GrPoly = class _GrPoly extends SxClass {
|
|
|
13603
13615
|
};
|
|
13604
13616
|
SxClass.register(GrPoly);
|
|
13605
13617
|
|
|
13618
|
+
// lib/sexpr/classes/DimensionFormatOverrideValue.ts
|
|
13619
|
+
var DimensionFormatOverrideValue = class extends SxPrimitiveString {
|
|
13620
|
+
static token = "override_value";
|
|
13621
|
+
static parentToken = "format";
|
|
13622
|
+
token = "override_value";
|
|
13623
|
+
};
|
|
13624
|
+
SxClass.register(DimensionFormatOverrideValue);
|
|
13625
|
+
|
|
13626
|
+
// lib/sexpr/classes/DimensionFormatPrecision.ts
|
|
13627
|
+
var DimensionFormatPrecision = class extends SxPrimitiveNumber {
|
|
13628
|
+
static token = "precision";
|
|
13629
|
+
static parentToken = "format";
|
|
13630
|
+
token = "precision";
|
|
13631
|
+
};
|
|
13632
|
+
SxClass.register(DimensionFormatPrecision);
|
|
13633
|
+
|
|
13634
|
+
// lib/sexpr/classes/DimensionFormatPrefix.ts
|
|
13635
|
+
var DimensionFormatPrefix = class extends SxPrimitiveString {
|
|
13636
|
+
static token = "prefix";
|
|
13637
|
+
static parentToken = "format";
|
|
13638
|
+
token = "prefix";
|
|
13639
|
+
};
|
|
13640
|
+
SxClass.register(DimensionFormatPrefix);
|
|
13641
|
+
|
|
13642
|
+
// lib/sexpr/classes/DimensionFormatSuffix.ts
|
|
13643
|
+
var DimensionFormatSuffix = class extends SxPrimitiveString {
|
|
13644
|
+
static token = "suffix";
|
|
13645
|
+
static parentToken = "format";
|
|
13646
|
+
token = "suffix";
|
|
13647
|
+
};
|
|
13648
|
+
SxClass.register(DimensionFormatSuffix);
|
|
13649
|
+
|
|
13650
|
+
// lib/sexpr/classes/DimensionFormatSuppressZeros.ts
|
|
13651
|
+
var DimensionFormatSuppressZeros = class extends SxPrimitiveBoolean {
|
|
13652
|
+
static token = "suppress_zeros";
|
|
13653
|
+
static parentToken = "format";
|
|
13654
|
+
token = "suppress_zeros";
|
|
13655
|
+
};
|
|
13656
|
+
SxClass.register(DimensionFormatSuppressZeros);
|
|
13657
|
+
|
|
13658
|
+
// lib/sexpr/classes/DimensionFormatUnits.ts
|
|
13659
|
+
var DimensionFormatUnits = class extends SxPrimitiveNumber {
|
|
13660
|
+
static token = "units";
|
|
13661
|
+
static parentToken = "format";
|
|
13662
|
+
token = "units";
|
|
13663
|
+
};
|
|
13664
|
+
SxClass.register(DimensionFormatUnits);
|
|
13665
|
+
|
|
13666
|
+
// lib/sexpr/classes/DimensionFormatUnitsFormat.ts
|
|
13667
|
+
var DimensionFormatUnitsFormat = class extends SxPrimitiveNumber {
|
|
13668
|
+
static token = "units_format";
|
|
13669
|
+
static parentToken = "format";
|
|
13670
|
+
token = "units_format";
|
|
13671
|
+
};
|
|
13672
|
+
SxClass.register(DimensionFormatUnitsFormat);
|
|
13673
|
+
|
|
13674
|
+
// lib/sexpr/classes/DimensionFormat.ts
|
|
13675
|
+
var SUPPORTED_TOKENS16 = /* @__PURE__ */ new Set([
|
|
13676
|
+
"prefix",
|
|
13677
|
+
"suffix",
|
|
13678
|
+
"units",
|
|
13679
|
+
"units_format",
|
|
13680
|
+
"precision",
|
|
13681
|
+
"override_value",
|
|
13682
|
+
"suppress_zeros"
|
|
13683
|
+
]);
|
|
13684
|
+
var DimensionFormat = class _DimensionFormat extends SxClass {
|
|
13685
|
+
static token = "format";
|
|
13686
|
+
static parentToken = "dimension";
|
|
13687
|
+
token = "format";
|
|
13688
|
+
_sxPrefix;
|
|
13689
|
+
_sxSuffix;
|
|
13690
|
+
_sxUnits;
|
|
13691
|
+
_sxUnitsFormat;
|
|
13692
|
+
_sxPrecision;
|
|
13693
|
+
_sxOverrideValue;
|
|
13694
|
+
_sxSuppressZeros;
|
|
13695
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
13696
|
+
const format = new _DimensionFormat();
|
|
13697
|
+
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
13698
|
+
for (const token of Object.keys(arrayPropertyMap)) {
|
|
13699
|
+
if (!SUPPORTED_TOKENS16.has(token)) {
|
|
13700
|
+
throw new Error(`format does not support child token "${token}"`);
|
|
13701
|
+
}
|
|
13702
|
+
if (arrayPropertyMap[token].length > 1) {
|
|
13703
|
+
throw new Error(
|
|
13704
|
+
`format does not support repeated child token "${token}"`
|
|
13705
|
+
);
|
|
13706
|
+
}
|
|
13707
|
+
}
|
|
13708
|
+
for (const primitive of primitiveSexprs) {
|
|
13709
|
+
if (!Array.isArray(primitive)) {
|
|
13710
|
+
throw new Error(
|
|
13711
|
+
`format encountered unexpected primitive child ${JSON.stringify(primitive)}`
|
|
13712
|
+
);
|
|
13713
|
+
}
|
|
13714
|
+
}
|
|
13715
|
+
format._sxPrefix = propertyMap.prefix;
|
|
13716
|
+
format._sxSuffix = propertyMap.suffix;
|
|
13717
|
+
format._sxUnits = propertyMap.units;
|
|
13718
|
+
format._sxUnitsFormat = propertyMap.units_format;
|
|
13719
|
+
format._sxPrecision = propertyMap.precision;
|
|
13720
|
+
format._sxOverrideValue = propertyMap.override_value;
|
|
13721
|
+
format._sxSuppressZeros = propertyMap.suppress_zeros;
|
|
13722
|
+
if (!format._sxUnits) {
|
|
13723
|
+
throw new Error("format requires a units child token");
|
|
13724
|
+
}
|
|
13725
|
+
if (!format._sxUnitsFormat) {
|
|
13726
|
+
throw new Error("format requires a units_format child token");
|
|
13727
|
+
}
|
|
13728
|
+
if (!format._sxPrecision) {
|
|
13729
|
+
throw new Error("format requires a precision child token");
|
|
13730
|
+
}
|
|
13731
|
+
return format;
|
|
13732
|
+
}
|
|
13733
|
+
getChildren() {
|
|
13734
|
+
const children = [];
|
|
13735
|
+
if (this._sxPrefix) children.push(this._sxPrefix);
|
|
13736
|
+
if (this._sxSuffix) children.push(this._sxSuffix);
|
|
13737
|
+
if (this._sxUnits) children.push(this._sxUnits);
|
|
13738
|
+
if (this._sxUnitsFormat) children.push(this._sxUnitsFormat);
|
|
13739
|
+
if (this._sxPrecision) children.push(this._sxPrecision);
|
|
13740
|
+
if (this._sxOverrideValue) children.push(this._sxOverrideValue);
|
|
13741
|
+
if (this._sxSuppressZeros) children.push(this._sxSuppressZeros);
|
|
13742
|
+
return children;
|
|
13743
|
+
}
|
|
13744
|
+
};
|
|
13745
|
+
SxClass.register(DimensionFormat);
|
|
13746
|
+
|
|
13747
|
+
// lib/sexpr/classes/DimensionHeight.ts
|
|
13748
|
+
var DimensionHeight = class extends SxPrimitiveNumber {
|
|
13749
|
+
static token = "height";
|
|
13750
|
+
static parentToken = "dimension";
|
|
13751
|
+
token = "height";
|
|
13752
|
+
};
|
|
13753
|
+
SxClass.register(DimensionHeight);
|
|
13754
|
+
|
|
13755
|
+
// lib/sexpr/classes/DimensionLeaderLength.ts
|
|
13756
|
+
var DimensionLeaderLength = class extends SxPrimitiveNumber {
|
|
13757
|
+
static token = "leader_length";
|
|
13758
|
+
static parentToken = "dimension";
|
|
13759
|
+
token = "leader_length";
|
|
13760
|
+
};
|
|
13761
|
+
SxClass.register(DimensionLeaderLength);
|
|
13762
|
+
|
|
13763
|
+
// lib/sexpr/classes/DimensionLocked.ts
|
|
13764
|
+
var DimensionLocked = class _DimensionLocked extends SxPrimitiveBoolean {
|
|
13765
|
+
static token = "locked";
|
|
13766
|
+
static parentToken = "dimension";
|
|
13767
|
+
token = "locked";
|
|
13768
|
+
constructor(value = true) {
|
|
13769
|
+
super(value);
|
|
13770
|
+
}
|
|
13771
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
13772
|
+
if (primitiveSexprs.length === 0) {
|
|
13773
|
+
return new _DimensionLocked(true);
|
|
13774
|
+
}
|
|
13775
|
+
const parsed = parseYesNo(primitiveSexprs[0]);
|
|
13776
|
+
if (parsed === void 0) {
|
|
13777
|
+
throw new Error(
|
|
13778
|
+
`dimension locked expects yes/no, received ${JSON.stringify(primitiveSexprs[0])}`
|
|
13779
|
+
);
|
|
13780
|
+
}
|
|
13781
|
+
return new _DimensionLocked(parsed);
|
|
13782
|
+
}
|
|
13783
|
+
};
|
|
13784
|
+
SxClass.register(DimensionLocked);
|
|
13785
|
+
|
|
13786
|
+
// lib/sexpr/classes/DimensionOrientation.ts
|
|
13787
|
+
var DimensionOrientation = class extends SxPrimitiveNumber {
|
|
13788
|
+
static token = "orientation";
|
|
13789
|
+
static parentToken = "dimension";
|
|
13790
|
+
token = "orientation";
|
|
13791
|
+
};
|
|
13792
|
+
SxClass.register(DimensionOrientation);
|
|
13793
|
+
|
|
13794
|
+
// lib/sexpr/classes/DimensionArrowDirection.ts
|
|
13795
|
+
var DimensionArrowDirection = class extends SxPrimitiveString {
|
|
13796
|
+
static token = "arrow_direction";
|
|
13797
|
+
static parentToken = "style";
|
|
13798
|
+
token = "arrow_direction";
|
|
13799
|
+
};
|
|
13800
|
+
SxClass.register(DimensionArrowDirection);
|
|
13801
|
+
|
|
13802
|
+
// lib/sexpr/classes/DimensionArrowLength.ts
|
|
13803
|
+
var DimensionArrowLength = class extends SxPrimitiveNumber {
|
|
13804
|
+
static token = "arrow_length";
|
|
13805
|
+
static parentToken = "style";
|
|
13806
|
+
token = "arrow_length";
|
|
13807
|
+
};
|
|
13808
|
+
SxClass.register(DimensionArrowLength);
|
|
13809
|
+
|
|
13810
|
+
// lib/sexpr/classes/DimensionExtensionHeight.ts
|
|
13811
|
+
var DimensionExtensionHeight = class extends SxPrimitiveNumber {
|
|
13812
|
+
static token = "extension_height";
|
|
13813
|
+
static parentToken = "style";
|
|
13814
|
+
token = "extension_height";
|
|
13815
|
+
};
|
|
13816
|
+
SxClass.register(DimensionExtensionHeight);
|
|
13817
|
+
|
|
13818
|
+
// lib/sexpr/classes/DimensionExtensionOffset.ts
|
|
13819
|
+
var DimensionExtensionOffset = class extends SxPrimitiveNumber {
|
|
13820
|
+
static token = "extension_offset";
|
|
13821
|
+
static parentToken = "style";
|
|
13822
|
+
token = "extension_offset";
|
|
13823
|
+
};
|
|
13824
|
+
SxClass.register(DimensionExtensionOffset);
|
|
13825
|
+
|
|
13826
|
+
// lib/sexpr/classes/DimensionKeepTextAligned.ts
|
|
13827
|
+
var DimensionKeepTextAligned = class extends SxPrimitiveBoolean {
|
|
13828
|
+
static token = "keep_text_aligned";
|
|
13829
|
+
static parentToken = "style";
|
|
13830
|
+
token = "keep_text_aligned";
|
|
13831
|
+
};
|
|
13832
|
+
SxClass.register(DimensionKeepTextAligned);
|
|
13833
|
+
|
|
13834
|
+
// lib/sexpr/classes/DimensionStyleThickness.ts
|
|
13835
|
+
var DimensionStyleThickness = class extends SxPrimitiveNumber {
|
|
13836
|
+
static token = "thickness";
|
|
13837
|
+
static parentToken = "style";
|
|
13838
|
+
token = "thickness";
|
|
13839
|
+
};
|
|
13840
|
+
SxClass.register(DimensionStyleThickness);
|
|
13841
|
+
|
|
13842
|
+
// lib/sexpr/classes/DimensionTextFrame.ts
|
|
13843
|
+
var DimensionTextFrame = class extends SxPrimitiveNumber {
|
|
13844
|
+
static token = "text_frame";
|
|
13845
|
+
static parentToken = "style";
|
|
13846
|
+
token = "text_frame";
|
|
13847
|
+
};
|
|
13848
|
+
SxClass.register(DimensionTextFrame);
|
|
13849
|
+
|
|
13850
|
+
// lib/sexpr/classes/DimensionTextPositionMode.ts
|
|
13851
|
+
var DimensionTextPositionMode = class extends SxPrimitiveNumber {
|
|
13852
|
+
static token = "text_position_mode";
|
|
13853
|
+
static parentToken = "style";
|
|
13854
|
+
token = "text_position_mode";
|
|
13855
|
+
};
|
|
13856
|
+
SxClass.register(DimensionTextPositionMode);
|
|
13857
|
+
|
|
13858
|
+
// lib/sexpr/classes/DimensionStyle.ts
|
|
13859
|
+
var SUPPORTED_TOKENS17 = /* @__PURE__ */ new Set([
|
|
13860
|
+
"thickness",
|
|
13861
|
+
"arrow_length",
|
|
13862
|
+
"text_position_mode",
|
|
13863
|
+
"arrow_direction",
|
|
13864
|
+
"extension_height",
|
|
13865
|
+
"text_frame",
|
|
13866
|
+
"extension_offset",
|
|
13867
|
+
"keep_text_aligned"
|
|
13868
|
+
]);
|
|
13869
|
+
var DimensionStyle = class _DimensionStyle extends SxClass {
|
|
13870
|
+
static token = "style";
|
|
13871
|
+
static parentToken = "dimension";
|
|
13872
|
+
token = "style";
|
|
13873
|
+
_sxThickness;
|
|
13874
|
+
_sxArrowLength;
|
|
13875
|
+
_sxTextPositionMode;
|
|
13876
|
+
_sxArrowDirection;
|
|
13877
|
+
_sxExtensionHeight;
|
|
13878
|
+
_sxTextFrame;
|
|
13879
|
+
_sxExtensionOffset;
|
|
13880
|
+
_sxKeepTextAligned;
|
|
13881
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
13882
|
+
const style = new _DimensionStyle();
|
|
13883
|
+
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
13884
|
+
for (const token of Object.keys(arrayPropertyMap)) {
|
|
13885
|
+
if (!SUPPORTED_TOKENS17.has(token)) {
|
|
13886
|
+
throw new Error(`style does not support child token "${token}"`);
|
|
13887
|
+
}
|
|
13888
|
+
if (arrayPropertyMap[token].length > 1) {
|
|
13889
|
+
throw new Error(
|
|
13890
|
+
`style does not support repeated child token "${token}"`
|
|
13891
|
+
);
|
|
13892
|
+
}
|
|
13893
|
+
}
|
|
13894
|
+
for (const primitive of primitiveSexprs) {
|
|
13895
|
+
if (!Array.isArray(primitive)) {
|
|
13896
|
+
throw new Error(
|
|
13897
|
+
`style encountered unexpected primitive child ${JSON.stringify(primitive)}`
|
|
13898
|
+
);
|
|
13899
|
+
}
|
|
13900
|
+
}
|
|
13901
|
+
style._sxThickness = propertyMap.thickness;
|
|
13902
|
+
style._sxArrowLength = propertyMap.arrow_length;
|
|
13903
|
+
style._sxTextPositionMode = propertyMap.text_position_mode;
|
|
13904
|
+
style._sxArrowDirection = propertyMap.arrow_direction;
|
|
13905
|
+
style._sxExtensionHeight = propertyMap.extension_height;
|
|
13906
|
+
style._sxTextFrame = propertyMap.text_frame;
|
|
13907
|
+
style._sxExtensionOffset = propertyMap.extension_offset;
|
|
13908
|
+
style._sxKeepTextAligned = propertyMap.keep_text_aligned;
|
|
13909
|
+
if (!style._sxThickness) {
|
|
13910
|
+
throw new Error("style requires a thickness child token");
|
|
13911
|
+
}
|
|
13912
|
+
if (!style._sxArrowLength) {
|
|
13913
|
+
throw new Error("style requires an arrow_length child token");
|
|
13914
|
+
}
|
|
13915
|
+
if (!style._sxTextPositionMode) {
|
|
13916
|
+
throw new Error("style requires a text_position_mode child token");
|
|
13917
|
+
}
|
|
13918
|
+
return style;
|
|
13919
|
+
}
|
|
13920
|
+
getChildren() {
|
|
13921
|
+
const children = [];
|
|
13922
|
+
if (this._sxThickness) children.push(this._sxThickness);
|
|
13923
|
+
if (this._sxArrowLength) children.push(this._sxArrowLength);
|
|
13924
|
+
if (this._sxTextPositionMode) children.push(this._sxTextPositionMode);
|
|
13925
|
+
if (this._sxArrowDirection) children.push(this._sxArrowDirection);
|
|
13926
|
+
if (this._sxExtensionHeight) children.push(this._sxExtensionHeight);
|
|
13927
|
+
if (this._sxTextFrame) children.push(this._sxTextFrame);
|
|
13928
|
+
if (this._sxExtensionOffset) children.push(this._sxExtensionOffset);
|
|
13929
|
+
if (this._sxKeepTextAligned) children.push(this._sxKeepTextAligned);
|
|
13930
|
+
return children;
|
|
13931
|
+
}
|
|
13932
|
+
};
|
|
13933
|
+
SxClass.register(DimensionStyle);
|
|
13934
|
+
|
|
13935
|
+
// lib/sexpr/classes/DimensionType.ts
|
|
13936
|
+
var DimensionType = class extends SxPrimitiveString {
|
|
13937
|
+
static token = "type";
|
|
13938
|
+
static parentToken = "dimension";
|
|
13939
|
+
token = "type";
|
|
13940
|
+
};
|
|
13941
|
+
SxClass.register(DimensionType);
|
|
13942
|
+
|
|
13943
|
+
// lib/sexpr/classes/Dimension.ts
|
|
13944
|
+
var SUPPORTED_TOKENS18 = /* @__PURE__ */ new Set([
|
|
13945
|
+
"locked",
|
|
13946
|
+
"type",
|
|
13947
|
+
"layer",
|
|
13948
|
+
"uuid",
|
|
13949
|
+
"pts",
|
|
13950
|
+
"height",
|
|
13951
|
+
"orientation",
|
|
13952
|
+
"leader_length",
|
|
13953
|
+
"gr_text",
|
|
13954
|
+
"format",
|
|
13955
|
+
"style"
|
|
13956
|
+
]);
|
|
13957
|
+
var Dimension = class _Dimension extends SxClass {
|
|
13958
|
+
static token = "dimension";
|
|
13959
|
+
static parentToken = "kicad_pcb";
|
|
13960
|
+
token = "dimension";
|
|
13961
|
+
_sxLocked;
|
|
13962
|
+
_sxType;
|
|
13963
|
+
_sxLayer;
|
|
13964
|
+
_sxUuid;
|
|
13965
|
+
_sxPts;
|
|
13966
|
+
_sxHeight;
|
|
13967
|
+
_sxOrientation;
|
|
13968
|
+
_sxLeaderLength;
|
|
13969
|
+
_sxFormat;
|
|
13970
|
+
_sxStyle;
|
|
13971
|
+
_sxGrText;
|
|
13972
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
13973
|
+
const dimension = new _Dimension();
|
|
13974
|
+
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
13975
|
+
for (const token of Object.keys(arrayPropertyMap)) {
|
|
13976
|
+
if (!SUPPORTED_TOKENS18.has(token)) {
|
|
13977
|
+
throw new Error(`dimension does not support child token "${token}"`);
|
|
13978
|
+
}
|
|
13979
|
+
if (arrayPropertyMap[token].length > 1) {
|
|
13980
|
+
throw new Error(
|
|
13981
|
+
`dimension does not support repeated child token "${token}"`
|
|
13982
|
+
);
|
|
13983
|
+
}
|
|
13984
|
+
}
|
|
13985
|
+
for (const primitive of primitiveSexprs) {
|
|
13986
|
+
if (!Array.isArray(primitive)) {
|
|
13987
|
+
throw new Error(
|
|
13988
|
+
`dimension encountered unexpected primitive child ${JSON.stringify(primitive)}`
|
|
13989
|
+
);
|
|
13990
|
+
}
|
|
13991
|
+
}
|
|
13992
|
+
dimension._sxLocked = propertyMap.locked;
|
|
13993
|
+
dimension._sxType = propertyMap.type;
|
|
13994
|
+
dimension._sxLayer = propertyMap.layer;
|
|
13995
|
+
dimension._sxUuid = propertyMap.uuid;
|
|
13996
|
+
dimension._sxPts = propertyMap.pts;
|
|
13997
|
+
dimension._sxHeight = propertyMap.height;
|
|
13998
|
+
dimension._sxOrientation = propertyMap.orientation;
|
|
13999
|
+
dimension._sxLeaderLength = propertyMap.leader_length;
|
|
14000
|
+
dimension._sxFormat = propertyMap.format;
|
|
14001
|
+
dimension._sxStyle = propertyMap.style;
|
|
14002
|
+
dimension._sxGrText = propertyMap.gr_text;
|
|
14003
|
+
if (!dimension._sxType) {
|
|
14004
|
+
throw new Error("dimension requires a type child token");
|
|
14005
|
+
}
|
|
14006
|
+
if (!dimension._sxLayer) {
|
|
14007
|
+
throw new Error("dimension requires a layer child token");
|
|
14008
|
+
}
|
|
14009
|
+
if (!dimension._sxUuid) {
|
|
14010
|
+
throw new Error("dimension requires a uuid child token");
|
|
14011
|
+
}
|
|
14012
|
+
if (!dimension._sxPts) {
|
|
14013
|
+
throw new Error("dimension requires a pts child token");
|
|
14014
|
+
}
|
|
14015
|
+
if (!dimension._sxStyle) {
|
|
14016
|
+
throw new Error("dimension requires a style child token");
|
|
14017
|
+
}
|
|
14018
|
+
return dimension;
|
|
14019
|
+
}
|
|
14020
|
+
getChildren() {
|
|
14021
|
+
const children = [];
|
|
14022
|
+
if (this._sxLocked) children.push(this._sxLocked);
|
|
14023
|
+
if (this._sxType) children.push(this._sxType);
|
|
14024
|
+
if (this._sxLayer) children.push(this._sxLayer);
|
|
14025
|
+
if (this._sxUuid) children.push(this._sxUuid);
|
|
14026
|
+
if (this._sxPts) children.push(this._sxPts);
|
|
14027
|
+
if (this._sxHeight) children.push(this._sxHeight);
|
|
14028
|
+
if (this._sxOrientation) children.push(this._sxOrientation);
|
|
14029
|
+
if (this._sxLeaderLength) children.push(this._sxLeaderLength);
|
|
14030
|
+
if (this._sxFormat) children.push(this._sxFormat);
|
|
14031
|
+
if (this._sxStyle) children.push(this._sxStyle);
|
|
14032
|
+
if (this._sxGrText) children.push(this._sxGrText);
|
|
14033
|
+
return children;
|
|
14034
|
+
}
|
|
14035
|
+
};
|
|
14036
|
+
SxClass.register(Dimension);
|
|
14037
|
+
|
|
14038
|
+
// lib/sexpr/classes/TargetSize.ts
|
|
14039
|
+
var TargetSize = class extends SxPrimitiveNumber {
|
|
14040
|
+
static token = "size";
|
|
14041
|
+
static parentToken = "target";
|
|
14042
|
+
token = "size";
|
|
14043
|
+
};
|
|
14044
|
+
SxClass.register(TargetSize);
|
|
14045
|
+
|
|
14046
|
+
// lib/sexpr/classes/Target.ts
|
|
14047
|
+
var SUPPORTED_TOKENS19 = /* @__PURE__ */ new Set(["at", "size", "width", "layer", "uuid"]);
|
|
14048
|
+
var Target = class _Target extends SxClass {
|
|
14049
|
+
static token = "target";
|
|
14050
|
+
static parentToken = "kicad_pcb";
|
|
14051
|
+
token = "target";
|
|
14052
|
+
_shape;
|
|
14053
|
+
_sxAt;
|
|
14054
|
+
_sxSize;
|
|
14055
|
+
_sxWidth;
|
|
14056
|
+
_sxLayer;
|
|
14057
|
+
_sxUuid;
|
|
14058
|
+
constructor(shape) {
|
|
14059
|
+
super();
|
|
14060
|
+
this._shape = shape;
|
|
14061
|
+
}
|
|
14062
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
14063
|
+
const [rawShape, ...rest] = primitiveSexprs;
|
|
14064
|
+
if (typeof rawShape !== "string") {
|
|
14065
|
+
throw new Error("target requires a shape string as its first argument");
|
|
14066
|
+
}
|
|
14067
|
+
const target = new _Target(rawShape);
|
|
14068
|
+
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(rest, this.token);
|
|
14069
|
+
for (const token of Object.keys(arrayPropertyMap)) {
|
|
14070
|
+
if (!SUPPORTED_TOKENS19.has(token)) {
|
|
14071
|
+
throw new Error(`target does not support child token "${token}"`);
|
|
14072
|
+
}
|
|
14073
|
+
if (arrayPropertyMap[token].length > 1) {
|
|
14074
|
+
throw new Error(
|
|
14075
|
+
`target does not support repeated child token "${token}"`
|
|
14076
|
+
);
|
|
14077
|
+
}
|
|
14078
|
+
}
|
|
14079
|
+
for (const primitive of rest) {
|
|
14080
|
+
if (!Array.isArray(primitive)) {
|
|
14081
|
+
throw new Error(
|
|
14082
|
+
`target encountered unexpected primitive child ${JSON.stringify(primitive)}`
|
|
14083
|
+
);
|
|
14084
|
+
}
|
|
14085
|
+
}
|
|
14086
|
+
target._sxAt = propertyMap.at;
|
|
14087
|
+
target._sxSize = propertyMap.size;
|
|
14088
|
+
target._sxWidth = propertyMap.width;
|
|
14089
|
+
target._sxLayer = propertyMap.layer;
|
|
14090
|
+
target._sxUuid = propertyMap.uuid;
|
|
14091
|
+
if (!target._sxAt) {
|
|
14092
|
+
throw new Error("target requires an at child token");
|
|
14093
|
+
}
|
|
14094
|
+
if (!target._sxSize) {
|
|
14095
|
+
throw new Error("target requires a size child token");
|
|
14096
|
+
}
|
|
14097
|
+
if (!target._sxWidth) {
|
|
14098
|
+
throw new Error("target requires a width child token");
|
|
14099
|
+
}
|
|
14100
|
+
if (!target._sxLayer) {
|
|
14101
|
+
throw new Error("target requires a layer child token");
|
|
14102
|
+
}
|
|
14103
|
+
if (!target._sxUuid) {
|
|
14104
|
+
throw new Error("target requires a uuid child token");
|
|
14105
|
+
}
|
|
14106
|
+
return target;
|
|
14107
|
+
}
|
|
14108
|
+
getChildren() {
|
|
14109
|
+
const children = [];
|
|
14110
|
+
if (this._sxAt) children.push(this._sxAt);
|
|
14111
|
+
if (this._sxSize) children.push(this._sxSize);
|
|
14112
|
+
if (this._sxWidth) children.push(this._sxWidth);
|
|
14113
|
+
if (this._sxLayer) children.push(this._sxLayer);
|
|
14114
|
+
if (this._sxUuid) children.push(this._sxUuid);
|
|
14115
|
+
return children;
|
|
14116
|
+
}
|
|
14117
|
+
getString() {
|
|
14118
|
+
const children = this.getChildren();
|
|
14119
|
+
if (children.length === 0) {
|
|
14120
|
+
return `(target ${quoteIfNeeded(this._shape)})`;
|
|
14121
|
+
}
|
|
14122
|
+
const lines = [`(target ${quoteIfNeeded(this._shape)}`];
|
|
14123
|
+
for (const child of children) {
|
|
14124
|
+
lines.push(child.getStringIndented());
|
|
14125
|
+
}
|
|
14126
|
+
lines.push(")");
|
|
14127
|
+
return lines.join("\n");
|
|
14128
|
+
}
|
|
14129
|
+
};
|
|
14130
|
+
SxClass.register(Target);
|
|
14131
|
+
|
|
13606
14132
|
// lib/sexpr/classes/Group.ts
|
|
13607
14133
|
var SUPPORTED_SINGLE_TOKENS11 = /* @__PURE__ */ new Set(["uuid", "locked", "members"]);
|
|
13608
14134
|
var Group = class _Group extends SxClass {
|
|
@@ -14586,6 +15112,13 @@ var PlotParamScaleSelection = class extends PlotParamNumberProperty {
|
|
|
14586
15112
|
};
|
|
14587
15113
|
SxClass.register(PlotParamScaleSelection);
|
|
14588
15114
|
|
|
15115
|
+
// lib/sexpr/classes/Setup/PlotParamPlotFpText.ts
|
|
15116
|
+
var PlotParamPlotFpText = class extends PlotParamProperty {
|
|
15117
|
+
static token = "plotfptext";
|
|
15118
|
+
token = "plotfptext";
|
|
15119
|
+
};
|
|
15120
|
+
SxClass.register(PlotParamPlotFpText);
|
|
15121
|
+
|
|
14589
15122
|
// lib/sexpr/classes/Setup/PcbPlotParamsStringPropertiesA.ts
|
|
14590
15123
|
var PlotParamDisableApertMacros = class extends PlotParamProperty {
|
|
14591
15124
|
static token = "disableapertmacros";
|
|
@@ -14778,6 +15311,7 @@ var TOKEN_TO_KEY = {
|
|
|
14778
15311
|
plotframeref: "plotframeref",
|
|
14779
15312
|
plotreference: "plotreference",
|
|
14780
15313
|
plotvalue: "plotvalue",
|
|
15314
|
+
plotfptext: "plotfptext",
|
|
14781
15315
|
plotothertext: "plotothertext",
|
|
14782
15316
|
plotinvisibletext: "plotinvisibletext",
|
|
14783
15317
|
padsonsilk: "padsonsilk",
|
|
@@ -14828,6 +15362,7 @@ var PCB_PLOT_PARAM_CHILD_ORDER = [
|
|
|
14828
15362
|
"plotframeref",
|
|
14829
15363
|
"plotreference",
|
|
14830
15364
|
"plotvalue",
|
|
15365
|
+
"plotfptext",
|
|
14831
15366
|
"plotothertext",
|
|
14832
15367
|
"mode",
|
|
14833
15368
|
"useauxorigin",
|
|
@@ -15042,6 +15577,12 @@ var PcbPlotParams = class _PcbPlotParams extends SxClass {
|
|
|
15042
15577
|
set plotvalue(value) {
|
|
15043
15578
|
this.setStringProperty("plotvalue", value, PlotParamPlotValue);
|
|
15044
15579
|
}
|
|
15580
|
+
get plotfptext() {
|
|
15581
|
+
return this._properties.plotfptext?.value;
|
|
15582
|
+
}
|
|
15583
|
+
set plotfptext(value) {
|
|
15584
|
+
this.setStringProperty("plotfptext", value, PlotParamPlotFpText);
|
|
15585
|
+
}
|
|
15045
15586
|
get plotothertext() {
|
|
15046
15587
|
return this._properties.plotothertext?.value;
|
|
15047
15588
|
}
|
|
@@ -17247,6 +17788,9 @@ export {
|
|
|
17247
17788
|
BusEntry,
|
|
17248
17789
|
BusEntrySize,
|
|
17249
17790
|
Color,
|
|
17791
|
+
Dimension,
|
|
17792
|
+
DimensionFormat,
|
|
17793
|
+
DimensionStyle,
|
|
17250
17794
|
Dnp,
|
|
17251
17795
|
EmbeddedFile,
|
|
17252
17796
|
EmbeddedFileChecksum,
|
|
@@ -17424,6 +17968,7 @@ export {
|
|
|
17424
17968
|
PlotParamPdfMetadata,
|
|
17425
17969
|
PlotParamPdfSingleDocument,
|
|
17426
17970
|
PlotParamPlotBlackAndWhite,
|
|
17971
|
+
PlotParamPlotFpText,
|
|
17427
17972
|
PlotParamPlotFrameRef,
|
|
17428
17973
|
PlotParamPlotInvisible,
|
|
17429
17974
|
PlotParamPlotInvisibleText,
|
|
@@ -17565,6 +18110,7 @@ export {
|
|
|
17565
18110
|
SymbolRectangleStart,
|
|
17566
18111
|
SymbolText,
|
|
17567
18112
|
SymbolUnit,
|
|
18113
|
+
Target,
|
|
17568
18114
|
TextEffects,
|
|
17569
18115
|
TextEffectsFont,
|
|
17570
18116
|
TextEffectsFontBold,
|