kicadts 0.0.17 → 0.0.19
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 +199 -2
- package/dist/index.js +594 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -619,6 +619,16 @@ declare class SymbolDuplicatePinNumbersAreJumpers extends SxPrimitiveBoolean {
|
|
|
619
619
|
static parentToken: string;
|
|
620
620
|
token: string;
|
|
621
621
|
}
|
|
622
|
+
declare class Mirror extends SxClass {
|
|
623
|
+
static token: string;
|
|
624
|
+
static parentToken: string;
|
|
625
|
+
token: string;
|
|
626
|
+
value: string;
|
|
627
|
+
constructor(value: string);
|
|
628
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): Mirror;
|
|
629
|
+
getChildren(): SxClass[];
|
|
630
|
+
getString(): string;
|
|
631
|
+
}
|
|
622
632
|
declare class SymbolPinNumbers extends SxClass {
|
|
623
633
|
static token: string;
|
|
624
634
|
static parentToken: string;
|
|
@@ -817,6 +827,7 @@ declare class SymbolPower extends SxClass {
|
|
|
817
827
|
interface SchematicSymbolConstructorParams {
|
|
818
828
|
libraryId?: string;
|
|
819
829
|
at?: AtInput;
|
|
830
|
+
mirror?: string | Mirror;
|
|
820
831
|
unit?: number | SymbolUnit;
|
|
821
832
|
pinNumbers?: SymbolPinNumbers;
|
|
822
833
|
pinNames?: SymbolPinNames;
|
|
@@ -843,6 +854,7 @@ declare class SchematicSymbol extends SxClass {
|
|
|
843
854
|
token: string;
|
|
844
855
|
private _sxLibId?;
|
|
845
856
|
_sxAt?: At;
|
|
857
|
+
_sxMirror?: Mirror;
|
|
846
858
|
_sxUnit?: SymbolUnit;
|
|
847
859
|
_sxPinNumbers?: SymbolPinNumbers;
|
|
848
860
|
_sxPinNames?: SymbolPinNames;
|
|
@@ -870,6 +882,8 @@ declare class SchematicSymbol extends SxClass {
|
|
|
870
882
|
set libraryId(value: string | SymbolLibId | undefined);
|
|
871
883
|
get at(): At | undefined;
|
|
872
884
|
set at(value: AtInput | undefined);
|
|
885
|
+
get mirror(): string | undefined;
|
|
886
|
+
set mirror(value: string | Mirror | undefined);
|
|
873
887
|
get unit(): number | undefined;
|
|
874
888
|
set unit(value: number | undefined);
|
|
875
889
|
get pinNumbers(): SymbolPinNumbers | undefined;
|
|
@@ -3390,6 +3404,7 @@ interface GrCircleConstructorParams {
|
|
|
3390
3404
|
width?: Width | number;
|
|
3391
3405
|
stroke?: Stroke;
|
|
3392
3406
|
fill?: PadPrimitiveGrCircleFill | string;
|
|
3407
|
+
locked?: boolean;
|
|
3393
3408
|
tstamp?: Tstamp | string;
|
|
3394
3409
|
uuid?: Uuid | string;
|
|
3395
3410
|
}
|
|
@@ -3402,6 +3417,7 @@ declare class GrCircle extends SxClass {
|
|
|
3402
3417
|
private _sxWidth?;
|
|
3403
3418
|
private _sxStroke?;
|
|
3404
3419
|
private _sxFill?;
|
|
3420
|
+
private _sxLocked?;
|
|
3405
3421
|
private _sxTstamp?;
|
|
3406
3422
|
private _sxUuid?;
|
|
3407
3423
|
constructor(params?: GrCircleConstructorParams);
|
|
@@ -3424,8 +3440,11 @@ declare class GrCircle extends SxClass {
|
|
|
3424
3440
|
set fill(value: PadPrimitiveGrCircleFill | string | undefined);
|
|
3425
3441
|
get tstamp(): Tstamp | undefined;
|
|
3426
3442
|
set tstamp(value: Tstamp | string | undefined);
|
|
3427
|
-
get uuid():
|
|
3443
|
+
get uuid(): string | undefined;
|
|
3444
|
+
get uuidClass(): Uuid | undefined;
|
|
3428
3445
|
set uuid(value: Uuid | string | undefined);
|
|
3446
|
+
get locked(): boolean;
|
|
3447
|
+
set locked(value: boolean);
|
|
3429
3448
|
getChildren(): SxClass[];
|
|
3430
3449
|
private normalizeCenter;
|
|
3431
3450
|
private normalizeEnd;
|
|
@@ -3454,6 +3473,15 @@ declare class GrCircleEnd extends SxClass {
|
|
|
3454
3473
|
getChildren(): SxClass[];
|
|
3455
3474
|
getString(): string;
|
|
3456
3475
|
}
|
|
3476
|
+
declare class GrCircleLocked extends SxClass {
|
|
3477
|
+
static token: string;
|
|
3478
|
+
static parentToken: string;
|
|
3479
|
+
token: string;
|
|
3480
|
+
value: boolean;
|
|
3481
|
+
constructor(value: boolean);
|
|
3482
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): GrCircleLocked;
|
|
3483
|
+
getString(): string;
|
|
3484
|
+
}
|
|
3457
3485
|
|
|
3458
3486
|
interface GrCurveConstructorParams {
|
|
3459
3487
|
points?: Pts | Xy[] | Array<{
|
|
@@ -3571,6 +3599,128 @@ declare class GrLineLocked extends SxPrimitiveBoolean {
|
|
|
3571
3599
|
getString(): string;
|
|
3572
3600
|
}
|
|
3573
3601
|
|
|
3602
|
+
interface GrRectConstructorParams {
|
|
3603
|
+
start?: GrRectStart | {
|
|
3604
|
+
x: number;
|
|
3605
|
+
y: number;
|
|
3606
|
+
};
|
|
3607
|
+
end?: GrRectEnd | {
|
|
3608
|
+
x: number;
|
|
3609
|
+
y: number;
|
|
3610
|
+
};
|
|
3611
|
+
layer?: Layer | string | string[];
|
|
3612
|
+
width?: number | Width;
|
|
3613
|
+
stroke?: Stroke;
|
|
3614
|
+
fill?: boolean | GrRectFill;
|
|
3615
|
+
uuid?: string | Uuid;
|
|
3616
|
+
locked?: boolean;
|
|
3617
|
+
}
|
|
3618
|
+
declare class GrRect extends SxClass {
|
|
3619
|
+
static token: string;
|
|
3620
|
+
token: string;
|
|
3621
|
+
private _sxStart?;
|
|
3622
|
+
private _sxEnd?;
|
|
3623
|
+
private _sxLayer?;
|
|
3624
|
+
private _sxWidth?;
|
|
3625
|
+
private _sxStroke?;
|
|
3626
|
+
private _sxFill?;
|
|
3627
|
+
private _sxUuid?;
|
|
3628
|
+
private _sxLocked?;
|
|
3629
|
+
constructor(params?: GrRectConstructorParams);
|
|
3630
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): GrRect;
|
|
3631
|
+
get start(): GrRectStart | undefined;
|
|
3632
|
+
set start(value: GrRectStart | {
|
|
3633
|
+
x: number;
|
|
3634
|
+
y: number;
|
|
3635
|
+
} | undefined);
|
|
3636
|
+
get end(): GrRectEnd | undefined;
|
|
3637
|
+
set end(value: GrRectEnd | {
|
|
3638
|
+
x: number;
|
|
3639
|
+
y: number;
|
|
3640
|
+
} | undefined);
|
|
3641
|
+
get startPoint(): {
|
|
3642
|
+
x: number;
|
|
3643
|
+
y: number;
|
|
3644
|
+
} | undefined;
|
|
3645
|
+
get endPoint(): {
|
|
3646
|
+
x: number;
|
|
3647
|
+
y: number;
|
|
3648
|
+
} | undefined;
|
|
3649
|
+
get layer(): Layer | undefined;
|
|
3650
|
+
set layer(value: Layer | string | string[] | undefined);
|
|
3651
|
+
get stroke(): Stroke | undefined;
|
|
3652
|
+
set stroke(value: Stroke | undefined);
|
|
3653
|
+
get width(): number | undefined;
|
|
3654
|
+
set width(value: number | Width | undefined);
|
|
3655
|
+
get widthClass(): Width | undefined;
|
|
3656
|
+
set widthClass(value: Width | undefined);
|
|
3657
|
+
get fill(): boolean | undefined;
|
|
3658
|
+
set fill(value: boolean | GrRectFill | undefined);
|
|
3659
|
+
get fillClass(): GrRectFill | undefined;
|
|
3660
|
+
get uuid(): string | undefined;
|
|
3661
|
+
set uuid(value: string | Uuid | undefined);
|
|
3662
|
+
get uuidClass(): Uuid | undefined;
|
|
3663
|
+
get locked(): boolean;
|
|
3664
|
+
set locked(value: boolean);
|
|
3665
|
+
getChildren(): SxClass[];
|
|
3666
|
+
}
|
|
3667
|
+
declare class GrRectStart extends SxClass {
|
|
3668
|
+
static token: string;
|
|
3669
|
+
static parentToken: string;
|
|
3670
|
+
token: string;
|
|
3671
|
+
private _x;
|
|
3672
|
+
private _y;
|
|
3673
|
+
constructor(x: number, y: number);
|
|
3674
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): GrRectStart;
|
|
3675
|
+
get x(): number;
|
|
3676
|
+
set x(value: number);
|
|
3677
|
+
get y(): number;
|
|
3678
|
+
set y(value: number);
|
|
3679
|
+
toObject(): {
|
|
3680
|
+
x: number;
|
|
3681
|
+
y: number;
|
|
3682
|
+
};
|
|
3683
|
+
getChildren(): SxClass[];
|
|
3684
|
+
getString(): string;
|
|
3685
|
+
}
|
|
3686
|
+
declare class GrRectEnd extends SxClass {
|
|
3687
|
+
static token: string;
|
|
3688
|
+
static parentToken: string;
|
|
3689
|
+
token: string;
|
|
3690
|
+
private _x;
|
|
3691
|
+
private _y;
|
|
3692
|
+
constructor(x: number, y: number);
|
|
3693
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): GrRectEnd;
|
|
3694
|
+
get x(): number;
|
|
3695
|
+
set x(value: number);
|
|
3696
|
+
get y(): number;
|
|
3697
|
+
set y(value: number);
|
|
3698
|
+
toObject(): {
|
|
3699
|
+
x: number;
|
|
3700
|
+
y: number;
|
|
3701
|
+
};
|
|
3702
|
+
getChildren(): SxClass[];
|
|
3703
|
+
getString(): string;
|
|
3704
|
+
}
|
|
3705
|
+
declare class GrRectFill extends SxClass {
|
|
3706
|
+
static token: string;
|
|
3707
|
+
static parentToken: string;
|
|
3708
|
+
token: string;
|
|
3709
|
+
filled: boolean;
|
|
3710
|
+
constructor(filled: boolean);
|
|
3711
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): GrRectFill;
|
|
3712
|
+
getString(): string;
|
|
3713
|
+
}
|
|
3714
|
+
declare class GrRectLocked extends SxClass {
|
|
3715
|
+
static token: string;
|
|
3716
|
+
static parentToken: string;
|
|
3717
|
+
token: string;
|
|
3718
|
+
value: boolean;
|
|
3719
|
+
constructor(value: boolean);
|
|
3720
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): GrRectLocked;
|
|
3721
|
+
getString(): string;
|
|
3722
|
+
}
|
|
3723
|
+
|
|
3574
3724
|
interface GrTextPosition {
|
|
3575
3725
|
x: number;
|
|
3576
3726
|
y: number;
|
|
@@ -3611,6 +3761,53 @@ declare class GrText extends SxClass {
|
|
|
3611
3761
|
getString(): string;
|
|
3612
3762
|
}
|
|
3613
3763
|
|
|
3764
|
+
interface GroupConstructorParams {
|
|
3765
|
+
name?: string;
|
|
3766
|
+
uuid?: string | Uuid;
|
|
3767
|
+
locked?: boolean;
|
|
3768
|
+
members?: string[];
|
|
3769
|
+
}
|
|
3770
|
+
declare class Group extends SxClass {
|
|
3771
|
+
static token: string;
|
|
3772
|
+
token: string;
|
|
3773
|
+
private _name;
|
|
3774
|
+
private _sxUuid?;
|
|
3775
|
+
private _sxLocked?;
|
|
3776
|
+
private _sxMembers?;
|
|
3777
|
+
constructor(params?: GroupConstructorParams);
|
|
3778
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): Group;
|
|
3779
|
+
get name(): string;
|
|
3780
|
+
set name(value: string);
|
|
3781
|
+
get uuid(): string | undefined;
|
|
3782
|
+
set uuid(value: string | Uuid | undefined);
|
|
3783
|
+
get uuidClass(): Uuid | undefined;
|
|
3784
|
+
get locked(): boolean;
|
|
3785
|
+
set locked(value: boolean);
|
|
3786
|
+
get members(): string[];
|
|
3787
|
+
set members(value: string[]);
|
|
3788
|
+
get membersClass(): GroupMembers | undefined;
|
|
3789
|
+
getChildren(): SxClass[];
|
|
3790
|
+
getString(): string;
|
|
3791
|
+
}
|
|
3792
|
+
declare class GroupLocked extends SxClass {
|
|
3793
|
+
static token: string;
|
|
3794
|
+
static parentToken: string;
|
|
3795
|
+
token: string;
|
|
3796
|
+
value: boolean;
|
|
3797
|
+
constructor(value: boolean);
|
|
3798
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): GroupLocked;
|
|
3799
|
+
getString(): string;
|
|
3800
|
+
}
|
|
3801
|
+
declare class GroupMembers extends SxClass {
|
|
3802
|
+
static token: string;
|
|
3803
|
+
static parentToken: string;
|
|
3804
|
+
token: string;
|
|
3805
|
+
members: string[];
|
|
3806
|
+
constructor(members: string[]);
|
|
3807
|
+
static fromSexprPrimitives(primitiveSexprs: PrimitiveSExpr[]): GroupMembers;
|
|
3808
|
+
getString(): string;
|
|
3809
|
+
}
|
|
3810
|
+
|
|
3614
3811
|
declare class SegmentEnd extends SxClass {
|
|
3615
3812
|
static token: string;
|
|
3616
3813
|
static parentToken: string;
|
|
@@ -4828,4 +5025,4 @@ declare const parseKicadSch: (sexpr: string) => KicadSch;
|
|
|
4828
5025
|
declare const parseKicadPcb: (sexpr: string) => KicadPcb;
|
|
4829
5026
|
declare const parseKicadMod: (sexpr: string) => Footprint;
|
|
4830
5027
|
|
|
4831
|
-
export { At, type AtInput, Bus, type BusConstructorParams, BusEntry, type BusEntryConstructorParams, BusEntrySize, Color, Dnp, EmbeddedFonts, ExcludeFromSim, FieldsAutoplaced, Footprint, FootprintAttr, FootprintAutoplaceCost180, FootprintAutoplaceCost90, FootprintClearance, type FootprintConstructorParams, FootprintDescr, FootprintLocked, FootprintModel, FootprintNetTiePadGroups, FootprintPad, type FootprintPadConstructorParams, FootprintPath, FootprintPlaced, FootprintPrivateLayers, FootprintSheetfile, FootprintSheetname, FootprintSolderMaskMargin, FootprintSolderPasteMargin, FootprintSolderPasteRatio, FootprintTags, FootprintTedit, FootprintThermalGap, FootprintThermalWidth, FootprintZoneConnect, FpArc, type FpArcConstructorParams, FpArcEnd, FpArcMid, FpArcStart, FpCircle, FpCircleCenter, type FpCircleConstructorParams, FpCircleEnd, FpCircleFill, FpLine, type FpLineConstructorParams, FpLineEnd, FpLineStart, FpPoly, type FpPolyConstructorParams, FpPolyFill, FpPolyLocked, FpRect, type FpRectConstructorParams, FpRectEnd, FpRectFill, FpRectStart, FpText, FpTextBox, FpTextBoxAngle, type FpTextBoxConstructorParams, FpTextBoxEnd, FpTextBoxStart, type FpTextConstructorParams, type FpTextType, GlobalLabel, type GlobalLabelConstructorParams, type GlobalLabelShape, GrArc, type GrArcConstructorParams, GrArcEnd, GrArcMid, type GrArcPoint, GrArcStart, GrCircle, GrCircleCenter, type GrCircleConstructorParams, GrCircleEnd, type GrCirclePoint, GrCurve, type GrCurveConstructorParams, GrLine, GrLineAngle, type GrLineConstructorParams, GrLineEnd, GrLineLocked, type GrLinePoint, GrLineStart, GrText, type GrTextConstructorParams, type GrTextPosition, Image, type ImageConstructorParams, ImageData, ImageScale, InBom, Junction, type JunctionConstructorParams, JunctionDiameter, KicadPcb, type KicadPcbConstructorParams, KicadSch, type KicadSchConstructorParams, KicadSchGenerator, KicadSchGeneratorVersion, KicadSchVersion, Label, type LabelConstructorParams, Layer, Layers, LibSymbols, 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, PadRectDelta, PadRoundrectRratio, PadSize, type PadSizeInput, PadSolderMaskMargin, PadSolderPasteMargin, PadSolderPasteMarginRatio, PadTeardrops, PadThermalBridgeAngle, PadThermalGap, PadThermalWidth, PadZoneConnect, Paper, PcbGeneral, PcbGeneralLegacyTeardrops, PcbGeneralThickness, PcbGenerator, PcbGeneratorVersion, PcbLayerDefinition, PcbLayers, PcbNet, PcbPlotParams, PcbVersion, PlotParamCreateGerberJobFile, PlotParamCrossoutDnpOnFab, PlotParamDashedLineDashRatio, PlotParamDashedLineGapRatio, PlotParamDisableApertMacros, PlotParamDrillShape, PlotParamDxfImperialUnits, PlotParamDxfPolygonMode, PlotParamDxfUsePcbnewFont, PlotParamExcludeEdgeLayer, PlotParamHideDnpOnFab, PlotParamHpglPenDiameter, PlotParamHpglPenNumber, PlotParamHpglPenOverlay, PlotParamHpglPenSpeed, PlotParamLayerSelection, PlotParamLineWidth, PlotParamMirror, PlotParamMode, PlotParamOutputDirectory, PlotParamOutputFormat, PlotParamPadOnSilk, PlotParamPdfBackFpPropertyPopups, PlotParamPdfFrontFpPropertyPopups, PlotParamPdfMetadata, PlotParamPdfSingleDocument, PlotParamPlotBlackAndWhite, PlotParamPlotFrameRef, PlotParamPlotInvisible, PlotParamPlotInvisibleText, PlotParamPlotOnAllLayers, PlotParamPlotOnAllLayersSelection, PlotParamPlotOtherText, PlotParamPlotPadNumbers, PlotParamPlotReference, PlotParamPlotValue, PlotParamProperty, PlotParamPsA4Output, PlotParamPsNegative, PlotParamScaleSelection, PlotParamSketchDnpOnFab, PlotParamSketchPadsOnFab, PlotParamSubtractMaskFromSilk, PlotParamSvgPrecision, PlotParamUseAuxOrigin, PlotParamUseGerberAdvancedAttributes, PlotParamUseGerberAttributes, PlotParamUseGerberExtensions, PlotParamViaOnMask, Polyline, type PolylineConstructorParams, Property, type PropertyConstructorParams, PropertyHide, PropertyUnlocked, Pts, type RGBAColor, RenderCache, SchematicPolyline, SchematicSymbol, type SchematicSymbolConstructorParams, SchematicText, type SchematicTextConstructorParams, Segment, type SegmentConstructorParams, SegmentEnd, SegmentLocked, SegmentNet, SegmentStart, Setup, SetupAllowSoldermaskBridgesInFootprints, SetupAuxAxisOrigin, SetupEdgeWidth, SetupGridOrigin, SetupLastTraceWidth, SetupModEdgeWidth, SetupModTextSize, SetupModTextWidth, SetupPadDrill, SetupPadSize, SetupPadToMaskClearance, SetupPadToPasteClearance, SetupPadToPasteClearanceRatio, SetupPadToPasteClearanceValues, SetupPcbTextSize, SetupPcbTextWidth, type SetupProperty, type SetupPropertyValues, SetupSegmentWidth, SetupSolderMaskMinWidth, SetupTenting, SetupTraceClearance, SetupTraceMin, SetupTraceWidth, SetupUviaDrill, SetupUviaMinDrill, SetupUviaMinSize, SetupUviaSize, SetupUviasAllowed, SetupViaDrill, SetupViaMinDrill, SetupViaMinSize, SetupViaSize, SetupVisibleElements, SetupZone45Only, SetupZoneClearance, Sheet, type SheetConstructorParams, SheetFill, SheetInstancePage, SheetInstancePath, SheetInstances, SheetInstancesForSheet, SheetInstancesProject, SheetInstancesRoot, SheetInstancesRootPage, SheetInstancesRootPath, SheetPin, type SheetPinElectricalType, SheetProperty, SheetSize, Stackup, StackupCastellatedPads, StackupCopperFinish, StackupDielectricConstraints, StackupEdgeConnector, StackupEdgePlating, StackupLayer, StackupLayerColor, StackupLayerEpsilonR, StackupLayerLossTangent, StackupLayerMaterial, StackupLayerThickness, StackupLayerType, type StandardPaperSize, Stroke, type StrokeProperty, StrokeType, type StrokeTypeString, SxClass, SymbolArc, SymbolArcEnd, SymbolArcFill, SymbolArcMid, SymbolArcStart, SymbolCircle, SymbolCircleCenter, SymbolCircleFill, SymbolCircleRadius, SymbolDuplicatePinNumbersAreJumpers, SymbolFillType, SymbolInstancePath, SymbolInstanceReference, SymbolInstanceUnit, SymbolInstances, SymbolInstancesProject, SymbolLibId, SymbolPin, SymbolPinLength, SymbolPinName, SymbolPinNames, SymbolPinNamesHide, SymbolPinNamesOffset, SymbolPinNumber, SymbolPinNumbers, SymbolPinNumbersHide, SymbolPolyline, SymbolPolylineFill, type SymbolPolylineFillLike, SymbolPower, SymbolProperty, SymbolPropertyId, SymbolRectangle, SymbolRectangleEnd, SymbolRectangleFill, SymbolRectangleStart, SymbolText, SymbolUnit, TextEffects, type TextEffectsConstructorParams, TextEffectsFont, TextEffectsFontBold, TextEffectsFontFace, TextEffectsFontItalic, TextEffectsFontLineSpacing, type TextEffectsFontProperty, TextEffectsFontSize, TextEffectsFontThickness, TextEffectsJustify, type TextEffectsProperty, TitleBlock, TitleBlockComment, TitleBlockCompany, type TitleBlockConstructorParams, TitleBlockDate, TitleBlockRevision, TitleBlockTitle, Tstamp, Unit, type UnitString, Uuid, Via, type ViaConstructorParams, ViaNet, Width, Wire, type WireConstructorParams, Xy, Zone, parseKicadMod, parseKicadPcb, parseKicadSch, parseKicadSexpr };
|
|
5028
|
+
export { At, type AtInput, Bus, type BusConstructorParams, BusEntry, type BusEntryConstructorParams, BusEntrySize, Color, Dnp, EmbeddedFonts, ExcludeFromSim, FieldsAutoplaced, Footprint, FootprintAttr, FootprintAutoplaceCost180, FootprintAutoplaceCost90, FootprintClearance, type FootprintConstructorParams, FootprintDescr, FootprintLocked, FootprintModel, FootprintNetTiePadGroups, FootprintPad, type FootprintPadConstructorParams, FootprintPath, FootprintPlaced, FootprintPrivateLayers, FootprintSheetfile, FootprintSheetname, FootprintSolderMaskMargin, FootprintSolderPasteMargin, FootprintSolderPasteRatio, FootprintTags, FootprintTedit, FootprintThermalGap, FootprintThermalWidth, FootprintZoneConnect, FpArc, type FpArcConstructorParams, FpArcEnd, FpArcMid, FpArcStart, FpCircle, FpCircleCenter, type FpCircleConstructorParams, FpCircleEnd, FpCircleFill, FpLine, type FpLineConstructorParams, FpLineEnd, FpLineStart, FpPoly, type FpPolyConstructorParams, FpPolyFill, FpPolyLocked, FpRect, type FpRectConstructorParams, FpRectEnd, FpRectFill, FpRectStart, FpText, FpTextBox, FpTextBoxAngle, type FpTextBoxConstructorParams, FpTextBoxEnd, FpTextBoxStart, type FpTextConstructorParams, type FpTextType, GlobalLabel, type GlobalLabelConstructorParams, type GlobalLabelShape, GrArc, type GrArcConstructorParams, GrArcEnd, GrArcMid, type GrArcPoint, GrArcStart, GrCircle, GrCircleCenter, type GrCircleConstructorParams, GrCircleEnd, GrCircleLocked, type GrCirclePoint, GrCurve, type GrCurveConstructorParams, GrLine, GrLineAngle, type GrLineConstructorParams, GrLineEnd, GrLineLocked, type GrLinePoint, GrLineStart, GrRect, type GrRectConstructorParams, GrRectEnd, GrRectFill, GrRectLocked, GrRectStart, GrText, type GrTextConstructorParams, type GrTextPosition, Group, type GroupConstructorParams, GroupLocked, GroupMembers, Image, type ImageConstructorParams, ImageData, ImageScale, InBom, Junction, type JunctionConstructorParams, JunctionDiameter, KicadPcb, type KicadPcbConstructorParams, KicadSch, type KicadSchConstructorParams, KicadSchGenerator, KicadSchGeneratorVersion, KicadSchVersion, 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, PadRectDelta, PadRoundrectRratio, PadSize, type PadSizeInput, PadSolderMaskMargin, PadSolderPasteMargin, PadSolderPasteMarginRatio, PadTeardrops, PadThermalBridgeAngle, PadThermalGap, PadThermalWidth, PadZoneConnect, Paper, PcbGeneral, PcbGeneralLegacyTeardrops, PcbGeneralThickness, PcbGenerator, PcbGeneratorVersion, PcbLayerDefinition, PcbLayers, PcbNet, PcbPlotParams, PcbVersion, PlotParamCreateGerberJobFile, PlotParamCrossoutDnpOnFab, PlotParamDashedLineDashRatio, PlotParamDashedLineGapRatio, PlotParamDisableApertMacros, PlotParamDrillShape, PlotParamDxfImperialUnits, PlotParamDxfPolygonMode, PlotParamDxfUsePcbnewFont, PlotParamExcludeEdgeLayer, PlotParamHideDnpOnFab, PlotParamHpglPenDiameter, PlotParamHpglPenNumber, PlotParamHpglPenOverlay, PlotParamHpglPenSpeed, PlotParamLayerSelection, PlotParamLineWidth, PlotParamMirror, PlotParamMode, PlotParamOutputDirectory, PlotParamOutputFormat, PlotParamPadOnSilk, PlotParamPdfBackFpPropertyPopups, PlotParamPdfFrontFpPropertyPopups, PlotParamPdfMetadata, PlotParamPdfSingleDocument, PlotParamPlotBlackAndWhite, PlotParamPlotFrameRef, PlotParamPlotInvisible, PlotParamPlotInvisibleText, PlotParamPlotOnAllLayers, PlotParamPlotOnAllLayersSelection, PlotParamPlotOtherText, PlotParamPlotPadNumbers, PlotParamPlotReference, PlotParamPlotValue, PlotParamProperty, PlotParamPsA4Output, PlotParamPsNegative, PlotParamScaleSelection, PlotParamSketchDnpOnFab, PlotParamSketchPadsOnFab, PlotParamSubtractMaskFromSilk, PlotParamSvgPrecision, PlotParamUseAuxOrigin, PlotParamUseGerberAdvancedAttributes, PlotParamUseGerberAttributes, PlotParamUseGerberExtensions, PlotParamViaOnMask, Polyline, type PolylineConstructorParams, Property, type PropertyConstructorParams, PropertyHide, PropertyUnlocked, Pts, type RGBAColor, RenderCache, SchematicPolyline, SchematicSymbol, type SchematicSymbolConstructorParams, SchematicText, type SchematicTextConstructorParams, Segment, type SegmentConstructorParams, SegmentEnd, SegmentLocked, SegmentNet, SegmentStart, Setup, SetupAllowSoldermaskBridgesInFootprints, SetupAuxAxisOrigin, SetupEdgeWidth, SetupGridOrigin, SetupLastTraceWidth, SetupModEdgeWidth, SetupModTextSize, SetupModTextWidth, SetupPadDrill, SetupPadSize, SetupPadToMaskClearance, SetupPadToPasteClearance, SetupPadToPasteClearanceRatio, SetupPadToPasteClearanceValues, SetupPcbTextSize, SetupPcbTextWidth, type SetupProperty, type SetupPropertyValues, SetupSegmentWidth, SetupSolderMaskMinWidth, SetupTenting, SetupTraceClearance, SetupTraceMin, SetupTraceWidth, SetupUviaDrill, SetupUviaMinDrill, SetupUviaMinSize, SetupUviaSize, SetupUviasAllowed, SetupViaDrill, SetupViaMinDrill, SetupViaMinSize, SetupViaSize, SetupVisibleElements, SetupZone45Only, SetupZoneClearance, Sheet, type SheetConstructorParams, SheetFill, SheetInstancePage, SheetInstancePath, SheetInstances, SheetInstancesForSheet, SheetInstancesProject, SheetInstancesRoot, SheetInstancesRootPage, SheetInstancesRootPath, SheetPin, type SheetPinElectricalType, SheetProperty, SheetSize, Stackup, StackupCastellatedPads, StackupCopperFinish, StackupDielectricConstraints, StackupEdgeConnector, StackupEdgePlating, StackupLayer, StackupLayerColor, StackupLayerEpsilonR, StackupLayerLossTangent, StackupLayerMaterial, StackupLayerThickness, StackupLayerType, type StandardPaperSize, Stroke, type StrokeProperty, StrokeType, type StrokeTypeString, SxClass, SymbolArc, SymbolArcEnd, SymbolArcFill, SymbolArcMid, SymbolArcStart, SymbolCircle, SymbolCircleCenter, SymbolCircleFill, SymbolCircleRadius, SymbolDuplicatePinNumbersAreJumpers, SymbolFillType, SymbolInstancePath, SymbolInstanceReference, SymbolInstanceUnit, SymbolInstances, SymbolInstancesProject, SymbolLibId, SymbolPin, SymbolPinLength, SymbolPinName, SymbolPinNames, SymbolPinNamesHide, SymbolPinNamesOffset, SymbolPinNumber, SymbolPinNumbers, SymbolPinNumbersHide, SymbolPolyline, SymbolPolylineFill, type SymbolPolylineFillLike, SymbolPower, SymbolProperty, SymbolPropertyId, SymbolRectangle, SymbolRectangleEnd, SymbolRectangleFill, SymbolRectangleStart, SymbolText, SymbolUnit, TextEffects, type TextEffectsConstructorParams, TextEffectsFont, TextEffectsFontBold, TextEffectsFontFace, TextEffectsFontItalic, TextEffectsFontLineSpacing, type TextEffectsFontProperty, TextEffectsFontSize, TextEffectsFontThickness, TextEffectsJustify, type TextEffectsProperty, TitleBlock, TitleBlockComment, TitleBlockCompany, type TitleBlockConstructorParams, TitleBlockDate, TitleBlockRevision, TitleBlockTitle, Tstamp, Unit, type UnitString, Uuid, Via, type ViaConstructorParams, ViaNet, Width, Wire, type WireConstructorParams, Xy, Zone, parseKicadMod, parseKicadPcb, parseKicadSch, parseKicadSexpr };
|
package/dist/index.js
CHANGED
|
@@ -2064,6 +2064,31 @@ var SymbolDuplicatePinNumbersAreJumpers = class extends SxPrimitiveBoolean {
|
|
|
2064
2064
|
token = "duplicate_pin_numbers_are_jumpers";
|
|
2065
2065
|
};
|
|
2066
2066
|
SxClass.register(SymbolDuplicatePinNumbersAreJumpers);
|
|
2067
|
+
var Mirror = class _Mirror extends SxClass {
|
|
2068
|
+
static token = "mirror";
|
|
2069
|
+
static parentToken = "symbol";
|
|
2070
|
+
token = "mirror";
|
|
2071
|
+
value;
|
|
2072
|
+
constructor(value) {
|
|
2073
|
+
super();
|
|
2074
|
+
this.value = value;
|
|
2075
|
+
}
|
|
2076
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
2077
|
+
const [valuePrimitive] = primitiveSexprs;
|
|
2078
|
+
const value = toStringValue(valuePrimitive);
|
|
2079
|
+
if (value === void 0) {
|
|
2080
|
+
throw new Error("mirror expects a string value (x or y)");
|
|
2081
|
+
}
|
|
2082
|
+
return new _Mirror(value);
|
|
2083
|
+
}
|
|
2084
|
+
getChildren() {
|
|
2085
|
+
return [];
|
|
2086
|
+
}
|
|
2087
|
+
getString() {
|
|
2088
|
+
return `(mirror ${this.value})`;
|
|
2089
|
+
}
|
|
2090
|
+
};
|
|
2091
|
+
SxClass.register(Mirror);
|
|
2067
2092
|
var SymbolPinNumbers = class _SymbolPinNumbers extends SxClass {
|
|
2068
2093
|
static token = "pin_numbers";
|
|
2069
2094
|
static parentToken = "symbol";
|
|
@@ -2521,6 +2546,7 @@ var SchematicSymbol = class _SchematicSymbol extends SxClass {
|
|
|
2521
2546
|
token = "symbol";
|
|
2522
2547
|
_sxLibId;
|
|
2523
2548
|
_sxAt;
|
|
2549
|
+
_sxMirror;
|
|
2524
2550
|
_sxUnit;
|
|
2525
2551
|
_sxPinNumbers;
|
|
2526
2552
|
_sxPinNames;
|
|
@@ -2547,6 +2573,7 @@ var SchematicSymbol = class _SchematicSymbol extends SxClass {
|
|
|
2547
2573
|
super();
|
|
2548
2574
|
if (params.libraryId !== void 0) this.libraryId = params.libraryId;
|
|
2549
2575
|
if (params.at !== void 0) this.at = params.at;
|
|
2576
|
+
if (params.mirror !== void 0) this.mirror = params.mirror;
|
|
2550
2577
|
if (params.unit !== void 0)
|
|
2551
2578
|
this.unit = typeof params.unit === "number" ? params.unit : params.unit.value;
|
|
2552
2579
|
if (params.pinNumbers !== void 0) this.pinNumbers = params.pinNumbers;
|
|
@@ -2598,6 +2625,16 @@ var SchematicSymbol = class _SchematicSymbol extends SxClass {
|
|
|
2598
2625
|
set at(value) {
|
|
2599
2626
|
this._sxAt = value !== void 0 ? At.from(value) : void 0;
|
|
2600
2627
|
}
|
|
2628
|
+
get mirror() {
|
|
2629
|
+
return this._sxMirror?.value;
|
|
2630
|
+
}
|
|
2631
|
+
set mirror(value) {
|
|
2632
|
+
if (value === void 0) {
|
|
2633
|
+
this._sxMirror = void 0;
|
|
2634
|
+
return;
|
|
2635
|
+
}
|
|
2636
|
+
this._sxMirror = value instanceof Mirror ? value : new Mirror(value);
|
|
2637
|
+
}
|
|
2601
2638
|
get unit() {
|
|
2602
2639
|
return this._sxUnit?.value;
|
|
2603
2640
|
}
|
|
@@ -2688,6 +2725,7 @@ var SchematicSymbol = class _SchematicSymbol extends SxClass {
|
|
|
2688
2725
|
symbol._inlineLibId = inlineId;
|
|
2689
2726
|
}
|
|
2690
2727
|
symbol._sxAt = propertyMap.at;
|
|
2728
|
+
symbol._sxMirror = propertyMap.mirror;
|
|
2691
2729
|
symbol._sxUnit = propertyMap.unit;
|
|
2692
2730
|
symbol._sxPinNumbers = propertyMap.pin_numbers;
|
|
2693
2731
|
symbol._sxPinNames = propertyMap.pin_names;
|
|
@@ -2715,6 +2753,7 @@ var SchematicSymbol = class _SchematicSymbol extends SxClass {
|
|
|
2715
2753
|
const children = [];
|
|
2716
2754
|
if (this._sxLibId) children.push(this._sxLibId);
|
|
2717
2755
|
if (this._sxAt) children.push(this._sxAt);
|
|
2756
|
+
if (this._sxMirror) children.push(this._sxMirror);
|
|
2718
2757
|
if (this._sxUnit) children.push(this._sxUnit);
|
|
2719
2758
|
if (this._sxPinNumbers) children.push(this._sxPinNumbers);
|
|
2720
2759
|
if (this._sxPinNames) children.push(this._sxPinNames);
|
|
@@ -11188,6 +11227,7 @@ var SUPPORTED_SINGLE_TOKENS6 = /* @__PURE__ */ new Set([
|
|
|
11188
11227
|
"width",
|
|
11189
11228
|
"stroke",
|
|
11190
11229
|
"fill",
|
|
11230
|
+
"locked",
|
|
11191
11231
|
"tstamp",
|
|
11192
11232
|
"uuid"
|
|
11193
11233
|
]);
|
|
@@ -11200,6 +11240,7 @@ var GrCircle = class _GrCircle extends SxClass {
|
|
|
11200
11240
|
_sxWidth;
|
|
11201
11241
|
_sxStroke;
|
|
11202
11242
|
_sxFill;
|
|
11243
|
+
_sxLocked;
|
|
11203
11244
|
_sxTstamp;
|
|
11204
11245
|
_sxUuid;
|
|
11205
11246
|
constructor(params = {}) {
|
|
@@ -11210,6 +11251,7 @@ var GrCircle = class _GrCircle extends SxClass {
|
|
|
11210
11251
|
if (params.width !== void 0) this.width = params.width;
|
|
11211
11252
|
if (params.stroke !== void 0) this.stroke = params.stroke;
|
|
11212
11253
|
if (params.fill !== void 0) this.fill = params.fill;
|
|
11254
|
+
if (params.locked !== void 0) this.locked = params.locked;
|
|
11213
11255
|
if (params.tstamp !== void 0) this.tstamp = params.tstamp;
|
|
11214
11256
|
if (params.uuid !== void 0) this.uuid = params.uuid;
|
|
11215
11257
|
}
|
|
@@ -11250,6 +11292,8 @@ var GrCircle = class _GrCircle extends SxClass {
|
|
|
11250
11292
|
grCircle._sxWidth = propertyMap.width;
|
|
11251
11293
|
grCircle._sxStroke = propertyMap.stroke;
|
|
11252
11294
|
grCircle._sxFill = propertyMap.fill;
|
|
11295
|
+
const locked = propertyMap.locked;
|
|
11296
|
+
grCircle._sxLocked = locked && locked.value ? locked : void 0;
|
|
11253
11297
|
grCircle._sxTstamp = propertyMap.tstamp;
|
|
11254
11298
|
grCircle._sxUuid = propertyMap.uuid;
|
|
11255
11299
|
if (!grCircle._sxCenter) {
|
|
@@ -11350,6 +11394,9 @@ var GrCircle = class _GrCircle extends SxClass {
|
|
|
11350
11394
|
this._sxTstamp = value instanceof Tstamp ? value : new Tstamp(value);
|
|
11351
11395
|
}
|
|
11352
11396
|
get uuid() {
|
|
11397
|
+
return this._sxUuid?.value;
|
|
11398
|
+
}
|
|
11399
|
+
get uuidClass() {
|
|
11353
11400
|
return this._sxUuid;
|
|
11354
11401
|
}
|
|
11355
11402
|
set uuid(value) {
|
|
@@ -11359,6 +11406,12 @@ var GrCircle = class _GrCircle extends SxClass {
|
|
|
11359
11406
|
}
|
|
11360
11407
|
this._sxUuid = value instanceof Uuid ? value : new Uuid(value);
|
|
11361
11408
|
}
|
|
11409
|
+
get locked() {
|
|
11410
|
+
return this._sxLocked?.value ?? false;
|
|
11411
|
+
}
|
|
11412
|
+
set locked(value) {
|
|
11413
|
+
this._sxLocked = value ? new GrCircleLocked(true) : void 0;
|
|
11414
|
+
}
|
|
11362
11415
|
getChildren() {
|
|
11363
11416
|
const children = [];
|
|
11364
11417
|
if (this._sxCenter) children.push(this._sxCenter);
|
|
@@ -11366,6 +11419,7 @@ var GrCircle = class _GrCircle extends SxClass {
|
|
|
11366
11419
|
if (this._sxStroke) children.push(this._sxStroke);
|
|
11367
11420
|
if (this._sxWidth) children.push(this._sxWidth);
|
|
11368
11421
|
if (this._sxFill) children.push(this._sxFill);
|
|
11422
|
+
if (this._sxLocked) children.push(this._sxLocked);
|
|
11369
11423
|
if (this._sxLayer) children.push(this._sxLayer);
|
|
11370
11424
|
if (this._sxTstamp) children.push(this._sxTstamp);
|
|
11371
11425
|
if (this._sxUuid) children.push(this._sxUuid);
|
|
@@ -11449,6 +11503,27 @@ var GrCircleEnd = class _GrCircleEnd extends SxClass {
|
|
|
11449
11503
|
}
|
|
11450
11504
|
};
|
|
11451
11505
|
SxClass.register(GrCircleEnd);
|
|
11506
|
+
var GrCircleLocked = class _GrCircleLocked extends SxClass {
|
|
11507
|
+
static token = "locked";
|
|
11508
|
+
static parentToken = "gr_circle";
|
|
11509
|
+
token = "locked";
|
|
11510
|
+
value;
|
|
11511
|
+
constructor(value) {
|
|
11512
|
+
super();
|
|
11513
|
+
this.value = value;
|
|
11514
|
+
}
|
|
11515
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
11516
|
+
if (primitiveSexprs.length === 0) {
|
|
11517
|
+
return new _GrCircleLocked(true);
|
|
11518
|
+
}
|
|
11519
|
+
const state = String(primitiveSexprs[0]);
|
|
11520
|
+
return new _GrCircleLocked(state === "yes");
|
|
11521
|
+
}
|
|
11522
|
+
getString() {
|
|
11523
|
+
return this.value ? "(locked yes)" : "(locked no)";
|
|
11524
|
+
}
|
|
11525
|
+
};
|
|
11526
|
+
SxClass.register(GrCircleLocked);
|
|
11452
11527
|
|
|
11453
11528
|
// lib/sexpr/classes/GrCurve.ts
|
|
11454
11529
|
var SUPPORTED_TOKENS14 = /* @__PURE__ */ new Set([
|
|
@@ -11893,8 +11968,347 @@ var GrLine = class _GrLine extends SxClass {
|
|
|
11893
11968
|
};
|
|
11894
11969
|
SxClass.register(GrLine);
|
|
11895
11970
|
|
|
11896
|
-
// lib/sexpr/classes/
|
|
11971
|
+
// lib/sexpr/classes/GrRect.ts
|
|
11897
11972
|
var SUPPORTED_SINGLE_TOKENS8 = /* @__PURE__ */ new Set([
|
|
11973
|
+
"start",
|
|
11974
|
+
"end",
|
|
11975
|
+
"layer",
|
|
11976
|
+
"width",
|
|
11977
|
+
"stroke",
|
|
11978
|
+
"fill",
|
|
11979
|
+
"uuid",
|
|
11980
|
+
"locked"
|
|
11981
|
+
]);
|
|
11982
|
+
var GrRect = class _GrRect extends SxClass {
|
|
11983
|
+
static token = "gr_rect";
|
|
11984
|
+
token = "gr_rect";
|
|
11985
|
+
_sxStart;
|
|
11986
|
+
_sxEnd;
|
|
11987
|
+
_sxLayer;
|
|
11988
|
+
_sxWidth;
|
|
11989
|
+
_sxStroke;
|
|
11990
|
+
_sxFill;
|
|
11991
|
+
_sxUuid;
|
|
11992
|
+
_sxLocked;
|
|
11993
|
+
constructor(params = {}) {
|
|
11994
|
+
super();
|
|
11995
|
+
if (params.start !== void 0) this.start = params.start;
|
|
11996
|
+
if (params.end !== void 0) this.end = params.end;
|
|
11997
|
+
if (params.layer !== void 0) this.layer = params.layer;
|
|
11998
|
+
if (params.width !== void 0) this.width = params.width;
|
|
11999
|
+
if (params.stroke !== void 0) this.stroke = params.stroke;
|
|
12000
|
+
if (params.fill !== void 0) this.fill = params.fill;
|
|
12001
|
+
if (params.uuid !== void 0) this.uuid = params.uuid;
|
|
12002
|
+
if (params.locked !== void 0) this.locked = params.locked;
|
|
12003
|
+
}
|
|
12004
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
12005
|
+
const grRect = new _GrRect();
|
|
12006
|
+
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
12007
|
+
const unexpectedTokens = /* @__PURE__ */ new Set();
|
|
12008
|
+
for (const token of Object.keys(propertyMap)) {
|
|
12009
|
+
if (!SUPPORTED_SINGLE_TOKENS8.has(token)) {
|
|
12010
|
+
unexpectedTokens.add(token);
|
|
12011
|
+
}
|
|
12012
|
+
}
|
|
12013
|
+
for (const token of Object.keys(arrayPropertyMap)) {
|
|
12014
|
+
if (!SUPPORTED_SINGLE_TOKENS8.has(token)) {
|
|
12015
|
+
unexpectedTokens.add(token);
|
|
12016
|
+
continue;
|
|
12017
|
+
}
|
|
12018
|
+
if (arrayPropertyMap[token].length > 1) {
|
|
12019
|
+
throw new Error(
|
|
12020
|
+
`gr_rect does not support repeated child tokens: ${token}`
|
|
12021
|
+
);
|
|
12022
|
+
}
|
|
12023
|
+
}
|
|
12024
|
+
if (unexpectedTokens.size > 0) {
|
|
12025
|
+
throw new Error(
|
|
12026
|
+
`Unsupported child tokens inside gr_rect expression: ${[...unexpectedTokens].join(", ")}`
|
|
12027
|
+
);
|
|
12028
|
+
}
|
|
12029
|
+
for (const primitive of primitiveSexprs) {
|
|
12030
|
+
if (Array.isArray(primitive)) continue;
|
|
12031
|
+
throw new Error(
|
|
12032
|
+
`gr_rect encountered unexpected primitive child: ${JSON.stringify(primitive)}`
|
|
12033
|
+
);
|
|
12034
|
+
}
|
|
12035
|
+
grRect._sxStart = propertyMap.start;
|
|
12036
|
+
grRect._sxEnd = propertyMap.end;
|
|
12037
|
+
grRect._sxLayer = propertyMap.layer;
|
|
12038
|
+
grRect._sxWidth = propertyMap.width;
|
|
12039
|
+
grRect._sxStroke = propertyMap.stroke;
|
|
12040
|
+
grRect._sxFill = propertyMap.fill;
|
|
12041
|
+
const locked = propertyMap.locked;
|
|
12042
|
+
grRect._sxLocked = locked && locked.value ? locked : void 0;
|
|
12043
|
+
grRect._sxUuid = propertyMap.uuid;
|
|
12044
|
+
if (!grRect._sxStart) {
|
|
12045
|
+
throw new Error("gr_rect requires a start child token");
|
|
12046
|
+
}
|
|
12047
|
+
if (!grRect._sxEnd) {
|
|
12048
|
+
throw new Error("gr_rect requires an end child token");
|
|
12049
|
+
}
|
|
12050
|
+
if (!grRect._sxLayer) {
|
|
12051
|
+
throw new Error("gr_rect requires a layer child token");
|
|
12052
|
+
}
|
|
12053
|
+
return grRect;
|
|
12054
|
+
}
|
|
12055
|
+
get start() {
|
|
12056
|
+
return this._sxStart;
|
|
12057
|
+
}
|
|
12058
|
+
set start(value) {
|
|
12059
|
+
if (value === void 0) {
|
|
12060
|
+
this._sxStart = void 0;
|
|
12061
|
+
return;
|
|
12062
|
+
}
|
|
12063
|
+
if (value instanceof GrRectStart) {
|
|
12064
|
+
this._sxStart = value;
|
|
12065
|
+
return;
|
|
12066
|
+
}
|
|
12067
|
+
this._sxStart = new GrRectStart(value.x, value.y);
|
|
12068
|
+
}
|
|
12069
|
+
get end() {
|
|
12070
|
+
return this._sxEnd;
|
|
12071
|
+
}
|
|
12072
|
+
set end(value) {
|
|
12073
|
+
if (value === void 0) {
|
|
12074
|
+
this._sxEnd = void 0;
|
|
12075
|
+
return;
|
|
12076
|
+
}
|
|
12077
|
+
if (value instanceof GrRectEnd) {
|
|
12078
|
+
this._sxEnd = value;
|
|
12079
|
+
return;
|
|
12080
|
+
}
|
|
12081
|
+
this._sxEnd = new GrRectEnd(value.x, value.y);
|
|
12082
|
+
}
|
|
12083
|
+
get startPoint() {
|
|
12084
|
+
return this._sxStart ? { x: this._sxStart.x, y: this._sxStart.y } : void 0;
|
|
12085
|
+
}
|
|
12086
|
+
get endPoint() {
|
|
12087
|
+
return this._sxEnd ? { x: this._sxEnd.x, y: this._sxEnd.y } : void 0;
|
|
12088
|
+
}
|
|
12089
|
+
get layer() {
|
|
12090
|
+
return this._sxLayer;
|
|
12091
|
+
}
|
|
12092
|
+
set layer(value) {
|
|
12093
|
+
if (value === void 0) {
|
|
12094
|
+
this._sxLayer = void 0;
|
|
12095
|
+
return;
|
|
12096
|
+
}
|
|
12097
|
+
if (value instanceof Layer) {
|
|
12098
|
+
this._sxLayer = value;
|
|
12099
|
+
return;
|
|
12100
|
+
}
|
|
12101
|
+
const names = Array.isArray(value) ? value : [value];
|
|
12102
|
+
this._sxLayer = new Layer(names);
|
|
12103
|
+
}
|
|
12104
|
+
get stroke() {
|
|
12105
|
+
return this._sxStroke;
|
|
12106
|
+
}
|
|
12107
|
+
set stroke(value) {
|
|
12108
|
+
this._sxStroke = value;
|
|
12109
|
+
}
|
|
12110
|
+
get width() {
|
|
12111
|
+
return this._sxWidth?.value;
|
|
12112
|
+
}
|
|
12113
|
+
set width(value) {
|
|
12114
|
+
if (value === void 0) {
|
|
12115
|
+
this._sxWidth = void 0;
|
|
12116
|
+
return;
|
|
12117
|
+
}
|
|
12118
|
+
if (value instanceof Width) {
|
|
12119
|
+
this._sxWidth = value;
|
|
12120
|
+
return;
|
|
12121
|
+
}
|
|
12122
|
+
this._sxWidth = new Width(value);
|
|
12123
|
+
}
|
|
12124
|
+
get widthClass() {
|
|
12125
|
+
return this._sxWidth;
|
|
12126
|
+
}
|
|
12127
|
+
set widthClass(value) {
|
|
12128
|
+
this._sxWidth = value;
|
|
12129
|
+
}
|
|
12130
|
+
get fill() {
|
|
12131
|
+
return this._sxFill?.filled;
|
|
12132
|
+
}
|
|
12133
|
+
set fill(value) {
|
|
12134
|
+
if (value === void 0) {
|
|
12135
|
+
this._sxFill = void 0;
|
|
12136
|
+
return;
|
|
12137
|
+
}
|
|
12138
|
+
if (value instanceof GrRectFill) {
|
|
12139
|
+
this._sxFill = value;
|
|
12140
|
+
return;
|
|
12141
|
+
}
|
|
12142
|
+
this._sxFill = new GrRectFill(value);
|
|
12143
|
+
}
|
|
12144
|
+
get fillClass() {
|
|
12145
|
+
return this._sxFill;
|
|
12146
|
+
}
|
|
12147
|
+
get uuid() {
|
|
12148
|
+
return this._sxUuid?.value;
|
|
12149
|
+
}
|
|
12150
|
+
set uuid(value) {
|
|
12151
|
+
if (value === void 0) {
|
|
12152
|
+
this._sxUuid = void 0;
|
|
12153
|
+
return;
|
|
12154
|
+
}
|
|
12155
|
+
if (value instanceof Uuid) {
|
|
12156
|
+
this._sxUuid = value;
|
|
12157
|
+
return;
|
|
12158
|
+
}
|
|
12159
|
+
this._sxUuid = new Uuid(value);
|
|
12160
|
+
}
|
|
12161
|
+
get uuidClass() {
|
|
12162
|
+
return this._sxUuid;
|
|
12163
|
+
}
|
|
12164
|
+
get locked() {
|
|
12165
|
+
return this._sxLocked?.value ?? false;
|
|
12166
|
+
}
|
|
12167
|
+
set locked(value) {
|
|
12168
|
+
this._sxLocked = value ? new GrRectLocked(true) : void 0;
|
|
12169
|
+
}
|
|
12170
|
+
getChildren() {
|
|
12171
|
+
const children = [];
|
|
12172
|
+
if (this._sxStart) children.push(this._sxStart);
|
|
12173
|
+
if (this._sxEnd) children.push(this._sxEnd);
|
|
12174
|
+
if (this._sxStroke) children.push(this._sxStroke);
|
|
12175
|
+
if (this._sxWidth) children.push(this._sxWidth);
|
|
12176
|
+
if (this._sxFill) children.push(this._sxFill);
|
|
12177
|
+
if (this._sxLocked) children.push(this._sxLocked);
|
|
12178
|
+
if (this._sxLayer) children.push(this._sxLayer);
|
|
12179
|
+
if (this._sxUuid) children.push(this._sxUuid);
|
|
12180
|
+
return children;
|
|
12181
|
+
}
|
|
12182
|
+
};
|
|
12183
|
+
SxClass.register(GrRect);
|
|
12184
|
+
var GrRectStart = class _GrRectStart extends SxClass {
|
|
12185
|
+
static token = "start";
|
|
12186
|
+
static parentToken = "gr_rect";
|
|
12187
|
+
token = "start";
|
|
12188
|
+
_x;
|
|
12189
|
+
_y;
|
|
12190
|
+
constructor(x, y) {
|
|
12191
|
+
super();
|
|
12192
|
+
this._x = x;
|
|
12193
|
+
this._y = y;
|
|
12194
|
+
}
|
|
12195
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
12196
|
+
const [rawX, rawY] = primitiveSexprs;
|
|
12197
|
+
const x = toNumberValue(rawX);
|
|
12198
|
+
const y = toNumberValue(rawY);
|
|
12199
|
+
if (x === void 0 || y === void 0) {
|
|
12200
|
+
throw new Error("gr_rect start expects two numeric arguments");
|
|
12201
|
+
}
|
|
12202
|
+
return new _GrRectStart(x, y);
|
|
12203
|
+
}
|
|
12204
|
+
get x() {
|
|
12205
|
+
return this._x;
|
|
12206
|
+
}
|
|
12207
|
+
set x(value) {
|
|
12208
|
+
this._x = value;
|
|
12209
|
+
}
|
|
12210
|
+
get y() {
|
|
12211
|
+
return this._y;
|
|
12212
|
+
}
|
|
12213
|
+
set y(value) {
|
|
12214
|
+
this._y = value;
|
|
12215
|
+
}
|
|
12216
|
+
toObject() {
|
|
12217
|
+
return { x: this._x, y: this._y };
|
|
12218
|
+
}
|
|
12219
|
+
getChildren() {
|
|
12220
|
+
return [];
|
|
12221
|
+
}
|
|
12222
|
+
getString() {
|
|
12223
|
+
return `(start ${this._x} ${this._y})`;
|
|
12224
|
+
}
|
|
12225
|
+
};
|
|
12226
|
+
SxClass.register(GrRectStart);
|
|
12227
|
+
var GrRectEnd = class _GrRectEnd extends SxClass {
|
|
12228
|
+
static token = "end";
|
|
12229
|
+
static parentToken = "gr_rect";
|
|
12230
|
+
token = "end";
|
|
12231
|
+
_x;
|
|
12232
|
+
_y;
|
|
12233
|
+
constructor(x, y) {
|
|
12234
|
+
super();
|
|
12235
|
+
this._x = x;
|
|
12236
|
+
this._y = y;
|
|
12237
|
+
}
|
|
12238
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
12239
|
+
const [rawX, rawY] = primitiveSexprs;
|
|
12240
|
+
const x = toNumberValue(rawX);
|
|
12241
|
+
const y = toNumberValue(rawY);
|
|
12242
|
+
if (x === void 0 || y === void 0) {
|
|
12243
|
+
throw new Error("gr_rect end expects two numeric arguments");
|
|
12244
|
+
}
|
|
12245
|
+
return new _GrRectEnd(x, y);
|
|
12246
|
+
}
|
|
12247
|
+
get x() {
|
|
12248
|
+
return this._x;
|
|
12249
|
+
}
|
|
12250
|
+
set x(value) {
|
|
12251
|
+
this._x = value;
|
|
12252
|
+
}
|
|
12253
|
+
get y() {
|
|
12254
|
+
return this._y;
|
|
12255
|
+
}
|
|
12256
|
+
set y(value) {
|
|
12257
|
+
this._y = value;
|
|
12258
|
+
}
|
|
12259
|
+
toObject() {
|
|
12260
|
+
return { x: this._x, y: this._y };
|
|
12261
|
+
}
|
|
12262
|
+
getChildren() {
|
|
12263
|
+
return [];
|
|
12264
|
+
}
|
|
12265
|
+
getString() {
|
|
12266
|
+
return `(end ${this._x} ${this._y})`;
|
|
12267
|
+
}
|
|
12268
|
+
};
|
|
12269
|
+
SxClass.register(GrRectEnd);
|
|
12270
|
+
var GrRectFill = class _GrRectFill extends SxClass {
|
|
12271
|
+
static token = "fill";
|
|
12272
|
+
static parentToken = "gr_rect";
|
|
12273
|
+
token = "fill";
|
|
12274
|
+
filled;
|
|
12275
|
+
constructor(filled) {
|
|
12276
|
+
super();
|
|
12277
|
+
this.filled = filled;
|
|
12278
|
+
}
|
|
12279
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
12280
|
+
const state = toStringValue(primitiveSexprs[0]);
|
|
12281
|
+
return new _GrRectFill(state === "yes");
|
|
12282
|
+
}
|
|
12283
|
+
getString() {
|
|
12284
|
+
return `(fill ${this.filled ? "yes" : "no"})`;
|
|
12285
|
+
}
|
|
12286
|
+
};
|
|
12287
|
+
SxClass.register(GrRectFill);
|
|
12288
|
+
var GrRectLocked = class _GrRectLocked extends SxClass {
|
|
12289
|
+
static token = "locked";
|
|
12290
|
+
static parentToken = "gr_rect";
|
|
12291
|
+
token = "locked";
|
|
12292
|
+
value;
|
|
12293
|
+
constructor(value) {
|
|
12294
|
+
super();
|
|
12295
|
+
this.value = value;
|
|
12296
|
+
}
|
|
12297
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
12298
|
+
if (primitiveSexprs.length === 0) {
|
|
12299
|
+
return new _GrRectLocked(true);
|
|
12300
|
+
}
|
|
12301
|
+
const state = toStringValue(primitiveSexprs[0]);
|
|
12302
|
+
return new _GrRectLocked(state === "yes");
|
|
12303
|
+
}
|
|
12304
|
+
getString() {
|
|
12305
|
+
return this.value ? "(locked yes)" : "(locked no)";
|
|
12306
|
+
}
|
|
12307
|
+
};
|
|
12308
|
+
SxClass.register(GrRectLocked);
|
|
12309
|
+
|
|
12310
|
+
// lib/sexpr/classes/GrText.ts
|
|
12311
|
+
var SUPPORTED_SINGLE_TOKENS9 = /* @__PURE__ */ new Set([
|
|
11898
12312
|
"at",
|
|
11899
12313
|
"xy",
|
|
11900
12314
|
"layer",
|
|
@@ -11937,12 +12351,12 @@ var GrText = class _GrText extends SxClass {
|
|
|
11937
12351
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(rest, this.token);
|
|
11938
12352
|
const unexpectedTokens = /* @__PURE__ */ new Set();
|
|
11939
12353
|
for (const token of Object.keys(propertyMap)) {
|
|
11940
|
-
if (!
|
|
12354
|
+
if (!SUPPORTED_SINGLE_TOKENS9.has(token)) {
|
|
11941
12355
|
unexpectedTokens.add(token);
|
|
11942
12356
|
}
|
|
11943
12357
|
}
|
|
11944
12358
|
for (const token of Object.keys(arrayPropertyMap)) {
|
|
11945
|
-
if (!
|
|
12359
|
+
if (!SUPPORTED_SINGLE_TOKENS9.has(token)) {
|
|
11946
12360
|
unexpectedTokens.add(token);
|
|
11947
12361
|
continue;
|
|
11948
12362
|
}
|
|
@@ -12077,6 +12491,170 @@ var GrText = class _GrText extends SxClass {
|
|
|
12077
12491
|
};
|
|
12078
12492
|
SxClass.register(GrText);
|
|
12079
12493
|
|
|
12494
|
+
// lib/sexpr/classes/Group.ts
|
|
12495
|
+
var SUPPORTED_SINGLE_TOKENS10 = /* @__PURE__ */ new Set(["uuid", "locked", "members"]);
|
|
12496
|
+
var Group = class _Group extends SxClass {
|
|
12497
|
+
static token = "group";
|
|
12498
|
+
token = "group";
|
|
12499
|
+
_name = "";
|
|
12500
|
+
_sxUuid;
|
|
12501
|
+
_sxLocked;
|
|
12502
|
+
_sxMembers;
|
|
12503
|
+
constructor(params = {}) {
|
|
12504
|
+
super();
|
|
12505
|
+
if (params.name !== void 0) this.name = params.name;
|
|
12506
|
+
if (params.uuid !== void 0) this.uuid = params.uuid;
|
|
12507
|
+
if (params.locked !== void 0) this.locked = params.locked;
|
|
12508
|
+
if (params.members !== void 0) this.members = params.members;
|
|
12509
|
+
}
|
|
12510
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
12511
|
+
const group = new _Group();
|
|
12512
|
+
if (primitiveSexprs.length > 0 && typeof primitiveSexprs[0] === "string") {
|
|
12513
|
+
group._name = primitiveSexprs[0];
|
|
12514
|
+
}
|
|
12515
|
+
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(
|
|
12516
|
+
primitiveSexprs.slice(1),
|
|
12517
|
+
this.token
|
|
12518
|
+
);
|
|
12519
|
+
const unexpectedTokens = /* @__PURE__ */ new Set();
|
|
12520
|
+
for (const token of Object.keys(propertyMap)) {
|
|
12521
|
+
if (!SUPPORTED_SINGLE_TOKENS10.has(token)) {
|
|
12522
|
+
unexpectedTokens.add(token);
|
|
12523
|
+
}
|
|
12524
|
+
}
|
|
12525
|
+
for (const token of Object.keys(arrayPropertyMap)) {
|
|
12526
|
+
if (!SUPPORTED_SINGLE_TOKENS10.has(token)) {
|
|
12527
|
+
unexpectedTokens.add(token);
|
|
12528
|
+
continue;
|
|
12529
|
+
}
|
|
12530
|
+
if (arrayPropertyMap[token].length > 1) {
|
|
12531
|
+
throw new Error(
|
|
12532
|
+
`group does not support repeated child tokens: ${token}`
|
|
12533
|
+
);
|
|
12534
|
+
}
|
|
12535
|
+
}
|
|
12536
|
+
if (unexpectedTokens.size > 0) {
|
|
12537
|
+
throw new Error(
|
|
12538
|
+
`Unsupported child tokens inside group expression: ${[...unexpectedTokens].join(", ")}`
|
|
12539
|
+
);
|
|
12540
|
+
}
|
|
12541
|
+
for (const primitive of primitiveSexprs.slice(1)) {
|
|
12542
|
+
if (Array.isArray(primitive)) continue;
|
|
12543
|
+
throw new Error(
|
|
12544
|
+
`group encountered unexpected primitive child: ${JSON.stringify(primitive)}`
|
|
12545
|
+
);
|
|
12546
|
+
}
|
|
12547
|
+
group._sxUuid = propertyMap.uuid;
|
|
12548
|
+
const locked = propertyMap.locked;
|
|
12549
|
+
group._sxLocked = locked && locked.value ? locked : void 0;
|
|
12550
|
+
group._sxMembers = propertyMap.members;
|
|
12551
|
+
return group;
|
|
12552
|
+
}
|
|
12553
|
+
get name() {
|
|
12554
|
+
return this._name;
|
|
12555
|
+
}
|
|
12556
|
+
set name(value) {
|
|
12557
|
+
this._name = value;
|
|
12558
|
+
}
|
|
12559
|
+
get uuid() {
|
|
12560
|
+
return this._sxUuid?.value;
|
|
12561
|
+
}
|
|
12562
|
+
set uuid(value) {
|
|
12563
|
+
if (value === void 0) {
|
|
12564
|
+
this._sxUuid = void 0;
|
|
12565
|
+
return;
|
|
12566
|
+
}
|
|
12567
|
+
this._sxUuid = value instanceof Uuid ? value : new Uuid(value);
|
|
12568
|
+
}
|
|
12569
|
+
get uuidClass() {
|
|
12570
|
+
return this._sxUuid;
|
|
12571
|
+
}
|
|
12572
|
+
get locked() {
|
|
12573
|
+
return this._sxLocked?.value ?? false;
|
|
12574
|
+
}
|
|
12575
|
+
set locked(value) {
|
|
12576
|
+
this._sxLocked = value ? new GroupLocked(true) : void 0;
|
|
12577
|
+
}
|
|
12578
|
+
get members() {
|
|
12579
|
+
return this._sxMembers?.members ?? [];
|
|
12580
|
+
}
|
|
12581
|
+
set members(value) {
|
|
12582
|
+
this._sxMembers = new GroupMembers(value);
|
|
12583
|
+
}
|
|
12584
|
+
get membersClass() {
|
|
12585
|
+
return this._sxMembers;
|
|
12586
|
+
}
|
|
12587
|
+
getChildren() {
|
|
12588
|
+
const children = [];
|
|
12589
|
+
if (this._sxUuid) children.push(this._sxUuid);
|
|
12590
|
+
if (this._sxLocked) children.push(this._sxLocked);
|
|
12591
|
+
if (this._sxMembers) children.push(this._sxMembers);
|
|
12592
|
+
return children;
|
|
12593
|
+
}
|
|
12594
|
+
getString() {
|
|
12595
|
+
const lines = [`(group "${this._name}"`];
|
|
12596
|
+
const push = (value) => {
|
|
12597
|
+
if (!value) return;
|
|
12598
|
+
lines.push(value.getStringIndented());
|
|
12599
|
+
};
|
|
12600
|
+
push(this._sxUuid);
|
|
12601
|
+
push(this._sxLocked);
|
|
12602
|
+
push(this._sxMembers);
|
|
12603
|
+
lines.push(")");
|
|
12604
|
+
return lines.join("\n");
|
|
12605
|
+
}
|
|
12606
|
+
};
|
|
12607
|
+
SxClass.register(Group);
|
|
12608
|
+
var GroupLocked = class _GroupLocked extends SxClass {
|
|
12609
|
+
static token = "locked";
|
|
12610
|
+
static parentToken = "group";
|
|
12611
|
+
token = "locked";
|
|
12612
|
+
value;
|
|
12613
|
+
constructor(value) {
|
|
12614
|
+
super();
|
|
12615
|
+
this.value = value;
|
|
12616
|
+
}
|
|
12617
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
12618
|
+
if (primitiveSexprs.length === 0) {
|
|
12619
|
+
return new _GroupLocked(true);
|
|
12620
|
+
}
|
|
12621
|
+
const state = toStringValue(primitiveSexprs[0]);
|
|
12622
|
+
return new _GroupLocked(state === "yes");
|
|
12623
|
+
}
|
|
12624
|
+
getString() {
|
|
12625
|
+
return this.value ? "(locked yes)" : "(locked no)";
|
|
12626
|
+
}
|
|
12627
|
+
};
|
|
12628
|
+
SxClass.register(GroupLocked);
|
|
12629
|
+
var GroupMembers = class _GroupMembers extends SxClass {
|
|
12630
|
+
static token = "members";
|
|
12631
|
+
static parentToken = "group";
|
|
12632
|
+
token = "members";
|
|
12633
|
+
members;
|
|
12634
|
+
constructor(members) {
|
|
12635
|
+
super();
|
|
12636
|
+
this.members = members;
|
|
12637
|
+
}
|
|
12638
|
+
static fromSexprPrimitives(primitiveSexprs) {
|
|
12639
|
+
const members = [];
|
|
12640
|
+
for (const primitive of primitiveSexprs) {
|
|
12641
|
+
const str = toStringValue(primitive);
|
|
12642
|
+
if (str) {
|
|
12643
|
+
members.push(str);
|
|
12644
|
+
}
|
|
12645
|
+
}
|
|
12646
|
+
return new _GroupMembers(members);
|
|
12647
|
+
}
|
|
12648
|
+
getString() {
|
|
12649
|
+
if (this.members.length === 0) {
|
|
12650
|
+
return "(members)";
|
|
12651
|
+
}
|
|
12652
|
+
const memberStrings = this.members.map((m) => `"${m}"`).join(" ");
|
|
12653
|
+
return `(members ${memberStrings})`;
|
|
12654
|
+
}
|
|
12655
|
+
};
|
|
12656
|
+
SxClass.register(GroupMembers);
|
|
12657
|
+
|
|
12080
12658
|
// lib/sexpr/classes/SegmentEnd.ts
|
|
12081
12659
|
var SegmentEnd = class _SegmentEnd extends SxClass {
|
|
12082
12660
|
static token = "end";
|
|
@@ -12239,7 +12817,7 @@ var SegmentStart = class _SegmentStart extends SxClass {
|
|
|
12239
12817
|
SxClass.register(SegmentStart);
|
|
12240
12818
|
|
|
12241
12819
|
// lib/sexpr/classes/Segment.ts
|
|
12242
|
-
var
|
|
12820
|
+
var SUPPORTED_SINGLE_TOKENS11 = /* @__PURE__ */ new Set([
|
|
12243
12821
|
"start",
|
|
12244
12822
|
"end",
|
|
12245
12823
|
"width",
|
|
@@ -12275,7 +12853,7 @@ var Segment = class _Segment extends SxClass {
|
|
|
12275
12853
|
const segment = new _Segment();
|
|
12276
12854
|
const { propertyMap, arrayPropertyMap } = SxClass.parsePrimitivesToClassProperties(primitiveSexprs, this.token);
|
|
12277
12855
|
const unexpectedSingleTokens = Object.keys(propertyMap).filter(
|
|
12278
|
-
(token) => !
|
|
12856
|
+
(token) => !SUPPORTED_SINGLE_TOKENS11.has(token)
|
|
12279
12857
|
);
|
|
12280
12858
|
if (unexpectedSingleTokens.length > 0) {
|
|
12281
12859
|
throw new Error(
|
|
@@ -12283,7 +12861,7 @@ var Segment = class _Segment extends SxClass {
|
|
|
12283
12861
|
);
|
|
12284
12862
|
}
|
|
12285
12863
|
for (const [token, entries] of Object.entries(arrayPropertyMap)) {
|
|
12286
|
-
if (!
|
|
12864
|
+
if (!SUPPORTED_SINGLE_TOKENS11.has(token)) {
|
|
12287
12865
|
throw new Error(
|
|
12288
12866
|
`Unsupported child tokens inside segment expression: ${token}`
|
|
12289
12867
|
);
|
|
@@ -15351,13 +15929,22 @@ export {
|
|
|
15351
15929
|
GrCircle,
|
|
15352
15930
|
GrCircleCenter,
|
|
15353
15931
|
GrCircleEnd,
|
|
15932
|
+
GrCircleLocked,
|
|
15354
15933
|
GrCurve,
|
|
15355
15934
|
GrLine,
|
|
15356
15935
|
GrLineAngle,
|
|
15357
15936
|
GrLineEnd,
|
|
15358
15937
|
GrLineLocked,
|
|
15359
15938
|
GrLineStart,
|
|
15939
|
+
GrRect,
|
|
15940
|
+
GrRectEnd,
|
|
15941
|
+
GrRectFill,
|
|
15942
|
+
GrRectLocked,
|
|
15943
|
+
GrRectStart,
|
|
15360
15944
|
GrText,
|
|
15945
|
+
Group,
|
|
15946
|
+
GroupLocked,
|
|
15947
|
+
GroupMembers,
|
|
15361
15948
|
Image,
|
|
15362
15949
|
ImageData,
|
|
15363
15950
|
ImageScale,
|
|
@@ -15373,6 +15960,7 @@ export {
|
|
|
15373
15960
|
Layer,
|
|
15374
15961
|
Layers,
|
|
15375
15962
|
LibSymbols,
|
|
15963
|
+
Mirror,
|
|
15376
15964
|
NoConnect,
|
|
15377
15965
|
OnBoard,
|
|
15378
15966
|
PadChamfer,
|