@tscircuit/core 0.0.96 → 0.0.98
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 +91 -92
- package/dist/index.js +90 -83
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -783,7 +783,23 @@ declare class Board extends Group<typeof boardProps> {
|
|
|
783
783
|
declare class Footprint extends PrimitiveComponent<typeof footprintProps> {
|
|
784
784
|
get config(): {
|
|
785
785
|
componentName: string;
|
|
786
|
-
zodProps: zod.ZodObject<{
|
|
786
|
+
zodProps: zod.ZodObject<{
|
|
787
|
+
originalLayer: zod.ZodOptional<zod.ZodDefault<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
|
|
788
|
+
name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
789
|
+
}, "strip", zod.ZodTypeAny, {
|
|
790
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
791
|
+
}, {
|
|
792
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
793
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
794
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
795
|
+
}>>>;
|
|
796
|
+
}, "strip", zod.ZodTypeAny, {
|
|
797
|
+
originalLayer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
798
|
+
}, {
|
|
799
|
+
originalLayer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
800
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
801
|
+
} | undefined;
|
|
802
|
+
}>;
|
|
787
803
|
};
|
|
788
804
|
/**
|
|
789
805
|
* A footprint is a constrainedlayout, the db elements are adjusted according
|
|
@@ -1732,10 +1748,9 @@ declare class Led extends NormalComponent<typeof ledProps, PolarizedPassivePorts
|
|
|
1732
1748
|
cathode: Port;
|
|
1733
1749
|
}
|
|
1734
1750
|
|
|
1735
|
-
declare class Diode extends NormalComponent<typeof diodeProps,
|
|
1736
|
-
pin1: Port;
|
|
1737
|
-
pin2: Port;
|
|
1751
|
+
declare class Diode extends NormalComponent<typeof diodeProps, PolarizedPassivePorts> {
|
|
1738
1752
|
get config(): {
|
|
1753
|
+
schematicSymbolName: string;
|
|
1739
1754
|
componentName: string;
|
|
1740
1755
|
zodProps: zod.ZodObject<zod.objectUtil.extendShape<zod.objectUtil.extendShape<zod.objectUtil.extendShape<{
|
|
1741
1756
|
pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
@@ -2133,6 +2148,10 @@ declare class Diode extends NormalComponent<typeof diodeProps, TwoPinPorts> {
|
|
|
2133
2148
|
sourceFtype: Ftype;
|
|
2134
2149
|
};
|
|
2135
2150
|
initPorts(): void;
|
|
2151
|
+
pos: Port;
|
|
2152
|
+
anode: Port;
|
|
2153
|
+
neg: Port;
|
|
2154
|
+
cathode: Port;
|
|
2136
2155
|
}
|
|
2137
2156
|
|
|
2138
2157
|
declare class Capacitor extends NormalComponent<typeof capacitorProps, PassivePorts> {
|
|
@@ -3018,37 +3037,15 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
3018
3037
|
}>, {
|
|
3019
3038
|
manufacturerPartNumber: zod.ZodOptional<zod.ZodString>;
|
|
3020
3039
|
pinLabels: zod.ZodOptional<zod.ZodRecord<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, zod.ZodString>>;
|
|
3021
|
-
schPortArrangement: zod.ZodOptional<zod.
|
|
3040
|
+
schPortArrangement: zod.ZodOptional<zod.ZodObject<{
|
|
3022
3041
|
leftSize: zod.ZodOptional<zod.ZodNumber>;
|
|
3023
3042
|
topSize: zod.ZodOptional<zod.ZodNumber>;
|
|
3024
3043
|
rightSize: zod.ZodOptional<zod.ZodNumber>;
|
|
3025
3044
|
bottomSize: zod.ZodOptional<zod.ZodNumber>;
|
|
3026
|
-
}, "strip", zod.ZodTypeAny, {
|
|
3027
|
-
leftSize?: number | undefined;
|
|
3028
|
-
topSize?: number | undefined;
|
|
3029
|
-
rightSize?: number | undefined;
|
|
3030
|
-
bottomSize?: number | undefined;
|
|
3031
|
-
}, {
|
|
3032
|
-
leftSize?: number | undefined;
|
|
3033
|
-
topSize?: number | undefined;
|
|
3034
|
-
rightSize?: number | undefined;
|
|
3035
|
-
bottomSize?: number | undefined;
|
|
3036
|
-
}>, zod.ZodObject<{
|
|
3037
3045
|
leftPinCount: zod.ZodOptional<zod.ZodNumber>;
|
|
3038
3046
|
rightPinCount: zod.ZodOptional<zod.ZodNumber>;
|
|
3039
3047
|
topPinCount: zod.ZodOptional<zod.ZodNumber>;
|
|
3040
3048
|
bottomPinCount: zod.ZodOptional<zod.ZodNumber>;
|
|
3041
|
-
}, "strip", zod.ZodTypeAny, {
|
|
3042
|
-
leftPinCount?: number | undefined;
|
|
3043
|
-
rightPinCount?: number | undefined;
|
|
3044
|
-
topPinCount?: number | undefined;
|
|
3045
|
-
bottomPinCount?: number | undefined;
|
|
3046
|
-
}, {
|
|
3047
|
-
leftPinCount?: number | undefined;
|
|
3048
|
-
rightPinCount?: number | undefined;
|
|
3049
|
-
topPinCount?: number | undefined;
|
|
3050
|
-
bottomPinCount?: number | undefined;
|
|
3051
|
-
}>]>, zod.ZodObject<{
|
|
3052
3049
|
leftSide: zod.ZodOptional<zod.ZodObject<{
|
|
3053
3050
|
pins: zod.ZodArray<zod.ZodNumber, "many">;
|
|
3054
3051
|
direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
|
|
@@ -3090,15 +3087,19 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
3090
3087
|
pins: number[];
|
|
3091
3088
|
}>>;
|
|
3092
3089
|
}, "strip", zod.ZodTypeAny, {
|
|
3090
|
+
leftSize?: number | undefined;
|
|
3091
|
+
topSize?: number | undefined;
|
|
3092
|
+
rightSize?: number | undefined;
|
|
3093
|
+
bottomSize?: number | undefined;
|
|
3093
3094
|
leftSide?: {
|
|
3094
3095
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3095
3096
|
pins: number[];
|
|
3096
3097
|
} | undefined;
|
|
3097
|
-
|
|
3098
|
+
topSide?: {
|
|
3098
3099
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3099
3100
|
pins: number[];
|
|
3100
3101
|
} | undefined;
|
|
3101
|
-
|
|
3102
|
+
rightSide?: {
|
|
3102
3103
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3103
3104
|
pins: number[];
|
|
3104
3105
|
} | undefined;
|
|
@@ -3106,16 +3107,24 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
3106
3107
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3107
3108
|
pins: number[];
|
|
3108
3109
|
} | undefined;
|
|
3110
|
+
leftPinCount?: number | undefined;
|
|
3111
|
+
rightPinCount?: number | undefined;
|
|
3112
|
+
topPinCount?: number | undefined;
|
|
3113
|
+
bottomPinCount?: number | undefined;
|
|
3109
3114
|
}, {
|
|
3115
|
+
leftSize?: number | undefined;
|
|
3116
|
+
topSize?: number | undefined;
|
|
3117
|
+
rightSize?: number | undefined;
|
|
3118
|
+
bottomSize?: number | undefined;
|
|
3110
3119
|
leftSide?: {
|
|
3111
3120
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3112
3121
|
pins: number[];
|
|
3113
3122
|
} | undefined;
|
|
3114
|
-
|
|
3123
|
+
topSide?: {
|
|
3115
3124
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3116
3125
|
pins: number[];
|
|
3117
3126
|
} | undefined;
|
|
3118
|
-
|
|
3127
|
+
rightSide?: {
|
|
3119
3128
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3120
3129
|
pins: number[];
|
|
3121
3130
|
} | undefined;
|
|
@@ -3123,7 +3132,11 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
3123
3132
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3124
3133
|
pins: number[];
|
|
3125
3134
|
} | undefined;
|
|
3126
|
-
|
|
3135
|
+
leftPinCount?: number | undefined;
|
|
3136
|
+
rightPinCount?: number | undefined;
|
|
3137
|
+
topPinCount?: number | undefined;
|
|
3138
|
+
bottomPinCount?: number | undefined;
|
|
3139
|
+
}>>;
|
|
3127
3140
|
schPinStyle: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
3128
3141
|
leftMargin: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
3129
3142
|
rightMargin: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
@@ -3217,21 +3230,15 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
3217
3230
|
topSize?: number | undefined;
|
|
3218
3231
|
rightSize?: number | undefined;
|
|
3219
3232
|
bottomSize?: number | undefined;
|
|
3220
|
-
} | {
|
|
3221
|
-
leftPinCount?: number | undefined;
|
|
3222
|
-
rightPinCount?: number | undefined;
|
|
3223
|
-
topPinCount?: number | undefined;
|
|
3224
|
-
bottomPinCount?: number | undefined;
|
|
3225
|
-
} | {
|
|
3226
3233
|
leftSide?: {
|
|
3227
3234
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3228
3235
|
pins: number[];
|
|
3229
3236
|
} | undefined;
|
|
3230
|
-
|
|
3237
|
+
topSide?: {
|
|
3231
3238
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3232
3239
|
pins: number[];
|
|
3233
3240
|
} | undefined;
|
|
3234
|
-
|
|
3241
|
+
rightSide?: {
|
|
3235
3242
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3236
3243
|
pins: number[];
|
|
3237
3244
|
} | undefined;
|
|
@@ -3239,6 +3246,10 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
3239
3246
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3240
3247
|
pins: number[];
|
|
3241
3248
|
} | undefined;
|
|
3249
|
+
leftPinCount?: number | undefined;
|
|
3250
|
+
rightPinCount?: number | undefined;
|
|
3251
|
+
topPinCount?: number | undefined;
|
|
3252
|
+
bottomPinCount?: number | undefined;
|
|
3242
3253
|
} | undefined;
|
|
3243
3254
|
schPinStyle?: Record<string, {
|
|
3244
3255
|
leftMargin?: number | undefined;
|
|
@@ -3325,21 +3336,15 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
3325
3336
|
topSize?: number | undefined;
|
|
3326
3337
|
rightSize?: number | undefined;
|
|
3327
3338
|
bottomSize?: number | undefined;
|
|
3328
|
-
} | {
|
|
3329
|
-
leftPinCount?: number | undefined;
|
|
3330
|
-
rightPinCount?: number | undefined;
|
|
3331
|
-
topPinCount?: number | undefined;
|
|
3332
|
-
bottomPinCount?: number | undefined;
|
|
3333
|
-
} | {
|
|
3334
3339
|
leftSide?: {
|
|
3335
3340
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3336
3341
|
pins: number[];
|
|
3337
3342
|
} | undefined;
|
|
3338
|
-
|
|
3343
|
+
topSide?: {
|
|
3339
3344
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3340
3345
|
pins: number[];
|
|
3341
3346
|
} | undefined;
|
|
3342
|
-
|
|
3347
|
+
rightSide?: {
|
|
3343
3348
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3344
3349
|
pins: number[];
|
|
3345
3350
|
} | undefined;
|
|
@@ -3347,6 +3352,10 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
3347
3352
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3348
3353
|
pins: number[];
|
|
3349
3354
|
} | undefined;
|
|
3355
|
+
leftPinCount?: number | undefined;
|
|
3356
|
+
rightPinCount?: number | undefined;
|
|
3357
|
+
topPinCount?: number | undefined;
|
|
3358
|
+
bottomPinCount?: number | undefined;
|
|
3350
3359
|
} | undefined;
|
|
3351
3360
|
schPinStyle?: Record<string, {
|
|
3352
3361
|
leftMargin?: string | number | undefined;
|
|
@@ -3647,37 +3656,15 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
3647
3656
|
schWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
3648
3657
|
schHeight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
3649
3658
|
schDirection: zod.ZodOptional<zod.ZodEnum<["left", "right"]>>;
|
|
3650
|
-
schPortArrangement: zod.ZodOptional<zod.
|
|
3659
|
+
schPortArrangement: zod.ZodOptional<zod.ZodObject<{
|
|
3651
3660
|
leftSize: zod.ZodOptional<zod.ZodNumber>;
|
|
3652
3661
|
topSize: zod.ZodOptional<zod.ZodNumber>;
|
|
3653
3662
|
rightSize: zod.ZodOptional<zod.ZodNumber>;
|
|
3654
3663
|
bottomSize: zod.ZodOptional<zod.ZodNumber>;
|
|
3655
|
-
}, "strip", zod.ZodTypeAny, {
|
|
3656
|
-
leftSize?: number | undefined;
|
|
3657
|
-
topSize?: number | undefined;
|
|
3658
|
-
rightSize?: number | undefined;
|
|
3659
|
-
bottomSize?: number | undefined;
|
|
3660
|
-
}, {
|
|
3661
|
-
leftSize?: number | undefined;
|
|
3662
|
-
topSize?: number | undefined;
|
|
3663
|
-
rightSize?: number | undefined;
|
|
3664
|
-
bottomSize?: number | undefined;
|
|
3665
|
-
}>, zod.ZodObject<{
|
|
3666
3664
|
leftPinCount: zod.ZodOptional<zod.ZodNumber>;
|
|
3667
3665
|
rightPinCount: zod.ZodOptional<zod.ZodNumber>;
|
|
3668
3666
|
topPinCount: zod.ZodOptional<zod.ZodNumber>;
|
|
3669
3667
|
bottomPinCount: zod.ZodOptional<zod.ZodNumber>;
|
|
3670
|
-
}, "strip", zod.ZodTypeAny, {
|
|
3671
|
-
leftPinCount?: number | undefined;
|
|
3672
|
-
rightPinCount?: number | undefined;
|
|
3673
|
-
topPinCount?: number | undefined;
|
|
3674
|
-
bottomPinCount?: number | undefined;
|
|
3675
|
-
}, {
|
|
3676
|
-
leftPinCount?: number | undefined;
|
|
3677
|
-
rightPinCount?: number | undefined;
|
|
3678
|
-
topPinCount?: number | undefined;
|
|
3679
|
-
bottomPinCount?: number | undefined;
|
|
3680
|
-
}>]>, zod.ZodObject<{
|
|
3681
3668
|
leftSide: zod.ZodOptional<zod.ZodObject<{
|
|
3682
3669
|
pins: zod.ZodArray<zod.ZodNumber, "many">;
|
|
3683
3670
|
direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
|
|
@@ -3719,15 +3706,19 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
3719
3706
|
pins: number[];
|
|
3720
3707
|
}>>;
|
|
3721
3708
|
}, "strip", zod.ZodTypeAny, {
|
|
3709
|
+
leftSize?: number | undefined;
|
|
3710
|
+
topSize?: number | undefined;
|
|
3711
|
+
rightSize?: number | undefined;
|
|
3712
|
+
bottomSize?: number | undefined;
|
|
3722
3713
|
leftSide?: {
|
|
3723
3714
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3724
3715
|
pins: number[];
|
|
3725
3716
|
} | undefined;
|
|
3726
|
-
|
|
3717
|
+
topSide?: {
|
|
3727
3718
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3728
3719
|
pins: number[];
|
|
3729
3720
|
} | undefined;
|
|
3730
|
-
|
|
3721
|
+
rightSide?: {
|
|
3731
3722
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3732
3723
|
pins: number[];
|
|
3733
3724
|
} | undefined;
|
|
@@ -3735,16 +3726,24 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
3735
3726
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3736
3727
|
pins: number[];
|
|
3737
3728
|
} | undefined;
|
|
3729
|
+
leftPinCount?: number | undefined;
|
|
3730
|
+
rightPinCount?: number | undefined;
|
|
3731
|
+
topPinCount?: number | undefined;
|
|
3732
|
+
bottomPinCount?: number | undefined;
|
|
3738
3733
|
}, {
|
|
3734
|
+
leftSize?: number | undefined;
|
|
3735
|
+
topSize?: number | undefined;
|
|
3736
|
+
rightSize?: number | undefined;
|
|
3737
|
+
bottomSize?: number | undefined;
|
|
3739
3738
|
leftSide?: {
|
|
3740
3739
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3741
3740
|
pins: number[];
|
|
3742
3741
|
} | undefined;
|
|
3743
|
-
|
|
3742
|
+
topSide?: {
|
|
3744
3743
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3745
3744
|
pins: number[];
|
|
3746
3745
|
} | undefined;
|
|
3747
|
-
|
|
3746
|
+
rightSide?: {
|
|
3748
3747
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3749
3748
|
pins: number[];
|
|
3750
3749
|
} | undefined;
|
|
@@ -3752,7 +3751,11 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
3752
3751
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3753
3752
|
pins: number[];
|
|
3754
3753
|
} | undefined;
|
|
3755
|
-
|
|
3754
|
+
leftPinCount?: number | undefined;
|
|
3755
|
+
rightPinCount?: number | undefined;
|
|
3756
|
+
topPinCount?: number | undefined;
|
|
3757
|
+
bottomPinCount?: number | undefined;
|
|
3758
|
+
}>>;
|
|
3756
3759
|
}>, "strip", zod.ZodTypeAny, {
|
|
3757
3760
|
name: string;
|
|
3758
3761
|
pcbX?: number | undefined;
|
|
@@ -3827,21 +3830,15 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
3827
3830
|
topSize?: number | undefined;
|
|
3828
3831
|
rightSize?: number | undefined;
|
|
3829
3832
|
bottomSize?: number | undefined;
|
|
3830
|
-
} | {
|
|
3831
|
-
leftPinCount?: number | undefined;
|
|
3832
|
-
rightPinCount?: number | undefined;
|
|
3833
|
-
topPinCount?: number | undefined;
|
|
3834
|
-
bottomPinCount?: number | undefined;
|
|
3835
|
-
} | {
|
|
3836
3833
|
leftSide?: {
|
|
3837
3834
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3838
3835
|
pins: number[];
|
|
3839
3836
|
} | undefined;
|
|
3840
|
-
|
|
3837
|
+
topSide?: {
|
|
3841
3838
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3842
3839
|
pins: number[];
|
|
3843
3840
|
} | undefined;
|
|
3844
|
-
|
|
3841
|
+
rightSide?: {
|
|
3845
3842
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3846
3843
|
pins: number[];
|
|
3847
3844
|
} | undefined;
|
|
@@ -3849,6 +3846,10 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
3849
3846
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3850
3847
|
pins: number[];
|
|
3851
3848
|
} | undefined;
|
|
3849
|
+
leftPinCount?: number | undefined;
|
|
3850
|
+
rightPinCount?: number | undefined;
|
|
3851
|
+
topPinCount?: number | undefined;
|
|
3852
|
+
bottomPinCount?: number | undefined;
|
|
3852
3853
|
} | undefined;
|
|
3853
3854
|
schPinStyle?: Record<string, {
|
|
3854
3855
|
leftMargin?: number | undefined;
|
|
@@ -3936,21 +3937,15 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
3936
3937
|
topSize?: number | undefined;
|
|
3937
3938
|
rightSize?: number | undefined;
|
|
3938
3939
|
bottomSize?: number | undefined;
|
|
3939
|
-
} | {
|
|
3940
|
-
leftPinCount?: number | undefined;
|
|
3941
|
-
rightPinCount?: number | undefined;
|
|
3942
|
-
topPinCount?: number | undefined;
|
|
3943
|
-
bottomPinCount?: number | undefined;
|
|
3944
|
-
} | {
|
|
3945
3940
|
leftSide?: {
|
|
3946
3941
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3947
3942
|
pins: number[];
|
|
3948
3943
|
} | undefined;
|
|
3949
|
-
|
|
3944
|
+
topSide?: {
|
|
3950
3945
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3951
3946
|
pins: number[];
|
|
3952
3947
|
} | undefined;
|
|
3953
|
-
|
|
3948
|
+
rightSide?: {
|
|
3954
3949
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3955
3950
|
pins: number[];
|
|
3956
3951
|
} | undefined;
|
|
@@ -3958,6 +3953,10 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
3958
3953
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3959
3954
|
pins: number[];
|
|
3960
3955
|
} | undefined;
|
|
3956
|
+
leftPinCount?: number | undefined;
|
|
3957
|
+
rightPinCount?: number | undefined;
|
|
3958
|
+
topPinCount?: number | undefined;
|
|
3959
|
+
bottomPinCount?: number | undefined;
|
|
3961
3960
|
} | undefined;
|
|
3962
3961
|
schPinStyle?: Record<string, {
|
|
3963
3962
|
leftMargin?: string | number | undefined;
|
package/dist/index.js
CHANGED
|
@@ -2080,38 +2080,38 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
2080
2080
|
const { db } = this.root;
|
|
2081
2081
|
const { boardThickness = 0 } = this.root?._getBoard() ?? {};
|
|
2082
2082
|
const cadModel = this._parsedProps.cadModel;
|
|
2083
|
-
if (
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
const rotationOffset = rotation3.parse({
|
|
2090
|
-
x: 0,
|
|
2091
|
-
y: 0,
|
|
2092
|
-
z: typeof cadModel.rotationOffset === "number" ? cadModel.rotationOffset : 0,
|
|
2093
|
-
...typeof cadModel.rotationOffset === "object" ? cadModel.rotationOffset ?? {} : {}
|
|
2094
|
-
});
|
|
2095
|
-
const cad_model = db.cad_component.insert({
|
|
2096
|
-
// TODO z maybe depends on layer
|
|
2097
|
-
position: {
|
|
2098
|
-
x: bounds.center.x,
|
|
2099
|
-
y: bounds.center.y,
|
|
2100
|
-
z: this.props.layer === "bottom" ? -boardThickness / 2 : boardThickness / 2
|
|
2101
|
-
},
|
|
2102
|
-
rotation: {
|
|
2103
|
-
x: rotationOffset.x,
|
|
2104
|
-
y: (this.props.layer === "top" ? 0 : 180) + rotationOffset.y,
|
|
2105
|
-
z: (pcb_component?.rotation ?? 0) + (this.props.layer === "bottom" ? 180 : 0) + rotationOffset.z
|
|
2106
|
-
},
|
|
2107
|
-
pcb_component_id: this.pcb_component_id,
|
|
2108
|
-
source_component_id: this.source_component_id,
|
|
2109
|
-
model_stl_url: "stlUrl" in cadModel ? cadModel.stlUrl : void 0,
|
|
2110
|
-
model_obj_url: "objUrl" in cadModel ? cadModel.objUrl : void 0,
|
|
2111
|
-
model_jscad: "jscad" in cadModel ? cadModel.jscad : void 0,
|
|
2112
|
-
footprinter_string: typeof this.props.footprint === "string" && !cadModel ? this.props.footprint : void 0
|
|
2113
|
-
});
|
|
2083
|
+
if (!this.pcb_component_id) return;
|
|
2084
|
+
if (!cadModel && !this.props.footprint) return;
|
|
2085
|
+
const bounds = this._getPcbCircuitJsonBounds();
|
|
2086
|
+
const pcb_component = db.pcb_component.get(this.pcb_component_id);
|
|
2087
|
+
if (typeof cadModel === "string") {
|
|
2088
|
+
throw new Error("String cadModel not yet implemented");
|
|
2114
2089
|
}
|
|
2090
|
+
const rotationOffset = rotation3.parse({
|
|
2091
|
+
x: 0,
|
|
2092
|
+
y: 0,
|
|
2093
|
+
z: typeof cadModel?.rotationOffset === "number" ? cadModel.rotationOffset : 0,
|
|
2094
|
+
...typeof cadModel?.rotationOffset === "object" ? cadModel.rotationOffset ?? {} : {}
|
|
2095
|
+
});
|
|
2096
|
+
const cad_model = db.cad_component.insert({
|
|
2097
|
+
// TODO z maybe depends on layer
|
|
2098
|
+
position: {
|
|
2099
|
+
x: bounds.center.x,
|
|
2100
|
+
y: bounds.center.y,
|
|
2101
|
+
z: this.props.layer === "bottom" ? -boardThickness / 2 : boardThickness / 2
|
|
2102
|
+
},
|
|
2103
|
+
rotation: {
|
|
2104
|
+
x: rotationOffset.x,
|
|
2105
|
+
y: (this.props.layer === "top" ? 0 : 180) + rotationOffset.y,
|
|
2106
|
+
z: (pcb_component?.rotation ?? 0) + (this.props.layer === "bottom" ? 180 : 0) + rotationOffset.z
|
|
2107
|
+
},
|
|
2108
|
+
pcb_component_id: this.pcb_component_id,
|
|
2109
|
+
source_component_id: this.source_component_id,
|
|
2110
|
+
model_stl_url: "stlUrl" in (cadModel ?? {}) ? cadModel.stlUrl : void 0,
|
|
2111
|
+
model_obj_url: "objUrl" in (cadModel ?? {}) ? cadModel.objUrl : void 0,
|
|
2112
|
+
model_jscad: "jscad" in (cadModel ?? {}) ? cadModel.jscad : void 0,
|
|
2113
|
+
footprinter_string: typeof this.props.footprint === "string" && !cadModel ? this.props.footprint : void 0
|
|
2114
|
+
});
|
|
2115
2115
|
}
|
|
2116
2116
|
};
|
|
2117
2117
|
|
|
@@ -2996,20 +2996,27 @@ var FTYPE = stringProxy;
|
|
|
2996
2996
|
|
|
2997
2997
|
// lib/components/normal-components/Diode.ts
|
|
2998
2998
|
var Diode = class extends NormalComponent {
|
|
2999
|
-
|
|
3000
|
-
pin2 = this.portMap.pin2;
|
|
2999
|
+
// @ts-ignore
|
|
3001
3000
|
get config() {
|
|
3002
3001
|
return {
|
|
3003
|
-
|
|
3002
|
+
schematicSymbolName: this.props.symbolName ?? "diode_horz",
|
|
3004
3003
|
componentName: "Diode",
|
|
3005
3004
|
zodProps: diodeProps,
|
|
3006
3005
|
sourceFtype: "simple_diode"
|
|
3007
3006
|
};
|
|
3008
3007
|
}
|
|
3009
3008
|
initPorts() {
|
|
3010
|
-
this.add(
|
|
3011
|
-
|
|
3009
|
+
this.add(
|
|
3010
|
+
new Port({ name: "pin1", pinNumber: 1, aliases: ["anode", "pos"] })
|
|
3011
|
+
);
|
|
3012
|
+
this.add(
|
|
3013
|
+
new Port({ name: "pin2", pinNumber: 2, aliases: ["cathode", "neg"] })
|
|
3014
|
+
);
|
|
3012
3015
|
}
|
|
3016
|
+
pos = this.portMap.pin1;
|
|
3017
|
+
anode = this.portMap.pin1;
|
|
3018
|
+
neg = this.portMap.pin2;
|
|
3019
|
+
cathode = this.portMap.pin2;
|
|
3013
3020
|
};
|
|
3014
3021
|
|
|
3015
3022
|
// lib/components/normal-components/Capacitor.ts
|
|
@@ -3068,6 +3075,53 @@ var Capacitor = class extends NormalComponent {
|
|
|
3068
3075
|
// lib/components/normal-components/Chip.ts
|
|
3069
3076
|
import { chipProps } from "@tscircuit/props";
|
|
3070
3077
|
|
|
3078
|
+
// lib/soup/underscorifyPinStyles.ts
|
|
3079
|
+
import "circuit-json";
|
|
3080
|
+
import "zod";
|
|
3081
|
+
var underscorifyPinStyles = (pinStyles) => {
|
|
3082
|
+
if (!pinStyles) return void 0;
|
|
3083
|
+
const underscorePinStyles = {};
|
|
3084
|
+
for (const [pinName, pinStyle] of Object.entries(pinStyles)) {
|
|
3085
|
+
underscorePinStyles[pinName] = {
|
|
3086
|
+
bottom_margin: pinStyle.bottomMargin,
|
|
3087
|
+
left_margin: pinStyle.leftMargin,
|
|
3088
|
+
right_margin: pinStyle.rightMargin,
|
|
3089
|
+
top_margin: pinStyle.topMargin
|
|
3090
|
+
};
|
|
3091
|
+
}
|
|
3092
|
+
return underscorePinStyles;
|
|
3093
|
+
};
|
|
3094
|
+
|
|
3095
|
+
// lib/soup/underscorifyPortArrangement.ts
|
|
3096
|
+
var underscorifyPortArrangement = (portArrangement) => {
|
|
3097
|
+
if (!portArrangement) return void 0;
|
|
3098
|
+
if ("leftSide" in portArrangement || "rightSide" in portArrangement || "topSide" in portArrangement || "bottomSide" in portArrangement) {
|
|
3099
|
+
return {
|
|
3100
|
+
left_side: portArrangement.leftSide,
|
|
3101
|
+
right_side: portArrangement.rightSide,
|
|
3102
|
+
top_side: portArrangement.topSide,
|
|
3103
|
+
bottom_side: portArrangement.bottomSide
|
|
3104
|
+
};
|
|
3105
|
+
}
|
|
3106
|
+
if ("leftPinCount" in portArrangement || "rightPinCount" in portArrangement || "topPinCount" in portArrangement || "bottomPinCount" in portArrangement) {
|
|
3107
|
+
return {
|
|
3108
|
+
left_size: portArrangement.leftPinCount,
|
|
3109
|
+
right_size: portArrangement.rightPinCount,
|
|
3110
|
+
top_size: portArrangement.topPinCount,
|
|
3111
|
+
bottom_size: portArrangement.bottomPinCount
|
|
3112
|
+
};
|
|
3113
|
+
}
|
|
3114
|
+
if ("leftSize" in portArrangement || "rightSize" in portArrangement || "topSize" in portArrangement || "bottomSize" in portArrangement) {
|
|
3115
|
+
return {
|
|
3116
|
+
left_size: portArrangement.leftSize,
|
|
3117
|
+
right_size: portArrangement.rightSize,
|
|
3118
|
+
top_size: portArrangement.topSize,
|
|
3119
|
+
bottom_size: portArrangement.bottomSize
|
|
3120
|
+
};
|
|
3121
|
+
}
|
|
3122
|
+
return void 0;
|
|
3123
|
+
};
|
|
3124
|
+
|
|
3071
3125
|
// lib/utils/schematic/getAllDimensionsForSchematicBox.ts
|
|
3072
3126
|
import "circuit-json";
|
|
3073
3127
|
|
|
@@ -3306,53 +3360,6 @@ var getAllDimensionsForSchematicBox = (params) => {
|
|
|
3306
3360
|
};
|
|
3307
3361
|
};
|
|
3308
3362
|
|
|
3309
|
-
// lib/soup/underscorifyPortArrangement.ts
|
|
3310
|
-
var underscorifyPortArrangement = (portArrangement) => {
|
|
3311
|
-
if (!portArrangement) return void 0;
|
|
3312
|
-
if ("leftSide" in portArrangement || "rightSide" in portArrangement || "topSide" in portArrangement || "bottomSide" in portArrangement) {
|
|
3313
|
-
return {
|
|
3314
|
-
left_side: portArrangement.leftSide,
|
|
3315
|
-
right_side: portArrangement.rightSide,
|
|
3316
|
-
top_side: portArrangement.topSide,
|
|
3317
|
-
bottom_side: portArrangement.bottomSide
|
|
3318
|
-
};
|
|
3319
|
-
}
|
|
3320
|
-
if ("leftPinCount" in portArrangement || "rightPinCount" in portArrangement || "topPinCount" in portArrangement || "bottomPinCount" in portArrangement) {
|
|
3321
|
-
return {
|
|
3322
|
-
left_size: portArrangement.leftPinCount,
|
|
3323
|
-
right_size: portArrangement.rightPinCount,
|
|
3324
|
-
top_size: portArrangement.topPinCount,
|
|
3325
|
-
bottom_size: portArrangement.bottomPinCount
|
|
3326
|
-
};
|
|
3327
|
-
}
|
|
3328
|
-
if ("leftSize" in portArrangement || "rightSize" in portArrangement || "topSize" in portArrangement || "bottomSize" in portArrangement) {
|
|
3329
|
-
return {
|
|
3330
|
-
left_size: portArrangement.leftSize,
|
|
3331
|
-
right_size: portArrangement.rightSize,
|
|
3332
|
-
top_size: portArrangement.topSize,
|
|
3333
|
-
bottom_size: portArrangement.bottomSize
|
|
3334
|
-
};
|
|
3335
|
-
}
|
|
3336
|
-
return void 0;
|
|
3337
|
-
};
|
|
3338
|
-
|
|
3339
|
-
// lib/soup/underscorifyPinStyles.ts
|
|
3340
|
-
import "circuit-json";
|
|
3341
|
-
import "zod";
|
|
3342
|
-
var underscorifyPinStyles = (pinStyles) => {
|
|
3343
|
-
if (!pinStyles) return void 0;
|
|
3344
|
-
const underscorePinStyles = {};
|
|
3345
|
-
for (const [pinName, pinStyle] of Object.entries(pinStyles)) {
|
|
3346
|
-
underscorePinStyles[pinName] = {
|
|
3347
|
-
bottom_margin: pinStyle.bottomMargin,
|
|
3348
|
-
left_margin: pinStyle.leftMargin,
|
|
3349
|
-
right_margin: pinStyle.rightMargin,
|
|
3350
|
-
top_margin: pinStyle.topMargin
|
|
3351
|
-
};
|
|
3352
|
-
}
|
|
3353
|
-
return underscorePinStyles;
|
|
3354
|
-
};
|
|
3355
|
-
|
|
3356
3363
|
// lib/components/normal-components/Chip.ts
|
|
3357
3364
|
var Chip = class extends NormalComponent {
|
|
3358
3365
|
schematicDimensions = null;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.98",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@lume/kiwi": "^0.4.3",
|
|
39
39
|
"@tscircuit/infgrid-ijump-astar": "^0.0.21",
|
|
40
40
|
"@tscircuit/math-utils": "^0.0.4",
|
|
41
|
-
"@tscircuit/props": "^0.0.
|
|
41
|
+
"@tscircuit/props": "^0.0.67",
|
|
42
42
|
"@tscircuit/soup-util": "^0.0.31",
|
|
43
43
|
"circuit-json": "^0.0.82",
|
|
44
44
|
"circuit-json-to-connectivity-map": "^0.0.17",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"performance-now": "^2.1.0",
|
|
48
48
|
"react": "^18.3.1",
|
|
49
49
|
"react-reconciler": "^0.29.2",
|
|
50
|
-
"schematic-symbols": "0.0.
|
|
50
|
+
"schematic-symbols": "0.0.32",
|
|
51
51
|
"transformation-matrix": "^2.16.1",
|
|
52
52
|
"zod": "^3.23.8"
|
|
53
53
|
}
|