circuit-json 0.0.94 → 0.0.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +238 -2
- package/dist/index.mjs +85 -36
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -888,6 +888,234 @@ declare const schematic_pin_styles: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
888
888
|
top_margin?: string | number | undefined;
|
|
889
889
|
bottom_margin?: string | number | undefined;
|
|
890
890
|
}>>;
|
|
891
|
+
interface SchematicPortArrangementBySize {
|
|
892
|
+
left_size: number;
|
|
893
|
+
right_size: number;
|
|
894
|
+
top_size?: number;
|
|
895
|
+
bottom_size?: number;
|
|
896
|
+
}
|
|
897
|
+
interface SchematicPortArrangementBySides {
|
|
898
|
+
left_side?: {
|
|
899
|
+
pins: number[];
|
|
900
|
+
direction?: "top-to-bottom" | "bottom-to-top";
|
|
901
|
+
};
|
|
902
|
+
right_side?: {
|
|
903
|
+
pins: number[];
|
|
904
|
+
direction?: "top-to-bottom" | "bottom-to-top";
|
|
905
|
+
};
|
|
906
|
+
top_side?: {
|
|
907
|
+
pins: number[];
|
|
908
|
+
direction?: "left-to-right" | "right-to-left";
|
|
909
|
+
};
|
|
910
|
+
bottom_side?: {
|
|
911
|
+
pins: number[];
|
|
912
|
+
direction?: "left-to-right" | "right-to-left";
|
|
913
|
+
};
|
|
914
|
+
}
|
|
915
|
+
type SchematicPortArrangement = SchematicPortArrangementBySize | SchematicPortArrangementBySides;
|
|
916
|
+
interface SchematicComponent {
|
|
917
|
+
type: "schematic_component";
|
|
918
|
+
rotation: number;
|
|
919
|
+
size: Size;
|
|
920
|
+
center: Point;
|
|
921
|
+
source_component_id: string;
|
|
922
|
+
schematic_component_id: string;
|
|
923
|
+
pin_spacing?: number;
|
|
924
|
+
pin_styles?: Record<string, {
|
|
925
|
+
left_margin?: number;
|
|
926
|
+
right_margin?: number;
|
|
927
|
+
top_margin?: number;
|
|
928
|
+
bottom_margin?: number;
|
|
929
|
+
}>;
|
|
930
|
+
box_width?: number;
|
|
931
|
+
symbol_name?: string;
|
|
932
|
+
port_arrangement?: SchematicPortArrangement;
|
|
933
|
+
port_labels?: Record<string, string>;
|
|
934
|
+
symbol_display_value?: string;
|
|
935
|
+
}
|
|
936
|
+
declare const schematic_component_port_arrangement_by_size: z.ZodObject<{
|
|
937
|
+
left_size: z.ZodNumber;
|
|
938
|
+
right_size: z.ZodNumber;
|
|
939
|
+
top_size: z.ZodOptional<z.ZodNumber>;
|
|
940
|
+
bottom_size: z.ZodOptional<z.ZodNumber>;
|
|
941
|
+
}, "strip", z.ZodTypeAny, {
|
|
942
|
+
left_size: number;
|
|
943
|
+
right_size: number;
|
|
944
|
+
top_size?: number | undefined;
|
|
945
|
+
bottom_size?: number | undefined;
|
|
946
|
+
}, {
|
|
947
|
+
left_size: number;
|
|
948
|
+
right_size: number;
|
|
949
|
+
top_size?: number | undefined;
|
|
950
|
+
bottom_size?: number | undefined;
|
|
951
|
+
}>;
|
|
952
|
+
declare const schematic_component_port_arrangement_by_sides: z.ZodObject<{
|
|
953
|
+
left_side: z.ZodOptional<z.ZodObject<{
|
|
954
|
+
pins: z.ZodArray<z.ZodNumber, "many">;
|
|
955
|
+
direction: z.ZodOptional<z.ZodEnum<["top-to-bottom", "bottom-to-top"]>>;
|
|
956
|
+
}, "strip", z.ZodTypeAny, {
|
|
957
|
+
pins: number[];
|
|
958
|
+
direction?: "top-to-bottom" | "bottom-to-top" | undefined;
|
|
959
|
+
}, {
|
|
960
|
+
pins: number[];
|
|
961
|
+
direction?: "top-to-bottom" | "bottom-to-top" | undefined;
|
|
962
|
+
}>>;
|
|
963
|
+
right_side: z.ZodOptional<z.ZodObject<{
|
|
964
|
+
pins: z.ZodArray<z.ZodNumber, "many">;
|
|
965
|
+
direction: z.ZodOptional<z.ZodEnum<["top-to-bottom", "bottom-to-top"]>>;
|
|
966
|
+
}, "strip", z.ZodTypeAny, {
|
|
967
|
+
pins: number[];
|
|
968
|
+
direction?: "top-to-bottom" | "bottom-to-top" | undefined;
|
|
969
|
+
}, {
|
|
970
|
+
pins: number[];
|
|
971
|
+
direction?: "top-to-bottom" | "bottom-to-top" | undefined;
|
|
972
|
+
}>>;
|
|
973
|
+
top_side: z.ZodOptional<z.ZodObject<{
|
|
974
|
+
pins: z.ZodArray<z.ZodNumber, "many">;
|
|
975
|
+
direction: z.ZodOptional<z.ZodEnum<["left-to-right", "right-to-left"]>>;
|
|
976
|
+
}, "strip", z.ZodTypeAny, {
|
|
977
|
+
pins: number[];
|
|
978
|
+
direction?: "left-to-right" | "right-to-left" | undefined;
|
|
979
|
+
}, {
|
|
980
|
+
pins: number[];
|
|
981
|
+
direction?: "left-to-right" | "right-to-left" | undefined;
|
|
982
|
+
}>>;
|
|
983
|
+
bottom_side: z.ZodOptional<z.ZodObject<{
|
|
984
|
+
pins: z.ZodArray<z.ZodNumber, "many">;
|
|
985
|
+
direction: z.ZodOptional<z.ZodEnum<["left-to-right", "right-to-left"]>>;
|
|
986
|
+
}, "strip", z.ZodTypeAny, {
|
|
987
|
+
pins: number[];
|
|
988
|
+
direction?: "left-to-right" | "right-to-left" | undefined;
|
|
989
|
+
}, {
|
|
990
|
+
pins: number[];
|
|
991
|
+
direction?: "left-to-right" | "right-to-left" | undefined;
|
|
992
|
+
}>>;
|
|
993
|
+
}, "strip", z.ZodTypeAny, {
|
|
994
|
+
left_side?: {
|
|
995
|
+
pins: number[];
|
|
996
|
+
direction?: "top-to-bottom" | "bottom-to-top" | undefined;
|
|
997
|
+
} | undefined;
|
|
998
|
+
right_side?: {
|
|
999
|
+
pins: number[];
|
|
1000
|
+
direction?: "top-to-bottom" | "bottom-to-top" | undefined;
|
|
1001
|
+
} | undefined;
|
|
1002
|
+
top_side?: {
|
|
1003
|
+
pins: number[];
|
|
1004
|
+
direction?: "left-to-right" | "right-to-left" | undefined;
|
|
1005
|
+
} | undefined;
|
|
1006
|
+
bottom_side?: {
|
|
1007
|
+
pins: number[];
|
|
1008
|
+
direction?: "left-to-right" | "right-to-left" | undefined;
|
|
1009
|
+
} | undefined;
|
|
1010
|
+
}, {
|
|
1011
|
+
left_side?: {
|
|
1012
|
+
pins: number[];
|
|
1013
|
+
direction?: "top-to-bottom" | "bottom-to-top" | undefined;
|
|
1014
|
+
} | undefined;
|
|
1015
|
+
right_side?: {
|
|
1016
|
+
pins: number[];
|
|
1017
|
+
direction?: "top-to-bottom" | "bottom-to-top" | undefined;
|
|
1018
|
+
} | undefined;
|
|
1019
|
+
top_side?: {
|
|
1020
|
+
pins: number[];
|
|
1021
|
+
direction?: "left-to-right" | "right-to-left" | undefined;
|
|
1022
|
+
} | undefined;
|
|
1023
|
+
bottom_side?: {
|
|
1024
|
+
pins: number[];
|
|
1025
|
+
direction?: "left-to-right" | "right-to-left" | undefined;
|
|
1026
|
+
} | undefined;
|
|
1027
|
+
}>;
|
|
1028
|
+
declare const port_arrangement: z.ZodUnion<[z.ZodObject<{
|
|
1029
|
+
left_size: z.ZodNumber;
|
|
1030
|
+
right_size: z.ZodNumber;
|
|
1031
|
+
top_size: z.ZodOptional<z.ZodNumber>;
|
|
1032
|
+
bottom_size: z.ZodOptional<z.ZodNumber>;
|
|
1033
|
+
}, "strip", z.ZodTypeAny, {
|
|
1034
|
+
left_size: number;
|
|
1035
|
+
right_size: number;
|
|
1036
|
+
top_size?: number | undefined;
|
|
1037
|
+
bottom_size?: number | undefined;
|
|
1038
|
+
}, {
|
|
1039
|
+
left_size: number;
|
|
1040
|
+
right_size: number;
|
|
1041
|
+
top_size?: number | undefined;
|
|
1042
|
+
bottom_size?: number | undefined;
|
|
1043
|
+
}>, z.ZodObject<{
|
|
1044
|
+
left_side: z.ZodOptional<z.ZodObject<{
|
|
1045
|
+
pins: z.ZodArray<z.ZodNumber, "many">;
|
|
1046
|
+
direction: z.ZodOptional<z.ZodEnum<["top-to-bottom", "bottom-to-top"]>>;
|
|
1047
|
+
}, "strip", z.ZodTypeAny, {
|
|
1048
|
+
pins: number[];
|
|
1049
|
+
direction?: "top-to-bottom" | "bottom-to-top" | undefined;
|
|
1050
|
+
}, {
|
|
1051
|
+
pins: number[];
|
|
1052
|
+
direction?: "top-to-bottom" | "bottom-to-top" | undefined;
|
|
1053
|
+
}>>;
|
|
1054
|
+
right_side: z.ZodOptional<z.ZodObject<{
|
|
1055
|
+
pins: z.ZodArray<z.ZodNumber, "many">;
|
|
1056
|
+
direction: z.ZodOptional<z.ZodEnum<["top-to-bottom", "bottom-to-top"]>>;
|
|
1057
|
+
}, "strip", z.ZodTypeAny, {
|
|
1058
|
+
pins: number[];
|
|
1059
|
+
direction?: "top-to-bottom" | "bottom-to-top" | undefined;
|
|
1060
|
+
}, {
|
|
1061
|
+
pins: number[];
|
|
1062
|
+
direction?: "top-to-bottom" | "bottom-to-top" | undefined;
|
|
1063
|
+
}>>;
|
|
1064
|
+
top_side: z.ZodOptional<z.ZodObject<{
|
|
1065
|
+
pins: z.ZodArray<z.ZodNumber, "many">;
|
|
1066
|
+
direction: z.ZodOptional<z.ZodEnum<["left-to-right", "right-to-left"]>>;
|
|
1067
|
+
}, "strip", z.ZodTypeAny, {
|
|
1068
|
+
pins: number[];
|
|
1069
|
+
direction?: "left-to-right" | "right-to-left" | undefined;
|
|
1070
|
+
}, {
|
|
1071
|
+
pins: number[];
|
|
1072
|
+
direction?: "left-to-right" | "right-to-left" | undefined;
|
|
1073
|
+
}>>;
|
|
1074
|
+
bottom_side: z.ZodOptional<z.ZodObject<{
|
|
1075
|
+
pins: z.ZodArray<z.ZodNumber, "many">;
|
|
1076
|
+
direction: z.ZodOptional<z.ZodEnum<["left-to-right", "right-to-left"]>>;
|
|
1077
|
+
}, "strip", z.ZodTypeAny, {
|
|
1078
|
+
pins: number[];
|
|
1079
|
+
direction?: "left-to-right" | "right-to-left" | undefined;
|
|
1080
|
+
}, {
|
|
1081
|
+
pins: number[];
|
|
1082
|
+
direction?: "left-to-right" | "right-to-left" | undefined;
|
|
1083
|
+
}>>;
|
|
1084
|
+
}, "strip", z.ZodTypeAny, {
|
|
1085
|
+
left_side?: {
|
|
1086
|
+
pins: number[];
|
|
1087
|
+
direction?: "top-to-bottom" | "bottom-to-top" | undefined;
|
|
1088
|
+
} | undefined;
|
|
1089
|
+
right_side?: {
|
|
1090
|
+
pins: number[];
|
|
1091
|
+
direction?: "top-to-bottom" | "bottom-to-top" | undefined;
|
|
1092
|
+
} | undefined;
|
|
1093
|
+
top_side?: {
|
|
1094
|
+
pins: number[];
|
|
1095
|
+
direction?: "left-to-right" | "right-to-left" | undefined;
|
|
1096
|
+
} | undefined;
|
|
1097
|
+
bottom_side?: {
|
|
1098
|
+
pins: number[];
|
|
1099
|
+
direction?: "left-to-right" | "right-to-left" | undefined;
|
|
1100
|
+
} | undefined;
|
|
1101
|
+
}, {
|
|
1102
|
+
left_side?: {
|
|
1103
|
+
pins: number[];
|
|
1104
|
+
direction?: "top-to-bottom" | "bottom-to-top" | undefined;
|
|
1105
|
+
} | undefined;
|
|
1106
|
+
right_side?: {
|
|
1107
|
+
pins: number[];
|
|
1108
|
+
direction?: "top-to-bottom" | "bottom-to-top" | undefined;
|
|
1109
|
+
} | undefined;
|
|
1110
|
+
top_side?: {
|
|
1111
|
+
pins: number[];
|
|
1112
|
+
direction?: "left-to-right" | "right-to-left" | undefined;
|
|
1113
|
+
} | undefined;
|
|
1114
|
+
bottom_side?: {
|
|
1115
|
+
pins: number[];
|
|
1116
|
+
direction?: "left-to-right" | "right-to-left" | undefined;
|
|
1117
|
+
} | undefined;
|
|
1118
|
+
}>]>;
|
|
891
1119
|
declare const schematic_component: z.ZodObject<{
|
|
892
1120
|
type: z.ZodLiteral<"schematic_component">;
|
|
893
1121
|
rotation: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -1024,6 +1252,7 @@ declare const schematic_component: z.ZodObject<{
|
|
|
1024
1252
|
} | undefined;
|
|
1025
1253
|
}>]>>;
|
|
1026
1254
|
port_labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1255
|
+
symbol_display_value: z.ZodOptional<z.ZodString>;
|
|
1027
1256
|
}, "strip", z.ZodTypeAny, {
|
|
1028
1257
|
type: "schematic_component";
|
|
1029
1258
|
source_component_id: string;
|
|
@@ -1070,6 +1299,7 @@ declare const schematic_component: z.ZodObject<{
|
|
|
1070
1299
|
} | undefined;
|
|
1071
1300
|
} | undefined;
|
|
1072
1301
|
port_labels?: Record<string, string> | undefined;
|
|
1302
|
+
symbol_display_value?: string | undefined;
|
|
1073
1303
|
}, {
|
|
1074
1304
|
type: "schematic_component";
|
|
1075
1305
|
source_component_id: string;
|
|
@@ -1116,9 +1346,9 @@ declare const schematic_component: z.ZodObject<{
|
|
|
1116
1346
|
} | undefined;
|
|
1117
1347
|
} | undefined;
|
|
1118
1348
|
port_labels?: Record<string, string> | undefined;
|
|
1349
|
+
symbol_display_value?: string | undefined;
|
|
1119
1350
|
}>;
|
|
1120
1351
|
type SchematicComponentInput = z.input<typeof schematic_component>;
|
|
1121
|
-
type SchematicComponent = z.infer<typeof schematic_component>;
|
|
1122
1352
|
|
|
1123
1353
|
declare const schematic_line: z.ZodObject<{
|
|
1124
1354
|
type: z.ZodLiteral<"schematic_line">;
|
|
@@ -5926,6 +6156,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
5926
6156
|
} | undefined;
|
|
5927
6157
|
}>]>>;
|
|
5928
6158
|
port_labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
6159
|
+
symbol_display_value: z.ZodOptional<z.ZodString>;
|
|
5929
6160
|
}, "strip", z.ZodTypeAny, {
|
|
5930
6161
|
type: "schematic_component";
|
|
5931
6162
|
source_component_id: string;
|
|
@@ -5972,6 +6203,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
5972
6203
|
} | undefined;
|
|
5973
6204
|
} | undefined;
|
|
5974
6205
|
port_labels?: Record<string, string> | undefined;
|
|
6206
|
+
symbol_display_value?: string | undefined;
|
|
5975
6207
|
}, {
|
|
5976
6208
|
type: "schematic_component";
|
|
5977
6209
|
source_component_id: string;
|
|
@@ -6018,6 +6250,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
6018
6250
|
} | undefined;
|
|
6019
6251
|
} | undefined;
|
|
6020
6252
|
port_labels?: Record<string, string> | undefined;
|
|
6253
|
+
symbol_display_value?: string | undefined;
|
|
6021
6254
|
}>, z.ZodObject<{
|
|
6022
6255
|
type: z.ZodLiteral<"schematic_port">;
|
|
6023
6256
|
schematic_port_id: z.ZodString;
|
|
@@ -8517,6 +8750,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8517
8750
|
} | undefined;
|
|
8518
8751
|
}>]>>;
|
|
8519
8752
|
port_labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
8753
|
+
symbol_display_value: z.ZodOptional<z.ZodString>;
|
|
8520
8754
|
}, "strip", z.ZodTypeAny, {
|
|
8521
8755
|
type: "schematic_component";
|
|
8522
8756
|
source_component_id: string;
|
|
@@ -8563,6 +8797,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8563
8797
|
} | undefined;
|
|
8564
8798
|
} | undefined;
|
|
8565
8799
|
port_labels?: Record<string, string> | undefined;
|
|
8800
|
+
symbol_display_value?: string | undefined;
|
|
8566
8801
|
}, {
|
|
8567
8802
|
type: "schematic_component";
|
|
8568
8803
|
source_component_id: string;
|
|
@@ -8609,6 +8844,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8609
8844
|
} | undefined;
|
|
8610
8845
|
} | undefined;
|
|
8611
8846
|
port_labels?: Record<string, string> | undefined;
|
|
8847
|
+
symbol_display_value?: string | undefined;
|
|
8612
8848
|
}>, z.ZodObject<{
|
|
8613
8849
|
type: z.ZodLiteral<"schematic_port">;
|
|
8614
8850
|
schematic_port_id: z.ZodString;
|
|
@@ -9076,4 +9312,4 @@ type AnySoupElement = AnyCircuitElement;
|
|
|
9076
9312
|
*/
|
|
9077
9313
|
type AnySoupElementInput = AnyCircuitElementInput;
|
|
9078
9314
|
|
|
9079
|
-
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 };
|
|
9315
|
+
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 SchematicPortArrangement, type SchematicPortArrangementBySides, type SchematicPortArrangementBySize, 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, port_arrangement, position, position3, resistance, rotation, route_hint_point, schematic_box, schematic_component, schematic_component_port_arrangement_by_sides, schematic_component_port_arrangement_by_size, 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
|
@@ -101,6 +101,13 @@ var unitMappings = {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
|
+
var unitMappingAndVariantSuffixes = /* @__PURE__ */ new Set();
|
|
105
|
+
for (const [baseUnit, info] of Object.entries(unitMappings)) {
|
|
106
|
+
unitMappingAndVariantSuffixes.add(baseUnit);
|
|
107
|
+
for (const variant of Object.keys(info.variants)) {
|
|
108
|
+
unitMappingAndVariantSuffixes.add(variant);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
104
111
|
function getBaseTscircuitUnit(unit) {
|
|
105
112
|
for (const [baseUnit, info] of Object.entries(unitMappings)) {
|
|
106
113
|
if (unit in info.variants) {
|
|
@@ -115,6 +122,29 @@ function getBaseTscircuitUnit(unit) {
|
|
|
115
122
|
conversionFactor: 1
|
|
116
123
|
};
|
|
117
124
|
}
|
|
125
|
+
var si_prefix_multiplier = {
|
|
126
|
+
tera: 1e12,
|
|
127
|
+
T: 1e12,
|
|
128
|
+
giga: 1e9,
|
|
129
|
+
G: 1e9,
|
|
130
|
+
mega: 1e6,
|
|
131
|
+
M: 1e6,
|
|
132
|
+
kilo: 1e3,
|
|
133
|
+
k: 1e3,
|
|
134
|
+
deci: 0.1,
|
|
135
|
+
d: 0.1,
|
|
136
|
+
centi: 0.01,
|
|
137
|
+
c: 0.01,
|
|
138
|
+
milli: 1e-3,
|
|
139
|
+
m: 1e-3,
|
|
140
|
+
micro: 1e-6,
|
|
141
|
+
u: 1e-6,
|
|
142
|
+
\u00B5: 1e-6,
|
|
143
|
+
nano: 1e-9,
|
|
144
|
+
n: 1e-9,
|
|
145
|
+
pico: 1e-12,
|
|
146
|
+
p: 1e-12
|
|
147
|
+
};
|
|
118
148
|
var parseAndConvertSiUnit = (v) => {
|
|
119
149
|
if (typeof v === "undefined")
|
|
120
150
|
return { parsedUnit: null, unitOfValue: null, value: null };
|
|
@@ -137,17 +167,26 @@ var parseAndConvertSiUnit = (v) => {
|
|
|
137
167
|
}
|
|
138
168
|
};
|
|
139
169
|
}
|
|
140
|
-
const
|
|
170
|
+
const reversed_input_string = v.toString().split("").reverse().join("");
|
|
171
|
+
const unit_reversed = reversed_input_string.match(/[^\d\s]+/)?.[0];
|
|
141
172
|
if (!unit_reversed) {
|
|
142
173
|
throw new Error(`Could not determine unit: "${v}"`);
|
|
143
174
|
}
|
|
144
175
|
const unit = unit_reversed.split("").reverse().join("");
|
|
145
|
-
const
|
|
176
|
+
const numberPart = v.slice(0, -unit.length);
|
|
177
|
+
if (unit in si_prefix_multiplier && !unitMappingAndVariantSuffixes.has(unit)) {
|
|
178
|
+
const siMultiplier = si_prefix_multiplier[unit];
|
|
179
|
+
return {
|
|
180
|
+
parsedUnit: null,
|
|
181
|
+
unitOfValue: null,
|
|
182
|
+
value: Number.parseFloat(numberPart) * siMultiplier
|
|
183
|
+
};
|
|
184
|
+
}
|
|
146
185
|
const { baseUnit, conversionFactor } = getBaseTscircuitUnit(unit);
|
|
147
186
|
return {
|
|
148
187
|
parsedUnit: unit,
|
|
149
188
|
unitOfValue: baseUnit,
|
|
150
|
-
value: conversionFactor * Number.parseFloat(
|
|
189
|
+
value: conversionFactor * Number.parseFloat(numberPart)
|
|
151
190
|
};
|
|
152
191
|
};
|
|
153
192
|
|
|
@@ -386,6 +425,12 @@ var schematic_path = z24.object({
|
|
|
386
425
|
|
|
387
426
|
// src/schematic/schematic_component.ts
|
|
388
427
|
import { z as z25 } from "zod";
|
|
428
|
+
|
|
429
|
+
// src/utils/expect-types-match.ts
|
|
430
|
+
var expectTypesMatch = (shouldBe) => {
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
// src/schematic/schematic_component.ts
|
|
389
434
|
var schematic_pin_styles = z25.record(
|
|
390
435
|
z25.object({
|
|
391
436
|
left_margin: length.optional(),
|
|
@@ -394,6 +439,36 @@ var schematic_pin_styles = z25.record(
|
|
|
394
439
|
bottom_margin: length.optional()
|
|
395
440
|
})
|
|
396
441
|
);
|
|
442
|
+
var schematic_component_port_arrangement_by_size = z25.object({
|
|
443
|
+
left_size: z25.number(),
|
|
444
|
+
right_size: z25.number(),
|
|
445
|
+
top_size: z25.number().optional(),
|
|
446
|
+
bottom_size: z25.number().optional()
|
|
447
|
+
});
|
|
448
|
+
expectTypesMatch(true);
|
|
449
|
+
var schematic_component_port_arrangement_by_sides = z25.object({
|
|
450
|
+
left_side: z25.object({
|
|
451
|
+
pins: z25.array(z25.number()),
|
|
452
|
+
direction: z25.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
453
|
+
}).optional(),
|
|
454
|
+
right_side: z25.object({
|
|
455
|
+
pins: z25.array(z25.number()),
|
|
456
|
+
direction: z25.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
457
|
+
}).optional(),
|
|
458
|
+
top_side: z25.object({
|
|
459
|
+
pins: z25.array(z25.number()),
|
|
460
|
+
direction: z25.enum(["left-to-right", "right-to-left"]).optional()
|
|
461
|
+
}).optional(),
|
|
462
|
+
bottom_side: z25.object({
|
|
463
|
+
pins: z25.array(z25.number()),
|
|
464
|
+
direction: z25.enum(["left-to-right", "right-to-left"]).optional()
|
|
465
|
+
}).optional()
|
|
466
|
+
});
|
|
467
|
+
expectTypesMatch(true);
|
|
468
|
+
var port_arrangement = z25.union([
|
|
469
|
+
schematic_component_port_arrangement_by_size,
|
|
470
|
+
schematic_component_port_arrangement_by_sides
|
|
471
|
+
]);
|
|
397
472
|
var schematic_component = z25.object({
|
|
398
473
|
type: z25.literal("schematic_component"),
|
|
399
474
|
rotation: rotation.default(0),
|
|
@@ -405,34 +480,11 @@ var schematic_component = z25.object({
|
|
|
405
480
|
pin_styles: schematic_pin_styles.optional(),
|
|
406
481
|
box_width: length.optional(),
|
|
407
482
|
symbol_name: z25.string().optional(),
|
|
408
|
-
port_arrangement:
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
right_size: z25.number(),
|
|
412
|
-
top_size: z25.number().optional(),
|
|
413
|
-
bottom_size: z25.number().optional()
|
|
414
|
-
}),
|
|
415
|
-
z25.object({
|
|
416
|
-
left_side: z25.object({
|
|
417
|
-
pins: z25.array(z25.number()),
|
|
418
|
-
direction: z25.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
419
|
-
}).optional(),
|
|
420
|
-
right_side: z25.object({
|
|
421
|
-
pins: z25.array(z25.number()),
|
|
422
|
-
direction: z25.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
423
|
-
}).optional(),
|
|
424
|
-
top_side: z25.object({
|
|
425
|
-
pins: z25.array(z25.number()),
|
|
426
|
-
direction: z25.enum(["left-to-right", "right-to-left"]).optional()
|
|
427
|
-
}).optional(),
|
|
428
|
-
bottom_side: z25.object({
|
|
429
|
-
pins: z25.array(z25.number()),
|
|
430
|
-
direction: z25.enum(["left-to-right", "right-to-left"]).optional()
|
|
431
|
-
}).optional()
|
|
432
|
-
})
|
|
433
|
-
]).optional(),
|
|
434
|
-
port_labels: z25.record(z25.string()).optional()
|
|
483
|
+
port_arrangement: port_arrangement.optional(),
|
|
484
|
+
port_labels: z25.record(z25.string()).optional(),
|
|
485
|
+
symbol_display_value: z25.string().optional()
|
|
435
486
|
});
|
|
487
|
+
expectTypesMatch(true);
|
|
436
488
|
|
|
437
489
|
// src/schematic/schematic_line.ts
|
|
438
490
|
import { z as z26 } from "zod";
|
|
@@ -485,12 +537,6 @@ var schematic_text = z28.object({
|
|
|
485
537
|
|
|
486
538
|
// src/schematic/schematic_port.ts
|
|
487
539
|
import { z as z29 } from "zod";
|
|
488
|
-
|
|
489
|
-
// src/utils/expect-types-match.ts
|
|
490
|
-
var expectTypesMatch = (shouldBe) => {
|
|
491
|
-
};
|
|
492
|
-
|
|
493
|
-
// src/schematic/schematic_port.ts
|
|
494
540
|
var schematic_port = z29.object({
|
|
495
541
|
type: z29.literal("schematic_port"),
|
|
496
542
|
schematic_port_id: z29.string(),
|
|
@@ -1163,6 +1209,7 @@ export {
|
|
|
1163
1209
|
pcb_via,
|
|
1164
1210
|
point,
|
|
1165
1211
|
point3,
|
|
1212
|
+
port_arrangement,
|
|
1166
1213
|
position,
|
|
1167
1214
|
position3,
|
|
1168
1215
|
resistance,
|
|
@@ -1170,6 +1217,8 @@ export {
|
|
|
1170
1217
|
route_hint_point,
|
|
1171
1218
|
schematic_box,
|
|
1172
1219
|
schematic_component,
|
|
1220
|
+
schematic_component_port_arrangement_by_sides,
|
|
1221
|
+
schematic_component_port_arrangement_by_size,
|
|
1173
1222
|
schematic_debug_line,
|
|
1174
1223
|
schematic_debug_object,
|
|
1175
1224
|
schematic_debug_object_base,
|
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/utils/expect-types-match.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/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 uF: 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(/[^\\d\\s]+/)?.[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 { point, type Point } from \"../common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicPort {\n type: \"schematic_port\"\n schematic_port_id: string\n source_port_id: string\n schematic_component_id?: string\n center: Point\n facing_direction?: \"up\" | \"down\" | \"left\" | \"right\"\n distance_from_component_edge?: number\n side_of_component?: \"top\" | \"bottom\" | \"left\" | \"right\"\n true_ccw_index?: number\n pin_number?: number\n display_pin_label?: string\n}\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 display_pin_label: z.string().optional(),\n })\n .describe(\"Defines a port on a schematic component\")\n\nexport type SchematicPortInput = z.input<typeof schematic_port>\ntype InferredSchematicPort = z.infer<typeof schematic_port>\n\nexpectTypesMatch<SchematicPort, InferredSchematicPort>(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 { 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 { 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;AA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A,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/utils/expect-types-match.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/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 uF: 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\nconst unitMappingAndVariantSuffixes = new Set()\nfor (const [baseUnit, info] of Object.entries(unitMappings)) {\n unitMappingAndVariantSuffixes.add(baseUnit)\n for (const variant of Object.keys(info.variants)) {\n unitMappingAndVariantSuffixes.add(variant)\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 reversed_input_string = v.toString().split(\"\").reverse().join(\"\")\n const unit_reversed = reversed_input_string.match(/[^\\d\\s]+/)?.[0]\n if (!unit_reversed) {\n throw new Error(`Could not determine unit: \"${v}\"`)\n }\n const unit = unit_reversed.split(\"\").reverse().join(\"\")\n\n const numberPart = v.slice(0, -unit.length)\n if (\n unit in si_prefix_multiplier &&\n !unitMappingAndVariantSuffixes.has(unit)\n ) {\n const siMultiplier =\n si_prefix_multiplier[unit as keyof typeof si_prefix_multiplier]\n return {\n parsedUnit: null,\n unitOfValue: null,\n value: (Number.parseFloat(numberPart) * siMultiplier) as any,\n }\n }\n\n const { baseUnit, conversionFactor } = getBaseTscircuitUnit(unit)\n\n return {\n parsedUnit: unit,\n unitOfValue: baseUnit,\n value: (conversionFactor * Number.parseFloat(numberPart)) 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, type Point } from \"../common/point\"\nimport { size, type Size } from \"../common/size\"\nimport { length, rotation } from \"../units\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\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 interface SchematicPortArrangementBySize {\n left_size: number\n right_size: number\n top_size?: number\n bottom_size?: number\n}\n\nexport interface SchematicPortArrangementBySides {\n left_side?: { pins: number[]; direction?: \"top-to-bottom\" | \"bottom-to-top\" }\n right_side?: { pins: number[]; direction?: \"top-to-bottom\" | \"bottom-to-top\" }\n top_side?: { pins: number[]; direction?: \"left-to-right\" | \"right-to-left\" }\n bottom_side?: {\n pins: number[]\n direction?: \"left-to-right\" | \"right-to-left\"\n }\n}\n\nexport type SchematicPortArrangement =\n | SchematicPortArrangementBySize\n | SchematicPortArrangementBySides\n\nexport interface SchematicComponent {\n type: \"schematic_component\"\n rotation: number\n size: Size\n center: Point\n source_component_id: string\n schematic_component_id: string\n pin_spacing?: number\n pin_styles?: Record<\n string,\n {\n left_margin?: number\n right_margin?: number\n top_margin?: number\n bottom_margin?: number\n }\n >\n box_width?: number\n symbol_name?: string\n port_arrangement?: SchematicPortArrangement\n port_labels?: Record<string, string>\n symbol_display_value?: string\n}\n\nexport const schematic_component_port_arrangement_by_size = 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\nexpectTypesMatch<\n SchematicPortArrangementBySize,\n z.infer<typeof schematic_component_port_arrangement_by_size>\n>(true)\n\nexport const schematic_component_port_arrangement_by_sides = 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\nexpectTypesMatch<\n SchematicPortArrangementBySides,\n z.infer<typeof schematic_component_port_arrangement_by_sides>\n>(true)\n\nexport const port_arrangement = z.union([\n schematic_component_port_arrangement_by_size,\n schematic_component_port_arrangement_by_sides,\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: port_arrangement.optional(),\n port_labels: z.record(z.string()).optional(),\n symbol_display_value: z.string().optional(),\n})\n\nexport type SchematicComponentInput = z.input<typeof schematic_component>\ntype InferredSchematicComponent = z.infer<typeof schematic_component>\n\nexpectTypesMatch<SchematicComponent, InferredSchematicComponent>(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 { 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 { point, type Point } from \"../common\"\nimport { expectTypesMatch } from \"src/utils/expect-types-match\"\n\nexport interface SchematicPort {\n type: \"schematic_port\"\n schematic_port_id: string\n source_port_id: string\n schematic_component_id?: string\n center: Point\n facing_direction?: \"up\" | \"down\" | \"left\" | \"right\"\n distance_from_component_edge?: number\n side_of_component?: \"top\" | \"bottom\" | \"left\" | \"right\"\n true_ccw_index?: number\n pin_number?: number\n display_pin_label?: string\n}\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 display_pin_label: z.string().optional(),\n })\n .describe(\"Defines a port on a schematic component\")\n\nexport type SchematicPortInput = z.input<typeof schematic_port>\ntype InferredSchematicPort = z.infer<typeof schematic_port>\n\nexpectTypesMatch<SchematicPort, InferredSchematicPort>(true)\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 { 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;AAAA,EACA,GAAG;AAAA,IACD,UAAU;AAAA,IACV,UAAU;AAAA,MACR,SAAI;AAAA,MACJ,IAAI;AA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ACxC,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"]}
|