circuit-json 0.0.407 → 0.0.408
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 +161 -2
- package/dist/index.mjs +1319 -1299
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -642,7 +642,7 @@ var source_pin_attributes = z23.object({
|
|
|
642
642
|
expectTypesMatch(true);
|
|
643
643
|
|
|
644
644
|
// src/source/any_source_component.ts
|
|
645
|
-
import { z as
|
|
645
|
+
import { z as z51 } from "zod";
|
|
646
646
|
|
|
647
647
|
// src/source/source_simple_fuse.ts
|
|
648
648
|
import { z as z24 } from "zod";
|
|
@@ -887,53 +887,70 @@ var source_pin_missing_trace_warning = z45.object({
|
|
|
887
887
|
);
|
|
888
888
|
expectTypesMatch(true);
|
|
889
889
|
|
|
890
|
-
// src/source/
|
|
890
|
+
// src/source/source_missing_manufacturer_part_number_warning.ts
|
|
891
891
|
import { z as z46 } from "zod";
|
|
892
|
+
var source_missing_manufacturer_part_number_warning = z46.object({
|
|
893
|
+
type: z46.literal("source_missing_manufacturer_part_number_warning"),
|
|
894
|
+
source_missing_manufacturer_part_number_warning_id: getZodPrefixedIdWithDefault(
|
|
895
|
+
"source_missing_manufacturer_part_number_warning"
|
|
896
|
+
),
|
|
897
|
+
warning_type: z46.literal("source_missing_manufacturer_part_number_warning").default("source_missing_manufacturer_part_number_warning"),
|
|
898
|
+
message: z46.string(),
|
|
899
|
+
source_component_id: z46.string(),
|
|
900
|
+
standard: z46.string(),
|
|
901
|
+
subcircuit_id: z46.string().optional()
|
|
902
|
+
}).describe(
|
|
903
|
+
"Warning emitted when a standard connector is missing manufacturer part number"
|
|
904
|
+
);
|
|
905
|
+
expectTypesMatch(true);
|
|
906
|
+
|
|
907
|
+
// src/source/source_simple_voltage_probe.ts
|
|
908
|
+
import { z as z47 } from "zod";
|
|
892
909
|
var source_simple_voltage_probe = source_component_base.extend({
|
|
893
|
-
ftype:
|
|
910
|
+
ftype: z47.literal("simple_voltage_probe")
|
|
894
911
|
});
|
|
895
912
|
expectTypesMatch(
|
|
896
913
|
true
|
|
897
914
|
);
|
|
898
915
|
|
|
899
916
|
// src/source/source_interconnect.ts
|
|
900
|
-
import { z as
|
|
917
|
+
import { z as z48 } from "zod";
|
|
901
918
|
var source_interconnect = source_component_base.extend({
|
|
902
|
-
ftype:
|
|
919
|
+
ftype: z48.literal("interconnect")
|
|
903
920
|
});
|
|
904
921
|
expectTypesMatch(true);
|
|
905
922
|
|
|
906
923
|
// src/source/source_i2c_misconfigured_error.ts
|
|
907
|
-
import { z as
|
|
924
|
+
import { z as z49 } from "zod";
|
|
908
925
|
var source_i2c_misconfigured_error = base_circuit_json_error.extend({
|
|
909
|
-
type:
|
|
926
|
+
type: z49.literal("source_i2c_misconfigured_error"),
|
|
910
927
|
source_i2c_misconfigured_error_id: getZodPrefixedIdWithDefault(
|
|
911
928
|
"source_i2c_misconfigured_error"
|
|
912
929
|
),
|
|
913
|
-
error_type:
|
|
914
|
-
source_port_ids:
|
|
930
|
+
error_type: z49.literal("source_i2c_misconfigured_error").default("source_i2c_misconfigured_error"),
|
|
931
|
+
source_port_ids: z49.array(z49.string())
|
|
915
932
|
}).describe(
|
|
916
933
|
"Error emitted when incompatible I2C pins (e.g. SDA and SCL) are connected to the same net"
|
|
917
934
|
);
|
|
918
935
|
expectTypesMatch(true);
|
|
919
936
|
|
|
920
937
|
// src/source/source_simple_voltage_source.ts
|
|
921
|
-
import { z as
|
|
938
|
+
import { z as z50 } from "zod";
|
|
922
939
|
var source_simple_voltage_source = source_component_base.extend({
|
|
923
|
-
ftype:
|
|
940
|
+
ftype: z50.literal("simple_voltage_source"),
|
|
924
941
|
voltage,
|
|
925
942
|
frequency: frequency.optional(),
|
|
926
943
|
peak_to_peak_voltage: voltage.optional(),
|
|
927
|
-
wave_shape:
|
|
944
|
+
wave_shape: z50.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
928
945
|
phase: rotation.optional(),
|
|
929
|
-
duty_cycle:
|
|
946
|
+
duty_cycle: z50.number().optional().describe("Duty cycle as a fraction (0 to 1)")
|
|
930
947
|
});
|
|
931
948
|
expectTypesMatch(
|
|
932
949
|
true
|
|
933
950
|
);
|
|
934
951
|
|
|
935
952
|
// src/source/any_source_component.ts
|
|
936
|
-
var any_source_component =
|
|
953
|
+
var any_source_component = z51.union([
|
|
937
954
|
source_simple_resistor,
|
|
938
955
|
source_simple_capacitor,
|
|
939
956
|
source_simple_diode,
|
|
@@ -968,126 +985,127 @@ var any_source_component = z50.union([
|
|
|
968
985
|
source_trace_not_connected_error,
|
|
969
986
|
source_property_ignored_warning,
|
|
970
987
|
source_pin_missing_trace_warning,
|
|
988
|
+
source_missing_manufacturer_part_number_warning,
|
|
971
989
|
source_i2c_misconfigured_error
|
|
972
990
|
]);
|
|
973
991
|
expectTypesMatch(true);
|
|
974
992
|
|
|
975
993
|
// src/source/source_port.ts
|
|
976
|
-
import { z as
|
|
977
|
-
var source_port =
|
|
978
|
-
type:
|
|
979
|
-
pin_number:
|
|
980
|
-
port_hints:
|
|
981
|
-
name:
|
|
982
|
-
source_port_id:
|
|
983
|
-
source_component_id:
|
|
984
|
-
source_group_id:
|
|
985
|
-
most_frequently_referenced_by_name:
|
|
986
|
-
subcircuit_id:
|
|
987
|
-
subcircuit_connectivity_map_key:
|
|
994
|
+
import { z as z52 } from "zod";
|
|
995
|
+
var source_port = z52.object({
|
|
996
|
+
type: z52.literal("source_port"),
|
|
997
|
+
pin_number: z52.number().optional(),
|
|
998
|
+
port_hints: z52.array(z52.string()).optional(),
|
|
999
|
+
name: z52.string(),
|
|
1000
|
+
source_port_id: z52.string(),
|
|
1001
|
+
source_component_id: z52.string().optional(),
|
|
1002
|
+
source_group_id: z52.string().optional(),
|
|
1003
|
+
most_frequently_referenced_by_name: z52.string().optional(),
|
|
1004
|
+
subcircuit_id: z52.string().optional(),
|
|
1005
|
+
subcircuit_connectivity_map_key: z52.string().optional()
|
|
988
1006
|
}).merge(source_pin_attributes);
|
|
989
1007
|
expectTypesMatch(true);
|
|
990
1008
|
|
|
991
1009
|
// src/source/source_component_internal_connection.ts
|
|
992
|
-
import { z as
|
|
993
|
-
var source_component_internal_connection =
|
|
994
|
-
type:
|
|
995
|
-
source_component_internal_connection_id:
|
|
996
|
-
source_component_id:
|
|
997
|
-
source_port_ids:
|
|
998
|
-
subcircuit_id:
|
|
1010
|
+
import { z as z53 } from "zod";
|
|
1011
|
+
var source_component_internal_connection = z53.object({
|
|
1012
|
+
type: z53.literal("source_component_internal_connection"),
|
|
1013
|
+
source_component_internal_connection_id: z53.string(),
|
|
1014
|
+
source_component_id: z53.string(),
|
|
1015
|
+
source_port_ids: z53.array(z53.string()),
|
|
1016
|
+
subcircuit_id: z53.string().optional()
|
|
999
1017
|
});
|
|
1000
1018
|
expectTypesMatch(true);
|
|
1001
1019
|
|
|
1002
1020
|
// src/source/source_trace.ts
|
|
1003
|
-
import { z as
|
|
1004
|
-
var source_trace =
|
|
1005
|
-
type:
|
|
1006
|
-
source_trace_id:
|
|
1007
|
-
connected_source_port_ids:
|
|
1008
|
-
connected_source_net_ids:
|
|
1009
|
-
subcircuit_id:
|
|
1010
|
-
subcircuit_connectivity_map_key:
|
|
1011
|
-
max_length:
|
|
1012
|
-
min_trace_thickness:
|
|
1013
|
-
display_name:
|
|
1021
|
+
import { z as z54 } from "zod";
|
|
1022
|
+
var source_trace = z54.object({
|
|
1023
|
+
type: z54.literal("source_trace"),
|
|
1024
|
+
source_trace_id: z54.string(),
|
|
1025
|
+
connected_source_port_ids: z54.array(z54.string()),
|
|
1026
|
+
connected_source_net_ids: z54.array(z54.string()),
|
|
1027
|
+
subcircuit_id: z54.string().optional(),
|
|
1028
|
+
subcircuit_connectivity_map_key: z54.string().optional(),
|
|
1029
|
+
max_length: z54.number().optional(),
|
|
1030
|
+
min_trace_thickness: z54.number().optional(),
|
|
1031
|
+
display_name: z54.string().optional()
|
|
1014
1032
|
});
|
|
1015
1033
|
expectTypesMatch(true);
|
|
1016
1034
|
|
|
1017
1035
|
// src/source/source_group.ts
|
|
1018
|
-
import { z as
|
|
1019
|
-
var source_group =
|
|
1020
|
-
type:
|
|
1021
|
-
source_group_id:
|
|
1022
|
-
subcircuit_id:
|
|
1023
|
-
parent_subcircuit_id:
|
|
1024
|
-
parent_source_group_id:
|
|
1025
|
-
is_subcircuit:
|
|
1026
|
-
show_as_schematic_box:
|
|
1027
|
-
name:
|
|
1028
|
-
was_automatically_named:
|
|
1036
|
+
import { z as z55 } from "zod";
|
|
1037
|
+
var source_group = z55.object({
|
|
1038
|
+
type: z55.literal("source_group"),
|
|
1039
|
+
source_group_id: z55.string(),
|
|
1040
|
+
subcircuit_id: z55.string().optional(),
|
|
1041
|
+
parent_subcircuit_id: z55.string().optional(),
|
|
1042
|
+
parent_source_group_id: z55.string().optional(),
|
|
1043
|
+
is_subcircuit: z55.boolean().optional(),
|
|
1044
|
+
show_as_schematic_box: z55.boolean().optional(),
|
|
1045
|
+
name: z55.string().optional(),
|
|
1046
|
+
was_automatically_named: z55.boolean().optional()
|
|
1029
1047
|
});
|
|
1030
1048
|
expectTypesMatch(true);
|
|
1031
1049
|
|
|
1032
1050
|
// src/source/source_net.ts
|
|
1033
|
-
import { z as
|
|
1034
|
-
var source_net =
|
|
1035
|
-
type:
|
|
1036
|
-
source_net_id:
|
|
1037
|
-
name:
|
|
1038
|
-
member_source_group_ids:
|
|
1039
|
-
is_power:
|
|
1040
|
-
is_ground:
|
|
1041
|
-
is_digital_signal:
|
|
1042
|
-
is_analog_signal:
|
|
1043
|
-
is_positive_voltage_source:
|
|
1044
|
-
trace_width:
|
|
1045
|
-
subcircuit_id:
|
|
1046
|
-
subcircuit_connectivity_map_key:
|
|
1051
|
+
import { z as z56 } from "zod";
|
|
1052
|
+
var source_net = z56.object({
|
|
1053
|
+
type: z56.literal("source_net"),
|
|
1054
|
+
source_net_id: z56.string(),
|
|
1055
|
+
name: z56.string(),
|
|
1056
|
+
member_source_group_ids: z56.array(z56.string()),
|
|
1057
|
+
is_power: z56.boolean().optional(),
|
|
1058
|
+
is_ground: z56.boolean().optional(),
|
|
1059
|
+
is_digital_signal: z56.boolean().optional(),
|
|
1060
|
+
is_analog_signal: z56.boolean().optional(),
|
|
1061
|
+
is_positive_voltage_source: z56.boolean().optional(),
|
|
1062
|
+
trace_width: z56.number().optional(),
|
|
1063
|
+
subcircuit_id: z56.string().optional(),
|
|
1064
|
+
subcircuit_connectivity_map_key: z56.string().optional()
|
|
1047
1065
|
});
|
|
1048
1066
|
expectTypesMatch(true);
|
|
1049
1067
|
|
|
1050
1068
|
// src/source/source_board.ts
|
|
1051
|
-
import { z as
|
|
1052
|
-
var source_board =
|
|
1053
|
-
type:
|
|
1054
|
-
source_board_id:
|
|
1055
|
-
source_group_id:
|
|
1056
|
-
title:
|
|
1069
|
+
import { z as z57 } from "zod";
|
|
1070
|
+
var source_board = z57.object({
|
|
1071
|
+
type: z57.literal("source_board"),
|
|
1072
|
+
source_board_id: z57.string(),
|
|
1073
|
+
source_group_id: z57.string(),
|
|
1074
|
+
title: z57.string().optional()
|
|
1057
1075
|
}).describe("Defines a board in the source domain");
|
|
1058
1076
|
expectTypesMatch(true);
|
|
1059
1077
|
|
|
1060
1078
|
// src/source/source_ambiguous_port_reference.ts
|
|
1061
|
-
import { z as
|
|
1079
|
+
import { z as z58 } from "zod";
|
|
1062
1080
|
var source_ambiguous_port_reference = base_circuit_json_error.extend({
|
|
1063
|
-
type:
|
|
1081
|
+
type: z58.literal("source_ambiguous_port_reference"),
|
|
1064
1082
|
source_ambiguous_port_reference_id: getZodPrefixedIdWithDefault(
|
|
1065
1083
|
"source_ambiguous_port_reference"
|
|
1066
1084
|
),
|
|
1067
|
-
error_type:
|
|
1068
|
-
source_port_id:
|
|
1069
|
-
source_component_id:
|
|
1085
|
+
error_type: z58.literal("source_ambiguous_port_reference").default("source_ambiguous_port_reference"),
|
|
1086
|
+
source_port_id: z58.string().optional(),
|
|
1087
|
+
source_component_id: z58.string().optional()
|
|
1070
1088
|
}).describe(
|
|
1071
1089
|
"Error emitted when a port hint matches multiple non-overlapping pads, making the port reference ambiguous"
|
|
1072
1090
|
);
|
|
1073
1091
|
expectTypesMatch(true);
|
|
1074
1092
|
|
|
1075
1093
|
// src/source/source_pcb_ground_plane.ts
|
|
1076
|
-
import { z as
|
|
1077
|
-
var source_pcb_ground_plane =
|
|
1078
|
-
type:
|
|
1079
|
-
source_pcb_ground_plane_id:
|
|
1080
|
-
source_group_id:
|
|
1081
|
-
source_net_id:
|
|
1082
|
-
subcircuit_id:
|
|
1094
|
+
import { z as z59 } from "zod";
|
|
1095
|
+
var source_pcb_ground_plane = z59.object({
|
|
1096
|
+
type: z59.literal("source_pcb_ground_plane"),
|
|
1097
|
+
source_pcb_ground_plane_id: z59.string(),
|
|
1098
|
+
source_group_id: z59.string(),
|
|
1099
|
+
source_net_id: z59.string(),
|
|
1100
|
+
subcircuit_id: z59.string().optional()
|
|
1083
1101
|
}).describe("Defines a ground plane in the source domain");
|
|
1084
1102
|
expectTypesMatch(true);
|
|
1085
1103
|
|
|
1086
1104
|
// src/source/source_manually_placed_via.ts
|
|
1087
|
-
import { z as
|
|
1105
|
+
import { z as z61 } from "zod";
|
|
1088
1106
|
|
|
1089
1107
|
// src/pcb/properties/layer_ref.ts
|
|
1090
|
-
import { z as
|
|
1108
|
+
import { z as z60 } from "zod";
|
|
1091
1109
|
var all_layers = [
|
|
1092
1110
|
"top",
|
|
1093
1111
|
"bottom",
|
|
@@ -1098,9 +1116,9 @@ var all_layers = [
|
|
|
1098
1116
|
"inner5",
|
|
1099
1117
|
"inner6"
|
|
1100
1118
|
];
|
|
1101
|
-
var layer_string =
|
|
1119
|
+
var layer_string = z60.enum(all_layers);
|
|
1102
1120
|
var layer_ref = layer_string.or(
|
|
1103
|
-
|
|
1121
|
+
z60.object({
|
|
1104
1122
|
name: layer_string
|
|
1105
1123
|
})
|
|
1106
1124
|
).transform((layer) => {
|
|
@@ -1110,207 +1128,207 @@ var layer_ref = layer_string.or(
|
|
|
1110
1128
|
return layer.name;
|
|
1111
1129
|
});
|
|
1112
1130
|
expectTypesMatch(true);
|
|
1113
|
-
var visible_layer =
|
|
1131
|
+
var visible_layer = z60.enum(["top", "bottom"]);
|
|
1114
1132
|
|
|
1115
1133
|
// src/source/source_manually_placed_via.ts
|
|
1116
|
-
var source_manually_placed_via =
|
|
1117
|
-
type:
|
|
1118
|
-
source_manually_placed_via_id:
|
|
1119
|
-
source_group_id:
|
|
1120
|
-
source_net_id:
|
|
1121
|
-
subcircuit_id:
|
|
1122
|
-
source_trace_id:
|
|
1134
|
+
var source_manually_placed_via = z61.object({
|
|
1135
|
+
type: z61.literal("source_manually_placed_via"),
|
|
1136
|
+
source_manually_placed_via_id: z61.string(),
|
|
1137
|
+
source_group_id: z61.string(),
|
|
1138
|
+
source_net_id: z61.string(),
|
|
1139
|
+
subcircuit_id: z61.string().optional(),
|
|
1140
|
+
source_trace_id: z61.string().optional()
|
|
1123
1141
|
}).describe("Defines a via that is manually placed in the source domain");
|
|
1124
1142
|
expectTypesMatch(true);
|
|
1125
1143
|
|
|
1126
1144
|
// src/source/source_no_power_pin_defined_warning.ts
|
|
1127
|
-
import { z as
|
|
1128
|
-
var source_no_power_pin_defined_warning =
|
|
1129
|
-
type:
|
|
1145
|
+
import { z as z62 } from "zod";
|
|
1146
|
+
var source_no_power_pin_defined_warning = z62.object({
|
|
1147
|
+
type: z62.literal("source_no_power_pin_defined_warning"),
|
|
1130
1148
|
source_no_power_pin_defined_warning_id: getZodPrefixedIdWithDefault(
|
|
1131
1149
|
"source_no_power_pin_defined_warning"
|
|
1132
1150
|
),
|
|
1133
|
-
warning_type:
|
|
1134
|
-
message:
|
|
1135
|
-
source_component_id:
|
|
1136
|
-
source_port_ids:
|
|
1137
|
-
subcircuit_id:
|
|
1151
|
+
warning_type: z62.literal("source_no_power_pin_defined_warning").default("source_no_power_pin_defined_warning"),
|
|
1152
|
+
message: z62.string(),
|
|
1153
|
+
source_component_id: z62.string(),
|
|
1154
|
+
source_port_ids: z62.array(z62.string()),
|
|
1155
|
+
subcircuit_id: z62.string().optional()
|
|
1138
1156
|
}).describe(
|
|
1139
1157
|
"Warning emitted when a chip has no source ports with requires_power=true"
|
|
1140
1158
|
);
|
|
1141
1159
|
expectTypesMatch(true);
|
|
1142
1160
|
|
|
1143
1161
|
// src/source/source_no_ground_pin_defined_warning.ts
|
|
1144
|
-
import { z as
|
|
1145
|
-
var source_no_ground_pin_defined_warning =
|
|
1146
|
-
type:
|
|
1162
|
+
import { z as z63 } from "zod";
|
|
1163
|
+
var source_no_ground_pin_defined_warning = z63.object({
|
|
1164
|
+
type: z63.literal("source_no_ground_pin_defined_warning"),
|
|
1147
1165
|
source_no_ground_pin_defined_warning_id: getZodPrefixedIdWithDefault(
|
|
1148
1166
|
"source_no_ground_pin_defined_warning"
|
|
1149
1167
|
),
|
|
1150
|
-
warning_type:
|
|
1151
|
-
message:
|
|
1152
|
-
source_component_id:
|
|
1153
|
-
source_port_ids:
|
|
1154
|
-
subcircuit_id:
|
|
1168
|
+
warning_type: z63.literal("source_no_ground_pin_defined_warning").default("source_no_ground_pin_defined_warning"),
|
|
1169
|
+
message: z63.string(),
|
|
1170
|
+
source_component_id: z63.string(),
|
|
1171
|
+
source_port_ids: z63.array(z63.string()),
|
|
1172
|
+
subcircuit_id: z63.string().optional()
|
|
1155
1173
|
}).describe(
|
|
1156
1174
|
"Warning emitted when a chip has no source ports marked as ground pins"
|
|
1157
1175
|
);
|
|
1158
1176
|
expectTypesMatch(true);
|
|
1159
1177
|
|
|
1160
1178
|
// src/source/source_component_pins_underspecified_warning.ts
|
|
1161
|
-
import { z as
|
|
1162
|
-
var source_component_pins_underspecified_warning =
|
|
1163
|
-
type:
|
|
1179
|
+
import { z as z64 } from "zod";
|
|
1180
|
+
var source_component_pins_underspecified_warning = z64.object({
|
|
1181
|
+
type: z64.literal("source_component_pins_underspecified_warning"),
|
|
1164
1182
|
source_component_pins_underspecified_warning_id: getZodPrefixedIdWithDefault(
|
|
1165
1183
|
"source_component_pins_underspecified_warning"
|
|
1166
1184
|
),
|
|
1167
|
-
warning_type:
|
|
1168
|
-
message:
|
|
1169
|
-
source_component_id:
|
|
1170
|
-
source_port_ids:
|
|
1171
|
-
subcircuit_id:
|
|
1185
|
+
warning_type: z64.literal("source_component_pins_underspecified_warning").default("source_component_pins_underspecified_warning"),
|
|
1186
|
+
message: z64.string(),
|
|
1187
|
+
source_component_id: z64.string(),
|
|
1188
|
+
source_port_ids: z64.array(z64.string()),
|
|
1189
|
+
subcircuit_id: z64.string().optional()
|
|
1172
1190
|
}).describe(
|
|
1173
1191
|
"Warning emitted when all ports on a source component are underspecified"
|
|
1174
1192
|
);
|
|
1175
1193
|
expectTypesMatch(true);
|
|
1176
1194
|
|
|
1177
1195
|
// src/source/source_pin_must_be_connected_error.ts
|
|
1178
|
-
import { z as
|
|
1196
|
+
import { z as z65 } from "zod";
|
|
1179
1197
|
var source_pin_must_be_connected_error = base_circuit_json_error.extend({
|
|
1180
|
-
type:
|
|
1198
|
+
type: z65.literal("source_pin_must_be_connected_error"),
|
|
1181
1199
|
source_pin_must_be_connected_error_id: getZodPrefixedIdWithDefault(
|
|
1182
1200
|
"source_pin_must_be_connected_error"
|
|
1183
1201
|
),
|
|
1184
|
-
error_type:
|
|
1185
|
-
source_component_id:
|
|
1186
|
-
source_port_id:
|
|
1187
|
-
subcircuit_id:
|
|
1202
|
+
error_type: z65.literal("source_pin_must_be_connected_error").default("source_pin_must_be_connected_error"),
|
|
1203
|
+
source_component_id: z65.string(),
|
|
1204
|
+
source_port_id: z65.string(),
|
|
1205
|
+
subcircuit_id: z65.string().optional()
|
|
1188
1206
|
}).describe(
|
|
1189
1207
|
"Error emitted when a pin with mustBeConnected attribute is not connected to any trace"
|
|
1190
1208
|
);
|
|
1191
1209
|
expectTypesMatch(true);
|
|
1192
1210
|
|
|
1193
1211
|
// src/source/unknown_error_finding_part.ts
|
|
1194
|
-
import { z as
|
|
1212
|
+
import { z as z66 } from "zod";
|
|
1195
1213
|
var unknown_error_finding_part = base_circuit_json_error.extend({
|
|
1196
|
-
type:
|
|
1214
|
+
type: z66.literal("unknown_error_finding_part"),
|
|
1197
1215
|
unknown_error_finding_part_id: getZodPrefixedIdWithDefault(
|
|
1198
1216
|
"unknown_error_finding_part"
|
|
1199
1217
|
),
|
|
1200
|
-
error_type:
|
|
1201
|
-
source_component_id:
|
|
1202
|
-
subcircuit_id:
|
|
1218
|
+
error_type: z66.literal("unknown_error_finding_part").default("unknown_error_finding_part"),
|
|
1219
|
+
source_component_id: z66.string().optional(),
|
|
1220
|
+
subcircuit_id: z66.string().optional()
|
|
1203
1221
|
}).describe(
|
|
1204
1222
|
"Error emitted when an unexpected error occurs while finding a part"
|
|
1205
1223
|
);
|
|
1206
1224
|
expectTypesMatch(true);
|
|
1207
1225
|
|
|
1208
1226
|
// src/schematic/schematic_box.ts
|
|
1209
|
-
import { z as
|
|
1210
|
-
var schematic_box =
|
|
1211
|
-
type:
|
|
1212
|
-
schematic_component_id:
|
|
1213
|
-
schematic_symbol_id:
|
|
1227
|
+
import { z as z67 } from "zod";
|
|
1228
|
+
var schematic_box = z67.object({
|
|
1229
|
+
type: z67.literal("schematic_box"),
|
|
1230
|
+
schematic_component_id: z67.string().optional(),
|
|
1231
|
+
schematic_symbol_id: z67.string().optional(),
|
|
1214
1232
|
width: distance,
|
|
1215
1233
|
height: distance,
|
|
1216
|
-
is_dashed:
|
|
1234
|
+
is_dashed: z67.boolean().default(false),
|
|
1217
1235
|
x: distance,
|
|
1218
1236
|
y: distance,
|
|
1219
|
-
subcircuit_id:
|
|
1237
|
+
subcircuit_id: z67.string().optional()
|
|
1220
1238
|
}).describe("Draws a box on the schematic");
|
|
1221
1239
|
expectTypesMatch(true);
|
|
1222
1240
|
|
|
1223
1241
|
// src/schematic/schematic_path.ts
|
|
1224
|
-
import { z as
|
|
1225
|
-
var schematic_path =
|
|
1226
|
-
type:
|
|
1242
|
+
import { z as z68 } from "zod";
|
|
1243
|
+
var schematic_path = z68.object({
|
|
1244
|
+
type: z68.literal("schematic_path"),
|
|
1227
1245
|
schematic_path_id: getZodPrefixedIdWithDefault("schematic_path"),
|
|
1228
|
-
schematic_component_id:
|
|
1229
|
-
schematic_symbol_id:
|
|
1230
|
-
fill_color:
|
|
1231
|
-
is_filled:
|
|
1246
|
+
schematic_component_id: z68.string().optional(),
|
|
1247
|
+
schematic_symbol_id: z68.string().optional(),
|
|
1248
|
+
fill_color: z68.string().optional(),
|
|
1249
|
+
is_filled: z68.boolean().optional(),
|
|
1232
1250
|
stroke_width: distance.nullable().optional(),
|
|
1233
|
-
stroke_color:
|
|
1234
|
-
points:
|
|
1235
|
-
subcircuit_id:
|
|
1251
|
+
stroke_color: z68.string().optional(),
|
|
1252
|
+
points: z68.array(point),
|
|
1253
|
+
subcircuit_id: z68.string().optional()
|
|
1236
1254
|
});
|
|
1237
1255
|
expectTypesMatch(true);
|
|
1238
1256
|
|
|
1239
1257
|
// src/schematic/schematic_component.ts
|
|
1240
|
-
import { z as
|
|
1241
|
-
var schematic_pin_styles =
|
|
1242
|
-
|
|
1258
|
+
import { z as z69 } from "zod";
|
|
1259
|
+
var schematic_pin_styles = z69.record(
|
|
1260
|
+
z69.object({
|
|
1243
1261
|
left_margin: length.optional(),
|
|
1244
1262
|
right_margin: length.optional(),
|
|
1245
1263
|
top_margin: length.optional(),
|
|
1246
1264
|
bottom_margin: length.optional()
|
|
1247
1265
|
})
|
|
1248
1266
|
);
|
|
1249
|
-
var schematic_component_port_arrangement_by_size =
|
|
1250
|
-
left_size:
|
|
1251
|
-
right_size:
|
|
1252
|
-
top_size:
|
|
1253
|
-
bottom_size:
|
|
1267
|
+
var schematic_component_port_arrangement_by_size = z69.object({
|
|
1268
|
+
left_size: z69.number(),
|
|
1269
|
+
right_size: z69.number(),
|
|
1270
|
+
top_size: z69.number().optional(),
|
|
1271
|
+
bottom_size: z69.number().optional()
|
|
1254
1272
|
});
|
|
1255
1273
|
expectTypesMatch(true);
|
|
1256
|
-
var schematic_component_port_arrangement_by_sides =
|
|
1257
|
-
left_side:
|
|
1258
|
-
pins:
|
|
1274
|
+
var schematic_component_port_arrangement_by_sides = z69.object({
|
|
1275
|
+
left_side: z69.object({
|
|
1276
|
+
pins: z69.array(z69.number()),
|
|
1259
1277
|
// @ts-ignore
|
|
1260
|
-
direction:
|
|
1278
|
+
direction: z69.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
1261
1279
|
}).optional(),
|
|
1262
|
-
right_side:
|
|
1263
|
-
pins:
|
|
1280
|
+
right_side: z69.object({
|
|
1281
|
+
pins: z69.array(z69.number()),
|
|
1264
1282
|
// @ts-ignore
|
|
1265
|
-
direction:
|
|
1283
|
+
direction: z69.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
1266
1284
|
}).optional(),
|
|
1267
|
-
top_side:
|
|
1268
|
-
pins:
|
|
1285
|
+
top_side: z69.object({
|
|
1286
|
+
pins: z69.array(z69.number()),
|
|
1269
1287
|
// @ts-ignore
|
|
1270
|
-
direction:
|
|
1288
|
+
direction: z69.enum(["left-to-right", "right-to-left"]).optional()
|
|
1271
1289
|
}).optional(),
|
|
1272
|
-
bottom_side:
|
|
1273
|
-
pins:
|
|
1290
|
+
bottom_side: z69.object({
|
|
1291
|
+
pins: z69.array(z69.number()),
|
|
1274
1292
|
// @ts-ignore
|
|
1275
|
-
direction:
|
|
1293
|
+
direction: z69.enum(["left-to-right", "right-to-left"]).optional()
|
|
1276
1294
|
}).optional()
|
|
1277
1295
|
});
|
|
1278
1296
|
expectTypesMatch(true);
|
|
1279
|
-
var port_arrangement =
|
|
1297
|
+
var port_arrangement = z69.union([
|
|
1280
1298
|
schematic_component_port_arrangement_by_size,
|
|
1281
1299
|
schematic_component_port_arrangement_by_sides
|
|
1282
1300
|
]);
|
|
1283
|
-
var schematic_component =
|
|
1284
|
-
type:
|
|
1301
|
+
var schematic_component = z69.object({
|
|
1302
|
+
type: z69.literal("schematic_component"),
|
|
1285
1303
|
size,
|
|
1286
1304
|
center: point,
|
|
1287
|
-
source_component_id:
|
|
1288
|
-
schematic_component_id:
|
|
1289
|
-
schematic_symbol_id:
|
|
1305
|
+
source_component_id: z69.string().optional(),
|
|
1306
|
+
schematic_component_id: z69.string(),
|
|
1307
|
+
schematic_symbol_id: z69.string().optional(),
|
|
1290
1308
|
pin_spacing: length.optional(),
|
|
1291
1309
|
pin_styles: schematic_pin_styles.optional(),
|
|
1292
1310
|
box_width: length.optional(),
|
|
1293
|
-
symbol_name:
|
|
1311
|
+
symbol_name: z69.string().optional(),
|
|
1294
1312
|
port_arrangement: port_arrangement.optional(),
|
|
1295
|
-
port_labels:
|
|
1296
|
-
symbol_display_value:
|
|
1297
|
-
subcircuit_id:
|
|
1298
|
-
schematic_group_id:
|
|
1299
|
-
is_schematic_group:
|
|
1300
|
-
source_group_id:
|
|
1301
|
-
is_box_with_pins:
|
|
1313
|
+
port_labels: z69.record(z69.string()).optional(),
|
|
1314
|
+
symbol_display_value: z69.string().optional(),
|
|
1315
|
+
subcircuit_id: z69.string().optional(),
|
|
1316
|
+
schematic_group_id: z69.string().optional(),
|
|
1317
|
+
is_schematic_group: z69.boolean().optional(),
|
|
1318
|
+
source_group_id: z69.string().optional(),
|
|
1319
|
+
is_box_with_pins: z69.boolean().optional().default(true)
|
|
1302
1320
|
});
|
|
1303
1321
|
expectTypesMatch(true);
|
|
1304
1322
|
|
|
1305
1323
|
// src/schematic/schematic_symbol.ts
|
|
1306
|
-
import { z as
|
|
1307
|
-
var schematicSymbolMetadata =
|
|
1324
|
+
import { z as z70 } from "zod";
|
|
1325
|
+
var schematicSymbolMetadata = z70.object({
|
|
1308
1326
|
kicad_symbol: kicadSymbolMetadata.optional()
|
|
1309
|
-
}).catchall(
|
|
1310
|
-
var schematic_symbol =
|
|
1311
|
-
type:
|
|
1312
|
-
schematic_symbol_id:
|
|
1313
|
-
name:
|
|
1327
|
+
}).catchall(z70.unknown());
|
|
1328
|
+
var schematic_symbol = z70.object({
|
|
1329
|
+
type: z70.literal("schematic_symbol"),
|
|
1330
|
+
schematic_symbol_id: z70.string(),
|
|
1331
|
+
name: z70.string().optional(),
|
|
1314
1332
|
metadata: schematicSymbolMetadata.optional()
|
|
1315
1333
|
}).describe(
|
|
1316
1334
|
"Defines a named schematic symbol that can be referenced by components."
|
|
@@ -1318,119 +1336,119 @@ var schematic_symbol = z69.object({
|
|
|
1318
1336
|
expectTypesMatch(true);
|
|
1319
1337
|
|
|
1320
1338
|
// src/schematic/schematic_line.ts
|
|
1321
|
-
import { z as
|
|
1322
|
-
var schematic_line =
|
|
1323
|
-
type:
|
|
1339
|
+
import { z as z71 } from "zod";
|
|
1340
|
+
var schematic_line = z71.object({
|
|
1341
|
+
type: z71.literal("schematic_line"),
|
|
1324
1342
|
schematic_line_id: getZodPrefixedIdWithDefault("schematic_line"),
|
|
1325
|
-
schematic_component_id:
|
|
1326
|
-
schematic_symbol_id:
|
|
1343
|
+
schematic_component_id: z71.string().optional(),
|
|
1344
|
+
schematic_symbol_id: z71.string().optional(),
|
|
1327
1345
|
x1: distance,
|
|
1328
1346
|
y1: distance,
|
|
1329
1347
|
x2: distance,
|
|
1330
1348
|
y2: distance,
|
|
1331
1349
|
stroke_width: distance.nullable().optional(),
|
|
1332
|
-
color:
|
|
1333
|
-
is_dashed:
|
|
1334
|
-
subcircuit_id:
|
|
1350
|
+
color: z71.string().default("#000000"),
|
|
1351
|
+
is_dashed: z71.boolean().default(false),
|
|
1352
|
+
subcircuit_id: z71.string().optional()
|
|
1335
1353
|
}).describe("Draws a styled line on the schematic");
|
|
1336
1354
|
expectTypesMatch(true);
|
|
1337
1355
|
|
|
1338
1356
|
// src/schematic/schematic_rect.ts
|
|
1339
|
-
import { z as
|
|
1340
|
-
var schematic_rect =
|
|
1341
|
-
type:
|
|
1357
|
+
import { z as z72 } from "zod";
|
|
1358
|
+
var schematic_rect = z72.object({
|
|
1359
|
+
type: z72.literal("schematic_rect"),
|
|
1342
1360
|
schematic_rect_id: getZodPrefixedIdWithDefault("schematic_rect"),
|
|
1343
|
-
schematic_component_id:
|
|
1344
|
-
schematic_symbol_id:
|
|
1361
|
+
schematic_component_id: z72.string().optional(),
|
|
1362
|
+
schematic_symbol_id: z72.string().optional(),
|
|
1345
1363
|
center: point,
|
|
1346
1364
|
width: distance,
|
|
1347
1365
|
height: distance,
|
|
1348
1366
|
rotation: rotation.default(0),
|
|
1349
1367
|
stroke_width: distance.nullable().optional(),
|
|
1350
|
-
color:
|
|
1351
|
-
is_filled:
|
|
1352
|
-
fill_color:
|
|
1353
|
-
is_dashed:
|
|
1354
|
-
subcircuit_id:
|
|
1368
|
+
color: z72.string().default("#000000"),
|
|
1369
|
+
is_filled: z72.boolean().default(false),
|
|
1370
|
+
fill_color: z72.string().optional(),
|
|
1371
|
+
is_dashed: z72.boolean().default(false),
|
|
1372
|
+
subcircuit_id: z72.string().optional()
|
|
1355
1373
|
}).describe("Draws a styled rectangle on the schematic");
|
|
1356
1374
|
expectTypesMatch(true);
|
|
1357
1375
|
|
|
1358
1376
|
// src/schematic/schematic_circle.ts
|
|
1359
|
-
import { z as
|
|
1360
|
-
var schematic_circle =
|
|
1361
|
-
type:
|
|
1377
|
+
import { z as z73 } from "zod";
|
|
1378
|
+
var schematic_circle = z73.object({
|
|
1379
|
+
type: z73.literal("schematic_circle"),
|
|
1362
1380
|
schematic_circle_id: getZodPrefixedIdWithDefault("schematic_circle"),
|
|
1363
|
-
schematic_component_id:
|
|
1364
|
-
schematic_symbol_id:
|
|
1381
|
+
schematic_component_id: z73.string().optional(),
|
|
1382
|
+
schematic_symbol_id: z73.string().optional(),
|
|
1365
1383
|
center: point,
|
|
1366
1384
|
radius: distance,
|
|
1367
1385
|
stroke_width: distance.nullable().optional(),
|
|
1368
|
-
color:
|
|
1369
|
-
is_filled:
|
|
1370
|
-
fill_color:
|
|
1371
|
-
is_dashed:
|
|
1372
|
-
subcircuit_id:
|
|
1386
|
+
color: z73.string().default("#000000"),
|
|
1387
|
+
is_filled: z73.boolean().default(false),
|
|
1388
|
+
fill_color: z73.string().optional(),
|
|
1389
|
+
is_dashed: z73.boolean().default(false),
|
|
1390
|
+
subcircuit_id: z73.string().optional()
|
|
1373
1391
|
}).describe("Draws a styled circle on the schematic");
|
|
1374
1392
|
expectTypesMatch(true);
|
|
1375
1393
|
|
|
1376
1394
|
// src/schematic/schematic_arc.ts
|
|
1377
|
-
import { z as
|
|
1378
|
-
var schematic_arc =
|
|
1379
|
-
type:
|
|
1395
|
+
import { z as z74 } from "zod";
|
|
1396
|
+
var schematic_arc = z74.object({
|
|
1397
|
+
type: z74.literal("schematic_arc"),
|
|
1380
1398
|
schematic_arc_id: getZodPrefixedIdWithDefault("schematic_arc"),
|
|
1381
|
-
schematic_component_id:
|
|
1382
|
-
schematic_symbol_id:
|
|
1399
|
+
schematic_component_id: z74.string().optional(),
|
|
1400
|
+
schematic_symbol_id: z74.string().optional(),
|
|
1383
1401
|
center: point,
|
|
1384
1402
|
radius: distance,
|
|
1385
1403
|
start_angle_degrees: rotation,
|
|
1386
1404
|
end_angle_degrees: rotation,
|
|
1387
|
-
direction:
|
|
1405
|
+
direction: z74.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
1388
1406
|
stroke_width: distance.nullable().optional(),
|
|
1389
|
-
color:
|
|
1390
|
-
is_dashed:
|
|
1391
|
-
subcircuit_id:
|
|
1407
|
+
color: z74.string().default("#000000"),
|
|
1408
|
+
is_dashed: z74.boolean().default(false),
|
|
1409
|
+
subcircuit_id: z74.string().optional()
|
|
1392
1410
|
}).describe("Draws a styled arc on the schematic");
|
|
1393
1411
|
expectTypesMatch(true);
|
|
1394
1412
|
|
|
1395
1413
|
// src/schematic/schematic_trace.ts
|
|
1396
|
-
import { z as
|
|
1397
|
-
var schematic_trace =
|
|
1398
|
-
type:
|
|
1399
|
-
schematic_trace_id:
|
|
1400
|
-
source_trace_id:
|
|
1401
|
-
junctions:
|
|
1402
|
-
|
|
1403
|
-
x:
|
|
1404
|
-
y:
|
|
1414
|
+
import { z as z75 } from "zod";
|
|
1415
|
+
var schematic_trace = z75.object({
|
|
1416
|
+
type: z75.literal("schematic_trace"),
|
|
1417
|
+
schematic_trace_id: z75.string(),
|
|
1418
|
+
source_trace_id: z75.string().optional(),
|
|
1419
|
+
junctions: z75.array(
|
|
1420
|
+
z75.object({
|
|
1421
|
+
x: z75.number(),
|
|
1422
|
+
y: z75.number()
|
|
1405
1423
|
})
|
|
1406
1424
|
),
|
|
1407
|
-
edges:
|
|
1408
|
-
|
|
1409
|
-
from:
|
|
1410
|
-
x:
|
|
1411
|
-
y:
|
|
1425
|
+
edges: z75.array(
|
|
1426
|
+
z75.object({
|
|
1427
|
+
from: z75.object({
|
|
1428
|
+
x: z75.number(),
|
|
1429
|
+
y: z75.number()
|
|
1412
1430
|
}),
|
|
1413
|
-
to:
|
|
1414
|
-
x:
|
|
1415
|
-
y:
|
|
1431
|
+
to: z75.object({
|
|
1432
|
+
x: z75.number(),
|
|
1433
|
+
y: z75.number()
|
|
1416
1434
|
}),
|
|
1417
|
-
is_crossing:
|
|
1418
|
-
from_schematic_port_id:
|
|
1419
|
-
to_schematic_port_id:
|
|
1435
|
+
is_crossing: z75.boolean().optional(),
|
|
1436
|
+
from_schematic_port_id: z75.string().optional(),
|
|
1437
|
+
to_schematic_port_id: z75.string().optional()
|
|
1420
1438
|
})
|
|
1421
1439
|
),
|
|
1422
|
-
subcircuit_id:
|
|
1440
|
+
subcircuit_id: z75.string().optional(),
|
|
1423
1441
|
// TODO: make required in a future release
|
|
1424
|
-
subcircuit_connectivity_map_key:
|
|
1442
|
+
subcircuit_connectivity_map_key: z75.string().optional()
|
|
1425
1443
|
});
|
|
1426
1444
|
expectTypesMatch(true);
|
|
1427
1445
|
|
|
1428
1446
|
// src/schematic/schematic_text.ts
|
|
1429
|
-
import { z as
|
|
1447
|
+
import { z as z77 } from "zod";
|
|
1430
1448
|
|
|
1431
1449
|
// src/common/FivePointAnchor.ts
|
|
1432
|
-
import { z as
|
|
1433
|
-
var fivePointAnchor =
|
|
1450
|
+
import { z as z76 } from "zod";
|
|
1451
|
+
var fivePointAnchor = z76.enum([
|
|
1434
1452
|
"center",
|
|
1435
1453
|
"left",
|
|
1436
1454
|
"right",
|
|
@@ -1440,111 +1458,111 @@ var fivePointAnchor = z75.enum([
|
|
|
1440
1458
|
expectTypesMatch(true);
|
|
1441
1459
|
|
|
1442
1460
|
// src/schematic/schematic_text.ts
|
|
1443
|
-
var schematic_text =
|
|
1444
|
-
type:
|
|
1445
|
-
schematic_component_id:
|
|
1446
|
-
schematic_symbol_id:
|
|
1447
|
-
schematic_text_id:
|
|
1448
|
-
text:
|
|
1449
|
-
font_size:
|
|
1450
|
-
position:
|
|
1461
|
+
var schematic_text = z77.object({
|
|
1462
|
+
type: z77.literal("schematic_text"),
|
|
1463
|
+
schematic_component_id: z77.string().optional(),
|
|
1464
|
+
schematic_symbol_id: z77.string().optional(),
|
|
1465
|
+
schematic_text_id: z77.string(),
|
|
1466
|
+
text: z77.string(),
|
|
1467
|
+
font_size: z77.number().default(0.18),
|
|
1468
|
+
position: z77.object({
|
|
1451
1469
|
x: distance,
|
|
1452
1470
|
y: distance
|
|
1453
1471
|
}),
|
|
1454
|
-
rotation:
|
|
1455
|
-
anchor:
|
|
1456
|
-
color:
|
|
1457
|
-
subcircuit_id:
|
|
1472
|
+
rotation: z77.number().default(0),
|
|
1473
|
+
anchor: z77.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
1474
|
+
color: z77.string().default("#000000"),
|
|
1475
|
+
subcircuit_id: z77.string().optional()
|
|
1458
1476
|
});
|
|
1459
1477
|
expectTypesMatch(true);
|
|
1460
1478
|
|
|
1461
1479
|
// src/schematic/schematic_port.ts
|
|
1462
|
-
import { z as
|
|
1463
|
-
var schematic_port =
|
|
1464
|
-
type:
|
|
1465
|
-
schematic_port_id:
|
|
1466
|
-
source_port_id:
|
|
1467
|
-
schematic_component_id:
|
|
1480
|
+
import { z as z78 } from "zod";
|
|
1481
|
+
var schematic_port = z78.object({
|
|
1482
|
+
type: z78.literal("schematic_port"),
|
|
1483
|
+
schematic_port_id: z78.string(),
|
|
1484
|
+
source_port_id: z78.string(),
|
|
1485
|
+
schematic_component_id: z78.string().optional(),
|
|
1468
1486
|
center: point,
|
|
1469
|
-
facing_direction:
|
|
1470
|
-
distance_from_component_edge:
|
|
1471
|
-
side_of_component:
|
|
1472
|
-
true_ccw_index:
|
|
1473
|
-
pin_number:
|
|
1474
|
-
display_pin_label:
|
|
1475
|
-
subcircuit_id:
|
|
1476
|
-
is_connected:
|
|
1477
|
-
has_input_arrow:
|
|
1478
|
-
has_output_arrow:
|
|
1479
|
-
is_drawn_with_inversion_circle:
|
|
1487
|
+
facing_direction: z78.enum(["up", "down", "left", "right"]).optional(),
|
|
1488
|
+
distance_from_component_edge: z78.number().optional(),
|
|
1489
|
+
side_of_component: z78.enum(["top", "bottom", "left", "right"]).optional(),
|
|
1490
|
+
true_ccw_index: z78.number().optional(),
|
|
1491
|
+
pin_number: z78.number().optional(),
|
|
1492
|
+
display_pin_label: z78.string().optional(),
|
|
1493
|
+
subcircuit_id: z78.string().optional(),
|
|
1494
|
+
is_connected: z78.boolean().optional(),
|
|
1495
|
+
has_input_arrow: z78.boolean().optional(),
|
|
1496
|
+
has_output_arrow: z78.boolean().optional(),
|
|
1497
|
+
is_drawn_with_inversion_circle: z78.boolean().optional()
|
|
1480
1498
|
}).describe("Defines a port on a schematic component");
|
|
1481
1499
|
expectTypesMatch(true);
|
|
1482
1500
|
|
|
1483
1501
|
// src/schematic/schematic_net_label.ts
|
|
1484
|
-
import { z as
|
|
1485
|
-
var schematic_net_label =
|
|
1486
|
-
type:
|
|
1502
|
+
import { z as z79 } from "zod";
|
|
1503
|
+
var schematic_net_label = z79.object({
|
|
1504
|
+
type: z79.literal("schematic_net_label"),
|
|
1487
1505
|
schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
|
|
1488
|
-
schematic_trace_id:
|
|
1489
|
-
source_trace_id:
|
|
1490
|
-
source_net_id:
|
|
1506
|
+
schematic_trace_id: z79.string().optional(),
|
|
1507
|
+
source_trace_id: z79.string().optional(),
|
|
1508
|
+
source_net_id: z79.string(),
|
|
1491
1509
|
center: point,
|
|
1492
1510
|
anchor_position: point.optional(),
|
|
1493
|
-
anchor_side:
|
|
1494
|
-
text:
|
|
1495
|
-
symbol_name:
|
|
1496
|
-
is_movable:
|
|
1497
|
-
subcircuit_id:
|
|
1511
|
+
anchor_side: z79.enum(["top", "bottom", "left", "right"]),
|
|
1512
|
+
text: z79.string(),
|
|
1513
|
+
symbol_name: z79.string().optional(),
|
|
1514
|
+
is_movable: z79.boolean().optional(),
|
|
1515
|
+
subcircuit_id: z79.string().optional()
|
|
1498
1516
|
});
|
|
1499
1517
|
expectTypesMatch(true);
|
|
1500
1518
|
|
|
1501
1519
|
// src/schematic/schematic_error.ts
|
|
1502
|
-
import { z as
|
|
1520
|
+
import { z as z80 } from "zod";
|
|
1503
1521
|
var schematic_error = base_circuit_json_error.extend({
|
|
1504
|
-
type:
|
|
1505
|
-
schematic_error_id:
|
|
1522
|
+
type: z80.literal("schematic_error"),
|
|
1523
|
+
schematic_error_id: z80.string(),
|
|
1506
1524
|
// eventually each error type should be broken out into a dir of files
|
|
1507
|
-
error_type:
|
|
1508
|
-
subcircuit_id:
|
|
1525
|
+
error_type: z80.literal("schematic_port_not_found").default("schematic_port_not_found"),
|
|
1526
|
+
subcircuit_id: z80.string().optional()
|
|
1509
1527
|
}).describe("Defines a schematic error on the schematic");
|
|
1510
1528
|
expectTypesMatch(true);
|
|
1511
1529
|
|
|
1512
1530
|
// src/schematic/schematic_layout_error.ts
|
|
1513
|
-
import { z as
|
|
1531
|
+
import { z as z81 } from "zod";
|
|
1514
1532
|
var schematic_layout_error = base_circuit_json_error.extend({
|
|
1515
|
-
type:
|
|
1533
|
+
type: z81.literal("schematic_layout_error"),
|
|
1516
1534
|
schematic_layout_error_id: getZodPrefixedIdWithDefault(
|
|
1517
1535
|
"schematic_layout_error"
|
|
1518
1536
|
),
|
|
1519
|
-
error_type:
|
|
1520
|
-
source_group_id:
|
|
1521
|
-
schematic_group_id:
|
|
1522
|
-
subcircuit_id:
|
|
1537
|
+
error_type: z81.literal("schematic_layout_error").default("schematic_layout_error"),
|
|
1538
|
+
source_group_id: z81.string(),
|
|
1539
|
+
schematic_group_id: z81.string(),
|
|
1540
|
+
subcircuit_id: z81.string().optional()
|
|
1523
1541
|
}).describe("Error emitted when schematic layout fails for a group");
|
|
1524
1542
|
expectTypesMatch(true);
|
|
1525
1543
|
|
|
1526
1544
|
// src/schematic/schematic_debug_object.ts
|
|
1527
|
-
import { z as
|
|
1528
|
-
var schematic_debug_object_base =
|
|
1529
|
-
type:
|
|
1530
|
-
label:
|
|
1531
|
-
subcircuit_id:
|
|
1545
|
+
import { z as z82 } from "zod";
|
|
1546
|
+
var schematic_debug_object_base = z82.object({
|
|
1547
|
+
type: z82.literal("schematic_debug_object"),
|
|
1548
|
+
label: z82.string().optional(),
|
|
1549
|
+
subcircuit_id: z82.string().optional()
|
|
1532
1550
|
});
|
|
1533
1551
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
1534
|
-
shape:
|
|
1552
|
+
shape: z82.literal("rect"),
|
|
1535
1553
|
center: point,
|
|
1536
1554
|
size
|
|
1537
1555
|
});
|
|
1538
1556
|
var schematic_debug_line = schematic_debug_object_base.extend({
|
|
1539
|
-
shape:
|
|
1557
|
+
shape: z82.literal("line"),
|
|
1540
1558
|
start: point,
|
|
1541
1559
|
end: point
|
|
1542
1560
|
});
|
|
1543
1561
|
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
1544
|
-
shape:
|
|
1562
|
+
shape: z82.literal("point"),
|
|
1545
1563
|
center: point
|
|
1546
1564
|
});
|
|
1547
|
-
var schematic_debug_object =
|
|
1565
|
+
var schematic_debug_object = z82.discriminatedUnion("shape", [
|
|
1548
1566
|
schematic_debug_rect,
|
|
1549
1567
|
schematic_debug_line,
|
|
1550
1568
|
schematic_debug_point
|
|
@@ -1552,171 +1570,171 @@ var schematic_debug_object = z81.discriminatedUnion("shape", [
|
|
|
1552
1570
|
expectTypesMatch(true);
|
|
1553
1571
|
|
|
1554
1572
|
// src/schematic/schematic_voltage_probe.ts
|
|
1555
|
-
import { z as
|
|
1556
|
-
var schematic_voltage_probe =
|
|
1557
|
-
type:
|
|
1558
|
-
schematic_voltage_probe_id:
|
|
1559
|
-
source_component_id:
|
|
1560
|
-
name:
|
|
1573
|
+
import { z as z83 } from "zod";
|
|
1574
|
+
var schematic_voltage_probe = z83.object({
|
|
1575
|
+
type: z83.literal("schematic_voltage_probe"),
|
|
1576
|
+
schematic_voltage_probe_id: z83.string(),
|
|
1577
|
+
source_component_id: z83.string().optional(),
|
|
1578
|
+
name: z83.string().optional(),
|
|
1561
1579
|
position: point,
|
|
1562
|
-
schematic_trace_id:
|
|
1580
|
+
schematic_trace_id: z83.string(),
|
|
1563
1581
|
voltage: voltage.optional(),
|
|
1564
|
-
subcircuit_id:
|
|
1565
|
-
color:
|
|
1582
|
+
subcircuit_id: z83.string().optional(),
|
|
1583
|
+
color: z83.string().optional(),
|
|
1566
1584
|
label_alignment: ninePointAnchor.optional()
|
|
1567
1585
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
1568
1586
|
expectTypesMatch(true);
|
|
1569
1587
|
|
|
1570
1588
|
// src/schematic/schematic_manual_edit_conflict_warning.ts
|
|
1571
|
-
import { z as
|
|
1572
|
-
var schematic_manual_edit_conflict_warning =
|
|
1573
|
-
type:
|
|
1589
|
+
import { z as z84 } from "zod";
|
|
1590
|
+
var schematic_manual_edit_conflict_warning = z84.object({
|
|
1591
|
+
type: z84.literal("schematic_manual_edit_conflict_warning"),
|
|
1574
1592
|
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1575
1593
|
"schematic_manual_edit_conflict_warning"
|
|
1576
1594
|
),
|
|
1577
|
-
warning_type:
|
|
1578
|
-
message:
|
|
1579
|
-
schematic_component_id:
|
|
1580
|
-
schematic_group_id:
|
|
1581
|
-
subcircuit_id:
|
|
1582
|
-
source_component_id:
|
|
1595
|
+
warning_type: z84.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),
|
|
1596
|
+
message: z84.string(),
|
|
1597
|
+
schematic_component_id: z84.string(),
|
|
1598
|
+
schematic_group_id: z84.string().optional(),
|
|
1599
|
+
subcircuit_id: z84.string().optional(),
|
|
1600
|
+
source_component_id: z84.string()
|
|
1583
1601
|
}).describe(
|
|
1584
1602
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
1585
1603
|
);
|
|
1586
1604
|
expectTypesMatch(true);
|
|
1587
1605
|
|
|
1588
1606
|
// src/schematic/schematic_group.ts
|
|
1589
|
-
import { z as
|
|
1590
|
-
var schematic_group =
|
|
1591
|
-
type:
|
|
1607
|
+
import { z as z85 } from "zod";
|
|
1608
|
+
var schematic_group = z85.object({
|
|
1609
|
+
type: z85.literal("schematic_group"),
|
|
1592
1610
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
1593
|
-
source_group_id:
|
|
1594
|
-
is_subcircuit:
|
|
1595
|
-
subcircuit_id:
|
|
1611
|
+
source_group_id: z85.string(),
|
|
1612
|
+
is_subcircuit: z85.boolean().optional(),
|
|
1613
|
+
subcircuit_id: z85.string().optional(),
|
|
1596
1614
|
width: length,
|
|
1597
1615
|
height: length,
|
|
1598
1616
|
center: point,
|
|
1599
|
-
schematic_component_ids:
|
|
1600
|
-
show_as_schematic_box:
|
|
1601
|
-
name:
|
|
1602
|
-
description:
|
|
1617
|
+
schematic_component_ids: z85.array(z85.string()),
|
|
1618
|
+
show_as_schematic_box: z85.boolean().optional(),
|
|
1619
|
+
name: z85.string().optional(),
|
|
1620
|
+
description: z85.string().optional()
|
|
1603
1621
|
}).describe("Defines a group of components on the schematic");
|
|
1604
1622
|
expectTypesMatch(true);
|
|
1605
1623
|
|
|
1606
1624
|
// src/schematic/schematic_table.ts
|
|
1607
|
-
import { z as
|
|
1608
|
-
var schematic_table =
|
|
1609
|
-
type:
|
|
1625
|
+
import { z as z86 } from "zod";
|
|
1626
|
+
var schematic_table = z86.object({
|
|
1627
|
+
type: z86.literal("schematic_table"),
|
|
1610
1628
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
1611
1629
|
anchor_position: point,
|
|
1612
|
-
column_widths:
|
|
1613
|
-
row_heights:
|
|
1630
|
+
column_widths: z86.array(distance),
|
|
1631
|
+
row_heights: z86.array(distance),
|
|
1614
1632
|
cell_padding: distance.optional(),
|
|
1615
1633
|
border_width: distance.optional(),
|
|
1616
|
-
subcircuit_id:
|
|
1617
|
-
schematic_component_id:
|
|
1634
|
+
subcircuit_id: z86.string().optional(),
|
|
1635
|
+
schematic_component_id: z86.string().optional(),
|
|
1618
1636
|
anchor: ninePointAnchor.optional()
|
|
1619
1637
|
}).describe("Defines a table on the schematic");
|
|
1620
1638
|
expectTypesMatch(true);
|
|
1621
1639
|
|
|
1622
1640
|
// src/schematic/schematic_table_cell.ts
|
|
1623
|
-
import { z as
|
|
1624
|
-
var schematic_table_cell =
|
|
1625
|
-
type:
|
|
1641
|
+
import { z as z87 } from "zod";
|
|
1642
|
+
var schematic_table_cell = z87.object({
|
|
1643
|
+
type: z87.literal("schematic_table_cell"),
|
|
1626
1644
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
1627
1645
|
"schematic_table_cell"
|
|
1628
1646
|
),
|
|
1629
|
-
schematic_table_id:
|
|
1630
|
-
start_row_index:
|
|
1631
|
-
end_row_index:
|
|
1632
|
-
start_column_index:
|
|
1633
|
-
end_column_index:
|
|
1634
|
-
text:
|
|
1647
|
+
schematic_table_id: z87.string(),
|
|
1648
|
+
start_row_index: z87.number(),
|
|
1649
|
+
end_row_index: z87.number(),
|
|
1650
|
+
start_column_index: z87.number(),
|
|
1651
|
+
end_column_index: z87.number(),
|
|
1652
|
+
text: z87.string().optional(),
|
|
1635
1653
|
center: point,
|
|
1636
1654
|
width: distance,
|
|
1637
1655
|
height: distance,
|
|
1638
|
-
horizontal_align:
|
|
1639
|
-
vertical_align:
|
|
1656
|
+
horizontal_align: z87.enum(["left", "center", "right"]).optional(),
|
|
1657
|
+
vertical_align: z87.enum(["top", "middle", "bottom"]).optional(),
|
|
1640
1658
|
font_size: distance.optional(),
|
|
1641
|
-
subcircuit_id:
|
|
1659
|
+
subcircuit_id: z87.string().optional()
|
|
1642
1660
|
}).describe("Defines a cell within a schematic_table");
|
|
1643
1661
|
expectTypesMatch(true);
|
|
1644
1662
|
|
|
1645
1663
|
// src/schematic/schematic_sheet.ts
|
|
1646
|
-
import { z as
|
|
1647
|
-
var schematic_sheet =
|
|
1648
|
-
type:
|
|
1664
|
+
import { z as z88 } from "zod";
|
|
1665
|
+
var schematic_sheet = z88.object({
|
|
1666
|
+
type: z88.literal("schematic_sheet"),
|
|
1649
1667
|
schematic_sheet_id: getZodPrefixedIdWithDefault("schematic_sheet"),
|
|
1650
|
-
name:
|
|
1651
|
-
subcircuit_id:
|
|
1668
|
+
name: z88.string().optional(),
|
|
1669
|
+
subcircuit_id: z88.string().optional()
|
|
1652
1670
|
}).describe(
|
|
1653
1671
|
"Defines a schematic sheet or page that components can be placed on"
|
|
1654
1672
|
);
|
|
1655
1673
|
expectTypesMatch(true);
|
|
1656
1674
|
|
|
1657
1675
|
// src/pcb/properties/brep.ts
|
|
1658
|
-
import { z as
|
|
1659
|
-
var point_with_bulge =
|
|
1676
|
+
import { z as z89 } from "zod";
|
|
1677
|
+
var point_with_bulge = z89.object({
|
|
1660
1678
|
x: distance,
|
|
1661
1679
|
y: distance,
|
|
1662
|
-
bulge:
|
|
1680
|
+
bulge: z89.number().optional()
|
|
1663
1681
|
});
|
|
1664
1682
|
expectTypesMatch(true);
|
|
1665
|
-
var ring =
|
|
1666
|
-
vertices:
|
|
1683
|
+
var ring = z89.object({
|
|
1684
|
+
vertices: z89.array(point_with_bulge)
|
|
1667
1685
|
});
|
|
1668
1686
|
expectTypesMatch(true);
|
|
1669
|
-
var brep_shape =
|
|
1687
|
+
var brep_shape = z89.object({
|
|
1670
1688
|
outer_ring: ring,
|
|
1671
|
-
inner_rings:
|
|
1689
|
+
inner_rings: z89.array(ring).default([])
|
|
1672
1690
|
});
|
|
1673
1691
|
expectTypesMatch(true);
|
|
1674
1692
|
|
|
1675
1693
|
// src/pcb/properties/pcb_route_hints.ts
|
|
1676
|
-
import { z as
|
|
1677
|
-
var pcb_route_hint =
|
|
1694
|
+
import { z as z90 } from "zod";
|
|
1695
|
+
var pcb_route_hint = z90.object({
|
|
1678
1696
|
x: distance,
|
|
1679
1697
|
y: distance,
|
|
1680
|
-
via:
|
|
1698
|
+
via: z90.boolean().optional(),
|
|
1681
1699
|
via_to_layer: layer_ref.optional()
|
|
1682
1700
|
});
|
|
1683
|
-
var pcb_route_hints =
|
|
1701
|
+
var pcb_route_hints = z90.array(pcb_route_hint);
|
|
1684
1702
|
expectTypesMatch(true);
|
|
1685
1703
|
expectTypesMatch(true);
|
|
1686
1704
|
|
|
1687
1705
|
// src/pcb/properties/route_hint_point.ts
|
|
1688
|
-
import { z as
|
|
1689
|
-
var route_hint_point =
|
|
1706
|
+
import { z as z91 } from "zod";
|
|
1707
|
+
var route_hint_point = z91.object({
|
|
1690
1708
|
x: distance,
|
|
1691
1709
|
y: distance,
|
|
1692
|
-
via:
|
|
1710
|
+
via: z91.boolean().optional(),
|
|
1693
1711
|
to_layer: layer_ref.optional(),
|
|
1694
1712
|
trace_width: distance.optional()
|
|
1695
1713
|
});
|
|
1696
1714
|
expectTypesMatch(true);
|
|
1697
1715
|
|
|
1698
1716
|
// src/pcb/pcb_component.ts
|
|
1699
|
-
import { z as
|
|
1700
|
-
var pcb_component =
|
|
1701
|
-
type:
|
|
1717
|
+
import { z as z92 } from "zod";
|
|
1718
|
+
var pcb_component = z92.object({
|
|
1719
|
+
type: z92.literal("pcb_component"),
|
|
1702
1720
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
1703
|
-
source_component_id:
|
|
1721
|
+
source_component_id: z92.string(),
|
|
1704
1722
|
center: point,
|
|
1705
1723
|
layer: layer_ref,
|
|
1706
1724
|
rotation,
|
|
1707
|
-
display_offset_x:
|
|
1725
|
+
display_offset_x: z92.string().optional().describe(
|
|
1708
1726
|
"How to display the x offset for this part, usually corresponding with how the user specified it"
|
|
1709
1727
|
),
|
|
1710
|
-
display_offset_y:
|
|
1728
|
+
display_offset_y: z92.string().optional().describe(
|
|
1711
1729
|
"How to display the y offset for this part, usually corresponding with how the user specified it"
|
|
1712
1730
|
),
|
|
1713
1731
|
width: length,
|
|
1714
1732
|
height: length,
|
|
1715
|
-
do_not_place:
|
|
1716
|
-
is_allowed_to_be_off_board:
|
|
1717
|
-
subcircuit_id:
|
|
1718
|
-
pcb_group_id:
|
|
1719
|
-
position_mode:
|
|
1733
|
+
do_not_place: z92.boolean().optional(),
|
|
1734
|
+
is_allowed_to_be_off_board: z92.boolean().optional(),
|
|
1735
|
+
subcircuit_id: z92.string().optional(),
|
|
1736
|
+
pcb_group_id: z92.string().optional(),
|
|
1737
|
+
position_mode: z92.enum([
|
|
1720
1738
|
"packed",
|
|
1721
1739
|
"relative_to_group_anchor",
|
|
1722
1740
|
"relative_to_another_component",
|
|
@@ -1724,122 +1742,122 @@ var pcb_component = z91.object({
|
|
|
1724
1742
|
]).optional(),
|
|
1725
1743
|
anchor_position: point.optional(),
|
|
1726
1744
|
anchor_alignment: ninePointAnchor.optional(),
|
|
1727
|
-
positioned_relative_to_pcb_group_id:
|
|
1728
|
-
positioned_relative_to_pcb_board_id:
|
|
1745
|
+
positioned_relative_to_pcb_group_id: z92.string().optional(),
|
|
1746
|
+
positioned_relative_to_pcb_board_id: z92.string().optional(),
|
|
1729
1747
|
cable_insertion_center: point.optional(),
|
|
1730
|
-
metadata:
|
|
1748
|
+
metadata: z92.object({
|
|
1731
1749
|
kicad_footprint: kicadFootprintMetadata.optional()
|
|
1732
1750
|
}).optional(),
|
|
1733
|
-
obstructs_within_bounds:
|
|
1751
|
+
obstructs_within_bounds: z92.boolean().default(true).describe(
|
|
1734
1752
|
"Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath"
|
|
1735
1753
|
)
|
|
1736
1754
|
}).describe("Defines a component on the PCB");
|
|
1737
1755
|
expectTypesMatch(true);
|
|
1738
1756
|
|
|
1739
1757
|
// src/pcb/pcb_hole.ts
|
|
1740
|
-
import { z as
|
|
1741
|
-
var pcb_hole_circle =
|
|
1742
|
-
type:
|
|
1758
|
+
import { z as z93 } from "zod";
|
|
1759
|
+
var pcb_hole_circle = z93.object({
|
|
1760
|
+
type: z93.literal("pcb_hole"),
|
|
1743
1761
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1744
|
-
pcb_group_id:
|
|
1745
|
-
subcircuit_id:
|
|
1746
|
-
pcb_component_id:
|
|
1747
|
-
hole_shape:
|
|
1748
|
-
hole_diameter:
|
|
1762
|
+
pcb_group_id: z93.string().optional(),
|
|
1763
|
+
subcircuit_id: z93.string().optional(),
|
|
1764
|
+
pcb_component_id: z93.string().optional(),
|
|
1765
|
+
hole_shape: z93.literal("circle"),
|
|
1766
|
+
hole_diameter: z93.number(),
|
|
1749
1767
|
x: distance,
|
|
1750
1768
|
y: distance,
|
|
1751
|
-
is_covered_with_solder_mask:
|
|
1752
|
-
soldermask_margin:
|
|
1769
|
+
is_covered_with_solder_mask: z93.boolean().optional(),
|
|
1770
|
+
soldermask_margin: z93.number().optional()
|
|
1753
1771
|
});
|
|
1754
1772
|
var pcb_hole_circle_shape = pcb_hole_circle.describe(
|
|
1755
1773
|
"Defines a circular hole on the PCB"
|
|
1756
1774
|
);
|
|
1757
1775
|
expectTypesMatch(true);
|
|
1758
|
-
var pcb_hole_rect =
|
|
1759
|
-
type:
|
|
1776
|
+
var pcb_hole_rect = z93.object({
|
|
1777
|
+
type: z93.literal("pcb_hole"),
|
|
1760
1778
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1761
|
-
pcb_group_id:
|
|
1762
|
-
subcircuit_id:
|
|
1763
|
-
pcb_component_id:
|
|
1764
|
-
hole_shape:
|
|
1765
|
-
hole_width:
|
|
1766
|
-
hole_height:
|
|
1779
|
+
pcb_group_id: z93.string().optional(),
|
|
1780
|
+
subcircuit_id: z93.string().optional(),
|
|
1781
|
+
pcb_component_id: z93.string().optional(),
|
|
1782
|
+
hole_shape: z93.literal("rect"),
|
|
1783
|
+
hole_width: z93.number(),
|
|
1784
|
+
hole_height: z93.number(),
|
|
1767
1785
|
x: distance,
|
|
1768
1786
|
y: distance,
|
|
1769
|
-
is_covered_with_solder_mask:
|
|
1770
|
-
soldermask_margin:
|
|
1787
|
+
is_covered_with_solder_mask: z93.boolean().optional(),
|
|
1788
|
+
soldermask_margin: z93.number().optional()
|
|
1771
1789
|
});
|
|
1772
1790
|
var pcb_hole_rect_shape = pcb_hole_rect.describe(
|
|
1773
1791
|
"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
|
|
1774
1792
|
);
|
|
1775
1793
|
expectTypesMatch(true);
|
|
1776
|
-
var pcb_hole_circle_or_square =
|
|
1777
|
-
type:
|
|
1794
|
+
var pcb_hole_circle_or_square = z93.object({
|
|
1795
|
+
type: z93.literal("pcb_hole"),
|
|
1778
1796
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1779
|
-
pcb_group_id:
|
|
1780
|
-
subcircuit_id:
|
|
1781
|
-
pcb_component_id:
|
|
1782
|
-
hole_shape:
|
|
1783
|
-
hole_diameter:
|
|
1797
|
+
pcb_group_id: z93.string().optional(),
|
|
1798
|
+
subcircuit_id: z93.string().optional(),
|
|
1799
|
+
pcb_component_id: z93.string().optional(),
|
|
1800
|
+
hole_shape: z93.enum(["circle", "square"]),
|
|
1801
|
+
hole_diameter: z93.number(),
|
|
1784
1802
|
x: distance,
|
|
1785
1803
|
y: distance,
|
|
1786
|
-
is_covered_with_solder_mask:
|
|
1787
|
-
soldermask_margin:
|
|
1804
|
+
is_covered_with_solder_mask: z93.boolean().optional(),
|
|
1805
|
+
soldermask_margin: z93.number().optional()
|
|
1788
1806
|
});
|
|
1789
1807
|
var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
1790
1808
|
"Defines a circular or square hole on the PCB"
|
|
1791
1809
|
);
|
|
1792
1810
|
expectTypesMatch(true);
|
|
1793
|
-
var pcb_hole_oval =
|
|
1794
|
-
type:
|
|
1811
|
+
var pcb_hole_oval = z93.object({
|
|
1812
|
+
type: z93.literal("pcb_hole"),
|
|
1795
1813
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1796
|
-
pcb_group_id:
|
|
1797
|
-
subcircuit_id:
|
|
1798
|
-
pcb_component_id:
|
|
1799
|
-
hole_shape:
|
|
1800
|
-
hole_width:
|
|
1801
|
-
hole_height:
|
|
1814
|
+
pcb_group_id: z93.string().optional(),
|
|
1815
|
+
subcircuit_id: z93.string().optional(),
|
|
1816
|
+
pcb_component_id: z93.string().optional(),
|
|
1817
|
+
hole_shape: z93.literal("oval"),
|
|
1818
|
+
hole_width: z93.number(),
|
|
1819
|
+
hole_height: z93.number(),
|
|
1802
1820
|
x: distance,
|
|
1803
1821
|
y: distance,
|
|
1804
|
-
is_covered_with_solder_mask:
|
|
1805
|
-
soldermask_margin:
|
|
1822
|
+
is_covered_with_solder_mask: z93.boolean().optional(),
|
|
1823
|
+
soldermask_margin: z93.number().optional()
|
|
1806
1824
|
});
|
|
1807
1825
|
var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
1808
1826
|
"Defines an oval hole on the PCB"
|
|
1809
1827
|
);
|
|
1810
1828
|
expectTypesMatch(true);
|
|
1811
|
-
var pcb_hole_pill =
|
|
1812
|
-
type:
|
|
1829
|
+
var pcb_hole_pill = z93.object({
|
|
1830
|
+
type: z93.literal("pcb_hole"),
|
|
1813
1831
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1814
|
-
pcb_group_id:
|
|
1815
|
-
subcircuit_id:
|
|
1816
|
-
pcb_component_id:
|
|
1817
|
-
hole_shape:
|
|
1818
|
-
hole_width:
|
|
1819
|
-
hole_height:
|
|
1832
|
+
pcb_group_id: z93.string().optional(),
|
|
1833
|
+
subcircuit_id: z93.string().optional(),
|
|
1834
|
+
pcb_component_id: z93.string().optional(),
|
|
1835
|
+
hole_shape: z93.literal("pill"),
|
|
1836
|
+
hole_width: z93.number(),
|
|
1837
|
+
hole_height: z93.number(),
|
|
1820
1838
|
x: distance,
|
|
1821
1839
|
y: distance,
|
|
1822
|
-
is_covered_with_solder_mask:
|
|
1823
|
-
soldermask_margin:
|
|
1840
|
+
is_covered_with_solder_mask: z93.boolean().optional(),
|
|
1841
|
+
soldermask_margin: z93.number().optional()
|
|
1824
1842
|
});
|
|
1825
1843
|
var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
1826
1844
|
"Defines a pill-shaped hole on the PCB"
|
|
1827
1845
|
);
|
|
1828
1846
|
expectTypesMatch(true);
|
|
1829
|
-
var pcb_hole_rotated_pill =
|
|
1830
|
-
type:
|
|
1847
|
+
var pcb_hole_rotated_pill = z93.object({
|
|
1848
|
+
type: z93.literal("pcb_hole"),
|
|
1831
1849
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1832
|
-
pcb_group_id:
|
|
1833
|
-
subcircuit_id:
|
|
1834
|
-
pcb_component_id:
|
|
1835
|
-
hole_shape:
|
|
1836
|
-
hole_width:
|
|
1837
|
-
hole_height:
|
|
1850
|
+
pcb_group_id: z93.string().optional(),
|
|
1851
|
+
subcircuit_id: z93.string().optional(),
|
|
1852
|
+
pcb_component_id: z93.string().optional(),
|
|
1853
|
+
hole_shape: z93.literal("rotated_pill"),
|
|
1854
|
+
hole_width: z93.number(),
|
|
1855
|
+
hole_height: z93.number(),
|
|
1838
1856
|
x: distance,
|
|
1839
1857
|
y: distance,
|
|
1840
1858
|
ccw_rotation: rotation,
|
|
1841
|
-
is_covered_with_solder_mask:
|
|
1842
|
-
soldermask_margin:
|
|
1859
|
+
is_covered_with_solder_mask: z93.boolean().optional(),
|
|
1860
|
+
soldermask_margin: z93.number().optional()
|
|
1843
1861
|
});
|
|
1844
1862
|
var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
|
|
1845
1863
|
"Defines a rotated pill-shaped hole on the PCB"
|
|
@@ -1848,147 +1866,147 @@ expectTypesMatch(true);
|
|
|
1848
1866
|
var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval).or(pcb_hole_pill).or(pcb_hole_rotated_pill).or(pcb_hole_circle).or(pcb_hole_rect);
|
|
1849
1867
|
|
|
1850
1868
|
// src/pcb/pcb_plated_hole.ts
|
|
1851
|
-
import { z as
|
|
1852
|
-
var pcb_plated_hole_circle =
|
|
1853
|
-
type:
|
|
1854
|
-
shape:
|
|
1855
|
-
pcb_group_id:
|
|
1856
|
-
subcircuit_id:
|
|
1857
|
-
outer_diameter:
|
|
1858
|
-
hole_diameter:
|
|
1859
|
-
is_covered_with_solder_mask:
|
|
1869
|
+
import { z as z94 } from "zod";
|
|
1870
|
+
var pcb_plated_hole_circle = z94.object({
|
|
1871
|
+
type: z94.literal("pcb_plated_hole"),
|
|
1872
|
+
shape: z94.literal("circle"),
|
|
1873
|
+
pcb_group_id: z94.string().optional(),
|
|
1874
|
+
subcircuit_id: z94.string().optional(),
|
|
1875
|
+
outer_diameter: z94.number(),
|
|
1876
|
+
hole_diameter: z94.number(),
|
|
1877
|
+
is_covered_with_solder_mask: z94.boolean().optional(),
|
|
1860
1878
|
x: distance,
|
|
1861
1879
|
y: distance,
|
|
1862
|
-
layers:
|
|
1863
|
-
port_hints:
|
|
1864
|
-
pcb_component_id:
|
|
1865
|
-
pcb_port_id:
|
|
1880
|
+
layers: z94.array(layer_ref),
|
|
1881
|
+
port_hints: z94.array(z94.string()).optional(),
|
|
1882
|
+
pcb_component_id: z94.string().optional(),
|
|
1883
|
+
pcb_port_id: z94.string().optional(),
|
|
1866
1884
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1867
|
-
soldermask_margin:
|
|
1885
|
+
soldermask_margin: z94.number().optional()
|
|
1868
1886
|
});
|
|
1869
|
-
var pcb_plated_hole_oval =
|
|
1870
|
-
type:
|
|
1871
|
-
shape:
|
|
1872
|
-
pcb_group_id:
|
|
1873
|
-
subcircuit_id:
|
|
1874
|
-
outer_width:
|
|
1875
|
-
outer_height:
|
|
1876
|
-
hole_width:
|
|
1877
|
-
hole_height:
|
|
1878
|
-
is_covered_with_solder_mask:
|
|
1887
|
+
var pcb_plated_hole_oval = z94.object({
|
|
1888
|
+
type: z94.literal("pcb_plated_hole"),
|
|
1889
|
+
shape: z94.enum(["oval", "pill"]),
|
|
1890
|
+
pcb_group_id: z94.string().optional(),
|
|
1891
|
+
subcircuit_id: z94.string().optional(),
|
|
1892
|
+
outer_width: z94.number(),
|
|
1893
|
+
outer_height: z94.number(),
|
|
1894
|
+
hole_width: z94.number(),
|
|
1895
|
+
hole_height: z94.number(),
|
|
1896
|
+
is_covered_with_solder_mask: z94.boolean().optional(),
|
|
1879
1897
|
x: distance,
|
|
1880
1898
|
y: distance,
|
|
1881
1899
|
ccw_rotation: rotation,
|
|
1882
|
-
layers:
|
|
1883
|
-
port_hints:
|
|
1884
|
-
pcb_component_id:
|
|
1885
|
-
pcb_port_id:
|
|
1900
|
+
layers: z94.array(layer_ref),
|
|
1901
|
+
port_hints: z94.array(z94.string()).optional(),
|
|
1902
|
+
pcb_component_id: z94.string().optional(),
|
|
1903
|
+
pcb_port_id: z94.string().optional(),
|
|
1886
1904
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1887
|
-
soldermask_margin:
|
|
1905
|
+
soldermask_margin: z94.number().optional()
|
|
1888
1906
|
});
|
|
1889
|
-
var pcb_circular_hole_with_rect_pad =
|
|
1890
|
-
type:
|
|
1891
|
-
shape:
|
|
1892
|
-
pcb_group_id:
|
|
1893
|
-
subcircuit_id:
|
|
1894
|
-
hole_shape:
|
|
1895
|
-
pad_shape:
|
|
1896
|
-
hole_diameter:
|
|
1897
|
-
rect_pad_width:
|
|
1898
|
-
rect_pad_height:
|
|
1899
|
-
rect_border_radius:
|
|
1907
|
+
var pcb_circular_hole_with_rect_pad = z94.object({
|
|
1908
|
+
type: z94.literal("pcb_plated_hole"),
|
|
1909
|
+
shape: z94.literal("circular_hole_with_rect_pad"),
|
|
1910
|
+
pcb_group_id: z94.string().optional(),
|
|
1911
|
+
subcircuit_id: z94.string().optional(),
|
|
1912
|
+
hole_shape: z94.literal("circle"),
|
|
1913
|
+
pad_shape: z94.literal("rect"),
|
|
1914
|
+
hole_diameter: z94.number(),
|
|
1915
|
+
rect_pad_width: z94.number(),
|
|
1916
|
+
rect_pad_height: z94.number(),
|
|
1917
|
+
rect_border_radius: z94.number().optional(),
|
|
1900
1918
|
hole_offset_x: distance.default(0),
|
|
1901
1919
|
hole_offset_y: distance.default(0),
|
|
1902
|
-
is_covered_with_solder_mask:
|
|
1920
|
+
is_covered_with_solder_mask: z94.boolean().optional(),
|
|
1903
1921
|
x: distance,
|
|
1904
1922
|
y: distance,
|
|
1905
|
-
layers:
|
|
1906
|
-
port_hints:
|
|
1907
|
-
pcb_component_id:
|
|
1908
|
-
pcb_port_id:
|
|
1923
|
+
layers: z94.array(layer_ref),
|
|
1924
|
+
port_hints: z94.array(z94.string()).optional(),
|
|
1925
|
+
pcb_component_id: z94.string().optional(),
|
|
1926
|
+
pcb_port_id: z94.string().optional(),
|
|
1909
1927
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1910
|
-
soldermask_margin:
|
|
1928
|
+
soldermask_margin: z94.number().optional(),
|
|
1911
1929
|
rect_ccw_rotation: rotation.optional()
|
|
1912
1930
|
});
|
|
1913
|
-
var pcb_pill_hole_with_rect_pad =
|
|
1914
|
-
type:
|
|
1915
|
-
shape:
|
|
1916
|
-
pcb_group_id:
|
|
1917
|
-
subcircuit_id:
|
|
1918
|
-
hole_shape:
|
|
1919
|
-
pad_shape:
|
|
1920
|
-
hole_width:
|
|
1921
|
-
hole_height:
|
|
1922
|
-
rect_pad_width:
|
|
1923
|
-
rect_pad_height:
|
|
1924
|
-
rect_border_radius:
|
|
1931
|
+
var pcb_pill_hole_with_rect_pad = z94.object({
|
|
1932
|
+
type: z94.literal("pcb_plated_hole"),
|
|
1933
|
+
shape: z94.literal("pill_hole_with_rect_pad"),
|
|
1934
|
+
pcb_group_id: z94.string().optional(),
|
|
1935
|
+
subcircuit_id: z94.string().optional(),
|
|
1936
|
+
hole_shape: z94.literal("pill"),
|
|
1937
|
+
pad_shape: z94.literal("rect"),
|
|
1938
|
+
hole_width: z94.number(),
|
|
1939
|
+
hole_height: z94.number(),
|
|
1940
|
+
rect_pad_width: z94.number(),
|
|
1941
|
+
rect_pad_height: z94.number(),
|
|
1942
|
+
rect_border_radius: z94.number().optional(),
|
|
1925
1943
|
hole_offset_x: distance.default(0),
|
|
1926
1944
|
hole_offset_y: distance.default(0),
|
|
1927
|
-
is_covered_with_solder_mask:
|
|
1945
|
+
is_covered_with_solder_mask: z94.boolean().optional(),
|
|
1928
1946
|
x: distance,
|
|
1929
1947
|
y: distance,
|
|
1930
|
-
layers:
|
|
1931
|
-
port_hints:
|
|
1932
|
-
pcb_component_id:
|
|
1933
|
-
pcb_port_id:
|
|
1948
|
+
layers: z94.array(layer_ref),
|
|
1949
|
+
port_hints: z94.array(z94.string()).optional(),
|
|
1950
|
+
pcb_component_id: z94.string().optional(),
|
|
1951
|
+
pcb_port_id: z94.string().optional(),
|
|
1934
1952
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1935
|
-
soldermask_margin:
|
|
1953
|
+
soldermask_margin: z94.number().optional()
|
|
1936
1954
|
});
|
|
1937
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
1938
|
-
type:
|
|
1939
|
-
shape:
|
|
1940
|
-
pcb_group_id:
|
|
1941
|
-
subcircuit_id:
|
|
1942
|
-
hole_shape:
|
|
1943
|
-
pad_shape:
|
|
1944
|
-
hole_width:
|
|
1945
|
-
hole_height:
|
|
1955
|
+
var pcb_rotated_pill_hole_with_rect_pad = z94.object({
|
|
1956
|
+
type: z94.literal("pcb_plated_hole"),
|
|
1957
|
+
shape: z94.literal("rotated_pill_hole_with_rect_pad"),
|
|
1958
|
+
pcb_group_id: z94.string().optional(),
|
|
1959
|
+
subcircuit_id: z94.string().optional(),
|
|
1960
|
+
hole_shape: z94.literal("rotated_pill"),
|
|
1961
|
+
pad_shape: z94.literal("rect"),
|
|
1962
|
+
hole_width: z94.number(),
|
|
1963
|
+
hole_height: z94.number(),
|
|
1946
1964
|
hole_ccw_rotation: rotation,
|
|
1947
|
-
rect_pad_width:
|
|
1948
|
-
rect_pad_height:
|
|
1949
|
-
rect_border_radius:
|
|
1965
|
+
rect_pad_width: z94.number(),
|
|
1966
|
+
rect_pad_height: z94.number(),
|
|
1967
|
+
rect_border_radius: z94.number().optional(),
|
|
1950
1968
|
rect_ccw_rotation: rotation,
|
|
1951
1969
|
hole_offset_x: distance.default(0),
|
|
1952
1970
|
hole_offset_y: distance.default(0),
|
|
1953
|
-
is_covered_with_solder_mask:
|
|
1971
|
+
is_covered_with_solder_mask: z94.boolean().optional(),
|
|
1954
1972
|
x: distance,
|
|
1955
1973
|
y: distance,
|
|
1956
|
-
layers:
|
|
1957
|
-
port_hints:
|
|
1958
|
-
pcb_component_id:
|
|
1959
|
-
pcb_port_id:
|
|
1974
|
+
layers: z94.array(layer_ref),
|
|
1975
|
+
port_hints: z94.array(z94.string()).optional(),
|
|
1976
|
+
pcb_component_id: z94.string().optional(),
|
|
1977
|
+
pcb_port_id: z94.string().optional(),
|
|
1960
1978
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1961
|
-
soldermask_margin:
|
|
1979
|
+
soldermask_margin: z94.number().optional()
|
|
1962
1980
|
});
|
|
1963
|
-
var pcb_hole_with_polygon_pad =
|
|
1964
|
-
type:
|
|
1965
|
-
shape:
|
|
1966
|
-
pcb_group_id:
|
|
1967
|
-
subcircuit_id:
|
|
1968
|
-
hole_shape:
|
|
1969
|
-
hole_diameter:
|
|
1970
|
-
hole_width:
|
|
1971
|
-
hole_height:
|
|
1972
|
-
pad_outline:
|
|
1973
|
-
|
|
1981
|
+
var pcb_hole_with_polygon_pad = z94.object({
|
|
1982
|
+
type: z94.literal("pcb_plated_hole"),
|
|
1983
|
+
shape: z94.literal("hole_with_polygon_pad"),
|
|
1984
|
+
pcb_group_id: z94.string().optional(),
|
|
1985
|
+
subcircuit_id: z94.string().optional(),
|
|
1986
|
+
hole_shape: z94.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
1987
|
+
hole_diameter: z94.number().optional(),
|
|
1988
|
+
hole_width: z94.number().optional(),
|
|
1989
|
+
hole_height: z94.number().optional(),
|
|
1990
|
+
pad_outline: z94.array(
|
|
1991
|
+
z94.object({
|
|
1974
1992
|
x: distance,
|
|
1975
1993
|
y: distance
|
|
1976
1994
|
})
|
|
1977
1995
|
).min(3),
|
|
1978
1996
|
hole_offset_x: distance.default(0),
|
|
1979
1997
|
hole_offset_y: distance.default(0),
|
|
1980
|
-
is_covered_with_solder_mask:
|
|
1998
|
+
is_covered_with_solder_mask: z94.boolean().optional(),
|
|
1981
1999
|
x: distance,
|
|
1982
2000
|
y: distance,
|
|
1983
|
-
layers:
|
|
1984
|
-
port_hints:
|
|
1985
|
-
pcb_component_id:
|
|
1986
|
-
pcb_port_id:
|
|
2001
|
+
layers: z94.array(layer_ref),
|
|
2002
|
+
port_hints: z94.array(z94.string()).optional(),
|
|
2003
|
+
pcb_component_id: z94.string().optional(),
|
|
2004
|
+
pcb_port_id: z94.string().optional(),
|
|
1987
2005
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1988
|
-
soldermask_margin:
|
|
2006
|
+
soldermask_margin: z94.number().optional(),
|
|
1989
2007
|
ccw_rotation: rotation.optional()
|
|
1990
2008
|
});
|
|
1991
|
-
var pcb_plated_hole =
|
|
2009
|
+
var pcb_plated_hole = z94.union([
|
|
1992
2010
|
pcb_plated_hole_circle,
|
|
1993
2011
|
pcb_plated_hole_oval,
|
|
1994
2012
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -2006,138 +2024,138 @@ expectTypesMatch(true);
|
|
|
2006
2024
|
expectTypesMatch(true);
|
|
2007
2025
|
|
|
2008
2026
|
// src/pcb/pcb_port.ts
|
|
2009
|
-
import { z as
|
|
2010
|
-
var pcb_port =
|
|
2011
|
-
type:
|
|
2027
|
+
import { z as z95 } from "zod";
|
|
2028
|
+
var pcb_port = z95.object({
|
|
2029
|
+
type: z95.literal("pcb_port"),
|
|
2012
2030
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
2013
|
-
pcb_group_id:
|
|
2014
|
-
subcircuit_id:
|
|
2015
|
-
source_port_id:
|
|
2016
|
-
pcb_component_id:
|
|
2031
|
+
pcb_group_id: z95.string().optional(),
|
|
2032
|
+
subcircuit_id: z95.string().optional(),
|
|
2033
|
+
source_port_id: z95.string(),
|
|
2034
|
+
pcb_component_id: z95.string().optional(),
|
|
2017
2035
|
x: distance,
|
|
2018
2036
|
y: distance,
|
|
2019
|
-
layers:
|
|
2020
|
-
is_board_pinout:
|
|
2037
|
+
layers: z95.array(layer_ref),
|
|
2038
|
+
is_board_pinout: z95.boolean().optional()
|
|
2021
2039
|
}).describe("Defines a port on the PCB");
|
|
2022
2040
|
expectTypesMatch(true);
|
|
2023
2041
|
|
|
2024
2042
|
// src/pcb/pcb_smtpad.ts
|
|
2025
|
-
import { z as
|
|
2026
|
-
var pcb_smtpad_circle =
|
|
2027
|
-
type:
|
|
2028
|
-
shape:
|
|
2043
|
+
import { z as z96 } from "zod";
|
|
2044
|
+
var pcb_smtpad_circle = z96.object({
|
|
2045
|
+
type: z96.literal("pcb_smtpad"),
|
|
2046
|
+
shape: z96.literal("circle"),
|
|
2029
2047
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2030
|
-
pcb_group_id:
|
|
2031
|
-
subcircuit_id:
|
|
2048
|
+
pcb_group_id: z96.string().optional(),
|
|
2049
|
+
subcircuit_id: z96.string().optional(),
|
|
2032
2050
|
x: distance,
|
|
2033
2051
|
y: distance,
|
|
2034
|
-
radius:
|
|
2052
|
+
radius: z96.number(),
|
|
2035
2053
|
layer: layer_ref,
|
|
2036
|
-
port_hints:
|
|
2037
|
-
pcb_component_id:
|
|
2038
|
-
pcb_port_id:
|
|
2039
|
-
is_covered_with_solder_mask:
|
|
2040
|
-
soldermask_margin:
|
|
2054
|
+
port_hints: z96.array(z96.string()).optional(),
|
|
2055
|
+
pcb_component_id: z96.string().optional(),
|
|
2056
|
+
pcb_port_id: z96.string().optional(),
|
|
2057
|
+
is_covered_with_solder_mask: z96.boolean().optional(),
|
|
2058
|
+
soldermask_margin: z96.number().optional()
|
|
2041
2059
|
});
|
|
2042
|
-
var pcb_smtpad_rect =
|
|
2043
|
-
type:
|
|
2044
|
-
shape:
|
|
2060
|
+
var pcb_smtpad_rect = z96.object({
|
|
2061
|
+
type: z96.literal("pcb_smtpad"),
|
|
2062
|
+
shape: z96.literal("rect"),
|
|
2045
2063
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2046
|
-
pcb_group_id:
|
|
2047
|
-
subcircuit_id:
|
|
2064
|
+
pcb_group_id: z96.string().optional(),
|
|
2065
|
+
subcircuit_id: z96.string().optional(),
|
|
2048
2066
|
x: distance,
|
|
2049
2067
|
y: distance,
|
|
2050
|
-
width:
|
|
2051
|
-
height:
|
|
2052
|
-
rect_border_radius:
|
|
2053
|
-
corner_radius:
|
|
2068
|
+
width: z96.number(),
|
|
2069
|
+
height: z96.number(),
|
|
2070
|
+
rect_border_radius: z96.number().optional(),
|
|
2071
|
+
corner_radius: z96.number().optional(),
|
|
2054
2072
|
layer: layer_ref,
|
|
2055
|
-
port_hints:
|
|
2056
|
-
pcb_component_id:
|
|
2057
|
-
pcb_port_id:
|
|
2058
|
-
is_covered_with_solder_mask:
|
|
2059
|
-
soldermask_margin:
|
|
2060
|
-
soldermask_margin_left:
|
|
2061
|
-
soldermask_margin_top:
|
|
2062
|
-
soldermask_margin_right:
|
|
2063
|
-
soldermask_margin_bottom:
|
|
2064
|
-
});
|
|
2065
|
-
var pcb_smtpad_rotated_rect =
|
|
2066
|
-
type:
|
|
2067
|
-
shape:
|
|
2073
|
+
port_hints: z96.array(z96.string()).optional(),
|
|
2074
|
+
pcb_component_id: z96.string().optional(),
|
|
2075
|
+
pcb_port_id: z96.string().optional(),
|
|
2076
|
+
is_covered_with_solder_mask: z96.boolean().optional(),
|
|
2077
|
+
soldermask_margin: z96.number().optional(),
|
|
2078
|
+
soldermask_margin_left: z96.number().optional(),
|
|
2079
|
+
soldermask_margin_top: z96.number().optional(),
|
|
2080
|
+
soldermask_margin_right: z96.number().optional(),
|
|
2081
|
+
soldermask_margin_bottom: z96.number().optional()
|
|
2082
|
+
});
|
|
2083
|
+
var pcb_smtpad_rotated_rect = z96.object({
|
|
2084
|
+
type: z96.literal("pcb_smtpad"),
|
|
2085
|
+
shape: z96.literal("rotated_rect"),
|
|
2068
2086
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2069
|
-
pcb_group_id:
|
|
2070
|
-
subcircuit_id:
|
|
2087
|
+
pcb_group_id: z96.string().optional(),
|
|
2088
|
+
subcircuit_id: z96.string().optional(),
|
|
2071
2089
|
x: distance,
|
|
2072
2090
|
y: distance,
|
|
2073
|
-
width:
|
|
2074
|
-
height:
|
|
2075
|
-
rect_border_radius:
|
|
2076
|
-
corner_radius:
|
|
2091
|
+
width: z96.number(),
|
|
2092
|
+
height: z96.number(),
|
|
2093
|
+
rect_border_radius: z96.number().optional(),
|
|
2094
|
+
corner_radius: z96.number().optional(),
|
|
2077
2095
|
ccw_rotation: rotation,
|
|
2078
2096
|
layer: layer_ref,
|
|
2079
|
-
port_hints:
|
|
2080
|
-
pcb_component_id:
|
|
2081
|
-
pcb_port_id:
|
|
2082
|
-
is_covered_with_solder_mask:
|
|
2083
|
-
soldermask_margin:
|
|
2084
|
-
soldermask_margin_left:
|
|
2085
|
-
soldermask_margin_top:
|
|
2086
|
-
soldermask_margin_right:
|
|
2087
|
-
soldermask_margin_bottom:
|
|
2088
|
-
});
|
|
2089
|
-
var pcb_smtpad_pill =
|
|
2090
|
-
type:
|
|
2091
|
-
shape:
|
|
2097
|
+
port_hints: z96.array(z96.string()).optional(),
|
|
2098
|
+
pcb_component_id: z96.string().optional(),
|
|
2099
|
+
pcb_port_id: z96.string().optional(),
|
|
2100
|
+
is_covered_with_solder_mask: z96.boolean().optional(),
|
|
2101
|
+
soldermask_margin: z96.number().optional(),
|
|
2102
|
+
soldermask_margin_left: z96.number().optional(),
|
|
2103
|
+
soldermask_margin_top: z96.number().optional(),
|
|
2104
|
+
soldermask_margin_right: z96.number().optional(),
|
|
2105
|
+
soldermask_margin_bottom: z96.number().optional()
|
|
2106
|
+
});
|
|
2107
|
+
var pcb_smtpad_pill = z96.object({
|
|
2108
|
+
type: z96.literal("pcb_smtpad"),
|
|
2109
|
+
shape: z96.literal("pill"),
|
|
2092
2110
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2093
|
-
pcb_group_id:
|
|
2094
|
-
subcircuit_id:
|
|
2111
|
+
pcb_group_id: z96.string().optional(),
|
|
2112
|
+
subcircuit_id: z96.string().optional(),
|
|
2095
2113
|
x: distance,
|
|
2096
2114
|
y: distance,
|
|
2097
|
-
width:
|
|
2098
|
-
height:
|
|
2099
|
-
radius:
|
|
2115
|
+
width: z96.number(),
|
|
2116
|
+
height: z96.number(),
|
|
2117
|
+
radius: z96.number(),
|
|
2100
2118
|
layer: layer_ref,
|
|
2101
|
-
port_hints:
|
|
2102
|
-
pcb_component_id:
|
|
2103
|
-
pcb_port_id:
|
|
2104
|
-
is_covered_with_solder_mask:
|
|
2105
|
-
soldermask_margin:
|
|
2119
|
+
port_hints: z96.array(z96.string()).optional(),
|
|
2120
|
+
pcb_component_id: z96.string().optional(),
|
|
2121
|
+
pcb_port_id: z96.string().optional(),
|
|
2122
|
+
is_covered_with_solder_mask: z96.boolean().optional(),
|
|
2123
|
+
soldermask_margin: z96.number().optional()
|
|
2106
2124
|
});
|
|
2107
|
-
var pcb_smtpad_rotated_pill =
|
|
2108
|
-
type:
|
|
2109
|
-
shape:
|
|
2125
|
+
var pcb_smtpad_rotated_pill = z96.object({
|
|
2126
|
+
type: z96.literal("pcb_smtpad"),
|
|
2127
|
+
shape: z96.literal("rotated_pill"),
|
|
2110
2128
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2111
|
-
pcb_group_id:
|
|
2112
|
-
subcircuit_id:
|
|
2129
|
+
pcb_group_id: z96.string().optional(),
|
|
2130
|
+
subcircuit_id: z96.string().optional(),
|
|
2113
2131
|
x: distance,
|
|
2114
2132
|
y: distance,
|
|
2115
|
-
width:
|
|
2116
|
-
height:
|
|
2117
|
-
radius:
|
|
2133
|
+
width: z96.number(),
|
|
2134
|
+
height: z96.number(),
|
|
2135
|
+
radius: z96.number(),
|
|
2118
2136
|
ccw_rotation: rotation,
|
|
2119
2137
|
layer: layer_ref,
|
|
2120
|
-
port_hints:
|
|
2121
|
-
pcb_component_id:
|
|
2122
|
-
pcb_port_id:
|
|
2123
|
-
is_covered_with_solder_mask:
|
|
2124
|
-
soldermask_margin:
|
|
2138
|
+
port_hints: z96.array(z96.string()).optional(),
|
|
2139
|
+
pcb_component_id: z96.string().optional(),
|
|
2140
|
+
pcb_port_id: z96.string().optional(),
|
|
2141
|
+
is_covered_with_solder_mask: z96.boolean().optional(),
|
|
2142
|
+
soldermask_margin: z96.number().optional()
|
|
2125
2143
|
});
|
|
2126
|
-
var pcb_smtpad_polygon =
|
|
2127
|
-
type:
|
|
2128
|
-
shape:
|
|
2144
|
+
var pcb_smtpad_polygon = z96.object({
|
|
2145
|
+
type: z96.literal("pcb_smtpad"),
|
|
2146
|
+
shape: z96.literal("polygon"),
|
|
2129
2147
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2130
|
-
pcb_group_id:
|
|
2131
|
-
subcircuit_id:
|
|
2132
|
-
points:
|
|
2148
|
+
pcb_group_id: z96.string().optional(),
|
|
2149
|
+
subcircuit_id: z96.string().optional(),
|
|
2150
|
+
points: z96.array(point),
|
|
2133
2151
|
layer: layer_ref,
|
|
2134
|
-
port_hints:
|
|
2135
|
-
pcb_component_id:
|
|
2136
|
-
pcb_port_id:
|
|
2137
|
-
is_covered_with_solder_mask:
|
|
2138
|
-
soldermask_margin:
|
|
2152
|
+
port_hints: z96.array(z96.string()).optional(),
|
|
2153
|
+
pcb_component_id: z96.string().optional(),
|
|
2154
|
+
pcb_port_id: z96.string().optional(),
|
|
2155
|
+
is_covered_with_solder_mask: z96.boolean().optional(),
|
|
2156
|
+
soldermask_margin: z96.number().optional()
|
|
2139
2157
|
});
|
|
2140
|
-
var pcb_smtpad =
|
|
2158
|
+
var pcb_smtpad = z96.discriminatedUnion("shape", [
|
|
2141
2159
|
pcb_smtpad_circle,
|
|
2142
2160
|
pcb_smtpad_rect,
|
|
2143
2161
|
pcb_smtpad_rotated_rect,
|
|
@@ -2153,79 +2171,79 @@ expectTypesMatch(true);
|
|
|
2153
2171
|
expectTypesMatch(true);
|
|
2154
2172
|
|
|
2155
2173
|
// src/pcb/pcb_solder_paste.ts
|
|
2156
|
-
import { z as
|
|
2157
|
-
var pcb_solder_paste_circle =
|
|
2158
|
-
type:
|
|
2159
|
-
shape:
|
|
2174
|
+
import { z as z97 } from "zod";
|
|
2175
|
+
var pcb_solder_paste_circle = z97.object({
|
|
2176
|
+
type: z97.literal("pcb_solder_paste"),
|
|
2177
|
+
shape: z97.literal("circle"),
|
|
2160
2178
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2161
|
-
pcb_group_id:
|
|
2162
|
-
subcircuit_id:
|
|
2179
|
+
pcb_group_id: z97.string().optional(),
|
|
2180
|
+
subcircuit_id: z97.string().optional(),
|
|
2163
2181
|
x: distance,
|
|
2164
2182
|
y: distance,
|
|
2165
|
-
radius:
|
|
2183
|
+
radius: z97.number(),
|
|
2166
2184
|
layer: layer_ref,
|
|
2167
|
-
pcb_component_id:
|
|
2168
|
-
pcb_smtpad_id:
|
|
2185
|
+
pcb_component_id: z97.string().optional(),
|
|
2186
|
+
pcb_smtpad_id: z97.string().optional()
|
|
2169
2187
|
});
|
|
2170
|
-
var pcb_solder_paste_rect =
|
|
2171
|
-
type:
|
|
2172
|
-
shape:
|
|
2188
|
+
var pcb_solder_paste_rect = z97.object({
|
|
2189
|
+
type: z97.literal("pcb_solder_paste"),
|
|
2190
|
+
shape: z97.literal("rect"),
|
|
2173
2191
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2174
|
-
pcb_group_id:
|
|
2175
|
-
subcircuit_id:
|
|
2192
|
+
pcb_group_id: z97.string().optional(),
|
|
2193
|
+
subcircuit_id: z97.string().optional(),
|
|
2176
2194
|
x: distance,
|
|
2177
2195
|
y: distance,
|
|
2178
|
-
width:
|
|
2179
|
-
height:
|
|
2196
|
+
width: z97.number(),
|
|
2197
|
+
height: z97.number(),
|
|
2180
2198
|
layer: layer_ref,
|
|
2181
|
-
pcb_component_id:
|
|
2182
|
-
pcb_smtpad_id:
|
|
2199
|
+
pcb_component_id: z97.string().optional(),
|
|
2200
|
+
pcb_smtpad_id: z97.string().optional()
|
|
2183
2201
|
});
|
|
2184
|
-
var pcb_solder_paste_pill =
|
|
2185
|
-
type:
|
|
2186
|
-
shape:
|
|
2202
|
+
var pcb_solder_paste_pill = z97.object({
|
|
2203
|
+
type: z97.literal("pcb_solder_paste"),
|
|
2204
|
+
shape: z97.literal("pill"),
|
|
2187
2205
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2188
|
-
pcb_group_id:
|
|
2189
|
-
subcircuit_id:
|
|
2206
|
+
pcb_group_id: z97.string().optional(),
|
|
2207
|
+
subcircuit_id: z97.string().optional(),
|
|
2190
2208
|
x: distance,
|
|
2191
2209
|
y: distance,
|
|
2192
|
-
width:
|
|
2193
|
-
height:
|
|
2194
|
-
radius:
|
|
2210
|
+
width: z97.number(),
|
|
2211
|
+
height: z97.number(),
|
|
2212
|
+
radius: z97.number(),
|
|
2195
2213
|
layer: layer_ref,
|
|
2196
|
-
pcb_component_id:
|
|
2197
|
-
pcb_smtpad_id:
|
|
2214
|
+
pcb_component_id: z97.string().optional(),
|
|
2215
|
+
pcb_smtpad_id: z97.string().optional()
|
|
2198
2216
|
});
|
|
2199
|
-
var pcb_solder_paste_rotated_rect =
|
|
2200
|
-
type:
|
|
2201
|
-
shape:
|
|
2217
|
+
var pcb_solder_paste_rotated_rect = z97.object({
|
|
2218
|
+
type: z97.literal("pcb_solder_paste"),
|
|
2219
|
+
shape: z97.literal("rotated_rect"),
|
|
2202
2220
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2203
|
-
pcb_group_id:
|
|
2204
|
-
subcircuit_id:
|
|
2221
|
+
pcb_group_id: z97.string().optional(),
|
|
2222
|
+
subcircuit_id: z97.string().optional(),
|
|
2205
2223
|
x: distance,
|
|
2206
2224
|
y: distance,
|
|
2207
|
-
width:
|
|
2208
|
-
height:
|
|
2225
|
+
width: z97.number(),
|
|
2226
|
+
height: z97.number(),
|
|
2209
2227
|
ccw_rotation: distance,
|
|
2210
2228
|
layer: layer_ref,
|
|
2211
|
-
pcb_component_id:
|
|
2212
|
-
pcb_smtpad_id:
|
|
2229
|
+
pcb_component_id: z97.string().optional(),
|
|
2230
|
+
pcb_smtpad_id: z97.string().optional()
|
|
2213
2231
|
});
|
|
2214
|
-
var pcb_solder_paste_oval =
|
|
2215
|
-
type:
|
|
2216
|
-
shape:
|
|
2232
|
+
var pcb_solder_paste_oval = z97.object({
|
|
2233
|
+
type: z97.literal("pcb_solder_paste"),
|
|
2234
|
+
shape: z97.literal("oval"),
|
|
2217
2235
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2218
|
-
pcb_group_id:
|
|
2219
|
-
subcircuit_id:
|
|
2236
|
+
pcb_group_id: z97.string().optional(),
|
|
2237
|
+
subcircuit_id: z97.string().optional(),
|
|
2220
2238
|
x: distance,
|
|
2221
2239
|
y: distance,
|
|
2222
|
-
width:
|
|
2223
|
-
height:
|
|
2240
|
+
width: z97.number(),
|
|
2241
|
+
height: z97.number(),
|
|
2224
2242
|
layer: layer_ref,
|
|
2225
|
-
pcb_component_id:
|
|
2226
|
-
pcb_smtpad_id:
|
|
2243
|
+
pcb_component_id: z97.string().optional(),
|
|
2244
|
+
pcb_smtpad_id: z97.string().optional()
|
|
2227
2245
|
});
|
|
2228
|
-
var pcb_solder_paste =
|
|
2246
|
+
var pcb_solder_paste = z97.union([
|
|
2229
2247
|
pcb_solder_paste_circle,
|
|
2230
2248
|
pcb_solder_paste_rect,
|
|
2231
2249
|
pcb_solder_paste_pill,
|
|
@@ -2241,146 +2259,146 @@ expectTypesMatch(
|
|
|
2241
2259
|
expectTypesMatch(true);
|
|
2242
2260
|
|
|
2243
2261
|
// src/pcb/pcb_text.ts
|
|
2244
|
-
import { z as
|
|
2245
|
-
var pcb_text =
|
|
2246
|
-
type:
|
|
2262
|
+
import { z as z98 } from "zod";
|
|
2263
|
+
var pcb_text = z98.object({
|
|
2264
|
+
type: z98.literal("pcb_text"),
|
|
2247
2265
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
2248
|
-
pcb_group_id:
|
|
2249
|
-
subcircuit_id:
|
|
2250
|
-
text:
|
|
2266
|
+
pcb_group_id: z98.string().optional(),
|
|
2267
|
+
subcircuit_id: z98.string().optional(),
|
|
2268
|
+
text: z98.string(),
|
|
2251
2269
|
center: point,
|
|
2252
2270
|
layer: layer_ref,
|
|
2253
2271
|
width: length,
|
|
2254
2272
|
height: length,
|
|
2255
|
-
lines:
|
|
2273
|
+
lines: z98.number(),
|
|
2256
2274
|
// @ts-ignore
|
|
2257
|
-
align:
|
|
2275
|
+
align: z98.enum(["bottom-left"])
|
|
2258
2276
|
}).describe("Defines text on the PCB");
|
|
2259
2277
|
expectTypesMatch(true);
|
|
2260
2278
|
|
|
2261
2279
|
// src/pcb/pcb_trace.ts
|
|
2262
|
-
import { z as
|
|
2263
|
-
var pcb_trace_route_point_wire =
|
|
2264
|
-
route_type:
|
|
2280
|
+
import { z as z99 } from "zod";
|
|
2281
|
+
var pcb_trace_route_point_wire = z99.object({
|
|
2282
|
+
route_type: z99.literal("wire"),
|
|
2265
2283
|
x: distance,
|
|
2266
2284
|
y: distance,
|
|
2267
2285
|
width: distance,
|
|
2268
|
-
copper_pour_id:
|
|
2269
|
-
is_inside_copper_pour:
|
|
2270
|
-
start_pcb_port_id:
|
|
2271
|
-
end_pcb_port_id:
|
|
2286
|
+
copper_pour_id: z99.string().optional(),
|
|
2287
|
+
is_inside_copper_pour: z99.boolean().optional(),
|
|
2288
|
+
start_pcb_port_id: z99.string().optional(),
|
|
2289
|
+
end_pcb_port_id: z99.string().optional(),
|
|
2272
2290
|
layer: layer_ref
|
|
2273
2291
|
});
|
|
2274
|
-
var pcb_trace_route_point_via =
|
|
2275
|
-
route_type:
|
|
2292
|
+
var pcb_trace_route_point_via = z99.object({
|
|
2293
|
+
route_type: z99.literal("via"),
|
|
2276
2294
|
x: distance,
|
|
2277
2295
|
y: distance,
|
|
2278
|
-
copper_pour_id:
|
|
2279
|
-
is_inside_copper_pour:
|
|
2296
|
+
copper_pour_id: z99.string().optional(),
|
|
2297
|
+
is_inside_copper_pour: z99.boolean().optional(),
|
|
2280
2298
|
hole_diameter: distance.optional(),
|
|
2281
2299
|
outer_diameter: distance.optional(),
|
|
2282
2300
|
from_layer: layer_ref,
|
|
2283
2301
|
to_layer: layer_ref
|
|
2284
2302
|
});
|
|
2285
|
-
var pcb_trace_route_point =
|
|
2303
|
+
var pcb_trace_route_point = z99.union([
|
|
2286
2304
|
pcb_trace_route_point_wire,
|
|
2287
2305
|
pcb_trace_route_point_via
|
|
2288
2306
|
]);
|
|
2289
|
-
var pcb_trace =
|
|
2290
|
-
type:
|
|
2291
|
-
source_trace_id:
|
|
2292
|
-
pcb_component_id:
|
|
2307
|
+
var pcb_trace = z99.object({
|
|
2308
|
+
type: z99.literal("pcb_trace"),
|
|
2309
|
+
source_trace_id: z99.string().optional(),
|
|
2310
|
+
pcb_component_id: z99.string().optional(),
|
|
2293
2311
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
2294
|
-
pcb_group_id:
|
|
2295
|
-
subcircuit_id:
|
|
2296
|
-
route_thickness_mode:
|
|
2297
|
-
route_order_index:
|
|
2298
|
-
should_round_corners:
|
|
2299
|
-
trace_length:
|
|
2300
|
-
highlight_color:
|
|
2301
|
-
route:
|
|
2312
|
+
pcb_group_id: z99.string().optional(),
|
|
2313
|
+
subcircuit_id: z99.string().optional(),
|
|
2314
|
+
route_thickness_mode: z99.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
2315
|
+
route_order_index: z99.number().optional(),
|
|
2316
|
+
should_round_corners: z99.boolean().optional(),
|
|
2317
|
+
trace_length: z99.number().optional(),
|
|
2318
|
+
highlight_color: z99.string().optional(),
|
|
2319
|
+
route: z99.array(pcb_trace_route_point)
|
|
2302
2320
|
}).describe("Defines a trace on the PCB");
|
|
2303
2321
|
expectTypesMatch(true);
|
|
2304
2322
|
expectTypesMatch(true);
|
|
2305
2323
|
|
|
2306
2324
|
// src/pcb/pcb_trace_error.ts
|
|
2307
|
-
import { z as
|
|
2325
|
+
import { z as z100 } from "zod";
|
|
2308
2326
|
var pcb_trace_error = base_circuit_json_error.extend({
|
|
2309
|
-
type:
|
|
2327
|
+
type: z100.literal("pcb_trace_error"),
|
|
2310
2328
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
2311
|
-
error_type:
|
|
2329
|
+
error_type: z100.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
2312
2330
|
center: point.optional(),
|
|
2313
|
-
pcb_trace_id:
|
|
2314
|
-
source_trace_id:
|
|
2315
|
-
pcb_component_ids:
|
|
2316
|
-
pcb_port_ids:
|
|
2317
|
-
subcircuit_id:
|
|
2331
|
+
pcb_trace_id: z100.string(),
|
|
2332
|
+
source_trace_id: z100.string(),
|
|
2333
|
+
pcb_component_ids: z100.array(z100.string()),
|
|
2334
|
+
pcb_port_ids: z100.array(z100.string()),
|
|
2335
|
+
subcircuit_id: z100.string().optional()
|
|
2318
2336
|
}).describe("Defines a trace error on the PCB");
|
|
2319
2337
|
expectTypesMatch(true);
|
|
2320
2338
|
|
|
2321
2339
|
// src/pcb/pcb_trace_missing_error.ts
|
|
2322
|
-
import { z as
|
|
2340
|
+
import { z as z101 } from "zod";
|
|
2323
2341
|
var pcb_trace_missing_error = base_circuit_json_error.extend({
|
|
2324
|
-
type:
|
|
2342
|
+
type: z101.literal("pcb_trace_missing_error"),
|
|
2325
2343
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
2326
2344
|
"pcb_trace_missing_error"
|
|
2327
2345
|
),
|
|
2328
|
-
error_type:
|
|
2346
|
+
error_type: z101.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
2329
2347
|
center: point.optional(),
|
|
2330
|
-
source_trace_id:
|
|
2331
|
-
pcb_component_ids:
|
|
2332
|
-
pcb_port_ids:
|
|
2333
|
-
subcircuit_id:
|
|
2348
|
+
source_trace_id: z101.string(),
|
|
2349
|
+
pcb_component_ids: z101.array(z101.string()),
|
|
2350
|
+
pcb_port_ids: z101.array(z101.string()),
|
|
2351
|
+
subcircuit_id: z101.string().optional()
|
|
2334
2352
|
}).describe(
|
|
2335
2353
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
2336
2354
|
);
|
|
2337
2355
|
expectTypesMatch(true);
|
|
2338
2356
|
|
|
2339
2357
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
2340
|
-
import { z as
|
|
2358
|
+
import { z as z102 } from "zod";
|
|
2341
2359
|
var pcb_port_not_matched_error = base_circuit_json_error.extend({
|
|
2342
|
-
type:
|
|
2360
|
+
type: z102.literal("pcb_port_not_matched_error"),
|
|
2343
2361
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2344
|
-
error_type:
|
|
2345
|
-
pcb_component_ids:
|
|
2346
|
-
subcircuit_id:
|
|
2362
|
+
error_type: z102.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
2363
|
+
pcb_component_ids: z102.array(z102.string()),
|
|
2364
|
+
subcircuit_id: z102.string().optional()
|
|
2347
2365
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
2348
2366
|
expectTypesMatch(true);
|
|
2349
2367
|
|
|
2350
2368
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
2351
|
-
import { z as
|
|
2369
|
+
import { z as z103 } from "zod";
|
|
2352
2370
|
var pcb_port_not_connected_error = base_circuit_json_error.extend({
|
|
2353
|
-
type:
|
|
2371
|
+
type: z103.literal("pcb_port_not_connected_error"),
|
|
2354
2372
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
2355
2373
|
"pcb_port_not_connected_error"
|
|
2356
2374
|
),
|
|
2357
|
-
error_type:
|
|
2358
|
-
pcb_port_ids:
|
|
2359
|
-
pcb_component_ids:
|
|
2360
|
-
subcircuit_id:
|
|
2375
|
+
error_type: z103.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
2376
|
+
pcb_port_ids: z103.array(z103.string()),
|
|
2377
|
+
pcb_component_ids: z103.array(z103.string()),
|
|
2378
|
+
subcircuit_id: z103.string().optional()
|
|
2361
2379
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
2362
2380
|
expectTypesMatch(
|
|
2363
2381
|
true
|
|
2364
2382
|
);
|
|
2365
2383
|
|
|
2366
2384
|
// src/pcb/pcb_net.ts
|
|
2367
|
-
import { z as
|
|
2368
|
-
var pcb_net =
|
|
2369
|
-
type:
|
|
2385
|
+
import { z as z104 } from "zod";
|
|
2386
|
+
var pcb_net = z104.object({
|
|
2387
|
+
type: z104.literal("pcb_net"),
|
|
2370
2388
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
2371
|
-
source_net_id:
|
|
2372
|
-
highlight_color:
|
|
2389
|
+
source_net_id: z104.string().optional(),
|
|
2390
|
+
highlight_color: z104.string().optional()
|
|
2373
2391
|
}).describe("Defines a net on the PCB");
|
|
2374
2392
|
expectTypesMatch(true);
|
|
2375
2393
|
|
|
2376
2394
|
// src/pcb/pcb_via.ts
|
|
2377
|
-
import { z as
|
|
2378
|
-
var pcb_via =
|
|
2379
|
-
type:
|
|
2395
|
+
import { z as z105 } from "zod";
|
|
2396
|
+
var pcb_via = z105.object({
|
|
2397
|
+
type: z105.literal("pcb_via"),
|
|
2380
2398
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
2381
|
-
pcb_group_id:
|
|
2382
|
-
subcircuit_id:
|
|
2383
|
-
subcircuit_connectivity_map_key:
|
|
2399
|
+
pcb_group_id: z105.string().optional(),
|
|
2400
|
+
subcircuit_id: z105.string().optional(),
|
|
2401
|
+
subcircuit_connectivity_map_key: z105.string().optional(),
|
|
2384
2402
|
x: distance,
|
|
2385
2403
|
y: distance,
|
|
2386
2404
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -2389,101 +2407,101 @@ var pcb_via = z104.object({
|
|
|
2389
2407
|
from_layer: layer_ref.optional(),
|
|
2390
2408
|
/** @deprecated */
|
|
2391
2409
|
to_layer: layer_ref.optional(),
|
|
2392
|
-
layers:
|
|
2393
|
-
pcb_trace_id:
|
|
2394
|
-
net_is_assignable:
|
|
2395
|
-
net_assigned:
|
|
2396
|
-
is_tented:
|
|
2410
|
+
layers: z105.array(layer_ref),
|
|
2411
|
+
pcb_trace_id: z105.string().optional(),
|
|
2412
|
+
net_is_assignable: z105.boolean().optional(),
|
|
2413
|
+
net_assigned: z105.boolean().optional(),
|
|
2414
|
+
is_tented: z105.boolean().optional()
|
|
2397
2415
|
}).describe("Defines a via on the PCB");
|
|
2398
2416
|
expectTypesMatch(true);
|
|
2399
2417
|
|
|
2400
2418
|
// src/pcb/pcb_board.ts
|
|
2401
|
-
import { z as
|
|
2402
|
-
var pcb_board =
|
|
2403
|
-
type:
|
|
2419
|
+
import { z as z106 } from "zod";
|
|
2420
|
+
var pcb_board = z106.object({
|
|
2421
|
+
type: z106.literal("pcb_board"),
|
|
2404
2422
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
2405
|
-
pcb_panel_id:
|
|
2406
|
-
carrier_pcb_board_id:
|
|
2407
|
-
is_subcircuit:
|
|
2408
|
-
subcircuit_id:
|
|
2409
|
-
is_mounted_to_carrier_board:
|
|
2423
|
+
pcb_panel_id: z106.string().optional(),
|
|
2424
|
+
carrier_pcb_board_id: z106.string().optional(),
|
|
2425
|
+
is_subcircuit: z106.boolean().optional(),
|
|
2426
|
+
subcircuit_id: z106.string().optional(),
|
|
2427
|
+
is_mounted_to_carrier_board: z106.boolean().optional(),
|
|
2410
2428
|
width: length.optional(),
|
|
2411
2429
|
height: length.optional(),
|
|
2412
2430
|
center: point,
|
|
2413
|
-
display_offset_x:
|
|
2431
|
+
display_offset_x: z106.string().optional().describe(
|
|
2414
2432
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
2415
2433
|
),
|
|
2416
|
-
display_offset_y:
|
|
2434
|
+
display_offset_y: z106.string().optional().describe(
|
|
2417
2435
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
2418
2436
|
),
|
|
2419
2437
|
thickness: length.optional().default(1.4),
|
|
2420
|
-
num_layers:
|
|
2421
|
-
outline:
|
|
2422
|
-
shape:
|
|
2423
|
-
material:
|
|
2438
|
+
num_layers: z106.number().optional().default(4),
|
|
2439
|
+
outline: z106.array(point).optional(),
|
|
2440
|
+
shape: z106.enum(["rect", "polygon"]).optional(),
|
|
2441
|
+
material: z106.enum(["fr4", "fr1"]).default("fr4"),
|
|
2424
2442
|
anchor_position: point.optional(),
|
|
2425
2443
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2426
|
-
position_mode:
|
|
2444
|
+
position_mode: z106.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
2427
2445
|
}).describe("Defines the board outline of the PCB");
|
|
2428
2446
|
expectTypesMatch(true);
|
|
2429
2447
|
|
|
2430
2448
|
// src/pcb/pcb_panel.ts
|
|
2431
|
-
import { z as
|
|
2432
|
-
var pcb_panel =
|
|
2433
|
-
type:
|
|
2449
|
+
import { z as z107 } from "zod";
|
|
2450
|
+
var pcb_panel = z107.object({
|
|
2451
|
+
type: z107.literal("pcb_panel"),
|
|
2434
2452
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2435
2453
|
width: length,
|
|
2436
2454
|
height: length,
|
|
2437
2455
|
center: point,
|
|
2438
2456
|
thickness: length.optional().default(1.4),
|
|
2439
|
-
covered_with_solder_mask:
|
|
2457
|
+
covered_with_solder_mask: z107.boolean().optional().default(true)
|
|
2440
2458
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2441
2459
|
expectTypesMatch(true);
|
|
2442
2460
|
|
|
2443
2461
|
// src/pcb/pcb_placement_error.ts
|
|
2444
|
-
import { z as
|
|
2462
|
+
import { z as z108 } from "zod";
|
|
2445
2463
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
2446
|
-
type:
|
|
2464
|
+
type: z108.literal("pcb_placement_error"),
|
|
2447
2465
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2448
|
-
error_type:
|
|
2449
|
-
subcircuit_id:
|
|
2466
|
+
error_type: z108.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2467
|
+
subcircuit_id: z108.string().optional()
|
|
2450
2468
|
}).describe("Defines a placement error on the PCB");
|
|
2451
2469
|
expectTypesMatch(true);
|
|
2452
2470
|
|
|
2453
2471
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
2454
|
-
import { z as
|
|
2472
|
+
import { z as z109 } from "zod";
|
|
2455
2473
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
2456
|
-
type:
|
|
2474
|
+
type: z109.literal("pcb_panelization_placement_error"),
|
|
2457
2475
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
2458
2476
|
"pcb_panelization_placement_error"
|
|
2459
2477
|
),
|
|
2460
|
-
error_type:
|
|
2461
|
-
pcb_panel_id:
|
|
2462
|
-
pcb_board_id:
|
|
2463
|
-
subcircuit_id:
|
|
2478
|
+
error_type: z109.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
2479
|
+
pcb_panel_id: z109.string().optional(),
|
|
2480
|
+
pcb_board_id: z109.string().optional(),
|
|
2481
|
+
subcircuit_id: z109.string().optional()
|
|
2464
2482
|
}).describe("Defines a panelization placement error on the PCB");
|
|
2465
2483
|
expectTypesMatch(true);
|
|
2466
2484
|
|
|
2467
2485
|
// src/pcb/pcb_trace_hint.ts
|
|
2468
|
-
import { z as
|
|
2469
|
-
var pcb_trace_hint =
|
|
2470
|
-
type:
|
|
2486
|
+
import { z as z110 } from "zod";
|
|
2487
|
+
var pcb_trace_hint = z110.object({
|
|
2488
|
+
type: z110.literal("pcb_trace_hint"),
|
|
2471
2489
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2472
|
-
pcb_port_id:
|
|
2473
|
-
pcb_component_id:
|
|
2474
|
-
route:
|
|
2475
|
-
subcircuit_id:
|
|
2490
|
+
pcb_port_id: z110.string(),
|
|
2491
|
+
pcb_component_id: z110.string(),
|
|
2492
|
+
route: z110.array(route_hint_point),
|
|
2493
|
+
subcircuit_id: z110.string().optional()
|
|
2476
2494
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2477
2495
|
expectTypesMatch(true);
|
|
2478
2496
|
|
|
2479
2497
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2480
|
-
import { z as
|
|
2481
|
-
var pcb_silkscreen_line =
|
|
2482
|
-
type:
|
|
2498
|
+
import { z as z111 } from "zod";
|
|
2499
|
+
var pcb_silkscreen_line = z111.object({
|
|
2500
|
+
type: z111.literal("pcb_silkscreen_line"),
|
|
2483
2501
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2484
|
-
pcb_component_id:
|
|
2485
|
-
pcb_group_id:
|
|
2486
|
-
subcircuit_id:
|
|
2502
|
+
pcb_component_id: z111.string(),
|
|
2503
|
+
pcb_group_id: z111.string().optional(),
|
|
2504
|
+
subcircuit_id: z111.string().optional(),
|
|
2487
2505
|
stroke_width: distance.default("0.1mm"),
|
|
2488
2506
|
x1: distance,
|
|
2489
2507
|
y1: distance,
|
|
@@ -2494,32 +2512,32 @@ var pcb_silkscreen_line = z110.object({
|
|
|
2494
2512
|
expectTypesMatch(true);
|
|
2495
2513
|
|
|
2496
2514
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2497
|
-
import { z as
|
|
2498
|
-
var pcb_silkscreen_path =
|
|
2499
|
-
type:
|
|
2515
|
+
import { z as z112 } from "zod";
|
|
2516
|
+
var pcb_silkscreen_path = z112.object({
|
|
2517
|
+
type: z112.literal("pcb_silkscreen_path"),
|
|
2500
2518
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2501
|
-
pcb_component_id:
|
|
2502
|
-
pcb_group_id:
|
|
2503
|
-
subcircuit_id:
|
|
2519
|
+
pcb_component_id: z112.string(),
|
|
2520
|
+
pcb_group_id: z112.string().optional(),
|
|
2521
|
+
subcircuit_id: z112.string().optional(),
|
|
2504
2522
|
layer: visible_layer,
|
|
2505
|
-
route:
|
|
2523
|
+
route: z112.array(point),
|
|
2506
2524
|
stroke_width: length
|
|
2507
2525
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2508
2526
|
expectTypesMatch(true);
|
|
2509
2527
|
|
|
2510
2528
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2511
|
-
import { z as
|
|
2512
|
-
var pcb_silkscreen_text =
|
|
2513
|
-
type:
|
|
2529
|
+
import { z as z113 } from "zod";
|
|
2530
|
+
var pcb_silkscreen_text = z113.object({
|
|
2531
|
+
type: z113.literal("pcb_silkscreen_text"),
|
|
2514
2532
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2515
|
-
pcb_group_id:
|
|
2516
|
-
subcircuit_id:
|
|
2517
|
-
font:
|
|
2533
|
+
pcb_group_id: z113.string().optional(),
|
|
2534
|
+
subcircuit_id: z113.string().optional(),
|
|
2535
|
+
font: z113.literal("tscircuit2024").default("tscircuit2024"),
|
|
2518
2536
|
font_size: distance.default("0.2mm"),
|
|
2519
|
-
pcb_component_id:
|
|
2520
|
-
text:
|
|
2521
|
-
is_knockout:
|
|
2522
|
-
knockout_padding:
|
|
2537
|
+
pcb_component_id: z113.string(),
|
|
2538
|
+
text: z113.string(),
|
|
2539
|
+
is_knockout: z113.boolean().default(false).optional(),
|
|
2540
|
+
knockout_padding: z113.object({
|
|
2523
2541
|
left: length,
|
|
2524
2542
|
top: length,
|
|
2525
2543
|
bottom: length,
|
|
@@ -2530,27 +2548,27 @@ var pcb_silkscreen_text = z112.object({
|
|
|
2530
2548
|
bottom: "0.2mm",
|
|
2531
2549
|
right: "0.2mm"
|
|
2532
2550
|
}).optional(),
|
|
2533
|
-
ccw_rotation:
|
|
2551
|
+
ccw_rotation: z113.number().optional(),
|
|
2534
2552
|
layer: layer_ref,
|
|
2535
|
-
is_mirrored:
|
|
2553
|
+
is_mirrored: z113.boolean().default(false).optional(),
|
|
2536
2554
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2537
2555
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2538
2556
|
}).describe("Defines silkscreen text on the PCB");
|
|
2539
2557
|
expectTypesMatch(true);
|
|
2540
2558
|
|
|
2541
2559
|
// src/pcb/pcb_copper_text.ts
|
|
2542
|
-
import { z as
|
|
2543
|
-
var pcb_copper_text =
|
|
2544
|
-
type:
|
|
2560
|
+
import { z as z114 } from "zod";
|
|
2561
|
+
var pcb_copper_text = z114.object({
|
|
2562
|
+
type: z114.literal("pcb_copper_text"),
|
|
2545
2563
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2546
|
-
pcb_group_id:
|
|
2547
|
-
subcircuit_id:
|
|
2548
|
-
font:
|
|
2564
|
+
pcb_group_id: z114.string().optional(),
|
|
2565
|
+
subcircuit_id: z114.string().optional(),
|
|
2566
|
+
font: z114.literal("tscircuit2024").default("tscircuit2024"),
|
|
2549
2567
|
font_size: distance.default("0.2mm"),
|
|
2550
|
-
pcb_component_id:
|
|
2551
|
-
text:
|
|
2552
|
-
is_knockout:
|
|
2553
|
-
knockout_padding:
|
|
2568
|
+
pcb_component_id: z114.string(),
|
|
2569
|
+
text: z114.string(),
|
|
2570
|
+
is_knockout: z114.boolean().default(false).optional(),
|
|
2571
|
+
knockout_padding: z114.object({
|
|
2554
2572
|
left: length,
|
|
2555
2573
|
top: length,
|
|
2556
2574
|
bottom: length,
|
|
@@ -2561,61 +2579,61 @@ var pcb_copper_text = z113.object({
|
|
|
2561
2579
|
bottom: "0.2mm",
|
|
2562
2580
|
right: "0.2mm"
|
|
2563
2581
|
}).optional(),
|
|
2564
|
-
ccw_rotation:
|
|
2582
|
+
ccw_rotation: z114.number().optional(),
|
|
2565
2583
|
layer: layer_ref,
|
|
2566
|
-
is_mirrored:
|
|
2584
|
+
is_mirrored: z114.boolean().default(false).optional(),
|
|
2567
2585
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2568
2586
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2569
2587
|
}).describe("Defines copper text on the PCB");
|
|
2570
2588
|
expectTypesMatch(true);
|
|
2571
2589
|
|
|
2572
2590
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2573
|
-
import { z as
|
|
2574
|
-
var pcb_silkscreen_rect =
|
|
2575
|
-
type:
|
|
2591
|
+
import { z as z115 } from "zod";
|
|
2592
|
+
var pcb_silkscreen_rect = z115.object({
|
|
2593
|
+
type: z115.literal("pcb_silkscreen_rect"),
|
|
2576
2594
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2577
|
-
pcb_component_id:
|
|
2578
|
-
pcb_group_id:
|
|
2579
|
-
subcircuit_id:
|
|
2595
|
+
pcb_component_id: z115.string(),
|
|
2596
|
+
pcb_group_id: z115.string().optional(),
|
|
2597
|
+
subcircuit_id: z115.string().optional(),
|
|
2580
2598
|
center: point,
|
|
2581
2599
|
width: length,
|
|
2582
2600
|
height: length,
|
|
2583
2601
|
layer: layer_ref,
|
|
2584
2602
|
stroke_width: length.default("1mm"),
|
|
2585
2603
|
corner_radius: length.optional(),
|
|
2586
|
-
is_filled:
|
|
2587
|
-
has_stroke:
|
|
2588
|
-
is_stroke_dashed:
|
|
2589
|
-
ccw_rotation:
|
|
2604
|
+
is_filled: z115.boolean().default(true).optional(),
|
|
2605
|
+
has_stroke: z115.boolean().optional(),
|
|
2606
|
+
is_stroke_dashed: z115.boolean().optional(),
|
|
2607
|
+
ccw_rotation: z115.number().optional()
|
|
2590
2608
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2591
2609
|
expectTypesMatch(true);
|
|
2592
2610
|
|
|
2593
2611
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2594
|
-
import { z as
|
|
2595
|
-
var pcb_silkscreen_circle =
|
|
2596
|
-
type:
|
|
2612
|
+
import { z as z116 } from "zod";
|
|
2613
|
+
var pcb_silkscreen_circle = z116.object({
|
|
2614
|
+
type: z116.literal("pcb_silkscreen_circle"),
|
|
2597
2615
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2598
2616
|
"pcb_silkscreen_circle"
|
|
2599
2617
|
),
|
|
2600
|
-
pcb_component_id:
|
|
2601
|
-
pcb_group_id:
|
|
2602
|
-
subcircuit_id:
|
|
2618
|
+
pcb_component_id: z116.string(),
|
|
2619
|
+
pcb_group_id: z116.string().optional(),
|
|
2620
|
+
subcircuit_id: z116.string().optional(),
|
|
2603
2621
|
center: point,
|
|
2604
2622
|
radius: length,
|
|
2605
2623
|
layer: visible_layer,
|
|
2606
2624
|
stroke_width: length.default("1mm"),
|
|
2607
|
-
is_filled:
|
|
2625
|
+
is_filled: z116.boolean().optional()
|
|
2608
2626
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
2609
2627
|
expectTypesMatch(true);
|
|
2610
2628
|
|
|
2611
2629
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2612
|
-
import { z as
|
|
2613
|
-
var pcb_silkscreen_oval =
|
|
2614
|
-
type:
|
|
2630
|
+
import { z as z117 } from "zod";
|
|
2631
|
+
var pcb_silkscreen_oval = z117.object({
|
|
2632
|
+
type: z117.literal("pcb_silkscreen_oval"),
|
|
2615
2633
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2616
|
-
pcb_component_id:
|
|
2617
|
-
pcb_group_id:
|
|
2618
|
-
subcircuit_id:
|
|
2634
|
+
pcb_component_id: z117.string(),
|
|
2635
|
+
pcb_group_id: z117.string().optional(),
|
|
2636
|
+
subcircuit_id: z117.string().optional(),
|
|
2619
2637
|
center: point,
|
|
2620
2638
|
radius_x: distance,
|
|
2621
2639
|
radius_y: distance,
|
|
@@ -2625,240 +2643,240 @@ var pcb_silkscreen_oval = z116.object({
|
|
|
2625
2643
|
expectTypesMatch(true);
|
|
2626
2644
|
|
|
2627
2645
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
2628
|
-
import { z as
|
|
2629
|
-
var pcb_silkscreen_pill =
|
|
2630
|
-
type:
|
|
2631
|
-
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
2632
|
-
pcb_component_id:
|
|
2633
|
-
pcb_group_id:
|
|
2634
|
-
subcircuit_id:
|
|
2646
|
+
import { z as z118 } from "zod";
|
|
2647
|
+
var pcb_silkscreen_pill = z118.object({
|
|
2648
|
+
type: z118.literal("pcb_silkscreen_pill"),
|
|
2649
|
+
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
2650
|
+
pcb_component_id: z118.string(),
|
|
2651
|
+
pcb_group_id: z118.string().optional(),
|
|
2652
|
+
subcircuit_id: z118.string().optional(),
|
|
2635
2653
|
center: point,
|
|
2636
2654
|
width: length,
|
|
2637
2655
|
height: length,
|
|
2638
2656
|
layer: layer_ref,
|
|
2639
|
-
ccw_rotation:
|
|
2657
|
+
ccw_rotation: z118.number().optional()
|
|
2640
2658
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
2641
2659
|
expectTypesMatch(true);
|
|
2642
2660
|
|
|
2643
2661
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2644
|
-
import { z as
|
|
2645
|
-
var pcb_fabrication_note_text =
|
|
2646
|
-
type:
|
|
2662
|
+
import { z as z119 } from "zod";
|
|
2663
|
+
var pcb_fabrication_note_text = z119.object({
|
|
2664
|
+
type: z119.literal("pcb_fabrication_note_text"),
|
|
2647
2665
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2648
2666
|
"pcb_fabrication_note_text"
|
|
2649
2667
|
),
|
|
2650
|
-
subcircuit_id:
|
|
2651
|
-
pcb_group_id:
|
|
2652
|
-
font:
|
|
2668
|
+
subcircuit_id: z119.string().optional(),
|
|
2669
|
+
pcb_group_id: z119.string().optional(),
|
|
2670
|
+
font: z119.literal("tscircuit2024").default("tscircuit2024"),
|
|
2653
2671
|
font_size: distance.default("1mm"),
|
|
2654
|
-
pcb_component_id:
|
|
2655
|
-
text:
|
|
2672
|
+
pcb_component_id: z119.string(),
|
|
2673
|
+
text: z119.string(),
|
|
2656
2674
|
layer: visible_layer,
|
|
2657
2675
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2658
|
-
anchor_alignment:
|
|
2659
|
-
color:
|
|
2676
|
+
anchor_alignment: z119.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2677
|
+
color: z119.string().optional()
|
|
2660
2678
|
}).describe(
|
|
2661
2679
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2662
2680
|
);
|
|
2663
2681
|
expectTypesMatch(true);
|
|
2664
2682
|
|
|
2665
2683
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2666
|
-
import { z as
|
|
2667
|
-
var pcb_fabrication_note_path =
|
|
2668
|
-
type:
|
|
2684
|
+
import { z as z120 } from "zod";
|
|
2685
|
+
var pcb_fabrication_note_path = z120.object({
|
|
2686
|
+
type: z120.literal("pcb_fabrication_note_path"),
|
|
2669
2687
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2670
2688
|
"pcb_fabrication_note_path"
|
|
2671
2689
|
),
|
|
2672
|
-
pcb_component_id:
|
|
2673
|
-
subcircuit_id:
|
|
2690
|
+
pcb_component_id: z120.string(),
|
|
2691
|
+
subcircuit_id: z120.string().optional(),
|
|
2674
2692
|
layer: layer_ref,
|
|
2675
|
-
route:
|
|
2693
|
+
route: z120.array(point),
|
|
2676
2694
|
stroke_width: length,
|
|
2677
|
-
color:
|
|
2695
|
+
color: z120.string().optional()
|
|
2678
2696
|
}).describe(
|
|
2679
2697
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2680
2698
|
);
|
|
2681
2699
|
expectTypesMatch(true);
|
|
2682
2700
|
|
|
2683
2701
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2684
|
-
import { z as
|
|
2685
|
-
var pcb_fabrication_note_rect =
|
|
2686
|
-
type:
|
|
2702
|
+
import { z as z121 } from "zod";
|
|
2703
|
+
var pcb_fabrication_note_rect = z121.object({
|
|
2704
|
+
type: z121.literal("pcb_fabrication_note_rect"),
|
|
2687
2705
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2688
2706
|
"pcb_fabrication_note_rect"
|
|
2689
2707
|
),
|
|
2690
|
-
pcb_component_id:
|
|
2691
|
-
pcb_group_id:
|
|
2692
|
-
subcircuit_id:
|
|
2708
|
+
pcb_component_id: z121.string(),
|
|
2709
|
+
pcb_group_id: z121.string().optional(),
|
|
2710
|
+
subcircuit_id: z121.string().optional(),
|
|
2693
2711
|
center: point,
|
|
2694
2712
|
width: length,
|
|
2695
2713
|
height: length,
|
|
2696
2714
|
layer: visible_layer,
|
|
2697
2715
|
stroke_width: length.default("0.1mm"),
|
|
2698
2716
|
corner_radius: length.optional(),
|
|
2699
|
-
is_filled:
|
|
2700
|
-
has_stroke:
|
|
2701
|
-
is_stroke_dashed:
|
|
2702
|
-
color:
|
|
2717
|
+
is_filled: z121.boolean().optional(),
|
|
2718
|
+
has_stroke: z121.boolean().optional(),
|
|
2719
|
+
is_stroke_dashed: z121.boolean().optional(),
|
|
2720
|
+
color: z121.string().optional()
|
|
2703
2721
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2704
2722
|
expectTypesMatch(true);
|
|
2705
2723
|
|
|
2706
2724
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2707
|
-
import { z as
|
|
2708
|
-
var pcb_fabrication_note_dimension =
|
|
2709
|
-
type:
|
|
2725
|
+
import { z as z122 } from "zod";
|
|
2726
|
+
var pcb_fabrication_note_dimension = z122.object({
|
|
2727
|
+
type: z122.literal("pcb_fabrication_note_dimension"),
|
|
2710
2728
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2711
2729
|
"pcb_fabrication_note_dimension"
|
|
2712
2730
|
),
|
|
2713
|
-
pcb_component_id:
|
|
2714
|
-
pcb_group_id:
|
|
2715
|
-
subcircuit_id:
|
|
2731
|
+
pcb_component_id: z122.string(),
|
|
2732
|
+
pcb_group_id: z122.string().optional(),
|
|
2733
|
+
subcircuit_id: z122.string().optional(),
|
|
2716
2734
|
layer: visible_layer,
|
|
2717
2735
|
from: point,
|
|
2718
2736
|
to: point,
|
|
2719
|
-
text:
|
|
2720
|
-
text_ccw_rotation:
|
|
2737
|
+
text: z122.string().optional(),
|
|
2738
|
+
text_ccw_rotation: z122.number().optional(),
|
|
2721
2739
|
offset: length.optional(),
|
|
2722
2740
|
offset_distance: length.optional(),
|
|
2723
|
-
offset_direction:
|
|
2724
|
-
x:
|
|
2725
|
-
y:
|
|
2741
|
+
offset_direction: z122.object({
|
|
2742
|
+
x: z122.number(),
|
|
2743
|
+
y: z122.number()
|
|
2726
2744
|
}).optional(),
|
|
2727
|
-
font:
|
|
2745
|
+
font: z122.literal("tscircuit2024").default("tscircuit2024"),
|
|
2728
2746
|
font_size: length.default("1mm"),
|
|
2729
|
-
color:
|
|
2747
|
+
color: z122.string().optional(),
|
|
2730
2748
|
arrow_size: length.default("1mm")
|
|
2731
2749
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2732
2750
|
expectTypesMatch(true);
|
|
2733
2751
|
|
|
2734
2752
|
// src/pcb/pcb_note_text.ts
|
|
2735
|
-
import { z as z122 } from "zod";
|
|
2736
|
-
var pcb_note_text = z122.object({
|
|
2737
|
-
type: z122.literal("pcb_note_text"),
|
|
2738
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2739
|
-
pcb_component_id: z122.string().optional(),
|
|
2740
|
-
pcb_group_id: z122.string().optional(),
|
|
2741
|
-
subcircuit_id: z122.string().optional(),
|
|
2742
|
-
name: z122.string().optional(),
|
|
2743
|
-
font: z122.literal("tscircuit2024").default("tscircuit2024"),
|
|
2744
|
-
font_size: distance.default("1mm"),
|
|
2745
|
-
text: z122.string().optional(),
|
|
2746
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2747
|
-
anchor_alignment: z122.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2748
|
-
layer: visible_layer.default("top"),
|
|
2749
|
-
color: z122.string().optional()
|
|
2750
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
2751
|
-
expectTypesMatch(true);
|
|
2752
|
-
|
|
2753
|
-
// src/pcb/pcb_note_rect.ts
|
|
2754
2753
|
import { z as z123 } from "zod";
|
|
2755
|
-
var
|
|
2756
|
-
type: z123.literal("
|
|
2757
|
-
|
|
2754
|
+
var pcb_note_text = z123.object({
|
|
2755
|
+
type: z123.literal("pcb_note_text"),
|
|
2756
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2758
2757
|
pcb_component_id: z123.string().optional(),
|
|
2759
2758
|
pcb_group_id: z123.string().optional(),
|
|
2760
2759
|
subcircuit_id: z123.string().optional(),
|
|
2761
2760
|
name: z123.string().optional(),
|
|
2761
|
+
font: z123.literal("tscircuit2024").default("tscircuit2024"),
|
|
2762
|
+
font_size: distance.default("1mm"),
|
|
2762
2763
|
text: z123.string().optional(),
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
height: length,
|
|
2764
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2765
|
+
anchor_alignment: z123.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2766
2766
|
layer: visible_layer.default("top"),
|
|
2767
|
-
stroke_width: length.default("0.1mm"),
|
|
2768
|
-
corner_radius: length.optional(),
|
|
2769
|
-
is_filled: z123.boolean().optional(),
|
|
2770
|
-
has_stroke: z123.boolean().optional(),
|
|
2771
|
-
is_stroke_dashed: z123.boolean().optional(),
|
|
2772
2767
|
color: z123.string().optional()
|
|
2773
|
-
}).describe("Defines a
|
|
2768
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
2774
2769
|
expectTypesMatch(true);
|
|
2775
2770
|
|
|
2776
|
-
// src/pcb/
|
|
2771
|
+
// src/pcb/pcb_note_rect.ts
|
|
2777
2772
|
import { z as z124 } from "zod";
|
|
2778
|
-
var
|
|
2779
|
-
type: z124.literal("
|
|
2780
|
-
|
|
2773
|
+
var pcb_note_rect = z124.object({
|
|
2774
|
+
type: z124.literal("pcb_note_rect"),
|
|
2775
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2781
2776
|
pcb_component_id: z124.string().optional(),
|
|
2782
2777
|
pcb_group_id: z124.string().optional(),
|
|
2783
2778
|
subcircuit_id: z124.string().optional(),
|
|
2784
2779
|
name: z124.string().optional(),
|
|
2785
2780
|
text: z124.string().optional(),
|
|
2786
|
-
|
|
2781
|
+
center: point,
|
|
2782
|
+
width: length,
|
|
2783
|
+
height: length,
|
|
2787
2784
|
layer: visible_layer.default("top"),
|
|
2788
2785
|
stroke_width: length.default("0.1mm"),
|
|
2786
|
+
corner_radius: length.optional(),
|
|
2787
|
+
is_filled: z124.boolean().optional(),
|
|
2788
|
+
has_stroke: z124.boolean().optional(),
|
|
2789
|
+
is_stroke_dashed: z124.boolean().optional(),
|
|
2789
2790
|
color: z124.string().optional()
|
|
2790
|
-
}).describe("Defines a
|
|
2791
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2791
2792
|
expectTypesMatch(true);
|
|
2792
2793
|
|
|
2793
|
-
// src/pcb/
|
|
2794
|
+
// src/pcb/pcb_note_path.ts
|
|
2794
2795
|
import { z as z125 } from "zod";
|
|
2795
|
-
var
|
|
2796
|
-
type: z125.literal("
|
|
2797
|
-
|
|
2796
|
+
var pcb_note_path = z125.object({
|
|
2797
|
+
type: z125.literal("pcb_note_path"),
|
|
2798
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2798
2799
|
pcb_component_id: z125.string().optional(),
|
|
2799
2800
|
pcb_group_id: z125.string().optional(),
|
|
2800
2801
|
subcircuit_id: z125.string().optional(),
|
|
2801
2802
|
name: z125.string().optional(),
|
|
2802
2803
|
text: z125.string().optional(),
|
|
2804
|
+
route: z125.array(point),
|
|
2805
|
+
layer: visible_layer.default("top"),
|
|
2806
|
+
stroke_width: length.default("0.1mm"),
|
|
2807
|
+
color: z125.string().optional()
|
|
2808
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
2809
|
+
expectTypesMatch(true);
|
|
2810
|
+
|
|
2811
|
+
// src/pcb/pcb_note_line.ts
|
|
2812
|
+
import { z as z126 } from "zod";
|
|
2813
|
+
var pcb_note_line = z126.object({
|
|
2814
|
+
type: z126.literal("pcb_note_line"),
|
|
2815
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2816
|
+
pcb_component_id: z126.string().optional(),
|
|
2817
|
+
pcb_group_id: z126.string().optional(),
|
|
2818
|
+
subcircuit_id: z126.string().optional(),
|
|
2819
|
+
name: z126.string().optional(),
|
|
2820
|
+
text: z126.string().optional(),
|
|
2803
2821
|
x1: distance,
|
|
2804
2822
|
y1: distance,
|
|
2805
2823
|
x2: distance,
|
|
2806
2824
|
y2: distance,
|
|
2807
2825
|
layer: visible_layer.default("top"),
|
|
2808
2826
|
stroke_width: distance.default("0.1mm"),
|
|
2809
|
-
color:
|
|
2810
|
-
is_dashed:
|
|
2827
|
+
color: z126.string().optional(),
|
|
2828
|
+
is_dashed: z126.boolean().optional()
|
|
2811
2829
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2812
2830
|
expectTypesMatch(true);
|
|
2813
2831
|
|
|
2814
2832
|
// src/pcb/pcb_note_dimension.ts
|
|
2815
|
-
import { z as
|
|
2816
|
-
var pcb_note_dimension =
|
|
2817
|
-
type:
|
|
2833
|
+
import { z as z127 } from "zod";
|
|
2834
|
+
var pcb_note_dimension = z127.object({
|
|
2835
|
+
type: z127.literal("pcb_note_dimension"),
|
|
2818
2836
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2819
|
-
pcb_component_id:
|
|
2820
|
-
pcb_group_id:
|
|
2821
|
-
subcircuit_id:
|
|
2822
|
-
name:
|
|
2837
|
+
pcb_component_id: z127.string().optional(),
|
|
2838
|
+
pcb_group_id: z127.string().optional(),
|
|
2839
|
+
subcircuit_id: z127.string().optional(),
|
|
2840
|
+
name: z127.string().optional(),
|
|
2823
2841
|
from: point,
|
|
2824
2842
|
to: point,
|
|
2825
|
-
text:
|
|
2826
|
-
text_ccw_rotation:
|
|
2843
|
+
text: z127.string().optional(),
|
|
2844
|
+
text_ccw_rotation: z127.number().optional(),
|
|
2827
2845
|
offset_distance: length.optional(),
|
|
2828
|
-
offset_direction:
|
|
2829
|
-
x:
|
|
2830
|
-
y:
|
|
2846
|
+
offset_direction: z127.object({
|
|
2847
|
+
x: z127.number(),
|
|
2848
|
+
y: z127.number()
|
|
2831
2849
|
}).optional(),
|
|
2832
|
-
font:
|
|
2850
|
+
font: z127.literal("tscircuit2024").default("tscircuit2024"),
|
|
2833
2851
|
font_size: length.default("1mm"),
|
|
2834
2852
|
layer: visible_layer.default("top"),
|
|
2835
|
-
color:
|
|
2853
|
+
color: z127.string().optional(),
|
|
2836
2854
|
arrow_size: length.default("1mm")
|
|
2837
2855
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2838
2856
|
expectTypesMatch(true);
|
|
2839
2857
|
|
|
2840
2858
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2841
|
-
import { z as
|
|
2859
|
+
import { z as z128 } from "zod";
|
|
2842
2860
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
2843
|
-
type:
|
|
2861
|
+
type: z128.literal("pcb_footprint_overlap_error"),
|
|
2844
2862
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2845
|
-
error_type:
|
|
2846
|
-
pcb_smtpad_ids:
|
|
2847
|
-
pcb_plated_hole_ids:
|
|
2848
|
-
pcb_hole_ids:
|
|
2849
|
-
pcb_keepout_ids:
|
|
2863
|
+
error_type: z128.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
2864
|
+
pcb_smtpad_ids: z128.array(z128.string()).optional(),
|
|
2865
|
+
pcb_plated_hole_ids: z128.array(z128.string()).optional(),
|
|
2866
|
+
pcb_hole_ids: z128.array(z128.string()).optional(),
|
|
2867
|
+
pcb_keepout_ids: z128.array(z128.string()).optional()
|
|
2850
2868
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2851
2869
|
expectTypesMatch(
|
|
2852
2870
|
true
|
|
2853
2871
|
);
|
|
2854
2872
|
|
|
2855
2873
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
2856
|
-
import { z as
|
|
2874
|
+
import { z as z129 } from "zod";
|
|
2857
2875
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
2858
|
-
type:
|
|
2876
|
+
type: z129.literal("pcb_courtyard_overlap_error"),
|
|
2859
2877
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2860
|
-
error_type:
|
|
2861
|
-
pcb_component_ids:
|
|
2878
|
+
error_type: z129.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
2879
|
+
pcb_component_ids: z129.tuple([z129.string(), z129.string()])
|
|
2862
2880
|
}).describe(
|
|
2863
2881
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
2864
2882
|
);
|
|
@@ -2867,49 +2885,49 @@ expectTypesMatch(
|
|
|
2867
2885
|
);
|
|
2868
2886
|
|
|
2869
2887
|
// src/pcb/pcb_keepout.ts
|
|
2870
|
-
import { z as
|
|
2871
|
-
var pcb_keepout =
|
|
2872
|
-
type:
|
|
2873
|
-
shape:
|
|
2874
|
-
pcb_group_id:
|
|
2875
|
-
subcircuit_id:
|
|
2888
|
+
import { z as z130 } from "zod";
|
|
2889
|
+
var pcb_keepout = z130.object({
|
|
2890
|
+
type: z130.literal("pcb_keepout"),
|
|
2891
|
+
shape: z130.literal("rect"),
|
|
2892
|
+
pcb_group_id: z130.string().optional(),
|
|
2893
|
+
subcircuit_id: z130.string().optional(),
|
|
2876
2894
|
center: point,
|
|
2877
2895
|
width: distance,
|
|
2878
2896
|
height: distance,
|
|
2879
|
-
pcb_keepout_id:
|
|
2880
|
-
layers:
|
|
2897
|
+
pcb_keepout_id: z130.string(),
|
|
2898
|
+
layers: z130.array(z130.string()),
|
|
2881
2899
|
// Specify layers where the keepout applies
|
|
2882
|
-
description:
|
|
2900
|
+
description: z130.string().optional()
|
|
2883
2901
|
// Optional description of the keepout
|
|
2884
2902
|
}).or(
|
|
2885
|
-
|
|
2886
|
-
type:
|
|
2887
|
-
shape:
|
|
2888
|
-
pcb_group_id:
|
|
2889
|
-
subcircuit_id:
|
|
2903
|
+
z130.object({
|
|
2904
|
+
type: z130.literal("pcb_keepout"),
|
|
2905
|
+
shape: z130.literal("circle"),
|
|
2906
|
+
pcb_group_id: z130.string().optional(),
|
|
2907
|
+
subcircuit_id: z130.string().optional(),
|
|
2890
2908
|
center: point,
|
|
2891
2909
|
radius: distance,
|
|
2892
|
-
pcb_keepout_id:
|
|
2893
|
-
layers:
|
|
2910
|
+
pcb_keepout_id: z130.string(),
|
|
2911
|
+
layers: z130.array(z130.string()),
|
|
2894
2912
|
// Specify layers where the keepout applies
|
|
2895
|
-
description:
|
|
2913
|
+
description: z130.string().optional()
|
|
2896
2914
|
// Optional description of the keepout
|
|
2897
2915
|
})
|
|
2898
2916
|
);
|
|
2899
2917
|
expectTypesMatch(true);
|
|
2900
2918
|
|
|
2901
2919
|
// src/pcb/pcb_cutout.ts
|
|
2902
|
-
import { z as
|
|
2903
|
-
var pcb_cutout_base =
|
|
2904
|
-
type:
|
|
2920
|
+
import { z as z131 } from "zod";
|
|
2921
|
+
var pcb_cutout_base = z131.object({
|
|
2922
|
+
type: z131.literal("pcb_cutout"),
|
|
2905
2923
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2906
|
-
pcb_group_id:
|
|
2907
|
-
subcircuit_id:
|
|
2908
|
-
pcb_board_id:
|
|
2909
|
-
pcb_panel_id:
|
|
2924
|
+
pcb_group_id: z131.string().optional(),
|
|
2925
|
+
subcircuit_id: z131.string().optional(),
|
|
2926
|
+
pcb_board_id: z131.string().optional(),
|
|
2927
|
+
pcb_panel_id: z131.string().optional()
|
|
2910
2928
|
});
|
|
2911
2929
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2912
|
-
shape:
|
|
2930
|
+
shape: z131.literal("rect"),
|
|
2913
2931
|
center: point,
|
|
2914
2932
|
width: length,
|
|
2915
2933
|
height: length,
|
|
@@ -2918,26 +2936,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2918
2936
|
});
|
|
2919
2937
|
expectTypesMatch(true);
|
|
2920
2938
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2921
|
-
shape:
|
|
2939
|
+
shape: z131.literal("circle"),
|
|
2922
2940
|
center: point,
|
|
2923
2941
|
radius: length
|
|
2924
2942
|
});
|
|
2925
2943
|
expectTypesMatch(true);
|
|
2926
2944
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2927
|
-
shape:
|
|
2928
|
-
points:
|
|
2945
|
+
shape: z131.literal("polygon"),
|
|
2946
|
+
points: z131.array(point)
|
|
2929
2947
|
});
|
|
2930
2948
|
expectTypesMatch(true);
|
|
2931
2949
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
2932
|
-
shape:
|
|
2933
|
-
route:
|
|
2950
|
+
shape: z131.literal("path"),
|
|
2951
|
+
route: z131.array(point),
|
|
2934
2952
|
slot_width: length,
|
|
2935
2953
|
slot_length: length.optional(),
|
|
2936
2954
|
space_between_slots: length.optional(),
|
|
2937
2955
|
slot_corner_radius: length.optional()
|
|
2938
2956
|
});
|
|
2939
2957
|
expectTypesMatch(true);
|
|
2940
|
-
var pcb_cutout =
|
|
2958
|
+
var pcb_cutout = z131.discriminatedUnion("shape", [
|
|
2941
2959
|
pcb_cutout_rect,
|
|
2942
2960
|
pcb_cutout_circle,
|
|
2943
2961
|
pcb_cutout_polygon,
|
|
@@ -2946,147 +2964,147 @@ var pcb_cutout = z130.discriminatedUnion("shape", [
|
|
|
2946
2964
|
expectTypesMatch(true);
|
|
2947
2965
|
|
|
2948
2966
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2949
|
-
import { z as
|
|
2967
|
+
import { z as z132 } from "zod";
|
|
2950
2968
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
2951
|
-
type:
|
|
2969
|
+
type: z132.literal("pcb_missing_footprint_error"),
|
|
2952
2970
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2953
2971
|
"pcb_missing_footprint_error"
|
|
2954
2972
|
),
|
|
2955
|
-
pcb_group_id:
|
|
2956
|
-
subcircuit_id:
|
|
2957
|
-
error_type:
|
|
2958
|
-
source_component_id:
|
|
2973
|
+
pcb_group_id: z132.string().optional(),
|
|
2974
|
+
subcircuit_id: z132.string().optional(),
|
|
2975
|
+
error_type: z132.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
2976
|
+
source_component_id: z132.string()
|
|
2959
2977
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2960
2978
|
expectTypesMatch(
|
|
2961
2979
|
true
|
|
2962
2980
|
);
|
|
2963
2981
|
|
|
2964
2982
|
// src/pcb/external_footprint_load_error.ts
|
|
2965
|
-
import { z as
|
|
2983
|
+
import { z as z133 } from "zod";
|
|
2966
2984
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
2967
|
-
type:
|
|
2985
|
+
type: z133.literal("external_footprint_load_error"),
|
|
2968
2986
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2969
2987
|
"external_footprint_load_error"
|
|
2970
2988
|
),
|
|
2971
|
-
pcb_component_id:
|
|
2972
|
-
source_component_id:
|
|
2973
|
-
pcb_group_id:
|
|
2974
|
-
subcircuit_id:
|
|
2975
|
-
footprinter_string:
|
|
2976
|
-
error_type:
|
|
2989
|
+
pcb_component_id: z133.string(),
|
|
2990
|
+
source_component_id: z133.string(),
|
|
2991
|
+
pcb_group_id: z133.string().optional(),
|
|
2992
|
+
subcircuit_id: z133.string().optional(),
|
|
2993
|
+
footprinter_string: z133.string().optional(),
|
|
2994
|
+
error_type: z133.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
2977
2995
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2978
2996
|
expectTypesMatch(true);
|
|
2979
2997
|
|
|
2980
2998
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2981
|
-
import { z as
|
|
2999
|
+
import { z as z134 } from "zod";
|
|
2982
3000
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
2983
|
-
type:
|
|
3001
|
+
type: z134.literal("circuit_json_footprint_load_error"),
|
|
2984
3002
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2985
3003
|
"circuit_json_footprint_load_error"
|
|
2986
3004
|
),
|
|
2987
|
-
pcb_component_id:
|
|
2988
|
-
source_component_id:
|
|
2989
|
-
pcb_group_id:
|
|
2990
|
-
subcircuit_id:
|
|
2991
|
-
error_type:
|
|
2992
|
-
circuit_json:
|
|
3005
|
+
pcb_component_id: z134.string(),
|
|
3006
|
+
source_component_id: z134.string(),
|
|
3007
|
+
pcb_group_id: z134.string().optional(),
|
|
3008
|
+
subcircuit_id: z134.string().optional(),
|
|
3009
|
+
error_type: z134.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
3010
|
+
circuit_json: z134.array(z134.any()).optional()
|
|
2993
3011
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
2994
3012
|
expectTypesMatch(true);
|
|
2995
3013
|
|
|
2996
3014
|
// src/pcb/pcb_group.ts
|
|
2997
|
-
import { z as
|
|
2998
|
-
var pcb_group =
|
|
2999
|
-
type:
|
|
3015
|
+
import { z as z135 } from "zod";
|
|
3016
|
+
var pcb_group = z135.object({
|
|
3017
|
+
type: z135.literal("pcb_group"),
|
|
3000
3018
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
3001
|
-
source_group_id:
|
|
3002
|
-
is_subcircuit:
|
|
3003
|
-
subcircuit_id:
|
|
3019
|
+
source_group_id: z135.string(),
|
|
3020
|
+
is_subcircuit: z135.boolean().optional(),
|
|
3021
|
+
subcircuit_id: z135.string().optional(),
|
|
3004
3022
|
width: length.optional(),
|
|
3005
3023
|
height: length.optional(),
|
|
3006
3024
|
center: point,
|
|
3007
|
-
display_offset_x:
|
|
3025
|
+
display_offset_x: z135.string().optional().describe(
|
|
3008
3026
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
3009
3027
|
),
|
|
3010
|
-
display_offset_y:
|
|
3028
|
+
display_offset_y: z135.string().optional().describe(
|
|
3011
3029
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
3012
3030
|
),
|
|
3013
|
-
outline:
|
|
3031
|
+
outline: z135.array(point).optional(),
|
|
3014
3032
|
anchor_position: point.optional(),
|
|
3015
3033
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
3016
|
-
position_mode:
|
|
3017
|
-
positioned_relative_to_pcb_group_id:
|
|
3018
|
-
positioned_relative_to_pcb_board_id:
|
|
3019
|
-
pcb_component_ids:
|
|
3020
|
-
child_layout_mode:
|
|
3021
|
-
name:
|
|
3022
|
-
description:
|
|
3023
|
-
layout_mode:
|
|
3024
|
-
autorouter_configuration:
|
|
3034
|
+
position_mode: z135.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3035
|
+
positioned_relative_to_pcb_group_id: z135.string().optional(),
|
|
3036
|
+
positioned_relative_to_pcb_board_id: z135.string().optional(),
|
|
3037
|
+
pcb_component_ids: z135.array(z135.string()),
|
|
3038
|
+
child_layout_mode: z135.enum(["packed", "none"]).optional(),
|
|
3039
|
+
name: z135.string().optional(),
|
|
3040
|
+
description: z135.string().optional(),
|
|
3041
|
+
layout_mode: z135.string().optional(),
|
|
3042
|
+
autorouter_configuration: z135.object({
|
|
3025
3043
|
trace_clearance: length
|
|
3026
3044
|
}).optional(),
|
|
3027
|
-
autorouter_used_string:
|
|
3045
|
+
autorouter_used_string: z135.string().optional()
|
|
3028
3046
|
}).describe("Defines a group of components on the PCB");
|
|
3029
3047
|
expectTypesMatch(true);
|
|
3030
3048
|
|
|
3031
3049
|
// src/pcb/pcb_autorouting_error.ts
|
|
3032
|
-
import { z as
|
|
3050
|
+
import { z as z136 } from "zod";
|
|
3033
3051
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3034
|
-
type:
|
|
3052
|
+
type: z136.literal("pcb_autorouting_error"),
|
|
3035
3053
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3036
|
-
error_type:
|
|
3037
|
-
subcircuit_id:
|
|
3054
|
+
error_type: z136.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3055
|
+
subcircuit_id: z136.string().optional()
|
|
3038
3056
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3039
3057
|
expectTypesMatch(true);
|
|
3040
3058
|
|
|
3041
3059
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3042
|
-
import { z as
|
|
3043
|
-
var pcb_manual_edit_conflict_warning =
|
|
3044
|
-
type:
|
|
3060
|
+
import { z as z137 } from "zod";
|
|
3061
|
+
var pcb_manual_edit_conflict_warning = z137.object({
|
|
3062
|
+
type: z137.literal("pcb_manual_edit_conflict_warning"),
|
|
3045
3063
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3046
3064
|
"pcb_manual_edit_conflict_warning"
|
|
3047
3065
|
),
|
|
3048
|
-
warning_type:
|
|
3049
|
-
message:
|
|
3050
|
-
pcb_component_id:
|
|
3051
|
-
pcb_group_id:
|
|
3052
|
-
subcircuit_id:
|
|
3053
|
-
source_component_id:
|
|
3066
|
+
warning_type: z137.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3067
|
+
message: z137.string(),
|
|
3068
|
+
pcb_component_id: z137.string(),
|
|
3069
|
+
pcb_group_id: z137.string().optional(),
|
|
3070
|
+
subcircuit_id: z137.string().optional(),
|
|
3071
|
+
source_component_id: z137.string()
|
|
3054
3072
|
}).describe(
|
|
3055
3073
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3056
3074
|
);
|
|
3057
3075
|
expectTypesMatch(true);
|
|
3058
3076
|
|
|
3059
3077
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3060
|
-
import { z as
|
|
3061
|
-
var connectorOrientationDirection =
|
|
3062
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3063
|
-
type:
|
|
3078
|
+
import { z as z138 } from "zod";
|
|
3079
|
+
var connectorOrientationDirection = z138.enum(["x-", "x+", "y+", "y-"]);
|
|
3080
|
+
var pcb_connector_not_in_accessible_orientation_warning = z138.object({
|
|
3081
|
+
type: z138.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3064
3082
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3065
3083
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3066
3084
|
),
|
|
3067
|
-
warning_type:
|
|
3068
|
-
message:
|
|
3069
|
-
pcb_component_id:
|
|
3070
|
-
source_component_id:
|
|
3071
|
-
pcb_board_id:
|
|
3085
|
+
warning_type: z138.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3086
|
+
message: z138.string(),
|
|
3087
|
+
pcb_component_id: z138.string(),
|
|
3088
|
+
source_component_id: z138.string().optional(),
|
|
3089
|
+
pcb_board_id: z138.string().optional(),
|
|
3072
3090
|
facing_direction: connectorOrientationDirection,
|
|
3073
3091
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3074
|
-
subcircuit_id:
|
|
3092
|
+
subcircuit_id: z138.string().optional()
|
|
3075
3093
|
}).describe(
|
|
3076
3094
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3077
3095
|
);
|
|
3078
3096
|
expectTypesMatch(true);
|
|
3079
3097
|
|
|
3080
3098
|
// src/pcb/pcb_breakout_point.ts
|
|
3081
|
-
import { z as
|
|
3082
|
-
var pcb_breakout_point =
|
|
3083
|
-
type:
|
|
3099
|
+
import { z as z139 } from "zod";
|
|
3100
|
+
var pcb_breakout_point = z139.object({
|
|
3101
|
+
type: z139.literal("pcb_breakout_point"),
|
|
3084
3102
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3085
|
-
pcb_group_id:
|
|
3086
|
-
subcircuit_id:
|
|
3087
|
-
source_trace_id:
|
|
3088
|
-
source_port_id:
|
|
3089
|
-
source_net_id:
|
|
3103
|
+
pcb_group_id: z139.string(),
|
|
3104
|
+
subcircuit_id: z139.string().optional(),
|
|
3105
|
+
source_trace_id: z139.string().optional(),
|
|
3106
|
+
source_port_id: z139.string().optional(),
|
|
3107
|
+
source_net_id: z139.string().optional(),
|
|
3090
3108
|
x: distance,
|
|
3091
3109
|
y: distance
|
|
3092
3110
|
}).describe(
|
|
@@ -3095,61 +3113,61 @@ var pcb_breakout_point = z138.object({
|
|
|
3095
3113
|
expectTypesMatch(true);
|
|
3096
3114
|
|
|
3097
3115
|
// src/pcb/pcb_ground_plane.ts
|
|
3098
|
-
import { z as
|
|
3099
|
-
var pcb_ground_plane =
|
|
3100
|
-
type:
|
|
3116
|
+
import { z as z140 } from "zod";
|
|
3117
|
+
var pcb_ground_plane = z140.object({
|
|
3118
|
+
type: z140.literal("pcb_ground_plane"),
|
|
3101
3119
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3102
|
-
source_pcb_ground_plane_id:
|
|
3103
|
-
source_net_id:
|
|
3104
|
-
pcb_group_id:
|
|
3105
|
-
subcircuit_id:
|
|
3120
|
+
source_pcb_ground_plane_id: z140.string(),
|
|
3121
|
+
source_net_id: z140.string(),
|
|
3122
|
+
pcb_group_id: z140.string().optional(),
|
|
3123
|
+
subcircuit_id: z140.string().optional()
|
|
3106
3124
|
}).describe("Defines a ground plane on the PCB");
|
|
3107
3125
|
expectTypesMatch(true);
|
|
3108
3126
|
|
|
3109
3127
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3110
|
-
import { z as
|
|
3111
|
-
var pcb_ground_plane_region =
|
|
3112
|
-
type:
|
|
3128
|
+
import { z as z141 } from "zod";
|
|
3129
|
+
var pcb_ground_plane_region = z141.object({
|
|
3130
|
+
type: z141.literal("pcb_ground_plane_region"),
|
|
3113
3131
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3114
3132
|
"pcb_ground_plane_region"
|
|
3115
3133
|
),
|
|
3116
|
-
pcb_ground_plane_id:
|
|
3117
|
-
pcb_group_id:
|
|
3118
|
-
subcircuit_id:
|
|
3134
|
+
pcb_ground_plane_id: z141.string(),
|
|
3135
|
+
pcb_group_id: z141.string().optional(),
|
|
3136
|
+
subcircuit_id: z141.string().optional(),
|
|
3119
3137
|
layer: layer_ref,
|
|
3120
|
-
points:
|
|
3138
|
+
points: z141.array(point)
|
|
3121
3139
|
}).describe("Defines a polygon region of a ground plane");
|
|
3122
3140
|
expectTypesMatch(true);
|
|
3123
3141
|
|
|
3124
3142
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3125
|
-
import { z as
|
|
3126
|
-
var pcb_thermal_spoke =
|
|
3127
|
-
type:
|
|
3143
|
+
import { z as z142 } from "zod";
|
|
3144
|
+
var pcb_thermal_spoke = z142.object({
|
|
3145
|
+
type: z142.literal("pcb_thermal_spoke"),
|
|
3128
3146
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3129
|
-
pcb_ground_plane_id:
|
|
3130
|
-
shape:
|
|
3131
|
-
spoke_count:
|
|
3147
|
+
pcb_ground_plane_id: z142.string(),
|
|
3148
|
+
shape: z142.string(),
|
|
3149
|
+
spoke_count: z142.number(),
|
|
3132
3150
|
spoke_thickness: distance,
|
|
3133
3151
|
spoke_inner_diameter: distance,
|
|
3134
3152
|
spoke_outer_diameter: distance,
|
|
3135
|
-
pcb_plated_hole_id:
|
|
3136
|
-
subcircuit_id:
|
|
3153
|
+
pcb_plated_hole_id: z142.string().optional(),
|
|
3154
|
+
subcircuit_id: z142.string().optional()
|
|
3137
3155
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3138
3156
|
expectTypesMatch(true);
|
|
3139
3157
|
|
|
3140
3158
|
// src/pcb/pcb_copper_pour.ts
|
|
3141
|
-
import { z as
|
|
3142
|
-
var pcb_copper_pour_base =
|
|
3143
|
-
type:
|
|
3159
|
+
import { z as z143 } from "zod";
|
|
3160
|
+
var pcb_copper_pour_base = z143.object({
|
|
3161
|
+
type: z143.literal("pcb_copper_pour"),
|
|
3144
3162
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3145
|
-
pcb_group_id:
|
|
3146
|
-
subcircuit_id:
|
|
3163
|
+
pcb_group_id: z143.string().optional(),
|
|
3164
|
+
subcircuit_id: z143.string().optional(),
|
|
3147
3165
|
layer: layer_ref,
|
|
3148
|
-
source_net_id:
|
|
3149
|
-
covered_with_solder_mask:
|
|
3166
|
+
source_net_id: z143.string().optional(),
|
|
3167
|
+
covered_with_solder_mask: z143.boolean().optional().default(true)
|
|
3150
3168
|
});
|
|
3151
3169
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3152
|
-
shape:
|
|
3170
|
+
shape: z143.literal("rect"),
|
|
3153
3171
|
center: point,
|
|
3154
3172
|
width: length,
|
|
3155
3173
|
height: length,
|
|
@@ -3157,16 +3175,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3157
3175
|
});
|
|
3158
3176
|
expectTypesMatch(true);
|
|
3159
3177
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3160
|
-
shape:
|
|
3178
|
+
shape: z143.literal("brep"),
|
|
3161
3179
|
brep_shape
|
|
3162
3180
|
});
|
|
3163
3181
|
expectTypesMatch(true);
|
|
3164
3182
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3165
|
-
shape:
|
|
3166
|
-
points:
|
|
3183
|
+
shape: z143.literal("polygon"),
|
|
3184
|
+
points: z143.array(point)
|
|
3167
3185
|
});
|
|
3168
3186
|
expectTypesMatch(true);
|
|
3169
|
-
var pcb_copper_pour =
|
|
3187
|
+
var pcb_copper_pour = z143.discriminatedUnion("shape", [
|
|
3170
3188
|
pcb_copper_pour_rect,
|
|
3171
3189
|
pcb_copper_pour_brep,
|
|
3172
3190
|
pcb_copper_pour_polygon
|
|
@@ -3174,149 +3192,149 @@ var pcb_copper_pour = z142.discriminatedUnion("shape", [
|
|
|
3174
3192
|
expectTypesMatch(true);
|
|
3175
3193
|
|
|
3176
3194
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3177
|
-
import { z as
|
|
3195
|
+
import { z as z144 } from "zod";
|
|
3178
3196
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3179
|
-
type:
|
|
3197
|
+
type: z144.literal("pcb_component_outside_board_error"),
|
|
3180
3198
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3181
3199
|
"pcb_component_outside_board_error"
|
|
3182
3200
|
),
|
|
3183
|
-
error_type:
|
|
3184
|
-
pcb_component_id:
|
|
3185
|
-
pcb_board_id:
|
|
3201
|
+
error_type: z144.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3202
|
+
pcb_component_id: z144.string(),
|
|
3203
|
+
pcb_board_id: z144.string(),
|
|
3186
3204
|
component_center: point,
|
|
3187
|
-
component_bounds:
|
|
3188
|
-
min_x:
|
|
3189
|
-
max_x:
|
|
3190
|
-
min_y:
|
|
3191
|
-
max_y:
|
|
3205
|
+
component_bounds: z144.object({
|
|
3206
|
+
min_x: z144.number(),
|
|
3207
|
+
max_x: z144.number(),
|
|
3208
|
+
min_y: z144.number(),
|
|
3209
|
+
max_y: z144.number()
|
|
3192
3210
|
}),
|
|
3193
|
-
subcircuit_id:
|
|
3194
|
-
source_component_id:
|
|
3211
|
+
subcircuit_id: z144.string().optional(),
|
|
3212
|
+
source_component_id: z144.string().optional()
|
|
3195
3213
|
}).describe(
|
|
3196
3214
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3197
3215
|
);
|
|
3198
3216
|
expectTypesMatch(true);
|
|
3199
3217
|
|
|
3200
3218
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3201
|
-
import { z as
|
|
3219
|
+
import { z as z145 } from "zod";
|
|
3202
3220
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3203
|
-
type:
|
|
3221
|
+
type: z145.literal("pcb_component_not_on_board_edge_error"),
|
|
3204
3222
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3205
3223
|
"pcb_component_not_on_board_edge_error"
|
|
3206
3224
|
),
|
|
3207
|
-
error_type:
|
|
3208
|
-
pcb_component_id:
|
|
3209
|
-
pcb_board_id:
|
|
3225
|
+
error_type: z145.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3226
|
+
pcb_component_id: z145.string(),
|
|
3227
|
+
pcb_board_id: z145.string(),
|
|
3210
3228
|
component_center: point,
|
|
3211
|
-
pad_to_nearest_board_edge_distance:
|
|
3212
|
-
source_component_id:
|
|
3213
|
-
subcircuit_id:
|
|
3229
|
+
pad_to_nearest_board_edge_distance: z145.number(),
|
|
3230
|
+
source_component_id: z145.string().optional(),
|
|
3231
|
+
subcircuit_id: z145.string().optional()
|
|
3214
3232
|
}).describe(
|
|
3215
3233
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3216
3234
|
);
|
|
3217
3235
|
expectTypesMatch(true);
|
|
3218
3236
|
|
|
3219
3237
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3220
|
-
import { z as
|
|
3238
|
+
import { z as z146 } from "zod";
|
|
3221
3239
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3222
|
-
type:
|
|
3240
|
+
type: z146.literal("pcb_component_invalid_layer_error"),
|
|
3223
3241
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3224
3242
|
"pcb_component_invalid_layer_error"
|
|
3225
3243
|
),
|
|
3226
|
-
error_type:
|
|
3227
|
-
pcb_component_id:
|
|
3228
|
-
source_component_id:
|
|
3244
|
+
error_type: z146.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3245
|
+
pcb_component_id: z146.string().optional(),
|
|
3246
|
+
source_component_id: z146.string(),
|
|
3229
3247
|
layer: layer_ref,
|
|
3230
|
-
subcircuit_id:
|
|
3248
|
+
subcircuit_id: z146.string().optional()
|
|
3231
3249
|
}).describe(
|
|
3232
3250
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3233
3251
|
);
|
|
3234
3252
|
expectTypesMatch(true);
|
|
3235
3253
|
|
|
3236
3254
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3237
|
-
import { z as
|
|
3255
|
+
import { z as z147 } from "zod";
|
|
3238
3256
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3239
|
-
type:
|
|
3257
|
+
type: z147.literal("pcb_via_clearance_error"),
|
|
3240
3258
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3241
|
-
error_type:
|
|
3242
|
-
pcb_via_ids:
|
|
3259
|
+
error_type: z147.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3260
|
+
pcb_via_ids: z147.array(z147.string()).min(2),
|
|
3243
3261
|
minimum_clearance: distance.optional(),
|
|
3244
3262
|
actual_clearance: distance.optional(),
|
|
3245
|
-
pcb_center:
|
|
3246
|
-
x:
|
|
3247
|
-
y:
|
|
3263
|
+
pcb_center: z147.object({
|
|
3264
|
+
x: z147.number().optional(),
|
|
3265
|
+
y: z147.number().optional()
|
|
3248
3266
|
}).optional(),
|
|
3249
|
-
subcircuit_id:
|
|
3267
|
+
subcircuit_id: z147.string().optional()
|
|
3250
3268
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3251
3269
|
expectTypesMatch(true);
|
|
3252
3270
|
|
|
3253
3271
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3254
|
-
import { z as
|
|
3255
|
-
var pcb_courtyard_rect =
|
|
3256
|
-
type:
|
|
3272
|
+
import { z as z148 } from "zod";
|
|
3273
|
+
var pcb_courtyard_rect = z148.object({
|
|
3274
|
+
type: z148.literal("pcb_courtyard_rect"),
|
|
3257
3275
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3258
|
-
pcb_component_id:
|
|
3259
|
-
pcb_group_id:
|
|
3260
|
-
subcircuit_id:
|
|
3276
|
+
pcb_component_id: z148.string(),
|
|
3277
|
+
pcb_group_id: z148.string().optional(),
|
|
3278
|
+
subcircuit_id: z148.string().optional(),
|
|
3261
3279
|
center: point,
|
|
3262
3280
|
width: length,
|
|
3263
3281
|
height: length,
|
|
3264
3282
|
layer: visible_layer,
|
|
3265
3283
|
ccw_rotation: rotation.optional(),
|
|
3266
|
-
color:
|
|
3284
|
+
color: z148.string().optional()
|
|
3267
3285
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3268
3286
|
expectTypesMatch(true);
|
|
3269
3287
|
|
|
3270
3288
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3271
|
-
import { z as
|
|
3272
|
-
var pcb_courtyard_outline =
|
|
3273
|
-
type:
|
|
3289
|
+
import { z as z149 } from "zod";
|
|
3290
|
+
var pcb_courtyard_outline = z149.object({
|
|
3291
|
+
type: z149.literal("pcb_courtyard_outline"),
|
|
3274
3292
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3275
3293
|
"pcb_courtyard_outline"
|
|
3276
3294
|
),
|
|
3277
|
-
pcb_component_id:
|
|
3278
|
-
pcb_group_id:
|
|
3279
|
-
subcircuit_id:
|
|
3295
|
+
pcb_component_id: z149.string(),
|
|
3296
|
+
pcb_group_id: z149.string().optional(),
|
|
3297
|
+
subcircuit_id: z149.string().optional(),
|
|
3280
3298
|
layer: visible_layer,
|
|
3281
|
-
outline:
|
|
3299
|
+
outline: z149.array(point).min(2)
|
|
3282
3300
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3283
3301
|
expectTypesMatch(true);
|
|
3284
3302
|
|
|
3285
3303
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3286
|
-
import { z as
|
|
3287
|
-
var pcb_courtyard_polygon =
|
|
3288
|
-
type:
|
|
3304
|
+
import { z as z150 } from "zod";
|
|
3305
|
+
var pcb_courtyard_polygon = z150.object({
|
|
3306
|
+
type: z150.literal("pcb_courtyard_polygon"),
|
|
3289
3307
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3290
3308
|
"pcb_courtyard_polygon"
|
|
3291
3309
|
),
|
|
3292
|
-
pcb_component_id:
|
|
3293
|
-
pcb_group_id:
|
|
3294
|
-
subcircuit_id:
|
|
3310
|
+
pcb_component_id: z150.string(),
|
|
3311
|
+
pcb_group_id: z150.string().optional(),
|
|
3312
|
+
subcircuit_id: z150.string().optional(),
|
|
3295
3313
|
layer: visible_layer,
|
|
3296
|
-
points:
|
|
3297
|
-
color:
|
|
3314
|
+
points: z150.array(point).min(3),
|
|
3315
|
+
color: z150.string().optional()
|
|
3298
3316
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3299
3317
|
expectTypesMatch(true);
|
|
3300
3318
|
|
|
3301
3319
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3302
|
-
import { z as
|
|
3303
|
-
var pcb_courtyard_circle =
|
|
3304
|
-
type:
|
|
3320
|
+
import { z as z151 } from "zod";
|
|
3321
|
+
var pcb_courtyard_circle = z151.object({
|
|
3322
|
+
type: z151.literal("pcb_courtyard_circle"),
|
|
3305
3323
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3306
3324
|
"pcb_courtyard_circle"
|
|
3307
3325
|
),
|
|
3308
|
-
pcb_component_id:
|
|
3309
|
-
pcb_group_id:
|
|
3310
|
-
subcircuit_id:
|
|
3326
|
+
pcb_component_id: z151.string(),
|
|
3327
|
+
pcb_group_id: z151.string().optional(),
|
|
3328
|
+
subcircuit_id: z151.string().optional(),
|
|
3311
3329
|
center: point,
|
|
3312
3330
|
radius: length,
|
|
3313
3331
|
layer: visible_layer,
|
|
3314
|
-
color:
|
|
3332
|
+
color: z151.string().optional()
|
|
3315
3333
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3316
3334
|
expectTypesMatch(true);
|
|
3317
3335
|
|
|
3318
3336
|
// src/cad/cad_component.ts
|
|
3319
|
-
import { z as
|
|
3337
|
+
import { z as z152 } from "zod";
|
|
3320
3338
|
|
|
3321
3339
|
// src/cad/cad_model_conventions.ts
|
|
3322
3340
|
var cad_model_formats = [
|
|
@@ -3347,48 +3365,48 @@ var cadModelDefaultDirectionMap = {
|
|
|
3347
3365
|
};
|
|
3348
3366
|
|
|
3349
3367
|
// src/cad/cad_component.ts
|
|
3350
|
-
var cad_component =
|
|
3351
|
-
type:
|
|
3352
|
-
cad_component_id:
|
|
3353
|
-
pcb_component_id:
|
|
3354
|
-
source_component_id:
|
|
3368
|
+
var cad_component = z152.object({
|
|
3369
|
+
type: z152.literal("cad_component"),
|
|
3370
|
+
cad_component_id: z152.string(),
|
|
3371
|
+
pcb_component_id: z152.string(),
|
|
3372
|
+
source_component_id: z152.string(),
|
|
3355
3373
|
position: point3,
|
|
3356
3374
|
rotation: point3.optional(),
|
|
3357
3375
|
size: point3.optional(),
|
|
3358
3376
|
layer: layer_ref.optional(),
|
|
3359
|
-
subcircuit_id:
|
|
3377
|
+
subcircuit_id: z152.string().optional(),
|
|
3360
3378
|
// These are all ways to generate/load the 3d model
|
|
3361
|
-
footprinter_string:
|
|
3362
|
-
model_obj_url:
|
|
3363
|
-
model_stl_url:
|
|
3364
|
-
model_3mf_url:
|
|
3365
|
-
model_gltf_url:
|
|
3366
|
-
model_glb_url:
|
|
3367
|
-
model_step_url:
|
|
3368
|
-
model_wrl_url:
|
|
3379
|
+
footprinter_string: z152.string().optional(),
|
|
3380
|
+
model_obj_url: z152.string().optional(),
|
|
3381
|
+
model_stl_url: z152.string().optional(),
|
|
3382
|
+
model_3mf_url: z152.string().optional(),
|
|
3383
|
+
model_gltf_url: z152.string().optional(),
|
|
3384
|
+
model_glb_url: z152.string().optional(),
|
|
3385
|
+
model_step_url: z152.string().optional(),
|
|
3386
|
+
model_wrl_url: z152.string().optional(),
|
|
3369
3387
|
model_asset: asset.optional(),
|
|
3370
|
-
model_unit_to_mm_scale_factor:
|
|
3371
|
-
model_board_normal_direction:
|
|
3388
|
+
model_unit_to_mm_scale_factor: z152.number().optional(),
|
|
3389
|
+
model_board_normal_direction: z152.enum(cad_model_axis_directions).optional().describe(
|
|
3372
3390
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3373
3391
|
),
|
|
3374
3392
|
model_origin_position: point3.optional(),
|
|
3375
|
-
model_origin_alignment:
|
|
3393
|
+
model_origin_alignment: z152.enum([
|
|
3376
3394
|
"unknown",
|
|
3377
3395
|
"center",
|
|
3378
3396
|
"center_of_component_on_board_surface",
|
|
3379
3397
|
"bottom_center_of_component"
|
|
3380
3398
|
]).optional(),
|
|
3381
|
-
model_object_fit:
|
|
3382
|
-
model_jscad:
|
|
3383
|
-
show_as_translucent_model:
|
|
3384
|
-
anchor_alignment:
|
|
3399
|
+
model_object_fit: z152.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
3400
|
+
model_jscad: z152.any().optional(),
|
|
3401
|
+
show_as_translucent_model: z152.boolean().optional(),
|
|
3402
|
+
anchor_alignment: z152.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3385
3403
|
}).describe("Defines a component on the PCB");
|
|
3386
3404
|
expectTypesMatch(true);
|
|
3387
3405
|
|
|
3388
3406
|
// src/simulation/simulation_voltage_source.ts
|
|
3389
|
-
import { z as
|
|
3390
|
-
var wave_shape =
|
|
3391
|
-
var percentage =
|
|
3407
|
+
import { z as z153 } from "zod";
|
|
3408
|
+
var wave_shape = z153.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
3409
|
+
var percentage = z153.union([z153.string(), z153.number()]).transform((val) => {
|
|
3392
3410
|
if (typeof val === "string") {
|
|
3393
3411
|
if (val.endsWith("%")) {
|
|
3394
3412
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3397,30 +3415,30 @@ var percentage = z152.union([z152.string(), z152.number()]).transform((val) => {
|
|
|
3397
3415
|
}
|
|
3398
3416
|
return val;
|
|
3399
3417
|
}).pipe(
|
|
3400
|
-
|
|
3418
|
+
z153.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3401
3419
|
);
|
|
3402
|
-
var simulation_dc_voltage_source =
|
|
3403
|
-
type:
|
|
3420
|
+
var simulation_dc_voltage_source = z153.object({
|
|
3421
|
+
type: z153.literal("simulation_voltage_source"),
|
|
3404
3422
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3405
3423
|
"simulation_voltage_source"
|
|
3406
3424
|
),
|
|
3407
|
-
is_dc_source:
|
|
3408
|
-
positive_source_port_id:
|
|
3409
|
-
negative_source_port_id:
|
|
3410
|
-
positive_source_net_id:
|
|
3411
|
-
negative_source_net_id:
|
|
3425
|
+
is_dc_source: z153.literal(true).optional().default(true),
|
|
3426
|
+
positive_source_port_id: z153.string().optional(),
|
|
3427
|
+
negative_source_port_id: z153.string().optional(),
|
|
3428
|
+
positive_source_net_id: z153.string().optional(),
|
|
3429
|
+
negative_source_net_id: z153.string().optional(),
|
|
3412
3430
|
voltage
|
|
3413
3431
|
}).describe("Defines a DC voltage source for simulation");
|
|
3414
|
-
var simulation_ac_voltage_source =
|
|
3415
|
-
type:
|
|
3432
|
+
var simulation_ac_voltage_source = z153.object({
|
|
3433
|
+
type: z153.literal("simulation_voltage_source"),
|
|
3416
3434
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3417
3435
|
"simulation_voltage_source"
|
|
3418
3436
|
),
|
|
3419
|
-
is_dc_source:
|
|
3420
|
-
terminal1_source_port_id:
|
|
3421
|
-
terminal2_source_port_id:
|
|
3422
|
-
terminal1_source_net_id:
|
|
3423
|
-
terminal2_source_net_id:
|
|
3437
|
+
is_dc_source: z153.literal(false),
|
|
3438
|
+
terminal1_source_port_id: z153.string().optional(),
|
|
3439
|
+
terminal2_source_port_id: z153.string().optional(),
|
|
3440
|
+
terminal1_source_net_id: z153.string().optional(),
|
|
3441
|
+
terminal2_source_net_id: z153.string().optional(),
|
|
3424
3442
|
voltage: voltage.optional(),
|
|
3425
3443
|
frequency: frequency.optional(),
|
|
3426
3444
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3428,14 +3446,14 @@ var simulation_ac_voltage_source = z152.object({
|
|
|
3428
3446
|
phase: rotation.optional(),
|
|
3429
3447
|
duty_cycle: percentage.optional()
|
|
3430
3448
|
}).describe("Defines an AC voltage source for simulation");
|
|
3431
|
-
var simulation_voltage_source =
|
|
3449
|
+
var simulation_voltage_source = z153.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
3432
3450
|
expectTypesMatch(true);
|
|
3433
3451
|
expectTypesMatch(true);
|
|
3434
3452
|
expectTypesMatch(true);
|
|
3435
3453
|
|
|
3436
3454
|
// src/simulation/simulation_current_source.ts
|
|
3437
|
-
import { z as
|
|
3438
|
-
var percentage2 =
|
|
3455
|
+
import { z as z154 } from "zod";
|
|
3456
|
+
var percentage2 = z154.union([z154.string(), z154.number()]).transform((val) => {
|
|
3439
3457
|
if (typeof val === "string") {
|
|
3440
3458
|
if (val.endsWith("%")) {
|
|
3441
3459
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3444,30 +3462,30 @@ var percentage2 = z153.union([z153.string(), z153.number()]).transform((val) =>
|
|
|
3444
3462
|
}
|
|
3445
3463
|
return val;
|
|
3446
3464
|
}).pipe(
|
|
3447
|
-
|
|
3465
|
+
z154.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3448
3466
|
);
|
|
3449
|
-
var simulation_dc_current_source =
|
|
3450
|
-
type:
|
|
3467
|
+
var simulation_dc_current_source = z154.object({
|
|
3468
|
+
type: z154.literal("simulation_current_source"),
|
|
3451
3469
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3452
3470
|
"simulation_current_source"
|
|
3453
3471
|
),
|
|
3454
|
-
is_dc_source:
|
|
3455
|
-
positive_source_port_id:
|
|
3456
|
-
negative_source_port_id:
|
|
3457
|
-
positive_source_net_id:
|
|
3458
|
-
negative_source_net_id:
|
|
3472
|
+
is_dc_source: z154.literal(true).optional().default(true),
|
|
3473
|
+
positive_source_port_id: z154.string().optional(),
|
|
3474
|
+
negative_source_port_id: z154.string().optional(),
|
|
3475
|
+
positive_source_net_id: z154.string().optional(),
|
|
3476
|
+
negative_source_net_id: z154.string().optional(),
|
|
3459
3477
|
current
|
|
3460
3478
|
}).describe("Defines a DC current source for simulation");
|
|
3461
|
-
var simulation_ac_current_source =
|
|
3462
|
-
type:
|
|
3479
|
+
var simulation_ac_current_source = z154.object({
|
|
3480
|
+
type: z154.literal("simulation_current_source"),
|
|
3463
3481
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3464
3482
|
"simulation_current_source"
|
|
3465
3483
|
),
|
|
3466
|
-
is_dc_source:
|
|
3467
|
-
terminal1_source_port_id:
|
|
3468
|
-
terminal2_source_port_id:
|
|
3469
|
-
terminal1_source_net_id:
|
|
3470
|
-
terminal2_source_net_id:
|
|
3484
|
+
is_dc_source: z154.literal(false),
|
|
3485
|
+
terminal1_source_port_id: z154.string().optional(),
|
|
3486
|
+
terminal2_source_port_id: z154.string().optional(),
|
|
3487
|
+
terminal1_source_net_id: z154.string().optional(),
|
|
3488
|
+
terminal2_source_net_id: z154.string().optional(),
|
|
3471
3489
|
current: current.optional(),
|
|
3472
3490
|
frequency: frequency.optional(),
|
|
3473
3491
|
peak_to_peak_current: current.optional(),
|
|
@@ -3475,25 +3493,25 @@ var simulation_ac_current_source = z153.object({
|
|
|
3475
3493
|
phase: rotation.optional(),
|
|
3476
3494
|
duty_cycle: percentage2.optional()
|
|
3477
3495
|
}).describe("Defines an AC current source for simulation");
|
|
3478
|
-
var simulation_current_source =
|
|
3496
|
+
var simulation_current_source = z154.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
3479
3497
|
expectTypesMatch(true);
|
|
3480
3498
|
expectTypesMatch(true);
|
|
3481
3499
|
expectTypesMatch(true);
|
|
3482
3500
|
|
|
3483
3501
|
// src/simulation/simulation_experiment.ts
|
|
3484
|
-
import { z as
|
|
3485
|
-
var experiment_type =
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3502
|
+
import { z as z155 } from "zod";
|
|
3503
|
+
var experiment_type = z155.union([
|
|
3504
|
+
z155.literal("spice_dc_sweep"),
|
|
3505
|
+
z155.literal("spice_dc_operating_point"),
|
|
3506
|
+
z155.literal("spice_transient_analysis"),
|
|
3507
|
+
z155.literal("spice_ac_analysis")
|
|
3490
3508
|
]);
|
|
3491
|
-
var simulation_experiment =
|
|
3492
|
-
type:
|
|
3509
|
+
var simulation_experiment = z155.object({
|
|
3510
|
+
type: z155.literal("simulation_experiment"),
|
|
3493
3511
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
3494
3512
|
"simulation_experiment"
|
|
3495
3513
|
),
|
|
3496
|
-
name:
|
|
3514
|
+
name: z155.string(),
|
|
3497
3515
|
experiment_type,
|
|
3498
3516
|
time_per_step: duration_ms.optional(),
|
|
3499
3517
|
start_time_ms: ms.optional(),
|
|
@@ -3502,53 +3520,53 @@ var simulation_experiment = z154.object({
|
|
|
3502
3520
|
expectTypesMatch(true);
|
|
3503
3521
|
|
|
3504
3522
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
3505
|
-
import { z as
|
|
3506
|
-
var simulation_transient_voltage_graph =
|
|
3507
|
-
type:
|
|
3523
|
+
import { z as z156 } from "zod";
|
|
3524
|
+
var simulation_transient_voltage_graph = z156.object({
|
|
3525
|
+
type: z156.literal("simulation_transient_voltage_graph"),
|
|
3508
3526
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
3509
3527
|
"simulation_transient_voltage_graph"
|
|
3510
3528
|
),
|
|
3511
|
-
simulation_experiment_id:
|
|
3512
|
-
timestamps_ms:
|
|
3513
|
-
voltage_levels:
|
|
3514
|
-
source_component_id:
|
|
3515
|
-
subcircuit_connectivity_map_key:
|
|
3529
|
+
simulation_experiment_id: z156.string(),
|
|
3530
|
+
timestamps_ms: z156.array(z156.number()).optional(),
|
|
3531
|
+
voltage_levels: z156.array(z156.number()),
|
|
3532
|
+
source_component_id: z156.string().optional(),
|
|
3533
|
+
subcircuit_connectivity_map_key: z156.string().optional(),
|
|
3516
3534
|
time_per_step: duration_ms,
|
|
3517
3535
|
start_time_ms: ms,
|
|
3518
3536
|
end_time_ms: ms,
|
|
3519
|
-
name:
|
|
3520
|
-
color:
|
|
3537
|
+
name: z156.string().optional(),
|
|
3538
|
+
color: z156.string().optional()
|
|
3521
3539
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
3522
3540
|
expectTypesMatch(true);
|
|
3523
3541
|
|
|
3524
3542
|
// src/simulation/simulation_switch.ts
|
|
3525
|
-
import { z as
|
|
3526
|
-
var simulation_switch =
|
|
3527
|
-
type:
|
|
3543
|
+
import { z as z157 } from "zod";
|
|
3544
|
+
var simulation_switch = z157.object({
|
|
3545
|
+
type: z157.literal("simulation_switch"),
|
|
3528
3546
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
3529
|
-
source_component_id:
|
|
3547
|
+
source_component_id: z157.string().optional(),
|
|
3530
3548
|
closes_at: ms.optional(),
|
|
3531
3549
|
opens_at: ms.optional(),
|
|
3532
|
-
starts_closed:
|
|
3550
|
+
starts_closed: z157.boolean().optional(),
|
|
3533
3551
|
switching_frequency: frequency.optional()
|
|
3534
3552
|
}).describe("Defines a switch for simulation timing control");
|
|
3535
3553
|
expectTypesMatch(true);
|
|
3536
3554
|
|
|
3537
3555
|
// src/simulation/simulation_voltage_probe.ts
|
|
3538
|
-
import { z as
|
|
3539
|
-
var simulation_voltage_probe =
|
|
3540
|
-
type:
|
|
3556
|
+
import { z as z158 } from "zod";
|
|
3557
|
+
var simulation_voltage_probe = z158.object({
|
|
3558
|
+
type: z158.literal("simulation_voltage_probe"),
|
|
3541
3559
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
3542
3560
|
"simulation_voltage_probe"
|
|
3543
3561
|
),
|
|
3544
|
-
source_component_id:
|
|
3545
|
-
name:
|
|
3546
|
-
signal_input_source_port_id:
|
|
3547
|
-
signal_input_source_net_id:
|
|
3548
|
-
reference_input_source_port_id:
|
|
3549
|
-
reference_input_source_net_id:
|
|
3550
|
-
subcircuit_id:
|
|
3551
|
-
color:
|
|
3562
|
+
source_component_id: z158.string().optional(),
|
|
3563
|
+
name: z158.string().optional(),
|
|
3564
|
+
signal_input_source_port_id: z158.string().optional(),
|
|
3565
|
+
signal_input_source_net_id: z158.string().optional(),
|
|
3566
|
+
reference_input_source_port_id: z158.string().optional(),
|
|
3567
|
+
reference_input_source_net_id: z158.string().optional(),
|
|
3568
|
+
subcircuit_id: z158.string().optional(),
|
|
3569
|
+
color: z158.string().optional()
|
|
3552
3570
|
}).describe(
|
|
3553
3571
|
"Defines a voltage probe for simulation. If a reference input is not provided, it measures against ground. If a reference input is provided, it measures the differential voltage between two points."
|
|
3554
3572
|
).superRefine((data, ctx) => {
|
|
@@ -3558,20 +3576,20 @@ var simulation_voltage_probe = z157.object({
|
|
|
3558
3576
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
3559
3577
|
if (has_ports && has_nets) {
|
|
3560
3578
|
ctx.addIssue({
|
|
3561
|
-
code:
|
|
3579
|
+
code: z158.ZodIssueCode.custom,
|
|
3562
3580
|
message: "Cannot mix port and net connections in a differential probe."
|
|
3563
3581
|
});
|
|
3564
3582
|
} else if (has_ports) {
|
|
3565
3583
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
3566
3584
|
ctx.addIssue({
|
|
3567
|
-
code:
|
|
3585
|
+
code: z158.ZodIssueCode.custom,
|
|
3568
3586
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
3569
3587
|
});
|
|
3570
3588
|
}
|
|
3571
3589
|
} else if (has_nets) {
|
|
3572
3590
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
3573
3591
|
ctx.addIssue({
|
|
3574
|
-
code:
|
|
3592
|
+
code: z158.ZodIssueCode.custom,
|
|
3575
3593
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
3576
3594
|
});
|
|
3577
3595
|
}
|
|
@@ -3579,7 +3597,7 @@ var simulation_voltage_probe = z157.object({
|
|
|
3579
3597
|
} else {
|
|
3580
3598
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
3581
3599
|
ctx.addIssue({
|
|
3582
|
-
code:
|
|
3600
|
+
code: z158.ZodIssueCode.custom,
|
|
3583
3601
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
3584
3602
|
});
|
|
3585
3603
|
}
|
|
@@ -3588,35 +3606,35 @@ var simulation_voltage_probe = z157.object({
|
|
|
3588
3606
|
expectTypesMatch(true);
|
|
3589
3607
|
|
|
3590
3608
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
3591
|
-
import { z as
|
|
3609
|
+
import { z as z159 } from "zod";
|
|
3592
3610
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
3593
|
-
type:
|
|
3611
|
+
type: z159.literal("simulation_unknown_experiment_error"),
|
|
3594
3612
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
3595
3613
|
"simulation_unknown_experiment_error"
|
|
3596
3614
|
),
|
|
3597
|
-
error_type:
|
|
3598
|
-
simulation_experiment_id:
|
|
3599
|
-
subcircuit_id:
|
|
3615
|
+
error_type: z159.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
3616
|
+
simulation_experiment_id: z159.string().optional(),
|
|
3617
|
+
subcircuit_id: z159.string().optional()
|
|
3600
3618
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
3601
3619
|
expectTypesMatch(true);
|
|
3602
3620
|
|
|
3603
3621
|
// src/simulation/simulation_op_amp.ts
|
|
3604
|
-
import { z as
|
|
3605
|
-
var simulation_op_amp =
|
|
3606
|
-
type:
|
|
3622
|
+
import { z as z160 } from "zod";
|
|
3623
|
+
var simulation_op_amp = z160.object({
|
|
3624
|
+
type: z160.literal("simulation_op_amp"),
|
|
3607
3625
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
3608
|
-
source_component_id:
|
|
3609
|
-
inverting_input_source_port_id:
|
|
3610
|
-
non_inverting_input_source_port_id:
|
|
3611
|
-
output_source_port_id:
|
|
3612
|
-
positive_supply_source_port_id:
|
|
3613
|
-
negative_supply_source_port_id:
|
|
3626
|
+
source_component_id: z160.string().optional(),
|
|
3627
|
+
inverting_input_source_port_id: z160.string(),
|
|
3628
|
+
non_inverting_input_source_port_id: z160.string(),
|
|
3629
|
+
output_source_port_id: z160.string(),
|
|
3630
|
+
positive_supply_source_port_id: z160.string(),
|
|
3631
|
+
negative_supply_source_port_id: z160.string()
|
|
3614
3632
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
3615
3633
|
expectTypesMatch(true);
|
|
3616
3634
|
|
|
3617
3635
|
// src/any_circuit_element.ts
|
|
3618
|
-
import { z as
|
|
3619
|
-
var any_circuit_element =
|
|
3636
|
+
import { z as z161 } from "zod";
|
|
3637
|
+
var any_circuit_element = z161.union([
|
|
3620
3638
|
source_trace,
|
|
3621
3639
|
source_port,
|
|
3622
3640
|
source_component_internal_connection,
|
|
@@ -3648,6 +3666,7 @@ var any_circuit_element = z160.union([
|
|
|
3648
3666
|
source_invalid_component_property_error,
|
|
3649
3667
|
source_trace_not_connected_error,
|
|
3650
3668
|
source_pin_missing_trace_warning,
|
|
3669
|
+
source_missing_manufacturer_part_number_warning,
|
|
3651
3670
|
source_no_power_pin_defined_warning,
|
|
3652
3671
|
source_no_ground_pin_defined_warning,
|
|
3653
3672
|
source_component_pins_underspecified_warning,
|
|
@@ -3932,6 +3951,7 @@ export {
|
|
|
3932
3951
|
source_interconnect,
|
|
3933
3952
|
source_invalid_component_property_error,
|
|
3934
3953
|
source_manually_placed_via,
|
|
3954
|
+
source_missing_manufacturer_part_number_warning,
|
|
3935
3955
|
source_missing_property_error,
|
|
3936
3956
|
source_net,
|
|
3937
3957
|
source_no_ground_pin_defined_warning,
|