kicadts 0.0.46 → 0.0.48
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 +80 -1
- package/dist/index.js +272 -52
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1408,6 +1408,59 @@ declare class NoConnect extends SxClass {
|
|
|
1408
1408
|
getChildren(): SxClass[];
|
|
1409
1409
|
}
|
|
1410
1410
|
|
|
1411
|
+
interface SchematicArcPoint {
|
|
1412
|
+
x: number;
|
|
1413
|
+
y: number;
|
|
1414
|
+
}
|
|
1415
|
+
interface SchematicArcConstructorParams {
|
|
1416
|
+
start?: SymbolArcStart | SchematicArcPoint;
|
|
1417
|
+
mid?: SymbolArcMid | SchematicArcPoint;
|
|
1418
|
+
end?: SymbolArcEnd | SchematicArcPoint;
|
|
1419
|
+
stroke?: Stroke;
|
|
1420
|
+
fill?: SymbolArcFill;
|
|
1421
|
+
uuid?: string | Uuid;
|
|
1422
|
+
locked?: boolean;
|
|
1423
|
+
}
|
|
1424
|
+
declare class SchematicArcLocked extends SxClass {
|
|
1425
|
+
static token: string;
|
|
1426
|
+
static parentToken: string;
|
|
1427
|
+
token: string;
|
|
1428
|
+
value: boolean;
|
|
1429
|
+
constructor(value: boolean);
|
|
1430
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): SchematicArcLocked;
|
|
1431
|
+
getChildren(): SxClass[];
|
|
1432
|
+
getString(): string;
|
|
1433
|
+
}
|
|
1434
|
+
declare class SchematicArc extends SxClass {
|
|
1435
|
+
static token: string;
|
|
1436
|
+
static parentToken: string;
|
|
1437
|
+
token: string;
|
|
1438
|
+
private _sxStart?;
|
|
1439
|
+
private _sxMid?;
|
|
1440
|
+
private _sxEnd?;
|
|
1441
|
+
private _sxStroke?;
|
|
1442
|
+
private _sxFill?;
|
|
1443
|
+
private _sxUuid?;
|
|
1444
|
+
private _sxLocked?;
|
|
1445
|
+
constructor(params?: SchematicArcConstructorParams);
|
|
1446
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): SchematicArc;
|
|
1447
|
+
get start(): SymbolArcStart | undefined;
|
|
1448
|
+
set start(value: SymbolArcStart | SchematicArcPoint | undefined);
|
|
1449
|
+
get mid(): SymbolArcMid | undefined;
|
|
1450
|
+
set mid(value: SymbolArcMid | SchematicArcPoint | undefined);
|
|
1451
|
+
get end(): SymbolArcEnd | undefined;
|
|
1452
|
+
set end(value: SymbolArcEnd | SchematicArcPoint | undefined);
|
|
1453
|
+
get stroke(): Stroke | undefined;
|
|
1454
|
+
set stroke(value: Stroke | undefined);
|
|
1455
|
+
get fill(): SymbolArcFill | undefined;
|
|
1456
|
+
set fill(value: SymbolArcFill | undefined);
|
|
1457
|
+
get uuid(): Uuid | undefined;
|
|
1458
|
+
set uuid(value: Uuid | string | undefined);
|
|
1459
|
+
get locked(): boolean;
|
|
1460
|
+
set locked(value: boolean);
|
|
1461
|
+
getChildren(): SxClass[];
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1411
1464
|
interface BusEntryConstructorParams {
|
|
1412
1465
|
at?: AtInput;
|
|
1413
1466
|
size?: BusEntrySize | {
|
|
@@ -1620,6 +1673,17 @@ declare class SchematicTextBox extends SymbolTextBox {
|
|
|
1620
1673
|
token: string;
|
|
1621
1674
|
}
|
|
1622
1675
|
|
|
1676
|
+
interface SchematicRectanglePoint {
|
|
1677
|
+
x: number;
|
|
1678
|
+
y: number;
|
|
1679
|
+
}
|
|
1680
|
+
interface SchematicRectangleConstructorParams {
|
|
1681
|
+
start?: SymbolRectangleStart | SchematicRectanglePoint;
|
|
1682
|
+
end?: SymbolRectangleEnd | SchematicRectanglePoint;
|
|
1683
|
+
stroke?: Stroke;
|
|
1684
|
+
fill?: SymbolRectangleFill;
|
|
1685
|
+
uuid?: string | Uuid;
|
|
1686
|
+
}
|
|
1623
1687
|
declare class SchematicRectangle extends SxClass {
|
|
1624
1688
|
static token: string;
|
|
1625
1689
|
static parentToken: string;
|
|
@@ -1629,7 +1693,18 @@ declare class SchematicRectangle extends SxClass {
|
|
|
1629
1693
|
private _sxStroke?;
|
|
1630
1694
|
private _sxFill?;
|
|
1631
1695
|
private _sxUuid?;
|
|
1696
|
+
constructor(params?: SchematicRectangleConstructorParams);
|
|
1632
1697
|
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): SchematicRectangle;
|
|
1698
|
+
get start(): SymbolRectangleStart | undefined;
|
|
1699
|
+
set start(value: SymbolRectangleStart | SchematicRectanglePoint | undefined);
|
|
1700
|
+
get end(): SymbolRectangleEnd | undefined;
|
|
1701
|
+
set end(value: SymbolRectangleEnd | SchematicRectanglePoint | undefined);
|
|
1702
|
+
get stroke(): Stroke | undefined;
|
|
1703
|
+
set stroke(value: Stroke | undefined);
|
|
1704
|
+
get fill(): SymbolRectangleFill | undefined;
|
|
1705
|
+
set fill(value: SymbolRectangleFill | undefined);
|
|
1706
|
+
get uuid(): Uuid | undefined;
|
|
1707
|
+
set uuid(value: Uuid | string | undefined);
|
|
1633
1708
|
getChildren(): SxClass[];
|
|
1634
1709
|
}
|
|
1635
1710
|
|
|
@@ -1890,6 +1965,7 @@ interface KicadSchConstructorParams {
|
|
|
1890
1965
|
wires?: Wire[];
|
|
1891
1966
|
junctions?: Junction[];
|
|
1892
1967
|
noConnects?: NoConnect[];
|
|
1968
|
+
arcs?: SchematicArc[];
|
|
1893
1969
|
polylines?: Polyline[];
|
|
1894
1970
|
rectangles?: SchematicRectangle[];
|
|
1895
1971
|
textBoxes?: SchematicTextBox[];
|
|
@@ -1916,6 +1992,7 @@ declare class KicadSch extends SxClass {
|
|
|
1916
1992
|
private _wires;
|
|
1917
1993
|
private _junctions;
|
|
1918
1994
|
private _noConnects;
|
|
1995
|
+
private _arcs;
|
|
1919
1996
|
private _polylines;
|
|
1920
1997
|
private _rectangles;
|
|
1921
1998
|
private _textBoxes;
|
|
@@ -1959,6 +2036,8 @@ declare class KicadSch extends SxClass {
|
|
|
1959
2036
|
set wires(value: Wire[]);
|
|
1960
2037
|
get noConnects(): NoConnect[];
|
|
1961
2038
|
set noConnects(value: NoConnect[]);
|
|
2039
|
+
get arcs(): SchematicArc[];
|
|
2040
|
+
set arcs(value: SchematicArc[]);
|
|
1962
2041
|
get polylines(): Polyline[];
|
|
1963
2042
|
set polylines(value: Polyline[]);
|
|
1964
2043
|
get rectangles(): SchematicRectangle[];
|
|
@@ -6489,4 +6568,4 @@ declare const parseKicadPcb: (sexpr: string) => KicadPcb;
|
|
|
6489
6568
|
declare const parseKicadSym: (sexpr: string) => KicadSymbolLib;
|
|
6490
6569
|
declare const parseKicadMod: (sexpr: string) => Footprint;
|
|
6491
6570
|
|
|
6492
|
-
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, type ZoneKeepoutConstructorParams, ZoneKeepoutCopperpour, ZoneKeepoutFootprints, ZoneKeepoutPads, type ZoneKeepoutRule, ZoneKeepoutTracks, ZoneKeepoutVias, ZoneLocked, ZoneMinThickness, ZoneName, ZoneNet, ZoneNetName, ZonePlacement, ZonePlacementEnabled, ZonePlacementSheetname, ZonePolygon, ZonePriority, parseKicadMod, parseKicadPcb, parseKicadSch, parseKicadSexpr, parseKicadSym };
|
|
6571
|
+
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, SchematicArc, type SchematicArcConstructorParams, SchematicArcLocked, type SchematicArcPoint, SchematicPolyline, SchematicRectangle, type SchematicRectangleConstructorParams, type SchematicRectanglePoint, 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, type ZoneKeepoutConstructorParams, ZoneKeepoutCopperpour, ZoneKeepoutFootprints, ZoneKeepoutPads, type ZoneKeepoutRule, ZoneKeepoutTracks, ZoneKeepoutVias, ZoneLocked, ZoneMinThickness, ZoneName, ZoneNet, ZoneNetName, ZonePlacement, ZonePlacementEnabled, ZonePlacementSheetname, ZonePolygon, ZonePriority, parseKicadMod, parseKicadPcb, parseKicadSch, parseKicadSexpr, parseKicadSym };
|
package/dist/index.js
CHANGED
|
@@ -4353,8 +4353,163 @@ var NoConnect = class _NoConnect extends SxClass {
|
|
|
4353
4353
|
};
|
|
4354
4354
|
SxClass.register(NoConnect);
|
|
4355
4355
|
|
|
4356
|
+
// lib/sexpr/classes/SchematicArc.ts
|
|
4357
|
+
var SUPPORTED_TOKENS5 = /* @__PURE__ */ new Set([
|
|
4358
|
+
"start",
|
|
4359
|
+
"mid",
|
|
4360
|
+
"end",
|
|
4361
|
+
"stroke",
|
|
4362
|
+
"fill",
|
|
4363
|
+
"uuid",
|
|
4364
|
+
"locked"
|
|
4365
|
+
]);
|
|
4366
|
+
var SchematicArcLocked = class _SchematicArcLocked extends SxClass {
|
|
4367
|
+
static token = "locked";
|
|
4368
|
+
static parentToken = "arc";
|
|
4369
|
+
token = "locked";
|
|
4370
|
+
value;
|
|
4371
|
+
constructor(value) {
|
|
4372
|
+
super();
|
|
4373
|
+
this.value = value;
|
|
4374
|
+
}
|
|
4375
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
4376
|
+
const [valuePrimitive] = primitiveSexprs;
|
|
4377
|
+
if (typeof valuePrimitive !== "boolean") {
|
|
4378
|
+
throw new Error("locked expects a boolean value");
|
|
4379
|
+
}
|
|
4380
|
+
return new _SchematicArcLocked(valuePrimitive);
|
|
4381
|
+
}
|
|
4382
|
+
getChildren() {
|
|
4383
|
+
return [];
|
|
4384
|
+
}
|
|
4385
|
+
getString() {
|
|
4386
|
+
return `(locked ${this.value})`;
|
|
4387
|
+
}
|
|
4388
|
+
};
|
|
4389
|
+
SxClass.register(SchematicArcLocked);
|
|
4390
|
+
var SchematicArc = class _SchematicArc extends SxClass {
|
|
4391
|
+
static token = "arc";
|
|
4392
|
+
static parentToken = "kicad_sch";
|
|
4393
|
+
token = "arc";
|
|
4394
|
+
_sxStart;
|
|
4395
|
+
_sxMid;
|
|
4396
|
+
_sxEnd;
|
|
4397
|
+
_sxStroke;
|
|
4398
|
+
_sxFill;
|
|
4399
|
+
_sxUuid;
|
|
4400
|
+
_sxLocked;
|
|
4401
|
+
constructor(params = {}) {
|
|
4402
|
+
super();
|
|
4403
|
+
if (params.start !== void 0) this.start = params.start;
|
|
4404
|
+
if (params.mid !== void 0) this.mid = params.mid;
|
|
4405
|
+
if (params.end !== void 0) this.end = params.end;
|
|
4406
|
+
if (params.stroke !== void 0) this.stroke = params.stroke;
|
|
4407
|
+
if (params.fill !== void 0) this.fill = params.fill;
|
|
4408
|
+
if (params.uuid !== void 0) this.uuid = params.uuid;
|
|
4409
|
+
if (params.locked !== void 0) this.locked = params.locked;
|
|
4410
|
+
}
|
|
4411
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
4412
|
+
const arc = new _SchematicArc();
|
|
4413
|
+
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
4414
|
+
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
4415
|
+
if (!SUPPORTED_TOKENS5.has(token)) {
|
|
4416
|
+
throw new Error(`arc encountered unsupported child token "${token}"`);
|
|
4417
|
+
}
|
|
4418
|
+
if (entries.length > 1) {
|
|
4419
|
+
throw new Error(`arc does not support repeated child token "${token}"`);
|
|
4420
|
+
}
|
|
4421
|
+
}
|
|
4422
|
+
const unsupportedTokens = Object.keys(propertyMap).filter(
|
|
4423
|
+
(token) => !SUPPORTED_TOKENS5.has(token)
|
|
4424
|
+
);
|
|
4425
|
+
if (unsupportedTokens.length > 0) {
|
|
4426
|
+
throw new Error(
|
|
4427
|
+
`Unsupported child tokens inside arc expression: ${unsupportedTokens.join(", ")}`
|
|
4428
|
+
);
|
|
4429
|
+
}
|
|
4430
|
+
arc._sxStart = propertyMap.start;
|
|
4431
|
+
arc._sxMid = propertyMap.mid;
|
|
4432
|
+
arc._sxEnd = propertyMap.end;
|
|
4433
|
+
arc._sxStroke = propertyMap.stroke;
|
|
4434
|
+
arc._sxFill = propertyMap.fill;
|
|
4435
|
+
arc._sxUuid = propertyMap.uuid;
|
|
4436
|
+
arc._sxLocked = propertyMap.locked;
|
|
4437
|
+
return arc;
|
|
4438
|
+
}
|
|
4439
|
+
get start() {
|
|
4440
|
+
return this._sxStart;
|
|
4441
|
+
}
|
|
4442
|
+
set start(value) {
|
|
4443
|
+
if (value === void 0) {
|
|
4444
|
+
this._sxStart = void 0;
|
|
4445
|
+
return;
|
|
4446
|
+
}
|
|
4447
|
+
this._sxStart = value instanceof SymbolArcStart ? value : new SymbolArcStart(value.x, value.y);
|
|
4448
|
+
}
|
|
4449
|
+
get mid() {
|
|
4450
|
+
return this._sxMid;
|
|
4451
|
+
}
|
|
4452
|
+
set mid(value) {
|
|
4453
|
+
if (value === void 0) {
|
|
4454
|
+
this._sxMid = void 0;
|
|
4455
|
+
return;
|
|
4456
|
+
}
|
|
4457
|
+
this._sxMid = value instanceof SymbolArcMid ? value : new SymbolArcMid(value.x, value.y);
|
|
4458
|
+
}
|
|
4459
|
+
get end() {
|
|
4460
|
+
return this._sxEnd;
|
|
4461
|
+
}
|
|
4462
|
+
set end(value) {
|
|
4463
|
+
if (value === void 0) {
|
|
4464
|
+
this._sxEnd = void 0;
|
|
4465
|
+
return;
|
|
4466
|
+
}
|
|
4467
|
+
this._sxEnd = value instanceof SymbolArcEnd ? value : new SymbolArcEnd(value.x, value.y);
|
|
4468
|
+
}
|
|
4469
|
+
get stroke() {
|
|
4470
|
+
return this._sxStroke;
|
|
4471
|
+
}
|
|
4472
|
+
set stroke(value) {
|
|
4473
|
+
this._sxStroke = value;
|
|
4474
|
+
}
|
|
4475
|
+
get fill() {
|
|
4476
|
+
return this._sxFill;
|
|
4477
|
+
}
|
|
4478
|
+
set fill(value) {
|
|
4479
|
+
this._sxFill = value;
|
|
4480
|
+
}
|
|
4481
|
+
get uuid() {
|
|
4482
|
+
return this._sxUuid;
|
|
4483
|
+
}
|
|
4484
|
+
set uuid(value) {
|
|
4485
|
+
if (value === void 0) {
|
|
4486
|
+
this._sxUuid = void 0;
|
|
4487
|
+
return;
|
|
4488
|
+
}
|
|
4489
|
+
this._sxUuid = value instanceof Uuid ? value : new Uuid(value);
|
|
4490
|
+
}
|
|
4491
|
+
get locked() {
|
|
4492
|
+
return this._sxLocked?.value ?? false;
|
|
4493
|
+
}
|
|
4494
|
+
set locked(value) {
|
|
4495
|
+
this._sxLocked = value ? new SchematicArcLocked(true) : void 0;
|
|
4496
|
+
}
|
|
4497
|
+
getChildren() {
|
|
4498
|
+
const children = [];
|
|
4499
|
+
if (this._sxStart) children.push(this._sxStart);
|
|
4500
|
+
if (this._sxMid) children.push(this._sxMid);
|
|
4501
|
+
if (this._sxEnd) children.push(this._sxEnd);
|
|
4502
|
+
if (this._sxStroke) children.push(this._sxStroke);
|
|
4503
|
+
if (this._sxFill) children.push(this._sxFill);
|
|
4504
|
+
if (this._sxUuid) children.push(this._sxUuid);
|
|
4505
|
+
if (this._sxLocked) children.push(this._sxLocked);
|
|
4506
|
+
return children;
|
|
4507
|
+
}
|
|
4508
|
+
};
|
|
4509
|
+
SxClass.register(SchematicArc);
|
|
4510
|
+
|
|
4356
4511
|
// lib/sexpr/classes/BusEntry.ts
|
|
4357
|
-
var
|
|
4512
|
+
var SUPPORTED_TOKENS6 = /* @__PURE__ */ new Set(["at", "size", "stroke", "uuid"]);
|
|
4358
4513
|
var BusEntry = class _BusEntry extends SxClass {
|
|
4359
4514
|
static token = "bus_entry";
|
|
4360
4515
|
static parentToken = "kicad_sch";
|
|
@@ -4388,7 +4543,7 @@ var BusEntry = class _BusEntry extends SxClass {
|
|
|
4388
4543
|
);
|
|
4389
4544
|
}
|
|
4390
4545
|
const unsupportedTokens = Object.keys(propertyMap).filter(
|
|
4391
|
-
(token) => !
|
|
4546
|
+
(token) => !SUPPORTED_TOKENS6.has(token)
|
|
4392
4547
|
);
|
|
4393
4548
|
if (unsupportedTokens.length > 0) {
|
|
4394
4549
|
throw new Error(
|
|
@@ -4478,7 +4633,7 @@ var BusEntrySize = class _BusEntrySize extends SxClass {
|
|
|
4478
4633
|
SxClass.register(BusEntrySize);
|
|
4479
4634
|
|
|
4480
4635
|
// lib/sexpr/classes/Label.ts
|
|
4481
|
-
var
|
|
4636
|
+
var SUPPORTED_TOKENS7 = /* @__PURE__ */ new Set(["at", "effects", "uuid", "fields_autoplaced"]);
|
|
4482
4637
|
var Label = class _Label extends SxClass {
|
|
4483
4638
|
static token = "label";
|
|
4484
4639
|
static parentToken = "kicad_sch";
|
|
@@ -4520,7 +4675,7 @@ var Label = class _Label extends SxClass {
|
|
|
4520
4675
|
label._value = value;
|
|
4521
4676
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(rest, this.token);
|
|
4522
4677
|
const unsupportedTokens = Object.keys(propertyMap).filter(
|
|
4523
|
-
(token) => !
|
|
4678
|
+
(token) => !SUPPORTED_TOKENS7.has(token)
|
|
4524
4679
|
);
|
|
4525
4680
|
if (unsupportedTokens.length > 0) {
|
|
4526
4681
|
throw new Error(
|
|
@@ -4528,7 +4683,7 @@ var Label = class _Label extends SxClass {
|
|
|
4528
4683
|
);
|
|
4529
4684
|
}
|
|
4530
4685
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
4531
|
-
if (!
|
|
4686
|
+
if (!SUPPORTED_TOKENS7.has(token)) {
|
|
4532
4687
|
throw new Error(
|
|
4533
4688
|
`Unsupported child tokens inside label expression: ${token}`
|
|
4534
4689
|
);
|
|
@@ -4838,7 +4993,7 @@ var Property = class _Property extends SxClass {
|
|
|
4838
4993
|
SxClass.register(Property);
|
|
4839
4994
|
|
|
4840
4995
|
// lib/sexpr/classes/GlobalLabel.ts
|
|
4841
|
-
var
|
|
4996
|
+
var SUPPORTED_TOKENS8 = /* @__PURE__ */ new Set([
|
|
4842
4997
|
"shape",
|
|
4843
4998
|
"at",
|
|
4844
4999
|
"effects",
|
|
@@ -4908,7 +5063,7 @@ var GlobalLabel = class _GlobalLabel extends SxClass {
|
|
|
4908
5063
|
const restWithoutShape = shapeIndex >= 0 ? rest.filter((_, i) => i !== shapeIndex) : rest;
|
|
4909
5064
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(restWithoutShape, this.token);
|
|
4910
5065
|
const unsupportedTokens = Object.keys(propertyMap).filter(
|
|
4911
|
-
(token) => !
|
|
5066
|
+
(token) => !SUPPORTED_TOKENS8.has(token)
|
|
4912
5067
|
);
|
|
4913
5068
|
if (unsupportedTokens.length > 0) {
|
|
4914
5069
|
throw new Error(
|
|
@@ -4916,7 +5071,7 @@ var GlobalLabel = class _GlobalLabel extends SxClass {
|
|
|
4916
5071
|
);
|
|
4917
5072
|
}
|
|
4918
5073
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
4919
|
-
if (!
|
|
5074
|
+
if (!SUPPORTED_TOKENS8.has(token)) {
|
|
4920
5075
|
throw new Error(
|
|
4921
5076
|
`Unsupported child tokens inside global_label expression: ${token}`
|
|
4922
5077
|
);
|
|
@@ -5002,7 +5157,7 @@ var GlobalLabel = class _GlobalLabel extends SxClass {
|
|
|
5002
5157
|
SxClass.register(GlobalLabel);
|
|
5003
5158
|
|
|
5004
5159
|
// lib/sexpr/classes/SchematicText.ts
|
|
5005
|
-
var
|
|
5160
|
+
var SUPPORTED_TOKENS9 = /* @__PURE__ */ new Set(["exclude_from_sim", "at", "effects", "uuid"]);
|
|
5006
5161
|
var SchematicText = class _SchematicText extends SxClass {
|
|
5007
5162
|
static token = "text";
|
|
5008
5163
|
static parentToken = "kicad_sch";
|
|
@@ -5040,7 +5195,7 @@ var SchematicText = class _SchematicText extends SxClass {
|
|
|
5040
5195
|
text._value = value;
|
|
5041
5196
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(rest, this.token);
|
|
5042
5197
|
const unsupportedTokens = Object.keys(propertyMap).filter(
|
|
5043
|
-
(token) => !
|
|
5198
|
+
(token) => !SUPPORTED_TOKENS9.has(token)
|
|
5044
5199
|
);
|
|
5045
5200
|
if (unsupportedTokens.length > 0) {
|
|
5046
5201
|
throw new Error(
|
|
@@ -5048,7 +5203,7 @@ var SchematicText = class _SchematicText extends SxClass {
|
|
|
5048
5203
|
);
|
|
5049
5204
|
}
|
|
5050
5205
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
5051
|
-
if (!
|
|
5206
|
+
if (!SUPPORTED_TOKENS9.has(token)) {
|
|
5052
5207
|
throw new Error(
|
|
5053
5208
|
`Unsupported child tokens inside text expression: ${token}`
|
|
5054
5209
|
);
|
|
@@ -5125,7 +5280,7 @@ var SchematicTextBox = class extends SymbolTextBox {
|
|
|
5125
5280
|
SxClass.register(SchematicTextBox);
|
|
5126
5281
|
|
|
5127
5282
|
// lib/sexpr/classes/SchematicRectangle.ts
|
|
5128
|
-
var
|
|
5283
|
+
var SUPPORTED_TOKENS10 = /* @__PURE__ */ new Set(["start", "end", "stroke", "fill", "uuid"]);
|
|
5129
5284
|
var SchematicRectangle = class _SchematicRectangle extends SxClass {
|
|
5130
5285
|
static token = "rectangle";
|
|
5131
5286
|
static parentToken = "kicad_sch";
|
|
@@ -5135,11 +5290,19 @@ var SchematicRectangle = class _SchematicRectangle extends SxClass {
|
|
|
5135
5290
|
_sxStroke;
|
|
5136
5291
|
_sxFill;
|
|
5137
5292
|
_sxUuid;
|
|
5293
|
+
constructor(params = {}) {
|
|
5294
|
+
super();
|
|
5295
|
+
if (params.start !== void 0) this.start = params.start;
|
|
5296
|
+
if (params.end !== void 0) this.end = params.end;
|
|
5297
|
+
if (params.stroke !== void 0) this.stroke = params.stroke;
|
|
5298
|
+
if (params.fill !== void 0) this.fill = params.fill;
|
|
5299
|
+
if (params.uuid !== void 0) this.uuid = params.uuid;
|
|
5300
|
+
}
|
|
5138
5301
|
static fromSexprPrimitives(primitiveSexprs) {
|
|
5139
5302
|
const rectangle = new _SchematicRectangle();
|
|
5140
5303
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
5141
5304
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
5142
|
-
if (!
|
|
5305
|
+
if (!SUPPORTED_TOKENS10.has(token)) {
|
|
5143
5306
|
throw new Error(
|
|
5144
5307
|
`rectangle encountered unsupported child token "${token}"`
|
|
5145
5308
|
);
|
|
@@ -5157,6 +5320,48 @@ var SchematicRectangle = class _SchematicRectangle extends SxClass {
|
|
|
5157
5320
|
rectangle._sxUuid = propertyMap.uuid;
|
|
5158
5321
|
return rectangle;
|
|
5159
5322
|
}
|
|
5323
|
+
get start() {
|
|
5324
|
+
return this._sxStart;
|
|
5325
|
+
}
|
|
5326
|
+
set start(value) {
|
|
5327
|
+
if (value === void 0) {
|
|
5328
|
+
this._sxStart = void 0;
|
|
5329
|
+
return;
|
|
5330
|
+
}
|
|
5331
|
+
this._sxStart = value instanceof SymbolRectangleStart ? value : new SymbolRectangleStart(value.x, value.y);
|
|
5332
|
+
}
|
|
5333
|
+
get end() {
|
|
5334
|
+
return this._sxEnd;
|
|
5335
|
+
}
|
|
5336
|
+
set end(value) {
|
|
5337
|
+
if (value === void 0) {
|
|
5338
|
+
this._sxEnd = void 0;
|
|
5339
|
+
return;
|
|
5340
|
+
}
|
|
5341
|
+
this._sxEnd = value instanceof SymbolRectangleEnd ? value : new SymbolRectangleEnd(value.x, value.y);
|
|
5342
|
+
}
|
|
5343
|
+
get stroke() {
|
|
5344
|
+
return this._sxStroke;
|
|
5345
|
+
}
|
|
5346
|
+
set stroke(value) {
|
|
5347
|
+
this._sxStroke = value;
|
|
5348
|
+
}
|
|
5349
|
+
get fill() {
|
|
5350
|
+
return this._sxFill;
|
|
5351
|
+
}
|
|
5352
|
+
set fill(value) {
|
|
5353
|
+
this._sxFill = value;
|
|
5354
|
+
}
|
|
5355
|
+
get uuid() {
|
|
5356
|
+
return this._sxUuid;
|
|
5357
|
+
}
|
|
5358
|
+
set uuid(value) {
|
|
5359
|
+
if (value === void 0) {
|
|
5360
|
+
this._sxUuid = void 0;
|
|
5361
|
+
return;
|
|
5362
|
+
}
|
|
5363
|
+
this._sxUuid = value instanceof Uuid ? value : new Uuid(value);
|
|
5364
|
+
}
|
|
5160
5365
|
getChildren() {
|
|
5161
5366
|
const children = [];
|
|
5162
5367
|
if (this._sxStart) children.push(this._sxStart);
|
|
@@ -5937,6 +6142,7 @@ var MULTI_CHILD_TOKENS2 = /* @__PURE__ */ new Set([
|
|
|
5937
6142
|
"wire",
|
|
5938
6143
|
"no_connect",
|
|
5939
6144
|
"sheet_instances",
|
|
6145
|
+
"arc",
|
|
5940
6146
|
"polyline",
|
|
5941
6147
|
"rectangle",
|
|
5942
6148
|
"text_box"
|
|
@@ -5967,6 +6173,7 @@ var KicadSch = class _KicadSch extends SxClass {
|
|
|
5967
6173
|
_wires = [];
|
|
5968
6174
|
_junctions = [];
|
|
5969
6175
|
_noConnects = [];
|
|
6176
|
+
_arcs = [];
|
|
5970
6177
|
_polylines = [];
|
|
5971
6178
|
_rectangles = [];
|
|
5972
6179
|
_textBoxes = [];
|
|
@@ -6035,6 +6242,9 @@ var KicadSch = class _KicadSch extends SxClass {
|
|
|
6035
6242
|
if (params.noConnects !== void 0) {
|
|
6036
6243
|
this.noConnects = params.noConnects;
|
|
6037
6244
|
}
|
|
6245
|
+
if (params.arcs !== void 0) {
|
|
6246
|
+
this.arcs = params.arcs;
|
|
6247
|
+
}
|
|
6038
6248
|
if (params.polylines !== void 0) {
|
|
6039
6249
|
this.polylines = params.polylines;
|
|
6040
6250
|
}
|
|
@@ -6098,6 +6308,7 @@ var KicadSch = class _KicadSch extends SxClass {
|
|
|
6098
6308
|
junctions: arrayPropertyMap.junction ?? [],
|
|
6099
6309
|
wires: arrayPropertyMap.wire ?? [],
|
|
6100
6310
|
noConnects: arrayPropertyMap.no_connect ?? [],
|
|
6311
|
+
arcs: arrayPropertyMap.arc ?? [],
|
|
6101
6312
|
polylines: arrayPropertyMap.polyline ?? [],
|
|
6102
6313
|
rectangles: arrayPropertyMap.rectangle ?? [],
|
|
6103
6314
|
textBoxes: arrayPropertyMap.text_box ?? []
|
|
@@ -6225,6 +6436,12 @@ var KicadSch = class _KicadSch extends SxClass {
|
|
|
6225
6436
|
set noConnects(value) {
|
|
6226
6437
|
this._noConnects = [...value];
|
|
6227
6438
|
}
|
|
6439
|
+
get arcs() {
|
|
6440
|
+
return [...this._arcs];
|
|
6441
|
+
}
|
|
6442
|
+
set arcs(value) {
|
|
6443
|
+
this._arcs = [...value];
|
|
6444
|
+
}
|
|
6228
6445
|
get polylines() {
|
|
6229
6446
|
return [...this._polylines];
|
|
6230
6447
|
}
|
|
@@ -6264,6 +6481,7 @@ var KicadSch = class _KicadSch extends SxClass {
|
|
|
6264
6481
|
children.push(...this._junctions);
|
|
6265
6482
|
children.push(...this._wires);
|
|
6266
6483
|
children.push(...this._noConnects);
|
|
6484
|
+
children.push(...this._arcs);
|
|
6267
6485
|
children.push(...this._polylines);
|
|
6268
6486
|
children.push(...this._rectangles);
|
|
6269
6487
|
children.push(...this._textBoxes);
|
|
@@ -7263,7 +7481,7 @@ var GrLineStart = class _GrLineStart extends SxClass {
|
|
|
7263
7481
|
SxClass.register(GrLineStart);
|
|
7264
7482
|
|
|
7265
7483
|
// lib/sexpr/classes/PadPrimitiveGrLine.ts
|
|
7266
|
-
var
|
|
7484
|
+
var SUPPORTED_TOKENS11 = /* @__PURE__ */ new Set(["start", "end", "width"]);
|
|
7267
7485
|
var PadPrimitiveGrLine = class _PadPrimitiveGrLine extends SxClass {
|
|
7268
7486
|
static token = "gr_line";
|
|
7269
7487
|
static parentToken = "primitives";
|
|
@@ -7275,14 +7493,14 @@ var PadPrimitiveGrLine = class _PadPrimitiveGrLine extends SxClass {
|
|
|
7275
7493
|
const line = new _PadPrimitiveGrLine();
|
|
7276
7494
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
7277
7495
|
for (const token of Object.keys(propertyMap)) {
|
|
7278
|
-
if (!
|
|
7496
|
+
if (!SUPPORTED_TOKENS11.has(token)) {
|
|
7279
7497
|
throw new Error(
|
|
7280
7498
|
`pad primitive gr_line encountered unsupported child token "${token}"`
|
|
7281
7499
|
);
|
|
7282
7500
|
}
|
|
7283
7501
|
}
|
|
7284
7502
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
7285
|
-
if (!
|
|
7503
|
+
if (!SUPPORTED_TOKENS11.has(token)) {
|
|
7286
7504
|
throw new Error(
|
|
7287
7505
|
`pad primitive gr_line encountered unsupported child token "${token}"`
|
|
7288
7506
|
);
|
|
@@ -7364,7 +7582,7 @@ var PadPrimitiveGrLine = class _PadPrimitiveGrLine extends SxClass {
|
|
|
7364
7582
|
SxClass.register(PadPrimitiveGrLine);
|
|
7365
7583
|
|
|
7366
7584
|
// lib/sexpr/classes/PadPrimitiveGrArc.ts
|
|
7367
|
-
var
|
|
7585
|
+
var SUPPORTED_TOKENS12 = /* @__PURE__ */ new Set(["start", "mid", "end", "width"]);
|
|
7368
7586
|
var PadPrimitiveGrArc = class _PadPrimitiveGrArc extends SxClass {
|
|
7369
7587
|
static token = "gr_arc";
|
|
7370
7588
|
static parentToken = "primitives";
|
|
@@ -7384,14 +7602,14 @@ var PadPrimitiveGrArc = class _PadPrimitiveGrArc extends SxClass {
|
|
|
7384
7602
|
const arc = new _PadPrimitiveGrArc();
|
|
7385
7603
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
7386
7604
|
for (const token of Object.keys(propertyMap)) {
|
|
7387
|
-
if (!
|
|
7605
|
+
if (!SUPPORTED_TOKENS12.has(token)) {
|
|
7388
7606
|
throw new Error(
|
|
7389
7607
|
`pad primitive gr_arc encountered unsupported child token "${token}"`
|
|
7390
7608
|
);
|
|
7391
7609
|
}
|
|
7392
7610
|
}
|
|
7393
7611
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
7394
|
-
if (!
|
|
7612
|
+
if (!SUPPORTED_TOKENS12.has(token)) {
|
|
7395
7613
|
throw new Error(
|
|
7396
7614
|
`pad primitive gr_arc encountered unsupported child token "${token}"`
|
|
7397
7615
|
);
|
|
@@ -7561,7 +7779,7 @@ var PadPrimitiveGrArcEnd = class _PadPrimitiveGrArcEnd extends PadPrimitiveGrArc
|
|
|
7561
7779
|
SxClass.register(PadPrimitiveGrArcEnd);
|
|
7562
7780
|
|
|
7563
7781
|
// lib/sexpr/classes/PadPrimitiveGrCircle.ts
|
|
7564
|
-
var
|
|
7782
|
+
var SUPPORTED_TOKENS13 = /* @__PURE__ */ new Set(["center", "end", "width", "fill"]);
|
|
7565
7783
|
var PadPrimitiveGrCircle = class _PadPrimitiveGrCircle extends SxClass {
|
|
7566
7784
|
static token = "gr_circle";
|
|
7567
7785
|
static parentToken = "primitives";
|
|
@@ -7581,14 +7799,14 @@ var PadPrimitiveGrCircle = class _PadPrimitiveGrCircle extends SxClass {
|
|
|
7581
7799
|
const circle = new _PadPrimitiveGrCircle();
|
|
7582
7800
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
7583
7801
|
for (const token of Object.keys(propertyMap)) {
|
|
7584
|
-
if (!
|
|
7802
|
+
if (!SUPPORTED_TOKENS13.has(token)) {
|
|
7585
7803
|
throw new Error(
|
|
7586
7804
|
`pad primitive gr_circle encountered unsupported child token "${token}"`
|
|
7587
7805
|
);
|
|
7588
7806
|
}
|
|
7589
7807
|
}
|
|
7590
7808
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
7591
|
-
if (!
|
|
7809
|
+
if (!SUPPORTED_TOKENS13.has(token)) {
|
|
7592
7810
|
throw new Error(
|
|
7593
7811
|
`pad primitive gr_circle encountered unsupported child token "${token}"`
|
|
7594
7812
|
);
|
|
@@ -8456,7 +8674,7 @@ var SINGLE_TOKENS = /* @__PURE__ */ new Set([
|
|
|
8456
8674
|
"teardrops"
|
|
8457
8675
|
]);
|
|
8458
8676
|
var MULTI_TOKENS = /* @__PURE__ */ new Set(["property"]);
|
|
8459
|
-
var
|
|
8677
|
+
var SUPPORTED_TOKENS14 = /* @__PURE__ */ new Set([...SINGLE_TOKENS, ...MULTI_TOKENS]);
|
|
8460
8678
|
var ensureSingle = (arrayPropertyMap, token) => {
|
|
8461
8679
|
const entries = arrayPropertyMap[token];
|
|
8462
8680
|
if (entries && entries.length > 1) {
|
|
@@ -8600,12 +8818,12 @@ var FootprintPad = class _FootprintPad extends SxClass {
|
|
|
8600
8818
|
}
|
|
8601
8819
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveNodes, this.token);
|
|
8602
8820
|
for (const token of Object.keys(propertyMap)) {
|
|
8603
|
-
if (!
|
|
8821
|
+
if (!SUPPORTED_TOKENS14.has(token)) {
|
|
8604
8822
|
throw new Error(`pad encountered unsupported child token "${token}"`);
|
|
8605
8823
|
}
|
|
8606
8824
|
}
|
|
8607
8825
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
8608
|
-
if (!
|
|
8826
|
+
if (!SUPPORTED_TOKENS14.has(token)) {
|
|
8609
8827
|
throw new Error(`pad encountered unsupported child token "${token}"`);
|
|
8610
8828
|
}
|
|
8611
8829
|
if (!MULTI_TOKENS.has(token) && entries.length > 1) {
|
|
@@ -10577,7 +10795,7 @@ var FpArcEnd = class _FpArcEnd extends SxClass {
|
|
|
10577
10795
|
SxClass.register(FpArcEnd);
|
|
10578
10796
|
|
|
10579
10797
|
// lib/sexpr/classes/FpCurve.ts
|
|
10580
|
-
var
|
|
10798
|
+
var SUPPORTED_TOKENS15 = /* @__PURE__ */ new Set([
|
|
10581
10799
|
"pts",
|
|
10582
10800
|
"xy",
|
|
10583
10801
|
"layer",
|
|
@@ -10631,14 +10849,14 @@ var FpCurve = class _FpCurve extends SxClass {
|
|
|
10631
10849
|
}
|
|
10632
10850
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(structuredPrimitives, this.token);
|
|
10633
10851
|
for (const token of Object.keys(propertyMap)) {
|
|
10634
|
-
if (!
|
|
10852
|
+
if (!SUPPORTED_TOKENS15.has(token)) {
|
|
10635
10853
|
throw new Error(
|
|
10636
10854
|
`fp_curve encountered unsupported child token "${token}"`
|
|
10637
10855
|
);
|
|
10638
10856
|
}
|
|
10639
10857
|
}
|
|
10640
10858
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
10641
|
-
if (!
|
|
10859
|
+
if (!SUPPORTED_TOKENS15.has(token)) {
|
|
10642
10860
|
throw new Error(
|
|
10643
10861
|
`fp_curve encountered unsupported child token "${token}"`
|
|
10644
10862
|
);
|
|
@@ -10864,7 +11082,7 @@ var FpPolyLocked = class _FpPolyLocked extends SxPrimitiveBoolean {
|
|
|
10864
11082
|
SxClass.register(FpPolyLocked);
|
|
10865
11083
|
|
|
10866
11084
|
// lib/sexpr/classes/FpPoly.ts
|
|
10867
|
-
var
|
|
11085
|
+
var SUPPORTED_TOKENS16 = /* @__PURE__ */ new Set([
|
|
10868
11086
|
"pts",
|
|
10869
11087
|
"xy",
|
|
10870
11088
|
"layer",
|
|
@@ -10902,12 +11120,12 @@ var FpPoly = class _FpPoly extends SxClass {
|
|
|
10902
11120
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
10903
11121
|
const unexpectedTokens = /* @__PURE__ */ new Set();
|
|
10904
11122
|
for (const token of Object.keys(propertyMap)) {
|
|
10905
|
-
if (!
|
|
11123
|
+
if (!SUPPORTED_TOKENS16.has(token)) {
|
|
10906
11124
|
unexpectedTokens.add(token);
|
|
10907
11125
|
}
|
|
10908
11126
|
}
|
|
10909
11127
|
for (const token of Object.keys(arrayPropertyMap)) {
|
|
10910
|
-
if (!
|
|
11128
|
+
if (!SUPPORTED_TOKENS16.has(token)) {
|
|
10911
11129
|
unexpectedTokens.add(token);
|
|
10912
11130
|
}
|
|
10913
11131
|
if (token !== "xy" && arrayPropertyMap[token].length > 1) {
|
|
@@ -10961,7 +11179,7 @@ var FpPoly = class _FpPoly extends SxClass {
|
|
|
10961
11179
|
`fp_poly child token must be a string, received: ${JSON.stringify(token)}`
|
|
10962
11180
|
);
|
|
10963
11181
|
}
|
|
10964
|
-
if (!
|
|
11182
|
+
if (!SUPPORTED_TOKENS16.has(token)) {
|
|
10965
11183
|
throw new Error(
|
|
10966
11184
|
`Unsupported child token inside fp_poly expression: ${token}`
|
|
10967
11185
|
);
|
|
@@ -13102,7 +13320,7 @@ var SINGLE_TOKENS4 = /* @__PURE__ */ new Set([
|
|
|
13102
13320
|
"fill"
|
|
13103
13321
|
]);
|
|
13104
13322
|
var MULTI_TOKENS2 = /* @__PURE__ */ new Set(["polygon", "filled_polygon"]);
|
|
13105
|
-
var
|
|
13323
|
+
var SUPPORTED_TOKENS17 = /* @__PURE__ */ new Set([...SINGLE_TOKENS4, ...MULTI_TOKENS2]);
|
|
13106
13324
|
var Zone = class _Zone extends SxClass {
|
|
13107
13325
|
static token = "zone";
|
|
13108
13326
|
token = "zone";
|
|
@@ -13161,7 +13379,7 @@ var Zone = class _Zone extends SxClass {
|
|
|
13161
13379
|
}
|
|
13162
13380
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
13163
13381
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
13164
|
-
if (!
|
|
13382
|
+
if (!SUPPORTED_TOKENS17.has(token)) {
|
|
13165
13383
|
throw new Error(`zone encountered unsupported child token "${token}"`);
|
|
13166
13384
|
}
|
|
13167
13385
|
if (!MULTI_TOKENS2.has(token) && entries.length > 1) {
|
|
@@ -13407,7 +13625,7 @@ var MULTI_TOKENS3 = /* @__PURE__ */ new Set([
|
|
|
13407
13625
|
"zone",
|
|
13408
13626
|
"group"
|
|
13409
13627
|
]);
|
|
13410
|
-
var
|
|
13628
|
+
var SUPPORTED_TOKENS18 = /* @__PURE__ */ new Set([...SINGLE_TOKENS5, ...MULTI_TOKENS3]);
|
|
13411
13629
|
var Footprint = class _Footprint extends SxClass {
|
|
13412
13630
|
static token = "footprint";
|
|
13413
13631
|
token = "footprint";
|
|
@@ -13545,14 +13763,14 @@ var Footprint = class _Footprint extends SxClass {
|
|
|
13545
13763
|
}
|
|
13546
13764
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(rawNodes, this.token);
|
|
13547
13765
|
for (const token of Object.keys(propertyMap)) {
|
|
13548
|
-
if (!
|
|
13766
|
+
if (!SUPPORTED_TOKENS18.has(token)) {
|
|
13549
13767
|
throw new Error(
|
|
13550
13768
|
`footprint encountered unsupported child token "${token}"`
|
|
13551
13769
|
);
|
|
13552
13770
|
}
|
|
13553
13771
|
}
|
|
13554
13772
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
13555
|
-
if (!
|
|
13773
|
+
if (!SUPPORTED_TOKENS18.has(token)) {
|
|
13556
13774
|
throw new Error(
|
|
13557
13775
|
`footprint encountered unsupported child token "${token}"`
|
|
13558
13776
|
);
|
|
@@ -14785,7 +15003,7 @@ var GrCircleLocked = class _GrCircleLocked extends SxClass {
|
|
|
14785
15003
|
SxClass.register(GrCircleLocked);
|
|
14786
15004
|
|
|
14787
15005
|
// lib/sexpr/classes/GrCurve.ts
|
|
14788
|
-
var
|
|
15006
|
+
var SUPPORTED_TOKENS19 = /* @__PURE__ */ new Set([
|
|
14789
15007
|
"pts",
|
|
14790
15008
|
"xy",
|
|
14791
15009
|
"layer",
|
|
@@ -14817,12 +15035,12 @@ var GrCurve = class _GrCurve extends SxClass {
|
|
|
14817
15035
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
14818
15036
|
const unexpectedTokens = /* @__PURE__ */ new Set();
|
|
14819
15037
|
for (const token of Object.keys(propertyMap)) {
|
|
14820
|
-
if (!
|
|
15038
|
+
if (!SUPPORTED_TOKENS19.has(token)) {
|
|
14821
15039
|
unexpectedTokens.add(token);
|
|
14822
15040
|
}
|
|
14823
15041
|
}
|
|
14824
15042
|
for (const token of Object.keys(arrayPropertyMap)) {
|
|
14825
|
-
if (!
|
|
15043
|
+
if (!SUPPORTED_TOKENS19.has(token)) {
|
|
14826
15044
|
unexpectedTokens.add(token);
|
|
14827
15045
|
continue;
|
|
14828
15046
|
}
|
|
@@ -15983,7 +16201,7 @@ var GrPolyFill = class _GrPolyFill extends SxClass {
|
|
|
15983
16201
|
}
|
|
15984
16202
|
};
|
|
15985
16203
|
SxClass.register(GrPolyFill);
|
|
15986
|
-
var
|
|
16204
|
+
var SUPPORTED_TOKENS20 = /* @__PURE__ */ new Set([
|
|
15987
16205
|
"pts",
|
|
15988
16206
|
"xy",
|
|
15989
16207
|
"layer",
|
|
@@ -16018,12 +16236,12 @@ var GrPoly = class _GrPoly extends SxClass {
|
|
|
16018
16236
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
16019
16237
|
const unexpectedTokens = /* @__PURE__ */ new Set();
|
|
16020
16238
|
for (const token of Object.keys(propertyMap)) {
|
|
16021
|
-
if (!
|
|
16239
|
+
if (!SUPPORTED_TOKENS20.has(token)) {
|
|
16022
16240
|
unexpectedTokens.add(token);
|
|
16023
16241
|
}
|
|
16024
16242
|
}
|
|
16025
16243
|
for (const token of Object.keys(arrayPropertyMap)) {
|
|
16026
|
-
if (!
|
|
16244
|
+
if (!SUPPORTED_TOKENS20.has(token)) {
|
|
16027
16245
|
unexpectedTokens.add(token);
|
|
16028
16246
|
}
|
|
16029
16247
|
if (token !== "xy" && arrayPropertyMap[token].length > 1) {
|
|
@@ -16069,7 +16287,7 @@ var GrPoly = class _GrPoly extends SxClass {
|
|
|
16069
16287
|
`gr_poly child token must be a string, received: ${JSON.stringify(token)}`
|
|
16070
16288
|
);
|
|
16071
16289
|
}
|
|
16072
|
-
if (!
|
|
16290
|
+
if (!SUPPORTED_TOKENS20.has(token)) {
|
|
16073
16291
|
throw new Error(
|
|
16074
16292
|
`Unsupported child token inside gr_poly expression: ${token}`
|
|
16075
16293
|
);
|
|
@@ -16260,7 +16478,7 @@ var DimensionFormatUnitsFormat = class extends SxPrimitiveNumber {
|
|
|
16260
16478
|
SxClass.register(DimensionFormatUnitsFormat);
|
|
16261
16479
|
|
|
16262
16480
|
// lib/sexpr/classes/DimensionFormat.ts
|
|
16263
|
-
var
|
|
16481
|
+
var SUPPORTED_TOKENS21 = /* @__PURE__ */ new Set([
|
|
16264
16482
|
"prefix",
|
|
16265
16483
|
"suffix",
|
|
16266
16484
|
"units",
|
|
@@ -16284,7 +16502,7 @@ var DimensionFormat = class _DimensionFormat extends SxClass {
|
|
|
16284
16502
|
const format = new _DimensionFormat();
|
|
16285
16503
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
16286
16504
|
for (const token of Object.keys(arrayPropertyMap)) {
|
|
16287
|
-
if (!
|
|
16505
|
+
if (!SUPPORTED_TOKENS21.has(token)) {
|
|
16288
16506
|
throw new Error(`format does not support child token "${token}"`);
|
|
16289
16507
|
}
|
|
16290
16508
|
if (arrayPropertyMap[token].length > 1) {
|
|
@@ -16444,7 +16662,7 @@ var DimensionTextPositionMode = class extends SxPrimitiveNumber {
|
|
|
16444
16662
|
SxClass.register(DimensionTextPositionMode);
|
|
16445
16663
|
|
|
16446
16664
|
// lib/sexpr/classes/DimensionStyle.ts
|
|
16447
|
-
var
|
|
16665
|
+
var SUPPORTED_TOKENS22 = /* @__PURE__ */ new Set([
|
|
16448
16666
|
"thickness",
|
|
16449
16667
|
"arrow_length",
|
|
16450
16668
|
"text_position_mode",
|
|
@@ -16470,7 +16688,7 @@ var DimensionStyle = class _DimensionStyle extends SxClass {
|
|
|
16470
16688
|
const style = new _DimensionStyle();
|
|
16471
16689
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
16472
16690
|
for (const token of Object.keys(arrayPropertyMap)) {
|
|
16473
|
-
if (!
|
|
16691
|
+
if (!SUPPORTED_TOKENS22.has(token)) {
|
|
16474
16692
|
throw new Error(`style does not support child token "${token}"`);
|
|
16475
16693
|
}
|
|
16476
16694
|
if (arrayPropertyMap[token].length > 1) {
|
|
@@ -16537,7 +16755,7 @@ var DimensionType = class extends SxPrimitiveString {
|
|
|
16537
16755
|
SxClass.register(DimensionType);
|
|
16538
16756
|
|
|
16539
16757
|
// lib/sexpr/classes/Dimension.ts
|
|
16540
|
-
var
|
|
16758
|
+
var SUPPORTED_TOKENS23 = /* @__PURE__ */ new Set([
|
|
16541
16759
|
"locked",
|
|
16542
16760
|
"type",
|
|
16543
16761
|
"layer",
|
|
@@ -16571,7 +16789,7 @@ var Dimension = class _Dimension extends SxClass {
|
|
|
16571
16789
|
const dimension = new _Dimension();
|
|
16572
16790
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
16573
16791
|
for (const token of Object.keys(arrayPropertyMap)) {
|
|
16574
|
-
if (!
|
|
16792
|
+
if (!SUPPORTED_TOKENS23.has(token)) {
|
|
16575
16793
|
throw new Error(`dimension does not support child token "${token}"`);
|
|
16576
16794
|
}
|
|
16577
16795
|
if (arrayPropertyMap[token].length > 1) {
|
|
@@ -16650,7 +16868,7 @@ var TargetSize = class extends SxPrimitiveNumber {
|
|
|
16650
16868
|
SxClass.register(TargetSize);
|
|
16651
16869
|
|
|
16652
16870
|
// lib/sexpr/classes/Target.ts
|
|
16653
|
-
var
|
|
16871
|
+
var SUPPORTED_TOKENS24 = /* @__PURE__ */ new Set(["at", "size", "width", "layer", "uuid"]);
|
|
16654
16872
|
var Target = class _Target extends SxClass {
|
|
16655
16873
|
static token = "target";
|
|
16656
16874
|
static parentToken = "kicad_pcb";
|
|
@@ -16673,7 +16891,7 @@ var Target = class _Target extends SxClass {
|
|
|
16673
16891
|
const target = new _Target(rawShape);
|
|
16674
16892
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(rest, this.token);
|
|
16675
16893
|
for (const token of Object.keys(arrayPropertyMap)) {
|
|
16676
|
-
if (!
|
|
16894
|
+
if (!SUPPORTED_TOKENS24.has(token)) {
|
|
16677
16895
|
throw new Error(`target does not support child token "${token}"`);
|
|
16678
16896
|
}
|
|
16679
16897
|
if (arrayPropertyMap[token].length > 1) {
|
|
@@ -20840,6 +21058,8 @@ export {
|
|
|
20840
21058
|
PtsArcMid,
|
|
20841
21059
|
PtsArcStart,
|
|
20842
21060
|
RenderCache,
|
|
21061
|
+
SchematicArc,
|
|
21062
|
+
SchematicArcLocked,
|
|
20843
21063
|
SchematicPolyline,
|
|
20844
21064
|
SchematicRectangle,
|
|
20845
21065
|
SchematicSymbol,
|