@tscircuit/props 0.0.56 → 0.0.57
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 +172 -82
- package/dist/index.js +80 -70
- package/dist/index.js.map +1 -1
- package/lib/common/layout.ts +15 -6
- package/lib/components/smtpad.ts +54 -0
- package/lib/index.ts +1 -15
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -59,6 +59,22 @@ type FootprintSoupElements = {
|
|
|
59
59
|
type Footprint = string | ReactElement | FootprintSoupElements[];
|
|
60
60
|
declare const footprintProp: z.ZodType<Footprint, z.ZodTypeDef, Footprint>;
|
|
61
61
|
|
|
62
|
+
interface PcbLayoutProps {
|
|
63
|
+
pcbX: string | number;
|
|
64
|
+
pcbY: string | number;
|
|
65
|
+
pcbRotation?: string | number;
|
|
66
|
+
layer?: LayerRefInput;
|
|
67
|
+
}
|
|
68
|
+
interface CommonLayoutProps {
|
|
69
|
+
pcbX?: string | number;
|
|
70
|
+
pcbY?: string | number;
|
|
71
|
+
pcbRotation?: string | number;
|
|
72
|
+
schX?: string | number;
|
|
73
|
+
schY?: string | number;
|
|
74
|
+
schRotation?: string | number;
|
|
75
|
+
layer?: LayerRefInput;
|
|
76
|
+
footprint?: Footprint;
|
|
77
|
+
}
|
|
62
78
|
declare const pcbLayoutProps: z.ZodObject<{
|
|
63
79
|
pcbX: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
64
80
|
pcbY: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
@@ -85,16 +101,6 @@ declare const pcbLayoutProps: z.ZodObject<{
|
|
|
85
101
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
86
102
|
} | undefined;
|
|
87
103
|
}>;
|
|
88
|
-
interface CommonLayoutProps {
|
|
89
|
-
pcbX?: string | number;
|
|
90
|
-
pcbY?: string | number;
|
|
91
|
-
pcbRotation?: string | number;
|
|
92
|
-
schX?: string | number;
|
|
93
|
-
schY?: string | number;
|
|
94
|
-
schRotation?: string | number;
|
|
95
|
-
layer?: LayerRefInput;
|
|
96
|
-
footprint?: Footprint;
|
|
97
|
-
}
|
|
98
104
|
declare const commonLayoutProps: z.ZodObject<{
|
|
99
105
|
pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
100
106
|
pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -3762,6 +3768,161 @@ declare const constraintProps: z.ZodUnion<[z.ZodObject<{
|
|
|
3762
3768
|
toBottomCenter?: true | undefined;
|
|
3763
3769
|
}>]>;
|
|
3764
3770
|
|
|
3771
|
+
interface RectSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
3772
|
+
shape: "rect";
|
|
3773
|
+
width: Distance;
|
|
3774
|
+
height: Distance;
|
|
3775
|
+
portHints?: PortHints;
|
|
3776
|
+
}
|
|
3777
|
+
interface CircleSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
3778
|
+
shape: "circle";
|
|
3779
|
+
radius: Distance;
|
|
3780
|
+
portHints?: PortHints;
|
|
3781
|
+
}
|
|
3782
|
+
type SmtPadProps = RectSmtPadProps | CircleSmtPadProps;
|
|
3783
|
+
declare const rectSmtPadProps: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
3784
|
+
pcbX: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
3785
|
+
pcbY: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
3786
|
+
pcbRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
3787
|
+
layer: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
|
|
3788
|
+
name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
3789
|
+
}, "strip", z.ZodTypeAny, {
|
|
3790
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3791
|
+
}, {
|
|
3792
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3793
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
3794
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3795
|
+
}>>;
|
|
3796
|
+
}, "pcbRotation">, {
|
|
3797
|
+
shape: z.ZodLiteral<"rect">;
|
|
3798
|
+
width: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
3799
|
+
height: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
3800
|
+
portHints: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
|
|
3801
|
+
}>, "strip", z.ZodTypeAny, {
|
|
3802
|
+
pcbX: number;
|
|
3803
|
+
pcbY: number;
|
|
3804
|
+
shape: "rect";
|
|
3805
|
+
width: number;
|
|
3806
|
+
height: number;
|
|
3807
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
3808
|
+
portHints?: (string | number)[] | undefined;
|
|
3809
|
+
}, {
|
|
3810
|
+
pcbX: string | number;
|
|
3811
|
+
pcbY: string | number;
|
|
3812
|
+
shape: "rect";
|
|
3813
|
+
width: string | number;
|
|
3814
|
+
height: string | number;
|
|
3815
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
3816
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3817
|
+
} | undefined;
|
|
3818
|
+
portHints?: (string | number)[] | undefined;
|
|
3819
|
+
}>;
|
|
3820
|
+
declare const circleSmtPadProps: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
3821
|
+
pcbX: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
3822
|
+
pcbY: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
3823
|
+
pcbRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
3824
|
+
layer: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
|
|
3825
|
+
name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
3826
|
+
}, "strip", z.ZodTypeAny, {
|
|
3827
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3828
|
+
}, {
|
|
3829
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3830
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
3831
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3832
|
+
}>>;
|
|
3833
|
+
}, "pcbRotation">, {
|
|
3834
|
+
shape: z.ZodLiteral<"circle">;
|
|
3835
|
+
radius: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
3836
|
+
portHints: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
|
|
3837
|
+
}>, "strip", z.ZodTypeAny, {
|
|
3838
|
+
pcbX: number;
|
|
3839
|
+
pcbY: number;
|
|
3840
|
+
shape: "circle";
|
|
3841
|
+
radius: number;
|
|
3842
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
3843
|
+
portHints?: (string | number)[] | undefined;
|
|
3844
|
+
}, {
|
|
3845
|
+
pcbX: string | number;
|
|
3846
|
+
pcbY: string | number;
|
|
3847
|
+
shape: "circle";
|
|
3848
|
+
radius: string | number;
|
|
3849
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
3850
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3851
|
+
} | undefined;
|
|
3852
|
+
portHints?: (string | number)[] | undefined;
|
|
3853
|
+
}>;
|
|
3854
|
+
declare const smtPadProps: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
3855
|
+
pcbX: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
3856
|
+
pcbY: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
3857
|
+
pcbRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
3858
|
+
layer: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
|
|
3859
|
+
name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
3860
|
+
}, "strip", z.ZodTypeAny, {
|
|
3861
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3862
|
+
}, {
|
|
3863
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3864
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
3865
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3866
|
+
}>>;
|
|
3867
|
+
}, "pcbRotation">, {
|
|
3868
|
+
shape: z.ZodLiteral<"circle">;
|
|
3869
|
+
radius: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
3870
|
+
portHints: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
|
|
3871
|
+
}>, "strip", z.ZodTypeAny, {
|
|
3872
|
+
pcbX: number;
|
|
3873
|
+
pcbY: number;
|
|
3874
|
+
shape: "circle";
|
|
3875
|
+
radius: number;
|
|
3876
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
3877
|
+
portHints?: (string | number)[] | undefined;
|
|
3878
|
+
}, {
|
|
3879
|
+
pcbX: string | number;
|
|
3880
|
+
pcbY: string | number;
|
|
3881
|
+
shape: "circle";
|
|
3882
|
+
radius: string | number;
|
|
3883
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
3884
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3885
|
+
} | undefined;
|
|
3886
|
+
portHints?: (string | number)[] | undefined;
|
|
3887
|
+
}>, z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
3888
|
+
pcbX: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
3889
|
+
pcbY: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
3890
|
+
pcbRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
3891
|
+
layer: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
|
|
3892
|
+
name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
3893
|
+
}, "strip", z.ZodTypeAny, {
|
|
3894
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3895
|
+
}, {
|
|
3896
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3897
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
3898
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3899
|
+
}>>;
|
|
3900
|
+
}, "pcbRotation">, {
|
|
3901
|
+
shape: z.ZodLiteral<"rect">;
|
|
3902
|
+
width: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
3903
|
+
height: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
3904
|
+
portHints: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
|
|
3905
|
+
}>, "strip", z.ZodTypeAny, {
|
|
3906
|
+
pcbX: number;
|
|
3907
|
+
pcbY: number;
|
|
3908
|
+
shape: "rect";
|
|
3909
|
+
width: number;
|
|
3910
|
+
height: number;
|
|
3911
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
3912
|
+
portHints?: (string | number)[] | undefined;
|
|
3913
|
+
}, {
|
|
3914
|
+
pcbX: string | number;
|
|
3915
|
+
pcbY: string | number;
|
|
3916
|
+
shape: "rect";
|
|
3917
|
+
width: string | number;
|
|
3918
|
+
height: string | number;
|
|
3919
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
3920
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3921
|
+
} | undefined;
|
|
3922
|
+
portHints?: (string | number)[] | undefined;
|
|
3923
|
+
}>]>;
|
|
3924
|
+
type InferredSmtPadProps = z.input<typeof smtPadProps>;
|
|
3925
|
+
|
|
3765
3926
|
declare const inductorProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
3766
3927
|
pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
3767
3928
|
pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -5641,77 +5802,6 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
5641
5802
|
}[] | undefined;
|
|
5642
5803
|
}>]>;
|
|
5643
5804
|
type TraceProps = z.input<typeof traceProps>;
|
|
5644
|
-
declare const smtPadProps: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
5645
|
-
pcbX: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
5646
|
-
pcbY: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
5647
|
-
pcbRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
5648
|
-
layer: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
|
|
5649
|
-
name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
5650
|
-
}, "strip", z.ZodTypeAny, {
|
|
5651
|
-
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5652
|
-
}, {
|
|
5653
|
-
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5654
|
-
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
5655
|
-
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5656
|
-
}>>;
|
|
5657
|
-
}, "pcbRotation">, {
|
|
5658
|
-
shape: z.ZodLiteral<"circle">;
|
|
5659
|
-
radius: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
5660
|
-
portHints: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
|
|
5661
|
-
}>, "strip", z.ZodTypeAny, {
|
|
5662
|
-
pcbX: number;
|
|
5663
|
-
pcbY: number;
|
|
5664
|
-
shape: "circle";
|
|
5665
|
-
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
5666
|
-
radius?: number | undefined;
|
|
5667
|
-
portHints?: (string | number)[] | undefined;
|
|
5668
|
-
}, {
|
|
5669
|
-
pcbX: string | number;
|
|
5670
|
-
pcbY: string | number;
|
|
5671
|
-
shape: "circle";
|
|
5672
|
-
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
5673
|
-
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5674
|
-
} | undefined;
|
|
5675
|
-
radius?: string | number | undefined;
|
|
5676
|
-
portHints?: (string | number)[] | undefined;
|
|
5677
|
-
}>, z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
5678
|
-
pcbX: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
5679
|
-
pcbY: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
5680
|
-
pcbRotation: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
5681
|
-
layer: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
|
|
5682
|
-
name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
5683
|
-
}, "strip", z.ZodTypeAny, {
|
|
5684
|
-
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5685
|
-
}, {
|
|
5686
|
-
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5687
|
-
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
5688
|
-
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5689
|
-
}>>;
|
|
5690
|
-
}, "pcbRotation">, {
|
|
5691
|
-
shape: z.ZodLiteral<"rect">;
|
|
5692
|
-
width: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
5693
|
-
height: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
5694
|
-
portHints: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
|
|
5695
|
-
}>, "strip", z.ZodTypeAny, {
|
|
5696
|
-
pcbX: number;
|
|
5697
|
-
pcbY: number;
|
|
5698
|
-
shape: "rect";
|
|
5699
|
-
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
5700
|
-
portHints?: (string | number)[] | undefined;
|
|
5701
|
-
width?: number | undefined;
|
|
5702
|
-
height?: number | undefined;
|
|
5703
|
-
}, {
|
|
5704
|
-
pcbX: string | number;
|
|
5705
|
-
pcbY: string | number;
|
|
5706
|
-
shape: "rect";
|
|
5707
|
-
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
5708
|
-
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
5709
|
-
} | undefined;
|
|
5710
|
-
portHints?: (string | number)[] | undefined;
|
|
5711
|
-
width?: string | number | undefined;
|
|
5712
|
-
height?: string | number | undefined;
|
|
5713
|
-
}>]>;
|
|
5714
|
-
type SmtPadProps = z.input<typeof smtPadProps>;
|
|
5715
5805
|
declare const platedHoleProps: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
5716
5806
|
pcbX: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
5717
5807
|
pcbY: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
@@ -7394,4 +7484,4 @@ declare const fabricationNotePathProps: z.ZodObject<z.objectUtil.extendShape<Omi
|
|
|
7394
7484
|
}>;
|
|
7395
7485
|
type FabricationNotePathProps = z.input<typeof fabricationNotePathProps>;
|
|
7396
7486
|
|
|
7397
|
-
export { type BaseGroupProps, type BoardProps, type CapacitorProps, type ChipProps, type CommonComponentProps, type CommonLayoutProps, type ComponentProps, type ConstrainedLayoutProps, type ConstraintProps, type DiodeProps, type Direction, type DirectionAlongEdge, type FabricationNotePathProps, type FabricationNoteTextProps, type Footprint, type FootprintProps, type FootprintSoupElements, type GroupProps, type HoleProps, type InductorProps, type InferredChipProps, type InferredConstrainedLayoutProps, type JumperProps, type LedProps, type NetAliasProps, type NetProps, type PcbKeepoutProps, type PcbTraceProps, type PcbXDistConstraint, type PcbYDistConstraint, type PinSideDefinition, type PlatedHoleProps, type PortHints, type PortProps, type PowerSourceProps, type ResistorProps, type SchematicBoxProps, type SchematicLineProps, type SchematicPathProps, type SchematicPortArrangement, type SchematicPortArrangementWithPinCounts, type SchematicPortArrangementWithSides, type SchematicPortArrangementWithSizes, type SchematicTextProps, type SilkscreenCircleProps, type SilkscreenLineProps, type SilkscreenPathProps, type SilkscreenRectProps, type SilkscreenTextProps, type SmtPadProps, type SubcircuitGroupProps, type SupplierName, type SupplierProps, type SwitchProps, type TraceHintProps, type TraceProps, type ViaProps, baseGroupProps, boardProps, bugProps, capacitorPins, capacitorProps, chipProps, commonComponentProps, commonLayoutProps, componentProps, constrainedLayoutProps, constraintProps, diodePins, diodeProps, direction, directionAlongEdge, distanceOrMultiplier, explicitPinSideDefinition, fabricationNotePathProps, fabricationNoteTextProps, footprintProp, footprintProps, groupProps, holeProps, inductorPins, inductorProps, jumperProps, ledPins, ledProps, lrPins, lrPolarPins, netAliasProps, netProps, pcbKeepoutProps, pcbLayoutProps, pcbTraceProps, platedHoleProps, point3, portHints, portProps, portRef, powerSourceProps, resistorPins, resistorProps, routeHintPointProps, schematicBoxProps, schematicLineProps, schematicPathProps, schematicPortArrangement, schematicTextProps, silkscreenCircleProps, silkscreenLineProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, subcircuitGroupProps, supplierProps, switchProps, traceHintProps, traceProps, viaProps };
|
|
7487
|
+
export { type BaseGroupProps, type BoardProps, type CapacitorProps, type ChipProps, type CircleSmtPadProps, type CommonComponentProps, type CommonLayoutProps, type ComponentProps, type ConstrainedLayoutProps, type ConstraintProps, type DiodeProps, type Direction, type DirectionAlongEdge, type FabricationNotePathProps, type FabricationNoteTextProps, type Footprint, type FootprintProps, type FootprintSoupElements, type GroupProps, type HoleProps, type InductorProps, type InferredChipProps, type InferredConstrainedLayoutProps, type InferredSmtPadProps, type JumperProps, type LedProps, type NetAliasProps, type NetProps, type PcbKeepoutProps, type PcbLayoutProps, type PcbTraceProps, type PcbXDistConstraint, type PcbYDistConstraint, type PinSideDefinition, type PlatedHoleProps, type PortHints, type PortProps, type PowerSourceProps, type RectSmtPadProps, type ResistorProps, type SchematicBoxProps, type SchematicLineProps, type SchematicPathProps, type SchematicPortArrangement, type SchematicPortArrangementWithPinCounts, type SchematicPortArrangementWithSides, type SchematicPortArrangementWithSizes, type SchematicTextProps, type SilkscreenCircleProps, type SilkscreenLineProps, type SilkscreenPathProps, type SilkscreenRectProps, type SilkscreenTextProps, type SmtPadProps, type SubcircuitGroupProps, type SupplierName, type SupplierProps, type SwitchProps, type TraceHintProps, type TraceProps, type ViaProps, baseGroupProps, boardProps, bugProps, capacitorPins, capacitorProps, chipProps, circleSmtPadProps, commonComponentProps, commonLayoutProps, componentProps, constrainedLayoutProps, constraintProps, diodePins, diodeProps, direction, directionAlongEdge, distanceOrMultiplier, explicitPinSideDefinition, fabricationNotePathProps, fabricationNoteTextProps, footprintProp, footprintProps, groupProps, holeProps, inductorPins, inductorProps, jumperProps, ledPins, ledProps, lrPins, lrPolarPins, netAliasProps, netProps, pcbKeepoutProps, pcbLayoutProps, pcbTraceProps, platedHoleProps, point3, portHints, portProps, portRef, powerSourceProps, rectSmtPadProps, resistorPins, resistorProps, routeHintPointProps, schematicBoxProps, schematicLineProps, schematicPathProps, schematicPortArrangement, schematicTextProps, silkscreenCircleProps, silkscreenLineProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, subcircuitGroupProps, supplierProps, switchProps, traceHintProps, traceProps, viaProps };
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,7 @@ __export(lib_exports, {
|
|
|
26
26
|
capacitorPins: () => capacitorPins,
|
|
27
27
|
capacitorProps: () => capacitorProps,
|
|
28
28
|
chipProps: () => chipProps,
|
|
29
|
+
circleSmtPadProps: () => circleSmtPadProps,
|
|
29
30
|
commonComponentProps: () => commonComponentProps,
|
|
30
31
|
commonLayoutProps: () => commonLayoutProps,
|
|
31
32
|
componentProps: () => componentProps,
|
|
@@ -61,6 +62,7 @@ __export(lib_exports, {
|
|
|
61
62
|
portProps: () => portProps,
|
|
62
63
|
portRef: () => portRef,
|
|
63
64
|
powerSourceProps: () => powerSourceProps,
|
|
65
|
+
rectSmtPadProps: () => rectSmtPadProps,
|
|
64
66
|
resistorPins: () => resistorPins,
|
|
65
67
|
resistorProps: () => resistorProps,
|
|
66
68
|
routeHintPointProps: () => routeHintPointProps,
|
|
@@ -84,7 +86,7 @@ __export(lib_exports, {
|
|
|
84
86
|
});
|
|
85
87
|
module.exports = __toCommonJS(lib_exports);
|
|
86
88
|
var import_soup11 = require("@tscircuit/soup");
|
|
87
|
-
var
|
|
89
|
+
var import_zod21 = require("zod");
|
|
88
90
|
|
|
89
91
|
// lib/typecheck.ts
|
|
90
92
|
var expectTypesMatch = (shouldBe) => {
|
|
@@ -162,6 +164,7 @@ var pcbLayoutProps = import_zod6.z.object({
|
|
|
162
164
|
pcbRotation: import_soup2.rotation.optional(),
|
|
163
165
|
layer: import_soup2.layer_ref.optional()
|
|
164
166
|
});
|
|
167
|
+
expectTypesMatch(true);
|
|
165
168
|
var commonLayoutProps = import_zod6.z.object({
|
|
166
169
|
pcbX: import_soup2.distance.optional(),
|
|
167
170
|
pcbY: import_soup2.distance.optional(),
|
|
@@ -394,6 +397,24 @@ var constraintProps = import_zod19.z.union([
|
|
|
394
397
|
]);
|
|
395
398
|
expectTypesMatch(true);
|
|
396
399
|
|
|
400
|
+
// lib/components/smtpad.ts
|
|
401
|
+
var import_zod20 = require("zod");
|
|
402
|
+
var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
403
|
+
shape: import_zod20.z.literal("rect"),
|
|
404
|
+
width: import_soup10.distance,
|
|
405
|
+
height: import_soup10.distance,
|
|
406
|
+
portHints: portHints.optional()
|
|
407
|
+
});
|
|
408
|
+
expectTypesMatch(true);
|
|
409
|
+
var circleSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
410
|
+
shape: import_zod20.z.literal("circle"),
|
|
411
|
+
radius: import_soup10.distance,
|
|
412
|
+
portHints: portHints.optional()
|
|
413
|
+
});
|
|
414
|
+
expectTypesMatch(true);
|
|
415
|
+
var smtPadProps = import_zod20.z.union([circleSmtPadProps, rectSmtPadProps]);
|
|
416
|
+
expectTypesMatch(true);
|
|
417
|
+
|
|
397
418
|
// lib/index.ts
|
|
398
419
|
var inductorProps = commonComponentProps.extend({
|
|
399
420
|
inductance: import_soup11.inductance
|
|
@@ -402,15 +423,15 @@ var inductorPins = lrPins;
|
|
|
402
423
|
var diodeProps = commonComponentProps.extend({});
|
|
403
424
|
var diodePins = lrPolarPins;
|
|
404
425
|
var ledProps = commonComponentProps.extend({
|
|
405
|
-
color:
|
|
426
|
+
color: import_zod21.z.string().optional()
|
|
406
427
|
});
|
|
407
428
|
var ledPins = lrPolarPins;
|
|
408
429
|
var switchProps = commonComponentProps.extend({
|
|
409
|
-
ftype:
|
|
410
|
-
switchType:
|
|
411
|
-
isNormallyClosed:
|
|
430
|
+
ftype: import_zod21.z.literal("switch"),
|
|
431
|
+
switchType: import_zod21.z.enum(["spst"]).default("spst"),
|
|
432
|
+
isNormallyClosed: import_zod21.z.boolean().default(false)
|
|
412
433
|
});
|
|
413
|
-
var distanceOrMultiplier2 = import_soup11.distance.or(
|
|
434
|
+
var distanceOrMultiplier2 = import_soup11.distance.or(import_zod21.z.enum(["2x", "3x", "4x"]));
|
|
414
435
|
var viaProps = commonLayoutProps.extend({
|
|
415
436
|
fromLayer: import_soup11.layer_ref,
|
|
416
437
|
toLayer: import_soup11.layer_ref,
|
|
@@ -418,50 +439,37 @@ var viaProps = commonLayoutProps.extend({
|
|
|
418
439
|
outerDiameter: import_soup11.distance
|
|
419
440
|
});
|
|
420
441
|
var netAliasProps = commonLayoutProps.extend({
|
|
421
|
-
net:
|
|
442
|
+
net: import_zod21.z.string().optional()
|
|
422
443
|
});
|
|
423
|
-
var portRef =
|
|
424
|
-
|
|
425
|
-
|
|
444
|
+
var portRef = import_zod21.z.union([
|
|
445
|
+
import_zod21.z.string(),
|
|
446
|
+
import_zod21.z.custom(
|
|
426
447
|
(v) => Boolean(v.getPortSelector)
|
|
427
448
|
)
|
|
428
449
|
]);
|
|
429
|
-
var traceProps =
|
|
430
|
-
path:
|
|
450
|
+
var traceProps = import_zod21.z.object({
|
|
451
|
+
path: import_zod21.z.array(portRef),
|
|
431
452
|
thickness: import_soup11.distance.optional(),
|
|
432
|
-
schematicRouteHints:
|
|
433
|
-
pcbRouteHints:
|
|
453
|
+
schematicRouteHints: import_zod21.z.array(import_soup11.point).optional(),
|
|
454
|
+
pcbRouteHints: import_zod21.z.array(import_soup11.route_hint_point).optional()
|
|
434
455
|
}).or(
|
|
435
|
-
|
|
456
|
+
import_zod21.z.object({
|
|
436
457
|
from: portRef,
|
|
437
458
|
to: portRef,
|
|
438
459
|
thickness: import_soup11.distance.optional(),
|
|
439
|
-
schematicRouteHints:
|
|
440
|
-
pcbRouteHints:
|
|
460
|
+
schematicRouteHints: import_zod21.z.array(import_soup11.point).optional(),
|
|
461
|
+
pcbRouteHints: import_zod21.z.array(import_soup11.route_hint_point).optional()
|
|
441
462
|
})
|
|
442
463
|
);
|
|
443
|
-
var
|
|
444
|
-
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
445
|
-
shape: import_zod20.z.literal("circle"),
|
|
446
|
-
radius: import_soup11.distance.optional(),
|
|
447
|
-
portHints: portHints.optional()
|
|
448
|
-
}),
|
|
449
|
-
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
450
|
-
shape: import_zod20.z.literal("rect"),
|
|
451
|
-
width: import_soup11.distance.optional(),
|
|
452
|
-
height: import_soup11.distance.optional(),
|
|
453
|
-
portHints: portHints.optional()
|
|
454
|
-
})
|
|
455
|
-
]);
|
|
456
|
-
var platedHoleProps = import_zod20.z.union([
|
|
464
|
+
var platedHoleProps = import_zod21.z.union([
|
|
457
465
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
458
|
-
shape:
|
|
466
|
+
shape: import_zod21.z.literal("circle"),
|
|
459
467
|
holeDiameter: import_soup11.distance,
|
|
460
468
|
outerDiameter: import_soup11.distance,
|
|
461
469
|
portHints: portHints.optional()
|
|
462
470
|
}),
|
|
463
471
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
464
|
-
shape:
|
|
472
|
+
shape: import_zod21.z.literal("oval"),
|
|
465
473
|
outerWidth: import_soup11.distance,
|
|
466
474
|
outerHeight: import_soup11.distance,
|
|
467
475
|
innerWidth: import_soup11.distance,
|
|
@@ -469,13 +477,13 @@ var platedHoleProps = import_zod20.z.union([
|
|
|
469
477
|
portHints: portHints.optional()
|
|
470
478
|
})
|
|
471
479
|
]);
|
|
472
|
-
var pcbKeepoutProps =
|
|
480
|
+
var pcbKeepoutProps = import_zod21.z.union([
|
|
473
481
|
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
474
|
-
shape:
|
|
482
|
+
shape: import_zod21.z.literal("circle"),
|
|
475
483
|
radius: import_soup11.distance
|
|
476
484
|
}),
|
|
477
485
|
pcbLayoutProps.extend({
|
|
478
|
-
shape:
|
|
486
|
+
shape: import_zod21.z.literal("rect"),
|
|
479
487
|
width: import_soup11.distance,
|
|
480
488
|
height: import_soup11.distance
|
|
481
489
|
})
|
|
@@ -483,47 +491,47 @@ var pcbKeepoutProps = import_zod20.z.union([
|
|
|
483
491
|
var holeProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
484
492
|
holeDiameter: import_soup11.distance
|
|
485
493
|
});
|
|
486
|
-
var schematicBoxProps =
|
|
494
|
+
var schematicBoxProps = import_zod21.z.object({
|
|
487
495
|
schX: import_soup11.distance,
|
|
488
496
|
schY: import_soup11.distance,
|
|
489
497
|
width: import_soup11.distance,
|
|
490
498
|
height: import_soup11.distance
|
|
491
499
|
});
|
|
492
|
-
var schematicTextProps =
|
|
500
|
+
var schematicTextProps = import_zod21.z.object({
|
|
493
501
|
schX: import_soup11.distance,
|
|
494
502
|
schY: import_soup11.distance,
|
|
495
|
-
text:
|
|
503
|
+
text: import_zod21.z.string()
|
|
496
504
|
});
|
|
497
|
-
var schematicLineProps =
|
|
505
|
+
var schematicLineProps = import_zod21.z.object({
|
|
498
506
|
x1: import_soup11.distance,
|
|
499
507
|
y1: import_soup11.distance,
|
|
500
508
|
x2: import_soup11.distance,
|
|
501
509
|
y2: import_soup11.distance
|
|
502
510
|
});
|
|
503
|
-
var schematicPathProps =
|
|
504
|
-
points:
|
|
505
|
-
isFilled:
|
|
506
|
-
fillColor:
|
|
511
|
+
var schematicPathProps = import_zod21.z.object({
|
|
512
|
+
points: import_zod21.z.array(import_soup11.point),
|
|
513
|
+
isFilled: import_zod21.z.boolean().optional().default(false),
|
|
514
|
+
fillColor: import_zod21.z.enum(["red", "blue"]).optional()
|
|
507
515
|
});
|
|
508
|
-
var footprintProps =
|
|
516
|
+
var footprintProps = import_zod21.z.object({});
|
|
509
517
|
var componentProps = commonComponentProps;
|
|
510
518
|
var powerSourceProps = commonComponentProps.extend({
|
|
511
519
|
voltage: import_soup11.voltage
|
|
512
520
|
});
|
|
513
521
|
var portProps = commonLayoutProps.extend({
|
|
514
|
-
name:
|
|
515
|
-
pinNumber:
|
|
516
|
-
aliases:
|
|
522
|
+
name: import_zod21.z.string(),
|
|
523
|
+
pinNumber: import_zod21.z.number().optional(),
|
|
524
|
+
aliases: import_zod21.z.array(import_zod21.z.string()).optional(),
|
|
517
525
|
direction
|
|
518
526
|
});
|
|
519
527
|
var silkscreenTextProps = pcbLayoutProps.extend({
|
|
520
|
-
text:
|
|
521
|
-
anchorAlignment:
|
|
522
|
-
font:
|
|
528
|
+
text: import_zod21.z.string(),
|
|
529
|
+
anchorAlignment: import_zod21.z.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
530
|
+
font: import_zod21.z.enum(["tscircuit2024"]).optional(),
|
|
523
531
|
fontSize: import_soup11.length.optional()
|
|
524
532
|
});
|
|
525
533
|
var silkscreenPathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
|
|
526
|
-
route:
|
|
534
|
+
route: import_zod21.z.array(import_soup11.route_hint_point),
|
|
527
535
|
strokeWidth: import_soup11.length.optional()
|
|
528
536
|
});
|
|
529
537
|
var silkscreenLineProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
|
|
@@ -534,46 +542,46 @@ var silkscreenLineProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotat
|
|
|
534
542
|
y2: import_soup11.distance
|
|
535
543
|
});
|
|
536
544
|
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
537
|
-
isFilled:
|
|
538
|
-
isOutline:
|
|
545
|
+
isFilled: import_zod21.z.boolean().optional(),
|
|
546
|
+
isOutline: import_zod21.z.boolean().optional(),
|
|
539
547
|
strokeWidth: import_soup11.distance.optional(),
|
|
540
548
|
width: import_soup11.distance,
|
|
541
549
|
height: import_soup11.distance
|
|
542
550
|
});
|
|
543
551
|
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
544
|
-
isFilled:
|
|
545
|
-
isOutline:
|
|
552
|
+
isFilled: import_zod21.z.boolean().optional(),
|
|
553
|
+
isOutline: import_zod21.z.boolean().optional(),
|
|
546
554
|
strokeWidth: import_soup11.distance.optional(),
|
|
547
555
|
radius: import_soup11.distance
|
|
548
556
|
});
|
|
549
|
-
var routeHintPointProps =
|
|
557
|
+
var routeHintPointProps = import_zod21.z.object({
|
|
550
558
|
x: import_soup11.distance,
|
|
551
559
|
y: import_soup11.distance,
|
|
552
|
-
via:
|
|
560
|
+
via: import_zod21.z.boolean().optional(),
|
|
553
561
|
toLayer: import_soup11.layer_ref.optional()
|
|
554
562
|
});
|
|
555
|
-
var traceHintProps =
|
|
556
|
-
for:
|
|
563
|
+
var traceHintProps = import_zod21.z.object({
|
|
564
|
+
for: import_zod21.z.string().optional().describe(
|
|
557
565
|
"Selector for the port you're targeting, not required if you're inside a trace"
|
|
558
566
|
),
|
|
559
|
-
order:
|
|
567
|
+
order: import_zod21.z.number().optional(),
|
|
560
568
|
offset: import_soup11.route_hint_point.or(routeHintPointProps).optional(),
|
|
561
|
-
offsets:
|
|
562
|
-
traceWidth:
|
|
569
|
+
offsets: import_zod21.z.array(import_soup11.route_hint_point).or(import_zod21.z.array(routeHintPointProps)).optional(),
|
|
570
|
+
traceWidth: import_zod21.z.number().optional()
|
|
563
571
|
});
|
|
564
|
-
var pcbTraceProps =
|
|
565
|
-
layer:
|
|
572
|
+
var pcbTraceProps = import_zod21.z.object({
|
|
573
|
+
layer: import_zod21.z.string().optional(),
|
|
566
574
|
thickness: import_soup11.distance.optional(),
|
|
567
|
-
route:
|
|
575
|
+
route: import_zod21.z.array(import_soup11.route_hint_point)
|
|
568
576
|
});
|
|
569
577
|
var fabricationNoteTextProps = pcbLayoutProps.extend({
|
|
570
|
-
text:
|
|
571
|
-
anchorAlignment:
|
|
572
|
-
font:
|
|
578
|
+
text: import_zod21.z.string(),
|
|
579
|
+
anchorAlignment: import_zod21.z.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
580
|
+
font: import_zod21.z.enum(["tscircuit2024"]).optional(),
|
|
573
581
|
fontSize: import_soup11.length.optional()
|
|
574
582
|
});
|
|
575
583
|
var fabricationNotePathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
|
|
576
|
-
route:
|
|
584
|
+
route: import_zod21.z.array(import_soup11.route_hint_point),
|
|
577
585
|
strokeWidth: import_soup11.length.optional()
|
|
578
586
|
});
|
|
579
587
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -584,6 +592,7 @@ var fabricationNotePathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcb
|
|
|
584
592
|
capacitorPins,
|
|
585
593
|
capacitorProps,
|
|
586
594
|
chipProps,
|
|
595
|
+
circleSmtPadProps,
|
|
587
596
|
commonComponentProps,
|
|
588
597
|
commonLayoutProps,
|
|
589
598
|
componentProps,
|
|
@@ -619,6 +628,7 @@ var fabricationNotePathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcb
|
|
|
619
628
|
portProps,
|
|
620
629
|
portRef,
|
|
621
630
|
powerSourceProps,
|
|
631
|
+
rectSmtPadProps,
|
|
622
632
|
resistorPins,
|
|
623
633
|
resistorProps,
|
|
624
634
|
routeHintPointProps,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../lib/index.ts","../lib/typecheck.ts","../lib/common/direction.ts","../lib/common/portHints.ts","../lib/common/layout.ts","../lib/common/point3.ts","../lib/common/cadModel.ts","../lib/common/footprintProp.ts","../lib/common/schematicPinDefinitions.ts","../lib/components/board.ts","../lib/common/point.ts","../lib/components/chip.ts","../lib/common/schematicPinStyle.ts","../lib/components/jumper.ts","../lib/components/resistor.ts","../lib/components/capacitor.ts","../lib/components/group.ts","../lib/components/net.ts","../lib/components/constrainedlayout.ts","../lib/common/distance.ts","../lib/components/constraint.ts"],"sourcesContent":["/**\n * THINKING ABOUT ADDING SOMETHING TO THIS FILE?\n *\n * THINK AGAIN!\n *\n * This file is TOO BIG! Create files using the pattern in the surrounding\n * directories, then export from this file.\n */\nimport type { LayoutBuilder } from \"@tscircuit/layout\"\nimport {\n type AnySoupElementInput,\n capacitance,\n distance,\n inductance,\n layer_ref,\n length,\n type PCBPlatedHoleInput,\n type PCBSMTPadInput,\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\"\nimport { direction } from \"./common/direction\"\nimport { portHints } from \"./common/portHints\"\nimport {\n commonComponentProps,\n commonLayoutProps,\n lrPins,\n lrPolarPins,\n pcbLayoutProps,\n} from \"./common/layout\"\nimport { explicitPinSideDefinition } from \"./common/schematicPinDefinitions\"\n\nexport * from \"./common/direction\"\nexport * from \"./common/portHints\"\nexport * from \"./common/layout\"\nexport * from \"./common/point3\"\nexport * from \"./common/portHints\"\nexport * from \"./common/footprintProp\"\nexport * from \"./common/schematicPinDefinitions\"\n\nexport * from \"./components/board\"\nexport * from \"./components/chip\"\nexport * from \"./components/jumper\"\n\nexport * from \"./components/resistor\"\nexport * from \"./components/capacitor\"\nexport * from \"./components/group\"\nexport * from \"./components/net\"\nexport * from \"./components/constrainedlayout\"\nexport * from \"./components/constraint\"\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 switchProps = commonComponentProps.extend({\n ftype: z.literal(\"switch\"),\n switchType: z.enum([\"spst\"]).default(\"spst\"),\n isNormallyClosed: z.boolean().default(false),\n})\nexport type SwitchProps = z.input<typeof switchProps>\n\nexport const distanceOrMultiplier = distance.or(z.enum([\"2x\", \"3x\", \"4x\"]))\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 portRef = z.union([\n z.string(),\n z.custom<{ getPortSelector: () => string }>((v) =>\n Boolean(v.getPortSelector),\n ),\n])\n\nexport const traceProps = z\n .object({\n path: z.array(portRef),\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: portRef,\n to: portRef,\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 pcbKeepoutProps = z.union([\n pcbLayoutProps.omit({ pcbRotation: true }).extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n }),\n pcbLayoutProps.extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n }),\n])\nexport type PcbKeepoutProps = z.input<typeof pcbKeepoutProps>\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 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 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 routeHintPointProps = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n toLayer: layer_ref.optional(),\n})\n\nexport const traceHintProps = z.object({\n for: z\n .string()\n .optional()\n .describe(\n \"Selector for the port you're targeting, not required if you're inside a trace\",\n ),\n order: z.number().optional(),\n offset: route_hint_point.or(routeHintPointProps).optional(),\n offsets: z\n .array(route_hint_point)\n .or(z.array(routeHintPointProps))\n .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>\n","import type { TypeEqual } from \"ts-expect\"\n\nexport const expectTypesMatch = <const T1, const T2>(\n shouldBe: TypeEqual<T1, T2>,\n): void => {}\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nexport const direction = z.enum([\"up\", \"down\", \"left\", \"right\"])\nexport type Direction = \"up\" | \"down\" | \"left\" | \"right\"\n\nexport type DirectionAlongEdge =\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n\nexport const directionAlongEdge = z.enum([\n \"top-to-bottom\",\n \"left-to-right\",\n \"bottom-to-top\",\n \"right-to-left\",\n])\n\nexpectTypesMatch<Direction, z.infer<typeof direction>>(true)\nexpectTypesMatch<DirectionAlongEdge, z.infer<typeof directionAlongEdge>>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const portHints = z.array(z.string().or(z.number()))\nexport type PortHints = (string | number)[]\n\nexpectTypesMatch<PortHints, z.infer<typeof portHints>>(true)\n","import { z } from \"zod\"\nimport {\n type AnySoupElementInput,\n distance,\n layer_ref,\n type LayerRef,\n type LayerRefInput,\n rotation,\n supplier_name,\n} from \"@tscircuit/soup\"\nimport { point3 } from \"./point3\"\nimport {\n cadModelJscad,\n cadModelObj,\n cadModelProp,\n cadModelStl,\n type CadModelJscad,\n type CadModelObj,\n type CadModelProp,\n type CadModelStl,\n} from \"./cadModel\"\nimport { footprintProp, type Footprint } from \"./footprintProp\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const pcbLayoutProps = z.object({\n pcbX: distance,\n pcbY: distance,\n pcbRotation: rotation.optional(),\n layer: layer_ref.optional(),\n})\n\nexport interface CommonLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n\n schX?: string | number\n schY?: string | number\n schRotation?: string | number\n\n layer?: LayerRefInput\n footprint?: Footprint\n}\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 footprint: footprintProp.optional(),\n})\n\ntype InferredCommonLayoutProps = z.input<typeof commonLayoutProps>\nexpectTypesMatch<CommonLayoutProps, InferredCommonLayoutProps>(true)\n\nexport type SupplierName =\n | \"jlcpcb\"\n | \"macrofab\"\n | \"pcbway\"\n | \"digikey\"\n | \"mouser\"\n | \"lcsc\"\nexport interface SupplierProps {\n supplierPartNumbers?: { [k in SupplierName]?: string[] }\n}\nexport const supplierProps = z.object({\n supplierPartNumbers: z.record(supplier_name, z.array(z.string())).optional(),\n})\n\nexpectTypesMatch<SupplierProps, z.input<typeof supplierProps>>(true)\n\nexport interface CommonComponentProps extends CommonLayoutProps {\n name: string\n supplierPartNumbers?: SupplierProps[\"supplierPartNumbers\"]\n cadModel?: CadModelProp\n children?: any\n symbolName?: string\n}\n\nexport const commonComponentProps = commonLayoutProps\n .merge(supplierProps)\n .extend({\n name: z.string(),\n cadModel: cadModelProp.optional(),\n children: z.any().optional(),\n symbolName: z.string().optional(),\n })\n\ntype InferredCommonComponentProps = z.input<typeof commonComponentProps>\nexpectTypesMatch<CommonComponentProps, InferredCommonComponentProps>(true)\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 distanceOrMultiplier = distance.or(z.enum([\"2x\", \"3x\", \"4x\"]))\n","import { distance } from \"@tscircuit/soup\"\nimport { z } from \"zod\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n","import { z } from \"zod\"\nimport { point3 } from \"./point3\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const rotationPoint3 = 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 interface CadModelBase {\n rotationOffset?:\n | number\n | { x: number | string; y: number | string; z: number | string }\n positionOffset?: {\n x: number | string\n y: number | string\n z: number | string\n }\n size?: { x: number | string; y: number | string; z: number | string }\n}\n\nexport const cadModelBase = z.object({\n rotationOffset: z.number().or(rotationPoint3).optional(),\n positionOffset: point3.optional(),\n size: point3.optional(),\n})\n\nexpectTypesMatch<CadModelBase, z.input<typeof cadModelBase>>(true)\n\nexport interface CadModelStl extends CadModelBase {\n stlUrl: string\n}\nexport const cadModelStl = cadModelBase.extend({\n stlUrl: z.string(),\n})\n\nexport interface CadModelObj extends CadModelBase {\n objUrl: string\n mtlUrl?: string\n}\nexport const cadModelObj = cadModelBase.extend({\n objUrl: z.string(),\n mtlUrl: z.string().optional(),\n})\n\nexport interface CadModelJscad extends CadModelBase {\n jscad: Record<string, any>\n}\nexport const cadModelJscad = cadModelBase.extend({\n jscad: z.record(z.any()),\n})\n\nexport type CadModelProp = string | CadModelStl | CadModelObj | CadModelJscad\n\nexport const cadModelProp = z.union([\n z.string(),\n cadModelStl,\n cadModelObj,\n cadModelJscad,\n])\n\ntype InferredCadModelProp = z.input<typeof cadModelProp>\nexpectTypesMatch<CadModelProp, InferredCadModelProp>(true)\n","import type { LayerRef } from \"@tscircuit/soup\"\nimport type { ReactElement } from \"react\"\nimport { z } from \"zod\"\n\n/**\n * This is an abbreviated definition of the soup elements that you can find here:\n * https://docs.tscircuit.com/api-reference/advanced/soup#pcb-smtpad\n */\nexport type FootprintSoupElements = {\n type: \"pcb_smtpad\" | \"pcb_plated_hole\"\n x: string | number\n y: string | number\n layer?: LayerRef\n holeDiameter?: string | number\n outerDiameter?: string | number\n shape?: \"circle\" | \"rect\"\n width?: string | number\n height?: string | number\n portHints?: string[]\n}\n\nexport type Footprint = string | ReactElement | FootprintSoupElements[]\nexport const footprintProp = z.custom<Footprint>((v) => true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\n/**\n * @deprecated Use SchematicPortArrangementWithPinCounts instead.\n */\nexport interface SchematicPortArrangementWithSizes {\n leftSize?: number\n topSize?: number\n rightSize?: number\n bottomSize?: number\n}\n\n/**\n * Specifies the number of pins on each side of the schematic box component.\n */\nexport interface SchematicPortArrangementWithPinCounts {\n leftPinCount?: number\n topPinCount?: number\n rightPinCount?: number\n bottomPinCount?: number\n}\n\nexport interface PinSideDefinition {\n pins: number[]\n direction:\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n}\n\nexport interface SchematicPortArrangementWithSides {\n leftSide?: PinSideDefinition\n topSide?: PinSideDefinition\n rightSide?: PinSideDefinition\n bottomSide?: PinSideDefinition\n}\n\nexport type SchematicPortArrangement =\n | SchematicPortArrangementWithSizes\n | SchematicPortArrangementWithSides\n | SchematicPortArrangementWithPinCounts\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 const schematicPortArrangement = z\n .object({\n leftSize: z.number().optional().describe(\"@deprecated, use leftPinCount\"),\n topSize: z.number().optional().describe(\"@deprecated, use topPinCount\"),\n rightSize: z.number().optional().describe(\"@deprecated, use rightPinCount\"),\n bottomSize: z\n .number()\n .optional()\n .describe(\"@deprecated, use bottomPinCount\"),\n })\n .or(\n z.object({\n leftPinCount: z.number().optional(),\n rightPinCount: z.number().optional(),\n topPinCount: z.number().optional(),\n bottomPinCount: z.number().optional(),\n }),\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\nexpectTypesMatch<\n SchematicPortArrangement,\n z.input<typeof schematicPortArrangement>\n>(true)\n","import { z } from \"zod\"\nimport { distance } from \"@tscircuit/soup\"\nimport { point, type Point } from \"lib/common/point\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface BoardProps {\n width?: number | string\n height?: number | string\n outline?: Point[]\n pcbX?: number | string\n pcbY?: number | string\n layout?: any\n routingDisabled?: boolean\n children?: any\n}\n\nexport const boardProps = z.object({\n width: distance.optional(),\n height: distance.optional(),\n outline: z.array(point).optional(),\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})\n\nexpectTypesMatch<BoardProps, z.input<typeof boardProps>>(true)\n","import { distance } from \"@tscircuit/soup\"\nimport { z } from \"zod\"\n\nexport const point = z.object({\n x: distance,\n y: distance,\n})\n\nexport type Point = { x: number | string; y: number | string }\n","import { z } from \"zod\"\nimport { distance } from \"@tscircuit/soup\"\nimport {\n commonComponentProps,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicPortArrangement,\n type SchematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n schematicPinStyle,\n type SchematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport type { Distance } from \"lib/common/distance\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface ChipProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string>\n schPortArrangement?: SchematicPortArrangement\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: Distance\n schWidth?: Distance\n schHeight?: Distance\n}\n\nexport const chipProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z.record(z.number().or(z.string()), z.string()).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n})\n\n/**\n * @deprecated Use ChipProps instead.\n */\nexport const bugProps = chipProps\nexport type InferredChipProps = z.input<typeof chipProps>\n\nexpectTypesMatch<InferredChipProps, ChipProps>(true)\n","import { z } from \"zod\"\nimport { distance } from \"@tscircuit/soup\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type SchematicPinStyle = Record<\n string,\n {\n leftMargin?: number | string\n rightMargin?: number | string\n topMargin?: number | string\n bottomMargin?: number | string\n }\n>\n\nexport const schematicPinStyle = z.record(\n z.object({\n leftMargin: distance.optional(),\n rightMargin: distance.optional(),\n topMargin: distance.optional(),\n bottomMargin: distance.optional(),\n }),\n)\n\nexpectTypesMatch<SchematicPinStyle, z.input<typeof schematicPinStyle>>(true)\n","import { z } from \"zod\"\nimport {\n commonComponentProps,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicPinStyle,\n type SchematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { distance } from \"@tscircuit/soup\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport {\n schematicPortArrangement,\n type SchematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\n\nexport interface JumperProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string>\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: number | string\n schWidth?: number | string\n schHeight?: number | string\n schDirection?: \"left\" | \"right\"\n schPortArrangement?: SchematicPortArrangement\n}\n\nexport const jumperProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z.record(z.number().or(z.string()), z.string()).optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n schDirection: z.enum([\"left\", \"right\"]).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n})\n\ntype InferredJumperProps = z.input<typeof jumperProps>\nexpectTypesMatch<JumperProps, InferredJumperProps>(true)\n","import { z } from \"zod\"\nimport { resistance } from \"@tscircuit/soup\"\nimport {\n commonComponentProps,\n lrPins,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface ResistorProps extends CommonComponentProps {\n resistance: number | string\n pullupFor?: string\n pullupTo?: string\n pulldownFor?: string\n pulldownTo?: string\n}\n\nexport const resistorProps = commonComponentProps.extend({\n resistance,\n\n pullupFor: z.string().optional(),\n pullupTo: z.string().optional(),\n\n pulldownFor: z.string().optional(),\n pulldownTo: z.string().optional(),\n})\nexport const resistorPins = lrPins\n\ntype InferredResistorProps = z.input<typeof resistorProps>\nexpectTypesMatch<ResistorProps, InferredResistorProps>(true)\n","import { z } from \"zod\"\nimport { capacitance } from \"@tscircuit/soup\"\nimport {\n commonComponentProps,\n lrPins,\n lrPolarPins,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface CapacitorProps extends CommonComponentProps {\n capacitance: number | string\n\n decouplingFor?: string\n decouplingTo?: string\n\n bypassFor?: string\n bypassTo?: string\n}\n\nexport const capacitorProps = commonComponentProps.extend({\n capacitance,\n\n decouplingFor: z.string().optional(),\n decouplingTo: z.string().optional(),\n\n bypassFor: z.string().optional(),\n bypassTo: z.string().optional(),\n})\nexport const capacitorPins = lrPolarPins\n\nexpectTypesMatch<CapacitorProps, z.input<typeof capacitorProps>>(true)\n","import { z } from \"zod\"\nimport { commonLayoutProps, type CommonLayoutProps } from \"lib/common/layout\"\nimport type { LayoutBuilder } from \"@tscircuit/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface BaseGroupProps extends CommonLayoutProps {\n name?: string\n children?: any\n}\n\nexport interface SubcircuitGroupProps extends BaseGroupProps {\n subcircuit: true\n layout?: LayoutBuilder\n routingDisabled?: boolean\n}\n\nexport type GroupProps = SubcircuitGroupProps | BaseGroupProps\n\nexport const baseGroupProps = commonLayoutProps.extend({\n name: z.string().optional(),\n children: z.any().optional(),\n})\n\nexport const subcircuitGroupProps = baseGroupProps.extend({\n subcircuit: z.literal(true),\n layout: z.custom<LayoutBuilder>((v) => true).optional(),\n routingDisabled: z.boolean().optional(),\n})\n\nexport const groupProps = z.union([baseGroupProps, subcircuitGroupProps])\n\ntype InferredBaseGroupProps = z.input<typeof baseGroupProps>\ntype InferredSubcircuitGroupProps = z.input<typeof subcircuitGroupProps>\n\nexpectTypesMatch<BaseGroupProps, InferredBaseGroupProps>(true)\nexpectTypesMatch<SubcircuitGroupProps, InferredSubcircuitGroupProps>(true)\n\ntype InferredGroupProps = z.input<typeof groupProps>\nexpectTypesMatch<GroupProps, InferredGroupProps>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface NetProps {\n name: string\n}\n\nexport const netProps = z.object({\n name: z.string(),\n})\n\ntype InferredNetProps = z.input<typeof netProps>\nexpectTypesMatch<NetProps, InferredNetProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ConstrainedLayoutProps {\n name?: string\n pcbOnly?: boolean\n schOnly?: boolean\n}\n\nexport const constrainedLayoutProps = z.object({\n name: z.string().optional(),\n pcbOnly: z.boolean().optional(),\n schOnly: z.boolean().optional(),\n})\n\nexport type InferredConstrainedLayoutProps = z.input<\n typeof constrainedLayoutProps\n>\n\nexpectTypesMatch<InferredConstrainedLayoutProps, ConstrainedLayoutProps>(true)\n","import { z } from \"zod\"\n\nexport type Distance = number | string\n\nexport { distance } from \"@tscircuit/soup\"\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport type { Distance } from \"lib/common/distance\"\nimport { distance } from \"lib/common/distance\"\nimport { z } from \"zod\"\n\nexport type PcbXDistConstraint = {\n pcb?: true\n type?: \"xdist\"\n xdist: Distance\n left: string\n right: string\n\n edgeToEdge?: true\n centerToCenter?: true\n\n fromLeftEdge?: true\n fromLeftCenter?: true\n toRightEdge?: true\n toRightCenter?: true\n}\n\nexport type PcbYDistConstraint = {\n pcb?: true\n type?: \"ydist\"\n ydist: Distance\n top: string\n bottom: string\n\n edgeToEdge?: true\n centerToCenter?: true\n\n fromTopEdge?: true\n fromTopCenter?: true\n toBottomEdge?: true\n toBottomCenter?: true\n}\n\nexport type ConstraintProps = PcbXDistConstraint | PcbYDistConstraint\n\nexport const constraintProps = z.union([\n z.object({\n pcb: z.literal(true).optional(),\n type: z.literal(\"xdist\").optional(),\n xdist: distance,\n left: z.string(),\n right: z.string(),\n\n edgeToEdge: z.literal(true).optional(),\n centerToCenter: z.literal(true).optional(),\n\n fromLeftEdge: z.literal(true).optional(),\n fromLeftCenter: z.literal(true).optional(),\n toRightEdge: z.literal(true).optional(),\n toRightCenter: z.literal(true).optional(),\n }),\n z.object({\n pcb: z.literal(true).optional(),\n type: z.literal(\"ydist\").optional(),\n ydist: distance,\n top: z.string(),\n bottom: z.string(),\n\n edgeToEdge: z.literal(true).optional(),\n centerToCenter: z.literal(true).optional(),\n\n fromTopEdge: z.literal(true).optional(),\n fromTopCenter: z.literal(true).optional(),\n toBottomEdge: z.literal(true).optional(),\n toBottomCenter: z.literal(true).optional(),\n }),\n])\n\nexpectTypesMatch<ConstraintProps, z.input<typeof constraintProps>>(true)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,IAAAC,gBAeO;AAEP,IAAAC,eAAkB;;;ACxBX,IAAM,mBAAmB,CAC9B,aACS;AAAC;;;ACHZ,i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AO,eAAE,MAAM,8BAAgB;AAAA,EAC/B,aAAa,qBAAO,SAAS;AAC/B,CAAC;","names":["distanceOrMultiplier","import_soup","import_zod","import_zod","import_zod","import_soup","import_zod","import_zod","import_zod","import_zod","import_zod","import_soup","import_soup","import_zod","import_zod","import_soup","import_zod","import_soup","import_zod","import_soup","import_zod","import_soup","import_zod","import_soup","import_zod","import_zod","import_zod","import_zod","import_soup","import_zod","distanceOrMultiplier"]}
|
|
1
|
+
{"version":3,"sources":["../lib/index.ts","../lib/typecheck.ts","../lib/common/direction.ts","../lib/common/portHints.ts","../lib/common/layout.ts","../lib/common/point3.ts","../lib/common/cadModel.ts","../lib/common/footprintProp.ts","../lib/common/schematicPinDefinitions.ts","../lib/components/board.ts","../lib/common/point.ts","../lib/components/chip.ts","../lib/common/schematicPinStyle.ts","../lib/components/jumper.ts","../lib/components/resistor.ts","../lib/components/capacitor.ts","../lib/components/group.ts","../lib/components/net.ts","../lib/components/constrainedlayout.ts","../lib/common/distance.ts","../lib/components/constraint.ts","../lib/components/smtpad.ts"],"sourcesContent":["/**\n * THINKING ABOUT ADDING SOMETHING TO THIS FILE?\n *\n * THINK AGAIN!\n *\n * This file is TOO BIG! Create files using the pattern in the surrounding\n * directories, then export from this file.\n */\nimport type { LayoutBuilder } from \"@tscircuit/layout\"\nimport {\n type AnySoupElementInput,\n capacitance,\n distance,\n inductance,\n layer_ref,\n length,\n type PCBPlatedHoleInput,\n type PCBSMTPadInput,\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\"\nimport { direction } from \"./common/direction\"\nimport { portHints } from \"./common/portHints\"\nimport {\n commonComponentProps,\n commonLayoutProps,\n lrPins,\n lrPolarPins,\n pcbLayoutProps,\n} from \"./common/layout\"\nimport { explicitPinSideDefinition } from \"./common/schematicPinDefinitions\"\n\nexport * from \"./common/direction\"\nexport * from \"./common/portHints\"\nexport * from \"./common/layout\"\nexport * from \"./common/point3\"\nexport * from \"./common/portHints\"\nexport * from \"./common/footprintProp\"\nexport * from \"./common/schematicPinDefinitions\"\n\nexport * from \"./components/board\"\nexport * from \"./components/chip\"\nexport * from \"./components/jumper\"\n\nexport * from \"./components/resistor\"\nexport * from \"./components/capacitor\"\nexport * from \"./components/group\"\nexport * from \"./components/net\"\nexport * from \"./components/constrainedlayout\"\nexport * from \"./components/constraint\"\nexport * from \"./components/smtpad\"\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 switchProps = commonComponentProps.extend({\n ftype: z.literal(\"switch\"),\n switchType: z.enum([\"spst\"]).default(\"spst\"),\n isNormallyClosed: z.boolean().default(false),\n})\nexport type SwitchProps = z.input<typeof switchProps>\n\nexport const distanceOrMultiplier = distance.or(z.enum([\"2x\", \"3x\", \"4x\"]))\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 portRef = z.union([\n z.string(),\n z.custom<{ getPortSelector: () => string }>((v) =>\n Boolean(v.getPortSelector),\n ),\n])\n\nexport const traceProps = z\n .object({\n path: z.array(portRef),\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: portRef,\n to: portRef,\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 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 pcbKeepoutProps = z.union([\n pcbLayoutProps.omit({ pcbRotation: true }).extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n }),\n pcbLayoutProps.extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n }),\n])\nexport type PcbKeepoutProps = z.input<typeof pcbKeepoutProps>\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 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 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 routeHintPointProps = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n toLayer: layer_ref.optional(),\n})\n\nexport const traceHintProps = z.object({\n for: z\n .string()\n .optional()\n .describe(\n \"Selector for the port you're targeting, not required if you're inside a trace\",\n ),\n order: z.number().optional(),\n offset: route_hint_point.or(routeHintPointProps).optional(),\n offsets: z\n .array(route_hint_point)\n .or(z.array(routeHintPointProps))\n .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>\n","import type { TypeEqual } from \"ts-expect\"\n\nexport const expectTypesMatch = <const T1, const T2>(\n shouldBe: TypeEqual<T1, T2>,\n): void => {}\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nexport const direction = z.enum([\"up\", \"down\", \"left\", \"right\"])\nexport type Direction = \"up\" | \"down\" | \"left\" | \"right\"\n\nexport type DirectionAlongEdge =\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n\nexport const directionAlongEdge = z.enum([\n \"top-to-bottom\",\n \"left-to-right\",\n \"bottom-to-top\",\n \"right-to-left\",\n])\n\nexpectTypesMatch<Direction, z.infer<typeof direction>>(true)\nexpectTypesMatch<DirectionAlongEdge, z.infer<typeof directionAlongEdge>>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const portHints = z.array(z.string().or(z.number()))\nexport type PortHints = (string | number)[]\n\nexpectTypesMatch<PortHints, z.infer<typeof portHints>>(true)\n","import { z } from \"zod\"\nimport {\n type AnySoupElementInput,\n distance,\n layer_ref,\n type LayerRef,\n type LayerRefInput,\n rotation,\n supplier_name,\n} from \"@tscircuit/soup\"\nimport { point3 } from \"./point3\"\nimport {\n cadModelJscad,\n cadModelObj,\n cadModelProp,\n cadModelStl,\n type CadModelJscad,\n type CadModelObj,\n type CadModelProp,\n type CadModelStl,\n} from \"./cadModel\"\nimport { footprintProp, type Footprint } from \"./footprintProp\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface PcbLayoutProps {\n pcbX: string | number\n pcbY: string | number\n pcbRotation?: string | number\n layer?: LayerRefInput\n}\n\nexport interface CommonLayoutProps {\n pcbX?: string | number\n pcbY?: string | number\n pcbRotation?: string | number\n\n schX?: string | number\n schY?: string | number\n schRotation?: string | number\n\n layer?: LayerRefInput\n footprint?: Footprint\n}\n\nexport const pcbLayoutProps = z.object({\n pcbX: distance,\n pcbY: distance,\n pcbRotation: rotation.optional(),\n layer: layer_ref.optional(),\n})\ntype InferredPcbLayoutProps = z.input<typeof pcbLayoutProps>\nexpectTypesMatch<PcbLayoutProps, InferredPcbLayoutProps>(true)\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 footprint: footprintProp.optional(),\n})\n\ntype InferredCommonLayoutProps = z.input<typeof commonLayoutProps>\nexpectTypesMatch<CommonLayoutProps, InferredCommonLayoutProps>(true)\n\nexport type SupplierName =\n | \"jlcpcb\"\n | \"macrofab\"\n | \"pcbway\"\n | \"digikey\"\n | \"mouser\"\n | \"lcsc\"\nexport interface SupplierProps {\n supplierPartNumbers?: { [k in SupplierName]?: string[] }\n}\nexport const supplierProps = z.object({\n supplierPartNumbers: z.record(supplier_name, z.array(z.string())).optional(),\n})\n\nexpectTypesMatch<SupplierProps, z.input<typeof supplierProps>>(true)\n\nexport interface CommonComponentProps extends CommonLayoutProps {\n name: string\n supplierPartNumbers?: SupplierProps[\"supplierPartNumbers\"]\n cadModel?: CadModelProp\n children?: any\n symbolName?: string\n}\n\nexport const commonComponentProps = commonLayoutProps\n .merge(supplierProps)\n .extend({\n name: z.string(),\n cadModel: cadModelProp.optional(),\n children: z.any().optional(),\n symbolName: z.string().optional(),\n })\n\ntype InferredCommonComponentProps = z.input<typeof commonComponentProps>\nexpectTypesMatch<CommonComponentProps, InferredCommonComponentProps>(true)\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 distanceOrMultiplier = distance.or(z.enum([\"2x\", \"3x\", \"4x\"]))\n","import { distance } from \"@tscircuit/soup\"\nimport { z } from \"zod\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n","import { z } from \"zod\"\nimport { point3 } from \"./point3\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const rotationPoint3 = 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 interface CadModelBase {\n rotationOffset?:\n | number\n | { x: number | string; y: number | string; z: number | string }\n positionOffset?: {\n x: number | string\n y: number | string\n z: number | string\n }\n size?: { x: number | string; y: number | string; z: number | string }\n}\n\nexport const cadModelBase = z.object({\n rotationOffset: z.number().or(rotationPoint3).optional(),\n positionOffset: point3.optional(),\n size: point3.optional(),\n})\n\nexpectTypesMatch<CadModelBase, z.input<typeof cadModelBase>>(true)\n\nexport interface CadModelStl extends CadModelBase {\n stlUrl: string\n}\nexport const cadModelStl = cadModelBase.extend({\n stlUrl: z.string(),\n})\n\nexport interface CadModelObj extends CadModelBase {\n objUrl: string\n mtlUrl?: string\n}\nexport const cadModelObj = cadModelBase.extend({\n objUrl: z.string(),\n mtlUrl: z.string().optional(),\n})\n\nexport interface CadModelJscad extends CadModelBase {\n jscad: Record<string, any>\n}\nexport const cadModelJscad = cadModelBase.extend({\n jscad: z.record(z.any()),\n})\n\nexport type CadModelProp = string | CadModelStl | CadModelObj | CadModelJscad\n\nexport const cadModelProp = z.union([\n z.string(),\n cadModelStl,\n cadModelObj,\n cadModelJscad,\n])\n\ntype InferredCadModelProp = z.input<typeof cadModelProp>\nexpectTypesMatch<CadModelProp, InferredCadModelProp>(true)\n","import type { LayerRef } from \"@tscircuit/soup\"\nimport type { ReactElement } from \"react\"\nimport { z } from \"zod\"\n\n/**\n * This is an abbreviated definition of the soup elements that you can find here:\n * https://docs.tscircuit.com/api-reference/advanced/soup#pcb-smtpad\n */\nexport type FootprintSoupElements = {\n type: \"pcb_smtpad\" | \"pcb_plated_hole\"\n x: string | number\n y: string | number\n layer?: LayerRef\n holeDiameter?: string | number\n outerDiameter?: string | number\n shape?: \"circle\" | \"rect\"\n width?: string | number\n height?: string | number\n portHints?: string[]\n}\n\nexport type Footprint = string | ReactElement | FootprintSoupElements[]\nexport const footprintProp = z.custom<Footprint>((v) => true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\n/**\n * @deprecated Use SchematicPortArrangementWithPinCounts instead.\n */\nexport interface SchematicPortArrangementWithSizes {\n leftSize?: number\n topSize?: number\n rightSize?: number\n bottomSize?: number\n}\n\n/**\n * Specifies the number of pins on each side of the schematic box component.\n */\nexport interface SchematicPortArrangementWithPinCounts {\n leftPinCount?: number\n topPinCount?: number\n rightPinCount?: number\n bottomPinCount?: number\n}\n\nexport interface PinSideDefinition {\n pins: number[]\n direction:\n | \"top-to-bottom\"\n | \"left-to-right\"\n | \"bottom-to-top\"\n | \"right-to-left\"\n}\n\nexport interface SchematicPortArrangementWithSides {\n leftSide?: PinSideDefinition\n topSide?: PinSideDefinition\n rightSide?: PinSideDefinition\n bottomSide?: PinSideDefinition\n}\n\nexport type SchematicPortArrangement =\n | SchematicPortArrangementWithSizes\n | SchematicPortArrangementWithSides\n | SchematicPortArrangementWithPinCounts\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 const schematicPortArrangement = z\n .object({\n leftSize: z.number().optional().describe(\"@deprecated, use leftPinCount\"),\n topSize: z.number().optional().describe(\"@deprecated, use topPinCount\"),\n rightSize: z.number().optional().describe(\"@deprecated, use rightPinCount\"),\n bottomSize: z\n .number()\n .optional()\n .describe(\"@deprecated, use bottomPinCount\"),\n })\n .or(\n z.object({\n leftPinCount: z.number().optional(),\n rightPinCount: z.number().optional(),\n topPinCount: z.number().optional(),\n bottomPinCount: z.number().optional(),\n }),\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\nexpectTypesMatch<\n SchematicPortArrangement,\n z.input<typeof schematicPortArrangement>\n>(true)\n","import { z } from \"zod\"\nimport { distance } from \"@tscircuit/soup\"\nimport { point, type Point } from \"lib/common/point\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface BoardProps {\n width?: number | string\n height?: number | string\n outline?: Point[]\n pcbX?: number | string\n pcbY?: number | string\n layout?: any\n routingDisabled?: boolean\n children?: any\n}\n\nexport const boardProps = z.object({\n width: distance.optional(),\n height: distance.optional(),\n outline: z.array(point).optional(),\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})\n\nexpectTypesMatch<BoardProps, z.input<typeof boardProps>>(true)\n","import { distance } from \"@tscircuit/soup\"\nimport { z } from \"zod\"\n\nexport const point = z.object({\n x: distance,\n y: distance,\n})\n\nexport type Point = { x: number | string; y: number | string }\n","import { z } from \"zod\"\nimport { distance } from \"@tscircuit/soup\"\nimport {\n commonComponentProps,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicPortArrangement,\n type SchematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n schematicPinStyle,\n type SchematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport type { Distance } from \"lib/common/distance\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface ChipProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string>\n schPortArrangement?: SchematicPortArrangement\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: Distance\n schWidth?: Distance\n schHeight?: Distance\n}\n\nexport const chipProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z.record(z.number().or(z.string()), z.string()).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n})\n\n/**\n * @deprecated Use ChipProps instead.\n */\nexport const bugProps = chipProps\nexport type InferredChipProps = z.input<typeof chipProps>\n\nexpectTypesMatch<InferredChipProps, ChipProps>(true)\n","import { z } from \"zod\"\nimport { distance } from \"@tscircuit/soup\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type SchematicPinStyle = Record<\n string,\n {\n leftMargin?: number | string\n rightMargin?: number | string\n topMargin?: number | string\n bottomMargin?: number | string\n }\n>\n\nexport const schematicPinStyle = z.record(\n z.object({\n leftMargin: distance.optional(),\n rightMargin: distance.optional(),\n topMargin: distance.optional(),\n bottomMargin: distance.optional(),\n }),\n)\n\nexpectTypesMatch<SchematicPinStyle, z.input<typeof schematicPinStyle>>(true)\n","import { z } from \"zod\"\nimport {\n commonComponentProps,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport {\n schematicPinStyle,\n type SchematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { distance } from \"@tscircuit/soup\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport {\n schematicPortArrangement,\n type SchematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\n\nexport interface JumperProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string>\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: number | string\n schWidth?: number | string\n schHeight?: number | string\n schDirection?: \"left\" | \"right\"\n schPortArrangement?: SchematicPortArrangement\n}\n\nexport const jumperProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z.record(z.number().or(z.string()), z.string()).optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n schDirection: z.enum([\"left\", \"right\"]).optional(),\n schPortArrangement: schematicPortArrangement.optional(),\n})\n\ntype InferredJumperProps = z.input<typeof jumperProps>\nexpectTypesMatch<JumperProps, InferredJumperProps>(true)\n","import { z } from \"zod\"\nimport { resistance } from \"@tscircuit/soup\"\nimport {\n commonComponentProps,\n lrPins,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface ResistorProps extends CommonComponentProps {\n resistance: number | string\n pullupFor?: string\n pullupTo?: string\n pulldownFor?: string\n pulldownTo?: string\n}\n\nexport const resistorProps = commonComponentProps.extend({\n resistance,\n\n pullupFor: z.string().optional(),\n pullupTo: z.string().optional(),\n\n pulldownFor: z.string().optional(),\n pulldownTo: z.string().optional(),\n})\nexport const resistorPins = lrPins\n\ntype InferredResistorProps = z.input<typeof resistorProps>\nexpectTypesMatch<ResistorProps, InferredResistorProps>(true)\n","import { z } from \"zod\"\nimport { capacitance } from \"@tscircuit/soup\"\nimport {\n commonComponentProps,\n lrPins,\n lrPolarPins,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface CapacitorProps extends CommonComponentProps {\n capacitance: number | string\n\n decouplingFor?: string\n decouplingTo?: string\n\n bypassFor?: string\n bypassTo?: string\n}\n\nexport const capacitorProps = commonComponentProps.extend({\n capacitance,\n\n decouplingFor: z.string().optional(),\n decouplingTo: z.string().optional(),\n\n bypassFor: z.string().optional(),\n bypassTo: z.string().optional(),\n})\nexport const capacitorPins = lrPolarPins\n\nexpectTypesMatch<CapacitorProps, z.input<typeof capacitorProps>>(true)\n","import { z } from \"zod\"\nimport { commonLayoutProps, type CommonLayoutProps } from \"lib/common/layout\"\nimport type { LayoutBuilder } from \"@tscircuit/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface BaseGroupProps extends CommonLayoutProps {\n name?: string\n children?: any\n}\n\nexport interface SubcircuitGroupProps extends BaseGroupProps {\n subcircuit: true\n layout?: LayoutBuilder\n routingDisabled?: boolean\n}\n\nexport type GroupProps = SubcircuitGroupProps | BaseGroupProps\n\nexport const baseGroupProps = commonLayoutProps.extend({\n name: z.string().optional(),\n children: z.any().optional(),\n})\n\nexport const subcircuitGroupProps = baseGroupProps.extend({\n subcircuit: z.literal(true),\n layout: z.custom<LayoutBuilder>((v) => true).optional(),\n routingDisabled: z.boolean().optional(),\n})\n\nexport const groupProps = z.union([baseGroupProps, subcircuitGroupProps])\n\ntype InferredBaseGroupProps = z.input<typeof baseGroupProps>\ntype InferredSubcircuitGroupProps = z.input<typeof subcircuitGroupProps>\n\nexpectTypesMatch<BaseGroupProps, InferredBaseGroupProps>(true)\nexpectTypesMatch<SubcircuitGroupProps, InferredSubcircuitGroupProps>(true)\n\ntype InferredGroupProps = z.input<typeof groupProps>\nexpectTypesMatch<GroupProps, InferredGroupProps>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface NetProps {\n name: string\n}\n\nexport const netProps = z.object({\n name: z.string(),\n})\n\ntype InferredNetProps = z.input<typeof netProps>\nexpectTypesMatch<NetProps, InferredNetProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ConstrainedLayoutProps {\n name?: string\n pcbOnly?: boolean\n schOnly?: boolean\n}\n\nexport const constrainedLayoutProps = z.object({\n name: z.string().optional(),\n pcbOnly: z.boolean().optional(),\n schOnly: z.boolean().optional(),\n})\n\nexport type InferredConstrainedLayoutProps = z.input<\n typeof constrainedLayoutProps\n>\n\nexpectTypesMatch<InferredConstrainedLayoutProps, ConstrainedLayoutProps>(true)\n","import { z } from \"zod\"\n\nexport type Distance = number | string\n\nexport { distance } from \"@tscircuit/soup\"\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport type { Distance } from \"lib/common/distance\"\nimport { distance } from \"lib/common/distance\"\nimport { z } from \"zod\"\n\nexport type PcbXDistConstraint = {\n pcb?: true\n type?: \"xdist\"\n xdist: Distance\n left: string\n right: string\n\n edgeToEdge?: true\n centerToCenter?: true\n\n fromLeftEdge?: true\n fromLeftCenter?: true\n toRightEdge?: true\n toRightCenter?: true\n}\n\nexport type PcbYDistConstraint = {\n pcb?: true\n type?: \"ydist\"\n ydist: Distance\n top: string\n bottom: string\n\n edgeToEdge?: true\n centerToCenter?: true\n\n fromTopEdge?: true\n fromTopCenter?: true\n toBottomEdge?: true\n toBottomCenter?: true\n}\n\nexport type ConstraintProps = PcbXDistConstraint | PcbYDistConstraint\n\nexport const constraintProps = z.union([\n z.object({\n pcb: z.literal(true).optional(),\n type: z.literal(\"xdist\").optional(),\n xdist: distance,\n left: z.string(),\n right: z.string(),\n\n edgeToEdge: z.literal(true).optional(),\n centerToCenter: z.literal(true).optional(),\n\n fromLeftEdge: z.literal(true).optional(),\n fromLeftCenter: z.literal(true).optional(),\n toRightEdge: z.literal(true).optional(),\n toRightCenter: z.literal(true).optional(),\n }),\n z.object({\n pcb: z.literal(true).optional(),\n type: z.literal(\"ydist\").optional(),\n ydist: distance,\n top: z.string(),\n bottom: z.string(),\n\n edgeToEdge: z.literal(true).optional(),\n centerToCenter: z.literal(true).optional(),\n\n fromTopEdge: z.literal(true).optional(),\n fromTopCenter: z.literal(true).optional(),\n toBottomEdge: z.literal(true).optional(),\n toBottomCenter: z.literal(true).optional(),\n }),\n])\n\nexpectTypesMatch<ConstraintProps, z.input<typeof constraintProps>>(true)\n","import {\n pcbLayoutProps,\n type CommonLayoutProps,\n type PcbLayoutProps,\n} from \"lib/common/layout\"\nimport { z } from \"zod\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { portHints, type PortHints } from \"lib/common/portHints\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface RectSmtPadProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"rect\"\n width: Distance\n height: Distance\n portHints?: PortHints\n}\n\nexport interface CircleSmtPadProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"circle\"\n radius: Distance\n portHints?: PortHints\n}\n\nexport type SmtPadProps = RectSmtPadProps | CircleSmtPadProps\n\n// ----------------------------------------------------------------------------\n// Zod\n// ----------------------------------------------------------------------------\n\nexport const rectSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n portHints: portHints.optional(),\n })\ntype InferredRectSmtPadProps = z.input<typeof rectSmtPadProps>\nexpectTypesMatch<InferredRectSmtPadProps, RectSmtPadProps>(true)\n\nexport const circleSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n portHints: portHints.optional(),\n })\ntype InferredCircleSmtPadProps = z.input<typeof circleSmtPadProps>\nexpectTypesMatch<InferredCircleSmtPadProps, CircleSmtPadProps>(true)\n\nexport const smtPadProps = z.union([circleSmtPadProps, rectSmtPadProps])\n\nexport type InferredSmtPadProps = z.input<typeof smtPadProps>\nexpectTypesMatch<InferredSmtPadProps, SmtPadProps>(true)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AA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,SAAS;AAAA,EACZ,YAAY,eAAE,OAAO,EAAE,SAAS;AAClC,CAAC;AAIM,IAAM,gBAAgB,eAAE,OAAO;AAAA,EACpC,OAAO,eAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,WAAW,uBAAS,SAAS;AAAA,EAC7B,OAAO,eAAE,MAAM,8BAAgB;AACjC,CAAC;AAGM,IAAM,2BAA2B,eAAe,OAAO;AAAA,EAC5D,MAAM,eAAE,OAAO;AAAA,EACf,iBAAiB,eACd,KAAK,CAAC,UAAU,YAAY,aAAa,eAAe,cAAc,CAAC,EACvE,QAAQ,QAAQ;AAAA,EACnB,MAAM,eAAE,KAAK,CAAC,eAAe,CAAC,EAAE,SAAS;AAAA,EACzC,UAAU,qBAAO,SAAS;AAC5B,CAAC;AAGM,IAAM,2BAA2B,eACrC,KAAK,EAAE,MAAM,MAAM,MAAM,MAAM,aAAa,KAAK,CAAC,EAClD,OAAO;AAAA,EACN,OAAO,eAAE,MAAM,8BAAgB;AAAA,EAC/B,aAAa,qBAAO,SAAS;AAC/B,CAAC;","names":["distanceOrMultiplier","import_soup","import_zod","import_zod","import_zod","import_soup","import_zod","import_zod","import_zod","import_zod","import_zod","import_soup","import_soup","import_zod","import_zod","import_soup","import_zod","import_soup","import_zod","import_soup","import_zod","import_soup","import_zod","import_soup","import_zod","import_zod","import_zod","import_zod","import_soup","import_zod","import_zod","distanceOrMultiplier"]}
|
package/lib/common/layout.ts
CHANGED
|
@@ -22,12 +22,12 @@ import {
|
|
|
22
22
|
import { footprintProp, type Footprint } from "./footprintProp"
|
|
23
23
|
import { expectTypesMatch } from "lib/typecheck"
|
|
24
24
|
|
|
25
|
-
export
|
|
26
|
-
pcbX:
|
|
27
|
-
pcbY:
|
|
28
|
-
pcbRotation
|
|
29
|
-
layer
|
|
30
|
-
}
|
|
25
|
+
export interface PcbLayoutProps {
|
|
26
|
+
pcbX: string | number
|
|
27
|
+
pcbY: string | number
|
|
28
|
+
pcbRotation?: string | number
|
|
29
|
+
layer?: LayerRefInput
|
|
30
|
+
}
|
|
31
31
|
|
|
32
32
|
export interface CommonLayoutProps {
|
|
33
33
|
pcbX?: string | number
|
|
@@ -42,6 +42,15 @@ export interface CommonLayoutProps {
|
|
|
42
42
|
footprint?: Footprint
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
export const pcbLayoutProps = z.object({
|
|
46
|
+
pcbX: distance,
|
|
47
|
+
pcbY: distance,
|
|
48
|
+
pcbRotation: rotation.optional(),
|
|
49
|
+
layer: layer_ref.optional(),
|
|
50
|
+
})
|
|
51
|
+
type InferredPcbLayoutProps = z.input<typeof pcbLayoutProps>
|
|
52
|
+
expectTypesMatch<PcbLayoutProps, InferredPcbLayoutProps>(true)
|
|
53
|
+
|
|
45
54
|
export const commonLayoutProps = z.object({
|
|
46
55
|
pcbX: distance.optional(),
|
|
47
56
|
pcbY: distance.optional(),
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
pcbLayoutProps,
|
|
3
|
+
type CommonLayoutProps,
|
|
4
|
+
type PcbLayoutProps,
|
|
5
|
+
} from "lib/common/layout"
|
|
6
|
+
import { z } from "zod"
|
|
7
|
+
import { distance, type Distance } from "lib/common/distance"
|
|
8
|
+
import { portHints, type PortHints } from "lib/common/portHints"
|
|
9
|
+
import { expectTypesMatch } from "lib/typecheck"
|
|
10
|
+
|
|
11
|
+
export interface RectSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
12
|
+
shape: "rect"
|
|
13
|
+
width: Distance
|
|
14
|
+
height: Distance
|
|
15
|
+
portHints?: PortHints
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface CircleSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
19
|
+
shape: "circle"
|
|
20
|
+
radius: Distance
|
|
21
|
+
portHints?: PortHints
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type SmtPadProps = RectSmtPadProps | CircleSmtPadProps
|
|
25
|
+
|
|
26
|
+
// ----------------------------------------------------------------------------
|
|
27
|
+
// Zod
|
|
28
|
+
// ----------------------------------------------------------------------------
|
|
29
|
+
|
|
30
|
+
export const rectSmtPadProps = pcbLayoutProps
|
|
31
|
+
.omit({ pcbRotation: true })
|
|
32
|
+
.extend({
|
|
33
|
+
shape: z.literal("rect"),
|
|
34
|
+
width: distance,
|
|
35
|
+
height: distance,
|
|
36
|
+
portHints: portHints.optional(),
|
|
37
|
+
})
|
|
38
|
+
type InferredRectSmtPadProps = z.input<typeof rectSmtPadProps>
|
|
39
|
+
expectTypesMatch<InferredRectSmtPadProps, RectSmtPadProps>(true)
|
|
40
|
+
|
|
41
|
+
export const circleSmtPadProps = pcbLayoutProps
|
|
42
|
+
.omit({ pcbRotation: true })
|
|
43
|
+
.extend({
|
|
44
|
+
shape: z.literal("circle"),
|
|
45
|
+
radius: distance,
|
|
46
|
+
portHints: portHints.optional(),
|
|
47
|
+
})
|
|
48
|
+
type InferredCircleSmtPadProps = z.input<typeof circleSmtPadProps>
|
|
49
|
+
expectTypesMatch<InferredCircleSmtPadProps, CircleSmtPadProps>(true)
|
|
50
|
+
|
|
51
|
+
export const smtPadProps = z.union([circleSmtPadProps, rectSmtPadProps])
|
|
52
|
+
|
|
53
|
+
export type InferredSmtPadProps = z.input<typeof smtPadProps>
|
|
54
|
+
expectTypesMatch<InferredSmtPadProps, SmtPadProps>(true)
|
package/lib/index.ts
CHANGED
|
@@ -54,6 +54,7 @@ export * from "./components/group"
|
|
|
54
54
|
export * from "./components/net"
|
|
55
55
|
export * from "./components/constrainedlayout"
|
|
56
56
|
export * from "./components/constraint"
|
|
57
|
+
export * from "./components/smtpad"
|
|
57
58
|
|
|
58
59
|
export const inductorProps = commonComponentProps.extend({
|
|
59
60
|
inductance,
|
|
@@ -118,21 +119,6 @@ export const traceProps = z
|
|
|
118
119
|
)
|
|
119
120
|
export type TraceProps = z.input<typeof traceProps>
|
|
120
121
|
|
|
121
|
-
export const smtPadProps = z.union([
|
|
122
|
-
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
123
|
-
shape: z.literal("circle"),
|
|
124
|
-
radius: distance.optional(),
|
|
125
|
-
portHints: portHints.optional(),
|
|
126
|
-
}),
|
|
127
|
-
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
128
|
-
shape: z.literal("rect"),
|
|
129
|
-
width: distance.optional(),
|
|
130
|
-
height: distance.optional(),
|
|
131
|
-
portHints: portHints.optional(),
|
|
132
|
-
}),
|
|
133
|
-
])
|
|
134
|
-
export type SmtPadProps = z.input<typeof smtPadProps>
|
|
135
|
-
|
|
136
122
|
export const platedHoleProps = z.union([
|
|
137
123
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
138
124
|
shape: z.literal("circle"),
|