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