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