circuit-json 0.0.256 → 0.0.258
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/README.md +84 -5
- package/dist/index.d.mts +626 -10
- package/dist/index.mjs +767 -699
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -848,54 +848,112 @@ expectTypesMatch(true);
|
|
|
848
848
|
import { z as z46 } from "zod";
|
|
849
849
|
var schematic_line = z46.object({
|
|
850
850
|
type: z46.literal("schematic_line"),
|
|
851
|
+
schematic_line_id: getZodPrefixedIdWithDefault("schematic_line"),
|
|
851
852
|
schematic_component_id: z46.string(),
|
|
852
853
|
x1: distance,
|
|
853
|
-
x2: distance,
|
|
854
854
|
y1: distance,
|
|
855
|
+
x2: distance,
|
|
855
856
|
y2: distance,
|
|
857
|
+
stroke_width: distance.nullable().optional(),
|
|
858
|
+
color: z46.string().default("#000000"),
|
|
859
|
+
is_dashed: z46.boolean().default(false),
|
|
856
860
|
subcircuit_id: z46.string().optional()
|
|
857
|
-
});
|
|
861
|
+
}).describe("Draws a styled line on the schematic");
|
|
858
862
|
expectTypesMatch(true);
|
|
859
863
|
|
|
860
|
-
// src/schematic/
|
|
864
|
+
// src/schematic/schematic_rect.ts
|
|
861
865
|
import { z as z47 } from "zod";
|
|
862
|
-
var
|
|
863
|
-
type: z47.literal("
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
866
|
+
var schematic_rect = z47.object({
|
|
867
|
+
type: z47.literal("schematic_rect"),
|
|
868
|
+
schematic_rect_id: getZodPrefixedIdWithDefault("schematic_rect"),
|
|
869
|
+
schematic_component_id: z47.string(),
|
|
870
|
+
center: point,
|
|
871
|
+
width: distance,
|
|
872
|
+
height: distance,
|
|
873
|
+
rotation: rotation.default(0),
|
|
874
|
+
stroke_width: distance.nullable().optional(),
|
|
875
|
+
color: z47.string().default("#000000"),
|
|
876
|
+
is_filled: z47.boolean().default(false),
|
|
877
|
+
fill_color: z47.string().optional(),
|
|
878
|
+
is_dashed: z47.boolean().default(false),
|
|
879
|
+
subcircuit_id: z47.string().optional()
|
|
880
|
+
}).describe("Draws a styled rectangle on the schematic");
|
|
881
|
+
expectTypesMatch(true);
|
|
882
|
+
|
|
883
|
+
// src/schematic/schematic_circle.ts
|
|
884
|
+
import { z as z48 } from "zod";
|
|
885
|
+
var schematic_circle = z48.object({
|
|
886
|
+
type: z48.literal("schematic_circle"),
|
|
887
|
+
schematic_circle_id: getZodPrefixedIdWithDefault("schematic_circle"),
|
|
888
|
+
schematic_component_id: z48.string(),
|
|
889
|
+
center: point,
|
|
890
|
+
radius: distance,
|
|
891
|
+
stroke_width: distance.nullable().optional(),
|
|
892
|
+
color: z48.string().default("#000000"),
|
|
893
|
+
is_filled: z48.boolean().default(false),
|
|
894
|
+
fill_color: z48.string().optional(),
|
|
895
|
+
is_dashed: z48.boolean().default(false),
|
|
896
|
+
subcircuit_id: z48.string().optional()
|
|
897
|
+
}).describe("Draws a styled circle on the schematic");
|
|
898
|
+
expectTypesMatch(true);
|
|
899
|
+
|
|
900
|
+
// src/schematic/schematic_arc.ts
|
|
901
|
+
import { z as z49 } from "zod";
|
|
902
|
+
var schematic_arc = z49.object({
|
|
903
|
+
type: z49.literal("schematic_arc"),
|
|
904
|
+
schematic_arc_id: getZodPrefixedIdWithDefault("schematic_arc"),
|
|
905
|
+
schematic_component_id: z49.string(),
|
|
906
|
+
center: point,
|
|
907
|
+
radius: distance,
|
|
908
|
+
start_angle_degrees: rotation,
|
|
909
|
+
end_angle_degrees: rotation,
|
|
910
|
+
direction: z49.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
911
|
+
stroke_width: distance.nullable().optional(),
|
|
912
|
+
color: z49.string().default("#000000"),
|
|
913
|
+
is_dashed: z49.boolean().default(false),
|
|
914
|
+
subcircuit_id: z49.string().optional()
|
|
915
|
+
}).describe("Draws a styled arc on the schematic");
|
|
916
|
+
expectTypesMatch(true);
|
|
917
|
+
|
|
918
|
+
// src/schematic/schematic_trace.ts
|
|
919
|
+
import { z as z50 } from "zod";
|
|
920
|
+
var schematic_trace = z50.object({
|
|
921
|
+
type: z50.literal("schematic_trace"),
|
|
922
|
+
schematic_trace_id: z50.string(),
|
|
923
|
+
source_trace_id: z50.string().optional(),
|
|
924
|
+
junctions: z50.array(
|
|
925
|
+
z50.object({
|
|
926
|
+
x: z50.number(),
|
|
927
|
+
y: z50.number()
|
|
870
928
|
})
|
|
871
929
|
),
|
|
872
|
-
edges:
|
|
873
|
-
|
|
874
|
-
from:
|
|
875
|
-
x:
|
|
876
|
-
y:
|
|
930
|
+
edges: z50.array(
|
|
931
|
+
z50.object({
|
|
932
|
+
from: z50.object({
|
|
933
|
+
x: z50.number(),
|
|
934
|
+
y: z50.number()
|
|
877
935
|
}),
|
|
878
|
-
to:
|
|
879
|
-
x:
|
|
880
|
-
y:
|
|
936
|
+
to: z50.object({
|
|
937
|
+
x: z50.number(),
|
|
938
|
+
y: z50.number()
|
|
881
939
|
}),
|
|
882
|
-
is_crossing:
|
|
883
|
-
from_schematic_port_id:
|
|
884
|
-
to_schematic_port_id:
|
|
940
|
+
is_crossing: z50.boolean().optional(),
|
|
941
|
+
from_schematic_port_id: z50.string().optional(),
|
|
942
|
+
to_schematic_port_id: z50.string().optional()
|
|
885
943
|
})
|
|
886
944
|
),
|
|
887
|
-
subcircuit_id:
|
|
945
|
+
subcircuit_id: z50.string().optional(),
|
|
888
946
|
// TODO: make required in a future release
|
|
889
|
-
subcircuit_connectivity_map_key:
|
|
947
|
+
subcircuit_connectivity_map_key: z50.string().optional()
|
|
890
948
|
});
|
|
891
949
|
expectTypesMatch(true);
|
|
892
950
|
|
|
893
951
|
// src/schematic/schematic_text.ts
|
|
894
|
-
import { z as
|
|
952
|
+
import { z as z52 } from "zod";
|
|
895
953
|
|
|
896
954
|
// src/common/FivePointAnchor.ts
|
|
897
|
-
import { z as
|
|
898
|
-
var fivePointAnchor =
|
|
955
|
+
import { z as z51 } from "zod";
|
|
956
|
+
var fivePointAnchor = z51.enum([
|
|
899
957
|
"center",
|
|
900
958
|
"left",
|
|
901
959
|
"right",
|
|
@@ -905,111 +963,111 @@ var fivePointAnchor = z48.enum([
|
|
|
905
963
|
expectTypesMatch(true);
|
|
906
964
|
|
|
907
965
|
// src/schematic/schematic_text.ts
|
|
908
|
-
var schematic_text =
|
|
909
|
-
type:
|
|
910
|
-
schematic_component_id:
|
|
911
|
-
schematic_text_id:
|
|
912
|
-
text:
|
|
913
|
-
font_size:
|
|
914
|
-
position:
|
|
966
|
+
var schematic_text = z52.object({
|
|
967
|
+
type: z52.literal("schematic_text"),
|
|
968
|
+
schematic_component_id: z52.string().optional(),
|
|
969
|
+
schematic_text_id: z52.string(),
|
|
970
|
+
text: z52.string(),
|
|
971
|
+
font_size: z52.number().default(0.18),
|
|
972
|
+
position: z52.object({
|
|
915
973
|
x: distance,
|
|
916
974
|
y: distance
|
|
917
975
|
}),
|
|
918
|
-
rotation:
|
|
919
|
-
anchor:
|
|
920
|
-
color:
|
|
921
|
-
subcircuit_id:
|
|
976
|
+
rotation: z52.number().default(0),
|
|
977
|
+
anchor: z52.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
978
|
+
color: z52.string().default("#000000"),
|
|
979
|
+
subcircuit_id: z52.string().optional()
|
|
922
980
|
});
|
|
923
981
|
expectTypesMatch(true);
|
|
924
982
|
|
|
925
983
|
// src/schematic/schematic_port.ts
|
|
926
|
-
import { z as
|
|
927
|
-
var schematic_port =
|
|
928
|
-
type:
|
|
929
|
-
schematic_port_id:
|
|
930
|
-
source_port_id:
|
|
931
|
-
schematic_component_id:
|
|
984
|
+
import { z as z53 } from "zod";
|
|
985
|
+
var schematic_port = z53.object({
|
|
986
|
+
type: z53.literal("schematic_port"),
|
|
987
|
+
schematic_port_id: z53.string(),
|
|
988
|
+
source_port_id: z53.string(),
|
|
989
|
+
schematic_component_id: z53.string().optional(),
|
|
932
990
|
center: point,
|
|
933
|
-
facing_direction:
|
|
934
|
-
distance_from_component_edge:
|
|
935
|
-
side_of_component:
|
|
936
|
-
true_ccw_index:
|
|
937
|
-
pin_number:
|
|
938
|
-
display_pin_label:
|
|
939
|
-
subcircuit_id:
|
|
940
|
-
is_connected:
|
|
941
|
-
has_input_arrow:
|
|
942
|
-
has_output_arrow:
|
|
991
|
+
facing_direction: z53.enum(["up", "down", "left", "right"]).optional(),
|
|
992
|
+
distance_from_component_edge: z53.number().optional(),
|
|
993
|
+
side_of_component: z53.enum(["top", "bottom", "left", "right"]).optional(),
|
|
994
|
+
true_ccw_index: z53.number().optional(),
|
|
995
|
+
pin_number: z53.number().optional(),
|
|
996
|
+
display_pin_label: z53.string().optional(),
|
|
997
|
+
subcircuit_id: z53.string().optional(),
|
|
998
|
+
is_connected: z53.boolean().optional(),
|
|
999
|
+
has_input_arrow: z53.boolean().optional(),
|
|
1000
|
+
has_output_arrow: z53.boolean().optional()
|
|
943
1001
|
}).describe("Defines a port on a schematic component");
|
|
944
1002
|
expectTypesMatch(true);
|
|
945
1003
|
|
|
946
1004
|
// src/schematic/schematic_net_label.ts
|
|
947
|
-
import { z as
|
|
948
|
-
var schematic_net_label =
|
|
949
|
-
type:
|
|
1005
|
+
import { z as z54 } from "zod";
|
|
1006
|
+
var schematic_net_label = z54.object({
|
|
1007
|
+
type: z54.literal("schematic_net_label"),
|
|
950
1008
|
schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
|
|
951
|
-
schematic_trace_id:
|
|
952
|
-
source_trace_id:
|
|
953
|
-
source_net_id:
|
|
1009
|
+
schematic_trace_id: z54.string().optional(),
|
|
1010
|
+
source_trace_id: z54.string().optional(),
|
|
1011
|
+
source_net_id: z54.string(),
|
|
954
1012
|
center: point,
|
|
955
1013
|
anchor_position: point.optional(),
|
|
956
|
-
anchor_side:
|
|
957
|
-
text:
|
|
958
|
-
symbol_name:
|
|
959
|
-
is_movable:
|
|
960
|
-
subcircuit_id:
|
|
1014
|
+
anchor_side: z54.enum(["top", "bottom", "left", "right"]),
|
|
1015
|
+
text: z54.string(),
|
|
1016
|
+
symbol_name: z54.string().optional(),
|
|
1017
|
+
is_movable: z54.boolean().optional(),
|
|
1018
|
+
subcircuit_id: z54.string().optional()
|
|
961
1019
|
});
|
|
962
1020
|
expectTypesMatch(true);
|
|
963
1021
|
|
|
964
1022
|
// src/schematic/schematic_error.ts
|
|
965
|
-
import { z as
|
|
966
|
-
var schematic_error =
|
|
967
|
-
type:
|
|
968
|
-
schematic_error_id:
|
|
1023
|
+
import { z as z55 } from "zod";
|
|
1024
|
+
var schematic_error = z55.object({
|
|
1025
|
+
type: z55.literal("schematic_error"),
|
|
1026
|
+
schematic_error_id: z55.string(),
|
|
969
1027
|
// eventually each error type should be broken out into a dir of files
|
|
970
|
-
error_type:
|
|
971
|
-
message:
|
|
972
|
-
subcircuit_id:
|
|
1028
|
+
error_type: z55.literal("schematic_port_not_found").default("schematic_port_not_found"),
|
|
1029
|
+
message: z55.string(),
|
|
1030
|
+
subcircuit_id: z55.string().optional()
|
|
973
1031
|
}).describe("Defines a schematic error on the schematic");
|
|
974
1032
|
expectTypesMatch(true);
|
|
975
1033
|
|
|
976
1034
|
// src/schematic/schematic_layout_error.ts
|
|
977
|
-
import { z as
|
|
978
|
-
var schematic_layout_error =
|
|
979
|
-
type:
|
|
1035
|
+
import { z as z56 } from "zod";
|
|
1036
|
+
var schematic_layout_error = z56.object({
|
|
1037
|
+
type: z56.literal("schematic_layout_error"),
|
|
980
1038
|
schematic_layout_error_id: getZodPrefixedIdWithDefault(
|
|
981
1039
|
"schematic_layout_error"
|
|
982
1040
|
),
|
|
983
|
-
error_type:
|
|
984
|
-
message:
|
|
985
|
-
source_group_id:
|
|
986
|
-
schematic_group_id:
|
|
987
|
-
subcircuit_id:
|
|
1041
|
+
error_type: z56.literal("schematic_layout_error").default("schematic_layout_error"),
|
|
1042
|
+
message: z56.string(),
|
|
1043
|
+
source_group_id: z56.string(),
|
|
1044
|
+
schematic_group_id: z56.string(),
|
|
1045
|
+
subcircuit_id: z56.string().optional()
|
|
988
1046
|
}).describe("Error emitted when schematic layout fails for a group");
|
|
989
1047
|
expectTypesMatch(true);
|
|
990
1048
|
|
|
991
1049
|
// src/schematic/schematic_debug_object.ts
|
|
992
|
-
import { z as
|
|
993
|
-
var schematic_debug_object_base =
|
|
994
|
-
type:
|
|
995
|
-
label:
|
|
996
|
-
subcircuit_id:
|
|
1050
|
+
import { z as z57 } from "zod";
|
|
1051
|
+
var schematic_debug_object_base = z57.object({
|
|
1052
|
+
type: z57.literal("schematic_debug_object"),
|
|
1053
|
+
label: z57.string().optional(),
|
|
1054
|
+
subcircuit_id: z57.string().optional()
|
|
997
1055
|
});
|
|
998
1056
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
999
|
-
shape:
|
|
1057
|
+
shape: z57.literal("rect"),
|
|
1000
1058
|
center: point,
|
|
1001
1059
|
size
|
|
1002
1060
|
});
|
|
1003
1061
|
var schematic_debug_line = schematic_debug_object_base.extend({
|
|
1004
|
-
shape:
|
|
1062
|
+
shape: z57.literal("line"),
|
|
1005
1063
|
start: point,
|
|
1006
1064
|
end: point
|
|
1007
1065
|
});
|
|
1008
1066
|
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
1009
|
-
shape:
|
|
1067
|
+
shape: z57.literal("point"),
|
|
1010
1068
|
center: point
|
|
1011
1069
|
});
|
|
1012
|
-
var schematic_debug_object =
|
|
1070
|
+
var schematic_debug_object = z57.discriminatedUnion("shape", [
|
|
1013
1071
|
schematic_debug_rect,
|
|
1014
1072
|
schematic_debug_line,
|
|
1015
1073
|
schematic_debug_point
|
|
@@ -1017,158 +1075,158 @@ var schematic_debug_object = z54.discriminatedUnion("shape", [
|
|
|
1017
1075
|
expectTypesMatch(true);
|
|
1018
1076
|
|
|
1019
1077
|
// src/schematic/schematic_voltage_probe.ts
|
|
1020
|
-
import { z as
|
|
1021
|
-
var schematic_voltage_probe =
|
|
1022
|
-
type:
|
|
1023
|
-
schematic_voltage_probe_id:
|
|
1078
|
+
import { z as z58 } from "zod";
|
|
1079
|
+
var schematic_voltage_probe = z58.object({
|
|
1080
|
+
type: z58.literal("schematic_voltage_probe"),
|
|
1081
|
+
schematic_voltage_probe_id: z58.string(),
|
|
1024
1082
|
position: point,
|
|
1025
|
-
schematic_trace_id:
|
|
1083
|
+
schematic_trace_id: z58.string(),
|
|
1026
1084
|
voltage: voltage.optional(),
|
|
1027
|
-
subcircuit_id:
|
|
1085
|
+
subcircuit_id: z58.string().optional()
|
|
1028
1086
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
1029
1087
|
expectTypesMatch(true);
|
|
1030
1088
|
|
|
1031
1089
|
// src/schematic/schematic_manual_edit_conflict_warning.ts
|
|
1032
|
-
import { z as
|
|
1033
|
-
var schematic_manual_edit_conflict_warning =
|
|
1034
|
-
type:
|
|
1090
|
+
import { z as z59 } from "zod";
|
|
1091
|
+
var schematic_manual_edit_conflict_warning = z59.object({
|
|
1092
|
+
type: z59.literal("schematic_manual_edit_conflict_warning"),
|
|
1035
1093
|
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1036
1094
|
"schematic_manual_edit_conflict_warning"
|
|
1037
1095
|
),
|
|
1038
|
-
warning_type:
|
|
1039
|
-
message:
|
|
1040
|
-
schematic_component_id:
|
|
1041
|
-
schematic_group_id:
|
|
1042
|
-
subcircuit_id:
|
|
1043
|
-
source_component_id:
|
|
1096
|
+
warning_type: z59.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),
|
|
1097
|
+
message: z59.string(),
|
|
1098
|
+
schematic_component_id: z59.string(),
|
|
1099
|
+
schematic_group_id: z59.string().optional(),
|
|
1100
|
+
subcircuit_id: z59.string().optional(),
|
|
1101
|
+
source_component_id: z59.string()
|
|
1044
1102
|
}).describe(
|
|
1045
1103
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
1046
1104
|
);
|
|
1047
1105
|
expectTypesMatch(true);
|
|
1048
1106
|
|
|
1049
1107
|
// src/schematic/schematic_group.ts
|
|
1050
|
-
import { z as
|
|
1051
|
-
var schematic_group =
|
|
1052
|
-
type:
|
|
1108
|
+
import { z as z60 } from "zod";
|
|
1109
|
+
var schematic_group = z60.object({
|
|
1110
|
+
type: z60.literal("schematic_group"),
|
|
1053
1111
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
1054
|
-
source_group_id:
|
|
1055
|
-
is_subcircuit:
|
|
1056
|
-
subcircuit_id:
|
|
1112
|
+
source_group_id: z60.string(),
|
|
1113
|
+
is_subcircuit: z60.boolean().optional(),
|
|
1114
|
+
subcircuit_id: z60.string().optional(),
|
|
1057
1115
|
width: length,
|
|
1058
1116
|
height: length,
|
|
1059
1117
|
center: point,
|
|
1060
|
-
schematic_component_ids:
|
|
1061
|
-
show_as_schematic_box:
|
|
1062
|
-
name:
|
|
1063
|
-
description:
|
|
1118
|
+
schematic_component_ids: z60.array(z60.string()),
|
|
1119
|
+
show_as_schematic_box: z60.boolean().optional(),
|
|
1120
|
+
name: z60.string().optional(),
|
|
1121
|
+
description: z60.string().optional()
|
|
1064
1122
|
}).describe("Defines a group of components on the schematic");
|
|
1065
1123
|
expectTypesMatch(true);
|
|
1066
1124
|
|
|
1067
1125
|
// src/schematic/schematic_table.ts
|
|
1068
|
-
import { z as
|
|
1069
|
-
var schematic_table =
|
|
1070
|
-
type:
|
|
1126
|
+
import { z as z61 } from "zod";
|
|
1127
|
+
var schematic_table = z61.object({
|
|
1128
|
+
type: z61.literal("schematic_table"),
|
|
1071
1129
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
1072
1130
|
anchor_position: point,
|
|
1073
|
-
column_widths:
|
|
1074
|
-
row_heights:
|
|
1131
|
+
column_widths: z61.array(distance),
|
|
1132
|
+
row_heights: z61.array(distance),
|
|
1075
1133
|
cell_padding: distance.optional(),
|
|
1076
1134
|
border_width: distance.optional(),
|
|
1077
|
-
subcircuit_id:
|
|
1078
|
-
schematic_component_id:
|
|
1135
|
+
subcircuit_id: z61.string().optional(),
|
|
1136
|
+
schematic_component_id: z61.string().optional(),
|
|
1079
1137
|
anchor: ninePointAnchor.optional()
|
|
1080
1138
|
}).describe("Defines a table on the schematic");
|
|
1081
1139
|
expectTypesMatch(true);
|
|
1082
1140
|
|
|
1083
1141
|
// src/schematic/schematic_table_cell.ts
|
|
1084
|
-
import { z as
|
|
1085
|
-
var schematic_table_cell =
|
|
1086
|
-
type:
|
|
1142
|
+
import { z as z62 } from "zod";
|
|
1143
|
+
var schematic_table_cell = z62.object({
|
|
1144
|
+
type: z62.literal("schematic_table_cell"),
|
|
1087
1145
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
1088
1146
|
"schematic_table_cell"
|
|
1089
1147
|
),
|
|
1090
|
-
schematic_table_id:
|
|
1091
|
-
start_row_index:
|
|
1092
|
-
end_row_index:
|
|
1093
|
-
start_column_index:
|
|
1094
|
-
end_column_index:
|
|
1095
|
-
text:
|
|
1148
|
+
schematic_table_id: z62.string(),
|
|
1149
|
+
start_row_index: z62.number(),
|
|
1150
|
+
end_row_index: z62.number(),
|
|
1151
|
+
start_column_index: z62.number(),
|
|
1152
|
+
end_column_index: z62.number(),
|
|
1153
|
+
text: z62.string().optional(),
|
|
1096
1154
|
center: point,
|
|
1097
1155
|
width: distance,
|
|
1098
1156
|
height: distance,
|
|
1099
|
-
horizontal_align:
|
|
1100
|
-
vertical_align:
|
|
1157
|
+
horizontal_align: z62.enum(["left", "center", "right"]).optional(),
|
|
1158
|
+
vertical_align: z62.enum(["top", "middle", "bottom"]).optional(),
|
|
1101
1159
|
font_size: distance.optional(),
|
|
1102
|
-
subcircuit_id:
|
|
1160
|
+
subcircuit_id: z62.string().optional()
|
|
1103
1161
|
}).describe("Defines a cell within a schematic_table");
|
|
1104
1162
|
expectTypesMatch(true);
|
|
1105
1163
|
|
|
1106
1164
|
// src/pcb/properties/brep.ts
|
|
1107
|
-
import { z as
|
|
1108
|
-
var point_with_bulge =
|
|
1165
|
+
import { z as z63 } from "zod";
|
|
1166
|
+
var point_with_bulge = z63.object({
|
|
1109
1167
|
x: distance,
|
|
1110
1168
|
y: distance,
|
|
1111
|
-
bulge:
|
|
1169
|
+
bulge: z63.number().optional()
|
|
1112
1170
|
});
|
|
1113
1171
|
expectTypesMatch(true);
|
|
1114
|
-
var ring =
|
|
1115
|
-
vertices:
|
|
1172
|
+
var ring = z63.object({
|
|
1173
|
+
vertices: z63.array(point_with_bulge)
|
|
1116
1174
|
});
|
|
1117
1175
|
expectTypesMatch(true);
|
|
1118
|
-
var brep_shape =
|
|
1176
|
+
var brep_shape = z63.object({
|
|
1119
1177
|
outer_ring: ring,
|
|
1120
|
-
inner_rings:
|
|
1178
|
+
inner_rings: z63.array(ring).default([])
|
|
1121
1179
|
});
|
|
1122
1180
|
expectTypesMatch(true);
|
|
1123
1181
|
|
|
1124
1182
|
// src/pcb/properties/pcb_route_hints.ts
|
|
1125
|
-
import { z as
|
|
1126
|
-
var pcb_route_hint =
|
|
1183
|
+
import { z as z64 } from "zod";
|
|
1184
|
+
var pcb_route_hint = z64.object({
|
|
1127
1185
|
x: distance,
|
|
1128
1186
|
y: distance,
|
|
1129
|
-
via:
|
|
1187
|
+
via: z64.boolean().optional(),
|
|
1130
1188
|
via_to_layer: layer_ref.optional()
|
|
1131
1189
|
});
|
|
1132
|
-
var pcb_route_hints =
|
|
1190
|
+
var pcb_route_hints = z64.array(pcb_route_hint);
|
|
1133
1191
|
expectTypesMatch(true);
|
|
1134
1192
|
expectTypesMatch(true);
|
|
1135
1193
|
|
|
1136
1194
|
// src/pcb/properties/route_hint_point.ts
|
|
1137
|
-
import { z as
|
|
1138
|
-
var route_hint_point =
|
|
1195
|
+
import { z as z65 } from "zod";
|
|
1196
|
+
var route_hint_point = z65.object({
|
|
1139
1197
|
x: distance,
|
|
1140
1198
|
y: distance,
|
|
1141
|
-
via:
|
|
1199
|
+
via: z65.boolean().optional(),
|
|
1142
1200
|
to_layer: layer_ref.optional(),
|
|
1143
1201
|
trace_width: distance.optional()
|
|
1144
1202
|
});
|
|
1145
1203
|
expectTypesMatch(true);
|
|
1146
1204
|
|
|
1147
1205
|
// src/pcb/pcb_component.ts
|
|
1148
|
-
import { z as
|
|
1149
|
-
var pcb_component =
|
|
1150
|
-
type:
|
|
1206
|
+
import { z as z66 } from "zod";
|
|
1207
|
+
var pcb_component = z66.object({
|
|
1208
|
+
type: z66.literal("pcb_component"),
|
|
1151
1209
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
1152
|
-
source_component_id:
|
|
1210
|
+
source_component_id: z66.string(),
|
|
1153
1211
|
center: point,
|
|
1154
1212
|
layer: layer_ref,
|
|
1155
1213
|
rotation,
|
|
1156
1214
|
width: length,
|
|
1157
1215
|
height: length,
|
|
1158
|
-
subcircuit_id:
|
|
1159
|
-
pcb_group_id:
|
|
1216
|
+
subcircuit_id: z66.string().optional(),
|
|
1217
|
+
pcb_group_id: z66.string().optional()
|
|
1160
1218
|
}).describe("Defines a component on the PCB");
|
|
1161
1219
|
expectTypesMatch(true);
|
|
1162
1220
|
|
|
1163
1221
|
// src/pcb/pcb_hole.ts
|
|
1164
|
-
import { z as
|
|
1165
|
-
var pcb_hole_circle_or_square =
|
|
1166
|
-
type:
|
|
1222
|
+
import { z as z67 } from "zod";
|
|
1223
|
+
var pcb_hole_circle_or_square = z67.object({
|
|
1224
|
+
type: z67.literal("pcb_hole"),
|
|
1167
1225
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1168
|
-
pcb_group_id:
|
|
1169
|
-
subcircuit_id:
|
|
1170
|
-
hole_shape:
|
|
1171
|
-
hole_diameter:
|
|
1226
|
+
pcb_group_id: z67.string().optional(),
|
|
1227
|
+
subcircuit_id: z67.string().optional(),
|
|
1228
|
+
hole_shape: z67.enum(["circle", "square"]),
|
|
1229
|
+
hole_diameter: z67.number(),
|
|
1172
1230
|
x: distance,
|
|
1173
1231
|
y: distance
|
|
1174
1232
|
});
|
|
@@ -1176,14 +1234,14 @@ var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
|
1176
1234
|
"Defines a circular or square hole on the PCB"
|
|
1177
1235
|
);
|
|
1178
1236
|
expectTypesMatch(true);
|
|
1179
|
-
var pcb_hole_oval =
|
|
1180
|
-
type:
|
|
1237
|
+
var pcb_hole_oval = z67.object({
|
|
1238
|
+
type: z67.literal("pcb_hole"),
|
|
1181
1239
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1182
|
-
pcb_group_id:
|
|
1183
|
-
subcircuit_id:
|
|
1184
|
-
hole_shape:
|
|
1185
|
-
hole_width:
|
|
1186
|
-
hole_height:
|
|
1240
|
+
pcb_group_id: z67.string().optional(),
|
|
1241
|
+
subcircuit_id: z67.string().optional(),
|
|
1242
|
+
hole_shape: z67.literal("oval"),
|
|
1243
|
+
hole_width: z67.number(),
|
|
1244
|
+
hole_height: z67.number(),
|
|
1187
1245
|
x: distance,
|
|
1188
1246
|
y: distance
|
|
1189
1247
|
});
|
|
@@ -1194,104 +1252,108 @@ expectTypesMatch(true);
|
|
|
1194
1252
|
var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval);
|
|
1195
1253
|
|
|
1196
1254
|
// src/pcb/pcb_plated_hole.ts
|
|
1197
|
-
import { z as
|
|
1198
|
-
var pcb_plated_hole_circle =
|
|
1199
|
-
type:
|
|
1200
|
-
shape:
|
|
1201
|
-
pcb_group_id:
|
|
1202
|
-
subcircuit_id:
|
|
1203
|
-
outer_diameter:
|
|
1204
|
-
hole_diameter:
|
|
1255
|
+
import { z as z68 } from "zod";
|
|
1256
|
+
var pcb_plated_hole_circle = z68.object({
|
|
1257
|
+
type: z68.literal("pcb_plated_hole"),
|
|
1258
|
+
shape: z68.literal("circle"),
|
|
1259
|
+
pcb_group_id: z68.string().optional(),
|
|
1260
|
+
subcircuit_id: z68.string().optional(),
|
|
1261
|
+
outer_diameter: z68.number(),
|
|
1262
|
+
hole_diameter: z68.number(),
|
|
1205
1263
|
x: distance,
|
|
1206
1264
|
y: distance,
|
|
1207
|
-
layers:
|
|
1208
|
-
port_hints:
|
|
1209
|
-
pcb_component_id:
|
|
1210
|
-
pcb_port_id:
|
|
1265
|
+
layers: z68.array(layer_ref),
|
|
1266
|
+
port_hints: z68.array(z68.string()).optional(),
|
|
1267
|
+
pcb_component_id: z68.string().optional(),
|
|
1268
|
+
pcb_port_id: z68.string().optional(),
|
|
1211
1269
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1212
1270
|
});
|
|
1213
|
-
var pcb_plated_hole_oval =
|
|
1214
|
-
type:
|
|
1215
|
-
shape:
|
|
1216
|
-
pcb_group_id:
|
|
1217
|
-
subcircuit_id:
|
|
1218
|
-
outer_width:
|
|
1219
|
-
outer_height:
|
|
1220
|
-
hole_width:
|
|
1221
|
-
hole_height:
|
|
1271
|
+
var pcb_plated_hole_oval = z68.object({
|
|
1272
|
+
type: z68.literal("pcb_plated_hole"),
|
|
1273
|
+
shape: z68.enum(["oval", "pill"]),
|
|
1274
|
+
pcb_group_id: z68.string().optional(),
|
|
1275
|
+
subcircuit_id: z68.string().optional(),
|
|
1276
|
+
outer_width: z68.number(),
|
|
1277
|
+
outer_height: z68.number(),
|
|
1278
|
+
hole_width: z68.number(),
|
|
1279
|
+
hole_height: z68.number(),
|
|
1222
1280
|
x: distance,
|
|
1223
1281
|
y: distance,
|
|
1224
1282
|
ccw_rotation: rotation,
|
|
1225
|
-
layers:
|
|
1226
|
-
port_hints:
|
|
1227
|
-
pcb_component_id:
|
|
1228
|
-
pcb_port_id:
|
|
1283
|
+
layers: z68.array(layer_ref),
|
|
1284
|
+
port_hints: z68.array(z68.string()).optional(),
|
|
1285
|
+
pcb_component_id: z68.string().optional(),
|
|
1286
|
+
pcb_port_id: z68.string().optional(),
|
|
1229
1287
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1230
1288
|
});
|
|
1231
|
-
var pcb_circular_hole_with_rect_pad =
|
|
1232
|
-
type:
|
|
1233
|
-
shape:
|
|
1234
|
-
pcb_group_id:
|
|
1235
|
-
subcircuit_id:
|
|
1236
|
-
hole_shape:
|
|
1237
|
-
pad_shape:
|
|
1238
|
-
hole_diameter:
|
|
1239
|
-
rect_pad_width:
|
|
1240
|
-
rect_pad_height:
|
|
1241
|
-
rect_border_radius:
|
|
1289
|
+
var pcb_circular_hole_with_rect_pad = z68.object({
|
|
1290
|
+
type: z68.literal("pcb_plated_hole"),
|
|
1291
|
+
shape: z68.literal("circular_hole_with_rect_pad"),
|
|
1292
|
+
pcb_group_id: z68.string().optional(),
|
|
1293
|
+
subcircuit_id: z68.string().optional(),
|
|
1294
|
+
hole_shape: z68.literal("circle"),
|
|
1295
|
+
pad_shape: z68.literal("rect"),
|
|
1296
|
+
hole_diameter: z68.number(),
|
|
1297
|
+
rect_pad_width: z68.number(),
|
|
1298
|
+
rect_pad_height: z68.number(),
|
|
1299
|
+
rect_border_radius: z68.number().optional(),
|
|
1242
1300
|
hole_offset_x: distance.default(0),
|
|
1243
1301
|
hole_offset_y: distance.default(0),
|
|
1244
1302
|
x: distance,
|
|
1245
1303
|
y: distance,
|
|
1246
|
-
layers:
|
|
1247
|
-
port_hints:
|
|
1248
|
-
pcb_component_id:
|
|
1249
|
-
pcb_port_id:
|
|
1304
|
+
layers: z68.array(layer_ref),
|
|
1305
|
+
port_hints: z68.array(z68.string()).optional(),
|
|
1306
|
+
pcb_component_id: z68.string().optional(),
|
|
1307
|
+
pcb_port_id: z68.string().optional(),
|
|
1250
1308
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1251
1309
|
});
|
|
1252
|
-
var pcb_pill_hole_with_rect_pad =
|
|
1253
|
-
type:
|
|
1254
|
-
shape:
|
|
1255
|
-
pcb_group_id:
|
|
1256
|
-
subcircuit_id:
|
|
1257
|
-
hole_shape:
|
|
1258
|
-
pad_shape:
|
|
1259
|
-
hole_width:
|
|
1260
|
-
hole_height:
|
|
1261
|
-
rect_pad_width:
|
|
1262
|
-
rect_pad_height:
|
|
1263
|
-
rect_border_radius:
|
|
1310
|
+
var pcb_pill_hole_with_rect_pad = z68.object({
|
|
1311
|
+
type: z68.literal("pcb_plated_hole"),
|
|
1312
|
+
shape: z68.literal("pill_hole_with_rect_pad"),
|
|
1313
|
+
pcb_group_id: z68.string().optional(),
|
|
1314
|
+
subcircuit_id: z68.string().optional(),
|
|
1315
|
+
hole_shape: z68.literal("pill"),
|
|
1316
|
+
pad_shape: z68.literal("rect"),
|
|
1317
|
+
hole_width: z68.number(),
|
|
1318
|
+
hole_height: z68.number(),
|
|
1319
|
+
rect_pad_width: z68.number(),
|
|
1320
|
+
rect_pad_height: z68.number(),
|
|
1321
|
+
rect_border_radius: z68.number().optional(),
|
|
1322
|
+
hole_offset_x: distance.default(0),
|
|
1323
|
+
hole_offset_y: distance.default(0),
|
|
1264
1324
|
x: distance,
|
|
1265
1325
|
y: distance,
|
|
1266
|
-
layers:
|
|
1267
|
-
port_hints:
|
|
1268
|
-
pcb_component_id:
|
|
1269
|
-
pcb_port_id:
|
|
1326
|
+
layers: z68.array(layer_ref),
|
|
1327
|
+
port_hints: z68.array(z68.string()).optional(),
|
|
1328
|
+
pcb_component_id: z68.string().optional(),
|
|
1329
|
+
pcb_port_id: z68.string().optional(),
|
|
1270
1330
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1271
1331
|
});
|
|
1272
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
1273
|
-
type:
|
|
1274
|
-
shape:
|
|
1275
|
-
pcb_group_id:
|
|
1276
|
-
subcircuit_id:
|
|
1277
|
-
hole_shape:
|
|
1278
|
-
pad_shape:
|
|
1279
|
-
hole_width:
|
|
1280
|
-
hole_height:
|
|
1332
|
+
var pcb_rotated_pill_hole_with_rect_pad = z68.object({
|
|
1333
|
+
type: z68.literal("pcb_plated_hole"),
|
|
1334
|
+
shape: z68.literal("rotated_pill_hole_with_rect_pad"),
|
|
1335
|
+
pcb_group_id: z68.string().optional(),
|
|
1336
|
+
subcircuit_id: z68.string().optional(),
|
|
1337
|
+
hole_shape: z68.literal("rotated_pill"),
|
|
1338
|
+
pad_shape: z68.literal("rect"),
|
|
1339
|
+
hole_width: z68.number(),
|
|
1340
|
+
hole_height: z68.number(),
|
|
1281
1341
|
hole_ccw_rotation: rotation,
|
|
1282
|
-
rect_pad_width:
|
|
1283
|
-
rect_pad_height:
|
|
1284
|
-
rect_border_radius:
|
|
1342
|
+
rect_pad_width: z68.number(),
|
|
1343
|
+
rect_pad_height: z68.number(),
|
|
1344
|
+
rect_border_radius: z68.number().optional(),
|
|
1285
1345
|
rect_ccw_rotation: rotation,
|
|
1346
|
+
hole_offset_x: distance.default(0),
|
|
1347
|
+
hole_offset_y: distance.default(0),
|
|
1286
1348
|
x: distance,
|
|
1287
1349
|
y: distance,
|
|
1288
|
-
layers:
|
|
1289
|
-
port_hints:
|
|
1290
|
-
pcb_component_id:
|
|
1291
|
-
pcb_port_id:
|
|
1350
|
+
layers: z68.array(layer_ref),
|
|
1351
|
+
port_hints: z68.array(z68.string()).optional(),
|
|
1352
|
+
pcb_component_id: z68.string().optional(),
|
|
1353
|
+
pcb_port_id: z68.string().optional(),
|
|
1292
1354
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1293
1355
|
});
|
|
1294
|
-
var pcb_plated_hole =
|
|
1356
|
+
var pcb_plated_hole = z68.union([
|
|
1295
1357
|
pcb_plated_hole_circle,
|
|
1296
1358
|
pcb_plated_hole_oval,
|
|
1297
1359
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -1307,122 +1369,122 @@ expectTypesMatch(true);
|
|
|
1307
1369
|
expectTypesMatch(true);
|
|
1308
1370
|
|
|
1309
1371
|
// src/pcb/pcb_port.ts
|
|
1310
|
-
import { z as
|
|
1311
|
-
var pcb_port =
|
|
1312
|
-
type:
|
|
1372
|
+
import { z as z69 } from "zod";
|
|
1373
|
+
var pcb_port = z69.object({
|
|
1374
|
+
type: z69.literal("pcb_port"),
|
|
1313
1375
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
1314
|
-
pcb_group_id:
|
|
1315
|
-
subcircuit_id:
|
|
1316
|
-
source_port_id:
|
|
1317
|
-
pcb_component_id:
|
|
1376
|
+
pcb_group_id: z69.string().optional(),
|
|
1377
|
+
subcircuit_id: z69.string().optional(),
|
|
1378
|
+
source_port_id: z69.string(),
|
|
1379
|
+
pcb_component_id: z69.string(),
|
|
1318
1380
|
x: distance,
|
|
1319
1381
|
y: distance,
|
|
1320
|
-
layers:
|
|
1321
|
-
is_board_pinout:
|
|
1382
|
+
layers: z69.array(layer_ref),
|
|
1383
|
+
is_board_pinout: z69.boolean().optional()
|
|
1322
1384
|
}).describe("Defines a port on the PCB");
|
|
1323
1385
|
expectTypesMatch(true);
|
|
1324
1386
|
|
|
1325
1387
|
// src/pcb/pcb_smtpad.ts
|
|
1326
|
-
import { z as
|
|
1327
|
-
var pcb_smtpad_circle =
|
|
1328
|
-
type:
|
|
1329
|
-
shape:
|
|
1388
|
+
import { z as z70 } from "zod";
|
|
1389
|
+
var pcb_smtpad_circle = z70.object({
|
|
1390
|
+
type: z70.literal("pcb_smtpad"),
|
|
1391
|
+
shape: z70.literal("circle"),
|
|
1330
1392
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1331
|
-
pcb_group_id:
|
|
1332
|
-
subcircuit_id:
|
|
1393
|
+
pcb_group_id: z70.string().optional(),
|
|
1394
|
+
subcircuit_id: z70.string().optional(),
|
|
1333
1395
|
x: distance,
|
|
1334
1396
|
y: distance,
|
|
1335
|
-
radius:
|
|
1397
|
+
radius: z70.number(),
|
|
1336
1398
|
layer: layer_ref,
|
|
1337
|
-
port_hints:
|
|
1338
|
-
pcb_component_id:
|
|
1339
|
-
pcb_port_id:
|
|
1340
|
-
is_covered_with_solder_mask:
|
|
1341
|
-
});
|
|
1342
|
-
var pcb_smtpad_rect =
|
|
1343
|
-
type:
|
|
1344
|
-
shape:
|
|
1399
|
+
port_hints: z70.array(z70.string()).optional(),
|
|
1400
|
+
pcb_component_id: z70.string().optional(),
|
|
1401
|
+
pcb_port_id: z70.string().optional(),
|
|
1402
|
+
is_covered_with_solder_mask: z70.boolean().optional()
|
|
1403
|
+
});
|
|
1404
|
+
var pcb_smtpad_rect = z70.object({
|
|
1405
|
+
type: z70.literal("pcb_smtpad"),
|
|
1406
|
+
shape: z70.literal("rect"),
|
|
1345
1407
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1346
|
-
pcb_group_id:
|
|
1347
|
-
subcircuit_id:
|
|
1408
|
+
pcb_group_id: z70.string().optional(),
|
|
1409
|
+
subcircuit_id: z70.string().optional(),
|
|
1348
1410
|
x: distance,
|
|
1349
1411
|
y: distance,
|
|
1350
|
-
width:
|
|
1351
|
-
height:
|
|
1352
|
-
rect_border_radius:
|
|
1412
|
+
width: z70.number(),
|
|
1413
|
+
height: z70.number(),
|
|
1414
|
+
rect_border_radius: z70.number().optional(),
|
|
1353
1415
|
layer: layer_ref,
|
|
1354
|
-
port_hints:
|
|
1355
|
-
pcb_component_id:
|
|
1356
|
-
pcb_port_id:
|
|
1357
|
-
is_covered_with_solder_mask:
|
|
1358
|
-
});
|
|
1359
|
-
var pcb_smtpad_rotated_rect =
|
|
1360
|
-
type:
|
|
1361
|
-
shape:
|
|
1416
|
+
port_hints: z70.array(z70.string()).optional(),
|
|
1417
|
+
pcb_component_id: z70.string().optional(),
|
|
1418
|
+
pcb_port_id: z70.string().optional(),
|
|
1419
|
+
is_covered_with_solder_mask: z70.boolean().optional()
|
|
1420
|
+
});
|
|
1421
|
+
var pcb_smtpad_rotated_rect = z70.object({
|
|
1422
|
+
type: z70.literal("pcb_smtpad"),
|
|
1423
|
+
shape: z70.literal("rotated_rect"),
|
|
1362
1424
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1363
|
-
pcb_group_id:
|
|
1364
|
-
subcircuit_id:
|
|
1425
|
+
pcb_group_id: z70.string().optional(),
|
|
1426
|
+
subcircuit_id: z70.string().optional(),
|
|
1365
1427
|
x: distance,
|
|
1366
1428
|
y: distance,
|
|
1367
|
-
width:
|
|
1368
|
-
height:
|
|
1369
|
-
rect_border_radius:
|
|
1429
|
+
width: z70.number(),
|
|
1430
|
+
height: z70.number(),
|
|
1431
|
+
rect_border_radius: z70.number().optional(),
|
|
1370
1432
|
ccw_rotation: rotation,
|
|
1371
1433
|
layer: layer_ref,
|
|
1372
|
-
port_hints:
|
|
1373
|
-
pcb_component_id:
|
|
1374
|
-
pcb_port_id:
|
|
1375
|
-
is_covered_with_solder_mask:
|
|
1376
|
-
});
|
|
1377
|
-
var pcb_smtpad_pill =
|
|
1378
|
-
type:
|
|
1379
|
-
shape:
|
|
1434
|
+
port_hints: z70.array(z70.string()).optional(),
|
|
1435
|
+
pcb_component_id: z70.string().optional(),
|
|
1436
|
+
pcb_port_id: z70.string().optional(),
|
|
1437
|
+
is_covered_with_solder_mask: z70.boolean().optional()
|
|
1438
|
+
});
|
|
1439
|
+
var pcb_smtpad_pill = z70.object({
|
|
1440
|
+
type: z70.literal("pcb_smtpad"),
|
|
1441
|
+
shape: z70.literal("pill"),
|
|
1380
1442
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1381
|
-
pcb_group_id:
|
|
1382
|
-
subcircuit_id:
|
|
1443
|
+
pcb_group_id: z70.string().optional(),
|
|
1444
|
+
subcircuit_id: z70.string().optional(),
|
|
1383
1445
|
x: distance,
|
|
1384
1446
|
y: distance,
|
|
1385
|
-
width:
|
|
1386
|
-
height:
|
|
1387
|
-
radius:
|
|
1447
|
+
width: z70.number(),
|
|
1448
|
+
height: z70.number(),
|
|
1449
|
+
radius: z70.number(),
|
|
1388
1450
|
layer: layer_ref,
|
|
1389
|
-
port_hints:
|
|
1390
|
-
pcb_component_id:
|
|
1391
|
-
pcb_port_id:
|
|
1392
|
-
is_covered_with_solder_mask:
|
|
1393
|
-
});
|
|
1394
|
-
var pcb_smtpad_rotated_pill =
|
|
1395
|
-
type:
|
|
1396
|
-
shape:
|
|
1451
|
+
port_hints: z70.array(z70.string()).optional(),
|
|
1452
|
+
pcb_component_id: z70.string().optional(),
|
|
1453
|
+
pcb_port_id: z70.string().optional(),
|
|
1454
|
+
is_covered_with_solder_mask: z70.boolean().optional()
|
|
1455
|
+
});
|
|
1456
|
+
var pcb_smtpad_rotated_pill = z70.object({
|
|
1457
|
+
type: z70.literal("pcb_smtpad"),
|
|
1458
|
+
shape: z70.literal("rotated_pill"),
|
|
1397
1459
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1398
|
-
pcb_group_id:
|
|
1399
|
-
subcircuit_id:
|
|
1460
|
+
pcb_group_id: z70.string().optional(),
|
|
1461
|
+
subcircuit_id: z70.string().optional(),
|
|
1400
1462
|
x: distance,
|
|
1401
1463
|
y: distance,
|
|
1402
|
-
width:
|
|
1403
|
-
height:
|
|
1404
|
-
radius:
|
|
1464
|
+
width: z70.number(),
|
|
1465
|
+
height: z70.number(),
|
|
1466
|
+
radius: z70.number(),
|
|
1405
1467
|
ccw_rotation: rotation,
|
|
1406
1468
|
layer: layer_ref,
|
|
1407
|
-
port_hints:
|
|
1408
|
-
pcb_component_id:
|
|
1409
|
-
pcb_port_id:
|
|
1410
|
-
is_covered_with_solder_mask:
|
|
1411
|
-
});
|
|
1412
|
-
var pcb_smtpad_polygon =
|
|
1413
|
-
type:
|
|
1414
|
-
shape:
|
|
1469
|
+
port_hints: z70.array(z70.string()).optional(),
|
|
1470
|
+
pcb_component_id: z70.string().optional(),
|
|
1471
|
+
pcb_port_id: z70.string().optional(),
|
|
1472
|
+
is_covered_with_solder_mask: z70.boolean().optional()
|
|
1473
|
+
});
|
|
1474
|
+
var pcb_smtpad_polygon = z70.object({
|
|
1475
|
+
type: z70.literal("pcb_smtpad"),
|
|
1476
|
+
shape: z70.literal("polygon"),
|
|
1415
1477
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1416
|
-
pcb_group_id:
|
|
1417
|
-
subcircuit_id:
|
|
1418
|
-
points:
|
|
1478
|
+
pcb_group_id: z70.string().optional(),
|
|
1479
|
+
subcircuit_id: z70.string().optional(),
|
|
1480
|
+
points: z70.array(point),
|
|
1419
1481
|
layer: layer_ref,
|
|
1420
|
-
port_hints:
|
|
1421
|
-
pcb_component_id:
|
|
1422
|
-
pcb_port_id:
|
|
1423
|
-
is_covered_with_solder_mask:
|
|
1482
|
+
port_hints: z70.array(z70.string()).optional(),
|
|
1483
|
+
pcb_component_id: z70.string().optional(),
|
|
1484
|
+
pcb_port_id: z70.string().optional(),
|
|
1485
|
+
is_covered_with_solder_mask: z70.boolean().optional()
|
|
1424
1486
|
});
|
|
1425
|
-
var pcb_smtpad =
|
|
1487
|
+
var pcb_smtpad = z70.discriminatedUnion("shape", [
|
|
1426
1488
|
pcb_smtpad_circle,
|
|
1427
1489
|
pcb_smtpad_rect,
|
|
1428
1490
|
pcb_smtpad_rotated_rect,
|
|
@@ -1438,79 +1500,79 @@ expectTypesMatch(true);
|
|
|
1438
1500
|
expectTypesMatch(true);
|
|
1439
1501
|
|
|
1440
1502
|
// src/pcb/pcb_solder_paste.ts
|
|
1441
|
-
import { z as
|
|
1442
|
-
var pcb_solder_paste_circle =
|
|
1443
|
-
type:
|
|
1444
|
-
shape:
|
|
1503
|
+
import { z as z71 } from "zod";
|
|
1504
|
+
var pcb_solder_paste_circle = z71.object({
|
|
1505
|
+
type: z71.literal("pcb_solder_paste"),
|
|
1506
|
+
shape: z71.literal("circle"),
|
|
1445
1507
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1446
|
-
pcb_group_id:
|
|
1447
|
-
subcircuit_id:
|
|
1508
|
+
pcb_group_id: z71.string().optional(),
|
|
1509
|
+
subcircuit_id: z71.string().optional(),
|
|
1448
1510
|
x: distance,
|
|
1449
1511
|
y: distance,
|
|
1450
|
-
radius:
|
|
1512
|
+
radius: z71.number(),
|
|
1451
1513
|
layer: layer_ref,
|
|
1452
|
-
pcb_component_id:
|
|
1453
|
-
pcb_smtpad_id:
|
|
1514
|
+
pcb_component_id: z71.string().optional(),
|
|
1515
|
+
pcb_smtpad_id: z71.string().optional()
|
|
1454
1516
|
});
|
|
1455
|
-
var pcb_solder_paste_rect =
|
|
1456
|
-
type:
|
|
1457
|
-
shape:
|
|
1517
|
+
var pcb_solder_paste_rect = z71.object({
|
|
1518
|
+
type: z71.literal("pcb_solder_paste"),
|
|
1519
|
+
shape: z71.literal("rect"),
|
|
1458
1520
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1459
|
-
pcb_group_id:
|
|
1460
|
-
subcircuit_id:
|
|
1521
|
+
pcb_group_id: z71.string().optional(),
|
|
1522
|
+
subcircuit_id: z71.string().optional(),
|
|
1461
1523
|
x: distance,
|
|
1462
1524
|
y: distance,
|
|
1463
|
-
width:
|
|
1464
|
-
height:
|
|
1525
|
+
width: z71.number(),
|
|
1526
|
+
height: z71.number(),
|
|
1465
1527
|
layer: layer_ref,
|
|
1466
|
-
pcb_component_id:
|
|
1467
|
-
pcb_smtpad_id:
|
|
1528
|
+
pcb_component_id: z71.string().optional(),
|
|
1529
|
+
pcb_smtpad_id: z71.string().optional()
|
|
1468
1530
|
});
|
|
1469
|
-
var pcb_solder_paste_pill =
|
|
1470
|
-
type:
|
|
1471
|
-
shape:
|
|
1531
|
+
var pcb_solder_paste_pill = z71.object({
|
|
1532
|
+
type: z71.literal("pcb_solder_paste"),
|
|
1533
|
+
shape: z71.literal("pill"),
|
|
1472
1534
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1473
|
-
pcb_group_id:
|
|
1474
|
-
subcircuit_id:
|
|
1535
|
+
pcb_group_id: z71.string().optional(),
|
|
1536
|
+
subcircuit_id: z71.string().optional(),
|
|
1475
1537
|
x: distance,
|
|
1476
1538
|
y: distance,
|
|
1477
|
-
width:
|
|
1478
|
-
height:
|
|
1479
|
-
radius:
|
|
1539
|
+
width: z71.number(),
|
|
1540
|
+
height: z71.number(),
|
|
1541
|
+
radius: z71.number(),
|
|
1480
1542
|
layer: layer_ref,
|
|
1481
|
-
pcb_component_id:
|
|
1482
|
-
pcb_smtpad_id:
|
|
1543
|
+
pcb_component_id: z71.string().optional(),
|
|
1544
|
+
pcb_smtpad_id: z71.string().optional()
|
|
1483
1545
|
});
|
|
1484
|
-
var pcb_solder_paste_rotated_rect =
|
|
1485
|
-
type:
|
|
1486
|
-
shape:
|
|
1546
|
+
var pcb_solder_paste_rotated_rect = z71.object({
|
|
1547
|
+
type: z71.literal("pcb_solder_paste"),
|
|
1548
|
+
shape: z71.literal("rotated_rect"),
|
|
1487
1549
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1488
|
-
pcb_group_id:
|
|
1489
|
-
subcircuit_id:
|
|
1550
|
+
pcb_group_id: z71.string().optional(),
|
|
1551
|
+
subcircuit_id: z71.string().optional(),
|
|
1490
1552
|
x: distance,
|
|
1491
1553
|
y: distance,
|
|
1492
|
-
width:
|
|
1493
|
-
height:
|
|
1554
|
+
width: z71.number(),
|
|
1555
|
+
height: z71.number(),
|
|
1494
1556
|
ccw_rotation: distance,
|
|
1495
1557
|
layer: layer_ref,
|
|
1496
|
-
pcb_component_id:
|
|
1497
|
-
pcb_smtpad_id:
|
|
1558
|
+
pcb_component_id: z71.string().optional(),
|
|
1559
|
+
pcb_smtpad_id: z71.string().optional()
|
|
1498
1560
|
});
|
|
1499
|
-
var pcb_solder_paste_oval =
|
|
1500
|
-
type:
|
|
1501
|
-
shape:
|
|
1561
|
+
var pcb_solder_paste_oval = z71.object({
|
|
1562
|
+
type: z71.literal("pcb_solder_paste"),
|
|
1563
|
+
shape: z71.literal("oval"),
|
|
1502
1564
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1503
|
-
pcb_group_id:
|
|
1504
|
-
subcircuit_id:
|
|
1565
|
+
pcb_group_id: z71.string().optional(),
|
|
1566
|
+
subcircuit_id: z71.string().optional(),
|
|
1505
1567
|
x: distance,
|
|
1506
1568
|
y: distance,
|
|
1507
|
-
width:
|
|
1508
|
-
height:
|
|
1569
|
+
width: z71.number(),
|
|
1570
|
+
height: z71.number(),
|
|
1509
1571
|
layer: layer_ref,
|
|
1510
|
-
pcb_component_id:
|
|
1511
|
-
pcb_smtpad_id:
|
|
1572
|
+
pcb_component_id: z71.string().optional(),
|
|
1573
|
+
pcb_smtpad_id: z71.string().optional()
|
|
1512
1574
|
});
|
|
1513
|
-
var pcb_solder_paste =
|
|
1575
|
+
var pcb_solder_paste = z71.union([
|
|
1514
1576
|
pcb_solder_paste_circle,
|
|
1515
1577
|
pcb_solder_paste_rect,
|
|
1516
1578
|
pcb_solder_paste_pill,
|
|
@@ -1526,134 +1588,134 @@ expectTypesMatch(
|
|
|
1526
1588
|
expectTypesMatch(true);
|
|
1527
1589
|
|
|
1528
1590
|
// src/pcb/pcb_text.ts
|
|
1529
|
-
import { z as
|
|
1530
|
-
var pcb_text =
|
|
1531
|
-
type:
|
|
1591
|
+
import { z as z72 } from "zod";
|
|
1592
|
+
var pcb_text = z72.object({
|
|
1593
|
+
type: z72.literal("pcb_text"),
|
|
1532
1594
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
1533
|
-
pcb_group_id:
|
|
1534
|
-
subcircuit_id:
|
|
1535
|
-
text:
|
|
1595
|
+
pcb_group_id: z72.string().optional(),
|
|
1596
|
+
subcircuit_id: z72.string().optional(),
|
|
1597
|
+
text: z72.string(),
|
|
1536
1598
|
center: point,
|
|
1537
1599
|
layer: layer_ref,
|
|
1538
1600
|
width: length,
|
|
1539
1601
|
height: length,
|
|
1540
|
-
lines:
|
|
1602
|
+
lines: z72.number(),
|
|
1541
1603
|
// @ts-ignore
|
|
1542
|
-
align:
|
|
1604
|
+
align: z72.enum(["bottom-left"])
|
|
1543
1605
|
}).describe("Defines text on the PCB");
|
|
1544
1606
|
expectTypesMatch(true);
|
|
1545
1607
|
|
|
1546
1608
|
// src/pcb/pcb_trace.ts
|
|
1547
|
-
import { z as
|
|
1548
|
-
var pcb_trace_route_point_wire =
|
|
1549
|
-
route_type:
|
|
1609
|
+
import { z as z73 } from "zod";
|
|
1610
|
+
var pcb_trace_route_point_wire = z73.object({
|
|
1611
|
+
route_type: z73.literal("wire"),
|
|
1550
1612
|
x: distance,
|
|
1551
1613
|
y: distance,
|
|
1552
1614
|
width: distance,
|
|
1553
|
-
start_pcb_port_id:
|
|
1554
|
-
end_pcb_port_id:
|
|
1615
|
+
start_pcb_port_id: z73.string().optional(),
|
|
1616
|
+
end_pcb_port_id: z73.string().optional(),
|
|
1555
1617
|
layer: layer_ref
|
|
1556
1618
|
});
|
|
1557
|
-
var pcb_trace_route_point_via =
|
|
1558
|
-
route_type:
|
|
1619
|
+
var pcb_trace_route_point_via = z73.object({
|
|
1620
|
+
route_type: z73.literal("via"),
|
|
1559
1621
|
x: distance,
|
|
1560
1622
|
y: distance,
|
|
1561
1623
|
hole_diameter: distance.optional(),
|
|
1562
1624
|
outer_diameter: distance.optional(),
|
|
1563
|
-
from_layer:
|
|
1564
|
-
to_layer:
|
|
1625
|
+
from_layer: z73.string(),
|
|
1626
|
+
to_layer: z73.string()
|
|
1565
1627
|
});
|
|
1566
|
-
var pcb_trace_route_point =
|
|
1628
|
+
var pcb_trace_route_point = z73.union([
|
|
1567
1629
|
pcb_trace_route_point_wire,
|
|
1568
1630
|
pcb_trace_route_point_via
|
|
1569
1631
|
]);
|
|
1570
|
-
var pcb_trace =
|
|
1571
|
-
type:
|
|
1572
|
-
source_trace_id:
|
|
1573
|
-
pcb_component_id:
|
|
1632
|
+
var pcb_trace = z73.object({
|
|
1633
|
+
type: z73.literal("pcb_trace"),
|
|
1634
|
+
source_trace_id: z73.string().optional(),
|
|
1635
|
+
pcb_component_id: z73.string().optional(),
|
|
1574
1636
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
1575
|
-
pcb_group_id:
|
|
1576
|
-
subcircuit_id:
|
|
1577
|
-
route_thickness_mode:
|
|
1578
|
-
route_order_index:
|
|
1579
|
-
should_round_corners:
|
|
1580
|
-
trace_length:
|
|
1581
|
-
route:
|
|
1637
|
+
pcb_group_id: z73.string().optional(),
|
|
1638
|
+
subcircuit_id: z73.string().optional(),
|
|
1639
|
+
route_thickness_mode: z73.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
1640
|
+
route_order_index: z73.number().optional(),
|
|
1641
|
+
should_round_corners: z73.boolean().optional(),
|
|
1642
|
+
trace_length: z73.number().optional(),
|
|
1643
|
+
route: z73.array(pcb_trace_route_point)
|
|
1582
1644
|
}).describe("Defines a trace on the PCB");
|
|
1583
1645
|
expectTypesMatch(true);
|
|
1584
1646
|
expectTypesMatch(true);
|
|
1585
1647
|
|
|
1586
1648
|
// src/pcb/pcb_trace_error.ts
|
|
1587
|
-
import { z as
|
|
1588
|
-
var pcb_trace_error =
|
|
1589
|
-
type:
|
|
1649
|
+
import { z as z74 } from "zod";
|
|
1650
|
+
var pcb_trace_error = z74.object({
|
|
1651
|
+
type: z74.literal("pcb_trace_error"),
|
|
1590
1652
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
1591
|
-
error_type:
|
|
1592
|
-
message:
|
|
1653
|
+
error_type: z74.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
1654
|
+
message: z74.string(),
|
|
1593
1655
|
center: point.optional(),
|
|
1594
|
-
pcb_trace_id:
|
|
1595
|
-
source_trace_id:
|
|
1596
|
-
pcb_component_ids:
|
|
1597
|
-
pcb_port_ids:
|
|
1598
|
-
subcircuit_id:
|
|
1656
|
+
pcb_trace_id: z74.string(),
|
|
1657
|
+
source_trace_id: z74.string(),
|
|
1658
|
+
pcb_component_ids: z74.array(z74.string()),
|
|
1659
|
+
pcb_port_ids: z74.array(z74.string()),
|
|
1660
|
+
subcircuit_id: z74.string().optional()
|
|
1599
1661
|
}).describe("Defines a trace error on the PCB");
|
|
1600
1662
|
expectTypesMatch(true);
|
|
1601
1663
|
|
|
1602
1664
|
// src/pcb/pcb_trace_missing_error.ts
|
|
1603
|
-
import { z as
|
|
1604
|
-
var pcb_trace_missing_error =
|
|
1605
|
-
type:
|
|
1665
|
+
import { z as z75 } from "zod";
|
|
1666
|
+
var pcb_trace_missing_error = z75.object({
|
|
1667
|
+
type: z75.literal("pcb_trace_missing_error"),
|
|
1606
1668
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
1607
1669
|
"pcb_trace_missing_error"
|
|
1608
1670
|
),
|
|
1609
|
-
error_type:
|
|
1610
|
-
message:
|
|
1671
|
+
error_type: z75.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
1672
|
+
message: z75.string(),
|
|
1611
1673
|
center: point.optional(),
|
|
1612
|
-
source_trace_id:
|
|
1613
|
-
pcb_component_ids:
|
|
1614
|
-
pcb_port_ids:
|
|
1615
|
-
subcircuit_id:
|
|
1674
|
+
source_trace_id: z75.string(),
|
|
1675
|
+
pcb_component_ids: z75.array(z75.string()),
|
|
1676
|
+
pcb_port_ids: z75.array(z75.string()),
|
|
1677
|
+
subcircuit_id: z75.string().optional()
|
|
1616
1678
|
}).describe(
|
|
1617
1679
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
1618
1680
|
);
|
|
1619
1681
|
expectTypesMatch(true);
|
|
1620
1682
|
|
|
1621
1683
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
1622
|
-
import { z as
|
|
1623
|
-
var pcb_port_not_matched_error =
|
|
1624
|
-
type:
|
|
1684
|
+
import { z as z76 } from "zod";
|
|
1685
|
+
var pcb_port_not_matched_error = z76.object({
|
|
1686
|
+
type: z76.literal("pcb_port_not_matched_error"),
|
|
1625
1687
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1626
|
-
error_type:
|
|
1627
|
-
message:
|
|
1628
|
-
pcb_component_ids:
|
|
1629
|
-
subcircuit_id:
|
|
1688
|
+
error_type: z76.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
1689
|
+
message: z76.string(),
|
|
1690
|
+
pcb_component_ids: z76.array(z76.string()),
|
|
1691
|
+
subcircuit_id: z76.string().optional()
|
|
1630
1692
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
1631
1693
|
expectTypesMatch(true);
|
|
1632
1694
|
|
|
1633
1695
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
1634
|
-
import { z as
|
|
1635
|
-
var pcb_port_not_connected_error =
|
|
1636
|
-
type:
|
|
1696
|
+
import { z as z77 } from "zod";
|
|
1697
|
+
var pcb_port_not_connected_error = z77.object({
|
|
1698
|
+
type: z77.literal("pcb_port_not_connected_error"),
|
|
1637
1699
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
1638
1700
|
"pcb_port_not_connected_error"
|
|
1639
1701
|
),
|
|
1640
|
-
error_type:
|
|
1641
|
-
message:
|
|
1642
|
-
pcb_port_ids:
|
|
1643
|
-
pcb_component_ids:
|
|
1644
|
-
subcircuit_id:
|
|
1702
|
+
error_type: z77.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
1703
|
+
message: z77.string(),
|
|
1704
|
+
pcb_port_ids: z77.array(z77.string()),
|
|
1705
|
+
pcb_component_ids: z77.array(z77.string()),
|
|
1706
|
+
subcircuit_id: z77.string().optional()
|
|
1645
1707
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
1646
1708
|
expectTypesMatch(
|
|
1647
1709
|
true
|
|
1648
1710
|
);
|
|
1649
1711
|
|
|
1650
1712
|
// src/pcb/pcb_via.ts
|
|
1651
|
-
import { z as
|
|
1652
|
-
var pcb_via =
|
|
1653
|
-
type:
|
|
1713
|
+
import { z as z78 } from "zod";
|
|
1714
|
+
var pcb_via = z78.object({
|
|
1715
|
+
type: z78.literal("pcb_via"),
|
|
1654
1716
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
1655
|
-
pcb_group_id:
|
|
1656
|
-
subcircuit_id:
|
|
1717
|
+
pcb_group_id: z78.string().optional(),
|
|
1718
|
+
subcircuit_id: z78.string().optional(),
|
|
1657
1719
|
x: distance,
|
|
1658
1720
|
y: distance,
|
|
1659
1721
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -1662,59 +1724,59 @@ var pcb_via = z75.object({
|
|
|
1662
1724
|
from_layer: layer_ref.optional(),
|
|
1663
1725
|
/** @deprecated */
|
|
1664
1726
|
to_layer: layer_ref.optional(),
|
|
1665
|
-
layers:
|
|
1666
|
-
pcb_trace_id:
|
|
1727
|
+
layers: z78.array(layer_ref),
|
|
1728
|
+
pcb_trace_id: z78.string().optional()
|
|
1667
1729
|
}).describe("Defines a via on the PCB");
|
|
1668
1730
|
expectTypesMatch(true);
|
|
1669
1731
|
|
|
1670
1732
|
// src/pcb/pcb_board.ts
|
|
1671
|
-
import { z as
|
|
1672
|
-
var pcb_board =
|
|
1673
|
-
type:
|
|
1733
|
+
import { z as z79 } from "zod";
|
|
1734
|
+
var pcb_board = z79.object({
|
|
1735
|
+
type: z79.literal("pcb_board"),
|
|
1674
1736
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
1675
|
-
is_subcircuit:
|
|
1676
|
-
subcircuit_id:
|
|
1737
|
+
is_subcircuit: z79.boolean().optional(),
|
|
1738
|
+
subcircuit_id: z79.string().optional(),
|
|
1677
1739
|
width: length,
|
|
1678
1740
|
height: length,
|
|
1679
1741
|
center: point,
|
|
1680
1742
|
thickness: length.optional().default(1.4),
|
|
1681
|
-
num_layers:
|
|
1682
|
-
outline:
|
|
1683
|
-
material:
|
|
1743
|
+
num_layers: z79.number().optional().default(4),
|
|
1744
|
+
outline: z79.array(point).optional(),
|
|
1745
|
+
material: z79.enum(["fr4", "fr1"]).default("fr4")
|
|
1684
1746
|
}).describe("Defines the board outline of the PCB");
|
|
1685
1747
|
expectTypesMatch(true);
|
|
1686
1748
|
|
|
1687
1749
|
// src/pcb/pcb_placement_error.ts
|
|
1688
|
-
import { z as
|
|
1689
|
-
var pcb_placement_error =
|
|
1690
|
-
type:
|
|
1750
|
+
import { z as z80 } from "zod";
|
|
1751
|
+
var pcb_placement_error = z80.object({
|
|
1752
|
+
type: z80.literal("pcb_placement_error"),
|
|
1691
1753
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
1692
|
-
error_type:
|
|
1693
|
-
message:
|
|
1694
|
-
subcircuit_id:
|
|
1754
|
+
error_type: z80.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
1755
|
+
message: z80.string(),
|
|
1756
|
+
subcircuit_id: z80.string().optional()
|
|
1695
1757
|
}).describe("Defines a placement error on the PCB");
|
|
1696
1758
|
expectTypesMatch(true);
|
|
1697
1759
|
|
|
1698
1760
|
// src/pcb/pcb_trace_hint.ts
|
|
1699
|
-
import { z as
|
|
1700
|
-
var pcb_trace_hint =
|
|
1701
|
-
type:
|
|
1761
|
+
import { z as z81 } from "zod";
|
|
1762
|
+
var pcb_trace_hint = z81.object({
|
|
1763
|
+
type: z81.literal("pcb_trace_hint"),
|
|
1702
1764
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
1703
|
-
pcb_port_id:
|
|
1704
|
-
pcb_component_id:
|
|
1705
|
-
route:
|
|
1706
|
-
subcircuit_id:
|
|
1765
|
+
pcb_port_id: z81.string(),
|
|
1766
|
+
pcb_component_id: z81.string(),
|
|
1767
|
+
route: z81.array(route_hint_point),
|
|
1768
|
+
subcircuit_id: z81.string().optional()
|
|
1707
1769
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
1708
1770
|
expectTypesMatch(true);
|
|
1709
1771
|
|
|
1710
1772
|
// src/pcb/pcb_silkscreen_line.ts
|
|
1711
|
-
import { z as
|
|
1712
|
-
var pcb_silkscreen_line =
|
|
1713
|
-
type:
|
|
1773
|
+
import { z as z82 } from "zod";
|
|
1774
|
+
var pcb_silkscreen_line = z82.object({
|
|
1775
|
+
type: z82.literal("pcb_silkscreen_line"),
|
|
1714
1776
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
1715
|
-
pcb_component_id:
|
|
1716
|
-
pcb_group_id:
|
|
1717
|
-
subcircuit_id:
|
|
1777
|
+
pcb_component_id: z82.string(),
|
|
1778
|
+
pcb_group_id: z82.string().optional(),
|
|
1779
|
+
subcircuit_id: z82.string().optional(),
|
|
1718
1780
|
stroke_width: distance.default("0.1mm"),
|
|
1719
1781
|
x1: distance,
|
|
1720
1782
|
y1: distance,
|
|
@@ -1725,32 +1787,32 @@ var pcb_silkscreen_line = z79.object({
|
|
|
1725
1787
|
expectTypesMatch(true);
|
|
1726
1788
|
|
|
1727
1789
|
// src/pcb/pcb_silkscreen_path.ts
|
|
1728
|
-
import { z as
|
|
1729
|
-
var pcb_silkscreen_path =
|
|
1730
|
-
type:
|
|
1790
|
+
import { z as z83 } from "zod";
|
|
1791
|
+
var pcb_silkscreen_path = z83.object({
|
|
1792
|
+
type: z83.literal("pcb_silkscreen_path"),
|
|
1731
1793
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
1732
|
-
pcb_component_id:
|
|
1733
|
-
pcb_group_id:
|
|
1734
|
-
subcircuit_id:
|
|
1794
|
+
pcb_component_id: z83.string(),
|
|
1795
|
+
pcb_group_id: z83.string().optional(),
|
|
1796
|
+
subcircuit_id: z83.string().optional(),
|
|
1735
1797
|
layer: visible_layer,
|
|
1736
|
-
route:
|
|
1798
|
+
route: z83.array(point),
|
|
1737
1799
|
stroke_width: length
|
|
1738
1800
|
}).describe("Defines a silkscreen path on the PCB");
|
|
1739
1801
|
expectTypesMatch(true);
|
|
1740
1802
|
|
|
1741
1803
|
// src/pcb/pcb_silkscreen_text.ts
|
|
1742
|
-
import { z as
|
|
1743
|
-
var pcb_silkscreen_text =
|
|
1744
|
-
type:
|
|
1804
|
+
import { z as z84 } from "zod";
|
|
1805
|
+
var pcb_silkscreen_text = z84.object({
|
|
1806
|
+
type: z84.literal("pcb_silkscreen_text"),
|
|
1745
1807
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
1746
|
-
pcb_group_id:
|
|
1747
|
-
subcircuit_id:
|
|
1748
|
-
font:
|
|
1808
|
+
pcb_group_id: z84.string().optional(),
|
|
1809
|
+
subcircuit_id: z84.string().optional(),
|
|
1810
|
+
font: z84.literal("tscircuit2024").default("tscircuit2024"),
|
|
1749
1811
|
font_size: distance.default("0.2mm"),
|
|
1750
|
-
pcb_component_id:
|
|
1751
|
-
text:
|
|
1752
|
-
is_knockout:
|
|
1753
|
-
knockout_padding:
|
|
1812
|
+
pcb_component_id: z84.string(),
|
|
1813
|
+
text: z84.string(),
|
|
1814
|
+
is_knockout: z84.boolean().default(false).optional(),
|
|
1815
|
+
knockout_padding: z84.object({
|
|
1754
1816
|
left: length,
|
|
1755
1817
|
top: length,
|
|
1756
1818
|
bottom: length,
|
|
@@ -1761,43 +1823,43 @@ var pcb_silkscreen_text = z81.object({
|
|
|
1761
1823
|
bottom: "0.2mm",
|
|
1762
1824
|
right: "0.2mm"
|
|
1763
1825
|
}).optional(),
|
|
1764
|
-
ccw_rotation:
|
|
1826
|
+
ccw_rotation: z84.number().optional(),
|
|
1765
1827
|
layer: layer_ref,
|
|
1766
|
-
is_mirrored:
|
|
1828
|
+
is_mirrored: z84.boolean().default(false).optional(),
|
|
1767
1829
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1768
1830
|
anchor_alignment: ninePointAnchor.default("center")
|
|
1769
1831
|
}).describe("Defines silkscreen text on the PCB");
|
|
1770
1832
|
expectTypesMatch(true);
|
|
1771
1833
|
|
|
1772
1834
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
1773
|
-
import { z as
|
|
1774
|
-
var pcb_silkscreen_rect =
|
|
1775
|
-
type:
|
|
1835
|
+
import { z as z85 } from "zod";
|
|
1836
|
+
var pcb_silkscreen_rect = z85.object({
|
|
1837
|
+
type: z85.literal("pcb_silkscreen_rect"),
|
|
1776
1838
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
1777
|
-
pcb_component_id:
|
|
1778
|
-
pcb_group_id:
|
|
1779
|
-
subcircuit_id:
|
|
1839
|
+
pcb_component_id: z85.string(),
|
|
1840
|
+
pcb_group_id: z85.string().optional(),
|
|
1841
|
+
subcircuit_id: z85.string().optional(),
|
|
1780
1842
|
center: point,
|
|
1781
1843
|
width: length,
|
|
1782
1844
|
height: length,
|
|
1783
1845
|
layer: layer_ref,
|
|
1784
1846
|
stroke_width: length.default("1mm"),
|
|
1785
|
-
is_filled:
|
|
1786
|
-
has_stroke:
|
|
1787
|
-
is_stroke_dashed:
|
|
1847
|
+
is_filled: z85.boolean().default(true).optional(),
|
|
1848
|
+
has_stroke: z85.boolean().optional(),
|
|
1849
|
+
is_stroke_dashed: z85.boolean().optional()
|
|
1788
1850
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
1789
1851
|
expectTypesMatch(true);
|
|
1790
1852
|
|
|
1791
1853
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
1792
|
-
import { z as
|
|
1793
|
-
var pcb_silkscreen_circle =
|
|
1794
|
-
type:
|
|
1854
|
+
import { z as z86 } from "zod";
|
|
1855
|
+
var pcb_silkscreen_circle = z86.object({
|
|
1856
|
+
type: z86.literal("pcb_silkscreen_circle"),
|
|
1795
1857
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
1796
1858
|
"pcb_silkscreen_circle"
|
|
1797
1859
|
),
|
|
1798
|
-
pcb_component_id:
|
|
1799
|
-
pcb_group_id:
|
|
1800
|
-
subcircuit_id:
|
|
1860
|
+
pcb_component_id: z86.string(),
|
|
1861
|
+
pcb_group_id: z86.string().optional(),
|
|
1862
|
+
subcircuit_id: z86.string().optional(),
|
|
1801
1863
|
center: point,
|
|
1802
1864
|
radius: length,
|
|
1803
1865
|
layer: visible_layer,
|
|
@@ -1806,13 +1868,13 @@ var pcb_silkscreen_circle = z83.object({
|
|
|
1806
1868
|
expectTypesMatch(true);
|
|
1807
1869
|
|
|
1808
1870
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
1809
|
-
import { z as
|
|
1810
|
-
var pcb_silkscreen_oval =
|
|
1811
|
-
type:
|
|
1871
|
+
import { z as z87 } from "zod";
|
|
1872
|
+
var pcb_silkscreen_oval = z87.object({
|
|
1873
|
+
type: z87.literal("pcb_silkscreen_oval"),
|
|
1812
1874
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
1813
|
-
pcb_component_id:
|
|
1814
|
-
pcb_group_id:
|
|
1815
|
-
subcircuit_id:
|
|
1875
|
+
pcb_component_id: z87.string(),
|
|
1876
|
+
pcb_group_id: z87.string().optional(),
|
|
1877
|
+
subcircuit_id: z87.string().optional(),
|
|
1816
1878
|
center: point,
|
|
1817
1879
|
radius_x: distance,
|
|
1818
1880
|
radius_y: distance,
|
|
@@ -1821,103 +1883,103 @@ var pcb_silkscreen_oval = z84.object({
|
|
|
1821
1883
|
expectTypesMatch(true);
|
|
1822
1884
|
|
|
1823
1885
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
1824
|
-
import { z as
|
|
1825
|
-
var pcb_fabrication_note_text =
|
|
1826
|
-
type:
|
|
1886
|
+
import { z as z88 } from "zod";
|
|
1887
|
+
var pcb_fabrication_note_text = z88.object({
|
|
1888
|
+
type: z88.literal("pcb_fabrication_note_text"),
|
|
1827
1889
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
1828
1890
|
"pcb_fabrication_note_text"
|
|
1829
1891
|
),
|
|
1830
|
-
subcircuit_id:
|
|
1831
|
-
pcb_group_id:
|
|
1832
|
-
font:
|
|
1892
|
+
subcircuit_id: z88.string().optional(),
|
|
1893
|
+
pcb_group_id: z88.string().optional(),
|
|
1894
|
+
font: z88.literal("tscircuit2024").default("tscircuit2024"),
|
|
1833
1895
|
font_size: distance.default("1mm"),
|
|
1834
|
-
pcb_component_id:
|
|
1835
|
-
text:
|
|
1896
|
+
pcb_component_id: z88.string(),
|
|
1897
|
+
text: z88.string(),
|
|
1836
1898
|
layer: visible_layer,
|
|
1837
1899
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1838
|
-
anchor_alignment:
|
|
1839
|
-
color:
|
|
1900
|
+
anchor_alignment: z88.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
1901
|
+
color: z88.string().optional()
|
|
1840
1902
|
}).describe(
|
|
1841
1903
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
1842
1904
|
);
|
|
1843
1905
|
expectTypesMatch(true);
|
|
1844
1906
|
|
|
1845
1907
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
1846
|
-
import { z as
|
|
1847
|
-
var pcb_fabrication_note_path =
|
|
1848
|
-
type:
|
|
1908
|
+
import { z as z89 } from "zod";
|
|
1909
|
+
var pcb_fabrication_note_path = z89.object({
|
|
1910
|
+
type: z89.literal("pcb_fabrication_note_path"),
|
|
1849
1911
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
1850
1912
|
"pcb_fabrication_note_path"
|
|
1851
1913
|
),
|
|
1852
|
-
pcb_component_id:
|
|
1853
|
-
subcircuit_id:
|
|
1914
|
+
pcb_component_id: z89.string(),
|
|
1915
|
+
subcircuit_id: z89.string().optional(),
|
|
1854
1916
|
layer: layer_ref,
|
|
1855
|
-
route:
|
|
1917
|
+
route: z89.array(point),
|
|
1856
1918
|
stroke_width: length,
|
|
1857
|
-
color:
|
|
1919
|
+
color: z89.string().optional()
|
|
1858
1920
|
}).describe(
|
|
1859
1921
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
1860
1922
|
);
|
|
1861
1923
|
expectTypesMatch(true);
|
|
1862
1924
|
|
|
1863
1925
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
1864
|
-
import { z as
|
|
1865
|
-
var pcb_footprint_overlap_error =
|
|
1866
|
-
type:
|
|
1926
|
+
import { z as z90 } from "zod";
|
|
1927
|
+
var pcb_footprint_overlap_error = z90.object({
|
|
1928
|
+
type: z90.literal("pcb_footprint_overlap_error"),
|
|
1867
1929
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1868
|
-
error_type:
|
|
1869
|
-
message:
|
|
1870
|
-
pcb_smtpad_ids:
|
|
1871
|
-
pcb_plated_hole_ids:
|
|
1872
|
-
pcb_hole_ids:
|
|
1873
|
-
pcb_keepout_ids:
|
|
1930
|
+
error_type: z90.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
1931
|
+
message: z90.string(),
|
|
1932
|
+
pcb_smtpad_ids: z90.array(z90.string()).optional(),
|
|
1933
|
+
pcb_plated_hole_ids: z90.array(z90.string()).optional(),
|
|
1934
|
+
pcb_hole_ids: z90.array(z90.string()).optional(),
|
|
1935
|
+
pcb_keepout_ids: z90.array(z90.string()).optional()
|
|
1874
1936
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
1875
1937
|
expectTypesMatch(
|
|
1876
1938
|
true
|
|
1877
1939
|
);
|
|
1878
1940
|
|
|
1879
1941
|
// src/pcb/pcb_keepout.ts
|
|
1880
|
-
import { z as
|
|
1881
|
-
var pcb_keepout =
|
|
1882
|
-
type:
|
|
1883
|
-
shape:
|
|
1884
|
-
pcb_group_id:
|
|
1885
|
-
subcircuit_id:
|
|
1942
|
+
import { z as z91 } from "zod";
|
|
1943
|
+
var pcb_keepout = z91.object({
|
|
1944
|
+
type: z91.literal("pcb_keepout"),
|
|
1945
|
+
shape: z91.literal("rect"),
|
|
1946
|
+
pcb_group_id: z91.string().optional(),
|
|
1947
|
+
subcircuit_id: z91.string().optional(),
|
|
1886
1948
|
center: point,
|
|
1887
1949
|
width: distance,
|
|
1888
1950
|
height: distance,
|
|
1889
|
-
pcb_keepout_id:
|
|
1890
|
-
layers:
|
|
1951
|
+
pcb_keepout_id: z91.string(),
|
|
1952
|
+
layers: z91.array(z91.string()),
|
|
1891
1953
|
// Specify layers where the keepout applies
|
|
1892
|
-
description:
|
|
1954
|
+
description: z91.string().optional()
|
|
1893
1955
|
// Optional description of the keepout
|
|
1894
1956
|
}).or(
|
|
1895
|
-
|
|
1896
|
-
type:
|
|
1897
|
-
shape:
|
|
1898
|
-
pcb_group_id:
|
|
1899
|
-
subcircuit_id:
|
|
1957
|
+
z91.object({
|
|
1958
|
+
type: z91.literal("pcb_keepout"),
|
|
1959
|
+
shape: z91.literal("circle"),
|
|
1960
|
+
pcb_group_id: z91.string().optional(),
|
|
1961
|
+
subcircuit_id: z91.string().optional(),
|
|
1900
1962
|
center: point,
|
|
1901
1963
|
radius: distance,
|
|
1902
|
-
pcb_keepout_id:
|
|
1903
|
-
layers:
|
|
1964
|
+
pcb_keepout_id: z91.string(),
|
|
1965
|
+
layers: z91.array(z91.string()),
|
|
1904
1966
|
// Specify layers where the keepout applies
|
|
1905
|
-
description:
|
|
1967
|
+
description: z91.string().optional()
|
|
1906
1968
|
// Optional description of the keepout
|
|
1907
1969
|
})
|
|
1908
1970
|
);
|
|
1909
1971
|
expectTypesMatch(true);
|
|
1910
1972
|
|
|
1911
1973
|
// src/pcb/pcb_cutout.ts
|
|
1912
|
-
import { z as
|
|
1913
|
-
var pcb_cutout_base =
|
|
1914
|
-
type:
|
|
1974
|
+
import { z as z92 } from "zod";
|
|
1975
|
+
var pcb_cutout_base = z92.object({
|
|
1976
|
+
type: z92.literal("pcb_cutout"),
|
|
1915
1977
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
1916
|
-
pcb_group_id:
|
|
1917
|
-
subcircuit_id:
|
|
1978
|
+
pcb_group_id: z92.string().optional(),
|
|
1979
|
+
subcircuit_id: z92.string().optional()
|
|
1918
1980
|
});
|
|
1919
1981
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
1920
|
-
shape:
|
|
1982
|
+
shape: z92.literal("rect"),
|
|
1921
1983
|
center: point,
|
|
1922
1984
|
width: length,
|
|
1923
1985
|
height: length,
|
|
@@ -1925,17 +1987,17 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
1925
1987
|
});
|
|
1926
1988
|
expectTypesMatch(true);
|
|
1927
1989
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
1928
|
-
shape:
|
|
1990
|
+
shape: z92.literal("circle"),
|
|
1929
1991
|
center: point,
|
|
1930
1992
|
radius: length
|
|
1931
1993
|
});
|
|
1932
1994
|
expectTypesMatch(true);
|
|
1933
1995
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
1934
|
-
shape:
|
|
1935
|
-
points:
|
|
1996
|
+
shape: z92.literal("polygon"),
|
|
1997
|
+
points: z92.array(point)
|
|
1936
1998
|
});
|
|
1937
1999
|
expectTypesMatch(true);
|
|
1938
|
-
var pcb_cutout =
|
|
2000
|
+
var pcb_cutout = z92.discriminatedUnion("shape", [
|
|
1939
2001
|
pcb_cutout_rect,
|
|
1940
2002
|
pcb_cutout_circle,
|
|
1941
2003
|
pcb_cutout_polygon
|
|
@@ -1943,100 +2005,100 @@ var pcb_cutout = z89.discriminatedUnion("shape", [
|
|
|
1943
2005
|
expectTypesMatch(true);
|
|
1944
2006
|
|
|
1945
2007
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
1946
|
-
import { z as
|
|
1947
|
-
var pcb_missing_footprint_error =
|
|
1948
|
-
type:
|
|
2008
|
+
import { z as z93 } from "zod";
|
|
2009
|
+
var pcb_missing_footprint_error = z93.object({
|
|
2010
|
+
type: z93.literal("pcb_missing_footprint_error"),
|
|
1949
2011
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
1950
2012
|
"pcb_missing_footprint_error"
|
|
1951
2013
|
),
|
|
1952
|
-
pcb_group_id:
|
|
1953
|
-
subcircuit_id:
|
|
1954
|
-
error_type:
|
|
1955
|
-
source_component_id:
|
|
1956
|
-
message:
|
|
2014
|
+
pcb_group_id: z93.string().optional(),
|
|
2015
|
+
subcircuit_id: z93.string().optional(),
|
|
2016
|
+
error_type: z93.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
2017
|
+
source_component_id: z93.string(),
|
|
2018
|
+
message: z93.string()
|
|
1957
2019
|
}).describe("Defines a missing footprint error on the PCB");
|
|
1958
2020
|
expectTypesMatch(
|
|
1959
2021
|
true
|
|
1960
2022
|
);
|
|
1961
2023
|
|
|
1962
2024
|
// src/pcb/external_footprint_load_error.ts
|
|
1963
|
-
import { z as
|
|
1964
|
-
var external_footprint_load_error =
|
|
1965
|
-
type:
|
|
2025
|
+
import { z as z94 } from "zod";
|
|
2026
|
+
var external_footprint_load_error = z94.object({
|
|
2027
|
+
type: z94.literal("external_footprint_load_error"),
|
|
1966
2028
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
1967
2029
|
"external_footprint_load_error"
|
|
1968
2030
|
),
|
|
1969
|
-
pcb_component_id:
|
|
1970
|
-
source_component_id:
|
|
1971
|
-
pcb_group_id:
|
|
1972
|
-
subcircuit_id:
|
|
1973
|
-
footprinter_string:
|
|
1974
|
-
error_type:
|
|
1975
|
-
message:
|
|
2031
|
+
pcb_component_id: z94.string(),
|
|
2032
|
+
source_component_id: z94.string(),
|
|
2033
|
+
pcb_group_id: z94.string().optional(),
|
|
2034
|
+
subcircuit_id: z94.string().optional(),
|
|
2035
|
+
footprinter_string: z94.string().optional(),
|
|
2036
|
+
error_type: z94.literal("external_footprint_load_error").default("external_footprint_load_error"),
|
|
2037
|
+
message: z94.string()
|
|
1976
2038
|
}).describe("Defines an error when an external footprint fails to load");
|
|
1977
2039
|
expectTypesMatch(true);
|
|
1978
2040
|
|
|
1979
2041
|
// src/pcb/pcb_group.ts
|
|
1980
|
-
import { z as
|
|
1981
|
-
var pcb_group =
|
|
1982
|
-
type:
|
|
2042
|
+
import { z as z95 } from "zod";
|
|
2043
|
+
var pcb_group = z95.object({
|
|
2044
|
+
type: z95.literal("pcb_group"),
|
|
1983
2045
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
1984
|
-
source_group_id:
|
|
1985
|
-
is_subcircuit:
|
|
1986
|
-
subcircuit_id:
|
|
2046
|
+
source_group_id: z95.string(),
|
|
2047
|
+
is_subcircuit: z95.boolean().optional(),
|
|
2048
|
+
subcircuit_id: z95.string().optional(),
|
|
1987
2049
|
width: length,
|
|
1988
2050
|
height: length,
|
|
1989
2051
|
center: point,
|
|
1990
|
-
pcb_component_ids:
|
|
1991
|
-
name:
|
|
1992
|
-
description:
|
|
1993
|
-
layout_mode:
|
|
1994
|
-
autorouter_configuration:
|
|
2052
|
+
pcb_component_ids: z95.array(z95.string()),
|
|
2053
|
+
name: z95.string().optional(),
|
|
2054
|
+
description: z95.string().optional(),
|
|
2055
|
+
layout_mode: z95.string().optional(),
|
|
2056
|
+
autorouter_configuration: z95.object({
|
|
1995
2057
|
trace_clearance: length
|
|
1996
2058
|
}).optional(),
|
|
1997
|
-
autorouter_used_string:
|
|
2059
|
+
autorouter_used_string: z95.string().optional()
|
|
1998
2060
|
}).describe("Defines a group of components on the PCB");
|
|
1999
2061
|
expectTypesMatch(true);
|
|
2000
2062
|
|
|
2001
2063
|
// src/pcb/pcb_autorouting_error.ts
|
|
2002
|
-
import { z as
|
|
2003
|
-
var pcb_autorouting_error =
|
|
2004
|
-
type:
|
|
2064
|
+
import { z as z96 } from "zod";
|
|
2065
|
+
var pcb_autorouting_error = z96.object({
|
|
2066
|
+
type: z96.literal("pcb_autorouting_error"),
|
|
2005
2067
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
2006
|
-
error_type:
|
|
2007
|
-
message:
|
|
2008
|
-
subcircuit_id:
|
|
2068
|
+
error_type: z96.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
2069
|
+
message: z96.string(),
|
|
2070
|
+
subcircuit_id: z96.string().optional()
|
|
2009
2071
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
2010
2072
|
expectTypesMatch(true);
|
|
2011
2073
|
|
|
2012
2074
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
2013
|
-
import { z as
|
|
2014
|
-
var pcb_manual_edit_conflict_warning =
|
|
2015
|
-
type:
|
|
2075
|
+
import { z as z97 } from "zod";
|
|
2076
|
+
var pcb_manual_edit_conflict_warning = z97.object({
|
|
2077
|
+
type: z97.literal("pcb_manual_edit_conflict_warning"),
|
|
2016
2078
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
2017
2079
|
"pcb_manual_edit_conflict_warning"
|
|
2018
2080
|
),
|
|
2019
|
-
warning_type:
|
|
2020
|
-
message:
|
|
2021
|
-
pcb_component_id:
|
|
2022
|
-
pcb_group_id:
|
|
2023
|
-
subcircuit_id:
|
|
2024
|
-
source_component_id:
|
|
2081
|
+
warning_type: z97.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
2082
|
+
message: z97.string(),
|
|
2083
|
+
pcb_component_id: z97.string(),
|
|
2084
|
+
pcb_group_id: z97.string().optional(),
|
|
2085
|
+
subcircuit_id: z97.string().optional(),
|
|
2086
|
+
source_component_id: z97.string()
|
|
2025
2087
|
}).describe(
|
|
2026
2088
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
2027
2089
|
);
|
|
2028
2090
|
expectTypesMatch(true);
|
|
2029
2091
|
|
|
2030
2092
|
// src/pcb/pcb_breakout_point.ts
|
|
2031
|
-
import { z as
|
|
2032
|
-
var pcb_breakout_point =
|
|
2033
|
-
type:
|
|
2093
|
+
import { z as z98 } from "zod";
|
|
2094
|
+
var pcb_breakout_point = z98.object({
|
|
2095
|
+
type: z98.literal("pcb_breakout_point"),
|
|
2034
2096
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
2035
|
-
pcb_group_id:
|
|
2036
|
-
subcircuit_id:
|
|
2037
|
-
source_trace_id:
|
|
2038
|
-
source_port_id:
|
|
2039
|
-
source_net_id:
|
|
2097
|
+
pcb_group_id: z98.string(),
|
|
2098
|
+
subcircuit_id: z98.string().optional(),
|
|
2099
|
+
source_trace_id: z98.string().optional(),
|
|
2100
|
+
source_port_id: z98.string().optional(),
|
|
2101
|
+
source_net_id: z98.string().optional(),
|
|
2040
2102
|
x: distance,
|
|
2041
2103
|
y: distance
|
|
2042
2104
|
}).describe(
|
|
@@ -2045,60 +2107,60 @@ var pcb_breakout_point = z95.object({
|
|
|
2045
2107
|
expectTypesMatch(true);
|
|
2046
2108
|
|
|
2047
2109
|
// src/pcb/pcb_ground_plane.ts
|
|
2048
|
-
import { z as
|
|
2049
|
-
var pcb_ground_plane =
|
|
2050
|
-
type:
|
|
2110
|
+
import { z as z99 } from "zod";
|
|
2111
|
+
var pcb_ground_plane = z99.object({
|
|
2112
|
+
type: z99.literal("pcb_ground_plane"),
|
|
2051
2113
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
2052
|
-
source_pcb_ground_plane_id:
|
|
2053
|
-
source_net_id:
|
|
2054
|
-
pcb_group_id:
|
|
2055
|
-
subcircuit_id:
|
|
2114
|
+
source_pcb_ground_plane_id: z99.string(),
|
|
2115
|
+
source_net_id: z99.string(),
|
|
2116
|
+
pcb_group_id: z99.string().optional(),
|
|
2117
|
+
subcircuit_id: z99.string().optional()
|
|
2056
2118
|
}).describe("Defines a ground plane on the PCB");
|
|
2057
2119
|
expectTypesMatch(true);
|
|
2058
2120
|
|
|
2059
2121
|
// src/pcb/pcb_ground_plane_region.ts
|
|
2060
|
-
import { z as
|
|
2061
|
-
var pcb_ground_plane_region =
|
|
2062
|
-
type:
|
|
2122
|
+
import { z as z100 } from "zod";
|
|
2123
|
+
var pcb_ground_plane_region = z100.object({
|
|
2124
|
+
type: z100.literal("pcb_ground_plane_region"),
|
|
2063
2125
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
2064
2126
|
"pcb_ground_plane_region"
|
|
2065
2127
|
),
|
|
2066
|
-
pcb_ground_plane_id:
|
|
2067
|
-
pcb_group_id:
|
|
2068
|
-
subcircuit_id:
|
|
2128
|
+
pcb_ground_plane_id: z100.string(),
|
|
2129
|
+
pcb_group_id: z100.string().optional(),
|
|
2130
|
+
subcircuit_id: z100.string().optional(),
|
|
2069
2131
|
layer: layer_ref,
|
|
2070
|
-
points:
|
|
2132
|
+
points: z100.array(point)
|
|
2071
2133
|
}).describe("Defines a polygon region of a ground plane");
|
|
2072
2134
|
expectTypesMatch(true);
|
|
2073
2135
|
|
|
2074
2136
|
// src/pcb/pcb_thermal_spoke.ts
|
|
2075
|
-
import { z as
|
|
2076
|
-
var pcb_thermal_spoke =
|
|
2077
|
-
type:
|
|
2137
|
+
import { z as z101 } from "zod";
|
|
2138
|
+
var pcb_thermal_spoke = z101.object({
|
|
2139
|
+
type: z101.literal("pcb_thermal_spoke"),
|
|
2078
2140
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
2079
|
-
pcb_ground_plane_id:
|
|
2080
|
-
shape:
|
|
2081
|
-
spoke_count:
|
|
2141
|
+
pcb_ground_plane_id: z101.string(),
|
|
2142
|
+
shape: z101.string(),
|
|
2143
|
+
spoke_count: z101.number(),
|
|
2082
2144
|
spoke_thickness: distance,
|
|
2083
2145
|
spoke_inner_diameter: distance,
|
|
2084
2146
|
spoke_outer_diameter: distance,
|
|
2085
|
-
pcb_plated_hole_id:
|
|
2086
|
-
subcircuit_id:
|
|
2147
|
+
pcb_plated_hole_id: z101.string().optional(),
|
|
2148
|
+
subcircuit_id: z101.string().optional()
|
|
2087
2149
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
2088
2150
|
expectTypesMatch(true);
|
|
2089
2151
|
|
|
2090
2152
|
// src/pcb/pcb_copper_pour.ts
|
|
2091
|
-
import { z as
|
|
2092
|
-
var pcb_copper_pour_base =
|
|
2093
|
-
type:
|
|
2153
|
+
import { z as z102 } from "zod";
|
|
2154
|
+
var pcb_copper_pour_base = z102.object({
|
|
2155
|
+
type: z102.literal("pcb_copper_pour"),
|
|
2094
2156
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
2095
|
-
pcb_group_id:
|
|
2096
|
-
subcircuit_id:
|
|
2157
|
+
pcb_group_id: z102.string().optional(),
|
|
2158
|
+
subcircuit_id: z102.string().optional(),
|
|
2097
2159
|
layer: layer_ref,
|
|
2098
|
-
source_net_id:
|
|
2160
|
+
source_net_id: z102.string().optional()
|
|
2099
2161
|
});
|
|
2100
2162
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
2101
|
-
shape:
|
|
2163
|
+
shape: z102.literal("rect"),
|
|
2102
2164
|
center: point,
|
|
2103
2165
|
width: length,
|
|
2104
2166
|
height: length,
|
|
@@ -2106,16 +2168,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
2106
2168
|
});
|
|
2107
2169
|
expectTypesMatch(true);
|
|
2108
2170
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
2109
|
-
shape:
|
|
2171
|
+
shape: z102.literal("brep"),
|
|
2110
2172
|
brep_shape
|
|
2111
2173
|
});
|
|
2112
2174
|
expectTypesMatch(true);
|
|
2113
2175
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
2114
|
-
shape:
|
|
2115
|
-
points:
|
|
2176
|
+
shape: z102.literal("polygon"),
|
|
2177
|
+
points: z102.array(point)
|
|
2116
2178
|
});
|
|
2117
2179
|
expectTypesMatch(true);
|
|
2118
|
-
var pcb_copper_pour =
|
|
2180
|
+
var pcb_copper_pour = z102.discriminatedUnion("shape", [
|
|
2119
2181
|
pcb_copper_pour_rect,
|
|
2120
2182
|
pcb_copper_pour_brep,
|
|
2121
2183
|
pcb_copper_pour_polygon
|
|
@@ -2123,60 +2185,60 @@ var pcb_copper_pour = z99.discriminatedUnion("shape", [
|
|
|
2123
2185
|
expectTypesMatch(true);
|
|
2124
2186
|
|
|
2125
2187
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
2126
|
-
import { z as
|
|
2127
|
-
var pcb_component_outside_board_error =
|
|
2128
|
-
type:
|
|
2188
|
+
import { z as z103 } from "zod";
|
|
2189
|
+
var pcb_component_outside_board_error = z103.object({
|
|
2190
|
+
type: z103.literal("pcb_component_outside_board_error"),
|
|
2129
2191
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
2130
2192
|
"pcb_component_outside_board_error"
|
|
2131
2193
|
),
|
|
2132
|
-
error_type:
|
|
2133
|
-
message:
|
|
2134
|
-
pcb_component_id:
|
|
2135
|
-
pcb_board_id:
|
|
2194
|
+
error_type: z103.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
2195
|
+
message: z103.string(),
|
|
2196
|
+
pcb_component_id: z103.string(),
|
|
2197
|
+
pcb_board_id: z103.string(),
|
|
2136
2198
|
component_center: point,
|
|
2137
|
-
component_bounds:
|
|
2138
|
-
min_x:
|
|
2139
|
-
max_x:
|
|
2140
|
-
min_y:
|
|
2141
|
-
max_y:
|
|
2199
|
+
component_bounds: z103.object({
|
|
2200
|
+
min_x: z103.number(),
|
|
2201
|
+
max_x: z103.number(),
|
|
2202
|
+
min_y: z103.number(),
|
|
2203
|
+
max_y: z103.number()
|
|
2142
2204
|
}),
|
|
2143
|
-
subcircuit_id:
|
|
2144
|
-
source_component_id:
|
|
2205
|
+
subcircuit_id: z103.string().optional(),
|
|
2206
|
+
source_component_id: z103.string().optional()
|
|
2145
2207
|
}).describe(
|
|
2146
2208
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
2147
2209
|
);
|
|
2148
2210
|
expectTypesMatch(true);
|
|
2149
2211
|
|
|
2150
2212
|
// src/cad/cad_component.ts
|
|
2151
|
-
import { z as
|
|
2152
|
-
var cad_component =
|
|
2153
|
-
type:
|
|
2154
|
-
cad_component_id:
|
|
2155
|
-
pcb_component_id:
|
|
2156
|
-
source_component_id:
|
|
2213
|
+
import { z as z104 } from "zod";
|
|
2214
|
+
var cad_component = z104.object({
|
|
2215
|
+
type: z104.literal("cad_component"),
|
|
2216
|
+
cad_component_id: z104.string(),
|
|
2217
|
+
pcb_component_id: z104.string(),
|
|
2218
|
+
source_component_id: z104.string(),
|
|
2157
2219
|
position: point3,
|
|
2158
2220
|
rotation: point3.optional(),
|
|
2159
2221
|
size: point3.optional(),
|
|
2160
2222
|
layer: layer_ref.optional(),
|
|
2161
|
-
subcircuit_id:
|
|
2223
|
+
subcircuit_id: z104.string().optional(),
|
|
2162
2224
|
// These are all ways to generate/load the 3d model
|
|
2163
|
-
footprinter_string:
|
|
2164
|
-
model_obj_url:
|
|
2165
|
-
model_stl_url:
|
|
2166
|
-
model_3mf_url:
|
|
2167
|
-
model_gltf_url:
|
|
2168
|
-
model_glb_url:
|
|
2169
|
-
model_step_url:
|
|
2170
|
-
model_wrl_url:
|
|
2171
|
-
model_unit_to_mm_scale_factor:
|
|
2172
|
-
model_jscad:
|
|
2225
|
+
footprinter_string: z104.string().optional(),
|
|
2226
|
+
model_obj_url: z104.string().optional(),
|
|
2227
|
+
model_stl_url: z104.string().optional(),
|
|
2228
|
+
model_3mf_url: z104.string().optional(),
|
|
2229
|
+
model_gltf_url: z104.string().optional(),
|
|
2230
|
+
model_glb_url: z104.string().optional(),
|
|
2231
|
+
model_step_url: z104.string().optional(),
|
|
2232
|
+
model_wrl_url: z104.string().optional(),
|
|
2233
|
+
model_unit_to_mm_scale_factor: z104.number().optional(),
|
|
2234
|
+
model_jscad: z104.any().optional()
|
|
2173
2235
|
}).describe("Defines a component on the PCB");
|
|
2174
2236
|
expectTypesMatch(true);
|
|
2175
2237
|
|
|
2176
2238
|
// src/simulation/simulation_voltage_source.ts
|
|
2177
|
-
import { z as
|
|
2178
|
-
var wave_shape =
|
|
2179
|
-
var percentage =
|
|
2239
|
+
import { z as z105 } from "zod";
|
|
2240
|
+
var wave_shape = z105.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
2241
|
+
var percentage = z105.union([z105.string(), z105.number()]).transform((val) => {
|
|
2180
2242
|
if (typeof val === "string") {
|
|
2181
2243
|
if (val.endsWith("%")) {
|
|
2182
2244
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -2185,30 +2247,30 @@ var percentage = z102.union([z102.string(), z102.number()]).transform((val) => {
|
|
|
2185
2247
|
}
|
|
2186
2248
|
return val;
|
|
2187
2249
|
}).pipe(
|
|
2188
|
-
|
|
2250
|
+
z105.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
2189
2251
|
);
|
|
2190
|
-
var simulation_dc_voltage_source =
|
|
2191
|
-
type:
|
|
2252
|
+
var simulation_dc_voltage_source = z105.object({
|
|
2253
|
+
type: z105.literal("simulation_voltage_source"),
|
|
2192
2254
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2193
2255
|
"simulation_voltage_source"
|
|
2194
2256
|
),
|
|
2195
|
-
is_dc_source:
|
|
2196
|
-
positive_source_port_id:
|
|
2197
|
-
negative_source_port_id:
|
|
2198
|
-
positive_source_net_id:
|
|
2199
|
-
negative_source_net_id:
|
|
2257
|
+
is_dc_source: z105.literal(true).optional().default(true),
|
|
2258
|
+
positive_source_port_id: z105.string().optional(),
|
|
2259
|
+
negative_source_port_id: z105.string().optional(),
|
|
2260
|
+
positive_source_net_id: z105.string().optional(),
|
|
2261
|
+
negative_source_net_id: z105.string().optional(),
|
|
2200
2262
|
voltage
|
|
2201
2263
|
}).describe("Defines a DC voltage source for simulation");
|
|
2202
|
-
var simulation_ac_voltage_source =
|
|
2203
|
-
type:
|
|
2264
|
+
var simulation_ac_voltage_source = z105.object({
|
|
2265
|
+
type: z105.literal("simulation_voltage_source"),
|
|
2204
2266
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2205
2267
|
"simulation_voltage_source"
|
|
2206
2268
|
),
|
|
2207
|
-
is_dc_source:
|
|
2208
|
-
terminal1_source_port_id:
|
|
2209
|
-
terminal2_source_port_id:
|
|
2210
|
-
terminal1_source_net_id:
|
|
2211
|
-
terminal2_source_net_id:
|
|
2269
|
+
is_dc_source: z105.literal(false),
|
|
2270
|
+
terminal1_source_port_id: z105.string().optional(),
|
|
2271
|
+
terminal2_source_port_id: z105.string().optional(),
|
|
2272
|
+
terminal1_source_net_id: z105.string().optional(),
|
|
2273
|
+
terminal2_source_net_id: z105.string().optional(),
|
|
2212
2274
|
voltage: voltage.optional(),
|
|
2213
2275
|
frequency: frequency.optional(),
|
|
2214
2276
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -2216,14 +2278,14 @@ var simulation_ac_voltage_source = z102.object({
|
|
|
2216
2278
|
phase: rotation.optional(),
|
|
2217
2279
|
duty_cycle: percentage.optional()
|
|
2218
2280
|
}).describe("Defines an AC voltage source for simulation");
|
|
2219
|
-
var simulation_voltage_source =
|
|
2281
|
+
var simulation_voltage_source = z105.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
2220
2282
|
expectTypesMatch(true);
|
|
2221
2283
|
expectTypesMatch(true);
|
|
2222
2284
|
expectTypesMatch(true);
|
|
2223
2285
|
|
|
2224
2286
|
// src/any_circuit_element.ts
|
|
2225
|
-
import { z as
|
|
2226
|
-
var any_circuit_element =
|
|
2287
|
+
import { z as z106 } from "zod";
|
|
2288
|
+
var any_circuit_element = z106.union([
|
|
2227
2289
|
source_trace,
|
|
2228
2290
|
source_port,
|
|
2229
2291
|
any_source_component,
|
|
@@ -2292,6 +2354,9 @@ var any_circuit_element = z103.union([
|
|
|
2292
2354
|
schematic_box,
|
|
2293
2355
|
schematic_text,
|
|
2294
2356
|
schematic_line,
|
|
2357
|
+
schematic_rect,
|
|
2358
|
+
schematic_circle,
|
|
2359
|
+
schematic_arc,
|
|
2295
2360
|
schematic_component,
|
|
2296
2361
|
schematic_port,
|
|
2297
2362
|
schematic_trace,
|
|
@@ -2391,7 +2456,9 @@ export {
|
|
|
2391
2456
|
ring,
|
|
2392
2457
|
rotation,
|
|
2393
2458
|
route_hint_point,
|
|
2459
|
+
schematic_arc,
|
|
2394
2460
|
schematic_box,
|
|
2461
|
+
schematic_circle,
|
|
2395
2462
|
schematic_component,
|
|
2396
2463
|
schematic_component_port_arrangement_by_sides,
|
|
2397
2464
|
schematic_component_port_arrangement_by_size,
|
|
@@ -2409,6 +2476,7 @@ export {
|
|
|
2409
2476
|
schematic_path,
|
|
2410
2477
|
schematic_pin_styles,
|
|
2411
2478
|
schematic_port,
|
|
2479
|
+
schematic_rect,
|
|
2412
2480
|
schematic_table,
|
|
2413
2481
|
schematic_table_cell,
|
|
2414
2482
|
schematic_text,
|