@tscircuit/props 0.0.95 → 0.0.96
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 +115 -113
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/lib/common/schematicPinDefinitions.ts +2 -2
- package/lib/components/chip.ts +12 -0
- package/lib/components/jumper.ts +4 -2
- package/lib/typecheck.ts +21 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1142,7 +1142,7 @@ interface SchematicPortArrangementWithPinCounts {
|
|
|
1142
1142
|
bottomPinCount?: number;
|
|
1143
1143
|
}
|
|
1144
1144
|
interface PinSideDefinition {
|
|
1145
|
-
pins: number
|
|
1145
|
+
pins: Array<number | string>;
|
|
1146
1146
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1147
1147
|
}
|
|
1148
1148
|
interface SchematicPortArrangementWithSides {
|
|
@@ -1154,14 +1154,14 @@ interface SchematicPortArrangementWithSides {
|
|
|
1154
1154
|
interface SchematicPortArrangement extends SchematicPortArrangementWithSizes, SchematicPortArrangementWithSides, SchematicPortArrangementWithPinCounts {
|
|
1155
1155
|
}
|
|
1156
1156
|
declare const explicitPinSideDefinition: z.ZodObject<{
|
|
1157
|
-
pins: z.
|
|
1157
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
1158
1158
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
1159
1159
|
}, "strip", z.ZodTypeAny, {
|
|
1160
1160
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1161
|
-
pins: string
|
|
1161
|
+
pins: (string | number)[];
|
|
1162
1162
|
}, {
|
|
1163
1163
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1164
|
-
pins: string
|
|
1164
|
+
pins: (string | number)[];
|
|
1165
1165
|
}>;
|
|
1166
1166
|
declare const schematicPortArrangement: z.ZodObject<{
|
|
1167
1167
|
leftSize: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1173,44 +1173,44 @@ declare const schematicPortArrangement: z.ZodObject<{
|
|
|
1173
1173
|
topPinCount: z.ZodOptional<z.ZodNumber>;
|
|
1174
1174
|
bottomPinCount: z.ZodOptional<z.ZodNumber>;
|
|
1175
1175
|
leftSide: z.ZodOptional<z.ZodObject<{
|
|
1176
|
-
pins: z.
|
|
1176
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
1177
1177
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
1178
1178
|
}, "strip", z.ZodTypeAny, {
|
|
1179
1179
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1180
|
-
pins: string
|
|
1180
|
+
pins: (string | number)[];
|
|
1181
1181
|
}, {
|
|
1182
1182
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1183
|
-
pins: string
|
|
1183
|
+
pins: (string | number)[];
|
|
1184
1184
|
}>>;
|
|
1185
1185
|
rightSide: z.ZodOptional<z.ZodObject<{
|
|
1186
|
-
pins: z.
|
|
1186
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
1187
1187
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
1188
1188
|
}, "strip", z.ZodTypeAny, {
|
|
1189
1189
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1190
|
-
pins: string
|
|
1190
|
+
pins: (string | number)[];
|
|
1191
1191
|
}, {
|
|
1192
1192
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1193
|
-
pins: string
|
|
1193
|
+
pins: (string | number)[];
|
|
1194
1194
|
}>>;
|
|
1195
1195
|
topSide: z.ZodOptional<z.ZodObject<{
|
|
1196
|
-
pins: z.
|
|
1196
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
1197
1197
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
1198
1198
|
}, "strip", z.ZodTypeAny, {
|
|
1199
1199
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1200
|
-
pins: string
|
|
1200
|
+
pins: (string | number)[];
|
|
1201
1201
|
}, {
|
|
1202
1202
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1203
|
-
pins: string
|
|
1203
|
+
pins: (string | number)[];
|
|
1204
1204
|
}>>;
|
|
1205
1205
|
bottomSide: z.ZodOptional<z.ZodObject<{
|
|
1206
|
-
pins: z.
|
|
1206
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
1207
1207
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
1208
1208
|
}, "strip", z.ZodTypeAny, {
|
|
1209
1209
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1210
|
-
pins: string
|
|
1210
|
+
pins: (string | number)[];
|
|
1211
1211
|
}, {
|
|
1212
1212
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1213
|
-
pins: string
|
|
1213
|
+
pins: (string | number)[];
|
|
1214
1214
|
}>>;
|
|
1215
1215
|
}, "strip", z.ZodTypeAny, {
|
|
1216
1216
|
leftSize?: number | undefined;
|
|
@@ -1219,19 +1219,19 @@ declare const schematicPortArrangement: z.ZodObject<{
|
|
|
1219
1219
|
bottomSize?: number | undefined;
|
|
1220
1220
|
leftSide?: {
|
|
1221
1221
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1222
|
-
pins: string
|
|
1222
|
+
pins: (string | number)[];
|
|
1223
1223
|
} | undefined;
|
|
1224
1224
|
topSide?: {
|
|
1225
1225
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1226
|
-
pins: string
|
|
1226
|
+
pins: (string | number)[];
|
|
1227
1227
|
} | undefined;
|
|
1228
1228
|
rightSide?: {
|
|
1229
1229
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1230
|
-
pins: string
|
|
1230
|
+
pins: (string | number)[];
|
|
1231
1231
|
} | undefined;
|
|
1232
1232
|
bottomSide?: {
|
|
1233
1233
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1234
|
-
pins: string
|
|
1234
|
+
pins: (string | number)[];
|
|
1235
1235
|
} | undefined;
|
|
1236
1236
|
leftPinCount?: number | undefined;
|
|
1237
1237
|
rightPinCount?: number | undefined;
|
|
@@ -1244,19 +1244,19 @@ declare const schematicPortArrangement: z.ZodObject<{
|
|
|
1244
1244
|
bottomSize?: number | undefined;
|
|
1245
1245
|
leftSide?: {
|
|
1246
1246
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1247
|
-
pins: string
|
|
1247
|
+
pins: (string | number)[];
|
|
1248
1248
|
} | undefined;
|
|
1249
1249
|
topSide?: {
|
|
1250
1250
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1251
|
-
pins: string
|
|
1251
|
+
pins: (string | number)[];
|
|
1252
1252
|
} | undefined;
|
|
1253
1253
|
rightSide?: {
|
|
1254
1254
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1255
|
-
pins: string
|
|
1255
|
+
pins: (string | number)[];
|
|
1256
1256
|
} | undefined;
|
|
1257
1257
|
bottomSide?: {
|
|
1258
1258
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1259
|
-
pins: string
|
|
1259
|
+
pins: (string | number)[];
|
|
1260
1260
|
} | undefined;
|
|
1261
1261
|
leftPinCount?: number | undefined;
|
|
1262
1262
|
rightPinCount?: number | undefined;
|
|
@@ -1658,6 +1658,8 @@ interface ChipProps extends CommonComponentProps {
|
|
|
1658
1658
|
schWidth?: Distance;
|
|
1659
1659
|
schHeight?: Distance;
|
|
1660
1660
|
}
|
|
1661
|
+
type PinLabels = Record<number | string, string | readonly string[] | string[]>;
|
|
1662
|
+
declare const pinLabelsProp: z.ZodRecord<z.ZodUnion<[z.ZodNumber, z.ZodString]>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>;
|
|
1661
1663
|
declare const chipProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
1662
1664
|
pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
1663
1665
|
pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -1927,44 +1929,44 @@ declare const chipProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.exten
|
|
|
1927
1929
|
topPinCount: z.ZodOptional<z.ZodNumber>;
|
|
1928
1930
|
bottomPinCount: z.ZodOptional<z.ZodNumber>;
|
|
1929
1931
|
leftSide: z.ZodOptional<z.ZodObject<{
|
|
1930
|
-
pins: z.
|
|
1932
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
1931
1933
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
1932
1934
|
}, "strip", z.ZodTypeAny, {
|
|
1933
1935
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1934
|
-
pins: string
|
|
1936
|
+
pins: (string | number)[];
|
|
1935
1937
|
}, {
|
|
1936
1938
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1937
|
-
pins: string
|
|
1939
|
+
pins: (string | number)[];
|
|
1938
1940
|
}>>;
|
|
1939
1941
|
rightSide: z.ZodOptional<z.ZodObject<{
|
|
1940
|
-
pins: z.
|
|
1942
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
1941
1943
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
1942
1944
|
}, "strip", z.ZodTypeAny, {
|
|
1943
1945
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1944
|
-
pins: string
|
|
1946
|
+
pins: (string | number)[];
|
|
1945
1947
|
}, {
|
|
1946
1948
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1947
|
-
pins: string
|
|
1949
|
+
pins: (string | number)[];
|
|
1948
1950
|
}>>;
|
|
1949
1951
|
topSide: z.ZodOptional<z.ZodObject<{
|
|
1950
|
-
pins: z.
|
|
1952
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
1951
1953
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
1952
1954
|
}, "strip", z.ZodTypeAny, {
|
|
1953
1955
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1954
|
-
pins: string
|
|
1956
|
+
pins: (string | number)[];
|
|
1955
1957
|
}, {
|
|
1956
1958
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1957
|
-
pins: string
|
|
1959
|
+
pins: (string | number)[];
|
|
1958
1960
|
}>>;
|
|
1959
1961
|
bottomSide: z.ZodOptional<z.ZodObject<{
|
|
1960
|
-
pins: z.
|
|
1962
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
1961
1963
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
1962
1964
|
}, "strip", z.ZodTypeAny, {
|
|
1963
1965
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1964
|
-
pins: string
|
|
1966
|
+
pins: (string | number)[];
|
|
1965
1967
|
}, {
|
|
1966
1968
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1967
|
-
pins: string
|
|
1969
|
+
pins: (string | number)[];
|
|
1968
1970
|
}>>;
|
|
1969
1971
|
}, "strip", z.ZodTypeAny, {
|
|
1970
1972
|
leftSize?: number | undefined;
|
|
@@ -1973,19 +1975,19 @@ declare const chipProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.exten
|
|
|
1973
1975
|
bottomSize?: number | undefined;
|
|
1974
1976
|
leftSide?: {
|
|
1975
1977
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1976
|
-
pins: string
|
|
1978
|
+
pins: (string | number)[];
|
|
1977
1979
|
} | undefined;
|
|
1978
1980
|
topSide?: {
|
|
1979
1981
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1980
|
-
pins: string
|
|
1982
|
+
pins: (string | number)[];
|
|
1981
1983
|
} | undefined;
|
|
1982
1984
|
rightSide?: {
|
|
1983
1985
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1984
|
-
pins: string
|
|
1986
|
+
pins: (string | number)[];
|
|
1985
1987
|
} | undefined;
|
|
1986
1988
|
bottomSide?: {
|
|
1987
1989
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1988
|
-
pins: string
|
|
1990
|
+
pins: (string | number)[];
|
|
1989
1991
|
} | undefined;
|
|
1990
1992
|
leftPinCount?: number | undefined;
|
|
1991
1993
|
rightPinCount?: number | undefined;
|
|
@@ -1998,19 +2000,19 @@ declare const chipProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.exten
|
|
|
1998
2000
|
bottomSize?: number | undefined;
|
|
1999
2001
|
leftSide?: {
|
|
2000
2002
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2001
|
-
pins: string
|
|
2003
|
+
pins: (string | number)[];
|
|
2002
2004
|
} | undefined;
|
|
2003
2005
|
topSide?: {
|
|
2004
2006
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2005
|
-
pins: string
|
|
2007
|
+
pins: (string | number)[];
|
|
2006
2008
|
} | undefined;
|
|
2007
2009
|
rightSide?: {
|
|
2008
2010
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2009
|
-
pins: string
|
|
2011
|
+
pins: (string | number)[];
|
|
2010
2012
|
} | undefined;
|
|
2011
2013
|
bottomSide?: {
|
|
2012
2014
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2013
|
-
pins: string
|
|
2015
|
+
pins: (string | number)[];
|
|
2014
2016
|
} | undefined;
|
|
2015
2017
|
leftPinCount?: number | undefined;
|
|
2016
2018
|
rightPinCount?: number | undefined;
|
|
@@ -2112,19 +2114,19 @@ declare const chipProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.exten
|
|
|
2112
2114
|
bottomSize?: number | undefined;
|
|
2113
2115
|
leftSide?: {
|
|
2114
2116
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2115
|
-
pins: string
|
|
2117
|
+
pins: (string | number)[];
|
|
2116
2118
|
} | undefined;
|
|
2117
2119
|
topSide?: {
|
|
2118
2120
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2119
|
-
pins: string
|
|
2121
|
+
pins: (string | number)[];
|
|
2120
2122
|
} | undefined;
|
|
2121
2123
|
rightSide?: {
|
|
2122
2124
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2123
|
-
pins: string
|
|
2125
|
+
pins: (string | number)[];
|
|
2124
2126
|
} | undefined;
|
|
2125
2127
|
bottomSide?: {
|
|
2126
2128
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2127
|
-
pins: string
|
|
2129
|
+
pins: (string | number)[];
|
|
2128
2130
|
} | undefined;
|
|
2129
2131
|
leftPinCount?: number | undefined;
|
|
2130
2132
|
rightPinCount?: number | undefined;
|
|
@@ -2218,19 +2220,19 @@ declare const chipProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.exten
|
|
|
2218
2220
|
bottomSize?: number | undefined;
|
|
2219
2221
|
leftSide?: {
|
|
2220
2222
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2221
|
-
pins: string
|
|
2223
|
+
pins: (string | number)[];
|
|
2222
2224
|
} | undefined;
|
|
2223
2225
|
topSide?: {
|
|
2224
2226
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2225
|
-
pins: string
|
|
2227
|
+
pins: (string | number)[];
|
|
2226
2228
|
} | undefined;
|
|
2227
2229
|
rightSide?: {
|
|
2228
2230
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2229
|
-
pins: string
|
|
2231
|
+
pins: (string | number)[];
|
|
2230
2232
|
} | undefined;
|
|
2231
2233
|
bottomSide?: {
|
|
2232
2234
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2233
|
-
pins: string
|
|
2235
|
+
pins: (string | number)[];
|
|
2234
2236
|
} | undefined;
|
|
2235
2237
|
leftPinCount?: number | undefined;
|
|
2236
2238
|
rightPinCount?: number | undefined;
|
|
@@ -2519,44 +2521,44 @@ declare const bugProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extend
|
|
|
2519
2521
|
topPinCount: z.ZodOptional<z.ZodNumber>;
|
|
2520
2522
|
bottomPinCount: z.ZodOptional<z.ZodNumber>;
|
|
2521
2523
|
leftSide: z.ZodOptional<z.ZodObject<{
|
|
2522
|
-
pins: z.
|
|
2524
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
2523
2525
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
2524
2526
|
}, "strip", z.ZodTypeAny, {
|
|
2525
2527
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2526
|
-
pins: string
|
|
2528
|
+
pins: (string | number)[];
|
|
2527
2529
|
}, {
|
|
2528
2530
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2529
|
-
pins: string
|
|
2531
|
+
pins: (string | number)[];
|
|
2530
2532
|
}>>;
|
|
2531
2533
|
rightSide: z.ZodOptional<z.ZodObject<{
|
|
2532
|
-
pins: z.
|
|
2534
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
2533
2535
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
2534
2536
|
}, "strip", z.ZodTypeAny, {
|
|
2535
2537
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2536
|
-
pins: string
|
|
2538
|
+
pins: (string | number)[];
|
|
2537
2539
|
}, {
|
|
2538
2540
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2539
|
-
pins: string
|
|
2541
|
+
pins: (string | number)[];
|
|
2540
2542
|
}>>;
|
|
2541
2543
|
topSide: z.ZodOptional<z.ZodObject<{
|
|
2542
|
-
pins: z.
|
|
2544
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
2543
2545
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
2544
2546
|
}, "strip", z.ZodTypeAny, {
|
|
2545
2547
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2546
|
-
pins: string
|
|
2548
|
+
pins: (string | number)[];
|
|
2547
2549
|
}, {
|
|
2548
2550
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2549
|
-
pins: string
|
|
2551
|
+
pins: (string | number)[];
|
|
2550
2552
|
}>>;
|
|
2551
2553
|
bottomSide: z.ZodOptional<z.ZodObject<{
|
|
2552
|
-
pins: z.
|
|
2554
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
2553
2555
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
2554
2556
|
}, "strip", z.ZodTypeAny, {
|
|
2555
2557
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2556
|
-
pins: string
|
|
2558
|
+
pins: (string | number)[];
|
|
2557
2559
|
}, {
|
|
2558
2560
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2559
|
-
pins: string
|
|
2561
|
+
pins: (string | number)[];
|
|
2560
2562
|
}>>;
|
|
2561
2563
|
}, "strip", z.ZodTypeAny, {
|
|
2562
2564
|
leftSize?: number | undefined;
|
|
@@ -2565,19 +2567,19 @@ declare const bugProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extend
|
|
|
2565
2567
|
bottomSize?: number | undefined;
|
|
2566
2568
|
leftSide?: {
|
|
2567
2569
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2568
|
-
pins: string
|
|
2570
|
+
pins: (string | number)[];
|
|
2569
2571
|
} | undefined;
|
|
2570
2572
|
topSide?: {
|
|
2571
2573
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2572
|
-
pins: string
|
|
2574
|
+
pins: (string | number)[];
|
|
2573
2575
|
} | undefined;
|
|
2574
2576
|
rightSide?: {
|
|
2575
2577
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2576
|
-
pins: string
|
|
2578
|
+
pins: (string | number)[];
|
|
2577
2579
|
} | undefined;
|
|
2578
2580
|
bottomSide?: {
|
|
2579
2581
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2580
|
-
pins: string
|
|
2582
|
+
pins: (string | number)[];
|
|
2581
2583
|
} | undefined;
|
|
2582
2584
|
leftPinCount?: number | undefined;
|
|
2583
2585
|
rightPinCount?: number | undefined;
|
|
@@ -2590,19 +2592,19 @@ declare const bugProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extend
|
|
|
2590
2592
|
bottomSize?: number | undefined;
|
|
2591
2593
|
leftSide?: {
|
|
2592
2594
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2593
|
-
pins: string
|
|
2595
|
+
pins: (string | number)[];
|
|
2594
2596
|
} | undefined;
|
|
2595
2597
|
topSide?: {
|
|
2596
2598
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2597
|
-
pins: string
|
|
2599
|
+
pins: (string | number)[];
|
|
2598
2600
|
} | undefined;
|
|
2599
2601
|
rightSide?: {
|
|
2600
2602
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2601
|
-
pins: string
|
|
2603
|
+
pins: (string | number)[];
|
|
2602
2604
|
} | undefined;
|
|
2603
2605
|
bottomSide?: {
|
|
2604
2606
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2605
|
-
pins: string
|
|
2607
|
+
pins: (string | number)[];
|
|
2606
2608
|
} | undefined;
|
|
2607
2609
|
leftPinCount?: number | undefined;
|
|
2608
2610
|
rightPinCount?: number | undefined;
|
|
@@ -2704,19 +2706,19 @@ declare const bugProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extend
|
|
|
2704
2706
|
bottomSize?: number | undefined;
|
|
2705
2707
|
leftSide?: {
|
|
2706
2708
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2707
|
-
pins: string
|
|
2709
|
+
pins: (string | number)[];
|
|
2708
2710
|
} | undefined;
|
|
2709
2711
|
topSide?: {
|
|
2710
2712
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2711
|
-
pins: string
|
|
2713
|
+
pins: (string | number)[];
|
|
2712
2714
|
} | undefined;
|
|
2713
2715
|
rightSide?: {
|
|
2714
2716
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2715
|
-
pins: string
|
|
2717
|
+
pins: (string | number)[];
|
|
2716
2718
|
} | undefined;
|
|
2717
2719
|
bottomSide?: {
|
|
2718
2720
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2719
|
-
pins: string
|
|
2721
|
+
pins: (string | number)[];
|
|
2720
2722
|
} | undefined;
|
|
2721
2723
|
leftPinCount?: number | undefined;
|
|
2722
2724
|
rightPinCount?: number | undefined;
|
|
@@ -2810,19 +2812,19 @@ declare const bugProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extend
|
|
|
2810
2812
|
bottomSize?: number | undefined;
|
|
2811
2813
|
leftSide?: {
|
|
2812
2814
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2813
|
-
pins: string
|
|
2815
|
+
pins: (string | number)[];
|
|
2814
2816
|
} | undefined;
|
|
2815
2817
|
topSide?: {
|
|
2816
2818
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2817
|
-
pins: string
|
|
2819
|
+
pins: (string | number)[];
|
|
2818
2820
|
} | undefined;
|
|
2819
2821
|
rightSide?: {
|
|
2820
2822
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2821
|
-
pins: string
|
|
2823
|
+
pins: (string | number)[];
|
|
2822
2824
|
} | undefined;
|
|
2823
2825
|
bottomSide?: {
|
|
2824
2826
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2825
|
-
pins: string
|
|
2827
|
+
pins: (string | number)[];
|
|
2826
2828
|
} | undefined;
|
|
2827
2829
|
leftPinCount?: number | undefined;
|
|
2828
2830
|
rightPinCount?: number | undefined;
|
|
@@ -2843,7 +2845,7 @@ type InferredChipProps = z.input<typeof chipProps>;
|
|
|
2843
2845
|
|
|
2844
2846
|
interface JumperProps extends CommonComponentProps {
|
|
2845
2847
|
manufacturerPartNumber?: string;
|
|
2846
|
-
pinLabels?: Record<number | string, string>;
|
|
2848
|
+
pinLabels?: Record<number | string, string | string[]>;
|
|
2847
2849
|
schPinStyle?: SchematicPinStyle;
|
|
2848
2850
|
schPinSpacing?: number | string;
|
|
2849
2851
|
schWidth?: number | string;
|
|
@@ -3109,7 +3111,7 @@ declare const jumperProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.ext
|
|
|
3109
3111
|
symbolName: z.ZodOptional<z.ZodString>;
|
|
3110
3112
|
}>, {
|
|
3111
3113
|
manufacturerPartNumber: z.ZodOptional<z.ZodString>;
|
|
3112
|
-
pinLabels: z.ZodOptional<z.ZodRecord<z.ZodUnion<[z.ZodNumber, z.ZodString]>, z.ZodString
|
|
3114
|
+
pinLabels: z.ZodOptional<z.ZodRecord<z.ZodUnion<[z.ZodNumber, z.ZodString]>, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
|
|
3113
3115
|
schPinStyle: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3114
3116
|
leftMargin: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
3115
3117
|
rightMargin: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -3140,44 +3142,44 @@ declare const jumperProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.ext
|
|
|
3140
3142
|
topPinCount: z.ZodOptional<z.ZodNumber>;
|
|
3141
3143
|
bottomPinCount: z.ZodOptional<z.ZodNumber>;
|
|
3142
3144
|
leftSide: z.ZodOptional<z.ZodObject<{
|
|
3143
|
-
pins: z.
|
|
3145
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
3144
3146
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
3145
3147
|
}, "strip", z.ZodTypeAny, {
|
|
3146
3148
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3147
|
-
pins: string
|
|
3149
|
+
pins: (string | number)[];
|
|
3148
3150
|
}, {
|
|
3149
3151
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3150
|
-
pins: string
|
|
3152
|
+
pins: (string | number)[];
|
|
3151
3153
|
}>>;
|
|
3152
3154
|
rightSide: z.ZodOptional<z.ZodObject<{
|
|
3153
|
-
pins: z.
|
|
3155
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
3154
3156
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
3155
3157
|
}, "strip", z.ZodTypeAny, {
|
|
3156
3158
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3157
|
-
pins: string
|
|
3159
|
+
pins: (string | number)[];
|
|
3158
3160
|
}, {
|
|
3159
3161
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3160
|
-
pins: string
|
|
3162
|
+
pins: (string | number)[];
|
|
3161
3163
|
}>>;
|
|
3162
3164
|
topSide: z.ZodOptional<z.ZodObject<{
|
|
3163
|
-
pins: z.
|
|
3165
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
3164
3166
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
3165
3167
|
}, "strip", z.ZodTypeAny, {
|
|
3166
3168
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3167
|
-
pins: string
|
|
3169
|
+
pins: (string | number)[];
|
|
3168
3170
|
}, {
|
|
3169
3171
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3170
|
-
pins: string
|
|
3172
|
+
pins: (string | number)[];
|
|
3171
3173
|
}>>;
|
|
3172
3174
|
bottomSide: z.ZodOptional<z.ZodObject<{
|
|
3173
|
-
pins: z.
|
|
3175
|
+
pins: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">;
|
|
3174
3176
|
direction: z.ZodUnion<[z.ZodLiteral<"top-to-bottom">, z.ZodLiteral<"left-to-right">, z.ZodLiteral<"bottom-to-top">, z.ZodLiteral<"right-to-left">]>;
|
|
3175
3177
|
}, "strip", z.ZodTypeAny, {
|
|
3176
3178
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3177
|
-
pins: string
|
|
3179
|
+
pins: (string | number)[];
|
|
3178
3180
|
}, {
|
|
3179
3181
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3180
|
-
pins: string
|
|
3182
|
+
pins: (string | number)[];
|
|
3181
3183
|
}>>;
|
|
3182
3184
|
}, "strip", z.ZodTypeAny, {
|
|
3183
3185
|
leftSize?: number | undefined;
|
|
@@ -3186,19 +3188,19 @@ declare const jumperProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.ext
|
|
|
3186
3188
|
bottomSize?: number | undefined;
|
|
3187
3189
|
leftSide?: {
|
|
3188
3190
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3189
|
-
pins: string
|
|
3191
|
+
pins: (string | number)[];
|
|
3190
3192
|
} | undefined;
|
|
3191
3193
|
topSide?: {
|
|
3192
3194
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3193
|
-
pins: string
|
|
3195
|
+
pins: (string | number)[];
|
|
3194
3196
|
} | undefined;
|
|
3195
3197
|
rightSide?: {
|
|
3196
3198
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3197
|
-
pins: string
|
|
3199
|
+
pins: (string | number)[];
|
|
3198
3200
|
} | undefined;
|
|
3199
3201
|
bottomSide?: {
|
|
3200
3202
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3201
|
-
pins: string
|
|
3203
|
+
pins: (string | number)[];
|
|
3202
3204
|
} | undefined;
|
|
3203
3205
|
leftPinCount?: number | undefined;
|
|
3204
3206
|
rightPinCount?: number | undefined;
|
|
@@ -3211,19 +3213,19 @@ declare const jumperProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.ext
|
|
|
3211
3213
|
bottomSize?: number | undefined;
|
|
3212
3214
|
leftSide?: {
|
|
3213
3215
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3214
|
-
pins: string
|
|
3216
|
+
pins: (string | number)[];
|
|
3215
3217
|
} | undefined;
|
|
3216
3218
|
topSide?: {
|
|
3217
3219
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3218
|
-
pins: string
|
|
3220
|
+
pins: (string | number)[];
|
|
3219
3221
|
} | undefined;
|
|
3220
3222
|
rightSide?: {
|
|
3221
3223
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3222
|
-
pins: string
|
|
3224
|
+
pins: (string | number)[];
|
|
3223
3225
|
} | undefined;
|
|
3224
3226
|
bottomSide?: {
|
|
3225
3227
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3226
|
-
pins: string
|
|
3228
|
+
pins: (string | number)[];
|
|
3227
3229
|
} | undefined;
|
|
3228
3230
|
leftPinCount?: number | undefined;
|
|
3229
3231
|
rightPinCount?: number | undefined;
|
|
@@ -3298,7 +3300,7 @@ declare const jumperProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.ext
|
|
|
3298
3300
|
children?: any;
|
|
3299
3301
|
symbolName?: string | undefined;
|
|
3300
3302
|
manufacturerPartNumber?: string | undefined;
|
|
3301
|
-
pinLabels?: Record<string | number, string> | undefined;
|
|
3303
|
+
pinLabels?: Record<string | number, string | string[]> | undefined;
|
|
3302
3304
|
schPortArrangement?: {
|
|
3303
3305
|
leftSize?: number | undefined;
|
|
3304
3306
|
topSize?: number | undefined;
|
|
@@ -3306,19 +3308,19 @@ declare const jumperProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.ext
|
|
|
3306
3308
|
bottomSize?: number | undefined;
|
|
3307
3309
|
leftSide?: {
|
|
3308
3310
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3309
|
-
pins: string
|
|
3311
|
+
pins: (string | number)[];
|
|
3310
3312
|
} | undefined;
|
|
3311
3313
|
topSide?: {
|
|
3312
3314
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3313
|
-
pins: string
|
|
3315
|
+
pins: (string | number)[];
|
|
3314
3316
|
} | undefined;
|
|
3315
3317
|
rightSide?: {
|
|
3316
3318
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3317
|
-
pins: string
|
|
3319
|
+
pins: (string | number)[];
|
|
3318
3320
|
} | undefined;
|
|
3319
3321
|
bottomSide?: {
|
|
3320
3322
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3321
|
-
pins: string
|
|
3323
|
+
pins: (string | number)[];
|
|
3322
3324
|
} | undefined;
|
|
3323
3325
|
leftPinCount?: number | undefined;
|
|
3324
3326
|
rightPinCount?: number | undefined;
|
|
@@ -3405,7 +3407,7 @@ declare const jumperProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.ext
|
|
|
3405
3407
|
children?: any;
|
|
3406
3408
|
symbolName?: string | undefined;
|
|
3407
3409
|
manufacturerPartNumber?: string | undefined;
|
|
3408
|
-
pinLabels?: Record<string | number, string> | undefined;
|
|
3410
|
+
pinLabels?: Record<string | number, string | string[]> | undefined;
|
|
3409
3411
|
schPortArrangement?: {
|
|
3410
3412
|
leftSize?: number | undefined;
|
|
3411
3413
|
topSize?: number | undefined;
|
|
@@ -3413,19 +3415,19 @@ declare const jumperProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.ext
|
|
|
3413
3415
|
bottomSize?: number | undefined;
|
|
3414
3416
|
leftSide?: {
|
|
3415
3417
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3416
|
-
pins: string
|
|
3418
|
+
pins: (string | number)[];
|
|
3417
3419
|
} | undefined;
|
|
3418
3420
|
topSide?: {
|
|
3419
3421
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3420
|
-
pins: string
|
|
3422
|
+
pins: (string | number)[];
|
|
3421
3423
|
} | undefined;
|
|
3422
3424
|
rightSide?: {
|
|
3423
3425
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3424
|
-
pins: string
|
|
3426
|
+
pins: (string | number)[];
|
|
3425
3427
|
} | undefined;
|
|
3426
3428
|
bottomSide?: {
|
|
3427
3429
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
3428
|
-
pins: string
|
|
3430
|
+
pins: (string | number)[];
|
|
3429
3431
|
} | undefined;
|
|
3430
3432
|
leftPinCount?: number | undefined;
|
|
3431
3433
|
rightPinCount?: number | undefined;
|
|
@@ -10176,4 +10178,4 @@ declare const fabricationNotePathProps: z.ZodObject<z.objectUtil.extendShape<Omi
|
|
|
10176
10178
|
}>;
|
|
10177
10179
|
type FabricationNotePathProps = z.input<typeof fabricationNotePathProps>;
|
|
10178
10180
|
|
|
10179
|
-
export { type BaseGroupProps, type BatteryProps, type BoardProps, type CadModelBase, type CadModelJscad, type CadModelObj, type CadModelProp, type CadModelStl, type CapacitorProps, type ChipProps, type CirclePlatedHoleProps, type CircleSmtPadProps, type CircleSolderPasteProps, 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 FootprintPropsInput, type FootprintSoupElements, type GroupProps, type HoleProps, type InductorProps, type InferredChipProps, type InferredConstrainedLayoutProps, type InferredHoleProps, type InferredSmtPadProps, type InferredSolderPasteProps, type JumperProps, type LedProps, type NetAliasProps, type NetProps, type OvalPlatedHoleProps, type PartsEngine, type PcbKeepoutProps, type PcbLayoutProps, type PcbSameXConstraint, type PcbSameYConstraint, type PcbTraceProps, type PcbXDistConstraint, type PcbYDistConstraint, type PillPlatedHoleProps, type PinHeaderProps, type PinSideDefinition, type PlatedHoleProps, type PortHints, type PortProps, type PotentiometerProps, type PowerSourceProps, type PushButtonProps, type RectSmtPadProps, type RectSolderPasteProps, type ResistorProps, type SchematicBoxProps, type SchematicLineProps, type SchematicPathProps, type SchematicPinStyle, type SchematicPortArrangement, type SchematicPortArrangementWithPinCounts, type SchematicPortArrangementWithSides, type SchematicPortArrangementWithSizes, type SchematicTextProps, type SilkscreenCircleProps, type SilkscreenLineProps, type SilkscreenPathProps, type SilkscreenRectProps, type SilkscreenTextProps, type SmtPadProps, type SolderPasteProps, type SubcircuitGroupProps, type SupplierName, type SupplierPartNumbers, type SupplierProps, type SwitchProps, type TraceHintProps, type TraceProps, type ViaProps, baseGroupProps, batteryPins, batteryProps, boardProps, bugProps, cadModelBase, cadModelJscad, cadModelObj, cadModelProp, cadModelStl, capacitorPins, capacitorProps, chipProps, circleSmtPadProps, circleSolderPasteProps, 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, pcbSameXConstraintProps, pcbSameYConstraintProps, pcbTraceProps, pcbXDistConstraintProps, pcbYDistConstraintProps, pinHeaderProps, platedHoleProps, point3, portHints, portProps, portRef, potentiometerPins, potentiometerProps, powerSourceProps, pushButtonProps, rectSmtPadProps, rectSolderPasteProps, resistorPins, resistorProps, rotationPoint3, routeHintPointProps, schematicBoxProps, schematicLineProps, schematicPathProps, schematicPinStyle, schematicPortArrangement, schematicTextProps, silkscreenCircleProps, silkscreenLineProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, solderPasteProps, subcircuitGroupProps, supplierProps, switchProps, traceHintProps, traceProps, viaProps };
|
|
10181
|
+
export { type BaseGroupProps, type BatteryProps, type BoardProps, type CadModelBase, type CadModelJscad, type CadModelObj, type CadModelProp, type CadModelStl, type CapacitorProps, type ChipProps, type CirclePlatedHoleProps, type CircleSmtPadProps, type CircleSolderPasteProps, 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 FootprintPropsInput, type FootprintSoupElements, type GroupProps, type HoleProps, type InductorProps, type InferredChipProps, type InferredConstrainedLayoutProps, type InferredHoleProps, type InferredSmtPadProps, type InferredSolderPasteProps, type JumperProps, type LedProps, type NetAliasProps, type NetProps, type OvalPlatedHoleProps, type PartsEngine, type PcbKeepoutProps, type PcbLayoutProps, type PcbSameXConstraint, type PcbSameYConstraint, type PcbTraceProps, type PcbXDistConstraint, type PcbYDistConstraint, type PillPlatedHoleProps, type PinHeaderProps, type PinLabels, type PinSideDefinition, type PlatedHoleProps, type PortHints, type PortProps, type PotentiometerProps, type PowerSourceProps, type PushButtonProps, type RectSmtPadProps, type RectSolderPasteProps, type ResistorProps, type SchematicBoxProps, type SchematicLineProps, type SchematicPathProps, type SchematicPinStyle, type SchematicPortArrangement, type SchematicPortArrangementWithPinCounts, type SchematicPortArrangementWithSides, type SchematicPortArrangementWithSizes, type SchematicTextProps, type SilkscreenCircleProps, type SilkscreenLineProps, type SilkscreenPathProps, type SilkscreenRectProps, type SilkscreenTextProps, type SmtPadProps, type SolderPasteProps, type SubcircuitGroupProps, type SupplierName, type SupplierPartNumbers, type SupplierProps, type SwitchProps, type TraceHintProps, type TraceProps, type ViaProps, baseGroupProps, batteryPins, batteryProps, boardProps, bugProps, cadModelBase, cadModelJscad, cadModelObj, cadModelProp, cadModelStl, capacitorPins, capacitorProps, chipProps, circleSmtPadProps, circleSolderPasteProps, 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, pcbSameXConstraintProps, pcbSameYConstraintProps, pcbTraceProps, pcbXDistConstraintProps, pcbYDistConstraintProps, pinHeaderProps, pinLabelsProp, platedHoleProps, point3, portHints, portProps, portRef, potentiometerPins, potentiometerProps, powerSourceProps, pushButtonProps, rectSmtPadProps, rectSolderPasteProps, resistorPins, resistorProps, rotationPoint3, routeHintPointProps, schematicBoxProps, schematicLineProps, schematicPathProps, schematicPinStyle, schematicPortArrangement, schematicTextProps, silkscreenCircleProps, silkscreenLineProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, solderPasteProps, subcircuitGroupProps, supplierProps, switchProps, traceHintProps, traceProps, viaProps };
|
package/dist/index.js
CHANGED
|
@@ -69,6 +69,7 @@ __export(lib_exports, {
|
|
|
69
69
|
pcbXDistConstraintProps: () => pcbXDistConstraintProps,
|
|
70
70
|
pcbYDistConstraintProps: () => pcbYDistConstraintProps,
|
|
71
71
|
pinHeaderProps: () => pinHeaderProps,
|
|
72
|
+
pinLabelsProp: () => pinLabelsProp,
|
|
72
73
|
platedHoleProps: () => platedHoleProps,
|
|
73
74
|
point3: () => point3,
|
|
74
75
|
portHints: () => portHints,
|
|
@@ -114,6 +115,7 @@ var expectTypesMatch = (shouldBe) => {
|
|
|
114
115
|
expectTypesMatch("extra props b");
|
|
115
116
|
expectTypesMatch("missing props b");
|
|
116
117
|
expectTypesMatch(true);
|
|
118
|
+
expectTypesMatch("property a has mismatched types");
|
|
117
119
|
|
|
118
120
|
// lib/common/direction.ts
|
|
119
121
|
var import_zod = require("zod");
|
|
@@ -229,7 +231,7 @@ var distanceOrMultiplier = import_circuit_json2.distance.or(import_zod6.z.enum([
|
|
|
229
231
|
// lib/common/schematicPinDefinitions.ts
|
|
230
232
|
var import_zod7 = require("zod");
|
|
231
233
|
var explicitPinSideDefinition = import_zod7.z.object({
|
|
232
|
-
pins: import_zod7.z.array(import_zod7.z.
|
|
234
|
+
pins: import_zod7.z.array(import_zod7.z.union([import_zod7.z.number(), import_zod7.z.string()])),
|
|
233
235
|
direction: import_zod7.z.union([
|
|
234
236
|
import_zod7.z.literal("top-to-bottom"),
|
|
235
237
|
import_zod7.z.literal("left-to-right"),
|
|
@@ -313,6 +315,11 @@ expectTypesMatch(true);
|
|
|
313
315
|
// lib/components/chip.ts
|
|
314
316
|
var import_circuit_json7 = require("circuit-json");
|
|
315
317
|
var import_zod12 = require("zod");
|
|
318
|
+
var pinLabelsProp = import_zod12.z.record(
|
|
319
|
+
import_zod12.z.number().or(import_zod12.z.string()),
|
|
320
|
+
import_zod12.z.string().or(import_zod12.z.array(import_zod12.z.string()).readonly()).or(import_zod12.z.array(import_zod12.z.string()))
|
|
321
|
+
);
|
|
322
|
+
expectTypesMatch(true);
|
|
316
323
|
var chipProps = commonComponentProps.extend({
|
|
317
324
|
manufacturerPartNumber: import_zod12.z.string().optional(),
|
|
318
325
|
pinLabels: import_zod12.z.record(
|
|
@@ -333,7 +340,7 @@ var import_circuit_json8 = require("circuit-json");
|
|
|
333
340
|
var import_zod13 = require("zod");
|
|
334
341
|
var jumperProps = commonComponentProps.extend({
|
|
335
342
|
manufacturerPartNumber: import_zod13.z.string().optional(),
|
|
336
|
-
pinLabels: import_zod13.z.record(import_zod13.z.number().or(import_zod13.z.string()), import_zod13.z.string()).optional(),
|
|
343
|
+
pinLabels: import_zod13.z.record(import_zod13.z.number().or(import_zod13.z.string()), import_zod13.z.string().or(import_zod13.z.array(import_zod13.z.string()))).optional(),
|
|
337
344
|
schPinStyle: schematicPinStyle.optional(),
|
|
338
345
|
schPinSpacing: import_circuit_json8.distance.optional(),
|
|
339
346
|
schWidth: import_circuit_json8.distance.optional(),
|
|
@@ -791,6 +798,7 @@ var fabricationNotePathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcb
|
|
|
791
798
|
pcbXDistConstraintProps,
|
|
792
799
|
pcbYDistConstraintProps,
|
|
793
800
|
pinHeaderProps,
|
|
801
|
+
pinLabelsProp,
|
|
794
802
|
platedHoleProps,
|
|
795
803
|
point3,
|
|
796
804
|
portHints,
|
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/cadModel.ts","../lib/common/point3.ts","../lib/common/footprintProp.ts","../lib/common/schematicPinDefinitions.ts","../lib/common/schematicPinStyle.ts","../lib/components/board.ts","../lib/common/point.ts","../lib/components/group.ts","../lib/components/chip.ts","../lib/components/jumper.ts","../lib/components/platedhole.ts","../lib/components/resistor.ts","../lib/components/potentiometer.ts","../lib/components/capacitor.ts","../lib/components/net.ts","../lib/components/constrainedlayout.ts","../lib/common/distance.ts","../lib/components/constraint.ts","../lib/components/smtpad.ts","../lib/components/solderpaste.ts","../lib/components/hole.ts","../lib/components/trace.ts","../lib/components/footprint.ts","../lib/components/battery.ts","../lib/components/pin-header.ts","../lib/components/netalias.ts","../lib/components/push-button.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 \"circuit-json\"\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\"\nexport * from \"./common/schematicPinStyle\"\nexport * from \"./common/cadModel\"\n\nexport * from \"./components/board\"\nexport * from \"./components/chip\"\nexport * from \"./components/jumper\"\nexport * from \"./components/platedhole\"\n\nexport * from \"./components/resistor\"\nexport * from \"./components/potentiometer\"\nexport * from \"./components/capacitor\"\nexport * from \"./components/group\"\nexport * from \"./components/net\"\nexport * from \"./components/constrainedlayout\"\nexport * from \"./components/constraint\"\nexport * from \"./components/smtpad\"\nexport * from \"./components/solderpaste\"\nexport * from \"./components/hole\"\nexport * from \"./components/trace\"\nexport * from \"./components/footprint\"\nexport * from \"./components/battery\"\nexport * from \"./components/pin-header\"\nexport * from \"./components/netalias\"\nexport * from \"./components/push-button\"\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 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 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 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 color: z.string().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 color: z.string().optional(),\n })\nexport type FabricationNotePathProps = z.input<typeof fabricationNotePathProps>\n","import type { TypeEqual } from \"ts-expect\"\n\ntype IsNever<T> = [T] extends [never] ? true : false\n\nexport const expectTypesMatch = <\n const T1,\n const T2,\n T3 = Exclude<keyof T1, keyof T2>,\n T4 = Exclude<keyof T2, keyof T1>,\n>(\n shouldBe: IsNever<T3> extends true\n ? IsNever<T4> extends true\n ? TypeEqual<T1, T2>\n : `extra props ${T4 extends string ? T4 : \"\"}`\n : `missing props ${T3 extends string ? T3 : \"\"}`,\n): void => {}\n\n// ------ TESTS -------\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n b: number\n }\n>(\"extra props b\")\n\nexpectTypesMatch<\n {\n a: number\n b: number\n },\n {\n a: number\n }\n>(\"missing props b\")\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n }\n>(true)\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 {\n type LayerRefInput,\n distance,\n layer_ref,\n rotation,\n supplier_name,\n} from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { type CadModelProp, cadModelProp } from \"./cadModel\"\nimport { type Footprint, footprintProp } from \"./footprintProp\"\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.optional(),\n pcbY: distance.optional(),\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 type SupplierPartNumbers = { [k in SupplierName]?: string[] }\nexport interface SupplierProps {\n supplierPartNumbers?: SupplierPartNumbers\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 key?: any\n name: string\n supplierPartNumbers?: SupplierPartNumbers\n cadModel?: CadModelProp\n children?: any\n symbolName?: string\n}\n\nexport const commonComponentProps = commonLayoutProps\n .merge(supplierProps)\n .extend({\n key: z.any().optional(),\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 { 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 { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n","import type { LayerRef } from \"circuit-json\"\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[] | string[]\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 interface SchematicPortArrangement\n extends SchematicPortArrangementWithSizes,\n SchematicPortArrangementWithSides,\n SchematicPortArrangementWithPinCounts {}\n\nexport const explicitPinSideDefinition = z.object({\n pins: z.array(z.number()).or(z.array(z.string())),\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.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.number().optional().describe(\"@deprecated, use bottomPinCount\"),\n leftPinCount: z.number().optional(),\n rightPinCount: z.number().optional(),\n topPinCount: z.number().optional(),\n bottomPinCount: z.number().optional(),\n leftSide: explicitPinSideDefinition.optional(),\n rightSide: explicitPinSideDefinition.optional(),\n topSide: explicitPinSideDefinition.optional(),\n bottomSide: explicitPinSideDefinition.optional(),\n})\n\nexpectTypesMatch<\n SchematicPortArrangement,\n z.input<typeof schematicPortArrangement>\n>(true)\n","import { distance } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\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 type { LayoutBuilder, ManualEditFile } from \"@tscircuit/layout\"\nimport { distance } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport { type Point, point } from \"lib/common/point\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { subcircuitGroupProps, type SubcircuitGroupProps } from \"./group\"\n\nexport interface BoardProps extends Omit<SubcircuitGroupProps, \"subcircuit\"> {\n width?: number | string\n height?: number | string\n outline?: Point[]\n}\n\nexport const boardProps = subcircuitGroupProps\n .omit({ subcircuit: true })\n .extend({\n width: distance.optional(),\n height: distance.optional(),\n outline: z.array(point).optional(),\n })\n\ntype InferredBoardProps = z.input<typeof boardProps>\nexpectTypesMatch<BoardProps, InferredBoardProps>(true)\n","import { distance } from \"circuit-json\"\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 type { LayoutBuilder, ManualEditFile } from \"@tscircuit/layout\"\nimport { length } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonLayoutProps,\n commonLayoutProps,\n type SupplierPartNumbers,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport type { AnySourceComponent } from \"circuit-json\"\n\nexport interface BaseGroupProps extends CommonLayoutProps {\n name?: string\n children?: any\n}\n\nexport type PartsEngine = {\n findPart: (params: {\n sourceComponent: AnySourceComponent\n footprinterString?: string\n }) => Promise<SupplierPartNumbers> | SupplierPartNumbers\n}\n\nexport interface SubcircuitGroupProps extends BaseGroupProps {\n subcircuit: true\n layout?: LayoutBuilder\n manualEdits?: ManualEditFile\n routingDisabled?: boolean\n defaultTraceWidth?: Distance\n minTraceWidth?: Distance\n\n /**\n * If true, we'll automatically layout the schematic for this group. Must be\n * a subcircuit (currently). This is eventually going to be replaced with more\n * sophisticated layout options/modes and will be enabled by default.\n */\n schAutoLayoutEnabled?: boolean\n\n partsEngine?: PartsEngine\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 manualEdits: z.custom<ManualEditFile>((v) => true).optional(),\n schAutoLayoutEnabled: z.boolean().optional(),\n routingDisabled: z.boolean().optional(),\n defaultTraceWidth: length.optional(),\n minTraceWidth: length.optional(),\n partsEngine: z.custom<PartsEngine>((v) => \"findPart\" in v).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 { distance } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ChipProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string | readonly 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\n .record(\n z.number().or(z.string()),\n z.string().or(z.array(z.string()).readonly()),\n )\n .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 { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\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 { distance } from \"circuit-json\"\nimport type { PcbLayoutProps } from \"lib/common/layout\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { type PortHints, portHints } from \"lib/common/portHints\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface CirclePlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n shape: \"circle\"\n holeDiameter: number | string\n outerDiameter: number | string\n portHints?: PortHints\n}\n\nexport interface OvalPlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n shape: \"oval\"\n outerWidth: number | string\n outerHeight: number | string\n innerWidth: number | string\n innerHeight: number | string\n portHints?: PortHints\n}\n\nexport interface PillPlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n shape: \"pill\"\n outerWidth: number | string\n outerHeight: number | string\n innerWidth: number | string\n innerHeight: number | string\n portHints?: PortHints\n}\n\nexport type PlatedHoleProps =\n | CirclePlatedHoleProps\n | OvalPlatedHoleProps\n | PillPlatedHoleProps\n\nexport const platedHoleProps = z.discriminatedUnion(\"shape\", [\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\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 name: z.string().optional(),\n shape: z.literal(\"oval\"),\n outerWidth: distance,\n outerHeight: distance,\n innerWidth: distance,\n innerHeight: distance,\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n shape: z.literal(\"pill\"),\n outerWidth: distance,\n outerHeight: distance,\n innerWidth: distance,\n innerHeight: distance,\n portHints: portHints.optional(),\n }),\n])\n\ntype InferredPlatedHoleProps = z.input<typeof platedHoleProps>\nexpectTypesMatch<PlatedHoleProps, InferredPlatedHoleProps>(true)\n","import { resistance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\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 { resistance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { z } from \"zod\"\n\nexport interface PotentiometerProps extends CommonComponentProps {\n maxResistance: number | string\n}\n\nexport const potentiometerProps = commonComponentProps.extend({\n maxResistance: resistance,\n})\nexport const potentiometerPins = lrPins\n\ntype InferredPotentiometerProps = z.input<typeof potentiometerProps>\nexpectTypesMatch<PotentiometerProps, InferredPotentiometerProps>(true)\n","import { capacitance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPolarPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface CapacitorProps extends CommonComponentProps {\n capacitance: number | string\n polarized?: boolean\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 polarized: z.boolean().optional().default(false),\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 { 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, length } from \"circuit-json\"\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 xDist: Distance\n\n /**\n * Selector for left component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 leftedge\", \".R1 center\"\n */\n left: string\n\n /**\n * Selector for right component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 leftedge\", \".R1 center\"\n */\n right: string\n\n /**\n * If true, the provided distance is the distance between the closest edges of\n * the left and right components\n */\n edgeToEdge?: true\n\n /**\n * If true, the provided distance is the distance between the centers of the\n * left and right components\n */\n centerToCenter?: true\n}\n\nexport type PcbYDistConstraint = {\n pcb?: true\n yDist: Distance\n\n /**\n * Selector for top component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 topedge\", \".R1 center\"\n */\n top: string\n\n /**\n * Selector for bottom component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 bottomedge\", \".R1 center\"\n */\n bottom: string\n\n edgeToEdge?: true\n centerToCenter?: true\n}\n\nexport type PcbSameYConstraint = {\n pcb?: true\n sameY?: true\n\n /**\n * Selector for components, e.g. [\".U1\", \".R1\"], you can also specify the\n * edge or center of the component e.g. [\".R1 leftedge\", \".U1 center\"]\n */\n for: string[]\n}\n\nexport type PcbSameXConstraint = {\n pcb?: true\n sameX?: true\n /**\n * Selector for components, e.g. [\".U1\", \".R1\"], you can also specify the\n * edge or center of the component e.g. [\".R1 leftedge\", \".U1 center\"]\n */\n for: string[]\n}\n\nexport type ConstraintProps =\n | PcbXDistConstraint\n | PcbYDistConstraint\n | PcbSameYConstraint\n | PcbSameXConstraint\n\n// -----------------------------------------------------------------------------\n// Zod\n// -----------------------------------------------------------------------------\n\nexport const pcbXDistConstraintProps = z.object({\n pcb: z.literal(true).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})\nexpectTypesMatch<PcbXDistConstraint, z.input<typeof pcbXDistConstraintProps>>(\n true,\n)\n\nexport const pcbYDistConstraintProps = z.object({\n pcb: z.literal(true).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})\nexpectTypesMatch<PcbYDistConstraint, z.input<typeof pcbYDistConstraintProps>>(\n true,\n)\n\nexport const pcbSameYConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n sameY: z.literal(true).optional(),\n for: z.array(z.string()),\n})\nexpectTypesMatch<PcbSameYConstraint, z.input<typeof pcbSameYConstraintProps>>(\n true,\n)\n\nexport const pcbSameXConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n sameX: z.literal(true).optional(),\n for: z.array(z.string()),\n})\nexpectTypesMatch<PcbSameXConstraint, z.input<typeof pcbSameXConstraintProps>>(\n true,\n)\n\nexport const constraintProps = z.union([\n pcbXDistConstraintProps,\n pcbYDistConstraintProps,\n pcbSameYConstraintProps,\n pcbSameXConstraintProps,\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","import { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { boolean, string, z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface RectSolderPasteProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"rect\"\n width: Distance\n height: Distance\n}\n\nexport interface CircleSolderPasteProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"circle\"\n radius: Distance\n}\n\nexport type SolderPasteProps = RectSolderPasteProps | CircleSolderPasteProps\n\n// zod\n\nexport const rectSolderPasteProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n })\ntype InferredRectSolderPasteProps = z.input<typeof rectSolderPasteProps>\nexpectTypesMatch<InferredRectSolderPasteProps, RectSolderPasteProps>(true)\n\nexport const circleSolderPasteProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n })\ntype InferredCircleSolderPasteProps = z.input<typeof circleSolderPasteProps>\nexpectTypesMatch<InferredCircleSolderPasteProps, CircleSolderPasteProps>(true)\n\nexport const solderPasteProps = z.union([\n circleSolderPasteProps,\n rectSolderPasteProps,\n])\n\nexport type InferredSolderPasteProps = z.input<typeof solderPasteProps>\nexpectTypesMatch<InferredSolderPasteProps, SolderPasteProps>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface HoleProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n name?: string\n diameter?: Distance\n radius?: Distance\n}\n\nexport const holeProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n name: z.string().optional(),\n diameter: distance.optional(),\n radius: distance.optional(),\n })\n .transform((d) => ({\n ...d,\n diameter: d.diameter ?? 2 * d.radius!,\n radius: d.radius ?? d.diameter! / 2,\n }))\n\nexport type InferredHoleProps = z.input<typeof holeProps>\n\nexpectTypesMatch<HoleProps, InferredHoleProps>(true)\n","import { distance, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { point } from \"../common/point\"\n\nexport const portRef = z.union([\n z.string(),\n z.custom<{ getPortSelector: () => string }>((v) =>\n Boolean(v.getPortSelector),\n ),\n])\n\nconst baseTraceProps = z.object({\n key: z.string().optional(),\n thickness: distance.optional(),\n schematicRouteHints: z.array(point).optional(),\n pcbRouteHints: z.array(route_hint_point).optional(),\n})\n\nexport const traceProps = z.union([\n baseTraceProps.extend({\n path: z.array(portRef),\n }),\n baseTraceProps.extend({\n from: portRef,\n to: portRef,\n }),\n])\n\nexport type TraceProps = z.input<typeof traceProps>\n","import { type LayerRef, layer_ref } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface FootprintProps {\n /**\n * The layer that the footprint is designed for. If you set this to \"top\"\n * then it means the children were intended to represent the top layer. If\n * the <chip /> with this footprint is moved to the bottom layer, then the\n * components will be mirrored.\n *\n * Generally, you shouldn't set this except where it can help prevent\n * confusion because you have a complex multi-layer footprint. Default is\n * \"top\" and this is most intuitive.\n */\n originalLayer?: LayerRef\n}\n\nexport const footprintProps = z.object({\n originalLayer: layer_ref.default(\"top\").optional(),\n})\n\nexport type FootprintPropsInput = z.input<typeof footprintProps>\ntype InferredFootprintProps = z.infer<typeof footprintProps>\nexpectTypesMatch<InferredFootprintProps, FootprintProps>(true)\n","import { z } from \"zod\"\nimport {\n commonComponentProps,\n lrPins,\n lrPolarPins,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\n/** @deprecated use battery_capacity from circuit-json when circuit-json is updated */\nconst capacity = z\n .number()\n .or(z.string().endsWith(\"mAh\"))\n .transform((v) => {\n if (typeof v === \"string\") {\n const valString = v.replace(\"mAh\", \"\")\n const num = Number.parseFloat(valString)\n if (Number.isNaN(num)) {\n throw new Error(\"Invalid capacity\")\n }\n return num\n }\n return v\n })\n .describe(\"Battery capacity in mAh\")\n\nexport interface BatteryProps extends CommonComponentProps {\n capacity?: number | string\n}\n\nexport const batteryProps = commonComponentProps.extend({\n capacity: capacity.optional(),\n})\nexport const batteryPins = lrPolarPins\n\nexpectTypesMatch<BatteryProps, z.input<typeof batteryProps>>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface PinHeaderProps extends CommonComponentProps {\n /**\n * Number of pins in the header\n */\n pinCount: number\n\n /**\n * Distance between pins\n */\n pitch?: number | string\n\n /**\n * Whether the header is male or female\n */\n gender?: \"male\" | \"female\"\n\n /**\n * Whether to show pin labels in silkscreen\n */\n showSilkscreenPinLabels?: boolean\n\n /**\n * Whether the header has two rows of pins\n */\n doubleRow?: boolean\n\n /**\n * Diameter of the through-hole for each pin\n */\n holeDiameter?: number | string\n\n /**\n * Diameter of the plated area around each hole\n */\n platedDiameter?: number | string\n\n /**\n * Labels for each pin\n */\n pinLabels?: string[]\n\n /**\n * Direction the header is facing\n */\n facingDirection?: \"left\" | \"right\"\n}\n\nexport const pinHeaderProps = commonComponentProps.extend({\n pinCount: z.number(),\n pitch: distance.optional(),\n gender: z.enum([\"male\", \"female\"]).optional(),\n showSilkscreenPinLabels: z.boolean().optional(),\n doubleRow: z.boolean().optional(),\n holeDiameter: distance.optional(),\n platedDiameter: distance.optional(),\n pinLabels: z.array(z.string()).optional(),\n facingDirection: z.enum([\"left\", \"right\"]).optional(),\n})\n\ntype InferredPinHeaderProps = z.input<typeof pinHeaderProps>\nexpectTypesMatch<PinHeaderProps, InferredPinHeaderProps>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { distance } from \"lib/common/distance\"\nimport { rotation } from \"circuit-json\"\n\nexport interface NetAliasProps {\n net?: string\n schX?: number | string\n schY?: number | string\n schRotation?: number | string\n anchorSide?: \"left\" | \"up\" | \"right\" | \"down\"\n}\n\nexport const netAliasProps = z.object({\n net: z.string().optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n anchorSide: z.enum([\"left\", \"up\", \"right\", \"down\"]).optional(),\n})\n\ntype InferredNetAliasProps = z.input<typeof netAliasProps>\nexpectTypesMatch<NetAliasProps, InferredNetAliasProps>(true)\n","import { commonComponentProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const pushButtonProps = commonComponentProps.extend({})\nexport type PushButtonProps = z.input<typeof pushButtonProps>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;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,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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,IAAAC,wBAeO;AAEP,IAAAC,eAAkB;;;ACtBX,IAAM,mBAAmB,CAM9B,aAKS;AAAC;AAIZ,iBAQE,eAAe;AAEjB,iBAQE,iBAAiB;AAEnB,iBAOE,IAAI;;;AC7CN,iBAAkB;AACX,IAAM,YAAY,aAAE,KAAK,CAAC,MAAM,QAAQ,QAAQ,OAAO,CAAC;AASxD,IAAM,qBAAqB,aAAE,KAAK;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,iBAAuD,IAAI;AAC3D,iBAAyE,IAAI;;;ACnB7E,IAAAC,cAAkB;AAGX,IAAM,YAAY,cAAE,MAAM,cAAE,OAAO,EAAE,GAAG,cAAE,OAAO,CAAC,CAAC;AAG1D,iBAAuD,IAAI;;;ACN3D,IAAAC,uBAMO;AAEP,IAAAC,cAAkB;;;ACRl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AAE,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,6BAAO,SAAS;AAAA,EAC1B,OAAO,eAAE,OAAO,EAAE,SAAS;AAC7B,CAAC;AAGM,IAAM,2BAA2B,eACrC,KAAK,EAAE,MAAM,MAAM,MAAM,MAAM,aAAa,KAAK,CAAC,EAClD,OAAO;AAAA,EACN,OAAO,eAAE,MAAM,sCAAgB;AAAA,EAC/B,aAAa,6BAAO,SAAS;AAAA,EAC7B,OAAO,eAAE,OAAO,EAAE,SAAS;AAC7B,CAAC;","names":["distanceOrMultiplier","import_circuit_json","import_zod","import_zod","import_circuit_json","import_zod","import_zod","import_zod","import_zod","import_zod","import_circuit_json","import_zod","import_circuit_json","import_circuit_json","import_zod","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_circuit_json","import_circuit_json","import_zod","import_zod","import_zod","import_zod","import_circuit_json","import_zod","import_zod","import_zod","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_zod","import_circuit_json","import_zod","import_zod","import_circuit_json","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/cadModel.ts","../lib/common/point3.ts","../lib/common/footprintProp.ts","../lib/common/schematicPinDefinitions.ts","../lib/common/schematicPinStyle.ts","../lib/components/board.ts","../lib/common/point.ts","../lib/components/group.ts","../lib/components/chip.ts","../lib/components/jumper.ts","../lib/components/platedhole.ts","../lib/components/resistor.ts","../lib/components/potentiometer.ts","../lib/components/capacitor.ts","../lib/components/net.ts","../lib/components/constrainedlayout.ts","../lib/common/distance.ts","../lib/components/constraint.ts","../lib/components/smtpad.ts","../lib/components/solderpaste.ts","../lib/components/hole.ts","../lib/components/trace.ts","../lib/components/footprint.ts","../lib/components/battery.ts","../lib/components/pin-header.ts","../lib/components/netalias.ts","../lib/components/push-button.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 \"circuit-json\"\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\"\nexport * from \"./common/schematicPinStyle\"\nexport * from \"./common/cadModel\"\n\nexport * from \"./components/board\"\nexport * from \"./components/chip\"\nexport * from \"./components/jumper\"\nexport * from \"./components/platedhole\"\n\nexport * from \"./components/resistor\"\nexport * from \"./components/potentiometer\"\nexport * from \"./components/capacitor\"\nexport * from \"./components/group\"\nexport * from \"./components/net\"\nexport * from \"./components/constrainedlayout\"\nexport * from \"./components/constraint\"\nexport * from \"./components/smtpad\"\nexport * from \"./components/solderpaste\"\nexport * from \"./components/hole\"\nexport * from \"./components/trace\"\nexport * from \"./components/footprint\"\nexport * from \"./components/battery\"\nexport * from \"./components/pin-header\"\nexport * from \"./components/netalias\"\nexport * from \"./components/push-button\"\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 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 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 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 color: z.string().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 color: z.string().optional(),\n })\nexport type FabricationNotePathProps = z.input<typeof fabricationNotePathProps>\n","import type { TypeEqual } from \"ts-expect\"\n\ntype IsNever<T> = [T] extends [never] ? true : false\n\ntype GetMismatchedProps<T1, T2> = {\n [K in keyof T1 & keyof T2]: T1[K] extends T2[K]\n ? T2[K] extends T1[K]\n ? never\n : K\n : K\n}[keyof T1 & keyof T2]\n\nexport const expectTypesMatch = <\n const T1,\n const T2,\n T3 = Exclude<keyof T1, keyof T2>,\n T4 = Exclude<keyof T2, keyof T1>,\n T5 = GetMismatchedProps<T1, T2>,\n>(\n shouldBe: IsNever<T3> extends true\n ? IsNever<T4> extends true\n ? IsNever<T5> extends true\n ? TypeEqual<T1, T2>\n : `property ${T5 extends string ? T5 : \"\"} has mismatched types`\n : `extra props ${T4 extends string ? T4 : \"\"}`\n : `missing props ${T3 extends string ? T3 : \"\"}`,\n): void => {}\n\n// ------ TESTS -------\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n b: number\n }\n>(\"extra props b\")\n\nexpectTypesMatch<\n {\n a: number\n b: number\n },\n {\n a: number\n }\n>(\"missing props b\")\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: number\n }\n>(true)\n\nexpectTypesMatch<\n {\n a: number\n },\n {\n a: string\n }\n>(\"property a has mismatched types\")\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 {\n type LayerRefInput,\n distance,\n layer_ref,\n rotation,\n supplier_name,\n} from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { type CadModelProp, cadModelProp } from \"./cadModel\"\nimport { type Footprint, footprintProp } from \"./footprintProp\"\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.optional(),\n pcbY: distance.optional(),\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 type SupplierPartNumbers = { [k in SupplierName]?: string[] }\nexport interface SupplierProps {\n supplierPartNumbers?: SupplierPartNumbers\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 key?: any\n name: string\n supplierPartNumbers?: SupplierPartNumbers\n cadModel?: CadModelProp\n children?: any\n symbolName?: string\n}\n\nexport const commonComponentProps = commonLayoutProps\n .merge(supplierProps)\n .extend({\n key: z.any().optional(),\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 { 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 { distance } from \"circuit-json\"\nimport { z } from \"zod\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n","import type { LayerRef } from \"circuit-json\"\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: Array<number | string>\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 interface SchematicPortArrangement\n extends SchematicPortArrangementWithSizes,\n SchematicPortArrangementWithSides,\n SchematicPortArrangementWithPinCounts {}\n\nexport const explicitPinSideDefinition = z.object({\n pins: z.array(z.union([z.number(), z.string()])),\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.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.number().optional().describe(\"@deprecated, use bottomPinCount\"),\n leftPinCount: z.number().optional(),\n rightPinCount: z.number().optional(),\n topPinCount: z.number().optional(),\n bottomPinCount: z.number().optional(),\n leftSide: explicitPinSideDefinition.optional(),\n rightSide: explicitPinSideDefinition.optional(),\n topSide: explicitPinSideDefinition.optional(),\n bottomSide: explicitPinSideDefinition.optional(),\n})\n\nexpectTypesMatch<\n SchematicPortArrangement,\n z.input<typeof schematicPortArrangement>\n>(true)\n","import { distance } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\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 type { LayoutBuilder, ManualEditFile } from \"@tscircuit/layout\"\nimport { distance } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport { type Point, point } from \"lib/common/point\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { subcircuitGroupProps, type SubcircuitGroupProps } from \"./group\"\n\nexport interface BoardProps extends Omit<SubcircuitGroupProps, \"subcircuit\"> {\n width?: number | string\n height?: number | string\n outline?: Point[]\n}\n\nexport const boardProps = subcircuitGroupProps\n .omit({ subcircuit: true })\n .extend({\n width: distance.optional(),\n height: distance.optional(),\n outline: z.array(point).optional(),\n })\n\ntype InferredBoardProps = z.input<typeof boardProps>\nexpectTypesMatch<BoardProps, InferredBoardProps>(true)\n","import { distance } from \"circuit-json\"\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 type { LayoutBuilder, ManualEditFile } from \"@tscircuit/layout\"\nimport { length } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonLayoutProps,\n commonLayoutProps,\n type SupplierPartNumbers,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport type { AnySourceComponent } from \"circuit-json\"\n\nexport interface BaseGroupProps extends CommonLayoutProps {\n name?: string\n children?: any\n}\n\nexport type PartsEngine = {\n findPart: (params: {\n sourceComponent: AnySourceComponent\n footprinterString?: string\n }) => Promise<SupplierPartNumbers> | SupplierPartNumbers\n}\n\nexport interface SubcircuitGroupProps extends BaseGroupProps {\n subcircuit: true\n layout?: LayoutBuilder\n manualEdits?: ManualEditFile\n routingDisabled?: boolean\n defaultTraceWidth?: Distance\n minTraceWidth?: Distance\n\n /**\n * If true, we'll automatically layout the schematic for this group. Must be\n * a subcircuit (currently). This is eventually going to be replaced with more\n * sophisticated layout options/modes and will be enabled by default.\n */\n schAutoLayoutEnabled?: boolean\n\n partsEngine?: PartsEngine\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 manualEdits: z.custom<ManualEditFile>((v) => true).optional(),\n schAutoLayoutEnabled: z.boolean().optional(),\n routingDisabled: z.boolean().optional(),\n defaultTraceWidth: length.optional(),\n minTraceWidth: length.optional(),\n partsEngine: z.custom<PartsEngine>((v) => \"findPart\" in v).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 { distance } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface ChipProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, string | readonly string[]>\n schPortArrangement?: SchematicPortArrangement\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: Distance\n schWidth?: Distance\n schHeight?: Distance\n}\n\nexport type PinLabels = Record<\n number | string,\n string | readonly string[] | string[]\n>\n\nexport const pinLabelsProp = z.record(\n z.number().or(z.string()),\n z.string().or(z.array(z.string()).readonly()).or(z.array(z.string())),\n)\n\nexpectTypesMatch<PinLabels, z.input<typeof pinLabelsProp>>(true)\n\nexport const chipProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: z\n .record(\n z.number().or(z.string()),\n z.string().or(z.array(z.string()).readonly()),\n )\n .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 { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface JumperProps extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: Record<number | string, 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\n .record(z.number().or(z.string()), z.string().or(z.array(z.string())))\n .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 { distance } from \"circuit-json\"\nimport type { PcbLayoutProps } from \"lib/common/layout\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { type PortHints, portHints } from \"lib/common/portHints\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface CirclePlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n shape: \"circle\"\n holeDiameter: number | string\n outerDiameter: number | string\n portHints?: PortHints\n}\n\nexport interface OvalPlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n shape: \"oval\"\n outerWidth: number | string\n outerHeight: number | string\n innerWidth: number | string\n innerHeight: number | string\n portHints?: PortHints\n}\n\nexport interface PillPlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n shape: \"pill\"\n outerWidth: number | string\n outerHeight: number | string\n innerWidth: number | string\n innerHeight: number | string\n portHints?: PortHints\n}\n\nexport type PlatedHoleProps =\n | CirclePlatedHoleProps\n | OvalPlatedHoleProps\n | PillPlatedHoleProps\n\nexport const platedHoleProps = z.discriminatedUnion(\"shape\", [\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\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 name: z.string().optional(),\n shape: z.literal(\"oval\"),\n outerWidth: distance,\n outerHeight: distance,\n innerWidth: distance,\n innerHeight: distance,\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n shape: z.literal(\"pill\"),\n outerWidth: distance,\n outerHeight: distance,\n innerWidth: distance,\n innerHeight: distance,\n portHints: portHints.optional(),\n }),\n])\n\ntype InferredPlatedHoleProps = z.input<typeof platedHoleProps>\nexpectTypesMatch<PlatedHoleProps, InferredPlatedHoleProps>(true)\n","import { resistance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\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 { resistance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { z } from \"zod\"\n\nexport interface PotentiometerProps extends CommonComponentProps {\n maxResistance: number | string\n}\n\nexport const potentiometerProps = commonComponentProps.extend({\n maxResistance: resistance,\n})\nexport const potentiometerPins = lrPins\n\ntype InferredPotentiometerProps = z.input<typeof potentiometerProps>\nexpectTypesMatch<PotentiometerProps, InferredPotentiometerProps>(true)\n","import { capacitance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPolarPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface CapacitorProps extends CommonComponentProps {\n capacitance: number | string\n polarized?: boolean\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 polarized: z.boolean().optional().default(false),\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 { 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, length } from \"circuit-json\"\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 xDist: Distance\n\n /**\n * Selector for left component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 leftedge\", \".R1 center\"\n */\n left: string\n\n /**\n * Selector for right component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 leftedge\", \".R1 center\"\n */\n right: string\n\n /**\n * If true, the provided distance is the distance between the closest edges of\n * the left and right components\n */\n edgeToEdge?: true\n\n /**\n * If true, the provided distance is the distance between the centers of the\n * left and right components\n */\n centerToCenter?: true\n}\n\nexport type PcbYDistConstraint = {\n pcb?: true\n yDist: Distance\n\n /**\n * Selector for top component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 topedge\", \".R1 center\"\n */\n top: string\n\n /**\n * Selector for bottom component, e.g. \".U1\" or \".R1\", you can also specify the\n * edge or center of the component e.g. \".R1 bottomedge\", \".R1 center\"\n */\n bottom: string\n\n edgeToEdge?: true\n centerToCenter?: true\n}\n\nexport type PcbSameYConstraint = {\n pcb?: true\n sameY?: true\n\n /**\n * Selector for components, e.g. [\".U1\", \".R1\"], you can also specify the\n * edge or center of the component e.g. [\".R1 leftedge\", \".U1 center\"]\n */\n for: string[]\n}\n\nexport type PcbSameXConstraint = {\n pcb?: true\n sameX?: true\n /**\n * Selector for components, e.g. [\".U1\", \".R1\"], you can also specify the\n * edge or center of the component e.g. [\".R1 leftedge\", \".U1 center\"]\n */\n for: string[]\n}\n\nexport type ConstraintProps =\n | PcbXDistConstraint\n | PcbYDistConstraint\n | PcbSameYConstraint\n | PcbSameXConstraint\n\n// -----------------------------------------------------------------------------\n// Zod\n// -----------------------------------------------------------------------------\n\nexport const pcbXDistConstraintProps = z.object({\n pcb: z.literal(true).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})\nexpectTypesMatch<PcbXDistConstraint, z.input<typeof pcbXDistConstraintProps>>(\n true,\n)\n\nexport const pcbYDistConstraintProps = z.object({\n pcb: z.literal(true).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})\nexpectTypesMatch<PcbYDistConstraint, z.input<typeof pcbYDistConstraintProps>>(\n true,\n)\n\nexport const pcbSameYConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n sameY: z.literal(true).optional(),\n for: z.array(z.string()),\n})\nexpectTypesMatch<PcbSameYConstraint, z.input<typeof pcbSameYConstraintProps>>(\n true,\n)\n\nexport const pcbSameXConstraintProps = z.object({\n pcb: z.literal(true).optional(),\n sameX: z.literal(true).optional(),\n for: z.array(z.string()),\n})\nexpectTypesMatch<PcbSameXConstraint, z.input<typeof pcbSameXConstraintProps>>(\n true,\n)\n\nexport const constraintProps = z.union([\n pcbXDistConstraintProps,\n pcbYDistConstraintProps,\n pcbSameYConstraintProps,\n pcbSameXConstraintProps,\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","import { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { boolean, string, z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface RectSolderPasteProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"rect\"\n width: Distance\n height: Distance\n}\n\nexport interface CircleSolderPasteProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"circle\"\n radius: Distance\n}\n\nexport type SolderPasteProps = RectSolderPasteProps | CircleSolderPasteProps\n\n// zod\n\nexport const rectSolderPasteProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n })\ntype InferredRectSolderPasteProps = z.input<typeof rectSolderPasteProps>\nexpectTypesMatch<InferredRectSolderPasteProps, RectSolderPasteProps>(true)\n\nexport const circleSolderPasteProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"circle\"),\n radius: distance,\n })\ntype InferredCircleSolderPasteProps = z.input<typeof circleSolderPasteProps>\nexpectTypesMatch<InferredCircleSolderPasteProps, CircleSolderPasteProps>(true)\n\nexport const solderPasteProps = z.union([\n circleSolderPasteProps,\n rectSolderPasteProps,\n])\n\nexport type InferredSolderPasteProps = z.input<typeof solderPasteProps>\nexpectTypesMatch<InferredSolderPasteProps, SolderPasteProps>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface HoleProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n name?: string\n diameter?: Distance\n radius?: Distance\n}\n\nexport const holeProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n name: z.string().optional(),\n diameter: distance.optional(),\n radius: distance.optional(),\n })\n .transform((d) => ({\n ...d,\n diameter: d.diameter ?? 2 * d.radius!,\n radius: d.radius ?? d.diameter! / 2,\n }))\n\nexport type InferredHoleProps = z.input<typeof holeProps>\n\nexpectTypesMatch<HoleProps, InferredHoleProps>(true)\n","import { distance, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { point } from \"../common/point\"\n\nexport const portRef = z.union([\n z.string(),\n z.custom<{ getPortSelector: () => string }>((v) =>\n Boolean(v.getPortSelector),\n ),\n])\n\nconst baseTraceProps = z.object({\n key: z.string().optional(),\n thickness: distance.optional(),\n schematicRouteHints: z.array(point).optional(),\n pcbRouteHints: z.array(route_hint_point).optional(),\n})\n\nexport const traceProps = z.union([\n baseTraceProps.extend({\n path: z.array(portRef),\n }),\n baseTraceProps.extend({\n from: portRef,\n to: portRef,\n }),\n])\n\nexport type TraceProps = z.input<typeof traceProps>\n","import { type LayerRef, layer_ref } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface FootprintProps {\n /**\n * The layer that the footprint is designed for. If you set this to \"top\"\n * then it means the children were intended to represent the top layer. If\n * the <chip /> with this footprint is moved to the bottom layer, then the\n * components will be mirrored.\n *\n * Generally, you shouldn't set this except where it can help prevent\n * confusion because you have a complex multi-layer footprint. Default is\n * \"top\" and this is most intuitive.\n */\n originalLayer?: LayerRef\n}\n\nexport const footprintProps = z.object({\n originalLayer: layer_ref.default(\"top\").optional(),\n})\n\nexport type FootprintPropsInput = z.input<typeof footprintProps>\ntype InferredFootprintProps = z.infer<typeof footprintProps>\nexpectTypesMatch<InferredFootprintProps, FootprintProps>(true)\n","import { z } from \"zod\"\nimport {\n commonComponentProps,\n lrPins,\n lrPolarPins,\n type CommonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\n/** @deprecated use battery_capacity from circuit-json when circuit-json is updated */\nconst capacity = z\n .number()\n .or(z.string().endsWith(\"mAh\"))\n .transform((v) => {\n if (typeof v === \"string\") {\n const valString = v.replace(\"mAh\", \"\")\n const num = Number.parseFloat(valString)\n if (Number.isNaN(num)) {\n throw new Error(\"Invalid capacity\")\n }\n return num\n }\n return v\n })\n .describe(\"Battery capacity in mAh\")\n\nexport interface BatteryProps extends CommonComponentProps {\n capacity?: number | string\n}\n\nexport const batteryProps = commonComponentProps.extend({\n capacity: capacity.optional(),\n})\nexport const batteryPins = lrPolarPins\n\nexpectTypesMatch<BatteryProps, z.input<typeof batteryProps>>(true)\n","import { distance } from \"circuit-json\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface PinHeaderProps extends CommonComponentProps {\n /**\n * Number of pins in the header\n */\n pinCount: number\n\n /**\n * Distance between pins\n */\n pitch?: number | string\n\n /**\n * Whether the header is male or female\n */\n gender?: \"male\" | \"female\"\n\n /**\n * Whether to show pin labels in silkscreen\n */\n showSilkscreenPinLabels?: boolean\n\n /**\n * Whether the header has two rows of pins\n */\n doubleRow?: boolean\n\n /**\n * Diameter of the through-hole for each pin\n */\n holeDiameter?: number | string\n\n /**\n * Diameter of the plated area around each hole\n */\n platedDiameter?: number | string\n\n /**\n * Labels for each pin\n */\n pinLabels?: string[]\n\n /**\n * Direction the header is facing\n */\n facingDirection?: \"left\" | \"right\"\n}\n\nexport const pinHeaderProps = commonComponentProps.extend({\n pinCount: z.number(),\n pitch: distance.optional(),\n gender: z.enum([\"male\", \"female\"]).optional(),\n showSilkscreenPinLabels: z.boolean().optional(),\n doubleRow: z.boolean().optional(),\n holeDiameter: distance.optional(),\n platedDiameter: distance.optional(),\n pinLabels: z.array(z.string()).optional(),\n facingDirection: z.enum([\"left\", \"right\"]).optional(),\n})\n\ntype InferredPinHeaderProps = z.input<typeof pinHeaderProps>\nexpectTypesMatch<PinHeaderProps, InferredPinHeaderProps>(true)\n","import { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { distance } from \"lib/common/distance\"\nimport { rotation } from \"circuit-json\"\n\nexport interface NetAliasProps {\n net?: string\n schX?: number | string\n schY?: number | string\n schRotation?: number | string\n anchorSide?: \"left\" | \"up\" | \"right\" | \"down\"\n}\n\nexport const netAliasProps = z.object({\n net: z.string().optional(),\n schX: distance.optional(),\n schY: distance.optional(),\n schRotation: rotation.optional(),\n anchorSide: z.enum([\"left\", \"up\", \"right\", \"down\"]).optional(),\n})\n\ntype InferredNetAliasProps = z.input<typeof netAliasProps>\nexpectTypesMatch<NetAliasProps, InferredNetAliasProps>(true)\n","import { commonComponentProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const pushButtonProps = commonComponentProps.extend({})\nexport type PushButtonProps = z.input<typeof pushButtonProps>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;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,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;A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rC,KAAK,EAAE,MAAM,MAAM,MAAM,MAAM,aAAa,KAAK,CAAC,EAClD,OAAO;AAAA,EACN,OAAO,eAAE,MAAM,sCAAgB;AAAA,EAC/B,aAAa,6BAAO,SAAS;AAAA,EAC7B,OAAO,eAAE,OAAO,EAAE,SAAS;AAC7B,CAAC;","names":["distanceOrMultiplier","import_circuit_json","import_zod","import_zod","import_circuit_json","import_zod","import_zod","import_zod","import_zod","import_zod","import_circuit_json","import_zod","import_circuit_json","import_circuit_json","import_zod","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_circuit_json","import_circuit_json","import_zod","import_zod","import_zod","import_zod","import_circuit_json","import_zod","import_zod","import_zod","import_zod","import_circuit_json","import_zod","import_circuit_json","import_zod","import_zod","import_circuit_json","import_zod","import_zod","import_circuit_json","import_zod","distanceOrMultiplier"]}
|
|
@@ -22,7 +22,7 @@ export interface SchematicPortArrangementWithPinCounts {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export interface PinSideDefinition {
|
|
25
|
-
pins: number
|
|
25
|
+
pins: Array<number | string>
|
|
26
26
|
direction:
|
|
27
27
|
| "top-to-bottom"
|
|
28
28
|
| "left-to-right"
|
|
@@ -43,7 +43,7 @@ export interface SchematicPortArrangement
|
|
|
43
43
|
SchematicPortArrangementWithPinCounts {}
|
|
44
44
|
|
|
45
45
|
export const explicitPinSideDefinition = z.object({
|
|
46
|
-
pins: z.array(z.
|
|
46
|
+
pins: z.array(z.union([z.number(), z.string()])),
|
|
47
47
|
direction: z.union([
|
|
48
48
|
z.literal("top-to-bottom"),
|
|
49
49
|
z.literal("left-to-right"),
|
package/lib/components/chip.ts
CHANGED
|
@@ -25,6 +25,18 @@ export interface ChipProps extends CommonComponentProps {
|
|
|
25
25
|
schHeight?: Distance
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
export type PinLabels = Record<
|
|
29
|
+
number | string,
|
|
30
|
+
string | readonly string[] | string[]
|
|
31
|
+
>
|
|
32
|
+
|
|
33
|
+
export const pinLabelsProp = z.record(
|
|
34
|
+
z.number().or(z.string()),
|
|
35
|
+
z.string().or(z.array(z.string()).readonly()).or(z.array(z.string())),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
expectTypesMatch<PinLabels, z.input<typeof pinLabelsProp>>(true)
|
|
39
|
+
|
|
28
40
|
export const chipProps = commonComponentProps.extend({
|
|
29
41
|
manufacturerPartNumber: z.string().optional(),
|
|
30
42
|
pinLabels: z
|
package/lib/components/jumper.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { z } from "zod"
|
|
|
16
16
|
|
|
17
17
|
export interface JumperProps extends CommonComponentProps {
|
|
18
18
|
manufacturerPartNumber?: string
|
|
19
|
-
pinLabels?: Record<number | string, string>
|
|
19
|
+
pinLabels?: Record<number | string, string | string[]>
|
|
20
20
|
schPinStyle?: SchematicPinStyle
|
|
21
21
|
schPinSpacing?: number | string
|
|
22
22
|
schWidth?: number | string
|
|
@@ -27,7 +27,9 @@ export interface JumperProps extends CommonComponentProps {
|
|
|
27
27
|
|
|
28
28
|
export const jumperProps = commonComponentProps.extend({
|
|
29
29
|
manufacturerPartNumber: z.string().optional(),
|
|
30
|
-
pinLabels: z
|
|
30
|
+
pinLabels: z
|
|
31
|
+
.record(z.number().or(z.string()), z.string().or(z.array(z.string())))
|
|
32
|
+
.optional(),
|
|
31
33
|
schPinStyle: schematicPinStyle.optional(),
|
|
32
34
|
schPinSpacing: distance.optional(),
|
|
33
35
|
schWidth: distance.optional(),
|
package/lib/typecheck.ts
CHANGED
|
@@ -2,15 +2,26 @@ import type { TypeEqual } from "ts-expect"
|
|
|
2
2
|
|
|
3
3
|
type IsNever<T> = [T] extends [never] ? true : false
|
|
4
4
|
|
|
5
|
+
type GetMismatchedProps<T1, T2> = {
|
|
6
|
+
[K in keyof T1 & keyof T2]: T1[K] extends T2[K]
|
|
7
|
+
? T2[K] extends T1[K]
|
|
8
|
+
? never
|
|
9
|
+
: K
|
|
10
|
+
: K
|
|
11
|
+
}[keyof T1 & keyof T2]
|
|
12
|
+
|
|
5
13
|
export const expectTypesMatch = <
|
|
6
14
|
const T1,
|
|
7
15
|
const T2,
|
|
8
16
|
T3 = Exclude<keyof T1, keyof T2>,
|
|
9
17
|
T4 = Exclude<keyof T2, keyof T1>,
|
|
18
|
+
T5 = GetMismatchedProps<T1, T2>,
|
|
10
19
|
>(
|
|
11
20
|
shouldBe: IsNever<T3> extends true
|
|
12
21
|
? IsNever<T4> extends true
|
|
13
|
-
?
|
|
22
|
+
? IsNever<T5> extends true
|
|
23
|
+
? TypeEqual<T1, T2>
|
|
24
|
+
: `property ${T5 extends string ? T5 : ""} has mismatched types`
|
|
14
25
|
: `extra props ${T4 extends string ? T4 : ""}`
|
|
15
26
|
: `missing props ${T3 extends string ? T3 : ""}`,
|
|
16
27
|
): void => {}
|
|
@@ -45,3 +56,12 @@ expectTypesMatch<
|
|
|
45
56
|
a: number
|
|
46
57
|
}
|
|
47
58
|
>(true)
|
|
59
|
+
|
|
60
|
+
expectTypesMatch<
|
|
61
|
+
{
|
|
62
|
+
a: number
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
a: string
|
|
66
|
+
}
|
|
67
|
+
>("property a has mismatched types")
|