circuit-json 0.0.90 → 0.0.92
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.mts +174 -4
- package/dist/index.mjs +14 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1248,6 +1248,7 @@ declare const schematic_text: z.ZodObject<{
|
|
|
1248
1248
|
}>;
|
|
1249
1249
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
1250
1250
|
anchor: z.ZodDefault<z.ZodEnum<["center", "left", "right", "top", "bottom"]>>;
|
|
1251
|
+
color: z.ZodDefault<z.ZodString>;
|
|
1251
1252
|
}, "strip", z.ZodTypeAny, {
|
|
1252
1253
|
anchor: "center" | "left" | "right" | "top" | "bottom";
|
|
1253
1254
|
type: "schematic_text";
|
|
@@ -1259,6 +1260,7 @@ declare const schematic_text: z.ZodObject<{
|
|
|
1259
1260
|
x: number;
|
|
1260
1261
|
y: number;
|
|
1261
1262
|
};
|
|
1263
|
+
color: string;
|
|
1262
1264
|
}, {
|
|
1263
1265
|
type: "schematic_text";
|
|
1264
1266
|
schematic_component_id: string;
|
|
@@ -1270,6 +1272,7 @@ declare const schematic_text: z.ZodObject<{
|
|
|
1270
1272
|
};
|
|
1271
1273
|
anchor?: "center" | "left" | "right" | "top" | "bottom" | undefined;
|
|
1272
1274
|
rotation?: number | undefined;
|
|
1275
|
+
color?: string | undefined;
|
|
1273
1276
|
}>;
|
|
1274
1277
|
type SchematicTextInput = z.input<typeof schematic_text>;
|
|
1275
1278
|
type SchematicText = z.infer<typeof schematic_text>;
|
|
@@ -1290,6 +1293,10 @@ declare const schematic_port: z.ZodObject<{
|
|
|
1290
1293
|
y: string | number;
|
|
1291
1294
|
}>;
|
|
1292
1295
|
facing_direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
1296
|
+
distance_from_component_edge: z.ZodOptional<z.ZodNumber>;
|
|
1297
|
+
side_of_component: z.ZodOptional<z.ZodEnum<["top", "bottom", "left", "right"]>>;
|
|
1298
|
+
true_ccw_index: z.ZodOptional<z.ZodNumber>;
|
|
1299
|
+
pin_number: z.ZodOptional<z.ZodNumber>;
|
|
1293
1300
|
}, "strip", z.ZodTypeAny, {
|
|
1294
1301
|
type: "schematic_port";
|
|
1295
1302
|
source_port_id: string;
|
|
@@ -1298,8 +1305,12 @@ declare const schematic_port: z.ZodObject<{
|
|
|
1298
1305
|
y: number;
|
|
1299
1306
|
};
|
|
1300
1307
|
schematic_port_id: string;
|
|
1308
|
+
pin_number?: number | undefined;
|
|
1301
1309
|
schematic_component_id?: string | undefined;
|
|
1302
1310
|
facing_direction?: "left" | "right" | "up" | "down" | undefined;
|
|
1311
|
+
distance_from_component_edge?: number | undefined;
|
|
1312
|
+
side_of_component?: "left" | "right" | "top" | "bottom" | undefined;
|
|
1313
|
+
true_ccw_index?: number | undefined;
|
|
1303
1314
|
}, {
|
|
1304
1315
|
type: "schematic_port";
|
|
1305
1316
|
source_port_id: string;
|
|
@@ -1308,8 +1319,12 @@ declare const schematic_port: z.ZodObject<{
|
|
|
1308
1319
|
y: string | number;
|
|
1309
1320
|
};
|
|
1310
1321
|
schematic_port_id: string;
|
|
1322
|
+
pin_number?: number | undefined;
|
|
1311
1323
|
schematic_component_id?: string | undefined;
|
|
1312
1324
|
facing_direction?: "left" | "right" | "up" | "down" | undefined;
|
|
1325
|
+
distance_from_component_edge?: number | undefined;
|
|
1326
|
+
side_of_component?: "left" | "right" | "top" | "bottom" | undefined;
|
|
1327
|
+
true_ccw_index?: number | undefined;
|
|
1313
1328
|
}>;
|
|
1314
1329
|
type SchematicPortInput = z.input<typeof schematic_port>;
|
|
1315
1330
|
type SchematicPort = z.infer<typeof schematic_port>;
|
|
@@ -1480,6 +1495,38 @@ declare const schematic_debug_line: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1480
1495
|
};
|
|
1481
1496
|
label?: string | undefined;
|
|
1482
1497
|
}>;
|
|
1498
|
+
declare const schematic_debug_point: z.ZodObject<z.objectUtil.extendShape<{
|
|
1499
|
+
type: z.ZodLiteral<"schematic_debug_object">;
|
|
1500
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1501
|
+
}, {
|
|
1502
|
+
shape: z.ZodLiteral<"point">;
|
|
1503
|
+
center: z.ZodObject<{
|
|
1504
|
+
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
1505
|
+
y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
1506
|
+
}, "strip", z.ZodTypeAny, {
|
|
1507
|
+
x: number;
|
|
1508
|
+
y: number;
|
|
1509
|
+
}, {
|
|
1510
|
+
x: string | number;
|
|
1511
|
+
y: string | number;
|
|
1512
|
+
}>;
|
|
1513
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1514
|
+
type: "schematic_debug_object";
|
|
1515
|
+
center: {
|
|
1516
|
+
x: number;
|
|
1517
|
+
y: number;
|
|
1518
|
+
};
|
|
1519
|
+
shape: "point";
|
|
1520
|
+
label?: string | undefined;
|
|
1521
|
+
}, {
|
|
1522
|
+
type: "schematic_debug_object";
|
|
1523
|
+
center: {
|
|
1524
|
+
x: string | number;
|
|
1525
|
+
y: string | number;
|
|
1526
|
+
};
|
|
1527
|
+
shape: "point";
|
|
1528
|
+
label?: string | undefined;
|
|
1529
|
+
}>;
|
|
1483
1530
|
declare const schematic_debug_object: z.ZodDiscriminatedUnion<"shape", [z.ZodObject<z.objectUtil.extendShape<{
|
|
1484
1531
|
type: z.ZodLiteral<"schematic_debug_object">;
|
|
1485
1532
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -1578,6 +1625,37 @@ declare const schematic_debug_object: z.ZodDiscriminatedUnion<"shape", [z.ZodObj
|
|
|
1578
1625
|
y: string | number;
|
|
1579
1626
|
};
|
|
1580
1627
|
label?: string | undefined;
|
|
1628
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
1629
|
+
type: z.ZodLiteral<"schematic_debug_object">;
|
|
1630
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1631
|
+
}, {
|
|
1632
|
+
shape: z.ZodLiteral<"point">;
|
|
1633
|
+
center: z.ZodObject<{
|
|
1634
|
+
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
1635
|
+
y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
1636
|
+
}, "strip", z.ZodTypeAny, {
|
|
1637
|
+
x: number;
|
|
1638
|
+
y: number;
|
|
1639
|
+
}, {
|
|
1640
|
+
x: string | number;
|
|
1641
|
+
y: string | number;
|
|
1642
|
+
}>;
|
|
1643
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1644
|
+
type: "schematic_debug_object";
|
|
1645
|
+
center: {
|
|
1646
|
+
x: number;
|
|
1647
|
+
y: number;
|
|
1648
|
+
};
|
|
1649
|
+
shape: "point";
|
|
1650
|
+
label?: string | undefined;
|
|
1651
|
+
}, {
|
|
1652
|
+
type: "schematic_debug_object";
|
|
1653
|
+
center: {
|
|
1654
|
+
x: string | number;
|
|
1655
|
+
y: string | number;
|
|
1656
|
+
};
|
|
1657
|
+
shape: "point";
|
|
1658
|
+
label?: string | undefined;
|
|
1581
1659
|
}>]>;
|
|
1582
1660
|
type SchematicDebugObject = z.infer<typeof schematic_debug_object>;
|
|
1583
1661
|
type SchematicDebugRect = z.infer<typeof schematic_debug_rect>;
|
|
@@ -3491,6 +3569,7 @@ declare const pcb_fabrication_note_text: z.ZodObject<{
|
|
|
3491
3569
|
text: string;
|
|
3492
3570
|
pcb_component_id: string;
|
|
3493
3571
|
layer: "top" | "bottom";
|
|
3572
|
+
color?: string | undefined;
|
|
3494
3573
|
font?: "tscircuit2024" | undefined;
|
|
3495
3574
|
font_size?: string | number | undefined;
|
|
3496
3575
|
anchor_position?: {
|
|
@@ -3499,7 +3578,6 @@ declare const pcb_fabrication_note_text: z.ZodObject<{
|
|
|
3499
3578
|
} | undefined;
|
|
3500
3579
|
anchor_alignment?: "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right" | undefined;
|
|
3501
3580
|
pcb_fabrication_note_text_id?: string | undefined;
|
|
3502
|
-
color?: string | undefined;
|
|
3503
3581
|
}>;
|
|
3504
3582
|
type PcbFabricationNoteTextInput = z.input<typeof pcb_fabrication_note_text>;
|
|
3505
3583
|
/**
|
|
@@ -5604,6 +5682,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
5604
5682
|
text: string;
|
|
5605
5683
|
pcb_component_id: string;
|
|
5606
5684
|
layer: "top" | "bottom";
|
|
5685
|
+
color?: string | undefined;
|
|
5607
5686
|
font?: "tscircuit2024" | undefined;
|
|
5608
5687
|
font_size?: string | number | undefined;
|
|
5609
5688
|
anchor_position?: {
|
|
@@ -5612,7 +5691,6 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
5612
5691
|
} | undefined;
|
|
5613
5692
|
anchor_alignment?: "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right" | undefined;
|
|
5614
5693
|
pcb_fabrication_note_text_id?: string | undefined;
|
|
5615
|
-
color?: string | undefined;
|
|
5616
5694
|
}>, z.ZodObject<{
|
|
5617
5695
|
type: z.ZodLiteral<"schematic_box">;
|
|
5618
5696
|
schematic_component_id: z.ZodString;
|
|
@@ -5651,6 +5729,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
5651
5729
|
}>;
|
|
5652
5730
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
5653
5731
|
anchor: z.ZodDefault<z.ZodEnum<["center", "left", "right", "top", "bottom"]>>;
|
|
5732
|
+
color: z.ZodDefault<z.ZodString>;
|
|
5654
5733
|
}, "strip", z.ZodTypeAny, {
|
|
5655
5734
|
anchor: "center" | "left" | "right" | "top" | "bottom";
|
|
5656
5735
|
type: "schematic_text";
|
|
@@ -5662,6 +5741,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
5662
5741
|
x: number;
|
|
5663
5742
|
y: number;
|
|
5664
5743
|
};
|
|
5744
|
+
color: string;
|
|
5665
5745
|
}, {
|
|
5666
5746
|
type: "schematic_text";
|
|
5667
5747
|
schematic_component_id: string;
|
|
@@ -5673,6 +5753,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
5673
5753
|
};
|
|
5674
5754
|
anchor?: "center" | "left" | "right" | "top" | "bottom" | undefined;
|
|
5675
5755
|
rotation?: number | undefined;
|
|
5756
|
+
color?: string | undefined;
|
|
5676
5757
|
}>, z.ZodObject<{
|
|
5677
5758
|
type: z.ZodLiteral<"schematic_line">;
|
|
5678
5759
|
schematic_component_id: z.ZodString;
|
|
@@ -5938,6 +6019,10 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
5938
6019
|
y: string | number;
|
|
5939
6020
|
}>;
|
|
5940
6021
|
facing_direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
6022
|
+
distance_from_component_edge: z.ZodOptional<z.ZodNumber>;
|
|
6023
|
+
side_of_component: z.ZodOptional<z.ZodEnum<["top", "bottom", "left", "right"]>>;
|
|
6024
|
+
true_ccw_index: z.ZodOptional<z.ZodNumber>;
|
|
6025
|
+
pin_number: z.ZodOptional<z.ZodNumber>;
|
|
5941
6026
|
}, "strip", z.ZodTypeAny, {
|
|
5942
6027
|
type: "schematic_port";
|
|
5943
6028
|
source_port_id: string;
|
|
@@ -5946,8 +6031,12 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
5946
6031
|
y: number;
|
|
5947
6032
|
};
|
|
5948
6033
|
schematic_port_id: string;
|
|
6034
|
+
pin_number?: number | undefined;
|
|
5949
6035
|
schematic_component_id?: string | undefined;
|
|
5950
6036
|
facing_direction?: "left" | "right" | "up" | "down" | undefined;
|
|
6037
|
+
distance_from_component_edge?: number | undefined;
|
|
6038
|
+
side_of_component?: "left" | "right" | "top" | "bottom" | undefined;
|
|
6039
|
+
true_ccw_index?: number | undefined;
|
|
5951
6040
|
}, {
|
|
5952
6041
|
type: "schematic_port";
|
|
5953
6042
|
source_port_id: string;
|
|
@@ -5956,8 +6045,12 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
5956
6045
|
y: string | number;
|
|
5957
6046
|
};
|
|
5958
6047
|
schematic_port_id: string;
|
|
6048
|
+
pin_number?: number | undefined;
|
|
5959
6049
|
schematic_component_id?: string | undefined;
|
|
5960
6050
|
facing_direction?: "left" | "right" | "up" | "down" | undefined;
|
|
6051
|
+
distance_from_component_edge?: number | undefined;
|
|
6052
|
+
side_of_component?: "left" | "right" | "top" | "bottom" | undefined;
|
|
6053
|
+
true_ccw_index?: number | undefined;
|
|
5961
6054
|
}>, z.ZodObject<{
|
|
5962
6055
|
type: z.ZodLiteral<"schematic_trace">;
|
|
5963
6056
|
schematic_trace_id: z.ZodString;
|
|
@@ -6219,6 +6312,37 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
6219
6312
|
y: string | number;
|
|
6220
6313
|
};
|
|
6221
6314
|
label?: string | undefined;
|
|
6315
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
6316
|
+
type: z.ZodLiteral<"schematic_debug_object">;
|
|
6317
|
+
label: z.ZodOptional<z.ZodString>;
|
|
6318
|
+
}, {
|
|
6319
|
+
shape: z.ZodLiteral<"point">;
|
|
6320
|
+
center: z.ZodObject<{
|
|
6321
|
+
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
6322
|
+
y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
6323
|
+
}, "strip", z.ZodTypeAny, {
|
|
6324
|
+
x: number;
|
|
6325
|
+
y: number;
|
|
6326
|
+
}, {
|
|
6327
|
+
x: string | number;
|
|
6328
|
+
y: string | number;
|
|
6329
|
+
}>;
|
|
6330
|
+
}>, "strip", z.ZodTypeAny, {
|
|
6331
|
+
type: "schematic_debug_object";
|
|
6332
|
+
center: {
|
|
6333
|
+
x: number;
|
|
6334
|
+
y: number;
|
|
6335
|
+
};
|
|
6336
|
+
shape: "point";
|
|
6337
|
+
label?: string | undefined;
|
|
6338
|
+
}, {
|
|
6339
|
+
type: "schematic_debug_object";
|
|
6340
|
+
center: {
|
|
6341
|
+
x: string | number;
|
|
6342
|
+
y: string | number;
|
|
6343
|
+
};
|
|
6344
|
+
shape: "point";
|
|
6345
|
+
label?: string | undefined;
|
|
6222
6346
|
}>]>, z.ZodObject<{
|
|
6223
6347
|
type: z.ZodLiteral<"cad_component">;
|
|
6224
6348
|
cad_component_id: z.ZodString;
|
|
@@ -8146,6 +8270,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8146
8270
|
text: string;
|
|
8147
8271
|
pcb_component_id: string;
|
|
8148
8272
|
layer: "top" | "bottom";
|
|
8273
|
+
color?: string | undefined;
|
|
8149
8274
|
font?: "tscircuit2024" | undefined;
|
|
8150
8275
|
font_size?: string | number | undefined;
|
|
8151
8276
|
anchor_position?: {
|
|
@@ -8154,7 +8279,6 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8154
8279
|
} | undefined;
|
|
8155
8280
|
anchor_alignment?: "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right" | undefined;
|
|
8156
8281
|
pcb_fabrication_note_text_id?: string | undefined;
|
|
8157
|
-
color?: string | undefined;
|
|
8158
8282
|
}>, z.ZodObject<{
|
|
8159
8283
|
type: z.ZodLiteral<"schematic_box">;
|
|
8160
8284
|
schematic_component_id: z.ZodString;
|
|
@@ -8193,6 +8317,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8193
8317
|
}>;
|
|
8194
8318
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
8195
8319
|
anchor: z.ZodDefault<z.ZodEnum<["center", "left", "right", "top", "bottom"]>>;
|
|
8320
|
+
color: z.ZodDefault<z.ZodString>;
|
|
8196
8321
|
}, "strip", z.ZodTypeAny, {
|
|
8197
8322
|
anchor: "center" | "left" | "right" | "top" | "bottom";
|
|
8198
8323
|
type: "schematic_text";
|
|
@@ -8204,6 +8329,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8204
8329
|
x: number;
|
|
8205
8330
|
y: number;
|
|
8206
8331
|
};
|
|
8332
|
+
color: string;
|
|
8207
8333
|
}, {
|
|
8208
8334
|
type: "schematic_text";
|
|
8209
8335
|
schematic_component_id: string;
|
|
@@ -8215,6 +8341,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8215
8341
|
};
|
|
8216
8342
|
anchor?: "center" | "left" | "right" | "top" | "bottom" | undefined;
|
|
8217
8343
|
rotation?: number | undefined;
|
|
8344
|
+
color?: string | undefined;
|
|
8218
8345
|
}>, z.ZodObject<{
|
|
8219
8346
|
type: z.ZodLiteral<"schematic_line">;
|
|
8220
8347
|
schematic_component_id: z.ZodString;
|
|
@@ -8480,6 +8607,10 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8480
8607
|
y: string | number;
|
|
8481
8608
|
}>;
|
|
8482
8609
|
facing_direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
|
|
8610
|
+
distance_from_component_edge: z.ZodOptional<z.ZodNumber>;
|
|
8611
|
+
side_of_component: z.ZodOptional<z.ZodEnum<["top", "bottom", "left", "right"]>>;
|
|
8612
|
+
true_ccw_index: z.ZodOptional<z.ZodNumber>;
|
|
8613
|
+
pin_number: z.ZodOptional<z.ZodNumber>;
|
|
8483
8614
|
}, "strip", z.ZodTypeAny, {
|
|
8484
8615
|
type: "schematic_port";
|
|
8485
8616
|
source_port_id: string;
|
|
@@ -8488,8 +8619,12 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8488
8619
|
y: number;
|
|
8489
8620
|
};
|
|
8490
8621
|
schematic_port_id: string;
|
|
8622
|
+
pin_number?: number | undefined;
|
|
8491
8623
|
schematic_component_id?: string | undefined;
|
|
8492
8624
|
facing_direction?: "left" | "right" | "up" | "down" | undefined;
|
|
8625
|
+
distance_from_component_edge?: number | undefined;
|
|
8626
|
+
side_of_component?: "left" | "right" | "top" | "bottom" | undefined;
|
|
8627
|
+
true_ccw_index?: number | undefined;
|
|
8493
8628
|
}, {
|
|
8494
8629
|
type: "schematic_port";
|
|
8495
8630
|
source_port_id: string;
|
|
@@ -8498,8 +8633,12 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8498
8633
|
y: string | number;
|
|
8499
8634
|
};
|
|
8500
8635
|
schematic_port_id: string;
|
|
8636
|
+
pin_number?: number | undefined;
|
|
8501
8637
|
schematic_component_id?: string | undefined;
|
|
8502
8638
|
facing_direction?: "left" | "right" | "up" | "down" | undefined;
|
|
8639
|
+
distance_from_component_edge?: number | undefined;
|
|
8640
|
+
side_of_component?: "left" | "right" | "top" | "bottom" | undefined;
|
|
8641
|
+
true_ccw_index?: number | undefined;
|
|
8503
8642
|
}>, z.ZodObject<{
|
|
8504
8643
|
type: z.ZodLiteral<"schematic_trace">;
|
|
8505
8644
|
schematic_trace_id: z.ZodString;
|
|
@@ -8761,6 +8900,37 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8761
8900
|
y: string | number;
|
|
8762
8901
|
};
|
|
8763
8902
|
label?: string | undefined;
|
|
8903
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
8904
|
+
type: z.ZodLiteral<"schematic_debug_object">;
|
|
8905
|
+
label: z.ZodOptional<z.ZodString>;
|
|
8906
|
+
}, {
|
|
8907
|
+
shape: z.ZodLiteral<"point">;
|
|
8908
|
+
center: z.ZodObject<{
|
|
8909
|
+
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
8910
|
+
y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
8911
|
+
}, "strip", z.ZodTypeAny, {
|
|
8912
|
+
x: number;
|
|
8913
|
+
y: number;
|
|
8914
|
+
}, {
|
|
8915
|
+
x: string | number;
|
|
8916
|
+
y: string | number;
|
|
8917
|
+
}>;
|
|
8918
|
+
}>, "strip", z.ZodTypeAny, {
|
|
8919
|
+
type: "schematic_debug_object";
|
|
8920
|
+
center: {
|
|
8921
|
+
x: number;
|
|
8922
|
+
y: number;
|
|
8923
|
+
};
|
|
8924
|
+
shape: "point";
|
|
8925
|
+
label?: string | undefined;
|
|
8926
|
+
}, {
|
|
8927
|
+
type: "schematic_debug_object";
|
|
8928
|
+
center: {
|
|
8929
|
+
x: string | number;
|
|
8930
|
+
y: string | number;
|
|
8931
|
+
};
|
|
8932
|
+
shape: "point";
|
|
8933
|
+
label?: string | undefined;
|
|
8764
8934
|
}>]>, z.ZodObject<{
|
|
8765
8935
|
type: z.ZodLiteral<"cad_component">;
|
|
8766
8936
|
cad_component_id: z.ZodString;
|
|
@@ -8885,4 +9055,4 @@ type AnySoupElement = AnyCircuitElement;
|
|
|
8885
9055
|
*/
|
|
8886
9056
|
type AnySoupElementInput = AnyCircuitElementInput;
|
|
8887
9057
|
|
|
8888
|
-
export { type AnyCircuitElement, type AnyCircuitElementInput, type AnySoupElement, type AnySoupElementInput, type AnySourceComponent, type CadComponent, type CadComponentInput, type Distance, type InputPoint, type InputPosition, type InputRotation, type LayerRef, type LayerRefInput, type Length, type PCBBoard, type PCBComponent, type PCBFabricationNotePath, type PCBFabricationNoteText, type PCBHole, type PCBHoleInput, type PCBKeepout, type PCBKeepoutInput, type PCBPlacementError, type PCBPlatedHole, type PCBPlatedHoleInput, type PCBPort, type PCBPortInput, type PCBPortNotMatchedError, type PCBSMTPad, type PCBSMTPadInput, type PCBSilkscreenLine, type PCBSilkscreenText, type PCBSolderPasteInput, type PCBText, type PCBTrace, type PCBTraceError, type PCBTraceHint, type PCBTraceInput, type PCBVia, type PcbBoard, type PcbBoardInput, type PcbCircuitElement, type PcbComponent, type PcbComponentInput, type PcbFabricationNotePath, type PcbFabricationNotePathInput, type PcbFabricationNoteText, type PcbFabricationNoteTextInput, type PcbHole, type PcbHoleCircleOrSquare, type PcbHoleCircleOrSquareInput, type PcbHoleOval, type PcbHoleOvalInput, type PcbPlacementError, type PcbPlacementErrorInput, type PcbPlatedHole, type PcbPlatedHoleCircle, type PcbPlatedHoleInput, type PcbPlatedHoleOval, type PcbPort, type PcbPortInput, type PcbPortNotMatchedError, type PcbPortNotMatchedErrorInput, type PcbRouteHint, type PcbRouteHintInput, type PcbRouteHints, type PcbRouteHintsInput, type PcbSilkscreenCircle, type PcbSilkscreenCircleInput, type PcbSilkscreenLine, type PcbSilkscreenLineInput, type PcbSilkscreenOval, type PcbSilkscreenOvalDeprecated, type PcbSilkscreenOvalInput, type PcbSilkscreenPath, type PcbSilkscreenPathDeprecated, type PcbSilkscreenPathInput, type PcbSilkscreenRect, type PcbSilkscreenRectInput, type PcbSilkscreenRectOld, type PcbSilkscreenText, type PcbSilkscreenTextInput, type PcbSmtPad, type PcbSmtPadCircle, type PcbSmtPadRect, type PcbSolderPaste, type PcbSolderPasteCircle, type PcbSolderPasteRect, type PcbText, type PcbTextInput, type PcbTrace, type PcbTraceError, type PcbTraceErrorInput, type PcbTraceHint, type PcbTraceHintInput, type PcbTraceInput, type PcbTraceRoutePoint, type PcbTraceRoutePointVia, type PcbTraceRoutePointWire, type PcbVia, type PcbViaInput, type Point, type Point3, type Position, type Rotation, type RouteHintPoint, type RouteHintPointInput, type SchematicBox, type SchematicBoxInput, type SchematicComponent, type SchematicComponentInput, type SchematicDebugLine, type SchematicDebugObject, type SchematicDebugObjectInput, type SchematicDebugRect, type SchematicError, type SchematicErrorInput, type SchematicLine, type SchematicLineInput, type SchematicNetLabel, type SchematicNetLabelInput, type SchematicPath, type SchematicPathInput, type SchematicPort, type SchematicPortInput, type SchematicText, type SchematicTextInput, type SchematicTrace, type SchematicTraceInput, type Size, type SourceComponentBase, type SourceGroup, type SourceGroupInput, type SourceLed, type SourceLedInput, type SourceNet, type SourceNetInput, type SourcePort, type SourceSimpleBattery, type SourceSimpleBatteryInput, type SourceSimpleBugInput, type SourceSimpleCapacitor, type SourceSimpleCapacitorInput, type SourceSimpleChip, type SourceSimpleChipInput, type SourceSimpleDiode, type SourceSimpleDiodeInput, type SourceSimpleGround, type SourceSimpleGroundInput, type SourceSimpleInductor, type SourceSimpleInductorInput, type SourceSimplePowerSource, type SourceSimplePowerSourceInput, type SourceSimpleResistor, type SourceSimpleResistorInput, type SourceTrace, type SupplierName, type VisibleLayer, type VisibleLayerRef, all_layers, any_circuit_element, any_soup_element, any_source_component, battery_capacity, cad_component, capacitance, current, distance, getZodPrefixedIdWithDefault, inductance, layer_ref, layer_string, length, pcb_board, pcb_component, pcb_fabrication_note_path, pcb_fabrication_note_text, pcb_hole, pcb_hole_circle_or_square_shape, pcb_hole_oval_shape, pcb_keepout, pcb_placement_error, pcb_plated_hole, pcb_port, pcb_port_not_matched_error, pcb_route_hint, pcb_route_hints, pcb_silkscreen_circle, pcb_silkscreen_line, pcb_silkscreen_oval, pcb_silkscreen_path, pcb_silkscreen_rect, pcb_silkscreen_text, pcb_smtpad, pcb_solder_paste, pcb_text, pcb_trace, pcb_trace_error, pcb_trace_hint, pcb_trace_route_point, pcb_trace_route_point_via, pcb_trace_route_point_wire, pcb_via, point, point3, position, position3, resistance, rotation, route_hint_point, schematic_box, schematic_component, schematic_debug_line, schematic_debug_object, schematic_debug_object_base, schematic_debug_rect, schematic_error, schematic_line, schematic_net_label, schematic_path, schematic_pin_styles, schematic_port, schematic_text, schematic_trace, size, source_component_base, source_group, source_led, source_net, source_port, source_simple_battery, source_simple_bug, source_simple_capacitor, source_simple_chip, source_simple_diode, source_simple_ground, source_simple_inductor, source_simple_power_source, source_simple_resistor, source_trace, supplier_name, time, visible_layer, voltage };
|
|
9058
|
+
export { type AnyCircuitElement, type AnyCircuitElementInput, type AnySoupElement, type AnySoupElementInput, type AnySourceComponent, type CadComponent, type CadComponentInput, type Distance, type InputPoint, type InputPosition, type InputRotation, type LayerRef, type LayerRefInput, type Length, type PCBBoard, type PCBComponent, type PCBFabricationNotePath, type PCBFabricationNoteText, type PCBHole, type PCBHoleInput, type PCBKeepout, type PCBKeepoutInput, type PCBPlacementError, type PCBPlatedHole, type PCBPlatedHoleInput, type PCBPort, type PCBPortInput, type PCBPortNotMatchedError, type PCBSMTPad, type PCBSMTPadInput, type PCBSilkscreenLine, type PCBSilkscreenText, type PCBSolderPasteInput, type PCBText, type PCBTrace, type PCBTraceError, type PCBTraceHint, type PCBTraceInput, type PCBVia, type PcbBoard, type PcbBoardInput, type PcbCircuitElement, type PcbComponent, type PcbComponentInput, type PcbFabricationNotePath, type PcbFabricationNotePathInput, type PcbFabricationNoteText, type PcbFabricationNoteTextInput, type PcbHole, type PcbHoleCircleOrSquare, type PcbHoleCircleOrSquareInput, type PcbHoleOval, type PcbHoleOvalInput, type PcbPlacementError, type PcbPlacementErrorInput, type PcbPlatedHole, type PcbPlatedHoleCircle, type PcbPlatedHoleInput, type PcbPlatedHoleOval, type PcbPort, type PcbPortInput, type PcbPortNotMatchedError, type PcbPortNotMatchedErrorInput, type PcbRouteHint, type PcbRouteHintInput, type PcbRouteHints, type PcbRouteHintsInput, type PcbSilkscreenCircle, type PcbSilkscreenCircleInput, type PcbSilkscreenLine, type PcbSilkscreenLineInput, type PcbSilkscreenOval, type PcbSilkscreenOvalDeprecated, type PcbSilkscreenOvalInput, type PcbSilkscreenPath, type PcbSilkscreenPathDeprecated, type PcbSilkscreenPathInput, type PcbSilkscreenRect, type PcbSilkscreenRectInput, type PcbSilkscreenRectOld, type PcbSilkscreenText, type PcbSilkscreenTextInput, type PcbSmtPad, type PcbSmtPadCircle, type PcbSmtPadRect, type PcbSolderPaste, type PcbSolderPasteCircle, type PcbSolderPasteRect, type PcbText, type PcbTextInput, type PcbTrace, type PcbTraceError, type PcbTraceErrorInput, type PcbTraceHint, type PcbTraceHintInput, type PcbTraceInput, type PcbTraceRoutePoint, type PcbTraceRoutePointVia, type PcbTraceRoutePointWire, type PcbVia, type PcbViaInput, type Point, type Point3, type Position, type Rotation, type RouteHintPoint, type RouteHintPointInput, type SchematicBox, type SchematicBoxInput, type SchematicComponent, type SchematicComponentInput, type SchematicDebugLine, type SchematicDebugObject, type SchematicDebugObjectInput, type SchematicDebugRect, type SchematicError, type SchematicErrorInput, type SchematicLine, type SchematicLineInput, type SchematicNetLabel, type SchematicNetLabelInput, type SchematicPath, type SchematicPathInput, type SchematicPort, type SchematicPortInput, type SchematicText, type SchematicTextInput, type SchematicTrace, type SchematicTraceInput, type Size, type SourceComponentBase, type SourceGroup, type SourceGroupInput, type SourceLed, type SourceLedInput, type SourceNet, type SourceNetInput, type SourcePort, type SourceSimpleBattery, type SourceSimpleBatteryInput, type SourceSimpleBugInput, type SourceSimpleCapacitor, type SourceSimpleCapacitorInput, type SourceSimpleChip, type SourceSimpleChipInput, type SourceSimpleDiode, type SourceSimpleDiodeInput, type SourceSimpleGround, type SourceSimpleGroundInput, type SourceSimpleInductor, type SourceSimpleInductorInput, type SourceSimplePowerSource, type SourceSimplePowerSourceInput, type SourceSimpleResistor, type SourceSimpleResistorInput, type SourceTrace, type SupplierName, type VisibleLayer, type VisibleLayerRef, all_layers, any_circuit_element, any_soup_element, any_source_component, battery_capacity, cad_component, capacitance, current, distance, getZodPrefixedIdWithDefault, inductance, layer_ref, layer_string, length, pcb_board, pcb_component, pcb_fabrication_note_path, pcb_fabrication_note_text, pcb_hole, pcb_hole_circle_or_square_shape, pcb_hole_oval_shape, pcb_keepout, pcb_placement_error, pcb_plated_hole, pcb_port, pcb_port_not_matched_error, pcb_route_hint, pcb_route_hints, pcb_silkscreen_circle, pcb_silkscreen_line, pcb_silkscreen_oval, pcb_silkscreen_path, pcb_silkscreen_rect, pcb_silkscreen_text, pcb_smtpad, pcb_solder_paste, pcb_text, pcb_trace, pcb_trace_error, pcb_trace_hint, pcb_trace_route_point, pcb_trace_route_point_via, pcb_trace_route_point_wire, pcb_via, point, point3, position, position3, resistance, rotation, route_hint_point, schematic_box, schematic_component, schematic_debug_line, schematic_debug_object, schematic_debug_object_base, schematic_debug_point, schematic_debug_rect, schematic_error, schematic_line, schematic_net_label, schematic_path, schematic_pin_styles, schematic_port, schematic_text, schematic_trace, size, source_component_base, source_group, source_led, source_net, source_port, source_simple_battery, source_simple_bug, source_simple_capacitor, source_simple_chip, source_simple_diode, source_simple_ground, source_simple_inductor, source_simple_power_source, source_simple_resistor, source_trace, supplier_name, time, visible_layer, voltage };
|
package/dist/index.mjs
CHANGED
|
@@ -478,7 +478,8 @@ var schematic_text = z28.object({
|
|
|
478
478
|
y: distance
|
|
479
479
|
}),
|
|
480
480
|
rotation: z28.number().default(0),
|
|
481
|
-
anchor: z28.enum(["center", "left", "right", "top", "bottom"]).default("center")
|
|
481
|
+
anchor: z28.enum(["center", "left", "right", "top", "bottom"]).default("center"),
|
|
482
|
+
color: z28.string().default("#000000")
|
|
482
483
|
});
|
|
483
484
|
|
|
484
485
|
// src/schematic/schematic_port.ts
|
|
@@ -489,7 +490,11 @@ var schematic_port = z29.object({
|
|
|
489
490
|
source_port_id: z29.string(),
|
|
490
491
|
schematic_component_id: z29.string().optional(),
|
|
491
492
|
center: point,
|
|
492
|
-
facing_direction: z29.enum(["up", "down", "left", "right"]).optional()
|
|
493
|
+
facing_direction: z29.enum(["up", "down", "left", "right"]).optional(),
|
|
494
|
+
distance_from_component_edge: z29.number().optional(),
|
|
495
|
+
side_of_component: z29.enum(["top", "bottom", "left", "right"]).optional(),
|
|
496
|
+
true_ccw_index: z29.number().optional(),
|
|
497
|
+
pin_number: z29.number().optional()
|
|
493
498
|
}).describe("Defines a port on a schematic component");
|
|
494
499
|
|
|
495
500
|
// src/schematic/schematic_net_label.ts
|
|
@@ -528,9 +533,14 @@ var schematic_debug_line = schematic_debug_object_base.extend({
|
|
|
528
533
|
start: point,
|
|
529
534
|
end: point
|
|
530
535
|
});
|
|
536
|
+
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
537
|
+
shape: z32.literal("point"),
|
|
538
|
+
center: point
|
|
539
|
+
});
|
|
531
540
|
var schematic_debug_object = z32.discriminatedUnion("shape", [
|
|
532
541
|
schematic_debug_rect,
|
|
533
|
-
schematic_debug_line
|
|
542
|
+
schematic_debug_line,
|
|
543
|
+
schematic_debug_point
|
|
534
544
|
]);
|
|
535
545
|
|
|
536
546
|
// src/pcb/properties/layer_ref.ts
|
|
@@ -1160,6 +1170,7 @@ export {
|
|
|
1160
1170
|
schematic_debug_line,
|
|
1161
1171
|
schematic_debug_object,
|
|
1162
1172
|
schematic_debug_object_base,
|
|
1173
|
+
schematic_debug_point,
|
|
1163
1174
|
schematic_debug_rect,
|
|
1164
1175
|
schematic_error,
|
|
1165
1176
|
schematic_line,
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/convert-si-unit-to-number.ts","../src/units/index.ts","../src/common/point.ts","../src/common/point3.ts","../src/common/size.ts","../src/common/getZodPrefixedIdWithDefault.ts","../src/source/source_simple_capacitor.ts","../src/pcb/properties/supplier_name.ts","../src/source/base/source_component_base.ts","../src/source/source_simple_resistor.ts","../src/source/source_simple_diode.ts","../src/source/source_simple_ground.ts","../src/source/source_simple_bug.ts","../src/source/source_simple_chip.ts","../src/source/source_simple_inductor.ts","../src/source/source_led.ts","../src/source/source_simple_power_source.ts","../src/source/any_source_component.ts","../src/source/source_simple_battery.ts","../src/source/source_port.ts","../src/source/source_trace.ts","../src/source/source_group.ts","../src/source/source_net.ts","../src/schematic/schematic_box.ts","../src/schematic/schematic_path.ts","../src/schematic/schematic_component.ts","../src/schematic/schematic_line.ts","../src/schematic/schematic_trace.ts","../src/schematic/schematic_text.ts","../src/schematic/schematic_port.ts","../src/schematic/schematic_net_label.ts","../src/schematic/schematic_error.ts","../src/schematic/schematic_debug_object.ts","../src/pcb/properties/layer_ref.ts","../src/pcb/properties/pcb_route_hints.ts","../src/pcb/properties/route_hint_point.ts","../src/pcb/pcb_component.ts","../src/utils/expect-types-match.ts","../src/pcb/pcb_hole.ts","../src/pcb/pcb_plated_hole.ts","../src/pcb/pcb_port.ts","../src/pcb/pcb_smtpad.ts","../src/pcb/pcb_solder_paste.ts","../src/pcb/pcb_text.ts","../src/pcb/pcb_trace.ts","../src/pcb/pcb_trace_error.ts","../src/pcb/pcb_port_not_matched_error.ts","../src/pcb/pcb_via.ts","../src/pcb/pcb_board.ts","../src/pcb/pcb_placement_error.ts","../src/pcb/pcb_trace_hint.ts","../src/pcb/pcb_silkscreen_line.ts","../src/pcb/pcb_silkscreen_path.ts","../src/pcb/pcb_silkscreen_text.ts","../src/pcb/pcb_silkscreen_rect.ts","../src/pcb/pcb_silkscreen_circle.ts","../src/pcb/pcb_silkscreen_oval.ts","../src/pcb/pcb_fabrication_note_text.ts","../src/pcb/pcb_fabrication_note_path.ts","../src/pcb/pcb_keepout.ts","../src/cad/cad_component.ts","../src/any_circuit_element.ts"],"sourcesContent":["type UnitInfo = {\n baseUnit: BaseTscircuitUnit\n conversionFactor: number\n}\n\nconst unitMappings: Record<\n string,\n { baseUnit: BaseTscircuitUnit; variants: Record<string, number> }\n> = {\n Hz: {\n baseUnit: \"Hz\",\n variants: {\n MHz: 1e6,\n kHz: 1e3,\n Hz: 1,\n },\n },\n g: {\n baseUnit: \"g\",\n variants: {\n kg: 1e3,\n g: 1,\n },\n },\n Ω: {\n baseUnit: \"Ω\",\n variants: {\n mΩ: 1e-3,\n Ω: 1,\n kΩ: 1e3,\n MΩ: 1e6,\n GΩ: 1e9,\n TΩ: 1e12,\n },\n },\n V: {\n baseUnit: \"V\",\n variants: {\n mV: 1e-3,\n V: 1,\n kV: 1e3,\n MV: 1e6,\n GV: 1e9,\n TV: 1e12,\n },\n },\n A: {\n baseUnit: \"A\",\n variants: {\n µA: 1e-6,\n mA: 1e-3,\n ma: 1e-3,\n A: 1,\n kA: 1e3,\n MA: 1e6,\n },\n },\n F: {\n baseUnit: \"F\",\n variants: {\n pF: 1e-12,\n nF: 1e-9,\n µF: 1e-6,\n mF: 1e-3,\n F: 1,\n },\n },\n ml: {\n baseUnit: \"ml\",\n variants: {\n ml: 1,\n mL: 1,\n l: 1e3,\n L: 1e3,\n },\n },\n deg: {\n baseUnit: \"deg\",\n variants: {\n rad: 180 / Math.PI,\n },\n },\n ms: {\n baseUnit: \"ms\",\n variants: {\n s: 1000,\n },\n },\n mm: {\n baseUnit: \"mm\",\n variants: {\n nm: 1e-6,\n µm: 1e-3,\n um: 1e-3,\n mm: 1,\n cm: 10,\n dm: 100,\n m: 1000,\n km: 1e6,\n in: 25.4,\n ft: 304.8,\n IN: 25.4,\n FT: 304.8,\n yd: 914.4,\n mi: 1.609344e6,\n mil: 0.0254,\n },\n },\n}\n\nfunction getBaseTscircuitUnit(unit: string): UnitInfo {\n for (const [baseUnit, info] of Object.entries(unitMappings)) {\n if (unit in info.variants) {\n return {\n baseUnit: info.baseUnit,\n conversionFactor: info.variants[unit]!,\n }\n }\n }\n return {\n baseUnit: unit as BaseTscircuitUnit,\n conversionFactor: 1,\n }\n}\n\nconst si_prefix_multiplier = {\n tera: 1e12,\n T: 1e12,\n giga: 1e9,\n G: 1e9,\n mega: 1e6,\n M: 1e6,\n kilo: 1e3,\n k: 1e3,\n deci: 1e-1,\n d: 1e-1,\n centi: 1e-2,\n c: 1e-2,\n milli: 1e-3,\n m: 1e-3,\n micro: 1e-6,\n u: 1e-6,\n µ: 1e-6,\n nano: 1e-9,\n n: 1e-9,\n pico: 1e-12,\n p: 1e-12,\n}\ntype BaseTscircuitUnit =\n | \"ms\"\n | \"mm\"\n | \"g\"\n | \"deg\"\n | \"Hz\"\n | \"ml\"\n | \"V\"\n | \"A\"\n | \"Ω\"\n | \"F\"\n | \"H\"\n\nexport const parseAndConvertSiUnit = <\n T extends\n | string\n | number\n | undefined\n | { x: string | number; y: string | number },\n>(\n v: T,\n): {\n parsedUnit: string | null\n unitOfValue: BaseTscircuitUnit | null\n value: T extends { x: string | number; y: string | number }\n ? null | { x: number; y: number }\n : null | number\n} => {\n if (typeof v === \"undefined\")\n return { parsedUnit: null, unitOfValue: null, value: null }\n if (typeof v === \"string\" && v.match(/^[\\d\\.]+$/))\n return {\n value: Number.parseFloat(v) as any,\n parsedUnit: null,\n unitOfValue: null,\n }\n if (typeof v === \"number\")\n return { value: v as any, parsedUnit: null, unitOfValue: null }\n if (typeof v === \"object\" && \"x\" in v && \"y\" in v) {\n const { parsedUnit, unitOfValue } = parseAndConvertSiUnit(v.x)\n return {\n parsedUnit: parsedUnit,\n unitOfValue: unitOfValue,\n value: {\n x: parseAndConvertSiUnit(v.x as any).value as number,\n y: parseAndConvertSiUnit(v.y as any).value as number,\n } as any,\n }\n }\n const unit_reversed = v\n .split(\"\")\n .reverse()\n .join(\"\")\n .match(/[a-zA-Z]+/)?.[0]\n if (!unit_reversed) {\n throw new Error(`Could not determine unit: \"${v}\"`)\n }\n const unit = unit_reversed.split(\"\").reverse().join(\"\")\n const value = v.slice(0, -unit.length)\n\n const { baseUnit, conversionFactor } = getBaseTscircuitUnit(unit)\n\n return {\n parsedUnit: unit,\n unitOfValue: baseUnit,\n value: (conversionFactor * Number.parseFloat(value)) as any,\n }\n}\n","import { parseAndConvertSiUnit } from \"src/utils/convert-si-unit-to-number\"\nimport { z } from \"zod\"\n\n// // Currently, removing uncommon SI Prefixes for type simplicity.\n// export type SIPrefix =\n// // | \"y\"\n// // | \"yocto\"\n// // | \"z\"\n// // | \"zepto\"\n// // | \"atto\"\n// // | \"a\"\n// | \"femto\"\n// | \"f\"\n// | \"u\"\n// | \"micro\"\n// // | \"d\"\n// // | \"deci\"\n// | \"c\"\n// | \"centi\"\n// | \"m\"\n// | \"milli\"\n// | \"k\"\n// | \"kilo\"\n// | \"M\"\n// | \"mega\"\n// // | \"G\"\n// // | \"T\"\n// // | \"P\"\n// // | \"E\"\n// // | \"Z\"\n// // | \"Y\"\n\n// export type UnitAbbreviations = {\n// farad: \"F\"\n// ohm: \"Ω\"\n// henry: \"H\"\n// meter: \"m\"\n// volt: \"V\"\n// inch: \"in\"\n// foot: \"ft\"\n// }\n\n// export type Unit = keyof UnitAbbreviations\n// export type NumberWithUnit<T extends Unit> =\n// | `${number}${T | UnitAbbreviations[T]}`\n// | `${number} ${T | UnitAbbreviations[T]}`\n// | `${number}${SIPrefix}${T | UnitAbbreviations[T]}`\n// | `${number} ${SIPrefix}${T | UnitAbbreviations[T]}`\n// export type NumberWithAnyUnit =\n// | `${number}${UnitOrAbbreviation}`\n// | `${number} ${UnitOrAbbreviation}`\n// | `${number}${SIPrefix}${UnitOrAbbreviation}`\n// | `${number} ${SIPrefix}${UnitOrAbbreviation}`\n\n// TODO lots of validation to make sure the unit is valid etc.\nexport const resistance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const capacitance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const inductance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const voltage = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const length = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n/**\n * Length in meters\n */\nexport type Length = number\nexport type Distance = number\n\nexport const distance = length\n\nexport const current = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const time = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\n/**\n * Rotation is always converted to degrees\n */\nexport const rotation = z\n .string()\n .or(z.number())\n .transform((arg): number => {\n if (typeof arg === \"number\") return arg\n if (arg.endsWith(\"deg\")) {\n return Number.parseFloat(arg.split(\"deg\")[0]!)\n }\n if (arg.endsWith(\"rad\")) {\n return (Number.parseFloat(arg.split(\"rad\")[0]!) * 180) / Math.PI\n }\n return Number.parseFloat(arg)\n })\n\nexport const battery_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 type InputRotation = number | string\nexport type Rotation = number\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const point = z.object({\n x: distance,\n y: distance,\n})\n\nexport const position = point\n\nexport type Point = z.infer<typeof point>\nexport type InputPoint = z.input<typeof point>\nexport type InputPosition = z.input<typeof position>\nexport type Position = z.infer<typeof position>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n\nexport const position3 = point3\n\nexport type Point3 = z.infer<typeof point3>\n","import { z } from \"zod\"\n\nexport const size = z.object({\n width: z.number(),\n height: z.number(),\n})\n\nexport type Size = z.infer<typeof size>\n","import { z } from \"zod\"\nimport { nanoid } from \"nanoid\"\n\n/**\n * Use this for primary keys for any circuit element\n */\nexport const getZodPrefixedIdWithDefault = (prefix: string) => {\n return z\n .string()\n .optional()\n .default(() => `${prefix}_${nanoid(10)}`)\n}\n","import { z } from \"zod\"\nimport { source_component_base } from \"src/source/base/source_component_base\"\nimport { capacitance } from \"src/units\"\n\nexport const source_simple_capacitor = source_component_base.extend({\n ftype: z.literal(\"simple_capacitor\"),\n capacitance,\n})\n\nexport type SourceSimpleCapacitor = z.infer<typeof source_simple_capacitor>\nexport type SourceSimpleCapacitorInput = z.input<typeof source_simple_capacitor>\n","import { z } from \"zod\"\n\nexport const supplier_name = z.enum([\n \"jlcpcb\",\n \"macrofab\",\n \"pcbway\",\n \"digikey\",\n \"mouser\",\n \"lcsc\",\n])\n\nexport type SupplierName = z.infer<typeof supplier_name>\n","import { supplier_name } from \"src/pcb/properties/supplier_name\"\nimport { z } from \"zod\"\n\nexport const source_component_base = z.object({\n type: z.literal(\"source_component\"),\n ftype: z.string().optional(),\n source_component_id: z.string(),\n name: z.string(),\n manufacturer_part_number: z.string().optional(),\n supplier_part_numbers: z\n .record(supplier_name, z.array(z.string()))\n .optional(),\n display_value: z.string().optional(),\n})\n\nexport type SourceComponentBase = z.infer<typeof source_component_base>\n","import { z } from \"zod\"\nimport { source_component_base } from \"src/source/base/source_component_base\"\nimport { resistance } from \"src/units\"\n\nexport const source_simple_resistor = source_component_base.extend({\n ftype: z.literal(\"simple_resistor\"),\n resistance,\n})\n\nexport type SourceSimpleResistor = z.infer<typeof source_simple_resistor>\nexport type SourceSimpleResistorInput = z.input<typeof source_simple_resistor>\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\n\nexport const source_simple_diode = source_component_base.extend({\n ftype: z.literal(\"simple_diode\"),\n})\n\nexport type SourceSimpleDiode = z.infer<typeof source_simple_diode>\nexport type SourceSimpleDiodeInput = z.input<typeof source_simple_diode>\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\n\nexport const source_simple_ground = source_component_base.extend({\n ftype: z.literal(\"simple_ground\"),\n})\n\nexport type SourceSimpleGround = z.infer<typeof source_simple_ground>\nexport type SourceSimpleGroundInput = z.input<typeof source_simple_ground>\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\n\n/**\n * @deprecated Use source_simple_chip instead. This will be removed in a future version.\n */\nexport const source_simple_bug = source_component_base\n .extend({\n ftype: z.literal(\"simple_bug\"),\n })\n .describe(\"@deprecated\")\n\nexport type source_simple_bug = z.infer<typeof source_simple_bug>\nexport type SourceSimpleBugInput = z.input<typeof source_simple_bug>\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\n\nexport const source_simple_chip = source_component_base.extend({\n ftype: z.literal(\"simple_chip\"),\n})\n\nexport type SourceSimpleChip = z.infer<typeof source_simple_chip>\nexport type SourceSimpleChipInput = z.input<typeof source_simple_chip>\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\nimport { inductance } from \"../units\"\n\nexport const source_simple_inductor = source_component_base.extend({\n ftype: z.literal(\"simple_inductor\"),\n inductance,\n})\n\nexport type SourceSimpleInductor = z.infer<typeof source_simple_inductor>\nexport type SourceSimpleInductorInput = z.input<typeof source_simple_inductor>\n","import { z } from \"zod\"\nimport { source_simple_diode } from \"./source_simple_diode\"\n\nexport const source_led = source_simple_diode.extend({\n ftype: z.literal(\"led\"),\n})\n\nexport type SourceLed = z.infer<typeof source_led>\nexport type SourceLedInput = z.input<typeof source_led>\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\nimport { voltage } from \"../units\"\n\nexport const source_simple_power_source = source_component_base.extend({\n ftype: z.literal(\"simple_power_source\"),\n voltage,\n})\n\nexport type SourceSimplePowerSource = z.infer<typeof source_simple_power_source>\nexport type SourceSimplePowerSourceInput = z.input<\n typeof source_simple_power_source\n>\n","import { z } from \"zod\"\nimport { source_simple_resistor } from \"./source_simple_resistor\"\nimport { source_simple_capacitor } from \"./source_simple_capacitor\"\nimport { source_simple_diode } from \"./source_simple_diode\"\nimport { source_simple_ground } from \"./source_simple_ground\"\nimport { source_simple_bug } from \"./source_simple_bug\"\nimport { source_simple_chip } from \"./source_simple_chip\"\nimport { source_led } from \"./source_led\"\nimport { source_simple_power_source } from \"./source_simple_power_source\"\nimport { source_simple_battery } from \"./source_simple_battery\"\nimport { source_simple_inductor } from \"./source_simple_inductor\"\n\nexport const any_source_component = z.union([\n source_simple_resistor,\n source_simple_capacitor,\n source_simple_diode,\n source_simple_ground,\n source_simple_chip,\n source_simple_bug,\n source_led,\n source_simple_power_source,\n source_simple_battery,\n source_simple_inductor,\n])\n\nexport type AnySourceComponent = z.infer<typeof any_source_component>\n","import { z } from \"zod\"\nimport { source_component_base } from \"src/source/base/source_component_base\"\nimport { battery_capacity } from \"src/units\"\n\nexport const source_simple_battery = source_component_base.extend({\n ftype: z.literal(\"simple_battery\"),\n capacity: battery_capacity,\n})\n\nexport type SourceSimpleBattery = z.infer<typeof source_simple_battery>\nexport type SourceSimpleBatteryInput = z.input<typeof source_simple_battery>\n","import { z } from \"zod\"\n\nexport const source_port = z.object({\n type: z.literal(\"source_port\"),\n pin_number: z.number().optional(),\n port_hints: z.array(z.string()).optional(),\n name: z.string(),\n source_port_id: z.string(),\n source_component_id: z.string(),\n})\n\nexport type SourcePort = z.infer<typeof source_port>\n","import { z } from \"zod\"\n\nexport const source_trace = z.object({\n type: z.literal(\"source_trace\"),\n source_trace_id: z.string(),\n connected_source_port_ids: z.array(z.string()),\n connected_source_net_ids: z.array(z.string()),\n})\n\nexport type SourceTrace = z.infer<typeof source_trace>\n","import { z } from \"zod\"\n\nexport const source_group = z.object({\n type: z.literal(\"source_group\"),\n source_group_id: z.string(),\n name: z.string().optional(),\n})\n\nexport type SourceGroup = z.infer<typeof source_group>\nexport type SourceGroupInput = z.input<typeof source_group>\n","import { z } from \"zod\"\n\nexport const source_net = z.object({\n type: z.literal(\"source_net\"),\n source_net_id: z.string(),\n name: z.string(),\n member_source_group_ids: z.array(z.string()),\n is_power: z.boolean().optional(),\n is_ground: z.boolean().optional(),\n is_digital_signal: z.boolean().optional(),\n is_analog_signal: z.boolean().optional(),\n trace_width: z.number().optional(),\n})\n\nexport type SourceNet = z.infer<typeof source_net>\nexport type SourceNetInput = z.input<typeof source_net>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const schematic_box = z\n .object({\n type: z.literal(\"schematic_box\"),\n schematic_component_id: z.string(),\n width: distance,\n height: distance,\n x: distance,\n y: distance,\n })\n .describe(\"Draws a box on the schematic\")\n\nexport type SchematicBoxInput = z.input<typeof schematic_box>\nexport type SchematicBox = z.infer<typeof schematic_box>\n","import { z } from \"zod\"\nimport { point } from \"../common/point\"\n\nexport const schematic_path = z.object({\n type: z.literal(\"schematic_path\"),\n schematic_component_id: z.string(),\n fill_color: z.enum([\"red\", \"blue\"]).optional(),\n is_filled: z.boolean().optional(),\n points: z.array(point),\n})\n\nexport type SchematicPathInput = z.input<typeof schematic_path>\nexport type SchematicPath = z.infer<typeof schematic_path>\n","import { z } from \"zod\"\nimport { point } from \"../common/point\"\nimport { size } from \"../common/size\"\nimport { length, rotation } from \"../units\"\n\nexport const schematic_pin_styles = z.record(\n z.object({\n left_margin: length.optional(),\n right_margin: length.optional(),\n top_margin: length.optional(),\n bottom_margin: length.optional(),\n }),\n)\n\nexport const schematic_component = z.object({\n type: z.literal(\"schematic_component\"),\n rotation: rotation.default(0),\n size,\n center: point,\n source_component_id: z.string(),\n schematic_component_id: z.string(),\n pin_spacing: length.optional(),\n pin_styles: schematic_pin_styles.optional(),\n box_width: length.optional(),\n symbol_name: z.string().optional(),\n port_arrangement: z\n .union([\n z.object({\n left_size: z.number(),\n right_size: z.number(),\n top_size: z.number().optional(),\n bottom_size: z.number().optional(),\n }),\n z.object({\n left_side: z\n .object({\n pins: z.array(z.number()),\n direction: z.enum([\"top-to-bottom\", \"bottom-to-top\"]).optional(),\n })\n .optional(),\n right_side: z\n .object({\n pins: z.array(z.number()),\n direction: z.enum([\"top-to-bottom\", \"bottom-to-top\"]).optional(),\n })\n .optional(),\n top_side: z\n .object({\n pins: z.array(z.number()),\n direction: z.enum([\"left-to-right\", \"right-to-left\"]).optional(),\n })\n .optional(),\n bottom_side: z\n .object({\n pins: z.array(z.number()),\n direction: z.enum([\"left-to-right\", \"right-to-left\"]).optional(),\n })\n .optional(),\n }),\n ])\n .optional(),\n port_labels: z.record(z.string()).optional(),\n})\n\nexport type SchematicComponentInput = z.input<typeof schematic_component>\nexport type SchematicComponent = z.infer<typeof schematic_component>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const schematic_line = z.object({\n type: z.literal(\"schematic_line\"),\n schematic_component_id: z.string(),\n x1: distance,\n x2: distance,\n y1: distance,\n y2: distance,\n})\n\nexport type SchematicLineInput = z.input<typeof schematic_line>\nexport type SchematicLine = z.infer<typeof schematic_line>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const schematic_trace = z.object({\n type: z.literal(\"schematic_trace\"),\n schematic_trace_id: z.string(),\n source_trace_id: z.string(),\n edges: z.array(\n z.object({\n from: z.object({\n x: z.number(),\n y: z.number(),\n }),\n to: z.object({\n x: z.number(),\n y: z.number(),\n }),\n from_schematic_port_id: z.string().optional(),\n to_schematic_port_id: z.string().optional(),\n }),\n ),\n})\n\nexport type SchematicTraceInput = z.input<typeof schematic_trace>\nexport type SchematicTrace = z.infer<typeof schematic_trace>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const schematic_text = z.object({\n type: z.literal(\"schematic_text\"),\n schematic_component_id: z.string(),\n schematic_text_id: z.string(),\n text: z.string(),\n position: z.object({\n x: distance,\n y: distance,\n }),\n rotation: z.number().default(0),\n anchor: z\n .enum([\"center\", \"left\", \"right\", \"top\", \"bottom\"])\n .default(\"center\"),\n})\n\nexport type SchematicTextInput = z.input<typeof schematic_text>\nexport type SchematicText = z.infer<typeof schematic_text>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { point } from \"../common\"\n\nexport const schematic_port = z\n .object({\n type: z.literal(\"schematic_port\"),\n schematic_port_id: z.string(),\n source_port_id: z.string(),\n schematic_component_id: z.string().optional(),\n center: point,\n facing_direction: z.enum([\"up\", \"down\", \"left\", \"right\"]).optional(),\n })\n .describe(\"Defines a port on a schematic component\")\n\nexport type SchematicPortInput = z.input<typeof schematic_port>\nexport type SchematicPort = z.infer<typeof schematic_port>\n","import { z } from \"zod\"\nimport { point } from \"../common/point\"\n\nexport const schematic_net_label = z.object({\n type: z.literal(\"schematic_net_label\"),\n source_net_id: z.string(),\n center: point,\n anchor_side: z.enum([\"top\", \"bottom\", \"left\", \"right\"]),\n text: z.string(),\n})\n\nexport type SchematicNetLabelInput = z.input<typeof schematic_net_label>\nexport type SchematicNetLabel = z.infer<typeof schematic_net_label>\n","import { z } from \"zod\"\n\nexport const schematic_error = z\n .object({\n schematic_error_id: z.string(),\n type: z.literal(\"schematic_error\"),\n // eventually each error type should be broken out into a dir of files\n error_type: z.literal(\"schematic_port_not_found\"),\n message: z.string(),\n })\n .describe(\"Defines a schematic error on the schematic\")\n\nexport type SchematicErrorInput = z.input<typeof schematic_error>\nexport type SchematicError = z.infer<typeof schematic_error>\n","import { z } from \"zod\"\nimport { point } from \"../common/point\"\nimport { size } from \"../common/size\"\n\nexport const schematic_debug_object_base = z.object({\n type: z.literal(\"schematic_debug_object\"),\n label: z.string().optional(),\n})\n\nexport const schematic_debug_rect = schematic_debug_object_base.extend({\n shape: z.literal(\"rect\"),\n center: point,\n size: size,\n})\n\nexport const schematic_debug_line = schematic_debug_object_base.extend({\n shape: z.literal(\"line\"),\n start: point,\n end: point,\n})\n\nexport const schematic_debug_object = z.discriminatedUnion(\"shape\", [\n schematic_debug_rect,\n schematic_debug_line,\n])\n\nexport type SchematicDebugObject = z.infer<typeof schematic_debug_object>\nexport type SchematicDebugRect = z.infer<typeof schematic_debug_rect>\nexport type SchematicDebugLine = z.infer<typeof schematic_debug_line>\nexport type SchematicDebugObjectInput = z.input<typeof schematic_debug_object>\n","import { z } from \"zod\"\n\nexport const all_layers = [\n \"top\",\n \"bottom\",\n \"inner1\",\n \"inner2\",\n \"inner3\",\n \"inner4\",\n \"inner5\",\n \"inner6\",\n] as const\n\nexport const layer_string = z.enum(all_layers)\n\nexport const layer_ref = layer_string\n .or(\n z.object({\n name: layer_string,\n }),\n )\n .transform((layer) => {\n if (typeof layer === \"string\") {\n return layer\n }\n return layer.name\n })\n\nexport type LayerRefInput = z.input<typeof layer_ref>\nexport type LayerRef = z.output<typeof layer_ref>\n\nexport const visible_layer = z.enum([\"top\", \"bottom\"])\nexport type VisibleLayerRef = z.infer<typeof visible_layer>\nexport type VisibleLayer = z.infer<typeof visible_layer>\n","import { z } from \"zod\"\nimport { distance } from \"src/units\"\nimport { layer_ref } from \"./layer_ref\"\n\n// x: string | number\n// y: string | number\n// via?: boolean\n// via_to_layer?: string\nexport const pcb_route_hint = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n via_to_layer: layer_ref.optional(),\n})\nexport const pcb_route_hints = z.array(pcb_route_hint)\n\nexport type PcbRouteHintInput = z.input<typeof pcb_route_hint>\nexport type PcbRouteHintsInput = z.input<typeof pcb_route_hints>\nexport type PcbRouteHint = z.output<typeof pcb_route_hint>\nexport type PcbRouteHints = z.output<typeof pcb_route_hints>\n","import { z } from \"zod\"\nimport { distance } from \"../../units\"\nimport { layer_ref } from \"./layer_ref\"\n\nexport const route_hint_point = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n to_layer: layer_ref.optional(),\n trace_width: distance.optional(),\n})\n\nexport type RouteHintPoint = z.infer<typeof route_hint_point>\nexport type RouteHintPointInput = z.input<typeof route_hint_point>\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { rotation, length, type Rotation, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_component = z\n .object({\n type: z.literal(\"pcb_component\"),\n pcb_component_id: getZodPrefixedIdWithDefault(\"pcb_component\"),\n source_component_id: z.string(),\n center: point,\n layer: layer_ref,\n rotation: rotation,\n width: length,\n height: length,\n })\n .describe(\"Defines a component on the PCB\")\n\nexport type PcbComponentInput = z.input<typeof pcb_component>\ntype InferredPcbComponent = z.infer<typeof pcb_component>\n\n/**\n * Defines a component on the PCB\n */\nexport interface PcbComponent {\n type: \"pcb_component\"\n pcb_component_id: string\n source_component_id: string\n center: Point\n layer: LayerRef\n rotation: Rotation\n width: Length\n height: Length\n}\n\n/**\n * @deprecated use PcbComponent\n */\nexport type PCBComponent = PcbComponent\n\nexpectTypesMatch<PcbComponent, InferredPcbComponent>(true)\n","import type { TypeEqual } from \"ts-expect\"\n\nexport const expectTypesMatch = <const T1, const T2>(\n shouldBe: TypeEqual<T1, T2>,\n): void => {}\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_hole_circle_or_square = z.object({\n type: z.literal(\"pcb_hole\"),\n pcb_hole_id: getZodPrefixedIdWithDefault(\"pcb_hole\"),\n hole_shape: z.enum([\"circle\", \"square\"]),\n hole_diameter: z.number(),\n x: distance,\n y: distance,\n})\n\nexport const pcb_hole_circle_or_square_shape =\n pcb_hole_circle_or_square.describe(\n \"Defines a circular or square hole on the PCB\",\n )\n\nexport type PcbHoleCircleOrSquareInput = z.input<\n typeof pcb_hole_circle_or_square\n>\ntype InferredPcbHoleCircleOrSquare = z.infer<typeof pcb_hole_circle_or_square>\n\n/**\n * Defines a circular or square hole on the PCB\n */\nexport interface PcbHoleCircleOrSquare {\n type: \"pcb_hole\"\n pcb_hole_id: string\n hole_shape: \"circle\" | \"square\"\n hole_diameter: number\n x: Distance\n y: Distance\n}\n\nexpectTypesMatch<PcbHoleCircleOrSquare, InferredPcbHoleCircleOrSquare>(true)\n\nconst pcb_hole_oval = z.object({\n type: z.literal(\"pcb_hole\"),\n pcb_hole_id: getZodPrefixedIdWithDefault(\"pcb_hole\"),\n hole_shape: z.literal(\"oval\"),\n hole_width: z.number(),\n hole_height: z.number(),\n x: distance,\n y: distance,\n})\n\nexport const pcb_hole_oval_shape = pcb_hole_oval.describe(\n \"Defines an oval hole on the PCB\",\n)\n\nexport type PcbHoleOvalInput = z.input<typeof pcb_hole_oval>\ntype InferredPcbHoleOval = z.infer<typeof pcb_hole_oval>\n\n/**\n * Defines an oval hole on the PCB\n */\nexport interface PcbHoleOval {\n type: \"pcb_hole\"\n pcb_hole_id: string\n hole_shape: \"oval\"\n hole_width: number\n hole_height: number\n x: Distance\n y: Distance\n}\n\nexpectTypesMatch<PcbHoleOval, InferredPcbHoleOval>(true)\n\nexport const pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval)\n\n/**\n * @deprecated Use PcbHoleCircleOrSquare or PcbHoleOval\n */\nexport type PCBHoleInput = z.input<typeof pcb_hole>\n/**\n * @deprecated Use PcbHoleCircleOrSquare or PcbHoleOval\n */\nexport type PCBHole = z.infer<typeof pcb_hole>\n\nexport type PcbHole = PcbHoleCircleOrSquare | PcbHoleOval\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_plated_hole_circle = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.literal(\"circle\"),\n outer_diameter: z.number(),\n hole_diameter: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\n\n/**\n * Defines a circular plated hole on the PCB\n */\nexport interface PcbPlatedHoleCircle {\n type: \"pcb_plated_hole\"\n shape: \"circle\"\n outer_diameter: number\n hole_diameter: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nconst pcb_plated_hole_oval = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.enum([\"oval\", \"pill\"]),\n outer_width: z.number(),\n outer_height: z.number(),\n hole_width: z.number(),\n hole_height: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\n\n/**\n * Defines an oval or pill-shaped plated hole on the PCB\n */\nexport interface PcbPlatedHoleOval {\n type: \"pcb_plated_hole\"\n shape: \"oval\" | \"pill\"\n outer_width: number\n outer_height: number\n hole_width: number\n hole_height: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nexport const pcb_plated_hole = z.union([\n pcb_plated_hole_circle,\n pcb_plated_hole_oval,\n])\nexport type PcbPlatedHole = PcbPlatedHoleCircle | PcbPlatedHoleOval\n\nexpectTypesMatch<PcbPlatedHoleCircle, z.infer<typeof pcb_plated_hole_circle>>(\n true,\n)\nexpectTypesMatch<PcbPlatedHoleOval, z.infer<typeof pcb_plated_hole_oval>>(true)\n\n/**\n * @deprecated use PcbPlatedHole\n */\nexport type PCBPlatedHole = PcbPlatedHole\n\n/**\n * @deprecated use PcbPlatedHoleInput\n */\nexport type PCBPlatedHoleInput = z.input<typeof pcb_plated_hole>\nexport type PcbPlatedHoleInput = z.input<typeof pcb_plated_hole>\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_port = z\n .object({\n type: z.literal(\"pcb_port\"),\n pcb_port_id: getZodPrefixedIdWithDefault(\"pcb_port\"),\n source_port_id: z.string(),\n pcb_component_id: z.string(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n })\n .describe(\"Defines a port on the PCB\")\n\nexport type PcbPortInput = z.input<typeof pcb_port>\ntype InferredPcbPort = z.infer<typeof pcb_port>\n\n/**\n * Defines a port on the PCB\n */\nexport interface PcbPort {\n type: \"pcb_port\"\n pcb_port_id: string\n source_port_id: string\n pcb_component_id: string\n x: Distance\n y: Distance\n layers: LayerRef[]\n}\n\n/**\n * @deprecated use PcbPort\n */\nexport type PCBPort = PcbPort\n\n/**\n * @deprecated use PcbPortInput\n */\nexport type PCBPortInput = PcbPortInput\n\nexpectTypesMatch<PcbPort, InferredPcbPort>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_smtpad_circle = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"circle\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n x: distance,\n y: distance,\n radius: z.number(),\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nconst pcb_smtpad_rect = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"rect\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nexport const pcb_smtpad = z\n .union([pcb_smtpad_circle, pcb_smtpad_rect])\n .describe(\"Defines an SMT pad on the PCB\")\n\nexport type PCBSMTPadInput = z.input<typeof pcb_smtpad>\ntype PCBSMTPadCircle = z.infer<typeof pcb_smtpad_circle>\ntype PCBSMTPadRect = z.infer<typeof pcb_smtpad_rect>\n\n/**\n * Defines an SMT pad on the PCB\n */\nexport interface PcbSmtPadCircle {\n type: \"pcb_smtpad\"\n shape: \"circle\"\n pcb_smtpad_id: string\n x: Distance\n y: Distance\n radius: number\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\n/**\n * Defines an SMT pad on the PCB\n */\nexport interface PcbSmtPadRect {\n type: \"pcb_smtpad\"\n shape: \"rect\"\n pcb_smtpad_id: string\n x: Distance\n y: Distance\n width: number\n height: number\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\nexport type PcbSmtPad = PcbSmtPadCircle | PcbSmtPadRect\n\n/**\n * @deprecated use PcbSmtPad\n */\nexport type PCBSMTPad = PcbSmtPad\n\nexpectTypesMatch<PcbSmtPadCircle, PCBSMTPadCircle>(true)\nexpectTypesMatch<PcbSmtPadRect, PCBSMTPadRect>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_solder_paste_circle = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"circle\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n x: distance,\n y: distance,\n radius: z.number(),\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\n\nconst pcb_solder_paste_rect = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"rect\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\n\nexport const pcb_solder_paste = z\n .union([pcb_solder_paste_circle, pcb_solder_paste_rect])\n .describe(\"Defines solderpaste on the PCB\")\n\nexport type PCBSolderPasteInput = z.input<typeof pcb_solder_paste>\ntype InferredPcbSolderPasteCircle = z.infer<typeof pcb_solder_paste_circle>\ntype InferredPcbSolderPasteRect = z.infer<typeof pcb_solder_paste_rect>\n\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPasteCircle {\n type: \"pcb_solder_paste\"\n shape: \"circle\"\n pcb_solder_paste_id: string\n x: Distance\n y: Distance\n radius: number\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPasteRect {\n type: \"pcb_solder_paste\"\n shape: \"rect\"\n pcb_solder_paste_id: string\n x: Distance\n y: Distance\n width: number\n height: number\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n\nexport type PcbSolderPaste = PcbSolderPasteCircle | PcbSolderPasteRect\n\nexpectTypesMatch<PcbSolderPasteCircle, InferredPcbSolderPasteCircle>(true)\nexpectTypesMatch<PcbSolderPasteRect, InferredPcbSolderPasteRect>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_text = z\n .object({\n type: z.literal(\"pcb_text\"),\n pcb_text_id: getZodPrefixedIdWithDefault(\"pcb_text\"),\n text: z.string(),\n center: point,\n layer: layer_ref,\n width: length,\n height: length,\n lines: z.number(),\n align: z.enum([\"bottom-left\"]),\n })\n .describe(\"Defines text on the PCB\")\n\nexport type PcbTextInput = z.input<typeof pcb_text>\ntype InferredPcbText = z.infer<typeof pcb_text>\n\n/**\n * Defines text on the PCB\n */\nexport interface PcbText {\n type: \"pcb_text\"\n pcb_text_id: string\n text: string\n center: Point\n layer: LayerRef\n width: Length\n height: Length\n lines: number\n align: \"bottom-left\"\n}\n\n/**\n * @deprecated use PcbText\n */\nexport type PCBText = PcbText\n\nexpectTypesMatch<PcbText, InferredPcbText>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_trace_route_point_wire = z.object({\n route_type: z.literal(\"wire\"),\n x: distance,\n y: distance,\n width: distance,\n start_pcb_port_id: z.string().optional(),\n end_pcb_port_id: z.string().optional(),\n layer: layer_ref,\n})\n\nexport const pcb_trace_route_point_via = z.object({\n route_type: z.literal(\"via\"),\n x: distance,\n y: distance,\n from_layer: z.string(),\n to_layer: z.string(),\n})\n\nexport const pcb_trace_route_point = z.union([\n pcb_trace_route_point_wire,\n pcb_trace_route_point_via,\n])\ntype InferredPcbTraceRoutePoint = z.infer<typeof pcb_trace_route_point>\n\nexport const pcb_trace = z\n .object({\n type: z.literal(\"pcb_trace\"),\n source_trace_id: z.string().optional(),\n pcb_component_id: z.string().optional(),\n pcb_trace_id: getZodPrefixedIdWithDefault(\"pcb_trace\"),\n route_thickness_mode: z\n .enum([\"constant\", \"interpolated\"])\n .default(\"constant\")\n .optional(),\n route_order_index: z.number().optional(),\n should_round_corners: z.boolean().optional(),\n route: z.array(\n z.union([\n z.object({\n route_type: z.literal(\"wire\"),\n x: distance,\n y: distance,\n width: distance,\n start_pcb_port_id: z.string().optional(),\n end_pcb_port_id: z.string().optional(),\n layer: layer_ref,\n }),\n z.object({\n route_type: z.literal(\"via\"),\n x: distance,\n y: distance,\n from_layer: z.string(),\n to_layer: z.string(),\n }),\n ]),\n ),\n })\n .describe(\"Defines a trace on the PCB\")\n\nexport type PcbTraceInput = z.input<typeof pcb_trace>\ntype InferredPcbTrace = z.infer<typeof pcb_trace>\n\nexport interface PcbTraceRoutePointWire {\n route_type: \"wire\"\n x: Distance\n y: Distance\n width: Distance\n start_pcb_port_id?: string\n end_pcb_port_id?: string\n layer: LayerRef\n}\n\nexport interface PcbTraceRoutePointVia {\n route_type: \"via\"\n x: Distance\n y: Distance\n from_layer: string\n to_layer: string\n}\n\nexport type PcbTraceRoutePoint = PcbTraceRoutePointWire | PcbTraceRoutePointVia\n\n/**\n * Defines a trace on the PCB\n */\nexport interface PcbTrace {\n type: \"pcb_trace\"\n source_trace_id?: string\n pcb_component_id?: string\n pcb_trace_id: string\n /**\n * The order that this trace was routed in. This can be used to debug the\n * autorouter and to understand the trace path better\n *\n * The route_order_index should be relative to a subcircuit\n */\n route_order_index?: number\n route_thickness_mode?: \"constant\" | \"interpolated\"\n should_round_corners?: boolean\n route: Array<PcbTraceRoutePoint>\n}\n\n/**\n * @deprecated use PcbTrace\n */\nexport type PCBTrace = PcbTrace\n\n/**\n * @deprecated use PcbTraceInput\n */\nexport type PCBTraceInput = PcbTraceInput\n\nexpectTypesMatch<PcbTraceRoutePoint, InferredPcbTraceRoutePoint>(true)\nexpectTypesMatch<PcbTrace, InferredPcbTrace>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_trace_error = z\n .object({\n type: z.literal(\"pcb_trace_error\"),\n pcb_trace_error_id: getZodPrefixedIdWithDefault(\"pcb_trace_error\"),\n error_type: z.literal(\"pcb_trace_error\"),\n message: z.string(),\n center: point.optional(),\n pcb_trace_id: z.string(),\n source_trace_id: z.string(),\n pcb_component_ids: z.array(z.string()),\n pcb_port_ids: z.array(z.string()),\n })\n .describe(\"Defines a trace error on the PCB\")\n\nexport type PcbTraceErrorInput = z.input<typeof pcb_trace_error>\ntype InferredPcbTraceError = z.infer<typeof pcb_trace_error>\n\n/**\n * Defines a trace error on the PCB\n */\nexport interface PcbTraceError {\n type: \"pcb_trace_error\"\n pcb_trace_error_id: string\n error_type: \"pcb_trace_error\"\n message: string\n center?: Point\n pcb_trace_id: string\n source_trace_id: string\n pcb_component_ids: string[]\n pcb_port_ids: string[]\n}\n\n/**\n * @deprecated use PcbTraceError\n */\nexport type PCBTraceError = PcbTraceError\n\nexpectTypesMatch<PcbTraceError, InferredPcbTraceError>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_port_not_matched_error = z\n .object({\n type: z.literal(\"pcb_port_not_matched_error\"),\n pcb_error_id: getZodPrefixedIdWithDefault(\"pcb_error\"),\n message: z.string(),\n pcb_component_ids: z.array(z.string()),\n })\n .describe(\"Defines a trace error on the PCB where a port is not matched\")\n\nexport type PcbPortNotMatchedErrorInput = z.input<\n typeof pcb_port_not_matched_error\n>\ntype InferredPcbPortNotMatchedError = z.infer<typeof pcb_port_not_matched_error>\n\n/**\n * Defines a trace error on the PCB where a port is not matched\n */\nexport interface PcbPortNotMatchedError {\n type: \"pcb_port_not_matched_error\"\n pcb_error_id: string\n message: string\n pcb_component_ids: string[]\n}\n\n/**\n * @deprecated use PcbPortNotMatchedError\n */\nexport type PCBPortNotMatchedError = PcbPortNotMatchedError\n\nexpectTypesMatch<PcbPortNotMatchedError, InferredPcbPortNotMatchedError>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_via = z\n .object({\n type: z.literal(\"pcb_via\"),\n pcb_via_id: getZodPrefixedIdWithDefault(\"pcb_via\"),\n x: distance,\n y: distance,\n outer_diameter: distance.default(\"0.6mm\"),\n hole_diameter: distance.default(\"0.25mm\"),\n /** @deprecated */\n from_layer: layer_ref.optional(),\n /** @deprecated */\n to_layer: layer_ref.optional(),\n layers: z.array(layer_ref),\n pcb_trace_id: z.string().optional(),\n })\n .describe(\"Defines a via on the PCB\")\n\nexport type PcbViaInput = z.input<typeof pcb_via>\ntype InferredPcbVia = z.infer<typeof pcb_via>\n\n/**\n * Defines a via on the PCB\n */\nexport interface PcbVia {\n type: \"pcb_via\"\n pcb_via_id: string\n x: Distance\n y: Distance\n outer_diameter: Distance\n hole_diameter: Distance\n /** @deprecated */\n from_layer?: LayerRef\n /** @deprecated */\n to_layer?: LayerRef\n layers: LayerRef[]\n pcb_trace_id?: string\n}\n\n/**\n * @deprecated use PcbVia\n */\nexport type PCBVia = PcbVia\n\nexpectTypesMatch<PcbVia, InferredPcbVia>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_board = z\n .object({\n type: z.literal(\"pcb_board\"),\n pcb_board_id: getZodPrefixedIdWithDefault(\"pcb_board\"),\n width: length,\n height: length,\n center: point,\n thickness: length.optional().default(1.4),\n num_layers: z.number().optional().default(4),\n outline: z.array(point).optional(),\n })\n .describe(\"Defines the board outline of the PCB\")\n\n/**\n * Defines the board outline of the PCB\n */\nexport interface PcbBoard {\n type: \"pcb_board\"\n pcb_board_id: string\n width: Length\n height: Length\n thickness: Length\n num_layers: number\n center: Point\n outline?: Point[]\n}\n\nexport type PcbBoardInput = z.input<typeof pcb_board>\ntype InferredPcbBoard = z.infer<typeof pcb_board>\n\n/**\n * @deprecated use PcbBoard\n */\nexport type PCBBoard = PcbBoard\n\nexpectTypesMatch<PcbBoard, InferredPcbBoard>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_placement_error = z\n .object({\n type: z.literal(\"pcb_placement_error\"),\n pcb_placement_error_id: getZodPrefixedIdWithDefault(\"pcb_placement_error\"),\n message: z.string(),\n })\n .describe(\"Defines a placement error on the PCB\")\n\nexport type PcbPlacementErrorInput = z.input<typeof pcb_placement_error>\ntype InferredPcbPlacementError = z.infer<typeof pcb_placement_error>\n\n/**\n * Defines a placement error on the PCB\n */\nexport interface PcbPlacementError {\n type: \"pcb_placement_error\"\n pcb_placement_error_id: string\n message: string\n}\n\n/**\n * @deprecated use PcbPlacementError\n */\nexport type PCBPlacementError = PcbPlacementError\n\nexpectTypesMatch<PcbPlacementError, InferredPcbPlacementError>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { route_hint_point, type RouteHintPoint } from \"src/pcb\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\n/**\n * A hint that can be used during generation of a PCB trace.\n */\nexport interface PcbTraceHint {\n type: \"pcb_trace_hint\"\n pcb_trace_hint_id: string\n pcb_port_id: string\n pcb_component_id: string\n route: RouteHintPoint[]\n}\n\nexport const pcb_trace_hint = z\n .object({\n type: z.literal(\"pcb_trace_hint\"),\n pcb_trace_hint_id: getZodPrefixedIdWithDefault(\"pcb_trace_hint\"),\n pcb_port_id: z.string(),\n pcb_component_id: z.string(),\n route: z.array(route_hint_point),\n })\n .describe(\"A hint that can be used during generation of a PCB trace\")\n\nexport type PcbTraceHintInput = z.input<typeof pcb_trace_hint>\ntype InferredPcbTraceHint = z.infer<typeof pcb_trace_hint>\n\n/**\n * @deprecated use PcbTraceHint\n */\nexport type PCBTraceHint = PcbTraceHint\n\nexpectTypesMatch<PcbTraceHint, InferredPcbTraceHint>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport {\n layer_ref,\n type LayerRef,\n type VisibleLayer,\n visible_layer,\n} from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_line = z\n .object({\n type: z.literal(\"pcb_silkscreen_line\"),\n pcb_silkscreen_line_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_line\"),\n pcb_component_id: z.string(),\n stroke_width: distance.default(\"0.1mm\"),\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n layer: visible_layer,\n })\n .describe(\"Defines a silkscreen line on the PCB\")\n\nexport type PcbSilkscreenLineInput = z.input<typeof pcb_silkscreen_line>\ntype InferredPcbSilkscreenLine = z.infer<typeof pcb_silkscreen_line>\n\n/**\n * Defines a silkscreen line on the PCB\n */\nexport interface PcbSilkscreenLine {\n type: \"pcb_silkscreen_line\"\n pcb_silkscreen_line_id: string\n pcb_component_id: string\n stroke_width: Distance\n x1: Distance\n y1: Distance\n x2: Distance\n y2: Distance\n layer: VisibleLayer\n}\n\n/**\n * @deprecated use PcbSilkscreenLine\n */\nexport type PCBSilkscreenLine = PcbSilkscreenLine\n\nexpectTypesMatch<PcbSilkscreenLine, InferredPcbSilkscreenLine>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n visible_layer,\n type VisibleLayerRef,\n} from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_path = z\n .object({\n type: z.literal(\"pcb_silkscreen_path\"),\n pcb_silkscreen_path_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_path\"),\n pcb_component_id: z.string(),\n layer: visible_layer,\n route: z.array(point),\n stroke_width: length,\n })\n .describe(\"Defines a silkscreen path on the PCB\")\n\nexport type PcbSilkscreenPathInput = z.input<typeof pcb_silkscreen_path>\ntype InferredPcbSilkscreenPath = z.infer<typeof pcb_silkscreen_path>\n\n/**\n * Defines a silkscreen path on the PCB\n */\nexport interface PcbSilkscreenPath {\n type: \"pcb_silkscreen_path\"\n pcb_silkscreen_path_id: string\n pcb_component_id: string\n layer: VisibleLayerRef\n route: Point[]\n stroke_width: Length\n}\n\n/**\n * @deprecated use PcbSilkscreenPath\n */\nexport type PcbSilkscreenPathDeprecated = PcbSilkscreenPath\n\nexpectTypesMatch<PcbSilkscreenPath, InferredPcbSilkscreenPath>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { distance, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_text = z\n .object({\n type: z.literal(\"pcb_silkscreen_text\"),\n pcb_silkscreen_text_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_text\"),\n font: z.literal(\"tscircuit2024\").default(\"tscircuit2024\"),\n font_size: distance.default(\"0.2mm\"),\n pcb_component_id: z.string(),\n text: z.string(),\n layer: layer_ref,\n is_mirrored: z.boolean().default(false).optional(),\n anchor_position: point.default({ x: 0, y: 0 }),\n anchor_alignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n })\n .describe(\"Defines silkscreen text on the PCB\")\n\nexport type PcbSilkscreenTextInput = z.input<typeof pcb_silkscreen_text>\ntype InferredPcbSilkscreenText = z.infer<typeof pcb_silkscreen_text>\n\n/**\n * Defines silkscreen text on the PCB\n */\nexport interface PcbSilkscreenText {\n type: \"pcb_silkscreen_text\"\n pcb_silkscreen_text_id: string\n font: \"tscircuit2024\"\n font_size: Length\n pcb_component_id: string\n text: string\n layer: LayerRef\n is_mirrored?: boolean\n anchor_position: Point\n anchor_alignment:\n | \"center\"\n | \"top_left\"\n | \"top_right\"\n | \"bottom_left\"\n | \"bottom_right\"\n}\n\n/**\n * @deprecated use PcbSilkscreenText\n */\nexport type PCBSilkscreenText = PcbSilkscreenText\n\nexpectTypesMatch<PcbSilkscreenText, InferredPcbSilkscreenText>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_rect = z\n .object({\n type: z.literal(\"pcb_silkscreen_rect\"),\n pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_rect\"),\n pcb_component_id: z.string(),\n center: point,\n width: length,\n height: length,\n layer: layer_ref,\n })\n .describe(\"Defines a silkscreen rect on the PCB\")\n\nexport type PcbSilkscreenRectInput = z.input<typeof pcb_silkscreen_rect>\ntype InferredPcbSilkscreenRect = z.infer<typeof pcb_silkscreen_rect>\n\n/**\n * Defines a silkscreen rect on the PCB\n */\nexport interface PcbSilkscreenRect {\n type: \"pcb_silkscreen_rect\"\n pcb_silkscreen_rect_id: string\n pcb_component_id: string\n center: Point\n width: Length\n height: Length\n layer: LayerRef\n}\n\n/**\n * @deprecated use PcbSilkscreenRect\n */\nexport type PcbSilkscreenRectOld = PcbSilkscreenRect\n\nexpectTypesMatch<PcbSilkscreenRect, InferredPcbSilkscreenRect>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n visible_layer,\n type LayerRef,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_circle = z\n .object({\n type: z.literal(\"pcb_silkscreen_circle\"),\n pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(\n \"pcb_silkscreen_circle\",\n ),\n pcb_component_id: z.string(),\n center: point,\n radius: length,\n layer: visible_layer,\n })\n .describe(\"Defines a silkscreen circle on the PCB\")\n\nexport type PcbSilkscreenCircleInput = z.input<typeof pcb_silkscreen_circle>\ntype InferredPcbSilkscreenCircle = z.infer<typeof pcb_silkscreen_circle>\n\n/**\n * Defines a silkscreen circle on the PCB\n */\nexport interface PcbSilkscreenCircle {\n type: \"pcb_silkscreen_circle\"\n pcb_silkscreen_circle_id: string\n pcb_component_id: string\n center: Point\n radius: Length\n layer: VisibleLayer\n}\n\nexpectTypesMatch<PcbSilkscreenCircle, InferredPcbSilkscreenCircle>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n type LayerRef,\n visible_layer,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { distance, type Distance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_oval = z\n .object({\n type: z.literal(\"pcb_silkscreen_oval\"),\n pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_oval\"),\n pcb_component_id: z.string(),\n center: point,\n radius_x: distance,\n radius_y: distance,\n layer: visible_layer,\n })\n .describe(\"Defines a silkscreen oval on the PCB\")\n\nexport type PcbSilkscreenOvalInput = z.input<typeof pcb_silkscreen_oval>\ntype InferredPcbSilkscreenOval = z.infer<typeof pcb_silkscreen_oval>\n\n/**\n * Defines a silkscreen oval on the PCB\n */\nexport interface PcbSilkscreenOval {\n type: \"pcb_silkscreen_oval\"\n pcb_silkscreen_oval_id: string\n pcb_component_id: string\n center: Point\n radius_x: Distance\n radius_y: Distance\n layer: VisibleLayer\n}\n\n/**\n * @deprecated use PcbSilkscreenOval\n */\nexport type PcbSilkscreenOvalDeprecated = PcbSilkscreenOval\n\nexpectTypesMatch<PcbSilkscreenOval, InferredPcbSilkscreenOval>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"src/common\"\nimport { distance, type Length } from \"src/units\"\nimport {\n visible_layer,\n type LayerRef,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common/getZodPrefixedIdWithDefault\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_fabrication_note_text = z\n .object({\n type: z.literal(\"pcb_fabrication_note_text\"),\n pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(\n \"pcb_fabrication_note_text\",\n ),\n font: z.literal(\"tscircuit2024\").default(\"tscircuit2024\"),\n font_size: distance.default(\"1mm\"),\n pcb_component_id: z.string(),\n text: z.string(),\n layer: visible_layer,\n anchor_position: point.default({ x: 0, y: 0 }),\n anchor_alignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n color: z.string().optional(),\n })\n .describe(\n \"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators\",\n )\n\nexport type PcbFabricationNoteTextInput = z.input<\n typeof pcb_fabrication_note_text\n>\ntype InferredPcbFabricationNoteText = z.infer<typeof pcb_fabrication_note_text>\n\n/**\n * Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators\n */\nexport interface PcbFabricationNoteText {\n type: \"pcb_fabrication_note_text\"\n pcb_fabrication_note_text_id: string\n font: \"tscircuit2024\"\n font_size: Length\n pcb_component_id: string\n text: string\n layer: VisibleLayer\n anchor_position: Point\n anchor_alignment:\n | \"center\"\n | \"top_left\"\n | \"top_right\"\n | \"bottom_left\"\n | \"bottom_right\"\n color?: string\n}\n\n/**\n * @deprecated use PcbFabricationNoteText\n */\nexport type PCBFabricationNoteText = PcbFabricationNoteText\n\nexpectTypesMatch<PcbFabricationNoteText, InferredPcbFabricationNoteText>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n visible_layer,\n type LayerRef,\n} from \"src/pcb/properties/layer_ref\"\nimport { point, type Point } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_fabrication_note_path = z\n .object({\n type: z.literal(\"pcb_fabrication_note_path\"),\n pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(\n \"pcb_fabrication_note_path\",\n ),\n pcb_component_id: z.string(),\n layer: layer_ref,\n route: z.array(point),\n stroke_width: length,\n color: z.string().optional(),\n })\n .describe(\n \"Defines a fabrication path on the PCB for fabricators or assemblers\",\n )\n\nexport type PcbFabricationNotePathInput = z.input<\n typeof pcb_fabrication_note_path\n>\ntype InferredPcbFabricationNotePath = z.infer<typeof pcb_fabrication_note_path>\n\n/**\n * Defines a fabrication path on the PCB for fabricators or assemblers\n */\nexport interface PcbFabricationNotePath {\n type: \"pcb_fabrication_note_path\"\n pcb_fabrication_note_path_id: string\n pcb_component_id: string\n layer: LayerRef\n route: Point[]\n stroke_width: Length\n color?: string\n}\n\n/**\n * @deprecated use PcbFabricationNotePath\n */\nexport type PCBFabricationNotePath = PcbFabricationNotePath\n\nexpectTypesMatch<PcbFabricationNotePath, InferredPcbFabricationNotePath>(true)\n","import { z } from \"zod\"\nimport { point } from \"../common\"\nimport { distance } from \"../units\"\n\nexport const pcb_keepout = z\n .object({\n type: z.literal(\"pcb_keepout\"),\n shape: z.literal(\"rect\"),\n center: point,\n width: distance,\n height: distance,\n pcb_keepout_id: z.string(),\n layers: z.array(z.string()), // Specify layers where the keepout applies\n description: z.string().optional(), // Optional description of the keepout\n })\n .or(\n z.object({\n type: z.literal(\"pcb_keepout\"),\n shape: z.literal(\"circle\"),\n center: point,\n radius: distance,\n pcb_keepout_id: z.string(),\n layers: z.array(z.string()), // Specify layers where the keepout applies\n description: z.string().optional(), // Optional description of the keepout\n }),\n )\n\nexport type PCBKeepoutInput = z.input<typeof pcb_keepout>\nexport type PCBKeepout = z.infer<typeof pcb_keepout>\n","import { z } from \"zod\"\nimport { point3 } from \"../common\"\nimport { rotation, length } from \"../units\"\nimport { layer_ref } from \"src/pcb\"\n\nexport const cad_component = z\n .object({\n type: z.literal(\"cad_component\"),\n cad_component_id: z.string(),\n pcb_component_id: z.string(),\n source_component_id: z.string(),\n position: point3,\n rotation: point3.optional(),\n size: point3.optional(),\n layer: layer_ref.optional(),\n\n // These are all ways to generate/load the 3d model\n footprinter_string: z.string().optional(),\n model_obj_url: z.string().optional(),\n model_stl_url: z.string().optional(),\n model_3mf_url: z.string().optional(),\n model_jscad: z.any().optional(),\n })\n .describe(\"Defines a component on the PCB\")\n\nexport type CadComponentInput = z.input<typeof cad_component>\nexport type CadComponent = z.infer<typeof cad_component>\n","import { z } from \"zod\"\nimport * as pcb from \"./pcb\"\nimport * as sch from \"./schematic\"\nimport * as src from \"./source\"\nimport * as cad from \"./cad\"\n\nexport const any_circuit_element = z.union([\n // TODO source_group\n // TODO source_config\n // TODO pcb_group\n // TODO pcb_config\n // TODO schematic_config\n // TODO schematic_group\n src.source_trace,\n src.source_port,\n src.any_source_component,\n src.source_led,\n src.source_net,\n src.source_group,\n src.source_simple_bug,\n src.source_simple_chip,\n src.source_simple_capacitor,\n src.source_simple_diode,\n src.source_simple_resistor,\n src.source_simple_power_source,\n src.source_simple_battery,\n pcb.pcb_component,\n pcb.pcb_hole,\n pcb.pcb_plated_hole,\n pcb.pcb_keepout,\n pcb.pcb_port,\n pcb.pcb_text,\n pcb.pcb_trace,\n pcb.pcb_via,\n pcb.pcb_smtpad,\n pcb.pcb_solder_paste,\n pcb.pcb_board,\n pcb.pcb_trace_hint,\n pcb.pcb_silkscreen_line,\n pcb.pcb_silkscreen_path,\n pcb.pcb_silkscreen_text,\n pcb.pcb_silkscreen_rect,\n pcb.pcb_silkscreen_circle,\n pcb.pcb_silkscreen_oval,\n pcb.pcb_trace_error,\n pcb.pcb_placement_error,\n pcb.pcb_port_not_matched_error,\n pcb.pcb_fabrication_note_path,\n pcb.pcb_fabrication_note_text,\n sch.schematic_box,\n sch.schematic_text,\n sch.schematic_line,\n sch.schematic_component,\n sch.schematic_port,\n sch.schematic_trace,\n sch.schematic_path,\n sch.schematic_error,\n sch.schematic_net_label,\n sch.schematic_debug_object,\n cad.cad_component,\n])\n\n/**\n * @deprecated use any_circuit_element instead\n */\nexport const any_soup_element = any_circuit_element\n\nexport type AnyCircuitElement = z.infer<typeof any_circuit_element>\nexport type AnyCircuitElementInput = z.input<typeof any_circuit_element>\n/**\n * @deprecated use AnyCircuitElement instead\n */\nexport type AnySoupElement = AnyCircuitElement\n\n/**\n * @deprecated use AnyCircuitElementInput instead\n */\nexport type AnySoupElementInput = AnyCircuitElementInput\n"],"mappings":";AAKA,IAAM,eAGF;AAAA,EACF,IAAI;AAAA,IACF,UAAU;AAAA,IACV,UAAU;AAAA,MACR,KAAK;AAAA,MACL,KAAK;AAAA,MACL,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,GAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,IAAI;AAAA,MACJ,GAAG;AAAA,IACL;AAA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OAAO;AAAA,EAC3B,qBAAqBA,IAAE,OAAO;AAAA,EAC9B,UAAU;AAAA,EACV,UAAU,OAAO,SAAS;AAAA,EAC1B,MAAM,OAAO,SAAS;AAAA,EACtB,OAAO,UAAU,SAAS;AAAA;AAAA,EAG1B,oBAAoBA,IAAE,OAAO,EAAE,SAAS;AAAA,EACxC,eAAeA,IAAE,OAAO,EAAE,SAAS;AAAA,EACnC,eAAeA,IAAE,OAAO,EAAE,SAAS;AAAA,EACnC,eAAeA,IAAE,OAAO,EAAE,SAAS;AAAA,EACnC,aAAaA,IAAE,IAAI,EAAE,SAAS;AAChC,CAAC,EACA,SAAS,gCAAgC;;;ACvB5C,SAAS,KAAAC,WAAS;AAMX,IAAM,sBAAsBC,IAAE,MAAM;AAAA,EAOrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACN,CAAC;AAKM,IAAM,mBAAmB;","names":["z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z"]}
|
|
1
|
+
{"version":3,"sources":["../src/utils/convert-si-unit-to-number.ts","../src/units/index.ts","../src/common/point.ts","../src/common/point3.ts","../src/common/size.ts","../src/common/getZodPrefixedIdWithDefault.ts","../src/source/source_simple_capacitor.ts","../src/pcb/properties/supplier_name.ts","../src/source/base/source_component_base.ts","../src/source/source_simple_resistor.ts","../src/source/source_simple_diode.ts","../src/source/source_simple_ground.ts","../src/source/source_simple_bug.ts","../src/source/source_simple_chip.ts","../src/source/source_simple_inductor.ts","../src/source/source_led.ts","../src/source/source_simple_power_source.ts","../src/source/any_source_component.ts","../src/source/source_simple_battery.ts","../src/source/source_port.ts","../src/source/source_trace.ts","../src/source/source_group.ts","../src/source/source_net.ts","../src/schematic/schematic_box.ts","../src/schematic/schematic_path.ts","../src/schematic/schematic_component.ts","../src/schematic/schematic_line.ts","../src/schematic/schematic_trace.ts","../src/schematic/schematic_text.ts","../src/schematic/schematic_port.ts","../src/schematic/schematic_net_label.ts","../src/schematic/schematic_error.ts","../src/schematic/schematic_debug_object.ts","../src/pcb/properties/layer_ref.ts","../src/pcb/properties/pcb_route_hints.ts","../src/pcb/properties/route_hint_point.ts","../src/pcb/pcb_component.ts","../src/utils/expect-types-match.ts","../src/pcb/pcb_hole.ts","../src/pcb/pcb_plated_hole.ts","../src/pcb/pcb_port.ts","../src/pcb/pcb_smtpad.ts","../src/pcb/pcb_solder_paste.ts","../src/pcb/pcb_text.ts","../src/pcb/pcb_trace.ts","../src/pcb/pcb_trace_error.ts","../src/pcb/pcb_port_not_matched_error.ts","../src/pcb/pcb_via.ts","../src/pcb/pcb_board.ts","../src/pcb/pcb_placement_error.ts","../src/pcb/pcb_trace_hint.ts","../src/pcb/pcb_silkscreen_line.ts","../src/pcb/pcb_silkscreen_path.ts","../src/pcb/pcb_silkscreen_text.ts","../src/pcb/pcb_silkscreen_rect.ts","../src/pcb/pcb_silkscreen_circle.ts","../src/pcb/pcb_silkscreen_oval.ts","../src/pcb/pcb_fabrication_note_text.ts","../src/pcb/pcb_fabrication_note_path.ts","../src/pcb/pcb_keepout.ts","../src/cad/cad_component.ts","../src/any_circuit_element.ts"],"sourcesContent":["type UnitInfo = {\n baseUnit: BaseTscircuitUnit\n conversionFactor: number\n}\n\nconst unitMappings: Record<\n string,\n { baseUnit: BaseTscircuitUnit; variants: Record<string, number> }\n> = {\n Hz: {\n baseUnit: \"Hz\",\n variants: {\n MHz: 1e6,\n kHz: 1e3,\n Hz: 1,\n },\n },\n g: {\n baseUnit: \"g\",\n variants: {\n kg: 1e3,\n g: 1,\n },\n },\n Ω: {\n baseUnit: \"Ω\",\n variants: {\n mΩ: 1e-3,\n Ω: 1,\n kΩ: 1e3,\n MΩ: 1e6,\n GΩ: 1e9,\n TΩ: 1e12,\n },\n },\n V: {\n baseUnit: \"V\",\n variants: {\n mV: 1e-3,\n V: 1,\n kV: 1e3,\n MV: 1e6,\n GV: 1e9,\n TV: 1e12,\n },\n },\n A: {\n baseUnit: \"A\",\n variants: {\n µA: 1e-6,\n mA: 1e-3,\n ma: 1e-3,\n A: 1,\n kA: 1e3,\n MA: 1e6,\n },\n },\n F: {\n baseUnit: \"F\",\n variants: {\n pF: 1e-12,\n nF: 1e-9,\n µF: 1e-6,\n mF: 1e-3,\n F: 1,\n },\n },\n ml: {\n baseUnit: \"ml\",\n variants: {\n ml: 1,\n mL: 1,\n l: 1e3,\n L: 1e3,\n },\n },\n deg: {\n baseUnit: \"deg\",\n variants: {\n rad: 180 / Math.PI,\n },\n },\n ms: {\n baseUnit: \"ms\",\n variants: {\n s: 1000,\n },\n },\n mm: {\n baseUnit: \"mm\",\n variants: {\n nm: 1e-6,\n µm: 1e-3,\n um: 1e-3,\n mm: 1,\n cm: 10,\n dm: 100,\n m: 1000,\n km: 1e6,\n in: 25.4,\n ft: 304.8,\n IN: 25.4,\n FT: 304.8,\n yd: 914.4,\n mi: 1.609344e6,\n mil: 0.0254,\n },\n },\n}\n\nfunction getBaseTscircuitUnit(unit: string): UnitInfo {\n for (const [baseUnit, info] of Object.entries(unitMappings)) {\n if (unit in info.variants) {\n return {\n baseUnit: info.baseUnit,\n conversionFactor: info.variants[unit]!,\n }\n }\n }\n return {\n baseUnit: unit as BaseTscircuitUnit,\n conversionFactor: 1,\n }\n}\n\nconst si_prefix_multiplier = {\n tera: 1e12,\n T: 1e12,\n giga: 1e9,\n G: 1e9,\n mega: 1e6,\n M: 1e6,\n kilo: 1e3,\n k: 1e3,\n deci: 1e-1,\n d: 1e-1,\n centi: 1e-2,\n c: 1e-2,\n milli: 1e-3,\n m: 1e-3,\n micro: 1e-6,\n u: 1e-6,\n µ: 1e-6,\n nano: 1e-9,\n n: 1e-9,\n pico: 1e-12,\n p: 1e-12,\n}\ntype BaseTscircuitUnit =\n | \"ms\"\n | \"mm\"\n | \"g\"\n | \"deg\"\n | \"Hz\"\n | \"ml\"\n | \"V\"\n | \"A\"\n | \"Ω\"\n | \"F\"\n | \"H\"\n\nexport const parseAndConvertSiUnit = <\n T extends\n | string\n | number\n | undefined\n | { x: string | number; y: string | number },\n>(\n v: T,\n): {\n parsedUnit: string | null\n unitOfValue: BaseTscircuitUnit | null\n value: T extends { x: string | number; y: string | number }\n ? null | { x: number; y: number }\n : null | number\n} => {\n if (typeof v === \"undefined\")\n return { parsedUnit: null, unitOfValue: null, value: null }\n if (typeof v === \"string\" && v.match(/^[\\d\\.]+$/))\n return {\n value: Number.parseFloat(v) as any,\n parsedUnit: null,\n unitOfValue: null,\n }\n if (typeof v === \"number\")\n return { value: v as any, parsedUnit: null, unitOfValue: null }\n if (typeof v === \"object\" && \"x\" in v && \"y\" in v) {\n const { parsedUnit, unitOfValue } = parseAndConvertSiUnit(v.x)\n return {\n parsedUnit: parsedUnit,\n unitOfValue: unitOfValue,\n value: {\n x: parseAndConvertSiUnit(v.x as any).value as number,\n y: parseAndConvertSiUnit(v.y as any).value as number,\n } as any,\n }\n }\n const unit_reversed = v\n .split(\"\")\n .reverse()\n .join(\"\")\n .match(/[a-zA-Z]+/)?.[0]\n if (!unit_reversed) {\n throw new Error(`Could not determine unit: \"${v}\"`)\n }\n const unit = unit_reversed.split(\"\").reverse().join(\"\")\n const value = v.slice(0, -unit.length)\n\n const { baseUnit, conversionFactor } = getBaseTscircuitUnit(unit)\n\n return {\n parsedUnit: unit,\n unitOfValue: baseUnit,\n value: (conversionFactor * Number.parseFloat(value)) as any,\n }\n}\n","import { parseAndConvertSiUnit } from \"src/utils/convert-si-unit-to-number\"\nimport { z } from \"zod\"\n\n// // Currently, removing uncommon SI Prefixes for type simplicity.\n// export type SIPrefix =\n// // | \"y\"\n// // | \"yocto\"\n// // | \"z\"\n// // | \"zepto\"\n// // | \"atto\"\n// // | \"a\"\n// | \"femto\"\n// | \"f\"\n// | \"u\"\n// | \"micro\"\n// // | \"d\"\n// // | \"deci\"\n// | \"c\"\n// | \"centi\"\n// | \"m\"\n// | \"milli\"\n// | \"k\"\n// | \"kilo\"\n// | \"M\"\n// | \"mega\"\n// // | \"G\"\n// // | \"T\"\n// // | \"P\"\n// // | \"E\"\n// // | \"Z\"\n// // | \"Y\"\n\n// export type UnitAbbreviations = {\n// farad: \"F\"\n// ohm: \"Ω\"\n// henry: \"H\"\n// meter: \"m\"\n// volt: \"V\"\n// inch: \"in\"\n// foot: \"ft\"\n// }\n\n// export type Unit = keyof UnitAbbreviations\n// export type NumberWithUnit<T extends Unit> =\n// | `${number}${T | UnitAbbreviations[T]}`\n// | `${number} ${T | UnitAbbreviations[T]}`\n// | `${number}${SIPrefix}${T | UnitAbbreviations[T]}`\n// | `${number} ${SIPrefix}${T | UnitAbbreviations[T]}`\n// export type NumberWithAnyUnit =\n// | `${number}${UnitOrAbbreviation}`\n// | `${number} ${UnitOrAbbreviation}`\n// | `${number}${SIPrefix}${UnitOrAbbreviation}`\n// | `${number} ${SIPrefix}${UnitOrAbbreviation}`\n\n// TODO lots of validation to make sure the unit is valid etc.\nexport const resistance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const capacitance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const inductance = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const voltage = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const length = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n/**\n * Length in meters\n */\nexport type Length = number\nexport type Distance = number\n\nexport const distance = length\n\nexport const current = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\nexport const time = z\n .string()\n .or(z.number())\n .transform((v) => parseAndConvertSiUnit(v).value!)\n\n/**\n * Rotation is always converted to degrees\n */\nexport const rotation = z\n .string()\n .or(z.number())\n .transform((arg): number => {\n if (typeof arg === \"number\") return arg\n if (arg.endsWith(\"deg\")) {\n return Number.parseFloat(arg.split(\"deg\")[0]!)\n }\n if (arg.endsWith(\"rad\")) {\n return (Number.parseFloat(arg.split(\"rad\")[0]!) * 180) / Math.PI\n }\n return Number.parseFloat(arg)\n })\n\nexport const battery_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 type InputRotation = number | string\nexport type Rotation = number\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const point = z.object({\n x: distance,\n y: distance,\n})\n\nexport const position = point\n\nexport type Point = z.infer<typeof point>\nexport type InputPoint = z.input<typeof point>\nexport type InputPosition = z.input<typeof position>\nexport type Position = z.infer<typeof position>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const point3 = z.object({\n x: distance,\n y: distance,\n z: distance,\n})\n\nexport const position3 = point3\n\nexport type Point3 = z.infer<typeof point3>\n","import { z } from \"zod\"\n\nexport const size = z.object({\n width: z.number(),\n height: z.number(),\n})\n\nexport type Size = z.infer<typeof size>\n","import { z } from \"zod\"\nimport { nanoid } from \"nanoid\"\n\n/**\n * Use this for primary keys for any circuit element\n */\nexport const getZodPrefixedIdWithDefault = (prefix: string) => {\n return z\n .string()\n .optional()\n .default(() => `${prefix}_${nanoid(10)}`)\n}\n","import { z } from \"zod\"\nimport { source_component_base } from \"src/source/base/source_component_base\"\nimport { capacitance } from \"src/units\"\n\nexport const source_simple_capacitor = source_component_base.extend({\n ftype: z.literal(\"simple_capacitor\"),\n capacitance,\n})\n\nexport type SourceSimpleCapacitor = z.infer<typeof source_simple_capacitor>\nexport type SourceSimpleCapacitorInput = z.input<typeof source_simple_capacitor>\n","import { z } from \"zod\"\n\nexport const supplier_name = z.enum([\n \"jlcpcb\",\n \"macrofab\",\n \"pcbway\",\n \"digikey\",\n \"mouser\",\n \"lcsc\",\n])\n\nexport type SupplierName = z.infer<typeof supplier_name>\n","import { supplier_name } from \"src/pcb/properties/supplier_name\"\nimport { z } from \"zod\"\n\nexport const source_component_base = z.object({\n type: z.literal(\"source_component\"),\n ftype: z.string().optional(),\n source_component_id: z.string(),\n name: z.string(),\n manufacturer_part_number: z.string().optional(),\n supplier_part_numbers: z\n .record(supplier_name, z.array(z.string()))\n .optional(),\n display_value: z.string().optional(),\n})\n\nexport type SourceComponentBase = z.infer<typeof source_component_base>\n","import { z } from \"zod\"\nimport { source_component_base } from \"src/source/base/source_component_base\"\nimport { resistance } from \"src/units\"\n\nexport const source_simple_resistor = source_component_base.extend({\n ftype: z.literal(\"simple_resistor\"),\n resistance,\n})\n\nexport type SourceSimpleResistor = z.infer<typeof source_simple_resistor>\nexport type SourceSimpleResistorInput = z.input<typeof source_simple_resistor>\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\n\nexport const source_simple_diode = source_component_base.extend({\n ftype: z.literal(\"simple_diode\"),\n})\n\nexport type SourceSimpleDiode = z.infer<typeof source_simple_diode>\nexport type SourceSimpleDiodeInput = z.input<typeof source_simple_diode>\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\n\nexport const source_simple_ground = source_component_base.extend({\n ftype: z.literal(\"simple_ground\"),\n})\n\nexport type SourceSimpleGround = z.infer<typeof source_simple_ground>\nexport type SourceSimpleGroundInput = z.input<typeof source_simple_ground>\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\n\n/**\n * @deprecated Use source_simple_chip instead. This will be removed in a future version.\n */\nexport const source_simple_bug = source_component_base\n .extend({\n ftype: z.literal(\"simple_bug\"),\n })\n .describe(\"@deprecated\")\n\nexport type source_simple_bug = z.infer<typeof source_simple_bug>\nexport type SourceSimpleBugInput = z.input<typeof source_simple_bug>\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\n\nexport const source_simple_chip = source_component_base.extend({\n ftype: z.literal(\"simple_chip\"),\n})\n\nexport type SourceSimpleChip = z.infer<typeof source_simple_chip>\nexport type SourceSimpleChipInput = z.input<typeof source_simple_chip>\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\nimport { inductance } from \"../units\"\n\nexport const source_simple_inductor = source_component_base.extend({\n ftype: z.literal(\"simple_inductor\"),\n inductance,\n})\n\nexport type SourceSimpleInductor = z.infer<typeof source_simple_inductor>\nexport type SourceSimpleInductorInput = z.input<typeof source_simple_inductor>\n","import { z } from \"zod\"\nimport { source_simple_diode } from \"./source_simple_diode\"\n\nexport const source_led = source_simple_diode.extend({\n ftype: z.literal(\"led\"),\n})\n\nexport type SourceLed = z.infer<typeof source_led>\nexport type SourceLedInput = z.input<typeof source_led>\n","import { source_component_base } from \"src/source/base/source_component_base\"\nimport { z } from \"zod\"\nimport { voltage } from \"../units\"\n\nexport const source_simple_power_source = source_component_base.extend({\n ftype: z.literal(\"simple_power_source\"),\n voltage,\n})\n\nexport type SourceSimplePowerSource = z.infer<typeof source_simple_power_source>\nexport type SourceSimplePowerSourceInput = z.input<\n typeof source_simple_power_source\n>\n","import { z } from \"zod\"\nimport { source_simple_resistor } from \"./source_simple_resistor\"\nimport { source_simple_capacitor } from \"./source_simple_capacitor\"\nimport { source_simple_diode } from \"./source_simple_diode\"\nimport { source_simple_ground } from \"./source_simple_ground\"\nimport { source_simple_bug } from \"./source_simple_bug\"\nimport { source_simple_chip } from \"./source_simple_chip\"\nimport { source_led } from \"./source_led\"\nimport { source_simple_power_source } from \"./source_simple_power_source\"\nimport { source_simple_battery } from \"./source_simple_battery\"\nimport { source_simple_inductor } from \"./source_simple_inductor\"\n\nexport const any_source_component = z.union([\n source_simple_resistor,\n source_simple_capacitor,\n source_simple_diode,\n source_simple_ground,\n source_simple_chip,\n source_simple_bug,\n source_led,\n source_simple_power_source,\n source_simple_battery,\n source_simple_inductor,\n])\n\nexport type AnySourceComponent = z.infer<typeof any_source_component>\n","import { z } from \"zod\"\nimport { source_component_base } from \"src/source/base/source_component_base\"\nimport { battery_capacity } from \"src/units\"\n\nexport const source_simple_battery = source_component_base.extend({\n ftype: z.literal(\"simple_battery\"),\n capacity: battery_capacity,\n})\n\nexport type SourceSimpleBattery = z.infer<typeof source_simple_battery>\nexport type SourceSimpleBatteryInput = z.input<typeof source_simple_battery>\n","import { z } from \"zod\"\n\nexport const source_port = z.object({\n type: z.literal(\"source_port\"),\n pin_number: z.number().optional(),\n port_hints: z.array(z.string()).optional(),\n name: z.string(),\n source_port_id: z.string(),\n source_component_id: z.string(),\n})\n\nexport type SourcePort = z.infer<typeof source_port>\n","import { z } from \"zod\"\n\nexport const source_trace = z.object({\n type: z.literal(\"source_trace\"),\n source_trace_id: z.string(),\n connected_source_port_ids: z.array(z.string()),\n connected_source_net_ids: z.array(z.string()),\n})\n\nexport type SourceTrace = z.infer<typeof source_trace>\n","import { z } from \"zod\"\n\nexport const source_group = z.object({\n type: z.literal(\"source_group\"),\n source_group_id: z.string(),\n name: z.string().optional(),\n})\n\nexport type SourceGroup = z.infer<typeof source_group>\nexport type SourceGroupInput = z.input<typeof source_group>\n","import { z } from \"zod\"\n\nexport const source_net = z.object({\n type: z.literal(\"source_net\"),\n source_net_id: z.string(),\n name: z.string(),\n member_source_group_ids: z.array(z.string()),\n is_power: z.boolean().optional(),\n is_ground: z.boolean().optional(),\n is_digital_signal: z.boolean().optional(),\n is_analog_signal: z.boolean().optional(),\n trace_width: z.number().optional(),\n})\n\nexport type SourceNet = z.infer<typeof source_net>\nexport type SourceNetInput = z.input<typeof source_net>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const schematic_box = z\n .object({\n type: z.literal(\"schematic_box\"),\n schematic_component_id: z.string(),\n width: distance,\n height: distance,\n x: distance,\n y: distance,\n })\n .describe(\"Draws a box on the schematic\")\n\nexport type SchematicBoxInput = z.input<typeof schematic_box>\nexport type SchematicBox = z.infer<typeof schematic_box>\n","import { z } from \"zod\"\nimport { point } from \"../common/point\"\n\nexport const schematic_path = z.object({\n type: z.literal(\"schematic_path\"),\n schematic_component_id: z.string(),\n fill_color: z.enum([\"red\", \"blue\"]).optional(),\n is_filled: z.boolean().optional(),\n points: z.array(point),\n})\n\nexport type SchematicPathInput = z.input<typeof schematic_path>\nexport type SchematicPath = z.infer<typeof schematic_path>\n","import { z } from \"zod\"\nimport { point } from \"../common/point\"\nimport { size } from \"../common/size\"\nimport { length, rotation } from \"../units\"\n\nexport const schematic_pin_styles = z.record(\n z.object({\n left_margin: length.optional(),\n right_margin: length.optional(),\n top_margin: length.optional(),\n bottom_margin: length.optional(),\n }),\n)\n\nexport const schematic_component = z.object({\n type: z.literal(\"schematic_component\"),\n rotation: rotation.default(0),\n size,\n center: point,\n source_component_id: z.string(),\n schematic_component_id: z.string(),\n pin_spacing: length.optional(),\n pin_styles: schematic_pin_styles.optional(),\n box_width: length.optional(),\n symbol_name: z.string().optional(),\n port_arrangement: z\n .union([\n z.object({\n left_size: z.number(),\n right_size: z.number(),\n top_size: z.number().optional(),\n bottom_size: z.number().optional(),\n }),\n z.object({\n left_side: z\n .object({\n pins: z.array(z.number()),\n direction: z.enum([\"top-to-bottom\", \"bottom-to-top\"]).optional(),\n })\n .optional(),\n right_side: z\n .object({\n pins: z.array(z.number()),\n direction: z.enum([\"top-to-bottom\", \"bottom-to-top\"]).optional(),\n })\n .optional(),\n top_side: z\n .object({\n pins: z.array(z.number()),\n direction: z.enum([\"left-to-right\", \"right-to-left\"]).optional(),\n })\n .optional(),\n bottom_side: z\n .object({\n pins: z.array(z.number()),\n direction: z.enum([\"left-to-right\", \"right-to-left\"]).optional(),\n })\n .optional(),\n }),\n ])\n .optional(),\n port_labels: z.record(z.string()).optional(),\n})\n\nexport type SchematicComponentInput = z.input<typeof schematic_component>\nexport type SchematicComponent = z.infer<typeof schematic_component>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const schematic_line = z.object({\n type: z.literal(\"schematic_line\"),\n schematic_component_id: z.string(),\n x1: distance,\n x2: distance,\n y1: distance,\n y2: distance,\n})\n\nexport type SchematicLineInput = z.input<typeof schematic_line>\nexport type SchematicLine = z.infer<typeof schematic_line>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const schematic_trace = z.object({\n type: z.literal(\"schematic_trace\"),\n schematic_trace_id: z.string(),\n source_trace_id: z.string(),\n edges: z.array(\n z.object({\n from: z.object({\n x: z.number(),\n y: z.number(),\n }),\n to: z.object({\n x: z.number(),\n y: z.number(),\n }),\n from_schematic_port_id: z.string().optional(),\n to_schematic_port_id: z.string().optional(),\n }),\n ),\n})\n\nexport type SchematicTraceInput = z.input<typeof schematic_trace>\nexport type SchematicTrace = z.infer<typeof schematic_trace>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\n\nexport const schematic_text = z.object({\n type: z.literal(\"schematic_text\"),\n schematic_component_id: z.string(),\n schematic_text_id: z.string(),\n text: z.string(),\n position: z.object({\n x: distance,\n y: distance,\n }),\n rotation: z.number().default(0),\n anchor: z\n .enum([\"center\", \"left\", \"right\", \"top\", \"bottom\"])\n .default(\"center\"),\n color: z.string().default(\"#000000\"),\n})\n\nexport type SchematicTextInput = z.input<typeof schematic_text>\nexport type SchematicText = z.infer<typeof schematic_text>\n","import { z } from \"zod\"\nimport { distance } from \"../units\"\nimport { point } from \"../common\"\n\nexport const schematic_port = z\n .object({\n type: z.literal(\"schematic_port\"),\n schematic_port_id: z.string(),\n source_port_id: z.string(),\n schematic_component_id: z.string().optional(),\n center: point,\n facing_direction: z.enum([\"up\", \"down\", \"left\", \"right\"]).optional(),\n distance_from_component_edge: z.number().optional(),\n side_of_component: z.enum([\"top\", \"bottom\", \"left\", \"right\"]).optional(),\n true_ccw_index: z.number().optional(),\n pin_number: z.number().optional(),\n })\n .describe(\"Defines a port on a schematic component\")\n\nexport type SchematicPortInput = z.input<typeof schematic_port>\nexport type SchematicPort = z.infer<typeof schematic_port>\n","import { z } from \"zod\"\nimport { point } from \"../common/point\"\n\nexport const schematic_net_label = z.object({\n type: z.literal(\"schematic_net_label\"),\n source_net_id: z.string(),\n center: point,\n anchor_side: z.enum([\"top\", \"bottom\", \"left\", \"right\"]),\n text: z.string(),\n})\n\nexport type SchematicNetLabelInput = z.input<typeof schematic_net_label>\nexport type SchematicNetLabel = z.infer<typeof schematic_net_label>\n","import { z } from \"zod\"\n\nexport const schematic_error = z\n .object({\n schematic_error_id: z.string(),\n type: z.literal(\"schematic_error\"),\n // eventually each error type should be broken out into a dir of files\n error_type: z.literal(\"schematic_port_not_found\"),\n message: z.string(),\n })\n .describe(\"Defines a schematic error on the schematic\")\n\nexport type SchematicErrorInput = z.input<typeof schematic_error>\nexport type SchematicError = z.infer<typeof schematic_error>\n","import { z } from \"zod\"\nimport { point } from \"../common/point\"\nimport { size } from \"../common/size\"\n\nexport const schematic_debug_object_base = z.object({\n type: z.literal(\"schematic_debug_object\"),\n label: z.string().optional(),\n})\n\nexport const schematic_debug_rect = schematic_debug_object_base.extend({\n shape: z.literal(\"rect\"),\n center: point,\n size: size,\n})\n\nexport const schematic_debug_line = schematic_debug_object_base.extend({\n shape: z.literal(\"line\"),\n start: point,\n end: point,\n})\n\nexport const schematic_debug_point = schematic_debug_object_base.extend({\n shape: z.literal(\"point\"),\n center: point,\n})\n\nexport const schematic_debug_object = z.discriminatedUnion(\"shape\", [\n schematic_debug_rect,\n schematic_debug_line,\n schematic_debug_point,\n])\n\nexport type SchematicDebugObject = z.infer<typeof schematic_debug_object>\nexport type SchematicDebugRect = z.infer<typeof schematic_debug_rect>\nexport type SchematicDebugLine = z.infer<typeof schematic_debug_line>\nexport type SchematicDebugObjectInput = z.input<typeof schematic_debug_object>\n","import { z } from \"zod\"\n\nexport const all_layers = [\n \"top\",\n \"bottom\",\n \"inner1\",\n \"inner2\",\n \"inner3\",\n \"inner4\",\n \"inner5\",\n \"inner6\",\n] as const\n\nexport const layer_string = z.enum(all_layers)\n\nexport const layer_ref = layer_string\n .or(\n z.object({\n name: layer_string,\n }),\n )\n .transform((layer) => {\n if (typeof layer === \"string\") {\n return layer\n }\n return layer.name\n })\n\nexport type LayerRefInput = z.input<typeof layer_ref>\nexport type LayerRef = z.output<typeof layer_ref>\n\nexport const visible_layer = z.enum([\"top\", \"bottom\"])\nexport type VisibleLayerRef = z.infer<typeof visible_layer>\nexport type VisibleLayer = z.infer<typeof visible_layer>\n","import { z } from \"zod\"\nimport { distance } from \"src/units\"\nimport { layer_ref } from \"./layer_ref\"\n\n// x: string | number\n// y: string | number\n// via?: boolean\n// via_to_layer?: string\nexport const pcb_route_hint = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n via_to_layer: layer_ref.optional(),\n})\nexport const pcb_route_hints = z.array(pcb_route_hint)\n\nexport type PcbRouteHintInput = z.input<typeof pcb_route_hint>\nexport type PcbRouteHintsInput = z.input<typeof pcb_route_hints>\nexport type PcbRouteHint = z.output<typeof pcb_route_hint>\nexport type PcbRouteHints = z.output<typeof pcb_route_hints>\n","import { z } from \"zod\"\nimport { distance } from \"../../units\"\nimport { layer_ref } from \"./layer_ref\"\n\nexport const route_hint_point = z.object({\n x: distance,\n y: distance,\n via: z.boolean().optional(),\n to_layer: layer_ref.optional(),\n trace_width: distance.optional(),\n})\n\nexport type RouteHintPoint = z.infer<typeof route_hint_point>\nexport type RouteHintPointInput = z.input<typeof route_hint_point>\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { rotation, length, type Rotation, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_component = z\n .object({\n type: z.literal(\"pcb_component\"),\n pcb_component_id: getZodPrefixedIdWithDefault(\"pcb_component\"),\n source_component_id: z.string(),\n center: point,\n layer: layer_ref,\n rotation: rotation,\n width: length,\n height: length,\n })\n .describe(\"Defines a component on the PCB\")\n\nexport type PcbComponentInput = z.input<typeof pcb_component>\ntype InferredPcbComponent = z.infer<typeof pcb_component>\n\n/**\n * Defines a component on the PCB\n */\nexport interface PcbComponent {\n type: \"pcb_component\"\n pcb_component_id: string\n source_component_id: string\n center: Point\n layer: LayerRef\n rotation: Rotation\n width: Length\n height: Length\n}\n\n/**\n * @deprecated use PcbComponent\n */\nexport type PCBComponent = PcbComponent\n\nexpectTypesMatch<PcbComponent, InferredPcbComponent>(true)\n","import type { TypeEqual } from \"ts-expect\"\n\nexport const expectTypesMatch = <const T1, const T2>(\n shouldBe: TypeEqual<T1, T2>,\n): void => {}\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_hole_circle_or_square = z.object({\n type: z.literal(\"pcb_hole\"),\n pcb_hole_id: getZodPrefixedIdWithDefault(\"pcb_hole\"),\n hole_shape: z.enum([\"circle\", \"square\"]),\n hole_diameter: z.number(),\n x: distance,\n y: distance,\n})\n\nexport const pcb_hole_circle_or_square_shape =\n pcb_hole_circle_or_square.describe(\n \"Defines a circular or square hole on the PCB\",\n )\n\nexport type PcbHoleCircleOrSquareInput = z.input<\n typeof pcb_hole_circle_or_square\n>\ntype InferredPcbHoleCircleOrSquare = z.infer<typeof pcb_hole_circle_or_square>\n\n/**\n * Defines a circular or square hole on the PCB\n */\nexport interface PcbHoleCircleOrSquare {\n type: \"pcb_hole\"\n pcb_hole_id: string\n hole_shape: \"circle\" | \"square\"\n hole_diameter: number\n x: Distance\n y: Distance\n}\n\nexpectTypesMatch<PcbHoleCircleOrSquare, InferredPcbHoleCircleOrSquare>(true)\n\nconst pcb_hole_oval = z.object({\n type: z.literal(\"pcb_hole\"),\n pcb_hole_id: getZodPrefixedIdWithDefault(\"pcb_hole\"),\n hole_shape: z.literal(\"oval\"),\n hole_width: z.number(),\n hole_height: z.number(),\n x: distance,\n y: distance,\n})\n\nexport const pcb_hole_oval_shape = pcb_hole_oval.describe(\n \"Defines an oval hole on the PCB\",\n)\n\nexport type PcbHoleOvalInput = z.input<typeof pcb_hole_oval>\ntype InferredPcbHoleOval = z.infer<typeof pcb_hole_oval>\n\n/**\n * Defines an oval hole on the PCB\n */\nexport interface PcbHoleOval {\n type: \"pcb_hole\"\n pcb_hole_id: string\n hole_shape: \"oval\"\n hole_width: number\n hole_height: number\n x: Distance\n y: Distance\n}\n\nexpectTypesMatch<PcbHoleOval, InferredPcbHoleOval>(true)\n\nexport const pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval)\n\n/**\n * @deprecated Use PcbHoleCircleOrSquare or PcbHoleOval\n */\nexport type PCBHoleInput = z.input<typeof pcb_hole>\n/**\n * @deprecated Use PcbHoleCircleOrSquare or PcbHoleOval\n */\nexport type PCBHole = z.infer<typeof pcb_hole>\n\nexport type PcbHole = PcbHoleCircleOrSquare | PcbHoleOval\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_plated_hole_circle = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.literal(\"circle\"),\n outer_diameter: z.number(),\n hole_diameter: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\n\n/**\n * Defines a circular plated hole on the PCB\n */\nexport interface PcbPlatedHoleCircle {\n type: \"pcb_plated_hole\"\n shape: \"circle\"\n outer_diameter: number\n hole_diameter: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nconst pcb_plated_hole_oval = z.object({\n type: z.literal(\"pcb_plated_hole\"),\n shape: z.enum([\"oval\", \"pill\"]),\n outer_width: z.number(),\n outer_height: z.number(),\n hole_width: z.number(),\n hole_height: z.number(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n pcb_plated_hole_id: getZodPrefixedIdWithDefault(\"pcb_plated_hole\"),\n})\n\n/**\n * Defines an oval or pill-shaped plated hole on the PCB\n */\nexport interface PcbPlatedHoleOval {\n type: \"pcb_plated_hole\"\n shape: \"oval\" | \"pill\"\n outer_width: number\n outer_height: number\n hole_width: number\n hole_height: number\n x: Distance\n y: Distance\n layers: LayerRef[]\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n pcb_plated_hole_id: string\n}\n\nexport const pcb_plated_hole = z.union([\n pcb_plated_hole_circle,\n pcb_plated_hole_oval,\n])\nexport type PcbPlatedHole = PcbPlatedHoleCircle | PcbPlatedHoleOval\n\nexpectTypesMatch<PcbPlatedHoleCircle, z.infer<typeof pcb_plated_hole_circle>>(\n true,\n)\nexpectTypesMatch<PcbPlatedHoleOval, z.infer<typeof pcb_plated_hole_oval>>(true)\n\n/**\n * @deprecated use PcbPlatedHole\n */\nexport type PCBPlatedHole = PcbPlatedHole\n\n/**\n * @deprecated use PcbPlatedHoleInput\n */\nexport type PCBPlatedHoleInput = z.input<typeof pcb_plated_hole>\nexport type PcbPlatedHoleInput = z.input<typeof pcb_plated_hole>\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_port = z\n .object({\n type: z.literal(\"pcb_port\"),\n pcb_port_id: getZodPrefixedIdWithDefault(\"pcb_port\"),\n source_port_id: z.string(),\n pcb_component_id: z.string(),\n x: distance,\n y: distance,\n layers: z.array(layer_ref),\n })\n .describe(\"Defines a port on the PCB\")\n\nexport type PcbPortInput = z.input<typeof pcb_port>\ntype InferredPcbPort = z.infer<typeof pcb_port>\n\n/**\n * Defines a port on the PCB\n */\nexport interface PcbPort {\n type: \"pcb_port\"\n pcb_port_id: string\n source_port_id: string\n pcb_component_id: string\n x: Distance\n y: Distance\n layers: LayerRef[]\n}\n\n/**\n * @deprecated use PcbPort\n */\nexport type PCBPort = PcbPort\n\n/**\n * @deprecated use PcbPortInput\n */\nexport type PCBPortInput = PcbPortInput\n\nexpectTypesMatch<PcbPort, InferredPcbPort>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_smtpad_circle = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"circle\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n x: distance,\n y: distance,\n radius: z.number(),\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nconst pcb_smtpad_rect = z.object({\n type: z.literal(\"pcb_smtpad\"),\n shape: z.literal(\"rect\"),\n pcb_smtpad_id: getZodPrefixedIdWithDefault(\"pcb_smtpad\"),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n layer: layer_ref,\n port_hints: z.array(z.string()).optional(),\n pcb_component_id: z.string().optional(),\n pcb_port_id: z.string().optional(),\n})\n\nexport const pcb_smtpad = z\n .union([pcb_smtpad_circle, pcb_smtpad_rect])\n .describe(\"Defines an SMT pad on the PCB\")\n\nexport type PCBSMTPadInput = z.input<typeof pcb_smtpad>\ntype PCBSMTPadCircle = z.infer<typeof pcb_smtpad_circle>\ntype PCBSMTPadRect = z.infer<typeof pcb_smtpad_rect>\n\n/**\n * Defines an SMT pad on the PCB\n */\nexport interface PcbSmtPadCircle {\n type: \"pcb_smtpad\"\n shape: \"circle\"\n pcb_smtpad_id: string\n x: Distance\n y: Distance\n radius: number\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\n/**\n * Defines an SMT pad on the PCB\n */\nexport interface PcbSmtPadRect {\n type: \"pcb_smtpad\"\n shape: \"rect\"\n pcb_smtpad_id: string\n x: Distance\n y: Distance\n width: number\n height: number\n layer: LayerRef\n port_hints?: string[]\n pcb_component_id?: string\n pcb_port_id?: string\n}\n\nexport type PcbSmtPad = PcbSmtPadCircle | PcbSmtPadRect\n\n/**\n * @deprecated use PcbSmtPad\n */\nexport type PCBSMTPad = PcbSmtPad\n\nexpectTypesMatch<PcbSmtPadCircle, PCBSMTPadCircle>(true)\nexpectTypesMatch<PcbSmtPadRect, PCBSMTPadRect>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nconst pcb_solder_paste_circle = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"circle\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n x: distance,\n y: distance,\n radius: z.number(),\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\n\nconst pcb_solder_paste_rect = z.object({\n type: z.literal(\"pcb_solder_paste\"),\n shape: z.literal(\"rect\"),\n pcb_solder_paste_id: getZodPrefixedIdWithDefault(\"pcb_solder_paste\"),\n x: distance,\n y: distance,\n width: z.number(),\n height: z.number(),\n layer: layer_ref,\n pcb_component_id: z.string().optional(),\n pcb_smtpad_id: z.string().optional(),\n})\n\nexport const pcb_solder_paste = z\n .union([pcb_solder_paste_circle, pcb_solder_paste_rect])\n .describe(\"Defines solderpaste on the PCB\")\n\nexport type PCBSolderPasteInput = z.input<typeof pcb_solder_paste>\ntype InferredPcbSolderPasteCircle = z.infer<typeof pcb_solder_paste_circle>\ntype InferredPcbSolderPasteRect = z.infer<typeof pcb_solder_paste_rect>\n\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPasteCircle {\n type: \"pcb_solder_paste\"\n shape: \"circle\"\n pcb_solder_paste_id: string\n x: Distance\n y: Distance\n radius: number\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n\n/**\n * Defines solderpaste on the PCB\n */\nexport interface PcbSolderPasteRect {\n type: \"pcb_solder_paste\"\n shape: \"rect\"\n pcb_solder_paste_id: string\n x: Distance\n y: Distance\n width: number\n height: number\n layer: LayerRef\n pcb_component_id?: string\n pcb_smtpad_id?: string\n}\n\nexport type PcbSolderPaste = PcbSolderPasteCircle | PcbSolderPasteRect\n\nexpectTypesMatch<PcbSolderPasteCircle, InferredPcbSolderPasteCircle>(true)\nexpectTypesMatch<PcbSolderPasteRect, InferredPcbSolderPasteRect>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_text = z\n .object({\n type: z.literal(\"pcb_text\"),\n pcb_text_id: getZodPrefixedIdWithDefault(\"pcb_text\"),\n text: z.string(),\n center: point,\n layer: layer_ref,\n width: length,\n height: length,\n lines: z.number(),\n align: z.enum([\"bottom-left\"]),\n })\n .describe(\"Defines text on the PCB\")\n\nexport type PcbTextInput = z.input<typeof pcb_text>\ntype InferredPcbText = z.infer<typeof pcb_text>\n\n/**\n * Defines text on the PCB\n */\nexport interface PcbText {\n type: \"pcb_text\"\n pcb_text_id: string\n text: string\n center: Point\n layer: LayerRef\n width: Length\n height: Length\n lines: number\n align: \"bottom-left\"\n}\n\n/**\n * @deprecated use PcbText\n */\nexport type PCBText = PcbText\n\nexpectTypesMatch<PcbText, InferredPcbText>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { distance, type Distance } from \"src/units\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_trace_route_point_wire = z.object({\n route_type: z.literal(\"wire\"),\n x: distance,\n y: distance,\n width: distance,\n start_pcb_port_id: z.string().optional(),\n end_pcb_port_id: z.string().optional(),\n layer: layer_ref,\n})\n\nexport const pcb_trace_route_point_via = z.object({\n route_type: z.literal(\"via\"),\n x: distance,\n y: distance,\n from_layer: z.string(),\n to_layer: z.string(),\n})\n\nexport const pcb_trace_route_point = z.union([\n pcb_trace_route_point_wire,\n pcb_trace_route_point_via,\n])\ntype InferredPcbTraceRoutePoint = z.infer<typeof pcb_trace_route_point>\n\nexport const pcb_trace = z\n .object({\n type: z.literal(\"pcb_trace\"),\n source_trace_id: z.string().optional(),\n pcb_component_id: z.string().optional(),\n pcb_trace_id: getZodPrefixedIdWithDefault(\"pcb_trace\"),\n route_thickness_mode: z\n .enum([\"constant\", \"interpolated\"])\n .default(\"constant\")\n .optional(),\n route_order_index: z.number().optional(),\n should_round_corners: z.boolean().optional(),\n route: z.array(\n z.union([\n z.object({\n route_type: z.literal(\"wire\"),\n x: distance,\n y: distance,\n width: distance,\n start_pcb_port_id: z.string().optional(),\n end_pcb_port_id: z.string().optional(),\n layer: layer_ref,\n }),\n z.object({\n route_type: z.literal(\"via\"),\n x: distance,\n y: distance,\n from_layer: z.string(),\n to_layer: z.string(),\n }),\n ]),\n ),\n })\n .describe(\"Defines a trace on the PCB\")\n\nexport type PcbTraceInput = z.input<typeof pcb_trace>\ntype InferredPcbTrace = z.infer<typeof pcb_trace>\n\nexport interface PcbTraceRoutePointWire {\n route_type: \"wire\"\n x: Distance\n y: Distance\n width: Distance\n start_pcb_port_id?: string\n end_pcb_port_id?: string\n layer: LayerRef\n}\n\nexport interface PcbTraceRoutePointVia {\n route_type: \"via\"\n x: Distance\n y: Distance\n from_layer: string\n to_layer: string\n}\n\nexport type PcbTraceRoutePoint = PcbTraceRoutePointWire | PcbTraceRoutePointVia\n\n/**\n * Defines a trace on the PCB\n */\nexport interface PcbTrace {\n type: \"pcb_trace\"\n source_trace_id?: string\n pcb_component_id?: string\n pcb_trace_id: string\n /**\n * The order that this trace was routed in. This can be used to debug the\n * autorouter and to understand the trace path better\n *\n * The route_order_index should be relative to a subcircuit\n */\n route_order_index?: number\n route_thickness_mode?: \"constant\" | \"interpolated\"\n should_round_corners?: boolean\n route: Array<PcbTraceRoutePoint>\n}\n\n/**\n * @deprecated use PcbTrace\n */\nexport type PCBTrace = PcbTrace\n\n/**\n * @deprecated use PcbTraceInput\n */\nexport type PCBTraceInput = PcbTraceInput\n\nexpectTypesMatch<PcbTraceRoutePoint, InferredPcbTraceRoutePoint>(true)\nexpectTypesMatch<PcbTrace, InferredPcbTrace>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_trace_error = z\n .object({\n type: z.literal(\"pcb_trace_error\"),\n pcb_trace_error_id: getZodPrefixedIdWithDefault(\"pcb_trace_error\"),\n error_type: z.literal(\"pcb_trace_error\"),\n message: z.string(),\n center: point.optional(),\n pcb_trace_id: z.string(),\n source_trace_id: z.string(),\n pcb_component_ids: z.array(z.string()),\n pcb_port_ids: z.array(z.string()),\n })\n .describe(\"Defines a trace error on the PCB\")\n\nexport type PcbTraceErrorInput = z.input<typeof pcb_trace_error>\ntype InferredPcbTraceError = z.infer<typeof pcb_trace_error>\n\n/**\n * Defines a trace error on the PCB\n */\nexport interface PcbTraceError {\n type: \"pcb_trace_error\"\n pcb_trace_error_id: string\n error_type: \"pcb_trace_error\"\n message: string\n center?: Point\n pcb_trace_id: string\n source_trace_id: string\n pcb_component_ids: string[]\n pcb_port_ids: string[]\n}\n\n/**\n * @deprecated use PcbTraceError\n */\nexport type PCBTraceError = PcbTraceError\n\nexpectTypesMatch<PcbTraceError, InferredPcbTraceError>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_port_not_matched_error = z\n .object({\n type: z.literal(\"pcb_port_not_matched_error\"),\n pcb_error_id: getZodPrefixedIdWithDefault(\"pcb_error\"),\n message: z.string(),\n pcb_component_ids: z.array(z.string()),\n })\n .describe(\"Defines a trace error on the PCB where a port is not matched\")\n\nexport type PcbPortNotMatchedErrorInput = z.input<\n typeof pcb_port_not_matched_error\n>\ntype InferredPcbPortNotMatchedError = z.infer<typeof pcb_port_not_matched_error>\n\n/**\n * Defines a trace error on the PCB where a port is not matched\n */\nexport interface PcbPortNotMatchedError {\n type: \"pcb_port_not_matched_error\"\n pcb_error_id: string\n message: string\n pcb_component_ids: string[]\n}\n\n/**\n * @deprecated use PcbPortNotMatchedError\n */\nexport type PCBPortNotMatchedError = PcbPortNotMatchedError\n\nexpectTypesMatch<PcbPortNotMatchedError, InferredPcbPortNotMatchedError>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_via = z\n .object({\n type: z.literal(\"pcb_via\"),\n pcb_via_id: getZodPrefixedIdWithDefault(\"pcb_via\"),\n x: distance,\n y: distance,\n outer_diameter: distance.default(\"0.6mm\"),\n hole_diameter: distance.default(\"0.25mm\"),\n /** @deprecated */\n from_layer: layer_ref.optional(),\n /** @deprecated */\n to_layer: layer_ref.optional(),\n layers: z.array(layer_ref),\n pcb_trace_id: z.string().optional(),\n })\n .describe(\"Defines a via on the PCB\")\n\nexport type PcbViaInput = z.input<typeof pcb_via>\ntype InferredPcbVia = z.infer<typeof pcb_via>\n\n/**\n * Defines a via on the PCB\n */\nexport interface PcbVia {\n type: \"pcb_via\"\n pcb_via_id: string\n x: Distance\n y: Distance\n outer_diameter: Distance\n hole_diameter: Distance\n /** @deprecated */\n from_layer?: LayerRef\n /** @deprecated */\n to_layer?: LayerRef\n layers: LayerRef[]\n pcb_trace_id?: string\n}\n\n/**\n * @deprecated use PcbVia\n */\nexport type PCBVia = PcbVia\n\nexpectTypesMatch<PcbVia, InferredPcbVia>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_board = z\n .object({\n type: z.literal(\"pcb_board\"),\n pcb_board_id: getZodPrefixedIdWithDefault(\"pcb_board\"),\n width: length,\n height: length,\n center: point,\n thickness: length.optional().default(1.4),\n num_layers: z.number().optional().default(4),\n outline: z.array(point).optional(),\n })\n .describe(\"Defines the board outline of the PCB\")\n\n/**\n * Defines the board outline of the PCB\n */\nexport interface PcbBoard {\n type: \"pcb_board\"\n pcb_board_id: string\n width: Length\n height: Length\n thickness: Length\n num_layers: number\n center: Point\n outline?: Point[]\n}\n\nexport type PcbBoardInput = z.input<typeof pcb_board>\ntype InferredPcbBoard = z.infer<typeof pcb_board>\n\n/**\n * @deprecated use PcbBoard\n */\nexport type PCBBoard = PcbBoard\n\nexpectTypesMatch<PcbBoard, InferredPcbBoard>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_placement_error = z\n .object({\n type: z.literal(\"pcb_placement_error\"),\n pcb_placement_error_id: getZodPrefixedIdWithDefault(\"pcb_placement_error\"),\n message: z.string(),\n })\n .describe(\"Defines a placement error on the PCB\")\n\nexport type PcbPlacementErrorInput = z.input<typeof pcb_placement_error>\ntype InferredPcbPlacementError = z.infer<typeof pcb_placement_error>\n\n/**\n * Defines a placement error on the PCB\n */\nexport interface PcbPlacementError {\n type: \"pcb_placement_error\"\n pcb_placement_error_id: string\n message: string\n}\n\n/**\n * @deprecated use PcbPlacementError\n */\nexport type PCBPlacementError = PcbPlacementError\n\nexpectTypesMatch<PcbPlacementError, InferredPcbPlacementError>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { route_hint_point, type RouteHintPoint } from \"src/pcb\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\n/**\n * A hint that can be used during generation of a PCB trace.\n */\nexport interface PcbTraceHint {\n type: \"pcb_trace_hint\"\n pcb_trace_hint_id: string\n pcb_port_id: string\n pcb_component_id: string\n route: RouteHintPoint[]\n}\n\nexport const pcb_trace_hint = z\n .object({\n type: z.literal(\"pcb_trace_hint\"),\n pcb_trace_hint_id: getZodPrefixedIdWithDefault(\"pcb_trace_hint\"),\n pcb_port_id: z.string(),\n pcb_component_id: z.string(),\n route: z.array(route_hint_point),\n })\n .describe(\"A hint that can be used during generation of a PCB trace\")\n\nexport type PcbTraceHintInput = z.input<typeof pcb_trace_hint>\ntype InferredPcbTraceHint = z.infer<typeof pcb_trace_hint>\n\n/**\n * @deprecated use PcbTraceHint\n */\nexport type PCBTraceHint = PcbTraceHint\n\nexpectTypesMatch<PcbTraceHint, InferredPcbTraceHint>(true)\n","import { z } from \"zod\"\nimport { distance, type Distance } from \"src/units\"\nimport {\n layer_ref,\n type LayerRef,\n type VisibleLayer,\n visible_layer,\n} from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_line = z\n .object({\n type: z.literal(\"pcb_silkscreen_line\"),\n pcb_silkscreen_line_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_line\"),\n pcb_component_id: z.string(),\n stroke_width: distance.default(\"0.1mm\"),\n x1: distance,\n y1: distance,\n x2: distance,\n y2: distance,\n layer: visible_layer,\n })\n .describe(\"Defines a silkscreen line on the PCB\")\n\nexport type PcbSilkscreenLineInput = z.input<typeof pcb_silkscreen_line>\ntype InferredPcbSilkscreenLine = z.infer<typeof pcb_silkscreen_line>\n\n/**\n * Defines a silkscreen line on the PCB\n */\nexport interface PcbSilkscreenLine {\n type: \"pcb_silkscreen_line\"\n pcb_silkscreen_line_id: string\n pcb_component_id: string\n stroke_width: Distance\n x1: Distance\n y1: Distance\n x2: Distance\n y2: Distance\n layer: VisibleLayer\n}\n\n/**\n * @deprecated use PcbSilkscreenLine\n */\nexport type PCBSilkscreenLine = PcbSilkscreenLine\n\nexpectTypesMatch<PcbSilkscreenLine, InferredPcbSilkscreenLine>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n visible_layer,\n type VisibleLayerRef,\n} from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_path = z\n .object({\n type: z.literal(\"pcb_silkscreen_path\"),\n pcb_silkscreen_path_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_path\"),\n pcb_component_id: z.string(),\n layer: visible_layer,\n route: z.array(point),\n stroke_width: length,\n })\n .describe(\"Defines a silkscreen path on the PCB\")\n\nexport type PcbSilkscreenPathInput = z.input<typeof pcb_silkscreen_path>\ntype InferredPcbSilkscreenPath = z.infer<typeof pcb_silkscreen_path>\n\n/**\n * Defines a silkscreen path on the PCB\n */\nexport interface PcbSilkscreenPath {\n type: \"pcb_silkscreen_path\"\n pcb_silkscreen_path_id: string\n pcb_component_id: string\n layer: VisibleLayerRef\n route: Point[]\n stroke_width: Length\n}\n\n/**\n * @deprecated use PcbSilkscreenPath\n */\nexport type PcbSilkscreenPathDeprecated = PcbSilkscreenPath\n\nexpectTypesMatch<PcbSilkscreenPath, InferredPcbSilkscreenPath>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { distance, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_text = z\n .object({\n type: z.literal(\"pcb_silkscreen_text\"),\n pcb_silkscreen_text_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_text\"),\n font: z.literal(\"tscircuit2024\").default(\"tscircuit2024\"),\n font_size: distance.default(\"0.2mm\"),\n pcb_component_id: z.string(),\n text: z.string(),\n layer: layer_ref,\n is_mirrored: z.boolean().default(false).optional(),\n anchor_position: point.default({ x: 0, y: 0 }),\n anchor_alignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n })\n .describe(\"Defines silkscreen text on the PCB\")\n\nexport type PcbSilkscreenTextInput = z.input<typeof pcb_silkscreen_text>\ntype InferredPcbSilkscreenText = z.infer<typeof pcb_silkscreen_text>\n\n/**\n * Defines silkscreen text on the PCB\n */\nexport interface PcbSilkscreenText {\n type: \"pcb_silkscreen_text\"\n pcb_silkscreen_text_id: string\n font: \"tscircuit2024\"\n font_size: Length\n pcb_component_id: string\n text: string\n layer: LayerRef\n is_mirrored?: boolean\n anchor_position: Point\n anchor_alignment:\n | \"center\"\n | \"top_left\"\n | \"top_right\"\n | \"bottom_left\"\n | \"bottom_right\"\n}\n\n/**\n * @deprecated use PcbSilkscreenText\n */\nexport type PCBSilkscreenText = PcbSilkscreenText\n\nexpectTypesMatch<PcbSilkscreenText, InferredPcbSilkscreenText>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport { layer_ref, type LayerRef } from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_rect = z\n .object({\n type: z.literal(\"pcb_silkscreen_rect\"),\n pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_rect\"),\n pcb_component_id: z.string(),\n center: point,\n width: length,\n height: length,\n layer: layer_ref,\n })\n .describe(\"Defines a silkscreen rect on the PCB\")\n\nexport type PcbSilkscreenRectInput = z.input<typeof pcb_silkscreen_rect>\ntype InferredPcbSilkscreenRect = z.infer<typeof pcb_silkscreen_rect>\n\n/**\n * Defines a silkscreen rect on the PCB\n */\nexport interface PcbSilkscreenRect {\n type: \"pcb_silkscreen_rect\"\n pcb_silkscreen_rect_id: string\n pcb_component_id: string\n center: Point\n width: Length\n height: Length\n layer: LayerRef\n}\n\n/**\n * @deprecated use PcbSilkscreenRect\n */\nexport type PcbSilkscreenRectOld = PcbSilkscreenRect\n\nexpectTypesMatch<PcbSilkscreenRect, InferredPcbSilkscreenRect>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n visible_layer,\n type LayerRef,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_circle = z\n .object({\n type: z.literal(\"pcb_silkscreen_circle\"),\n pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(\n \"pcb_silkscreen_circle\",\n ),\n pcb_component_id: z.string(),\n center: point,\n radius: length,\n layer: visible_layer,\n })\n .describe(\"Defines a silkscreen circle on the PCB\")\n\nexport type PcbSilkscreenCircleInput = z.input<typeof pcb_silkscreen_circle>\ntype InferredPcbSilkscreenCircle = z.infer<typeof pcb_silkscreen_circle>\n\n/**\n * Defines a silkscreen circle on the PCB\n */\nexport interface PcbSilkscreenCircle {\n type: \"pcb_silkscreen_circle\"\n pcb_silkscreen_circle_id: string\n pcb_component_id: string\n center: Point\n radius: Length\n layer: VisibleLayer\n}\n\nexpectTypesMatch<PcbSilkscreenCircle, InferredPcbSilkscreenCircle>(true)\n","import { z } from \"zod\"\nimport { point, type Point, getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n type LayerRef,\n visible_layer,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { distance, type Distance } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_silkscreen_oval = z\n .object({\n type: z.literal(\"pcb_silkscreen_oval\"),\n pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault(\"pcb_silkscreen_oval\"),\n pcb_component_id: z.string(),\n center: point,\n radius_x: distance,\n radius_y: distance,\n layer: visible_layer,\n })\n .describe(\"Defines a silkscreen oval on the PCB\")\n\nexport type PcbSilkscreenOvalInput = z.input<typeof pcb_silkscreen_oval>\ntype InferredPcbSilkscreenOval = z.infer<typeof pcb_silkscreen_oval>\n\n/**\n * Defines a silkscreen oval on the PCB\n */\nexport interface PcbSilkscreenOval {\n type: \"pcb_silkscreen_oval\"\n pcb_silkscreen_oval_id: string\n pcb_component_id: string\n center: Point\n radius_x: Distance\n radius_y: Distance\n layer: VisibleLayer\n}\n\n/**\n * @deprecated use PcbSilkscreenOval\n */\nexport type PcbSilkscreenOvalDeprecated = PcbSilkscreenOval\n\nexpectTypesMatch<PcbSilkscreenOval, InferredPcbSilkscreenOval>(true)\n","import { z } from \"zod\"\nimport { point, type Point } from \"src/common\"\nimport { distance, type Length } from \"src/units\"\nimport {\n visible_layer,\n type LayerRef,\n type VisibleLayer,\n} from \"src/pcb/properties/layer_ref\"\nimport { getZodPrefixedIdWithDefault } from \"src/common/getZodPrefixedIdWithDefault\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_fabrication_note_text = z\n .object({\n type: z.literal(\"pcb_fabrication_note_text\"),\n pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(\n \"pcb_fabrication_note_text\",\n ),\n font: z.literal(\"tscircuit2024\").default(\"tscircuit2024\"),\n font_size: distance.default(\"1mm\"),\n pcb_component_id: z.string(),\n text: z.string(),\n layer: visible_layer,\n anchor_position: point.default({ x: 0, y: 0 }),\n anchor_alignment: z\n .enum([\"center\", \"top_left\", \"top_right\", \"bottom_left\", \"bottom_right\"])\n .default(\"center\"),\n color: z.string().optional(),\n })\n .describe(\n \"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators\",\n )\n\nexport type PcbFabricationNoteTextInput = z.input<\n typeof pcb_fabrication_note_text\n>\ntype InferredPcbFabricationNoteText = z.infer<typeof pcb_fabrication_note_text>\n\n/**\n * Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators\n */\nexport interface PcbFabricationNoteText {\n type: \"pcb_fabrication_note_text\"\n pcb_fabrication_note_text_id: string\n font: \"tscircuit2024\"\n font_size: Length\n pcb_component_id: string\n text: string\n layer: VisibleLayer\n anchor_position: Point\n anchor_alignment:\n | \"center\"\n | \"top_left\"\n | \"top_right\"\n | \"bottom_left\"\n | \"bottom_right\"\n color?: string\n}\n\n/**\n * @deprecated use PcbFabricationNoteText\n */\nexport type PCBFabricationNoteText = PcbFabricationNoteText\n\nexpectTypesMatch<PcbFabricationNoteText, InferredPcbFabricationNoteText>(true)\n","import { z } from \"zod\"\nimport { getZodPrefixedIdWithDefault } from \"src/common\"\nimport {\n layer_ref,\n visible_layer,\n type LayerRef,\n} from \"src/pcb/properties/layer_ref\"\nimport { point, type Point } from \"src/common\"\nimport { length, type Length } from \"src/units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport const pcb_fabrication_note_path = z\n .object({\n type: z.literal(\"pcb_fabrication_note_path\"),\n pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(\n \"pcb_fabrication_note_path\",\n ),\n pcb_component_id: z.string(),\n layer: layer_ref,\n route: z.array(point),\n stroke_width: length,\n color: z.string().optional(),\n })\n .describe(\n \"Defines a fabrication path on the PCB for fabricators or assemblers\",\n )\n\nexport type PcbFabricationNotePathInput = z.input<\n typeof pcb_fabrication_note_path\n>\ntype InferredPcbFabricationNotePath = z.infer<typeof pcb_fabrication_note_path>\n\n/**\n * Defines a fabrication path on the PCB for fabricators or assemblers\n */\nexport interface PcbFabricationNotePath {\n type: \"pcb_fabrication_note_path\"\n pcb_fabrication_note_path_id: string\n pcb_component_id: string\n layer: LayerRef\n route: Point[]\n stroke_width: Length\n color?: string\n}\n\n/**\n * @deprecated use PcbFabricationNotePath\n */\nexport type PCBFabricationNotePath = PcbFabricationNotePath\n\nexpectTypesMatch<PcbFabricationNotePath, InferredPcbFabricationNotePath>(true)\n","import { z } from \"zod\"\nimport { point } from \"../common\"\nimport { distance } from \"../units\"\n\nexport const pcb_keepout = z\n .object({\n type: z.literal(\"pcb_keepout\"),\n shape: z.literal(\"rect\"),\n center: point,\n width: distance,\n height: distance,\n pcb_keepout_id: z.string(),\n layers: z.array(z.string()), // Specify layers where the keepout applies\n description: z.string().optional(), // Optional description of the keepout\n })\n .or(\n z.object({\n type: z.literal(\"pcb_keepout\"),\n shape: z.literal(\"circle\"),\n center: point,\n radius: distance,\n pcb_keepout_id: z.string(),\n layers: z.array(z.string()), // Specify layers where the keepout applies\n description: z.string().optional(), // Optional description of the keepout\n }),\n )\n\nexport type PCBKeepoutInput = z.input<typeof pcb_keepout>\nexport type PCBKeepout = z.infer<typeof pcb_keepout>\n","import { z } from \"zod\"\nimport { point3 } from \"../common\"\nimport { rotation, length } from \"../units\"\nimport { layer_ref } from \"src/pcb\"\n\nexport const cad_component = z\n .object({\n type: z.literal(\"cad_component\"),\n cad_component_id: z.string(),\n pcb_component_id: z.string(),\n source_component_id: z.string(),\n position: point3,\n rotation: point3.optional(),\n size: point3.optional(),\n layer: layer_ref.optional(),\n\n // These are all ways to generate/load the 3d model\n footprinter_string: z.string().optional(),\n model_obj_url: z.string().optional(),\n model_stl_url: z.string().optional(),\n model_3mf_url: z.string().optional(),\n model_jscad: z.any().optional(),\n })\n .describe(\"Defines a component on the PCB\")\n\nexport type CadComponentInput = z.input<typeof cad_component>\nexport type CadComponent = z.infer<typeof cad_component>\n","import { z } from \"zod\"\nimport * as pcb from \"./pcb\"\nimport * as sch from \"./schematic\"\nimport * as src from \"./source\"\nimport * as cad from \"./cad\"\n\nexport const any_circuit_element = z.union([\n // TODO source_group\n // TODO source_config\n // TODO pcb_group\n // TODO pcb_config\n // TODO schematic_config\n // TODO schematic_group\n src.source_trace,\n src.source_port,\n src.any_source_component,\n src.source_led,\n src.source_net,\n src.source_group,\n src.source_simple_bug,\n src.source_simple_chip,\n src.source_simple_capacitor,\n src.source_simple_diode,\n src.source_simple_resistor,\n src.source_simple_power_source,\n src.source_simple_battery,\n pcb.pcb_component,\n pcb.pcb_hole,\n pcb.pcb_plated_hole,\n pcb.pcb_keepout,\n pcb.pcb_port,\n pcb.pcb_text,\n pcb.pcb_trace,\n pcb.pcb_via,\n pcb.pcb_smtpad,\n pcb.pcb_solder_paste,\n pcb.pcb_board,\n pcb.pcb_trace_hint,\n pcb.pcb_silkscreen_line,\n pcb.pcb_silkscreen_path,\n pcb.pcb_silkscreen_text,\n pcb.pcb_silkscreen_rect,\n pcb.pcb_silkscreen_circle,\n pcb.pcb_silkscreen_oval,\n pcb.pcb_trace_error,\n pcb.pcb_placement_error,\n pcb.pcb_port_not_matched_error,\n pcb.pcb_fabrication_note_path,\n pcb.pcb_fabrication_note_text,\n sch.schematic_box,\n sch.schematic_text,\n sch.schematic_line,\n sch.schematic_component,\n sch.schematic_port,\n sch.schematic_trace,\n sch.schematic_path,\n sch.schematic_error,\n sch.schematic_net_label,\n sch.schematic_debug_object,\n cad.cad_component,\n])\n\n/**\n * @deprecated use any_circuit_element instead\n */\nexport const any_soup_element = any_circuit_element\n\nexport type AnyCircuitElement = z.infer<typeof any_circuit_element>\nexport type AnyCircuitElementInput = z.input<typeof any_circuit_element>\n/**\n * @deprecated use AnyCircuitElement instead\n */\nexport type AnySoupElement = AnyCircuitElement\n\n/**\n * @deprecated use AnyCircuitElementInput instead\n */\nexport type AnySoupElementInput = AnyCircuitElementInput\n"],"mappings":";AAKA,IAAM,eAGF;AAAA,EACF,IAAI;AAAA,IACF,UAAU;AAAA,IACV,UAAU;AAAA,MACR,KAAK;AAAA,MACL,KAAK;AAAA,MACL,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,GAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,IAAI;AAAA,MACJ,GAAG;AAAA,IACL;AAAA,EACF;AAAA,EACA,QAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,SAAI;AAAA,MACJ,QAAG;AAAA,MACH,SAAI;AAAA,MACJ,SAAI;AAAA,MACJ,SAAI;AAAA,MACJ,SAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,GAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,IAAI;AAAA,MACJ,GAAG;AAAA,MACH,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EACF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EAC3B,kBAAkBA,IAAE,OAAO;AAAA,EAC3B,qBAAqBA,IAAE,OAAO;AAAA,EAC9B,UAAU;AAAA,EACV,UAAU,OAAO,SAAS;AAAA,EAC1B,MAAM,OAAO,SAAS;AAAA,EACtB,OAAO,UAAU,SAAS;AAAA;AAAA,EAG1B,oBAAoBA,IAAE,OAAO,EAAE,SAAS;AAAA,EACxC,eAAeA,IAAE,OAAO,EAAE,SAAS;AAAA,EACnC,eAAeA,IAAE,OAAO,EAAE,SAAS;AAAA,EACnC,eAAeA,IAAE,OAAO,EAAE,SAAS;AAAA,EACnC,aAAaA,IAAE,IAAI,EAAE,SAAS;AAChC,CAAC,EACA,SAAS,gCAAgC;;;ACvB5C,SAAS,KAAAC,WAAS;AAMX,IAAM,sBAAsBC,IAAE,MAAM;AAAA,EAOrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACN,CAAC;AAKM,IAAM,mBAAmB;","names":["z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z"]}
|