kicadts 0.0.45 → 0.0.47
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 +62 -2
- package/dist/index.js +234 -52
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -262,13 +262,14 @@ declare class TextEffects extends SxClass {
|
|
|
262
262
|
getChildren(): SxClass[];
|
|
263
263
|
getString(): string;
|
|
264
264
|
}
|
|
265
|
-
type TextEffectsFontProperty = TextEffectsFontFace | TextEffectsFontSize | TextEffectsFontThickness | TextEffectsFontLineSpacing | TextEffectsFontBold | TextEffectsFontItalic;
|
|
265
|
+
type TextEffectsFontProperty = TextEffectsFontFace | TextEffectsFontSize | Color | TextEffectsFontThickness | TextEffectsFontLineSpacing | TextEffectsFontBold | TextEffectsFontItalic;
|
|
266
266
|
declare class TextEffectsFont extends SxClass {
|
|
267
267
|
static token: string;
|
|
268
268
|
static parentToken: string;
|
|
269
269
|
token: string;
|
|
270
270
|
_sxFace?: TextEffectsFontFace;
|
|
271
271
|
_sxSize?: TextEffectsFontSize;
|
|
272
|
+
_sxColor?: Color;
|
|
272
273
|
_sxThickness?: TextEffectsFontThickness;
|
|
273
274
|
_sxLineSpacing?: TextEffectsFontLineSpacing;
|
|
274
275
|
_sxBold?: TextEffectsFontBold;
|
|
@@ -283,6 +284,8 @@ declare class TextEffectsFont extends SxClass {
|
|
|
283
284
|
height: number;
|
|
284
285
|
width: number;
|
|
285
286
|
} | undefined);
|
|
287
|
+
get color(): RGBAColor | undefined;
|
|
288
|
+
set color(value: RGBAColor | undefined);
|
|
286
289
|
get thickness(): number | undefined;
|
|
287
290
|
set thickness(value: number | undefined);
|
|
288
291
|
get lineSpacing(): number | undefined;
|
|
@@ -1405,6 +1408,59 @@ declare class NoConnect extends SxClass {
|
|
|
1405
1408
|
getChildren(): SxClass[];
|
|
1406
1409
|
}
|
|
1407
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
|
+
|
|
1408
1464
|
interface BusEntryConstructorParams {
|
|
1409
1465
|
at?: AtInput;
|
|
1410
1466
|
size?: BusEntrySize | {
|
|
@@ -1887,6 +1943,7 @@ interface KicadSchConstructorParams {
|
|
|
1887
1943
|
wires?: Wire[];
|
|
1888
1944
|
junctions?: Junction[];
|
|
1889
1945
|
noConnects?: NoConnect[];
|
|
1946
|
+
arcs?: SchematicArc[];
|
|
1890
1947
|
polylines?: Polyline[];
|
|
1891
1948
|
rectangles?: SchematicRectangle[];
|
|
1892
1949
|
textBoxes?: SchematicTextBox[];
|
|
@@ -1913,6 +1970,7 @@ declare class KicadSch extends SxClass {
|
|
|
1913
1970
|
private _wires;
|
|
1914
1971
|
private _junctions;
|
|
1915
1972
|
private _noConnects;
|
|
1973
|
+
private _arcs;
|
|
1916
1974
|
private _polylines;
|
|
1917
1975
|
private _rectangles;
|
|
1918
1976
|
private _textBoxes;
|
|
@@ -1956,6 +2014,8 @@ declare class KicadSch extends SxClass {
|
|
|
1956
2014
|
set wires(value: Wire[]);
|
|
1957
2015
|
get noConnects(): NoConnect[];
|
|
1958
2016
|
set noConnects(value: NoConnect[]);
|
|
2017
|
+
get arcs(): SchematicArc[];
|
|
2018
|
+
set arcs(value: SchematicArc[]);
|
|
1959
2019
|
get polylines(): Polyline[];
|
|
1960
2020
|
set polylines(value: Polyline[]);
|
|
1961
2021
|
get rectangles(): SchematicRectangle[];
|
|
@@ -6486,4 +6546,4 @@ declare const parseKicadPcb: (sexpr: string) => KicadPcb;
|
|
|
6486
6546
|
declare const parseKicadSym: (sexpr: string) => KicadSymbolLib;
|
|
6487
6547
|
declare const parseKicadMod: (sexpr: string) => Footprint;
|
|
6488
6548
|
|
|
6489
|
-
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 };
|
|
6549
|
+
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, 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
|
@@ -866,6 +866,7 @@ var TextEffectsFont = class _TextEffectsFont extends SxClass {
|
|
|
866
866
|
token = "font";
|
|
867
867
|
_sxFace;
|
|
868
868
|
_sxSize;
|
|
869
|
+
_sxColor;
|
|
869
870
|
_sxThickness;
|
|
870
871
|
_sxLineSpacing;
|
|
871
872
|
_sxBold;
|
|
@@ -891,6 +892,12 @@ var TextEffectsFont = class _TextEffectsFont extends SxClass {
|
|
|
891
892
|
}
|
|
892
893
|
this._sxSize = new TextEffectsFontSize(value.height, value.width);
|
|
893
894
|
}
|
|
895
|
+
get color() {
|
|
896
|
+
return this._sxColor?.color;
|
|
897
|
+
}
|
|
898
|
+
set color(value) {
|
|
899
|
+
this._sxColor = value === void 0 ? void 0 : new Color([value.r, value.g, value.b, value.a]);
|
|
900
|
+
}
|
|
894
901
|
get thickness() {
|
|
895
902
|
return this._sxThickness?.value;
|
|
896
903
|
}
|
|
@@ -923,6 +930,7 @@ var TextEffectsFont = class _TextEffectsFont extends SxClass {
|
|
|
923
930
|
);
|
|
924
931
|
font._sxFace = propertyMap.face;
|
|
925
932
|
font._sxSize = propertyMap.size;
|
|
933
|
+
font._sxColor = propertyMap.color;
|
|
926
934
|
font._sxThickness = propertyMap.thickness;
|
|
927
935
|
font._sxLineSpacing = propertyMap.line_spacing;
|
|
928
936
|
font._sxBold = propertyMap.bold;
|
|
@@ -952,6 +960,7 @@ var TextEffectsFont = class _TextEffectsFont extends SxClass {
|
|
|
952
960
|
const children = [];
|
|
953
961
|
if (this._sxFace) children.push(this._sxFace);
|
|
954
962
|
if (this._sxSize) children.push(this._sxSize);
|
|
963
|
+
if (this._sxColor) children.push(this._sxColor);
|
|
955
964
|
if (this._sxThickness) children.push(this._sxThickness);
|
|
956
965
|
if (this._sxBold) children.push(this._sxBold);
|
|
957
966
|
if (this._sxItalic) children.push(this._sxItalic);
|
|
@@ -966,6 +975,9 @@ var TextEffectsFont = class _TextEffectsFont extends SxClass {
|
|
|
966
975
|
if (this._sxSize) {
|
|
967
976
|
lines.push(this._sxSize.getStringIndented());
|
|
968
977
|
}
|
|
978
|
+
if (this._sxColor) {
|
|
979
|
+
lines.push(this._sxColor.getStringIndented());
|
|
980
|
+
}
|
|
969
981
|
if (this._sxThickness) {
|
|
970
982
|
lines.push(this._sxThickness.getStringIndented());
|
|
971
983
|
}
|
|
@@ -4341,8 +4353,163 @@ var NoConnect = class _NoConnect extends SxClass {
|
|
|
4341
4353
|
};
|
|
4342
4354
|
SxClass.register(NoConnect);
|
|
4343
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
|
+
|
|
4344
4511
|
// lib/sexpr/classes/BusEntry.ts
|
|
4345
|
-
var
|
|
4512
|
+
var SUPPORTED_TOKENS6 = /* @__PURE__ */ new Set(["at", "size", "stroke", "uuid"]);
|
|
4346
4513
|
var BusEntry = class _BusEntry extends SxClass {
|
|
4347
4514
|
static token = "bus_entry";
|
|
4348
4515
|
static parentToken = "kicad_sch";
|
|
@@ -4376,7 +4543,7 @@ var BusEntry = class _BusEntry extends SxClass {
|
|
|
4376
4543
|
);
|
|
4377
4544
|
}
|
|
4378
4545
|
const unsupportedTokens = Object.keys(propertyMap).filter(
|
|
4379
|
-
(token) => !
|
|
4546
|
+
(token) => !SUPPORTED_TOKENS6.has(token)
|
|
4380
4547
|
);
|
|
4381
4548
|
if (unsupportedTokens.length > 0) {
|
|
4382
4549
|
throw new Error(
|
|
@@ -4466,7 +4633,7 @@ var BusEntrySize = class _BusEntrySize extends SxClass {
|
|
|
4466
4633
|
SxClass.register(BusEntrySize);
|
|
4467
4634
|
|
|
4468
4635
|
// lib/sexpr/classes/Label.ts
|
|
4469
|
-
var
|
|
4636
|
+
var SUPPORTED_TOKENS7 = /* @__PURE__ */ new Set(["at", "effects", "uuid", "fields_autoplaced"]);
|
|
4470
4637
|
var Label = class _Label extends SxClass {
|
|
4471
4638
|
static token = "label";
|
|
4472
4639
|
static parentToken = "kicad_sch";
|
|
@@ -4508,7 +4675,7 @@ var Label = class _Label extends SxClass {
|
|
|
4508
4675
|
label._value = value;
|
|
4509
4676
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(rest, this.token);
|
|
4510
4677
|
const unsupportedTokens = Object.keys(propertyMap).filter(
|
|
4511
|
-
(token) => !
|
|
4678
|
+
(token) => !SUPPORTED_TOKENS7.has(token)
|
|
4512
4679
|
);
|
|
4513
4680
|
if (unsupportedTokens.length > 0) {
|
|
4514
4681
|
throw new Error(
|
|
@@ -4516,7 +4683,7 @@ var Label = class _Label extends SxClass {
|
|
|
4516
4683
|
);
|
|
4517
4684
|
}
|
|
4518
4685
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
4519
|
-
if (!
|
|
4686
|
+
if (!SUPPORTED_TOKENS7.has(token)) {
|
|
4520
4687
|
throw new Error(
|
|
4521
4688
|
`Unsupported child tokens inside label expression: ${token}`
|
|
4522
4689
|
);
|
|
@@ -4826,7 +4993,7 @@ var Property = class _Property extends SxClass {
|
|
|
4826
4993
|
SxClass.register(Property);
|
|
4827
4994
|
|
|
4828
4995
|
// lib/sexpr/classes/GlobalLabel.ts
|
|
4829
|
-
var
|
|
4996
|
+
var SUPPORTED_TOKENS8 = /* @__PURE__ */ new Set([
|
|
4830
4997
|
"shape",
|
|
4831
4998
|
"at",
|
|
4832
4999
|
"effects",
|
|
@@ -4896,7 +5063,7 @@ var GlobalLabel = class _GlobalLabel extends SxClass {
|
|
|
4896
5063
|
const restWithoutShape = shapeIndex >= 0 ? rest.filter((_, i) => i !== shapeIndex) : rest;
|
|
4897
5064
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(restWithoutShape, this.token);
|
|
4898
5065
|
const unsupportedTokens = Object.keys(propertyMap).filter(
|
|
4899
|
-
(token) => !
|
|
5066
|
+
(token) => !SUPPORTED_TOKENS8.has(token)
|
|
4900
5067
|
);
|
|
4901
5068
|
if (unsupportedTokens.length > 0) {
|
|
4902
5069
|
throw new Error(
|
|
@@ -4904,7 +5071,7 @@ var GlobalLabel = class _GlobalLabel extends SxClass {
|
|
|
4904
5071
|
);
|
|
4905
5072
|
}
|
|
4906
5073
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
4907
|
-
if (!
|
|
5074
|
+
if (!SUPPORTED_TOKENS8.has(token)) {
|
|
4908
5075
|
throw new Error(
|
|
4909
5076
|
`Unsupported child tokens inside global_label expression: ${token}`
|
|
4910
5077
|
);
|
|
@@ -4990,7 +5157,7 @@ var GlobalLabel = class _GlobalLabel extends SxClass {
|
|
|
4990
5157
|
SxClass.register(GlobalLabel);
|
|
4991
5158
|
|
|
4992
5159
|
// lib/sexpr/classes/SchematicText.ts
|
|
4993
|
-
var
|
|
5160
|
+
var SUPPORTED_TOKENS9 = /* @__PURE__ */ new Set(["exclude_from_sim", "at", "effects", "uuid"]);
|
|
4994
5161
|
var SchematicText = class _SchematicText extends SxClass {
|
|
4995
5162
|
static token = "text";
|
|
4996
5163
|
static parentToken = "kicad_sch";
|
|
@@ -5028,7 +5195,7 @@ var SchematicText = class _SchematicText extends SxClass {
|
|
|
5028
5195
|
text._value = value;
|
|
5029
5196
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(rest, this.token);
|
|
5030
5197
|
const unsupportedTokens = Object.keys(propertyMap).filter(
|
|
5031
|
-
(token) => !
|
|
5198
|
+
(token) => !SUPPORTED_TOKENS9.has(token)
|
|
5032
5199
|
);
|
|
5033
5200
|
if (unsupportedTokens.length > 0) {
|
|
5034
5201
|
throw new Error(
|
|
@@ -5036,7 +5203,7 @@ var SchematicText = class _SchematicText extends SxClass {
|
|
|
5036
5203
|
);
|
|
5037
5204
|
}
|
|
5038
5205
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
5039
|
-
if (!
|
|
5206
|
+
if (!SUPPORTED_TOKENS9.has(token)) {
|
|
5040
5207
|
throw new Error(
|
|
5041
5208
|
`Unsupported child tokens inside text expression: ${token}`
|
|
5042
5209
|
);
|
|
@@ -5113,7 +5280,7 @@ var SchematicTextBox = class extends SymbolTextBox {
|
|
|
5113
5280
|
SxClass.register(SchematicTextBox);
|
|
5114
5281
|
|
|
5115
5282
|
// lib/sexpr/classes/SchematicRectangle.ts
|
|
5116
|
-
var
|
|
5283
|
+
var SUPPORTED_TOKENS10 = /* @__PURE__ */ new Set(["start", "end", "stroke", "fill", "uuid"]);
|
|
5117
5284
|
var SchematicRectangle = class _SchematicRectangle extends SxClass {
|
|
5118
5285
|
static token = "rectangle";
|
|
5119
5286
|
static parentToken = "kicad_sch";
|
|
@@ -5127,7 +5294,7 @@ var SchematicRectangle = class _SchematicRectangle extends SxClass {
|
|
|
5127
5294
|
const rectangle = new _SchematicRectangle();
|
|
5128
5295
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
5129
5296
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
5130
|
-
if (!
|
|
5297
|
+
if (!SUPPORTED_TOKENS10.has(token)) {
|
|
5131
5298
|
throw new Error(
|
|
5132
5299
|
`rectangle encountered unsupported child token "${token}"`
|
|
5133
5300
|
);
|
|
@@ -5925,6 +6092,7 @@ var MULTI_CHILD_TOKENS2 = /* @__PURE__ */ new Set([
|
|
|
5925
6092
|
"wire",
|
|
5926
6093
|
"no_connect",
|
|
5927
6094
|
"sheet_instances",
|
|
6095
|
+
"arc",
|
|
5928
6096
|
"polyline",
|
|
5929
6097
|
"rectangle",
|
|
5930
6098
|
"text_box"
|
|
@@ -5955,6 +6123,7 @@ var KicadSch = class _KicadSch extends SxClass {
|
|
|
5955
6123
|
_wires = [];
|
|
5956
6124
|
_junctions = [];
|
|
5957
6125
|
_noConnects = [];
|
|
6126
|
+
_arcs = [];
|
|
5958
6127
|
_polylines = [];
|
|
5959
6128
|
_rectangles = [];
|
|
5960
6129
|
_textBoxes = [];
|
|
@@ -6023,6 +6192,9 @@ var KicadSch = class _KicadSch extends SxClass {
|
|
|
6023
6192
|
if (params.noConnects !== void 0) {
|
|
6024
6193
|
this.noConnects = params.noConnects;
|
|
6025
6194
|
}
|
|
6195
|
+
if (params.arcs !== void 0) {
|
|
6196
|
+
this.arcs = params.arcs;
|
|
6197
|
+
}
|
|
6026
6198
|
if (params.polylines !== void 0) {
|
|
6027
6199
|
this.polylines = params.polylines;
|
|
6028
6200
|
}
|
|
@@ -6086,6 +6258,7 @@ var KicadSch = class _KicadSch extends SxClass {
|
|
|
6086
6258
|
junctions: arrayPropertyMap.junction ?? [],
|
|
6087
6259
|
wires: arrayPropertyMap.wire ?? [],
|
|
6088
6260
|
noConnects: arrayPropertyMap.no_connect ?? [],
|
|
6261
|
+
arcs: arrayPropertyMap.arc ?? [],
|
|
6089
6262
|
polylines: arrayPropertyMap.polyline ?? [],
|
|
6090
6263
|
rectangles: arrayPropertyMap.rectangle ?? [],
|
|
6091
6264
|
textBoxes: arrayPropertyMap.text_box ?? []
|
|
@@ -6213,6 +6386,12 @@ var KicadSch = class _KicadSch extends SxClass {
|
|
|
6213
6386
|
set noConnects(value) {
|
|
6214
6387
|
this._noConnects = [...value];
|
|
6215
6388
|
}
|
|
6389
|
+
get arcs() {
|
|
6390
|
+
return [...this._arcs];
|
|
6391
|
+
}
|
|
6392
|
+
set arcs(value) {
|
|
6393
|
+
this._arcs = [...value];
|
|
6394
|
+
}
|
|
6216
6395
|
get polylines() {
|
|
6217
6396
|
return [...this._polylines];
|
|
6218
6397
|
}
|
|
@@ -6252,6 +6431,7 @@ var KicadSch = class _KicadSch extends SxClass {
|
|
|
6252
6431
|
children.push(...this._junctions);
|
|
6253
6432
|
children.push(...this._wires);
|
|
6254
6433
|
children.push(...this._noConnects);
|
|
6434
|
+
children.push(...this._arcs);
|
|
6255
6435
|
children.push(...this._polylines);
|
|
6256
6436
|
children.push(...this._rectangles);
|
|
6257
6437
|
children.push(...this._textBoxes);
|
|
@@ -7251,7 +7431,7 @@ var GrLineStart = class _GrLineStart extends SxClass {
|
|
|
7251
7431
|
SxClass.register(GrLineStart);
|
|
7252
7432
|
|
|
7253
7433
|
// lib/sexpr/classes/PadPrimitiveGrLine.ts
|
|
7254
|
-
var
|
|
7434
|
+
var SUPPORTED_TOKENS11 = /* @__PURE__ */ new Set(["start", "end", "width"]);
|
|
7255
7435
|
var PadPrimitiveGrLine = class _PadPrimitiveGrLine extends SxClass {
|
|
7256
7436
|
static token = "gr_line";
|
|
7257
7437
|
static parentToken = "primitives";
|
|
@@ -7263,14 +7443,14 @@ var PadPrimitiveGrLine = class _PadPrimitiveGrLine extends SxClass {
|
|
|
7263
7443
|
const line = new _PadPrimitiveGrLine();
|
|
7264
7444
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
7265
7445
|
for (const token of Object.keys(propertyMap)) {
|
|
7266
|
-
if (!
|
|
7446
|
+
if (!SUPPORTED_TOKENS11.has(token)) {
|
|
7267
7447
|
throw new Error(
|
|
7268
7448
|
`pad primitive gr_line encountered unsupported child token "${token}"`
|
|
7269
7449
|
);
|
|
7270
7450
|
}
|
|
7271
7451
|
}
|
|
7272
7452
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
7273
|
-
if (!
|
|
7453
|
+
if (!SUPPORTED_TOKENS11.has(token)) {
|
|
7274
7454
|
throw new Error(
|
|
7275
7455
|
`pad primitive gr_line encountered unsupported child token "${token}"`
|
|
7276
7456
|
);
|
|
@@ -7352,7 +7532,7 @@ var PadPrimitiveGrLine = class _PadPrimitiveGrLine extends SxClass {
|
|
|
7352
7532
|
SxClass.register(PadPrimitiveGrLine);
|
|
7353
7533
|
|
|
7354
7534
|
// lib/sexpr/classes/PadPrimitiveGrArc.ts
|
|
7355
|
-
var
|
|
7535
|
+
var SUPPORTED_TOKENS12 = /* @__PURE__ */ new Set(["start", "mid", "end", "width"]);
|
|
7356
7536
|
var PadPrimitiveGrArc = class _PadPrimitiveGrArc extends SxClass {
|
|
7357
7537
|
static token = "gr_arc";
|
|
7358
7538
|
static parentToken = "primitives";
|
|
@@ -7372,14 +7552,14 @@ var PadPrimitiveGrArc = class _PadPrimitiveGrArc extends SxClass {
|
|
|
7372
7552
|
const arc = new _PadPrimitiveGrArc();
|
|
7373
7553
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
7374
7554
|
for (const token of Object.keys(propertyMap)) {
|
|
7375
|
-
if (!
|
|
7555
|
+
if (!SUPPORTED_TOKENS12.has(token)) {
|
|
7376
7556
|
throw new Error(
|
|
7377
7557
|
`pad primitive gr_arc encountered unsupported child token "${token}"`
|
|
7378
7558
|
);
|
|
7379
7559
|
}
|
|
7380
7560
|
}
|
|
7381
7561
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
7382
|
-
if (!
|
|
7562
|
+
if (!SUPPORTED_TOKENS12.has(token)) {
|
|
7383
7563
|
throw new Error(
|
|
7384
7564
|
`pad primitive gr_arc encountered unsupported child token "${token}"`
|
|
7385
7565
|
);
|
|
@@ -7549,7 +7729,7 @@ var PadPrimitiveGrArcEnd = class _PadPrimitiveGrArcEnd extends PadPrimitiveGrArc
|
|
|
7549
7729
|
SxClass.register(PadPrimitiveGrArcEnd);
|
|
7550
7730
|
|
|
7551
7731
|
// lib/sexpr/classes/PadPrimitiveGrCircle.ts
|
|
7552
|
-
var
|
|
7732
|
+
var SUPPORTED_TOKENS13 = /* @__PURE__ */ new Set(["center", "end", "width", "fill"]);
|
|
7553
7733
|
var PadPrimitiveGrCircle = class _PadPrimitiveGrCircle extends SxClass {
|
|
7554
7734
|
static token = "gr_circle";
|
|
7555
7735
|
static parentToken = "primitives";
|
|
@@ -7569,14 +7749,14 @@ var PadPrimitiveGrCircle = class _PadPrimitiveGrCircle extends SxClass {
|
|
|
7569
7749
|
const circle = new _PadPrimitiveGrCircle();
|
|
7570
7750
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
7571
7751
|
for (const token of Object.keys(propertyMap)) {
|
|
7572
|
-
if (!
|
|
7752
|
+
if (!SUPPORTED_TOKENS13.has(token)) {
|
|
7573
7753
|
throw new Error(
|
|
7574
7754
|
`pad primitive gr_circle encountered unsupported child token "${token}"`
|
|
7575
7755
|
);
|
|
7576
7756
|
}
|
|
7577
7757
|
}
|
|
7578
7758
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
7579
|
-
if (!
|
|
7759
|
+
if (!SUPPORTED_TOKENS13.has(token)) {
|
|
7580
7760
|
throw new Error(
|
|
7581
7761
|
`pad primitive gr_circle encountered unsupported child token "${token}"`
|
|
7582
7762
|
);
|
|
@@ -8444,7 +8624,7 @@ var SINGLE_TOKENS = /* @__PURE__ */ new Set([
|
|
|
8444
8624
|
"teardrops"
|
|
8445
8625
|
]);
|
|
8446
8626
|
var MULTI_TOKENS = /* @__PURE__ */ new Set(["property"]);
|
|
8447
|
-
var
|
|
8627
|
+
var SUPPORTED_TOKENS14 = /* @__PURE__ */ new Set([...SINGLE_TOKENS, ...MULTI_TOKENS]);
|
|
8448
8628
|
var ensureSingle = (arrayPropertyMap, token) => {
|
|
8449
8629
|
const entries = arrayPropertyMap[token];
|
|
8450
8630
|
if (entries && entries.length > 1) {
|
|
@@ -8588,12 +8768,12 @@ var FootprintPad = class _FootprintPad extends SxClass {
|
|
|
8588
8768
|
}
|
|
8589
8769
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveNodes, this.token);
|
|
8590
8770
|
for (const token of Object.keys(propertyMap)) {
|
|
8591
|
-
if (!
|
|
8771
|
+
if (!SUPPORTED_TOKENS14.has(token)) {
|
|
8592
8772
|
throw new Error(`pad encountered unsupported child token "${token}"`);
|
|
8593
8773
|
}
|
|
8594
8774
|
}
|
|
8595
8775
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
8596
|
-
if (!
|
|
8776
|
+
if (!SUPPORTED_TOKENS14.has(token)) {
|
|
8597
8777
|
throw new Error(`pad encountered unsupported child token "${token}"`);
|
|
8598
8778
|
}
|
|
8599
8779
|
if (!MULTI_TOKENS.has(token) && entries.length > 1) {
|
|
@@ -10565,7 +10745,7 @@ var FpArcEnd = class _FpArcEnd extends SxClass {
|
|
|
10565
10745
|
SxClass.register(FpArcEnd);
|
|
10566
10746
|
|
|
10567
10747
|
// lib/sexpr/classes/FpCurve.ts
|
|
10568
|
-
var
|
|
10748
|
+
var SUPPORTED_TOKENS15 = /* @__PURE__ */ new Set([
|
|
10569
10749
|
"pts",
|
|
10570
10750
|
"xy",
|
|
10571
10751
|
"layer",
|
|
@@ -10619,14 +10799,14 @@ var FpCurve = class _FpCurve extends SxClass {
|
|
|
10619
10799
|
}
|
|
10620
10800
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(structuredPrimitives, this.token);
|
|
10621
10801
|
for (const token of Object.keys(propertyMap)) {
|
|
10622
|
-
if (!
|
|
10802
|
+
if (!SUPPORTED_TOKENS15.has(token)) {
|
|
10623
10803
|
throw new Error(
|
|
10624
10804
|
`fp_curve encountered unsupported child token "${token}"`
|
|
10625
10805
|
);
|
|
10626
10806
|
}
|
|
10627
10807
|
}
|
|
10628
10808
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
10629
|
-
if (!
|
|
10809
|
+
if (!SUPPORTED_TOKENS15.has(token)) {
|
|
10630
10810
|
throw new Error(
|
|
10631
10811
|
`fp_curve encountered unsupported child token "${token}"`
|
|
10632
10812
|
);
|
|
@@ -10852,7 +11032,7 @@ var FpPolyLocked = class _FpPolyLocked extends SxPrimitiveBoolean {
|
|
|
10852
11032
|
SxClass.register(FpPolyLocked);
|
|
10853
11033
|
|
|
10854
11034
|
// lib/sexpr/classes/FpPoly.ts
|
|
10855
|
-
var
|
|
11035
|
+
var SUPPORTED_TOKENS16 = /* @__PURE__ */ new Set([
|
|
10856
11036
|
"pts",
|
|
10857
11037
|
"xy",
|
|
10858
11038
|
"layer",
|
|
@@ -10890,12 +11070,12 @@ var FpPoly = class _FpPoly extends SxClass {
|
|
|
10890
11070
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
10891
11071
|
const unexpectedTokens = /* @__PURE__ */ new Set();
|
|
10892
11072
|
for (const token of Object.keys(propertyMap)) {
|
|
10893
|
-
if (!
|
|
11073
|
+
if (!SUPPORTED_TOKENS16.has(token)) {
|
|
10894
11074
|
unexpectedTokens.add(token);
|
|
10895
11075
|
}
|
|
10896
11076
|
}
|
|
10897
11077
|
for (const token of Object.keys(arrayPropertyMap)) {
|
|
10898
|
-
if (!
|
|
11078
|
+
if (!SUPPORTED_TOKENS16.has(token)) {
|
|
10899
11079
|
unexpectedTokens.add(token);
|
|
10900
11080
|
}
|
|
10901
11081
|
if (token !== "xy" && arrayPropertyMap[token].length > 1) {
|
|
@@ -10949,7 +11129,7 @@ var FpPoly = class _FpPoly extends SxClass {
|
|
|
10949
11129
|
`fp_poly child token must be a string, received: ${JSON.stringify(token)}`
|
|
10950
11130
|
);
|
|
10951
11131
|
}
|
|
10952
|
-
if (!
|
|
11132
|
+
if (!SUPPORTED_TOKENS16.has(token)) {
|
|
10953
11133
|
throw new Error(
|
|
10954
11134
|
`Unsupported child token inside fp_poly expression: ${token}`
|
|
10955
11135
|
);
|
|
@@ -13090,7 +13270,7 @@ var SINGLE_TOKENS4 = /* @__PURE__ */ new Set([
|
|
|
13090
13270
|
"fill"
|
|
13091
13271
|
]);
|
|
13092
13272
|
var MULTI_TOKENS2 = /* @__PURE__ */ new Set(["polygon", "filled_polygon"]);
|
|
13093
|
-
var
|
|
13273
|
+
var SUPPORTED_TOKENS17 = /* @__PURE__ */ new Set([...SINGLE_TOKENS4, ...MULTI_TOKENS2]);
|
|
13094
13274
|
var Zone = class _Zone extends SxClass {
|
|
13095
13275
|
static token = "zone";
|
|
13096
13276
|
token = "zone";
|
|
@@ -13149,7 +13329,7 @@ var Zone = class _Zone extends SxClass {
|
|
|
13149
13329
|
}
|
|
13150
13330
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
13151
13331
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
13152
|
-
if (!
|
|
13332
|
+
if (!SUPPORTED_TOKENS17.has(token)) {
|
|
13153
13333
|
throw new Error(`zone encountered unsupported child token "${token}"`);
|
|
13154
13334
|
}
|
|
13155
13335
|
if (!MULTI_TOKENS2.has(token) && entries.length > 1) {
|
|
@@ -13395,7 +13575,7 @@ var MULTI_TOKENS3 = /* @__PURE__ */ new Set([
|
|
|
13395
13575
|
"zone",
|
|
13396
13576
|
"group"
|
|
13397
13577
|
]);
|
|
13398
|
-
var
|
|
13578
|
+
var SUPPORTED_TOKENS18 = /* @__PURE__ */ new Set([...SINGLE_TOKENS5, ...MULTI_TOKENS3]);
|
|
13399
13579
|
var Footprint = class _Footprint extends SxClass {
|
|
13400
13580
|
static token = "footprint";
|
|
13401
13581
|
token = "footprint";
|
|
@@ -13533,14 +13713,14 @@ var Footprint = class _Footprint extends SxClass {
|
|
|
13533
13713
|
}
|
|
13534
13714
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(rawNodes, this.token);
|
|
13535
13715
|
for (const token of Object.keys(propertyMap)) {
|
|
13536
|
-
if (!
|
|
13716
|
+
if (!SUPPORTED_TOKENS18.has(token)) {
|
|
13537
13717
|
throw new Error(
|
|
13538
13718
|
`footprint encountered unsupported child token "${token}"`
|
|
13539
13719
|
);
|
|
13540
13720
|
}
|
|
13541
13721
|
}
|
|
13542
13722
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
13543
|
-
if (!
|
|
13723
|
+
if (!SUPPORTED_TOKENS18.has(token)) {
|
|
13544
13724
|
throw new Error(
|
|
13545
13725
|
`footprint encountered unsupported child token "${token}"`
|
|
13546
13726
|
);
|
|
@@ -14773,7 +14953,7 @@ var GrCircleLocked = class _GrCircleLocked extends SxClass {
|
|
|
14773
14953
|
SxClass.register(GrCircleLocked);
|
|
14774
14954
|
|
|
14775
14955
|
// lib/sexpr/classes/GrCurve.ts
|
|
14776
|
-
var
|
|
14956
|
+
var SUPPORTED_TOKENS19 = /* @__PURE__ */ new Set([
|
|
14777
14957
|
"pts",
|
|
14778
14958
|
"xy",
|
|
14779
14959
|
"layer",
|
|
@@ -14805,12 +14985,12 @@ var GrCurve = class _GrCurve extends SxClass {
|
|
|
14805
14985
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
14806
14986
|
const unexpectedTokens = /* @__PURE__ */ new Set();
|
|
14807
14987
|
for (const token of Object.keys(propertyMap)) {
|
|
14808
|
-
if (!
|
|
14988
|
+
if (!SUPPORTED_TOKENS19.has(token)) {
|
|
14809
14989
|
unexpectedTokens.add(token);
|
|
14810
14990
|
}
|
|
14811
14991
|
}
|
|
14812
14992
|
for (const token of Object.keys(arrayPropertyMap)) {
|
|
14813
|
-
if (!
|
|
14993
|
+
if (!SUPPORTED_TOKENS19.has(token)) {
|
|
14814
14994
|
unexpectedTokens.add(token);
|
|
14815
14995
|
continue;
|
|
14816
14996
|
}
|
|
@@ -15971,7 +16151,7 @@ var GrPolyFill = class _GrPolyFill extends SxClass {
|
|
|
15971
16151
|
}
|
|
15972
16152
|
};
|
|
15973
16153
|
SxClass.register(GrPolyFill);
|
|
15974
|
-
var
|
|
16154
|
+
var SUPPORTED_TOKENS20 = /* @__PURE__ */ new Set([
|
|
15975
16155
|
"pts",
|
|
15976
16156
|
"xy",
|
|
15977
16157
|
"layer",
|
|
@@ -16006,12 +16186,12 @@ var GrPoly = class _GrPoly extends SxClass {
|
|
|
16006
16186
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
16007
16187
|
const unexpectedTokens = /* @__PURE__ */ new Set();
|
|
16008
16188
|
for (const token of Object.keys(propertyMap)) {
|
|
16009
|
-
if (!
|
|
16189
|
+
if (!SUPPORTED_TOKENS20.has(token)) {
|
|
16010
16190
|
unexpectedTokens.add(token);
|
|
16011
16191
|
}
|
|
16012
16192
|
}
|
|
16013
16193
|
for (const token of Object.keys(arrayPropertyMap)) {
|
|
16014
|
-
if (!
|
|
16194
|
+
if (!SUPPORTED_TOKENS20.has(token)) {
|
|
16015
16195
|
unexpectedTokens.add(token);
|
|
16016
16196
|
}
|
|
16017
16197
|
if (token !== "xy" && arrayPropertyMap[token].length > 1) {
|
|
@@ -16057,7 +16237,7 @@ var GrPoly = class _GrPoly extends SxClass {
|
|
|
16057
16237
|
`gr_poly child token must be a string, received: ${JSON.stringify(token)}`
|
|
16058
16238
|
);
|
|
16059
16239
|
}
|
|
16060
|
-
if (!
|
|
16240
|
+
if (!SUPPORTED_TOKENS20.has(token)) {
|
|
16061
16241
|
throw new Error(
|
|
16062
16242
|
`Unsupported child token inside gr_poly expression: ${token}`
|
|
16063
16243
|
);
|
|
@@ -16248,7 +16428,7 @@ var DimensionFormatUnitsFormat = class extends SxPrimitiveNumber {
|
|
|
16248
16428
|
SxClass.register(DimensionFormatUnitsFormat);
|
|
16249
16429
|
|
|
16250
16430
|
// lib/sexpr/classes/DimensionFormat.ts
|
|
16251
|
-
var
|
|
16431
|
+
var SUPPORTED_TOKENS21 = /* @__PURE__ */ new Set([
|
|
16252
16432
|
"prefix",
|
|
16253
16433
|
"suffix",
|
|
16254
16434
|
"units",
|
|
@@ -16272,7 +16452,7 @@ var DimensionFormat = class _DimensionFormat extends SxClass {
|
|
|
16272
16452
|
const format = new _DimensionFormat();
|
|
16273
16453
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
16274
16454
|
for (const token of Object.keys(arrayPropertyMap)) {
|
|
16275
|
-
if (!
|
|
16455
|
+
if (!SUPPORTED_TOKENS21.has(token)) {
|
|
16276
16456
|
throw new Error(`format does not support child token "${token}"`);
|
|
16277
16457
|
}
|
|
16278
16458
|
if (arrayPropertyMap[token].length > 1) {
|
|
@@ -16432,7 +16612,7 @@ var DimensionTextPositionMode = class extends SxPrimitiveNumber {
|
|
|
16432
16612
|
SxClass.register(DimensionTextPositionMode);
|
|
16433
16613
|
|
|
16434
16614
|
// lib/sexpr/classes/DimensionStyle.ts
|
|
16435
|
-
var
|
|
16615
|
+
var SUPPORTED_TOKENS22 = /* @__PURE__ */ new Set([
|
|
16436
16616
|
"thickness",
|
|
16437
16617
|
"arrow_length",
|
|
16438
16618
|
"text_position_mode",
|
|
@@ -16458,7 +16638,7 @@ var DimensionStyle = class _DimensionStyle extends SxClass {
|
|
|
16458
16638
|
const style = new _DimensionStyle();
|
|
16459
16639
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
16460
16640
|
for (const token of Object.keys(arrayPropertyMap)) {
|
|
16461
|
-
if (!
|
|
16641
|
+
if (!SUPPORTED_TOKENS22.has(token)) {
|
|
16462
16642
|
throw new Error(`style does not support child token "${token}"`);
|
|
16463
16643
|
}
|
|
16464
16644
|
if (arrayPropertyMap[token].length > 1) {
|
|
@@ -16525,7 +16705,7 @@ var DimensionType = class extends SxPrimitiveString {
|
|
|
16525
16705
|
SxClass.register(DimensionType);
|
|
16526
16706
|
|
|
16527
16707
|
// lib/sexpr/classes/Dimension.ts
|
|
16528
|
-
var
|
|
16708
|
+
var SUPPORTED_TOKENS23 = /* @__PURE__ */ new Set([
|
|
16529
16709
|
"locked",
|
|
16530
16710
|
"type",
|
|
16531
16711
|
"layer",
|
|
@@ -16559,7 +16739,7 @@ var Dimension = class _Dimension extends SxClass {
|
|
|
16559
16739
|
const dimension = new _Dimension();
|
|
16560
16740
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
16561
16741
|
for (const token of Object.keys(arrayPropertyMap)) {
|
|
16562
|
-
if (!
|
|
16742
|
+
if (!SUPPORTED_TOKENS23.has(token)) {
|
|
16563
16743
|
throw new Error(`dimension does not support child token "${token}"`);
|
|
16564
16744
|
}
|
|
16565
16745
|
if (arrayPropertyMap[token].length > 1) {
|
|
@@ -16638,7 +16818,7 @@ var TargetSize = class extends SxPrimitiveNumber {
|
|
|
16638
16818
|
SxClass.register(TargetSize);
|
|
16639
16819
|
|
|
16640
16820
|
// lib/sexpr/classes/Target.ts
|
|
16641
|
-
var
|
|
16821
|
+
var SUPPORTED_TOKENS24 = /* @__PURE__ */ new Set(["at", "size", "width", "layer", "uuid"]);
|
|
16642
16822
|
var Target = class _Target extends SxClass {
|
|
16643
16823
|
static token = "target";
|
|
16644
16824
|
static parentToken = "kicad_pcb";
|
|
@@ -16661,7 +16841,7 @@ var Target = class _Target extends SxClass {
|
|
|
16661
16841
|
const target = new _Target(rawShape);
|
|
16662
16842
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(rest, this.token);
|
|
16663
16843
|
for (const token of Object.keys(arrayPropertyMap)) {
|
|
16664
|
-
if (!
|
|
16844
|
+
if (!SUPPORTED_TOKENS24.has(token)) {
|
|
16665
16845
|
throw new Error(`target does not support child token "${token}"`);
|
|
16666
16846
|
}
|
|
16667
16847
|
if (arrayPropertyMap[token].length > 1) {
|
|
@@ -20828,6 +21008,8 @@ export {
|
|
|
20828
21008
|
PtsArcMid,
|
|
20829
21009
|
PtsArcStart,
|
|
20830
21010
|
RenderCache,
|
|
21011
|
+
SchematicArc,
|
|
21012
|
+
SchematicArcLocked,
|
|
20831
21013
|
SchematicPolyline,
|
|
20832
21014
|
SchematicRectangle,
|
|
20833
21015
|
SchematicSymbol,
|