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