circuit-json 0.0.445 → 0.0.446
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +218 -2
- package/dist/index.mjs +1491 -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,173 @@ 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
|
|
|
2261
2282
|
// src/pcb/pcb_trace_error.ts
|
|
2262
|
-
import { z as
|
|
2283
|
+
import { z as z107 } from "zod";
|
|
2263
2284
|
var pcb_trace_error = base_circuit_json_error.extend({
|
|
2264
|
-
type:
|
|
2285
|
+
type: z107.literal("pcb_trace_error"),
|
|
2265
2286
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
2266
|
-
error_type:
|
|
2287
|
+
error_type: z107.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
2267
2288
|
center: point.optional(),
|
|
2268
|
-
pcb_trace_id:
|
|
2269
|
-
source_trace_id:
|
|
2270
|
-
pcb_component_ids:
|
|
2271
|
-
pcb_port_ids:
|
|
2272
|
-
subcircuit_id:
|
|
2289
|
+
pcb_trace_id: z107.string(),
|
|
2290
|
+
source_trace_id: z107.string(),
|
|
2291
|
+
pcb_component_ids: z107.array(z107.string()),
|
|
2292
|
+
pcb_port_ids: z107.array(z107.string()),
|
|
2293
|
+
subcircuit_id: z107.string().optional()
|
|
2273
2294
|
}).describe("Defines a trace error on the PCB");
|
|
2274
2295
|
expectTypesMatch(true);
|
|
2275
2296
|
|
|
2276
2297
|
// src/pcb/pcb_trace_missing_error.ts
|
|
2277
|
-
import { z as
|
|
2298
|
+
import { z as z108 } from "zod";
|
|
2278
2299
|
var pcb_trace_missing_error = base_circuit_json_error.extend({
|
|
2279
|
-
type:
|
|
2300
|
+
type: z108.literal("pcb_trace_missing_error"),
|
|
2280
2301
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
2281
2302
|
"pcb_trace_missing_error"
|
|
2282
2303
|
),
|
|
2283
|
-
error_type:
|
|
2304
|
+
error_type: z108.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
2284
2305
|
center: point.optional(),
|
|
2285
|
-
source_trace_id:
|
|
2286
|
-
pcb_component_ids:
|
|
2287
|
-
pcb_port_ids:
|
|
2288
|
-
subcircuit_id:
|
|
2306
|
+
source_trace_id: z108.string(),
|
|
2307
|
+
pcb_component_ids: z108.array(z108.string()),
|
|
2308
|
+
pcb_port_ids: z108.array(z108.string()),
|
|
2309
|
+
subcircuit_id: z108.string().optional()
|
|
2289
2310
|
}).describe(
|
|
2290
2311
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
2291
2312
|
);
|
|
2292
2313
|
expectTypesMatch(true);
|
|
2293
2314
|
|
|
2294
2315
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
2295
|
-
import { z as
|
|
2316
|
+
import { z as z109 } from "zod";
|
|
2296
2317
|
var pcb_port_not_matched_error = base_circuit_json_error.extend({
|
|
2297
|
-
type:
|
|
2318
|
+
type: z109.literal("pcb_port_not_matched_error"),
|
|
2298
2319
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2299
|
-
error_type:
|
|
2300
|
-
pcb_component_ids:
|
|
2301
|
-
subcircuit_id:
|
|
2320
|
+
error_type: z109.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
2321
|
+
pcb_component_ids: z109.array(z109.string()),
|
|
2322
|
+
subcircuit_id: z109.string().optional()
|
|
2302
2323
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
2303
2324
|
expectTypesMatch(true);
|
|
2304
2325
|
|
|
2305
2326
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
2306
|
-
import { z as
|
|
2327
|
+
import { z as z110 } from "zod";
|
|
2307
2328
|
var pcb_port_not_connected_error = base_circuit_json_error.extend({
|
|
2308
|
-
type:
|
|
2329
|
+
type: z110.literal("pcb_port_not_connected_error"),
|
|
2309
2330
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
2310
2331
|
"pcb_port_not_connected_error"
|
|
2311
2332
|
),
|
|
2312
|
-
error_type:
|
|
2313
|
-
pcb_port_ids:
|
|
2314
|
-
pcb_component_ids:
|
|
2315
|
-
subcircuit_id:
|
|
2333
|
+
error_type: z110.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
2334
|
+
pcb_port_ids: z110.array(z110.string()),
|
|
2335
|
+
pcb_component_ids: z110.array(z110.string()),
|
|
2336
|
+
subcircuit_id: z110.string().optional()
|
|
2316
2337
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
2317
2338
|
expectTypesMatch(
|
|
2318
2339
|
true
|
|
2319
2340
|
);
|
|
2320
2341
|
|
|
2321
2342
|
// src/pcb/pcb_net.ts
|
|
2322
|
-
import { z as
|
|
2323
|
-
var pcb_net =
|
|
2324
|
-
type:
|
|
2343
|
+
import { z as z111 } from "zod";
|
|
2344
|
+
var pcb_net = z111.object({
|
|
2345
|
+
type: z111.literal("pcb_net"),
|
|
2325
2346
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
2326
|
-
source_net_id:
|
|
2327
|
-
highlight_color:
|
|
2347
|
+
source_net_id: z111.string().optional(),
|
|
2348
|
+
highlight_color: z111.string().optional()
|
|
2328
2349
|
}).describe("Defines a net on the PCB");
|
|
2329
2350
|
expectTypesMatch(true);
|
|
2330
2351
|
|
|
2331
2352
|
// src/pcb/pcb_via.ts
|
|
2332
|
-
import { z as
|
|
2333
|
-
var pcb_via =
|
|
2334
|
-
type:
|
|
2353
|
+
import { z as z112 } from "zod";
|
|
2354
|
+
var pcb_via = z112.object({
|
|
2355
|
+
type: z112.literal("pcb_via"),
|
|
2335
2356
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
2336
|
-
pcb_group_id:
|
|
2337
|
-
subcircuit_id:
|
|
2338
|
-
subcircuit_connectivity_map_key:
|
|
2357
|
+
pcb_group_id: z112.string().optional(),
|
|
2358
|
+
subcircuit_id: z112.string().optional(),
|
|
2359
|
+
subcircuit_connectivity_map_key: z112.string().optional(),
|
|
2339
2360
|
x: distance,
|
|
2340
2361
|
y: distance,
|
|
2341
2362
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -2344,103 +2365,103 @@ var pcb_via = z111.object({
|
|
|
2344
2365
|
from_layer: layer_ref.optional(),
|
|
2345
2366
|
/** @deprecated */
|
|
2346
2367
|
to_layer: layer_ref.optional(),
|
|
2347
|
-
layers:
|
|
2348
|
-
pcb_trace_id:
|
|
2349
|
-
net_is_assignable:
|
|
2350
|
-
net_assigned:
|
|
2351
|
-
is_tented:
|
|
2368
|
+
layers: z112.array(layer_ref),
|
|
2369
|
+
pcb_trace_id: z112.string().optional(),
|
|
2370
|
+
net_is_assignable: z112.boolean().optional(),
|
|
2371
|
+
net_assigned: z112.boolean().optional(),
|
|
2372
|
+
is_tented: z112.boolean().optional()
|
|
2352
2373
|
}).describe("Defines a via on the PCB");
|
|
2353
2374
|
expectTypesMatch(true);
|
|
2354
2375
|
|
|
2355
2376
|
// src/pcb/pcb_board.ts
|
|
2356
|
-
import { z as
|
|
2357
|
-
var pcb_board =
|
|
2358
|
-
type:
|
|
2377
|
+
import { z as z113 } from "zod";
|
|
2378
|
+
var pcb_board = z113.object({
|
|
2379
|
+
type: z113.literal("pcb_board"),
|
|
2359
2380
|
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:
|
|
2381
|
+
pcb_panel_id: z113.string().optional(),
|
|
2382
|
+
carrier_pcb_board_id: z113.string().optional(),
|
|
2383
|
+
is_subcircuit: z113.boolean().optional(),
|
|
2384
|
+
subcircuit_id: z113.string().optional(),
|
|
2385
|
+
is_mounted_to_carrier_board: z113.boolean().optional(),
|
|
2365
2386
|
width: length.optional(),
|
|
2366
2387
|
height: length.optional(),
|
|
2367
2388
|
center: point,
|
|
2368
|
-
display_offset_x:
|
|
2389
|
+
display_offset_x: z113.string().optional().describe(
|
|
2369
2390
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
2370
2391
|
),
|
|
2371
|
-
display_offset_y:
|
|
2392
|
+
display_offset_y: z113.string().optional().describe(
|
|
2372
2393
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
2373
2394
|
),
|
|
2374
2395
|
thickness: length.optional().default(1.4),
|
|
2375
|
-
num_layers:
|
|
2376
|
-
outline:
|
|
2377
|
-
shape:
|
|
2378
|
-
material:
|
|
2379
|
-
solder_mask_color:
|
|
2380
|
-
silkscreen_color:
|
|
2396
|
+
num_layers: z113.number().optional().default(4),
|
|
2397
|
+
outline: z113.array(point).optional(),
|
|
2398
|
+
shape: z113.enum(["rect", "polygon"]).optional(),
|
|
2399
|
+
material: z113.enum(["fr4", "fr1"]).default("fr4"),
|
|
2400
|
+
solder_mask_color: z113.string().optional(),
|
|
2401
|
+
silkscreen_color: z113.string().optional(),
|
|
2381
2402
|
anchor_position: point.optional(),
|
|
2382
2403
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2383
|
-
position_mode:
|
|
2404
|
+
position_mode: z113.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
2384
2405
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
2385
2406
|
expectTypesMatch(true);
|
|
2386
2407
|
|
|
2387
2408
|
// src/pcb/pcb_panel.ts
|
|
2388
|
-
import { z as
|
|
2389
|
-
var pcb_panel =
|
|
2390
|
-
type:
|
|
2409
|
+
import { z as z114 } from "zod";
|
|
2410
|
+
var pcb_panel = z114.object({
|
|
2411
|
+
type: z114.literal("pcb_panel"),
|
|
2391
2412
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2392
2413
|
width: length,
|
|
2393
2414
|
height: length,
|
|
2394
2415
|
center: point,
|
|
2395
2416
|
thickness: length.optional().default(1.4),
|
|
2396
|
-
covered_with_solder_mask:
|
|
2417
|
+
covered_with_solder_mask: z114.boolean().optional().default(true)
|
|
2397
2418
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2398
2419
|
expectTypesMatch(true);
|
|
2399
2420
|
|
|
2400
2421
|
// src/pcb/pcb_placement_error.ts
|
|
2401
|
-
import { z as
|
|
2422
|
+
import { z as z115 } from "zod";
|
|
2402
2423
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
2403
|
-
type:
|
|
2424
|
+
type: z115.literal("pcb_placement_error"),
|
|
2404
2425
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2405
|
-
error_type:
|
|
2406
|
-
subcircuit_id:
|
|
2426
|
+
error_type: z115.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2427
|
+
subcircuit_id: z115.string().optional()
|
|
2407
2428
|
}).describe("Defines a placement error on the PCB");
|
|
2408
2429
|
expectTypesMatch(true);
|
|
2409
2430
|
|
|
2410
2431
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
2411
|
-
import { z as
|
|
2432
|
+
import { z as z116 } from "zod";
|
|
2412
2433
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
2413
|
-
type:
|
|
2434
|
+
type: z116.literal("pcb_panelization_placement_error"),
|
|
2414
2435
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
2415
2436
|
"pcb_panelization_placement_error"
|
|
2416
2437
|
),
|
|
2417
|
-
error_type:
|
|
2418
|
-
pcb_panel_id:
|
|
2419
|
-
pcb_board_id:
|
|
2420
|
-
subcircuit_id:
|
|
2438
|
+
error_type: z116.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
2439
|
+
pcb_panel_id: z116.string().optional(),
|
|
2440
|
+
pcb_board_id: z116.string().optional(),
|
|
2441
|
+
subcircuit_id: z116.string().optional()
|
|
2421
2442
|
}).describe("Defines a panelization placement error on the PCB");
|
|
2422
2443
|
expectTypesMatch(true);
|
|
2423
2444
|
|
|
2424
2445
|
// src/pcb/pcb_trace_hint.ts
|
|
2425
|
-
import { z as
|
|
2426
|
-
var pcb_trace_hint =
|
|
2427
|
-
type:
|
|
2446
|
+
import { z as z117 } from "zod";
|
|
2447
|
+
var pcb_trace_hint = z117.object({
|
|
2448
|
+
type: z117.literal("pcb_trace_hint"),
|
|
2428
2449
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2429
|
-
pcb_port_id:
|
|
2430
|
-
pcb_component_id:
|
|
2431
|
-
route:
|
|
2432
|
-
subcircuit_id:
|
|
2450
|
+
pcb_port_id: z117.string(),
|
|
2451
|
+
pcb_component_id: z117.string(),
|
|
2452
|
+
route: z117.array(route_hint_point),
|
|
2453
|
+
subcircuit_id: z117.string().optional()
|
|
2433
2454
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2434
2455
|
expectTypesMatch(true);
|
|
2435
2456
|
|
|
2436
2457
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2437
|
-
import { z as
|
|
2438
|
-
var pcb_silkscreen_line =
|
|
2439
|
-
type:
|
|
2458
|
+
import { z as z118 } from "zod";
|
|
2459
|
+
var pcb_silkscreen_line = z118.object({
|
|
2460
|
+
type: z118.literal("pcb_silkscreen_line"),
|
|
2440
2461
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2441
|
-
pcb_component_id:
|
|
2442
|
-
pcb_group_id:
|
|
2443
|
-
subcircuit_id:
|
|
2462
|
+
pcb_component_id: z118.string(),
|
|
2463
|
+
pcb_group_id: z118.string().optional(),
|
|
2464
|
+
subcircuit_id: z118.string().optional(),
|
|
2444
2465
|
stroke_width: distance.default("0.1mm"),
|
|
2445
2466
|
x1: distance,
|
|
2446
2467
|
y1: distance,
|
|
@@ -2451,32 +2472,32 @@ var pcb_silkscreen_line = z117.object({
|
|
|
2451
2472
|
expectTypesMatch(true);
|
|
2452
2473
|
|
|
2453
2474
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2454
|
-
import { z as
|
|
2455
|
-
var pcb_silkscreen_path =
|
|
2456
|
-
type:
|
|
2475
|
+
import { z as z119 } from "zod";
|
|
2476
|
+
var pcb_silkscreen_path = z119.object({
|
|
2477
|
+
type: z119.literal("pcb_silkscreen_path"),
|
|
2457
2478
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2458
|
-
pcb_component_id:
|
|
2459
|
-
pcb_group_id:
|
|
2460
|
-
subcircuit_id:
|
|
2479
|
+
pcb_component_id: z119.string(),
|
|
2480
|
+
pcb_group_id: z119.string().optional(),
|
|
2481
|
+
subcircuit_id: z119.string().optional(),
|
|
2461
2482
|
layer: visible_layer,
|
|
2462
|
-
route:
|
|
2483
|
+
route: z119.array(point),
|
|
2463
2484
|
stroke_width: length
|
|
2464
2485
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2465
2486
|
expectTypesMatch(true);
|
|
2466
2487
|
|
|
2467
2488
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2468
|
-
import { z as
|
|
2469
|
-
var pcb_silkscreen_text =
|
|
2470
|
-
type:
|
|
2489
|
+
import { z as z120 } from "zod";
|
|
2490
|
+
var pcb_silkscreen_text = z120.object({
|
|
2491
|
+
type: z120.literal("pcb_silkscreen_text"),
|
|
2471
2492
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2472
|
-
pcb_group_id:
|
|
2473
|
-
subcircuit_id:
|
|
2474
|
-
font:
|
|
2493
|
+
pcb_group_id: z120.string().optional(),
|
|
2494
|
+
subcircuit_id: z120.string().optional(),
|
|
2495
|
+
font: z120.literal("tscircuit2024").default("tscircuit2024"),
|
|
2475
2496
|
font_size: distance.default("0.2mm"),
|
|
2476
|
-
pcb_component_id:
|
|
2477
|
-
text:
|
|
2478
|
-
is_knockout:
|
|
2479
|
-
knockout_padding:
|
|
2497
|
+
pcb_component_id: z120.string(),
|
|
2498
|
+
text: z120.string(),
|
|
2499
|
+
is_knockout: z120.boolean().default(false).optional(),
|
|
2500
|
+
knockout_padding: z120.object({
|
|
2480
2501
|
left: length,
|
|
2481
2502
|
top: length,
|
|
2482
2503
|
bottom: length,
|
|
@@ -2487,27 +2508,27 @@ var pcb_silkscreen_text = z119.object({
|
|
|
2487
2508
|
bottom: "0.2mm",
|
|
2488
2509
|
right: "0.2mm"
|
|
2489
2510
|
}).optional(),
|
|
2490
|
-
ccw_rotation:
|
|
2511
|
+
ccw_rotation: z120.number().optional(),
|
|
2491
2512
|
layer: layer_ref,
|
|
2492
|
-
is_mirrored:
|
|
2513
|
+
is_mirrored: z120.boolean().default(false).optional(),
|
|
2493
2514
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2494
2515
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2495
2516
|
}).describe("Defines silkscreen text on the PCB");
|
|
2496
2517
|
expectTypesMatch(true);
|
|
2497
2518
|
|
|
2498
2519
|
// src/pcb/pcb_copper_text.ts
|
|
2499
|
-
import { z as
|
|
2500
|
-
var pcb_copper_text =
|
|
2501
|
-
type:
|
|
2520
|
+
import { z as z121 } from "zod";
|
|
2521
|
+
var pcb_copper_text = z121.object({
|
|
2522
|
+
type: z121.literal("pcb_copper_text"),
|
|
2502
2523
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2503
|
-
pcb_group_id:
|
|
2504
|
-
subcircuit_id:
|
|
2505
|
-
font:
|
|
2524
|
+
pcb_group_id: z121.string().optional(),
|
|
2525
|
+
subcircuit_id: z121.string().optional(),
|
|
2526
|
+
font: z121.literal("tscircuit2024").default("tscircuit2024"),
|
|
2506
2527
|
font_size: distance.default("0.2mm"),
|
|
2507
|
-
pcb_component_id:
|
|
2508
|
-
text:
|
|
2509
|
-
is_knockout:
|
|
2510
|
-
knockout_padding:
|
|
2528
|
+
pcb_component_id: z121.string(),
|
|
2529
|
+
text: z121.string(),
|
|
2530
|
+
is_knockout: z121.boolean().default(false).optional(),
|
|
2531
|
+
knockout_padding: z121.object({
|
|
2511
2532
|
left: length,
|
|
2512
2533
|
top: length,
|
|
2513
2534
|
bottom: length,
|
|
@@ -2518,61 +2539,61 @@ var pcb_copper_text = z120.object({
|
|
|
2518
2539
|
bottom: "0.2mm",
|
|
2519
2540
|
right: "0.2mm"
|
|
2520
2541
|
}).optional(),
|
|
2521
|
-
ccw_rotation:
|
|
2542
|
+
ccw_rotation: z121.number().optional(),
|
|
2522
2543
|
layer: layer_ref,
|
|
2523
|
-
is_mirrored:
|
|
2544
|
+
is_mirrored: z121.boolean().default(false).optional(),
|
|
2524
2545
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2525
2546
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2526
2547
|
}).describe("Defines copper text on the PCB");
|
|
2527
2548
|
expectTypesMatch(true);
|
|
2528
2549
|
|
|
2529
2550
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2530
|
-
import { z as
|
|
2531
|
-
var pcb_silkscreen_rect =
|
|
2532
|
-
type:
|
|
2551
|
+
import { z as z122 } from "zod";
|
|
2552
|
+
var pcb_silkscreen_rect = z122.object({
|
|
2553
|
+
type: z122.literal("pcb_silkscreen_rect"),
|
|
2533
2554
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2534
|
-
pcb_component_id:
|
|
2535
|
-
pcb_group_id:
|
|
2536
|
-
subcircuit_id:
|
|
2555
|
+
pcb_component_id: z122.string(),
|
|
2556
|
+
pcb_group_id: z122.string().optional(),
|
|
2557
|
+
subcircuit_id: z122.string().optional(),
|
|
2537
2558
|
center: point,
|
|
2538
2559
|
width: length,
|
|
2539
2560
|
height: length,
|
|
2540
2561
|
layer: layer_ref,
|
|
2541
2562
|
stroke_width: length.default("1mm"),
|
|
2542
2563
|
corner_radius: length.optional(),
|
|
2543
|
-
is_filled:
|
|
2544
|
-
has_stroke:
|
|
2545
|
-
is_stroke_dashed:
|
|
2546
|
-
ccw_rotation:
|
|
2564
|
+
is_filled: z122.boolean().default(true).optional(),
|
|
2565
|
+
has_stroke: z122.boolean().optional(),
|
|
2566
|
+
is_stroke_dashed: z122.boolean().optional(),
|
|
2567
|
+
ccw_rotation: z122.number().optional()
|
|
2547
2568
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2548
2569
|
expectTypesMatch(true);
|
|
2549
2570
|
|
|
2550
2571
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2551
|
-
import { z as
|
|
2552
|
-
var pcb_silkscreen_circle =
|
|
2553
|
-
type:
|
|
2572
|
+
import { z as z123 } from "zod";
|
|
2573
|
+
var pcb_silkscreen_circle = z123.object({
|
|
2574
|
+
type: z123.literal("pcb_silkscreen_circle"),
|
|
2554
2575
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2555
2576
|
"pcb_silkscreen_circle"
|
|
2556
2577
|
),
|
|
2557
|
-
pcb_component_id:
|
|
2558
|
-
pcb_group_id:
|
|
2559
|
-
subcircuit_id:
|
|
2578
|
+
pcb_component_id: z123.string(),
|
|
2579
|
+
pcb_group_id: z123.string().optional(),
|
|
2580
|
+
subcircuit_id: z123.string().optional(),
|
|
2560
2581
|
center: point,
|
|
2561
2582
|
radius: length,
|
|
2562
2583
|
layer: visible_layer,
|
|
2563
2584
|
stroke_width: length.default("1mm"),
|
|
2564
|
-
is_filled:
|
|
2585
|
+
is_filled: z123.boolean().optional()
|
|
2565
2586
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
2566
2587
|
expectTypesMatch(true);
|
|
2567
2588
|
|
|
2568
2589
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2569
|
-
import { z as
|
|
2570
|
-
var pcb_silkscreen_oval =
|
|
2571
|
-
type:
|
|
2590
|
+
import { z as z124 } from "zod";
|
|
2591
|
+
var pcb_silkscreen_oval = z124.object({
|
|
2592
|
+
type: z124.literal("pcb_silkscreen_oval"),
|
|
2572
2593
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2573
|
-
pcb_component_id:
|
|
2574
|
-
pcb_group_id:
|
|
2575
|
-
subcircuit_id:
|
|
2594
|
+
pcb_component_id: z124.string(),
|
|
2595
|
+
pcb_group_id: z124.string().optional(),
|
|
2596
|
+
subcircuit_id: z124.string().optional(),
|
|
2576
2597
|
center: point,
|
|
2577
2598
|
radius_x: distance,
|
|
2578
2599
|
radius_y: distance,
|
|
@@ -2582,265 +2603,265 @@ var pcb_silkscreen_oval = z123.object({
|
|
|
2582
2603
|
expectTypesMatch(true);
|
|
2583
2604
|
|
|
2584
2605
|
// src/pcb/pcb_silkscreen_graphic.ts
|
|
2585
|
-
import { z as
|
|
2586
|
-
var pcb_silkscreen_graphic_base =
|
|
2587
|
-
type:
|
|
2606
|
+
import { z as z125 } from "zod";
|
|
2607
|
+
var pcb_silkscreen_graphic_base = z125.object({
|
|
2608
|
+
type: z125.literal("pcb_silkscreen_graphic"),
|
|
2588
2609
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
2589
2610
|
"pcb_silkscreen_graphic"
|
|
2590
2611
|
),
|
|
2591
|
-
pcb_component_id:
|
|
2592
|
-
pcb_group_id:
|
|
2593
|
-
subcircuit_id:
|
|
2612
|
+
pcb_component_id: z125.string(),
|
|
2613
|
+
pcb_group_id: z125.string().optional(),
|
|
2614
|
+
subcircuit_id: z125.string().optional(),
|
|
2594
2615
|
layer: visible_layer,
|
|
2595
2616
|
image_asset: asset.optional()
|
|
2596
2617
|
});
|
|
2597
2618
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
2598
|
-
shape:
|
|
2619
|
+
shape: z125.literal("brep"),
|
|
2599
2620
|
brep_shape
|
|
2600
2621
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
2601
2622
|
expectTypesMatch(
|
|
2602
2623
|
true
|
|
2603
2624
|
);
|
|
2604
|
-
var pcb_silkscreen_graphic =
|
|
2625
|
+
var pcb_silkscreen_graphic = z125.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
2605
2626
|
expectTypesMatch(true);
|
|
2606
2627
|
|
|
2607
2628
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
2608
|
-
import { z as
|
|
2609
|
-
var pcb_silkscreen_pill =
|
|
2610
|
-
type:
|
|
2629
|
+
import { z as z126 } from "zod";
|
|
2630
|
+
var pcb_silkscreen_pill = z126.object({
|
|
2631
|
+
type: z126.literal("pcb_silkscreen_pill"),
|
|
2611
2632
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
2612
|
-
pcb_component_id:
|
|
2613
|
-
pcb_group_id:
|
|
2614
|
-
subcircuit_id:
|
|
2633
|
+
pcb_component_id: z126.string(),
|
|
2634
|
+
pcb_group_id: z126.string().optional(),
|
|
2635
|
+
subcircuit_id: z126.string().optional(),
|
|
2615
2636
|
center: point,
|
|
2616
2637
|
width: length,
|
|
2617
2638
|
height: length,
|
|
2618
2639
|
layer: layer_ref,
|
|
2619
|
-
ccw_rotation:
|
|
2640
|
+
ccw_rotation: z126.number().optional()
|
|
2620
2641
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
2621
2642
|
expectTypesMatch(true);
|
|
2622
2643
|
|
|
2623
2644
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2624
|
-
import { z as
|
|
2625
|
-
var pcb_fabrication_note_text =
|
|
2626
|
-
type:
|
|
2645
|
+
import { z as z127 } from "zod";
|
|
2646
|
+
var pcb_fabrication_note_text = z127.object({
|
|
2647
|
+
type: z127.literal("pcb_fabrication_note_text"),
|
|
2627
2648
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2628
2649
|
"pcb_fabrication_note_text"
|
|
2629
2650
|
),
|
|
2630
|
-
subcircuit_id:
|
|
2631
|
-
pcb_group_id:
|
|
2632
|
-
font:
|
|
2651
|
+
subcircuit_id: z127.string().optional(),
|
|
2652
|
+
pcb_group_id: z127.string().optional(),
|
|
2653
|
+
font: z127.literal("tscircuit2024").default("tscircuit2024"),
|
|
2633
2654
|
font_size: distance.default("1mm"),
|
|
2634
|
-
pcb_component_id:
|
|
2635
|
-
text:
|
|
2636
|
-
ccw_rotation:
|
|
2655
|
+
pcb_component_id: z127.string(),
|
|
2656
|
+
text: z127.string(),
|
|
2657
|
+
ccw_rotation: z127.number().optional(),
|
|
2637
2658
|
layer: visible_layer,
|
|
2638
2659
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2639
|
-
anchor_alignment:
|
|
2640
|
-
color:
|
|
2660
|
+
anchor_alignment: z127.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2661
|
+
color: z127.string().optional()
|
|
2641
2662
|
}).describe(
|
|
2642
2663
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2643
2664
|
);
|
|
2644
2665
|
expectTypesMatch(true);
|
|
2645
2666
|
|
|
2646
2667
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2647
|
-
import { z as
|
|
2648
|
-
var pcb_fabrication_note_path =
|
|
2649
|
-
type:
|
|
2668
|
+
import { z as z128 } from "zod";
|
|
2669
|
+
var pcb_fabrication_note_path = z128.object({
|
|
2670
|
+
type: z128.literal("pcb_fabrication_note_path"),
|
|
2650
2671
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2651
2672
|
"pcb_fabrication_note_path"
|
|
2652
2673
|
),
|
|
2653
|
-
pcb_component_id:
|
|
2654
|
-
subcircuit_id:
|
|
2674
|
+
pcb_component_id: z128.string(),
|
|
2675
|
+
subcircuit_id: z128.string().optional(),
|
|
2655
2676
|
layer: layer_ref,
|
|
2656
|
-
route:
|
|
2677
|
+
route: z128.array(point),
|
|
2657
2678
|
stroke_width: length,
|
|
2658
|
-
color:
|
|
2679
|
+
color: z128.string().optional()
|
|
2659
2680
|
}).describe(
|
|
2660
2681
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2661
2682
|
);
|
|
2662
2683
|
expectTypesMatch(true);
|
|
2663
2684
|
|
|
2664
2685
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2665
|
-
import { z as
|
|
2666
|
-
var pcb_fabrication_note_rect =
|
|
2667
|
-
type:
|
|
2686
|
+
import { z as z129 } from "zod";
|
|
2687
|
+
var pcb_fabrication_note_rect = z129.object({
|
|
2688
|
+
type: z129.literal("pcb_fabrication_note_rect"),
|
|
2668
2689
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2669
2690
|
"pcb_fabrication_note_rect"
|
|
2670
2691
|
),
|
|
2671
|
-
pcb_component_id:
|
|
2672
|
-
pcb_group_id:
|
|
2673
|
-
subcircuit_id:
|
|
2692
|
+
pcb_component_id: z129.string(),
|
|
2693
|
+
pcb_group_id: z129.string().optional(),
|
|
2694
|
+
subcircuit_id: z129.string().optional(),
|
|
2674
2695
|
center: point,
|
|
2675
2696
|
width: length,
|
|
2676
2697
|
height: length,
|
|
2677
2698
|
layer: visible_layer,
|
|
2678
2699
|
stroke_width: length.default("0.1mm"),
|
|
2679
2700
|
corner_radius: length.optional(),
|
|
2680
|
-
is_filled:
|
|
2681
|
-
has_stroke:
|
|
2682
|
-
is_stroke_dashed:
|
|
2683
|
-
color:
|
|
2701
|
+
is_filled: z129.boolean().optional(),
|
|
2702
|
+
has_stroke: z129.boolean().optional(),
|
|
2703
|
+
is_stroke_dashed: z129.boolean().optional(),
|
|
2704
|
+
color: z129.string().optional()
|
|
2684
2705
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2685
2706
|
expectTypesMatch(true);
|
|
2686
2707
|
|
|
2687
2708
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2688
|
-
import { z as
|
|
2689
|
-
var pcb_fabrication_note_dimension =
|
|
2690
|
-
type:
|
|
2709
|
+
import { z as z130 } from "zod";
|
|
2710
|
+
var pcb_fabrication_note_dimension = z130.object({
|
|
2711
|
+
type: z130.literal("pcb_fabrication_note_dimension"),
|
|
2691
2712
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2692
2713
|
"pcb_fabrication_note_dimension"
|
|
2693
2714
|
),
|
|
2694
|
-
pcb_component_id:
|
|
2695
|
-
pcb_group_id:
|
|
2696
|
-
subcircuit_id:
|
|
2715
|
+
pcb_component_id: z130.string(),
|
|
2716
|
+
pcb_group_id: z130.string().optional(),
|
|
2717
|
+
subcircuit_id: z130.string().optional(),
|
|
2697
2718
|
layer: visible_layer,
|
|
2698
2719
|
from: point,
|
|
2699
2720
|
to: point,
|
|
2700
|
-
text:
|
|
2701
|
-
text_ccw_rotation:
|
|
2721
|
+
text: z130.string().optional(),
|
|
2722
|
+
text_ccw_rotation: z130.number().optional(),
|
|
2702
2723
|
offset: length.optional(),
|
|
2703
2724
|
offset_distance: length.optional(),
|
|
2704
|
-
offset_direction:
|
|
2705
|
-
x:
|
|
2706
|
-
y:
|
|
2725
|
+
offset_direction: z130.object({
|
|
2726
|
+
x: z130.number(),
|
|
2727
|
+
y: z130.number()
|
|
2707
2728
|
}).optional(),
|
|
2708
|
-
font:
|
|
2729
|
+
font: z130.literal("tscircuit2024").default("tscircuit2024"),
|
|
2709
2730
|
font_size: length.default("1mm"),
|
|
2710
|
-
color:
|
|
2731
|
+
color: z130.string().optional(),
|
|
2711
2732
|
arrow_size: length.default("1mm")
|
|
2712
2733
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2713
2734
|
expectTypesMatch(true);
|
|
2714
2735
|
|
|
2715
2736
|
// src/pcb/pcb_note_text.ts
|
|
2716
|
-
import { z as
|
|
2717
|
-
var pcb_note_text =
|
|
2718
|
-
type:
|
|
2737
|
+
import { z as z131 } from "zod";
|
|
2738
|
+
var pcb_note_text = z131.object({
|
|
2739
|
+
type: z131.literal("pcb_note_text"),
|
|
2719
2740
|
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2720
|
-
pcb_component_id:
|
|
2721
|
-
pcb_group_id:
|
|
2722
|
-
subcircuit_id:
|
|
2723
|
-
name:
|
|
2724
|
-
font:
|
|
2741
|
+
pcb_component_id: z131.string().optional(),
|
|
2742
|
+
pcb_group_id: z131.string().optional(),
|
|
2743
|
+
subcircuit_id: z131.string().optional(),
|
|
2744
|
+
name: z131.string().optional(),
|
|
2745
|
+
font: z131.literal("tscircuit2024").default("tscircuit2024"),
|
|
2725
2746
|
font_size: distance.default("1mm"),
|
|
2726
|
-
text:
|
|
2747
|
+
text: z131.string().optional(),
|
|
2727
2748
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2728
|
-
anchor_alignment:
|
|
2749
|
+
anchor_alignment: z131.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2729
2750
|
layer: visible_layer.default("top"),
|
|
2730
|
-
is_mirrored_from_top_view:
|
|
2731
|
-
color:
|
|
2751
|
+
is_mirrored_from_top_view: z131.boolean().optional(),
|
|
2752
|
+
color: z131.string().optional()
|
|
2732
2753
|
}).describe("Defines a documentation note in text on the PCB");
|
|
2733
2754
|
expectTypesMatch(true);
|
|
2734
2755
|
|
|
2735
2756
|
// src/pcb/pcb_note_rect.ts
|
|
2736
|
-
import { z as
|
|
2737
|
-
var pcb_note_rect =
|
|
2738
|
-
type:
|
|
2757
|
+
import { z as z132 } from "zod";
|
|
2758
|
+
var pcb_note_rect = z132.object({
|
|
2759
|
+
type: z132.literal("pcb_note_rect"),
|
|
2739
2760
|
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2740
|
-
pcb_component_id:
|
|
2741
|
-
pcb_group_id:
|
|
2742
|
-
subcircuit_id:
|
|
2743
|
-
name:
|
|
2744
|
-
text:
|
|
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
|
+
text: z132.string().optional(),
|
|
2745
2766
|
center: point,
|
|
2746
2767
|
width: length,
|
|
2747
2768
|
height: length,
|
|
2748
2769
|
layer: visible_layer.default("top"),
|
|
2749
2770
|
stroke_width: length.default("0.1mm"),
|
|
2750
2771
|
corner_radius: length.optional(),
|
|
2751
|
-
is_filled:
|
|
2752
|
-
has_stroke:
|
|
2753
|
-
is_stroke_dashed:
|
|
2754
|
-
color:
|
|
2772
|
+
is_filled: z132.boolean().optional(),
|
|
2773
|
+
has_stroke: z132.boolean().optional(),
|
|
2774
|
+
is_stroke_dashed: z132.boolean().optional(),
|
|
2775
|
+
color: z132.string().optional()
|
|
2755
2776
|
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2756
2777
|
expectTypesMatch(true);
|
|
2757
2778
|
|
|
2758
2779
|
// src/pcb/pcb_note_path.ts
|
|
2759
|
-
import { z as
|
|
2760
|
-
var pcb_note_path =
|
|
2761
|
-
type:
|
|
2780
|
+
import { z as z133 } from "zod";
|
|
2781
|
+
var pcb_note_path = z133.object({
|
|
2782
|
+
type: z133.literal("pcb_note_path"),
|
|
2762
2783
|
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:
|
|
2784
|
+
pcb_component_id: z133.string().optional(),
|
|
2785
|
+
pcb_group_id: z133.string().optional(),
|
|
2786
|
+
subcircuit_id: z133.string().optional(),
|
|
2787
|
+
name: z133.string().optional(),
|
|
2788
|
+
text: z133.string().optional(),
|
|
2789
|
+
route: z133.array(point),
|
|
2769
2790
|
layer: visible_layer.default("top"),
|
|
2770
2791
|
stroke_width: length.default("0.1mm"),
|
|
2771
|
-
color:
|
|
2792
|
+
color: z133.string().optional()
|
|
2772
2793
|
}).describe("Defines a polyline documentation note on the PCB");
|
|
2773
2794
|
expectTypesMatch(true);
|
|
2774
2795
|
|
|
2775
2796
|
// src/pcb/pcb_note_line.ts
|
|
2776
|
-
import { z as
|
|
2777
|
-
var pcb_note_line =
|
|
2778
|
-
type:
|
|
2797
|
+
import { z as z134 } from "zod";
|
|
2798
|
+
var pcb_note_line = z134.object({
|
|
2799
|
+
type: z134.literal("pcb_note_line"),
|
|
2779
2800
|
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2780
|
-
pcb_component_id:
|
|
2781
|
-
pcb_group_id:
|
|
2782
|
-
subcircuit_id:
|
|
2783
|
-
name:
|
|
2784
|
-
text:
|
|
2801
|
+
pcb_component_id: z134.string().optional(),
|
|
2802
|
+
pcb_group_id: z134.string().optional(),
|
|
2803
|
+
subcircuit_id: z134.string().optional(),
|
|
2804
|
+
name: z134.string().optional(),
|
|
2805
|
+
text: z134.string().optional(),
|
|
2785
2806
|
x1: distance,
|
|
2786
2807
|
y1: distance,
|
|
2787
2808
|
x2: distance,
|
|
2788
2809
|
y2: distance,
|
|
2789
2810
|
layer: visible_layer.default("top"),
|
|
2790
2811
|
stroke_width: distance.default("0.1mm"),
|
|
2791
|
-
color:
|
|
2792
|
-
is_dashed:
|
|
2812
|
+
color: z134.string().optional(),
|
|
2813
|
+
is_dashed: z134.boolean().optional()
|
|
2793
2814
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2794
2815
|
expectTypesMatch(true);
|
|
2795
2816
|
|
|
2796
2817
|
// src/pcb/pcb_note_dimension.ts
|
|
2797
|
-
import { z as
|
|
2798
|
-
var pcb_note_dimension =
|
|
2799
|
-
type:
|
|
2818
|
+
import { z as z135 } from "zod";
|
|
2819
|
+
var pcb_note_dimension = z135.object({
|
|
2820
|
+
type: z135.literal("pcb_note_dimension"),
|
|
2800
2821
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2801
|
-
pcb_component_id:
|
|
2802
|
-
pcb_group_id:
|
|
2803
|
-
subcircuit_id:
|
|
2804
|
-
name:
|
|
2822
|
+
pcb_component_id: z135.string().optional(),
|
|
2823
|
+
pcb_group_id: z135.string().optional(),
|
|
2824
|
+
subcircuit_id: z135.string().optional(),
|
|
2825
|
+
name: z135.string().optional(),
|
|
2805
2826
|
from: point,
|
|
2806
2827
|
to: point,
|
|
2807
|
-
text:
|
|
2808
|
-
text_ccw_rotation:
|
|
2828
|
+
text: z135.string().optional(),
|
|
2829
|
+
text_ccw_rotation: z135.number().optional(),
|
|
2809
2830
|
offset_distance: length.optional(),
|
|
2810
|
-
offset_direction:
|
|
2811
|
-
x:
|
|
2812
|
-
y:
|
|
2831
|
+
offset_direction: z135.object({
|
|
2832
|
+
x: z135.number(),
|
|
2833
|
+
y: z135.number()
|
|
2813
2834
|
}).optional(),
|
|
2814
|
-
font:
|
|
2835
|
+
font: z135.literal("tscircuit2024").default("tscircuit2024"),
|
|
2815
2836
|
font_size: length.default("1mm"),
|
|
2816
2837
|
layer: visible_layer.default("top"),
|
|
2817
|
-
color:
|
|
2838
|
+
color: z135.string().optional(),
|
|
2818
2839
|
arrow_size: length.default("1mm")
|
|
2819
2840
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2820
2841
|
expectTypesMatch(true);
|
|
2821
2842
|
|
|
2822
2843
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2823
|
-
import { z as
|
|
2844
|
+
import { z as z136 } from "zod";
|
|
2824
2845
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
2825
|
-
type:
|
|
2846
|
+
type: z136.literal("pcb_footprint_overlap_error"),
|
|
2826
2847
|
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:
|
|
2848
|
+
error_type: z136.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
2849
|
+
pcb_smtpad_ids: z136.array(z136.string()).optional(),
|
|
2850
|
+
pcb_plated_hole_ids: z136.array(z136.string()).optional(),
|
|
2851
|
+
pcb_hole_ids: z136.array(z136.string()).optional(),
|
|
2852
|
+
pcb_keepout_ids: z136.array(z136.string()).optional()
|
|
2832
2853
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2833
2854
|
expectTypesMatch(
|
|
2834
2855
|
true
|
|
2835
2856
|
);
|
|
2836
2857
|
|
|
2837
2858
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
2838
|
-
import { z as
|
|
2859
|
+
import { z as z137 } from "zod";
|
|
2839
2860
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
2840
|
-
type:
|
|
2861
|
+
type: z137.literal("pcb_courtyard_overlap_error"),
|
|
2841
2862
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2842
|
-
error_type:
|
|
2843
|
-
pcb_component_ids:
|
|
2863
|
+
error_type: z137.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
2864
|
+
pcb_component_ids: z137.tuple([z137.string(), z137.string()])
|
|
2844
2865
|
}).describe(
|
|
2845
2866
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
2846
2867
|
);
|
|
@@ -2849,49 +2870,49 @@ expectTypesMatch(
|
|
|
2849
2870
|
);
|
|
2850
2871
|
|
|
2851
2872
|
// src/pcb/pcb_keepout.ts
|
|
2852
|
-
import { z as
|
|
2853
|
-
var pcb_keepout =
|
|
2854
|
-
type:
|
|
2855
|
-
shape:
|
|
2856
|
-
pcb_group_id:
|
|
2857
|
-
subcircuit_id:
|
|
2873
|
+
import { z as z138 } from "zod";
|
|
2874
|
+
var pcb_keepout = z138.object({
|
|
2875
|
+
type: z138.literal("pcb_keepout"),
|
|
2876
|
+
shape: z138.literal("rect"),
|
|
2877
|
+
pcb_group_id: z138.string().optional(),
|
|
2878
|
+
subcircuit_id: z138.string().optional(),
|
|
2858
2879
|
center: point,
|
|
2859
2880
|
width: distance,
|
|
2860
2881
|
height: distance,
|
|
2861
|
-
pcb_keepout_id:
|
|
2862
|
-
layers:
|
|
2882
|
+
pcb_keepout_id: z138.string(),
|
|
2883
|
+
layers: z138.array(z138.string()),
|
|
2863
2884
|
// Specify layers where the keepout applies
|
|
2864
|
-
description:
|
|
2885
|
+
description: z138.string().optional()
|
|
2865
2886
|
// Optional description of the keepout
|
|
2866
2887
|
}).or(
|
|
2867
|
-
|
|
2868
|
-
type:
|
|
2869
|
-
shape:
|
|
2870
|
-
pcb_group_id:
|
|
2871
|
-
subcircuit_id:
|
|
2888
|
+
z138.object({
|
|
2889
|
+
type: z138.literal("pcb_keepout"),
|
|
2890
|
+
shape: z138.literal("circle"),
|
|
2891
|
+
pcb_group_id: z138.string().optional(),
|
|
2892
|
+
subcircuit_id: z138.string().optional(),
|
|
2872
2893
|
center: point,
|
|
2873
2894
|
radius: distance,
|
|
2874
|
-
pcb_keepout_id:
|
|
2875
|
-
layers:
|
|
2895
|
+
pcb_keepout_id: z138.string(),
|
|
2896
|
+
layers: z138.array(z138.string()),
|
|
2876
2897
|
// Specify layers where the keepout applies
|
|
2877
|
-
description:
|
|
2898
|
+
description: z138.string().optional()
|
|
2878
2899
|
// Optional description of the keepout
|
|
2879
2900
|
})
|
|
2880
2901
|
);
|
|
2881
2902
|
expectTypesMatch(true);
|
|
2882
2903
|
|
|
2883
2904
|
// src/pcb/pcb_cutout.ts
|
|
2884
|
-
import { z as
|
|
2885
|
-
var pcb_cutout_base =
|
|
2886
|
-
type:
|
|
2905
|
+
import { z as z139 } from "zod";
|
|
2906
|
+
var pcb_cutout_base = z139.object({
|
|
2907
|
+
type: z139.literal("pcb_cutout"),
|
|
2887
2908
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2888
|
-
pcb_group_id:
|
|
2889
|
-
subcircuit_id:
|
|
2890
|
-
pcb_board_id:
|
|
2891
|
-
pcb_panel_id:
|
|
2909
|
+
pcb_group_id: z139.string().optional(),
|
|
2910
|
+
subcircuit_id: z139.string().optional(),
|
|
2911
|
+
pcb_board_id: z139.string().optional(),
|
|
2912
|
+
pcb_panel_id: z139.string().optional()
|
|
2892
2913
|
});
|
|
2893
2914
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2894
|
-
shape:
|
|
2915
|
+
shape: z139.literal("rect"),
|
|
2895
2916
|
center: point,
|
|
2896
2917
|
width: length,
|
|
2897
2918
|
height: length,
|
|
@@ -2900,26 +2921,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2900
2921
|
});
|
|
2901
2922
|
expectTypesMatch(true);
|
|
2902
2923
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2903
|
-
shape:
|
|
2924
|
+
shape: z139.literal("circle"),
|
|
2904
2925
|
center: point,
|
|
2905
2926
|
radius: length
|
|
2906
2927
|
});
|
|
2907
2928
|
expectTypesMatch(true);
|
|
2908
2929
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2909
|
-
shape:
|
|
2910
|
-
points:
|
|
2930
|
+
shape: z139.literal("polygon"),
|
|
2931
|
+
points: z139.array(point)
|
|
2911
2932
|
});
|
|
2912
2933
|
expectTypesMatch(true);
|
|
2913
2934
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
2914
|
-
shape:
|
|
2915
|
-
route:
|
|
2935
|
+
shape: z139.literal("path"),
|
|
2936
|
+
route: z139.array(point),
|
|
2916
2937
|
slot_width: length,
|
|
2917
2938
|
slot_length: length.optional(),
|
|
2918
2939
|
space_between_slots: length.optional(),
|
|
2919
2940
|
slot_corner_radius: length.optional()
|
|
2920
2941
|
});
|
|
2921
2942
|
expectTypesMatch(true);
|
|
2922
|
-
var pcb_cutout =
|
|
2943
|
+
var pcb_cutout = z139.discriminatedUnion("shape", [
|
|
2923
2944
|
pcb_cutout_rect,
|
|
2924
2945
|
pcb_cutout_circle,
|
|
2925
2946
|
pcb_cutout_polygon,
|
|
@@ -2928,169 +2949,169 @@ var pcb_cutout = z138.discriminatedUnion("shape", [
|
|
|
2928
2949
|
expectTypesMatch(true);
|
|
2929
2950
|
|
|
2930
2951
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2931
|
-
import { z as
|
|
2952
|
+
import { z as z140 } from "zod";
|
|
2932
2953
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
2933
|
-
type:
|
|
2954
|
+
type: z140.literal("pcb_missing_footprint_error"),
|
|
2934
2955
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2935
2956
|
"pcb_missing_footprint_error"
|
|
2936
2957
|
),
|
|
2937
|
-
pcb_group_id:
|
|
2938
|
-
subcircuit_id:
|
|
2939
|
-
error_type:
|
|
2940
|
-
source_component_id:
|
|
2958
|
+
pcb_group_id: z140.string().optional(),
|
|
2959
|
+
subcircuit_id: z140.string().optional(),
|
|
2960
|
+
error_type: z140.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
2961
|
+
source_component_id: z140.string()
|
|
2941
2962
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2942
2963
|
expectTypesMatch(
|
|
2943
2964
|
true
|
|
2944
2965
|
);
|
|
2945
2966
|
|
|
2946
2967
|
// src/pcb/external_footprint_load_error.ts
|
|
2947
|
-
import { z as
|
|
2968
|
+
import { z as z141 } from "zod";
|
|
2948
2969
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
2949
|
-
type:
|
|
2970
|
+
type: z141.literal("external_footprint_load_error"),
|
|
2950
2971
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2951
2972
|
"external_footprint_load_error"
|
|
2952
2973
|
),
|
|
2953
|
-
pcb_component_id:
|
|
2954
|
-
source_component_id:
|
|
2955
|
-
pcb_group_id:
|
|
2956
|
-
subcircuit_id:
|
|
2957
|
-
footprinter_string:
|
|
2958
|
-
error_type:
|
|
2974
|
+
pcb_component_id: z141.string(),
|
|
2975
|
+
source_component_id: z141.string(),
|
|
2976
|
+
pcb_group_id: z141.string().optional(),
|
|
2977
|
+
subcircuit_id: z141.string().optional(),
|
|
2978
|
+
footprinter_string: z141.string().optional(),
|
|
2979
|
+
error_type: z141.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
2959
2980
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2960
2981
|
expectTypesMatch(true);
|
|
2961
2982
|
|
|
2962
2983
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2963
|
-
import { z as
|
|
2984
|
+
import { z as z142 } from "zod";
|
|
2964
2985
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
2965
|
-
type:
|
|
2986
|
+
type: z142.literal("circuit_json_footprint_load_error"),
|
|
2966
2987
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2967
2988
|
"circuit_json_footprint_load_error"
|
|
2968
2989
|
),
|
|
2969
|
-
pcb_component_id:
|
|
2970
|
-
source_component_id:
|
|
2971
|
-
pcb_group_id:
|
|
2972
|
-
subcircuit_id:
|
|
2973
|
-
error_type:
|
|
2974
|
-
circuit_json:
|
|
2990
|
+
pcb_component_id: z142.string(),
|
|
2991
|
+
source_component_id: z142.string(),
|
|
2992
|
+
pcb_group_id: z142.string().optional(),
|
|
2993
|
+
subcircuit_id: z142.string().optional(),
|
|
2994
|
+
error_type: z142.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
2995
|
+
circuit_json: z142.array(z142.any()).optional()
|
|
2975
2996
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
2976
2997
|
expectTypesMatch(true);
|
|
2977
2998
|
|
|
2978
2999
|
// src/pcb/pcb_group.ts
|
|
2979
|
-
import { z as
|
|
2980
|
-
var pcb_group =
|
|
2981
|
-
type:
|
|
3000
|
+
import { z as z143 } from "zod";
|
|
3001
|
+
var pcb_group = z143.object({
|
|
3002
|
+
type: z143.literal("pcb_group"),
|
|
2982
3003
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
2983
|
-
source_group_id:
|
|
2984
|
-
is_subcircuit:
|
|
2985
|
-
subcircuit_id:
|
|
3004
|
+
source_group_id: z143.string(),
|
|
3005
|
+
is_subcircuit: z143.boolean().optional(),
|
|
3006
|
+
subcircuit_id: z143.string().optional(),
|
|
2986
3007
|
width: length.optional(),
|
|
2987
3008
|
height: length.optional(),
|
|
2988
3009
|
center: point,
|
|
2989
|
-
display_offset_x:
|
|
3010
|
+
display_offset_x: z143.string().optional().describe(
|
|
2990
3011
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
2991
3012
|
),
|
|
2992
|
-
display_offset_y:
|
|
3013
|
+
display_offset_y: z143.string().optional().describe(
|
|
2993
3014
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
2994
3015
|
),
|
|
2995
|
-
outline:
|
|
3016
|
+
outline: z143.array(point).optional(),
|
|
2996
3017
|
anchor_position: point.optional(),
|
|
2997
3018
|
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:
|
|
3019
|
+
position_mode: z143.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3020
|
+
positioned_relative_to_pcb_group_id: z143.string().optional(),
|
|
3021
|
+
positioned_relative_to_pcb_board_id: z143.string().optional(),
|
|
3022
|
+
pcb_component_ids: z143.array(z143.string()),
|
|
3023
|
+
child_layout_mode: z143.enum(["packed", "none"]).optional(),
|
|
3024
|
+
name: z143.string().optional(),
|
|
3025
|
+
description: z143.string().optional(),
|
|
3026
|
+
layout_mode: z143.string().optional(),
|
|
3027
|
+
autorouter_configuration: z143.object({
|
|
3007
3028
|
trace_clearance: length
|
|
3008
3029
|
}).optional(),
|
|
3009
|
-
autorouter_used_string:
|
|
3030
|
+
autorouter_used_string: z143.string().optional()
|
|
3010
3031
|
}).describe("Defines a group of components on the PCB");
|
|
3011
3032
|
expectTypesMatch(true);
|
|
3012
3033
|
|
|
3013
3034
|
// src/pcb/pcb_autorouting_error.ts
|
|
3014
|
-
import { z as
|
|
3035
|
+
import { z as z144 } from "zod";
|
|
3015
3036
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3016
|
-
type:
|
|
3037
|
+
type: z144.literal("pcb_autorouting_error"),
|
|
3017
3038
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3018
|
-
error_type:
|
|
3019
|
-
subcircuit_id:
|
|
3039
|
+
error_type: z144.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3040
|
+
subcircuit_id: z144.string().optional()
|
|
3020
3041
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3021
3042
|
expectTypesMatch(true);
|
|
3022
3043
|
|
|
3023
3044
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3024
|
-
import { z as
|
|
3025
|
-
var pcb_manual_edit_conflict_warning =
|
|
3026
|
-
type:
|
|
3045
|
+
import { z as z145 } from "zod";
|
|
3046
|
+
var pcb_manual_edit_conflict_warning = z145.object({
|
|
3047
|
+
type: z145.literal("pcb_manual_edit_conflict_warning"),
|
|
3027
3048
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3028
3049
|
"pcb_manual_edit_conflict_warning"
|
|
3029
3050
|
),
|
|
3030
|
-
warning_type:
|
|
3031
|
-
message:
|
|
3032
|
-
pcb_component_id:
|
|
3033
|
-
pcb_group_id:
|
|
3034
|
-
subcircuit_id:
|
|
3035
|
-
source_component_id:
|
|
3051
|
+
warning_type: z145.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3052
|
+
message: z145.string(),
|
|
3053
|
+
pcb_component_id: z145.string(),
|
|
3054
|
+
pcb_group_id: z145.string().optional(),
|
|
3055
|
+
subcircuit_id: z145.string().optional(),
|
|
3056
|
+
source_component_id: z145.string()
|
|
3036
3057
|
}).describe(
|
|
3037
3058
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3038
3059
|
);
|
|
3039
3060
|
expectTypesMatch(true);
|
|
3040
3061
|
|
|
3041
3062
|
// 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:
|
|
3063
|
+
import { z as z146 } from "zod";
|
|
3064
|
+
var connectorOrientationDirection = z146.enum(["x-", "x+", "y+", "y-"]);
|
|
3065
|
+
var pcb_connector_not_in_accessible_orientation_warning = z146.object({
|
|
3066
|
+
type: z146.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3046
3067
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3047
3068
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3048
3069
|
),
|
|
3049
|
-
warning_type:
|
|
3050
|
-
message:
|
|
3051
|
-
pcb_component_id:
|
|
3052
|
-
source_component_id:
|
|
3053
|
-
pcb_board_id:
|
|
3070
|
+
warning_type: z146.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3071
|
+
message: z146.string(),
|
|
3072
|
+
pcb_component_id: z146.string(),
|
|
3073
|
+
source_component_id: z146.string().optional(),
|
|
3074
|
+
pcb_board_id: z146.string().optional(),
|
|
3054
3075
|
facing_direction: connectorOrientationDirection,
|
|
3055
3076
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3056
|
-
subcircuit_id:
|
|
3077
|
+
subcircuit_id: z146.string().optional()
|
|
3057
3078
|
}).describe(
|
|
3058
3079
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3059
3080
|
);
|
|
3060
3081
|
expectTypesMatch(true);
|
|
3061
3082
|
|
|
3062
3083
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
3063
|
-
import { z as
|
|
3064
|
-
var supplier_footprint_mismatch_warning =
|
|
3065
|
-
type:
|
|
3084
|
+
import { z as z147 } from "zod";
|
|
3085
|
+
var supplier_footprint_mismatch_warning = z147.object({
|
|
3086
|
+
type: z147.literal("supplier_footprint_mismatch_warning"),
|
|
3066
3087
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3067
3088
|
"supplier_footprint_mismatch_warning"
|
|
3068
3089
|
),
|
|
3069
|
-
warning_type:
|
|
3070
|
-
message:
|
|
3071
|
-
source_component_id:
|
|
3072
|
-
pcb_component_id:
|
|
3073
|
-
pcb_group_id:
|
|
3074
|
-
subcircuit_id:
|
|
3090
|
+
warning_type: z147.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
3091
|
+
message: z147.string(),
|
|
3092
|
+
source_component_id: z147.string(),
|
|
3093
|
+
pcb_component_id: z147.string().optional(),
|
|
3094
|
+
pcb_group_id: z147.string().optional(),
|
|
3095
|
+
subcircuit_id: z147.string().optional(),
|
|
3075
3096
|
supplier_name: supplier_name.optional(),
|
|
3076
|
-
supplier_part_number:
|
|
3077
|
-
supplier_footprint_url:
|
|
3078
|
-
footprint_copper_intersection_over_union:
|
|
3097
|
+
supplier_part_number: z147.string().optional(),
|
|
3098
|
+
supplier_footprint_url: z147.string().optional(),
|
|
3099
|
+
footprint_copper_intersection_over_union: z147.number()
|
|
3079
3100
|
}).describe(
|
|
3080
3101
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3081
3102
|
);
|
|
3082
3103
|
expectTypesMatch(true);
|
|
3083
3104
|
|
|
3084
3105
|
// src/pcb/pcb_breakout_point.ts
|
|
3085
|
-
import { z as
|
|
3086
|
-
var pcb_breakout_point =
|
|
3087
|
-
type:
|
|
3106
|
+
import { z as z148 } from "zod";
|
|
3107
|
+
var pcb_breakout_point = z148.object({
|
|
3108
|
+
type: z148.literal("pcb_breakout_point"),
|
|
3088
3109
|
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:
|
|
3110
|
+
pcb_group_id: z148.string(),
|
|
3111
|
+
subcircuit_id: z148.string().optional(),
|
|
3112
|
+
source_trace_id: z148.string().optional(),
|
|
3113
|
+
source_port_id: z148.string().optional(),
|
|
3114
|
+
source_net_id: z148.string().optional(),
|
|
3094
3115
|
x: distance,
|
|
3095
3116
|
y: distance
|
|
3096
3117
|
}).describe(
|
|
@@ -3099,61 +3120,61 @@ var pcb_breakout_point = z147.object({
|
|
|
3099
3120
|
expectTypesMatch(true);
|
|
3100
3121
|
|
|
3101
3122
|
// src/pcb/pcb_ground_plane.ts
|
|
3102
|
-
import { z as
|
|
3103
|
-
var pcb_ground_plane =
|
|
3104
|
-
type:
|
|
3123
|
+
import { z as z149 } from "zod";
|
|
3124
|
+
var pcb_ground_plane = z149.object({
|
|
3125
|
+
type: z149.literal("pcb_ground_plane"),
|
|
3105
3126
|
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:
|
|
3127
|
+
source_pcb_ground_plane_id: z149.string(),
|
|
3128
|
+
source_net_id: z149.string(),
|
|
3129
|
+
pcb_group_id: z149.string().optional(),
|
|
3130
|
+
subcircuit_id: z149.string().optional()
|
|
3110
3131
|
}).describe("Defines a ground plane on the PCB");
|
|
3111
3132
|
expectTypesMatch(true);
|
|
3112
3133
|
|
|
3113
3134
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3114
|
-
import { z as
|
|
3115
|
-
var pcb_ground_plane_region =
|
|
3116
|
-
type:
|
|
3135
|
+
import { z as z150 } from "zod";
|
|
3136
|
+
var pcb_ground_plane_region = z150.object({
|
|
3137
|
+
type: z150.literal("pcb_ground_plane_region"),
|
|
3117
3138
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3118
3139
|
"pcb_ground_plane_region"
|
|
3119
3140
|
),
|
|
3120
|
-
pcb_ground_plane_id:
|
|
3121
|
-
pcb_group_id:
|
|
3122
|
-
subcircuit_id:
|
|
3141
|
+
pcb_ground_plane_id: z150.string(),
|
|
3142
|
+
pcb_group_id: z150.string().optional(),
|
|
3143
|
+
subcircuit_id: z150.string().optional(),
|
|
3123
3144
|
layer: layer_ref,
|
|
3124
|
-
points:
|
|
3145
|
+
points: z150.array(point)
|
|
3125
3146
|
}).describe("Defines a polygon region of a ground plane");
|
|
3126
3147
|
expectTypesMatch(true);
|
|
3127
3148
|
|
|
3128
3149
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3129
|
-
import { z as
|
|
3130
|
-
var pcb_thermal_spoke =
|
|
3131
|
-
type:
|
|
3150
|
+
import { z as z151 } from "zod";
|
|
3151
|
+
var pcb_thermal_spoke = z151.object({
|
|
3152
|
+
type: z151.literal("pcb_thermal_spoke"),
|
|
3132
3153
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3133
|
-
pcb_ground_plane_id:
|
|
3134
|
-
shape:
|
|
3135
|
-
spoke_count:
|
|
3154
|
+
pcb_ground_plane_id: z151.string(),
|
|
3155
|
+
shape: z151.string(),
|
|
3156
|
+
spoke_count: z151.number(),
|
|
3136
3157
|
spoke_thickness: distance,
|
|
3137
3158
|
spoke_inner_diameter: distance,
|
|
3138
3159
|
spoke_outer_diameter: distance,
|
|
3139
|
-
pcb_plated_hole_id:
|
|
3140
|
-
subcircuit_id:
|
|
3160
|
+
pcb_plated_hole_id: z151.string().optional(),
|
|
3161
|
+
subcircuit_id: z151.string().optional()
|
|
3141
3162
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3142
3163
|
expectTypesMatch(true);
|
|
3143
3164
|
|
|
3144
3165
|
// src/pcb/pcb_copper_pour.ts
|
|
3145
|
-
import { z as
|
|
3146
|
-
var pcb_copper_pour_base =
|
|
3147
|
-
type:
|
|
3166
|
+
import { z as z152 } from "zod";
|
|
3167
|
+
var pcb_copper_pour_base = z152.object({
|
|
3168
|
+
type: z152.literal("pcb_copper_pour"),
|
|
3148
3169
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3149
|
-
pcb_group_id:
|
|
3150
|
-
subcircuit_id:
|
|
3170
|
+
pcb_group_id: z152.string().optional(),
|
|
3171
|
+
subcircuit_id: z152.string().optional(),
|
|
3151
3172
|
layer: layer_ref,
|
|
3152
|
-
source_net_id:
|
|
3153
|
-
covered_with_solder_mask:
|
|
3173
|
+
source_net_id: z152.string().optional(),
|
|
3174
|
+
covered_with_solder_mask: z152.boolean().optional().default(true)
|
|
3154
3175
|
});
|
|
3155
3176
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3156
|
-
shape:
|
|
3177
|
+
shape: z152.literal("rect"),
|
|
3157
3178
|
center: point,
|
|
3158
3179
|
width: length,
|
|
3159
3180
|
height: length,
|
|
@@ -3161,16 +3182,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3161
3182
|
});
|
|
3162
3183
|
expectTypesMatch(true);
|
|
3163
3184
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3164
|
-
shape:
|
|
3185
|
+
shape: z152.literal("brep"),
|
|
3165
3186
|
brep_shape
|
|
3166
3187
|
});
|
|
3167
3188
|
expectTypesMatch(true);
|
|
3168
3189
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3169
|
-
shape:
|
|
3170
|
-
points:
|
|
3190
|
+
shape: z152.literal("polygon"),
|
|
3191
|
+
points: z152.array(point)
|
|
3171
3192
|
});
|
|
3172
3193
|
expectTypesMatch(true);
|
|
3173
|
-
var pcb_copper_pour =
|
|
3194
|
+
var pcb_copper_pour = z152.discriminatedUnion("shape", [
|
|
3174
3195
|
pcb_copper_pour_rect,
|
|
3175
3196
|
pcb_copper_pour_brep,
|
|
3176
3197
|
pcb_copper_pour_polygon
|
|
@@ -3178,99 +3199,99 @@ var pcb_copper_pour = z151.discriminatedUnion("shape", [
|
|
|
3178
3199
|
expectTypesMatch(true);
|
|
3179
3200
|
|
|
3180
3201
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3181
|
-
import { z as
|
|
3202
|
+
import { z as z153 } from "zod";
|
|
3182
3203
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3183
|
-
type:
|
|
3204
|
+
type: z153.literal("pcb_component_outside_board_error"),
|
|
3184
3205
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3185
3206
|
"pcb_component_outside_board_error"
|
|
3186
3207
|
),
|
|
3187
|
-
error_type:
|
|
3188
|
-
pcb_component_id:
|
|
3189
|
-
pcb_board_id:
|
|
3208
|
+
error_type: z153.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3209
|
+
pcb_component_id: z153.string(),
|
|
3210
|
+
pcb_board_id: z153.string(),
|
|
3190
3211
|
component_center: point,
|
|
3191
|
-
component_bounds:
|
|
3192
|
-
min_x:
|
|
3193
|
-
max_x:
|
|
3194
|
-
min_y:
|
|
3195
|
-
max_y:
|
|
3212
|
+
component_bounds: z153.object({
|
|
3213
|
+
min_x: z153.number(),
|
|
3214
|
+
max_x: z153.number(),
|
|
3215
|
+
min_y: z153.number(),
|
|
3216
|
+
max_y: z153.number()
|
|
3196
3217
|
}),
|
|
3197
|
-
subcircuit_id:
|
|
3198
|
-
source_component_id:
|
|
3218
|
+
subcircuit_id: z153.string().optional(),
|
|
3219
|
+
source_component_id: z153.string().optional()
|
|
3199
3220
|
}).describe(
|
|
3200
3221
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3201
3222
|
);
|
|
3202
3223
|
expectTypesMatch(true);
|
|
3203
3224
|
|
|
3204
3225
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3205
|
-
import { z as
|
|
3226
|
+
import { z as z154 } from "zod";
|
|
3206
3227
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3207
|
-
type:
|
|
3228
|
+
type: z154.literal("pcb_component_not_on_board_edge_error"),
|
|
3208
3229
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3209
3230
|
"pcb_component_not_on_board_edge_error"
|
|
3210
3231
|
),
|
|
3211
|
-
error_type:
|
|
3212
|
-
pcb_component_id:
|
|
3213
|
-
pcb_board_id:
|
|
3232
|
+
error_type: z154.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3233
|
+
pcb_component_id: z154.string(),
|
|
3234
|
+
pcb_board_id: z154.string(),
|
|
3214
3235
|
component_center: point,
|
|
3215
|
-
pad_to_nearest_board_edge_distance:
|
|
3216
|
-
source_component_id:
|
|
3217
|
-
subcircuit_id:
|
|
3236
|
+
pad_to_nearest_board_edge_distance: z154.number(),
|
|
3237
|
+
source_component_id: z154.string().optional(),
|
|
3238
|
+
subcircuit_id: z154.string().optional()
|
|
3218
3239
|
}).describe(
|
|
3219
3240
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3220
3241
|
);
|
|
3221
3242
|
expectTypesMatch(true);
|
|
3222
3243
|
|
|
3223
3244
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3224
|
-
import { z as
|
|
3245
|
+
import { z as z155 } from "zod";
|
|
3225
3246
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3226
|
-
type:
|
|
3247
|
+
type: z155.literal("pcb_component_invalid_layer_error"),
|
|
3227
3248
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3228
3249
|
"pcb_component_invalid_layer_error"
|
|
3229
3250
|
),
|
|
3230
|
-
error_type:
|
|
3231
|
-
pcb_component_id:
|
|
3232
|
-
source_component_id:
|
|
3251
|
+
error_type: z155.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3252
|
+
pcb_component_id: z155.string().optional(),
|
|
3253
|
+
source_component_id: z155.string(),
|
|
3233
3254
|
layer: layer_ref,
|
|
3234
|
-
subcircuit_id:
|
|
3255
|
+
subcircuit_id: z155.string().optional()
|
|
3235
3256
|
}).describe(
|
|
3236
3257
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3237
3258
|
);
|
|
3238
3259
|
expectTypesMatch(true);
|
|
3239
3260
|
|
|
3240
3261
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3241
|
-
import { z as
|
|
3262
|
+
import { z as z156 } from "zod";
|
|
3242
3263
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3243
|
-
type:
|
|
3264
|
+
type: z156.literal("pcb_via_clearance_error"),
|
|
3244
3265
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3245
|
-
error_type:
|
|
3246
|
-
pcb_via_ids:
|
|
3266
|
+
error_type: z156.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3267
|
+
pcb_via_ids: z156.array(z156.string()).min(2),
|
|
3247
3268
|
minimum_clearance: distance.optional(),
|
|
3248
3269
|
actual_clearance: distance.optional(),
|
|
3249
|
-
pcb_center:
|
|
3250
|
-
x:
|
|
3251
|
-
y:
|
|
3270
|
+
pcb_center: z156.object({
|
|
3271
|
+
x: z156.number().optional(),
|
|
3272
|
+
y: z156.number().optional()
|
|
3252
3273
|
}).optional(),
|
|
3253
|
-
subcircuit_id:
|
|
3274
|
+
subcircuit_id: z156.string().optional()
|
|
3254
3275
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3255
3276
|
expectTypesMatch(true);
|
|
3256
3277
|
|
|
3257
3278
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
3258
|
-
import { z as
|
|
3279
|
+
import { z as z157 } from "zod";
|
|
3259
3280
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3260
|
-
type:
|
|
3281
|
+
type: z157.literal("pcb_via_trace_clearance_error"),
|
|
3261
3282
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3262
3283
|
"pcb_via_trace_clearance_error"
|
|
3263
3284
|
),
|
|
3264
|
-
error_type:
|
|
3265
|
-
pcb_via_id:
|
|
3266
|
-
pcb_trace_id:
|
|
3285
|
+
error_type: z157.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
3286
|
+
pcb_via_id: z157.string(),
|
|
3287
|
+
pcb_trace_id: z157.string(),
|
|
3267
3288
|
minimum_clearance: distance.optional(),
|
|
3268
3289
|
actual_clearance: distance.optional(),
|
|
3269
|
-
center:
|
|
3270
|
-
x:
|
|
3271
|
-
y:
|
|
3290
|
+
center: z157.object({
|
|
3291
|
+
x: z157.number().optional(),
|
|
3292
|
+
y: z157.number().optional()
|
|
3272
3293
|
}).optional(),
|
|
3273
|
-
subcircuit_id:
|
|
3294
|
+
subcircuit_id: z157.string().optional()
|
|
3274
3295
|
}).describe(
|
|
3275
3296
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3276
3297
|
);
|
|
@@ -3279,41 +3300,41 @@ expectTypesMatch(
|
|
|
3279
3300
|
);
|
|
3280
3301
|
|
|
3281
3302
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
3282
|
-
import { z as
|
|
3303
|
+
import { z as z158 } from "zod";
|
|
3283
3304
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3284
|
-
type:
|
|
3305
|
+
type: z158.literal("pcb_pad_pad_clearance_error"),
|
|
3285
3306
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3286
3307
|
"pcb_pad_pad_clearance_error"
|
|
3287
3308
|
),
|
|
3288
|
-
error_type:
|
|
3289
|
-
pcb_pad_ids:
|
|
3309
|
+
error_type: z158.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
3310
|
+
pcb_pad_ids: z158.array(z158.string()).min(2),
|
|
3290
3311
|
minimum_clearance: distance.optional(),
|
|
3291
3312
|
actual_clearance: distance.optional(),
|
|
3292
|
-
center:
|
|
3293
|
-
x:
|
|
3294
|
-
y:
|
|
3313
|
+
center: z158.object({
|
|
3314
|
+
x: z158.number().optional(),
|
|
3315
|
+
y: z158.number().optional()
|
|
3295
3316
|
}).optional(),
|
|
3296
|
-
subcircuit_id:
|
|
3317
|
+
subcircuit_id: z158.string().optional()
|
|
3297
3318
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3298
3319
|
expectTypesMatch(true);
|
|
3299
3320
|
|
|
3300
3321
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
3301
|
-
import { z as
|
|
3322
|
+
import { z as z159 } from "zod";
|
|
3302
3323
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3303
|
-
type:
|
|
3324
|
+
type: z159.literal("pcb_pad_trace_clearance_error"),
|
|
3304
3325
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3305
3326
|
"pcb_pad_trace_clearance_error"
|
|
3306
3327
|
),
|
|
3307
|
-
error_type:
|
|
3308
|
-
pcb_pad_id:
|
|
3309
|
-
pcb_trace_id:
|
|
3328
|
+
error_type: z159.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
3329
|
+
pcb_pad_id: z159.string(),
|
|
3330
|
+
pcb_trace_id: z159.string(),
|
|
3310
3331
|
minimum_clearance: distance.optional(),
|
|
3311
3332
|
actual_clearance: distance.optional(),
|
|
3312
|
-
center:
|
|
3313
|
-
x:
|
|
3314
|
-
y:
|
|
3333
|
+
center: z159.object({
|
|
3334
|
+
x: z159.number().optional(),
|
|
3335
|
+
y: z159.number().optional()
|
|
3315
3336
|
}).optional(),
|
|
3316
|
-
subcircuit_id:
|
|
3337
|
+
subcircuit_id: z159.string().optional()
|
|
3317
3338
|
}).describe(
|
|
3318
3339
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3319
3340
|
);
|
|
@@ -3322,89 +3343,89 @@ expectTypesMatch(
|
|
|
3322
3343
|
);
|
|
3323
3344
|
|
|
3324
3345
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3325
|
-
import { z as
|
|
3326
|
-
var pcb_courtyard_rect =
|
|
3327
|
-
type:
|
|
3346
|
+
import { z as z160 } from "zod";
|
|
3347
|
+
var pcb_courtyard_rect = z160.object({
|
|
3348
|
+
type: z160.literal("pcb_courtyard_rect"),
|
|
3328
3349
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3329
|
-
pcb_component_id:
|
|
3330
|
-
pcb_group_id:
|
|
3331
|
-
subcircuit_id:
|
|
3350
|
+
pcb_component_id: z160.string(),
|
|
3351
|
+
pcb_group_id: z160.string().optional(),
|
|
3352
|
+
subcircuit_id: z160.string().optional(),
|
|
3332
3353
|
center: point,
|
|
3333
3354
|
width: length,
|
|
3334
3355
|
height: length,
|
|
3335
3356
|
layer: visible_layer,
|
|
3336
3357
|
ccw_rotation: rotation.optional(),
|
|
3337
|
-
color:
|
|
3358
|
+
color: z160.string().optional()
|
|
3338
3359
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3339
3360
|
expectTypesMatch(true);
|
|
3340
3361
|
|
|
3341
3362
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3342
|
-
import { z as
|
|
3343
|
-
var pcb_courtyard_outline =
|
|
3344
|
-
type:
|
|
3363
|
+
import { z as z161 } from "zod";
|
|
3364
|
+
var pcb_courtyard_outline = z161.object({
|
|
3365
|
+
type: z161.literal("pcb_courtyard_outline"),
|
|
3345
3366
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3346
3367
|
"pcb_courtyard_outline"
|
|
3347
3368
|
),
|
|
3348
|
-
pcb_component_id:
|
|
3349
|
-
pcb_group_id:
|
|
3350
|
-
subcircuit_id:
|
|
3369
|
+
pcb_component_id: z161.string(),
|
|
3370
|
+
pcb_group_id: z161.string().optional(),
|
|
3371
|
+
subcircuit_id: z161.string().optional(),
|
|
3351
3372
|
layer: visible_layer,
|
|
3352
|
-
outline:
|
|
3373
|
+
outline: z161.array(point).min(2)
|
|
3353
3374
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3354
3375
|
expectTypesMatch(true);
|
|
3355
3376
|
|
|
3356
3377
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3357
|
-
import { z as
|
|
3358
|
-
var pcb_courtyard_polygon =
|
|
3359
|
-
type:
|
|
3378
|
+
import { z as z162 } from "zod";
|
|
3379
|
+
var pcb_courtyard_polygon = z162.object({
|
|
3380
|
+
type: z162.literal("pcb_courtyard_polygon"),
|
|
3360
3381
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3361
3382
|
"pcb_courtyard_polygon"
|
|
3362
3383
|
),
|
|
3363
|
-
pcb_component_id:
|
|
3364
|
-
pcb_group_id:
|
|
3365
|
-
subcircuit_id:
|
|
3384
|
+
pcb_component_id: z162.string(),
|
|
3385
|
+
pcb_group_id: z162.string().optional(),
|
|
3386
|
+
subcircuit_id: z162.string().optional(),
|
|
3366
3387
|
layer: visible_layer,
|
|
3367
|
-
points:
|
|
3368
|
-
color:
|
|
3388
|
+
points: z162.array(point).min(3),
|
|
3389
|
+
color: z162.string().optional()
|
|
3369
3390
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3370
3391
|
expectTypesMatch(true);
|
|
3371
3392
|
|
|
3372
3393
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3373
|
-
import { z as
|
|
3374
|
-
var pcb_courtyard_circle =
|
|
3375
|
-
type:
|
|
3394
|
+
import { z as z163 } from "zod";
|
|
3395
|
+
var pcb_courtyard_circle = z163.object({
|
|
3396
|
+
type: z163.literal("pcb_courtyard_circle"),
|
|
3376
3397
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3377
3398
|
"pcb_courtyard_circle"
|
|
3378
3399
|
),
|
|
3379
|
-
pcb_component_id:
|
|
3380
|
-
pcb_group_id:
|
|
3381
|
-
subcircuit_id:
|
|
3400
|
+
pcb_component_id: z163.string(),
|
|
3401
|
+
pcb_group_id: z163.string().optional(),
|
|
3402
|
+
subcircuit_id: z163.string().optional(),
|
|
3382
3403
|
center: point,
|
|
3383
3404
|
radius: length,
|
|
3384
3405
|
layer: visible_layer,
|
|
3385
|
-
color:
|
|
3406
|
+
color: z163.string().optional()
|
|
3386
3407
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3387
3408
|
expectTypesMatch(true);
|
|
3388
3409
|
|
|
3389
3410
|
// src/pcb/pcb_courtyard_pill.ts
|
|
3390
|
-
import { z as
|
|
3391
|
-
var pcb_courtyard_pill =
|
|
3392
|
-
type:
|
|
3411
|
+
import { z as z164 } from "zod";
|
|
3412
|
+
var pcb_courtyard_pill = z164.object({
|
|
3413
|
+
type: z164.literal("pcb_courtyard_pill"),
|
|
3393
3414
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3394
|
-
pcb_component_id:
|
|
3395
|
-
pcb_group_id:
|
|
3396
|
-
subcircuit_id:
|
|
3415
|
+
pcb_component_id: z164.string(),
|
|
3416
|
+
pcb_group_id: z164.string().optional(),
|
|
3417
|
+
subcircuit_id: z164.string().optional(),
|
|
3397
3418
|
center: point,
|
|
3398
3419
|
width: length,
|
|
3399
3420
|
height: length,
|
|
3400
3421
|
radius: length,
|
|
3401
3422
|
layer: visible_layer,
|
|
3402
|
-
color:
|
|
3423
|
+
color: z164.string().optional()
|
|
3403
3424
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3404
3425
|
expectTypesMatch(true);
|
|
3405
3426
|
|
|
3406
3427
|
// src/cad/cad_component.ts
|
|
3407
|
-
import { z as
|
|
3428
|
+
import { z as z165 } from "zod";
|
|
3408
3429
|
|
|
3409
3430
|
// src/cad/cad_model_conventions.ts
|
|
3410
3431
|
var cad_model_formats = [
|
|
@@ -3435,49 +3456,49 @@ var cadModelDefaultDirectionMap = {
|
|
|
3435
3456
|
};
|
|
3436
3457
|
|
|
3437
3458
|
// src/cad/cad_component.ts
|
|
3438
|
-
var cad_component =
|
|
3439
|
-
type:
|
|
3440
|
-
cad_component_id:
|
|
3441
|
-
pcb_component_id:
|
|
3442
|
-
source_component_id:
|
|
3459
|
+
var cad_component = z165.object({
|
|
3460
|
+
type: z165.literal("cad_component"),
|
|
3461
|
+
cad_component_id: z165.string(),
|
|
3462
|
+
pcb_component_id: z165.string(),
|
|
3463
|
+
source_component_id: z165.string(),
|
|
3443
3464
|
position: point3,
|
|
3444
3465
|
rotation: point3.optional(),
|
|
3445
3466
|
size: point3.optional(),
|
|
3446
3467
|
layer: layer_ref.optional(),
|
|
3447
|
-
subcircuit_id:
|
|
3468
|
+
subcircuit_id: z165.string().optional(),
|
|
3448
3469
|
// 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:
|
|
3470
|
+
footprinter_string: z165.string().optional(),
|
|
3471
|
+
model_obj_url: z165.string().optional(),
|
|
3472
|
+
model_stl_url: z165.string().optional(),
|
|
3473
|
+
model_3mf_url: z165.string().optional(),
|
|
3474
|
+
model_gltf_url: z165.string().optional(),
|
|
3475
|
+
model_glb_url: z165.string().optional(),
|
|
3476
|
+
model_step_url: z165.string().optional(),
|
|
3477
|
+
model_wrl_url: z165.string().optional(),
|
|
3457
3478
|
model_asset: asset.optional(),
|
|
3458
|
-
model_unit_to_mm_scale_factor:
|
|
3459
|
-
model_board_normal_direction:
|
|
3479
|
+
model_unit_to_mm_scale_factor: z165.number().optional(),
|
|
3480
|
+
model_board_normal_direction: z165.enum(cad_model_axis_directions).optional().describe(
|
|
3460
3481
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3461
3482
|
),
|
|
3462
3483
|
model_origin_position: point3.optional(),
|
|
3463
|
-
model_origin_alignment:
|
|
3484
|
+
model_origin_alignment: z165.enum([
|
|
3464
3485
|
"unknown",
|
|
3465
3486
|
"center",
|
|
3466
3487
|
"center_of_component_on_board_surface",
|
|
3467
3488
|
"bottom_center_of_component"
|
|
3468
3489
|
]).optional(),
|
|
3469
|
-
model_object_fit:
|
|
3470
|
-
model_jscad:
|
|
3471
|
-
show_as_translucent_model:
|
|
3472
|
-
show_as_bounding_box:
|
|
3473
|
-
anchor_alignment:
|
|
3490
|
+
model_object_fit: z165.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
3491
|
+
model_jscad: z165.any().optional(),
|
|
3492
|
+
show_as_translucent_model: z165.boolean().optional(),
|
|
3493
|
+
show_as_bounding_box: z165.boolean().optional(),
|
|
3494
|
+
anchor_alignment: z165.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3474
3495
|
}).describe("Defines a component on the PCB");
|
|
3475
3496
|
expectTypesMatch(true);
|
|
3476
3497
|
|
|
3477
3498
|
// src/simulation/simulation_voltage_source.ts
|
|
3478
|
-
import { z as
|
|
3479
|
-
var wave_shape =
|
|
3480
|
-
var percentage =
|
|
3499
|
+
import { z as z166 } from "zod";
|
|
3500
|
+
var wave_shape = z166.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
3501
|
+
var percentage = z166.union([z166.string(), z166.number()]).transform((val) => {
|
|
3481
3502
|
if (typeof val === "string") {
|
|
3482
3503
|
if (val.endsWith("%")) {
|
|
3483
3504
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3486,30 +3507,30 @@ var percentage = z165.union([z165.string(), z165.number()]).transform((val) => {
|
|
|
3486
3507
|
}
|
|
3487
3508
|
return val;
|
|
3488
3509
|
}).pipe(
|
|
3489
|
-
|
|
3510
|
+
z166.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3490
3511
|
);
|
|
3491
|
-
var simulation_dc_voltage_source =
|
|
3492
|
-
type:
|
|
3512
|
+
var simulation_dc_voltage_source = z166.object({
|
|
3513
|
+
type: z166.literal("simulation_voltage_source"),
|
|
3493
3514
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3494
3515
|
"simulation_voltage_source"
|
|
3495
3516
|
),
|
|
3496
|
-
is_dc_source:
|
|
3497
|
-
positive_source_port_id:
|
|
3498
|
-
negative_source_port_id:
|
|
3499
|
-
positive_source_net_id:
|
|
3500
|
-
negative_source_net_id:
|
|
3517
|
+
is_dc_source: z166.literal(true).optional().default(true),
|
|
3518
|
+
positive_source_port_id: z166.string().optional(),
|
|
3519
|
+
negative_source_port_id: z166.string().optional(),
|
|
3520
|
+
positive_source_net_id: z166.string().optional(),
|
|
3521
|
+
negative_source_net_id: z166.string().optional(),
|
|
3501
3522
|
voltage
|
|
3502
3523
|
}).describe("Defines a DC voltage source for simulation");
|
|
3503
|
-
var simulation_ac_voltage_source =
|
|
3504
|
-
type:
|
|
3524
|
+
var simulation_ac_voltage_source = z166.object({
|
|
3525
|
+
type: z166.literal("simulation_voltage_source"),
|
|
3505
3526
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3506
3527
|
"simulation_voltage_source"
|
|
3507
3528
|
),
|
|
3508
|
-
is_dc_source:
|
|
3509
|
-
terminal1_source_port_id:
|
|
3510
|
-
terminal2_source_port_id:
|
|
3511
|
-
terminal1_source_net_id:
|
|
3512
|
-
terminal2_source_net_id:
|
|
3529
|
+
is_dc_source: z166.literal(false),
|
|
3530
|
+
terminal1_source_port_id: z166.string().optional(),
|
|
3531
|
+
terminal2_source_port_id: z166.string().optional(),
|
|
3532
|
+
terminal1_source_net_id: z166.string().optional(),
|
|
3533
|
+
terminal2_source_net_id: z166.string().optional(),
|
|
3513
3534
|
voltage: voltage.optional(),
|
|
3514
3535
|
frequency: frequency.optional(),
|
|
3515
3536
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3522,14 +3543,14 @@ var simulation_ac_voltage_source = z165.object({
|
|
|
3522
3543
|
pulse_width: ms.optional(),
|
|
3523
3544
|
period: ms.optional()
|
|
3524
3545
|
}).describe("Defines an AC voltage source for simulation");
|
|
3525
|
-
var simulation_voltage_source =
|
|
3546
|
+
var simulation_voltage_source = z166.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
3526
3547
|
expectTypesMatch(true);
|
|
3527
3548
|
expectTypesMatch(true);
|
|
3528
3549
|
expectTypesMatch(true);
|
|
3529
3550
|
|
|
3530
3551
|
// src/simulation/simulation_current_source.ts
|
|
3531
|
-
import { z as
|
|
3532
|
-
var percentage2 =
|
|
3552
|
+
import { z as z167 } from "zod";
|
|
3553
|
+
var percentage2 = z167.union([z167.string(), z167.number()]).transform((val) => {
|
|
3533
3554
|
if (typeof val === "string") {
|
|
3534
3555
|
if (val.endsWith("%")) {
|
|
3535
3556
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3538,30 +3559,30 @@ var percentage2 = z166.union([z166.string(), z166.number()]).transform((val) =>
|
|
|
3538
3559
|
}
|
|
3539
3560
|
return val;
|
|
3540
3561
|
}).pipe(
|
|
3541
|
-
|
|
3562
|
+
z167.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3542
3563
|
);
|
|
3543
|
-
var simulation_dc_current_source =
|
|
3544
|
-
type:
|
|
3564
|
+
var simulation_dc_current_source = z167.object({
|
|
3565
|
+
type: z167.literal("simulation_current_source"),
|
|
3545
3566
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3546
3567
|
"simulation_current_source"
|
|
3547
3568
|
),
|
|
3548
|
-
is_dc_source:
|
|
3549
|
-
positive_source_port_id:
|
|
3550
|
-
negative_source_port_id:
|
|
3551
|
-
positive_source_net_id:
|
|
3552
|
-
negative_source_net_id:
|
|
3569
|
+
is_dc_source: z167.literal(true).optional().default(true),
|
|
3570
|
+
positive_source_port_id: z167.string().optional(),
|
|
3571
|
+
negative_source_port_id: z167.string().optional(),
|
|
3572
|
+
positive_source_net_id: z167.string().optional(),
|
|
3573
|
+
negative_source_net_id: z167.string().optional(),
|
|
3553
3574
|
current
|
|
3554
3575
|
}).describe("Defines a DC current source for simulation");
|
|
3555
|
-
var simulation_ac_current_source =
|
|
3556
|
-
type:
|
|
3576
|
+
var simulation_ac_current_source = z167.object({
|
|
3577
|
+
type: z167.literal("simulation_current_source"),
|
|
3557
3578
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3558
3579
|
"simulation_current_source"
|
|
3559
3580
|
),
|
|
3560
|
-
is_dc_source:
|
|
3561
|
-
terminal1_source_port_id:
|
|
3562
|
-
terminal2_source_port_id:
|
|
3563
|
-
terminal1_source_net_id:
|
|
3564
|
-
terminal2_source_net_id:
|
|
3581
|
+
is_dc_source: z167.literal(false),
|
|
3582
|
+
terminal1_source_port_id: z167.string().optional(),
|
|
3583
|
+
terminal2_source_port_id: z167.string().optional(),
|
|
3584
|
+
terminal1_source_net_id: z167.string().optional(),
|
|
3585
|
+
terminal2_source_net_id: z167.string().optional(),
|
|
3565
3586
|
current: current.optional(),
|
|
3566
3587
|
frequency: frequency.optional(),
|
|
3567
3588
|
peak_to_peak_current: current.optional(),
|
|
@@ -3569,31 +3590,31 @@ var simulation_ac_current_source = z166.object({
|
|
|
3569
3590
|
phase: rotation.optional(),
|
|
3570
3591
|
duty_cycle: percentage2.optional()
|
|
3571
3592
|
}).describe("Defines an AC current source for simulation");
|
|
3572
|
-
var simulation_current_source =
|
|
3593
|
+
var simulation_current_source = z167.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
3573
3594
|
expectTypesMatch(true);
|
|
3574
3595
|
expectTypesMatch(true);
|
|
3575
3596
|
expectTypesMatch(true);
|
|
3576
3597
|
|
|
3577
3598
|
// src/simulation/simulation_experiment.ts
|
|
3578
|
-
import { z as
|
|
3579
|
-
var experiment_type =
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3599
|
+
import { z as z168 } from "zod";
|
|
3600
|
+
var experiment_type = z168.union([
|
|
3601
|
+
z168.literal("spice_dc_sweep"),
|
|
3602
|
+
z168.literal("spice_dc_operating_point"),
|
|
3603
|
+
z168.literal("spice_transient_analysis"),
|
|
3604
|
+
z168.literal("spice_ac_analysis")
|
|
3584
3605
|
]);
|
|
3585
|
-
var spice_simulation_options =
|
|
3586
|
-
method:
|
|
3587
|
-
reltol:
|
|
3588
|
-
abstol:
|
|
3589
|
-
vntol:
|
|
3606
|
+
var spice_simulation_options = z168.object({
|
|
3607
|
+
method: z168.enum(["trap", "gear"]).optional(),
|
|
3608
|
+
reltol: z168.union([z168.number(), z168.string()]).optional(),
|
|
3609
|
+
abstol: z168.union([z168.number(), z168.string()]).optional(),
|
|
3610
|
+
vntol: z168.union([z168.number(), z168.string()]).optional()
|
|
3590
3611
|
}).describe("SPICE solver options for a simulation experiment");
|
|
3591
|
-
var simulation_experiment =
|
|
3592
|
-
type:
|
|
3612
|
+
var simulation_experiment = z168.object({
|
|
3613
|
+
type: z168.literal("simulation_experiment"),
|
|
3593
3614
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
3594
3615
|
"simulation_experiment"
|
|
3595
3616
|
),
|
|
3596
|
-
name:
|
|
3617
|
+
name: z168.string(),
|
|
3597
3618
|
experiment_type,
|
|
3598
3619
|
time_per_step: duration_ms.optional(),
|
|
3599
3620
|
start_time_ms: ms.optional(),
|
|
@@ -3603,73 +3624,73 @@ var simulation_experiment = z167.object({
|
|
|
3603
3624
|
expectTypesMatch(true);
|
|
3604
3625
|
|
|
3605
3626
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
3606
|
-
import { z as
|
|
3607
|
-
var simulation_transient_voltage_graph =
|
|
3608
|
-
type:
|
|
3627
|
+
import { z as z169 } from "zod";
|
|
3628
|
+
var simulation_transient_voltage_graph = z169.object({
|
|
3629
|
+
type: z169.literal("simulation_transient_voltage_graph"),
|
|
3609
3630
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
3610
3631
|
"simulation_transient_voltage_graph"
|
|
3611
3632
|
),
|
|
3612
|
-
simulation_experiment_id:
|
|
3613
|
-
timestamps_ms:
|
|
3614
|
-
voltage_levels:
|
|
3615
|
-
source_component_id:
|
|
3616
|
-
subcircuit_connectivity_map_key:
|
|
3633
|
+
simulation_experiment_id: z169.string(),
|
|
3634
|
+
timestamps_ms: z169.array(z169.number()).optional(),
|
|
3635
|
+
voltage_levels: z169.array(z169.number()),
|
|
3636
|
+
source_component_id: z169.string().optional(),
|
|
3637
|
+
subcircuit_connectivity_map_key: z169.string().optional(),
|
|
3617
3638
|
time_per_step: duration_ms,
|
|
3618
3639
|
start_time_ms: ms,
|
|
3619
3640
|
end_time_ms: ms,
|
|
3620
|
-
name:
|
|
3621
|
-
color:
|
|
3641
|
+
name: z169.string().optional(),
|
|
3642
|
+
color: z169.string().optional()
|
|
3622
3643
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
3623
3644
|
expectTypesMatch(true);
|
|
3624
3645
|
|
|
3625
3646
|
// src/simulation/simulation_transient_current_graph.ts
|
|
3626
|
-
import { z as
|
|
3627
|
-
var simulation_transient_current_graph =
|
|
3628
|
-
type:
|
|
3647
|
+
import { z as z170 } from "zod";
|
|
3648
|
+
var simulation_transient_current_graph = z170.object({
|
|
3649
|
+
type: z170.literal("simulation_transient_current_graph"),
|
|
3629
3650
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
3630
3651
|
"simulation_transient_current_graph"
|
|
3631
3652
|
),
|
|
3632
|
-
simulation_experiment_id:
|
|
3633
|
-
timestamps_ms:
|
|
3634
|
-
current_levels:
|
|
3635
|
-
source_component_id:
|
|
3636
|
-
subcircuit_connectivity_map_key:
|
|
3653
|
+
simulation_experiment_id: z170.string(),
|
|
3654
|
+
timestamps_ms: z170.array(z170.number()).optional(),
|
|
3655
|
+
current_levels: z170.array(z170.number()),
|
|
3656
|
+
source_component_id: z170.string().optional(),
|
|
3657
|
+
subcircuit_connectivity_map_key: z170.string().optional(),
|
|
3637
3658
|
time_per_step: duration_ms,
|
|
3638
3659
|
start_time_ms: ms,
|
|
3639
3660
|
end_time_ms: ms,
|
|
3640
|
-
name:
|
|
3641
|
-
color:
|
|
3661
|
+
name: z170.string().optional(),
|
|
3662
|
+
color: z170.string().optional()
|
|
3642
3663
|
}).describe("Stores current measurements over time for a simulation");
|
|
3643
3664
|
expectTypesMatch(true);
|
|
3644
3665
|
|
|
3645
3666
|
// src/simulation/simulation_switch.ts
|
|
3646
|
-
import { z as
|
|
3647
|
-
var simulation_switch =
|
|
3648
|
-
type:
|
|
3667
|
+
import { z as z171 } from "zod";
|
|
3668
|
+
var simulation_switch = z171.object({
|
|
3669
|
+
type: z171.literal("simulation_switch"),
|
|
3649
3670
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
3650
|
-
source_component_id:
|
|
3671
|
+
source_component_id: z171.string().optional(),
|
|
3651
3672
|
closes_at: ms.optional(),
|
|
3652
3673
|
opens_at: ms.optional(),
|
|
3653
|
-
starts_closed:
|
|
3674
|
+
starts_closed: z171.boolean().optional(),
|
|
3654
3675
|
switching_frequency: frequency.optional()
|
|
3655
3676
|
}).describe("Defines a switch for simulation timing control");
|
|
3656
3677
|
expectTypesMatch(true);
|
|
3657
3678
|
|
|
3658
3679
|
// src/simulation/simulation_voltage_probe.ts
|
|
3659
|
-
import { z as
|
|
3660
|
-
var simulation_voltage_probe =
|
|
3661
|
-
type:
|
|
3680
|
+
import { z as z172 } from "zod";
|
|
3681
|
+
var simulation_voltage_probe = z172.object({
|
|
3682
|
+
type: z172.literal("simulation_voltage_probe"),
|
|
3662
3683
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
3663
3684
|
"simulation_voltage_probe"
|
|
3664
3685
|
),
|
|
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:
|
|
3686
|
+
source_component_id: z172.string().optional(),
|
|
3687
|
+
name: z172.string().optional(),
|
|
3688
|
+
signal_input_source_port_id: z172.string().optional(),
|
|
3689
|
+
signal_input_source_net_id: z172.string().optional(),
|
|
3690
|
+
reference_input_source_port_id: z172.string().optional(),
|
|
3691
|
+
reference_input_source_net_id: z172.string().optional(),
|
|
3692
|
+
subcircuit_id: z172.string().optional(),
|
|
3693
|
+
color: z172.string().optional()
|
|
3673
3694
|
}).describe(
|
|
3674
3695
|
"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
3696
|
).superRefine((data, ctx) => {
|
|
@@ -3679,20 +3700,20 @@ var simulation_voltage_probe = z171.object({
|
|
|
3679
3700
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
3680
3701
|
if (has_ports && has_nets) {
|
|
3681
3702
|
ctx.addIssue({
|
|
3682
|
-
code:
|
|
3703
|
+
code: z172.ZodIssueCode.custom,
|
|
3683
3704
|
message: "Cannot mix port and net connections in a differential probe."
|
|
3684
3705
|
});
|
|
3685
3706
|
} else if (has_ports) {
|
|
3686
3707
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
3687
3708
|
ctx.addIssue({
|
|
3688
|
-
code:
|
|
3709
|
+
code: z172.ZodIssueCode.custom,
|
|
3689
3710
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
3690
3711
|
});
|
|
3691
3712
|
}
|
|
3692
3713
|
} else if (has_nets) {
|
|
3693
3714
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
3694
3715
|
ctx.addIssue({
|
|
3695
|
-
code:
|
|
3716
|
+
code: z172.ZodIssueCode.custom,
|
|
3696
3717
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
3697
3718
|
});
|
|
3698
3719
|
}
|
|
@@ -3700,7 +3721,7 @@ var simulation_voltage_probe = z171.object({
|
|
|
3700
3721
|
} else {
|
|
3701
3722
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
3702
3723
|
ctx.addIssue({
|
|
3703
|
-
code:
|
|
3724
|
+
code: z172.ZodIssueCode.custom,
|
|
3704
3725
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
3705
3726
|
});
|
|
3706
3727
|
}
|
|
@@ -3709,20 +3730,20 @@ var simulation_voltage_probe = z171.object({
|
|
|
3709
3730
|
expectTypesMatch(true);
|
|
3710
3731
|
|
|
3711
3732
|
// src/simulation/simulation_current_probe.ts
|
|
3712
|
-
import { z as
|
|
3713
|
-
var simulation_current_probe =
|
|
3714
|
-
type:
|
|
3733
|
+
import { z as z173 } from "zod";
|
|
3734
|
+
var simulation_current_probe = z173.object({
|
|
3735
|
+
type: z173.literal("simulation_current_probe"),
|
|
3715
3736
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
3716
3737
|
"simulation_current_probe"
|
|
3717
3738
|
),
|
|
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:
|
|
3739
|
+
source_component_id: z173.string().optional(),
|
|
3740
|
+
name: z173.string().optional(),
|
|
3741
|
+
positive_source_port_id: z173.string().optional(),
|
|
3742
|
+
negative_source_port_id: z173.string().optional(),
|
|
3743
|
+
positive_source_net_id: z173.string().optional(),
|
|
3744
|
+
negative_source_net_id: z173.string().optional(),
|
|
3745
|
+
subcircuit_id: z173.string().optional(),
|
|
3746
|
+
color: z173.string().optional()
|
|
3726
3747
|
}).describe(
|
|
3727
3748
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
3728
3749
|
).superRefine((data, ctx) => {
|
|
@@ -3734,7 +3755,7 @@ var simulation_current_probe = z172.object({
|
|
|
3734
3755
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
3735
3756
|
if (hasPorts && hasNets) {
|
|
3736
3757
|
ctx.addIssue({
|
|
3737
|
-
code:
|
|
3758
|
+
code: z173.ZodIssueCode.custom,
|
|
3738
3759
|
message: "Cannot mix port and net connections in a current probe."
|
|
3739
3760
|
});
|
|
3740
3761
|
return;
|
|
@@ -3742,7 +3763,7 @@ var simulation_current_probe = z172.object({
|
|
|
3742
3763
|
if (hasPorts) {
|
|
3743
3764
|
if (!hasPositivePort || !hasNegativePort) {
|
|
3744
3765
|
ctx.addIssue({
|
|
3745
|
-
code:
|
|
3766
|
+
code: z173.ZodIssueCode.custom,
|
|
3746
3767
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
3747
3768
|
});
|
|
3748
3769
|
}
|
|
@@ -3751,79 +3772,79 @@ var simulation_current_probe = z172.object({
|
|
|
3751
3772
|
if (hasNets) {
|
|
3752
3773
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
3753
3774
|
ctx.addIssue({
|
|
3754
|
-
code:
|
|
3775
|
+
code: z173.ZodIssueCode.custom,
|
|
3755
3776
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
3756
3777
|
});
|
|
3757
3778
|
}
|
|
3758
3779
|
return;
|
|
3759
3780
|
}
|
|
3760
3781
|
ctx.addIssue({
|
|
3761
|
-
code:
|
|
3782
|
+
code: z173.ZodIssueCode.custom,
|
|
3762
3783
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
3763
3784
|
});
|
|
3764
3785
|
});
|
|
3765
3786
|
expectTypesMatch(true);
|
|
3766
3787
|
|
|
3767
3788
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
3768
|
-
import { z as
|
|
3789
|
+
import { z as z174 } from "zod";
|
|
3769
3790
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
3770
|
-
type:
|
|
3791
|
+
type: z174.literal("simulation_unknown_experiment_error"),
|
|
3771
3792
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
3772
3793
|
"simulation_unknown_experiment_error"
|
|
3773
3794
|
),
|
|
3774
|
-
error_type:
|
|
3775
|
-
simulation_experiment_id:
|
|
3776
|
-
subcircuit_id:
|
|
3795
|
+
error_type: z174.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
3796
|
+
simulation_experiment_id: z174.string().optional(),
|
|
3797
|
+
subcircuit_id: z174.string().optional()
|
|
3777
3798
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
3778
3799
|
expectTypesMatch(true);
|
|
3779
3800
|
|
|
3780
3801
|
// src/simulation/simulation_op_amp.ts
|
|
3781
|
-
import { z as
|
|
3782
|
-
var simulation_op_amp =
|
|
3783
|
-
type:
|
|
3802
|
+
import { z as z175 } from "zod";
|
|
3803
|
+
var simulation_op_amp = z175.object({
|
|
3804
|
+
type: z175.literal("simulation_op_amp"),
|
|
3784
3805
|
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:
|
|
3806
|
+
source_component_id: z175.string().optional(),
|
|
3807
|
+
inverting_input_source_port_id: z175.string(),
|
|
3808
|
+
non_inverting_input_source_port_id: z175.string(),
|
|
3809
|
+
output_source_port_id: z175.string(),
|
|
3810
|
+
positive_supply_source_port_id: z175.string(),
|
|
3811
|
+
negative_supply_source_port_id: z175.string()
|
|
3791
3812
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
3792
3813
|
expectTypesMatch(true);
|
|
3793
3814
|
|
|
3794
3815
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
3795
|
-
import { z as
|
|
3796
|
-
var simulation_spice_subcircuit =
|
|
3797
|
-
type:
|
|
3816
|
+
import { z as z176 } from "zod";
|
|
3817
|
+
var simulation_spice_subcircuit = z176.object({
|
|
3818
|
+
type: z176.literal("simulation_spice_subcircuit"),
|
|
3798
3819
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
3799
3820
|
"simulation_spice_subcircuit"
|
|
3800
3821
|
),
|
|
3801
|
-
source_component_id:
|
|
3802
|
-
spice_pin_to_source_port_map:
|
|
3803
|
-
subcircuit_source:
|
|
3822
|
+
source_component_id: z176.string(),
|
|
3823
|
+
spice_pin_to_source_port_map: z176.record(z176.string(), z176.string()),
|
|
3824
|
+
subcircuit_source: z176.string()
|
|
3804
3825
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
3805
3826
|
expectTypesMatch(
|
|
3806
3827
|
true
|
|
3807
3828
|
);
|
|
3808
3829
|
|
|
3809
3830
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
3810
|
-
import { z as
|
|
3831
|
+
import { z as z177 } from "zod";
|
|
3811
3832
|
var hasValue = (value) => value !== void 0;
|
|
3812
|
-
var simulation_oscilloscope_trace =
|
|
3813
|
-
type:
|
|
3833
|
+
var simulation_oscilloscope_trace = z177.object({
|
|
3834
|
+
type: z177.literal("simulation_oscilloscope_trace"),
|
|
3814
3835
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
3815
3836
|
"simulation_oscilloscope_trace"
|
|
3816
3837
|
),
|
|
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:
|
|
3838
|
+
simulation_transient_voltage_graph_id: z177.string().optional(),
|
|
3839
|
+
simulation_transient_current_graph_id: z177.string().optional(),
|
|
3840
|
+
simulation_voltage_probe_id: z177.string().optional(),
|
|
3841
|
+
simulation_current_probe_id: z177.string().optional(),
|
|
3842
|
+
display_name: z177.string().optional(),
|
|
3843
|
+
color: z177.string().optional(),
|
|
3844
|
+
display_center_value: z177.number().optional(),
|
|
3845
|
+
display_center_offset_divs: z177.number().optional(),
|
|
3846
|
+
volts_per_div: z177.number().positive().optional(),
|
|
3847
|
+
amps_per_div: z177.number().positive().optional()
|
|
3827
3848
|
}).describe(
|
|
3828
3849
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
3829
3850
|
).superRefine((data, ctx) => {
|
|
@@ -3837,19 +3858,19 @@ var simulation_oscilloscope_trace = z176.object({
|
|
|
3837
3858
|
].filter(hasValue).length;
|
|
3838
3859
|
if (voltageReferences + currentReferences !== 1) {
|
|
3839
3860
|
ctx.addIssue({
|
|
3840
|
-
code:
|
|
3861
|
+
code: z177.ZodIssueCode.custom,
|
|
3841
3862
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
3842
3863
|
});
|
|
3843
3864
|
}
|
|
3844
3865
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
3845
3866
|
ctx.addIssue({
|
|
3846
|
-
code:
|
|
3867
|
+
code: z177.ZodIssueCode.custom,
|
|
3847
3868
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
3848
3869
|
});
|
|
3849
3870
|
}
|
|
3850
3871
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
3851
3872
|
ctx.addIssue({
|
|
3852
|
-
code:
|
|
3873
|
+
code: z177.ZodIssueCode.custom,
|
|
3853
3874
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
3854
3875
|
});
|
|
3855
3876
|
}
|
|
@@ -3857,8 +3878,8 @@ var simulation_oscilloscope_trace = z176.object({
|
|
|
3857
3878
|
expectTypesMatch(true);
|
|
3858
3879
|
|
|
3859
3880
|
// src/any_circuit_element.ts
|
|
3860
|
-
import { z as
|
|
3861
|
-
var any_circuit_element =
|
|
3881
|
+
import { z as z178 } from "zod";
|
|
3882
|
+
var any_circuit_element = z178.union([
|
|
3862
3883
|
source_trace,
|
|
3863
3884
|
source_port,
|
|
3864
3885
|
source_component_internal_connection,
|
|
@@ -3892,6 +3913,7 @@ var any_circuit_element = z177.union([
|
|
|
3892
3913
|
source_pin_missing_trace_warning,
|
|
3893
3914
|
source_unnamed_trace_warning,
|
|
3894
3915
|
source_missing_manufacturer_part_number_warning,
|
|
3916
|
+
source_refdes_convention_warning,
|
|
3895
3917
|
source_no_power_pin_defined_warning,
|
|
3896
3918
|
source_no_ground_pin_defined_warning,
|
|
3897
3919
|
source_component_pins_underspecified_warning,
|
|
@@ -4217,6 +4239,7 @@ export {
|
|
|
4217
4239
|
source_port,
|
|
4218
4240
|
source_project_metadata,
|
|
4219
4241
|
source_property_ignored_warning,
|
|
4242
|
+
source_refdes_convention_warning,
|
|
4220
4243
|
source_simple_ammeter,
|
|
4221
4244
|
source_simple_battery,
|
|
4222
4245
|
source_simple_capacitor,
|