@tscircuit/props 0.0.27 → 0.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2866,6 +2866,546 @@ declare const schematicPortArrangement: z.ZodUnion<[z.ZodObject<{
2866
2866
  direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
2867
2867
  } | undefined;
2868
2868
  }>]>;
2869
+ declare const chipProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
2870
+ pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
2871
+ pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
2872
+ pcbRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
2873
+ schX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
2874
+ schY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
2875
+ schRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
2876
+ layer: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
2877
+ name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
2878
+ }, "strip", z.ZodTypeAny, {
2879
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
2880
+ }, {
2881
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
2882
+ }>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
2883
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
2884
+ }>>;
2885
+ footprint: z.ZodOptional<z.ZodType<Footprint, z.ZodTypeDef, Footprint>>;
2886
+ }, {
2887
+ supplierPartNumbers: z.ZodOptional<z.ZodRecord<z.ZodEnum<["jlcpcb", "macrofab", "pcbway", "digikey", "mouser", "lcsc"]>, z.ZodArray<z.ZodString, "many">>>;
2888
+ }>, {
2889
+ name: z.ZodString;
2890
+ cadModel: z.ZodOptional<z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
2891
+ rotationOffset: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodObject<{
2892
+ x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2893
+ y: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2894
+ z: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2895
+ }, "strip", z.ZodTypeAny, {
2896
+ x: string | number;
2897
+ y: string | number;
2898
+ z: string | number;
2899
+ }, {
2900
+ x: string | number;
2901
+ y: string | number;
2902
+ z: string | number;
2903
+ }>]>>;
2904
+ positionOffset: z.ZodOptional<z.ZodObject<{
2905
+ x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2906
+ y: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2907
+ z: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2908
+ }, "strip", z.ZodTypeAny, {
2909
+ x: string | number;
2910
+ y: string | number;
2911
+ z: string | number;
2912
+ }, {
2913
+ x: string | number;
2914
+ y: string | number;
2915
+ z: string | number;
2916
+ }>>;
2917
+ size: z.ZodOptional<z.ZodObject<{
2918
+ x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2919
+ y: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2920
+ z: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2921
+ }, "strip", z.ZodTypeAny, {
2922
+ x: string | number;
2923
+ y: string | number;
2924
+ z: string | number;
2925
+ }, {
2926
+ x: string | number;
2927
+ y: string | number;
2928
+ z: string | number;
2929
+ }>>;
2930
+ }, {
2931
+ stlUrl: z.ZodString;
2932
+ }>, "strip", z.ZodTypeAny, {
2933
+ stlUrl: string;
2934
+ rotationOffset?: number | {
2935
+ x: string | number;
2936
+ y: string | number;
2937
+ z: string | number;
2938
+ } | undefined;
2939
+ positionOffset?: {
2940
+ x: string | number;
2941
+ y: string | number;
2942
+ z: string | number;
2943
+ } | undefined;
2944
+ size?: {
2945
+ x: string | number;
2946
+ y: string | number;
2947
+ z: string | number;
2948
+ } | undefined;
2949
+ }, {
2950
+ stlUrl: string;
2951
+ rotationOffset?: number | {
2952
+ x: string | number;
2953
+ y: string | number;
2954
+ z: string | number;
2955
+ } | undefined;
2956
+ positionOffset?: {
2957
+ x: string | number;
2958
+ y: string | number;
2959
+ z: string | number;
2960
+ } | undefined;
2961
+ size?: {
2962
+ x: string | number;
2963
+ y: string | number;
2964
+ z: string | number;
2965
+ } | undefined;
2966
+ }>, z.ZodObject<z.objectUtil.extendShape<{
2967
+ rotationOffset: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodObject<{
2968
+ x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2969
+ y: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2970
+ z: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2971
+ }, "strip", z.ZodTypeAny, {
2972
+ x: string | number;
2973
+ y: string | number;
2974
+ z: string | number;
2975
+ }, {
2976
+ x: string | number;
2977
+ y: string | number;
2978
+ z: string | number;
2979
+ }>]>>;
2980
+ positionOffset: z.ZodOptional<z.ZodObject<{
2981
+ x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2982
+ y: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2983
+ z: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2984
+ }, "strip", z.ZodTypeAny, {
2985
+ x: string | number;
2986
+ y: string | number;
2987
+ z: string | number;
2988
+ }, {
2989
+ x: string | number;
2990
+ y: string | number;
2991
+ z: string | number;
2992
+ }>>;
2993
+ size: z.ZodOptional<z.ZodObject<{
2994
+ x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2995
+ y: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2996
+ z: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2997
+ }, "strip", z.ZodTypeAny, {
2998
+ x: string | number;
2999
+ y: string | number;
3000
+ z: string | number;
3001
+ }, {
3002
+ x: string | number;
3003
+ y: string | number;
3004
+ z: string | number;
3005
+ }>>;
3006
+ }, {
3007
+ objUrl: z.ZodString;
3008
+ mtlUrl: z.ZodOptional<z.ZodString>;
3009
+ }>, "strip", z.ZodTypeAny, {
3010
+ objUrl: string;
3011
+ rotationOffset?: number | {
3012
+ x: string | number;
3013
+ y: string | number;
3014
+ z: string | number;
3015
+ } | undefined;
3016
+ positionOffset?: {
3017
+ x: string | number;
3018
+ y: string | number;
3019
+ z: string | number;
3020
+ } | undefined;
3021
+ size?: {
3022
+ x: string | number;
3023
+ y: string | number;
3024
+ z: string | number;
3025
+ } | undefined;
3026
+ mtlUrl?: string | undefined;
3027
+ }, {
3028
+ objUrl: string;
3029
+ rotationOffset?: number | {
3030
+ x: string | number;
3031
+ y: string | number;
3032
+ z: string | number;
3033
+ } | undefined;
3034
+ positionOffset?: {
3035
+ x: string | number;
3036
+ y: string | number;
3037
+ z: string | number;
3038
+ } | undefined;
3039
+ size?: {
3040
+ x: string | number;
3041
+ y: string | number;
3042
+ z: string | number;
3043
+ } | undefined;
3044
+ mtlUrl?: string | undefined;
3045
+ }>, z.ZodObject<z.objectUtil.extendShape<{
3046
+ rotationOffset: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodObject<{
3047
+ x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
3048
+ y: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
3049
+ z: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
3050
+ }, "strip", z.ZodTypeAny, {
3051
+ x: string | number;
3052
+ y: string | number;
3053
+ z: string | number;
3054
+ }, {
3055
+ x: string | number;
3056
+ y: string | number;
3057
+ z: string | number;
3058
+ }>]>>;
3059
+ positionOffset: z.ZodOptional<z.ZodObject<{
3060
+ x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
3061
+ y: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
3062
+ z: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
3063
+ }, "strip", z.ZodTypeAny, {
3064
+ x: string | number;
3065
+ y: string | number;
3066
+ z: string | number;
3067
+ }, {
3068
+ x: string | number;
3069
+ y: string | number;
3070
+ z: string | number;
3071
+ }>>;
3072
+ size: z.ZodOptional<z.ZodObject<{
3073
+ x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
3074
+ y: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
3075
+ z: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
3076
+ }, "strip", z.ZodTypeAny, {
3077
+ x: string | number;
3078
+ y: string | number;
3079
+ z: string | number;
3080
+ }, {
3081
+ x: string | number;
3082
+ y: string | number;
3083
+ z: string | number;
3084
+ }>>;
3085
+ }, {
3086
+ jscad: z.ZodAny;
3087
+ }>, "strip", z.ZodTypeAny, {
3088
+ rotationOffset?: number | {
3089
+ x: string | number;
3090
+ y: string | number;
3091
+ z: string | number;
3092
+ } | undefined;
3093
+ positionOffset?: {
3094
+ x: string | number;
3095
+ y: string | number;
3096
+ z: string | number;
3097
+ } | undefined;
3098
+ size?: {
3099
+ x: string | number;
3100
+ y: string | number;
3101
+ z: string | number;
3102
+ } | undefined;
3103
+ jscad?: any;
3104
+ }, {
3105
+ rotationOffset?: number | {
3106
+ x: string | number;
3107
+ y: string | number;
3108
+ z: string | number;
3109
+ } | undefined;
3110
+ positionOffset?: {
3111
+ x: string | number;
3112
+ y: string | number;
3113
+ z: string | number;
3114
+ } | undefined;
3115
+ size?: {
3116
+ x: string | number;
3117
+ y: string | number;
3118
+ z: string | number;
3119
+ } | undefined;
3120
+ jscad?: any;
3121
+ }>]>>;
3122
+ children: z.ZodOptional<z.ZodAny>;
3123
+ }>, {
3124
+ manufacturerPartNumber: z.ZodOptional<z.ZodString>;
3125
+ pinLabels: z.ZodOptional<z.ZodRecord<z.ZodNumber, z.ZodString>>;
3126
+ schPortArrangement: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
3127
+ leftSize: z.ZodOptional<z.ZodNumber>;
3128
+ topSize: z.ZodOptional<z.ZodNumber>;
3129
+ rightSize: z.ZodOptional<z.ZodNumber>;
3130
+ bottomSize: z.ZodOptional<z.ZodNumber>;
3131
+ }, "strip", z.ZodTypeAny, {
3132
+ leftSize?: number | undefined;
3133
+ topSize?: number | undefined;
3134
+ rightSize?: number | undefined;
3135
+ bottomSize?: number | undefined;
3136
+ }, {
3137
+ leftSize?: number | undefined;
3138
+ topSize?: number | undefined;
3139
+ rightSize?: number | undefined;
3140
+ bottomSize?: number | undefined;
3141
+ }>, z.ZodObject<{
3142
+ leftSide: z.ZodOptional<z.ZodObject<{
3143
+ pins: z.ZodArray<z.ZodNumber, "many">;
3144
+ direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
3145
+ }, "strip", z.ZodTypeAny, {
3146
+ pins: number[];
3147
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3148
+ }, {
3149
+ pins: number[];
3150
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3151
+ }>>;
3152
+ rightSide: z.ZodOptional<z.ZodObject<{
3153
+ pins: z.ZodArray<z.ZodNumber, "many">;
3154
+ direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
3155
+ }, "strip", z.ZodTypeAny, {
3156
+ pins: number[];
3157
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3158
+ }, {
3159
+ pins: number[];
3160
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3161
+ }>>;
3162
+ topSide: z.ZodOptional<z.ZodObject<{
3163
+ pins: z.ZodArray<z.ZodNumber, "many">;
3164
+ direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
3165
+ }, "strip", z.ZodTypeAny, {
3166
+ pins: number[];
3167
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3168
+ }, {
3169
+ pins: number[];
3170
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3171
+ }>>;
3172
+ bottomSide: z.ZodOptional<z.ZodObject<{
3173
+ pins: z.ZodArray<z.ZodNumber, "many">;
3174
+ direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
3175
+ }, "strip", z.ZodTypeAny, {
3176
+ pins: number[];
3177
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3178
+ }, {
3179
+ pins: number[];
3180
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3181
+ }>>;
3182
+ }, "strip", z.ZodTypeAny, {
3183
+ leftSide?: {
3184
+ pins: number[];
3185
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3186
+ } | undefined;
3187
+ rightSide?: {
3188
+ pins: number[];
3189
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3190
+ } | undefined;
3191
+ topSide?: {
3192
+ pins: number[];
3193
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3194
+ } | undefined;
3195
+ bottomSide?: {
3196
+ pins: number[];
3197
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3198
+ } | undefined;
3199
+ }, {
3200
+ leftSide?: {
3201
+ pins: number[];
3202
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3203
+ } | undefined;
3204
+ rightSide?: {
3205
+ pins: number[];
3206
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3207
+ } | undefined;
3208
+ topSide?: {
3209
+ pins: number[];
3210
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3211
+ } | undefined;
3212
+ bottomSide?: {
3213
+ pins: number[];
3214
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3215
+ } | undefined;
3216
+ }>]>>;
3217
+ schPinSpacing: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodEnum<["2x", "3x", "4x"]>]>, z.ZodLiteral<"auto">]>>>;
3218
+ schWidth: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodEnum<["2x", "3x", "4x"]>]>, z.ZodLiteral<"auto">]>>>;
3219
+ }>, "strip", z.ZodTypeAny, {
3220
+ name: string;
3221
+ schPinSpacing: number | "2x" | "3x" | "4x" | "auto";
3222
+ schWidth: number | "2x" | "3x" | "4x" | "auto";
3223
+ pcbX?: number | undefined;
3224
+ pcbY?: number | undefined;
3225
+ pcbRotation?: number | undefined;
3226
+ layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
3227
+ schX?: number | undefined;
3228
+ schY?: number | undefined;
3229
+ schRotation?: number | undefined;
3230
+ footprint?: Footprint | undefined;
3231
+ supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
3232
+ cadModel?: {
3233
+ stlUrl: string;
3234
+ rotationOffset?: number | {
3235
+ x: string | number;
3236
+ y: string | number;
3237
+ z: string | number;
3238
+ } | undefined;
3239
+ positionOffset?: {
3240
+ x: string | number;
3241
+ y: string | number;
3242
+ z: string | number;
3243
+ } | undefined;
3244
+ size?: {
3245
+ x: string | number;
3246
+ y: string | number;
3247
+ z: string | number;
3248
+ } | undefined;
3249
+ } | {
3250
+ objUrl: string;
3251
+ rotationOffset?: number | {
3252
+ x: string | number;
3253
+ y: string | number;
3254
+ z: string | number;
3255
+ } | undefined;
3256
+ positionOffset?: {
3257
+ x: string | number;
3258
+ y: string | number;
3259
+ z: string | number;
3260
+ } | undefined;
3261
+ size?: {
3262
+ x: string | number;
3263
+ y: string | number;
3264
+ z: string | number;
3265
+ } | undefined;
3266
+ mtlUrl?: string | undefined;
3267
+ } | {
3268
+ rotationOffset?: number | {
3269
+ x: string | number;
3270
+ y: string | number;
3271
+ z: string | number;
3272
+ } | undefined;
3273
+ positionOffset?: {
3274
+ x: string | number;
3275
+ y: string | number;
3276
+ z: string | number;
3277
+ } | undefined;
3278
+ size?: {
3279
+ x: string | number;
3280
+ y: string | number;
3281
+ z: string | number;
3282
+ } | undefined;
3283
+ jscad?: any;
3284
+ } | undefined;
3285
+ children?: any;
3286
+ manufacturerPartNumber?: string | undefined;
3287
+ pinLabels?: Record<number, string> | undefined;
3288
+ schPortArrangement?: {
3289
+ leftSize?: number | undefined;
3290
+ topSize?: number | undefined;
3291
+ rightSize?: number | undefined;
3292
+ bottomSize?: number | undefined;
3293
+ } | {
3294
+ leftSide?: {
3295
+ pins: number[];
3296
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3297
+ } | undefined;
3298
+ rightSide?: {
3299
+ pins: number[];
3300
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3301
+ } | undefined;
3302
+ topSide?: {
3303
+ pins: number[];
3304
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3305
+ } | undefined;
3306
+ bottomSide?: {
3307
+ pins: number[];
3308
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3309
+ } | undefined;
3310
+ } | undefined;
3311
+ }, {
3312
+ name: string;
3313
+ pcbX?: string | number | undefined;
3314
+ pcbY?: string | number | undefined;
3315
+ pcbRotation?: string | number | undefined;
3316
+ layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
3317
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
3318
+ } | undefined;
3319
+ schX?: string | number | undefined;
3320
+ schY?: string | number | undefined;
3321
+ schRotation?: string | number | undefined;
3322
+ footprint?: Footprint | undefined;
3323
+ supplierPartNumbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
3324
+ cadModel?: {
3325
+ stlUrl: string;
3326
+ rotationOffset?: number | {
3327
+ x: string | number;
3328
+ y: string | number;
3329
+ z: string | number;
3330
+ } | undefined;
3331
+ positionOffset?: {
3332
+ x: string | number;
3333
+ y: string | number;
3334
+ z: string | number;
3335
+ } | undefined;
3336
+ size?: {
3337
+ x: string | number;
3338
+ y: string | number;
3339
+ z: string | number;
3340
+ } | undefined;
3341
+ } | {
3342
+ objUrl: string;
3343
+ rotationOffset?: number | {
3344
+ x: string | number;
3345
+ y: string | number;
3346
+ z: string | number;
3347
+ } | undefined;
3348
+ positionOffset?: {
3349
+ x: string | number;
3350
+ y: string | number;
3351
+ z: string | number;
3352
+ } | undefined;
3353
+ size?: {
3354
+ x: string | number;
3355
+ y: string | number;
3356
+ z: string | number;
3357
+ } | undefined;
3358
+ mtlUrl?: string | undefined;
3359
+ } | {
3360
+ rotationOffset?: number | {
3361
+ x: string | number;
3362
+ y: string | number;
3363
+ z: string | number;
3364
+ } | undefined;
3365
+ positionOffset?: {
3366
+ x: string | number;
3367
+ y: string | number;
3368
+ z: string | number;
3369
+ } | undefined;
3370
+ size?: {
3371
+ x: string | number;
3372
+ y: string | number;
3373
+ z: string | number;
3374
+ } | undefined;
3375
+ jscad?: any;
3376
+ } | undefined;
3377
+ children?: any;
3378
+ manufacturerPartNumber?: string | undefined;
3379
+ pinLabels?: Record<number, string> | undefined;
3380
+ schPortArrangement?: {
3381
+ leftSize?: number | undefined;
3382
+ topSize?: number | undefined;
3383
+ rightSize?: number | undefined;
3384
+ bottomSize?: number | undefined;
3385
+ } | {
3386
+ leftSide?: {
3387
+ pins: number[];
3388
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3389
+ } | undefined;
3390
+ rightSide?: {
3391
+ pins: number[];
3392
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3393
+ } | undefined;
3394
+ topSide?: {
3395
+ pins: number[];
3396
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3397
+ } | undefined;
3398
+ bottomSide?: {
3399
+ pins: number[];
3400
+ direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
3401
+ } | undefined;
3402
+ } | undefined;
3403
+ schPinSpacing?: string | number | undefined;
3404
+ schWidth?: string | number | undefined;
3405
+ }>;
3406
+ /**
3407
+ * @deprecated Use ChipProps instead.
3408
+ */
2869
3409
  declare const bugProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
