@tscircuit/props 0.0.227 → 0.0.228
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 +7 -1
- package/dist/index.js +110 -107
- package/dist/index.js.map +1 -1
- package/lib/components/inductor.ts +18 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -19366,6 +19366,10 @@ declare const mosfetProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.ext
|
|
|
19366
19366
|
}>;
|
|
19367
19367
|
declare const mosfetPins: readonly ["pin1", "drain", "pin2", "source", "pin3", "gate"];
|
|
19368
19368
|
|
|
19369
|
+
interface InductorProps extends CommonComponentProps {
|
|
19370
|
+
inductance: number | string;
|
|
19371
|
+
maxCurrentRating?: number | string;
|
|
19372
|
+
}
|
|
19369
19373
|
declare const inductorProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
19370
19374
|
pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
19371
19375
|
pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -19625,6 +19629,7 @@ declare const inductorProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.e
|
|
|
19625
19629
|
doNotPlace: z.ZodOptional<z.ZodBoolean>;
|
|
19626
19630
|
}>, {
|
|
19627
19631
|
inductance: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
19632
|
+
maxCurrentRating: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
19628
19633
|
}>, "strip", z.ZodTypeAny, {
|
|
19629
19634
|
name: string;
|
|
19630
19635
|
inductance: number;
|
|
@@ -19694,6 +19699,7 @@ declare const inductorProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.e
|
|
|
19694
19699
|
children?: any;
|
|
19695
19700
|
symbolName?: string | undefined;
|
|
19696
19701
|
doNotPlace?: boolean | undefined;
|
|
19702
|
+
maxCurrentRating?: string | number | undefined;
|
|
19697
19703
|
}, {
|
|
19698
19704
|
name: string;
|
|
19699
19705
|
inductance: string | number;
|
|
@@ -19765,9 +19771,9 @@ declare const inductorProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.e
|
|
|
19765
19771
|
children?: any;
|
|
19766
19772
|
symbolName?: string | undefined;
|
|
19767
19773
|
doNotPlace?: boolean | undefined;
|
|
19774
|
+
maxCurrentRating?: string | number | undefined;
|
|
19768
19775
|
}>;
|
|
19769
19776
|
declare const inductorPins: readonly ["pin1", "left", "pin2", "right"];
|
|
19770
|
-
type InductorProps = z.input<typeof inductorProps>;
|
|
19771
19777
|
|
|
19772
19778
|
declare const diodeProps: z.ZodEffects<z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
19773
19779
|
pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
package/dist/index.js
CHANGED
|
@@ -1003,14 +1003,17 @@ expectTypesMatch(true);
|
|
|
1003
1003
|
|
|
1004
1004
|
// lib/components/inductor.ts
|
|
1005
1005
|
import { inductance } from "circuit-json";
|
|
1006
|
+
import { z as z54 } from "zod";
|
|
1006
1007
|
var inductorProps = commonComponentProps.extend({
|
|
1007
|
-
inductance
|
|
1008
|
+
inductance,
|
|
1009
|
+
maxCurrentRating: z54.union([z54.string(), z54.number()]).optional()
|
|
1008
1010
|
});
|
|
1009
1011
|
var inductorPins = lrPins;
|
|
1012
|
+
expectTypesMatch(true);
|
|
1010
1013
|
|
|
1011
1014
|
// lib/components/diode.ts
|
|
1012
|
-
import { z as
|
|
1013
|
-
var diodeConnectionKeys =
|
|
1015
|
+
import { z as z55 } from "zod";
|
|
1016
|
+
var diodeConnectionKeys = z55.enum([
|
|
1014
1017
|
"anode",
|
|
1015
1018
|
"cathode",
|
|
1016
1019
|
"pin1",
|
|
@@ -1018,17 +1021,17 @@ var diodeConnectionKeys = z54.enum([
|
|
|
1018
1021
|
"pos",
|
|
1019
1022
|
"neg"
|
|
1020
1023
|
]);
|
|
1021
|
-
var connectionTarget3 =
|
|
1022
|
-
var connectionsProp2 =
|
|
1023
|
-
var diodeVariant =
|
|
1024
|
+
var connectionTarget3 = z55.string().or(z55.array(z55.string()).readonly()).or(z55.array(z55.string()));
|
|
1025
|
+
var connectionsProp2 = z55.record(diodeConnectionKeys, connectionTarget3);
|
|
1026
|
+
var diodeVariant = z55.enum(["standard", "schottky", "zener", "photo", "tvs"]);
|
|
1024
1027
|
var diodeProps = commonComponentProps.extend({
|
|
1025
1028
|
connections: connectionsProp2.optional(),
|
|
1026
1029
|
variant: diodeVariant.optional().default("standard"),
|
|
1027
|
-
standard:
|
|
1028
|
-
schottky:
|
|
1029
|
-
zener:
|
|
1030
|
-
photo:
|
|
1031
|
-
tvs:
|
|
1030
|
+
standard: z55.boolean().optional(),
|
|
1031
|
+
schottky: z55.boolean().optional(),
|
|
1032
|
+
zener: z55.boolean().optional(),
|
|
1033
|
+
photo: z55.boolean().optional(),
|
|
1034
|
+
tvs: z55.boolean().optional()
|
|
1032
1035
|
}).superRefine((data, ctx) => {
|
|
1033
1036
|
const enabledFlags = [
|
|
1034
1037
|
data.standard,
|
|
@@ -1039,11 +1042,11 @@ var diodeProps = commonComponentProps.extend({
|
|
|
1039
1042
|
].filter(Boolean).length;
|
|
1040
1043
|
if (enabledFlags > 1) {
|
|
1041
1044
|
ctx.addIssue({
|
|
1042
|
-
code:
|
|
1045
|
+
code: z55.ZodIssueCode.custom,
|
|
1043
1046
|
message: "Exactly one diode variant must be enabled",
|
|
1044
1047
|
path: []
|
|
1045
1048
|
});
|
|
1046
|
-
return
|
|
1049
|
+
return z55.INVALID;
|
|
1047
1050
|
}
|
|
1048
1051
|
}).transform((data) => {
|
|
1049
1052
|
const result = {
|
|
@@ -1091,23 +1094,23 @@ var diodePins = lrPolarPins;
|
|
|
1091
1094
|
expectTypesMatch(true);
|
|
1092
1095
|
|
|
1093
1096
|
// lib/components/led.ts
|
|
1094
|
-
import { z as
|
|
1097
|
+
import { z as z56 } from "zod";
|
|
1095
1098
|
var ledProps = commonComponentProps.extend({
|
|
1096
|
-
color:
|
|
1097
|
-
wavelength:
|
|
1098
|
-
schDisplayValue:
|
|
1099
|
+
color: z56.string().optional(),
|
|
1100
|
+
wavelength: z56.string().optional(),
|
|
1101
|
+
schDisplayValue: z56.string().optional()
|
|
1099
1102
|
});
|
|
1100
1103
|
var ledPins = lrPolarPins;
|
|
1101
1104
|
|
|
1102
1105
|
// lib/components/switch.ts
|
|
1103
|
-
import { z as
|
|
1106
|
+
import { z as z57 } from "zod";
|
|
1104
1107
|
var switchProps = commonComponentProps.extend({
|
|
1105
|
-
type:
|
|
1106
|
-
isNormallyClosed:
|
|
1107
|
-
spst:
|
|
1108
|
-
spdt:
|
|
1109
|
-
dpst:
|
|
1110
|
-
dpdt:
|
|
1108
|
+
type: z57.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
|
|
1109
|
+
isNormallyClosed: z57.boolean().optional().default(false),
|
|
1110
|
+
spst: z57.boolean().optional(),
|
|
1111
|
+
spdt: z57.boolean().optional(),
|
|
1112
|
+
dpst: z57.boolean().optional(),
|
|
1113
|
+
dpdt: z57.boolean().optional()
|
|
1111
1114
|
}).transform((props) => {
|
|
1112
1115
|
const updatedProps = { ...props };
|
|
1113
1116
|
if (updatedProps.dpdt) {
|
|
@@ -1139,31 +1142,31 @@ expectTypesMatch(true);
|
|
|
1139
1142
|
|
|
1140
1143
|
// lib/components/fabrication-note-text.ts
|
|
1141
1144
|
import { length as length3 } from "circuit-json";
|
|
1142
|
-
import { z as
|
|
1145
|
+
import { z as z58 } from "zod";
|
|
1143
1146
|
var fabricationNoteTextProps = pcbLayoutProps.extend({
|
|
1144
|
-
text:
|
|
1145
|
-
anchorAlignment:
|
|
1146
|
-
font:
|
|
1147
|
+
text: z58.string(),
|
|
1148
|
+
anchorAlignment: z58.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
1149
|
+
font: z58.enum(["tscircuit2024"]).optional(),
|
|
1147
1150
|
fontSize: length3.optional(),
|
|
1148
|
-
color:
|
|
1151
|
+
color: z58.string().optional()
|
|
1149
1152
|
});
|
|
1150
1153
|
|
|
1151
1154
|
// lib/components/fabrication-note-path.ts
|
|
1152
1155
|
import { length as length4, route_hint_point as route_hint_point3 } from "circuit-json";
|
|
1153
|
-
import { z as
|
|
1156
|
+
import { z as z59 } from "zod";
|
|
1154
1157
|
var fabricationNotePathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
|
|
1155
|
-
route:
|
|
1158
|
+
route: z59.array(route_hint_point3),
|
|
1156
1159
|
strokeWidth: length4.optional(),
|
|
1157
|
-
color:
|
|
1160
|
+
color: z59.string().optional()
|
|
1158
1161
|
});
|
|
1159
1162
|
|
|
1160
1163
|
// lib/components/pcb-trace.ts
|
|
1161
1164
|
import { distance as distance15, route_hint_point as route_hint_point4 } from "circuit-json";
|
|
1162
|
-
import { z as
|
|
1163
|
-
var pcbTraceProps =
|
|
1164
|
-
layer:
|
|
1165
|
+
import { z as z60 } from "zod";
|
|
1166
|
+
var pcbTraceProps = z60.object({
|
|
1167
|
+
layer: z60.string().optional(),
|
|
1165
1168
|
thickness: distance15.optional(),
|
|
1166
|
-
route:
|
|
1169
|
+
route: z60.array(route_hint_point4)
|
|
1167
1170
|
});
|
|
1168
1171
|
|
|
1169
1172
|
// lib/components/via.ts
|
|
@@ -1177,10 +1180,10 @@ var viaProps = commonLayoutProps.extend({
|
|
|
1177
1180
|
|
|
1178
1181
|
// lib/components/testpoint.ts
|
|
1179
1182
|
import { distance as distance17 } from "circuit-json";
|
|
1180
|
-
import { z as
|
|
1183
|
+
import { z as z61 } from "zod";
|
|
1181
1184
|
var testpointProps = commonComponentProps.extend({
|
|
1182
|
-
footprintVariant:
|
|
1183
|
-
padShape:
|
|
1185
|
+
footprintVariant: z61.enum(["pad", "through_hole"]).optional(),
|
|
1186
|
+
padShape: z61.enum(["rect", "circle"]).optional().default("circle"),
|
|
1184
1187
|
padDiameter: distance17.optional(),
|
|
1185
1188
|
holeDiameter: distance17.optional(),
|
|
1186
1189
|
width: distance17.optional(),
|
|
@@ -1192,22 +1195,22 @@ var testpointProps = commonComponentProps.extend({
|
|
|
1192
1195
|
expectTypesMatch(true);
|
|
1193
1196
|
|
|
1194
1197
|
// lib/components/breakoutpoint.ts
|
|
1195
|
-
import { z as
|
|
1198
|
+
import { z as z62 } from "zod";
|
|
1196
1199
|
var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
1197
|
-
connection:
|
|
1200
|
+
connection: z62.string()
|
|
1198
1201
|
});
|
|
1199
1202
|
expectTypesMatch(true);
|
|
1200
1203
|
|
|
1201
1204
|
// lib/components/pcb-keepout.ts
|
|
1202
1205
|
import { distance as distance18 } from "circuit-json";
|
|
1203
|
-
import { z as
|
|
1204
|
-
var pcbKeepoutProps =
|
|
1206
|
+
import { z as z63 } from "zod";
|
|
1207
|
+
var pcbKeepoutProps = z63.union([
|
|
1205
1208
|
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
1206
|
-
shape:
|
|
1209
|
+
shape: z63.literal("circle"),
|
|
1207
1210
|
radius: distance18
|
|
1208
1211
|
}),
|
|
1209
1212
|
pcbLayoutProps.extend({
|
|
1210
|
-
shape:
|
|
1213
|
+
shape: z63.literal("rect"),
|
|
1211
1214
|
width: distance18,
|
|
1212
1215
|
height: distance18
|
|
1213
1216
|
})
|
|
@@ -1221,11 +1224,11 @@ var powerSourceProps = commonComponentProps.extend({
|
|
|
1221
1224
|
|
|
1222
1225
|
// lib/components/schematic-box.ts
|
|
1223
1226
|
import { distance as distance19 } from "circuit-json";
|
|
1224
|
-
import { z as
|
|
1227
|
+
import { z as z65 } from "zod";
|
|
1225
1228
|
|
|
1226
1229
|
// lib/common/ninePointAnchor.ts
|
|
1227
|
-
import { z as
|
|
1228
|
-
var ninePointAnchor =
|
|
1230
|
+
import { z as z64 } from "zod";
|
|
1231
|
+
var ninePointAnchor = z64.enum([
|
|
1229
1232
|
"top_left",
|
|
1230
1233
|
"top_center",
|
|
1231
1234
|
"top_right",
|
|
@@ -1238,23 +1241,23 @@ var ninePointAnchor = z63.enum([
|
|
|
1238
1241
|
]);
|
|
1239
1242
|
|
|
1240
1243
|
// lib/components/schematic-box.ts
|
|
1241
|
-
var schematicBoxProps =
|
|
1244
|
+
var schematicBoxProps = z65.object({
|
|
1242
1245
|
schX: distance19,
|
|
1243
1246
|
schY: distance19,
|
|
1244
1247
|
width: distance19.optional(),
|
|
1245
1248
|
height: distance19.optional(),
|
|
1246
|
-
overlay:
|
|
1249
|
+
overlay: z65.array(z65.string()).optional(),
|
|
1247
1250
|
padding: distance19.optional(),
|
|
1248
1251
|
paddingLeft: distance19.optional(),
|
|
1249
1252
|
paddingRight: distance19.optional(),
|
|
1250
1253
|
paddingTop: distance19.optional(),
|
|
1251
1254
|
paddingBottom: distance19.optional(),
|
|
1252
|
-
title:
|
|
1255
|
+
title: z65.string().optional(),
|
|
1253
1256
|
titleAlignment: ninePointAnchor.default("center"),
|
|
1254
|
-
titleColor:
|
|
1257
|
+
titleColor: z65.string().optional(),
|
|
1255
1258
|
titleFontSize: distance19.optional(),
|
|
1256
|
-
titleInside:
|
|
1257
|
-
strokeStyle:
|
|
1259
|
+
titleInside: z65.boolean().default(false),
|
|
1260
|
+
strokeStyle: z65.enum(["solid", "dashed"]).default("solid")
|
|
1258
1261
|
}).refine(
|
|
1259
1262
|
(elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
|
|
1260
1263
|
{
|
|
@@ -1269,8 +1272,8 @@ var schematicBoxProps = z64.object({
|
|
|
1269
1272
|
|
|
1270
1273
|
// lib/components/schematic-line.ts
|
|
1271
1274
|
import { distance as distance20 } from "circuit-json";
|
|
1272
|
-
import { z as
|
|
1273
|
-
var schematicLineProps =
|
|
1275
|
+
import { z as z66 } from "zod";
|
|
1276
|
+
var schematicLineProps = z66.object({
|
|
1274
1277
|
x1: distance20,
|
|
1275
1278
|
y1: distance20,
|
|
1276
1279
|
x2: distance20,
|
|
@@ -1279,11 +1282,11 @@ var schematicLineProps = z65.object({
|
|
|
1279
1282
|
|
|
1280
1283
|
// lib/components/schematic-text.ts
|
|
1281
1284
|
import { distance as distance21, rotation as rotation4 } from "circuit-json";
|
|
1282
|
-
import { z as
|
|
1285
|
+
import { z as z68 } from "zod";
|
|
1283
1286
|
|
|
1284
1287
|
// lib/common/fivePointAnchor.ts
|
|
1285
|
-
import { z as
|
|
1286
|
-
var fivePointAnchor =
|
|
1288
|
+
import { z as z67 } from "zod";
|
|
1289
|
+
var fivePointAnchor = z67.enum([
|
|
1287
1290
|
"center",
|
|
1288
1291
|
"left",
|
|
1289
1292
|
"right",
|
|
@@ -1292,40 +1295,40 @@ var fivePointAnchor = z66.enum([
|
|
|
1292
1295
|
]);
|
|
1293
1296
|
|
|
1294
1297
|
// lib/components/schematic-text.ts
|
|
1295
|
-
var schematicTextProps =
|
|
1298
|
+
var schematicTextProps = z68.object({
|
|
1296
1299
|
schX: distance21,
|
|
1297
1300
|
schY: distance21,
|
|
1298
|
-
text:
|
|
1299
|
-
fontSize:
|
|
1300
|
-
anchor:
|
|
1301
|
-
color:
|
|
1301
|
+
text: z68.string(),
|
|
1302
|
+
fontSize: z68.number().default(1),
|
|
1303
|
+
anchor: z68.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
1304
|
+
color: z68.string().default("#000000"),
|
|
1302
1305
|
schRotation: rotation4.default(0)
|
|
1303
1306
|
});
|
|
1304
1307
|
|
|
1305
1308
|
// lib/components/schematic-path.ts
|
|
1306
1309
|
import { point as point5 } from "circuit-json";
|
|
1307
|
-
import { z as
|
|
1308
|
-
var schematicPathProps =
|
|
1309
|
-
points:
|
|
1310
|
-
isFilled:
|
|
1311
|
-
fillColor:
|
|
1310
|
+
import { z as z69 } from "zod";
|
|
1311
|
+
var schematicPathProps = z69.object({
|
|
1312
|
+
points: z69.array(point5),
|
|
1313
|
+
isFilled: z69.boolean().optional().default(false),
|
|
1314
|
+
fillColor: z69.enum(["red", "blue"]).optional()
|
|
1312
1315
|
});
|
|
1313
1316
|
|
|
1314
1317
|
// lib/components/silkscreen-text.ts
|
|
1315
1318
|
import { length as length5 } from "circuit-json";
|
|
1316
|
-
import { z as
|
|
1319
|
+
import { z as z70 } from "zod";
|
|
1317
1320
|
var silkscreenTextProps = pcbLayoutProps.extend({
|
|
1318
|
-
text:
|
|
1321
|
+
text: z70.string(),
|
|
1319
1322
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
1320
|
-
font:
|
|
1323
|
+
font: z70.enum(["tscircuit2024"]).optional(),
|
|
1321
1324
|
fontSize: length5.optional()
|
|
1322
1325
|
});
|
|
1323
1326
|
|
|
1324
1327
|
// lib/components/silkscreen-path.ts
|
|
1325
1328
|
import { length as length6, route_hint_point as route_hint_point5 } from "circuit-json";
|
|
1326
|
-
import { z as
|
|
1329
|
+
import { z as z71 } from "zod";
|
|
1327
1330
|
var silkscreenPathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
|
|
1328
|
-
route:
|
|
1331
|
+
route: z71.array(route_hint_point5),
|
|
1329
1332
|
strokeWidth: length6.optional()
|
|
1330
1333
|
});
|
|
1331
1334
|
|
|
@@ -1341,10 +1344,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotat
|
|
|
1341
1344
|
|
|
1342
1345
|
// lib/components/silkscreen-rect.ts
|
|
1343
1346
|
import { distance as distance23 } from "circuit-json";
|
|
1344
|
-
import { z as
|
|
1347
|
+
import { z as z72 } from "zod";
|
|
1345
1348
|
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
1346
|
-
filled:
|
|
1347
|
-
stroke:
|
|
1349
|
+
filled: z72.boolean().default(true).optional(),
|
|
1350
|
+
stroke: z72.enum(["dashed", "solid", "none"]).optional(),
|
|
1348
1351
|
strokeWidth: distance23.optional(),
|
|
1349
1352
|
width: distance23,
|
|
1350
1353
|
height: distance23
|
|
@@ -1352,60 +1355,60 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
1352
1355
|
|
|
1353
1356
|
// lib/components/silkscreen-circle.ts
|
|
1354
1357
|
import { distance as distance24 } from "circuit-json";
|
|
1355
|
-
import { z as
|
|
1358
|
+
import { z as z73 } from "zod";
|
|
1356
1359
|
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
1357
|
-
isFilled:
|
|
1358
|
-
isOutline:
|
|
1360
|
+
isFilled: z73.boolean().optional(),
|
|
1361
|
+
isOutline: z73.boolean().optional(),
|
|
1359
1362
|
strokeWidth: distance24.optional(),
|
|
1360
1363
|
radius: distance24
|
|
1361
1364
|
});
|
|
1362
1365
|
|
|
1363
1366
|
// lib/components/trace-hint.ts
|
|
1364
1367
|
import { distance as distance25, layer_ref as layer_ref6, route_hint_point as route_hint_point6 } from "circuit-json";
|
|
1365
|
-
import { z as
|
|
1366
|
-
var routeHintPointProps =
|
|
1368
|
+
import { z as z74 } from "zod";
|
|
1369
|
+
var routeHintPointProps = z74.object({
|
|
1367
1370
|
x: distance25,
|
|
1368
1371
|
y: distance25,
|
|
1369
|
-
via:
|
|
1372
|
+
via: z74.boolean().optional(),
|
|
1370
1373
|
toLayer: layer_ref6.optional()
|
|
1371
1374
|
});
|
|
1372
|
-
var traceHintProps =
|
|
1373
|
-
for:
|
|
1375
|
+
var traceHintProps = z74.object({
|
|
1376
|
+
for: z74.string().optional().describe(
|
|
1374
1377
|
"Selector for the port you're targeting, not required if you're inside a trace"
|
|
1375
1378
|
),
|
|
1376
|
-
order:
|
|
1379
|
+
order: z74.number().optional(),
|
|
1377
1380
|
offset: route_hint_point6.or(routeHintPointProps).optional(),
|
|
1378
|
-
offsets:
|
|
1379
|
-
traceWidth:
|
|
1381
|
+
offsets: z74.array(route_hint_point6).or(z74.array(routeHintPointProps)).optional(),
|
|
1382
|
+
traceWidth: z74.number().optional()
|
|
1380
1383
|
});
|
|
1381
1384
|
|
|
1382
1385
|
// lib/components/port.ts
|
|
1383
|
-
import { z as
|
|
1386
|
+
import { z as z75 } from "zod";
|
|
1384
1387
|
var portProps = commonLayoutProps.extend({
|
|
1385
|
-
name:
|
|
1386
|
-
pinNumber:
|
|
1387
|
-
aliases:
|
|
1388
|
+
name: z75.string(),
|
|
1389
|
+
pinNumber: z75.number().optional(),
|
|
1390
|
+
aliases: z75.array(z75.string()).optional(),
|
|
1388
1391
|
direction
|
|
1389
1392
|
});
|
|
1390
1393
|
|
|
1391
1394
|
// lib/platformConfig.ts
|
|
1392
|
-
import { z as
|
|
1393
|
-
var unvalidatedCircuitJson =
|
|
1394
|
-
var pathToCircuitJsonFn =
|
|
1395
|
-
var platformConfig =
|
|
1395
|
+
import { z as z76 } from "zod";
|
|
1396
|
+
var unvalidatedCircuitJson = z76.array(z76.any()).describe("Circuit JSON");
|
|
1397
|
+
var pathToCircuitJsonFn = z76.function().args(z76.string()).returns(z76.promise(z76.object({ footprintCircuitJson: z76.array(z76.any()) }))).describe("A function that takes a path and returns Circuit JSON");
|
|
1398
|
+
var platformConfig = z76.object({
|
|
1396
1399
|
partsEngine: partsEngine.optional(),
|
|
1397
1400
|
autorouter: autorouterProp.optional(),
|
|
1398
|
-
registryApiUrl:
|
|
1399
|
-
cloudAutorouterUrl:
|
|
1400
|
-
localCacheEngine:
|
|
1401
|
-
pcbDisabled:
|
|
1402
|
-
schematicDisabled:
|
|
1403
|
-
partsEngineDisabled:
|
|
1404
|
-
footprintLibraryMap:
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1401
|
+
registryApiUrl: z76.string().optional(),
|
|
1402
|
+
cloudAutorouterUrl: z76.string().optional(),
|
|
1403
|
+
localCacheEngine: z76.any().optional(),
|
|
1404
|
+
pcbDisabled: z76.boolean().optional(),
|
|
1405
|
+
schematicDisabled: z76.boolean().optional(),
|
|
1406
|
+
partsEngineDisabled: z76.boolean().optional(),
|
|
1407
|
+
footprintLibraryMap: z76.record(
|
|
1408
|
+
z76.string(),
|
|
1409
|
+
z76.record(
|
|
1410
|
+
z76.string(),
|
|
1411
|
+
z76.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
|
|
1409
1412
|
)
|
|
1410
1413
|
).optional()
|
|
1411
1414
|
});
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../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/manual-edits/manual-edit-events/base_manual_edit_event.ts","../lib/manual-edits/manual-edit-events/edit_pcb_component_location_event.ts","../lib/manual-edits/manual-edit-events/edit_trace_hint_event.ts","../lib/manual-edits/manual-edit-events/edit_schematic_component_location_event.ts","../lib/manual-edits/manual-edit-events/edit_pcb_group_location_event.ts","../lib/manual-edits/manual-edit-events/edit_schematic_group_location_event.ts","../lib/manual-edits/manual_edit_event.ts","../lib/manual-edits/manual_edits_file.ts","../lib/manual-edits/manual_pcb_placement.ts","../lib/manual-edits/manual_trace_hint.ts","../lib/manual-edits/manual_schematic_placement.ts","../lib/components/breakout.ts","../lib/components/chip.ts","../lib/components/jumper.ts","../lib/components/solderjumper.ts","../lib/components/connector.ts","../lib/components/fuse.ts","../lib/components/platedhole.ts","../lib/components/resistor.ts","../lib/common/connectionsProp.ts","../lib/components/potentiometer.ts","../lib/components/crystal.ts","../lib/components/resonator.ts","../lib/components/stampboard.ts","../lib/components/capacitor.ts","../lib/components/net.ts","../lib/components/constrainedlayout.ts","../lib/common/distance.ts","../lib/components/constraint.ts","../lib/components/cutout.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/netlabel.ts","../lib/components/push-button.ts","../lib/components/subcircuit.ts","../lib/components/transistor.ts","../lib/components/mosfet.ts","../lib/components/inductor.ts","../lib/components/diode.ts","../lib/components/led.ts","../lib/components/switch.ts","../lib/components/fabrication-note-text.ts","../lib/components/fabrication-note-path.ts","../lib/components/pcb-trace.ts","../lib/components/via.ts","../lib/components/testpoint.ts","../lib/components/breakoutpoint.ts","../lib/components/pcb-keepout.ts","../lib/components/power-source.ts","../lib/components/schematic-box.ts","../lib/common/ninePointAnchor.ts","../lib/components/schematic-line.ts","../lib/components/schematic-text.ts","../lib/common/fivePointAnchor.ts","../lib/components/schematic-path.ts","../lib/components/silkscreen-text.ts","../lib/components/silkscreen-path.ts","../lib/components/silkscreen-line.ts","../lib/components/silkscreen-rect.ts","../lib/components/silkscreen-circle.ts","../lib/components/trace-hint.ts","../lib/components/port.ts","../lib/platformConfig.ts"],"sourcesContent":["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 doNotPlace?: boolean\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 doNotPlace: z.boolean().optional(),\n })\n\ntype InferredCommonComponentProps = z.input<typeof commonComponentProps>\nexpectTypesMatch<CommonComponentProps, InferredCommonComponentProps>(true)\n\nexport const componentProps = commonComponentProps\nexport type ComponentProps = z.input<typeof componentProps>\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 =\n | null\n | string\n | CadModelStl\n | CadModelObj\n | CadModelJscad\n\nexport const cadModelProp = z.union([\n z.null(),\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 type SchematicPinArrangement = SchematicPortArrangement\nexport type SchematicPinArrangementWithSizes = SchematicPortArrangementWithSizes\nexport type SchematicPinArrangementWithSides = SchematicPortArrangementWithSides\nexport type SchematicPinArrangementWithPinCounts =\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\n/**\n * @deprecated Use schematicPinArrangement instead.\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\nexport const schematicPinArrangement = schematicPortArrangement\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 marginTop?: number | string\n marginRight?: number | string\n marginBottom?: number | string\n marginLeft?: number | string\n\n /** @deprecated use marginLeft */\n leftMargin?: number | string\n /** @deprecated use marginRight */\n rightMargin?: number | string\n /** @deprecated use marginTop */\n topMargin?: number | string\n /** @deprecated use marginBottom */\n bottomMargin?: number | string\n }\n>\n\nexport const schematicPinStyle = z.record(\n z.object({\n marginLeft: distance.optional(),\n marginRight: distance.optional(),\n marginTop: distance.optional(),\n marginBottom: distance.optional(),\n\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 outlineOffsetX?: number | string\n outlineOffsetY?: number | string\n material?: \"fr4\" | \"fr1\"\n}\n\nexport const boardProps = subcircuitGroupProps.extend({\n width: distance.optional(),\n height: distance.optional(),\n outline: z.array(point).optional(),\n outlineOffsetX: distance.optional(),\n outlineOffsetY: distance.optional(),\n material: z.enum([\"fr4\", \"fr1\"]).default(\"fr4\"),\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 } from \"@tscircuit/layout\"\nimport { layer_ref, 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, PcbTrace } from \"circuit-json\"\nimport {\n manual_edits_file,\n type ManualEditsFile,\n type ManualEditsFileInput,\n} from \"lib/manual-edits\"\n\nexport const layoutConfig = z.object({\n layoutMode: z.enum([\"grid\", \"flex\", \"match-adapt\", \"none\"]).optional(),\n position: z.enum([\"absolute\", \"relative\"]).optional(),\n\n grid: z.boolean().optional(),\n gridCols: z.number().or(z.string()).optional(),\n gridRows: z.number().or(z.string()).optional(),\n gridTemplateRows: z.string().optional(),\n gridTemplateColumns: z.string().optional(),\n gridTemplate: z.string().optional(),\n gridGap: z.number().or(z.string()).optional(),\n\n flex: z.boolean().or(z.string()).optional(),\n flexDirection: z.enum([\"row\", \"column\"]).optional(),\n alignItems: z.enum([\"start\", \"center\", \"end\", \"stretch\"]).optional(),\n justifyContent: z.enum([\"start\", \"center\", \"end\", \"stretch\"]).optional(),\n flexRow: z.boolean().optional(),\n flexColumn: z.boolean().optional(),\n gap: z.number().or(z.string()).optional(),\n\n width: length.optional(),\n height: length.optional(),\n\n matchAdapt: z.boolean().optional(),\n matchAdaptTemplate: z.any().optional(),\n})\n\nexport interface LayoutConfig {\n layoutMode?: \"grid\" | \"flex\" | \"match-adapt\" | \"none\"\n position?: \"absolute\" | \"relative\"\n\n grid?: boolean\n gridCols?: number | string\n gridRows?: number | string\n gridTemplateRows?: string\n gridTemplateColumns?: string\n gridTemplate?: string\n gridGap?: number | string\n\n flex?: boolean | string\n flexDirection?: \"row\" | \"column\"\n alignItems?: \"start\" | \"center\" | \"end\" | \"stretch\"\n justifyContent?: \"start\" | \"center\" | \"end\" | \"stretch\"\n flexRow?: boolean\n flexColumn?: boolean\n gap?: number | string\n\n width?: Distance\n height?: Distance\n\n matchAdapt?: boolean\n matchAdaptTemplate?: any\n}\n\nexpectTypesMatch<LayoutConfig, z.input<typeof layoutConfig>>(true)\n\nexport interface Border {\n strokeWidth?: Distance\n dashed?: boolean\n solid?: boolean\n}\n\nexport const border = z.object({\n strokeWidth: length.optional(),\n dashed: z.boolean().optional(),\n solid: z.boolean().optional(),\n})\n\nexport interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {\n name?: string\n key?: any\n children?: any\n\n pcbWidth?: Distance\n pcbHeight?: Distance\n schWidth?: Distance\n schHeight?: Distance\n\n pcbLayout?: LayoutConfig\n schLayout?: LayoutConfig\n cellBorder?: Border | null\n border?: Border | null\n schPadding?: Distance\n schPaddingLeft?: Distance\n schPaddingRight?: Distance\n schPaddingTop?: Distance\n schPaddingBottom?: Distance\n}\n\nexport type PartsEngine = {\n findPart: (params: {\n sourceComponent: AnySourceComponent\n footprinterString?: string\n }) => Promise<SupplierPartNumbers> | SupplierPartNumbers\n}\n\nexport interface PcbRouteCache {\n pcbTraces: PcbTrace[]\n cacheKey: string\n}\n\nexport interface AutorouterConfig {\n serverUrl?: string\n inputFormat?: \"simplified\" | \"circuit-json\"\n serverMode?: \"job\" | \"solve-endpoint\"\n serverCacheEnabled?: boolean\n cache?: PcbRouteCache\n groupMode?: \"sequential-trace\" | \"subcircuit\"\n local?: boolean\n algorithmFn?: (simpleRouteJson: any) => Promise<any>\n}\n\nexport type AutorouterProp =\n | AutorouterConfig\n | \"sequential-trace\"\n | \"subcircuit\"\n | \"auto\"\n | \"auto-local\"\n | \"auto-cloud\"\n\nexport const autorouterConfig = z.object({\n serverUrl: z.string().optional(),\n inputFormat: z.enum([\"simplified\", \"circuit-json\"]).optional(),\n serverMode: z.enum([\"job\", \"solve-endpoint\"]).optional(),\n serverCacheEnabled: z.boolean().optional(),\n cache: z.custom<PcbRouteCache>((v) => true).optional(),\n groupMode: z.enum([\"sequential-trace\", \"subcircuit\"]).optional(),\n algorithmFn: z\n .custom<(simpleRouteJson: any) => Promise<any>>(\n (v) => typeof v === \"function\" || v === undefined,\n )\n .optional(),\n local: z.boolean().optional(),\n})\n\nexport const autorouterProp = z.union([\n autorouterConfig,\n z.literal(\"sequential-trace\"),\n z.literal(\"subcircuit\"),\n z.literal(\"auto\"),\n z.literal(\"auto-local\"),\n z.literal(\"auto-cloud\"),\n])\n\nexport interface SubcircuitGroupProps extends BaseGroupProps {\n layout?: LayoutBuilder\n manualEdits?: ManualEditsFileInput\n routingDisabled?: boolean\n defaultTraceWidth?: Distance\n minTraceWidth?: Distance\n pcbRouteCache?: PcbRouteCache\n\n autorouter?: AutorouterProp\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 /**\n * If true, net labels will automatically be created for complex traces\n */\n schTraceAutoLabelEnabled?: boolean\n\n partsEngine?: PartsEngine\n}\n\nexport interface SubcircuitGroupPropsWithBool extends SubcircuitGroupProps {\n subcircuit: true\n}\n\nexport interface NonSubcircuitGroupProps extends BaseGroupProps {\n subcircuit?: false | undefined\n}\n\nexport type GroupProps = SubcircuitGroupPropsWithBool | NonSubcircuitGroupProps\n\nexport const baseGroupProps = commonLayoutProps.extend({\n name: z.string().optional(),\n children: z.any().optional(),\n key: z.any().optional(),\n\n ...layoutConfig.shape,\n pcbWidth: length.optional(),\n pcbHeight: length.optional(),\n schWidth: length.optional(),\n schHeight: length.optional(),\n pcbLayout: layoutConfig.optional(),\n schLayout: layoutConfig.optional(),\n cellBorder: border.nullable().optional(),\n border: border.nullable().optional(),\n schPadding: length.optional(),\n schPaddingLeft: length.optional(),\n schPaddingRight: length.optional(),\n schPaddingTop: length.optional(),\n schPaddingBottom: length.optional(),\n})\n\nexport const partsEngine = z.custom<PartsEngine>((v) => \"findPart\" in v)\n\nexport const subcircuitGroupProps = baseGroupProps.extend({\n layout: z.custom<LayoutBuilder>((v) => true).optional(),\n manualEdits: manual_edits_file.optional(),\n schAutoLayoutEnabled: z.boolean().optional(),\n schTraceAutoLabelEnabled: z.boolean().optional(),\n routingDisabled: z.boolean().optional(),\n defaultTraceWidth: length.optional(),\n minTraceWidth: length.optional(),\n partsEngine: partsEngine.optional(),\n pcbRouteCache: z.custom<PcbRouteCache>((v) => true).optional(),\n autorouter: autorouterProp.optional(),\n})\n\nexport const subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({\n subcircuit: z.literal(true),\n})\n\nexport const groupProps = z.discriminatedUnion(\"subcircuit\", [\n baseGroupProps.extend({ subcircuit: z.literal(false).optional() }),\n subcircuitGroupPropsWithBool,\n])\n\ntype InferredBaseGroupProps = z.input<typeof baseGroupProps>\ntype InferredSubcircuitGroupPropsWithBool = z.input<\n typeof subcircuitGroupPropsWithBool\n>\n\nexpectTypesMatch<BaseGroupProps, InferredBaseGroupProps>(true)\nexpectTypesMatch<\n SubcircuitGroupPropsWithBool,\n InferredSubcircuitGroupPropsWithBool\n>(true)\n\ntype InferredGroupProps = z.input<typeof groupProps>\nexpectTypesMatch<GroupProps, InferredGroupProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport const base_manual_edit_event = z.object({\n edit_event_id: z.string(),\n in_progress: z.boolean().optional(),\n created_at: z.number(),\n})\n\nexport interface BaseManualEditEvent {\n edit_event_id: string\n in_progress?: boolean\n created_at: number\n}\n\nexport type BaseManualEditEventInput = z.input<typeof base_manual_edit_event>\n\nexpectTypesMatch<BaseManualEditEvent, z.infer<typeof base_manual_edit_event>>(\n true,\n)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_pcb_component_location_event = base_manual_edit_event.extend({\n pcb_edit_event_type: z\n .literal(\"edit_component_location\")\n .describe(\"deprecated\"),\n edit_event_type: z.literal(\"edit_pcb_component_location\"),\n pcb_component_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n})\n\n/** @deprecated use edit_pcb_component_location_event instead */\nexport const edit_component_location_event = edit_pcb_component_location_event\n\nexport interface EditPcbComponentLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_pcb_component_location\"\n /** @deprecated */\n pcb_edit_event_type: \"edit_component_location\"\n pcb_component_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditPcbComponentLocationEventInput = z.input<\n typeof edit_pcb_component_location_event\n>\n\nexpectTypesMatch<\n EditPcbComponentLocationEvent,\n z.infer<typeof edit_pcb_component_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_trace_hint_event = base_manual_edit_event.extend({\n pcb_edit_event_type: z.literal(\"edit_trace_hint\").describe(\"deprecated\"),\n edit_event_type: z.literal(\"edit_pcb_trace_hint\").optional(),\n pcb_port_id: z.string(),\n pcb_trace_hint_id: z.string().optional(),\n route: z.array(\n z.object({ x: z.number(), y: z.number(), via: z.boolean().optional() }),\n ),\n})\n\nexport interface EditTraceHintEvent extends BaseManualEditEvent {\n /** @deprecated */\n pcb_edit_event_type: \"edit_trace_hint\"\n edit_event_type?: \"edit_pcb_trace_hint\"\n pcb_port_id: string\n pcb_trace_hint_id?: string\n route: Array<{ x: number; y: number; via?: boolean }>\n}\n\nexport type EditTraceHintEventInput = z.input<typeof edit_trace_hint_event>\n\nexpectTypesMatch<EditTraceHintEvent, z.infer<typeof edit_trace_hint_event>>(\n true,\n)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_schematic_component_location_event =\n base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_schematic_component_location\"),\n schematic_component_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n })\n\nexport interface EditSchematicComponentLocationEvent\n extends BaseManualEditEvent {\n edit_event_type: \"edit_schematic_component_location\"\n schematic_component_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditSchematicComponentLocationEventInput = z.input<\n typeof edit_schematic_component_location_event\n>\n\nexpectTypesMatch<\n EditSchematicComponentLocationEvent,\n z.infer<typeof edit_schematic_component_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_pcb_group_location_event = base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_pcb_group_location\"),\n pcb_group_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n})\n\nexport interface EditPcbGroupLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_pcb_group_location\"\n pcb_group_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditPcbGroupLocationEventInput = z.input<\n typeof edit_pcb_group_location_event\n>\n\nexpectTypesMatch<\n EditPcbGroupLocationEvent,\n z.infer<typeof edit_pcb_group_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_schematic_group_location_event =\n base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_schematic_group_location\"),\n schematic_group_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n })\n\nexport interface EditSchematicGroupLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_schematic_group_location\"\n schematic_group_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditSchematicGroupLocationEventInput = z.input<\n typeof edit_schematic_group_location_event\n>\n\nexpectTypesMatch<\n EditSchematicGroupLocationEvent,\n z.infer<typeof edit_schematic_group_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n edit_pcb_component_location_event,\n type EditPcbComponentLocationEvent,\n} from \"./manual-edit-events/edit_pcb_component_location_event\"\nimport {\n edit_schematic_component_location_event,\n type EditSchematicComponentLocationEvent,\n} from \"./manual-edit-events/edit_schematic_component_location_event\"\nimport {\n edit_trace_hint_event,\n type EditTraceHintEvent,\n} from \"./manual-edit-events/edit_trace_hint_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type ManualEditEvent =\n | EditPcbComponentLocationEvent\n | EditTraceHintEvent\n | EditSchematicComponentLocationEvent\n\nexport const manual_edit_event = z.union([\n edit_pcb_component_location_event,\n edit_trace_hint_event,\n edit_schematic_component_location_event,\n])\n\nexport type ManualEditEventInput = z.input<typeof manual_edit_event>\ntype InferredManualEditEvent = z.infer<typeof manual_edit_event>\n\nexpectTypesMatch<ManualEditEvent, InferredManualEditEvent>(true)\n","import { z } from \"zod\"\nimport {\n manual_pcb_placement,\n type ManualPcbPlacement,\n} from \"./manual_pcb_placement\"\nimport { manual_edit_event } from \"./manual_edit_event\"\nimport { manual_trace_hint, type ManualTraceHint } from \"./manual_trace_hint\"\nimport {\n manual_schematic_placement,\n type ManualSchematicPlacement,\n} from \"./manual_schematic_placement\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_edits_file = z.object({\n pcb_placements: z.array(manual_pcb_placement).optional(),\n manual_trace_hints: z.array(manual_trace_hint).optional(),\n schematic_placements: z.array(manual_schematic_placement).optional(),\n})\n\nexport interface ManualEditsFile {\n pcb_placements?: ManualPcbPlacement[]\n manual_trace_hints?: ManualTraceHint[]\n schematic_placements?: ManualSchematicPlacement[]\n}\n\nexport type ManualEditsFileInput = z.input<typeof manual_edits_file>\n\nexpectTypesMatch<ManualEditsFile, z.infer<typeof manual_edits_file>>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_pcb_placement = z.object({\n selector: z.string(),\n relative_to: z\n .string()\n .optional()\n .default(\"group_center\")\n .describe(\"Can be a selector or 'group_center'\"),\n center: point,\n})\n\nexport interface ManualPcbPlacement {\n selector: string\n relative_to: string\n center: Point\n}\n\nexport type ManualPcbPlacementInput = z.input<typeof manual_pcb_placement>\ntype InferredManualPcbPlacement = z.infer<typeof manual_pcb_placement>\n\nexpectTypesMatch<ManualPcbPlacement, InferredManualPcbPlacement>(true)\n","import { z } from \"zod\"\nimport { layer_ref, route_hint_point, type RouteHintPoint } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_trace_hint = z.object({\n pcb_port_selector: z.string(),\n offsets: z.array(route_hint_point),\n})\n\nexport interface ManualTraceHint {\n pcb_port_selector: string\n offsets: Array<RouteHintPoint>\n}\n\nexport type ManualTraceHintInput = z.input<typeof manual_trace_hint>\n\nexpectTypesMatch<ManualTraceHint, z.infer<typeof manual_trace_hint>>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_schematic_placement = z.object({\n selector: z.string(),\n relative_to: z\n .string()\n .optional()\n .default(\"group_center\")\n .describe(\"Can be a selector or 'group_center'\"),\n center: point,\n})\n\nexport interface ManualSchematicPlacement {\n selector: string\n relative_to: string\n center: Point\n}\n\nexport type ManualSchematicPlacementInput = z.input<\n typeof manual_schematic_placement\n>\ntype InferredManualSchematicPlacement = z.infer<\n typeof manual_schematic_placement\n>\n\nexpectTypesMatch<ManualSchematicPlacement, InferredManualSchematicPlacement>(\n true,\n)\n","import { distance } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { subcircuitGroupProps, type SubcircuitGroupProps } from \"./group\"\n\nexport interface BreakoutProps\n extends Omit<SubcircuitGroupProps, \"subcircuit\"> {\n padding?: Distance\n paddingLeft?: Distance\n paddingRight?: Distance\n paddingTop?: Distance\n paddingBottom?: Distance\n}\n\nexport const breakoutProps = subcircuitGroupProps.extend({\n padding: distance.optional(),\n paddingLeft: distance.optional(),\n paddingRight: distance.optional(),\n paddingTop: distance.optional(),\n paddingBottom: distance.optional(),\n})\n\ntype InferredBreakoutProps = z.input<typeof breakoutProps>\nexpectTypesMatch<BreakoutProps, InferredBreakoutProps>(true)\n","import { distance, supplier_name } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n type SupplierPartNumbers,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement as schematicPinArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { z } from \"zod\"\n\nexport type PinLabelsProp<\n PinNumber extends string = string,\n PinLabel extends string = string,\n> = Record<PinNumber, PinLabel | readonly PinLabel[] | PinLabel[]>\n\nexport type PinLabelFromPinLabelMap<PinLabelMap extends PinLabelsProp> =\n PinLabelMap extends PinLabelsProp<infer PinNumber, infer PinLabel>\n ? PinLabel\n : never\n\nexport interface PinCompatibleVariant {\n manufacturerPartNumber?: string\n supplierPartNumber?: SupplierPartNumbers\n}\n\nexport interface ChipPropsSU<PinLabel extends string = string>\n extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: PinLabelsProp<string, PinLabel>\n /**\n * Whether to show pin aliases in the schematic\n */\n showPinAliases?: boolean\n schPinArrangement?: SchematicPortArrangement\n /** @deprecated Use schPinArrangement instead. */\n schPortArrangement?: SchematicPortArrangement\n pinCompatibleVariants?: PinCompatibleVariant[]\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: Distance\n schWidth?: Distance\n schHeight?: Distance\n noSchematicRepresentation?: boolean\n internallyConnectedPins?: string[][]\n externallyConnectedPins?: string[][]\n connections?: Connections<PinLabel>\n}\n\nexport type ChipProps<PinLabelMap extends PinLabelsProp | string = string> =\n ChipPropsSU<\n PinLabelMap extends PinLabelsProp\n ? PinLabelFromPinLabelMap<PinLabelMap>\n : PinLabelMap\n >\n\n/**\n * Get the pin labels for a component\n *\n * const pinLabels = { pin1: \"VCC\", pin2: \"GND\", pin3: \"DATA\" } as const\n * export const MyChip = (props: ChipProps<typeof pinLabels>) => {\n * // ...\n * }\n * type MyChipPinLabels = ChipPinLabels<typeof MyChip>\n * // MyChipPinLabels is \"VCC\" | \"GND\" | \"DATA\"\n *\n */\nexport type ChipPinLabels<T extends (props: ChipProps<any>) => any> =\n T extends (props: infer Props) => any\n ? Props extends ChipProps<infer PinLabelMap>\n ? PinLabelMap extends PinLabelsProp\n ? PinLabelFromPinLabelMap<PinLabelMap>\n : PinLabelMap extends string\n ? PinLabelMap\n : never\n : never\n : never\n\n/**\n * Get the connection prop type for a component\n *\n * const pinLabels = { pin1: \"VCC\", pin2: \"GND\", pin3: \"DATA\" } as const\n * export const MyChip = (props: ChipProps<typeof pinLabels>) => {\n * // ...\n * }\n * const connections: ChipConnections<typeof MyChip> = {\n * VCC: \"...\",\n * GND: \"...\",\n * DATA: \"...\",\n * }\n *\n */\nexport type ChipConnections<T extends (props: ChipProps<any>) => any> = {\n [K in ChipPinLabels<T>]: string\n}\n\nconst connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nconst connectionsProp = z\n .custom<Connections>()\n .pipe(z.record(z.string(), connectionTarget))\n\nexport const pinLabelsProp = z.record(\n z.string(),\n z.string().or(z.array(z.string()).readonly()).or(z.array(z.string())),\n)\n\nexpectTypesMatch<PinLabelsProp, z.input<typeof pinLabelsProp>>(true)\n\nexport const pinCompatibleVariant = z.object({\n manufacturerPartNumber: z.string().optional(),\n supplierPartNumber: z.record(supplier_name, z.array(z.string())).optional(),\n})\n\nexport const chipProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: pinLabelsProp.optional(),\n showPinAliases: z.boolean().optional(),\n internallyConnectedPins: z.array(z.array(z.string())).optional(),\n externallyConnectedPins: z.array(z.array(z.string())).optional(),\n schPinArrangement: schematicPinArrangement.optional(),\n schPortArrangement: schematicPinArrangement.optional(),\n pinCompatibleVariants: z.array(pinCompatibleVariant).optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n noSchematicRepresentation: z.boolean().optional(),\n connections: connectionsProp.optional(),\n})\n\n/**\n * @deprecated Use ChipProps instead.\n */\nexport const bugProps = chipProps\nexport type InferredChipProps = z.input<typeof chipProps>\n\n// Chip props are too complex to match up with zod types, we typecheck\n// them separately in the test files\nexpectTypesMatch<InferredChipProps, ChipPropsSU<string>>(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 * Number of pins on the jumper (2 or 3)\n */\n pinCount?: 2 | 3\n /**\n * Groups of pins that are internally connected (bridged)\n * e.g., [[\"1\",\"2\"], [\"2\",\"3\"]]\n */\n internallyConnectedPins?: string[][]\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 pinCount: z.union([z.literal(2), z.literal(3)]).optional(),\n internallyConnectedPins: z.array(z.array(z.string())).optional(),\n})\n\ntype InferredJumperProps = z.input<typeof jumperProps>\nexpectTypesMatch<JumperProps, InferredJumperProps>(true)\n","import { jumperProps, type JumperProps } from \"./jumper\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface SolderJumperProps extends JumperProps {\n /**\n * Pins that are bridged with solder by default\n */\n bridgedPins?: string[][]\n}\n\nexport const solderjumperProps = jumperProps.extend({\n bridgedPins: z.array(z.array(z.string())).optional(),\n})\n\ntype InferredSolderJumperProps = z.input<typeof solderjumperProps>\nexpectTypesMatch<SolderJumperProps, InferredSolderJumperProps>(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 ConnectorProps 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 * Groups of pins that are internally connected (bridged)\n * e.g., [[\"1\",\"2\"], [\"2\",\"3\"]]\n */\n internallyConnectedPins?: string[][]\n /**\n * Connector standard, e.g. usb_c, m2\n */\n standard?: \"usb_c\" | \"m2\"\n}\n\nexport const connectorProps = 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 internallyConnectedPins: z.array(z.array(z.string())).optional(),\n standard: z.enum([\"usb_c\", \"m2\"]).optional(),\n})\n\ntype InferredConnectorProps = z.input<typeof connectorProps>\nexpectTypesMatch<ConnectorProps, InferredConnectorProps>(true)\n","import { z } from \"zod\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\n\n/**\n * Pin labels for fuse component\n */\nexport const fusePinLabels = [\"pin1\", \"pin2\"] as const\n\nexport type FusePinLabels = (typeof fusePinLabels)[number]\n\nexport interface FuseProps extends CommonComponentProps {\n /**\n * Current rating of the fuse in amperes\n */\n currentRating: number | string\n\n /**\n * Voltage rating of the fuse\n */\n voltageRating?: number | string\n\n /**\n * Whether to show ratings on schematic\n */\n schShowRatings?: boolean\n\n /**\n * Connections to other components\n */\n connections?: Connections<FusePinLabels>\n}\n\n/**\n * Schema for validating fuse props\n */\nexport const fuseProps = commonComponentProps.extend({\n currentRating: z.union([z.number(), z.string()]),\n voltageRating: z.union([z.number(), z.string()]).optional(),\n schShowRatings: z.boolean().optional(),\n connections: z\n .record(\n z.string(),\n z.union([\n z.string(),\n z.array(z.string()).readonly(),\n z.array(z.string()),\n ]),\n )\n .optional(),\n})\n\nexport type InferredFuseProps = z.input<typeof fuseProps>\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 holeWidth: number | string\n holeHeight: number | string\n portHints?: PortHints\n\n /** @deprecated use holeWidth */\n innerWidth?: number | string\n /** @deprecated use holeHeight */\n innerHeight?: number | string\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 holeWidth: number | string\n holeHeight: number | string\n\n /** @deprecated use holeWidth */\n innerWidth?: number | string\n /** @deprecated use holeHeight */\n innerHeight?: number | string\n\n portHints?: PortHints\n}\n\nexport interface CircularHoleWithRectPlatedProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n shape: \"circular_hole_with_rect_pad\"\n holeDiameter: number | string\n rectPadWidth: number | string\n rectPadHeight: number | string\n holeShape?: \"circle\"\n padShape?: \"rect\"\n portHints?: PortHints\n}\n\nexport interface PillWithRectPadPlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n shape: \"pill_hole_with_rect_pad\"\n holeShape: \"pill\"\n padShape: \"rect\"\n holeWidth: number | string\n holeHeight: number | string\n rectPadWidth: number | string\n rectPadHeight: number | string\n portHints?: PortHints\n}\n\nexport type PlatedHoleProps =\n | CirclePlatedHoleProps\n | OvalPlatedHoleProps\n | PillPlatedHoleProps\n | CircularHoleWithRectPlatedProps\n | PillWithRectPadPlatedHoleProps\n\nconst distanceHiddenUndefined = z\n .custom<z.input<typeof distance>>()\n .transform((a) => {\n if (a === undefined) return undefined\n return distance.parse(a)\n })\n\nexport const platedHoleProps = z\n .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 holeWidth: distanceHiddenUndefined,\n holeHeight: distanceHiddenUndefined,\n innerWidth: distance.optional().describe(\"DEPRECATED use holeWidth\"),\n innerHeight: distance.optional().describe(\"DEPRECATED use holeHeight\"),\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 holeWidth: distanceHiddenUndefined,\n holeHeight: distanceHiddenUndefined,\n innerWidth: distance.optional().describe(\"DEPRECATED use holeWidth\"),\n innerHeight: distance.optional().describe(\"DEPRECATED use holeHeight\"),\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n shape: z.literal(\"circular_hole_with_rect_pad\"),\n holeDiameter: distance,\n rectPadWidth: distance,\n rectPadHeight: distance,\n holeShape: z.literal(\"circle\").optional(),\n padShape: z.literal(\"rect\").optional(),\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n shape: z.literal(\"pill_hole_with_rect_pad\"),\n holeShape: z.literal(\"pill\"),\n padShape: z.literal(\"rect\"),\n holeWidth: distance,\n holeHeight: distance,\n rectPadWidth: distance,\n rectPadHeight: distance,\n portHints: portHints.optional(),\n }),\n ])\n .refine((a) => {\n if (\"innerWidth\" in a && a.innerWidth !== undefined) {\n a.holeWidth ??= a.innerWidth\n }\n if (\"innerHeight\" in a && a.innerHeight !== undefined) {\n a.holeHeight ??= a.innerHeight\n }\n return a\n })\n\ntype InferredPlatedHoleProps = z.input<typeof platedHoleProps>\n\nexpectTypesMatch<PlatedHoleProps, InferredPlatedHoleProps>(true)\n","import { resistance } from \"circuit-json\"\nimport { createConnectionsProp } from \"lib/common/connectionsProp\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { z } from \"zod\"\n\nexport const resistorPinLabels = [\"pin1\", \"pin2\", \"pos\", \"neg\"] as const\nexport type ResistorPinLabels = (typeof resistorPinLabels)[number]\n\nexport interface ResistorProps extends CommonComponentProps {\n resistance: number | string\n pullupFor?: string\n pullupTo?: string\n pulldownFor?: string\n pulldownTo?: string\n connections?: Connections<ResistorPinLabels>\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\n connections: createConnectionsProp(resistorPinLabels).optional(),\n})\nexport const resistorPins = lrPins\n\ntype InferredResistorProps = z.input<typeof resistorProps>\nexpectTypesMatch<ResistorProps, InferredResistorProps>(true)\n","import { z } from \"zod\"\n\nexport const connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nexport const createConnectionsProp = <T extends readonly [string, ...string[]]>(\n labels: T,\n) => {\n return z.record(z.enum(labels), connectionTarget)\n}\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 type PotentiometerPinVariant = \"two_pin\" | \"three_pin\"\n\nexport interface PotentiometerProps extends CommonComponentProps {\n maxResistance: number | string\n pinVariant?: PotentiometerPinVariant\n}\n\nexport const potentiometerProps = commonComponentProps.extend({\n maxResistance: resistance,\n pinVariant: z.enum([\"two_pin\", \"three_pin\"]).optional(),\n})\n\ntype InferredPotentiometerProps = z.input<typeof potentiometerProps>\nexpectTypesMatch<PotentiometerProps, InferredPotentiometerProps>(true)\n","import { frequency, capacitance } 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 type PinVariant = \"two_pin\" | \"four_pin\"\n\nexport interface CrystalProps extends CommonComponentProps {\n frequency: number | string\n loadCapacitance: number | string\n pinVariant?: PinVariant\n}\n\nexport const crystalProps = commonComponentProps.extend({\n frequency: frequency,\n loadCapacitance: capacitance,\n pinVariant: z.enum([\"two_pin\", \"four_pin\"]).optional(),\n})\nexport const crystalPins = lrPins\n\ntype InferredCrystalProps = z.input<typeof crystalProps>\nexpectTypesMatch<CrystalProps, InferredCrystalProps>(true)\n","import { frequency, capacitance } 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 type ResonatorPinVariant = \"no_ground\" | \"ground_pin\" | \"two_ground_pins\"\n\nexport interface ResonatorProps extends CommonComponentProps {\n frequency: number | string\n loadCapacitance: number | string\n pinVariant?: ResonatorPinVariant\n}\n\nexport const resonatorProps = commonComponentProps.extend({\n frequency: frequency,\n loadCapacitance: capacitance,\n pinVariant: z.enum([\"no_ground\", \"ground_pin\", \"two_ground_pins\"]).optional(),\n})\n\ntype InferredResonatorProps = z.input<typeof resonatorProps>\nexpectTypesMatch<ResonatorProps, InferredResonatorProps>(true)\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { boardProps, type BoardProps } from \"lib/components/board\"\n\nexport interface StampboardProps extends BoardProps {\n leftPinCount?: number\n rightPinCount?: number\n topPinCount?: number\n bottomPinCount?: number\n leftPins?: string[]\n rightPins?: string[]\n topPins?: string[]\n bottomPins?: string[]\n pinPitch?: number | string\n innerHoles?: boolean\n}\n\nexport const stampboardProps = boardProps.extend({\n leftPinCount: z.number().optional(),\n rightPinCount: z.number().optional(),\n topPinCount: z.number().optional(),\n bottomPinCount: z.number().optional(),\n leftPins: z.array(z.string()).optional(),\n rightPins: z.array(z.string()).optional(),\n topPins: z.array(z.string()).optional(),\n bottomPins: z.array(z.string()).optional(),\n pinPitch: distance.optional(),\n innerHoles: z.boolean().optional(),\n})\n\ntype InferredStampboardProps = z.input<typeof stampboardProps>\nexpectTypesMatch<StampboardProps, InferredStampboardProps>(true)\n","import { capacitance, voltage } from \"circuit-json\"\nimport { createConnectionsProp } from \"lib/common/connectionsProp\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPolarPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { z } from \"zod\"\n\nexport const capacitorPinLabels = [\n \"pin1\",\n \"pin2\",\n \"pos\",\n \"neg\",\n \"anode\",\n \"cathode\",\n] as const\nexport type CapacitorPinLabels = (typeof capacitorPinLabels)[number]\n\nexport interface CapacitorProps extends CommonComponentProps {\n capacitance: number | string\n maxVoltageRating?: number | string\n schShowRatings?: boolean\n polarized?: boolean\n decouplingFor?: string\n decouplingTo?: string\n bypassFor?: string\n bypassTo?: string\n maxDecouplingTraceLength?: number\n connections?: Connections<CapacitorPinLabels>\n}\n\nexport const capacitorProps = commonComponentProps.extend({\n capacitance,\n maxVoltageRating: voltage.optional(),\n schShowRatings: z.boolean().optional().default(false),\n polarized: z.boolean().optional().default(false),\n decouplingFor: z.string().optional(),\n decouplingTo: z.string().optional(),\n bypassFor: z.string().optional(),\n bypassTo: z.string().optional(),\n maxDecouplingTraceLength: z.number().optional(),\n connections: createConnectionsProp(capacitorPinLabels).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 { z } from \"zod\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { point, type Point } from \"lib/common/point\"\nimport { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface RectCutoutProps\n extends Omit<PcbLayoutProps, \"layer\" | \"pcbRotation\"> {\n name?: string\n shape: \"rect\"\n width: Distance\n height: Distance\n}\n\nexport const rectCutoutProps = pcbLayoutProps\n .omit({\n layer: true,\n pcbRotation: true,\n })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n })\nexpectTypesMatch<RectCutoutProps, z.input<typeof rectCutoutProps>>(true)\n\nexport interface CircleCutoutProps\n extends Omit<PcbLayoutProps, \"layer\" | \"pcbRotation\"> {\n name?: string\n shape: \"circle\"\n radius: Distance\n}\n\nexport const circleCutoutProps = pcbLayoutProps\n .omit({\n layer: true,\n pcbRotation: true,\n })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"circle\"),\n radius: distance,\n })\nexpectTypesMatch<CircleCutoutProps, z.input<typeof circleCutoutProps>>(true)\n\nexport interface PolygonCutoutProps\n extends Omit<PcbLayoutProps, \"layer\" | \"pcbRotation\"> {\n name?: string\n shape: \"polygon\"\n points: Point[]\n}\n\nexport const polygonCutoutProps = pcbLayoutProps\n .omit({\n layer: true,\n pcbRotation: true,\n })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"polygon\"),\n points: z.array(point),\n })\nexpectTypesMatch<PolygonCutoutProps, z.input<typeof polygonCutoutProps>>(true)\n\nexport type CutoutProps =\n | RectCutoutProps\n | CircleCutoutProps\n | PolygonCutoutProps\n\nexport const cutoutProps = z.discriminatedUnion(\"shape\", [\n rectCutoutProps,\n circleCutoutProps,\n polygonCutoutProps,\n])\n\nexport type CutoutPropsInput = z.input<typeof cutoutProps>\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 { point, type Point } from \"lib/common/point\"\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 RotatedRectSmtPadProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"rotated_rect\"\n width: Distance\n height: Distance\n ccwRotation: number\n portHints?: PortHints\n}\n\nexport interface CircleSmtPadProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"circle\"\n radius: Distance\n portHints?: PortHints\n}\n\nexport interface PillSmtPadProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"pill\"\n width: Distance\n height: Distance\n radius: Distance\n portHints?: PortHints\n}\n\nexport interface PolygonSmtPadProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"polygon\"\n points: Point[]\n portHints?: PortHints\n}\n\nexport type SmtPadProps =\n | RectSmtPadProps\n | CircleSmtPadProps\n | RotatedRectSmtPadProps\n | PillSmtPadProps\n | PolygonSmtPadProps\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 rotatedRectSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"rotated_rect\"),\n width: distance,\n height: distance,\n ccwRotation: z.number(),\n portHints: portHints.optional(),\n })\ntype InferredRotatedRectSmtPadProps = z.input<typeof rotatedRectSmtPadProps>\nexpectTypesMatch<InferredRotatedRectSmtPadProps, RotatedRectSmtPadProps>(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 pillSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"pill\"),\n width: distance,\n height: distance,\n radius: distance,\n portHints: portHints.optional(),\n })\ntype InferredPillSmtPadProps = z.input<typeof pillSmtPadProps>\nexpectTypesMatch<InferredPillSmtPadProps, PillSmtPadProps>(true)\n\nexport const polygonSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"polygon\"),\n points: z.array(point),\n portHints: portHints.optional(),\n })\ntype InferredPolygonSmtPadProps = z.input<typeof polygonSmtPadProps>\nexpectTypesMatch<InferredPolygonSmtPadProps, PolygonSmtPadProps>(true)\n\nexport const smtPadProps = z.discriminatedUnion(\"shape\", [\n circleSmtPadProps,\n rectSmtPadProps,\n rotatedRectSmtPadProps,\n pillSmtPadProps,\n polygonSmtPadProps,\n])\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 schDisplayLabel: z.string().optional(),\n maxLength: distance.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 {\n schematicPinArrangement,\n type SchematicPinArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport { connectionTarget } from \"lib/common/connectionsProp\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\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 * Schematic facing direction\n */\n schFacingDirection?: \"up\" | \"down\" | \"left\" | \"right\"\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 * Connections to other components\n */\n connections?: Connections<string>\n\n /**\n * Direction the header is facing\n */\n facingDirection?: \"left\" | \"right\"\n\n /**\n * Pin arrangement in schematic view\n */\n schPinArrangement?: SchematicPinArrangement\n}\n\nexport const pinHeaderProps = commonComponentProps.extend({\n pinCount: z.number(),\n pitch: distance.optional(),\n schFacingDirection: z.enum([\"up\", \"down\", \"left\", \"right\"]).optional(),\n gender: z.enum([\"male\", \"female\"]).optional().default(\"male\"),\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 connections: z\n .custom<Connections>()\n .pipe(z.record(z.string(), connectionTarget))\n .optional(),\n facingDirection: z.enum([\"left\", \"right\"]).optional(),\n schPinArrangement: schematicPinArrangement.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\n/**\n * @deprecated Use NetLabelProps instead.\n */\nexport interface NetAliasProps {\n net?: string\n connection?: string\n schX?: number | string\n schY?: number | string\n schRotation?: number | string\n anchorSide?: \"left\" | \"up\" | \"right\" | \"down\"\n}\n\n/** @deprecated Use netLabelProps instead. */\nexport const netAliasProps = z.object({\n net: z.string().optional(),\n connection: 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 { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { distance } from \"lib/common/distance\"\nimport { rotation } from \"circuit-json\"\n\nexport interface NetLabelProps {\n net?: string\n connection?: string\n schX?: number | string\n schY?: number | string\n schRotation?: number | string\n anchorSide?: \"left\" | \"up\" | \"right\" | \"down\"\n}\n\nexport const netLabelProps = z.object({\n net: z.string().optional(),\n connection: 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 InferredNetLabelProps = z.input<typeof netLabelProps>\nexpectTypesMatch<NetLabelProps, InferredNetLabelProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { chipProps, type ChipProps, type PinLabelsProp } from \"./chip\"\n\nexport type PushButtonProps<T extends PinLabelsProp | string = string> =\n ChipProps<T>\n\nexport const pushButtonProps = chipProps.extend({})\n\nexpectTypesMatch<PushButtonProps, z.input<typeof pushButtonProps>>(true)\n","import type { SubcircuitGroupProps } from \"./group\"\nimport { subcircuitGroupProps } from \"./group\"\nimport type { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type SubcircuitProps = SubcircuitGroupProps\n\nexport const subcircuitProps = subcircuitGroupProps\n\ntype InferredSubcircuitProps = z.input<typeof subcircuitProps>\nexpectTypesMatch<SubcircuitProps, InferredSubcircuitProps>(true)\n","import {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface TransistorProps extends CommonComponentProps {\n type: \"npn\" | \"pnp\" | \"bjt\" | \"jfet\" | \"mosfet\"\n}\n\nexport const transistorProps = commonComponentProps.extend({\n type: z.enum([\"npn\", \"pnp\", \"bjt\", \"jfet\", \"mosfet\"]),\n})\n\nexport const transistorPins = [\n \"pin1\",\n \"emitter\",\n \"pin2\",\n \"collector\",\n \"pin3\",\n \"base\",\n] as const\n\ntype InferredTransistorProps = z.input<typeof transistorProps>\nexpectTypesMatch<TransistorProps, InferredTransistorProps>(true)\n","import {\n type CommonComponentProps,\n commonComponentProps,\n} from \"../common/layout\"\nimport { expectTypesMatch } from \"../typecheck\"\nimport { z } from \"zod\"\n\nexport interface MosfetProps extends CommonComponentProps {\n channelType: \"n\" | \"p\"\n mosfetMode: \"enhancement\" | \"depletion\"\n}\n\nexport const mosfetProps = commonComponentProps.extend({\n channelType: z.enum([\"n\", \"p\"]),\n mosfetMode: z.enum([\"enhancement\", \"depletion\"]),\n})\n\nexport const mosfetPins = [\n \"pin1\",\n \"drain\",\n \"pin2\",\n \"source\",\n \"pin3\",\n \"gate\",\n] as const\n\ntype InferredMosfetProps = z.input<typeof mosfetProps>\nexpectTypesMatch<MosfetProps, InferredMosfetProps>(true)\n","import { inductance } from \"circuit-json\"\nimport { commonComponentProps, lrPins } from \"lib/common/layout\"\nimport type { z } from \"zod\"\n\nexport const inductorProps = commonComponentProps.extend({\n inductance,\n})\nexport const inductorPins = lrPins\nexport type InductorProps = z.input<typeof inductorProps>\n","import {\n type CommonComponentProps,\n commonComponentProps,\n lrPolarPins,\n} from \"lib/common/layout\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nconst diodeConnectionKeys = z.enum([\n \"anode\",\n \"cathode\",\n \"pin1\",\n \"pin2\",\n \"pos\",\n \"neg\",\n])\n\nconst connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nconst connectionsProp = z.record(diodeConnectionKeys, connectionTarget)\n\nconst diodeVariant = z.enum([\"standard\", \"schottky\", \"zener\", \"photo\", \"tvs\"])\n\nexport const diodeProps = commonComponentProps\n .extend({\n connections: connectionsProp.optional(),\n variant: diodeVariant.optional().default(\"standard\"),\n standard: z.boolean().optional(),\n schottky: z.boolean().optional(),\n zener: z.boolean().optional(),\n photo: z.boolean().optional(),\n tvs: z.boolean().optional(),\n })\n .superRefine((data, ctx) => {\n // Check if multiple boolean flags are set directly\n const enabledFlags = [\n data.standard,\n data.schottky,\n data.zener,\n data.photo,\n data.tvs,\n ].filter(Boolean).length\n\n if (enabledFlags > 1) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: \"Exactly one diode variant must be enabled\",\n path: [],\n })\n return z.INVALID\n }\n })\n .transform((data) => {\n // Set all variant flags to false initially\n const result = {\n ...data,\n standard: false,\n schottky: false,\n zener: false,\n photo: false,\n tvs: false,\n }\n\n if (data.standard) result.standard = true\n else if (data.schottky) result.schottky = true\n else if (data.zener) result.zener = true\n else if (data.photo) result.photo = true\n else if (data.tvs) result.tvs = true\n else {\n switch (data.variant) {\n case \"standard\":\n result.standard = true\n break\n case \"schottky\":\n result.schottky = true\n break\n case \"zener\":\n result.zener = true\n break\n case \"photo\":\n result.photo = true\n break\n case \"tvs\":\n result.tvs = true\n break\n default:\n result.standard = true\n }\n }\n\n return result\n })\n\nexport const diodePins = lrPolarPins\n\nexport interface DiodeProps extends CommonComponentProps {\n connections?: {\n anode?: string | string[] | readonly string[]\n cathode?: string | string[] | readonly string[]\n pin1?: string | string[] | readonly string[]\n pin2?: string | string[] | readonly string[]\n pos?: string | string[] | readonly string[]\n neg?: string | string[] | readonly string[]\n }\n variant?: \"standard\" | \"schottky\" | \"zener\" | \"photo\" | \"tvs\"\n standard?: boolean\n schottky?: boolean\n zener?: boolean\n photo?: boolean\n tvs?: boolean\n}\n\nexport type InferredDiodeProps = z.input<typeof diodeProps>\nexpectTypesMatch<InferredDiodeProps, DiodeProps>(true)\n","import { commonComponentProps, lrPolarPins } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const ledProps = commonComponentProps.extend({\n color: z.string().optional(),\n wavelength: z.string().optional(),\n schDisplayValue: z.string().optional(),\n})\nexport const ledPins = lrPolarPins\nexport type LedProps = z.input<typeof ledProps>\n","import {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nimport { z } from \"zod\"\n\nexport interface SwitchProps extends CommonComponentProps {\n type?: \"spst\" | \"spdt\" | \"dpst\" | \"dpdt\"\n isNormallyClosed?: boolean\n spdt?: boolean\n spst?: boolean\n dpst?: boolean\n dpdt?: boolean\n}\n\nexport const switchProps = commonComponentProps\n .extend({\n type: z.enum([\"spst\", \"spdt\", \"dpst\", \"dpdt\"]).optional(),\n isNormallyClosed: z.boolean().optional().default(false),\n spst: z.boolean().optional(),\n spdt: z.boolean().optional(),\n dpst: z.boolean().optional(),\n dpdt: z.boolean().optional(),\n })\n .transform((props) => {\n const updatedProps: SwitchProps = { ...props }\n\n if (updatedProps.dpdt) {\n updatedProps.type = \"dpdt\"\n } else if (updatedProps.spst) {\n updatedProps.type = \"spst\"\n } else if (updatedProps.spdt) {\n updatedProps.type = \"spdt\"\n } else if (updatedProps.dpst) {\n updatedProps.type = \"dpst\"\n }\n\n switch (updatedProps.type) {\n case \"spdt\":\n updatedProps.spdt = true\n break\n case \"spst\":\n updatedProps.spst = true\n break\n case \"dpst\":\n updatedProps.dpst = true\n break\n case \"dpdt\":\n updatedProps.dpdt = true\n break\n }\n\n return updatedProps\n })\n\nexport type InferredSwitchProps = z.infer<typeof switchProps>\nexpectTypesMatch<SwitchProps, InferredSwitchProps>(true)\n","import { length } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\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","import { length, route_hint_point } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\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 { distance, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\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","import { distance, layer_ref } from \"circuit-json\"\nimport { commonLayoutProps } from \"lib/common/layout\"\nimport type { z } from \"zod\"\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","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 TestpointProps extends CommonComponentProps {\n /**\n * The footprint variant of the testpoint either a surface pad or through-hole\n */\n footprintVariant?: \"pad\" | \"through_hole\"\n /**\n * The shape of the pad if using a pad variant\n */\n padShape?: \"rect\" | \"circle\"\n /**\n * Diameter of the copper pad (applies to both SMD pads and plated holes)\n */\n padDiameter?: number | string\n /**\n * Diameter of the hole if using a through-hole testpoint\n */\n holeDiameter?: number | string\n /**\n * Width of the pad when padShape is rect\n */\n width?: number | string\n /**\n * Height of the pad when padShape is rect\n */\n height?: number | string\n}\n\nexport const testpointProps = commonComponentProps\n .extend({\n footprintVariant: z.enum([\"pad\", \"through_hole\"]).optional(),\n padShape: z.enum([\"rect\", \"circle\"]).optional().default(\"circle\"),\n padDiameter: distance.optional(),\n holeDiameter: distance.optional(),\n width: distance.optional(),\n height: distance.optional(),\n })\n .refine(\n (props) =>\n props.footprintVariant !== \"through_hole\" ||\n props.holeDiameter !== undefined,\n { message: \"holeDiameter is required for through_hole testpoints\" },\n )\n\nexport type InferredTestpointProps = z.input<typeof testpointProps>\nexpectTypesMatch<TestpointProps, InferredTestpointProps>(true)\n","import { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface BreakoutPointProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n connection: string\n}\n\nexport const breakoutPointProps = pcbLayoutProps\n .omit({ pcbRotation: true, layer: true })\n .extend({\n connection: z.string(),\n })\n\ntype InferredBreakoutPointProps = z.input<typeof breakoutPointProps>\nexpectTypesMatch<BreakoutPointProps, InferredBreakoutPointProps>(true)\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\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","import { voltage } from \"circuit-json\"\nimport { commonComponentProps } from \"lib/common/layout\"\nimport type { z } from \"zod\"\n\nexport const powerSourceProps = commonComponentProps.extend({\n voltage,\n})\nexport type PowerSourceProps = z.input<typeof powerSourceProps>\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\n\nexport const schematicBoxProps = z\n .object({\n schX: distance,\n schY: distance,\n width: distance.optional(),\n height: distance.optional(),\n overlay: z.array(z.string()).optional(),\n\n padding: distance.optional(),\n paddingLeft: distance.optional(),\n paddingRight: distance.optional(),\n paddingTop: distance.optional(),\n paddingBottom: distance.optional(),\n\n title: z.string().optional(),\n titleAlignment: ninePointAnchor.default(\"center\"),\n titleColor: z.string().optional(),\n titleFontSize: distance.optional(),\n titleInside: z.boolean().default(false),\n strokeStyle: z.enum([\"solid\", \"dashed\"]).default(\"solid\"),\n })\n .refine(\n (elm) =>\n (elm.width !== undefined && elm.height !== undefined) ||\n (Array.isArray(elm.overlay) && elm.overlay.length > 0),\n {\n message:\n \"Must provide either both `width` and `height`, or a non-empty `overlay` array.\",\n },\n )\n .refine(\n (elm) =>\n !(\n elm.width !== undefined &&\n elm.height !== undefined &&\n Array.isArray(elm.overlay) &&\n elm.overlay.length > 0\n ),\n {\n message:\n \"Cannot provide both `width`/`height` and `overlay` at the same time.\",\n },\n )\nexport type SchematicBoxProps = z.input<typeof schematicBoxProps>\n","import { z } from \"zod\"\n\nexport const ninePointAnchor = z.enum([\n \"top_left\",\n \"top_center\",\n \"top_right\",\n \"center_left\",\n \"center\",\n \"center_right\",\n \"bottom_left\",\n \"bottom_center\",\n \"bottom_right\",\n])\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\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","import { distance, rotation } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\nimport { fivePointAnchor } from \"lib/common/fivePointAnchor\"\n\nexport const schematicTextProps = z.object({\n schX: distance,\n schY: distance,\n text: z.string(),\n fontSize: z.number().default(1),\n anchor: z\n .union([fivePointAnchor.describe(\"legacy\"), ninePointAnchor])\n .default(\"center\"),\n color: z.string().default(\"#000000\"),\n schRotation: rotation.default(0),\n})\nexport type SchematicTextProps = z.input<typeof schematicTextProps>\n","import { z } from \"zod\"\n\nexport const fivePointAnchor = z.enum([\n \"center\",\n \"left\",\n \"right\",\n \"top\",\n \"bottom\",\n])\n","import { point } from \"circuit-json\"\nimport { z } from \"zod\"\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","import { length } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\nimport { z } from \"zod\"\n\nexport const silkscreenTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: ninePointAnchor.default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n})\nexport type SilkscreenTextProps = z.input<typeof silkscreenTextProps>\n","import { length, route_hint_point } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\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","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport type { z } from \"zod\"\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","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const silkscreenRectProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n filled: z.boolean().default(true).optional(),\n stroke: z.enum([\"dashed\", \"solid\", \"none\"]).optional(),\n strokeWidth: distance.optional(),\n width: distance,\n height: distance,\n })\nexport type SilkscreenRectProps = z.input<typeof silkscreenRectProps>\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\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","import { distance, layer_ref, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\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","import { direction } from \"lib/common/direction\"\nimport { commonLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\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","import {\n autorouterProp,\n type AutorouterProp,\n type PartsEngine,\n partsEngine,\n} from \"./components/group\"\nimport { expectTypesMatch } from \"./typecheck\"\nimport { z } from \"zod\"\n\nexport interface PlatformConfig {\n partsEngine?: PartsEngine\n\n autorouter?: AutorouterProp\n\n // TODO this follows a subset of the localStorage interface\n localCacheEngine?: any\n\n registryApiUrl?: string\n\n cloudAutorouterUrl?: string\n\n pcbDisabled?: boolean\n schematicDisabled?: boolean\n partsEngineDisabled?: boolean\n\n footprintLibraryMap?: Record<\n string,\n Record<\n string,\n | any[]\n | ((path: string) => Promise<{\n footprintCircuitJson: any[]\n }>)\n >\n >\n}\n\nconst unvalidatedCircuitJson = z.array(z.any()).describe(\"Circuit JSON\")\nconst pathToCircuitJsonFn = z\n .function()\n .args(z.string())\n .returns(z.promise(z.object({ footprintCircuitJson: z.array(z.any()) })))\n .describe(\"A function that takes a path and returns Circuit JSON\")\n\nexport const platformConfig = z.object({\n partsEngine: partsEngine.optional(),\n autorouter: autorouterProp.optional(),\n registryApiUrl: z.string().optional(),\n cloudAutorouterUrl: z.string().optional(),\n localCacheEngine: z.any().optional(),\n pcbDisabled: z.boolean().optional(),\n schematicDisabled: z.boolean().optional(),\n partsEngineDisabled: z.boolean().optional(),\n footprintLibraryMap: z\n .record(\n z.string(),\n z.record(\n z.string(),\n z.union([unvalidatedCircuitJson, pathToCircuitJsonFn]),\n ),\n )\n .optional(),\n}) as z.ZodType<PlatformConfig>\n\nexpectTypesMatch<PlatformConfig, z.infer<typeof platformConfig>>(true)\n"],"mappings":";AAYO,IAAM,mBAAmB,CAO9B,aAOS;AAAC;AAIZ,iBAQE,eAAe;AAEjB,iBAQE,iBAAiB;AAEnB,iBAOE,IAAI;AAEN,iBAOE,iCAAiC;;;ACjEnC,SAAS,SAAS;AACX,IAAM,YAAY,EAAE,KAAK,CAAC,MAAM,QAAQ,QAAQ,OAAO,CAAC;AASxD,IAAM,qBAAqB,EAAE,KAAK;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,iBAAuD,IAAI;AAC3D,iBAAyE,IAAI;;;ACnB7E,SAAS,KAAAA,UAAS;AAGX,IAAM,YAAYC,GAAE,MAAMA,GAAE,OAAO,EAAE,GAAGA,GAAE,OAAO,CAAC,CAAC;AAG1D,iBAAuD,IAAI;;;ACN3D;AAAA,EAEE,YAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,KAAAC,UAAS;;;ACRlB,SAAS,KAAAC,UAAS;;;ACAlB,SAAS,gBAAgB;AACzB,SAAS,KAAAC,UAAS;AAEX,IAAM,SAASA,GAAE,OAAO;AAAA,EAC7B,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL,CAAC;;;ADHM,IAAM,iBAAiBC,GAAE,OAAO;AAAA,EACrC,GAAGA,GAAE,MAAM,CAACA,GAAE,OAAO,GAAGA,GAAE,OAAO,CAAC,CAAC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,IAAE,IAAI,EAAE,SAAS;AAAA,EACnC,aAAaA,IAAE,QAAQ,EAAE,SAAS;AAAA,EAClC,mBAAmBA,IAAE,QAAQ,EAAE,SAAS;AAAA,EACxC,qBAAqBA,IAAE,QAAQ,EAAE,SAAS;AAAA,EAC1C,qBAAqBA,IAClB;AAAA,IACCA,IAAE,OAAO;AAAA,IACTA,IAAE;AAAA,MACAA,IAAE,OAAO;AAAA,MACTA,IAAE,MAAM,CAAC,wBAAwB,mBAAmB,CAAC;AAAA,IACvD;AAAA,EACF,EACC,SAAS;AACd,CAAC;AAED,iBAAiE,IAAI;","names":["z","z","distance","z","z","z","z","z","z","distance","z","distance","z","distance","distance","distance","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","point","z","point","z","z","z","point","z","point","z","z","distance","z","distance","distance","distance","supplier_name","z","supplier_name","distance","distance","z","distance","z","distance","z","distance","z","z","distance","z","distance","z","connectionTarget","z","resistance","z","resistance","z","frequency","capacitance","z","frequency","capacitance","distance","z","z","distance","capacitance","z","capacitance","z","z","z","distance","length","z","distance","z","z","distance","z","z","distance","z","z","distance","z","z","distance","distance","route_hint_point","z","z","distance","route_hint_point","layer_ref","z","layer_ref","z","z","distance","z","distance","connectionTarget","z","rotation","z","distance","z","rotation","z","distance","z","z","z","z","connectionTarget","connectionsProp","z","z","length","z","length","length","route_hint_point","z","route_hint_point","length","distance","route_hint_point","z","distance","layer_ref","layer_ref","distance","distance","z","distance","z","distance","z","distance","voltage","voltage","distance","z","z","z","distance","distance","z","distance","rotation","z","z","z","distance","rotation","point","z","length","z","length","length","route_hint_point","z","route_hint_point","length","distance","distance","distance","z","distance","distance","z","distance","distance","layer_ref","route_hint_point","z","z","z"]}
|
|
1
|
+
{"version":3,"sources":["../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/manual-edits/manual-edit-events/base_manual_edit_event.ts","../lib/manual-edits/manual-edit-events/edit_pcb_component_location_event.ts","../lib/manual-edits/manual-edit-events/edit_trace_hint_event.ts","../lib/manual-edits/manual-edit-events/edit_schematic_component_location_event.ts","../lib/manual-edits/manual-edit-events/edit_pcb_group_location_event.ts","../lib/manual-edits/manual-edit-events/edit_schematic_group_location_event.ts","../lib/manual-edits/manual_edit_event.ts","../lib/manual-edits/manual_edits_file.ts","../lib/manual-edits/manual_pcb_placement.ts","../lib/manual-edits/manual_trace_hint.ts","../lib/manual-edits/manual_schematic_placement.ts","../lib/components/breakout.ts","../lib/components/chip.ts","../lib/components/jumper.ts","../lib/components/solderjumper.ts","../lib/components/connector.ts","../lib/components/fuse.ts","../lib/components/platedhole.ts","../lib/components/resistor.ts","../lib/common/connectionsProp.ts","../lib/components/potentiometer.ts","../lib/components/crystal.ts","../lib/components/resonator.ts","../lib/components/stampboard.ts","../lib/components/capacitor.ts","../lib/components/net.ts","../lib/components/constrainedlayout.ts","../lib/common/distance.ts","../lib/components/constraint.ts","../lib/components/cutout.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/netlabel.ts","../lib/components/push-button.ts","../lib/components/subcircuit.ts","../lib/components/transistor.ts","../lib/components/mosfet.ts","../lib/components/inductor.ts","../lib/components/diode.ts","../lib/components/led.ts","../lib/components/switch.ts","../lib/components/fabrication-note-text.ts","../lib/components/fabrication-note-path.ts","../lib/components/pcb-trace.ts","../lib/components/via.ts","../lib/components/testpoint.ts","../lib/components/breakoutpoint.ts","../lib/components/pcb-keepout.ts","../lib/components/power-source.ts","../lib/components/schematic-box.ts","../lib/common/ninePointAnchor.ts","../lib/components/schematic-line.ts","../lib/components/schematic-text.ts","../lib/common/fivePointAnchor.ts","../lib/components/schematic-path.ts","../lib/components/silkscreen-text.ts","../lib/components/silkscreen-path.ts","../lib/components/silkscreen-line.ts","../lib/components/silkscreen-rect.ts","../lib/components/silkscreen-circle.ts","../lib/components/trace-hint.ts","../lib/components/port.ts","../lib/platformConfig.ts"],"sourcesContent":["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 doNotPlace?: boolean\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 doNotPlace: z.boolean().optional(),\n })\n\ntype InferredCommonComponentProps = z.input<typeof commonComponentProps>\nexpectTypesMatch<CommonComponentProps, InferredCommonComponentProps>(true)\n\nexport const componentProps = commonComponentProps\nexport type ComponentProps = z.input<typeof componentProps>\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 =\n | null\n | string\n | CadModelStl\n | CadModelObj\n | CadModelJscad\n\nexport const cadModelProp = z.union([\n z.null(),\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 type SchematicPinArrangement = SchematicPortArrangement\nexport type SchematicPinArrangementWithSizes = SchematicPortArrangementWithSizes\nexport type SchematicPinArrangementWithSides = SchematicPortArrangementWithSides\nexport type SchematicPinArrangementWithPinCounts =\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\n/**\n * @deprecated Use schematicPinArrangement instead.\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\nexport const schematicPinArrangement = schematicPortArrangement\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 marginTop?: number | string\n marginRight?: number | string\n marginBottom?: number | string\n marginLeft?: number | string\n\n /** @deprecated use marginLeft */\n leftMargin?: number | string\n /** @deprecated use marginRight */\n rightMargin?: number | string\n /** @deprecated use marginTop */\n topMargin?: number | string\n /** @deprecated use marginBottom */\n bottomMargin?: number | string\n }\n>\n\nexport const schematicPinStyle = z.record(\n z.object({\n marginLeft: distance.optional(),\n marginRight: distance.optional(),\n marginTop: distance.optional(),\n marginBottom: distance.optional(),\n\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 outlineOffsetX?: number | string\n outlineOffsetY?: number | string\n material?: \"fr4\" | \"fr1\"\n}\n\nexport const boardProps = subcircuitGroupProps.extend({\n width: distance.optional(),\n height: distance.optional(),\n outline: z.array(point).optional(),\n outlineOffsetX: distance.optional(),\n outlineOffsetY: distance.optional(),\n material: z.enum([\"fr4\", \"fr1\"]).default(\"fr4\"),\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 } from \"@tscircuit/layout\"\nimport { layer_ref, 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, PcbTrace } from \"circuit-json\"\nimport {\n manual_edits_file,\n type ManualEditsFile,\n type ManualEditsFileInput,\n} from \"lib/manual-edits\"\n\nexport const layoutConfig = z.object({\n layoutMode: z.enum([\"grid\", \"flex\", \"match-adapt\", \"none\"]).optional(),\n position: z.enum([\"absolute\", \"relative\"]).optional(),\n\n grid: z.boolean().optional(),\n gridCols: z.number().or(z.string()).optional(),\n gridRows: z.number().or(z.string()).optional(),\n gridTemplateRows: z.string().optional(),\n gridTemplateColumns: z.string().optional(),\n gridTemplate: z.string().optional(),\n gridGap: z.number().or(z.string()).optional(),\n\n flex: z.boolean().or(z.string()).optional(),\n flexDirection: z.enum([\"row\", \"column\"]).optional(),\n alignItems: z.enum([\"start\", \"center\", \"end\", \"stretch\"]).optional(),\n justifyContent: z.enum([\"start\", \"center\", \"end\", \"stretch\"]).optional(),\n flexRow: z.boolean().optional(),\n flexColumn: z.boolean().optional(),\n gap: z.number().or(z.string()).optional(),\n\n width: length.optional(),\n height: length.optional(),\n\n matchAdapt: z.boolean().optional(),\n matchAdaptTemplate: z.any().optional(),\n})\n\nexport interface LayoutConfig {\n layoutMode?: \"grid\" | \"flex\" | \"match-adapt\" | \"none\"\n position?: \"absolute\" | \"relative\"\n\n grid?: boolean\n gridCols?: number | string\n gridRows?: number | string\n gridTemplateRows?: string\n gridTemplateColumns?: string\n gridTemplate?: string\n gridGap?: number | string\n\n flex?: boolean | string\n flexDirection?: \"row\" | \"column\"\n alignItems?: \"start\" | \"center\" | \"end\" | \"stretch\"\n justifyContent?: \"start\" | \"center\" | \"end\" | \"stretch\"\n flexRow?: boolean\n flexColumn?: boolean\n gap?: number | string\n\n width?: Distance\n height?: Distance\n\n matchAdapt?: boolean\n matchAdaptTemplate?: any\n}\n\nexpectTypesMatch<LayoutConfig, z.input<typeof layoutConfig>>(true)\n\nexport interface Border {\n strokeWidth?: Distance\n dashed?: boolean\n solid?: boolean\n}\n\nexport const border = z.object({\n strokeWidth: length.optional(),\n dashed: z.boolean().optional(),\n solid: z.boolean().optional(),\n})\n\nexport interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {\n name?: string\n key?: any\n children?: any\n\n pcbWidth?: Distance\n pcbHeight?: Distance\n schWidth?: Distance\n schHeight?: Distance\n\n pcbLayout?: LayoutConfig\n schLayout?: LayoutConfig\n cellBorder?: Border | null\n border?: Border | null\n schPadding?: Distance\n schPaddingLeft?: Distance\n schPaddingRight?: Distance\n schPaddingTop?: Distance\n schPaddingBottom?: Distance\n}\n\nexport type PartsEngine = {\n findPart: (params: {\n sourceComponent: AnySourceComponent\n footprinterString?: string\n }) => Promise<SupplierPartNumbers> | SupplierPartNumbers\n}\n\nexport interface PcbRouteCache {\n pcbTraces: PcbTrace[]\n cacheKey: string\n}\n\nexport interface AutorouterConfig {\n serverUrl?: string\n inputFormat?: \"simplified\" | \"circuit-json\"\n serverMode?: \"job\" | \"solve-endpoint\"\n serverCacheEnabled?: boolean\n cache?: PcbRouteCache\n groupMode?: \"sequential-trace\" | \"subcircuit\"\n local?: boolean\n algorithmFn?: (simpleRouteJson: any) => Promise<any>\n}\n\nexport type AutorouterProp =\n | AutorouterConfig\n | \"sequential-trace\"\n | \"subcircuit\"\n | \"auto\"\n | \"auto-local\"\n | \"auto-cloud\"\n\nexport const autorouterConfig = z.object({\n serverUrl: z.string().optional(),\n inputFormat: z.enum([\"simplified\", \"circuit-json\"]).optional(),\n serverMode: z.enum([\"job\", \"solve-endpoint\"]).optional(),\n serverCacheEnabled: z.boolean().optional(),\n cache: z.custom<PcbRouteCache>((v) => true).optional(),\n groupMode: z.enum([\"sequential-trace\", \"subcircuit\"]).optional(),\n algorithmFn: z\n .custom<(simpleRouteJson: any) => Promise<any>>(\n (v) => typeof v === \"function\" || v === undefined,\n )\n .optional(),\n local: z.boolean().optional(),\n})\n\nexport const autorouterProp = z.union([\n autorouterConfig,\n z.literal(\"sequential-trace\"),\n z.literal(\"subcircuit\"),\n z.literal(\"auto\"),\n z.literal(\"auto-local\"),\n z.literal(\"auto-cloud\"),\n])\n\nexport interface SubcircuitGroupProps extends BaseGroupProps {\n layout?: LayoutBuilder\n manualEdits?: ManualEditsFileInput\n routingDisabled?: boolean\n defaultTraceWidth?: Distance\n minTraceWidth?: Distance\n pcbRouteCache?: PcbRouteCache\n\n autorouter?: AutorouterProp\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 /**\n * If true, net labels will automatically be created for complex traces\n */\n schTraceAutoLabelEnabled?: boolean\n\n partsEngine?: PartsEngine\n}\n\nexport interface SubcircuitGroupPropsWithBool extends SubcircuitGroupProps {\n subcircuit: true\n}\n\nexport interface NonSubcircuitGroupProps extends BaseGroupProps {\n subcircuit?: false | undefined\n}\n\nexport type GroupProps = SubcircuitGroupPropsWithBool | NonSubcircuitGroupProps\n\nexport const baseGroupProps = commonLayoutProps.extend({\n name: z.string().optional(),\n children: z.any().optional(),\n key: z.any().optional(),\n\n ...layoutConfig.shape,\n pcbWidth: length.optional(),\n pcbHeight: length.optional(),\n schWidth: length.optional(),\n schHeight: length.optional(),\n pcbLayout: layoutConfig.optional(),\n schLayout: layoutConfig.optional(),\n cellBorder: border.nullable().optional(),\n border: border.nullable().optional(),\n schPadding: length.optional(),\n schPaddingLeft: length.optional(),\n schPaddingRight: length.optional(),\n schPaddingTop: length.optional(),\n schPaddingBottom: length.optional(),\n})\n\nexport const partsEngine = z.custom<PartsEngine>((v) => \"findPart\" in v)\n\nexport const subcircuitGroupProps = baseGroupProps.extend({\n layout: z.custom<LayoutBuilder>((v) => true).optional(),\n manualEdits: manual_edits_file.optional(),\n schAutoLayoutEnabled: z.boolean().optional(),\n schTraceAutoLabelEnabled: z.boolean().optional(),\n routingDisabled: z.boolean().optional(),\n defaultTraceWidth: length.optional(),\n minTraceWidth: length.optional(),\n partsEngine: partsEngine.optional(),\n pcbRouteCache: z.custom<PcbRouteCache>((v) => true).optional(),\n autorouter: autorouterProp.optional(),\n})\n\nexport const subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({\n subcircuit: z.literal(true),\n})\n\nexport const groupProps = z.discriminatedUnion(\"subcircuit\", [\n baseGroupProps.extend({ subcircuit: z.literal(false).optional() }),\n subcircuitGroupPropsWithBool,\n])\n\ntype InferredBaseGroupProps = z.input<typeof baseGroupProps>\ntype InferredSubcircuitGroupPropsWithBool = z.input<\n typeof subcircuitGroupPropsWithBool\n>\n\nexpectTypesMatch<BaseGroupProps, InferredBaseGroupProps>(true)\nexpectTypesMatch<\n SubcircuitGroupPropsWithBool,\n InferredSubcircuitGroupPropsWithBool\n>(true)\n\ntype InferredGroupProps = z.input<typeof groupProps>\nexpectTypesMatch<GroupProps, InferredGroupProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport const base_manual_edit_event = z.object({\n edit_event_id: z.string(),\n in_progress: z.boolean().optional(),\n created_at: z.number(),\n})\n\nexport interface BaseManualEditEvent {\n edit_event_id: string\n in_progress?: boolean\n created_at: number\n}\n\nexport type BaseManualEditEventInput = z.input<typeof base_manual_edit_event>\n\nexpectTypesMatch<BaseManualEditEvent, z.infer<typeof base_manual_edit_event>>(\n true,\n)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_pcb_component_location_event = base_manual_edit_event.extend({\n pcb_edit_event_type: z\n .literal(\"edit_component_location\")\n .describe(\"deprecated\"),\n edit_event_type: z.literal(\"edit_pcb_component_location\"),\n pcb_component_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n})\n\n/** @deprecated use edit_pcb_component_location_event instead */\nexport const edit_component_location_event = edit_pcb_component_location_event\n\nexport interface EditPcbComponentLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_pcb_component_location\"\n /** @deprecated */\n pcb_edit_event_type: \"edit_component_location\"\n pcb_component_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditPcbComponentLocationEventInput = z.input<\n typeof edit_pcb_component_location_event\n>\n\nexpectTypesMatch<\n EditPcbComponentLocationEvent,\n z.infer<typeof edit_pcb_component_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_trace_hint_event = base_manual_edit_event.extend({\n pcb_edit_event_type: z.literal(\"edit_trace_hint\").describe(\"deprecated\"),\n edit_event_type: z.literal(\"edit_pcb_trace_hint\").optional(),\n pcb_port_id: z.string(),\n pcb_trace_hint_id: z.string().optional(),\n route: z.array(\n z.object({ x: z.number(), y: z.number(), via: z.boolean().optional() }),\n ),\n})\n\nexport interface EditTraceHintEvent extends BaseManualEditEvent {\n /** @deprecated */\n pcb_edit_event_type: \"edit_trace_hint\"\n edit_event_type?: \"edit_pcb_trace_hint\"\n pcb_port_id: string\n pcb_trace_hint_id?: string\n route: Array<{ x: number; y: number; via?: boolean }>\n}\n\nexport type EditTraceHintEventInput = z.input<typeof edit_trace_hint_event>\n\nexpectTypesMatch<EditTraceHintEvent, z.infer<typeof edit_trace_hint_event>>(\n true,\n)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_schematic_component_location_event =\n base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_schematic_component_location\"),\n schematic_component_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n })\n\nexport interface EditSchematicComponentLocationEvent\n extends BaseManualEditEvent {\n edit_event_type: \"edit_schematic_component_location\"\n schematic_component_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditSchematicComponentLocationEventInput = z.input<\n typeof edit_schematic_component_location_event\n>\n\nexpectTypesMatch<\n EditSchematicComponentLocationEvent,\n z.infer<typeof edit_schematic_component_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_pcb_group_location_event = base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_pcb_group_location\"),\n pcb_group_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n})\n\nexport interface EditPcbGroupLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_pcb_group_location\"\n pcb_group_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditPcbGroupLocationEventInput = z.input<\n typeof edit_pcb_group_location_event\n>\n\nexpectTypesMatch<\n EditPcbGroupLocationEvent,\n z.infer<typeof edit_pcb_group_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n base_manual_edit_event,\n type BaseManualEditEvent,\n} from \"./base_manual_edit_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const edit_schematic_group_location_event =\n base_manual_edit_event.extend({\n edit_event_type: z.literal(\"edit_schematic_group_location\"),\n schematic_group_id: z.string(),\n original_center: z.object({ x: z.number(), y: z.number() }),\n new_center: z.object({ x: z.number(), y: z.number() }),\n })\n\nexport interface EditSchematicGroupLocationEvent extends BaseManualEditEvent {\n edit_event_type: \"edit_schematic_group_location\"\n schematic_group_id: string\n original_center: { x: number; y: number }\n new_center: { x: number; y: number }\n}\n\nexport type EditSchematicGroupLocationEventInput = z.input<\n typeof edit_schematic_group_location_event\n>\n\nexpectTypesMatch<\n EditSchematicGroupLocationEvent,\n z.infer<typeof edit_schematic_group_location_event>\n>(true)\n","import { z } from \"zod\"\nimport {\n edit_pcb_component_location_event,\n type EditPcbComponentLocationEvent,\n} from \"./manual-edit-events/edit_pcb_component_location_event\"\nimport {\n edit_schematic_component_location_event,\n type EditSchematicComponentLocationEvent,\n} from \"./manual-edit-events/edit_schematic_component_location_event\"\nimport {\n edit_trace_hint_event,\n type EditTraceHintEvent,\n} from \"./manual-edit-events/edit_trace_hint_event\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type ManualEditEvent =\n | EditPcbComponentLocationEvent\n | EditTraceHintEvent\n | EditSchematicComponentLocationEvent\n\nexport const manual_edit_event = z.union([\n edit_pcb_component_location_event,\n edit_trace_hint_event,\n edit_schematic_component_location_event,\n])\n\nexport type ManualEditEventInput = z.input<typeof manual_edit_event>\ntype InferredManualEditEvent = z.infer<typeof manual_edit_event>\n\nexpectTypesMatch<ManualEditEvent, InferredManualEditEvent>(true)\n","import { z } from \"zod\"\nimport {\n manual_pcb_placement,\n type ManualPcbPlacement,\n} from \"./manual_pcb_placement\"\nimport { manual_edit_event } from \"./manual_edit_event\"\nimport { manual_trace_hint, type ManualTraceHint } from \"./manual_trace_hint\"\nimport {\n manual_schematic_placement,\n type ManualSchematicPlacement,\n} from \"./manual_schematic_placement\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_edits_file = z.object({\n pcb_placements: z.array(manual_pcb_placement).optional(),\n manual_trace_hints: z.array(manual_trace_hint).optional(),\n schematic_placements: z.array(manual_schematic_placement).optional(),\n})\n\nexport interface ManualEditsFile {\n pcb_placements?: ManualPcbPlacement[]\n manual_trace_hints?: ManualTraceHint[]\n schematic_placements?: ManualSchematicPlacement[]\n}\n\nexport type ManualEditsFileInput = z.input<typeof manual_edits_file>\n\nexpectTypesMatch<ManualEditsFile, z.infer<typeof manual_edits_file>>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_pcb_placement = z.object({\n selector: z.string(),\n relative_to: z\n .string()\n .optional()\n .default(\"group_center\")\n .describe(\"Can be a selector or 'group_center'\"),\n center: point,\n})\n\nexport interface ManualPcbPlacement {\n selector: string\n relative_to: string\n center: Point\n}\n\nexport type ManualPcbPlacementInput = z.input<typeof manual_pcb_placement>\ntype InferredManualPcbPlacement = z.infer<typeof manual_pcb_placement>\n\nexpectTypesMatch<ManualPcbPlacement, InferredManualPcbPlacement>(true)\n","import { z } from \"zod\"\nimport { layer_ref, route_hint_point, type RouteHintPoint } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_trace_hint = z.object({\n pcb_port_selector: z.string(),\n offsets: z.array(route_hint_point),\n})\n\nexport interface ManualTraceHint {\n pcb_port_selector: string\n offsets: Array<RouteHintPoint>\n}\n\nexport type ManualTraceHintInput = z.input<typeof manual_trace_hint>\n\nexpectTypesMatch<ManualTraceHint, z.infer<typeof manual_trace_hint>>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"circuit-json\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport const manual_schematic_placement = z.object({\n selector: z.string(),\n relative_to: z\n .string()\n .optional()\n .default(\"group_center\")\n .describe(\"Can be a selector or 'group_center'\"),\n center: point,\n})\n\nexport interface ManualSchematicPlacement {\n selector: string\n relative_to: string\n center: Point\n}\n\nexport type ManualSchematicPlacementInput = z.input<\n typeof manual_schematic_placement\n>\ntype InferredManualSchematicPlacement = z.infer<\n typeof manual_schematic_placement\n>\n\nexpectTypesMatch<ManualSchematicPlacement, InferredManualSchematicPlacement>(\n true,\n)\n","import { distance } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { subcircuitGroupProps, type SubcircuitGroupProps } from \"./group\"\n\nexport interface BreakoutProps\n extends Omit<SubcircuitGroupProps, \"subcircuit\"> {\n padding?: Distance\n paddingLeft?: Distance\n paddingRight?: Distance\n paddingTop?: Distance\n paddingBottom?: Distance\n}\n\nexport const breakoutProps = subcircuitGroupProps.extend({\n padding: distance.optional(),\n paddingLeft: distance.optional(),\n paddingRight: distance.optional(),\n paddingTop: distance.optional(),\n paddingBottom: distance.optional(),\n})\n\ntype InferredBreakoutProps = z.input<typeof breakoutProps>\nexpectTypesMatch<BreakoutProps, InferredBreakoutProps>(true)\n","import { distance, supplier_name } from \"circuit-json\"\nimport type { Distance } from \"lib/common/distance\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n type SupplierPartNumbers,\n} from \"lib/common/layout\"\nimport {\n type SchematicPortArrangement,\n schematicPortArrangement as schematicPinArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport {\n type SchematicPinStyle,\n schematicPinStyle,\n} from \"lib/common/schematicPinStyle\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { z } from \"zod\"\n\nexport type PinLabelsProp<\n PinNumber extends string = string,\n PinLabel extends string = string,\n> = Record<PinNumber, PinLabel | readonly PinLabel[] | PinLabel[]>\n\nexport type PinLabelFromPinLabelMap<PinLabelMap extends PinLabelsProp> =\n PinLabelMap extends PinLabelsProp<infer PinNumber, infer PinLabel>\n ? PinLabel\n : never\n\nexport interface PinCompatibleVariant {\n manufacturerPartNumber?: string\n supplierPartNumber?: SupplierPartNumbers\n}\n\nexport interface ChipPropsSU<PinLabel extends string = string>\n extends CommonComponentProps {\n manufacturerPartNumber?: string\n pinLabels?: PinLabelsProp<string, PinLabel>\n /**\n * Whether to show pin aliases in the schematic\n */\n showPinAliases?: boolean\n schPinArrangement?: SchematicPortArrangement\n /** @deprecated Use schPinArrangement instead. */\n schPortArrangement?: SchematicPortArrangement\n pinCompatibleVariants?: PinCompatibleVariant[]\n schPinStyle?: SchematicPinStyle\n schPinSpacing?: Distance\n schWidth?: Distance\n schHeight?: Distance\n noSchematicRepresentation?: boolean\n internallyConnectedPins?: string[][]\n externallyConnectedPins?: string[][]\n connections?: Connections<PinLabel>\n}\n\nexport type ChipProps<PinLabelMap extends PinLabelsProp | string = string> =\n ChipPropsSU<\n PinLabelMap extends PinLabelsProp\n ? PinLabelFromPinLabelMap<PinLabelMap>\n : PinLabelMap\n >\n\n/**\n * Get the pin labels for a component\n *\n * const pinLabels = { pin1: \"VCC\", pin2: \"GND\", pin3: \"DATA\" } as const\n * export const MyChip = (props: ChipProps<typeof pinLabels>) => {\n * // ...\n * }\n * type MyChipPinLabels = ChipPinLabels<typeof MyChip>\n * // MyChipPinLabels is \"VCC\" | \"GND\" | \"DATA\"\n *\n */\nexport type ChipPinLabels<T extends (props: ChipProps<any>) => any> =\n T extends (props: infer Props) => any\n ? Props extends ChipProps<infer PinLabelMap>\n ? PinLabelMap extends PinLabelsProp\n ? PinLabelFromPinLabelMap<PinLabelMap>\n : PinLabelMap extends string\n ? PinLabelMap\n : never\n : never\n : never\n\n/**\n * Get the connection prop type for a component\n *\n * const pinLabels = { pin1: \"VCC\", pin2: \"GND\", pin3: \"DATA\" } as const\n * export const MyChip = (props: ChipProps<typeof pinLabels>) => {\n * // ...\n * }\n * const connections: ChipConnections<typeof MyChip> = {\n * VCC: \"...\",\n * GND: \"...\",\n * DATA: \"...\",\n * }\n *\n */\nexport type ChipConnections<T extends (props: ChipProps<any>) => any> = {\n [K in ChipPinLabels<T>]: string\n}\n\nconst connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nconst connectionsProp = z\n .custom<Connections>()\n .pipe(z.record(z.string(), connectionTarget))\n\nexport const pinLabelsProp = z.record(\n z.string(),\n z.string().or(z.array(z.string()).readonly()).or(z.array(z.string())),\n)\n\nexpectTypesMatch<PinLabelsProp, z.input<typeof pinLabelsProp>>(true)\n\nexport const pinCompatibleVariant = z.object({\n manufacturerPartNumber: z.string().optional(),\n supplierPartNumber: z.record(supplier_name, z.array(z.string())).optional(),\n})\n\nexport const chipProps = commonComponentProps.extend({\n manufacturerPartNumber: z.string().optional(),\n pinLabels: pinLabelsProp.optional(),\n showPinAliases: z.boolean().optional(),\n internallyConnectedPins: z.array(z.array(z.string())).optional(),\n externallyConnectedPins: z.array(z.array(z.string())).optional(),\n schPinArrangement: schematicPinArrangement.optional(),\n schPortArrangement: schematicPinArrangement.optional(),\n pinCompatibleVariants: z.array(pinCompatibleVariant).optional(),\n schPinStyle: schematicPinStyle.optional(),\n schPinSpacing: distance.optional(),\n schWidth: distance.optional(),\n schHeight: distance.optional(),\n noSchematicRepresentation: z.boolean().optional(),\n connections: connectionsProp.optional(),\n})\n\n/**\n * @deprecated Use ChipProps instead.\n */\nexport const bugProps = chipProps\nexport type InferredChipProps = z.input<typeof chipProps>\n\n// Chip props are too complex to match up with zod types, we typecheck\n// them separately in the test files\nexpectTypesMatch<InferredChipProps, ChipPropsSU<string>>(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 * Number of pins on the jumper (2 or 3)\n */\n pinCount?: 2 | 3\n /**\n * Groups of pins that are internally connected (bridged)\n * e.g., [[\"1\",\"2\"], [\"2\",\"3\"]]\n */\n internallyConnectedPins?: string[][]\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 pinCount: z.union([z.literal(2), z.literal(3)]).optional(),\n internallyConnectedPins: z.array(z.array(z.string())).optional(),\n})\n\ntype InferredJumperProps = z.input<typeof jumperProps>\nexpectTypesMatch<JumperProps, InferredJumperProps>(true)\n","import { jumperProps, type JumperProps } from \"./jumper\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface SolderJumperProps extends JumperProps {\n /**\n * Pins that are bridged with solder by default\n */\n bridgedPins?: string[][]\n}\n\nexport const solderjumperProps = jumperProps.extend({\n bridgedPins: z.array(z.array(z.string())).optional(),\n})\n\ntype InferredSolderJumperProps = z.input<typeof solderjumperProps>\nexpectTypesMatch<SolderJumperProps, InferredSolderJumperProps>(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 ConnectorProps 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 * Groups of pins that are internally connected (bridged)\n * e.g., [[\"1\",\"2\"], [\"2\",\"3\"]]\n */\n internallyConnectedPins?: string[][]\n /**\n * Connector standard, e.g. usb_c, m2\n */\n standard?: \"usb_c\" | \"m2\"\n}\n\nexport const connectorProps = 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 internallyConnectedPins: z.array(z.array(z.string())).optional(),\n standard: z.enum([\"usb_c\", \"m2\"]).optional(),\n})\n\ntype InferredConnectorProps = z.input<typeof connectorProps>\nexpectTypesMatch<ConnectorProps, InferredConnectorProps>(true)\n","import { z } from \"zod\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\n\n/**\n * Pin labels for fuse component\n */\nexport const fusePinLabels = [\"pin1\", \"pin2\"] as const\n\nexport type FusePinLabels = (typeof fusePinLabels)[number]\n\nexport interface FuseProps extends CommonComponentProps {\n /**\n * Current rating of the fuse in amperes\n */\n currentRating: number | string\n\n /**\n * Voltage rating of the fuse\n */\n voltageRating?: number | string\n\n /**\n * Whether to show ratings on schematic\n */\n schShowRatings?: boolean\n\n /**\n * Connections to other components\n */\n connections?: Connections<FusePinLabels>\n}\n\n/**\n * Schema for validating fuse props\n */\nexport const fuseProps = commonComponentProps.extend({\n currentRating: z.union([z.number(), z.string()]),\n voltageRating: z.union([z.number(), z.string()]).optional(),\n schShowRatings: z.boolean().optional(),\n connections: z\n .record(\n z.string(),\n z.union([\n z.string(),\n z.array(z.string()).readonly(),\n z.array(z.string()),\n ]),\n )\n .optional(),\n})\n\nexport type InferredFuseProps = z.input<typeof fuseProps>\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 holeWidth: number | string\n holeHeight: number | string\n portHints?: PortHints\n\n /** @deprecated use holeWidth */\n innerWidth?: number | string\n /** @deprecated use holeHeight */\n innerHeight?: number | string\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 holeWidth: number | string\n holeHeight: number | string\n\n /** @deprecated use holeWidth */\n innerWidth?: number | string\n /** @deprecated use holeHeight */\n innerHeight?: number | string\n\n portHints?: PortHints\n}\n\nexport interface CircularHoleWithRectPlatedProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n shape: \"circular_hole_with_rect_pad\"\n holeDiameter: number | string\n rectPadWidth: number | string\n rectPadHeight: number | string\n holeShape?: \"circle\"\n padShape?: \"rect\"\n portHints?: PortHints\n}\n\nexport interface PillWithRectPadPlatedHoleProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n name?: string\n shape: \"pill_hole_with_rect_pad\"\n holeShape: \"pill\"\n padShape: \"rect\"\n holeWidth: number | string\n holeHeight: number | string\n rectPadWidth: number | string\n rectPadHeight: number | string\n portHints?: PortHints\n}\n\nexport type PlatedHoleProps =\n | CirclePlatedHoleProps\n | OvalPlatedHoleProps\n | PillPlatedHoleProps\n | CircularHoleWithRectPlatedProps\n | PillWithRectPadPlatedHoleProps\n\nconst distanceHiddenUndefined = z\n .custom<z.input<typeof distance>>()\n .transform((a) => {\n if (a === undefined) return undefined\n return distance.parse(a)\n })\n\nexport const platedHoleProps = z\n .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 holeWidth: distanceHiddenUndefined,\n holeHeight: distanceHiddenUndefined,\n innerWidth: distance.optional().describe(\"DEPRECATED use holeWidth\"),\n innerHeight: distance.optional().describe(\"DEPRECATED use holeHeight\"),\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 holeWidth: distanceHiddenUndefined,\n holeHeight: distanceHiddenUndefined,\n innerWidth: distance.optional().describe(\"DEPRECATED use holeWidth\"),\n innerHeight: distance.optional().describe(\"DEPRECATED use holeHeight\"),\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n shape: z.literal(\"circular_hole_with_rect_pad\"),\n holeDiameter: distance,\n rectPadWidth: distance,\n rectPadHeight: distance,\n holeShape: z.literal(\"circle\").optional(),\n padShape: z.literal(\"rect\").optional(),\n portHints: portHints.optional(),\n }),\n pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({\n name: z.string().optional(),\n shape: z.literal(\"pill_hole_with_rect_pad\"),\n holeShape: z.literal(\"pill\"),\n padShape: z.literal(\"rect\"),\n holeWidth: distance,\n holeHeight: distance,\n rectPadWidth: distance,\n rectPadHeight: distance,\n portHints: portHints.optional(),\n }),\n ])\n .refine((a) => {\n if (\"innerWidth\" in a && a.innerWidth !== undefined) {\n a.holeWidth ??= a.innerWidth\n }\n if (\"innerHeight\" in a && a.innerHeight !== undefined) {\n a.holeHeight ??= a.innerHeight\n }\n return a\n })\n\ntype InferredPlatedHoleProps = z.input<typeof platedHoleProps>\n\nexpectTypesMatch<PlatedHoleProps, InferredPlatedHoleProps>(true)\n","import { resistance } from \"circuit-json\"\nimport { createConnectionsProp } from \"lib/common/connectionsProp\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { z } from \"zod\"\n\nexport const resistorPinLabels = [\"pin1\", \"pin2\", \"pos\", \"neg\"] as const\nexport type ResistorPinLabels = (typeof resistorPinLabels)[number]\n\nexport interface ResistorProps extends CommonComponentProps {\n resistance: number | string\n pullupFor?: string\n pullupTo?: string\n pulldownFor?: string\n pulldownTo?: string\n connections?: Connections<ResistorPinLabels>\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\n connections: createConnectionsProp(resistorPinLabels).optional(),\n})\nexport const resistorPins = lrPins\n\ntype InferredResistorProps = z.input<typeof resistorProps>\nexpectTypesMatch<ResistorProps, InferredResistorProps>(true)\n","import { z } from \"zod\"\n\nexport const connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nexport const createConnectionsProp = <T extends readonly [string, ...string[]]>(\n labels: T,\n) => {\n return z.record(z.enum(labels), connectionTarget)\n}\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 type PotentiometerPinVariant = \"two_pin\" | \"three_pin\"\n\nexport interface PotentiometerProps extends CommonComponentProps {\n maxResistance: number | string\n pinVariant?: PotentiometerPinVariant\n}\n\nexport const potentiometerProps = commonComponentProps.extend({\n maxResistance: resistance,\n pinVariant: z.enum([\"two_pin\", \"three_pin\"]).optional(),\n})\n\ntype InferredPotentiometerProps = z.input<typeof potentiometerProps>\nexpectTypesMatch<PotentiometerProps, InferredPotentiometerProps>(true)\n","import { frequency, capacitance } 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 type PinVariant = \"two_pin\" | \"four_pin\"\n\nexport interface CrystalProps extends CommonComponentProps {\n frequency: number | string\n loadCapacitance: number | string\n pinVariant?: PinVariant\n}\n\nexport const crystalProps = commonComponentProps.extend({\n frequency: frequency,\n loadCapacitance: capacitance,\n pinVariant: z.enum([\"two_pin\", \"four_pin\"]).optional(),\n})\nexport const crystalPins = lrPins\n\ntype InferredCrystalProps = z.input<typeof crystalProps>\nexpectTypesMatch<CrystalProps, InferredCrystalProps>(true)\n","import { frequency, capacitance } 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 type ResonatorPinVariant = \"no_ground\" | \"ground_pin\" | \"two_ground_pins\"\n\nexport interface ResonatorProps extends CommonComponentProps {\n frequency: number | string\n loadCapacitance: number | string\n pinVariant?: ResonatorPinVariant\n}\n\nexport const resonatorProps = commonComponentProps.extend({\n frequency: frequency,\n loadCapacitance: capacitance,\n pinVariant: z.enum([\"no_ground\", \"ground_pin\", \"two_ground_pins\"]).optional(),\n})\n\ntype InferredResonatorProps = z.input<typeof resonatorProps>\nexpectTypesMatch<ResonatorProps, InferredResonatorProps>(true)\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { boardProps, type BoardProps } from \"lib/components/board\"\n\nexport interface StampboardProps extends BoardProps {\n leftPinCount?: number\n rightPinCount?: number\n topPinCount?: number\n bottomPinCount?: number\n leftPins?: string[]\n rightPins?: string[]\n topPins?: string[]\n bottomPins?: string[]\n pinPitch?: number | string\n innerHoles?: boolean\n}\n\nexport const stampboardProps = boardProps.extend({\n leftPinCount: z.number().optional(),\n rightPinCount: z.number().optional(),\n topPinCount: z.number().optional(),\n bottomPinCount: z.number().optional(),\n leftPins: z.array(z.string()).optional(),\n rightPins: z.array(z.string()).optional(),\n topPins: z.array(z.string()).optional(),\n bottomPins: z.array(z.string()).optional(),\n pinPitch: distance.optional(),\n innerHoles: z.boolean().optional(),\n})\n\ntype InferredStampboardProps = z.input<typeof stampboardProps>\nexpectTypesMatch<StampboardProps, InferredStampboardProps>(true)\n","import { capacitance, voltage } from \"circuit-json\"\nimport { createConnectionsProp } from \"lib/common/connectionsProp\"\nimport {\n type CommonComponentProps,\n commonComponentProps,\n lrPolarPins,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\nimport { z } from \"zod\"\n\nexport const capacitorPinLabels = [\n \"pin1\",\n \"pin2\",\n \"pos\",\n \"neg\",\n \"anode\",\n \"cathode\",\n] as const\nexport type CapacitorPinLabels = (typeof capacitorPinLabels)[number]\n\nexport interface CapacitorProps extends CommonComponentProps {\n capacitance: number | string\n maxVoltageRating?: number | string\n schShowRatings?: boolean\n polarized?: boolean\n decouplingFor?: string\n decouplingTo?: string\n bypassFor?: string\n bypassTo?: string\n maxDecouplingTraceLength?: number\n connections?: Connections<CapacitorPinLabels>\n}\n\nexport const capacitorProps = commonComponentProps.extend({\n capacitance,\n maxVoltageRating: voltage.optional(),\n schShowRatings: z.boolean().optional().default(false),\n polarized: z.boolean().optional().default(false),\n decouplingFor: z.string().optional(),\n decouplingTo: z.string().optional(),\n bypassFor: z.string().optional(),\n bypassTo: z.string().optional(),\n maxDecouplingTraceLength: z.number().optional(),\n connections: createConnectionsProp(capacitorPinLabels).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 { z } from \"zod\"\nimport { distance, type Distance } from \"lib/common/distance\"\nimport { point, type Point } from \"lib/common/point\"\nimport { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport interface RectCutoutProps\n extends Omit<PcbLayoutProps, \"layer\" | \"pcbRotation\"> {\n name?: string\n shape: \"rect\"\n width: Distance\n height: Distance\n}\n\nexport const rectCutoutProps = pcbLayoutProps\n .omit({\n layer: true,\n pcbRotation: true,\n })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"rect\"),\n width: distance,\n height: distance,\n })\nexpectTypesMatch<RectCutoutProps, z.input<typeof rectCutoutProps>>(true)\n\nexport interface CircleCutoutProps\n extends Omit<PcbLayoutProps, \"layer\" | \"pcbRotation\"> {\n name?: string\n shape: \"circle\"\n radius: Distance\n}\n\nexport const circleCutoutProps = pcbLayoutProps\n .omit({\n layer: true,\n pcbRotation: true,\n })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"circle\"),\n radius: distance,\n })\nexpectTypesMatch<CircleCutoutProps, z.input<typeof circleCutoutProps>>(true)\n\nexport interface PolygonCutoutProps\n extends Omit<PcbLayoutProps, \"layer\" | \"pcbRotation\"> {\n name?: string\n shape: \"polygon\"\n points: Point[]\n}\n\nexport const polygonCutoutProps = pcbLayoutProps\n .omit({\n layer: true,\n pcbRotation: true,\n })\n .extend({\n name: z.string().optional(),\n shape: z.literal(\"polygon\"),\n points: z.array(point),\n })\nexpectTypesMatch<PolygonCutoutProps, z.input<typeof polygonCutoutProps>>(true)\n\nexport type CutoutProps =\n | RectCutoutProps\n | CircleCutoutProps\n | PolygonCutoutProps\n\nexport const cutoutProps = z.discriminatedUnion(\"shape\", [\n rectCutoutProps,\n circleCutoutProps,\n polygonCutoutProps,\n])\n\nexport type CutoutPropsInput = z.input<typeof cutoutProps>\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 { point, type Point } from \"lib/common/point\"\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 RotatedRectSmtPadProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"rotated_rect\"\n width: Distance\n height: Distance\n ccwRotation: number\n portHints?: PortHints\n}\n\nexport interface CircleSmtPadProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"circle\"\n radius: Distance\n portHints?: PortHints\n}\n\nexport interface PillSmtPadProps extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"pill\"\n width: Distance\n height: Distance\n radius: Distance\n portHints?: PortHints\n}\n\nexport interface PolygonSmtPadProps\n extends Omit<PcbLayoutProps, \"pcbRotation\"> {\n shape: \"polygon\"\n points: Point[]\n portHints?: PortHints\n}\n\nexport type SmtPadProps =\n | RectSmtPadProps\n | CircleSmtPadProps\n | RotatedRectSmtPadProps\n | PillSmtPadProps\n | PolygonSmtPadProps\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 rotatedRectSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"rotated_rect\"),\n width: distance,\n height: distance,\n ccwRotation: z.number(),\n portHints: portHints.optional(),\n })\ntype InferredRotatedRectSmtPadProps = z.input<typeof rotatedRectSmtPadProps>\nexpectTypesMatch<InferredRotatedRectSmtPadProps, RotatedRectSmtPadProps>(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 pillSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"pill\"),\n width: distance,\n height: distance,\n radius: distance,\n portHints: portHints.optional(),\n })\ntype InferredPillSmtPadProps = z.input<typeof pillSmtPadProps>\nexpectTypesMatch<InferredPillSmtPadProps, PillSmtPadProps>(true)\n\nexport const polygonSmtPadProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n shape: z.literal(\"polygon\"),\n points: z.array(point),\n portHints: portHints.optional(),\n })\ntype InferredPolygonSmtPadProps = z.input<typeof polygonSmtPadProps>\nexpectTypesMatch<InferredPolygonSmtPadProps, PolygonSmtPadProps>(true)\n\nexport const smtPadProps = z.discriminatedUnion(\"shape\", [\n circleSmtPadProps,\n rectSmtPadProps,\n rotatedRectSmtPadProps,\n pillSmtPadProps,\n polygonSmtPadProps,\n])\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 schDisplayLabel: z.string().optional(),\n maxLength: distance.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 {\n schematicPinArrangement,\n type SchematicPinArrangement,\n} from \"lib/common/schematicPinDefinitions\"\nimport { connectionTarget } from \"lib/common/connectionsProp\"\nimport type { Connections } from \"lib/utility-types/connections-and-selectors\"\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 * Schematic facing direction\n */\n schFacingDirection?: \"up\" | \"down\" | \"left\" | \"right\"\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 * Connections to other components\n */\n connections?: Connections<string>\n\n /**\n * Direction the header is facing\n */\n facingDirection?: \"left\" | \"right\"\n\n /**\n * Pin arrangement in schematic view\n */\n schPinArrangement?: SchematicPinArrangement\n}\n\nexport const pinHeaderProps = commonComponentProps.extend({\n pinCount: z.number(),\n pitch: distance.optional(),\n schFacingDirection: z.enum([\"up\", \"down\", \"left\", \"right\"]).optional(),\n gender: z.enum([\"male\", \"female\"]).optional().default(\"male\"),\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 connections: z\n .custom<Connections>()\n .pipe(z.record(z.string(), connectionTarget))\n .optional(),\n facingDirection: z.enum([\"left\", \"right\"]).optional(),\n schPinArrangement: schematicPinArrangement.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\n/**\n * @deprecated Use NetLabelProps instead.\n */\nexport interface NetAliasProps {\n net?: string\n connection?: string\n schX?: number | string\n schY?: number | string\n schRotation?: number | string\n anchorSide?: \"left\" | \"up\" | \"right\" | \"down\"\n}\n\n/** @deprecated Use netLabelProps instead. */\nexport const netAliasProps = z.object({\n net: z.string().optional(),\n connection: 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 { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { distance } from \"lib/common/distance\"\nimport { rotation } from \"circuit-json\"\n\nexport interface NetLabelProps {\n net?: string\n connection?: string\n schX?: number | string\n schY?: number | string\n schRotation?: number | string\n anchorSide?: \"left\" | \"up\" | \"right\" | \"down\"\n}\n\nexport const netLabelProps = z.object({\n net: z.string().optional(),\n connection: 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 InferredNetLabelProps = z.input<typeof netLabelProps>\nexpectTypesMatch<NetLabelProps, InferredNetLabelProps>(true)\n","import { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\nimport { chipProps, type ChipProps, type PinLabelsProp } from \"./chip\"\n\nexport type PushButtonProps<T extends PinLabelsProp | string = string> =\n ChipProps<T>\n\nexport const pushButtonProps = chipProps.extend({})\n\nexpectTypesMatch<PushButtonProps, z.input<typeof pushButtonProps>>(true)\n","import type { SubcircuitGroupProps } from \"./group\"\nimport { subcircuitGroupProps } from \"./group\"\nimport type { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nexport type SubcircuitProps = SubcircuitGroupProps\n\nexport const subcircuitProps = subcircuitGroupProps\n\ntype InferredSubcircuitProps = z.input<typeof subcircuitProps>\nexpectTypesMatch<SubcircuitProps, InferredSubcircuitProps>(true)\n","import {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface TransistorProps extends CommonComponentProps {\n type: \"npn\" | \"pnp\" | \"bjt\" | \"jfet\" | \"mosfet\"\n}\n\nexport const transistorProps = commonComponentProps.extend({\n type: z.enum([\"npn\", \"pnp\", \"bjt\", \"jfet\", \"mosfet\"]),\n})\n\nexport const transistorPins = [\n \"pin1\",\n \"emitter\",\n \"pin2\",\n \"collector\",\n \"pin3\",\n \"base\",\n] as const\n\ntype InferredTransistorProps = z.input<typeof transistorProps>\nexpectTypesMatch<TransistorProps, InferredTransistorProps>(true)\n","import {\n type CommonComponentProps,\n commonComponentProps,\n} from \"../common/layout\"\nimport { expectTypesMatch } from \"../typecheck\"\nimport { z } from \"zod\"\n\nexport interface MosfetProps extends CommonComponentProps {\n channelType: \"n\" | \"p\"\n mosfetMode: \"enhancement\" | \"depletion\"\n}\n\nexport const mosfetProps = commonComponentProps.extend({\n channelType: z.enum([\"n\", \"p\"]),\n mosfetMode: z.enum([\"enhancement\", \"depletion\"]),\n})\n\nexport const mosfetPins = [\n \"pin1\",\n \"drain\",\n \"pin2\",\n \"source\",\n \"pin3\",\n \"gate\",\n] as const\n\ntype InferredMosfetProps = z.input<typeof mosfetProps>\nexpectTypesMatch<MosfetProps, InferredMosfetProps>(true)\n","import { inductance } 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 InductorProps extends CommonComponentProps {\n inductance: number | string\n maxCurrentRating?: number | string\n}\n\nexport const inductorProps = commonComponentProps.extend({\n inductance,\n maxCurrentRating: z.union([z.string(), z.number()]).optional(),\n})\n\nexport const inductorPins = lrPins\n\ntype InferredInductorProps = z.input<typeof inductorProps>\n\nexpectTypesMatch<InductorProps, InferredInductorProps>(true)\n","import {\n type CommonComponentProps,\n commonComponentProps,\n lrPolarPins,\n} from \"lib/common/layout\"\nimport { z } from \"zod\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nconst diodeConnectionKeys = z.enum([\n \"anode\",\n \"cathode\",\n \"pin1\",\n \"pin2\",\n \"pos\",\n \"neg\",\n])\n\nconst connectionTarget = z\n .string()\n .or(z.array(z.string()).readonly())\n .or(z.array(z.string()))\n\nconst connectionsProp = z.record(diodeConnectionKeys, connectionTarget)\n\nconst diodeVariant = z.enum([\"standard\", \"schottky\", \"zener\", \"photo\", \"tvs\"])\n\nexport const diodeProps = commonComponentProps\n .extend({\n connections: connectionsProp.optional(),\n variant: diodeVariant.optional().default(\"standard\"),\n standard: z.boolean().optional(),\n schottky: z.boolean().optional(),\n zener: z.boolean().optional(),\n photo: z.boolean().optional(),\n tvs: z.boolean().optional(),\n })\n .superRefine((data, ctx) => {\n // Check if multiple boolean flags are set directly\n const enabledFlags = [\n data.standard,\n data.schottky,\n data.zener,\n data.photo,\n data.tvs,\n ].filter(Boolean).length\n\n if (enabledFlags > 1) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: \"Exactly one diode variant must be enabled\",\n path: [],\n })\n return z.INVALID\n }\n })\n .transform((data) => {\n // Set all variant flags to false initially\n const result = {\n ...data,\n standard: false,\n schottky: false,\n zener: false,\n photo: false,\n tvs: false,\n }\n\n if (data.standard) result.standard = true\n else if (data.schottky) result.schottky = true\n else if (data.zener) result.zener = true\n else if (data.photo) result.photo = true\n else if (data.tvs) result.tvs = true\n else {\n switch (data.variant) {\n case \"standard\":\n result.standard = true\n break\n case \"schottky\":\n result.schottky = true\n break\n case \"zener\":\n result.zener = true\n break\n case \"photo\":\n result.photo = true\n break\n case \"tvs\":\n result.tvs = true\n break\n default:\n result.standard = true\n }\n }\n\n return result\n })\n\nexport const diodePins = lrPolarPins\n\nexport interface DiodeProps extends CommonComponentProps {\n connections?: {\n anode?: string | string[] | readonly string[]\n cathode?: string | string[] | readonly string[]\n pin1?: string | string[] | readonly string[]\n pin2?: string | string[] | readonly string[]\n pos?: string | string[] | readonly string[]\n neg?: string | string[] | readonly string[]\n }\n variant?: \"standard\" | \"schottky\" | \"zener\" | \"photo\" | \"tvs\"\n standard?: boolean\n schottky?: boolean\n zener?: boolean\n photo?: boolean\n tvs?: boolean\n}\n\nexport type InferredDiodeProps = z.input<typeof diodeProps>\nexpectTypesMatch<InferredDiodeProps, DiodeProps>(true)\n","import { commonComponentProps, lrPolarPins } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const ledProps = commonComponentProps.extend({\n color: z.string().optional(),\n wavelength: z.string().optional(),\n schDisplayValue: z.string().optional(),\n})\nexport const ledPins = lrPolarPins\nexport type LedProps = z.input<typeof ledProps>\n","import {\n type CommonComponentProps,\n commonComponentProps,\n} from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\n\nimport { z } from \"zod\"\n\nexport interface SwitchProps extends CommonComponentProps {\n type?: \"spst\" | \"spdt\" | \"dpst\" | \"dpdt\"\n isNormallyClosed?: boolean\n spdt?: boolean\n spst?: boolean\n dpst?: boolean\n dpdt?: boolean\n}\n\nexport const switchProps = commonComponentProps\n .extend({\n type: z.enum([\"spst\", \"spdt\", \"dpst\", \"dpdt\"]).optional(),\n isNormallyClosed: z.boolean().optional().default(false),\n spst: z.boolean().optional(),\n spdt: z.boolean().optional(),\n dpst: z.boolean().optional(),\n dpdt: z.boolean().optional(),\n })\n .transform((props) => {\n const updatedProps: SwitchProps = { ...props }\n\n if (updatedProps.dpdt) {\n updatedProps.type = \"dpdt\"\n } else if (updatedProps.spst) {\n updatedProps.type = \"spst\"\n } else if (updatedProps.spdt) {\n updatedProps.type = \"spdt\"\n } else if (updatedProps.dpst) {\n updatedProps.type = \"dpst\"\n }\n\n switch (updatedProps.type) {\n case \"spdt\":\n updatedProps.spdt = true\n break\n case \"spst\":\n updatedProps.spst = true\n break\n case \"dpst\":\n updatedProps.dpst = true\n break\n case \"dpdt\":\n updatedProps.dpdt = true\n break\n }\n\n return updatedProps\n })\n\nexport type InferredSwitchProps = z.infer<typeof switchProps>\nexpectTypesMatch<SwitchProps, InferredSwitchProps>(true)\n","import { length } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\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","import { length, route_hint_point } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\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 { distance, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\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","import { distance, layer_ref } from \"circuit-json\"\nimport { commonLayoutProps } from \"lib/common/layout\"\nimport type { z } from \"zod\"\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","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 TestpointProps extends CommonComponentProps {\n /**\n * The footprint variant of the testpoint either a surface pad or through-hole\n */\n footprintVariant?: \"pad\" | \"through_hole\"\n /**\n * The shape of the pad if using a pad variant\n */\n padShape?: \"rect\" | \"circle\"\n /**\n * Diameter of the copper pad (applies to both SMD pads and plated holes)\n */\n padDiameter?: number | string\n /**\n * Diameter of the hole if using a through-hole testpoint\n */\n holeDiameter?: number | string\n /**\n * Width of the pad when padShape is rect\n */\n width?: number | string\n /**\n * Height of the pad when padShape is rect\n */\n height?: number | string\n}\n\nexport const testpointProps = commonComponentProps\n .extend({\n footprintVariant: z.enum([\"pad\", \"through_hole\"]).optional(),\n padShape: z.enum([\"rect\", \"circle\"]).optional().default(\"circle\"),\n padDiameter: distance.optional(),\n holeDiameter: distance.optional(),\n width: distance.optional(),\n height: distance.optional(),\n })\n .refine(\n (props) =>\n props.footprintVariant !== \"through_hole\" ||\n props.holeDiameter !== undefined,\n { message: \"holeDiameter is required for through_hole testpoints\" },\n )\n\nexport type InferredTestpointProps = z.input<typeof testpointProps>\nexpectTypesMatch<TestpointProps, InferredTestpointProps>(true)\n","import { pcbLayoutProps, type PcbLayoutProps } from \"lib/common/layout\"\nimport { expectTypesMatch } from \"lib/typecheck\"\nimport { z } from \"zod\"\n\nexport interface BreakoutPointProps\n extends Omit<PcbLayoutProps, \"pcbRotation\" | \"layer\"> {\n connection: string\n}\n\nexport const breakoutPointProps = pcbLayoutProps\n .omit({ pcbRotation: true, layer: true })\n .extend({\n connection: z.string(),\n })\n\ntype InferredBreakoutPointProps = z.input<typeof breakoutPointProps>\nexpectTypesMatch<BreakoutPointProps, InferredBreakoutPointProps>(true)\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\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","import { voltage } from \"circuit-json\"\nimport { commonComponentProps } from \"lib/common/layout\"\nimport type { z } from \"zod\"\n\nexport const powerSourceProps = commonComponentProps.extend({\n voltage,\n})\nexport type PowerSourceProps = z.input<typeof powerSourceProps>\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\n\nexport const schematicBoxProps = z\n .object({\n schX: distance,\n schY: distance,\n width: distance.optional(),\n height: distance.optional(),\n overlay: z.array(z.string()).optional(),\n\n padding: distance.optional(),\n paddingLeft: distance.optional(),\n paddingRight: distance.optional(),\n paddingTop: distance.optional(),\n paddingBottom: distance.optional(),\n\n title: z.string().optional(),\n titleAlignment: ninePointAnchor.default(\"center\"),\n titleColor: z.string().optional(),\n titleFontSize: distance.optional(),\n titleInside: z.boolean().default(false),\n strokeStyle: z.enum([\"solid\", \"dashed\"]).default(\"solid\"),\n })\n .refine(\n (elm) =>\n (elm.width !== undefined && elm.height !== undefined) ||\n (Array.isArray(elm.overlay) && elm.overlay.length > 0),\n {\n message:\n \"Must provide either both `width` and `height`, or a non-empty `overlay` array.\",\n },\n )\n .refine(\n (elm) =>\n !(\n elm.width !== undefined &&\n elm.height !== undefined &&\n Array.isArray(elm.overlay) &&\n elm.overlay.length > 0\n ),\n {\n message:\n \"Cannot provide both `width`/`height` and `overlay` at the same time.\",\n },\n )\nexport type SchematicBoxProps = z.input<typeof schematicBoxProps>\n","import { z } from \"zod\"\n\nexport const ninePointAnchor = z.enum([\n \"top_left\",\n \"top_center\",\n \"top_right\",\n \"center_left\",\n \"center\",\n \"center_right\",\n \"bottom_left\",\n \"bottom_center\",\n \"bottom_right\",\n])\n","import { distance } from \"circuit-json\"\nimport { z } from \"zod\"\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","import { distance, rotation } from \"circuit-json\"\nimport { z } from \"zod\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\nimport { fivePointAnchor } from \"lib/common/fivePointAnchor\"\n\nexport const schematicTextProps = z.object({\n schX: distance,\n schY: distance,\n text: z.string(),\n fontSize: z.number().default(1),\n anchor: z\n .union([fivePointAnchor.describe(\"legacy\"), ninePointAnchor])\n .default(\"center\"),\n color: z.string().default(\"#000000\"),\n schRotation: rotation.default(0),\n})\nexport type SchematicTextProps = z.input<typeof schematicTextProps>\n","import { z } from \"zod\"\n\nexport const fivePointAnchor = z.enum([\n \"center\",\n \"left\",\n \"right\",\n \"top\",\n \"bottom\",\n])\n","import { point } from \"circuit-json\"\nimport { z } from \"zod\"\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","import { length } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { ninePointAnchor } from \"lib/common/ninePointAnchor\"\nimport { z } from \"zod\"\n\nexport const silkscreenTextProps = pcbLayoutProps.extend({\n text: z.string(),\n anchorAlignment: ninePointAnchor.default(\"center\"),\n font: z.enum([\"tscircuit2024\"]).optional(),\n fontSize: length.optional(),\n})\nexport type SilkscreenTextProps = z.input<typeof silkscreenTextProps>\n","import { length, route_hint_point } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\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","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport type { z } from \"zod\"\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","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\n\nexport const silkscreenRectProps = pcbLayoutProps\n .omit({ pcbRotation: true })\n .extend({\n filled: z.boolean().default(true).optional(),\n stroke: z.enum([\"dashed\", \"solid\", \"none\"]).optional(),\n strokeWidth: distance.optional(),\n width: distance,\n height: distance,\n })\nexport type SilkscreenRectProps = z.input<typeof silkscreenRectProps>\n","import { distance } from \"circuit-json\"\nimport { pcbLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\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","import { distance, layer_ref, route_hint_point } from \"circuit-json\"\nimport { z } from \"zod\"\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","import { direction } from \"lib/common/direction\"\nimport { commonLayoutProps } from \"lib/common/layout\"\nimport { z } from \"zod\"\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","import {\n autorouterProp,\n type AutorouterProp,\n type PartsEngine,\n partsEngine,\n} from \"./components/group\"\nimport { expectTypesMatch } from \"./typecheck\"\nimport { z } from \"zod\"\n\nexport interface PlatformConfig {\n partsEngine?: PartsEngine\n\n autorouter?: AutorouterProp\n\n // TODO this follows a subset of the localStorage interface\n localCacheEngine?: any\n\n registryApiUrl?: string\n\n cloudAutorouterUrl?: string\n\n pcbDisabled?: boolean\n schematicDisabled?: boolean\n partsEngineDisabled?: boolean\n\n footprintLibraryMap?: Record<\n string,\n Record<\n string,\n | any[]\n | ((path: string) => Promise<{\n footprintCircuitJson: any[]\n }>)\n >\n >\n}\n\nconst unvalidatedCircuitJson = z.array(z.any()).describe(\"Circuit JSON\")\nconst pathToCircuitJsonFn = z\n .function()\n .args(z.string())\n .returns(z.promise(z.object({ footprintCircuitJson: z.array(z.any()) })))\n .describe(\"A function that takes a path and returns Circuit JSON\")\n\nexport const platformConfig = z.object({\n partsEngine: partsEngine.optional(),\n autorouter: autorouterProp.optional(),\n registryApiUrl: z.string().optional(),\n cloudAutorouterUrl: z.string().optional(),\n localCacheEngine: z.any().optional(),\n pcbDisabled: z.boolean().optional(),\n schematicDisabled: z.boolean().optional(),\n partsEngineDisabled: z.boolean().optional(),\n footprintLibraryMap: z\n .record(\n z.string(),\n z.record(\n z.string(),\n z.union([unvalidatedCircuitJson, pathToCircuitJsonFn]),\n ),\n )\n .optional(),\n}) as z.ZodType<PlatformConfig>\n\nexpectTypesMatch<PlatformConfig, z.infer<typeof platformConfig>>(true)\n"],"mappings":";AAYO,IAAM,mBAAmB,CAO9B,aAOS;AAAC;AAIZ,iBAQE,eAAe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AAC,wBAAwB,mBAAmB,CAAC;AAAA,IACvD;AAAA,EACF,EACC,SAAS;AACd,CAAC;AAED,iBAAiE,IAAI;","names":["z","z","distance","z","z","z","z","z","z","distance","z","distance","z","distance","distance","distance","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","point","z","point","z","z","z","point","z","point","z","z","distance","z","distance","distance","distance","supplier_name","z","supplier_name","distance","distance","z","distance","z","distance","z","distance","z","z","distance","z","distance","z","connectionTarget","z","resistance","z","resistance","z","frequency","capacitance","z","frequency","capacitance","distance","z","z","distance","capacitance","z","capacitance","z","z","z","distance","length","z","distance","z","z","distance","z","z","distance","z","z","distance","z","z","distance","distance","route_hint_point","z","z","distance","route_hint_point","layer_ref","z","layer_ref","z","z","distance","z","distance","connectionTarget","z","rotation","z","distance","z","rotation","z","distance","z","z","z","z","z","connectionTarget","connectionsProp","z","z","length","z","length","length","route_hint_point","z","route_hint_point","length","distance","route_hint_point","z","distance","layer_ref","layer_ref","distance","distance","z","distance","z","distance","z","distance","voltage","voltage","distance","z","z","z","distance","distance","z","distance","rotation","z","z","z","distance","rotation","point","z","length","z","length","length","route_hint_point","z","route_hint_point","length","distance","distance","distance","z","distance","distance","z","distance","distance","layer_ref","route_hint_point","z","z","z"]}
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import { inductance } from "circuit-json"
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
type CommonComponentProps,
|
|
4
|
+
commonComponentProps,
|
|
5
|
+
lrPins,
|
|
6
|
+
} from "lib/common/layout"
|
|
7
|
+
import { expectTypesMatch } from "lib/typecheck"
|
|
8
|
+
import { z } from "zod"
|
|
9
|
+
|
|
10
|
+
export interface InductorProps extends CommonComponentProps {
|
|
11
|
+
inductance: number | string
|
|
12
|
+
maxCurrentRating?: number | string
|
|
13
|
+
}
|
|
4
14
|
|
|
5
15
|
export const inductorProps = commonComponentProps.extend({
|
|
6
16
|
inductance,
|
|
17
|
+
maxCurrentRating: z.union([z.string(), z.number()]).optional(),
|
|
7
18
|
})
|
|
19
|
+
|
|
8
20
|
export const inductorPins = lrPins
|
|
9
|
-
|
|
21
|
+
|
|
22
|
+
type InferredInductorProps = z.input<typeof inductorProps>
|
|
23
|
+
|
|
24
|
+
expectTypesMatch<InductorProps, InferredInductorProps>(true)
|