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