circuit-json 0.0.445 → 0.0.447
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 +23 -0
- package/dist/index.d.mts +337 -6
- package/dist/index.mjs +1513 -1468
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -456,7 +456,7 @@ var source_pin_attributes = z25.object({
|
|
|
456
456
|
expectTypesMatch(true);
|
|
457
457
|
|
|
458
458
|
// src/source/any_source_component.ts
|
|
459
|
-
import { z as
|
|
459
|
+
import { z as z54 } from "zod";
|
|
460
460
|
|
|
461
461
|
// src/source/source_simple_battery.ts
|
|
462
462
|
import { z as z26 } from "zod";
|
|
@@ -710,61 +710,81 @@ var source_missing_manufacturer_part_number_warning = z47.object({
|
|
|
710
710
|
);
|
|
711
711
|
expectTypesMatch(true);
|
|
712
712
|
|
|
713
|
-
// src/source/
|
|
713
|
+
// src/source/source_refdes_convention_warning.ts
|
|
714
714
|
import { z as z48 } from "zod";
|
|
715
|
+
var source_refdes_convention_warning = z48.object({
|
|
716
|
+
type: z48.literal("source_refdes_convention_warning"),
|
|
717
|
+
source_refdes_convention_warning_id: getZodPrefixedIdWithDefault(
|
|
718
|
+
"source_refdes_convention_warning"
|
|
719
|
+
),
|
|
720
|
+
warning_type: z48.literal("source_refdes_convention_warning").default("source_refdes_convention_warning"),
|
|
721
|
+
message: z48.string(),
|
|
722
|
+
source_component_id: z48.string(),
|
|
723
|
+
refdes: z48.string(),
|
|
724
|
+
source_component_ftype: z48.string(),
|
|
725
|
+
expected_prefixes: z48.array(z48.string()),
|
|
726
|
+
actual_prefix: z48.string().optional(),
|
|
727
|
+
subcircuit_id: z48.string().optional()
|
|
728
|
+
}).describe(
|
|
729
|
+
"Warning emitted when a source component reference designator does not match the component type convention"
|
|
730
|
+
);
|
|
731
|
+
expectTypesMatch(true);
|
|
732
|
+
|
|
733
|
+
// src/source/source_simple_voltage_probe.ts
|
|
734
|
+
import { z as z49 } from "zod";
|
|
715
735
|
var source_simple_voltage_probe = source_component_base.extend({
|
|
716
|
-
ftype:
|
|
736
|
+
ftype: z49.literal("simple_voltage_probe")
|
|
717
737
|
});
|
|
718
738
|
expectTypesMatch(
|
|
719
739
|
true
|
|
720
740
|
);
|
|
721
741
|
|
|
722
742
|
// src/source/source_interconnect.ts
|
|
723
|
-
import { z as
|
|
743
|
+
import { z as z50 } from "zod";
|
|
724
744
|
var source_interconnect = source_component_base.extend({
|
|
725
|
-
ftype:
|
|
745
|
+
ftype: z50.literal("interconnect")
|
|
726
746
|
});
|
|
727
747
|
expectTypesMatch(true);
|
|
728
748
|
|
|
729
749
|
// src/source/source_i2c_misconfigured_error.ts
|
|
730
|
-
import { z as
|
|
750
|
+
import { z as z51 } from "zod";
|
|
731
751
|
var source_i2c_misconfigured_error = base_circuit_json_error.extend({
|
|
732
|
-
type:
|
|
752
|
+
type: z51.literal("source_i2c_misconfigured_error"),
|
|
733
753
|
source_i2c_misconfigured_error_id: getZodPrefixedIdWithDefault(
|
|
734
754
|
"source_i2c_misconfigured_error"
|
|
735
755
|
),
|
|
736
|
-
error_type:
|
|
737
|
-
source_port_ids:
|
|
756
|
+
error_type: z51.literal("source_i2c_misconfigured_error").default("source_i2c_misconfigured_error"),
|
|
757
|
+
source_port_ids: z51.array(z51.string())
|
|
738
758
|
}).describe(
|
|
739
759
|
"Error emitted when incompatible I2C pins (e.g. SDA and SCL) are connected to the same net"
|
|
740
760
|
);
|
|
741
761
|
expectTypesMatch(true);
|
|
742
762
|
|
|
743
763
|
// src/source/source_component_misconfigured_error.ts
|
|
744
|
-
import { z as
|
|
764
|
+
import { z as z52 } from "zod";
|
|
745
765
|
var source_component_misconfigured_error = base_circuit_json_error.extend({
|
|
746
|
-
type:
|
|
766
|
+
type: z52.literal("source_component_misconfigured_error"),
|
|
747
767
|
source_component_misconfigured_error_id: getZodPrefixedIdWithDefault(
|
|
748
768
|
"source_component_misconfigured_error"
|
|
749
769
|
),
|
|
750
|
-
error_type:
|
|
751
|
-
source_component_ids:
|
|
752
|
-
source_port_ids:
|
|
770
|
+
error_type: z52.literal("source_component_misconfigured_error").default("source_component_misconfigured_error"),
|
|
771
|
+
source_component_ids: z52.array(z52.string()),
|
|
772
|
+
source_port_ids: z52.array(z52.string()).optional()
|
|
753
773
|
}).describe(
|
|
754
774
|
"Error emitted when one or more source components have an invalid or conflicting configuration"
|
|
755
775
|
);
|
|
756
776
|
expectTypesMatch(true);
|
|
757
777
|
|
|
758
778
|
// src/source/source_simple_voltage_source.ts
|
|
759
|
-
import { z as
|
|
779
|
+
import { z as z53 } from "zod";
|
|
760
780
|
var source_simple_voltage_source = source_component_base.extend({
|
|
761
|
-
ftype:
|
|
781
|
+
ftype: z53.literal("simple_voltage_source"),
|
|
762
782
|
voltage,
|
|
763
783
|
frequency: frequency.optional(),
|
|
764
784
|
peak_to_peak_voltage: voltage.optional(),
|
|
765
|
-
wave_shape:
|
|
785
|
+
wave_shape: z53.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
766
786
|
phase: rotation.optional(),
|
|
767
|
-
duty_cycle:
|
|
787
|
+
duty_cycle: z53.number().optional().describe("Duty cycle as a fraction (0 to 1)"),
|
|
768
788
|
pulse_delay: ms.optional(),
|
|
769
789
|
rise_time: ms.optional(),
|
|
770
790
|
fall_time: ms.optional(),
|
|
@@ -776,7 +796,7 @@ expectTypesMatch(
|
|
|
776
796
|
);
|
|
777
797
|
|
|
778
798
|
// src/source/any_source_component.ts
|
|
779
|
-
var any_source_component =
|
|
799
|
+
var any_source_component = z54.union([
|
|
780
800
|
source_simple_resistor,
|
|
781
801
|
source_simple_capacitor,
|
|
782
802
|
source_simple_diode,
|
|
@@ -813,128 +833,129 @@ var any_source_component = z53.union([
|
|
|
813
833
|
source_property_ignored_warning,
|
|
814
834
|
source_pin_missing_trace_warning,
|
|
815
835
|
source_missing_manufacturer_part_number_warning,
|
|
836
|
+
source_refdes_convention_warning,
|
|
816
837
|
source_i2c_misconfigured_error,
|
|
817
838
|
source_component_misconfigured_error
|
|
818
839
|
]);
|
|
819
840
|
expectTypesMatch(true);
|
|
820
841
|
|
|
821
842
|
// src/source/source_port.ts
|
|
822
|
-
import { z as
|
|
823
|
-
var source_port =
|
|
824
|
-
type:
|
|
825
|
-
pin_number:
|
|
826
|
-
port_hints:
|
|
827
|
-
name:
|
|
828
|
-
source_port_id:
|
|
829
|
-
source_component_id:
|
|
830
|
-
source_group_id:
|
|
831
|
-
most_frequently_referenced_by_name:
|
|
832
|
-
subcircuit_id:
|
|
833
|
-
subcircuit_connectivity_map_key:
|
|
843
|
+
import { z as z55 } from "zod";
|
|
844
|
+
var source_port = z55.object({
|
|
845
|
+
type: z55.literal("source_port"),
|
|
846
|
+
pin_number: z55.number().optional(),
|
|
847
|
+
port_hints: z55.array(z55.string()).optional(),
|
|
848
|
+
name: z55.string(),
|
|
849
|
+
source_port_id: z55.string(),
|
|
850
|
+
source_component_id: z55.string().optional(),
|
|
851
|
+
source_group_id: z55.string().optional(),
|
|
852
|
+
most_frequently_referenced_by_name: z55.string().optional(),
|
|
853
|
+
subcircuit_id: z55.string().optional(),
|
|
854
|
+
subcircuit_connectivity_map_key: z55.string().optional()
|
|
834
855
|
}).merge(source_pin_attributes);
|
|
835
856
|
expectTypesMatch(true);
|
|
836
857
|
|
|
837
858
|
// src/source/source_component_internal_connection.ts
|
|
838
|
-
import { z as z55 } from "zod";
|
|
839
|
-
var source_component_internal_connection = z55.object({
|
|
840
|
-
type: z55.literal("source_component_internal_connection"),
|
|
841
|
-
source_component_internal_connection_id: z55.string(),
|
|
842
|
-
source_component_id: z55.string(),
|
|
843
|
-
source_port_ids: z55.array(z55.string()),
|
|
844
|
-
subcircuit_id: z55.string().optional()
|
|
845
|
-
});
|
|
846
|
-
expectTypesMatch(true);
|
|
847
|
-
|
|
848
|
-
// src/source/source_trace.ts
|
|
849
859
|
import { z as z56 } from "zod";
|
|
850
|
-
var
|
|
851
|
-
type: z56.literal("
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
subcircuit_id: z56.string().optional()
|
|
856
|
-
subcircuit_connectivity_map_key: z56.string().optional(),
|
|
857
|
-
max_length: z56.number().optional(),
|
|
858
|
-
name: z56.string().optional(),
|
|
859
|
-
min_trace_thickness: z56.number().optional(),
|
|
860
|
-
display_name: z56.string().optional()
|
|
860
|
+
var source_component_internal_connection = z56.object({
|
|
861
|
+
type: z56.literal("source_component_internal_connection"),
|
|
862
|
+
source_component_internal_connection_id: z56.string(),
|
|
863
|
+
source_component_id: z56.string(),
|
|
864
|
+
source_port_ids: z56.array(z56.string()),
|
|
865
|
+
subcircuit_id: z56.string().optional()
|
|
861
866
|
});
|
|
862
867
|
expectTypesMatch(true);
|
|
863
868
|
|
|
864
|
-
// src/source/
|
|
869
|
+
// src/source/source_trace.ts
|
|
865
870
|
import { z as z57 } from "zod";
|
|
866
|
-
var
|
|
867
|
-
type: z57.literal("
|
|
868
|
-
|
|
871
|
+
var source_trace = z57.object({
|
|
872
|
+
type: z57.literal("source_trace"),
|
|
873
|
+
source_trace_id: z57.string(),
|
|
874
|
+
connected_source_port_ids: z57.array(z57.string()),
|
|
875
|
+
connected_source_net_ids: z57.array(z57.string()),
|
|
869
876
|
subcircuit_id: z57.string().optional(),
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
is_subcircuit: z57.boolean().optional(),
|
|
873
|
-
show_as_schematic_box: z57.boolean().optional(),
|
|
877
|
+
subcircuit_connectivity_map_key: z57.string().optional(),
|
|
878
|
+
max_length: z57.number().optional(),
|
|
874
879
|
name: z57.string().optional(),
|
|
875
|
-
|
|
880
|
+
min_trace_thickness: z57.number().optional(),
|
|
881
|
+
display_name: z57.string().optional()
|
|
876
882
|
});
|
|
877
883
|
expectTypesMatch(true);
|
|
878
884
|
|
|
879
|
-
// src/source/
|
|
885
|
+
// src/source/source_group.ts
|
|
880
886
|
import { z as z58 } from "zod";
|
|
881
|
-
var
|
|
882
|
-
type: z58.literal("
|
|
883
|
-
|
|
884
|
-
name: z58.string(),
|
|
885
|
-
member_source_group_ids: z58.array(z58.string()),
|
|
886
|
-
is_power: z58.boolean().optional(),
|
|
887
|
-
is_ground: z58.boolean().optional(),
|
|
888
|
-
is_digital_signal: z58.boolean().optional(),
|
|
889
|
-
is_analog_signal: z58.boolean().optional(),
|
|
890
|
-
is_positive_voltage_source: z58.boolean().optional(),
|
|
891
|
-
trace_width: z58.number().optional(),
|
|
887
|
+
var source_group = z58.object({
|
|
888
|
+
type: z58.literal("source_group"),
|
|
889
|
+
source_group_id: z58.string(),
|
|
892
890
|
subcircuit_id: z58.string().optional(),
|
|
893
|
-
|
|
891
|
+
parent_subcircuit_id: z58.string().optional(),
|
|
892
|
+
parent_source_group_id: z58.string().optional(),
|
|
893
|
+
is_subcircuit: z58.boolean().optional(),
|
|
894
|
+
show_as_schematic_box: z58.boolean().optional(),
|
|
895
|
+
name: z58.string().optional(),
|
|
896
|
+
was_automatically_named: z58.boolean().optional()
|
|
894
897
|
});
|
|
895
898
|
expectTypesMatch(true);
|
|
896
899
|
|
|
897
|
-
// src/source/
|
|
900
|
+
// src/source/source_net.ts
|
|
898
901
|
import { z as z59 } from "zod";
|
|
899
|
-
var
|
|
900
|
-
type: z59.literal("
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
902
|
+
var source_net = z59.object({
|
|
903
|
+
type: z59.literal("source_net"),
|
|
904
|
+
source_net_id: z59.string(),
|
|
905
|
+
name: z59.string(),
|
|
906
|
+
member_source_group_ids: z59.array(z59.string()),
|
|
907
|
+
is_power: z59.boolean().optional(),
|
|
908
|
+
is_ground: z59.boolean().optional(),
|
|
909
|
+
is_digital_signal: z59.boolean().optional(),
|
|
910
|
+
is_analog_signal: z59.boolean().optional(),
|
|
911
|
+
is_positive_voltage_source: z59.boolean().optional(),
|
|
912
|
+
trace_width: z59.number().optional(),
|
|
913
|
+
subcircuit_id: z59.string().optional(),
|
|
914
|
+
subcircuit_connectivity_map_key: z59.string().optional()
|
|
915
|
+
});
|
|
916
|
+
expectTypesMatch(true);
|
|
917
|
+
|
|
918
|
+
// src/source/source_board.ts
|
|
919
|
+
import { z as z60 } from "zod";
|
|
920
|
+
var source_board = z60.object({
|
|
921
|
+
type: z60.literal("source_board"),
|
|
922
|
+
source_board_id: z60.string(),
|
|
923
|
+
source_group_id: z60.string(),
|
|
924
|
+
title: z60.string().optional()
|
|
904
925
|
}).describe("Defines a board in the source domain");
|
|
905
926
|
expectTypesMatch(true);
|
|
906
927
|
|
|
907
928
|
// src/source/source_ambiguous_port_reference.ts
|
|
908
|
-
import { z as
|
|
929
|
+
import { z as z61 } from "zod";
|
|
909
930
|
var source_ambiguous_port_reference = base_circuit_json_error.extend({
|
|
910
|
-
type:
|
|
931
|
+
type: z61.literal("source_ambiguous_port_reference"),
|
|
911
932
|
source_ambiguous_port_reference_id: getZodPrefixedIdWithDefault(
|
|
912
933
|
"source_ambiguous_port_reference"
|
|
913
934
|
),
|
|
914
|
-
error_type:
|
|
915
|
-
source_port_id:
|
|
916
|
-
source_component_id:
|
|
935
|
+
error_type: z61.literal("source_ambiguous_port_reference").default("source_ambiguous_port_reference"),
|
|
936
|
+
source_port_id: z61.string().optional(),
|
|
937
|
+
source_component_id: z61.string().optional()
|
|
917
938
|
}).describe(
|
|
918
939
|
"Error emitted when a port hint matches multiple non-overlapping pads, making the port reference ambiguous"
|
|
919
940
|
);
|
|
920
941
|
expectTypesMatch(true);
|
|
921
942
|
|
|
922
943
|
// src/source/source_pcb_ground_plane.ts
|
|
923
|
-
import { z as
|
|
924
|
-
var source_pcb_ground_plane =
|
|
925
|
-
type:
|
|
926
|
-
source_pcb_ground_plane_id:
|
|
927
|
-
source_group_id:
|
|
928
|
-
source_net_id:
|
|
929
|
-
subcircuit_id:
|
|
944
|
+
import { z as z62 } from "zod";
|
|
945
|
+
var source_pcb_ground_plane = z62.object({
|
|
946
|
+
type: z62.literal("source_pcb_ground_plane"),
|
|
947
|
+
source_pcb_ground_plane_id: z62.string(),
|
|
948
|
+
source_group_id: z62.string(),
|
|
949
|
+
source_net_id: z62.string(),
|
|
950
|
+
subcircuit_id: z62.string().optional()
|
|
930
951
|
}).describe("Defines a ground plane in the source domain");
|
|
931
952
|
expectTypesMatch(true);
|
|
932
953
|
|
|
933
954
|
// src/source/source_manually_placed_via.ts
|
|
934
|
-
import { z as
|
|
955
|
+
import { z as z64 } from "zod";
|
|
935
956
|
|
|
936
957
|
// src/pcb/properties/layer_ref.ts
|
|
937
|
-
import { z as
|
|
958
|
+
import { z as z63 } from "zod";
|
|
938
959
|
var all_layers = [
|
|
939
960
|
"top",
|
|
940
961
|
"bottom",
|
|
@@ -945,9 +966,9 @@ var all_layers = [
|
|
|
945
966
|
"inner5",
|
|
946
967
|
"inner6"
|
|
947
968
|
];
|
|
948
|
-
var layer_string =
|
|
969
|
+
var layer_string = z63.enum(all_layers);
|
|
949
970
|
var layer_ref = layer_string.or(
|
|
950
|
-
|
|
971
|
+
z63.object({
|
|
951
972
|
name: layer_string
|
|
952
973
|
})
|
|
953
974
|
).transform((layer) => {
|
|
@@ -957,249 +978,249 @@ var layer_ref = layer_string.or(
|
|
|
957
978
|
return layer.name;
|
|
958
979
|
});
|
|
959
980
|
expectTypesMatch(true);
|
|
960
|
-
var visible_layer =
|
|
981
|
+
var visible_layer = z63.enum(["top", "bottom"]);
|
|
961
982
|
|
|
962
983
|
// src/source/source_manually_placed_via.ts
|
|
963
|
-
var source_manually_placed_via =
|
|
964
|
-
type:
|
|
965
|
-
source_manually_placed_via_id:
|
|
966
|
-
source_group_id:
|
|
967
|
-
source_net_id:
|
|
968
|
-
subcircuit_id:
|
|
969
|
-
source_trace_id:
|
|
984
|
+
var source_manually_placed_via = z64.object({
|
|
985
|
+
type: z64.literal("source_manually_placed_via"),
|
|
986
|
+
source_manually_placed_via_id: z64.string(),
|
|
987
|
+
source_group_id: z64.string(),
|
|
988
|
+
source_net_id: z64.string(),
|
|
989
|
+
subcircuit_id: z64.string().optional(),
|
|
990
|
+
source_trace_id: z64.string().optional()
|
|
970
991
|
}).describe("Defines a via that is manually placed in the source domain");
|
|
971
992
|
expectTypesMatch(true);
|
|
972
993
|
|
|
973
994
|
// src/source/source_unnamed_trace_warning.ts
|
|
974
|
-
import { z as
|
|
975
|
-
var source_unnamed_trace_warning =
|
|
976
|
-
type:
|
|
995
|
+
import { z as z65 } from "zod";
|
|
996
|
+
var source_unnamed_trace_warning = z65.object({
|
|
997
|
+
type: z65.literal("source_unnamed_trace_warning"),
|
|
977
998
|
source_unnamed_trace_warning_id: getZodPrefixedIdWithDefault(
|
|
978
999
|
"source_unnamed_trace_warning"
|
|
979
1000
|
),
|
|
980
|
-
warning_type:
|
|
981
|
-
message:
|
|
982
|
-
source_trace_id:
|
|
983
|
-
subcircuit_id:
|
|
1001
|
+
warning_type: z65.literal("source_unnamed_trace_warning").default("source_unnamed_trace_warning"),
|
|
1002
|
+
message: z65.string(),
|
|
1003
|
+
source_trace_id: z65.string(),
|
|
1004
|
+
subcircuit_id: z65.string().optional()
|
|
984
1005
|
}).describe("Warning emitted when a source trace is missing a name");
|
|
985
1006
|
expectTypesMatch(
|
|
986
1007
|
true
|
|
987
1008
|
);
|
|
988
1009
|
|
|
989
1010
|
// src/source/source_no_power_pin_defined_warning.ts
|
|
990
|
-
import { z as
|
|
991
|
-
var source_no_power_pin_defined_warning =
|
|
992
|
-
type:
|
|
1011
|
+
import { z as z66 } from "zod";
|
|
1012
|
+
var source_no_power_pin_defined_warning = z66.object({
|
|
1013
|
+
type: z66.literal("source_no_power_pin_defined_warning"),
|
|
993
1014
|
source_no_power_pin_defined_warning_id: getZodPrefixedIdWithDefault(
|
|
994
1015
|
"source_no_power_pin_defined_warning"
|
|
995
1016
|
),
|
|
996
|
-
warning_type:
|
|
997
|
-
message:
|
|
998
|
-
source_component_id:
|
|
999
|
-
source_port_ids:
|
|
1000
|
-
subcircuit_id:
|
|
1017
|
+
warning_type: z66.literal("source_no_power_pin_defined_warning").default("source_no_power_pin_defined_warning"),
|
|
1018
|
+
message: z66.string(),
|
|
1019
|
+
source_component_id: z66.string(),
|
|
1020
|
+
source_port_ids: z66.array(z66.string()),
|
|
1021
|
+
subcircuit_id: z66.string().optional()
|
|
1001
1022
|
}).describe(
|
|
1002
1023
|
"Warning emitted when a chip has no source ports with requires_power=true"
|
|
1003
1024
|
);
|
|
1004
1025
|
expectTypesMatch(true);
|
|
1005
1026
|
|
|
1006
1027
|
// src/source/source_no_ground_pin_defined_warning.ts
|
|
1007
|
-
import { z as
|
|
1008
|
-
var source_no_ground_pin_defined_warning =
|
|
1009
|
-
type:
|
|
1028
|
+
import { z as z67 } from "zod";
|
|
1029
|
+
var source_no_ground_pin_defined_warning = z67.object({
|
|
1030
|
+
type: z67.literal("source_no_ground_pin_defined_warning"),
|
|
1010
1031
|
source_no_ground_pin_defined_warning_id: getZodPrefixedIdWithDefault(
|
|
1011
1032
|
"source_no_ground_pin_defined_warning"
|
|
1012
1033
|
),
|
|
1013
|
-
warning_type:
|
|
1014
|
-
message:
|
|
1015
|
-
source_component_id:
|
|
1016
|
-
source_port_ids:
|
|
1017
|
-
subcircuit_id:
|
|
1034
|
+
warning_type: z67.literal("source_no_ground_pin_defined_warning").default("source_no_ground_pin_defined_warning"),
|
|
1035
|
+
message: z67.string(),
|
|
1036
|
+
source_component_id: z67.string(),
|
|
1037
|
+
source_port_ids: z67.array(z67.string()),
|
|
1038
|
+
subcircuit_id: z67.string().optional()
|
|
1018
1039
|
}).describe(
|
|
1019
1040
|
"Warning emitted when a chip has no source ports marked as ground pins"
|
|
1020
1041
|
);
|
|
1021
1042
|
expectTypesMatch(true);
|
|
1022
1043
|
|
|
1023
1044
|
// src/source/source_component_pins_underspecified_warning.ts
|
|
1024
|
-
import { z as
|
|
1025
|
-
var source_component_pins_underspecified_warning =
|
|
1026
|
-
type:
|
|
1045
|
+
import { z as z68 } from "zod";
|
|
1046
|
+
var source_component_pins_underspecified_warning = z68.object({
|
|
1047
|
+
type: z68.literal("source_component_pins_underspecified_warning"),
|
|
1027
1048
|
source_component_pins_underspecified_warning_id: getZodPrefixedIdWithDefault(
|
|
1028
1049
|
"source_component_pins_underspecified_warning"
|
|
1029
1050
|
),
|
|
1030
|
-
warning_type:
|
|
1031
|
-
message:
|
|
1032
|
-
source_component_id:
|
|
1033
|
-
source_port_ids:
|
|
1034
|
-
subcircuit_id:
|
|
1051
|
+
warning_type: z68.literal("source_component_pins_underspecified_warning").default("source_component_pins_underspecified_warning"),
|
|
1052
|
+
message: z68.string(),
|
|
1053
|
+
source_component_id: z68.string(),
|
|
1054
|
+
source_port_ids: z68.array(z68.string()),
|
|
1055
|
+
subcircuit_id: z68.string().optional()
|
|
1035
1056
|
}).describe(
|
|
1036
1057
|
"Warning emitted when all ports on a source component are underspecified"
|
|
1037
1058
|
);
|
|
1038
1059
|
expectTypesMatch(true);
|
|
1039
1060
|
|
|
1040
1061
|
// src/source/source_pin_must_be_connected_error.ts
|
|
1041
|
-
import { z as
|
|
1062
|
+
import { z as z69 } from "zod";
|
|
1042
1063
|
var source_pin_must_be_connected_error = base_circuit_json_error.extend({
|
|
1043
|
-
type:
|
|
1064
|
+
type: z69.literal("source_pin_must_be_connected_error"),
|
|
1044
1065
|
source_pin_must_be_connected_error_id: getZodPrefixedIdWithDefault(
|
|
1045
1066
|
"source_pin_must_be_connected_error"
|
|
1046
1067
|
),
|
|
1047
|
-
error_type:
|
|
1048
|
-
source_component_id:
|
|
1049
|
-
source_port_id:
|
|
1050
|
-
subcircuit_id:
|
|
1068
|
+
error_type: z69.literal("source_pin_must_be_connected_error").default("source_pin_must_be_connected_error"),
|
|
1069
|
+
source_component_id: z69.string(),
|
|
1070
|
+
source_port_id: z69.string(),
|
|
1071
|
+
subcircuit_id: z69.string().optional()
|
|
1051
1072
|
}).describe(
|
|
1052
1073
|
"Error emitted when a pin with mustBeConnected attribute is not connected to any trace"
|
|
1053
1074
|
);
|
|
1054
1075
|
expectTypesMatch(true);
|
|
1055
1076
|
|
|
1056
1077
|
// src/source/unknown_error_finding_part.ts
|
|
1057
|
-
import { z as
|
|
1078
|
+
import { z as z70 } from "zod";
|
|
1058
1079
|
var unknown_error_finding_part = base_circuit_json_error.extend({
|
|
1059
|
-
type:
|
|
1080
|
+
type: z70.literal("unknown_error_finding_part"),
|
|
1060
1081
|
unknown_error_finding_part_id: getZodPrefixedIdWithDefault(
|
|
1061
1082
|
"unknown_error_finding_part"
|
|
1062
1083
|
),
|
|
1063
|
-
error_type:
|
|
1064
|
-
source_component_id:
|
|
1065
|
-
subcircuit_id:
|
|
1084
|
+
error_type: z70.literal("unknown_error_finding_part").default("unknown_error_finding_part"),
|
|
1085
|
+
source_component_id: z70.string().optional(),
|
|
1086
|
+
subcircuit_id: z70.string().optional()
|
|
1066
1087
|
}).describe(
|
|
1067
1088
|
"Error emitted when an unexpected error occurs while finding a part"
|
|
1068
1089
|
);
|
|
1069
1090
|
expectTypesMatch(true);
|
|
1070
1091
|
|
|
1071
1092
|
// src/source/source_part_not_found_warning.ts
|
|
1072
|
-
import { z as
|
|
1073
|
-
var source_part_not_found_warning =
|
|
1074
|
-
type:
|
|
1093
|
+
import { z as z71 } from "zod";
|
|
1094
|
+
var source_part_not_found_warning = z71.object({
|
|
1095
|
+
type: z71.literal("source_part_not_found_warning"),
|
|
1075
1096
|
source_part_not_found_warning_id: getZodPrefixedIdWithDefault(
|
|
1076
1097
|
"source_part_not_found_warning"
|
|
1077
1098
|
),
|
|
1078
|
-
warning_type:
|
|
1079
|
-
message:
|
|
1080
|
-
source_component_id:
|
|
1081
|
-
subcircuit_id:
|
|
1099
|
+
warning_type: z71.literal("source_part_not_found_warning").default("source_part_not_found_warning"),
|
|
1100
|
+
message: z71.string(),
|
|
1101
|
+
source_component_id: z71.string().optional(),
|
|
1102
|
+
subcircuit_id: z71.string().optional(),
|
|
1082
1103
|
supplier_name: supplier_name.optional(),
|
|
1083
|
-
manufacturer_part_number:
|
|
1084
|
-
supplier_part_number:
|
|
1085
|
-
part_name:
|
|
1104
|
+
manufacturer_part_number: z71.string().optional(),
|
|
1105
|
+
supplier_part_number: z71.string().optional(),
|
|
1106
|
+
part_name: z71.string().optional()
|
|
1086
1107
|
}).describe("Warning emitted when a requested part can not be found");
|
|
1087
1108
|
expectTypesMatch(
|
|
1088
1109
|
true
|
|
1089
1110
|
);
|
|
1090
1111
|
|
|
1091
1112
|
// src/schematic/schematic_box.ts
|
|
1092
|
-
import { z as
|
|
1093
|
-
var schematic_box =
|
|
1094
|
-
type:
|
|
1095
|
-
schematic_sheet_id:
|
|
1096
|
-
schematic_component_id:
|
|
1097
|
-
schematic_symbol_id:
|
|
1113
|
+
import { z as z72 } from "zod";
|
|
1114
|
+
var schematic_box = z72.object({
|
|
1115
|
+
type: z72.literal("schematic_box"),
|
|
1116
|
+
schematic_sheet_id: z72.string().optional(),
|
|
1117
|
+
schematic_component_id: z72.string().optional(),
|
|
1118
|
+
schematic_symbol_id: z72.string().optional(),
|
|
1098
1119
|
width: distance,
|
|
1099
1120
|
height: distance,
|
|
1100
|
-
is_dashed:
|
|
1121
|
+
is_dashed: z72.boolean().default(false),
|
|
1101
1122
|
x: distance,
|
|
1102
1123
|
y: distance,
|
|
1103
|
-
subcircuit_id:
|
|
1124
|
+
subcircuit_id: z72.string().optional()
|
|
1104
1125
|
}).describe("Draws a box on the schematic");
|
|
1105
1126
|
expectTypesMatch(true);
|
|
1106
1127
|
|
|
1107
1128
|
// src/schematic/schematic_path.ts
|
|
1108
|
-
import { z as
|
|
1109
|
-
var schematic_path =
|
|
1110
|
-
type:
|
|
1129
|
+
import { z as z73 } from "zod";
|
|
1130
|
+
var schematic_path = z73.object({
|
|
1131
|
+
type: z73.literal("schematic_path"),
|
|
1111
1132
|
schematic_path_id: getZodPrefixedIdWithDefault("schematic_path"),
|
|
1112
|
-
schematic_sheet_id:
|
|
1113
|
-
schematic_component_id:
|
|
1114
|
-
schematic_symbol_id:
|
|
1115
|
-
fill_color:
|
|
1116
|
-
is_filled:
|
|
1117
|
-
is_dashed:
|
|
1133
|
+
schematic_sheet_id: z73.string().optional(),
|
|
1134
|
+
schematic_component_id: z73.string().optional(),
|
|
1135
|
+
schematic_symbol_id: z73.string().optional(),
|
|
1136
|
+
fill_color: z73.string().optional(),
|
|
1137
|
+
is_filled: z73.boolean().optional(),
|
|
1138
|
+
is_dashed: z73.boolean().default(false),
|
|
1118
1139
|
stroke_width: distance.nullable().optional(),
|
|
1119
|
-
stroke_color:
|
|
1140
|
+
stroke_color: z73.string().optional(),
|
|
1120
1141
|
dash_length: distance.optional(),
|
|
1121
1142
|
dash_gap: distance.optional(),
|
|
1122
|
-
points:
|
|
1123
|
-
subcircuit_id:
|
|
1143
|
+
points: z73.array(point),
|
|
1144
|
+
subcircuit_id: z73.string().optional()
|
|
1124
1145
|
});
|
|
1125
1146
|
expectTypesMatch(true);
|
|
1126
1147
|
|
|
1127
1148
|
// src/schematic/schematic_component.ts
|
|
1128
|
-
import { z as
|
|
1129
|
-
var schematic_pin_styles =
|
|
1130
|
-
|
|
1149
|
+
import { z as z74 } from "zod";
|
|
1150
|
+
var schematic_pin_styles = z74.record(
|
|
1151
|
+
z74.object({
|
|
1131
1152
|
left_margin: length.optional(),
|
|
1132
1153
|
right_margin: length.optional(),
|
|
1133
1154
|
top_margin: length.optional(),
|
|
1134
1155
|
bottom_margin: length.optional()
|
|
1135
1156
|
})
|
|
1136
1157
|
);
|
|
1137
|
-
var schematic_component_port_arrangement_by_size =
|
|
1138
|
-
left_size:
|
|
1139
|
-
right_size:
|
|
1140
|
-
top_size:
|
|
1141
|
-
bottom_size:
|
|
1158
|
+
var schematic_component_port_arrangement_by_size = z74.object({
|
|
1159
|
+
left_size: z74.number(),
|
|
1160
|
+
right_size: z74.number(),
|
|
1161
|
+
top_size: z74.number().optional(),
|
|
1162
|
+
bottom_size: z74.number().optional()
|
|
1142
1163
|
});
|
|
1143
1164
|
expectTypesMatch(true);
|
|
1144
|
-
var schematic_component_port_arrangement_by_sides =
|
|
1145
|
-
left_side:
|
|
1146
|
-
pins:
|
|
1165
|
+
var schematic_component_port_arrangement_by_sides = z74.object({
|
|
1166
|
+
left_side: z74.object({
|
|
1167
|
+
pins: z74.array(z74.number()),
|
|
1147
1168
|
// @ts-ignore
|
|
1148
|
-
direction:
|
|
1169
|
+
direction: z74.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
1149
1170
|
}).optional(),
|
|
1150
|
-
right_side:
|
|
1151
|
-
pins:
|
|
1171
|
+
right_side: z74.object({
|
|
1172
|
+
pins: z74.array(z74.number()),
|
|
1152
1173
|
// @ts-ignore
|
|
1153
|
-
direction:
|
|
1174
|
+
direction: z74.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
1154
1175
|
}).optional(),
|
|
1155
|
-
top_side:
|
|
1156
|
-
pins:
|
|
1176
|
+
top_side: z74.object({
|
|
1177
|
+
pins: z74.array(z74.number()),
|
|
1157
1178
|
// @ts-ignore
|
|
1158
|
-
direction:
|
|
1179
|
+
direction: z74.enum(["left-to-right", "right-to-left"]).optional()
|
|
1159
1180
|
}).optional(),
|
|
1160
|
-
bottom_side:
|
|
1161
|
-
pins:
|
|
1181
|
+
bottom_side: z74.object({
|
|
1182
|
+
pins: z74.array(z74.number()),
|
|
1162
1183
|
// @ts-ignore
|
|
1163
|
-
direction:
|
|
1184
|
+
direction: z74.enum(["left-to-right", "right-to-left"]).optional()
|
|
1164
1185
|
}).optional()
|
|
1165
1186
|
});
|
|
1166
1187
|
expectTypesMatch(true);
|
|
1167
|
-
var port_arrangement =
|
|
1188
|
+
var port_arrangement = z74.union([
|
|
1168
1189
|
schematic_component_port_arrangement_by_size,
|
|
1169
1190
|
schematic_component_port_arrangement_by_sides
|
|
1170
1191
|
]);
|
|
1171
|
-
var schematic_component =
|
|
1172
|
-
type:
|
|
1192
|
+
var schematic_component = z74.object({
|
|
1193
|
+
type: z74.literal("schematic_component"),
|
|
1173
1194
|
size,
|
|
1174
1195
|
center: point,
|
|
1175
|
-
source_component_id:
|
|
1176
|
-
schematic_component_id:
|
|
1177
|
-
schematic_sheet_id:
|
|
1178
|
-
schematic_symbol_id:
|
|
1196
|
+
source_component_id: z74.string().optional(),
|
|
1197
|
+
schematic_component_id: z74.string(),
|
|
1198
|
+
schematic_sheet_id: z74.string().optional(),
|
|
1199
|
+
schematic_symbol_id: z74.string().optional(),
|
|
1179
1200
|
pin_spacing: length.optional(),
|
|
1180
1201
|
pin_styles: schematic_pin_styles.optional(),
|
|
1181
1202
|
box_width: length.optional(),
|
|
1182
|
-
symbol_name:
|
|
1203
|
+
symbol_name: z74.string().optional(),
|
|
1183
1204
|
port_arrangement: port_arrangement.optional(),
|
|
1184
|
-
port_labels:
|
|
1185
|
-
symbol_display_value:
|
|
1186
|
-
subcircuit_id:
|
|
1187
|
-
schematic_group_id:
|
|
1188
|
-
is_schematic_group:
|
|
1189
|
-
source_group_id:
|
|
1190
|
-
is_box_with_pins:
|
|
1205
|
+
port_labels: z74.record(z74.string()).optional(),
|
|
1206
|
+
symbol_display_value: z74.string().optional(),
|
|
1207
|
+
subcircuit_id: z74.string().optional(),
|
|
1208
|
+
schematic_group_id: z74.string().optional(),
|
|
1209
|
+
is_schematic_group: z74.boolean().optional(),
|
|
1210
|
+
source_group_id: z74.string().optional(),
|
|
1211
|
+
is_box_with_pins: z74.boolean().optional().default(true)
|
|
1191
1212
|
});
|
|
1192
1213
|
expectTypesMatch(true);
|
|
1193
1214
|
|
|
1194
1215
|
// src/schematic/schematic_symbol.ts
|
|
1195
|
-
import { z as
|
|
1196
|
-
var schematicSymbolMetadata =
|
|
1216
|
+
import { z as z75 } from "zod";
|
|
1217
|
+
var schematicSymbolMetadata = z75.object({
|
|
1197
1218
|
kicad_symbol: kicadSymbolMetadata.optional()
|
|
1198
|
-
}).catchall(
|
|
1199
|
-
var schematic_symbol =
|
|
1200
|
-
type:
|
|
1201
|
-
schematic_symbol_id:
|
|
1202
|
-
name:
|
|
1219
|
+
}).catchall(z75.unknown());
|
|
1220
|
+
var schematic_symbol = z75.object({
|
|
1221
|
+
type: z75.literal("schematic_symbol"),
|
|
1222
|
+
schematic_symbol_id: z75.string(),
|
|
1223
|
+
name: z75.string().optional(),
|
|
1203
1224
|
metadata: schematicSymbolMetadata.optional()
|
|
1204
1225
|
}).describe(
|
|
1205
1226
|
"Defines a named schematic symbol that can be referenced by components."
|
|
@@ -1207,126 +1228,126 @@ var schematic_symbol = z74.object({
|
|
|
1207
1228
|
expectTypesMatch(true);
|
|
1208
1229
|
|
|
1209
1230
|
// src/schematic/schematic_line.ts
|
|
1210
|
-
import { z as
|
|
1211
|
-
var schematic_line =
|
|
1212
|
-
type:
|
|
1231
|
+
import { z as z76 } from "zod";
|
|
1232
|
+
var schematic_line = z76.object({
|
|
1233
|
+
type: z76.literal("schematic_line"),
|
|
1213
1234
|
schematic_line_id: getZodPrefixedIdWithDefault("schematic_line"),
|
|
1214
|
-
schematic_sheet_id:
|
|
1215
|
-
schematic_component_id:
|
|
1216
|
-
schematic_symbol_id:
|
|
1235
|
+
schematic_sheet_id: z76.string().optional(),
|
|
1236
|
+
schematic_component_id: z76.string().optional(),
|
|
1237
|
+
schematic_symbol_id: z76.string().optional(),
|
|
1217
1238
|
x1: distance,
|
|
1218
1239
|
y1: distance,
|
|
1219
1240
|
x2: distance,
|
|
1220
1241
|
y2: distance,
|
|
1221
1242
|
stroke_width: distance.nullable().optional(),
|
|
1222
|
-
color:
|
|
1223
|
-
is_dashed:
|
|
1243
|
+
color: z76.string().default("#000000"),
|
|
1244
|
+
is_dashed: z76.boolean().default(false),
|
|
1224
1245
|
dash_length: distance.optional(),
|
|
1225
1246
|
dash_gap: distance.optional(),
|
|
1226
|
-
subcircuit_id:
|
|
1247
|
+
subcircuit_id: z76.string().optional()
|
|
1227
1248
|
}).describe("Draws a styled line on the schematic");
|
|
1228
1249
|
expectTypesMatch(true);
|
|
1229
1250
|
|
|
1230
1251
|
// src/schematic/schematic_rect.ts
|
|
1231
|
-
import { z as
|
|
1232
|
-
var schematic_rect =
|
|
1233
|
-
type:
|
|
1252
|
+
import { z as z77 } from "zod";
|
|
1253
|
+
var schematic_rect = z77.object({
|
|
1254
|
+
type: z77.literal("schematic_rect"),
|
|
1234
1255
|
schematic_rect_id: getZodPrefixedIdWithDefault("schematic_rect"),
|
|
1235
|
-
schematic_sheet_id:
|
|
1236
|
-
schematic_component_id:
|
|
1237
|
-
schematic_symbol_id:
|
|
1256
|
+
schematic_sheet_id: z77.string().optional(),
|
|
1257
|
+
schematic_component_id: z77.string().optional(),
|
|
1258
|
+
schematic_symbol_id: z77.string().optional(),
|
|
1238
1259
|
center: point,
|
|
1239
1260
|
width: distance,
|
|
1240
1261
|
height: distance,
|
|
1241
1262
|
rotation: rotation.default(0),
|
|
1242
1263
|
stroke_width: distance.nullable().optional(),
|
|
1243
|
-
color:
|
|
1244
|
-
is_filled:
|
|
1245
|
-
fill_color:
|
|
1246
|
-
is_dashed:
|
|
1247
|
-
subcircuit_id:
|
|
1264
|
+
color: z77.string().default("#000000"),
|
|
1265
|
+
is_filled: z77.boolean().default(false),
|
|
1266
|
+
fill_color: z77.string().optional(),
|
|
1267
|
+
is_dashed: z77.boolean().default(false),
|
|
1268
|
+
subcircuit_id: z77.string().optional()
|
|
1248
1269
|
}).describe("Draws a styled rectangle on the schematic");
|
|
1249
1270
|
expectTypesMatch(true);
|
|
1250
1271
|
|
|
1251
1272
|
// src/schematic/schematic_circle.ts
|
|
1252
|
-
import { z as
|
|
1253
|
-
var schematic_circle =
|
|
1254
|
-
type:
|
|
1273
|
+
import { z as z78 } from "zod";
|
|
1274
|
+
var schematic_circle = z78.object({
|
|
1275
|
+
type: z78.literal("schematic_circle"),
|
|
1255
1276
|
schematic_circle_id: getZodPrefixedIdWithDefault("schematic_circle"),
|
|
1256
|
-
schematic_sheet_id:
|
|
1257
|
-
schematic_component_id:
|
|
1258
|
-
schematic_symbol_id:
|
|
1277
|
+
schematic_sheet_id: z78.string().optional(),
|
|
1278
|
+
schematic_component_id: z78.string().optional(),
|
|
1279
|
+
schematic_symbol_id: z78.string().optional(),
|
|
1259
1280
|
center: point,
|
|
1260
1281
|
radius: distance,
|
|
1261
1282
|
stroke_width: distance.nullable().optional(),
|
|
1262
|
-
color:
|
|
1263
|
-
is_filled:
|
|
1264
|
-
fill_color:
|
|
1265
|
-
is_dashed:
|
|
1266
|
-
subcircuit_id:
|
|
1283
|
+
color: z78.string().default("#000000"),
|
|
1284
|
+
is_filled: z78.boolean().default(false),
|
|
1285
|
+
fill_color: z78.string().optional(),
|
|
1286
|
+
is_dashed: z78.boolean().default(false),
|
|
1287
|
+
subcircuit_id: z78.string().optional()
|
|
1267
1288
|
}).describe("Draws a styled circle on the schematic");
|
|
1268
1289
|
expectTypesMatch(true);
|
|
1269
1290
|
|
|
1270
1291
|
// src/schematic/schematic_arc.ts
|
|
1271
|
-
import { z as
|
|
1272
|
-
var schematic_arc =
|
|
1273
|
-
type:
|
|
1292
|
+
import { z as z79 } from "zod";
|
|
1293
|
+
var schematic_arc = z79.object({
|
|
1294
|
+
type: z79.literal("schematic_arc"),
|
|
1274
1295
|
schematic_arc_id: getZodPrefixedIdWithDefault("schematic_arc"),
|
|
1275
|
-
schematic_sheet_id:
|
|
1276
|
-
schematic_component_id:
|
|
1277
|
-
schematic_symbol_id:
|
|
1296
|
+
schematic_sheet_id: z79.string().optional(),
|
|
1297
|
+
schematic_component_id: z79.string().optional(),
|
|
1298
|
+
schematic_symbol_id: z79.string().optional(),
|
|
1278
1299
|
center: point,
|
|
1279
1300
|
radius: distance,
|
|
1280
1301
|
start_angle_degrees: rotation,
|
|
1281
1302
|
end_angle_degrees: rotation,
|
|
1282
|
-
direction:
|
|
1303
|
+
direction: z79.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
1283
1304
|
stroke_width: distance.nullable().optional(),
|
|
1284
|
-
color:
|
|
1285
|
-
is_dashed:
|
|
1286
|
-
subcircuit_id:
|
|
1305
|
+
color: z79.string().default("#000000"),
|
|
1306
|
+
is_dashed: z79.boolean().default(false),
|
|
1307
|
+
subcircuit_id: z79.string().optional()
|
|
1287
1308
|
}).describe("Draws a styled arc on the schematic");
|
|
1288
1309
|
expectTypesMatch(true);
|
|
1289
1310
|
|
|
1290
1311
|
// src/schematic/schematic_trace.ts
|
|
1291
|
-
import { z as
|
|
1292
|
-
var schematic_trace =
|
|
1293
|
-
type:
|
|
1294
|
-
schematic_trace_id:
|
|
1295
|
-
schematic_sheet_id:
|
|
1296
|
-
source_trace_id:
|
|
1297
|
-
junctions:
|
|
1298
|
-
|
|
1299
|
-
x:
|
|
1300
|
-
y:
|
|
1312
|
+
import { z as z80 } from "zod";
|
|
1313
|
+
var schematic_trace = z80.object({
|
|
1314
|
+
type: z80.literal("schematic_trace"),
|
|
1315
|
+
schematic_trace_id: z80.string(),
|
|
1316
|
+
schematic_sheet_id: z80.string().optional(),
|
|
1317
|
+
source_trace_id: z80.string().optional(),
|
|
1318
|
+
junctions: z80.array(
|
|
1319
|
+
z80.object({
|
|
1320
|
+
x: z80.number(),
|
|
1321
|
+
y: z80.number()
|
|
1301
1322
|
})
|
|
1302
1323
|
),
|
|
1303
|
-
edges:
|
|
1304
|
-
|
|
1305
|
-
from:
|
|
1306
|
-
x:
|
|
1307
|
-
y:
|
|
1324
|
+
edges: z80.array(
|
|
1325
|
+
z80.object({
|
|
1326
|
+
from: z80.object({
|
|
1327
|
+
x: z80.number(),
|
|
1328
|
+
y: z80.number()
|
|
1308
1329
|
}),
|
|
1309
|
-
to:
|
|
1310
|
-
x:
|
|
1311
|
-
y:
|
|
1330
|
+
to: z80.object({
|
|
1331
|
+
x: z80.number(),
|
|
1332
|
+
y: z80.number()
|
|
1312
1333
|
}),
|
|
1313
|
-
is_crossing:
|
|
1314
|
-
from_schematic_port_id:
|
|
1315
|
-
to_schematic_port_id:
|
|
1334
|
+
is_crossing: z80.boolean().optional(),
|
|
1335
|
+
from_schematic_port_id: z80.string().optional(),
|
|
1336
|
+
to_schematic_port_id: z80.string().optional()
|
|
1316
1337
|
})
|
|
1317
1338
|
),
|
|
1318
|
-
subcircuit_id:
|
|
1339
|
+
subcircuit_id: z80.string().optional(),
|
|
1319
1340
|
// TODO: make required in a future release
|
|
1320
|
-
subcircuit_connectivity_map_key:
|
|
1341
|
+
subcircuit_connectivity_map_key: z80.string().optional()
|
|
1321
1342
|
});
|
|
1322
1343
|
expectTypesMatch(true);
|
|
1323
1344
|
|
|
1324
1345
|
// src/schematic/schematic_text.ts
|
|
1325
|
-
import { z as
|
|
1346
|
+
import { z as z82 } from "zod";
|
|
1326
1347
|
|
|
1327
1348
|
// src/common/FivePointAnchor.ts
|
|
1328
|
-
import { z as
|
|
1329
|
-
var fivePointAnchor =
|
|
1349
|
+
import { z as z81 } from "zod";
|
|
1350
|
+
var fivePointAnchor = z81.enum([
|
|
1330
1351
|
"center",
|
|
1331
1352
|
"left",
|
|
1332
1353
|
"right",
|
|
@@ -1336,114 +1357,114 @@ var fivePointAnchor = z80.enum([
|
|
|
1336
1357
|
expectTypesMatch(true);
|
|
1337
1358
|
|
|
1338
1359
|
// src/schematic/schematic_text.ts
|
|
1339
|
-
var schematic_text =
|
|
1340
|
-
type:
|
|
1341
|
-
schematic_sheet_id:
|
|
1342
|
-
schematic_component_id:
|
|
1343
|
-
schematic_symbol_id:
|
|
1344
|
-
schematic_text_id:
|
|
1345
|
-
text:
|
|
1346
|
-
font_size:
|
|
1347
|
-
position:
|
|
1360
|
+
var schematic_text = z82.object({
|
|
1361
|
+
type: z82.literal("schematic_text"),
|
|
1362
|
+
schematic_sheet_id: z82.string().optional(),
|
|
1363
|
+
schematic_component_id: z82.string().optional(),
|
|
1364
|
+
schematic_symbol_id: z82.string().optional(),
|
|
1365
|
+
schematic_text_id: z82.string(),
|
|
1366
|
+
text: z82.string(),
|
|
1367
|
+
font_size: z82.number().default(0.18),
|
|
1368
|
+
position: z82.object({
|
|
1348
1369
|
x: distance,
|
|
1349
1370
|
y: distance
|
|
1350
1371
|
}),
|
|
1351
|
-
rotation:
|
|
1352
|
-
anchor:
|
|
1353
|
-
color:
|
|
1354
|
-
subcircuit_id:
|
|
1372
|
+
rotation: z82.number().default(0),
|
|
1373
|
+
anchor: z82.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
1374
|
+
color: z82.string().default("#000000"),
|
|
1375
|
+
subcircuit_id: z82.string().optional()
|
|
1355
1376
|
});
|
|
1356
1377
|
expectTypesMatch(true);
|
|
1357
1378
|
|
|
1358
1379
|
// src/schematic/schematic_port.ts
|
|
1359
|
-
import { z as
|
|
1360
|
-
var schematic_port =
|
|
1361
|
-
type:
|
|
1362
|
-
schematic_port_id:
|
|
1363
|
-
source_port_id:
|
|
1364
|
-
schematic_sheet_id:
|
|
1365
|
-
schematic_component_id:
|
|
1380
|
+
import { z as z83 } from "zod";
|
|
1381
|
+
var schematic_port = z83.object({
|
|
1382
|
+
type: z83.literal("schematic_port"),
|
|
1383
|
+
schematic_port_id: z83.string(),
|
|
1384
|
+
source_port_id: z83.string(),
|
|
1385
|
+
schematic_sheet_id: z83.string().optional(),
|
|
1386
|
+
schematic_component_id: z83.string().optional(),
|
|
1366
1387
|
center: point,
|
|
1367
|
-
facing_direction:
|
|
1368
|
-
distance_from_component_edge:
|
|
1369
|
-
side_of_component:
|
|
1370
|
-
true_ccw_index:
|
|
1371
|
-
pin_number:
|
|
1372
|
-
display_pin_label:
|
|
1373
|
-
subcircuit_id:
|
|
1374
|
-
is_connected:
|
|
1375
|
-
has_input_arrow:
|
|
1376
|
-
has_output_arrow:
|
|
1377
|
-
is_drawn_with_inversion_circle:
|
|
1388
|
+
facing_direction: z83.enum(["up", "down", "left", "right"]).optional(),
|
|
1389
|
+
distance_from_component_edge: z83.number().optional(),
|
|
1390
|
+
side_of_component: z83.enum(["top", "bottom", "left", "right"]).optional(),
|
|
1391
|
+
true_ccw_index: z83.number().optional(),
|
|
1392
|
+
pin_number: z83.number().optional(),
|
|
1393
|
+
display_pin_label: z83.string().optional(),
|
|
1394
|
+
subcircuit_id: z83.string().optional(),
|
|
1395
|
+
is_connected: z83.boolean().optional(),
|
|
1396
|
+
has_input_arrow: z83.boolean().optional(),
|
|
1397
|
+
has_output_arrow: z83.boolean().optional(),
|
|
1398
|
+
is_drawn_with_inversion_circle: z83.boolean().optional()
|
|
1378
1399
|
}).describe("Defines a port on a schematic component");
|
|
1379
1400
|
expectTypesMatch(true);
|
|
1380
1401
|
|
|
1381
1402
|
// src/schematic/schematic_net_label.ts
|
|
1382
|
-
import { z as
|
|
1383
|
-
var schematic_net_label =
|
|
1384
|
-
type:
|
|
1403
|
+
import { z as z84 } from "zod";
|
|
1404
|
+
var schematic_net_label = z84.object({
|
|
1405
|
+
type: z84.literal("schematic_net_label"),
|
|
1385
1406
|
schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
|
|
1386
|
-
schematic_sheet_id:
|
|
1387
|
-
schematic_trace_id:
|
|
1388
|
-
source_trace_id:
|
|
1389
|
-
source_net_id:
|
|
1407
|
+
schematic_sheet_id: z84.string().optional(),
|
|
1408
|
+
schematic_trace_id: z84.string().optional(),
|
|
1409
|
+
source_trace_id: z84.string().optional(),
|
|
1410
|
+
source_net_id: z84.string(),
|
|
1390
1411
|
center: point,
|
|
1391
1412
|
anchor_position: point.optional(),
|
|
1392
|
-
anchor_side:
|
|
1393
|
-
text:
|
|
1394
|
-
symbol_name:
|
|
1395
|
-
is_movable:
|
|
1396
|
-
subcircuit_id:
|
|
1413
|
+
anchor_side: z84.enum(["top", "bottom", "left", "right"]),
|
|
1414
|
+
text: z84.string(),
|
|
1415
|
+
symbol_name: z84.string().optional(),
|
|
1416
|
+
is_movable: z84.boolean().optional(),
|
|
1417
|
+
subcircuit_id: z84.string().optional()
|
|
1397
1418
|
});
|
|
1398
1419
|
expectTypesMatch(true);
|
|
1399
1420
|
|
|
1400
1421
|
// src/schematic/schematic_error.ts
|
|
1401
|
-
import { z as
|
|
1422
|
+
import { z as z85 } from "zod";
|
|
1402
1423
|
var schematic_error = base_circuit_json_error.extend({
|
|
1403
|
-
type:
|
|
1404
|
-
schematic_error_id:
|
|
1424
|
+
type: z85.literal("schematic_error"),
|
|
1425
|
+
schematic_error_id: z85.string(),
|
|
1405
1426
|
// eventually each error type should be broken out into a dir of files
|
|
1406
|
-
error_type:
|
|
1407
|
-
subcircuit_id:
|
|
1427
|
+
error_type: z85.literal("schematic_port_not_found").default("schematic_port_not_found"),
|
|
1428
|
+
subcircuit_id: z85.string().optional()
|
|
1408
1429
|
}).describe("Defines a schematic error on the schematic");
|
|
1409
1430
|
expectTypesMatch(true);
|
|
1410
1431
|
|
|
1411
1432
|
// src/schematic/schematic_layout_error.ts
|
|
1412
|
-
import { z as
|
|
1433
|
+
import { z as z86 } from "zod";
|
|
1413
1434
|
var schematic_layout_error = base_circuit_json_error.extend({
|
|
1414
|
-
type:
|
|
1435
|
+
type: z86.literal("schematic_layout_error"),
|
|
1415
1436
|
schematic_layout_error_id: getZodPrefixedIdWithDefault(
|
|
1416
1437
|
"schematic_layout_error"
|
|
1417
1438
|
),
|
|
1418
|
-
error_type:
|
|
1419
|
-
source_group_id:
|
|
1420
|
-
schematic_group_id:
|
|
1421
|
-
subcircuit_id:
|
|
1439
|
+
error_type: z86.literal("schematic_layout_error").default("schematic_layout_error"),
|
|
1440
|
+
source_group_id: z86.string(),
|
|
1441
|
+
schematic_group_id: z86.string(),
|
|
1442
|
+
subcircuit_id: z86.string().optional()
|
|
1422
1443
|
}).describe("Error emitted when schematic layout fails for a group");
|
|
1423
1444
|
expectTypesMatch(true);
|
|
1424
1445
|
|
|
1425
1446
|
// src/schematic/schematic_debug_object.ts
|
|
1426
|
-
import { z as
|
|
1427
|
-
var schematic_debug_object_base =
|
|
1428
|
-
type:
|
|
1429
|
-
label:
|
|
1430
|
-
subcircuit_id:
|
|
1447
|
+
import { z as z87 } from "zod";
|
|
1448
|
+
var schematic_debug_object_base = z87.object({
|
|
1449
|
+
type: z87.literal("schematic_debug_object"),
|
|
1450
|
+
label: z87.string().optional(),
|
|
1451
|
+
subcircuit_id: z87.string().optional()
|
|
1431
1452
|
});
|
|
1432
1453
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
1433
|
-
shape:
|
|
1454
|
+
shape: z87.literal("rect"),
|
|
1434
1455
|
center: point,
|
|
1435
1456
|
size
|
|
1436
1457
|
});
|
|
1437
1458
|
var schematic_debug_line = schematic_debug_object_base.extend({
|
|
1438
|
-
shape:
|
|
1459
|
+
shape: z87.literal("line"),
|
|
1439
1460
|
start: point,
|
|
1440
1461
|
end: point
|
|
1441
1462
|
});
|
|
1442
1463
|
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
1443
|
-
shape:
|
|
1464
|
+
shape: z87.literal("point"),
|
|
1444
1465
|
center: point
|
|
1445
1466
|
});
|
|
1446
|
-
var schematic_debug_object =
|
|
1467
|
+
var schematic_debug_object = z87.discriminatedUnion("shape", [
|
|
1447
1468
|
schematic_debug_rect,
|
|
1448
1469
|
schematic_debug_line,
|
|
1449
1470
|
schematic_debug_point
|
|
@@ -1451,158 +1472,158 @@ var schematic_debug_object = z86.discriminatedUnion("shape", [
|
|
|
1451
1472
|
expectTypesMatch(true);
|
|
1452
1473
|
|
|
1453
1474
|
// src/schematic/schematic_voltage_probe.ts
|
|
1454
|
-
import { z as
|
|
1455
|
-
var schematic_voltage_probe =
|
|
1456
|
-
type:
|
|
1457
|
-
schematic_voltage_probe_id:
|
|
1458
|
-
schematic_sheet_id:
|
|
1459
|
-
source_component_id:
|
|
1460
|
-
name:
|
|
1475
|
+
import { z as z88 } from "zod";
|
|
1476
|
+
var schematic_voltage_probe = z88.object({
|
|
1477
|
+
type: z88.literal("schematic_voltage_probe"),
|
|
1478
|
+
schematic_voltage_probe_id: z88.string(),
|
|
1479
|
+
schematic_sheet_id: z88.string().optional(),
|
|
1480
|
+
source_component_id: z88.string().optional(),
|
|
1481
|
+
name: z88.string().optional(),
|
|
1461
1482
|
position: point,
|
|
1462
|
-
schematic_trace_id:
|
|
1483
|
+
schematic_trace_id: z88.string(),
|
|
1463
1484
|
voltage: voltage.optional(),
|
|
1464
|
-
subcircuit_id:
|
|
1465
|
-
color:
|
|
1485
|
+
subcircuit_id: z88.string().optional(),
|
|
1486
|
+
color: z88.string().optional(),
|
|
1466
1487
|
label_alignment: ninePointAnchor.optional()
|
|
1467
1488
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
1468
1489
|
expectTypesMatch(true);
|
|
1469
1490
|
|
|
1470
1491
|
// src/schematic/schematic_manual_edit_conflict_warning.ts
|
|
1471
|
-
import { z as
|
|
1472
|
-
var schematic_manual_edit_conflict_warning =
|
|
1473
|
-
type:
|
|
1492
|
+
import { z as z89 } from "zod";
|
|
1493
|
+
var schematic_manual_edit_conflict_warning = z89.object({
|
|
1494
|
+
type: z89.literal("schematic_manual_edit_conflict_warning"),
|
|
1474
1495
|
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1475
1496
|
"schematic_manual_edit_conflict_warning"
|
|
1476
1497
|
),
|
|
1477
|
-
warning_type:
|
|
1478
|
-
message:
|
|
1479
|
-
schematic_component_id:
|
|
1480
|
-
schematic_group_id:
|
|
1481
|
-
subcircuit_id:
|
|
1482
|
-
source_component_id:
|
|
1498
|
+
warning_type: z89.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),
|
|
1499
|
+
message: z89.string(),
|
|
1500
|
+
schematic_component_id: z89.string(),
|
|
1501
|
+
schematic_group_id: z89.string().optional(),
|
|
1502
|
+
subcircuit_id: z89.string().optional(),
|
|
1503
|
+
source_component_id: z89.string()
|
|
1483
1504
|
}).describe(
|
|
1484
1505
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
1485
1506
|
);
|
|
1486
1507
|
expectTypesMatch(true);
|
|
1487
1508
|
|
|
1488
1509
|
// src/schematic/schematic_group.ts
|
|
1489
|
-
import { z as
|
|
1490
|
-
var schematic_group =
|
|
1491
|
-
type:
|
|
1510
|
+
import { z as z90 } from "zod";
|
|
1511
|
+
var schematic_group = z90.object({
|
|
1512
|
+
type: z90.literal("schematic_group"),
|
|
1492
1513
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
1493
|
-
schematic_sheet_id:
|
|
1494
|
-
source_group_id:
|
|
1495
|
-
is_subcircuit:
|
|
1496
|
-
subcircuit_id:
|
|
1514
|
+
schematic_sheet_id: z90.string().optional(),
|
|
1515
|
+
source_group_id: z90.string(),
|
|
1516
|
+
is_subcircuit: z90.boolean().optional(),
|
|
1517
|
+
subcircuit_id: z90.string().optional(),
|
|
1497
1518
|
width: length,
|
|
1498
1519
|
height: length,
|
|
1499
1520
|
center: point,
|
|
1500
|
-
schematic_component_ids:
|
|
1501
|
-
show_as_schematic_box:
|
|
1502
|
-
name:
|
|
1503
|
-
description:
|
|
1521
|
+
schematic_component_ids: z90.array(z90.string()),
|
|
1522
|
+
show_as_schematic_box: z90.boolean().optional(),
|
|
1523
|
+
name: z90.string().optional(),
|
|
1524
|
+
description: z90.string().optional()
|
|
1504
1525
|
}).describe("Defines a group of components on the schematic");
|
|
1505
1526
|
expectTypesMatch(true);
|
|
1506
1527
|
|
|
1507
1528
|
// src/schematic/schematic_table.ts
|
|
1508
|
-
import { z as
|
|
1509
|
-
var schematic_table =
|
|
1510
|
-
type:
|
|
1529
|
+
import { z as z91 } from "zod";
|
|
1530
|
+
var schematic_table = z91.object({
|
|
1531
|
+
type: z91.literal("schematic_table"),
|
|
1511
1532
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
1512
|
-
schematic_sheet_id:
|
|
1533
|
+
schematic_sheet_id: z91.string().optional(),
|
|
1513
1534
|
anchor_position: point,
|
|
1514
|
-
column_widths:
|
|
1515
|
-
row_heights:
|
|
1535
|
+
column_widths: z91.array(distance),
|
|
1536
|
+
row_heights: z91.array(distance),
|
|
1516
1537
|
cell_padding: distance.optional(),
|
|
1517
1538
|
border_width: distance.optional(),
|
|
1518
|
-
subcircuit_id:
|
|
1519
|
-
schematic_component_id:
|
|
1539
|
+
subcircuit_id: z91.string().optional(),
|
|
1540
|
+
schematic_component_id: z91.string().optional(),
|
|
1520
1541
|
anchor: ninePointAnchor.optional()
|
|
1521
1542
|
}).describe("Defines a table on the schematic");
|
|
1522
1543
|
expectTypesMatch(true);
|
|
1523
1544
|
|
|
1524
1545
|
// src/schematic/schematic_table_cell.ts
|
|
1525
|
-
import { z as
|
|
1526
|
-
var schematic_table_cell =
|
|
1527
|
-
type:
|
|
1546
|
+
import { z as z92 } from "zod";
|
|
1547
|
+
var schematic_table_cell = z92.object({
|
|
1548
|
+
type: z92.literal("schematic_table_cell"),
|
|
1528
1549
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
1529
1550
|
"schematic_table_cell"
|
|
1530
1551
|
),
|
|
1531
|
-
schematic_sheet_id:
|
|
1532
|
-
schematic_table_id:
|
|
1533
|
-
start_row_index:
|
|
1534
|
-
end_row_index:
|
|
1535
|
-
start_column_index:
|
|
1536
|
-
end_column_index:
|
|
1537
|
-
text:
|
|
1552
|
+
schematic_sheet_id: z92.string().optional(),
|
|
1553
|
+
schematic_table_id: z92.string(),
|
|
1554
|
+
start_row_index: z92.number(),
|
|
1555
|
+
end_row_index: z92.number(),
|
|
1556
|
+
start_column_index: z92.number(),
|
|
1557
|
+
end_column_index: z92.number(),
|
|
1558
|
+
text: z92.string().optional(),
|
|
1538
1559
|
center: point,
|
|
1539
1560
|
width: distance,
|
|
1540
1561
|
height: distance,
|
|
1541
|
-
horizontal_align:
|
|
1542
|
-
vertical_align:
|
|
1562
|
+
horizontal_align: z92.enum(["left", "center", "right"]).optional(),
|
|
1563
|
+
vertical_align: z92.enum(["top", "middle", "bottom"]).optional(),
|
|
1543
1564
|
font_size: distance.optional(),
|
|
1544
|
-
subcircuit_id:
|
|
1565
|
+
subcircuit_id: z92.string().optional()
|
|
1545
1566
|
}).describe("Defines a cell within a schematic_table");
|
|
1546
1567
|
expectTypesMatch(true);
|
|
1547
1568
|
|
|
1548
1569
|
// src/schematic/schematic_sheet.ts
|
|
1549
|
-
import { z as
|
|
1550
|
-
var schematic_sheet =
|
|
1551
|
-
type:
|
|
1570
|
+
import { z as z93 } from "zod";
|
|
1571
|
+
var schematic_sheet = z93.object({
|
|
1572
|
+
type: z93.literal("schematic_sheet"),
|
|
1552
1573
|
schematic_sheet_id: getZodPrefixedIdWithDefault("schematic_sheet"),
|
|
1553
|
-
name:
|
|
1554
|
-
sheet_index:
|
|
1555
|
-
subcircuit_id:
|
|
1556
|
-
outline_color:
|
|
1574
|
+
name: z93.string().optional(),
|
|
1575
|
+
sheet_index: z93.number().optional(),
|
|
1576
|
+
subcircuit_id: z93.string().optional(),
|
|
1577
|
+
outline_color: z93.string().optional()
|
|
1557
1578
|
}).describe(
|
|
1558
1579
|
"Defines a schematic sheet or page that components can be placed on"
|
|
1559
1580
|
);
|
|
1560
1581
|
expectTypesMatch(true);
|
|
1561
1582
|
|
|
1562
1583
|
// src/pcb/properties/brep.ts
|
|
1563
|
-
import { z as
|
|
1564
|
-
var point_with_bulge =
|
|
1584
|
+
import { z as z94 } from "zod";
|
|
1585
|
+
var point_with_bulge = z94.object({
|
|
1565
1586
|
x: distance,
|
|
1566
1587
|
y: distance,
|
|
1567
|
-
bulge:
|
|
1588
|
+
bulge: z94.number().optional()
|
|
1568
1589
|
});
|
|
1569
1590
|
expectTypesMatch(true);
|
|
1570
|
-
var ring =
|
|
1571
|
-
vertices:
|
|
1591
|
+
var ring = z94.object({
|
|
1592
|
+
vertices: z94.array(point_with_bulge)
|
|
1572
1593
|
});
|
|
1573
1594
|
expectTypesMatch(true);
|
|
1574
|
-
var brep_shape =
|
|
1595
|
+
var brep_shape = z94.object({
|
|
1575
1596
|
outer_ring: ring,
|
|
1576
|
-
inner_rings:
|
|
1597
|
+
inner_rings: z94.array(ring).default([])
|
|
1577
1598
|
});
|
|
1578
1599
|
expectTypesMatch(true);
|
|
1579
1600
|
|
|
1580
1601
|
// src/pcb/properties/pcb_route_hints.ts
|
|
1581
|
-
import { z as
|
|
1582
|
-
var pcb_route_hint =
|
|
1602
|
+
import { z as z95 } from "zod";
|
|
1603
|
+
var pcb_route_hint = z95.object({
|
|
1583
1604
|
x: distance,
|
|
1584
1605
|
y: distance,
|
|
1585
|
-
via:
|
|
1606
|
+
via: z95.boolean().optional(),
|
|
1586
1607
|
via_to_layer: layer_ref.optional()
|
|
1587
1608
|
});
|
|
1588
|
-
var pcb_route_hints =
|
|
1609
|
+
var pcb_route_hints = z95.array(pcb_route_hint);
|
|
1589
1610
|
expectTypesMatch(true);
|
|
1590
1611
|
expectTypesMatch(true);
|
|
1591
1612
|
|
|
1592
1613
|
// src/pcb/properties/route_hint_point.ts
|
|
1593
|
-
import { z as
|
|
1594
|
-
var route_hint_point =
|
|
1614
|
+
import { z as z96 } from "zod";
|
|
1615
|
+
var route_hint_point = z96.object({
|
|
1595
1616
|
x: distance,
|
|
1596
1617
|
y: distance,
|
|
1597
|
-
via:
|
|
1618
|
+
via: z96.boolean().optional(),
|
|
1598
1619
|
to_layer: layer_ref.optional(),
|
|
1599
1620
|
trace_width: distance.optional()
|
|
1600
1621
|
});
|
|
1601
1622
|
expectTypesMatch(true);
|
|
1602
1623
|
|
|
1603
1624
|
// src/pcb/properties/manufacturing_drc_properties.ts
|
|
1604
|
-
import { z as
|
|
1605
|
-
var manufacturing_drc_properties =
|
|
1625
|
+
import { z as z97 } from "zod";
|
|
1626
|
+
var manufacturing_drc_properties = z97.object({
|
|
1606
1627
|
min_trace_width: length.optional(),
|
|
1607
1628
|
min_board_edge_clearance: length.optional(),
|
|
1608
1629
|
min_via_hole_edge_to_via_hole_edge_clearance: length.optional(),
|
|
@@ -1617,27 +1638,27 @@ var manufacturing_drc_properties = z96.object({
|
|
|
1617
1638
|
});
|
|
1618
1639
|
|
|
1619
1640
|
// src/pcb/pcb_component.ts
|
|
1620
|
-
import { z as
|
|
1621
|
-
var pcb_component =
|
|
1622
|
-
type:
|
|
1641
|
+
import { z as z98 } from "zod";
|
|
1642
|
+
var pcb_component = z98.object({
|
|
1643
|
+
type: z98.literal("pcb_component"),
|
|
1623
1644
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
1624
|
-
source_component_id:
|
|
1645
|
+
source_component_id: z98.string(),
|
|
1625
1646
|
center: point,
|
|
1626
1647
|
layer: layer_ref,
|
|
1627
1648
|
rotation,
|
|
1628
|
-
display_offset_x:
|
|
1649
|
+
display_offset_x: z98.string().optional().describe(
|
|
1629
1650
|
"How to display the x offset for this part, usually corresponding with how the user specified it"
|
|
1630
1651
|
),
|
|
1631
|
-
display_offset_y:
|
|
1652
|
+
display_offset_y: z98.string().optional().describe(
|
|
1632
1653
|
"How to display the y offset for this part, usually corresponding with how the user specified it"
|
|
1633
1654
|
),
|
|
1634
1655
|
width: length,
|
|
1635
1656
|
height: length,
|
|
1636
|
-
do_not_place:
|
|
1637
|
-
is_allowed_to_be_off_board:
|
|
1638
|
-
subcircuit_id:
|
|
1639
|
-
pcb_group_id:
|
|
1640
|
-
position_mode:
|
|
1657
|
+
do_not_place: z98.boolean().optional(),
|
|
1658
|
+
is_allowed_to_be_off_board: z98.boolean().optional(),
|
|
1659
|
+
subcircuit_id: z98.string().optional(),
|
|
1660
|
+
pcb_group_id: z98.string().optional(),
|
|
1661
|
+
position_mode: z98.enum([
|
|
1641
1662
|
"packed",
|
|
1642
1663
|
"relative_to_group_anchor",
|
|
1643
1664
|
"relative_to_another_component",
|
|
@@ -1645,129 +1666,129 @@ var pcb_component = z97.object({
|
|
|
1645
1666
|
]).optional(),
|
|
1646
1667
|
anchor_position: point.optional(),
|
|
1647
1668
|
anchor_alignment: ninePointAnchor.optional(),
|
|
1648
|
-
positioned_relative_to_pcb_group_id:
|
|
1649
|
-
positioned_relative_to_pcb_board_id:
|
|
1669
|
+
positioned_relative_to_pcb_group_id: z98.string().optional(),
|
|
1670
|
+
positioned_relative_to_pcb_board_id: z98.string().optional(),
|
|
1650
1671
|
cable_insertion_center: point.optional(),
|
|
1651
|
-
insertion_direction:
|
|
1672
|
+
insertion_direction: z98.enum([
|
|
1652
1673
|
"from_above",
|
|
1653
1674
|
"from_left",
|
|
1654
1675
|
"from_right",
|
|
1655
1676
|
"from_front",
|
|
1656
1677
|
"from_back"
|
|
1657
1678
|
]).optional(),
|
|
1658
|
-
metadata:
|
|
1679
|
+
metadata: z98.object({
|
|
1659
1680
|
kicad_footprint: kicadFootprintMetadata.optional()
|
|
1660
1681
|
}).optional(),
|
|
1661
|
-
obstructs_within_bounds:
|
|
1682
|
+
obstructs_within_bounds: z98.boolean().default(true).describe(
|
|
1662
1683
|
"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"
|
|
1663
1684
|
)
|
|
1664
1685
|
}).describe("Defines a component on the PCB");
|
|
1665
1686
|
expectTypesMatch(true);
|
|
1666
1687
|
|
|
1667
1688
|
// src/pcb/pcb_hole.ts
|
|
1668
|
-
import { z as
|
|
1669
|
-
var pcb_hole_circle =
|
|
1670
|
-
type:
|
|
1689
|
+
import { z as z99 } from "zod";
|
|
1690
|
+
var pcb_hole_circle = z99.object({
|
|
1691
|
+
type: z99.literal("pcb_hole"),
|
|
1671
1692
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1672
|
-
pcb_group_id:
|
|
1673
|
-
subcircuit_id:
|
|
1674
|
-
pcb_component_id:
|
|
1675
|
-
hole_shape:
|
|
1676
|
-
hole_diameter:
|
|
1693
|
+
pcb_group_id: z99.string().optional(),
|
|
1694
|
+
subcircuit_id: z99.string().optional(),
|
|
1695
|
+
pcb_component_id: z99.string().optional(),
|
|
1696
|
+
hole_shape: z99.literal("circle"),
|
|
1697
|
+
hole_diameter: z99.number(),
|
|
1677
1698
|
x: distance,
|
|
1678
1699
|
y: distance,
|
|
1679
|
-
is_covered_with_solder_mask:
|
|
1680
|
-
soldermask_margin:
|
|
1700
|
+
is_covered_with_solder_mask: z99.boolean().optional(),
|
|
1701
|
+
soldermask_margin: z99.number().optional()
|
|
1681
1702
|
});
|
|
1682
1703
|
var pcb_hole_circle_shape = pcb_hole_circle.describe(
|
|
1683
1704
|
"Defines a circular hole on the PCB"
|
|
1684
1705
|
);
|
|
1685
1706
|
expectTypesMatch(true);
|
|
1686
|
-
var pcb_hole_rect =
|
|
1687
|
-
type:
|
|
1707
|
+
var pcb_hole_rect = z99.object({
|
|
1708
|
+
type: z99.literal("pcb_hole"),
|
|
1688
1709
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1689
|
-
pcb_group_id:
|
|
1690
|
-
subcircuit_id:
|
|
1691
|
-
pcb_component_id:
|
|
1692
|
-
hole_shape:
|
|
1693
|
-
hole_width:
|
|
1694
|
-
hole_height:
|
|
1710
|
+
pcb_group_id: z99.string().optional(),
|
|
1711
|
+
subcircuit_id: z99.string().optional(),
|
|
1712
|
+
pcb_component_id: z99.string().optional(),
|
|
1713
|
+
hole_shape: z99.literal("rect"),
|
|
1714
|
+
hole_width: z99.number(),
|
|
1715
|
+
hole_height: z99.number(),
|
|
1695
1716
|
x: distance,
|
|
1696
1717
|
y: distance,
|
|
1697
|
-
is_covered_with_solder_mask:
|
|
1698
|
-
soldermask_margin:
|
|
1718
|
+
is_covered_with_solder_mask: z99.boolean().optional(),
|
|
1719
|
+
soldermask_margin: z99.number().optional()
|
|
1699
1720
|
});
|
|
1700
1721
|
var pcb_hole_rect_shape = pcb_hole_rect.describe(
|
|
1701
1722
|
"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
|
|
1702
1723
|
);
|
|
1703
1724
|
expectTypesMatch(true);
|
|
1704
|
-
var pcb_hole_circle_or_square =
|
|
1705
|
-
type:
|
|
1725
|
+
var pcb_hole_circle_or_square = z99.object({
|
|
1726
|
+
type: z99.literal("pcb_hole"),
|
|
1706
1727
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1707
|
-
pcb_group_id:
|
|
1708
|
-
subcircuit_id:
|
|
1709
|
-
pcb_component_id:
|
|
1710
|
-
hole_shape:
|
|
1711
|
-
hole_diameter:
|
|
1728
|
+
pcb_group_id: z99.string().optional(),
|
|
1729
|
+
subcircuit_id: z99.string().optional(),
|
|
1730
|
+
pcb_component_id: z99.string().optional(),
|
|
1731
|
+
hole_shape: z99.enum(["circle", "square"]),
|
|
1732
|
+
hole_diameter: z99.number(),
|
|
1712
1733
|
x: distance,
|
|
1713
1734
|
y: distance,
|
|
1714
|
-
is_covered_with_solder_mask:
|
|
1715
|
-
soldermask_margin:
|
|
1735
|
+
is_covered_with_solder_mask: z99.boolean().optional(),
|
|
1736
|
+
soldermask_margin: z99.number().optional()
|
|
1716
1737
|
});
|
|
1717
1738
|
var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
1718
1739
|
"Defines a circular or square hole on the PCB"
|
|
1719
1740
|
);
|
|
1720
1741
|
expectTypesMatch(true);
|
|
1721
|
-
var pcb_hole_oval =
|
|
1722
|
-
type:
|
|
1742
|
+
var pcb_hole_oval = z99.object({
|
|
1743
|
+
type: z99.literal("pcb_hole"),
|
|
1723
1744
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1724
|
-
pcb_group_id:
|
|
1725
|
-
subcircuit_id:
|
|
1726
|
-
pcb_component_id:
|
|
1727
|
-
hole_shape:
|
|
1728
|
-
hole_width:
|
|
1729
|
-
hole_height:
|
|
1730
|
-
x: distance,
|
|
1731
|
-
y: distance,
|
|
1732
|
-
is_covered_with_solder_mask:
|
|
1733
|
-
soldermask_margin:
|
|
1734
|
-
});
|
|
1735
|
-
var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
1745
|
+
pcb_group_id: z99.string().optional(),
|
|
1746
|
+
subcircuit_id: z99.string().optional(),
|
|
1747
|
+
pcb_component_id: z99.string().optional(),
|
|
1748
|
+
hole_shape: z99.literal("oval"),
|
|
1749
|
+
hole_width: z99.number(),
|
|
1750
|
+
hole_height: z99.number(),
|
|
1751
|
+
x: distance,
|
|
1752
|
+
y: distance,
|
|
1753
|
+
is_covered_with_solder_mask: z99.boolean().optional(),
|
|
1754
|
+
soldermask_margin: z99.number().optional()
|
|
1755
|
+
});
|
|
1756
|
+
var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
1736
1757
|
"Defines an oval hole on the PCB"
|
|
1737
1758
|
);
|
|
1738
1759
|
expectTypesMatch(true);
|
|
1739
|
-
var pcb_hole_pill =
|
|
1740
|
-
type:
|
|
1760
|
+
var pcb_hole_pill = z99.object({
|
|
1761
|
+
type: z99.literal("pcb_hole"),
|
|
1741
1762
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1742
|
-
pcb_group_id:
|
|
1743
|
-
subcircuit_id:
|
|
1744
|
-
pcb_component_id:
|
|
1745
|
-
hole_shape:
|
|
1746
|
-
hole_width:
|
|
1747
|
-
hole_height:
|
|
1763
|
+
pcb_group_id: z99.string().optional(),
|
|
1764
|
+
subcircuit_id: z99.string().optional(),
|
|
1765
|
+
pcb_component_id: z99.string().optional(),
|
|
1766
|
+
hole_shape: z99.literal("pill"),
|
|
1767
|
+
hole_width: z99.number(),
|
|
1768
|
+
hole_height: z99.number(),
|
|
1748
1769
|
x: distance,
|
|
1749
1770
|
y: distance,
|
|
1750
|
-
is_covered_with_solder_mask:
|
|
1751
|
-
soldermask_margin:
|
|
1771
|
+
is_covered_with_solder_mask: z99.boolean().optional(),
|
|
1772
|
+
soldermask_margin: z99.number().optional()
|
|
1752
1773
|
});
|
|
1753
1774
|
var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
1754
1775
|
"Defines a pill-shaped hole on the PCB"
|
|
1755
1776
|
);
|
|
1756
1777
|
expectTypesMatch(true);
|
|
1757
|
-
var pcb_hole_rotated_pill =
|
|
1758
|
-
type:
|
|
1778
|
+
var pcb_hole_rotated_pill = z99.object({
|
|
1779
|
+
type: z99.literal("pcb_hole"),
|
|
1759
1780
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1760
|
-
pcb_group_id:
|
|
1761
|
-
subcircuit_id:
|
|
1762
|
-
pcb_component_id:
|
|
1763
|
-
hole_shape:
|
|
1764
|
-
hole_width:
|
|
1765
|
-
hole_height:
|
|
1781
|
+
pcb_group_id: z99.string().optional(),
|
|
1782
|
+
subcircuit_id: z99.string().optional(),
|
|
1783
|
+
pcb_component_id: z99.string().optional(),
|
|
1784
|
+
hole_shape: z99.literal("rotated_pill"),
|
|
1785
|
+
hole_width: z99.number(),
|
|
1786
|
+
hole_height: z99.number(),
|
|
1766
1787
|
x: distance,
|
|
1767
1788
|
y: distance,
|
|
1768
1789
|
ccw_rotation: rotation,
|
|
1769
|
-
is_covered_with_solder_mask:
|
|
1770
|
-
soldermask_margin:
|
|
1790
|
+
is_covered_with_solder_mask: z99.boolean().optional(),
|
|
1791
|
+
soldermask_margin: z99.number().optional()
|
|
1771
1792
|
});
|
|
1772
1793
|
var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
|
|
1773
1794
|
"Defines a rotated pill-shaped hole on the PCB"
|
|
@@ -1776,147 +1797,147 @@ expectTypesMatch(true);
|
|
|
1776
1797
|
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);
|
|
1777
1798
|
|
|
1778
1799
|
// src/pcb/pcb_plated_hole.ts
|
|
1779
|
-
import { z as
|
|
1780
|
-
var pcb_plated_hole_circle =
|
|
1781
|
-
type:
|
|
1782
|
-
shape:
|
|
1783
|
-
pcb_group_id:
|
|
1784
|
-
subcircuit_id:
|
|
1785
|
-
outer_diameter:
|
|
1786
|
-
hole_diameter:
|
|
1787
|
-
is_covered_with_solder_mask:
|
|
1800
|
+
import { z as z100 } from "zod";
|
|
1801
|
+
var pcb_plated_hole_circle = z100.object({
|
|
1802
|
+
type: z100.literal("pcb_plated_hole"),
|
|
1803
|
+
shape: z100.literal("circle"),
|
|
1804
|
+
pcb_group_id: z100.string().optional(),
|
|
1805
|
+
subcircuit_id: z100.string().optional(),
|
|
1806
|
+
outer_diameter: z100.number(),
|
|
1807
|
+
hole_diameter: z100.number(),
|
|
1808
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
1788
1809
|
x: distance,
|
|
1789
1810
|
y: distance,
|
|
1790
|
-
layers:
|
|
1791
|
-
port_hints:
|
|
1792
|
-
pcb_component_id:
|
|
1793
|
-
pcb_port_id:
|
|
1811
|
+
layers: z100.array(layer_ref),
|
|
1812
|
+
port_hints: z100.array(z100.string()).optional(),
|
|
1813
|
+
pcb_component_id: z100.string().optional(),
|
|
1814
|
+
pcb_port_id: z100.string().optional(),
|
|
1794
1815
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1795
|
-
soldermask_margin:
|
|
1816
|
+
soldermask_margin: z100.number().optional()
|
|
1796
1817
|
});
|
|
1797
|
-
var pcb_plated_hole_oval =
|
|
1798
|
-
type:
|
|
1799
|
-
shape:
|
|
1800
|
-
pcb_group_id:
|
|
1801
|
-
subcircuit_id:
|
|
1802
|
-
outer_width:
|
|
1803
|
-
outer_height:
|
|
1804
|
-
hole_width:
|
|
1805
|
-
hole_height:
|
|
1806
|
-
is_covered_with_solder_mask:
|
|
1818
|
+
var pcb_plated_hole_oval = z100.object({
|
|
1819
|
+
type: z100.literal("pcb_plated_hole"),
|
|
1820
|
+
shape: z100.enum(["oval", "pill"]),
|
|
1821
|
+
pcb_group_id: z100.string().optional(),
|
|
1822
|
+
subcircuit_id: z100.string().optional(),
|
|
1823
|
+
outer_width: z100.number(),
|
|
1824
|
+
outer_height: z100.number(),
|
|
1825
|
+
hole_width: z100.number(),
|
|
1826
|
+
hole_height: z100.number(),
|
|
1827
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
1807
1828
|
x: distance,
|
|
1808
1829
|
y: distance,
|
|
1809
1830
|
ccw_rotation: rotation,
|
|
1810
|
-
layers:
|
|
1811
|
-
port_hints:
|
|
1812
|
-
pcb_component_id:
|
|
1813
|
-
pcb_port_id:
|
|
1831
|
+
layers: z100.array(layer_ref),
|
|
1832
|
+
port_hints: z100.array(z100.string()).optional(),
|
|
1833
|
+
pcb_component_id: z100.string().optional(),
|
|
1834
|
+
pcb_port_id: z100.string().optional(),
|
|
1814
1835
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1815
|
-
soldermask_margin:
|
|
1836
|
+
soldermask_margin: z100.number().optional()
|
|
1816
1837
|
});
|
|
1817
|
-
var pcb_circular_hole_with_rect_pad =
|
|
1818
|
-
type:
|
|
1819
|
-
shape:
|
|
1820
|
-
pcb_group_id:
|
|
1821
|
-
subcircuit_id:
|
|
1822
|
-
hole_shape:
|
|
1823
|
-
pad_shape:
|
|
1824
|
-
hole_diameter:
|
|
1825
|
-
rect_pad_width:
|
|
1826
|
-
rect_pad_height:
|
|
1827
|
-
rect_border_radius:
|
|
1838
|
+
var pcb_circular_hole_with_rect_pad = z100.object({
|
|
1839
|
+
type: z100.literal("pcb_plated_hole"),
|
|
1840
|
+
shape: z100.literal("circular_hole_with_rect_pad"),
|
|
1841
|
+
pcb_group_id: z100.string().optional(),
|
|
1842
|
+
subcircuit_id: z100.string().optional(),
|
|
1843
|
+
hole_shape: z100.literal("circle"),
|
|
1844
|
+
pad_shape: z100.literal("rect"),
|
|
1845
|
+
hole_diameter: z100.number(),
|
|
1846
|
+
rect_pad_width: z100.number(),
|
|
1847
|
+
rect_pad_height: z100.number(),
|
|
1848
|
+
rect_border_radius: z100.number().optional(),
|
|
1828
1849
|
hole_offset_x: distance.default(0),
|
|
1829
1850
|
hole_offset_y: distance.default(0),
|
|
1830
|
-
is_covered_with_solder_mask:
|
|
1851
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
1831
1852
|
x: distance,
|
|
1832
1853
|
y: distance,
|
|
1833
|
-
layers:
|
|
1834
|
-
port_hints:
|
|
1835
|
-
pcb_component_id:
|
|
1836
|
-
pcb_port_id:
|
|
1854
|
+
layers: z100.array(layer_ref),
|
|
1855
|
+
port_hints: z100.array(z100.string()).optional(),
|
|
1856
|
+
pcb_component_id: z100.string().optional(),
|
|
1857
|
+
pcb_port_id: z100.string().optional(),
|
|
1837
1858
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1838
|
-
soldermask_margin:
|
|
1859
|
+
soldermask_margin: z100.number().optional(),
|
|
1839
1860
|
rect_ccw_rotation: rotation.optional()
|
|
1840
1861
|
});
|
|
1841
|
-
var pcb_pill_hole_with_rect_pad =
|
|
1842
|
-
type:
|
|
1843
|
-
shape:
|
|
1844
|
-
pcb_group_id:
|
|
1845
|
-
subcircuit_id:
|
|
1846
|
-
hole_shape:
|
|
1847
|
-
pad_shape:
|
|
1848
|
-
hole_width:
|
|
1849
|
-
hole_height:
|
|
1850
|
-
rect_pad_width:
|
|
1851
|
-
rect_pad_height:
|
|
1852
|
-
rect_border_radius:
|
|
1862
|
+
var pcb_pill_hole_with_rect_pad = z100.object({
|
|
1863
|
+
type: z100.literal("pcb_plated_hole"),
|
|
1864
|
+
shape: z100.literal("pill_hole_with_rect_pad"),
|
|
1865
|
+
pcb_group_id: z100.string().optional(),
|
|
1866
|
+
subcircuit_id: z100.string().optional(),
|
|
1867
|
+
hole_shape: z100.literal("pill"),
|
|
1868
|
+
pad_shape: z100.literal("rect"),
|
|
1869
|
+
hole_width: z100.number(),
|
|
1870
|
+
hole_height: z100.number(),
|
|
1871
|
+
rect_pad_width: z100.number(),
|
|
1872
|
+
rect_pad_height: z100.number(),
|
|
1873
|
+
rect_border_radius: z100.number().optional(),
|
|
1853
1874
|
hole_offset_x: distance.default(0),
|
|
1854
1875
|
hole_offset_y: distance.default(0),
|
|
1855
|
-
is_covered_with_solder_mask:
|
|
1876
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
1856
1877
|
x: distance,
|
|
1857
1878
|
y: distance,
|
|
1858
|
-
layers:
|
|
1859
|
-
port_hints:
|
|
1860
|
-
pcb_component_id:
|
|
1861
|
-
pcb_port_id:
|
|
1879
|
+
layers: z100.array(layer_ref),
|
|
1880
|
+
port_hints: z100.array(z100.string()).optional(),
|
|
1881
|
+
pcb_component_id: z100.string().optional(),
|
|
1882
|
+
pcb_port_id: z100.string().optional(),
|
|
1862
1883
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1863
|
-
soldermask_margin:
|
|
1884
|
+
soldermask_margin: z100.number().optional()
|
|
1864
1885
|
});
|
|
1865
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
1866
|
-
type:
|
|
1867
|
-
shape:
|
|
1868
|
-
pcb_group_id:
|
|
1869
|
-
subcircuit_id:
|
|
1870
|
-
hole_shape:
|
|
1871
|
-
pad_shape:
|
|
1872
|
-
hole_width:
|
|
1873
|
-
hole_height:
|
|
1886
|
+
var pcb_rotated_pill_hole_with_rect_pad = z100.object({
|
|
1887
|
+
type: z100.literal("pcb_plated_hole"),
|
|
1888
|
+
shape: z100.literal("rotated_pill_hole_with_rect_pad"),
|
|
1889
|
+
pcb_group_id: z100.string().optional(),
|
|
1890
|
+
subcircuit_id: z100.string().optional(),
|
|
1891
|
+
hole_shape: z100.literal("rotated_pill"),
|
|
1892
|
+
pad_shape: z100.literal("rect"),
|
|
1893
|
+
hole_width: z100.number(),
|
|
1894
|
+
hole_height: z100.number(),
|
|
1874
1895
|
hole_ccw_rotation: rotation,
|
|
1875
|
-
rect_pad_width:
|
|
1876
|
-
rect_pad_height:
|
|
1877
|
-
rect_border_radius:
|
|
1896
|
+
rect_pad_width: z100.number(),
|
|
1897
|
+
rect_pad_height: z100.number(),
|
|
1898
|
+
rect_border_radius: z100.number().optional(),
|
|
1878
1899
|
rect_ccw_rotation: rotation,
|
|
1879
1900
|
hole_offset_x: distance.default(0),
|
|
1880
1901
|
hole_offset_y: distance.default(0),
|
|
1881
|
-
is_covered_with_solder_mask:
|
|
1902
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
1882
1903
|
x: distance,
|
|
1883
1904
|
y: distance,
|
|
1884
|
-
layers:
|
|
1885
|
-
port_hints:
|
|
1886
|
-
pcb_component_id:
|
|
1887
|
-
pcb_port_id:
|
|
1905
|
+
layers: z100.array(layer_ref),
|
|
1906
|
+
port_hints: z100.array(z100.string()).optional(),
|
|
1907
|
+
pcb_component_id: z100.string().optional(),
|
|
1908
|
+
pcb_port_id: z100.string().optional(),
|
|
1888
1909
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1889
|
-
soldermask_margin:
|
|
1910
|
+
soldermask_margin: z100.number().optional()
|
|
1890
1911
|
});
|
|
1891
|
-
var pcb_hole_with_polygon_pad =
|
|
1892
|
-
type:
|
|
1893
|
-
shape:
|
|
1894
|
-
pcb_group_id:
|
|
1895
|
-
subcircuit_id:
|
|
1896
|
-
hole_shape:
|
|
1897
|
-
hole_diameter:
|
|
1898
|
-
hole_width:
|
|
1899
|
-
hole_height:
|
|
1900
|
-
pad_outline:
|
|
1901
|
-
|
|
1912
|
+
var pcb_hole_with_polygon_pad = z100.object({
|
|
1913
|
+
type: z100.literal("pcb_plated_hole"),
|
|
1914
|
+
shape: z100.literal("hole_with_polygon_pad"),
|
|
1915
|
+
pcb_group_id: z100.string().optional(),
|
|
1916
|
+
subcircuit_id: z100.string().optional(),
|
|
1917
|
+
hole_shape: z100.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
1918
|
+
hole_diameter: z100.number().optional(),
|
|
1919
|
+
hole_width: z100.number().optional(),
|
|
1920
|
+
hole_height: z100.number().optional(),
|
|
1921
|
+
pad_outline: z100.array(
|
|
1922
|
+
z100.object({
|
|
1902
1923
|
x: distance,
|
|
1903
1924
|
y: distance
|
|
1904
1925
|
})
|
|
1905
1926
|
).min(3),
|
|
1906
1927
|
hole_offset_x: distance.default(0),
|
|
1907
1928
|
hole_offset_y: distance.default(0),
|
|
1908
|
-
is_covered_with_solder_mask:
|
|
1929
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
1909
1930
|
x: distance,
|
|
1910
1931
|
y: distance,
|
|
1911
|
-
layers:
|
|
1912
|
-
port_hints:
|
|
1913
|
-
pcb_component_id:
|
|
1914
|
-
pcb_port_id:
|
|
1932
|
+
layers: z100.array(layer_ref),
|
|
1933
|
+
port_hints: z100.array(z100.string()).optional(),
|
|
1934
|
+
pcb_component_id: z100.string().optional(),
|
|
1935
|
+
pcb_port_id: z100.string().optional(),
|
|
1915
1936
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1916
|
-
soldermask_margin:
|
|
1937
|
+
soldermask_margin: z100.number().optional(),
|
|
1917
1938
|
ccw_rotation: rotation.optional()
|
|
1918
1939
|
});
|
|
1919
|
-
var pcb_plated_hole =
|
|
1940
|
+
var pcb_plated_hole = z100.union([
|
|
1920
1941
|
pcb_plated_hole_circle,
|
|
1921
1942
|
pcb_plated_hole_oval,
|
|
1922
1943
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -1934,138 +1955,138 @@ expectTypesMatch(true);
|
|
|
1934
1955
|
expectTypesMatch(true);
|
|
1935
1956
|
|
|
1936
1957
|
// src/pcb/pcb_port.ts
|
|
1937
|
-
import { z as
|
|
1938
|
-
var pcb_port =
|
|
1939
|
-
type:
|
|
1958
|
+
import { z as z101 } from "zod";
|
|
1959
|
+
var pcb_port = z101.object({
|
|
1960
|
+
type: z101.literal("pcb_port"),
|
|
1940
1961
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
1941
|
-
pcb_group_id:
|
|
1942
|
-
subcircuit_id:
|
|
1943
|
-
source_port_id:
|
|
1944
|
-
pcb_component_id:
|
|
1962
|
+
pcb_group_id: z101.string().optional(),
|
|
1963
|
+
subcircuit_id: z101.string().optional(),
|
|
1964
|
+
source_port_id: z101.string(),
|
|
1965
|
+
pcb_component_id: z101.string().optional(),
|
|
1945
1966
|
x: distance,
|
|
1946
1967
|
y: distance,
|
|
1947
|
-
layers:
|
|
1948
|
-
is_board_pinout:
|
|
1968
|
+
layers: z101.array(layer_ref),
|
|
1969
|
+
is_board_pinout: z101.boolean().optional()
|
|
1949
1970
|
}).describe("Defines a port on the PCB");
|
|
1950
1971
|
expectTypesMatch(true);
|
|
1951
1972
|
|
|
1952
1973
|
// src/pcb/pcb_smtpad.ts
|
|
1953
|
-
import { z as
|
|
1954
|
-
var pcb_smtpad_circle =
|
|
1955
|
-
type:
|
|
1956
|
-
shape:
|
|
1974
|
+
import { z as z102 } from "zod";
|
|
1975
|
+
var pcb_smtpad_circle = z102.object({
|
|
1976
|
+
type: z102.literal("pcb_smtpad"),
|
|
1977
|
+
shape: z102.literal("circle"),
|
|
1957
1978
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1958
|
-
pcb_group_id:
|
|
1959
|
-
subcircuit_id:
|
|
1979
|
+
pcb_group_id: z102.string().optional(),
|
|
1980
|
+
subcircuit_id: z102.string().optional(),
|
|
1960
1981
|
x: distance,
|
|
1961
1982
|
y: distance,
|
|
1962
|
-
radius:
|
|
1983
|
+
radius: z102.number(),
|
|
1963
1984
|
layer: layer_ref,
|
|
1964
|
-
port_hints:
|
|
1965
|
-
pcb_component_id:
|
|
1966
|
-
pcb_port_id:
|
|
1967
|
-
is_covered_with_solder_mask:
|
|
1968
|
-
soldermask_margin:
|
|
1985
|
+
port_hints: z102.array(z102.string()).optional(),
|
|
1986
|
+
pcb_component_id: z102.string().optional(),
|
|
1987
|
+
pcb_port_id: z102.string().optional(),
|
|
1988
|
+
is_covered_with_solder_mask: z102.boolean().optional(),
|
|
1989
|
+
soldermask_margin: z102.number().optional()
|
|
1969
1990
|
});
|
|
1970
|
-
var pcb_smtpad_rect =
|
|
1971
|
-
type:
|
|
1972
|
-
shape:
|
|
1991
|
+
var pcb_smtpad_rect = z102.object({
|
|
1992
|
+
type: z102.literal("pcb_smtpad"),
|
|
1993
|
+
shape: z102.literal("rect"),
|
|
1973
1994
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1974
|
-
pcb_group_id:
|
|
1975
|
-
subcircuit_id:
|
|
1995
|
+
pcb_group_id: z102.string().optional(),
|
|
1996
|
+
subcircuit_id: z102.string().optional(),
|
|
1976
1997
|
x: distance,
|
|
1977
1998
|
y: distance,
|
|
1978
|
-
width:
|
|
1979
|
-
height:
|
|
1980
|
-
rect_border_radius:
|
|
1981
|
-
corner_radius:
|
|
1999
|
+
width: z102.number(),
|
|
2000
|
+
height: z102.number(),
|
|
2001
|
+
rect_border_radius: z102.number().optional(),
|
|
2002
|
+
corner_radius: z102.number().optional(),
|
|
1982
2003
|
layer: layer_ref,
|
|
1983
|
-
port_hints:
|
|
1984
|
-
pcb_component_id:
|
|
1985
|
-
pcb_port_id:
|
|
1986
|
-
is_covered_with_solder_mask:
|
|
1987
|
-
soldermask_margin:
|
|
1988
|
-
soldermask_margin_left:
|
|
1989
|
-
soldermask_margin_top:
|
|
1990
|
-
soldermask_margin_right:
|
|
1991
|
-
soldermask_margin_bottom:
|
|
2004
|
+
port_hints: z102.array(z102.string()).optional(),
|
|
2005
|
+
pcb_component_id: z102.string().optional(),
|
|
2006
|
+
pcb_port_id: z102.string().optional(),
|
|
2007
|
+
is_covered_with_solder_mask: z102.boolean().optional(),
|
|
2008
|
+
soldermask_margin: z102.number().optional(),
|
|
2009
|
+
soldermask_margin_left: z102.number().optional(),
|
|
2010
|
+
soldermask_margin_top: z102.number().optional(),
|
|
2011
|
+
soldermask_margin_right: z102.number().optional(),
|
|
2012
|
+
soldermask_margin_bottom: z102.number().optional()
|
|
1992
2013
|
});
|
|
1993
|
-
var pcb_smtpad_rotated_rect =
|
|
1994
|
-
type:
|
|
1995
|
-
shape:
|
|
2014
|
+
var pcb_smtpad_rotated_rect = z102.object({
|
|
2015
|
+
type: z102.literal("pcb_smtpad"),
|
|
2016
|
+
shape: z102.literal("rotated_rect"),
|
|
1996
2017
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1997
|
-
pcb_group_id:
|
|
1998
|
-
subcircuit_id:
|
|
2018
|
+
pcb_group_id: z102.string().optional(),
|
|
2019
|
+
subcircuit_id: z102.string().optional(),
|
|
1999
2020
|
x: distance,
|
|
2000
2021
|
y: distance,
|
|
2001
|
-
width:
|
|
2002
|
-
height:
|
|
2003
|
-
rect_border_radius:
|
|
2004
|
-
corner_radius:
|
|
2022
|
+
width: z102.number(),
|
|
2023
|
+
height: z102.number(),
|
|
2024
|
+
rect_border_radius: z102.number().optional(),
|
|
2025
|
+
corner_radius: z102.number().optional(),
|
|
2005
2026
|
ccw_rotation: rotation,
|
|
2006
2027
|
layer: layer_ref,
|
|
2007
|
-
port_hints:
|
|
2008
|
-
pcb_component_id:
|
|
2009
|
-
pcb_port_id:
|
|
2010
|
-
is_covered_with_solder_mask:
|
|
2011
|
-
soldermask_margin:
|
|
2012
|
-
soldermask_margin_left:
|
|
2013
|
-
soldermask_margin_top:
|
|
2014
|
-
soldermask_margin_right:
|
|
2015
|
-
soldermask_margin_bottom:
|
|
2028
|
+
port_hints: z102.array(z102.string()).optional(),
|
|
2029
|
+
pcb_component_id: z102.string().optional(),
|
|
2030
|
+
pcb_port_id: z102.string().optional(),
|
|
2031
|
+
is_covered_with_solder_mask: z102.boolean().optional(),
|
|
2032
|
+
soldermask_margin: z102.number().optional(),
|
|
2033
|
+
soldermask_margin_left: z102.number().optional(),
|
|
2034
|
+
soldermask_margin_top: z102.number().optional(),
|
|
2035
|
+
soldermask_margin_right: z102.number().optional(),
|
|
2036
|
+
soldermask_margin_bottom: z102.number().optional()
|
|
2016
2037
|
});
|
|
2017
|
-
var pcb_smtpad_pill =
|
|
2018
|
-
type:
|
|
2019
|
-
shape:
|
|
2038
|
+
var pcb_smtpad_pill = z102.object({
|
|
2039
|
+
type: z102.literal("pcb_smtpad"),
|
|
2040
|
+
shape: z102.literal("pill"),
|
|
2020
2041
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2021
|
-
pcb_group_id:
|
|
2022
|
-
subcircuit_id:
|
|
2042
|
+
pcb_group_id: z102.string().optional(),
|
|
2043
|
+
subcircuit_id: z102.string().optional(),
|
|
2023
2044
|
x: distance,
|
|
2024
2045
|
y: distance,
|
|
2025
|
-
width:
|
|
2026
|
-
height:
|
|
2027
|
-
radius:
|
|
2046
|
+
width: z102.number(),
|
|
2047
|
+
height: z102.number(),
|
|
2048
|
+
radius: z102.number(),
|
|
2028
2049
|
layer: layer_ref,
|
|
2029
|
-
port_hints:
|
|
2030
|
-
pcb_component_id:
|
|
2031
|
-
pcb_port_id:
|
|
2032
|
-
is_covered_with_solder_mask:
|
|
2033
|
-
soldermask_margin:
|
|
2050
|
+
port_hints: z102.array(z102.string()).optional(),
|
|
2051
|
+
pcb_component_id: z102.string().optional(),
|
|
2052
|
+
pcb_port_id: z102.string().optional(),
|
|
2053
|
+
is_covered_with_solder_mask: z102.boolean().optional(),
|
|
2054
|
+
soldermask_margin: z102.number().optional()
|
|
2034
2055
|
});
|
|
2035
|
-
var pcb_smtpad_rotated_pill =
|
|
2036
|
-
type:
|
|
2037
|
-
shape:
|
|
2056
|
+
var pcb_smtpad_rotated_pill = z102.object({
|
|
2057
|
+
type: z102.literal("pcb_smtpad"),
|
|
2058
|
+
shape: z102.literal("rotated_pill"),
|
|
2038
2059
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2039
|
-
pcb_group_id:
|
|
2040
|
-
subcircuit_id:
|
|
2060
|
+
pcb_group_id: z102.string().optional(),
|
|
2061
|
+
subcircuit_id: z102.string().optional(),
|
|
2041
2062
|
x: distance,
|
|
2042
2063
|
y: distance,
|
|
2043
|
-
width:
|
|
2044
|
-
height:
|
|
2045
|
-
radius:
|
|
2064
|
+
width: z102.number(),
|
|
2065
|
+
height: z102.number(),
|
|
2066
|
+
radius: z102.number(),
|
|
2046
2067
|
ccw_rotation: rotation,
|
|
2047
2068
|
layer: layer_ref,
|
|
2048
|
-
port_hints:
|
|
2049
|
-
pcb_component_id:
|
|
2050
|
-
pcb_port_id:
|
|
2051
|
-
is_covered_with_solder_mask:
|
|
2052
|
-
soldermask_margin:
|
|
2069
|
+
port_hints: z102.array(z102.string()).optional(),
|
|
2070
|
+
pcb_component_id: z102.string().optional(),
|
|
2071
|
+
pcb_port_id: z102.string().optional(),
|
|
2072
|
+
is_covered_with_solder_mask: z102.boolean().optional(),
|
|
2073
|
+
soldermask_margin: z102.number().optional()
|
|
2053
2074
|
});
|
|
2054
|
-
var pcb_smtpad_polygon =
|
|
2055
|
-
type:
|
|
2056
|
-
shape:
|
|
2075
|
+
var pcb_smtpad_polygon = z102.object({
|
|
2076
|
+
type: z102.literal("pcb_smtpad"),
|
|
2077
|
+
shape: z102.literal("polygon"),
|
|
2057
2078
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2058
|
-
pcb_group_id:
|
|
2059
|
-
subcircuit_id:
|
|
2060
|
-
points:
|
|
2079
|
+
pcb_group_id: z102.string().optional(),
|
|
2080
|
+
subcircuit_id: z102.string().optional(),
|
|
2081
|
+
points: z102.array(point),
|
|
2061
2082
|
layer: layer_ref,
|
|
2062
|
-
port_hints:
|
|
2063
|
-
pcb_component_id:
|
|
2064
|
-
pcb_port_id:
|
|
2065
|
-
is_covered_with_solder_mask:
|
|
2066
|
-
soldermask_margin:
|
|
2083
|
+
port_hints: z102.array(z102.string()).optional(),
|
|
2084
|
+
pcb_component_id: z102.string().optional(),
|
|
2085
|
+
pcb_port_id: z102.string().optional(),
|
|
2086
|
+
is_covered_with_solder_mask: z102.boolean().optional(),
|
|
2087
|
+
soldermask_margin: z102.number().optional()
|
|
2067
2088
|
});
|
|
2068
|
-
var pcb_smtpad =
|
|
2089
|
+
var pcb_smtpad = z102.discriminatedUnion("shape", [
|
|
2069
2090
|
pcb_smtpad_circle,
|
|
2070
2091
|
pcb_smtpad_rect,
|
|
2071
2092
|
pcb_smtpad_rotated_rect,
|
|
@@ -2081,79 +2102,79 @@ expectTypesMatch(true);
|
|
|
2081
2102
|
expectTypesMatch(true);
|
|
2082
2103
|
|
|
2083
2104
|
// src/pcb/pcb_solder_paste.ts
|
|
2084
|
-
import { z as
|
|
2085
|
-
var pcb_solder_paste_circle =
|
|
2086
|
-
type:
|
|
2087
|
-
shape:
|
|
2105
|
+
import { z as z103 } from "zod";
|
|
2106
|
+
var pcb_solder_paste_circle = z103.object({
|
|
2107
|
+
type: z103.literal("pcb_solder_paste"),
|
|
2108
|
+
shape: z103.literal("circle"),
|
|
2088
2109
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2089
|
-
pcb_group_id:
|
|
2090
|
-
subcircuit_id:
|
|
2110
|
+
pcb_group_id: z103.string().optional(),
|
|
2111
|
+
subcircuit_id: z103.string().optional(),
|
|
2091
2112
|
x: distance,
|
|
2092
2113
|
y: distance,
|
|
2093
|
-
radius:
|
|
2114
|
+
radius: z103.number(),
|
|
2094
2115
|
layer: layer_ref,
|
|
2095
|
-
pcb_component_id:
|
|
2096
|
-
pcb_smtpad_id:
|
|
2116
|
+
pcb_component_id: z103.string().optional(),
|
|
2117
|
+
pcb_smtpad_id: z103.string().optional()
|
|
2097
2118
|
});
|
|
2098
|
-
var pcb_solder_paste_rect =
|
|
2099
|
-
type:
|
|
2100
|
-
shape:
|
|
2119
|
+
var pcb_solder_paste_rect = z103.object({
|
|
2120
|
+
type: z103.literal("pcb_solder_paste"),
|
|
2121
|
+
shape: z103.literal("rect"),
|
|
2101
2122
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2102
|
-
pcb_group_id:
|
|
2103
|
-
subcircuit_id:
|
|
2123
|
+
pcb_group_id: z103.string().optional(),
|
|
2124
|
+
subcircuit_id: z103.string().optional(),
|
|
2104
2125
|
x: distance,
|
|
2105
2126
|
y: distance,
|
|
2106
|
-
width:
|
|
2107
|
-
height:
|
|
2127
|
+
width: z103.number(),
|
|
2128
|
+
height: z103.number(),
|
|
2108
2129
|
layer: layer_ref,
|
|
2109
|
-
pcb_component_id:
|
|
2110
|
-
pcb_smtpad_id:
|
|
2130
|
+
pcb_component_id: z103.string().optional(),
|
|
2131
|
+
pcb_smtpad_id: z103.string().optional()
|
|
2111
2132
|
});
|
|
2112
|
-
var pcb_solder_paste_pill =
|
|
2113
|
-
type:
|
|
2114
|
-
shape:
|
|
2133
|
+
var pcb_solder_paste_pill = z103.object({
|
|
2134
|
+
type: z103.literal("pcb_solder_paste"),
|
|
2135
|
+
shape: z103.literal("pill"),
|
|
2115
2136
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2116
|
-
pcb_group_id:
|
|
2117
|
-
subcircuit_id:
|
|
2137
|
+
pcb_group_id: z103.string().optional(),
|
|
2138
|
+
subcircuit_id: z103.string().optional(),
|
|
2118
2139
|
x: distance,
|
|
2119
2140
|
y: distance,
|
|
2120
|
-
width:
|
|
2121
|
-
height:
|
|
2122
|
-
radius:
|
|
2141
|
+
width: z103.number(),
|
|
2142
|
+
height: z103.number(),
|
|
2143
|
+
radius: z103.number(),
|
|
2123
2144
|
layer: layer_ref,
|
|
2124
|
-
pcb_component_id:
|
|
2125
|
-
pcb_smtpad_id:
|
|
2145
|
+
pcb_component_id: z103.string().optional(),
|
|
2146
|
+
pcb_smtpad_id: z103.string().optional()
|
|
2126
2147
|
});
|
|
2127
|
-
var pcb_solder_paste_rotated_rect =
|
|
2128
|
-
type:
|
|
2129
|
-
shape:
|
|
2148
|
+
var pcb_solder_paste_rotated_rect = z103.object({
|
|
2149
|
+
type: z103.literal("pcb_solder_paste"),
|
|
2150
|
+
shape: z103.literal("rotated_rect"),
|
|
2130
2151
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2131
|
-
pcb_group_id:
|
|
2132
|
-
subcircuit_id:
|
|
2152
|
+
pcb_group_id: z103.string().optional(),
|
|
2153
|
+
subcircuit_id: z103.string().optional(),
|
|
2133
2154
|
x: distance,
|
|
2134
2155
|
y: distance,
|
|
2135
|
-
width:
|
|
2136
|
-
height:
|
|
2156
|
+
width: z103.number(),
|
|
2157
|
+
height: z103.number(),
|
|
2137
2158
|
ccw_rotation: distance,
|
|
2138
2159
|
layer: layer_ref,
|
|
2139
|
-
pcb_component_id:
|
|
2140
|
-
pcb_smtpad_id:
|
|
2160
|
+
pcb_component_id: z103.string().optional(),
|
|
2161
|
+
pcb_smtpad_id: z103.string().optional()
|
|
2141
2162
|
});
|
|
2142
|
-
var pcb_solder_paste_oval =
|
|
2143
|
-
type:
|
|
2144
|
-
shape:
|
|
2163
|
+
var pcb_solder_paste_oval = z103.object({
|
|
2164
|
+
type: z103.literal("pcb_solder_paste"),
|
|
2165
|
+
shape: z103.literal("oval"),
|
|
2145
2166
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2146
|
-
pcb_group_id:
|
|
2147
|
-
subcircuit_id:
|
|
2167
|
+
pcb_group_id: z103.string().optional(),
|
|
2168
|
+
subcircuit_id: z103.string().optional(),
|
|
2148
2169
|
x: distance,
|
|
2149
2170
|
y: distance,
|
|
2150
|
-
width:
|
|
2151
|
-
height:
|
|
2171
|
+
width: z103.number(),
|
|
2172
|
+
height: z103.number(),
|
|
2152
2173
|
layer: layer_ref,
|
|
2153
|
-
pcb_component_id:
|
|
2154
|
-
pcb_smtpad_id:
|
|
2174
|
+
pcb_component_id: z103.string().optional(),
|
|
2175
|
+
pcb_smtpad_id: z103.string().optional()
|
|
2155
2176
|
});
|
|
2156
|
-
var pcb_solder_paste =
|
|
2177
|
+
var pcb_solder_paste = z103.union([
|
|
2157
2178
|
pcb_solder_paste_circle,
|
|
2158
2179
|
pcb_solder_paste_rect,
|
|
2159
2180
|
pcb_solder_paste_pill,
|
|
@@ -2169,173 +2190,193 @@ expectTypesMatch(
|
|
|
2169
2190
|
expectTypesMatch(true);
|
|
2170
2191
|
|
|
2171
2192
|
// src/pcb/pcb_text.ts
|
|
2172
|
-
import { z as
|
|
2173
|
-
var pcb_text =
|
|
2174
|
-
type:
|
|
2193
|
+
import { z as z104 } from "zod";
|
|
2194
|
+
var pcb_text = z104.object({
|
|
2195
|
+
type: z104.literal("pcb_text"),
|
|
2175
2196
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
2176
|
-
pcb_group_id:
|
|
2177
|
-
subcircuit_id:
|
|
2178
|
-
text:
|
|
2197
|
+
pcb_group_id: z104.string().optional(),
|
|
2198
|
+
subcircuit_id: z104.string().optional(),
|
|
2199
|
+
text: z104.string(),
|
|
2179
2200
|
center: point,
|
|
2180
2201
|
layer: layer_ref,
|
|
2181
2202
|
width: length,
|
|
2182
2203
|
height: length,
|
|
2183
|
-
lines:
|
|
2204
|
+
lines: z104.number(),
|
|
2184
2205
|
// @ts-ignore
|
|
2185
|
-
align:
|
|
2206
|
+
align: z104.enum(["bottom-left"])
|
|
2186
2207
|
}).describe("Defines text on the PCB");
|
|
2187
2208
|
expectTypesMatch(true);
|
|
2188
2209
|
|
|
2189
2210
|
// src/pcb/pcb_trace.ts
|
|
2190
|
-
import { z as
|
|
2191
|
-
var pcb_trace_route_point_wire =
|
|
2192
|
-
route_type:
|
|
2211
|
+
import { z as z105 } from "zod";
|
|
2212
|
+
var pcb_trace_route_point_wire = z105.object({
|
|
2213
|
+
route_type: z105.literal("wire"),
|
|
2193
2214
|
x: distance,
|
|
2194
2215
|
y: distance,
|
|
2195
2216
|
width: distance,
|
|
2196
|
-
copper_pour_id:
|
|
2197
|
-
is_inside_copper_pour:
|
|
2198
|
-
start_pcb_port_id:
|
|
2199
|
-
end_pcb_port_id:
|
|
2217
|
+
copper_pour_id: z105.string().optional(),
|
|
2218
|
+
is_inside_copper_pour: z105.boolean().optional(),
|
|
2219
|
+
start_pcb_port_id: z105.string().optional(),
|
|
2220
|
+
end_pcb_port_id: z105.string().optional(),
|
|
2200
2221
|
layer: layer_ref
|
|
2201
2222
|
});
|
|
2202
|
-
var pcb_trace_route_point_via =
|
|
2203
|
-
route_type:
|
|
2223
|
+
var pcb_trace_route_point_via = z105.object({
|
|
2224
|
+
route_type: z105.literal("via"),
|
|
2204
2225
|
x: distance,
|
|
2205
2226
|
y: distance,
|
|
2206
|
-
copper_pour_id:
|
|
2207
|
-
is_inside_copper_pour:
|
|
2227
|
+
copper_pour_id: z105.string().optional(),
|
|
2228
|
+
is_inside_copper_pour: z105.boolean().optional(),
|
|
2208
2229
|
hole_diameter: distance.optional(),
|
|
2209
2230
|
outer_diameter: distance.optional(),
|
|
2210
2231
|
from_layer: layer_ref,
|
|
2211
2232
|
to_layer: layer_ref
|
|
2212
2233
|
});
|
|
2213
|
-
var pcb_trace_route_point_through_pad =
|
|
2214
|
-
route_type:
|
|
2234
|
+
var pcb_trace_route_point_through_pad = z105.object({
|
|
2235
|
+
route_type: z105.literal("through_pad"),
|
|
2215
2236
|
start: point,
|
|
2216
2237
|
end: point,
|
|
2217
2238
|
width: distance,
|
|
2218
2239
|
start_layer: layer_ref,
|
|
2219
2240
|
end_layer: layer_ref,
|
|
2220
|
-
pcb_smtpad_id:
|
|
2221
|
-
pcb_plated_hole_id:
|
|
2241
|
+
pcb_smtpad_id: z105.string().optional(),
|
|
2242
|
+
pcb_plated_hole_id: z105.string().optional()
|
|
2222
2243
|
});
|
|
2223
|
-
var pcb_trace_route_point =
|
|
2244
|
+
var pcb_trace_route_point = z105.union([
|
|
2224
2245
|
pcb_trace_route_point_wire,
|
|
2225
2246
|
pcb_trace_route_point_via,
|
|
2226
2247
|
pcb_trace_route_point_through_pad
|
|
2227
2248
|
]);
|
|
2228
|
-
var pcb_trace =
|
|
2229
|
-
type:
|
|
2230
|
-
source_trace_id:
|
|
2231
|
-
pcb_component_id:
|
|
2249
|
+
var pcb_trace = z105.object({
|
|
2250
|
+
type: z105.literal("pcb_trace"),
|
|
2251
|
+
source_trace_id: z105.string().optional(),
|
|
2252
|
+
pcb_component_id: z105.string().optional(),
|
|
2232
2253
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
2233
|
-
pcb_group_id:
|
|
2234
|
-
subcircuit_id:
|
|
2235
|
-
route_thickness_mode:
|
|
2236
|
-
route_order_index:
|
|
2237
|
-
should_round_corners:
|
|
2238
|
-
trace_length:
|
|
2239
|
-
highlight_color:
|
|
2240
|
-
route:
|
|
2254
|
+
pcb_group_id: z105.string().optional(),
|
|
2255
|
+
subcircuit_id: z105.string().optional(),
|
|
2256
|
+
route_thickness_mode: z105.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
2257
|
+
route_order_index: z105.number().optional(),
|
|
2258
|
+
should_round_corners: z105.boolean().optional(),
|
|
2259
|
+
trace_length: z105.number().optional(),
|
|
2260
|
+
highlight_color: z105.string().optional(),
|
|
2261
|
+
route: z105.array(pcb_trace_route_point)
|
|
2241
2262
|
}).describe("Defines a trace on the PCB");
|
|
2242
2263
|
expectTypesMatch(true);
|
|
2243
2264
|
expectTypesMatch(true);
|
|
2244
2265
|
|
|
2245
2266
|
// src/pcb/pcb_trace_warning.ts
|
|
2246
|
-
import { z as
|
|
2247
|
-
var pcb_trace_warning =
|
|
2248
|
-
type:
|
|
2267
|
+
import { z as z106 } from "zod";
|
|
2268
|
+
var pcb_trace_warning = z106.object({
|
|
2269
|
+
type: z106.literal("pcb_trace_warning"),
|
|
2249
2270
|
pcb_trace_warning_id: getZodPrefixedIdWithDefault("pcb_trace_warning"),
|
|
2250
|
-
warning_type:
|
|
2251
|
-
message:
|
|
2271
|
+
warning_type: z106.literal("pcb_trace_warning").default("pcb_trace_warning"),
|
|
2272
|
+
message: z106.string(),
|
|
2252
2273
|
center: point.optional(),
|
|
2253
|
-
pcb_trace_id:
|
|
2254
|
-
source_trace_id:
|
|
2255
|
-
pcb_component_ids:
|
|
2256
|
-
pcb_port_ids:
|
|
2257
|
-
subcircuit_id:
|
|
2274
|
+
pcb_trace_id: z106.string(),
|
|
2275
|
+
source_trace_id: z106.string(),
|
|
2276
|
+
pcb_component_ids: z106.array(z106.string()),
|
|
2277
|
+
pcb_port_ids: z106.array(z106.string()),
|
|
2278
|
+
subcircuit_id: z106.string().optional()
|
|
2258
2279
|
}).describe("Defines a trace warning on the PCB");
|
|
2259
2280
|
expectTypesMatch(true);
|
|
2260
2281
|
|
|
2282
|
+
// src/pcb/pcb_trace_too_long_warning.ts
|
|
2283
|
+
import { z as z107 } from "zod";
|
|
2284
|
+
var pcb_trace_too_long_warning = z107.object({
|
|
2285
|
+
type: z107.literal("pcb_trace_too_long_warning"),
|
|
2286
|
+
pcb_trace_too_long_warning_id: getZodPrefixedIdWithDefault(
|
|
2287
|
+
"pcb_trace_too_long_warning"
|
|
2288
|
+
),
|
|
2289
|
+
warning_type: z107.literal("pcb_trace_too_long_warning").default("pcb_trace_too_long_warning"),
|
|
2290
|
+
message: z107.string(),
|
|
2291
|
+
pcb_trace_id: z107.string(),
|
|
2292
|
+
source_net_id: z107.string().optional(),
|
|
2293
|
+
source_trace_id: z107.string().optional(),
|
|
2294
|
+
actual_trace_length: distance,
|
|
2295
|
+
maximum_trace_length: distance,
|
|
2296
|
+
subcircuit_id: z107.string().optional()
|
|
2297
|
+
}).describe(
|
|
2298
|
+
"Warning emitted when a PCB trace is longer than its maximum allowed length"
|
|
2299
|
+
);
|
|
2300
|
+
expectTypesMatch(true);
|
|
2301
|
+
|
|
2261
2302
|
// src/pcb/pcb_trace_error.ts
|
|
2262
|
-
import { z as
|
|
2303
|
+
import { z as z108 } from "zod";
|
|
2263
2304
|
var pcb_trace_error = base_circuit_json_error.extend({
|
|
2264
|
-
type:
|
|
2305
|
+
type: z108.literal("pcb_trace_error"),
|
|
2265
2306
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
2266
|
-
error_type:
|
|
2307
|
+
error_type: z108.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
2267
2308
|
center: point.optional(),
|
|
2268
|
-
pcb_trace_id:
|
|
2269
|
-
source_trace_id:
|
|
2270
|
-
pcb_component_ids:
|
|
2271
|
-
pcb_port_ids:
|
|
2272
|
-
subcircuit_id:
|
|
2309
|
+
pcb_trace_id: z108.string(),
|
|
2310
|
+
source_trace_id: z108.string(),
|
|
2311
|
+
pcb_component_ids: z108.array(z108.string()),
|
|
2312
|
+
pcb_port_ids: z108.array(z108.string()),
|
|
2313
|
+
subcircuit_id: z108.string().optional()
|
|
2273
2314
|
}).describe("Defines a trace error on the PCB");
|
|
2274
2315
|
expectTypesMatch(true);
|
|
2275
2316
|
|
|
2276
2317
|
// src/pcb/pcb_trace_missing_error.ts
|
|
2277
|
-
import { z as
|
|
2318
|
+
import { z as z109 } from "zod";
|
|
2278
2319
|
var pcb_trace_missing_error = base_circuit_json_error.extend({
|
|
2279
|
-
type:
|
|
2320
|
+
type: z109.literal("pcb_trace_missing_error"),
|
|
2280
2321
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
2281
2322
|
"pcb_trace_missing_error"
|
|
2282
2323
|
),
|
|
2283
|
-
error_type:
|
|
2324
|
+
error_type: z109.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
2284
2325
|
center: point.optional(),
|
|
2285
|
-
source_trace_id:
|
|
2286
|
-
pcb_component_ids:
|
|
2287
|
-
pcb_port_ids:
|
|
2288
|
-
subcircuit_id:
|
|
2326
|
+
source_trace_id: z109.string(),
|
|
2327
|
+
pcb_component_ids: z109.array(z109.string()),
|
|
2328
|
+
pcb_port_ids: z109.array(z109.string()),
|
|
2329
|
+
subcircuit_id: z109.string().optional()
|
|
2289
2330
|
}).describe(
|
|
2290
2331
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
2291
2332
|
);
|
|
2292
2333
|
expectTypesMatch(true);
|
|
2293
2334
|
|
|
2294
2335
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
2295
|
-
import { z as
|
|
2336
|
+
import { z as z110 } from "zod";
|
|
2296
2337
|
var pcb_port_not_matched_error = base_circuit_json_error.extend({
|
|
2297
|
-
type:
|
|
2338
|
+
type: z110.literal("pcb_port_not_matched_error"),
|
|
2298
2339
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2299
|
-
error_type:
|
|
2300
|
-
pcb_component_ids:
|
|
2301
|
-
subcircuit_id:
|
|
2340
|
+
error_type: z110.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
2341
|
+
pcb_component_ids: z110.array(z110.string()),
|
|
2342
|
+
subcircuit_id: z110.string().optional()
|
|
2302
2343
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
2303
2344
|
expectTypesMatch(true);
|
|
2304
2345
|
|
|
2305
2346
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
2306
|
-
import { z as
|
|
2347
|
+
import { z as z111 } from "zod";
|
|
2307
2348
|
var pcb_port_not_connected_error = base_circuit_json_error.extend({
|
|
2308
|
-
type:
|
|
2349
|
+
type: z111.literal("pcb_port_not_connected_error"),
|
|
2309
2350
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
2310
2351
|
"pcb_port_not_connected_error"
|
|
2311
2352
|
),
|
|
2312
|
-
error_type:
|
|
2313
|
-
pcb_port_ids:
|
|
2314
|
-
pcb_component_ids:
|
|
2315
|
-
subcircuit_id:
|
|
2353
|
+
error_type: z111.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
2354
|
+
pcb_port_ids: z111.array(z111.string()),
|
|
2355
|
+
pcb_component_ids: z111.array(z111.string()),
|
|
2356
|
+
subcircuit_id: z111.string().optional()
|
|
2316
2357
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
2317
2358
|
expectTypesMatch(
|
|
2318
2359
|
true
|
|
2319
2360
|
);
|
|
2320
2361
|
|
|
2321
2362
|
// src/pcb/pcb_net.ts
|
|
2322
|
-
import { z as
|
|
2323
|
-
var pcb_net =
|
|
2324
|
-
type:
|
|
2363
|
+
import { z as z112 } from "zod";
|
|
2364
|
+
var pcb_net = z112.object({
|
|
2365
|
+
type: z112.literal("pcb_net"),
|
|
2325
2366
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
2326
|
-
source_net_id:
|
|
2327
|
-
highlight_color:
|
|
2367
|
+
source_net_id: z112.string().optional(),
|
|
2368
|
+
highlight_color: z112.string().optional()
|
|
2328
2369
|
}).describe("Defines a net on the PCB");
|
|
2329
2370
|
expectTypesMatch(true);
|
|
2330
2371
|
|
|
2331
2372
|
// src/pcb/pcb_via.ts
|
|
2332
|
-
import { z as
|
|
2333
|
-
var pcb_via =
|
|
2334
|
-
type:
|
|
2373
|
+
import { z as z113 } from "zod";
|
|
2374
|
+
var pcb_via = z113.object({
|
|
2375
|
+
type: z113.literal("pcb_via"),
|
|
2335
2376
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
2336
|
-
pcb_group_id:
|
|
2337
|
-
subcircuit_id:
|
|
2338
|
-
subcircuit_connectivity_map_key:
|
|
2377
|
+
pcb_group_id: z113.string().optional(),
|
|
2378
|
+
subcircuit_id: z113.string().optional(),
|
|
2379
|
+
subcircuit_connectivity_map_key: z113.string().optional(),
|
|
2339
2380
|
x: distance,
|
|
2340
2381
|
y: distance,
|
|
2341
2382
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -2344,103 +2385,103 @@ var pcb_via = z111.object({
|
|
|
2344
2385
|
from_layer: layer_ref.optional(),
|
|
2345
2386
|
/** @deprecated */
|
|
2346
2387
|
to_layer: layer_ref.optional(),
|
|
2347
|
-
layers:
|
|
2348
|
-
pcb_trace_id:
|
|
2349
|
-
net_is_assignable:
|
|
2350
|
-
net_assigned:
|
|
2351
|
-
is_tented:
|
|
2388
|
+
layers: z113.array(layer_ref),
|
|
2389
|
+
pcb_trace_id: z113.string().optional(),
|
|
2390
|
+
net_is_assignable: z113.boolean().optional(),
|
|
2391
|
+
net_assigned: z113.boolean().optional(),
|
|
2392
|
+
is_tented: z113.boolean().optional()
|
|
2352
2393
|
}).describe("Defines a via on the PCB");
|
|
2353
2394
|
expectTypesMatch(true);
|
|
2354
2395
|
|
|
2355
2396
|
// src/pcb/pcb_board.ts
|
|
2356
|
-
import { z as
|
|
2357
|
-
var pcb_board =
|
|
2358
|
-
type:
|
|
2397
|
+
import { z as z114 } from "zod";
|
|
2398
|
+
var pcb_board = z114.object({
|
|
2399
|
+
type: z114.literal("pcb_board"),
|
|
2359
2400
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
2360
|
-
pcb_panel_id:
|
|
2361
|
-
carrier_pcb_board_id:
|
|
2362
|
-
is_subcircuit:
|
|
2363
|
-
subcircuit_id:
|
|
2364
|
-
is_mounted_to_carrier_board:
|
|
2401
|
+
pcb_panel_id: z114.string().optional(),
|
|
2402
|
+
carrier_pcb_board_id: z114.string().optional(),
|
|
2403
|
+
is_subcircuit: z114.boolean().optional(),
|
|
2404
|
+
subcircuit_id: z114.string().optional(),
|
|
2405
|
+
is_mounted_to_carrier_board: z114.boolean().optional(),
|
|
2365
2406
|
width: length.optional(),
|
|
2366
2407
|
height: length.optional(),
|
|
2367
2408
|
center: point,
|
|
2368
|
-
display_offset_x:
|
|
2409
|
+
display_offset_x: z114.string().optional().describe(
|
|
2369
2410
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
2370
2411
|
),
|
|
2371
|
-
display_offset_y:
|
|
2412
|
+
display_offset_y: z114.string().optional().describe(
|
|
2372
2413
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
2373
2414
|
),
|
|
2374
2415
|
thickness: length.optional().default(1.4),
|
|
2375
|
-
num_layers:
|
|
2376
|
-
outline:
|
|
2377
|
-
shape:
|
|
2378
|
-
material:
|
|
2379
|
-
solder_mask_color:
|
|
2380
|
-
silkscreen_color:
|
|
2416
|
+
num_layers: z114.number().optional().default(4),
|
|
2417
|
+
outline: z114.array(point).optional(),
|
|
2418
|
+
shape: z114.enum(["rect", "polygon"]).optional(),
|
|
2419
|
+
material: z114.enum(["fr4", "fr1"]).default("fr4"),
|
|
2420
|
+
solder_mask_color: z114.string().optional(),
|
|
2421
|
+
silkscreen_color: z114.string().optional(),
|
|
2381
2422
|
anchor_position: point.optional(),
|
|
2382
2423
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2383
|
-
position_mode:
|
|
2424
|
+
position_mode: z114.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
2384
2425
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
2385
2426
|
expectTypesMatch(true);
|
|
2386
2427
|
|
|
2387
2428
|
// src/pcb/pcb_panel.ts
|
|
2388
|
-
import { z as
|
|
2389
|
-
var pcb_panel =
|
|
2390
|
-
type:
|
|
2429
|
+
import { z as z115 } from "zod";
|
|
2430
|
+
var pcb_panel = z115.object({
|
|
2431
|
+
type: z115.literal("pcb_panel"),
|
|
2391
2432
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2392
2433
|
width: length,
|
|
2393
2434
|
height: length,
|
|
2394
2435
|
center: point,
|
|
2395
2436
|
thickness: length.optional().default(1.4),
|
|
2396
|
-
covered_with_solder_mask:
|
|
2437
|
+
covered_with_solder_mask: z115.boolean().optional().default(true)
|
|
2397
2438
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2398
2439
|
expectTypesMatch(true);
|
|
2399
2440
|
|
|
2400
2441
|
// src/pcb/pcb_placement_error.ts
|
|
2401
|
-
import { z as
|
|
2442
|
+
import { z as z116 } from "zod";
|
|
2402
2443
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
2403
|
-
type:
|
|
2444
|
+
type: z116.literal("pcb_placement_error"),
|
|
2404
2445
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2405
|
-
error_type:
|
|
2406
|
-
subcircuit_id:
|
|
2446
|
+
error_type: z116.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2447
|
+
subcircuit_id: z116.string().optional()
|
|
2407
2448
|
}).describe("Defines a placement error on the PCB");
|
|
2408
2449
|
expectTypesMatch(true);
|
|
2409
2450
|
|
|
2410
2451
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
2411
|
-
import { z as
|
|
2452
|
+
import { z as z117 } from "zod";
|
|
2412
2453
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
2413
|
-
type:
|
|
2454
|
+
type: z117.literal("pcb_panelization_placement_error"),
|
|
2414
2455
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
2415
2456
|
"pcb_panelization_placement_error"
|
|
2416
2457
|
),
|
|
2417
|
-
error_type:
|
|
2418
|
-
pcb_panel_id:
|
|
2419
|
-
pcb_board_id:
|
|
2420
|
-
subcircuit_id:
|
|
2458
|
+
error_type: z117.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
2459
|
+
pcb_panel_id: z117.string().optional(),
|
|
2460
|
+
pcb_board_id: z117.string().optional(),
|
|
2461
|
+
subcircuit_id: z117.string().optional()
|
|
2421
2462
|
}).describe("Defines a panelization placement error on the PCB");
|
|
2422
2463
|
expectTypesMatch(true);
|
|
2423
2464
|
|
|
2424
2465
|
// src/pcb/pcb_trace_hint.ts
|
|
2425
|
-
import { z as
|
|
2426
|
-
var pcb_trace_hint =
|
|
2427
|
-
type:
|
|
2466
|
+
import { z as z118 } from "zod";
|
|
2467
|
+
var pcb_trace_hint = z118.object({
|
|
2468
|
+
type: z118.literal("pcb_trace_hint"),
|
|
2428
2469
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2429
|
-
pcb_port_id:
|
|
2430
|
-
pcb_component_id:
|
|
2431
|
-
route:
|
|
2432
|
-
subcircuit_id:
|
|
2470
|
+
pcb_port_id: z118.string(),
|
|
2471
|
+
pcb_component_id: z118.string(),
|
|
2472
|
+
route: z118.array(route_hint_point),
|
|
2473
|
+
subcircuit_id: z118.string().optional()
|
|
2433
2474
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2434
2475
|
expectTypesMatch(true);
|
|
2435
2476
|
|
|
2436
2477
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2437
|
-
import { z as
|
|
2438
|
-
var pcb_silkscreen_line =
|
|
2439
|
-
type:
|
|
2478
|
+
import { z as z119 } from "zod";
|
|
2479
|
+
var pcb_silkscreen_line = z119.object({
|
|
2480
|
+
type: z119.literal("pcb_silkscreen_line"),
|
|
2440
2481
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2441
|
-
pcb_component_id:
|
|
2442
|
-
pcb_group_id:
|
|
2443
|
-
subcircuit_id:
|
|
2482
|
+
pcb_component_id: z119.string(),
|
|
2483
|
+
pcb_group_id: z119.string().optional(),
|
|
2484
|
+
subcircuit_id: z119.string().optional(),
|
|
2444
2485
|
stroke_width: distance.default("0.1mm"),
|
|
2445
2486
|
x1: distance,
|
|
2446
2487
|
y1: distance,
|
|
@@ -2451,32 +2492,32 @@ var pcb_silkscreen_line = z117.object({
|
|
|
2451
2492
|
expectTypesMatch(true);
|
|
2452
2493
|
|
|
2453
2494
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2454
|
-
import { z as
|
|
2455
|
-
var pcb_silkscreen_path =
|
|
2456
|
-
type:
|
|
2495
|
+
import { z as z120 } from "zod";
|
|
2496
|
+
var pcb_silkscreen_path = z120.object({
|
|
2497
|
+
type: z120.literal("pcb_silkscreen_path"),
|
|
2457
2498
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2458
|
-
pcb_component_id:
|
|
2459
|
-
pcb_group_id:
|
|
2460
|
-
subcircuit_id:
|
|
2499
|
+
pcb_component_id: z120.string(),
|
|
2500
|
+
pcb_group_id: z120.string().optional(),
|
|
2501
|
+
subcircuit_id: z120.string().optional(),
|
|
2461
2502
|
layer: visible_layer,
|
|
2462
|
-
route:
|
|
2503
|
+
route: z120.array(point),
|
|
2463
2504
|
stroke_width: length
|
|
2464
2505
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2465
2506
|
expectTypesMatch(true);
|
|
2466
2507
|
|
|
2467
2508
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2468
|
-
import { z as
|
|
2469
|
-
var pcb_silkscreen_text =
|
|
2470
|
-
type:
|
|
2509
|
+
import { z as z121 } from "zod";
|
|
2510
|
+
var pcb_silkscreen_text = z121.object({
|
|
2511
|
+
type: z121.literal("pcb_silkscreen_text"),
|
|
2471
2512
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2472
|
-
pcb_group_id:
|
|
2473
|
-
subcircuit_id:
|
|
2474
|
-
font:
|
|
2513
|
+
pcb_group_id: z121.string().optional(),
|
|
2514
|
+
subcircuit_id: z121.string().optional(),
|
|
2515
|
+
font: z121.literal("tscircuit2024").default("tscircuit2024"),
|
|
2475
2516
|
font_size: distance.default("0.2mm"),
|
|
2476
|
-
pcb_component_id:
|
|
2477
|
-
text:
|
|
2478
|
-
is_knockout:
|
|
2479
|
-
knockout_padding:
|
|
2517
|
+
pcb_component_id: z121.string(),
|
|
2518
|
+
text: z121.string(),
|
|
2519
|
+
is_knockout: z121.boolean().default(false).optional(),
|
|
2520
|
+
knockout_padding: z121.object({
|
|
2480
2521
|
left: length,
|
|
2481
2522
|
top: length,
|
|
2482
2523
|
bottom: length,
|
|
@@ -2487,27 +2528,27 @@ var pcb_silkscreen_text = z119.object({
|
|
|
2487
2528
|
bottom: "0.2mm",
|
|
2488
2529
|
right: "0.2mm"
|
|
2489
2530
|
}).optional(),
|
|
2490
|
-
ccw_rotation:
|
|
2531
|
+
ccw_rotation: z121.number().optional(),
|
|
2491
2532
|
layer: layer_ref,
|
|
2492
|
-
is_mirrored:
|
|
2533
|
+
is_mirrored: z121.boolean().default(false).optional(),
|
|
2493
2534
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2494
2535
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2495
2536
|
}).describe("Defines silkscreen text on the PCB");
|
|
2496
2537
|
expectTypesMatch(true);
|
|
2497
2538
|
|
|
2498
2539
|
// src/pcb/pcb_copper_text.ts
|
|
2499
|
-
import { z as
|
|
2500
|
-
var pcb_copper_text =
|
|
2501
|
-
type:
|
|
2540
|
+
import { z as z122 } from "zod";
|
|
2541
|
+
var pcb_copper_text = z122.object({
|
|
2542
|
+
type: z122.literal("pcb_copper_text"),
|
|
2502
2543
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2503
|
-
pcb_group_id:
|
|
2504
|
-
subcircuit_id:
|
|
2505
|
-
font:
|
|
2544
|
+
pcb_group_id: z122.string().optional(),
|
|
2545
|
+
subcircuit_id: z122.string().optional(),
|
|
2546
|
+
font: z122.literal("tscircuit2024").default("tscircuit2024"),
|
|
2506
2547
|
font_size: distance.default("0.2mm"),
|
|
2507
|
-
pcb_component_id:
|
|
2508
|
-
text:
|
|
2509
|
-
is_knockout:
|
|
2510
|
-
knockout_padding:
|
|
2548
|
+
pcb_component_id: z122.string(),
|
|
2549
|
+
text: z122.string(),
|
|
2550
|
+
is_knockout: z122.boolean().default(false).optional(),
|
|
2551
|
+
knockout_padding: z122.object({
|
|
2511
2552
|
left: length,
|
|
2512
2553
|
top: length,
|
|
2513
2554
|
bottom: length,
|
|
@@ -2518,61 +2559,61 @@ var pcb_copper_text = z120.object({
|
|
|
2518
2559
|
bottom: "0.2mm",
|
|
2519
2560
|
right: "0.2mm"
|
|
2520
2561
|
}).optional(),
|
|
2521
|
-
ccw_rotation:
|
|
2562
|
+
ccw_rotation: z122.number().optional(),
|
|
2522
2563
|
layer: layer_ref,
|
|
2523
|
-
is_mirrored:
|
|
2564
|
+
is_mirrored: z122.boolean().default(false).optional(),
|
|
2524
2565
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2525
2566
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2526
2567
|
}).describe("Defines copper text on the PCB");
|
|
2527
2568
|
expectTypesMatch(true);
|
|
2528
2569
|
|
|
2529
2570
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2530
|
-
import { z as
|
|
2531
|
-
var pcb_silkscreen_rect =
|
|
2532
|
-
type:
|
|
2571
|
+
import { z as z123 } from "zod";
|
|
2572
|
+
var pcb_silkscreen_rect = z123.object({
|
|
2573
|
+
type: z123.literal("pcb_silkscreen_rect"),
|
|
2533
2574
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2534
|
-
pcb_component_id:
|
|
2535
|
-
pcb_group_id:
|
|
2536
|
-
subcircuit_id:
|
|
2575
|
+
pcb_component_id: z123.string(),
|
|
2576
|
+
pcb_group_id: z123.string().optional(),
|
|
2577
|
+
subcircuit_id: z123.string().optional(),
|
|
2537
2578
|
center: point,
|
|
2538
2579
|
width: length,
|
|
2539
2580
|
height: length,
|
|
2540
2581
|
layer: layer_ref,
|
|
2541
2582
|
stroke_width: length.default("1mm"),
|
|
2542
2583
|
corner_radius: length.optional(),
|
|
2543
|
-
is_filled:
|
|
2544
|
-
has_stroke:
|
|
2545
|
-
is_stroke_dashed:
|
|
2546
|
-
ccw_rotation:
|
|
2584
|
+
is_filled: z123.boolean().default(true).optional(),
|
|
2585
|
+
has_stroke: z123.boolean().optional(),
|
|
2586
|
+
is_stroke_dashed: z123.boolean().optional(),
|
|
2587
|
+
ccw_rotation: z123.number().optional()
|
|
2547
2588
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2548
2589
|
expectTypesMatch(true);
|
|
2549
2590
|
|
|
2550
2591
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2551
|
-
import { z as
|
|
2552
|
-
var pcb_silkscreen_circle =
|
|
2553
|
-
type:
|
|
2592
|
+
import { z as z124 } from "zod";
|
|
2593
|
+
var pcb_silkscreen_circle = z124.object({
|
|
2594
|
+
type: z124.literal("pcb_silkscreen_circle"),
|
|
2554
2595
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2555
2596
|
"pcb_silkscreen_circle"
|
|
2556
2597
|
),
|
|
2557
|
-
pcb_component_id:
|
|
2558
|
-
pcb_group_id:
|
|
2559
|
-
subcircuit_id:
|
|
2598
|
+
pcb_component_id: z124.string(),
|
|
2599
|
+
pcb_group_id: z124.string().optional(),
|
|
2600
|
+
subcircuit_id: z124.string().optional(),
|
|
2560
2601
|
center: point,
|
|
2561
2602
|
radius: length,
|
|
2562
2603
|
layer: visible_layer,
|
|
2563
2604
|
stroke_width: length.default("1mm"),
|
|
2564
|
-
is_filled:
|
|
2605
|
+
is_filled: z124.boolean().optional()
|
|
2565
2606
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
2566
2607
|
expectTypesMatch(true);
|
|
2567
2608
|
|
|
2568
2609
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2569
|
-
import { z as
|
|
2570
|
-
var pcb_silkscreen_oval =
|
|
2571
|
-
type:
|
|
2610
|
+
import { z as z125 } from "zod";
|
|
2611
|
+
var pcb_silkscreen_oval = z125.object({
|
|
2612
|
+
type: z125.literal("pcb_silkscreen_oval"),
|
|
2572
2613
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2573
|
-
pcb_component_id:
|
|
2574
|
-
pcb_group_id:
|
|
2575
|
-
subcircuit_id:
|
|
2614
|
+
pcb_component_id: z125.string(),
|
|
2615
|
+
pcb_group_id: z125.string().optional(),
|
|
2616
|
+
subcircuit_id: z125.string().optional(),
|
|
2576
2617
|
center: point,
|
|
2577
2618
|
radius_x: distance,
|
|
2578
2619
|
radius_y: distance,
|
|
@@ -2582,265 +2623,265 @@ var pcb_silkscreen_oval = z123.object({
|
|
|
2582
2623
|
expectTypesMatch(true);
|
|
2583
2624
|
|
|
2584
2625
|
// src/pcb/pcb_silkscreen_graphic.ts
|
|
2585
|
-
import { z as
|
|
2586
|
-
var pcb_silkscreen_graphic_base =
|
|
2587
|
-
type:
|
|
2626
|
+
import { z as z126 } from "zod";
|
|
2627
|
+
var pcb_silkscreen_graphic_base = z126.object({
|
|
2628
|
+
type: z126.literal("pcb_silkscreen_graphic"),
|
|
2588
2629
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
2589
2630
|
"pcb_silkscreen_graphic"
|
|
2590
2631
|
),
|
|
2591
|
-
pcb_component_id:
|
|
2592
|
-
pcb_group_id:
|
|
2593
|
-
subcircuit_id:
|
|
2632
|
+
pcb_component_id: z126.string(),
|
|
2633
|
+
pcb_group_id: z126.string().optional(),
|
|
2634
|
+
subcircuit_id: z126.string().optional(),
|
|
2594
2635
|
layer: visible_layer,
|
|
2595
2636
|
image_asset: asset.optional()
|
|
2596
2637
|
});
|
|
2597
2638
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
2598
|
-
shape:
|
|
2639
|
+
shape: z126.literal("brep"),
|
|
2599
2640
|
brep_shape
|
|
2600
2641
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
2601
2642
|
expectTypesMatch(
|
|
2602
2643
|
true
|
|
2603
2644
|
);
|
|
2604
|
-
var pcb_silkscreen_graphic =
|
|
2645
|
+
var pcb_silkscreen_graphic = z126.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
2605
2646
|
expectTypesMatch(true);
|
|
2606
2647
|
|
|
2607
2648
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
2608
|
-
import { z as
|
|
2609
|
-
var pcb_silkscreen_pill =
|
|
2610
|
-
type:
|
|
2649
|
+
import { z as z127 } from "zod";
|
|
2650
|
+
var pcb_silkscreen_pill = z127.object({
|
|
2651
|
+
type: z127.literal("pcb_silkscreen_pill"),
|
|
2611
2652
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
2612
|
-
pcb_component_id:
|
|
2613
|
-
pcb_group_id:
|
|
2614
|
-
subcircuit_id:
|
|
2653
|
+
pcb_component_id: z127.string(),
|
|
2654
|
+
pcb_group_id: z127.string().optional(),
|
|
2655
|
+
subcircuit_id: z127.string().optional(),
|
|
2615
2656
|
center: point,
|
|
2616
2657
|
width: length,
|
|
2617
2658
|
height: length,
|
|
2618
2659
|
layer: layer_ref,
|
|
2619
|
-
ccw_rotation:
|
|
2660
|
+
ccw_rotation: z127.number().optional()
|
|
2620
2661
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
2621
2662
|
expectTypesMatch(true);
|
|
2622
2663
|
|
|
2623
2664
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2624
|
-
import { z as
|
|
2625
|
-
var pcb_fabrication_note_text =
|
|
2626
|
-
type:
|
|
2665
|
+
import { z as z128 } from "zod";
|
|
2666
|
+
var pcb_fabrication_note_text = z128.object({
|
|
2667
|
+
type: z128.literal("pcb_fabrication_note_text"),
|
|
2627
2668
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2628
2669
|
"pcb_fabrication_note_text"
|
|
2629
2670
|
),
|
|
2630
|
-
subcircuit_id:
|
|
2631
|
-
pcb_group_id:
|
|
2632
|
-
font:
|
|
2671
|
+
subcircuit_id: z128.string().optional(),
|
|
2672
|
+
pcb_group_id: z128.string().optional(),
|
|
2673
|
+
font: z128.literal("tscircuit2024").default("tscircuit2024"),
|
|
2633
2674
|
font_size: distance.default("1mm"),
|
|
2634
|
-
pcb_component_id:
|
|
2635
|
-
text:
|
|
2636
|
-
ccw_rotation:
|
|
2675
|
+
pcb_component_id: z128.string(),
|
|
2676
|
+
text: z128.string(),
|
|
2677
|
+
ccw_rotation: z128.number().optional(),
|
|
2637
2678
|
layer: visible_layer,
|
|
2638
2679
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2639
|
-
anchor_alignment:
|
|
2640
|
-
color:
|
|
2680
|
+
anchor_alignment: z128.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2681
|
+
color: z128.string().optional()
|
|
2641
2682
|
}).describe(
|
|
2642
2683
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2643
2684
|
);
|
|
2644
2685
|
expectTypesMatch(true);
|
|
2645
2686
|
|
|
2646
2687
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2647
|
-
import { z as
|
|
2648
|
-
var pcb_fabrication_note_path =
|
|
2649
|
-
type:
|
|
2688
|
+
import { z as z129 } from "zod";
|
|
2689
|
+
var pcb_fabrication_note_path = z129.object({
|
|
2690
|
+
type: z129.literal("pcb_fabrication_note_path"),
|
|
2650
2691
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2651
2692
|
"pcb_fabrication_note_path"
|
|
2652
2693
|
),
|
|
2653
|
-
pcb_component_id:
|
|
2654
|
-
subcircuit_id:
|
|
2694
|
+
pcb_component_id: z129.string(),
|
|
2695
|
+
subcircuit_id: z129.string().optional(),
|
|
2655
2696
|
layer: layer_ref,
|
|
2656
|
-
route:
|
|
2697
|
+
route: z129.array(point),
|
|
2657
2698
|
stroke_width: length,
|
|
2658
|
-
color:
|
|
2699
|
+
color: z129.string().optional()
|
|
2659
2700
|
}).describe(
|
|
2660
2701
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2661
2702
|
);
|
|
2662
2703
|
expectTypesMatch(true);
|
|
2663
2704
|
|
|
2664
2705
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2665
|
-
import { z as
|
|
2666
|
-
var pcb_fabrication_note_rect =
|
|
2667
|
-
type:
|
|
2706
|
+
import { z as z130 } from "zod";
|
|
2707
|
+
var pcb_fabrication_note_rect = z130.object({
|
|
2708
|
+
type: z130.literal("pcb_fabrication_note_rect"),
|
|
2668
2709
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2669
2710
|
"pcb_fabrication_note_rect"
|
|
2670
2711
|
),
|
|
2671
|
-
pcb_component_id:
|
|
2672
|
-
pcb_group_id:
|
|
2673
|
-
subcircuit_id:
|
|
2712
|
+
pcb_component_id: z130.string(),
|
|
2713
|
+
pcb_group_id: z130.string().optional(),
|
|
2714
|
+
subcircuit_id: z130.string().optional(),
|
|
2674
2715
|
center: point,
|
|
2675
2716
|
width: length,
|
|
2676
2717
|
height: length,
|
|
2677
2718
|
layer: visible_layer,
|
|
2678
2719
|
stroke_width: length.default("0.1mm"),
|
|
2679
2720
|
corner_radius: length.optional(),
|
|
2680
|
-
is_filled:
|
|
2681
|
-
has_stroke:
|
|
2682
|
-
is_stroke_dashed:
|
|
2683
|
-
color:
|
|
2721
|
+
is_filled: z130.boolean().optional(),
|
|
2722
|
+
has_stroke: z130.boolean().optional(),
|
|
2723
|
+
is_stroke_dashed: z130.boolean().optional(),
|
|
2724
|
+
color: z130.string().optional()
|
|
2684
2725
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2685
2726
|
expectTypesMatch(true);
|
|
2686
2727
|
|
|
2687
2728
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2688
|
-
import { z as
|
|
2689
|
-
var pcb_fabrication_note_dimension =
|
|
2690
|
-
type:
|
|
2729
|
+
import { z as z131 } from "zod";
|
|
2730
|
+
var pcb_fabrication_note_dimension = z131.object({
|
|
2731
|
+
type: z131.literal("pcb_fabrication_note_dimension"),
|
|
2691
2732
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2692
2733
|
"pcb_fabrication_note_dimension"
|
|
2693
2734
|
),
|
|
2694
|
-
pcb_component_id:
|
|
2695
|
-
pcb_group_id:
|
|
2696
|
-
subcircuit_id:
|
|
2735
|
+
pcb_component_id: z131.string(),
|
|
2736
|
+
pcb_group_id: z131.string().optional(),
|
|
2737
|
+
subcircuit_id: z131.string().optional(),
|
|
2697
2738
|
layer: visible_layer,
|
|
2698
2739
|
from: point,
|
|
2699
2740
|
to: point,
|
|
2700
|
-
text:
|
|
2701
|
-
text_ccw_rotation:
|
|
2741
|
+
text: z131.string().optional(),
|
|
2742
|
+
text_ccw_rotation: z131.number().optional(),
|
|
2702
2743
|
offset: length.optional(),
|
|
2703
2744
|
offset_distance: length.optional(),
|
|
2704
|
-
offset_direction:
|
|
2705
|
-
x:
|
|
2706
|
-
y:
|
|
2745
|
+
offset_direction: z131.object({
|
|
2746
|
+
x: z131.number(),
|
|
2747
|
+
y: z131.number()
|
|
2707
2748
|
}).optional(),
|
|
2708
|
-
font:
|
|
2749
|
+
font: z131.literal("tscircuit2024").default("tscircuit2024"),
|
|
2709
2750
|
font_size: length.default("1mm"),
|
|
2710
|
-
color:
|
|
2751
|
+
color: z131.string().optional(),
|
|
2711
2752
|
arrow_size: length.default("1mm")
|
|
2712
2753
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2713
2754
|
expectTypesMatch(true);
|
|
2714
2755
|
|
|
2715
2756
|
// src/pcb/pcb_note_text.ts
|
|
2716
|
-
import { z as
|
|
2717
|
-
var pcb_note_text =
|
|
2718
|
-
type:
|
|
2757
|
+
import { z as z132 } from "zod";
|
|
2758
|
+
var pcb_note_text = z132.object({
|
|
2759
|
+
type: z132.literal("pcb_note_text"),
|
|
2719
2760
|
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2720
|
-
pcb_component_id:
|
|
2721
|
-
pcb_group_id:
|
|
2722
|
-
subcircuit_id:
|
|
2723
|
-
name:
|
|
2724
|
-
font:
|
|
2761
|
+
pcb_component_id: z132.string().optional(),
|
|
2762
|
+
pcb_group_id: z132.string().optional(),
|
|
2763
|
+
subcircuit_id: z132.string().optional(),
|
|
2764
|
+
name: z132.string().optional(),
|
|
2765
|
+
font: z132.literal("tscircuit2024").default("tscircuit2024"),
|
|
2725
2766
|
font_size: distance.default("1mm"),
|
|
2726
|
-
text:
|
|
2767
|
+
text: z132.string().optional(),
|
|
2727
2768
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2728
|
-
anchor_alignment:
|
|
2769
|
+
anchor_alignment: z132.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2729
2770
|
layer: visible_layer.default("top"),
|
|
2730
|
-
is_mirrored_from_top_view:
|
|
2731
|
-
color:
|
|
2771
|
+
is_mirrored_from_top_view: z132.boolean().optional(),
|
|
2772
|
+
color: z132.string().optional()
|
|
2732
2773
|
}).describe("Defines a documentation note in text on the PCB");
|
|
2733
2774
|
expectTypesMatch(true);
|
|
2734
2775
|
|
|
2735
2776
|
// src/pcb/pcb_note_rect.ts
|
|
2736
|
-
import { z as
|
|
2737
|
-
var pcb_note_rect =
|
|
2738
|
-
type:
|
|
2777
|
+
import { z as z133 } from "zod";
|
|
2778
|
+
var pcb_note_rect = z133.object({
|
|
2779
|
+
type: z133.literal("pcb_note_rect"),
|
|
2739
2780
|
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2740
|
-
pcb_component_id:
|
|
2741
|
-
pcb_group_id:
|
|
2742
|
-
subcircuit_id:
|
|
2743
|
-
name:
|
|
2744
|
-
text:
|
|
2781
|
+
pcb_component_id: z133.string().optional(),
|
|
2782
|
+
pcb_group_id: z133.string().optional(),
|
|
2783
|
+
subcircuit_id: z133.string().optional(),
|
|
2784
|
+
name: z133.string().optional(),
|
|
2785
|
+
text: z133.string().optional(),
|
|
2745
2786
|
center: point,
|
|
2746
2787
|
width: length,
|
|
2747
2788
|
height: length,
|
|
2748
2789
|
layer: visible_layer.default("top"),
|
|
2749
2790
|
stroke_width: length.default("0.1mm"),
|
|
2750
2791
|
corner_radius: length.optional(),
|
|
2751
|
-
is_filled:
|
|
2752
|
-
has_stroke:
|
|
2753
|
-
is_stroke_dashed:
|
|
2754
|
-
color:
|
|
2792
|
+
is_filled: z133.boolean().optional(),
|
|
2793
|
+
has_stroke: z133.boolean().optional(),
|
|
2794
|
+
is_stroke_dashed: z133.boolean().optional(),
|
|
2795
|
+
color: z133.string().optional()
|
|
2755
2796
|
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2756
2797
|
expectTypesMatch(true);
|
|
2757
2798
|
|
|
2758
2799
|
// src/pcb/pcb_note_path.ts
|
|
2759
|
-
import { z as
|
|
2760
|
-
var pcb_note_path =
|
|
2761
|
-
type:
|
|
2800
|
+
import { z as z134 } from "zod";
|
|
2801
|
+
var pcb_note_path = z134.object({
|
|
2802
|
+
type: z134.literal("pcb_note_path"),
|
|
2762
2803
|
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2763
|
-
pcb_component_id:
|
|
2764
|
-
pcb_group_id:
|
|
2765
|
-
subcircuit_id:
|
|
2766
|
-
name:
|
|
2767
|
-
text:
|
|
2768
|
-
route:
|
|
2804
|
+
pcb_component_id: z134.string().optional(),
|
|
2805
|
+
pcb_group_id: z134.string().optional(),
|
|
2806
|
+
subcircuit_id: z134.string().optional(),
|
|
2807
|
+
name: z134.string().optional(),
|
|
2808
|
+
text: z134.string().optional(),
|
|
2809
|
+
route: z134.array(point),
|
|
2769
2810
|
layer: visible_layer.default("top"),
|
|
2770
2811
|
stroke_width: length.default("0.1mm"),
|
|
2771
|
-
color:
|
|
2812
|
+
color: z134.string().optional()
|
|
2772
2813
|
}).describe("Defines a polyline documentation note on the PCB");
|
|
2773
2814
|
expectTypesMatch(true);
|
|
2774
2815
|
|
|
2775
2816
|
// src/pcb/pcb_note_line.ts
|
|
2776
|
-
import { z as
|
|
2777
|
-
var pcb_note_line =
|
|
2778
|
-
type:
|
|
2817
|
+
import { z as z135 } from "zod";
|
|
2818
|
+
var pcb_note_line = z135.object({
|
|
2819
|
+
type: z135.literal("pcb_note_line"),
|
|
2779
2820
|
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2780
|
-
pcb_component_id:
|
|
2781
|
-
pcb_group_id:
|
|
2782
|
-
subcircuit_id:
|
|
2783
|
-
name:
|
|
2784
|
-
text:
|
|
2821
|
+
pcb_component_id: z135.string().optional(),
|
|
2822
|
+
pcb_group_id: z135.string().optional(),
|
|
2823
|
+
subcircuit_id: z135.string().optional(),
|
|
2824
|
+
name: z135.string().optional(),
|
|
2825
|
+
text: z135.string().optional(),
|
|
2785
2826
|
x1: distance,
|
|
2786
2827
|
y1: distance,
|
|
2787
2828
|
x2: distance,
|
|
2788
2829
|
y2: distance,
|
|
2789
2830
|
layer: visible_layer.default("top"),
|
|
2790
2831
|
stroke_width: distance.default("0.1mm"),
|
|
2791
|
-
color:
|
|
2792
|
-
is_dashed:
|
|
2832
|
+
color: z135.string().optional(),
|
|
2833
|
+
is_dashed: z135.boolean().optional()
|
|
2793
2834
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2794
2835
|
expectTypesMatch(true);
|
|
2795
2836
|
|
|
2796
2837
|
// src/pcb/pcb_note_dimension.ts
|
|
2797
|
-
import { z as
|
|
2798
|
-
var pcb_note_dimension =
|
|
2799
|
-
type:
|
|
2838
|
+
import { z as z136 } from "zod";
|
|
2839
|
+
var pcb_note_dimension = z136.object({
|
|
2840
|
+
type: z136.literal("pcb_note_dimension"),
|
|
2800
2841
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2801
|
-
pcb_component_id:
|
|
2802
|
-
pcb_group_id:
|
|
2803
|
-
subcircuit_id:
|
|
2804
|
-
name:
|
|
2842
|
+
pcb_component_id: z136.string().optional(),
|
|
2843
|
+
pcb_group_id: z136.string().optional(),
|
|
2844
|
+
subcircuit_id: z136.string().optional(),
|
|
2845
|
+
name: z136.string().optional(),
|
|
2805
2846
|
from: point,
|
|
2806
2847
|
to: point,
|
|
2807
|
-
text:
|
|
2808
|
-
text_ccw_rotation:
|
|
2848
|
+
text: z136.string().optional(),
|
|
2849
|
+
text_ccw_rotation: z136.number().optional(),
|
|
2809
2850
|
offset_distance: length.optional(),
|
|
2810
|
-
offset_direction:
|
|
2811
|
-
x:
|
|
2812
|
-
y:
|
|
2851
|
+
offset_direction: z136.object({
|
|
2852
|
+
x: z136.number(),
|
|
2853
|
+
y: z136.number()
|
|
2813
2854
|
}).optional(),
|
|
2814
|
-
font:
|
|
2855
|
+
font: z136.literal("tscircuit2024").default("tscircuit2024"),
|
|
2815
2856
|
font_size: length.default("1mm"),
|
|
2816
2857
|
layer: visible_layer.default("top"),
|
|
2817
|
-
color:
|
|
2858
|
+
color: z136.string().optional(),
|
|
2818
2859
|
arrow_size: length.default("1mm")
|
|
2819
2860
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2820
2861
|
expectTypesMatch(true);
|
|
2821
2862
|
|
|
2822
2863
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2823
|
-
import { z as
|
|
2864
|
+
import { z as z137 } from "zod";
|
|
2824
2865
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
2825
|
-
type:
|
|
2866
|
+
type: z137.literal("pcb_footprint_overlap_error"),
|
|
2826
2867
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2827
|
-
error_type:
|
|
2828
|
-
pcb_smtpad_ids:
|
|
2829
|
-
pcb_plated_hole_ids:
|
|
2830
|
-
pcb_hole_ids:
|
|
2831
|
-
pcb_keepout_ids:
|
|
2868
|
+
error_type: z137.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
2869
|
+
pcb_smtpad_ids: z137.array(z137.string()).optional(),
|
|
2870
|
+
pcb_plated_hole_ids: z137.array(z137.string()).optional(),
|
|
2871
|
+
pcb_hole_ids: z137.array(z137.string()).optional(),
|
|
2872
|
+
pcb_keepout_ids: z137.array(z137.string()).optional()
|
|
2832
2873
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2833
2874
|
expectTypesMatch(
|
|
2834
2875
|
true
|
|
2835
2876
|
);
|
|
2836
2877
|
|
|
2837
2878
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
2838
|
-
import { z as
|
|
2879
|
+
import { z as z138 } from "zod";
|
|
2839
2880
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
2840
|
-
type:
|
|
2881
|
+
type: z138.literal("pcb_courtyard_overlap_error"),
|
|
2841
2882
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2842
|
-
error_type:
|
|
2843
|
-
pcb_component_ids:
|
|
2883
|
+
error_type: z138.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
2884
|
+
pcb_component_ids: z138.tuple([z138.string(), z138.string()])
|
|
2844
2885
|
}).describe(
|
|
2845
2886
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
2846
2887
|
);
|
|
@@ -2849,49 +2890,49 @@ expectTypesMatch(
|
|
|
2849
2890
|
);
|
|
2850
2891
|
|
|
2851
2892
|
// src/pcb/pcb_keepout.ts
|
|
2852
|
-
import { z as
|
|
2853
|
-
var pcb_keepout =
|
|
2854
|
-
type:
|
|
2855
|
-
shape:
|
|
2856
|
-
pcb_group_id:
|
|
2857
|
-
subcircuit_id:
|
|
2893
|
+
import { z as z139 } from "zod";
|
|
2894
|
+
var pcb_keepout = z139.object({
|
|
2895
|
+
type: z139.literal("pcb_keepout"),
|
|
2896
|
+
shape: z139.literal("rect"),
|
|
2897
|
+
pcb_group_id: z139.string().optional(),
|
|
2898
|
+
subcircuit_id: z139.string().optional(),
|
|
2858
2899
|
center: point,
|
|
2859
2900
|
width: distance,
|
|
2860
2901
|
height: distance,
|
|
2861
|
-
pcb_keepout_id:
|
|
2862
|
-
layers:
|
|
2902
|
+
pcb_keepout_id: z139.string(),
|
|
2903
|
+
layers: z139.array(z139.string()),
|
|
2863
2904
|
// Specify layers where the keepout applies
|
|
2864
|
-
description:
|
|
2905
|
+
description: z139.string().optional()
|
|
2865
2906
|
// Optional description of the keepout
|
|
2866
2907
|
}).or(
|
|
2867
|
-
|
|
2868
|
-
type:
|
|
2869
|
-
shape:
|
|
2870
|
-
pcb_group_id:
|
|
2871
|
-
subcircuit_id:
|
|
2908
|
+
z139.object({
|
|
2909
|
+
type: z139.literal("pcb_keepout"),
|
|
2910
|
+
shape: z139.literal("circle"),
|
|
2911
|
+
pcb_group_id: z139.string().optional(),
|
|
2912
|
+
subcircuit_id: z139.string().optional(),
|
|
2872
2913
|
center: point,
|
|
2873
2914
|
radius: distance,
|
|
2874
|
-
pcb_keepout_id:
|
|
2875
|
-
layers:
|
|
2915
|
+
pcb_keepout_id: z139.string(),
|
|
2916
|
+
layers: z139.array(z139.string()),
|
|
2876
2917
|
// Specify layers where the keepout applies
|
|
2877
|
-
description:
|
|
2918
|
+
description: z139.string().optional()
|
|
2878
2919
|
// Optional description of the keepout
|
|
2879
2920
|
})
|
|
2880
2921
|
);
|
|
2881
2922
|
expectTypesMatch(true);
|
|
2882
2923
|
|
|
2883
2924
|
// src/pcb/pcb_cutout.ts
|
|
2884
|
-
import { z as
|
|
2885
|
-
var pcb_cutout_base =
|
|
2886
|
-
type:
|
|
2925
|
+
import { z as z140 } from "zod";
|
|
2926
|
+
var pcb_cutout_base = z140.object({
|
|
2927
|
+
type: z140.literal("pcb_cutout"),
|
|
2887
2928
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2888
|
-
pcb_group_id:
|
|
2889
|
-
subcircuit_id:
|
|
2890
|
-
pcb_board_id:
|
|
2891
|
-
pcb_panel_id:
|
|
2929
|
+
pcb_group_id: z140.string().optional(),
|
|
2930
|
+
subcircuit_id: z140.string().optional(),
|
|
2931
|
+
pcb_board_id: z140.string().optional(),
|
|
2932
|
+
pcb_panel_id: z140.string().optional()
|
|
2892
2933
|
});
|
|
2893
2934
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2894
|
-
shape:
|
|
2935
|
+
shape: z140.literal("rect"),
|
|
2895
2936
|
center: point,
|
|
2896
2937
|
width: length,
|
|
2897
2938
|
height: length,
|
|
@@ -2900,26 +2941,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2900
2941
|
});
|
|
2901
2942
|
expectTypesMatch(true);
|
|
2902
2943
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2903
|
-
shape:
|
|
2944
|
+
shape: z140.literal("circle"),
|
|
2904
2945
|
center: point,
|
|
2905
2946
|
radius: length
|
|
2906
2947
|
});
|
|
2907
2948
|
expectTypesMatch(true);
|
|
2908
2949
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2909
|
-
shape:
|
|
2910
|
-
points:
|
|
2950
|
+
shape: z140.literal("polygon"),
|
|
2951
|
+
points: z140.array(point)
|
|
2911
2952
|
});
|
|
2912
2953
|
expectTypesMatch(true);
|
|
2913
2954
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
2914
|
-
shape:
|
|
2915
|
-
route:
|
|
2955
|
+
shape: z140.literal("path"),
|
|
2956
|
+
route: z140.array(point),
|
|
2916
2957
|
slot_width: length,
|
|
2917
2958
|
slot_length: length.optional(),
|
|
2918
2959
|
space_between_slots: length.optional(),
|
|
2919
2960
|
slot_corner_radius: length.optional()
|
|
2920
2961
|
});
|
|
2921
2962
|
expectTypesMatch(true);
|
|
2922
|
-
var pcb_cutout =
|
|
2963
|
+
var pcb_cutout = z140.discriminatedUnion("shape", [
|
|
2923
2964
|
pcb_cutout_rect,
|
|
2924
2965
|
pcb_cutout_circle,
|
|
2925
2966
|
pcb_cutout_polygon,
|
|
@@ -2928,169 +2969,169 @@ var pcb_cutout = z138.discriminatedUnion("shape", [
|
|
|
2928
2969
|
expectTypesMatch(true);
|
|
2929
2970
|
|
|
2930
2971
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2931
|
-
import { z as
|
|
2972
|
+
import { z as z141 } from "zod";
|
|
2932
2973
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
2933
|
-
type:
|
|
2974
|
+
type: z141.literal("pcb_missing_footprint_error"),
|
|
2934
2975
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2935
2976
|
"pcb_missing_footprint_error"
|
|
2936
2977
|
),
|
|
2937
|
-
pcb_group_id:
|
|
2938
|
-
subcircuit_id:
|
|
2939
|
-
error_type:
|
|
2940
|
-
source_component_id:
|
|
2978
|
+
pcb_group_id: z141.string().optional(),
|
|
2979
|
+
subcircuit_id: z141.string().optional(),
|
|
2980
|
+
error_type: z141.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
2981
|
+
source_component_id: z141.string()
|
|
2941
2982
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2942
2983
|
expectTypesMatch(
|
|
2943
2984
|
true
|
|
2944
2985
|
);
|
|
2945
2986
|
|
|
2946
2987
|
// src/pcb/external_footprint_load_error.ts
|
|
2947
|
-
import { z as
|
|
2988
|
+
import { z as z142 } from "zod";
|
|
2948
2989
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
2949
|
-
type:
|
|
2990
|
+
type: z142.literal("external_footprint_load_error"),
|
|
2950
2991
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2951
2992
|
"external_footprint_load_error"
|
|
2952
2993
|
),
|
|
2953
|
-
pcb_component_id:
|
|
2954
|
-
source_component_id:
|
|
2955
|
-
pcb_group_id:
|
|
2956
|
-
subcircuit_id:
|
|
2957
|
-
footprinter_string:
|
|
2958
|
-
error_type:
|
|
2994
|
+
pcb_component_id: z142.string(),
|
|
2995
|
+
source_component_id: z142.string(),
|
|
2996
|
+
pcb_group_id: z142.string().optional(),
|
|
2997
|
+
subcircuit_id: z142.string().optional(),
|
|
2998
|
+
footprinter_string: z142.string().optional(),
|
|
2999
|
+
error_type: z142.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
2959
3000
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2960
3001
|
expectTypesMatch(true);
|
|
2961
3002
|
|
|
2962
3003
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2963
|
-
import { z as
|
|
3004
|
+
import { z as z143 } from "zod";
|
|
2964
3005
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
2965
|
-
type:
|
|
3006
|
+
type: z143.literal("circuit_json_footprint_load_error"),
|
|
2966
3007
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2967
3008
|
"circuit_json_footprint_load_error"
|
|
2968
3009
|
),
|
|
2969
|
-
pcb_component_id:
|
|
2970
|
-
source_component_id:
|
|
2971
|
-
pcb_group_id:
|
|
2972
|
-
subcircuit_id:
|
|
2973
|
-
error_type:
|
|
2974
|
-
circuit_json:
|
|
3010
|
+
pcb_component_id: z143.string(),
|
|
3011
|
+
source_component_id: z143.string(),
|
|
3012
|
+
pcb_group_id: z143.string().optional(),
|
|
3013
|
+
subcircuit_id: z143.string().optional(),
|
|
3014
|
+
error_type: z143.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
3015
|
+
circuit_json: z143.array(z143.any()).optional()
|
|
2975
3016
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
2976
3017
|
expectTypesMatch(true);
|
|
2977
3018
|
|
|
2978
3019
|
// src/pcb/pcb_group.ts
|
|
2979
|
-
import { z as
|
|
2980
|
-
var pcb_group =
|
|
2981
|
-
type:
|
|
3020
|
+
import { z as z144 } from "zod";
|
|
3021
|
+
var pcb_group = z144.object({
|
|
3022
|
+
type: z144.literal("pcb_group"),
|
|
2982
3023
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
2983
|
-
source_group_id:
|
|
2984
|
-
is_subcircuit:
|
|
2985
|
-
subcircuit_id:
|
|
3024
|
+
source_group_id: z144.string(),
|
|
3025
|
+
is_subcircuit: z144.boolean().optional(),
|
|
3026
|
+
subcircuit_id: z144.string().optional(),
|
|
2986
3027
|
width: length.optional(),
|
|
2987
3028
|
height: length.optional(),
|
|
2988
3029
|
center: point,
|
|
2989
|
-
display_offset_x:
|
|
3030
|
+
display_offset_x: z144.string().optional().describe(
|
|
2990
3031
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
2991
3032
|
),
|
|
2992
|
-
display_offset_y:
|
|
3033
|
+
display_offset_y: z144.string().optional().describe(
|
|
2993
3034
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
2994
3035
|
),
|
|
2995
|
-
outline:
|
|
3036
|
+
outline: z144.array(point).optional(),
|
|
2996
3037
|
anchor_position: point.optional(),
|
|
2997
3038
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
2998
|
-
position_mode:
|
|
2999
|
-
positioned_relative_to_pcb_group_id:
|
|
3000
|
-
positioned_relative_to_pcb_board_id:
|
|
3001
|
-
pcb_component_ids:
|
|
3002
|
-
child_layout_mode:
|
|
3003
|
-
name:
|
|
3004
|
-
description:
|
|
3005
|
-
layout_mode:
|
|
3006
|
-
autorouter_configuration:
|
|
3039
|
+
position_mode: z144.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3040
|
+
positioned_relative_to_pcb_group_id: z144.string().optional(),
|
|
3041
|
+
positioned_relative_to_pcb_board_id: z144.string().optional(),
|
|
3042
|
+
pcb_component_ids: z144.array(z144.string()),
|
|
3043
|
+
child_layout_mode: z144.enum(["packed", "none"]).optional(),
|
|
3044
|
+
name: z144.string().optional(),
|
|
3045
|
+
description: z144.string().optional(),
|
|
3046
|
+
layout_mode: z144.string().optional(),
|
|
3047
|
+
autorouter_configuration: z144.object({
|
|
3007
3048
|
trace_clearance: length
|
|
3008
3049
|
}).optional(),
|
|
3009
|
-
autorouter_used_string:
|
|
3050
|
+
autorouter_used_string: z144.string().optional()
|
|
3010
3051
|
}).describe("Defines a group of components on the PCB");
|
|
3011
3052
|
expectTypesMatch(true);
|
|
3012
3053
|
|
|
3013
3054
|
// src/pcb/pcb_autorouting_error.ts
|
|
3014
|
-
import { z as
|
|
3055
|
+
import { z as z145 } from "zod";
|
|
3015
3056
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3016
|
-
type:
|
|
3057
|
+
type: z145.literal("pcb_autorouting_error"),
|
|
3017
3058
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3018
|
-
error_type:
|
|
3019
|
-
subcircuit_id:
|
|
3059
|
+
error_type: z145.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3060
|
+
subcircuit_id: z145.string().optional()
|
|
3020
3061
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3021
3062
|
expectTypesMatch(true);
|
|
3022
3063
|
|
|
3023
3064
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3024
|
-
import { z as
|
|
3025
|
-
var pcb_manual_edit_conflict_warning =
|
|
3026
|
-
type:
|
|
3065
|
+
import { z as z146 } from "zod";
|
|
3066
|
+
var pcb_manual_edit_conflict_warning = z146.object({
|
|
3067
|
+
type: z146.literal("pcb_manual_edit_conflict_warning"),
|
|
3027
3068
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3028
3069
|
"pcb_manual_edit_conflict_warning"
|
|
3029
3070
|
),
|
|
3030
|
-
warning_type:
|
|
3031
|
-
message:
|
|
3032
|
-
pcb_component_id:
|
|
3033
|
-
pcb_group_id:
|
|
3034
|
-
subcircuit_id:
|
|
3035
|
-
source_component_id:
|
|
3071
|
+
warning_type: z146.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3072
|
+
message: z146.string(),
|
|
3073
|
+
pcb_component_id: z146.string(),
|
|
3074
|
+
pcb_group_id: z146.string().optional(),
|
|
3075
|
+
subcircuit_id: z146.string().optional(),
|
|
3076
|
+
source_component_id: z146.string()
|
|
3036
3077
|
}).describe(
|
|
3037
3078
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3038
3079
|
);
|
|
3039
3080
|
expectTypesMatch(true);
|
|
3040
3081
|
|
|
3041
3082
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3042
|
-
import { z as
|
|
3043
|
-
var connectorOrientationDirection =
|
|
3044
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3045
|
-
type:
|
|
3083
|
+
import { z as z147 } from "zod";
|
|
3084
|
+
var connectorOrientationDirection = z147.enum(["x-", "x+", "y+", "y-"]);
|
|
3085
|
+
var pcb_connector_not_in_accessible_orientation_warning = z147.object({
|
|
3086
|
+
type: z147.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3046
3087
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3047
3088
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3048
3089
|
),
|
|
3049
|
-
warning_type:
|
|
3050
|
-
message:
|
|
3051
|
-
pcb_component_id:
|
|
3052
|
-
source_component_id:
|
|
3053
|
-
pcb_board_id:
|
|
3090
|
+
warning_type: z147.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3091
|
+
message: z147.string(),
|
|
3092
|
+
pcb_component_id: z147.string(),
|
|
3093
|
+
source_component_id: z147.string().optional(),
|
|
3094
|
+
pcb_board_id: z147.string().optional(),
|
|
3054
3095
|
facing_direction: connectorOrientationDirection,
|
|
3055
3096
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3056
|
-
subcircuit_id:
|
|
3097
|
+
subcircuit_id: z147.string().optional()
|
|
3057
3098
|
}).describe(
|
|
3058
3099
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3059
3100
|
);
|
|
3060
3101
|
expectTypesMatch(true);
|
|
3061
3102
|
|
|
3062
3103
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
3063
|
-
import { z as
|
|
3064
|
-
var supplier_footprint_mismatch_warning =
|
|
3065
|
-
type:
|
|
3104
|
+
import { z as z148 } from "zod";
|
|
3105
|
+
var supplier_footprint_mismatch_warning = z148.object({
|
|
3106
|
+
type: z148.literal("supplier_footprint_mismatch_warning"),
|
|
3066
3107
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3067
3108
|
"supplier_footprint_mismatch_warning"
|
|
3068
3109
|
),
|
|
3069
|
-
warning_type:
|
|
3070
|
-
message:
|
|
3071
|
-
source_component_id:
|
|
3072
|
-
pcb_component_id:
|
|
3073
|
-
pcb_group_id:
|
|
3074
|
-
subcircuit_id:
|
|
3110
|
+
warning_type: z148.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
3111
|
+
message: z148.string(),
|
|
3112
|
+
source_component_id: z148.string(),
|
|
3113
|
+
pcb_component_id: z148.string().optional(),
|
|
3114
|
+
pcb_group_id: z148.string().optional(),
|
|
3115
|
+
subcircuit_id: z148.string().optional(),
|
|
3075
3116
|
supplier_name: supplier_name.optional(),
|
|
3076
|
-
supplier_part_number:
|
|
3077
|
-
supplier_footprint_url:
|
|
3078
|
-
footprint_copper_intersection_over_union:
|
|
3117
|
+
supplier_part_number: z148.string().optional(),
|
|
3118
|
+
supplier_footprint_url: z148.string().optional(),
|
|
3119
|
+
footprint_copper_intersection_over_union: z148.number()
|
|
3079
3120
|
}).describe(
|
|
3080
3121
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3081
3122
|
);
|
|
3082
3123
|
expectTypesMatch(true);
|
|
3083
3124
|
|
|
3084
3125
|
// src/pcb/pcb_breakout_point.ts
|
|
3085
|
-
import { z as
|
|
3086
|
-
var pcb_breakout_point =
|
|
3087
|
-
type:
|
|
3126
|
+
import { z as z149 } from "zod";
|
|
3127
|
+
var pcb_breakout_point = z149.object({
|
|
3128
|
+
type: z149.literal("pcb_breakout_point"),
|
|
3088
3129
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3089
|
-
pcb_group_id:
|
|
3090
|
-
subcircuit_id:
|
|
3091
|
-
source_trace_id:
|
|
3092
|
-
source_port_id:
|
|
3093
|
-
source_net_id:
|
|
3130
|
+
pcb_group_id: z149.string(),
|
|
3131
|
+
subcircuit_id: z149.string().optional(),
|
|
3132
|
+
source_trace_id: z149.string().optional(),
|
|
3133
|
+
source_port_id: z149.string().optional(),
|
|
3134
|
+
source_net_id: z149.string().optional(),
|
|
3094
3135
|
x: distance,
|
|
3095
3136
|
y: distance
|
|
3096
3137
|
}).describe(
|
|
@@ -3099,61 +3140,61 @@ var pcb_breakout_point = z147.object({
|
|
|
3099
3140
|
expectTypesMatch(true);
|
|
3100
3141
|
|
|
3101
3142
|
// src/pcb/pcb_ground_plane.ts
|
|
3102
|
-
import { z as
|
|
3103
|
-
var pcb_ground_plane =
|
|
3104
|
-
type:
|
|
3143
|
+
import { z as z150 } from "zod";
|
|
3144
|
+
var pcb_ground_plane = z150.object({
|
|
3145
|
+
type: z150.literal("pcb_ground_plane"),
|
|
3105
3146
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3106
|
-
source_pcb_ground_plane_id:
|
|
3107
|
-
source_net_id:
|
|
3108
|
-
pcb_group_id:
|
|
3109
|
-
subcircuit_id:
|
|
3147
|
+
source_pcb_ground_plane_id: z150.string(),
|
|
3148
|
+
source_net_id: z150.string(),
|
|
3149
|
+
pcb_group_id: z150.string().optional(),
|
|
3150
|
+
subcircuit_id: z150.string().optional()
|
|
3110
3151
|
}).describe("Defines a ground plane on the PCB");
|
|
3111
3152
|
expectTypesMatch(true);
|
|
3112
3153
|
|
|
3113
3154
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3114
|
-
import { z as
|
|
3115
|
-
var pcb_ground_plane_region =
|
|
3116
|
-
type:
|
|
3155
|
+
import { z as z151 } from "zod";
|
|
3156
|
+
var pcb_ground_plane_region = z151.object({
|
|
3157
|
+
type: z151.literal("pcb_ground_plane_region"),
|
|
3117
3158
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3118
3159
|
"pcb_ground_plane_region"
|
|
3119
3160
|
),
|
|
3120
|
-
pcb_ground_plane_id:
|
|
3121
|
-
pcb_group_id:
|
|
3122
|
-
subcircuit_id:
|
|
3161
|
+
pcb_ground_plane_id: z151.string(),
|
|
3162
|
+
pcb_group_id: z151.string().optional(),
|
|
3163
|
+
subcircuit_id: z151.string().optional(),
|
|
3123
3164
|
layer: layer_ref,
|
|
3124
|
-
points:
|
|
3165
|
+
points: z151.array(point)
|
|
3125
3166
|
}).describe("Defines a polygon region of a ground plane");
|
|
3126
3167
|
expectTypesMatch(true);
|
|
3127
3168
|
|
|
3128
3169
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3129
|
-
import { z as
|
|
3130
|
-
var pcb_thermal_spoke =
|
|
3131
|
-
type:
|
|
3170
|
+
import { z as z152 } from "zod";
|
|
3171
|
+
var pcb_thermal_spoke = z152.object({
|
|
3172
|
+
type: z152.literal("pcb_thermal_spoke"),
|
|
3132
3173
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3133
|
-
pcb_ground_plane_id:
|
|
3134
|
-
shape:
|
|
3135
|
-
spoke_count:
|
|
3174
|
+
pcb_ground_plane_id: z152.string(),
|
|
3175
|
+
shape: z152.string(),
|
|
3176
|
+
spoke_count: z152.number(),
|
|
3136
3177
|
spoke_thickness: distance,
|
|
3137
3178
|
spoke_inner_diameter: distance,
|
|
3138
3179
|
spoke_outer_diameter: distance,
|
|
3139
|
-
pcb_plated_hole_id:
|
|
3140
|
-
subcircuit_id:
|
|
3180
|
+
pcb_plated_hole_id: z152.string().optional(),
|
|
3181
|
+
subcircuit_id: z152.string().optional()
|
|
3141
3182
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3142
3183
|
expectTypesMatch(true);
|
|
3143
3184
|
|
|
3144
3185
|
// src/pcb/pcb_copper_pour.ts
|
|
3145
|
-
import { z as
|
|
3146
|
-
var pcb_copper_pour_base =
|
|
3147
|
-
type:
|
|
3186
|
+
import { z as z153 } from "zod";
|
|
3187
|
+
var pcb_copper_pour_base = z153.object({
|
|
3188
|
+
type: z153.literal("pcb_copper_pour"),
|
|
3148
3189
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3149
|
-
pcb_group_id:
|
|
3150
|
-
subcircuit_id:
|
|
3190
|
+
pcb_group_id: z153.string().optional(),
|
|
3191
|
+
subcircuit_id: z153.string().optional(),
|
|
3151
3192
|
layer: layer_ref,
|
|
3152
|
-
source_net_id:
|
|
3153
|
-
covered_with_solder_mask:
|
|
3193
|
+
source_net_id: z153.string().optional(),
|
|
3194
|
+
covered_with_solder_mask: z153.boolean().optional().default(true)
|
|
3154
3195
|
});
|
|
3155
3196
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3156
|
-
shape:
|
|
3197
|
+
shape: z153.literal("rect"),
|
|
3157
3198
|
center: point,
|
|
3158
3199
|
width: length,
|
|
3159
3200
|
height: length,
|
|
@@ -3161,16 +3202,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3161
3202
|
});
|
|
3162
3203
|
expectTypesMatch(true);
|
|
3163
3204
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3164
|
-
shape:
|
|
3205
|
+
shape: z153.literal("brep"),
|
|
3165
3206
|
brep_shape
|
|
3166
3207
|
});
|
|
3167
3208
|
expectTypesMatch(true);
|
|
3168
3209
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3169
|
-
shape:
|
|
3170
|
-
points:
|
|
3210
|
+
shape: z153.literal("polygon"),
|
|
3211
|
+
points: z153.array(point)
|
|
3171
3212
|
});
|
|
3172
3213
|
expectTypesMatch(true);
|
|
3173
|
-
var pcb_copper_pour =
|
|
3214
|
+
var pcb_copper_pour = z153.discriminatedUnion("shape", [
|
|
3174
3215
|
pcb_copper_pour_rect,
|
|
3175
3216
|
pcb_copper_pour_brep,
|
|
3176
3217
|
pcb_copper_pour_polygon
|
|
@@ -3178,99 +3219,99 @@ var pcb_copper_pour = z151.discriminatedUnion("shape", [
|
|
|
3178
3219
|
expectTypesMatch(true);
|
|
3179
3220
|
|
|
3180
3221
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3181
|
-
import { z as
|
|
3222
|
+
import { z as z154 } from "zod";
|
|
3182
3223
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3183
|
-
type:
|
|
3224
|
+
type: z154.literal("pcb_component_outside_board_error"),
|
|
3184
3225
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3185
3226
|
"pcb_component_outside_board_error"
|
|
3186
3227
|
),
|
|
3187
|
-
error_type:
|
|
3188
|
-
pcb_component_id:
|
|
3189
|
-
pcb_board_id:
|
|
3228
|
+
error_type: z154.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3229
|
+
pcb_component_id: z154.string(),
|
|
3230
|
+
pcb_board_id: z154.string(),
|
|
3190
3231
|
component_center: point,
|
|
3191
|
-
component_bounds:
|
|
3192
|
-
min_x:
|
|
3193
|
-
max_x:
|
|
3194
|
-
min_y:
|
|
3195
|
-
max_y:
|
|
3232
|
+
component_bounds: z154.object({
|
|
3233
|
+
min_x: z154.number(),
|
|
3234
|
+
max_x: z154.number(),
|
|
3235
|
+
min_y: z154.number(),
|
|
3236
|
+
max_y: z154.number()
|
|
3196
3237
|
}),
|
|
3197
|
-
subcircuit_id:
|
|
3198
|
-
source_component_id:
|
|
3238
|
+
subcircuit_id: z154.string().optional(),
|
|
3239
|
+
source_component_id: z154.string().optional()
|
|
3199
3240
|
}).describe(
|
|
3200
3241
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3201
3242
|
);
|
|
3202
3243
|
expectTypesMatch(true);
|
|
3203
3244
|
|
|
3204
3245
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3205
|
-
import { z as
|
|
3246
|
+
import { z as z155 } from "zod";
|
|
3206
3247
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3207
|
-
type:
|
|
3248
|
+
type: z155.literal("pcb_component_not_on_board_edge_error"),
|
|
3208
3249
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3209
3250
|
"pcb_component_not_on_board_edge_error"
|
|
3210
3251
|
),
|
|
3211
|
-
error_type:
|
|
3212
|
-
pcb_component_id:
|
|
3213
|
-
pcb_board_id:
|
|
3252
|
+
error_type: z155.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3253
|
+
pcb_component_id: z155.string(),
|
|
3254
|
+
pcb_board_id: z155.string(),
|
|
3214
3255
|
component_center: point,
|
|
3215
|
-
pad_to_nearest_board_edge_distance:
|
|
3216
|
-
source_component_id:
|
|
3217
|
-
subcircuit_id:
|
|
3256
|
+
pad_to_nearest_board_edge_distance: z155.number(),
|
|
3257
|
+
source_component_id: z155.string().optional(),
|
|
3258
|
+
subcircuit_id: z155.string().optional()
|
|
3218
3259
|
}).describe(
|
|
3219
3260
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3220
3261
|
);
|
|
3221
3262
|
expectTypesMatch(true);
|
|
3222
3263
|
|
|
3223
3264
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3224
|
-
import { z as
|
|
3265
|
+
import { z as z156 } from "zod";
|
|
3225
3266
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3226
|
-
type:
|
|
3267
|
+
type: z156.literal("pcb_component_invalid_layer_error"),
|
|
3227
3268
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3228
3269
|
"pcb_component_invalid_layer_error"
|
|
3229
3270
|
),
|
|
3230
|
-
error_type:
|
|
3231
|
-
pcb_component_id:
|
|
3232
|
-
source_component_id:
|
|
3271
|
+
error_type: z156.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3272
|
+
pcb_component_id: z156.string().optional(),
|
|
3273
|
+
source_component_id: z156.string(),
|
|
3233
3274
|
layer: layer_ref,
|
|
3234
|
-
subcircuit_id:
|
|
3275
|
+
subcircuit_id: z156.string().optional()
|
|
3235
3276
|
}).describe(
|
|
3236
3277
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3237
3278
|
);
|
|
3238
3279
|
expectTypesMatch(true);
|
|
3239
3280
|
|
|
3240
3281
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3241
|
-
import { z as
|
|
3282
|
+
import { z as z157 } from "zod";
|
|
3242
3283
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3243
|
-
type:
|
|
3284
|
+
type: z157.literal("pcb_via_clearance_error"),
|
|
3244
3285
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3245
|
-
error_type:
|
|
3246
|
-
pcb_via_ids:
|
|
3286
|
+
error_type: z157.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3287
|
+
pcb_via_ids: z157.array(z157.string()).min(2),
|
|
3247
3288
|
minimum_clearance: distance.optional(),
|
|
3248
3289
|
actual_clearance: distance.optional(),
|
|
3249
|
-
pcb_center:
|
|
3250
|
-
x:
|
|
3251
|
-
y:
|
|
3290
|
+
pcb_center: z157.object({
|
|
3291
|
+
x: z157.number().optional(),
|
|
3292
|
+
y: z157.number().optional()
|
|
3252
3293
|
}).optional(),
|
|
3253
|
-
subcircuit_id:
|
|
3294
|
+
subcircuit_id: z157.string().optional()
|
|
3254
3295
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3255
3296
|
expectTypesMatch(true);
|
|
3256
3297
|
|
|
3257
3298
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
3258
|
-
import { z as
|
|
3299
|
+
import { z as z158 } from "zod";
|
|
3259
3300
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3260
|
-
type:
|
|
3301
|
+
type: z158.literal("pcb_via_trace_clearance_error"),
|
|
3261
3302
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3262
3303
|
"pcb_via_trace_clearance_error"
|
|
3263
3304
|
),
|
|
3264
|
-
error_type:
|
|
3265
|
-
pcb_via_id:
|
|
3266
|
-
pcb_trace_id:
|
|
3305
|
+
error_type: z158.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
3306
|
+
pcb_via_id: z158.string(),
|
|
3307
|
+
pcb_trace_id: z158.string(),
|
|
3267
3308
|
minimum_clearance: distance.optional(),
|
|
3268
3309
|
actual_clearance: distance.optional(),
|
|
3269
|
-
center:
|
|
3270
|
-
x:
|
|
3271
|
-
y:
|
|
3310
|
+
center: z158.object({
|
|
3311
|
+
x: z158.number().optional(),
|
|
3312
|
+
y: z158.number().optional()
|
|
3272
3313
|
}).optional(),
|
|
3273
|
-
subcircuit_id:
|
|
3314
|
+
subcircuit_id: z158.string().optional()
|
|
3274
3315
|
}).describe(
|
|
3275
3316
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3276
3317
|
);
|
|
@@ -3279,41 +3320,41 @@ expectTypesMatch(
|
|
|
3279
3320
|
);
|
|
3280
3321
|
|
|
3281
3322
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
3282
|
-
import { z as
|
|
3323
|
+
import { z as z159 } from "zod";
|
|
3283
3324
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3284
|
-
type:
|
|
3325
|
+
type: z159.literal("pcb_pad_pad_clearance_error"),
|
|
3285
3326
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3286
3327
|
"pcb_pad_pad_clearance_error"
|
|
3287
3328
|
),
|
|
3288
|
-
error_type:
|
|
3289
|
-
pcb_pad_ids:
|
|
3329
|
+
error_type: z159.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
3330
|
+
pcb_pad_ids: z159.array(z159.string()).min(2),
|
|
3290
3331
|
minimum_clearance: distance.optional(),
|
|
3291
3332
|
actual_clearance: distance.optional(),
|
|
3292
|
-
center:
|
|
3293
|
-
x:
|
|
3294
|
-
y:
|
|
3333
|
+
center: z159.object({
|
|
3334
|
+
x: z159.number().optional(),
|
|
3335
|
+
y: z159.number().optional()
|
|
3295
3336
|
}).optional(),
|
|
3296
|
-
subcircuit_id:
|
|
3337
|
+
subcircuit_id: z159.string().optional()
|
|
3297
3338
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3298
3339
|
expectTypesMatch(true);
|
|
3299
3340
|
|
|
3300
3341
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
3301
|
-
import { z as
|
|
3342
|
+
import { z as z160 } from "zod";
|
|
3302
3343
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3303
|
-
type:
|
|
3344
|
+
type: z160.literal("pcb_pad_trace_clearance_error"),
|
|
3304
3345
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3305
3346
|
"pcb_pad_trace_clearance_error"
|
|
3306
3347
|
),
|
|
3307
|
-
error_type:
|
|
3308
|
-
pcb_pad_id:
|
|
3309
|
-
pcb_trace_id:
|
|
3348
|
+
error_type: z160.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
3349
|
+
pcb_pad_id: z160.string(),
|
|
3350
|
+
pcb_trace_id: z160.string(),
|
|
3310
3351
|
minimum_clearance: distance.optional(),
|
|
3311
3352
|
actual_clearance: distance.optional(),
|
|
3312
|
-
center:
|
|
3313
|
-
x:
|
|
3314
|
-
y:
|
|
3353
|
+
center: z160.object({
|
|
3354
|
+
x: z160.number().optional(),
|
|
3355
|
+
y: z160.number().optional()
|
|
3315
3356
|
}).optional(),
|
|
3316
|
-
subcircuit_id:
|
|
3357
|
+
subcircuit_id: z160.string().optional()
|
|
3317
3358
|
}).describe(
|
|
3318
3359
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3319
3360
|
);
|
|
@@ -3322,89 +3363,89 @@ expectTypesMatch(
|
|
|
3322
3363
|
);
|
|
3323
3364
|
|
|
3324
3365
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3325
|
-
import { z as
|
|
3326
|
-
var pcb_courtyard_rect =
|
|
3327
|
-
type:
|
|
3366
|
+
import { z as z161 } from "zod";
|
|
3367
|
+
var pcb_courtyard_rect = z161.object({
|
|
3368
|
+
type: z161.literal("pcb_courtyard_rect"),
|
|
3328
3369
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3329
|
-
pcb_component_id:
|
|
3330
|
-
pcb_group_id:
|
|
3331
|
-
subcircuit_id:
|
|
3370
|
+
pcb_component_id: z161.string(),
|
|
3371
|
+
pcb_group_id: z161.string().optional(),
|
|
3372
|
+
subcircuit_id: z161.string().optional(),
|
|
3332
3373
|
center: point,
|
|
3333
3374
|
width: length,
|
|
3334
3375
|
height: length,
|
|
3335
3376
|
layer: visible_layer,
|
|
3336
3377
|
ccw_rotation: rotation.optional(),
|
|
3337
|
-
color:
|
|
3378
|
+
color: z161.string().optional()
|
|
3338
3379
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3339
3380
|
expectTypesMatch(true);
|
|
3340
3381
|
|
|
3341
3382
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3342
|
-
import { z as
|
|
3343
|
-
var pcb_courtyard_outline =
|
|
3344
|
-
type:
|
|
3383
|
+
import { z as z162 } from "zod";
|
|
3384
|
+
var pcb_courtyard_outline = z162.object({
|
|
3385
|
+
type: z162.literal("pcb_courtyard_outline"),
|
|
3345
3386
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3346
3387
|
"pcb_courtyard_outline"
|
|
3347
3388
|
),
|
|
3348
|
-
pcb_component_id:
|
|
3349
|
-
pcb_group_id:
|
|
3350
|
-
subcircuit_id:
|
|
3389
|
+
pcb_component_id: z162.string(),
|
|
3390
|
+
pcb_group_id: z162.string().optional(),
|
|
3391
|
+
subcircuit_id: z162.string().optional(),
|
|
3351
3392
|
layer: visible_layer,
|
|
3352
|
-
outline:
|
|
3393
|
+
outline: z162.array(point).min(2)
|
|
3353
3394
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3354
3395
|
expectTypesMatch(true);
|
|
3355
3396
|
|
|
3356
3397
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3357
|
-
import { z as
|
|
3358
|
-
var pcb_courtyard_polygon =
|
|
3359
|
-
type:
|
|
3398
|
+
import { z as z163 } from "zod";
|
|
3399
|
+
var pcb_courtyard_polygon = z163.object({
|
|
3400
|
+
type: z163.literal("pcb_courtyard_polygon"),
|
|
3360
3401
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3361
3402
|
"pcb_courtyard_polygon"
|
|
3362
3403
|
),
|
|
3363
|
-
pcb_component_id:
|
|
3364
|
-
pcb_group_id:
|
|
3365
|
-
subcircuit_id:
|
|
3404
|
+
pcb_component_id: z163.string(),
|
|
3405
|
+
pcb_group_id: z163.string().optional(),
|
|
3406
|
+
subcircuit_id: z163.string().optional(),
|
|
3366
3407
|
layer: visible_layer,
|
|
3367
|
-
points:
|
|
3368
|
-
color:
|
|
3408
|
+
points: z163.array(point).min(3),
|
|
3409
|
+
color: z163.string().optional()
|
|
3369
3410
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3370
3411
|
expectTypesMatch(true);
|
|
3371
3412
|
|
|
3372
3413
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3373
|
-
import { z as
|
|
3374
|
-
var pcb_courtyard_circle =
|
|
3375
|
-
type:
|
|
3414
|
+
import { z as z164 } from "zod";
|
|
3415
|
+
var pcb_courtyard_circle = z164.object({
|
|
3416
|
+
type: z164.literal("pcb_courtyard_circle"),
|
|
3376
3417
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3377
3418
|
"pcb_courtyard_circle"
|
|
3378
3419
|
),
|
|
3379
|
-
pcb_component_id:
|
|
3380
|
-
pcb_group_id:
|
|
3381
|
-
subcircuit_id:
|
|
3420
|
+
pcb_component_id: z164.string(),
|
|
3421
|
+
pcb_group_id: z164.string().optional(),
|
|
3422
|
+
subcircuit_id: z164.string().optional(),
|
|
3382
3423
|
center: point,
|
|
3383
3424
|
radius: length,
|
|
3384
3425
|
layer: visible_layer,
|
|
3385
|
-
color:
|
|
3426
|
+
color: z164.string().optional()
|
|
3386
3427
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3387
3428
|
expectTypesMatch(true);
|
|
3388
3429
|
|
|
3389
3430
|
// src/pcb/pcb_courtyard_pill.ts
|
|
3390
|
-
import { z as
|
|
3391
|
-
var pcb_courtyard_pill =
|
|
3392
|
-
type:
|
|
3431
|
+
import { z as z165 } from "zod";
|
|
3432
|
+
var pcb_courtyard_pill = z165.object({
|
|
3433
|
+
type: z165.literal("pcb_courtyard_pill"),
|
|
3393
3434
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3394
|
-
pcb_component_id:
|
|
3395
|
-
pcb_group_id:
|
|
3396
|
-
subcircuit_id:
|
|
3435
|
+
pcb_component_id: z165.string(),
|
|
3436
|
+
pcb_group_id: z165.string().optional(),
|
|
3437
|
+
subcircuit_id: z165.string().optional(),
|
|
3397
3438
|
center: point,
|
|
3398
3439
|
width: length,
|
|
3399
3440
|
height: length,
|
|
3400
3441
|
radius: length,
|
|
3401
3442
|
layer: visible_layer,
|
|
3402
|
-
color:
|
|
3443
|
+
color: z165.string().optional()
|
|
3403
3444
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3404
3445
|
expectTypesMatch(true);
|
|
3405
3446
|
|
|
3406
3447
|
// src/cad/cad_component.ts
|
|
3407
|
-
import { z as
|
|
3448
|
+
import { z as z166 } from "zod";
|
|
3408
3449
|
|
|
3409
3450
|
// src/cad/cad_model_conventions.ts
|
|
3410
3451
|
var cad_model_formats = [
|
|
@@ -3435,49 +3476,49 @@ var cadModelDefaultDirectionMap = {
|
|
|
3435
3476
|
};
|
|
3436
3477
|
|
|
3437
3478
|
// src/cad/cad_component.ts
|
|
3438
|
-
var cad_component =
|
|
3439
|
-
type:
|
|
3440
|
-
cad_component_id:
|
|
3441
|
-
pcb_component_id:
|
|
3442
|
-
source_component_id:
|
|
3479
|
+
var cad_component = z166.object({
|
|
3480
|
+
type: z166.literal("cad_component"),
|
|
3481
|
+
cad_component_id: z166.string(),
|
|
3482
|
+
pcb_component_id: z166.string(),
|
|
3483
|
+
source_component_id: z166.string(),
|
|
3443
3484
|
position: point3,
|
|
3444
3485
|
rotation: point3.optional(),
|
|
3445
3486
|
size: point3.optional(),
|
|
3446
3487
|
layer: layer_ref.optional(),
|
|
3447
|
-
subcircuit_id:
|
|
3488
|
+
subcircuit_id: z166.string().optional(),
|
|
3448
3489
|
// These are all ways to generate/load the 3d model
|
|
3449
|
-
footprinter_string:
|
|
3450
|
-
model_obj_url:
|
|
3451
|
-
model_stl_url:
|
|
3452
|
-
model_3mf_url:
|
|
3453
|
-
model_gltf_url:
|
|
3454
|
-
model_glb_url:
|
|
3455
|
-
model_step_url:
|
|
3456
|
-
model_wrl_url:
|
|
3490
|
+
footprinter_string: z166.string().optional(),
|
|
3491
|
+
model_obj_url: z166.string().optional(),
|
|
3492
|
+
model_stl_url: z166.string().optional(),
|
|
3493
|
+
model_3mf_url: z166.string().optional(),
|
|
3494
|
+
model_gltf_url: z166.string().optional(),
|
|
3495
|
+
model_glb_url: z166.string().optional(),
|
|
3496
|
+
model_step_url: z166.string().optional(),
|
|
3497
|
+
model_wrl_url: z166.string().optional(),
|
|
3457
3498
|
model_asset: asset.optional(),
|
|
3458
|
-
model_unit_to_mm_scale_factor:
|
|
3459
|
-
model_board_normal_direction:
|
|
3499
|
+
model_unit_to_mm_scale_factor: z166.number().optional(),
|
|
3500
|
+
model_board_normal_direction: z166.enum(cad_model_axis_directions).optional().describe(
|
|
3460
3501
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3461
3502
|
),
|
|
3462
3503
|
model_origin_position: point3.optional(),
|
|
3463
|
-
model_origin_alignment:
|
|
3504
|
+
model_origin_alignment: z166.enum([
|
|
3464
3505
|
"unknown",
|
|
3465
3506
|
"center",
|
|
3466
3507
|
"center_of_component_on_board_surface",
|
|
3467
3508
|
"bottom_center_of_component"
|
|
3468
3509
|
]).optional(),
|
|
3469
|
-
model_object_fit:
|
|
3470
|
-
model_jscad:
|
|
3471
|
-
show_as_translucent_model:
|
|
3472
|
-
show_as_bounding_box:
|
|
3473
|
-
anchor_alignment:
|
|
3510
|
+
model_object_fit: z166.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
3511
|
+
model_jscad: z166.any().optional(),
|
|
3512
|
+
show_as_translucent_model: z166.boolean().optional(),
|
|
3513
|
+
show_as_bounding_box: z166.boolean().optional(),
|
|
3514
|
+
anchor_alignment: z166.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3474
3515
|
}).describe("Defines a component on the PCB");
|
|
3475
3516
|
expectTypesMatch(true);
|
|
3476
3517
|
|
|
3477
3518
|
// src/simulation/simulation_voltage_source.ts
|
|
3478
|
-
import { z as
|
|
3479
|
-
var wave_shape =
|
|
3480
|
-
var percentage =
|
|
3519
|
+
import { z as z167 } from "zod";
|
|
3520
|
+
var wave_shape = z167.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
3521
|
+
var percentage = z167.union([z167.string(), z167.number()]).transform((val) => {
|
|
3481
3522
|
if (typeof val === "string") {
|
|
3482
3523
|
if (val.endsWith("%")) {
|
|
3483
3524
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3486,30 +3527,30 @@ var percentage = z165.union([z165.string(), z165.number()]).transform((val) => {
|
|
|
3486
3527
|
}
|
|
3487
3528
|
return val;
|
|
3488
3529
|
}).pipe(
|
|
3489
|
-
|
|
3530
|
+
z167.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3490
3531
|
);
|
|
3491
|
-
var simulation_dc_voltage_source =
|
|
3492
|
-
type:
|
|
3532
|
+
var simulation_dc_voltage_source = z167.object({
|
|
3533
|
+
type: z167.literal("simulation_voltage_source"),
|
|
3493
3534
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3494
3535
|
"simulation_voltage_source"
|
|
3495
3536
|
),
|
|
3496
|
-
is_dc_source:
|
|
3497
|
-
positive_source_port_id:
|
|
3498
|
-
negative_source_port_id:
|
|
3499
|
-
positive_source_net_id:
|
|
3500
|
-
negative_source_net_id:
|
|
3537
|
+
is_dc_source: z167.literal(true).optional().default(true),
|
|
3538
|
+
positive_source_port_id: z167.string().optional(),
|
|
3539
|
+
negative_source_port_id: z167.string().optional(),
|
|
3540
|
+
positive_source_net_id: z167.string().optional(),
|
|
3541
|
+
negative_source_net_id: z167.string().optional(),
|
|
3501
3542
|
voltage
|
|
3502
3543
|
}).describe("Defines a DC voltage source for simulation");
|
|
3503
|
-
var simulation_ac_voltage_source =
|
|
3504
|
-
type:
|
|
3544
|
+
var simulation_ac_voltage_source = z167.object({
|
|
3545
|
+
type: z167.literal("simulation_voltage_source"),
|
|
3505
3546
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3506
3547
|
"simulation_voltage_source"
|
|
3507
3548
|
),
|
|
3508
|
-
is_dc_source:
|
|
3509
|
-
terminal1_source_port_id:
|
|
3510
|
-
terminal2_source_port_id:
|
|
3511
|
-
terminal1_source_net_id:
|
|
3512
|
-
terminal2_source_net_id:
|
|
3549
|
+
is_dc_source: z167.literal(false),
|
|
3550
|
+
terminal1_source_port_id: z167.string().optional(),
|
|
3551
|
+
terminal2_source_port_id: z167.string().optional(),
|
|
3552
|
+
terminal1_source_net_id: z167.string().optional(),
|
|
3553
|
+
terminal2_source_net_id: z167.string().optional(),
|
|
3513
3554
|
voltage: voltage.optional(),
|
|
3514
3555
|
frequency: frequency.optional(),
|
|
3515
3556
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3522,14 +3563,14 @@ var simulation_ac_voltage_source = z165.object({
|
|
|
3522
3563
|
pulse_width: ms.optional(),
|
|
3523
3564
|
period: ms.optional()
|
|
3524
3565
|
}).describe("Defines an AC voltage source for simulation");
|
|
3525
|
-
var simulation_voltage_source =
|
|
3566
|
+
var simulation_voltage_source = z167.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
3526
3567
|
expectTypesMatch(true);
|
|
3527
3568
|
expectTypesMatch(true);
|
|
3528
3569
|
expectTypesMatch(true);
|
|
3529
3570
|
|
|
3530
3571
|
// src/simulation/simulation_current_source.ts
|
|
3531
|
-
import { z as
|
|
3532
|
-
var percentage2 =
|
|
3572
|
+
import { z as z168 } from "zod";
|
|
3573
|
+
var percentage2 = z168.union([z168.string(), z168.number()]).transform((val) => {
|
|
3533
3574
|
if (typeof val === "string") {
|
|
3534
3575
|
if (val.endsWith("%")) {
|
|
3535
3576
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3538,30 +3579,30 @@ var percentage2 = z166.union([z166.string(), z166.number()]).transform((val) =>
|
|
|
3538
3579
|
}
|
|
3539
3580
|
return val;
|
|
3540
3581
|
}).pipe(
|
|
3541
|
-
|
|
3582
|
+
z168.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3542
3583
|
);
|
|
3543
|
-
var simulation_dc_current_source =
|
|
3544
|
-
type:
|
|
3584
|
+
var simulation_dc_current_source = z168.object({
|
|
3585
|
+
type: z168.literal("simulation_current_source"),
|
|
3545
3586
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3546
3587
|
"simulation_current_source"
|
|
3547
3588
|
),
|
|
3548
|
-
is_dc_source:
|
|
3549
|
-
positive_source_port_id:
|
|
3550
|
-
negative_source_port_id:
|
|
3551
|
-
positive_source_net_id:
|
|
3552
|
-
negative_source_net_id:
|
|
3589
|
+
is_dc_source: z168.literal(true).optional().default(true),
|
|
3590
|
+
positive_source_port_id: z168.string().optional(),
|
|
3591
|
+
negative_source_port_id: z168.string().optional(),
|
|
3592
|
+
positive_source_net_id: z168.string().optional(),
|
|
3593
|
+
negative_source_net_id: z168.string().optional(),
|
|
3553
3594
|
current
|
|
3554
3595
|
}).describe("Defines a DC current source for simulation");
|
|
3555
|
-
var simulation_ac_current_source =
|
|
3556
|
-
type:
|
|
3596
|
+
var simulation_ac_current_source = z168.object({
|
|
3597
|
+
type: z168.literal("simulation_current_source"),
|
|
3557
3598
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3558
3599
|
"simulation_current_source"
|
|
3559
3600
|
),
|
|
3560
|
-
is_dc_source:
|
|
3561
|
-
terminal1_source_port_id:
|
|
3562
|
-
terminal2_source_port_id:
|
|
3563
|
-
terminal1_source_net_id:
|
|
3564
|
-
terminal2_source_net_id:
|
|
3601
|
+
is_dc_source: z168.literal(false),
|
|
3602
|
+
terminal1_source_port_id: z168.string().optional(),
|
|
3603
|
+
terminal2_source_port_id: z168.string().optional(),
|
|
3604
|
+
terminal1_source_net_id: z168.string().optional(),
|
|
3605
|
+
terminal2_source_net_id: z168.string().optional(),
|
|
3565
3606
|
current: current.optional(),
|
|
3566
3607
|
frequency: frequency.optional(),
|
|
3567
3608
|
peak_to_peak_current: current.optional(),
|
|
@@ -3569,31 +3610,31 @@ var simulation_ac_current_source = z166.object({
|
|
|
3569
3610
|
phase: rotation.optional(),
|
|
3570
3611
|
duty_cycle: percentage2.optional()
|
|
3571
3612
|
}).describe("Defines an AC current source for simulation");
|
|
3572
|
-
var simulation_current_source =
|
|
3613
|
+
var simulation_current_source = z168.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
3573
3614
|
expectTypesMatch(true);
|
|
3574
3615
|
expectTypesMatch(true);
|
|
3575
3616
|
expectTypesMatch(true);
|
|
3576
3617
|
|
|
3577
3618
|
// src/simulation/simulation_experiment.ts
|
|
3578
|
-
import { z as
|
|
3579
|
-
var experiment_type =
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3619
|
+
import { z as z169 } from "zod";
|
|
3620
|
+
var experiment_type = z169.union([
|
|
3621
|
+
z169.literal("spice_dc_sweep"),
|
|
3622
|
+
z169.literal("spice_dc_operating_point"),
|
|
3623
|
+
z169.literal("spice_transient_analysis"),
|
|
3624
|
+
z169.literal("spice_ac_analysis")
|
|
3584
3625
|
]);
|
|
3585
|
-
var spice_simulation_options =
|
|
3586
|
-
method:
|
|
3587
|
-
reltol:
|
|
3588
|
-
abstol:
|
|
3589
|
-
vntol:
|
|
3626
|
+
var spice_simulation_options = z169.object({
|
|
3627
|
+
method: z169.enum(["trap", "gear"]).optional(),
|
|
3628
|
+
reltol: z169.union([z169.number(), z169.string()]).optional(),
|
|
3629
|
+
abstol: z169.union([z169.number(), z169.string()]).optional(),
|
|
3630
|
+
vntol: z169.union([z169.number(), z169.string()]).optional()
|
|
3590
3631
|
}).describe("SPICE solver options for a simulation experiment");
|
|
3591
|
-
var simulation_experiment =
|
|
3592
|
-
type:
|
|
3632
|
+
var simulation_experiment = z169.object({
|
|
3633
|
+
type: z169.literal("simulation_experiment"),
|
|
3593
3634
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
3594
3635
|
"simulation_experiment"
|
|
3595
3636
|
),
|
|
3596
|
-
name:
|
|
3637
|
+
name: z169.string(),
|
|
3597
3638
|
experiment_type,
|
|
3598
3639
|
time_per_step: duration_ms.optional(),
|
|
3599
3640
|
start_time_ms: ms.optional(),
|
|
@@ -3603,73 +3644,73 @@ var simulation_experiment = z167.object({
|
|
|
3603
3644
|
expectTypesMatch(true);
|
|
3604
3645
|
|
|
3605
3646
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
3606
|
-
import { z as
|
|
3607
|
-
var simulation_transient_voltage_graph =
|
|
3608
|
-
type:
|
|
3647
|
+
import { z as z170 } from "zod";
|
|
3648
|
+
var simulation_transient_voltage_graph = z170.object({
|
|
3649
|
+
type: z170.literal("simulation_transient_voltage_graph"),
|
|
3609
3650
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
3610
3651
|
"simulation_transient_voltage_graph"
|
|
3611
3652
|
),
|
|
3612
|
-
simulation_experiment_id:
|
|
3613
|
-
timestamps_ms:
|
|
3614
|
-
voltage_levels:
|
|
3615
|
-
source_component_id:
|
|
3616
|
-
subcircuit_connectivity_map_key:
|
|
3653
|
+
simulation_experiment_id: z170.string(),
|
|
3654
|
+
timestamps_ms: z170.array(z170.number()).optional(),
|
|
3655
|
+
voltage_levels: z170.array(z170.number()),
|
|
3656
|
+
source_component_id: z170.string().optional(),
|
|
3657
|
+
subcircuit_connectivity_map_key: z170.string().optional(),
|
|
3617
3658
|
time_per_step: duration_ms,
|
|
3618
3659
|
start_time_ms: ms,
|
|
3619
3660
|
end_time_ms: ms,
|
|
3620
|
-
name:
|
|
3621
|
-
color:
|
|
3661
|
+
name: z170.string().optional(),
|
|
3662
|
+
color: z170.string().optional()
|
|
3622
3663
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
3623
3664
|
expectTypesMatch(true);
|
|
3624
3665
|
|
|
3625
3666
|
// src/simulation/simulation_transient_current_graph.ts
|
|
3626
|
-
import { z as
|
|
3627
|
-
var simulation_transient_current_graph =
|
|
3628
|
-
type:
|
|
3667
|
+
import { z as z171 } from "zod";
|
|
3668
|
+
var simulation_transient_current_graph = z171.object({
|
|
3669
|
+
type: z171.literal("simulation_transient_current_graph"),
|
|
3629
3670
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
3630
3671
|
"simulation_transient_current_graph"
|
|
3631
3672
|
),
|
|
3632
|
-
simulation_experiment_id:
|
|
3633
|
-
timestamps_ms:
|
|
3634
|
-
current_levels:
|
|
3635
|
-
source_component_id:
|
|
3636
|
-
subcircuit_connectivity_map_key:
|
|
3673
|
+
simulation_experiment_id: z171.string(),
|
|
3674
|
+
timestamps_ms: z171.array(z171.number()).optional(),
|
|
3675
|
+
current_levels: z171.array(z171.number()),
|
|
3676
|
+
source_component_id: z171.string().optional(),
|
|
3677
|
+
subcircuit_connectivity_map_key: z171.string().optional(),
|
|
3637
3678
|
time_per_step: duration_ms,
|
|
3638
3679
|
start_time_ms: ms,
|
|
3639
3680
|
end_time_ms: ms,
|
|
3640
|
-
name:
|
|
3641
|
-
color:
|
|
3681
|
+
name: z171.string().optional(),
|
|
3682
|
+
color: z171.string().optional()
|
|
3642
3683
|
}).describe("Stores current measurements over time for a simulation");
|
|
3643
3684
|
expectTypesMatch(true);
|
|
3644
3685
|
|
|
3645
3686
|
// src/simulation/simulation_switch.ts
|
|
3646
|
-
import { z as
|
|
3647
|
-
var simulation_switch =
|
|
3648
|
-
type:
|
|
3687
|
+
import { z as z172 } from "zod";
|
|
3688
|
+
var simulation_switch = z172.object({
|
|
3689
|
+
type: z172.literal("simulation_switch"),
|
|
3649
3690
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
3650
|
-
source_component_id:
|
|
3691
|
+
source_component_id: z172.string().optional(),
|
|
3651
3692
|
closes_at: ms.optional(),
|
|
3652
3693
|
opens_at: ms.optional(),
|
|
3653
|
-
starts_closed:
|
|
3694
|
+
starts_closed: z172.boolean().optional(),
|
|
3654
3695
|
switching_frequency: frequency.optional()
|
|
3655
3696
|
}).describe("Defines a switch for simulation timing control");
|
|
3656
3697
|
expectTypesMatch(true);
|
|
3657
3698
|
|
|
3658
3699
|
// src/simulation/simulation_voltage_probe.ts
|
|
3659
|
-
import { z as
|
|
3660
|
-
var simulation_voltage_probe =
|
|
3661
|
-
type:
|
|
3700
|
+
import { z as z173 } from "zod";
|
|
3701
|
+
var simulation_voltage_probe = z173.object({
|
|
3702
|
+
type: z173.literal("simulation_voltage_probe"),
|
|
3662
3703
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
3663
3704
|
"simulation_voltage_probe"
|
|
3664
3705
|
),
|
|
3665
|
-
source_component_id:
|
|
3666
|
-
name:
|
|
3667
|
-
signal_input_source_port_id:
|
|
3668
|
-
signal_input_source_net_id:
|
|
3669
|
-
reference_input_source_port_id:
|
|
3670
|
-
reference_input_source_net_id:
|
|
3671
|
-
subcircuit_id:
|
|
3672
|
-
color:
|
|
3706
|
+
source_component_id: z173.string().optional(),
|
|
3707
|
+
name: z173.string().optional(),
|
|
3708
|
+
signal_input_source_port_id: z173.string().optional(),
|
|
3709
|
+
signal_input_source_net_id: z173.string().optional(),
|
|
3710
|
+
reference_input_source_port_id: z173.string().optional(),
|
|
3711
|
+
reference_input_source_net_id: z173.string().optional(),
|
|
3712
|
+
subcircuit_id: z173.string().optional(),
|
|
3713
|
+
color: z173.string().optional()
|
|
3673
3714
|
}).describe(
|
|
3674
3715
|
"Defines a voltage probe for simulation. If a reference input is not provided, it measures against ground. If a reference input is provided, it measures the differential voltage between two points."
|
|
3675
3716
|
).superRefine((data, ctx) => {
|
|
@@ -3679,20 +3720,20 @@ var simulation_voltage_probe = z171.object({
|
|
|
3679
3720
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
3680
3721
|
if (has_ports && has_nets) {
|
|
3681
3722
|
ctx.addIssue({
|
|
3682
|
-
code:
|
|
3723
|
+
code: z173.ZodIssueCode.custom,
|
|
3683
3724
|
message: "Cannot mix port and net connections in a differential probe."
|
|
3684
3725
|
});
|
|
3685
3726
|
} else if (has_ports) {
|
|
3686
3727
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
3687
3728
|
ctx.addIssue({
|
|
3688
|
-
code:
|
|
3729
|
+
code: z173.ZodIssueCode.custom,
|
|
3689
3730
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
3690
3731
|
});
|
|
3691
3732
|
}
|
|
3692
3733
|
} else if (has_nets) {
|
|
3693
3734
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
3694
3735
|
ctx.addIssue({
|
|
3695
|
-
code:
|
|
3736
|
+
code: z173.ZodIssueCode.custom,
|
|
3696
3737
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
3697
3738
|
});
|
|
3698
3739
|
}
|
|
@@ -3700,7 +3741,7 @@ var simulation_voltage_probe = z171.object({
|
|
|
3700
3741
|
} else {
|
|
3701
3742
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
3702
3743
|
ctx.addIssue({
|
|
3703
|
-
code:
|
|
3744
|
+
code: z173.ZodIssueCode.custom,
|
|
3704
3745
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
3705
3746
|
});
|
|
3706
3747
|
}
|
|
@@ -3709,20 +3750,20 @@ var simulation_voltage_probe = z171.object({
|
|
|
3709
3750
|
expectTypesMatch(true);
|
|
3710
3751
|
|
|
3711
3752
|
// src/simulation/simulation_current_probe.ts
|
|
3712
|
-
import { z as
|
|
3713
|
-
var simulation_current_probe =
|
|
3714
|
-
type:
|
|
3753
|
+
import { z as z174 } from "zod";
|
|
3754
|
+
var simulation_current_probe = z174.object({
|
|
3755
|
+
type: z174.literal("simulation_current_probe"),
|
|
3715
3756
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
3716
3757
|
"simulation_current_probe"
|
|
3717
3758
|
),
|
|
3718
|
-
source_component_id:
|
|
3719
|
-
name:
|
|
3720
|
-
positive_source_port_id:
|
|
3721
|
-
negative_source_port_id:
|
|
3722
|
-
positive_source_net_id:
|
|
3723
|
-
negative_source_net_id:
|
|
3724
|
-
subcircuit_id:
|
|
3725
|
-
color:
|
|
3759
|
+
source_component_id: z174.string().optional(),
|
|
3760
|
+
name: z174.string().optional(),
|
|
3761
|
+
positive_source_port_id: z174.string().optional(),
|
|
3762
|
+
negative_source_port_id: z174.string().optional(),
|
|
3763
|
+
positive_source_net_id: z174.string().optional(),
|
|
3764
|
+
negative_source_net_id: z174.string().optional(),
|
|
3765
|
+
subcircuit_id: z174.string().optional(),
|
|
3766
|
+
color: z174.string().optional()
|
|
3726
3767
|
}).describe(
|
|
3727
3768
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
3728
3769
|
).superRefine((data, ctx) => {
|
|
@@ -3734,7 +3775,7 @@ var simulation_current_probe = z172.object({
|
|
|
3734
3775
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
3735
3776
|
if (hasPorts && hasNets) {
|
|
3736
3777
|
ctx.addIssue({
|
|
3737
|
-
code:
|
|
3778
|
+
code: z174.ZodIssueCode.custom,
|
|
3738
3779
|
message: "Cannot mix port and net connections in a current probe."
|
|
3739
3780
|
});
|
|
3740
3781
|
return;
|
|
@@ -3742,7 +3783,7 @@ var simulation_current_probe = z172.object({
|
|
|
3742
3783
|
if (hasPorts) {
|
|
3743
3784
|
if (!hasPositivePort || !hasNegativePort) {
|
|
3744
3785
|
ctx.addIssue({
|
|
3745
|
-
code:
|
|
3786
|
+
code: z174.ZodIssueCode.custom,
|
|
3746
3787
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
3747
3788
|
});
|
|
3748
3789
|
}
|
|
@@ -3751,79 +3792,79 @@ var simulation_current_probe = z172.object({
|
|
|
3751
3792
|
if (hasNets) {
|
|
3752
3793
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
3753
3794
|
ctx.addIssue({
|
|
3754
|
-
code:
|
|
3795
|
+
code: z174.ZodIssueCode.custom,
|
|
3755
3796
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
3756
3797
|
});
|
|
3757
3798
|
}
|
|
3758
3799
|
return;
|
|
3759
3800
|
}
|
|
3760
3801
|
ctx.addIssue({
|
|
3761
|
-
code:
|
|
3802
|
+
code: z174.ZodIssueCode.custom,
|
|
3762
3803
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
3763
3804
|
});
|
|
3764
3805
|
});
|
|
3765
3806
|
expectTypesMatch(true);
|
|
3766
3807
|
|
|
3767
3808
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
3768
|
-
import { z as
|
|
3809
|
+
import { z as z175 } from "zod";
|
|
3769
3810
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
3770
|
-
type:
|
|
3811
|
+
type: z175.literal("simulation_unknown_experiment_error"),
|
|
3771
3812
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
3772
3813
|
"simulation_unknown_experiment_error"
|
|
3773
3814
|
),
|
|
3774
|
-
error_type:
|
|
3775
|
-
simulation_experiment_id:
|
|
3776
|
-
subcircuit_id:
|
|
3815
|
+
error_type: z175.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
3816
|
+
simulation_experiment_id: z175.string().optional(),
|
|
3817
|
+
subcircuit_id: z175.string().optional()
|
|
3777
3818
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
3778
3819
|
expectTypesMatch(true);
|
|
3779
3820
|
|
|
3780
3821
|
// src/simulation/simulation_op_amp.ts
|
|
3781
|
-
import { z as
|
|
3782
|
-
var simulation_op_amp =
|
|
3783
|
-
type:
|
|
3822
|
+
import { z as z176 } from "zod";
|
|
3823
|
+
var simulation_op_amp = z176.object({
|
|
3824
|
+
type: z176.literal("simulation_op_amp"),
|
|
3784
3825
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
3785
|
-
source_component_id:
|
|
3786
|
-
inverting_input_source_port_id:
|
|
3787
|
-
non_inverting_input_source_port_id:
|
|
3788
|
-
output_source_port_id:
|
|
3789
|
-
positive_supply_source_port_id:
|
|
3790
|
-
negative_supply_source_port_id:
|
|
3826
|
+
source_component_id: z176.string().optional(),
|
|
3827
|
+
inverting_input_source_port_id: z176.string(),
|
|
3828
|
+
non_inverting_input_source_port_id: z176.string(),
|
|
3829
|
+
output_source_port_id: z176.string(),
|
|
3830
|
+
positive_supply_source_port_id: z176.string(),
|
|
3831
|
+
negative_supply_source_port_id: z176.string()
|
|
3791
3832
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
3792
3833
|
expectTypesMatch(true);
|
|
3793
3834
|
|
|
3794
3835
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
3795
|
-
import { z as
|
|
3796
|
-
var simulation_spice_subcircuit =
|
|
3797
|
-
type:
|
|
3836
|
+
import { z as z177 } from "zod";
|
|
3837
|
+
var simulation_spice_subcircuit = z177.object({
|
|
3838
|
+
type: z177.literal("simulation_spice_subcircuit"),
|
|
3798
3839
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
3799
3840
|
"simulation_spice_subcircuit"
|
|
3800
3841
|
),
|
|
3801
|
-
source_component_id:
|
|
3802
|
-
spice_pin_to_source_port_map:
|
|
3803
|
-
subcircuit_source:
|
|
3842
|
+
source_component_id: z177.string(),
|
|
3843
|
+
spice_pin_to_source_port_map: z177.record(z177.string(), z177.string()),
|
|
3844
|
+
subcircuit_source: z177.string()
|
|
3804
3845
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
3805
3846
|
expectTypesMatch(
|
|
3806
3847
|
true
|
|
3807
3848
|
);
|
|
3808
3849
|
|
|
3809
3850
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
3810
|
-
import { z as
|
|
3851
|
+
import { z as z178 } from "zod";
|
|
3811
3852
|
var hasValue = (value) => value !== void 0;
|
|
3812
|
-
var simulation_oscilloscope_trace =
|
|
3813
|
-
type:
|
|
3853
|
+
var simulation_oscilloscope_trace = z178.object({
|
|
3854
|
+
type: z178.literal("simulation_oscilloscope_trace"),
|
|
3814
3855
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
3815
3856
|
"simulation_oscilloscope_trace"
|
|
3816
3857
|
),
|
|
3817
|
-
simulation_transient_voltage_graph_id:
|
|
3818
|
-
simulation_transient_current_graph_id:
|
|
3819
|
-
simulation_voltage_probe_id:
|
|
3820
|
-
simulation_current_probe_id:
|
|
3821
|
-
display_name:
|
|
3822
|
-
color:
|
|
3823
|
-
display_center_value:
|
|
3824
|
-
display_center_offset_divs:
|
|
3825
|
-
volts_per_div:
|
|
3826
|
-
amps_per_div:
|
|
3858
|
+
simulation_transient_voltage_graph_id: z178.string().optional(),
|
|
3859
|
+
simulation_transient_current_graph_id: z178.string().optional(),
|
|
3860
|
+
simulation_voltage_probe_id: z178.string().optional(),
|
|
3861
|
+
simulation_current_probe_id: z178.string().optional(),
|
|
3862
|
+
display_name: z178.string().optional(),
|
|
3863
|
+
color: z178.string().optional(),
|
|
3864
|
+
display_center_value: z178.number().optional(),
|
|
3865
|
+
display_center_offset_divs: z178.number().optional(),
|
|
3866
|
+
volts_per_div: z178.number().positive().optional(),
|
|
3867
|
+
amps_per_div: z178.number().positive().optional()
|
|
3827
3868
|
}).describe(
|
|
3828
3869
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
3829
3870
|
).superRefine((data, ctx) => {
|
|
@@ -3837,19 +3878,19 @@ var simulation_oscilloscope_trace = z176.object({
|
|
|
3837
3878
|
].filter(hasValue).length;
|
|
3838
3879
|
if (voltageReferences + currentReferences !== 1) {
|
|
3839
3880
|
ctx.addIssue({
|
|
3840
|
-
code:
|
|
3881
|
+
code: z178.ZodIssueCode.custom,
|
|
3841
3882
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
3842
3883
|
});
|
|
3843
3884
|
}
|
|
3844
3885
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
3845
3886
|
ctx.addIssue({
|
|
3846
|
-
code:
|
|
3887
|
+
code: z178.ZodIssueCode.custom,
|
|
3847
3888
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
3848
3889
|
});
|
|
3849
3890
|
}
|
|
3850
3891
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
3851
3892
|
ctx.addIssue({
|
|
3852
|
-
code:
|
|
3893
|
+
code: z178.ZodIssueCode.custom,
|
|
3853
3894
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
3854
3895
|
});
|
|
3855
3896
|
}
|
|
@@ -3857,8 +3898,8 @@ var simulation_oscilloscope_trace = z176.object({
|
|
|
3857
3898
|
expectTypesMatch(true);
|
|
3858
3899
|
|
|
3859
3900
|
// src/any_circuit_element.ts
|
|
3860
|
-
import { z as
|
|
3861
|
-
var any_circuit_element =
|
|
3901
|
+
import { z as z179 } from "zod";
|
|
3902
|
+
var any_circuit_element = z179.union([
|
|
3862
3903
|
source_trace,
|
|
3863
3904
|
source_port,
|
|
3864
3905
|
source_component_internal_connection,
|
|
@@ -3892,6 +3933,7 @@ var any_circuit_element = z177.union([
|
|
|
3892
3933
|
source_pin_missing_trace_warning,
|
|
3893
3934
|
source_unnamed_trace_warning,
|
|
3894
3935
|
source_missing_manufacturer_part_number_warning,
|
|
3936
|
+
source_refdes_convention_warning,
|
|
3895
3937
|
source_no_power_pin_defined_warning,
|
|
3896
3938
|
source_no_ground_pin_defined_warning,
|
|
3897
3939
|
source_component_pins_underspecified_warning,
|
|
@@ -3916,6 +3958,7 @@ var any_circuit_element = z177.union([
|
|
|
3916
3958
|
pcb_text,
|
|
3917
3959
|
pcb_trace,
|
|
3918
3960
|
pcb_trace_warning,
|
|
3961
|
+
pcb_trace_too_long_warning,
|
|
3919
3962
|
pcb_via,
|
|
3920
3963
|
pcb_smtpad,
|
|
3921
3964
|
pcb_solder_paste,
|
|
@@ -4133,6 +4176,7 @@ export {
|
|
|
4133
4176
|
pcb_trace_route_point_through_pad,
|
|
4134
4177
|
pcb_trace_route_point_via,
|
|
4135
4178
|
pcb_trace_route_point_wire,
|
|
4179
|
+
pcb_trace_too_long_warning,
|
|
4136
4180
|
pcb_trace_warning,
|
|
4137
4181
|
pcb_via,
|
|
4138
4182
|
pcb_via_clearance_error,
|
|
@@ -4217,6 +4261,7 @@ export {
|
|
|
4217
4261
|
source_port,
|
|
4218
4262
|
source_project_metadata,
|
|
4219
4263
|
source_property_ignored_warning,
|
|
4264
|
+
source_refdes_convention_warning,
|
|
4220
4265
|
source_simple_ammeter,
|
|
4221
4266
|
source_simple_battery,
|
|
4222
4267
|
source_simple_capacitor,
|