2870
3410
  pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
2871
3411
  pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -3403,7 +3943,7 @@ declare const bugProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extend
3403
3943
  schPinSpacing?: string | number | undefined;
3404
3944
  schWidth?: string | number | undefined;
3405
3945
  }>;
3406
- type BugProps = z.input<typeof bugProps>;
3946
+ type ChipProps = z.input<typeof chipProps>;
3407
3947
  declare const viaProps: z.ZodObject<z.objectUtil.extendShape<{
3408
3948
  pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
3409
3949
  pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -5299,4 +5839,4 @@ declare const fabricationNotePathProps: z.ZodObject<z.objectUtil.extendShape<Omi
5299
5839
  }>;
5300
5840
  type FabricationNotePathProps = z.input<typeof fabricationNotePathProps>;
5301
5841
 
5302
- export { type BoardProps, type BugProps, type CapacitorProps, type CommonComponentProps, type CommonLayoutProps, type ComponentProps, type ConstrainedLayoutProps, type ConstraintProps, type DiodeProps, type FabricationNotePathProps, type FabricationNoteTextProps, type Footprint, type FootprintProps, type GroupProps, type HoleProps, type InductorProps, type LedProps, type NetAliasProps, type PcbTraceProps, type PlatedHoleProps, type PortProps, type PowerSourceProps, type ResistorProps, type SchematicBoxProps, type SchematicLineProps, type SchematicPathProps, type SchematicTextProps, type SilkscreenCircleProps, type SilkscreenLineProps, type SilkscreenPathProps, type SilkscreenRectProps, type SilkscreenTextProps, type SmtPadProps, type SupplierProps, type TraceHintProps, type TraceProps, type ViaProps, boardProps, bugProps, cadModelBase, cadModelJscad, cadModelObj, cadModelStl, capacitorPins, capacitorProps, commonComponentProps, commonLayoutProps, componentProps, constrainedLayoutProps, constraintProps, diodePins, diodeProps, direction, distanceOrMultiplier, explicitPinSideDefinition, fabricationNotePathProps, fabricationNoteTextProps, footprintProps, groupProps, holeProps, inductorPins, inductorProps, ledPins, ledProps, lrPins, lrPolarPins, netAliasProps, pcbLayoutProps, pcbTraceProps, platedHoleProps, portHints, portProps, powerSourceProps, relativeDirection, resistorPins, resistorProps, schematicBoxProps, schematicLineProps, schematicPathProps, schematicPortArrangement, schematicTextProps, silkscreenCircleProps, silkscreenLineProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, supplierProps, traceHintProps, traceProps, viaProps };
5842
+ export { type BoardProps, type CapacitorProps, type ChipProps, type CommonComponentProps, type CommonLayoutProps, type ComponentProps, type ConstrainedLayoutProps, type ConstraintProps, type DiodeProps, type FabricationNotePathProps, type FabricationNoteTextProps, type Footprint, type FootprintProps, type GroupProps, type HoleProps, type InductorProps, type LedProps, type NetAliasProps, type PcbTraceProps, type PlatedHoleProps, type PortProps, type PowerSourceProps, type ResistorProps, type SchematicBoxProps, type SchematicLineProps, type SchematicPathProps, type SchematicTextProps, type SilkscreenCircleProps, type SilkscreenLineProps, type SilkscreenPathProps, type SilkscreenRectProps, type SilkscreenTextProps, type SmtPadProps, type SupplierProps, type TraceHintProps, type TraceProps, type ViaProps, boardProps, bugProps, cadModelBase, cadModelJscad, cadModelObj, cadModelStl, capacitorPins, capacitorProps, chipProps, commonComponentProps, commonLayoutProps, componentProps, constrainedLayoutProps, constraintProps, diodePins, diodeProps, direction, distanceOrMultiplier, explicitPinSideDefinition, fabricationNotePathProps, fabricationNoteTextProps, footprintProps, groupProps, holeProps, inductorPins, inductorProps, ledPins, ledProps, lrPins, lrPolarPins, netAliasProps, pcbLayoutProps, pcbTraceProps, platedHoleProps, portHints, portProps, powerSourceProps, relativeDirection, resistorPins, resistorProps, schematicBoxProps, schematicLineProps, schematicPathProps, schematicPortArrangement, schematicTextProps, silkscreenCircleProps, silkscreenLineProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, supplierProps, traceHintProps, traceProps, viaProps };
package/dist/index.js CHANGED
@@ -28,6 +28,7 @@ __export(lib_exports, {
28
28
  cadModelStl: () => cadModelStl,
29
29
  capacitorPins: () => capacitorPins,
30
30
  capacitorProps: () => capacitorProps,
31
+ chipProps: () => chipProps,
31
32
  commonComponentProps: () => commonComponentProps,
32
33
  commonLayoutProps: () => commonLayoutProps,
33
34
  componentProps: () => componentProps,
@@ -193,13 +194,14 @@ var schematicPortArrangement = import_zod.z.object({
193
194
  bottomSide: explicitPinSideDefinition.optional()
194
195
  })
195
196
  );
196
- var bugProps = commonComponentProps.extend({
197
+ var chipProps = commonComponentProps.extend({
197
198
  manufacturerPartNumber: import_zod.z.string().optional(),
198
199
  pinLabels: import_zod.z.record(import_zod.z.number(), import_zod.z.string()).optional(),
199
200
  schPortArrangement: schematicPortArrangement.optional(),
200
201
  schPinSpacing: distanceOrMultiplier.or(import_zod.z.literal("auto")).optional().default("auto"),
201
202
  schWidth: distanceOrMultiplier.or(import_zod.z.literal("auto")).optional().default("auto")
202
203
  });
204
+ var bugProps = chipProps;
203
205
  var viaProps = commonLayoutProps.extend({
204
206
  fromLayer: import_soup.layer_ref,
205
207
  toLayer: import_soup.layer_ref,
@@ -371,6 +373,7 @@ var fabricationNotePathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcb
371
373
  cadModelStl,
372
374
  capacitorPins,
373
375
  capacitorProps,
376
+ chipProps,
374
377
  commonComponentProps,
375
378
  commonLayoutProps,
376
379
  componentProps,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/index.ts"],"sourcesContent":["import type { LayoutBuilder } from \"@tscircuit/layout\"\nimport {\n type AnySoupElementInput,\n capacitance,\n distance,\n inductance,\n layer_ref,\n length,\n point,\n resistance,\n rotation,\n route_hint_point,\n supplier_name,\n voltage,\n} from \"@tscircuit/soup\"\nimport type { ReactElement } from \"react\"\nimport { z } from \"zod\"\n\nexport const portHints = z.array(z.string().or(z.number()))\n\nexport const direction = z.enum([\"up\", \"down\", \"left\", \"right\"])\n\nexport const relativeDirection = z.enum([\n \"top-to-bottom\",\n \"left-to-right\",\n \"bottom-to-top\",\n \"right-to-left\",\n])\n\nexport const explicitPinSideDefinition = z.object({\n pins: z.array(z.number()),\n direction: z.union([\n z.literal(\"top-to-bottom\"),\n z.literal(\"left-to-right\"),\n z.literal(\"bottom-to-top\"),\n z.literal(\"right-to-left\"),\n ]),\n})\n\nexport type Footprint = string | ReactElement | AnySoupElementInput[]\nexport const pcbLayoutProps = z.object({\n pcbX: distance,\n pcbY: distance,\n pcbRotation: rotation.optional(),\n layer: layer_ref.optional(),\n})\nexport const commonLayoutProps = z.object({\n pcbX: distance.optional(),\n pcbY: distance.optional(),\n pcbRotation: rotation.optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n layer: layer_ref.optional(),\n\n // TODO pull in literals from @tscircuit/footprint\n // TODO footprint can be a string or react child\n footprint: z.custom<Footprint>((v) => true).optional(),\n})\nexport type CommonLayoutProps = z.input<typeof commonLayoutProps>\n\nexport const supplierProps = z.object({\n supplierPartNumbers: z.record(supplier_name, z.array(z.string())).optional(),\n})\nexport type SupplierProps = z.input<typeof supplierProps>\n\nconst point3 = z.object({\n x: z.union([z.number(), z.string()]),\n y: z.union([z.number(), z.string()]),\n z: z.union([z.number(), z.string()]),\n})\n\nexport const cadModelBase = z.object({\n rotationOffset: z.number().or(point3).optional(),\n positionOffset: point3.optional(),\n size: point3.optional(),\n})\n\nexport const cadModelStl = cadModelBase.extend({\n stlUrl: z.string(),\n})\n\nexport const cadModelObj = cadModelBase.extend({\n objUrl: z.string(),\n mtlUrl: z.string().optional(),\n})\n\nexport const cadModelJscad = cadModelBase.extend({\n jscad: z.any(),\n})\n\nexport const commonComponentProps = commonLayoutProps\n .merge(supplierProps)\n .extend({\n name: z.string(),\n cadModel: z.union([cadModelStl, cadModelObj, cadModelJscad]).optional(),\n children: z.any().optional(),\n })\nexport type CommonComponentProps = z.input<typeof commonComponentProps>\n\nexport const lrPins = [\"pin1\", \"left\", \"pin2\", \"right\"] as const\nexport const lrPolarPins = [\n \"pin1\",\n \"left\",\n \"anode\",\n \"pos\",\n \"pin2\",\n \"right\",\n \"cathode\",\n \"neg\",\n] as const\n\nexport const resistorProps = commonComponentProps.extend({\n resistance,\n})\nexport const resistorPins = lrPins\nexport type ResistorProps = z.input<typeof resistorProps>\n\nexport const capacitorProps = commonComponentProps.extend({\n capacitance,\n})\nexport const capacitorPins = lrPolarPins\nexport type CapacitorProps = z.input<typeof capacitorProps>\n\nexport const inductorProps = commonComponentProps.extend({\n inductance,\n})\nexport const inductorPins = lrPins\nexport type InductorProps = z.input<typeof inductorProps>\n\nexport const diodeProps = commonComponentProps.extend({})\nexport const diodePins = lrPolarPins\nexport type DiodeProps = z.input<typeof diodeProps>\n\nexport const ledProps = commonComponentProps.extend({\n color: z.string().optional(),\n})\nexport const ledPins = lrPolarPins\nexport type LedProps = z.input<typeof ledProps>\n\nexport const boardProps = z.object({\n width: distance,\n height: distance,\n pcbX: distance.optional().default(0),\n pcbY: distance.optional().default(0),\n layout: z.any().optional(),\n routingDisabled: z.boolean().optional(),\n children: z.any(),\n})\nexport type BoardProps = z.input<typeof boardProps>\n\nexport const distanceOrMultiplier = distance.or(z.enum([\"2x\", \"3x\", \"4x\"]))\n\nexport const schematicPortArrangement = z\n .object({\n leftSize: z.number().optional(),\n topSize: z.number().optional(),\n rightSize: z.number().optional(),\n bottomSize: z.number().optional(),\n })\n .or(\n z.object({\n leftSide: explicitPinSideDefinition.optional(),\n rightSide: explicitPinSideDefinition.optional(),\n topSide: explicitPinSideDefinition.optional(),\n bottomSide: explicitPinSideDefinition.optional(),\n }),\n )\n\nexport const bugProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z.record(z.number(), z.string()).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n schPinSpacing: distanceOrMultiplier\n .or(z.literal(\"auto\"))\n .optional()\n .default(\"auto\"),\n schWidth: distanceOrMultiplier\n .or(z.literal(\"auto\"))\n .optional()\n .default(\"auto\"),\n})\nexport type BugProps = z.input<typeof bugProps>\n\nexport const viaProps = commonLayoutProps.extend({\n fromLayer: layer_ref,\n toLayer: layer_ref,\n holeDiameter: distance,\n outerDiameter: distance,\n})\nexport type ViaProps = z.input<typeof viaProps>\n\nexport const netAliasProps = commonLayoutProps.extend({\n net: z.string().optional(),\n})\nexport type NetAliasProps = z.input<typeof netAliasProps>\n\nexport const traceProps = z\n .object({\n path: z.array(z.string()),\n thickness: distance.optional(),\n schematicRouteHints: z.array(point).optional(),\n pcbRouteHints: z.array(route_hint_point).optional(),\n })\n .or(\n z.object({\n from: z.string(),\n to: z.string(),\n thickness: distance.optional(),\n schematicRouteHints: z.array(point).optional(),\n pcbRouteHints: z.array(route_hint_point).optional(),\n }),\n )\nexport type TraceProps = z.input<typeof traceProps>\n\nexport const smtPadProps = z.union([\n pcbLayoutProps.omit({ pcbRotation: true }).extend({\n shape: z.literal(\"circle\"),\n radius: distance.optional(),\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true }).extend({\n shape: z.literal(\"rect\"),\n width: distance.optional(),\n height: distance.optional(),\n portHints: portHints.optional(),\n }),\n])\nexport type SmtPadProps = z.input<typeof smtPadProps>\n\nexport const platedHoleProps = z.union([\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n shape: z.literal(\"circle\"),\n holeDiameter: distance,\n outerDiameter: distance,\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n shape: z.literal(\"oval\"),\n outerWidth: distance,\n outerHeight: distance,\n innerWidth: distance,\n innerHeight: distance,\n portHints: portHints.optional(),\n }),\n])\nexport type PlatedHoleProps = z.input<typeof platedHoleProps>\n\nexport const holeProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({\n holeDiameter: distance,\n})\nexport type HoleProps = z.input<typeof holeProps>\n\nexport const schematicBoxProps = z.object({\n schX: distance,\n schY: distance,\n width: distance,\n height: distance,\n})\nexport type SchematicBoxProps = z.input<typeof schematicBoxProps>\n\nexport const schematicTextProps = z.object({\n schX: distance,\n schY: distance,\n text: z.string(),\n})\nexport type SchematicTextProps = z.input<typeof schematicTextProps>\n\nexport const schematicLineProps = z.object({\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n})\nexport type SchematicLineProps = z.input<typeof schematicLineProps>\n\nexport const schematicPathProps = z.object({\n points: z.array(point),\n isFilled: z.boolean().optional().default(false),\n fillColor: z.enum([\"red\", \"blue\"]).optional(),\n})\nexport type SchematicPathProps = z.input<typeof schematicPathProps>\n\nexport const constraintProps = z.union([\n z.object({\n type: z.literal(\"xdist\"),\n dist: distance,\n left: z.string(),\n right: z.string(),\n }),\n z.object({\n type: z.literal(\"ydist\"),\n dist: distance,\n top: z.string(),\n bottom: z.string(),\n }),\n])\nexport type ConstraintProps = z.input<typeof constraintProps>\n\nexport const constrainedLayoutProps = z.object({})\nexport type ConstrainedLayoutProps = z.input<typeof constrainedLayoutProps>\n\nexport const footprintProps = z.object({})\nexport type FootprintProps = z.input<typeof footprintProps>\n\nexport const componentProps = commonComponentProps\nexport type ComponentProps = z.input<typeof componentProps>\n\nexport const groupProps = commonLayoutProps.extend({\n name: z.string().optional(),\n layout: z.custom<LayoutBuilder>((v) => true).optional(),\n children: z.any().optional(),\n routingDisabled: z.boolean().optional(),\n})\nexport type GroupProps = z.input<typeof groupProps>\n\nexport const powerSourceProps = commonComponentProps.extend({\n voltage,\n})\nexport type PowerSourceProps = z.input<typeof powerSourceProps>\n\nexport const portProps = commonLayoutProps.extend({\n name: z.string(),\n pinNumber: z.number().optional(),\n aliases: z.array(z.string()).optional(),\n direction: direction,\n})\nexport type PortProps = z.input<typeof portProps>\n\nexport const silkscreenTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n})\nexport type SilkscreenTextProps = z.input<typeof silkscreenTextProps>\n\nexport const silkscreenPathProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n route: z.array(route_hint_point),\n strokeWidth: length.optional(),\n })\nexport type SilkscreenPathProps = z.input<typeof silkscreenPathProps>\n\nexport const silkscreenLineProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n strokeWidth: distance,\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n })\nexport type SilkscreenLineProps = z.input<typeof silkscreenLineProps>\n\nexport const silkscreenRectProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n isFilled: z.boolean().optional(),\n isOutline: z.boolean().optional(),\n strokeWidth: distance.optional(),\n width: distance,\n height: distance,\n })\nexport type SilkscreenRectProps = z.input<typeof silkscreenRectProps>\n\nexport const silkscreenCircleProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n isFilled: z.boolean().optional(),\n isOutline: z.boolean().optional(),\n strokeWidth: distance.optional(),\n radius: distance,\n })\nexport type SilkscreenCircleProps = z.input<typeof silkscreenCircleProps>\n\nexport const traceHintProps = z.object({\n for: z.string(),\n order: z.number().optional(),\n offset: route_hint_point.optional(),\n offsets: z.array(route_hint_point).optional(),\n traceWidth: z.number().optional(),\n})\n\nexport type TraceHintProps = z.input<typeof traceHintProps>\n\nexport const pcbTraceProps = z.object({\n layer: z.string().optional(),\n thickness: distance.optional(),\n route: z.array(route_hint_point),\n})\nexport type PcbTraceProps = z.input<typeof pcbTraceProps>\n\nexport const fabricationNoteTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n})\nexport type FabricationNoteTextProps = z.input<typeof fabricationNoteTextProps>\n\nexport const fabricationNotePathProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n route: z.array(route_hint_point),\n strokeWidth: length.optional(),\n })\nexport type FabricationNotePathProps = z.input<typeof fabricationNot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Y,aAAE,OAAO,EAAE,SAAS;AAClC,CAAC;AAIM,IAAM,gBAAgB,aAAE,OAAO;AAAA,EACpC,OAAO,aAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,WAAW,qBAAS,SAAS;AAAA,EAC7B,OAAO,aAAE,MAAM,4BAAgB;AACjC,CAAC;AAGM,IAAM,2BAA2B,eAAe,OAAO;AAAA,EAC5D,MAAM,aAAE,OAAO;AAAA,EACf,iBAAiB,aACd,KAAK,CAAC,UAAU,YAAY,aAAa,eAAe,cAAc,CAAC,EACvE,QAAQ,QAAQ;AAAA,EACnB,MAAM,aAAE,KAAK,CAAC,eAAe,CAAC,EAAE,SAAS;AAAA,EACzC,UAAU,mBAAO,SAAS;AAC5B,CAAC;AAGM,IAAM,2BAA2B,eACrC,KAAK,EAAE,MAAM,MAAM,MAAM,MAAM,aAAa,KAAK,CAAC,EAClD,OAAO;AAAA,EACN,OAAO,aAAE,MAAM,4BAAgB;AAAA,EAC/B,aAAa,mBAAO,SAAS;AAC/B,CAAC;","names":[]}
1
+ {"version":3,"sources":["../lib/index.ts"],"sourcesContent":["import type { LayoutBuilder } from \"@tscircuit/layout\"\nimport {\n type AnySoupElementInput,\n capacitance,\n distance,\n inductance,\n layer_ref,\n length,\n point,\n resistance,\n rotation,\n route_hint_point,\n supplier_name,\n voltage,\n} from \"@tscircuit/soup\"\nimport type { ReactElement } from \"react\"\nimport { z } from \"zod\"\n\nexport const portHints = z.array(z.string().or(z.number()))\n\nexport const direction = z.enum([\"up\", \"down\", \"left\", \"right\"])\n\nexport const relativeDirection = z.enum([\n \"top-to-bottom\",\n \"left-to-right\",\n \"bottom-to-top\",\n \"right-to-left\",\n])\n\nexport const explicitPinSideDefinition = z.object({\n pins: z.array(z.number()),\n direction: z.union([\n z.literal(\"top-to-bottom\"),\n z.literal(\"left-to-right\"),\n z.literal(\"bottom-to-top\"),\n z.literal(\"right-to-left\"),\n ]),\n})\n\nexport type Footprint = string | ReactElement | AnySoupElementInput[]\nexport const pcbLayoutProps = z.object({\n pcbX: distance,\n pcbY: distance,\n pcbRotation: rotation.optional(),\n layer: layer_ref.optional(),\n})\nexport const commonLayoutProps = z.object({\n pcbX: distance.optional(),\n pcbY: distance.optional(),\n pcbRotation: rotation.optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n layer: layer_ref.optional(),\n\n // TODO pull in literals from @tscircuit/footprint\n // TODO footprint can be a string or react child\n footprint: z.custom<Footprint>((v) => true).optional(),\n})\nexport type CommonLayoutProps = z.input<typeof commonLayoutProps>\n\nexport const supplierProps = z.object({\n supplierPartNumbers: z.record(supplier_name, z.array(z.string())).optional(),\n})\nexport type SupplierProps = z.input<typeof supplierProps>\n\nconst point3 = z.object({\n x: z.union([z.number(), z.string()]),\n y: z.union([z.number(), z.string()]),\n z: z.union([z.number(), z.string()]),\n})\n\nexport const cadModelBase = z.object({\n rotationOffset: z.number().or(point3).optional(),\n positionOffset: point3.optional(),\n size: point3.optional(),\n})\n\nexport const cadModelStl = cadModelBase.extend({\n stlUrl: z.string(),\n})\n\nexport const cadModelObj = cadModelBase.extend({\n objUrl: z.string(),\n mtlUrl: z.string().optional(),\n})\n\nexport const cadModelJscad = cadModelBase.extend({\n jscad: z.any(),\n})\n\nexport const commonComponentProps = commonLayoutProps\n .merge(supplierProps)\n .extend({\n name: z.string(),\n cadModel: z.union([cadModelStl, cadModelObj, cadModelJscad]).optional(),\n children: z.any().optional(),\n })\nexport type CommonComponentProps = z.input<typeof commonComponentProps>\n\nexport const lrPins = [\"pin1\", \"left\", \"pin2\", \"right\"] as const\nexport const lrPolarPins = [\n \"pin1\",\n \"left\",\n \"anode\",\n \"pos\",\n \"pin2\",\n \"right\",\n \"cathode\",\n \"neg\",\n] as const\n\nexport const resistorProps = commonComponentProps.extend({\n resistance,\n})\nexport const resistorPins = lrPins\nexport type ResistorProps = z.input<typeof resistorProps>\n\nexport const capacitorProps = commonComponentProps.extend({\n capacitance,\n})\nexport const capacitorPins = lrPolarPins\nexport type CapacitorProps = z.input<typeof capacitorProps>\n\nexport const inductorProps = commonComponentProps.extend({\n inductance,\n})\nexport const inductorPins = lrPins\nexport type InductorProps = z.input<typeof inductorProps>\n\nexport const diodeProps = commonComponentProps.extend({})\nexport const diodePins = lrPolarPins\nexport type DiodeProps = z.input<typeof diodeProps>\n\nexport const ledProps = commonComponentProps.extend({\n color: z.string().optional(),\n})\nexport const ledPins = lrPolarPins\nexport type LedProps = z.input<typeof ledProps>\n\nexport const boardProps = z.object({\n width: distance,\n height: distance,\n pcbX: distance.optional().default(0),\n pcbY: distance.optional().default(0),\n layout: z.any().optional(),\n routingDisabled: z.boolean().optional(),\n children: z.any(),\n})\nexport type BoardProps = z.input<typeof boardProps>\n\nexport const distanceOrMultiplier = distance.or(z.enum([\"2x\", \"3x\", \"4x\"]))\n\nexport const schematicPortArrangement = z\n .object({\n leftSize: z.number().optional(),\n topSize: z.number().optional(),\n rightSize: z.number().optional(),\n bottomSize: z.number().optional(),\n })\n .or(\n z.object({\n leftSide: explicitPinSideDefinition.optional(),\n rightSide: explicitPinSideDefinition.optional(),\n topSide: explicitPinSideDefinition.optional(),\n bottomSide: explicitPinSideDefinition.optional(),\n }),\n )\n\nexport const chipProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z.record(z.number(), z.string()).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n schPinSpacing: distanceOrMultiplier\n .or(z.literal(\"auto\"))\n .optional()\n .default(\"auto\"),\n schWidth: distanceOrMultiplier\n .or(z.literal(\"auto\"))\n .optional()\n .default(\"auto\"),\n})\n/**\n * @deprecated Use ChipProps instead. \n */\nexport const bugProps = chipProps\nexport type ChipProps = z.input<typeof chipProps>\n\nexport const viaProps = commonLayoutProps.extend({\n fromLayer: layer_ref,\n toLayer: layer_ref,\n holeDiameter: distance,\n outerDiameter: distance,\n})\nexport type ViaProps = z.input<typeof viaProps>\n\nexport const netAliasProps = commonLayoutProps.extend({\n net: z.string().optional(),\n})\nexport type NetAliasProps = z.input<typeof netAliasProps>\n\nexport const traceProps = z\n .object({\n path: z.array(z.string()),\n thickness: distance.optional(),\n schematicRouteHints: z.array(point).optional(),\n pcbRouteHints: z.array(route_hint_point).optional(),\n })\n .or(\n z.object({\n from: z.string(),\n to: z.string(),\n thickness: distance.optional(),\n schematicRouteHints: z.array(point).optional(),\n pcbRouteHints: z.array(route_hint_point).optional(),\n }),\n )\nexport type TraceProps = z.input<typeof traceProps>\n\nexport const smtPadProps = z.union([\n pcbLayoutProps.omit({ pcbRotation: true }).extend({\n shape: z.literal(\"circle\"),\n radius: distance.optional(),\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true }).extend({\n shape: z.literal(\"rect\"),\n width: distance.optional(),\n height: distance.optional(),\n portHints: portHints.optional(),\n }),\n])\nexport type SmtPadProps = z.input<typeof smtPadProps>\n\nexport const platedHoleProps = z.union([\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n shape: z.literal(\"circle\"),\n holeDiameter: distance,\n outerDiameter: distance,\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n shape: z.literal(\"oval\"),\n outerWidth: distance,\n outerHeight: distance,\n innerWidth: distance,\n innerHeight: distance,\n portHints: portHints.optional(),\n }),\n])\nexport type PlatedHoleProps = z.input<typeof platedHoleProps>\n\nexport const holeProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({\n holeDiameter: distance,\n})\nexport type HoleProps = z.input<typeof holeProps>\n\nexport const schematicBoxProps = z.object({\n schX: distance,\n schY: distance,\n width: distance,\n height: distance,\n})\nexport type SchematicBoxProps = z.input<typeof schematicBoxProps>\n\nexport const schematicTextProps = z.object({\n schX: distance,\n schY: distance,\n text: z.string(),\n})\nexport type SchematicTextProps = z.input<typeof schematicTextProps>\n\nexport const schematicLineProps = z.object({\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n})\nexport type SchematicLineProps = z.input<typeof schematicLineProps>\n\nexport const schematicPathProps = z.object({\n points: z.array(point),\n isFilled: z.boolean().optional().default(false),\n fillColor: z.enum([\"red\", \"blue\"]).optional(),\n})\nexport type SchematicPathProps = z.input<typeof schematicPathProps>\n\nexport const constraintProps = z.union([\n z.object({\n type: z.literal(\"xdist\"),\n dist: distance,\n left: z.string(),\n right: z.string(),\n }),\n z.object({\n type: z.literal(\"ydist\"),\n dist: distance,\n top: z.string(),\n bottom: z.string(),\n }),\n])\nexport type ConstraintProps = z.input<typeof constraintProps>\n\nexport const constrainedLayoutProps = z.object({})\nexport type ConstrainedLayoutProps = z.input<typeof constrainedLayoutProps>\n\nexport const footprintProps = z.object({})\nexport type FootprintProps = z.input<typeof footprintProps>\n\nexport const componentProps = commonComponentProps\nexport type ComponentProps = z.input<typeof componentProps>\n\nexport const groupProps = commonLayoutProps.extend({\n name: z.string().optional(),\n layout: z.custom<LayoutBuilder>((v) => true).optional(),\n children: z.any().optional(),\n routingDisabled: z.boolean().optional(),\n})\nexport type GroupProps = z.input<typeof groupProps>\n\nexport const powerSourceProps = commonComponentProps.extend({\n voltage,\n})\nexport type PowerSourceProps = z.input<typeof powerSourceProps>\n\nexport const portProps = commonLayoutProps.extend({\n name: z.string(),\n pinNumber: z.number().optional(),\n aliases: z.array(z.string()).optional(),\n direction: direction,\n})\nexport type PortProps = z.input<typeof portProps>\n\nexport const silkscreenTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n})\nexport type SilkscreenTextProps = z.input<typeof silkscreenTextProps>\n\nexport const silkscreenPathProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n route: z.array(route_hint_point),\n strokeWidth: length.optional(),\n })\nexport type SilkscreenPathProps = z.input<typeof silkscreenPathProps>\n\nexport const silkscreenLineProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n strokeWidth: distance,\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n })\nexport type SilkscreenLineProps = z.input<typeof silkscreenLineProps>\n\nexport const silkscreenRectProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n isFilled: z.boolean().optional(),\n isOutline: z.boolean().optional(),\n strokeWidth: distance.optional(),\n width: distance,\n height: distance,\n })\nexport type SilkscreenRectProps = z.input<typeof silkscreenRectProps>\n\nexport const silkscreenCircleProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n isFilled: z.boolean().optional(),\n isOutline: z.boolean().optional(),\n strokeWidth: distance.optional(),\n radius: distance,\n })\nexport type SilkscreenCircleProps = z.input<typeof silkscreenCircleProps>\n\nexport const traceHintProps = z.object({\n for: z.string(),\n order: z.number().optional(),\n offset: route_hint_point.optional(),\n offsets: z.array(route_hint_point).optional(),\n traceWidth: z.number().optional(),\n})\n\nexport type TraceHintProps = z.input<typeof traceHintProps>\n\nexport const pcbTraceProps = z.object({\n layer: z.string().optional(),\n thickness: distance.optional(),\n route: z.array(route_hint_point),\n})\nexport type PcbTraceProps = z.input<typeof pcbTraceProps>\n\nexport const fabricationNoteTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n})\nexport type FabricationNoteTextProps = z.input<typeof fabricationNoteTextProps>\n\nexport const fabricationNotePathProps = pcbLayoutProps\n .omit({ pcbX: true, pcbY: true, pcbRotation: true })\n .extend({\n route: z.array(route_hint_point),\n strokeWidth: length.optional(),\n })\nexport type FabricationNotePathProps = z.input<typeof fabricationNotePathProps>"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AAO;AAAA,EACpC,OAAO,aAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,WAAW,qBAAS,SAAS;AAAA,EAC7B,OAAO,aAAE,MAAM,4BAAgB;AACjC,CAAC;AAGM,IAAM,2BAA2B,eAAe,OAAO;AAAA,EAC5D,MAAM,aAAE,OAAO;AAAA,EACf,iBAAiB,aACd,KAAK,CAAC,UAAU,YAAY,aAAa,eAAe,cAAc,CAAC,EACvE,QAAQ,QAAQ;AAAA,EACnB,MAAM,aAAE,KAAK,CAAC,eAAe,CAAC,EAAE,SAAS;AAAA,EACzC,UAAU,mBAAO,SAAS;AAC5B,CAAC;AAGM,IAAM,2BAA2B,eACrC,KAAK,EAAE,MAAM,MAAM,MAAM,MAAM,aAAa,KAAK,CAAC,EAClD,OAAO;AAAA,EACN,OAAO,aAAE,MAAM,4BAAgB;AAAA,EAC/B,aAAa,mBAAO,SAAS;AAC/B,CAAC;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {