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