circuit-json 0.0.319 → 0.0.320
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 +20 -0
- package/dist/index.d.mts +89 -2
- package/dist/index.mjs +1092 -1073
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -790,223 +790,240 @@ var source_manually_placed_via = z44.object({
|
|
|
790
790
|
}).describe("Defines a via that is manually placed in the source domain");
|
|
791
791
|
expectTypesMatch(true);
|
|
792
792
|
|
|
793
|
-
// src/source/
|
|
793
|
+
// src/source/source_pin_must_be_connected_error.ts
|
|
794
794
|
import { z as z45 } from "zod";
|
|
795
|
-
var
|
|
796
|
-
type: z45.literal("
|
|
797
|
-
|
|
798
|
-
"
|
|
795
|
+
var source_pin_must_be_connected_error = z45.object({
|
|
796
|
+
type: z45.literal("source_pin_must_be_connected_error"),
|
|
797
|
+
source_pin_must_be_connected_error_id: getZodPrefixedIdWithDefault(
|
|
798
|
+
"source_pin_must_be_connected_error"
|
|
799
799
|
),
|
|
800
|
-
error_type: z45.literal("
|
|
800
|
+
error_type: z45.literal("source_pin_must_be_connected_error").default("source_pin_must_be_connected_error"),
|
|
801
801
|
message: z45.string(),
|
|
802
|
-
source_component_id: z45.string()
|
|
802
|
+
source_component_id: z45.string(),
|
|
803
|
+
source_port_id: z45.string(),
|
|
803
804
|
subcircuit_id: z45.string().optional()
|
|
805
|
+
}).describe(
|
|
806
|
+
"Error emitted when a pin with mustBeConnected attribute is not connected to any trace"
|
|
807
|
+
);
|
|
808
|
+
expectTypesMatch(true);
|
|
809
|
+
|
|
810
|
+
// src/source/unknown_error_finding_part.ts
|
|
811
|
+
import { z as z46 } from "zod";
|
|
812
|
+
var unknown_error_finding_part = z46.object({
|
|
813
|
+
type: z46.literal("unknown_error_finding_part"),
|
|
814
|
+
unknown_error_finding_part_id: getZodPrefixedIdWithDefault(
|
|
815
|
+
"unknown_error_finding_part"
|
|
816
|
+
),
|
|
817
|
+
error_type: z46.literal("unknown_error_finding_part").default("unknown_error_finding_part"),
|
|
818
|
+
message: z46.string(),
|
|
819
|
+
source_component_id: z46.string().optional(),
|
|
820
|
+
subcircuit_id: z46.string().optional()
|
|
804
821
|
}).describe(
|
|
805
822
|
"Error emitted when an unexpected error occurs while finding a part"
|
|
806
823
|
);
|
|
807
824
|
expectTypesMatch(true);
|
|
808
825
|
|
|
809
826
|
// src/schematic/schematic_box.ts
|
|
810
|
-
import { z as
|
|
811
|
-
var schematic_box =
|
|
812
|
-
type:
|
|
813
|
-
schematic_component_id:
|
|
827
|
+
import { z as z47 } from "zod";
|
|
828
|
+
var schematic_box = z47.object({
|
|
829
|
+
type: z47.literal("schematic_box"),
|
|
830
|
+
schematic_component_id: z47.string().optional(),
|
|
814
831
|
width: distance,
|
|
815
832
|
height: distance,
|
|
816
|
-
is_dashed:
|
|
833
|
+
is_dashed: z47.boolean().default(false),
|
|
817
834
|
x: distance,
|
|
818
835
|
y: distance,
|
|
819
|
-
subcircuit_id:
|
|
836
|
+
subcircuit_id: z47.string().optional()
|
|
820
837
|
}).describe("Draws a box on the schematic");
|
|
821
838
|
expectTypesMatch(true);
|
|
822
839
|
|
|
823
840
|
// src/schematic/schematic_path.ts
|
|
824
|
-
import { z as
|
|
825
|
-
var schematic_path =
|
|
826
|
-
type:
|
|
827
|
-
schematic_component_id:
|
|
828
|
-
fill_color:
|
|
829
|
-
is_filled:
|
|
830
|
-
points:
|
|
831
|
-
subcircuit_id:
|
|
841
|
+
import { z as z48 } from "zod";
|
|
842
|
+
var schematic_path = z48.object({
|
|
843
|
+
type: z48.literal("schematic_path"),
|
|
844
|
+
schematic_component_id: z48.string(),
|
|
845
|
+
fill_color: z48.enum(["red", "blue"]).optional(),
|
|
846
|
+
is_filled: z48.boolean().optional(),
|
|
847
|
+
points: z48.array(point),
|
|
848
|
+
subcircuit_id: z48.string().optional()
|
|
832
849
|
});
|
|
833
850
|
expectTypesMatch(true);
|
|
834
851
|
|
|
835
852
|
// src/schematic/schematic_component.ts
|
|
836
|
-
import { z as
|
|
837
|
-
var schematic_pin_styles =
|
|
838
|
-
|
|
853
|
+
import { z as z49 } from "zod";
|
|
854
|
+
var schematic_pin_styles = z49.record(
|
|
855
|
+
z49.object({
|
|
839
856
|
left_margin: length.optional(),
|
|
840
857
|
right_margin: length.optional(),
|
|
841
858
|
top_margin: length.optional(),
|
|
842
859
|
bottom_margin: length.optional()
|
|
843
860
|
})
|
|
844
861
|
);
|
|
845
|
-
var schematic_component_port_arrangement_by_size =
|
|
846
|
-
left_size:
|
|
847
|
-
right_size:
|
|
848
|
-
top_size:
|
|
849
|
-
bottom_size:
|
|
862
|
+
var schematic_component_port_arrangement_by_size = z49.object({
|
|
863
|
+
left_size: z49.number(),
|
|
864
|
+
right_size: z49.number(),
|
|
865
|
+
top_size: z49.number().optional(),
|
|
866
|
+
bottom_size: z49.number().optional()
|
|
850
867
|
});
|
|
851
868
|
expectTypesMatch(true);
|
|
852
|
-
var schematic_component_port_arrangement_by_sides =
|
|
853
|
-
left_side:
|
|
854
|
-
pins:
|
|
869
|
+
var schematic_component_port_arrangement_by_sides = z49.object({
|
|
870
|
+
left_side: z49.object({
|
|
871
|
+
pins: z49.array(z49.number()),
|
|
855
872
|
// @ts-ignore
|
|
856
|
-
direction:
|
|
873
|
+
direction: z49.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
857
874
|
}).optional(),
|
|
858
|
-
right_side:
|
|
859
|
-
pins:
|
|
875
|
+
right_side: z49.object({
|
|
876
|
+
pins: z49.array(z49.number()),
|
|
860
877
|
// @ts-ignore
|
|
861
|
-
direction:
|
|
878
|
+
direction: z49.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
862
879
|
}).optional(),
|
|
863
|
-
top_side:
|
|
864
|
-
pins:
|
|
880
|
+
top_side: z49.object({
|
|
881
|
+
pins: z49.array(z49.number()),
|
|
865
882
|
// @ts-ignore
|
|
866
|
-
direction:
|
|
883
|
+
direction: z49.enum(["left-to-right", "right-to-left"]).optional()
|
|
867
884
|
}).optional(),
|
|
868
|
-
bottom_side:
|
|
869
|
-
pins:
|
|
885
|
+
bottom_side: z49.object({
|
|
886
|
+
pins: z49.array(z49.number()),
|
|
870
887
|
// @ts-ignore
|
|
871
|
-
direction:
|
|
888
|
+
direction: z49.enum(["left-to-right", "right-to-left"]).optional()
|
|
872
889
|
}).optional()
|
|
873
890
|
});
|
|
874
891
|
expectTypesMatch(true);
|
|
875
|
-
var port_arrangement =
|
|
892
|
+
var port_arrangement = z49.union([
|
|
876
893
|
schematic_component_port_arrangement_by_size,
|
|
877
894
|
schematic_component_port_arrangement_by_sides
|
|
878
895
|
]);
|
|
879
|
-
var schematic_component =
|
|
880
|
-
type:
|
|
896
|
+
var schematic_component = z49.object({
|
|
897
|
+
type: z49.literal("schematic_component"),
|
|
881
898
|
size,
|
|
882
899
|
center: point,
|
|
883
|
-
source_component_id:
|
|
884
|
-
schematic_component_id:
|
|
900
|
+
source_component_id: z49.string().optional(),
|
|
901
|
+
schematic_component_id: z49.string(),
|
|
885
902
|
pin_spacing: length.optional(),
|
|
886
903
|
pin_styles: schematic_pin_styles.optional(),
|
|
887
904
|
box_width: length.optional(),
|
|
888
|
-
symbol_name:
|
|
905
|
+
symbol_name: z49.string().optional(),
|
|
889
906
|
port_arrangement: port_arrangement.optional(),
|
|
890
|
-
port_labels:
|
|
891
|
-
symbol_display_value:
|
|
892
|
-
subcircuit_id:
|
|
893
|
-
schematic_group_id:
|
|
894
|
-
is_schematic_group:
|
|
895
|
-
source_group_id:
|
|
896
|
-
is_box_with_pins:
|
|
907
|
+
port_labels: z49.record(z49.string()).optional(),
|
|
908
|
+
symbol_display_value: z49.string().optional(),
|
|
909
|
+
subcircuit_id: z49.string().optional(),
|
|
910
|
+
schematic_group_id: z49.string().optional(),
|
|
911
|
+
is_schematic_group: z49.boolean().optional(),
|
|
912
|
+
source_group_id: z49.string().optional(),
|
|
913
|
+
is_box_with_pins: z49.boolean().optional().default(true)
|
|
897
914
|
});
|
|
898
915
|
expectTypesMatch(true);
|
|
899
916
|
|
|
900
917
|
// src/schematic/schematic_line.ts
|
|
901
|
-
import { z as
|
|
902
|
-
var schematic_line =
|
|
903
|
-
type:
|
|
918
|
+
import { z as z50 } from "zod";
|
|
919
|
+
var schematic_line = z50.object({
|
|
920
|
+
type: z50.literal("schematic_line"),
|
|
904
921
|
schematic_line_id: getZodPrefixedIdWithDefault("schematic_line"),
|
|
905
|
-
schematic_component_id:
|
|
922
|
+
schematic_component_id: z50.string(),
|
|
906
923
|
x1: distance,
|
|
907
924
|
y1: distance,
|
|
908
925
|
x2: distance,
|
|
909
926
|
y2: distance,
|
|
910
927
|
stroke_width: distance.nullable().optional(),
|
|
911
|
-
color:
|
|
912
|
-
is_dashed:
|
|
913
|
-
subcircuit_id:
|
|
928
|
+
color: z50.string().default("#000000"),
|
|
929
|
+
is_dashed: z50.boolean().default(false),
|
|
930
|
+
subcircuit_id: z50.string().optional()
|
|
914
931
|
}).describe("Draws a styled line on the schematic");
|
|
915
932
|
expectTypesMatch(true);
|
|
916
933
|
|
|
917
934
|
// src/schematic/schematic_rect.ts
|
|
918
|
-
import { z as
|
|
919
|
-
var schematic_rect =
|
|
920
|
-
type:
|
|
935
|
+
import { z as z51 } from "zod";
|
|
936
|
+
var schematic_rect = z51.object({
|
|
937
|
+
type: z51.literal("schematic_rect"),
|
|
921
938
|
schematic_rect_id: getZodPrefixedIdWithDefault("schematic_rect"),
|
|
922
|
-
schematic_component_id:
|
|
939
|
+
schematic_component_id: z51.string(),
|
|
923
940
|
center: point,
|
|
924
941
|
width: distance,
|
|
925
942
|
height: distance,
|
|
926
943
|
rotation: rotation.default(0),
|
|
927
944
|
stroke_width: distance.nullable().optional(),
|
|
928
|
-
color:
|
|
929
|
-
is_filled:
|
|
930
|
-
fill_color:
|
|
931
|
-
is_dashed:
|
|
932
|
-
subcircuit_id:
|
|
945
|
+
color: z51.string().default("#000000"),
|
|
946
|
+
is_filled: z51.boolean().default(false),
|
|
947
|
+
fill_color: z51.string().optional(),
|
|
948
|
+
is_dashed: z51.boolean().default(false),
|
|
949
|
+
subcircuit_id: z51.string().optional()
|
|
933
950
|
}).describe("Draws a styled rectangle on the schematic");
|
|
934
951
|
expectTypesMatch(true);
|
|
935
952
|
|
|
936
953
|
// src/schematic/schematic_circle.ts
|
|
937
|
-
import { z as
|
|
938
|
-
var schematic_circle =
|
|
939
|
-
type:
|
|
954
|
+
import { z as z52 } from "zod";
|
|
955
|
+
var schematic_circle = z52.object({
|
|
956
|
+
type: z52.literal("schematic_circle"),
|
|
940
957
|
schematic_circle_id: getZodPrefixedIdWithDefault("schematic_circle"),
|
|
941
|
-
schematic_component_id:
|
|
958
|
+
schematic_component_id: z52.string(),
|
|
942
959
|
center: point,
|
|
943
960
|
radius: distance,
|
|
944
961
|
stroke_width: distance.nullable().optional(),
|
|
945
|
-
color:
|
|
946
|
-
is_filled:
|
|
947
|
-
fill_color:
|
|
948
|
-
is_dashed:
|
|
949
|
-
subcircuit_id:
|
|
962
|
+
color: z52.string().default("#000000"),
|
|
963
|
+
is_filled: z52.boolean().default(false),
|
|
964
|
+
fill_color: z52.string().optional(),
|
|
965
|
+
is_dashed: z52.boolean().default(false),
|
|
966
|
+
subcircuit_id: z52.string().optional()
|
|
950
967
|
}).describe("Draws a styled circle on the schematic");
|
|
951
968
|
expectTypesMatch(true);
|
|
952
969
|
|
|
953
970
|
// src/schematic/schematic_arc.ts
|
|
954
|
-
import { z as
|
|
955
|
-
var schematic_arc =
|
|
956
|
-
type:
|
|
971
|
+
import { z as z53 } from "zod";
|
|
972
|
+
var schematic_arc = z53.object({
|
|
973
|
+
type: z53.literal("schematic_arc"),
|
|
957
974
|
schematic_arc_id: getZodPrefixedIdWithDefault("schematic_arc"),
|
|
958
|
-
schematic_component_id:
|
|
975
|
+
schematic_component_id: z53.string(),
|
|
959
976
|
center: point,
|
|
960
977
|
radius: distance,
|
|
961
978
|
start_angle_degrees: rotation,
|
|
962
979
|
end_angle_degrees: rotation,
|
|
963
|
-
direction:
|
|
980
|
+
direction: z53.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
964
981
|
stroke_width: distance.nullable().optional(),
|
|
965
|
-
color:
|
|
966
|
-
is_dashed:
|
|
967
|
-
subcircuit_id:
|
|
982
|
+
color: z53.string().default("#000000"),
|
|
983
|
+
is_dashed: z53.boolean().default(false),
|
|
984
|
+
subcircuit_id: z53.string().optional()
|
|
968
985
|
}).describe("Draws a styled arc on the schematic");
|
|
969
986
|
expectTypesMatch(true);
|
|
970
987
|
|
|
971
988
|
// src/schematic/schematic_trace.ts
|
|
972
|
-
import { z as
|
|
973
|
-
var schematic_trace =
|
|
974
|
-
type:
|
|
975
|
-
schematic_trace_id:
|
|
976
|
-
source_trace_id:
|
|
977
|
-
junctions:
|
|
978
|
-
|
|
979
|
-
x:
|
|
980
|
-
y:
|
|
989
|
+
import { z as z54 } from "zod";
|
|
990
|
+
var schematic_trace = z54.object({
|
|
991
|
+
type: z54.literal("schematic_trace"),
|
|
992
|
+
schematic_trace_id: z54.string(),
|
|
993
|
+
source_trace_id: z54.string().optional(),
|
|
994
|
+
junctions: z54.array(
|
|
995
|
+
z54.object({
|
|
996
|
+
x: z54.number(),
|
|
997
|
+
y: z54.number()
|
|
981
998
|
})
|
|
982
999
|
),
|
|
983
|
-
edges:
|
|
984
|
-
|
|
985
|
-
from:
|
|
986
|
-
x:
|
|
987
|
-
y:
|
|
1000
|
+
edges: z54.array(
|
|
1001
|
+
z54.object({
|
|
1002
|
+
from: z54.object({
|
|
1003
|
+
x: z54.number(),
|
|
1004
|
+
y: z54.number()
|
|
988
1005
|
}),
|
|
989
|
-
to:
|
|
990
|
-
x:
|
|
991
|
-
y:
|
|
1006
|
+
to: z54.object({
|
|
1007
|
+
x: z54.number(),
|
|
1008
|
+
y: z54.number()
|
|
992
1009
|
}),
|
|
993
|
-
is_crossing:
|
|
994
|
-
from_schematic_port_id:
|
|
995
|
-
to_schematic_port_id:
|
|
1010
|
+
is_crossing: z54.boolean().optional(),
|
|
1011
|
+
from_schematic_port_id: z54.string().optional(),
|
|
1012
|
+
to_schematic_port_id: z54.string().optional()
|
|
996
1013
|
})
|
|
997
1014
|
),
|
|
998
|
-
subcircuit_id:
|
|
1015
|
+
subcircuit_id: z54.string().optional(),
|
|
999
1016
|
// TODO: make required in a future release
|
|
1000
|
-
subcircuit_connectivity_map_key:
|
|
1017
|
+
subcircuit_connectivity_map_key: z54.string().optional()
|
|
1001
1018
|
});
|
|
1002
1019
|
expectTypesMatch(true);
|
|
1003
1020
|
|
|
1004
1021
|
// src/schematic/schematic_text.ts
|
|
1005
|
-
import { z as
|
|
1022
|
+
import { z as z56 } from "zod";
|
|
1006
1023
|
|
|
1007
1024
|
// src/common/FivePointAnchor.ts
|
|
1008
|
-
import { z as
|
|
1009
|
-
var fivePointAnchor =
|
|
1025
|
+
import { z as z55 } from "zod";
|
|
1026
|
+
var fivePointAnchor = z55.enum([
|
|
1010
1027
|
"center",
|
|
1011
1028
|
"left",
|
|
1012
1029
|
"right",
|
|
@@ -1016,111 +1033,111 @@ var fivePointAnchor = z54.enum([
|
|
|
1016
1033
|
expectTypesMatch(true);
|
|
1017
1034
|
|
|
1018
1035
|
// src/schematic/schematic_text.ts
|
|
1019
|
-
var schematic_text =
|
|
1020
|
-
type:
|
|
1021
|
-
schematic_component_id:
|
|
1022
|
-
schematic_text_id:
|
|
1023
|
-
text:
|
|
1024
|
-
font_size:
|
|
1025
|
-
position:
|
|
1036
|
+
var schematic_text = z56.object({
|
|
1037
|
+
type: z56.literal("schematic_text"),
|
|
1038
|
+
schematic_component_id: z56.string().optional(),
|
|
1039
|
+
schematic_text_id: z56.string(),
|
|
1040
|
+
text: z56.string(),
|
|
1041
|
+
font_size: z56.number().default(0.18),
|
|
1042
|
+
position: z56.object({
|
|
1026
1043
|
x: distance,
|
|
1027
1044
|
y: distance
|
|
1028
1045
|
}),
|
|
1029
|
-
rotation:
|
|
1030
|
-
anchor:
|
|
1031
|
-
color:
|
|
1032
|
-
subcircuit_id:
|
|
1046
|
+
rotation: z56.number().default(0),
|
|
1047
|
+
anchor: z56.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
1048
|
+
color: z56.string().default("#000000"),
|
|
1049
|
+
subcircuit_id: z56.string().optional()
|
|
1033
1050
|
});
|
|
1034
1051
|
expectTypesMatch(true);
|
|
1035
1052
|
|
|
1036
1053
|
// src/schematic/schematic_port.ts
|
|
1037
|
-
import { z as
|
|
1038
|
-
var schematic_port =
|
|
1039
|
-
type:
|
|
1040
|
-
schematic_port_id:
|
|
1041
|
-
source_port_id:
|
|
1042
|
-
schematic_component_id:
|
|
1054
|
+
import { z as z57 } from "zod";
|
|
1055
|
+
var schematic_port = z57.object({
|
|
1056
|
+
type: z57.literal("schematic_port"),
|
|
1057
|
+
schematic_port_id: z57.string(),
|
|
1058
|
+
source_port_id: z57.string(),
|
|
1059
|
+
schematic_component_id: z57.string().optional(),
|
|
1043
1060
|
center: point,
|
|
1044
|
-
facing_direction:
|
|
1045
|
-
distance_from_component_edge:
|
|
1046
|
-
side_of_component:
|
|
1047
|
-
true_ccw_index:
|
|
1048
|
-
pin_number:
|
|
1049
|
-
display_pin_label:
|
|
1050
|
-
subcircuit_id:
|
|
1051
|
-
is_connected:
|
|
1052
|
-
has_input_arrow:
|
|
1053
|
-
has_output_arrow:
|
|
1061
|
+
facing_direction: z57.enum(["up", "down", "left", "right"]).optional(),
|
|
1062
|
+
distance_from_component_edge: z57.number().optional(),
|
|
1063
|
+
side_of_component: z57.enum(["top", "bottom", "left", "right"]).optional(),
|
|
1064
|
+
true_ccw_index: z57.number().optional(),
|
|
1065
|
+
pin_number: z57.number().optional(),
|
|
1066
|
+
display_pin_label: z57.string().optional(),
|
|
1067
|
+
subcircuit_id: z57.string().optional(),
|
|
1068
|
+
is_connected: z57.boolean().optional(),
|
|
1069
|
+
has_input_arrow: z57.boolean().optional(),
|
|
1070
|
+
has_output_arrow: z57.boolean().optional()
|
|
1054
1071
|
}).describe("Defines a port on a schematic component");
|
|
1055
1072
|
expectTypesMatch(true);
|
|
1056
1073
|
|
|
1057
1074
|
// src/schematic/schematic_net_label.ts
|
|
1058
|
-
import { z as
|
|
1059
|
-
var schematic_net_label =
|
|
1060
|
-
type:
|
|
1075
|
+
import { z as z58 } from "zod";
|
|
1076
|
+
var schematic_net_label = z58.object({
|
|
1077
|
+
type: z58.literal("schematic_net_label"),
|
|
1061
1078
|
schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
|
|
1062
|
-
schematic_trace_id:
|
|
1063
|
-
source_trace_id:
|
|
1064
|
-
source_net_id:
|
|
1079
|
+
schematic_trace_id: z58.string().optional(),
|
|
1080
|
+
source_trace_id: z58.string().optional(),
|
|
1081
|
+
source_net_id: z58.string(),
|
|
1065
1082
|
center: point,
|
|
1066
1083
|
anchor_position: point.optional(),
|
|
1067
|
-
anchor_side:
|
|
1068
|
-
text:
|
|
1069
|
-
symbol_name:
|
|
1070
|
-
is_movable:
|
|
1071
|
-
subcircuit_id:
|
|
1084
|
+
anchor_side: z58.enum(["top", "bottom", "left", "right"]),
|
|
1085
|
+
text: z58.string(),
|
|
1086
|
+
symbol_name: z58.string().optional(),
|
|
1087
|
+
is_movable: z58.boolean().optional(),
|
|
1088
|
+
subcircuit_id: z58.string().optional()
|
|
1072
1089
|
});
|
|
1073
1090
|
expectTypesMatch(true);
|
|
1074
1091
|
|
|
1075
1092
|
// src/schematic/schematic_error.ts
|
|
1076
|
-
import { z as
|
|
1077
|
-
var schematic_error =
|
|
1078
|
-
type:
|
|
1079
|
-
schematic_error_id:
|
|
1093
|
+
import { z as z59 } from "zod";
|
|
1094
|
+
var schematic_error = z59.object({
|
|
1095
|
+
type: z59.literal("schematic_error"),
|
|
1096
|
+
schematic_error_id: z59.string(),
|
|
1080
1097
|
// eventually each error type should be broken out into a dir of files
|
|
1081
|
-
error_type:
|
|
1082
|
-
message:
|
|
1083
|
-
subcircuit_id:
|
|
1098
|
+
error_type: z59.literal("schematic_port_not_found").default("schematic_port_not_found"),
|
|
1099
|
+
message: z59.string(),
|
|
1100
|
+
subcircuit_id: z59.string().optional()
|
|
1084
1101
|
}).describe("Defines a schematic error on the schematic");
|
|
1085
1102
|
expectTypesMatch(true);
|
|
1086
1103
|
|
|
1087
1104
|
// src/schematic/schematic_layout_error.ts
|
|
1088
|
-
import { z as
|
|
1089
|
-
var schematic_layout_error =
|
|
1090
|
-
type:
|
|
1105
|
+
import { z as z60 } from "zod";
|
|
1106
|
+
var schematic_layout_error = z60.object({
|
|
1107
|
+
type: z60.literal("schematic_layout_error"),
|
|
1091
1108
|
schematic_layout_error_id: getZodPrefixedIdWithDefault(
|
|
1092
1109
|
"schematic_layout_error"
|
|
1093
1110
|
),
|
|
1094
|
-
error_type:
|
|
1095
|
-
message:
|
|
1096
|
-
source_group_id:
|
|
1097
|
-
schematic_group_id:
|
|
1098
|
-
subcircuit_id:
|
|
1111
|
+
error_type: z60.literal("schematic_layout_error").default("schematic_layout_error"),
|
|
1112
|
+
message: z60.string(),
|
|
1113
|
+
source_group_id: z60.string(),
|
|
1114
|
+
schematic_group_id: z60.string(),
|
|
1115
|
+
subcircuit_id: z60.string().optional()
|
|
1099
1116
|
}).describe("Error emitted when schematic layout fails for a group");
|
|
1100
1117
|
expectTypesMatch(true);
|
|
1101
1118
|
|
|
1102
1119
|
// src/schematic/schematic_debug_object.ts
|
|
1103
|
-
import { z as
|
|
1104
|
-
var schematic_debug_object_base =
|
|
1105
|
-
type:
|
|
1106
|
-
label:
|
|
1107
|
-
subcircuit_id:
|
|
1120
|
+
import { z as z61 } from "zod";
|
|
1121
|
+
var schematic_debug_object_base = z61.object({
|
|
1122
|
+
type: z61.literal("schematic_debug_object"),
|
|
1123
|
+
label: z61.string().optional(),
|
|
1124
|
+
subcircuit_id: z61.string().optional()
|
|
1108
1125
|
});
|
|
1109
1126
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
1110
|
-
shape:
|
|
1127
|
+
shape: z61.literal("rect"),
|
|
1111
1128
|
center: point,
|
|
1112
1129
|
size
|
|
1113
1130
|
});
|
|
1114
1131
|
var schematic_debug_line = schematic_debug_object_base.extend({
|
|
1115
|
-
shape:
|
|
1132
|
+
shape: z61.literal("line"),
|
|
1116
1133
|
start: point,
|
|
1117
1134
|
end: point
|
|
1118
1135
|
});
|
|
1119
1136
|
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
1120
|
-
shape:
|
|
1137
|
+
shape: z61.literal("point"),
|
|
1121
1138
|
center: point
|
|
1122
1139
|
});
|
|
1123
|
-
var schematic_debug_object =
|
|
1140
|
+
var schematic_debug_object = z61.discriminatedUnion("shape", [
|
|
1124
1141
|
schematic_debug_rect,
|
|
1125
1142
|
schematic_debug_line,
|
|
1126
1143
|
schematic_debug_point
|
|
@@ -1128,268 +1145,268 @@ var schematic_debug_object = z60.discriminatedUnion("shape", [
|
|
|
1128
1145
|
expectTypesMatch(true);
|
|
1129
1146
|
|
|
1130
1147
|
// src/schematic/schematic_voltage_probe.ts
|
|
1131
|
-
import { z as
|
|
1132
|
-
var schematic_voltage_probe =
|
|
1133
|
-
type:
|
|
1134
|
-
schematic_voltage_probe_id:
|
|
1135
|
-
source_component_id:
|
|
1136
|
-
name:
|
|
1148
|
+
import { z as z62 } from "zod";
|
|
1149
|
+
var schematic_voltage_probe = z62.object({
|
|
1150
|
+
type: z62.literal("schematic_voltage_probe"),
|
|
1151
|
+
schematic_voltage_probe_id: z62.string(),
|
|
1152
|
+
source_component_id: z62.string().optional(),
|
|
1153
|
+
name: z62.string().optional(),
|
|
1137
1154
|
position: point,
|
|
1138
|
-
schematic_trace_id:
|
|
1155
|
+
schematic_trace_id: z62.string(),
|
|
1139
1156
|
voltage: voltage.optional(),
|
|
1140
|
-
subcircuit_id:
|
|
1141
|
-
color:
|
|
1157
|
+
subcircuit_id: z62.string().optional(),
|
|
1158
|
+
color: z62.string().optional()
|
|
1142
1159
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
1143
1160
|
expectTypesMatch(true);
|
|
1144
1161
|
|
|
1145
1162
|
// src/schematic/schematic_manual_edit_conflict_warning.ts
|
|
1146
|
-
import { z as
|
|
1147
|
-
var schematic_manual_edit_conflict_warning =
|
|
1148
|
-
type:
|
|
1163
|
+
import { z as z63 } from "zod";
|
|
1164
|
+
var schematic_manual_edit_conflict_warning = z63.object({
|
|
1165
|
+
type: z63.literal("schematic_manual_edit_conflict_warning"),
|
|
1149
1166
|
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1150
1167
|
"schematic_manual_edit_conflict_warning"
|
|
1151
1168
|
),
|
|
1152
|
-
warning_type:
|
|
1153
|
-
message:
|
|
1154
|
-
schematic_component_id:
|
|
1155
|
-
schematic_group_id:
|
|
1156
|
-
subcircuit_id:
|
|
1157
|
-
source_component_id:
|
|
1169
|
+
warning_type: z63.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),
|
|
1170
|
+
message: z63.string(),
|
|
1171
|
+
schematic_component_id: z63.string(),
|
|
1172
|
+
schematic_group_id: z63.string().optional(),
|
|
1173
|
+
subcircuit_id: z63.string().optional(),
|
|
1174
|
+
source_component_id: z63.string()
|
|
1158
1175
|
}).describe(
|
|
1159
1176
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
1160
1177
|
);
|
|
1161
1178
|
expectTypesMatch(true);
|
|
1162
1179
|
|
|
1163
1180
|
// src/schematic/schematic_group.ts
|
|
1164
|
-
import { z as
|
|
1165
|
-
var schematic_group =
|
|
1166
|
-
type:
|
|
1181
|
+
import { z as z64 } from "zod";
|
|
1182
|
+
var schematic_group = z64.object({
|
|
1183
|
+
type: z64.literal("schematic_group"),
|
|
1167
1184
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
1168
|
-
source_group_id:
|
|
1169
|
-
is_subcircuit:
|
|
1170
|
-
subcircuit_id:
|
|
1185
|
+
source_group_id: z64.string(),
|
|
1186
|
+
is_subcircuit: z64.boolean().optional(),
|
|
1187
|
+
subcircuit_id: z64.string().optional(),
|
|
1171
1188
|
width: length,
|
|
1172
1189
|
height: length,
|
|
1173
1190
|
center: point,
|
|
1174
|
-
schematic_component_ids:
|
|
1175
|
-
show_as_schematic_box:
|
|
1176
|
-
name:
|
|
1177
|
-
description:
|
|
1191
|
+
schematic_component_ids: z64.array(z64.string()),
|
|
1192
|
+
show_as_schematic_box: z64.boolean().optional(),
|
|
1193
|
+
name: z64.string().optional(),
|
|
1194
|
+
description: z64.string().optional()
|
|
1178
1195
|
}).describe("Defines a group of components on the schematic");
|
|
1179
1196
|
expectTypesMatch(true);
|
|
1180
1197
|
|
|
1181
1198
|
// src/schematic/schematic_table.ts
|
|
1182
|
-
import { z as
|
|
1183
|
-
var schematic_table =
|
|
1184
|
-
type:
|
|
1199
|
+
import { z as z65 } from "zod";
|
|
1200
|
+
var schematic_table = z65.object({
|
|
1201
|
+
type: z65.literal("schematic_table"),
|
|
1185
1202
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
1186
1203
|
anchor_position: point,
|
|
1187
|
-
column_widths:
|
|
1188
|
-
row_heights:
|
|
1204
|
+
column_widths: z65.array(distance),
|
|
1205
|
+
row_heights: z65.array(distance),
|
|
1189
1206
|
cell_padding: distance.optional(),
|
|
1190
1207
|
border_width: distance.optional(),
|
|
1191
|
-
subcircuit_id:
|
|
1192
|
-
schematic_component_id:
|
|
1208
|
+
subcircuit_id: z65.string().optional(),
|
|
1209
|
+
schematic_component_id: z65.string().optional(),
|
|
1193
1210
|
anchor: ninePointAnchor.optional()
|
|
1194
1211
|
}).describe("Defines a table on the schematic");
|
|
1195
1212
|
expectTypesMatch(true);
|
|
1196
1213
|
|
|
1197
1214
|
// src/schematic/schematic_table_cell.ts
|
|
1198
|
-
import { z as
|
|
1199
|
-
var schematic_table_cell =
|
|
1200
|
-
type:
|
|
1215
|
+
import { z as z66 } from "zod";
|
|
1216
|
+
var schematic_table_cell = z66.object({
|
|
1217
|
+
type: z66.literal("schematic_table_cell"),
|
|
1201
1218
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
1202
1219
|
"schematic_table_cell"
|
|
1203
1220
|
),
|
|
1204
|
-
schematic_table_id:
|
|
1205
|
-
start_row_index:
|
|
1206
|
-
end_row_index:
|
|
1207
|
-
start_column_index:
|
|
1208
|
-
end_column_index:
|
|
1209
|
-
text:
|
|
1221
|
+
schematic_table_id: z66.string(),
|
|
1222
|
+
start_row_index: z66.number(),
|
|
1223
|
+
end_row_index: z66.number(),
|
|
1224
|
+
start_column_index: z66.number(),
|
|
1225
|
+
end_column_index: z66.number(),
|
|
1226
|
+
text: z66.string().optional(),
|
|
1210
1227
|
center: point,
|
|
1211
1228
|
width: distance,
|
|
1212
1229
|
height: distance,
|
|
1213
|
-
horizontal_align:
|
|
1214
|
-
vertical_align:
|
|
1230
|
+
horizontal_align: z66.enum(["left", "center", "right"]).optional(),
|
|
1231
|
+
vertical_align: z66.enum(["top", "middle", "bottom"]).optional(),
|
|
1215
1232
|
font_size: distance.optional(),
|
|
1216
|
-
subcircuit_id:
|
|
1233
|
+
subcircuit_id: z66.string().optional()
|
|
1217
1234
|
}).describe("Defines a cell within a schematic_table");
|
|
1218
1235
|
expectTypesMatch(true);
|
|
1219
1236
|
|
|
1220
1237
|
// src/schematic/schematic_sheet.ts
|
|
1221
|
-
import { z as
|
|
1222
|
-
var schematic_sheet =
|
|
1223
|
-
type:
|
|
1238
|
+
import { z as z67 } from "zod";
|
|
1239
|
+
var schematic_sheet = z67.object({
|
|
1240
|
+
type: z67.literal("schematic_sheet"),
|
|
1224
1241
|
schematic_sheet_id: getZodPrefixedIdWithDefault("schematic_sheet"),
|
|
1225
|
-
name:
|
|
1226
|
-
subcircuit_id:
|
|
1242
|
+
name: z67.string().optional(),
|
|
1243
|
+
subcircuit_id: z67.string().optional()
|
|
1227
1244
|
}).describe(
|
|
1228
1245
|
"Defines a schematic sheet or page that components can be placed on"
|
|
1229
1246
|
);
|
|
1230
1247
|
expectTypesMatch(true);
|
|
1231
1248
|
|
|
1232
1249
|
// src/pcb/properties/brep.ts
|
|
1233
|
-
import { z as
|
|
1234
|
-
var point_with_bulge =
|
|
1250
|
+
import { z as z68 } from "zod";
|
|
1251
|
+
var point_with_bulge = z68.object({
|
|
1235
1252
|
x: distance,
|
|
1236
1253
|
y: distance,
|
|
1237
|
-
bulge:
|
|
1254
|
+
bulge: z68.number().optional()
|
|
1238
1255
|
});
|
|
1239
1256
|
expectTypesMatch(true);
|
|
1240
|
-
var ring =
|
|
1241
|
-
vertices:
|
|
1257
|
+
var ring = z68.object({
|
|
1258
|
+
vertices: z68.array(point_with_bulge)
|
|
1242
1259
|
});
|
|
1243
1260
|
expectTypesMatch(true);
|
|
1244
|
-
var brep_shape =
|
|
1261
|
+
var brep_shape = z68.object({
|
|
1245
1262
|
outer_ring: ring,
|
|
1246
|
-
inner_rings:
|
|
1263
|
+
inner_rings: z68.array(ring).default([])
|
|
1247
1264
|
});
|
|
1248
1265
|
expectTypesMatch(true);
|
|
1249
1266
|
|
|
1250
1267
|
// src/pcb/properties/pcb_route_hints.ts
|
|
1251
|
-
import { z as
|
|
1252
|
-
var pcb_route_hint =
|
|
1268
|
+
import { z as z69 } from "zod";
|
|
1269
|
+
var pcb_route_hint = z69.object({
|
|
1253
1270
|
x: distance,
|
|
1254
1271
|
y: distance,
|
|
1255
|
-
via:
|
|
1272
|
+
via: z69.boolean().optional(),
|
|
1256
1273
|
via_to_layer: layer_ref.optional()
|
|
1257
1274
|
});
|
|
1258
|
-
var pcb_route_hints =
|
|
1275
|
+
var pcb_route_hints = z69.array(pcb_route_hint);
|
|
1259
1276
|
expectTypesMatch(true);
|
|
1260
1277
|
expectTypesMatch(true);
|
|
1261
1278
|
|
|
1262
1279
|
// src/pcb/properties/route_hint_point.ts
|
|
1263
|
-
import { z as
|
|
1264
|
-
var route_hint_point =
|
|
1280
|
+
import { z as z70 } from "zod";
|
|
1281
|
+
var route_hint_point = z70.object({
|
|
1265
1282
|
x: distance,
|
|
1266
1283
|
y: distance,
|
|
1267
|
-
via:
|
|
1284
|
+
via: z70.boolean().optional(),
|
|
1268
1285
|
to_layer: layer_ref.optional(),
|
|
1269
1286
|
trace_width: distance.optional()
|
|
1270
1287
|
});
|
|
1271
1288
|
expectTypesMatch(true);
|
|
1272
1289
|
|
|
1273
1290
|
// src/pcb/pcb_component.ts
|
|
1274
|
-
import { z as
|
|
1275
|
-
var pcb_component =
|
|
1276
|
-
type:
|
|
1291
|
+
import { z as z71 } from "zod";
|
|
1292
|
+
var pcb_component = z71.object({
|
|
1293
|
+
type: z71.literal("pcb_component"),
|
|
1277
1294
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
1278
|
-
source_component_id:
|
|
1295
|
+
source_component_id: z71.string(),
|
|
1279
1296
|
center: point,
|
|
1280
1297
|
layer: layer_ref,
|
|
1281
1298
|
rotation,
|
|
1282
1299
|
width: length,
|
|
1283
1300
|
height: length,
|
|
1284
|
-
do_not_place:
|
|
1285
|
-
subcircuit_id:
|
|
1286
|
-
pcb_group_id:
|
|
1287
|
-
position_mode:
|
|
1288
|
-
positioned_relative_to_pcb_group_id:
|
|
1289
|
-
obstructs_within_bounds:
|
|
1301
|
+
do_not_place: z71.boolean().optional(),
|
|
1302
|
+
subcircuit_id: z71.string().optional(),
|
|
1303
|
+
pcb_group_id: z71.string().optional(),
|
|
1304
|
+
position_mode: z71.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
1305
|
+
positioned_relative_to_pcb_group_id: z71.string().optional(),
|
|
1306
|
+
obstructs_within_bounds: z71.boolean().default(true).describe(
|
|
1290
1307
|
"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"
|
|
1291
1308
|
)
|
|
1292
1309
|
}).describe("Defines a component on the PCB");
|
|
1293
1310
|
expectTypesMatch(true);
|
|
1294
1311
|
|
|
1295
1312
|
// src/pcb/pcb_hole.ts
|
|
1296
|
-
import { z as
|
|
1297
|
-
var pcb_hole_circle =
|
|
1298
|
-
type:
|
|
1313
|
+
import { z as z72 } from "zod";
|
|
1314
|
+
var pcb_hole_circle = z72.object({
|
|
1315
|
+
type: z72.literal("pcb_hole"),
|
|
1299
1316
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1300
|
-
pcb_group_id:
|
|
1301
|
-
subcircuit_id:
|
|
1302
|
-
hole_shape:
|
|
1303
|
-
hole_diameter:
|
|
1317
|
+
pcb_group_id: z72.string().optional(),
|
|
1318
|
+
subcircuit_id: z72.string().optional(),
|
|
1319
|
+
hole_shape: z72.literal("circle"),
|
|
1320
|
+
hole_diameter: z72.number(),
|
|
1304
1321
|
x: distance,
|
|
1305
1322
|
y: distance,
|
|
1306
|
-
is_covered_with_solder_mask:
|
|
1307
|
-
soldermask_margin:
|
|
1323
|
+
is_covered_with_solder_mask: z72.boolean().optional(),
|
|
1324
|
+
soldermask_margin: z72.number().optional()
|
|
1308
1325
|
});
|
|
1309
1326
|
var pcb_hole_circle_shape = pcb_hole_circle.describe(
|
|
1310
1327
|
"Defines a circular hole on the PCB"
|
|
1311
1328
|
);
|
|
1312
1329
|
expectTypesMatch(true);
|
|
1313
|
-
var pcb_hole_rect =
|
|
1314
|
-
type:
|
|
1330
|
+
var pcb_hole_rect = z72.object({
|
|
1331
|
+
type: z72.literal("pcb_hole"),
|
|
1315
1332
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1316
|
-
pcb_group_id:
|
|
1317
|
-
subcircuit_id:
|
|
1318
|
-
hole_shape:
|
|
1319
|
-
hole_width:
|
|
1320
|
-
hole_height:
|
|
1333
|
+
pcb_group_id: z72.string().optional(),
|
|
1334
|
+
subcircuit_id: z72.string().optional(),
|
|
1335
|
+
hole_shape: z72.literal("rect"),
|
|
1336
|
+
hole_width: z72.number(),
|
|
1337
|
+
hole_height: z72.number(),
|
|
1321
1338
|
x: distance,
|
|
1322
1339
|
y: distance,
|
|
1323
|
-
is_covered_with_solder_mask:
|
|
1324
|
-
soldermask_margin:
|
|
1340
|
+
is_covered_with_solder_mask: z72.boolean().optional(),
|
|
1341
|
+
soldermask_margin: z72.number().optional()
|
|
1325
1342
|
});
|
|
1326
1343
|
var pcb_hole_rect_shape = pcb_hole_rect.describe(
|
|
1327
1344
|
"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
|
|
1328
1345
|
);
|
|
1329
1346
|
expectTypesMatch(true);
|
|
1330
|
-
var pcb_hole_circle_or_square =
|
|
1331
|
-
type:
|
|
1347
|
+
var pcb_hole_circle_or_square = z72.object({
|
|
1348
|
+
type: z72.literal("pcb_hole"),
|
|
1332
1349
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1333
|
-
pcb_group_id:
|
|
1334
|
-
subcircuit_id:
|
|
1335
|
-
hole_shape:
|
|
1336
|
-
hole_diameter:
|
|
1350
|
+
pcb_group_id: z72.string().optional(),
|
|
1351
|
+
subcircuit_id: z72.string().optional(),
|
|
1352
|
+
hole_shape: z72.enum(["circle", "square"]),
|
|
1353
|
+
hole_diameter: z72.number(),
|
|
1337
1354
|
x: distance,
|
|
1338
1355
|
y: distance,
|
|
1339
|
-
is_covered_with_solder_mask:
|
|
1340
|
-
soldermask_margin:
|
|
1356
|
+
is_covered_with_solder_mask: z72.boolean().optional(),
|
|
1357
|
+
soldermask_margin: z72.number().optional()
|
|
1341
1358
|
});
|
|
1342
1359
|
var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
1343
1360
|
"Defines a circular or square hole on the PCB"
|
|
1344
1361
|
);
|
|
1345
1362
|
expectTypesMatch(true);
|
|
1346
|
-
var pcb_hole_oval =
|
|
1347
|
-
type:
|
|
1363
|
+
var pcb_hole_oval = z72.object({
|
|
1364
|
+
type: z72.literal("pcb_hole"),
|
|
1348
1365
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1349
|
-
pcb_group_id:
|
|
1350
|
-
subcircuit_id:
|
|
1351
|
-
hole_shape:
|
|
1352
|
-
hole_width:
|
|
1353
|
-
hole_height:
|
|
1366
|
+
pcb_group_id: z72.string().optional(),
|
|
1367
|
+
subcircuit_id: z72.string().optional(),
|
|
1368
|
+
hole_shape: z72.literal("oval"),
|
|
1369
|
+
hole_width: z72.number(),
|
|
1370
|
+
hole_height: z72.number(),
|
|
1354
1371
|
x: distance,
|
|
1355
1372
|
y: distance,
|
|
1356
|
-
is_covered_with_solder_mask:
|
|
1357
|
-
soldermask_margin:
|
|
1373
|
+
is_covered_with_solder_mask: z72.boolean().optional(),
|
|
1374
|
+
soldermask_margin: z72.number().optional()
|
|
1358
1375
|
});
|
|
1359
1376
|
var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
1360
1377
|
"Defines an oval hole on the PCB"
|
|
1361
1378
|
);
|
|
1362
1379
|
expectTypesMatch(true);
|
|
1363
|
-
var pcb_hole_pill =
|
|
1364
|
-
type:
|
|
1380
|
+
var pcb_hole_pill = z72.object({
|
|
1381
|
+
type: z72.literal("pcb_hole"),
|
|
1365
1382
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1366
|
-
pcb_group_id:
|
|
1367
|
-
subcircuit_id:
|
|
1368
|
-
hole_shape:
|
|
1369
|
-
hole_width:
|
|
1370
|
-
hole_height:
|
|
1383
|
+
pcb_group_id: z72.string().optional(),
|
|
1384
|
+
subcircuit_id: z72.string().optional(),
|
|
1385
|
+
hole_shape: z72.literal("pill"),
|
|
1386
|
+
hole_width: z72.number(),
|
|
1387
|
+
hole_height: z72.number(),
|
|
1371
1388
|
x: distance,
|
|
1372
1389
|
y: distance,
|
|
1373
|
-
is_covered_with_solder_mask:
|
|
1374
|
-
soldermask_margin:
|
|
1390
|
+
is_covered_with_solder_mask: z72.boolean().optional(),
|
|
1391
|
+
soldermask_margin: z72.number().optional()
|
|
1375
1392
|
});
|
|
1376
1393
|
var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
1377
1394
|
"Defines a pill-shaped hole on the PCB"
|
|
1378
1395
|
);
|
|
1379
1396
|
expectTypesMatch(true);
|
|
1380
|
-
var pcb_hole_rotated_pill =
|
|
1381
|
-
type:
|
|
1397
|
+
var pcb_hole_rotated_pill = z72.object({
|
|
1398
|
+
type: z72.literal("pcb_hole"),
|
|
1382
1399
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1383
|
-
pcb_group_id:
|
|
1384
|
-
subcircuit_id:
|
|
1385
|
-
hole_shape:
|
|
1386
|
-
hole_width:
|
|
1387
|
-
hole_height:
|
|
1400
|
+
pcb_group_id: z72.string().optional(),
|
|
1401
|
+
subcircuit_id: z72.string().optional(),
|
|
1402
|
+
hole_shape: z72.literal("rotated_pill"),
|
|
1403
|
+
hole_width: z72.number(),
|
|
1404
|
+
hole_height: z72.number(),
|
|
1388
1405
|
x: distance,
|
|
1389
1406
|
y: distance,
|
|
1390
1407
|
ccw_rotation: rotation,
|
|
1391
|
-
is_covered_with_solder_mask:
|
|
1392
|
-
soldermask_margin:
|
|
1408
|
+
is_covered_with_solder_mask: z72.boolean().optional(),
|
|
1409
|
+
soldermask_margin: z72.number().optional()
|
|
1393
1410
|
});
|
|
1394
1411
|
var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
|
|
1395
1412
|
"Defines a rotated pill-shaped hole on the PCB"
|
|
@@ -1398,145 +1415,145 @@ expectTypesMatch(true);
|
|
|
1398
1415
|
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);
|
|
1399
1416
|
|
|
1400
1417
|
// src/pcb/pcb_plated_hole.ts
|
|
1401
|
-
import { z as
|
|
1402
|
-
var pcb_plated_hole_circle =
|
|
1403
|
-
type:
|
|
1404
|
-
shape:
|
|
1405
|
-
pcb_group_id:
|
|
1406
|
-
subcircuit_id:
|
|
1407
|
-
outer_diameter:
|
|
1408
|
-
hole_diameter:
|
|
1418
|
+
import { z as z73 } from "zod";
|
|
1419
|
+
var pcb_plated_hole_circle = z73.object({
|
|
1420
|
+
type: z73.literal("pcb_plated_hole"),
|
|
1421
|
+
shape: z73.literal("circle"),
|
|
1422
|
+
pcb_group_id: z73.string().optional(),
|
|
1423
|
+
subcircuit_id: z73.string().optional(),
|
|
1424
|
+
outer_diameter: z73.number(),
|
|
1425
|
+
hole_diameter: z73.number(),
|
|
1409
1426
|
x: distance,
|
|
1410
1427
|
y: distance,
|
|
1411
|
-
layers:
|
|
1412
|
-
port_hints:
|
|
1413
|
-
pcb_component_id:
|
|
1414
|
-
pcb_port_id:
|
|
1428
|
+
layers: z73.array(layer_ref),
|
|
1429
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
1430
|
+
pcb_component_id: z73.string().optional(),
|
|
1431
|
+
pcb_port_id: z73.string().optional(),
|
|
1415
1432
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1416
|
-
soldermask_margin:
|
|
1417
|
-
is_covered_with_solder_mask:
|
|
1433
|
+
soldermask_margin: z73.number().optional(),
|
|
1434
|
+
is_covered_with_solder_mask: z73.boolean().optional()
|
|
1418
1435
|
});
|
|
1419
|
-
var pcb_plated_hole_oval =
|
|
1420
|
-
type:
|
|
1421
|
-
shape:
|
|
1422
|
-
pcb_group_id:
|
|
1423
|
-
subcircuit_id:
|
|
1424
|
-
outer_width:
|
|
1425
|
-
outer_height:
|
|
1426
|
-
hole_width:
|
|
1427
|
-
hole_height:
|
|
1428
|
-
is_covered_with_solder_mask:
|
|
1436
|
+
var pcb_plated_hole_oval = z73.object({
|
|
1437
|
+
type: z73.literal("pcb_plated_hole"),
|
|
1438
|
+
shape: z73.enum(["oval", "pill"]),
|
|
1439
|
+
pcb_group_id: z73.string().optional(),
|
|
1440
|
+
subcircuit_id: z73.string().optional(),
|
|
1441
|
+
outer_width: z73.number(),
|
|
1442
|
+
outer_height: z73.number(),
|
|
1443
|
+
hole_width: z73.number(),
|
|
1444
|
+
hole_height: z73.number(),
|
|
1445
|
+
is_covered_with_solder_mask: z73.boolean().optional(),
|
|
1429
1446
|
x: distance,
|
|
1430
1447
|
y: distance,
|
|
1431
1448
|
ccw_rotation: rotation,
|
|
1432
|
-
layers:
|
|
1433
|
-
port_hints:
|
|
1434
|
-
pcb_component_id:
|
|
1435
|
-
pcb_port_id:
|
|
1449
|
+
layers: z73.array(layer_ref),
|
|
1450
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
1451
|
+
pcb_component_id: z73.string().optional(),
|
|
1452
|
+
pcb_port_id: z73.string().optional(),
|
|
1436
1453
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1437
|
-
soldermask_margin:
|
|
1454
|
+
soldermask_margin: z73.number().optional()
|
|
1438
1455
|
});
|
|
1439
|
-
var pcb_circular_hole_with_rect_pad =
|
|
1440
|
-
type:
|
|
1441
|
-
shape:
|
|
1442
|
-
pcb_group_id:
|
|
1443
|
-
subcircuit_id:
|
|
1444
|
-
hole_shape:
|
|
1445
|
-
pad_shape:
|
|
1446
|
-
hole_diameter:
|
|
1447
|
-
rect_pad_width:
|
|
1448
|
-
rect_pad_height:
|
|
1449
|
-
rect_border_radius:
|
|
1456
|
+
var pcb_circular_hole_with_rect_pad = z73.object({
|
|
1457
|
+
type: z73.literal("pcb_plated_hole"),
|
|
1458
|
+
shape: z73.literal("circular_hole_with_rect_pad"),
|
|
1459
|
+
pcb_group_id: z73.string().optional(),
|
|
1460
|
+
subcircuit_id: z73.string().optional(),
|
|
1461
|
+
hole_shape: z73.literal("circle"),
|
|
1462
|
+
pad_shape: z73.literal("rect"),
|
|
1463
|
+
hole_diameter: z73.number(),
|
|
1464
|
+
rect_pad_width: z73.number(),
|
|
1465
|
+
rect_pad_height: z73.number(),
|
|
1466
|
+
rect_border_radius: z73.number().optional(),
|
|
1450
1467
|
hole_offset_x: distance.default(0),
|
|
1451
1468
|
hole_offset_y: distance.default(0),
|
|
1452
|
-
is_covered_with_solder_mask:
|
|
1469
|
+
is_covered_with_solder_mask: z73.boolean().optional(),
|
|
1453
1470
|
x: distance,
|
|
1454
1471
|
y: distance,
|
|
1455
|
-
layers:
|
|
1456
|
-
port_hints:
|
|
1457
|
-
pcb_component_id:
|
|
1458
|
-
pcb_port_id:
|
|
1472
|
+
layers: z73.array(layer_ref),
|
|
1473
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
1474
|
+
pcb_component_id: z73.string().optional(),
|
|
1475
|
+
pcb_port_id: z73.string().optional(),
|
|
1459
1476
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1460
|
-
soldermask_margin:
|
|
1477
|
+
soldermask_margin: z73.number().optional()
|
|
1461
1478
|
});
|
|
1462
|
-
var pcb_pill_hole_with_rect_pad =
|
|
1463
|
-
type:
|
|
1464
|
-
shape:
|
|
1465
|
-
pcb_group_id:
|
|
1466
|
-
subcircuit_id:
|
|
1467
|
-
hole_shape:
|
|
1468
|
-
pad_shape:
|
|
1469
|
-
hole_width:
|
|
1470
|
-
hole_height:
|
|
1471
|
-
rect_pad_width:
|
|
1472
|
-
rect_pad_height:
|
|
1473
|
-
rect_border_radius:
|
|
1479
|
+
var pcb_pill_hole_with_rect_pad = z73.object({
|
|
1480
|
+
type: z73.literal("pcb_plated_hole"),
|
|
1481
|
+
shape: z73.literal("pill_hole_with_rect_pad"),
|
|
1482
|
+
pcb_group_id: z73.string().optional(),
|
|
1483
|
+
subcircuit_id: z73.string().optional(),
|
|
1484
|
+
hole_shape: z73.literal("pill"),
|
|
1485
|
+
pad_shape: z73.literal("rect"),
|
|
1486
|
+
hole_width: z73.number(),
|
|
1487
|
+
hole_height: z73.number(),
|
|
1488
|
+
rect_pad_width: z73.number(),
|
|
1489
|
+
rect_pad_height: z73.number(),
|
|
1490
|
+
rect_border_radius: z73.number().optional(),
|
|
1474
1491
|
hole_offset_x: distance.default(0),
|
|
1475
1492
|
hole_offset_y: distance.default(0),
|
|
1476
|
-
is_covered_with_solder_mask:
|
|
1493
|
+
is_covered_with_solder_mask: z73.boolean().optional(),
|
|
1477
1494
|
x: distance,
|
|
1478
1495
|
y: distance,
|
|
1479
|
-
layers:
|
|
1480
|
-
port_hints:
|
|
1481
|
-
pcb_component_id:
|
|
1482
|
-
pcb_port_id:
|
|
1496
|
+
layers: z73.array(layer_ref),
|
|
1497
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
1498
|
+
pcb_component_id: z73.string().optional(),
|
|
1499
|
+
pcb_port_id: z73.string().optional(),
|
|
1483
1500
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1484
|
-
soldermask_margin:
|
|
1501
|
+
soldermask_margin: z73.number().optional()
|
|
1485
1502
|
});
|
|
1486
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
1487
|
-
type:
|
|
1488
|
-
shape:
|
|
1489
|
-
pcb_group_id:
|
|
1490
|
-
subcircuit_id:
|
|
1491
|
-
hole_shape:
|
|
1492
|
-
pad_shape:
|
|
1493
|
-
hole_width:
|
|
1494
|
-
hole_height:
|
|
1503
|
+
var pcb_rotated_pill_hole_with_rect_pad = z73.object({
|
|
1504
|
+
type: z73.literal("pcb_plated_hole"),
|
|
1505
|
+
shape: z73.literal("rotated_pill_hole_with_rect_pad"),
|
|
1506
|
+
pcb_group_id: z73.string().optional(),
|
|
1507
|
+
subcircuit_id: z73.string().optional(),
|
|
1508
|
+
hole_shape: z73.literal("rotated_pill"),
|
|
1509
|
+
pad_shape: z73.literal("rect"),
|
|
1510
|
+
hole_width: z73.number(),
|
|
1511
|
+
hole_height: z73.number(),
|
|
1495
1512
|
hole_ccw_rotation: rotation,
|
|
1496
|
-
rect_pad_width:
|
|
1497
|
-
rect_pad_height:
|
|
1498
|
-
rect_border_radius:
|
|
1513
|
+
rect_pad_width: z73.number(),
|
|
1514
|
+
rect_pad_height: z73.number(),
|
|
1515
|
+
rect_border_radius: z73.number().optional(),
|
|
1499
1516
|
rect_ccw_rotation: rotation,
|
|
1500
1517
|
hole_offset_x: distance.default(0),
|
|
1501
1518
|
hole_offset_y: distance.default(0),
|
|
1502
|
-
is_covered_with_solder_mask:
|
|
1519
|
+
is_covered_with_solder_mask: z73.boolean().optional(),
|
|
1503
1520
|
x: distance,
|
|
1504
1521
|
y: distance,
|
|
1505
|
-
layers:
|
|
1506
|
-
port_hints:
|
|
1507
|
-
pcb_component_id:
|
|
1508
|
-
pcb_port_id:
|
|
1522
|
+
layers: z73.array(layer_ref),
|
|
1523
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
1524
|
+
pcb_component_id: z73.string().optional(),
|
|
1525
|
+
pcb_port_id: z73.string().optional(),
|
|
1509
1526
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1510
|
-
soldermask_margin:
|
|
1527
|
+
soldermask_margin: z73.number().optional()
|
|
1511
1528
|
});
|
|
1512
|
-
var pcb_hole_with_polygon_pad =
|
|
1513
|
-
type:
|
|
1514
|
-
shape:
|
|
1515
|
-
pcb_group_id:
|
|
1516
|
-
subcircuit_id:
|
|
1517
|
-
hole_shape:
|
|
1518
|
-
hole_diameter:
|
|
1519
|
-
hole_width:
|
|
1520
|
-
hole_height:
|
|
1521
|
-
pad_outline:
|
|
1522
|
-
|
|
1529
|
+
var pcb_hole_with_polygon_pad = z73.object({
|
|
1530
|
+
type: z73.literal("pcb_plated_hole"),
|
|
1531
|
+
shape: z73.literal("hole_with_polygon_pad"),
|
|
1532
|
+
pcb_group_id: z73.string().optional(),
|
|
1533
|
+
subcircuit_id: z73.string().optional(),
|
|
1534
|
+
hole_shape: z73.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
1535
|
+
hole_diameter: z73.number().optional(),
|
|
1536
|
+
hole_width: z73.number().optional(),
|
|
1537
|
+
hole_height: z73.number().optional(),
|
|
1538
|
+
pad_outline: z73.array(
|
|
1539
|
+
z73.object({
|
|
1523
1540
|
x: distance,
|
|
1524
1541
|
y: distance
|
|
1525
1542
|
})
|
|
1526
1543
|
).min(3),
|
|
1527
1544
|
hole_offset_x: distance.default(0),
|
|
1528
1545
|
hole_offset_y: distance.default(0),
|
|
1529
|
-
is_covered_with_solder_mask:
|
|
1546
|
+
is_covered_with_solder_mask: z73.boolean().optional(),
|
|
1530
1547
|
x: distance,
|
|
1531
1548
|
y: distance,
|
|
1532
|
-
layers:
|
|
1533
|
-
port_hints:
|
|
1534
|
-
pcb_component_id:
|
|
1535
|
-
pcb_port_id:
|
|
1549
|
+
layers: z73.array(layer_ref),
|
|
1550
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
1551
|
+
pcb_component_id: z73.string().optional(),
|
|
1552
|
+
pcb_port_id: z73.string().optional(),
|
|
1536
1553
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1537
|
-
soldermask_margin:
|
|
1554
|
+
soldermask_margin: z73.number().optional()
|
|
1538
1555
|
});
|
|
1539
|
-
var pcb_plated_hole =
|
|
1556
|
+
var pcb_plated_hole = z73.union([
|
|
1540
1557
|
pcb_plated_hole_circle,
|
|
1541
1558
|
pcb_plated_hole_oval,
|
|
1542
1559
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -1554,130 +1571,130 @@ expectTypesMatch(true);
|
|
|
1554
1571
|
expectTypesMatch(true);
|
|
1555
1572
|
|
|
1556
1573
|
// src/pcb/pcb_port.ts
|
|
1557
|
-
import { z as
|
|
1558
|
-
var pcb_port =
|
|
1559
|
-
type:
|
|
1574
|
+
import { z as z74 } from "zod";
|
|
1575
|
+
var pcb_port = z74.object({
|
|
1576
|
+
type: z74.literal("pcb_port"),
|
|
1560
1577
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
1561
|
-
pcb_group_id:
|
|
1562
|
-
subcircuit_id:
|
|
1563
|
-
source_port_id:
|
|
1564
|
-
pcb_component_id:
|
|
1578
|
+
pcb_group_id: z74.string().optional(),
|
|
1579
|
+
subcircuit_id: z74.string().optional(),
|
|
1580
|
+
source_port_id: z74.string(),
|
|
1581
|
+
pcb_component_id: z74.string().optional(),
|
|
1565
1582
|
x: distance,
|
|
1566
1583
|
y: distance,
|
|
1567
|
-
layers:
|
|
1568
|
-
is_board_pinout:
|
|
1584
|
+
layers: z74.array(layer_ref),
|
|
1585
|
+
is_board_pinout: z74.boolean().optional()
|
|
1569
1586
|
}).describe("Defines a port on the PCB");
|
|
1570
1587
|
expectTypesMatch(true);
|
|
1571
1588
|
|
|
1572
1589
|
// src/pcb/pcb_smtpad.ts
|
|
1573
|
-
import { z as
|
|
1574
|
-
var pcb_smtpad_circle =
|
|
1575
|
-
type:
|
|
1576
|
-
shape:
|
|
1590
|
+
import { z as z75 } from "zod";
|
|
1591
|
+
var pcb_smtpad_circle = z75.object({
|
|
1592
|
+
type: z75.literal("pcb_smtpad"),
|
|
1593
|
+
shape: z75.literal("circle"),
|
|
1577
1594
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1578
|
-
pcb_group_id:
|
|
1579
|
-
subcircuit_id:
|
|
1595
|
+
pcb_group_id: z75.string().optional(),
|
|
1596
|
+
subcircuit_id: z75.string().optional(),
|
|
1580
1597
|
x: distance,
|
|
1581
1598
|
y: distance,
|
|
1582
|
-
radius:
|
|
1599
|
+
radius: z75.number(),
|
|
1583
1600
|
layer: layer_ref,
|
|
1584
|
-
port_hints:
|
|
1585
|
-
pcb_component_id:
|
|
1586
|
-
pcb_port_id:
|
|
1587
|
-
is_covered_with_solder_mask:
|
|
1588
|
-
soldermask_margin:
|
|
1601
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
1602
|
+
pcb_component_id: z75.string().optional(),
|
|
1603
|
+
pcb_port_id: z75.string().optional(),
|
|
1604
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1605
|
+
soldermask_margin: z75.number().optional()
|
|
1589
1606
|
});
|
|
1590
|
-
var pcb_smtpad_rect =
|
|
1591
|
-
type:
|
|
1592
|
-
shape:
|
|
1607
|
+
var pcb_smtpad_rect = z75.object({
|
|
1608
|
+
type: z75.literal("pcb_smtpad"),
|
|
1609
|
+
shape: z75.literal("rect"),
|
|
1593
1610
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1594
|
-
pcb_group_id:
|
|
1595
|
-
subcircuit_id:
|
|
1611
|
+
pcb_group_id: z75.string().optional(),
|
|
1612
|
+
subcircuit_id: z75.string().optional(),
|
|
1596
1613
|
x: distance,
|
|
1597
1614
|
y: distance,
|
|
1598
|
-
width:
|
|
1599
|
-
height:
|
|
1600
|
-
rect_border_radius:
|
|
1601
|
-
corner_radius:
|
|
1615
|
+
width: z75.number(),
|
|
1616
|
+
height: z75.number(),
|
|
1617
|
+
rect_border_radius: z75.number().optional(),
|
|
1618
|
+
corner_radius: z75.number().optional(),
|
|
1602
1619
|
layer: layer_ref,
|
|
1603
|
-
port_hints:
|
|
1604
|
-
pcb_component_id:
|
|
1605
|
-
pcb_port_id:
|
|
1606
|
-
is_covered_with_solder_mask:
|
|
1607
|
-
soldermask_margin:
|
|
1620
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
1621
|
+
pcb_component_id: z75.string().optional(),
|
|
1622
|
+
pcb_port_id: z75.string().optional(),
|
|
1623
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1624
|
+
soldermask_margin: z75.number().optional()
|
|
1608
1625
|
});
|
|
1609
|
-
var pcb_smtpad_rotated_rect =
|
|
1610
|
-
type:
|
|
1611
|
-
shape:
|
|
1626
|
+
var pcb_smtpad_rotated_rect = z75.object({
|
|
1627
|
+
type: z75.literal("pcb_smtpad"),
|
|
1628
|
+
shape: z75.literal("rotated_rect"),
|
|
1612
1629
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1613
|
-
pcb_group_id:
|
|
1614
|
-
subcircuit_id:
|
|
1630
|
+
pcb_group_id: z75.string().optional(),
|
|
1631
|
+
subcircuit_id: z75.string().optional(),
|
|
1615
1632
|
x: distance,
|
|
1616
1633
|
y: distance,
|
|
1617
|
-
width:
|
|
1618
|
-
height:
|
|
1619
|
-
rect_border_radius:
|
|
1620
|
-
corner_radius:
|
|
1634
|
+
width: z75.number(),
|
|
1635
|
+
height: z75.number(),
|
|
1636
|
+
rect_border_radius: z75.number().optional(),
|
|
1637
|
+
corner_radius: z75.number().optional(),
|
|
1621
1638
|
ccw_rotation: rotation,
|
|
1622
1639
|
layer: layer_ref,
|
|
1623
|
-
port_hints:
|
|
1624
|
-
pcb_component_id:
|
|
1625
|
-
pcb_port_id:
|
|
1626
|
-
is_covered_with_solder_mask:
|
|
1627
|
-
soldermask_margin:
|
|
1640
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
1641
|
+
pcb_component_id: z75.string().optional(),
|
|
1642
|
+
pcb_port_id: z75.string().optional(),
|
|
1643
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1644
|
+
soldermask_margin: z75.number().optional()
|
|
1628
1645
|
});
|
|
1629
|
-
var pcb_smtpad_pill =
|
|
1630
|
-
type:
|
|
1631
|
-
shape:
|
|
1646
|
+
var pcb_smtpad_pill = z75.object({
|
|
1647
|
+
type: z75.literal("pcb_smtpad"),
|
|
1648
|
+
shape: z75.literal("pill"),
|
|
1632
1649
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1633
|
-
pcb_group_id:
|
|
1634
|
-
subcircuit_id:
|
|
1650
|
+
pcb_group_id: z75.string().optional(),
|
|
1651
|
+
subcircuit_id: z75.string().optional(),
|
|
1635
1652
|
x: distance,
|
|
1636
1653
|
y: distance,
|
|
1637
|
-
width:
|
|
1638
|
-
height:
|
|
1639
|
-
radius:
|
|
1654
|
+
width: z75.number(),
|
|
1655
|
+
height: z75.number(),
|
|
1656
|
+
radius: z75.number(),
|
|
1640
1657
|
layer: layer_ref,
|
|
1641
|
-
port_hints:
|
|
1642
|
-
pcb_component_id:
|
|
1643
|
-
pcb_port_id:
|
|
1644
|
-
is_covered_with_solder_mask:
|
|
1645
|
-
soldermask_margin:
|
|
1658
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
1659
|
+
pcb_component_id: z75.string().optional(),
|
|
1660
|
+
pcb_port_id: z75.string().optional(),
|
|
1661
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1662
|
+
soldermask_margin: z75.number().optional()
|
|
1646
1663
|
});
|
|
1647
|
-
var pcb_smtpad_rotated_pill =
|
|
1648
|
-
type:
|
|
1649
|
-
shape:
|
|
1664
|
+
var pcb_smtpad_rotated_pill = z75.object({
|
|
1665
|
+
type: z75.literal("pcb_smtpad"),
|
|
1666
|
+
shape: z75.literal("rotated_pill"),
|
|
1650
1667
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1651
|
-
pcb_group_id:
|
|
1652
|
-
subcircuit_id:
|
|
1668
|
+
pcb_group_id: z75.string().optional(),
|
|
1669
|
+
subcircuit_id: z75.string().optional(),
|
|
1653
1670
|
x: distance,
|
|
1654
1671
|
y: distance,
|
|
1655
|
-
width:
|
|
1656
|
-
height:
|
|
1657
|
-
radius:
|
|
1672
|
+
width: z75.number(),
|
|
1673
|
+
height: z75.number(),
|
|
1674
|
+
radius: z75.number(),
|
|
1658
1675
|
ccw_rotation: rotation,
|
|
1659
1676
|
layer: layer_ref,
|
|
1660
|
-
port_hints:
|
|
1661
|
-
pcb_component_id:
|
|
1662
|
-
pcb_port_id:
|
|
1663
|
-
is_covered_with_solder_mask:
|
|
1664
|
-
soldermask_margin:
|
|
1677
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
1678
|
+
pcb_component_id: z75.string().optional(),
|
|
1679
|
+
pcb_port_id: z75.string().optional(),
|
|
1680
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1681
|
+
soldermask_margin: z75.number().optional()
|
|
1665
1682
|
});
|
|
1666
|
-
var pcb_smtpad_polygon =
|
|
1667
|
-
type:
|
|
1668
|
-
shape:
|
|
1683
|
+
var pcb_smtpad_polygon = z75.object({
|
|
1684
|
+
type: z75.literal("pcb_smtpad"),
|
|
1685
|
+
shape: z75.literal("polygon"),
|
|
1669
1686
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1670
|
-
pcb_group_id:
|
|
1671
|
-
subcircuit_id:
|
|
1672
|
-
points:
|
|
1687
|
+
pcb_group_id: z75.string().optional(),
|
|
1688
|
+
subcircuit_id: z75.string().optional(),
|
|
1689
|
+
points: z75.array(point),
|
|
1673
1690
|
layer: layer_ref,
|
|
1674
|
-
port_hints:
|
|
1675
|
-
pcb_component_id:
|
|
1676
|
-
pcb_port_id:
|
|
1677
|
-
is_covered_with_solder_mask:
|
|
1678
|
-
soldermask_margin:
|
|
1691
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
1692
|
+
pcb_component_id: z75.string().optional(),
|
|
1693
|
+
pcb_port_id: z75.string().optional(),
|
|
1694
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1695
|
+
soldermask_margin: z75.number().optional()
|
|
1679
1696
|
});
|
|
1680
|
-
var pcb_smtpad =
|
|
1697
|
+
var pcb_smtpad = z75.discriminatedUnion("shape", [
|
|
1681
1698
|
pcb_smtpad_circle,
|
|
1682
1699
|
pcb_smtpad_rect,
|
|
1683
1700
|
pcb_smtpad_rotated_rect,
|
|
@@ -1693,79 +1710,79 @@ expectTypesMatch(true);
|
|
|
1693
1710
|
expectTypesMatch(true);
|
|
1694
1711
|
|
|
1695
1712
|
// src/pcb/pcb_solder_paste.ts
|
|
1696
|
-
import { z as
|
|
1697
|
-
var pcb_solder_paste_circle =
|
|
1698
|
-
type:
|
|
1699
|
-
shape:
|
|
1713
|
+
import { z as z76 } from "zod";
|
|
1714
|
+
var pcb_solder_paste_circle = z76.object({
|
|
1715
|
+
type: z76.literal("pcb_solder_paste"),
|
|
1716
|
+
shape: z76.literal("circle"),
|
|
1700
1717
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1701
|
-
pcb_group_id:
|
|
1702
|
-
subcircuit_id:
|
|
1718
|
+
pcb_group_id: z76.string().optional(),
|
|
1719
|
+
subcircuit_id: z76.string().optional(),
|
|
1703
1720
|
x: distance,
|
|
1704
1721
|
y: distance,
|
|
1705
|
-
radius:
|
|
1722
|
+
radius: z76.number(),
|
|
1706
1723
|
layer: layer_ref,
|
|
1707
|
-
pcb_component_id:
|
|
1708
|
-
pcb_smtpad_id:
|
|
1724
|
+
pcb_component_id: z76.string().optional(),
|
|
1725
|
+
pcb_smtpad_id: z76.string().optional()
|
|
1709
1726
|
});
|
|
1710
|
-
var pcb_solder_paste_rect =
|
|
1711
|
-
type:
|
|
1712
|
-
shape:
|
|
1727
|
+
var pcb_solder_paste_rect = z76.object({
|
|
1728
|
+
type: z76.literal("pcb_solder_paste"),
|
|
1729
|
+
shape: z76.literal("rect"),
|
|
1713
1730
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1714
|
-
pcb_group_id:
|
|
1715
|
-
subcircuit_id:
|
|
1731
|
+
pcb_group_id: z76.string().optional(),
|
|
1732
|
+
subcircuit_id: z76.string().optional(),
|
|
1716
1733
|
x: distance,
|
|
1717
1734
|
y: distance,
|
|
1718
|
-
width:
|
|
1719
|
-
height:
|
|
1735
|
+
width: z76.number(),
|
|
1736
|
+
height: z76.number(),
|
|
1720
1737
|
layer: layer_ref,
|
|
1721
|
-
pcb_component_id:
|
|
1722
|
-
pcb_smtpad_id:
|
|
1738
|
+
pcb_component_id: z76.string().optional(),
|
|
1739
|
+
pcb_smtpad_id: z76.string().optional()
|
|
1723
1740
|
});
|
|
1724
|
-
var pcb_solder_paste_pill =
|
|
1725
|
-
type:
|
|
1726
|
-
shape:
|
|
1741
|
+
var pcb_solder_paste_pill = z76.object({
|
|
1742
|
+
type: z76.literal("pcb_solder_paste"),
|
|
1743
|
+
shape: z76.literal("pill"),
|
|
1727
1744
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1728
|
-
pcb_group_id:
|
|
1729
|
-
subcircuit_id:
|
|
1745
|
+
pcb_group_id: z76.string().optional(),
|
|
1746
|
+
subcircuit_id: z76.string().optional(),
|
|
1730
1747
|
x: distance,
|
|
1731
1748
|
y: distance,
|
|
1732
|
-
width:
|
|
1733
|
-
height:
|
|
1734
|
-
radius:
|
|
1749
|
+
width: z76.number(),
|
|
1750
|
+
height: z76.number(),
|
|
1751
|
+
radius: z76.number(),
|
|
1735
1752
|
layer: layer_ref,
|
|
1736
|
-
pcb_component_id:
|
|
1737
|
-
pcb_smtpad_id:
|
|
1753
|
+
pcb_component_id: z76.string().optional(),
|
|
1754
|
+
pcb_smtpad_id: z76.string().optional()
|
|
1738
1755
|
});
|
|
1739
|
-
var pcb_solder_paste_rotated_rect =
|
|
1740
|
-
type:
|
|
1741
|
-
shape:
|
|
1756
|
+
var pcb_solder_paste_rotated_rect = z76.object({
|
|
1757
|
+
type: z76.literal("pcb_solder_paste"),
|
|
1758
|
+
shape: z76.literal("rotated_rect"),
|
|
1742
1759
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1743
|
-
pcb_group_id:
|
|
1744
|
-
subcircuit_id:
|
|
1760
|
+
pcb_group_id: z76.string().optional(),
|
|
1761
|
+
subcircuit_id: z76.string().optional(),
|
|
1745
1762
|
x: distance,
|
|
1746
1763
|
y: distance,
|
|
1747
|
-
width:
|
|
1748
|
-
height:
|
|
1764
|
+
width: z76.number(),
|
|
1765
|
+
height: z76.number(),
|
|
1749
1766
|
ccw_rotation: distance,
|
|
1750
1767
|
layer: layer_ref,
|
|
1751
|
-
pcb_component_id:
|
|
1752
|
-
pcb_smtpad_id:
|
|
1768
|
+
pcb_component_id: z76.string().optional(),
|
|
1769
|
+
pcb_smtpad_id: z76.string().optional()
|
|
1753
1770
|
});
|
|
1754
|
-
var pcb_solder_paste_oval =
|
|
1755
|
-
type:
|
|
1756
|
-
shape:
|
|
1771
|
+
var pcb_solder_paste_oval = z76.object({
|
|
1772
|
+
type: z76.literal("pcb_solder_paste"),
|
|
1773
|
+
shape: z76.literal("oval"),
|
|
1757
1774
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1758
|
-
pcb_group_id:
|
|
1759
|
-
subcircuit_id:
|
|
1775
|
+
pcb_group_id: z76.string().optional(),
|
|
1776
|
+
subcircuit_id: z76.string().optional(),
|
|
1760
1777
|
x: distance,
|
|
1761
1778
|
y: distance,
|
|
1762
|
-
width:
|
|
1763
|
-
height:
|
|
1779
|
+
width: z76.number(),
|
|
1780
|
+
height: z76.number(),
|
|
1764
1781
|
layer: layer_ref,
|
|
1765
|
-
pcb_component_id:
|
|
1766
|
-
pcb_smtpad_id:
|
|
1782
|
+
pcb_component_id: z76.string().optional(),
|
|
1783
|
+
pcb_smtpad_id: z76.string().optional()
|
|
1767
1784
|
});
|
|
1768
|
-
var pcb_solder_paste =
|
|
1785
|
+
var pcb_solder_paste = z76.union([
|
|
1769
1786
|
pcb_solder_paste_circle,
|
|
1770
1787
|
pcb_solder_paste_rect,
|
|
1771
1788
|
pcb_solder_paste_pill,
|
|
@@ -1781,146 +1798,146 @@ expectTypesMatch(
|
|
|
1781
1798
|
expectTypesMatch(true);
|
|
1782
1799
|
|
|
1783
1800
|
// src/pcb/pcb_text.ts
|
|
1784
|
-
import { z as
|
|
1785
|
-
var pcb_text =
|
|
1786
|
-
type:
|
|
1801
|
+
import { z as z77 } from "zod";
|
|
1802
|
+
var pcb_text = z77.object({
|
|
1803
|
+
type: z77.literal("pcb_text"),
|
|
1787
1804
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
1788
|
-
pcb_group_id:
|
|
1789
|
-
subcircuit_id:
|
|
1790
|
-
text:
|
|
1805
|
+
pcb_group_id: z77.string().optional(),
|
|
1806
|
+
subcircuit_id: z77.string().optional(),
|
|
1807
|
+
text: z77.string(),
|
|
1791
1808
|
center: point,
|
|
1792
1809
|
layer: layer_ref,
|
|
1793
1810
|
width: length,
|
|
1794
1811
|
height: length,
|
|
1795
|
-
lines:
|
|
1812
|
+
lines: z77.number(),
|
|
1796
1813
|
// @ts-ignore
|
|
1797
|
-
align:
|
|
1814
|
+
align: z77.enum(["bottom-left"])
|
|
1798
1815
|
}).describe("Defines text on the PCB");
|
|
1799
1816
|
expectTypesMatch(true);
|
|
1800
1817
|
|
|
1801
1818
|
// src/pcb/pcb_trace.ts
|
|
1802
|
-
import { z as
|
|
1803
|
-
var pcb_trace_route_point_wire =
|
|
1804
|
-
route_type:
|
|
1819
|
+
import { z as z78 } from "zod";
|
|
1820
|
+
var pcb_trace_route_point_wire = z78.object({
|
|
1821
|
+
route_type: z78.literal("wire"),
|
|
1805
1822
|
x: distance,
|
|
1806
1823
|
y: distance,
|
|
1807
1824
|
width: distance,
|
|
1808
|
-
start_pcb_port_id:
|
|
1809
|
-
end_pcb_port_id:
|
|
1825
|
+
start_pcb_port_id: z78.string().optional(),
|
|
1826
|
+
end_pcb_port_id: z78.string().optional(),
|
|
1810
1827
|
layer: layer_ref
|
|
1811
1828
|
});
|
|
1812
|
-
var pcb_trace_route_point_via =
|
|
1813
|
-
route_type:
|
|
1829
|
+
var pcb_trace_route_point_via = z78.object({
|
|
1830
|
+
route_type: z78.literal("via"),
|
|
1814
1831
|
x: distance,
|
|
1815
1832
|
y: distance,
|
|
1816
1833
|
hole_diameter: distance.optional(),
|
|
1817
1834
|
outer_diameter: distance.optional(),
|
|
1818
|
-
from_layer:
|
|
1819
|
-
to_layer:
|
|
1835
|
+
from_layer: z78.string(),
|
|
1836
|
+
to_layer: z78.string()
|
|
1820
1837
|
});
|
|
1821
|
-
var pcb_trace_route_point =
|
|
1838
|
+
var pcb_trace_route_point = z78.union([
|
|
1822
1839
|
pcb_trace_route_point_wire,
|
|
1823
1840
|
pcb_trace_route_point_via
|
|
1824
1841
|
]);
|
|
1825
|
-
var pcb_trace =
|
|
1826
|
-
type:
|
|
1827
|
-
source_trace_id:
|
|
1828
|
-
pcb_component_id:
|
|
1842
|
+
var pcb_trace = z78.object({
|
|
1843
|
+
type: z78.literal("pcb_trace"),
|
|
1844
|
+
source_trace_id: z78.string().optional(),
|
|
1845
|
+
pcb_component_id: z78.string().optional(),
|
|
1829
1846
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
1830
|
-
pcb_group_id:
|
|
1831
|
-
subcircuit_id:
|
|
1832
|
-
route_thickness_mode:
|
|
1833
|
-
route_order_index:
|
|
1834
|
-
should_round_corners:
|
|
1835
|
-
trace_length:
|
|
1836
|
-
highlight_color:
|
|
1837
|
-
route:
|
|
1847
|
+
pcb_group_id: z78.string().optional(),
|
|
1848
|
+
subcircuit_id: z78.string().optional(),
|
|
1849
|
+
route_thickness_mode: z78.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
1850
|
+
route_order_index: z78.number().optional(),
|
|
1851
|
+
should_round_corners: z78.boolean().optional(),
|
|
1852
|
+
trace_length: z78.number().optional(),
|
|
1853
|
+
highlight_color: z78.string().optional(),
|
|
1854
|
+
route: z78.array(pcb_trace_route_point)
|
|
1838
1855
|
}).describe("Defines a trace on the PCB");
|
|
1839
1856
|
expectTypesMatch(true);
|
|
1840
1857
|
expectTypesMatch(true);
|
|
1841
1858
|
|
|
1842
1859
|
// src/pcb/pcb_trace_error.ts
|
|
1843
|
-
import { z as
|
|
1844
|
-
var pcb_trace_error =
|
|
1845
|
-
type:
|
|
1860
|
+
import { z as z79 } from "zod";
|
|
1861
|
+
var pcb_trace_error = z79.object({
|
|
1862
|
+
type: z79.literal("pcb_trace_error"),
|
|
1846
1863
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
1847
|
-
error_type:
|
|
1848
|
-
message:
|
|
1864
|
+
error_type: z79.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
1865
|
+
message: z79.string(),
|
|
1849
1866
|
center: point.optional(),
|
|
1850
|
-
pcb_trace_id:
|
|
1851
|
-
source_trace_id:
|
|
1852
|
-
pcb_component_ids:
|
|
1853
|
-
pcb_port_ids:
|
|
1854
|
-
subcircuit_id:
|
|
1867
|
+
pcb_trace_id: z79.string(),
|
|
1868
|
+
source_trace_id: z79.string(),
|
|
1869
|
+
pcb_component_ids: z79.array(z79.string()),
|
|
1870
|
+
pcb_port_ids: z79.array(z79.string()),
|
|
1871
|
+
subcircuit_id: z79.string().optional()
|
|
1855
1872
|
}).describe("Defines a trace error on the PCB");
|
|
1856
1873
|
expectTypesMatch(true);
|
|
1857
1874
|
|
|
1858
1875
|
// src/pcb/pcb_trace_missing_error.ts
|
|
1859
|
-
import { z as
|
|
1860
|
-
var pcb_trace_missing_error =
|
|
1861
|
-
type:
|
|
1876
|
+
import { z as z80 } from "zod";
|
|
1877
|
+
var pcb_trace_missing_error = z80.object({
|
|
1878
|
+
type: z80.literal("pcb_trace_missing_error"),
|
|
1862
1879
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
1863
1880
|
"pcb_trace_missing_error"
|
|
1864
1881
|
),
|
|
1865
|
-
error_type:
|
|
1866
|
-
message:
|
|
1882
|
+
error_type: z80.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
1883
|
+
message: z80.string(),
|
|
1867
1884
|
center: point.optional(),
|
|
1868
|
-
source_trace_id:
|
|
1869
|
-
pcb_component_ids:
|
|
1870
|
-
pcb_port_ids:
|
|
1871
|
-
subcircuit_id:
|
|
1885
|
+
source_trace_id: z80.string(),
|
|
1886
|
+
pcb_component_ids: z80.array(z80.string()),
|
|
1887
|
+
pcb_port_ids: z80.array(z80.string()),
|
|
1888
|
+
subcircuit_id: z80.string().optional()
|
|
1872
1889
|
}).describe(
|
|
1873
1890
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
1874
1891
|
);
|
|
1875
1892
|
expectTypesMatch(true);
|
|
1876
1893
|
|
|
1877
1894
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
1878
|
-
import { z as
|
|
1879
|
-
var pcb_port_not_matched_error =
|
|
1880
|
-
type:
|
|
1895
|
+
import { z as z81 } from "zod";
|
|
1896
|
+
var pcb_port_not_matched_error = z81.object({
|
|
1897
|
+
type: z81.literal("pcb_port_not_matched_error"),
|
|
1881
1898
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1882
|
-
error_type:
|
|
1883
|
-
message:
|
|
1884
|
-
pcb_component_ids:
|
|
1885
|
-
subcircuit_id:
|
|
1899
|
+
error_type: z81.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
1900
|
+
message: z81.string(),
|
|
1901
|
+
pcb_component_ids: z81.array(z81.string()),
|
|
1902
|
+
subcircuit_id: z81.string().optional()
|
|
1886
1903
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
1887
1904
|
expectTypesMatch(true);
|
|
1888
1905
|
|
|
1889
1906
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
1890
|
-
import { z as
|
|
1891
|
-
var pcb_port_not_connected_error =
|
|
1892
|
-
type:
|
|
1907
|
+
import { z as z82 } from "zod";
|
|
1908
|
+
var pcb_port_not_connected_error = z82.object({
|
|
1909
|
+
type: z82.literal("pcb_port_not_connected_error"),
|
|
1893
1910
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
1894
1911
|
"pcb_port_not_connected_error"
|
|
1895
1912
|
),
|
|
1896
|
-
error_type:
|
|
1897
|
-
message:
|
|
1898
|
-
pcb_port_ids:
|
|
1899
|
-
pcb_component_ids:
|
|
1900
|
-
subcircuit_id:
|
|
1913
|
+
error_type: z82.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
1914
|
+
message: z82.string(),
|
|
1915
|
+
pcb_port_ids: z82.array(z82.string()),
|
|
1916
|
+
pcb_component_ids: z82.array(z82.string()),
|
|
1917
|
+
subcircuit_id: z82.string().optional()
|
|
1901
1918
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
1902
1919
|
expectTypesMatch(
|
|
1903
1920
|
true
|
|
1904
1921
|
);
|
|
1905
1922
|
|
|
1906
1923
|
// src/pcb/pcb_net.ts
|
|
1907
|
-
import { z as
|
|
1908
|
-
var pcb_net =
|
|
1909
|
-
type:
|
|
1924
|
+
import { z as z83 } from "zod";
|
|
1925
|
+
var pcb_net = z83.object({
|
|
1926
|
+
type: z83.literal("pcb_net"),
|
|
1910
1927
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
1911
|
-
source_net_id:
|
|
1912
|
-
highlight_color:
|
|
1928
|
+
source_net_id: z83.string().optional(),
|
|
1929
|
+
highlight_color: z83.string().optional()
|
|
1913
1930
|
}).describe("Defines a net on the PCB");
|
|
1914
1931
|
expectTypesMatch(true);
|
|
1915
1932
|
|
|
1916
1933
|
// src/pcb/pcb_via.ts
|
|
1917
|
-
import { z as
|
|
1918
|
-
var pcb_via =
|
|
1919
|
-
type:
|
|
1934
|
+
import { z as z84 } from "zod";
|
|
1935
|
+
var pcb_via = z84.object({
|
|
1936
|
+
type: z84.literal("pcb_via"),
|
|
1920
1937
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
1921
|
-
pcb_group_id:
|
|
1922
|
-
subcircuit_id:
|
|
1923
|
-
subcircuit_connectivity_map_key:
|
|
1938
|
+
pcb_group_id: z84.string().optional(),
|
|
1939
|
+
subcircuit_id: z84.string().optional(),
|
|
1940
|
+
subcircuit_connectivity_map_key: z84.string().optional(),
|
|
1924
1941
|
x: distance,
|
|
1925
1942
|
y: distance,
|
|
1926
1943
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -1929,75 +1946,75 @@ var pcb_via = z83.object({
|
|
|
1929
1946
|
from_layer: layer_ref.optional(),
|
|
1930
1947
|
/** @deprecated */
|
|
1931
1948
|
to_layer: layer_ref.optional(),
|
|
1932
|
-
layers:
|
|
1933
|
-
pcb_trace_id:
|
|
1934
|
-
net_is_assignable:
|
|
1935
|
-
net_assigned:
|
|
1949
|
+
layers: z84.array(layer_ref),
|
|
1950
|
+
pcb_trace_id: z84.string().optional(),
|
|
1951
|
+
net_is_assignable: z84.boolean().optional(),
|
|
1952
|
+
net_assigned: z84.boolean().optional()
|
|
1936
1953
|
}).describe("Defines a via on the PCB");
|
|
1937
1954
|
expectTypesMatch(true);
|
|
1938
1955
|
|
|
1939
1956
|
// src/pcb/pcb_board.ts
|
|
1940
|
-
import { z as
|
|
1941
|
-
var pcb_board =
|
|
1942
|
-
type:
|
|
1957
|
+
import { z as z85 } from "zod";
|
|
1958
|
+
var pcb_board = z85.object({
|
|
1959
|
+
type: z85.literal("pcb_board"),
|
|
1943
1960
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
1944
|
-
pcb_panel_id:
|
|
1945
|
-
is_subcircuit:
|
|
1946
|
-
subcircuit_id:
|
|
1961
|
+
pcb_panel_id: z85.string().optional(),
|
|
1962
|
+
is_subcircuit: z85.boolean().optional(),
|
|
1963
|
+
subcircuit_id: z85.string().optional(),
|
|
1947
1964
|
width: length.optional(),
|
|
1948
1965
|
height: length.optional(),
|
|
1949
1966
|
center: point,
|
|
1950
1967
|
thickness: length.optional().default(1.4),
|
|
1951
|
-
num_layers:
|
|
1952
|
-
outline:
|
|
1953
|
-
shape:
|
|
1954
|
-
material:
|
|
1968
|
+
num_layers: z85.number().optional().default(4),
|
|
1969
|
+
outline: z85.array(point).optional(),
|
|
1970
|
+
shape: z85.enum(["rect", "polygon"]).optional(),
|
|
1971
|
+
material: z85.enum(["fr4", "fr1"]).default("fr4")
|
|
1955
1972
|
}).describe("Defines the board outline of the PCB");
|
|
1956
1973
|
expectTypesMatch(true);
|
|
1957
1974
|
|
|
1958
1975
|
// src/pcb/pcb_panel.ts
|
|
1959
|
-
import { z as
|
|
1960
|
-
var pcb_panel =
|
|
1961
|
-
type:
|
|
1976
|
+
import { z as z86 } from "zod";
|
|
1977
|
+
var pcb_panel = z86.object({
|
|
1978
|
+
type: z86.literal("pcb_panel"),
|
|
1962
1979
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
1963
1980
|
width: length,
|
|
1964
1981
|
height: length,
|
|
1965
1982
|
center: point,
|
|
1966
|
-
covered_with_solder_mask:
|
|
1983
|
+
covered_with_solder_mask: z86.boolean().optional().default(true)
|
|
1967
1984
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
1968
1985
|
expectTypesMatch(true);
|
|
1969
1986
|
|
|
1970
1987
|
// src/pcb/pcb_placement_error.ts
|
|
1971
|
-
import { z as
|
|
1972
|
-
var pcb_placement_error =
|
|
1973
|
-
type:
|
|
1988
|
+
import { z as z87 } from "zod";
|
|
1989
|
+
var pcb_placement_error = z87.object({
|
|
1990
|
+
type: z87.literal("pcb_placement_error"),
|
|
1974
1991
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
1975
|
-
error_type:
|
|
1976
|
-
message:
|
|
1977
|
-
subcircuit_id:
|
|
1992
|
+
error_type: z87.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
1993
|
+
message: z87.string(),
|
|
1994
|
+
subcircuit_id: z87.string().optional()
|
|
1978
1995
|
}).describe("Defines a placement error on the PCB");
|
|
1979
1996
|
expectTypesMatch(true);
|
|
1980
1997
|
|
|
1981
1998
|
// src/pcb/pcb_trace_hint.ts
|
|
1982
|
-
import { z as
|
|
1983
|
-
var pcb_trace_hint =
|
|
1984
|
-
type:
|
|
1999
|
+
import { z as z88 } from "zod";
|
|
2000
|
+
var pcb_trace_hint = z88.object({
|
|
2001
|
+
type: z88.literal("pcb_trace_hint"),
|
|
1985
2002
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
1986
|
-
pcb_port_id:
|
|
1987
|
-
pcb_component_id:
|
|
1988
|
-
route:
|
|
1989
|
-
subcircuit_id:
|
|
2003
|
+
pcb_port_id: z88.string(),
|
|
2004
|
+
pcb_component_id: z88.string(),
|
|
2005
|
+
route: z88.array(route_hint_point),
|
|
2006
|
+
subcircuit_id: z88.string().optional()
|
|
1990
2007
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
1991
2008
|
expectTypesMatch(true);
|
|
1992
2009
|
|
|
1993
2010
|
// src/pcb/pcb_silkscreen_line.ts
|
|
1994
|
-
import { z as
|
|
1995
|
-
var pcb_silkscreen_line =
|
|
1996
|
-
type:
|
|
2011
|
+
import { z as z89 } from "zod";
|
|
2012
|
+
var pcb_silkscreen_line = z89.object({
|
|
2013
|
+
type: z89.literal("pcb_silkscreen_line"),
|
|
1997
2014
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
1998
|
-
pcb_component_id:
|
|
1999
|
-
pcb_group_id:
|
|
2000
|
-
subcircuit_id:
|
|
2015
|
+
pcb_component_id: z89.string(),
|
|
2016
|
+
pcb_group_id: z89.string().optional(),
|
|
2017
|
+
subcircuit_id: z89.string().optional(),
|
|
2001
2018
|
stroke_width: distance.default("0.1mm"),
|
|
2002
2019
|
x1: distance,
|
|
2003
2020
|
y1: distance,
|
|
@@ -2008,32 +2025,32 @@ var pcb_silkscreen_line = z88.object({
|
|
|
2008
2025
|
expectTypesMatch(true);
|
|
2009
2026
|
|
|
2010
2027
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2011
|
-
import { z as
|
|
2012
|
-
var pcb_silkscreen_path =
|
|
2013
|
-
type:
|
|
2028
|
+
import { z as z90 } from "zod";
|
|
2029
|
+
var pcb_silkscreen_path = z90.object({
|
|
2030
|
+
type: z90.literal("pcb_silkscreen_path"),
|
|
2014
2031
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2015
|
-
pcb_component_id:
|
|
2016
|
-
pcb_group_id:
|
|
2017
|
-
subcircuit_id:
|
|
2032
|
+
pcb_component_id: z90.string(),
|
|
2033
|
+
pcb_group_id: z90.string().optional(),
|
|
2034
|
+
subcircuit_id: z90.string().optional(),
|
|
2018
2035
|
layer: visible_layer,
|
|
2019
|
-
route:
|
|
2036
|
+
route: z90.array(point),
|
|
2020
2037
|
stroke_width: length
|
|
2021
2038
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2022
2039
|
expectTypesMatch(true);
|
|
2023
2040
|
|
|
2024
2041
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2025
|
-
import { z as
|
|
2026
|
-
var pcb_silkscreen_text =
|
|
2027
|
-
type:
|
|
2042
|
+
import { z as z91 } from "zod";
|
|
2043
|
+
var pcb_silkscreen_text = z91.object({
|
|
2044
|
+
type: z91.literal("pcb_silkscreen_text"),
|
|
2028
2045
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2029
|
-
pcb_group_id:
|
|
2030
|
-
subcircuit_id:
|
|
2031
|
-
font:
|
|
2046
|
+
pcb_group_id: z91.string().optional(),
|
|
2047
|
+
subcircuit_id: z91.string().optional(),
|
|
2048
|
+
font: z91.literal("tscircuit2024").default("tscircuit2024"),
|
|
2032
2049
|
font_size: distance.default("0.2mm"),
|
|
2033
|
-
pcb_component_id:
|
|
2034
|
-
text:
|
|
2035
|
-
is_knockout:
|
|
2036
|
-
knockout_padding:
|
|
2050
|
+
pcb_component_id: z91.string(),
|
|
2051
|
+
text: z91.string(),
|
|
2052
|
+
is_knockout: z91.boolean().default(false).optional(),
|
|
2053
|
+
knockout_padding: z91.object({
|
|
2037
2054
|
left: length,
|
|
2038
2055
|
top: length,
|
|
2039
2056
|
bottom: length,
|
|
@@ -2044,27 +2061,27 @@ var pcb_silkscreen_text = z90.object({
|
|
|
2044
2061
|
bottom: "0.2mm",
|
|
2045
2062
|
right: "0.2mm"
|
|
2046
2063
|
}).optional(),
|
|
2047
|
-
ccw_rotation:
|
|
2064
|
+
ccw_rotation: z91.number().optional(),
|
|
2048
2065
|
layer: layer_ref,
|
|
2049
|
-
is_mirrored:
|
|
2066
|
+
is_mirrored: z91.boolean().default(false).optional(),
|
|
2050
2067
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2051
2068
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2052
2069
|
}).describe("Defines silkscreen text on the PCB");
|
|
2053
2070
|
expectTypesMatch(true);
|
|
2054
2071
|
|
|
2055
2072
|
// src/pcb/pcb_copper_text.ts
|
|
2056
|
-
import { z as
|
|
2057
|
-
var pcb_copper_text =
|
|
2058
|
-
type:
|
|
2073
|
+
import { z as z92 } from "zod";
|
|
2074
|
+
var pcb_copper_text = z92.object({
|
|
2075
|
+
type: z92.literal("pcb_copper_text"),
|
|
2059
2076
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2060
|
-
pcb_group_id:
|
|
2061
|
-
subcircuit_id:
|
|
2062
|
-
font:
|
|
2077
|
+
pcb_group_id: z92.string().optional(),
|
|
2078
|
+
subcircuit_id: z92.string().optional(),
|
|
2079
|
+
font: z92.literal("tscircuit2024").default("tscircuit2024"),
|
|
2063
2080
|
font_size: distance.default("0.2mm"),
|
|
2064
|
-
pcb_component_id:
|
|
2065
|
-
text:
|
|
2066
|
-
is_knockout:
|
|
2067
|
-
knockout_padding:
|
|
2081
|
+
pcb_component_id: z92.string(),
|
|
2082
|
+
text: z92.string(),
|
|
2083
|
+
is_knockout: z92.boolean().default(false).optional(),
|
|
2084
|
+
knockout_padding: z92.object({
|
|
2068
2085
|
left: length,
|
|
2069
2086
|
top: length,
|
|
2070
2087
|
bottom: length,
|
|
@@ -2075,44 +2092,44 @@ var pcb_copper_text = z91.object({
|
|
|
2075
2092
|
bottom: "0.2mm",
|
|
2076
2093
|
right: "0.2mm"
|
|
2077
2094
|
}).optional(),
|
|
2078
|
-
ccw_rotation:
|
|
2095
|
+
ccw_rotation: z92.number().optional(),
|
|
2079
2096
|
layer: layer_ref,
|
|
2080
|
-
is_mirrored:
|
|
2097
|
+
is_mirrored: z92.boolean().default(false).optional(),
|
|
2081
2098
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2082
2099
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2083
2100
|
}).describe("Defines copper text on the PCB");
|
|
2084
2101
|
expectTypesMatch(true);
|
|
2085
2102
|
|
|
2086
2103
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2087
|
-
import { z as
|
|
2088
|
-
var pcb_silkscreen_rect =
|
|
2089
|
-
type:
|
|
2104
|
+
import { z as z93 } from "zod";
|
|
2105
|
+
var pcb_silkscreen_rect = z93.object({
|
|
2106
|
+
type: z93.literal("pcb_silkscreen_rect"),
|
|
2090
2107
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2091
|
-
pcb_component_id:
|
|
2092
|
-
pcb_group_id:
|
|
2093
|
-
subcircuit_id:
|
|
2108
|
+
pcb_component_id: z93.string(),
|
|
2109
|
+
pcb_group_id: z93.string().optional(),
|
|
2110
|
+
subcircuit_id: z93.string().optional(),
|
|
2094
2111
|
center: point,
|
|
2095
2112
|
width: length,
|
|
2096
2113
|
height: length,
|
|
2097
2114
|
layer: layer_ref,
|
|
2098
2115
|
stroke_width: length.default("1mm"),
|
|
2099
2116
|
corner_radius: length.optional(),
|
|
2100
|
-
is_filled:
|
|
2101
|
-
has_stroke:
|
|
2102
|
-
is_stroke_dashed:
|
|
2117
|
+
is_filled: z93.boolean().default(true).optional(),
|
|
2118
|
+
has_stroke: z93.boolean().optional(),
|
|
2119
|
+
is_stroke_dashed: z93.boolean().optional()
|
|
2103
2120
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2104
2121
|
expectTypesMatch(true);
|
|
2105
2122
|
|
|
2106
2123
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2107
|
-
import { z as
|
|
2108
|
-
var pcb_silkscreen_circle =
|
|
2109
|
-
type:
|
|
2124
|
+
import { z as z94 } from "zod";
|
|
2125
|
+
var pcb_silkscreen_circle = z94.object({
|
|
2126
|
+
type: z94.literal("pcb_silkscreen_circle"),
|
|
2110
2127
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2111
2128
|
"pcb_silkscreen_circle"
|
|
2112
2129
|
),
|
|
2113
|
-
pcb_component_id:
|
|
2114
|
-
pcb_group_id:
|
|
2115
|
-
subcircuit_id:
|
|
2130
|
+
pcb_component_id: z94.string(),
|
|
2131
|
+
pcb_group_id: z94.string().optional(),
|
|
2132
|
+
subcircuit_id: z94.string().optional(),
|
|
2116
2133
|
center: point,
|
|
2117
2134
|
radius: length,
|
|
2118
2135
|
layer: visible_layer,
|
|
@@ -2121,13 +2138,13 @@ var pcb_silkscreen_circle = z93.object({
|
|
|
2121
2138
|
expectTypesMatch(true);
|
|
2122
2139
|
|
|
2123
2140
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2124
|
-
import { z as
|
|
2125
|
-
var pcb_silkscreen_oval =
|
|
2126
|
-
type:
|
|
2141
|
+
import { z as z95 } from "zod";
|
|
2142
|
+
var pcb_silkscreen_oval = z95.object({
|
|
2143
|
+
type: z95.literal("pcb_silkscreen_oval"),
|
|
2127
2144
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2128
|
-
pcb_component_id:
|
|
2129
|
-
pcb_group_id:
|
|
2130
|
-
subcircuit_id:
|
|
2145
|
+
pcb_component_id: z95.string(),
|
|
2146
|
+
pcb_group_id: z95.string().optional(),
|
|
2147
|
+
subcircuit_id: z95.string().optional(),
|
|
2131
2148
|
center: point,
|
|
2132
2149
|
radius_x: distance,
|
|
2133
2150
|
radius_y: distance,
|
|
@@ -2136,257 +2153,257 @@ var pcb_silkscreen_oval = z94.object({
|
|
|
2136
2153
|
expectTypesMatch(true);
|
|
2137
2154
|
|
|
2138
2155
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2139
|
-
import { z as
|
|
2140
|
-
var pcb_fabrication_note_text =
|
|
2141
|
-
type:
|
|
2156
|
+
import { z as z96 } from "zod";
|
|
2157
|
+
var pcb_fabrication_note_text = z96.object({
|
|
2158
|
+
type: z96.literal("pcb_fabrication_note_text"),
|
|
2142
2159
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2143
2160
|
"pcb_fabrication_note_text"
|
|
2144
2161
|
),
|
|
2145
|
-
subcircuit_id:
|
|
2146
|
-
pcb_group_id:
|
|
2147
|
-
font:
|
|
2162
|
+
subcircuit_id: z96.string().optional(),
|
|
2163
|
+
pcb_group_id: z96.string().optional(),
|
|
2164
|
+
font: z96.literal("tscircuit2024").default("tscircuit2024"),
|
|
2148
2165
|
font_size: distance.default("1mm"),
|
|
2149
|
-
pcb_component_id:
|
|
2150
|
-
text:
|
|
2166
|
+
pcb_component_id: z96.string(),
|
|
2167
|
+
text: z96.string(),
|
|
2151
2168
|
layer: visible_layer,
|
|
2152
2169
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2153
|
-
anchor_alignment:
|
|
2154
|
-
color:
|
|
2170
|
+
anchor_alignment: z96.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2171
|
+
color: z96.string().optional()
|
|
2155
2172
|
}).describe(
|
|
2156
2173
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2157
2174
|
);
|
|
2158
2175
|
expectTypesMatch(true);
|
|
2159
2176
|
|
|
2160
2177
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2161
|
-
import { z as
|
|
2162
|
-
var pcb_fabrication_note_path =
|
|
2163
|
-
type:
|
|
2178
|
+
import { z as z97 } from "zod";
|
|
2179
|
+
var pcb_fabrication_note_path = z97.object({
|
|
2180
|
+
type: z97.literal("pcb_fabrication_note_path"),
|
|
2164
2181
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2165
2182
|
"pcb_fabrication_note_path"
|
|
2166
2183
|
),
|
|
2167
|
-
pcb_component_id:
|
|
2168
|
-
subcircuit_id:
|
|
2184
|
+
pcb_component_id: z97.string(),
|
|
2185
|
+
subcircuit_id: z97.string().optional(),
|
|
2169
2186
|
layer: layer_ref,
|
|
2170
|
-
route:
|
|
2187
|
+
route: z97.array(point),
|
|
2171
2188
|
stroke_width: length,
|
|
2172
|
-
color:
|
|
2189
|
+
color: z97.string().optional()
|
|
2173
2190
|
}).describe(
|
|
2174
2191
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2175
2192
|
);
|
|
2176
2193
|
expectTypesMatch(true);
|
|
2177
2194
|
|
|
2178
2195
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2179
|
-
import { z as
|
|
2180
|
-
var pcb_fabrication_note_rect =
|
|
2181
|
-
type:
|
|
2196
|
+
import { z as z98 } from "zod";
|
|
2197
|
+
var pcb_fabrication_note_rect = z98.object({
|
|
2198
|
+
type: z98.literal("pcb_fabrication_note_rect"),
|
|
2182
2199
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2183
2200
|
"pcb_fabrication_note_rect"
|
|
2184
2201
|
),
|
|
2185
|
-
pcb_component_id:
|
|
2186
|
-
pcb_group_id:
|
|
2187
|
-
subcircuit_id:
|
|
2202
|
+
pcb_component_id: z98.string(),
|
|
2203
|
+
pcb_group_id: z98.string().optional(),
|
|
2204
|
+
subcircuit_id: z98.string().optional(),
|
|
2188
2205
|
center: point,
|
|
2189
2206
|
width: length,
|
|
2190
2207
|
height: length,
|
|
2191
2208
|
layer: visible_layer,
|
|
2192
2209
|
stroke_width: length.default("0.1mm"),
|
|
2193
2210
|
corner_radius: length.optional(),
|
|
2194
|
-
is_filled:
|
|
2195
|
-
has_stroke:
|
|
2196
|
-
is_stroke_dashed:
|
|
2197
|
-
color:
|
|
2211
|
+
is_filled: z98.boolean().optional(),
|
|
2212
|
+
has_stroke: z98.boolean().optional(),
|
|
2213
|
+
is_stroke_dashed: z98.boolean().optional(),
|
|
2214
|
+
color: z98.string().optional()
|
|
2198
2215
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2199
2216
|
expectTypesMatch(true);
|
|
2200
2217
|
|
|
2201
2218
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2202
|
-
import { z as
|
|
2203
|
-
var pcb_fabrication_note_dimension =
|
|
2204
|
-
type:
|
|
2219
|
+
import { z as z99 } from "zod";
|
|
2220
|
+
var pcb_fabrication_note_dimension = z99.object({
|
|
2221
|
+
type: z99.literal("pcb_fabrication_note_dimension"),
|
|
2205
2222
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2206
2223
|
"pcb_fabrication_note_dimension"
|
|
2207
2224
|
),
|
|
2208
|
-
pcb_component_id:
|
|
2209
|
-
pcb_group_id:
|
|
2210
|
-
subcircuit_id:
|
|
2225
|
+
pcb_component_id: z99.string(),
|
|
2226
|
+
pcb_group_id: z99.string().optional(),
|
|
2227
|
+
subcircuit_id: z99.string().optional(),
|
|
2211
2228
|
layer: visible_layer,
|
|
2212
2229
|
from: point,
|
|
2213
2230
|
to: point,
|
|
2214
|
-
text:
|
|
2215
|
-
text_ccw_rotation:
|
|
2231
|
+
text: z99.string().optional(),
|
|
2232
|
+
text_ccw_rotation: z99.number().optional(),
|
|
2216
2233
|
offset: length.optional(),
|
|
2217
2234
|
offset_distance: length.optional(),
|
|
2218
|
-
offset_direction:
|
|
2219
|
-
x:
|
|
2220
|
-
y:
|
|
2235
|
+
offset_direction: z99.object({
|
|
2236
|
+
x: z99.number(),
|
|
2237
|
+
y: z99.number()
|
|
2221
2238
|
}).optional(),
|
|
2222
|
-
font:
|
|
2239
|
+
font: z99.literal("tscircuit2024").default("tscircuit2024"),
|
|
2223
2240
|
font_size: length.default("1mm"),
|
|
2224
|
-
color:
|
|
2241
|
+
color: z99.string().optional(),
|
|
2225
2242
|
arrow_size: length.default("1mm")
|
|
2226
2243
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2227
2244
|
expectTypesMatch(true);
|
|
2228
2245
|
|
|
2229
2246
|
// src/pcb/pcb_note_text.ts
|
|
2230
|
-
import { z as z99 } from "zod";
|
|
2231
|
-
var pcb_note_text = z99.object({
|
|
2232
|
-
type: z99.literal("pcb_note_text"),
|
|
2233
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2234
|
-
pcb_component_id: z99.string().optional(),
|
|
2235
|
-
pcb_group_id: z99.string().optional(),
|
|
2236
|
-
subcircuit_id: z99.string().optional(),
|
|
2237
|
-
name: z99.string().optional(),
|
|
2238
|
-
font: z99.literal("tscircuit2024").default("tscircuit2024"),
|
|
2239
|
-
font_size: distance.default("1mm"),
|
|
2240
|
-
text: z99.string().optional(),
|
|
2241
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2242
|
-
anchor_alignment: z99.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2243
|
-
color: z99.string().optional()
|
|
2244
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
2245
|
-
expectTypesMatch(true);
|
|
2246
|
-
|
|
2247
|
-
// src/pcb/pcb_note_rect.ts
|
|
2248
2247
|
import { z as z100 } from "zod";
|
|
2249
|
-
var
|
|
2250
|
-
type: z100.literal("
|
|
2251
|
-
|
|
2248
|
+
var pcb_note_text = z100.object({
|
|
2249
|
+
type: z100.literal("pcb_note_text"),
|
|
2250
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2252
2251
|
pcb_component_id: z100.string().optional(),
|
|
2253
2252
|
pcb_group_id: z100.string().optional(),
|
|
2254
2253
|
subcircuit_id: z100.string().optional(),
|
|
2255
2254
|
name: z100.string().optional(),
|
|
2255
|
+
font: z100.literal("tscircuit2024").default("tscircuit2024"),
|
|
2256
|
+
font_size: distance.default("1mm"),
|
|
2256
2257
|
text: z100.string().optional(),
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
height: length,
|
|
2260
|
-
stroke_width: length.default("0.1mm"),
|
|
2261
|
-
corner_radius: length.optional(),
|
|
2262
|
-
is_filled: z100.boolean().optional(),
|
|
2263
|
-
has_stroke: z100.boolean().optional(),
|
|
2264
|
-
is_stroke_dashed: z100.boolean().optional(),
|
|
2258
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2259
|
+
anchor_alignment: z100.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2265
2260
|
color: z100.string().optional()
|
|
2266
|
-
}).describe("Defines a
|
|
2261
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
2267
2262
|
expectTypesMatch(true);
|
|
2268
2263
|
|
|
2269
|
-
// src/pcb/
|
|
2264
|
+
// src/pcb/pcb_note_rect.ts
|
|
2270
2265
|
import { z as z101 } from "zod";
|
|
2271
|
-
var
|
|
2272
|
-
type: z101.literal("
|
|
2273
|
-
|
|
2266
|
+
var pcb_note_rect = z101.object({
|
|
2267
|
+
type: z101.literal("pcb_note_rect"),
|
|
2268
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2274
2269
|
pcb_component_id: z101.string().optional(),
|
|
2275
2270
|
pcb_group_id: z101.string().optional(),
|
|
2276
2271
|
subcircuit_id: z101.string().optional(),
|
|
2277
2272
|
name: z101.string().optional(),
|
|
2278
2273
|
text: z101.string().optional(),
|
|
2279
|
-
|
|
2274
|
+
center: point,
|
|
2275
|
+
width: length,
|
|
2276
|
+
height: length,
|
|
2280
2277
|
stroke_width: length.default("0.1mm"),
|
|
2278
|
+
corner_radius: length.optional(),
|
|
2279
|
+
is_filled: z101.boolean().optional(),
|
|
2280
|
+
has_stroke: z101.boolean().optional(),
|
|
2281
|
+
is_stroke_dashed: z101.boolean().optional(),
|
|
2281
2282
|
color: z101.string().optional()
|
|
2282
|
-
}).describe("Defines a
|
|
2283
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2283
2284
|
expectTypesMatch(true);
|
|
2284
2285
|
|
|
2285
|
-
// src/pcb/
|
|
2286
|
+
// src/pcb/pcb_note_path.ts
|
|
2286
2287
|
import { z as z102 } from "zod";
|
|
2287
|
-
var
|
|
2288
|
-
type: z102.literal("
|
|
2289
|
-
|
|
2288
|
+
var pcb_note_path = z102.object({
|
|
2289
|
+
type: z102.literal("pcb_note_path"),
|
|
2290
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2290
2291
|
pcb_component_id: z102.string().optional(),
|
|
2291
2292
|
pcb_group_id: z102.string().optional(),
|
|
2292
2293
|
subcircuit_id: z102.string().optional(),
|
|
2293
2294
|
name: z102.string().optional(),
|
|
2294
2295
|
text: z102.string().optional(),
|
|
2296
|
+
route: z102.array(point),
|
|
2297
|
+
stroke_width: length.default("0.1mm"),
|
|
2298
|
+
color: z102.string().optional()
|
|
2299
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
2300
|
+
expectTypesMatch(true);
|
|
2301
|
+
|
|
2302
|
+
// src/pcb/pcb_note_line.ts
|
|
2303
|
+
import { z as z103 } from "zod";
|
|
2304
|
+
var pcb_note_line = z103.object({
|
|
2305
|
+
type: z103.literal("pcb_note_line"),
|
|
2306
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2307
|
+
pcb_component_id: z103.string().optional(),
|
|
2308
|
+
pcb_group_id: z103.string().optional(),
|
|
2309
|
+
subcircuit_id: z103.string().optional(),
|
|
2310
|
+
name: z103.string().optional(),
|
|
2311
|
+
text: z103.string().optional(),
|
|
2295
2312
|
x1: distance,
|
|
2296
2313
|
y1: distance,
|
|
2297
2314
|
x2: distance,
|
|
2298
2315
|
y2: distance,
|
|
2299
2316
|
stroke_width: distance.default("0.1mm"),
|
|
2300
|
-
color:
|
|
2301
|
-
is_dashed:
|
|
2317
|
+
color: z103.string().optional(),
|
|
2318
|
+
is_dashed: z103.boolean().optional()
|
|
2302
2319
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2303
2320
|
expectTypesMatch(true);
|
|
2304
2321
|
|
|
2305
2322
|
// src/pcb/pcb_note_dimension.ts
|
|
2306
|
-
import { z as
|
|
2307
|
-
var pcb_note_dimension =
|
|
2308
|
-
type:
|
|
2323
|
+
import { z as z104 } from "zod";
|
|
2324
|
+
var pcb_note_dimension = z104.object({
|
|
2325
|
+
type: z104.literal("pcb_note_dimension"),
|
|
2309
2326
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2310
|
-
pcb_component_id:
|
|
2311
|
-
pcb_group_id:
|
|
2312
|
-
subcircuit_id:
|
|
2313
|
-
name:
|
|
2327
|
+
pcb_component_id: z104.string().optional(),
|
|
2328
|
+
pcb_group_id: z104.string().optional(),
|
|
2329
|
+
subcircuit_id: z104.string().optional(),
|
|
2330
|
+
name: z104.string().optional(),
|
|
2314
2331
|
from: point,
|
|
2315
2332
|
to: point,
|
|
2316
|
-
text:
|
|
2317
|
-
text_ccw_rotation:
|
|
2333
|
+
text: z104.string().optional(),
|
|
2334
|
+
text_ccw_rotation: z104.number().optional(),
|
|
2318
2335
|
offset_distance: length.optional(),
|
|
2319
|
-
offset_direction:
|
|
2320
|
-
x:
|
|
2321
|
-
y:
|
|
2336
|
+
offset_direction: z104.object({
|
|
2337
|
+
x: z104.number(),
|
|
2338
|
+
y: z104.number()
|
|
2322
2339
|
}).optional(),
|
|
2323
|
-
font:
|
|
2340
|
+
font: z104.literal("tscircuit2024").default("tscircuit2024"),
|
|
2324
2341
|
font_size: length.default("1mm"),
|
|
2325
|
-
color:
|
|
2342
|
+
color: z104.string().optional(),
|
|
2326
2343
|
arrow_size: length.default("1mm")
|
|
2327
2344
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2328
2345
|
expectTypesMatch(true);
|
|
2329
2346
|
|
|
2330
2347
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2331
|
-
import { z as
|
|
2332
|
-
var pcb_footprint_overlap_error =
|
|
2333
|
-
type:
|
|
2348
|
+
import { z as z105 } from "zod";
|
|
2349
|
+
var pcb_footprint_overlap_error = z105.object({
|
|
2350
|
+
type: z105.literal("pcb_footprint_overlap_error"),
|
|
2334
2351
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2335
|
-
error_type:
|
|
2336
|
-
message:
|
|
2337
|
-
pcb_smtpad_ids:
|
|
2338
|
-
pcb_plated_hole_ids:
|
|
2339
|
-
pcb_hole_ids:
|
|
2340
|
-
pcb_keepout_ids:
|
|
2352
|
+
error_type: z105.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
2353
|
+
message: z105.string(),
|
|
2354
|
+
pcb_smtpad_ids: z105.array(z105.string()).optional(),
|
|
2355
|
+
pcb_plated_hole_ids: z105.array(z105.string()).optional(),
|
|
2356
|
+
pcb_hole_ids: z105.array(z105.string()).optional(),
|
|
2357
|
+
pcb_keepout_ids: z105.array(z105.string()).optional()
|
|
2341
2358
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2342
2359
|
expectTypesMatch(
|
|
2343
2360
|
true
|
|
2344
2361
|
);
|
|
2345
2362
|
|
|
2346
2363
|
// src/pcb/pcb_keepout.ts
|
|
2347
|
-
import { z as
|
|
2348
|
-
var pcb_keepout =
|
|
2349
|
-
type:
|
|
2350
|
-
shape:
|
|
2351
|
-
pcb_group_id:
|
|
2352
|
-
subcircuit_id:
|
|
2364
|
+
import { z as z106 } from "zod";
|
|
2365
|
+
var pcb_keepout = z106.object({
|
|
2366
|
+
type: z106.literal("pcb_keepout"),
|
|
2367
|
+
shape: z106.literal("rect"),
|
|
2368
|
+
pcb_group_id: z106.string().optional(),
|
|
2369
|
+
subcircuit_id: z106.string().optional(),
|
|
2353
2370
|
center: point,
|
|
2354
2371
|
width: distance,
|
|
2355
2372
|
height: distance,
|
|
2356
|
-
pcb_keepout_id:
|
|
2357
|
-
layers:
|
|
2373
|
+
pcb_keepout_id: z106.string(),
|
|
2374
|
+
layers: z106.array(z106.string()),
|
|
2358
2375
|
// Specify layers where the keepout applies
|
|
2359
|
-
description:
|
|
2376
|
+
description: z106.string().optional()
|
|
2360
2377
|
// Optional description of the keepout
|
|
2361
2378
|
}).or(
|
|
2362
|
-
|
|
2363
|
-
type:
|
|
2364
|
-
shape:
|
|
2365
|
-
pcb_group_id:
|
|
2366
|
-
subcircuit_id:
|
|
2379
|
+
z106.object({
|
|
2380
|
+
type: z106.literal("pcb_keepout"),
|
|
2381
|
+
shape: z106.literal("circle"),
|
|
2382
|
+
pcb_group_id: z106.string().optional(),
|
|
2383
|
+
subcircuit_id: z106.string().optional(),
|
|
2367
2384
|
center: point,
|
|
2368
2385
|
radius: distance,
|
|
2369
|
-
pcb_keepout_id:
|
|
2370
|
-
layers:
|
|
2386
|
+
pcb_keepout_id: z106.string(),
|
|
2387
|
+
layers: z106.array(z106.string()),
|
|
2371
2388
|
// Specify layers where the keepout applies
|
|
2372
|
-
description:
|
|
2389
|
+
description: z106.string().optional()
|
|
2373
2390
|
// Optional description of the keepout
|
|
2374
2391
|
})
|
|
2375
2392
|
);
|
|
2376
2393
|
expectTypesMatch(true);
|
|
2377
2394
|
|
|
2378
2395
|
// src/pcb/pcb_cutout.ts
|
|
2379
|
-
import { z as
|
|
2380
|
-
var pcb_cutout_base =
|
|
2381
|
-
type:
|
|
2396
|
+
import { z as z107 } from "zod";
|
|
2397
|
+
var pcb_cutout_base = z107.object({
|
|
2398
|
+
type: z107.literal("pcb_cutout"),
|
|
2382
2399
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2383
|
-
pcb_group_id:
|
|
2384
|
-
subcircuit_id:
|
|
2385
|
-
pcb_board_id:
|
|
2386
|
-
pcb_panel_id:
|
|
2400
|
+
pcb_group_id: z107.string().optional(),
|
|
2401
|
+
subcircuit_id: z107.string().optional(),
|
|
2402
|
+
pcb_board_id: z107.string().optional(),
|
|
2403
|
+
pcb_panel_id: z107.string().optional()
|
|
2387
2404
|
});
|
|
2388
2405
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2389
|
-
shape:
|
|
2406
|
+
shape: z107.literal("rect"),
|
|
2390
2407
|
center: point,
|
|
2391
2408
|
width: length,
|
|
2392
2409
|
height: length,
|
|
@@ -2395,26 +2412,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2395
2412
|
});
|
|
2396
2413
|
expectTypesMatch(true);
|
|
2397
2414
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2398
|
-
shape:
|
|
2415
|
+
shape: z107.literal("circle"),
|
|
2399
2416
|
center: point,
|
|
2400
2417
|
radius: length
|
|
2401
2418
|
});
|
|
2402
2419
|
expectTypesMatch(true);
|
|
2403
2420
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2404
|
-
shape:
|
|
2405
|
-
points:
|
|
2421
|
+
shape: z107.literal("polygon"),
|
|
2422
|
+
points: z107.array(point)
|
|
2406
2423
|
});
|
|
2407
2424
|
expectTypesMatch(true);
|
|
2408
2425
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
2409
|
-
shape:
|
|
2410
|
-
route:
|
|
2426
|
+
shape: z107.literal("path"),
|
|
2427
|
+
route: z107.array(point),
|
|
2411
2428
|
slot_width: length,
|
|
2412
2429
|
slot_length: length.optional(),
|
|
2413
2430
|
space_between_slots: length.optional(),
|
|
2414
2431
|
slot_corner_radius: length.optional()
|
|
2415
2432
|
});
|
|
2416
2433
|
expectTypesMatch(true);
|
|
2417
|
-
var pcb_cutout =
|
|
2434
|
+
var pcb_cutout = z107.discriminatedUnion("shape", [
|
|
2418
2435
|
pcb_cutout_rect,
|
|
2419
2436
|
pcb_cutout_circle,
|
|
2420
2437
|
pcb_cutout_polygon,
|
|
@@ -2423,121 +2440,121 @@ var pcb_cutout = z106.discriminatedUnion("shape", [
|
|
|
2423
2440
|
expectTypesMatch(true);
|
|
2424
2441
|
|
|
2425
2442
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2426
|
-
import { z as
|
|
2427
|
-
var pcb_missing_footprint_error =
|
|
2428
|
-
type:
|
|
2443
|
+
import { z as z108 } from "zod";
|
|
2444
|
+
var pcb_missing_footprint_error = z108.object({
|
|
2445
|
+
type: z108.literal("pcb_missing_footprint_error"),
|
|
2429
2446
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2430
2447
|
"pcb_missing_footprint_error"
|
|
2431
2448
|
),
|
|
2432
|
-
pcb_group_id:
|
|
2433
|
-
subcircuit_id:
|
|
2434
|
-
error_type:
|
|
2435
|
-
source_component_id:
|
|
2436
|
-
message:
|
|
2449
|
+
pcb_group_id: z108.string().optional(),
|
|
2450
|
+
subcircuit_id: z108.string().optional(),
|
|
2451
|
+
error_type: z108.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
2452
|
+
source_component_id: z108.string(),
|
|
2453
|
+
message: z108.string()
|
|
2437
2454
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2438
2455
|
expectTypesMatch(
|
|
2439
2456
|
true
|
|
2440
2457
|
);
|
|
2441
2458
|
|
|
2442
2459
|
// src/pcb/external_footprint_load_error.ts
|
|
2443
|
-
import { z as
|
|
2444
|
-
var external_footprint_load_error =
|
|
2445
|
-
type:
|
|
2460
|
+
import { z as z109 } from "zod";
|
|
2461
|
+
var external_footprint_load_error = z109.object({
|
|
2462
|
+
type: z109.literal("external_footprint_load_error"),
|
|
2446
2463
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2447
2464
|
"external_footprint_load_error"
|
|
2448
2465
|
),
|
|
2449
|
-
pcb_component_id:
|
|
2450
|
-
source_component_id:
|
|
2451
|
-
pcb_group_id:
|
|
2452
|
-
subcircuit_id:
|
|
2453
|
-
footprinter_string:
|
|
2454
|
-
error_type:
|
|
2455
|
-
message:
|
|
2466
|
+
pcb_component_id: z109.string(),
|
|
2467
|
+
source_component_id: z109.string(),
|
|
2468
|
+
pcb_group_id: z109.string().optional(),
|
|
2469
|
+
subcircuit_id: z109.string().optional(),
|
|
2470
|
+
footprinter_string: z109.string().optional(),
|
|
2471
|
+
error_type: z109.literal("external_footprint_load_error").default("external_footprint_load_error"),
|
|
2472
|
+
message: z109.string()
|
|
2456
2473
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2457
2474
|
expectTypesMatch(true);
|
|
2458
2475
|
|
|
2459
2476
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2460
|
-
import { z as
|
|
2461
|
-
var circuit_json_footprint_load_error =
|
|
2462
|
-
type:
|
|
2477
|
+
import { z as z110 } from "zod";
|
|
2478
|
+
var circuit_json_footprint_load_error = z110.object({
|
|
2479
|
+
type: z110.literal("circuit_json_footprint_load_error"),
|
|
2463
2480
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2464
2481
|
"circuit_json_footprint_load_error"
|
|
2465
2482
|
),
|
|
2466
|
-
pcb_component_id:
|
|
2467
|
-
source_component_id:
|
|
2468
|
-
pcb_group_id:
|
|
2469
|
-
subcircuit_id:
|
|
2470
|
-
error_type:
|
|
2471
|
-
message:
|
|
2472
|
-
circuit_json:
|
|
2483
|
+
pcb_component_id: z110.string(),
|
|
2484
|
+
source_component_id: z110.string(),
|
|
2485
|
+
pcb_group_id: z110.string().optional(),
|
|
2486
|
+
subcircuit_id: z110.string().optional(),
|
|
2487
|
+
error_type: z110.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
2488
|
+
message: z110.string(),
|
|
2489
|
+
circuit_json: z110.array(z110.any()).optional()
|
|
2473
2490
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
2474
2491
|
expectTypesMatch(true);
|
|
2475
2492
|
|
|
2476
2493
|
// src/pcb/pcb_group.ts
|
|
2477
|
-
import { z as
|
|
2478
|
-
var pcb_group =
|
|
2479
|
-
type:
|
|
2494
|
+
import { z as z111 } from "zod";
|
|
2495
|
+
var pcb_group = z111.object({
|
|
2496
|
+
type: z111.literal("pcb_group"),
|
|
2480
2497
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
2481
|
-
source_group_id:
|
|
2482
|
-
is_subcircuit:
|
|
2483
|
-
subcircuit_id:
|
|
2498
|
+
source_group_id: z111.string(),
|
|
2499
|
+
is_subcircuit: z111.boolean().optional(),
|
|
2500
|
+
subcircuit_id: z111.string().optional(),
|
|
2484
2501
|
width: length.optional(),
|
|
2485
2502
|
height: length.optional(),
|
|
2486
2503
|
center: point,
|
|
2487
|
-
outline:
|
|
2504
|
+
outline: z111.array(point).optional(),
|
|
2488
2505
|
anchor_position: point.optional(),
|
|
2489
|
-
anchor_alignment:
|
|
2490
|
-
pcb_component_ids:
|
|
2491
|
-
child_layout_mode:
|
|
2492
|
-
name:
|
|
2493
|
-
description:
|
|
2494
|
-
layout_mode:
|
|
2495
|
-
autorouter_configuration:
|
|
2506
|
+
anchor_alignment: z111.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).optional(),
|
|
2507
|
+
pcb_component_ids: z111.array(z111.string()),
|
|
2508
|
+
child_layout_mode: z111.enum(["packed", "none"]).optional(),
|
|
2509
|
+
name: z111.string().optional(),
|
|
2510
|
+
description: z111.string().optional(),
|
|
2511
|
+
layout_mode: z111.string().optional(),
|
|
2512
|
+
autorouter_configuration: z111.object({
|
|
2496
2513
|
trace_clearance: length
|
|
2497
2514
|
}).optional(),
|
|
2498
|
-
autorouter_used_string:
|
|
2515
|
+
autorouter_used_string: z111.string().optional()
|
|
2499
2516
|
}).describe("Defines a group of components on the PCB");
|
|
2500
2517
|
expectTypesMatch(true);
|
|
2501
2518
|
|
|
2502
2519
|
// src/pcb/pcb_autorouting_error.ts
|
|
2503
|
-
import { z as
|
|
2504
|
-
var pcb_autorouting_error =
|
|
2505
|
-
type:
|
|
2520
|
+
import { z as z112 } from "zod";
|
|
2521
|
+
var pcb_autorouting_error = z112.object({
|
|
2522
|
+
type: z112.literal("pcb_autorouting_error"),
|
|
2506
2523
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
2507
|
-
error_type:
|
|
2508
|
-
message:
|
|
2509
|
-
subcircuit_id:
|
|
2524
|
+
error_type: z112.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
2525
|
+
message: z112.string(),
|
|
2526
|
+
subcircuit_id: z112.string().optional()
|
|
2510
2527
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
2511
2528
|
expectTypesMatch(true);
|
|
2512
2529
|
|
|
2513
2530
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
2514
|
-
import { z as
|
|
2515
|
-
var pcb_manual_edit_conflict_warning =
|
|
2516
|
-
type:
|
|
2531
|
+
import { z as z113 } from "zod";
|
|
2532
|
+
var pcb_manual_edit_conflict_warning = z113.object({
|
|
2533
|
+
type: z113.literal("pcb_manual_edit_conflict_warning"),
|
|
2517
2534
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
2518
2535
|
"pcb_manual_edit_conflict_warning"
|
|
2519
2536
|
),
|
|
2520
|
-
warning_type:
|
|
2521
|
-
message:
|
|
2522
|
-
pcb_component_id:
|
|
2523
|
-
pcb_group_id:
|
|
2524
|
-
subcircuit_id:
|
|
2525
|
-
source_component_id:
|
|
2537
|
+
warning_type: z113.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
2538
|
+
message: z113.string(),
|
|
2539
|
+
pcb_component_id: z113.string(),
|
|
2540
|
+
pcb_group_id: z113.string().optional(),
|
|
2541
|
+
subcircuit_id: z113.string().optional(),
|
|
2542
|
+
source_component_id: z113.string()
|
|
2526
2543
|
}).describe(
|
|
2527
2544
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
2528
2545
|
);
|
|
2529
2546
|
expectTypesMatch(true);
|
|
2530
2547
|
|
|
2531
2548
|
// src/pcb/pcb_breakout_point.ts
|
|
2532
|
-
import { z as
|
|
2533
|
-
var pcb_breakout_point =
|
|
2534
|
-
type:
|
|
2549
|
+
import { z as z114 } from "zod";
|
|
2550
|
+
var pcb_breakout_point = z114.object({
|
|
2551
|
+
type: z114.literal("pcb_breakout_point"),
|
|
2535
2552
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
2536
|
-
pcb_group_id:
|
|
2537
|
-
subcircuit_id:
|
|
2538
|
-
source_trace_id:
|
|
2539
|
-
source_port_id:
|
|
2540
|
-
source_net_id:
|
|
2553
|
+
pcb_group_id: z114.string(),
|
|
2554
|
+
subcircuit_id: z114.string().optional(),
|
|
2555
|
+
source_trace_id: z114.string().optional(),
|
|
2556
|
+
source_port_id: z114.string().optional(),
|
|
2557
|
+
source_net_id: z114.string().optional(),
|
|
2541
2558
|
x: distance,
|
|
2542
2559
|
y: distance
|
|
2543
2560
|
}).describe(
|
|
@@ -2546,61 +2563,61 @@ var pcb_breakout_point = z113.object({
|
|
|
2546
2563
|
expectTypesMatch(true);
|
|
2547
2564
|
|
|
2548
2565
|
// src/pcb/pcb_ground_plane.ts
|
|
2549
|
-
import { z as
|
|
2550
|
-
var pcb_ground_plane =
|
|
2551
|
-
type:
|
|
2566
|
+
import { z as z115 } from "zod";
|
|
2567
|
+
var pcb_ground_plane = z115.object({
|
|
2568
|
+
type: z115.literal("pcb_ground_plane"),
|
|
2552
2569
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
2553
|
-
source_pcb_ground_plane_id:
|
|
2554
|
-
source_net_id:
|
|
2555
|
-
pcb_group_id:
|
|
2556
|
-
subcircuit_id:
|
|
2570
|
+
source_pcb_ground_plane_id: z115.string(),
|
|
2571
|
+
source_net_id: z115.string(),
|
|
2572
|
+
pcb_group_id: z115.string().optional(),
|
|
2573
|
+
subcircuit_id: z115.string().optional()
|
|
2557
2574
|
}).describe("Defines a ground plane on the PCB");
|
|
2558
2575
|
expectTypesMatch(true);
|
|
2559
2576
|
|
|
2560
2577
|
// src/pcb/pcb_ground_plane_region.ts
|
|
2561
|
-
import { z as
|
|
2562
|
-
var pcb_ground_plane_region =
|
|
2563
|
-
type:
|
|
2578
|
+
import { z as z116 } from "zod";
|
|
2579
|
+
var pcb_ground_plane_region = z116.object({
|
|
2580
|
+
type: z116.literal("pcb_ground_plane_region"),
|
|
2564
2581
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
2565
2582
|
"pcb_ground_plane_region"
|
|
2566
2583
|
),
|
|
2567
|
-
pcb_ground_plane_id:
|
|
2568
|
-
pcb_group_id:
|
|
2569
|
-
subcircuit_id:
|
|
2584
|
+
pcb_ground_plane_id: z116.string(),
|
|
2585
|
+
pcb_group_id: z116.string().optional(),
|
|
2586
|
+
subcircuit_id: z116.string().optional(),
|
|
2570
2587
|
layer: layer_ref,
|
|
2571
|
-
points:
|
|
2588
|
+
points: z116.array(point)
|
|
2572
2589
|
}).describe("Defines a polygon region of a ground plane");
|
|
2573
2590
|
expectTypesMatch(true);
|
|
2574
2591
|
|
|
2575
2592
|
// src/pcb/pcb_thermal_spoke.ts
|
|
2576
|
-
import { z as
|
|
2577
|
-
var pcb_thermal_spoke =
|
|
2578
|
-
type:
|
|
2593
|
+
import { z as z117 } from "zod";
|
|
2594
|
+
var pcb_thermal_spoke = z117.object({
|
|
2595
|
+
type: z117.literal("pcb_thermal_spoke"),
|
|
2579
2596
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
2580
|
-
pcb_ground_plane_id:
|
|
2581
|
-
shape:
|
|
2582
|
-
spoke_count:
|
|
2597
|
+
pcb_ground_plane_id: z117.string(),
|
|
2598
|
+
shape: z117.string(),
|
|
2599
|
+
spoke_count: z117.number(),
|
|
2583
2600
|
spoke_thickness: distance,
|
|
2584
2601
|
spoke_inner_diameter: distance,
|
|
2585
2602
|
spoke_outer_diameter: distance,
|
|
2586
|
-
pcb_plated_hole_id:
|
|
2587
|
-
subcircuit_id:
|
|
2603
|
+
pcb_plated_hole_id: z117.string().optional(),
|
|
2604
|
+
subcircuit_id: z117.string().optional()
|
|
2588
2605
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
2589
2606
|
expectTypesMatch(true);
|
|
2590
2607
|
|
|
2591
2608
|
// src/pcb/pcb_copper_pour.ts
|
|
2592
|
-
import { z as
|
|
2593
|
-
var pcb_copper_pour_base =
|
|
2594
|
-
type:
|
|
2609
|
+
import { z as z118 } from "zod";
|
|
2610
|
+
var pcb_copper_pour_base = z118.object({
|
|
2611
|
+
type: z118.literal("pcb_copper_pour"),
|
|
2595
2612
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
2596
|
-
pcb_group_id:
|
|
2597
|
-
subcircuit_id:
|
|
2613
|
+
pcb_group_id: z118.string().optional(),
|
|
2614
|
+
subcircuit_id: z118.string().optional(),
|
|
2598
2615
|
layer: layer_ref,
|
|
2599
|
-
source_net_id:
|
|
2600
|
-
covered_with_solder_mask:
|
|
2616
|
+
source_net_id: z118.string().optional(),
|
|
2617
|
+
covered_with_solder_mask: z118.boolean().optional().default(true)
|
|
2601
2618
|
});
|
|
2602
2619
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
2603
|
-
shape:
|
|
2620
|
+
shape: z118.literal("rect"),
|
|
2604
2621
|
center: point,
|
|
2605
2622
|
width: length,
|
|
2606
2623
|
height: length,
|
|
@@ -2608,16 +2625,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
2608
2625
|
});
|
|
2609
2626
|
expectTypesMatch(true);
|
|
2610
2627
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
2611
|
-
shape:
|
|
2628
|
+
shape: z118.literal("brep"),
|
|
2612
2629
|
brep_shape
|
|
2613
2630
|
});
|
|
2614
2631
|
expectTypesMatch(true);
|
|
2615
2632
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
2616
|
-
shape:
|
|
2617
|
-
points:
|
|
2633
|
+
shape: z118.literal("polygon"),
|
|
2634
|
+
points: z118.array(point)
|
|
2618
2635
|
});
|
|
2619
2636
|
expectTypesMatch(true);
|
|
2620
|
-
var pcb_copper_pour =
|
|
2637
|
+
var pcb_copper_pour = z118.discriminatedUnion("shape", [
|
|
2621
2638
|
pcb_copper_pour_rect,
|
|
2622
2639
|
pcb_copper_pour_brep,
|
|
2623
2640
|
pcb_copper_pour_polygon
|
|
@@ -2625,147 +2642,147 @@ var pcb_copper_pour = z117.discriminatedUnion("shape", [
|
|
|
2625
2642
|
expectTypesMatch(true);
|
|
2626
2643
|
|
|
2627
2644
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
2628
|
-
import { z as
|
|
2629
|
-
var pcb_component_outside_board_error =
|
|
2630
|
-
type:
|
|
2645
|
+
import { z as z119 } from "zod";
|
|
2646
|
+
var pcb_component_outside_board_error = z119.object({
|
|
2647
|
+
type: z119.literal("pcb_component_outside_board_error"),
|
|
2631
2648
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
2632
2649
|
"pcb_component_outside_board_error"
|
|
2633
2650
|
),
|
|
2634
|
-
error_type:
|
|
2635
|
-
message:
|
|
2636
|
-
pcb_component_id:
|
|
2637
|
-
pcb_board_id:
|
|
2651
|
+
error_type: z119.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
2652
|
+
message: z119.string(),
|
|
2653
|
+
pcb_component_id: z119.string(),
|
|
2654
|
+
pcb_board_id: z119.string(),
|
|
2638
2655
|
component_center: point,
|
|
2639
|
-
component_bounds:
|
|
2640
|
-
min_x:
|
|
2641
|
-
max_x:
|
|
2642
|
-
min_y:
|
|
2643
|
-
max_y:
|
|
2656
|
+
component_bounds: z119.object({
|
|
2657
|
+
min_x: z119.number(),
|
|
2658
|
+
max_x: z119.number(),
|
|
2659
|
+
min_y: z119.number(),
|
|
2660
|
+
max_y: z119.number()
|
|
2644
2661
|
}),
|
|
2645
|
-
subcircuit_id:
|
|
2646
|
-
source_component_id:
|
|
2662
|
+
subcircuit_id: z119.string().optional(),
|
|
2663
|
+
source_component_id: z119.string().optional()
|
|
2647
2664
|
}).describe(
|
|
2648
2665
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
2649
2666
|
);
|
|
2650
2667
|
expectTypesMatch(true);
|
|
2651
2668
|
|
|
2652
2669
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
2653
|
-
import { z as
|
|
2654
|
-
var pcb_component_invalid_layer_error =
|
|
2655
|
-
type:
|
|
2670
|
+
import { z as z120 } from "zod";
|
|
2671
|
+
var pcb_component_invalid_layer_error = z120.object({
|
|
2672
|
+
type: z120.literal("pcb_component_invalid_layer_error"),
|
|
2656
2673
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
2657
2674
|
"pcb_component_invalid_layer_error"
|
|
2658
2675
|
),
|
|
2659
|
-
error_type:
|
|
2660
|
-
message:
|
|
2661
|
-
pcb_component_id:
|
|
2662
|
-
source_component_id:
|
|
2676
|
+
error_type: z120.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
2677
|
+
message: z120.string(),
|
|
2678
|
+
pcb_component_id: z120.string().optional(),
|
|
2679
|
+
source_component_id: z120.string(),
|
|
2663
2680
|
layer: layer_ref,
|
|
2664
|
-
subcircuit_id:
|
|
2681
|
+
subcircuit_id: z120.string().optional()
|
|
2665
2682
|
}).describe(
|
|
2666
2683
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
2667
2684
|
);
|
|
2668
2685
|
expectTypesMatch(true);
|
|
2669
2686
|
|
|
2670
2687
|
// src/pcb/pcb_via_clearance_error.ts
|
|
2671
|
-
import { z as
|
|
2672
|
-
var pcb_via_clearance_error =
|
|
2673
|
-
type:
|
|
2688
|
+
import { z as z121 } from "zod";
|
|
2689
|
+
var pcb_via_clearance_error = z121.object({
|
|
2690
|
+
type: z121.literal("pcb_via_clearance_error"),
|
|
2674
2691
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2675
|
-
error_type:
|
|
2676
|
-
message:
|
|
2677
|
-
pcb_via_ids:
|
|
2692
|
+
error_type: z121.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
2693
|
+
message: z121.string(),
|
|
2694
|
+
pcb_via_ids: z121.array(z121.string()).min(2),
|
|
2678
2695
|
minimum_clearance: distance.optional(),
|
|
2679
2696
|
actual_clearance: distance.optional(),
|
|
2680
|
-
pcb_center:
|
|
2681
|
-
x:
|
|
2682
|
-
y:
|
|
2697
|
+
pcb_center: z121.object({
|
|
2698
|
+
x: z121.number().optional(),
|
|
2699
|
+
y: z121.number().optional()
|
|
2683
2700
|
}).optional(),
|
|
2684
|
-
subcircuit_id:
|
|
2701
|
+
subcircuit_id: z121.string().optional()
|
|
2685
2702
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
2686
2703
|
expectTypesMatch(true);
|
|
2687
2704
|
|
|
2688
2705
|
// src/pcb/pcb_courtyard_rect.ts
|
|
2689
|
-
import { z as
|
|
2690
|
-
var pcb_courtyard_rect =
|
|
2691
|
-
type:
|
|
2706
|
+
import { z as z122 } from "zod";
|
|
2707
|
+
var pcb_courtyard_rect = z122.object({
|
|
2708
|
+
type: z122.literal("pcb_courtyard_rect"),
|
|
2692
2709
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
2693
|
-
pcb_component_id:
|
|
2694
|
-
pcb_group_id:
|
|
2695
|
-
subcircuit_id:
|
|
2710
|
+
pcb_component_id: z122.string(),
|
|
2711
|
+
pcb_group_id: z122.string().optional(),
|
|
2712
|
+
subcircuit_id: z122.string().optional(),
|
|
2696
2713
|
center: point,
|
|
2697
2714
|
width: length,
|
|
2698
2715
|
height: length,
|
|
2699
2716
|
layer: visible_layer,
|
|
2700
|
-
color:
|
|
2717
|
+
color: z122.string().optional()
|
|
2701
2718
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
2702
2719
|
expectTypesMatch(true);
|
|
2703
2720
|
|
|
2704
2721
|
// src/pcb/pcb_courtyard_outline.ts
|
|
2705
|
-
import { z as
|
|
2706
|
-
var pcb_courtyard_outline =
|
|
2707
|
-
type:
|
|
2722
|
+
import { z as z123 } from "zod";
|
|
2723
|
+
var pcb_courtyard_outline = z123.object({
|
|
2724
|
+
type: z123.literal("pcb_courtyard_outline"),
|
|
2708
2725
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
2709
2726
|
"pcb_courtyard_outline"
|
|
2710
2727
|
),
|
|
2711
|
-
pcb_component_id:
|
|
2712
|
-
pcb_group_id:
|
|
2713
|
-
subcircuit_id:
|
|
2728
|
+
pcb_component_id: z123.string(),
|
|
2729
|
+
pcb_group_id: z123.string().optional(),
|
|
2730
|
+
subcircuit_id: z123.string().optional(),
|
|
2714
2731
|
layer: visible_layer,
|
|
2715
|
-
outline:
|
|
2732
|
+
outline: z123.array(point).min(2),
|
|
2716
2733
|
stroke_width: length.default("0.1mm"),
|
|
2717
|
-
is_closed:
|
|
2718
|
-
is_stroke_dashed:
|
|
2719
|
-
color:
|
|
2734
|
+
is_closed: z123.boolean().optional(),
|
|
2735
|
+
is_stroke_dashed: z123.boolean().optional(),
|
|
2736
|
+
color: z123.string().optional()
|
|
2720
2737
|
}).describe("Defines a courtyard outline on the PCB");
|
|
2721
2738
|
expectTypesMatch(true);
|
|
2722
2739
|
|
|
2723
2740
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
2724
|
-
import { z as
|
|
2725
|
-
var pcb_courtyard_polygon =
|
|
2726
|
-
type:
|
|
2741
|
+
import { z as z124 } from "zod";
|
|
2742
|
+
var pcb_courtyard_polygon = z124.object({
|
|
2743
|
+
type: z124.literal("pcb_courtyard_polygon"),
|
|
2727
2744
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
2728
2745
|
"pcb_courtyard_polygon"
|
|
2729
2746
|
),
|
|
2730
|
-
pcb_component_id:
|
|
2731
|
-
pcb_group_id:
|
|
2732
|
-
subcircuit_id:
|
|
2747
|
+
pcb_component_id: z124.string(),
|
|
2748
|
+
pcb_group_id: z124.string().optional(),
|
|
2749
|
+
subcircuit_id: z124.string().optional(),
|
|
2733
2750
|
layer: visible_layer,
|
|
2734
|
-
points:
|
|
2735
|
-
color:
|
|
2751
|
+
points: z124.array(point).min(3),
|
|
2752
|
+
color: z124.string().optional()
|
|
2736
2753
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
2737
2754
|
expectTypesMatch(true);
|
|
2738
2755
|
|
|
2739
2756
|
// src/cad/cad_component.ts
|
|
2740
|
-
import { z as
|
|
2741
|
-
var cad_component =
|
|
2742
|
-
type:
|
|
2743
|
-
cad_component_id:
|
|
2744
|
-
pcb_component_id:
|
|
2745
|
-
source_component_id:
|
|
2757
|
+
import { z as z125 } from "zod";
|
|
2758
|
+
var cad_component = z125.object({
|
|
2759
|
+
type: z125.literal("cad_component"),
|
|
2760
|
+
cad_component_id: z125.string(),
|
|
2761
|
+
pcb_component_id: z125.string(),
|
|
2762
|
+
source_component_id: z125.string(),
|
|
2746
2763
|
position: point3,
|
|
2747
2764
|
rotation: point3.optional(),
|
|
2748
2765
|
size: point3.optional(),
|
|
2749
2766
|
layer: layer_ref.optional(),
|
|
2750
|
-
subcircuit_id:
|
|
2767
|
+
subcircuit_id: z125.string().optional(),
|
|
2751
2768
|
// These are all ways to generate/load the 3d model
|
|
2752
|
-
footprinter_string:
|
|
2753
|
-
model_obj_url:
|
|
2754
|
-
model_stl_url:
|
|
2755
|
-
model_3mf_url:
|
|
2756
|
-
model_gltf_url:
|
|
2757
|
-
model_glb_url:
|
|
2758
|
-
model_step_url:
|
|
2759
|
-
model_wrl_url:
|
|
2760
|
-
model_unit_to_mm_scale_factor:
|
|
2761
|
-
model_jscad:
|
|
2769
|
+
footprinter_string: z125.string().optional(),
|
|
2770
|
+
model_obj_url: z125.string().optional(),
|
|
2771
|
+
model_stl_url: z125.string().optional(),
|
|
2772
|
+
model_3mf_url: z125.string().optional(),
|
|
2773
|
+
model_gltf_url: z125.string().optional(),
|
|
2774
|
+
model_glb_url: z125.string().optional(),
|
|
2775
|
+
model_step_url: z125.string().optional(),
|
|
2776
|
+
model_wrl_url: z125.string().optional(),
|
|
2777
|
+
model_unit_to_mm_scale_factor: z125.number().optional(),
|
|
2778
|
+
model_jscad: z125.any().optional()
|
|
2762
2779
|
}).describe("Defines a component on the PCB");
|
|
2763
2780
|
expectTypesMatch(true);
|
|
2764
2781
|
|
|
2765
2782
|
// src/simulation/simulation_voltage_source.ts
|
|
2766
|
-
import { z as
|
|
2767
|
-
var wave_shape =
|
|
2768
|
-
var percentage =
|
|
2783
|
+
import { z as z126 } from "zod";
|
|
2784
|
+
var wave_shape = z126.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
2785
|
+
var percentage = z126.union([z126.string(), z126.number()]).transform((val) => {
|
|
2769
2786
|
if (typeof val === "string") {
|
|
2770
2787
|
if (val.endsWith("%")) {
|
|
2771
2788
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -2774,30 +2791,30 @@ var percentage = z125.union([z125.string(), z125.number()]).transform((val) => {
|
|
|
2774
2791
|
}
|
|
2775
2792
|
return val;
|
|
2776
2793
|
}).pipe(
|
|
2777
|
-
|
|
2794
|
+
z126.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
2778
2795
|
);
|
|
2779
|
-
var simulation_dc_voltage_source =
|
|
2780
|
-
type:
|
|
2796
|
+
var simulation_dc_voltage_source = z126.object({
|
|
2797
|
+
type: z126.literal("simulation_voltage_source"),
|
|
2781
2798
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2782
2799
|
"simulation_voltage_source"
|
|
2783
2800
|
),
|
|
2784
|
-
is_dc_source:
|
|
2785
|
-
positive_source_port_id:
|
|
2786
|
-
negative_source_port_id:
|
|
2787
|
-
positive_source_net_id:
|
|
2788
|
-
negative_source_net_id:
|
|
2801
|
+
is_dc_source: z126.literal(true).optional().default(true),
|
|
2802
|
+
positive_source_port_id: z126.string().optional(),
|
|
2803
|
+
negative_source_port_id: z126.string().optional(),
|
|
2804
|
+
positive_source_net_id: z126.string().optional(),
|
|
2805
|
+
negative_source_net_id: z126.string().optional(),
|
|
2789
2806
|
voltage
|
|
2790
2807
|
}).describe("Defines a DC voltage source for simulation");
|
|
2791
|
-
var simulation_ac_voltage_source =
|
|
2792
|
-
type:
|
|
2808
|
+
var simulation_ac_voltage_source = z126.object({
|
|
2809
|
+
type: z126.literal("simulation_voltage_source"),
|
|
2793
2810
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2794
2811
|
"simulation_voltage_source"
|
|
2795
2812
|
),
|
|
2796
|
-
is_dc_source:
|
|
2797
|
-
terminal1_source_port_id:
|
|
2798
|
-
terminal2_source_port_id:
|
|
2799
|
-
terminal1_source_net_id:
|
|
2800
|
-
terminal2_source_net_id:
|
|
2813
|
+
is_dc_source: z126.literal(false),
|
|
2814
|
+
terminal1_source_port_id: z126.string().optional(),
|
|
2815
|
+
terminal2_source_port_id: z126.string().optional(),
|
|
2816
|
+
terminal1_source_net_id: z126.string().optional(),
|
|
2817
|
+
terminal2_source_net_id: z126.string().optional(),
|
|
2801
2818
|
voltage: voltage.optional(),
|
|
2802
2819
|
frequency: frequency.optional(),
|
|
2803
2820
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -2805,25 +2822,25 @@ var simulation_ac_voltage_source = z125.object({
|
|
|
2805
2822
|
phase: rotation.optional(),
|
|
2806
2823
|
duty_cycle: percentage.optional()
|
|
2807
2824
|
}).describe("Defines an AC voltage source for simulation");
|
|
2808
|
-
var simulation_voltage_source =
|
|
2825
|
+
var simulation_voltage_source = z126.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
2809
2826
|
expectTypesMatch(true);
|
|
2810
2827
|
expectTypesMatch(true);
|
|
2811
2828
|
expectTypesMatch(true);
|
|
2812
2829
|
|
|
2813
2830
|
// src/simulation/simulation_experiment.ts
|
|
2814
|
-
import { z as
|
|
2815
|
-
var experiment_type =
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2831
|
+
import { z as z127 } from "zod";
|
|
2832
|
+
var experiment_type = z127.union([
|
|
2833
|
+
z127.literal("spice_dc_sweep"),
|
|
2834
|
+
z127.literal("spice_dc_operating_point"),
|
|
2835
|
+
z127.literal("spice_transient_analysis"),
|
|
2836
|
+
z127.literal("spice_ac_analysis")
|
|
2820
2837
|
]);
|
|
2821
|
-
var simulation_experiment =
|
|
2822
|
-
type:
|
|
2838
|
+
var simulation_experiment = z127.object({
|
|
2839
|
+
type: z127.literal("simulation_experiment"),
|
|
2823
2840
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
2824
2841
|
"simulation_experiment"
|
|
2825
2842
|
),
|
|
2826
|
-
name:
|
|
2843
|
+
name: z127.string(),
|
|
2827
2844
|
experiment_type,
|
|
2828
2845
|
time_per_step: duration_ms.optional(),
|
|
2829
2846
|
start_time_ms: ms.optional(),
|
|
@@ -2832,51 +2849,51 @@ var simulation_experiment = z126.object({
|
|
|
2832
2849
|
expectTypesMatch(true);
|
|
2833
2850
|
|
|
2834
2851
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
2835
|
-
import { z as
|
|
2836
|
-
var simulation_transient_voltage_graph =
|
|
2837
|
-
type:
|
|
2852
|
+
import { z as z128 } from "zod";
|
|
2853
|
+
var simulation_transient_voltage_graph = z128.object({
|
|
2854
|
+
type: z128.literal("simulation_transient_voltage_graph"),
|
|
2838
2855
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
2839
2856
|
"simulation_transient_voltage_graph"
|
|
2840
2857
|
),
|
|
2841
|
-
simulation_experiment_id:
|
|
2842
|
-
timestamps_ms:
|
|
2843
|
-
voltage_levels:
|
|
2844
|
-
source_component_id:
|
|
2845
|
-
subcircuit_connectivity_map_key:
|
|
2858
|
+
simulation_experiment_id: z128.string(),
|
|
2859
|
+
timestamps_ms: z128.array(z128.number()).optional(),
|
|
2860
|
+
voltage_levels: z128.array(z128.number()),
|
|
2861
|
+
source_component_id: z128.string().optional(),
|
|
2862
|
+
subcircuit_connectivity_map_key: z128.string().optional(),
|
|
2846
2863
|
time_per_step: duration_ms,
|
|
2847
2864
|
start_time_ms: ms,
|
|
2848
2865
|
end_time_ms: ms,
|
|
2849
|
-
name:
|
|
2850
|
-
color:
|
|
2866
|
+
name: z128.string().optional(),
|
|
2867
|
+
color: z128.string().optional()
|
|
2851
2868
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
2852
2869
|
expectTypesMatch(true);
|
|
2853
2870
|
|
|
2854
2871
|
// src/simulation/simulation_switch.ts
|
|
2855
|
-
import { z as
|
|
2856
|
-
var simulation_switch =
|
|
2857
|
-
type:
|
|
2872
|
+
import { z as z129 } from "zod";
|
|
2873
|
+
var simulation_switch = z129.object({
|
|
2874
|
+
type: z129.literal("simulation_switch"),
|
|
2858
2875
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
2859
|
-
source_component_id:
|
|
2876
|
+
source_component_id: z129.string().optional(),
|
|
2860
2877
|
closes_at: ms.optional(),
|
|
2861
2878
|
opens_at: ms.optional(),
|
|
2862
|
-
starts_closed:
|
|
2879
|
+
starts_closed: z129.boolean().optional(),
|
|
2863
2880
|
switching_frequency: frequency.optional()
|
|
2864
2881
|
}).describe("Defines a switch for simulation timing control");
|
|
2865
2882
|
expectTypesMatch(true);
|
|
2866
2883
|
|
|
2867
2884
|
// src/simulation/simulation_voltage_probe.ts
|
|
2868
|
-
import { z as
|
|
2869
|
-
var simulation_voltage_probe =
|
|
2870
|
-
type:
|
|
2885
|
+
import { z as z130 } from "zod";
|
|
2886
|
+
var simulation_voltage_probe = z130.object({
|
|
2887
|
+
type: z130.literal("simulation_voltage_probe"),
|
|
2871
2888
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
2872
2889
|
"simulation_voltage_probe"
|
|
2873
2890
|
),
|
|
2874
|
-
source_component_id:
|
|
2875
|
-
name:
|
|
2876
|
-
source_port_id:
|
|
2877
|
-
source_net_id:
|
|
2878
|
-
subcircuit_id:
|
|
2879
|
-
color:
|
|
2891
|
+
source_component_id: z130.string().optional(),
|
|
2892
|
+
name: z130.string().optional(),
|
|
2893
|
+
source_port_id: z130.string().optional(),
|
|
2894
|
+
source_net_id: z130.string().optional(),
|
|
2895
|
+
subcircuit_id: z130.string().optional(),
|
|
2896
|
+
color: z130.string().optional()
|
|
2880
2897
|
}).describe(
|
|
2881
2898
|
"Defines a voltage probe for simulation, connected to a port or a net"
|
|
2882
2899
|
).refine(
|
|
@@ -2888,22 +2905,22 @@ var simulation_voltage_probe = z129.object({
|
|
|
2888
2905
|
expectTypesMatch(true);
|
|
2889
2906
|
|
|
2890
2907
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
2891
|
-
import { z as
|
|
2892
|
-
var simulation_unknown_experiment_error =
|
|
2893
|
-
type:
|
|
2908
|
+
import { z as z131 } from "zod";
|
|
2909
|
+
var simulation_unknown_experiment_error = z131.object({
|
|
2910
|
+
type: z131.literal("simulation_unknown_experiment_error"),
|
|
2894
2911
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
2895
2912
|
"simulation_unknown_experiment_error"
|
|
2896
2913
|
),
|
|
2897
|
-
error_type:
|
|
2898
|
-
message:
|
|
2899
|
-
simulation_experiment_id:
|
|
2900
|
-
subcircuit_id:
|
|
2914
|
+
error_type: z131.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
2915
|
+
message: z131.string(),
|
|
2916
|
+
simulation_experiment_id: z131.string().optional(),
|
|
2917
|
+
subcircuit_id: z131.string().optional()
|
|
2901
2918
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
2902
2919
|
expectTypesMatch(true);
|
|
2903
2920
|
|
|
2904
2921
|
// src/any_circuit_element.ts
|
|
2905
|
-
import { z as
|
|
2906
|
-
var any_circuit_element =
|
|
2922
|
+
import { z as z132 } from "zod";
|
|
2923
|
+
var any_circuit_element = z132.union([
|
|
2907
2924
|
source_trace,
|
|
2908
2925
|
source_port,
|
|
2909
2926
|
any_source_component,
|
|
@@ -2932,6 +2949,7 @@ var any_circuit_element = z131.union([
|
|
|
2932
2949
|
source_project_metadata,
|
|
2933
2950
|
source_trace_not_connected_error,
|
|
2934
2951
|
source_pin_missing_trace_warning,
|
|
2952
|
+
source_pin_must_be_connected_error,
|
|
2935
2953
|
unknown_error_finding_part,
|
|
2936
2954
|
pcb_component,
|
|
2937
2955
|
pcb_hole,
|
|
@@ -3167,6 +3185,7 @@ export {
|
|
|
3167
3185
|
source_net,
|
|
3168
3186
|
source_pcb_ground_plane,
|
|
3169
3187
|
source_pin_missing_trace_warning,
|
|
3188
|
+
source_pin_must_be_connected_error,
|
|
3170
3189
|
source_port,
|
|
3171
3190
|
source_project_metadata,
|
|
3172
3191
|
source_property_ignored_warning,
|