circuit-json 0.0.309 → 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 +16 -0
- package/dist/index.d.mts +185 -2
- package/dist/index.mjs +1122 -1109
- 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,177 +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
|
-
name:
|
|
1129
|
-
subcircuit_id:
|
|
1139
|
+
name: z61.string().optional(),
|
|
1140
|
+
subcircuit_id: z61.string().optional()
|
|
1130
1141
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
1131
1142
|
expectTypesMatch(true);
|
|
1132
1143
|
|
|
1133
1144
|
// src/schematic/schematic_manual_edit_conflict_warning.ts
|
|
1134
|
-
import { z as
|
|
1135
|
-
var schematic_manual_edit_conflict_warning =
|
|
1136
|
-
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"),
|
|
1137
1148
|
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1138
1149
|
"schematic_manual_edit_conflict_warning"
|
|
1139
1150
|
),
|
|
1140
|
-
warning_type:
|
|
1141
|
-
message:
|
|
1142
|
-
schematic_component_id:
|
|
1143
|
-
schematic_group_id:
|
|
1144
|
-
subcircuit_id:
|
|
1145
|
-
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()
|
|
1146
1157
|
}).describe(
|
|
1147
1158
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
1148
1159
|
);
|
|
1149
1160
|
expectTypesMatch(true);
|
|
1150
1161
|
|
|
1151
1162
|
// src/schematic/schematic_group.ts
|
|
1152
|
-
import { z as
|
|
1153
|
-
var schematic_group =
|
|
1154
|
-
type:
|
|
1163
|
+
import { z as z63 } from "zod";
|
|
1164
|
+
var schematic_group = z63.object({
|
|
1165
|
+
type: z63.literal("schematic_group"),
|
|
1155
1166
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
1156
|
-
source_group_id:
|
|
1157
|
-
is_subcircuit:
|
|
1158
|
-
subcircuit_id:
|
|
1167
|
+
source_group_id: z63.string(),
|
|
1168
|
+
is_subcircuit: z63.boolean().optional(),
|
|
1169
|
+
subcircuit_id: z63.string().optional(),
|
|
1159
1170
|
width: length,
|
|
1160
1171
|
height: length,
|
|
1161
1172
|
center: point,
|
|
1162
|
-
schematic_component_ids:
|
|
1163
|
-
show_as_schematic_box:
|
|
1164
|
-
name:
|
|
1165
|
-
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()
|
|
1166
1177
|
}).describe("Defines a group of components on the schematic");
|
|
1167
1178
|
expectTypesMatch(true);
|
|
1168
1179
|
|
|
1169
1180
|
// src/schematic/schematic_table.ts
|
|
1170
|
-
import { z as
|
|
1171
|
-
var schematic_table =
|
|
1172
|
-
type:
|
|
1181
|
+
import { z as z64 } from "zod";
|
|
1182
|
+
var schematic_table = z64.object({
|
|
1183
|
+
type: z64.literal("schematic_table"),
|
|
1173
1184
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
1174
1185
|
anchor_position: point,
|
|
1175
|
-
column_widths:
|
|
1176
|
-
row_heights:
|
|
1186
|
+
column_widths: z64.array(distance),
|
|
1187
|
+
row_heights: z64.array(distance),
|
|
1177
1188
|
cell_padding: distance.optional(),
|
|
1178
1189
|
border_width: distance.optional(),
|
|
1179
|
-
subcircuit_id:
|
|
1180
|
-
schematic_component_id:
|
|
1190
|
+
subcircuit_id: z64.string().optional(),
|
|
1191
|
+
schematic_component_id: z64.string().optional(),
|
|
1181
1192
|
anchor: ninePointAnchor.optional()
|
|
1182
1193
|
}).describe("Defines a table on the schematic");
|
|
1183
1194
|
expectTypesMatch(true);
|
|
1184
1195
|
|
|
1185
1196
|
// src/schematic/schematic_table_cell.ts
|
|
1186
|
-
import { z as
|
|
1187
|
-
var schematic_table_cell =
|
|
1188
|
-
type:
|
|
1197
|
+
import { z as z65 } from "zod";
|
|
1198
|
+
var schematic_table_cell = z65.object({
|
|
1199
|
+
type: z65.literal("schematic_table_cell"),
|
|
1189
1200
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
1190
1201
|
"schematic_table_cell"
|
|
1191
1202
|
),
|
|
1192
|
-
schematic_table_id:
|
|
1193
|
-
start_row_index:
|
|
1194
|
-
end_row_index:
|
|
1195
|
-
start_column_index:
|
|
1196
|
-
end_column_index:
|
|
1197
|
-
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(),
|
|
1198
1209
|
center: point,
|
|
1199
1210
|
width: distance,
|
|
1200
1211
|
height: distance,
|
|
1201
|
-
horizontal_align:
|
|
1202
|
-
vertical_align:
|
|
1212
|
+
horizontal_align: z65.enum(["left", "center", "right"]).optional(),
|
|
1213
|
+
vertical_align: z65.enum(["top", "middle", "bottom"]).optional(),
|
|
1203
1214
|
font_size: distance.optional(),
|
|
1204
|
-
subcircuit_id:
|
|
1215
|
+
subcircuit_id: z65.string().optional()
|
|
1205
1216
|
}).describe("Defines a cell within a schematic_table");
|
|
1206
1217
|
expectTypesMatch(true);
|
|
1207
1218
|
|
|
1208
1219
|
// src/schematic/schematic_sheet.ts
|
|
1209
|
-
import { z as
|
|
1210
|
-
var schematic_sheet =
|
|
1211
|
-
type:
|
|
1220
|
+
import { z as z66 } from "zod";
|
|
1221
|
+
var schematic_sheet = z66.object({
|
|
1222
|
+
type: z66.literal("schematic_sheet"),
|
|
1212
1223
|
schematic_sheet_id: getZodPrefixedIdWithDefault("schematic_sheet"),
|
|
1213
|
-
name:
|
|
1214
|
-
subcircuit_id:
|
|
1224
|
+
name: z66.string().optional(),
|
|
1225
|
+
subcircuit_id: z66.string().optional()
|
|
1215
1226
|
}).describe(
|
|
1216
1227
|
"Defines a schematic sheet or page that components can be placed on"
|
|
1217
1228
|
);
|
|
1218
1229
|
expectTypesMatch(true);
|
|
1219
1230
|
|
|
1220
1231
|
// src/pcb/properties/brep.ts
|
|
1221
|
-
import { z as
|
|
1222
|
-
var point_with_bulge =
|
|
1232
|
+
import { z as z67 } from "zod";
|
|
1233
|
+
var point_with_bulge = z67.object({
|
|
1223
1234
|
x: distance,
|
|
1224
1235
|
y: distance,
|
|
1225
|
-
bulge:
|
|
1236
|
+
bulge: z67.number().optional()
|
|
1226
1237
|
});
|
|
1227
1238
|
expectTypesMatch(true);
|
|
1228
|
-
var ring =
|
|
1229
|
-
vertices:
|
|
1239
|
+
var ring = z67.object({
|
|
1240
|
+
vertices: z67.array(point_with_bulge)
|
|
1230
1241
|
});
|
|
1231
1242
|
expectTypesMatch(true);
|
|
1232
|
-
var brep_shape =
|
|
1243
|
+
var brep_shape = z67.object({
|
|
1233
1244
|
outer_ring: ring,
|
|
1234
|
-
inner_rings:
|
|
1245
|
+
inner_rings: z67.array(ring).default([])
|
|
1235
1246
|
});
|
|
1236
1247
|
expectTypesMatch(true);
|
|
1237
1248
|
|
|
1238
1249
|
// src/pcb/properties/pcb_route_hints.ts
|
|
1239
|
-
import { z as
|
|
1240
|
-
var pcb_route_hint =
|
|
1250
|
+
import { z as z68 } from "zod";
|
|
1251
|
+
var pcb_route_hint = z68.object({
|
|
1241
1252
|
x: distance,
|
|
1242
1253
|
y: distance,
|
|
1243
|
-
via:
|
|
1254
|
+
via: z68.boolean().optional(),
|
|
1244
1255
|
via_to_layer: layer_ref.optional()
|
|
1245
1256
|
});
|
|
1246
|
-
var pcb_route_hints =
|
|
1257
|
+
var pcb_route_hints = z68.array(pcb_route_hint);
|
|
1247
1258
|
expectTypesMatch(true);
|
|
1248
1259
|
expectTypesMatch(true);
|
|
1249
1260
|
|
|
1250
1261
|
// src/pcb/properties/route_hint_point.ts
|
|
1251
|
-
import { z as
|
|
1252
|
-
var route_hint_point =
|
|
1262
|
+
import { z as z69 } from "zod";
|
|
1263
|
+
var route_hint_point = z69.object({
|
|
1253
1264
|
x: distance,
|
|
1254
1265
|
y: distance,
|
|
1255
|
-
via:
|
|
1266
|
+
via: z69.boolean().optional(),
|
|
1256
1267
|
to_layer: layer_ref.optional(),
|
|
1257
1268
|
trace_width: distance.optional()
|
|
1258
1269
|
});
|
|
1259
1270
|
expectTypesMatch(true);
|
|
1260
1271
|
|
|
1261
1272
|
// src/pcb/pcb_component.ts
|
|
1262
|
-
import { z as
|
|
1263
|
-
var pcb_component =
|
|
1264
|
-
type:
|
|
1273
|
+
import { z as z70 } from "zod";
|
|
1274
|
+
var pcb_component = z70.object({
|
|
1275
|
+
type: z70.literal("pcb_component"),
|
|
1265
1276
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
1266
|
-
source_component_id:
|
|
1277
|
+
source_component_id: z70.string(),
|
|
1267
1278
|
center: point,
|
|
1268
1279
|
layer: layer_ref,
|
|
1269
1280
|
rotation,
|
|
1270
1281
|
width: length,
|
|
1271
1282
|
height: length,
|
|
1272
|
-
do_not_place:
|
|
1273
|
-
subcircuit_id:
|
|
1274
|
-
pcb_group_id:
|
|
1275
|
-
position_mode:
|
|
1276
|
-
positioned_relative_to_pcb_group_id:
|
|
1277
|
-
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(
|
|
1278
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"
|
|
1279
1290
|
)
|
|
1280
1291
|
}).describe("Defines a component on the PCB");
|
|
1281
1292
|
expectTypesMatch(true);
|
|
1282
1293
|
|
|
1283
1294
|
// src/pcb/pcb_hole.ts
|
|
1284
|
-
import { z as
|
|
1285
|
-
var pcb_hole_circle =
|
|
1286
|
-
type:
|
|
1295
|
+
import { z as z71 } from "zod";
|
|
1296
|
+
var pcb_hole_circle = z71.object({
|
|
1297
|
+
type: z71.literal("pcb_hole"),
|
|
1287
1298
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1288
|
-
pcb_group_id:
|
|
1289
|
-
subcircuit_id:
|
|
1290
|
-
hole_shape:
|
|
1291
|
-
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(),
|
|
1292
1303
|
x: distance,
|
|
1293
1304
|
y: distance
|
|
1294
1305
|
});
|
|
@@ -1296,14 +1307,14 @@ var pcb_hole_circle_shape = pcb_hole_circle.describe(
|
|
|
1296
1307
|
"Defines a circular hole on the PCB"
|
|
1297
1308
|
);
|
|
1298
1309
|
expectTypesMatch(true);
|
|
1299
|
-
var pcb_hole_rect =
|
|
1300
|
-
type:
|
|
1310
|
+
var pcb_hole_rect = z71.object({
|
|
1311
|
+
type: z71.literal("pcb_hole"),
|
|
1301
1312
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1302
|
-
pcb_group_id:
|
|
1303
|
-
subcircuit_id:
|
|
1304
|
-
hole_shape:
|
|
1305
|
-
hole_width:
|
|
1306
|
-
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(),
|
|
1307
1318
|
x: distance,
|
|
1308
1319
|
y: distance
|
|
1309
1320
|
});
|
|
@@ -1311,13 +1322,13 @@ var pcb_hole_rect_shape = pcb_hole_rect.describe(
|
|
|
1311
1322
|
"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
|
|
1312
1323
|
);
|
|
1313
1324
|
expectTypesMatch(true);
|
|
1314
|
-
var pcb_hole_circle_or_square =
|
|
1315
|
-
type:
|
|
1325
|
+
var pcb_hole_circle_or_square = z71.object({
|
|
1326
|
+
type: z71.literal("pcb_hole"),
|
|
1316
1327
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1317
|
-
pcb_group_id:
|
|
1318
|
-
subcircuit_id:
|
|
1319
|
-
hole_shape:
|
|
1320
|
-
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(),
|
|
1321
1332
|
x: distance,
|
|
1322
1333
|
y: distance
|
|
1323
1334
|
});
|
|
@@ -1325,14 +1336,14 @@ var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
|
1325
1336
|
"Defines a circular or square hole on the PCB"
|
|
1326
1337
|
);
|
|
1327
1338
|
expectTypesMatch(true);
|
|
1328
|
-
var pcb_hole_oval =
|
|
1329
|
-
type:
|
|
1339
|
+
var pcb_hole_oval = z71.object({
|
|
1340
|
+
type: z71.literal("pcb_hole"),
|
|
1330
1341
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1331
|
-
pcb_group_id:
|
|
1332
|
-
subcircuit_id:
|
|
1333
|
-
hole_shape:
|
|
1334
|
-
hole_width:
|
|
1335
|
-
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(),
|
|
1336
1347
|
x: distance,
|
|
1337
1348
|
y: distance
|
|
1338
1349
|
});
|
|
@@ -1340,14 +1351,14 @@ var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
|
1340
1351
|
"Defines an oval hole on the PCB"
|
|
1341
1352
|
);
|
|
1342
1353
|
expectTypesMatch(true);
|
|
1343
|
-
var pcb_hole_pill =
|
|
1344
|
-
type:
|
|
1354
|
+
var pcb_hole_pill = z71.object({
|
|
1355
|
+
type: z71.literal("pcb_hole"),
|
|
1345
1356
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1346
|
-
pcb_group_id:
|
|
1347
|
-
subcircuit_id:
|
|
1348
|
-
hole_shape:
|
|
1349
|
-
hole_width:
|
|
1350
|
-
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(),
|
|
1351
1362
|
x: distance,
|
|
1352
1363
|
y: distance
|
|
1353
1364
|
});
|
|
@@ -1355,14 +1366,14 @@ var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
|
1355
1366
|
"Defines a pill-shaped hole on the PCB"
|
|
1356
1367
|
);
|
|
1357
1368
|
expectTypesMatch(true);
|
|
1358
|
-
var pcb_hole_rotated_pill =
|
|
1359
|
-
type:
|
|
1369
|
+
var pcb_hole_rotated_pill = z71.object({
|
|
1370
|
+
type: z71.literal("pcb_hole"),
|
|
1360
1371
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1361
|
-
pcb_group_id:
|
|
1362
|
-
subcircuit_id:
|
|
1363
|
-
hole_shape:
|
|
1364
|
-
hole_width:
|
|
1365
|
-
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(),
|
|
1366
1377
|
x: distance,
|
|
1367
1378
|
y: distance,
|
|
1368
1379
|
ccw_rotation: rotation
|
|
@@ -1374,118 +1385,118 @@ expectTypesMatch(true);
|
|
|
1374
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);
|
|
1375
1386
|
|
|
1376
1387
|
// src/pcb/pcb_plated_hole.ts
|
|
1377
|
-
import { z as
|
|
1378
|
-
var pcb_plated_hole_circle =
|
|
1379
|
-
type:
|
|
1380
|
-
shape:
|
|
1381
|
-
pcb_group_id:
|
|
1382
|
-
subcircuit_id:
|
|
1383
|
-
outer_diameter:
|
|
1384
|
-
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(),
|
|
1385
1396
|
x: distance,
|
|
1386
1397
|
y: distance,
|
|
1387
|
-
layers:
|
|
1388
|
-
port_hints:
|
|
1389
|
-
pcb_component_id:
|
|
1390
|
-
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(),
|
|
1391
1402
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1392
1403
|
});
|
|
1393
|
-
var pcb_plated_hole_oval =
|
|
1394
|
-
type:
|
|
1395
|
-
shape:
|
|
1396
|
-
pcb_group_id:
|
|
1397
|
-
subcircuit_id:
|
|
1398
|
-
outer_width:
|
|
1399
|
-
outer_height:
|
|
1400
|
-
hole_width:
|
|
1401
|
-
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(),
|
|
1402
1413
|
x: distance,
|
|
1403
1414
|
y: distance,
|
|
1404
1415
|
ccw_rotation: rotation,
|
|
1405
|
-
layers:
|
|
1406
|
-
port_hints:
|
|
1407
|
-
pcb_component_id:
|
|
1408
|
-
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(),
|
|
1409
1420
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1410
1421
|
});
|
|
1411
|
-
var pcb_circular_hole_with_rect_pad =
|
|
1412
|
-
type:
|
|
1413
|
-
shape:
|
|
1414
|
-
pcb_group_id:
|
|
1415
|
-
subcircuit_id:
|
|
1416
|
-
hole_shape:
|
|
1417
|
-
pad_shape:
|
|
1418
|
-
hole_diameter:
|
|
1419
|
-
rect_pad_width:
|
|
1420
|
-
rect_pad_height:
|
|
1421
|
-
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(),
|
|
1422
1433
|
hole_offset_x: distance.default(0),
|
|
1423
1434
|
hole_offset_y: distance.default(0),
|
|
1424
1435
|
x: distance,
|
|
1425
1436
|
y: distance,
|
|
1426
|
-
layers:
|
|
1427
|
-
port_hints:
|
|
1428
|
-
pcb_component_id:
|
|
1429
|
-
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(),
|
|
1430
1441
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1431
1442
|
});
|
|
1432
|
-
var pcb_pill_hole_with_rect_pad =
|
|
1433
|
-
type:
|
|
1434
|
-
shape:
|
|
1435
|
-
pcb_group_id:
|
|
1436
|
-
subcircuit_id:
|
|
1437
|
-
hole_shape:
|
|
1438
|
-
pad_shape:
|
|
1439
|
-
hole_width:
|
|
1440
|
-
hole_height:
|
|
1441
|
-
rect_pad_width:
|
|
1442
|
-
rect_pad_height:
|
|
1443
|
-
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(),
|
|
1444
1455
|
hole_offset_x: distance.default(0),
|
|
1445
1456
|
hole_offset_y: distance.default(0),
|
|
1446
1457
|
x: distance,
|
|
1447
1458
|
y: distance,
|
|
1448
|
-
layers:
|
|
1449
|
-
port_hints:
|
|
1450
|
-
pcb_component_id:
|
|
1451
|
-
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(),
|
|
1452
1463
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1453
1464
|
});
|
|
1454
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
1455
|
-
type:
|
|
1456
|
-
shape:
|
|
1457
|
-
pcb_group_id:
|
|
1458
|
-
subcircuit_id:
|
|
1459
|
-
hole_shape:
|
|
1460
|
-
pad_shape:
|
|
1461
|
-
hole_width:
|
|
1462
|
-
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(),
|
|
1463
1474
|
hole_ccw_rotation: rotation,
|
|
1464
|
-
rect_pad_width:
|
|
1465
|
-
rect_pad_height:
|
|
1466
|
-
rect_border_radius:
|
|
1475
|
+
rect_pad_width: z72.number(),
|
|
1476
|
+
rect_pad_height: z72.number(),
|
|
1477
|
+
rect_border_radius: z72.number().optional(),
|
|
1467
1478
|
rect_ccw_rotation: rotation,
|
|
1468
1479
|
hole_offset_x: distance.default(0),
|
|
1469
1480
|
hole_offset_y: distance.default(0),
|
|
1470
1481
|
x: distance,
|
|
1471
1482
|
y: distance,
|
|
1472
|
-
layers:
|
|
1473
|
-
port_hints:
|
|
1474
|
-
pcb_component_id:
|
|
1475
|
-
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(),
|
|
1476
1487
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1477
1488
|
});
|
|
1478
|
-
var pcb_hole_with_polygon_pad =
|
|
1479
|
-
type:
|
|
1480
|
-
shape:
|
|
1481
|
-
pcb_group_id:
|
|
1482
|
-
subcircuit_id:
|
|
1483
|
-
hole_shape:
|
|
1484
|
-
hole_diameter:
|
|
1485
|
-
hole_width:
|
|
1486
|
-
hole_height:
|
|
1487
|
-
pad_outline:
|
|
1488
|
-
|
|
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({
|
|
1489
1500
|
x: distance,
|
|
1490
1501
|
y: distance
|
|
1491
1502
|
})
|
|
@@ -1494,13 +1505,13 @@ var pcb_hole_with_polygon_pad = z71.object({
|
|
|
1494
1505
|
hole_offset_y: distance.default(0),
|
|
1495
1506
|
x: distance,
|
|
1496
1507
|
y: distance,
|
|
1497
|
-
layers:
|
|
1498
|
-
port_hints:
|
|
1499
|
-
pcb_component_id:
|
|
1500
|
-
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(),
|
|
1501
1512
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1502
1513
|
});
|
|
1503
|
-
var pcb_plated_hole =
|
|
1514
|
+
var pcb_plated_hole = z72.union([
|
|
1504
1515
|
pcb_plated_hole_circle,
|
|
1505
1516
|
pcb_plated_hole_oval,
|
|
1506
1517
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -1518,124 +1529,124 @@ expectTypesMatch(true);
|
|
|
1518
1529
|
expectTypesMatch(true);
|
|
1519
1530
|
|
|
1520
1531
|
// src/pcb/pcb_port.ts
|
|
1521
|
-
import { z as
|
|
1522
|
-
var pcb_port =
|
|
1523
|
-
type:
|
|
1532
|
+
import { z as z73 } from "zod";
|
|
1533
|
+
var pcb_port = z73.object({
|
|
1534
|
+
type: z73.literal("pcb_port"),
|
|
1524
1535
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
1525
|
-
pcb_group_id:
|
|
1526
|
-
subcircuit_id:
|
|
1527
|
-
source_port_id:
|
|
1528
|
-
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(),
|
|
1529
1540
|
x: distance,
|
|
1530
1541
|
y: distance,
|
|
1531
|
-
layers:
|
|
1532
|
-
is_board_pinout:
|
|
1542
|
+
layers: z73.array(layer_ref),
|
|
1543
|
+
is_board_pinout: z73.boolean().optional()
|
|
1533
1544
|
}).describe("Defines a port on the PCB");
|
|
1534
1545
|
expectTypesMatch(true);
|
|
1535
1546
|
|
|
1536
1547
|
// src/pcb/pcb_smtpad.ts
|
|
1537
|
-
import { z as
|
|
1538
|
-
var pcb_smtpad_circle =
|
|
1539
|
-
type:
|
|
1540
|
-
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"),
|
|
1541
1552
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1542
|
-
pcb_group_id:
|
|
1543
|
-
subcircuit_id:
|
|
1553
|
+
pcb_group_id: z74.string().optional(),
|
|
1554
|
+
subcircuit_id: z74.string().optional(),
|
|
1544
1555
|
x: distance,
|
|
1545
1556
|
y: distance,
|
|
1546
|
-
radius:
|
|
1557
|
+
radius: z74.number(),
|
|
1547
1558
|
layer: layer_ref,
|
|
1548
|
-
port_hints:
|
|
1549
|
-
pcb_component_id:
|
|
1550
|
-
pcb_port_id:
|
|
1551
|
-
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()
|
|
1552
1563
|
});
|
|
1553
|
-
var pcb_smtpad_rect =
|
|
1554
|
-
type:
|
|
1555
|
-
shape:
|
|
1564
|
+
var pcb_smtpad_rect = z74.object({
|
|
1565
|
+
type: z74.literal("pcb_smtpad"),
|
|
1566
|
+
shape: z74.literal("rect"),
|
|
1556
1567
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1557
|
-
pcb_group_id:
|
|
1558
|
-
subcircuit_id:
|
|
1568
|
+
pcb_group_id: z74.string().optional(),
|
|
1569
|
+
subcircuit_id: z74.string().optional(),
|
|
1559
1570
|
x: distance,
|
|
1560
1571
|
y: distance,
|
|
1561
|
-
width:
|
|
1562
|
-
height:
|
|
1563
|
-
rect_border_radius:
|
|
1564
|
-
corner_radius:
|
|
1572
|
+
width: z74.number(),
|
|
1573
|
+
height: z74.number(),
|
|
1574
|
+
rect_border_radius: z74.number().optional(),
|
|
1575
|
+
corner_radius: z74.number().optional(),
|
|
1565
1576
|
layer: layer_ref,
|
|
1566
|
-
port_hints:
|
|
1567
|
-
pcb_component_id:
|
|
1568
|
-
pcb_port_id:
|
|
1569
|
-
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()
|
|
1570
1581
|
});
|
|
1571
|
-
var pcb_smtpad_rotated_rect =
|
|
1572
|
-
type:
|
|
1573
|
-
shape:
|
|
1582
|
+
var pcb_smtpad_rotated_rect = z74.object({
|
|
1583
|
+
type: z74.literal("pcb_smtpad"),
|
|
1584
|
+
shape: z74.literal("rotated_rect"),
|
|
1574
1585
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1575
|
-
pcb_group_id:
|
|
1576
|
-
subcircuit_id:
|
|
1586
|
+
pcb_group_id: z74.string().optional(),
|
|
1587
|
+
subcircuit_id: z74.string().optional(),
|
|
1577
1588
|
x: distance,
|
|
1578
1589
|
y: distance,
|
|
1579
|
-
width:
|
|
1580
|
-
height:
|
|
1581
|
-
rect_border_radius:
|
|
1582
|
-
corner_radius:
|
|
1590
|
+
width: z74.number(),
|
|
1591
|
+
height: z74.number(),
|
|
1592
|
+
rect_border_radius: z74.number().optional(),
|
|
1593
|
+
corner_radius: z74.number().optional(),
|
|
1583
1594
|
ccw_rotation: rotation,
|
|
1584
1595
|
layer: layer_ref,
|
|
1585
|
-
port_hints:
|
|
1586
|
-
pcb_component_id:
|
|
1587
|
-
pcb_port_id:
|
|
1588
|
-
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()
|
|
1589
1600
|
});
|
|
1590
|
-
var pcb_smtpad_pill =
|
|
1591
|
-
type:
|
|
1592
|
-
shape:
|
|
1601
|
+
var pcb_smtpad_pill = z74.object({
|
|
1602
|
+
type: z74.literal("pcb_smtpad"),
|
|
1603
|
+
shape: z74.literal("pill"),
|
|
1593
1604
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1594
|
-
pcb_group_id:
|
|
1595
|
-
subcircuit_id:
|
|
1605
|
+
pcb_group_id: z74.string().optional(),
|
|
1606
|
+
subcircuit_id: z74.string().optional(),
|
|
1596
1607
|
x: distance,
|
|
1597
1608
|
y: distance,
|
|
1598
|
-
width:
|
|
1599
|
-
height:
|
|
1600
|
-
radius:
|
|
1609
|
+
width: z74.number(),
|
|
1610
|
+
height: z74.number(),
|
|
1611
|
+
radius: z74.number(),
|
|
1601
1612
|
layer: layer_ref,
|
|
1602
|
-
port_hints:
|
|
1603
|
-
pcb_component_id:
|
|
1604
|
-
pcb_port_id:
|
|
1605
|
-
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()
|
|
1606
1617
|
});
|
|
1607
|
-
var pcb_smtpad_rotated_pill =
|
|
1608
|
-
type:
|
|
1609
|
-
shape:
|
|
1618
|
+
var pcb_smtpad_rotated_pill = z74.object({
|
|
1619
|
+
type: z74.literal("pcb_smtpad"),
|
|
1620
|
+
shape: z74.literal("rotated_pill"),
|
|
1610
1621
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1611
|
-
pcb_group_id:
|
|
1612
|
-
subcircuit_id:
|
|
1622
|
+
pcb_group_id: z74.string().optional(),
|
|
1623
|
+
subcircuit_id: z74.string().optional(),
|
|
1613
1624
|
x: distance,
|
|
1614
1625
|
y: distance,
|
|
1615
|
-
width:
|
|
1616
|
-
height:
|
|
1617
|
-
radius:
|
|
1626
|
+
width: z74.number(),
|
|
1627
|
+
height: z74.number(),
|
|
1628
|
+
radius: z74.number(),
|
|
1618
1629
|
ccw_rotation: rotation,
|
|
1619
1630
|
layer: layer_ref,
|
|
1620
|
-
port_hints:
|
|
1621
|
-
pcb_component_id:
|
|
1622
|
-
pcb_port_id:
|
|
1623
|
-
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()
|
|
1624
1635
|
});
|
|
1625
|
-
var pcb_smtpad_polygon =
|
|
1626
|
-
type:
|
|
1627
|
-
shape:
|
|
1636
|
+
var pcb_smtpad_polygon = z74.object({
|
|
1637
|
+
type: z74.literal("pcb_smtpad"),
|
|
1638
|
+
shape: z74.literal("polygon"),
|
|
1628
1639
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1629
|
-
pcb_group_id:
|
|
1630
|
-
subcircuit_id:
|
|
1631
|
-
points:
|
|
1640
|
+
pcb_group_id: z74.string().optional(),
|
|
1641
|
+
subcircuit_id: z74.string().optional(),
|
|
1642
|
+
points: z74.array(point),
|
|
1632
1643
|
layer: layer_ref,
|
|
1633
|
-
port_hints:
|
|
1634
|
-
pcb_component_id:
|
|
1635
|
-
pcb_port_id:
|
|
1636
|
-
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()
|
|
1637
1648
|
});
|
|
1638
|
-
var pcb_smtpad =
|
|
1649
|
+
var pcb_smtpad = z74.discriminatedUnion("shape", [
|
|
1639
1650
|
pcb_smtpad_circle,
|
|
1640
1651
|
pcb_smtpad_rect,
|
|
1641
1652
|
pcb_smtpad_rotated_rect,
|
|
@@ -1651,79 +1662,79 @@ expectTypesMatch(true);
|
|
|
1651
1662
|
expectTypesMatch(true);
|
|
1652
1663
|
|
|
1653
1664
|
// src/pcb/pcb_solder_paste.ts
|
|
1654
|
-
import { z as
|
|
1655
|
-
var pcb_solder_paste_circle =
|
|
1656
|
-
type:
|
|
1657
|
-
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"),
|
|
1658
1669
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1659
|
-
pcb_group_id:
|
|
1660
|
-
subcircuit_id:
|
|
1670
|
+
pcb_group_id: z75.string().optional(),
|
|
1671
|
+
subcircuit_id: z75.string().optional(),
|
|
1661
1672
|
x: distance,
|
|
1662
1673
|
y: distance,
|
|
1663
|
-
radius:
|
|
1674
|
+
radius: z75.number(),
|
|
1664
1675
|
layer: layer_ref,
|
|
1665
|
-
pcb_component_id:
|
|
1666
|
-
pcb_smtpad_id:
|
|
1676
|
+
pcb_component_id: z75.string().optional(),
|
|
1677
|
+
pcb_smtpad_id: z75.string().optional()
|
|
1667
1678
|
});
|
|
1668
|
-
var pcb_solder_paste_rect =
|
|
1669
|
-
type:
|
|
1670
|
-
shape:
|
|
1679
|
+
var pcb_solder_paste_rect = z75.object({
|
|
1680
|
+
type: z75.literal("pcb_solder_paste"),
|
|
1681
|
+
shape: z75.literal("rect"),
|
|
1671
1682
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1672
|
-
pcb_group_id:
|
|
1673
|
-
subcircuit_id:
|
|
1683
|
+
pcb_group_id: z75.string().optional(),
|
|
1684
|
+
subcircuit_id: z75.string().optional(),
|
|
1674
1685
|
x: distance,
|
|
1675
1686
|
y: distance,
|
|
1676
|
-
width:
|
|
1677
|
-
height:
|
|
1687
|
+
width: z75.number(),
|
|
1688
|
+
height: z75.number(),
|
|
1678
1689
|
layer: layer_ref,
|
|
1679
|
-
pcb_component_id:
|
|
1680
|
-
pcb_smtpad_id:
|
|
1690
|
+
pcb_component_id: z75.string().optional(),
|
|
1691
|
+
pcb_smtpad_id: z75.string().optional()
|
|
1681
1692
|
});
|
|
1682
|
-
var pcb_solder_paste_pill =
|
|
1683
|
-
type:
|
|
1684
|
-
shape:
|
|
1693
|
+
var pcb_solder_paste_pill = z75.object({
|
|
1694
|
+
type: z75.literal("pcb_solder_paste"),
|
|
1695
|
+
shape: z75.literal("pill"),
|
|
1685
1696
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1686
|
-
pcb_group_id:
|
|
1687
|
-
subcircuit_id:
|
|
1697
|
+
pcb_group_id: z75.string().optional(),
|
|
1698
|
+
subcircuit_id: z75.string().optional(),
|
|
1688
1699
|
x: distance,
|
|
1689
1700
|
y: distance,
|
|
1690
|
-
width:
|
|
1691
|
-
height:
|
|
1692
|
-
radius:
|
|
1701
|
+
width: z75.number(),
|
|
1702
|
+
height: z75.number(),
|
|
1703
|
+
radius: z75.number(),
|
|
1693
1704
|
layer: layer_ref,
|
|
1694
|
-
pcb_component_id:
|
|
1695
|
-
pcb_smtpad_id:
|
|
1705
|
+
pcb_component_id: z75.string().optional(),
|
|
1706
|
+
pcb_smtpad_id: z75.string().optional()
|
|
1696
1707
|
});
|
|
1697
|
-
var pcb_solder_paste_rotated_rect =
|
|
1698
|
-
type:
|
|
1699
|
-
shape:
|
|
1708
|
+
var pcb_solder_paste_rotated_rect = z75.object({
|
|
1709
|
+
type: z75.literal("pcb_solder_paste"),
|
|
1710
|
+
shape: z75.literal("rotated_rect"),
|
|
1700
1711
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1701
|
-
pcb_group_id:
|
|
1702
|
-
subcircuit_id:
|
|
1712
|
+
pcb_group_id: z75.string().optional(),
|
|
1713
|
+
subcircuit_id: z75.string().optional(),
|
|
1703
1714
|
x: distance,
|
|
1704
1715
|
y: distance,
|
|
1705
|
-
width:
|
|
1706
|
-
height:
|
|
1716
|
+
width: z75.number(),
|
|
1717
|
+
height: z75.number(),
|
|
1707
1718
|
ccw_rotation: distance,
|
|
1708
1719
|
layer: layer_ref,
|
|
1709
|
-
pcb_component_id:
|
|
1710
|
-
pcb_smtpad_id:
|
|
1720
|
+
pcb_component_id: z75.string().optional(),
|
|
1721
|
+
pcb_smtpad_id: z75.string().optional()
|
|
1711
1722
|
});
|
|
1712
|
-
var pcb_solder_paste_oval =
|
|
1713
|
-
type:
|
|
1714
|
-
shape:
|
|
1723
|
+
var pcb_solder_paste_oval = z75.object({
|
|
1724
|
+
type: z75.literal("pcb_solder_paste"),
|
|
1725
|
+
shape: z75.literal("oval"),
|
|
1715
1726
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1716
|
-
pcb_group_id:
|
|
1717
|
-
subcircuit_id:
|
|
1727
|
+
pcb_group_id: z75.string().optional(),
|
|
1728
|
+
subcircuit_id: z75.string().optional(),
|
|
1718
1729
|
x: distance,
|
|
1719
1730
|
y: distance,
|
|
1720
|
-
width:
|
|
1721
|
-
height:
|
|
1731
|
+
width: z75.number(),
|
|
1732
|
+
height: z75.number(),
|
|
1722
1733
|
layer: layer_ref,
|
|
1723
|
-
pcb_component_id:
|
|
1724
|
-
pcb_smtpad_id:
|
|
1734
|
+
pcb_component_id: z75.string().optional(),
|
|
1735
|
+
pcb_smtpad_id: z75.string().optional()
|
|
1725
1736
|
});
|
|
1726
|
-
var pcb_solder_paste =
|
|
1737
|
+
var pcb_solder_paste = z75.union([
|
|
1727
1738
|
pcb_solder_paste_circle,
|
|
1728
1739
|
pcb_solder_paste_rect,
|
|
1729
1740
|
pcb_solder_paste_pill,
|
|
@@ -1739,146 +1750,146 @@ expectTypesMatch(
|
|
|
1739
1750
|
expectTypesMatch(true);
|
|
1740
1751
|
|
|
1741
1752
|
// src/pcb/pcb_text.ts
|
|
1742
|
-
import { z as
|
|
1743
|
-
var pcb_text =
|
|
1744
|
-
type:
|
|
1753
|
+
import { z as z76 } from "zod";
|
|
1754
|
+
var pcb_text = z76.object({
|
|
1755
|
+
type: z76.literal("pcb_text"),
|
|
1745
1756
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
1746
|
-
pcb_group_id:
|
|
1747
|
-
subcircuit_id:
|
|
1748
|
-
text:
|
|
1757
|
+
pcb_group_id: z76.string().optional(),
|
|
1758
|
+
subcircuit_id: z76.string().optional(),
|
|
1759
|
+
text: z76.string(),
|
|
1749
1760
|
center: point,
|
|
1750
1761
|
layer: layer_ref,
|
|
1751
1762
|
width: length,
|
|
1752
1763
|
height: length,
|
|
1753
|
-
lines:
|
|
1764
|
+
lines: z76.number(),
|
|
1754
1765
|
// @ts-ignore
|
|
1755
|
-
align:
|
|
1766
|
+
align: z76.enum(["bottom-left"])
|
|
1756
1767
|
}).describe("Defines text on the PCB");
|
|
1757
1768
|
expectTypesMatch(true);
|
|
1758
1769
|
|
|
1759
1770
|
// src/pcb/pcb_trace.ts
|
|
1760
|
-
import { z as
|
|
1761
|
-
var pcb_trace_route_point_wire =
|
|
1762
|
-
route_type:
|
|
1771
|
+
import { z as z77 } from "zod";
|
|
1772
|
+
var pcb_trace_route_point_wire = z77.object({
|
|
1773
|
+
route_type: z77.literal("wire"),
|
|
1763
1774
|
x: distance,
|
|
1764
1775
|
y: distance,
|
|
1765
1776
|
width: distance,
|
|
1766
|
-
start_pcb_port_id:
|
|
1767
|
-
end_pcb_port_id:
|
|
1777
|
+
start_pcb_port_id: z77.string().optional(),
|
|
1778
|
+
end_pcb_port_id: z77.string().optional(),
|
|
1768
1779
|
layer: layer_ref
|
|
1769
1780
|
});
|
|
1770
|
-
var pcb_trace_route_point_via =
|
|
1771
|
-
route_type:
|
|
1781
|
+
var pcb_trace_route_point_via = z77.object({
|
|
1782
|
+
route_type: z77.literal("via"),
|
|
1772
1783
|
x: distance,
|
|
1773
1784
|
y: distance,
|
|
1774
1785
|
hole_diameter: distance.optional(),
|
|
1775
1786
|
outer_diameter: distance.optional(),
|
|
1776
|
-
from_layer:
|
|
1777
|
-
to_layer:
|
|
1787
|
+
from_layer: z77.string(),
|
|
1788
|
+
to_layer: z77.string()
|
|
1778
1789
|
});
|
|
1779
|
-
var pcb_trace_route_point =
|
|
1790
|
+
var pcb_trace_route_point = z77.union([
|
|
1780
1791
|
pcb_trace_route_point_wire,
|
|
1781
1792
|
pcb_trace_route_point_via
|
|
1782
1793
|
]);
|
|
1783
|
-
var pcb_trace =
|
|
1784
|
-
type:
|
|
1785
|
-
source_trace_id:
|
|
1786
|
-
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(),
|
|
1787
1798
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
1788
|
-
pcb_group_id:
|
|
1789
|
-
subcircuit_id:
|
|
1790
|
-
route_thickness_mode:
|
|
1791
|
-
route_order_index:
|
|
1792
|
-
should_round_corners:
|
|
1793
|
-
trace_length:
|
|
1794
|
-
highlight_color:
|
|
1795
|
-
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)
|
|
1796
1807
|
}).describe("Defines a trace on the PCB");
|
|
1797
1808
|
expectTypesMatch(true);
|
|
1798
1809
|
expectTypesMatch(true);
|
|
1799
1810
|
|
|
1800
1811
|
// src/pcb/pcb_trace_error.ts
|
|
1801
|
-
import { z as
|
|
1802
|
-
var pcb_trace_error =
|
|
1803
|
-
type:
|
|
1812
|
+
import { z as z78 } from "zod";
|
|
1813
|
+
var pcb_trace_error = z78.object({
|
|
1814
|
+
type: z78.literal("pcb_trace_error"),
|
|
1804
1815
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
1805
|
-
error_type:
|
|
1806
|
-
message:
|
|
1816
|
+
error_type: z78.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
1817
|
+
message: z78.string(),
|
|
1807
1818
|
center: point.optional(),
|
|
1808
|
-
pcb_trace_id:
|
|
1809
|
-
source_trace_id:
|
|
1810
|
-
pcb_component_ids:
|
|
1811
|
-
pcb_port_ids:
|
|
1812
|
-
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()
|
|
1813
1824
|
}).describe("Defines a trace error on the PCB");
|
|
1814
1825
|
expectTypesMatch(true);
|
|
1815
1826
|
|
|
1816
1827
|
// src/pcb/pcb_trace_missing_error.ts
|
|
1817
|
-
import { z as
|
|
1818
|
-
var pcb_trace_missing_error =
|
|
1819
|
-
type:
|
|
1828
|
+
import { z as z79 } from "zod";
|
|
1829
|
+
var pcb_trace_missing_error = z79.object({
|
|
1830
|
+
type: z79.literal("pcb_trace_missing_error"),
|
|
1820
1831
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
1821
1832
|
"pcb_trace_missing_error"
|
|
1822
1833
|
),
|
|
1823
|
-
error_type:
|
|
1824
|
-
message:
|
|
1834
|
+
error_type: z79.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
1835
|
+
message: z79.string(),
|
|
1825
1836
|
center: point.optional(),
|
|
1826
|
-
source_trace_id:
|
|
1827
|
-
pcb_component_ids:
|
|
1828
|
-
pcb_port_ids:
|
|
1829
|
-
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()
|
|
1830
1841
|
}).describe(
|
|
1831
1842
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
1832
1843
|
);
|
|
1833
1844
|
expectTypesMatch(true);
|
|
1834
1845
|
|
|
1835
1846
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
1836
|
-
import { z as
|
|
1837
|
-
var pcb_port_not_matched_error =
|
|
1838
|
-
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"),
|
|
1839
1850
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1840
|
-
error_type:
|
|
1841
|
-
message:
|
|
1842
|
-
pcb_component_ids:
|
|
1843
|
-
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()
|
|
1844
1855
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
1845
1856
|
expectTypesMatch(true);
|
|
1846
1857
|
|
|
1847
1858
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
1848
|
-
import { z as
|
|
1849
|
-
var pcb_port_not_connected_error =
|
|
1850
|
-
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"),
|
|
1851
1862
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
1852
1863
|
"pcb_port_not_connected_error"
|
|
1853
1864
|
),
|
|
1854
|
-
error_type:
|
|
1855
|
-
message:
|
|
1856
|
-
pcb_port_ids:
|
|
1857
|
-
pcb_component_ids:
|
|
1858
|
-
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()
|
|
1859
1870
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
1860
1871
|
expectTypesMatch(
|
|
1861
1872
|
true
|
|
1862
1873
|
);
|
|
1863
1874
|
|
|
1864
1875
|
// src/pcb/pcb_net.ts
|
|
1865
|
-
import { z as
|
|
1866
|
-
var pcb_net =
|
|
1867
|
-
type:
|
|
1876
|
+
import { z as z82 } from "zod";
|
|
1877
|
+
var pcb_net = z82.object({
|
|
1878
|
+
type: z82.literal("pcb_net"),
|
|
1868
1879
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
1869
|
-
source_net_id:
|
|
1870
|
-
highlight_color:
|
|
1880
|
+
source_net_id: z82.string().optional(),
|
|
1881
|
+
highlight_color: z82.string().optional()
|
|
1871
1882
|
}).describe("Defines a net on the PCB");
|
|
1872
1883
|
expectTypesMatch(true);
|
|
1873
1884
|
|
|
1874
1885
|
// src/pcb/pcb_via.ts
|
|
1875
|
-
import { z as
|
|
1876
|
-
var pcb_via =
|
|
1877
|
-
type:
|
|
1886
|
+
import { z as z83 } from "zod";
|
|
1887
|
+
var pcb_via = z83.object({
|
|
1888
|
+
type: z83.literal("pcb_via"),
|
|
1878
1889
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
1879
|
-
pcb_group_id:
|
|
1880
|
-
subcircuit_id:
|
|
1881
|
-
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(),
|
|
1882
1893
|
x: distance,
|
|
1883
1894
|
y: distance,
|
|
1884
1895
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -1887,75 +1898,75 @@ var pcb_via = z82.object({
|
|
|
1887
1898
|
from_layer: layer_ref.optional(),
|
|
1888
1899
|
/** @deprecated */
|
|
1889
1900
|
to_layer: layer_ref.optional(),
|
|
1890
|
-
layers:
|
|
1891
|
-
pcb_trace_id:
|
|
1892
|
-
net_is_assignable:
|
|
1893
|
-
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()
|
|
1894
1905
|
}).describe("Defines a via on the PCB");
|
|
1895
1906
|
expectTypesMatch(true);
|
|
1896
1907
|
|
|
1897
1908
|
// src/pcb/pcb_board.ts
|
|
1898
|
-
import { z as
|
|
1899
|
-
var pcb_board =
|
|
1900
|
-
type:
|
|
1909
|
+
import { z as z84 } from "zod";
|
|
1910
|
+
var pcb_board = z84.object({
|
|
1911
|
+
type: z84.literal("pcb_board"),
|
|
1901
1912
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
1902
|
-
pcb_panel_id:
|
|
1903
|
-
is_subcircuit:
|
|
1904
|
-
subcircuit_id:
|
|
1913
|
+
pcb_panel_id: z84.string().optional(),
|
|
1914
|
+
is_subcircuit: z84.boolean().optional(),
|
|
1915
|
+
subcircuit_id: z84.string().optional(),
|
|
1905
1916
|
width: length.optional(),
|
|
1906
1917
|
height: length.optional(),
|
|
1907
1918
|
center: point,
|
|
1908
1919
|
thickness: length.optional().default(1.4),
|
|
1909
|
-
num_layers:
|
|
1910
|
-
outline:
|
|
1911
|
-
shape:
|
|
1912
|
-
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")
|
|
1913
1924
|
}).describe("Defines the board outline of the PCB");
|
|
1914
1925
|
expectTypesMatch(true);
|
|
1915
1926
|
|
|
1916
1927
|
// src/pcb/pcb_panel.ts
|
|
1917
|
-
import { z as
|
|
1918
|
-
var pcb_panel =
|
|
1919
|
-
type:
|
|
1928
|
+
import { z as z85 } from "zod";
|
|
1929
|
+
var pcb_panel = z85.object({
|
|
1930
|
+
type: z85.literal("pcb_panel"),
|
|
1920
1931
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
1921
1932
|
width: length,
|
|
1922
1933
|
height: length,
|
|
1923
1934
|
center: point,
|
|
1924
|
-
covered_with_solder_mask:
|
|
1935
|
+
covered_with_solder_mask: z85.boolean().optional().default(true)
|
|
1925
1936
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
1926
1937
|
expectTypesMatch(true);
|
|
1927
1938
|
|
|
1928
1939
|
// src/pcb/pcb_placement_error.ts
|
|
1929
|
-
import { z as
|
|
1930
|
-
var pcb_placement_error =
|
|
1931
|
-
type:
|
|
1940
|
+
import { z as z86 } from "zod";
|
|
1941
|
+
var pcb_placement_error = z86.object({
|
|
1942
|
+
type: z86.literal("pcb_placement_error"),
|
|
1932
1943
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
1933
|
-
error_type:
|
|
1934
|
-
message:
|
|
1935
|
-
subcircuit_id:
|
|
1944
|
+
error_type: z86.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
1945
|
+
message: z86.string(),
|
|
1946
|
+
subcircuit_id: z86.string().optional()
|
|
1936
1947
|
}).describe("Defines a placement error on the PCB");
|
|
1937
1948
|
expectTypesMatch(true);
|
|
1938
1949
|
|
|
1939
1950
|
// src/pcb/pcb_trace_hint.ts
|
|
1940
|
-
import { z as
|
|
1941
|
-
var pcb_trace_hint =
|
|
1942
|
-
type:
|
|
1951
|
+
import { z as z87 } from "zod";
|
|
1952
|
+
var pcb_trace_hint = z87.object({
|
|
1953
|
+
type: z87.literal("pcb_trace_hint"),
|
|
1943
1954
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
1944
|
-
pcb_port_id:
|
|
1945
|
-
pcb_component_id:
|
|
1946
|
-
route:
|
|
1947
|
-
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()
|
|
1948
1959
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
1949
1960
|
expectTypesMatch(true);
|
|
1950
1961
|
|
|
1951
1962
|
// src/pcb/pcb_silkscreen_line.ts
|
|
1952
|
-
import { z as
|
|
1953
|
-
var pcb_silkscreen_line =
|
|
1954
|
-
type:
|
|
1963
|
+
import { z as z88 } from "zod";
|
|
1964
|
+
var pcb_silkscreen_line = z88.object({
|
|
1965
|
+
type: z88.literal("pcb_silkscreen_line"),
|
|
1955
1966
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
1956
|
-
pcb_component_id:
|
|
1957
|
-
pcb_group_id:
|
|
1958
|
-
subcircuit_id:
|
|
1967
|
+
pcb_component_id: z88.string(),
|
|
1968
|
+
pcb_group_id: z88.string().optional(),
|
|
1969
|
+
subcircuit_id: z88.string().optional(),
|
|
1959
1970
|
stroke_width: distance.default("0.1mm"),
|
|
1960
1971
|
x1: distance,
|
|
1961
1972
|
y1: distance,
|
|
@@ -1966,32 +1977,32 @@ var pcb_silkscreen_line = z87.object({
|
|
|
1966
1977
|
expectTypesMatch(true);
|
|
1967
1978
|
|
|
1968
1979
|
// src/pcb/pcb_silkscreen_path.ts
|
|
1969
|
-
import { z as
|
|
1970
|
-
var pcb_silkscreen_path =
|
|
1971
|
-
type:
|
|
1980
|
+
import { z as z89 } from "zod";
|
|
1981
|
+
var pcb_silkscreen_path = z89.object({
|
|
1982
|
+
type: z89.literal("pcb_silkscreen_path"),
|
|
1972
1983
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
1973
|
-
pcb_component_id:
|
|
1974
|
-
pcb_group_id:
|
|
1975
|
-
subcircuit_id:
|
|
1984
|
+
pcb_component_id: z89.string(),
|
|
1985
|
+
pcb_group_id: z89.string().optional(),
|
|
1986
|
+
subcircuit_id: z89.string().optional(),
|
|
1976
1987
|
layer: visible_layer,
|
|
1977
|
-
route:
|
|
1988
|
+
route: z89.array(point),
|
|
1978
1989
|
stroke_width: length
|
|
1979
1990
|
}).describe("Defines a silkscreen path on the PCB");
|
|
1980
1991
|
expectTypesMatch(true);
|
|
1981
1992
|
|
|
1982
1993
|
// src/pcb/pcb_silkscreen_text.ts
|
|
1983
|
-
import { z as
|
|
1984
|
-
var pcb_silkscreen_text =
|
|
1985
|
-
type:
|
|
1994
|
+
import { z as z90 } from "zod";
|
|
1995
|
+
var pcb_silkscreen_text = z90.object({
|
|
1996
|
+
type: z90.literal("pcb_silkscreen_text"),
|
|
1986
1997
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
1987
|
-
pcb_group_id:
|
|
1988
|
-
subcircuit_id:
|
|
1989
|
-
font:
|
|
1998
|
+
pcb_group_id: z90.string().optional(),
|
|
1999
|
+
subcircuit_id: z90.string().optional(),
|
|
2000
|
+
font: z90.literal("tscircuit2024").default("tscircuit2024"),
|
|
1990
2001
|
font_size: distance.default("0.2mm"),
|
|
1991
|
-
pcb_component_id:
|
|
1992
|
-
text:
|
|
1993
|
-
is_knockout:
|
|
1994
|
-
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({
|
|
1995
2006
|
left: length,
|
|
1996
2007
|
top: length,
|
|
1997
2008
|
bottom: length,
|
|
@@ -2002,27 +2013,27 @@ var pcb_silkscreen_text = z89.object({
|
|
|
2002
2013
|
bottom: "0.2mm",
|
|
2003
2014
|
right: "0.2mm"
|
|
2004
2015
|
}).optional(),
|
|
2005
|
-
ccw_rotation:
|
|
2016
|
+
ccw_rotation: z90.number().optional(),
|
|
2006
2017
|
layer: layer_ref,
|
|
2007
|
-
is_mirrored:
|
|
2018
|
+
is_mirrored: z90.boolean().default(false).optional(),
|
|
2008
2019
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2009
2020
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2010
2021
|
}).describe("Defines silkscreen text on the PCB");
|
|
2011
2022
|
expectTypesMatch(true);
|
|
2012
2023
|
|
|
2013
2024
|
// src/pcb/pcb_copper_text.ts
|
|
2014
|
-
import { z as
|
|
2015
|
-
var pcb_copper_text =
|
|
2016
|
-
type:
|
|
2025
|
+
import { z as z91 } from "zod";
|
|
2026
|
+
var pcb_copper_text = z91.object({
|
|
2027
|
+
type: z91.literal("pcb_copper_text"),
|
|
2017
2028
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2018
|
-
pcb_group_id:
|
|
2019
|
-
subcircuit_id:
|
|
2020
|
-
font:
|
|
2029
|
+
pcb_group_id: z91.string().optional(),
|
|
2030
|
+
subcircuit_id: z91.string().optional(),
|
|
2031
|
+
font: z91.literal("tscircuit2024").default("tscircuit2024"),
|
|
2021
2032
|
font_size: distance.default("0.2mm"),
|
|
2022
|
-
pcb_component_id:
|
|
2023
|
-
text:
|
|
2024
|
-
is_knockout:
|
|
2025
|
-
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({
|
|
2026
2037
|
left: length,
|
|
2027
2038
|
top: length,
|
|
2028
2039
|
bottom: length,
|
|
@@ -2033,44 +2044,44 @@ var pcb_copper_text = z90.object({
|
|
|
2033
2044
|
bottom: "0.2mm",
|
|
2034
2045
|
right: "0.2mm"
|
|
2035
2046
|
}).optional(),
|
|
2036
|
-
ccw_rotation:
|
|
2047
|
+
ccw_rotation: z91.number().optional(),
|
|
2037
2048
|
layer: layer_ref,
|
|
2038
|
-
is_mirrored:
|
|
2049
|
+
is_mirrored: z91.boolean().default(false).optional(),
|
|
2039
2050
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2040
2051
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2041
2052
|
}).describe("Defines copper text on the PCB");
|
|
2042
2053
|
expectTypesMatch(true);
|
|
2043
2054
|
|
|
2044
2055
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2045
|
-
import { z as
|
|
2046
|
-
var pcb_silkscreen_rect =
|
|
2047
|
-
type:
|
|
2056
|
+
import { z as z92 } from "zod";
|
|
2057
|
+
var pcb_silkscreen_rect = z92.object({
|
|
2058
|
+
type: z92.literal("pcb_silkscreen_rect"),
|
|
2048
2059
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2049
|
-
pcb_component_id:
|
|
2050
|
-
pcb_group_id:
|
|
2051
|
-
subcircuit_id:
|
|
2060
|
+
pcb_component_id: z92.string(),
|
|
2061
|
+
pcb_group_id: z92.string().optional(),
|
|
2062
|
+
subcircuit_id: z92.string().optional(),
|
|
2052
2063
|
center: point,
|
|
2053
2064
|
width: length,
|
|
2054
2065
|
height: length,
|
|
2055
2066
|
layer: layer_ref,
|
|
2056
2067
|
stroke_width: length.default("1mm"),
|
|
2057
2068
|
corner_radius: length.optional(),
|
|
2058
|
-
is_filled:
|
|
2059
|
-
has_stroke:
|
|
2060
|
-
is_stroke_dashed:
|
|
2069
|
+
is_filled: z92.boolean().default(true).optional(),
|
|
2070
|
+
has_stroke: z92.boolean().optional(),
|
|
2071
|
+
is_stroke_dashed: z92.boolean().optional()
|
|
2061
2072
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2062
2073
|
expectTypesMatch(true);
|
|
2063
2074
|
|
|
2064
2075
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2065
|
-
import { z as
|
|
2066
|
-
var pcb_silkscreen_circle =
|
|
2067
|
-
type:
|
|
2076
|
+
import { z as z93 } from "zod";
|
|
2077
|
+
var pcb_silkscreen_circle = z93.object({
|
|
2078
|
+
type: z93.literal("pcb_silkscreen_circle"),
|
|
2068
2079
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2069
2080
|
"pcb_silkscreen_circle"
|
|
2070
2081
|
),
|
|
2071
|
-
pcb_component_id:
|
|
2072
|
-
pcb_group_id:
|
|
2073
|
-
subcircuit_id:
|
|
2082
|
+
pcb_component_id: z93.string(),
|
|
2083
|
+
pcb_group_id: z93.string().optional(),
|
|
2084
|
+
subcircuit_id: z93.string().optional(),
|
|
2074
2085
|
center: point,
|
|
2075
2086
|
radius: length,
|
|
2076
2087
|
layer: visible_layer,
|
|
@@ -2079,13 +2090,13 @@ var pcb_silkscreen_circle = z92.object({
|
|
|
2079
2090
|
expectTypesMatch(true);
|
|
2080
2091
|
|
|
2081
2092
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2082
|
-
import { z as
|
|
2083
|
-
var pcb_silkscreen_oval =
|
|
2084
|
-
type:
|
|
2093
|
+
import { z as z94 } from "zod";
|
|
2094
|
+
var pcb_silkscreen_oval = z94.object({
|
|
2095
|
+
type: z94.literal("pcb_silkscreen_oval"),
|
|
2085
2096
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2086
|
-
pcb_component_id:
|
|
2087
|
-
pcb_group_id:
|
|
2088
|
-
subcircuit_id:
|
|
2097
|
+
pcb_component_id: z94.string(),
|
|
2098
|
+
pcb_group_id: z94.string().optional(),
|
|
2099
|
+
subcircuit_id: z94.string().optional(),
|
|
2089
2100
|
center: point,
|
|
2090
2101
|
radius_x: distance,
|
|
2091
2102
|
radius_y: distance,
|
|
@@ -2094,255 +2105,255 @@ var pcb_silkscreen_oval = z93.object({
|
|
|
2094
2105
|
expectTypesMatch(true);
|
|
2095
2106
|
|
|
2096
2107
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2097
|
-
import { z as
|
|
2098
|
-
var pcb_fabrication_note_text =
|
|
2099
|
-
type:
|
|
2108
|
+
import { z as z95 } from "zod";
|
|
2109
|
+
var pcb_fabrication_note_text = z95.object({
|
|
2110
|
+
type: z95.literal("pcb_fabrication_note_text"),
|
|
2100
2111
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2101
2112
|
"pcb_fabrication_note_text"
|
|
2102
2113
|
),
|
|
2103
|
-
subcircuit_id:
|
|
2104
|
-
pcb_group_id:
|
|
2105
|
-
font:
|
|
2114
|
+
subcircuit_id: z95.string().optional(),
|
|
2115
|
+
pcb_group_id: z95.string().optional(),
|
|
2116
|
+
font: z95.literal("tscircuit2024").default("tscircuit2024"),
|
|
2106
2117
|
font_size: distance.default("1mm"),
|
|
2107
|
-
pcb_component_id:
|
|
2108
|
-
text:
|
|
2118
|
+
pcb_component_id: z95.string(),
|
|
2119
|
+
text: z95.string(),
|
|
2109
2120
|
layer: visible_layer,
|
|
2110
2121
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2111
|
-
anchor_alignment:
|
|
2112
|
-
color:
|
|
2122
|
+
anchor_alignment: z95.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2123
|
+
color: z95.string().optional()
|
|
2113
2124
|
}).describe(
|
|
2114
2125
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2115
2126
|
);
|
|
2116
2127
|
expectTypesMatch(true);
|
|
2117
2128
|
|
|
2118
2129
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2119
|
-
import { z as
|
|
2120
|
-
var pcb_fabrication_note_path =
|
|
2121
|
-
type:
|
|
2130
|
+
import { z as z96 } from "zod";
|
|
2131
|
+
var pcb_fabrication_note_path = z96.object({
|
|
2132
|
+
type: z96.literal("pcb_fabrication_note_path"),
|
|
2122
2133
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2123
2134
|
"pcb_fabrication_note_path"
|
|
2124
2135
|
),
|
|
2125
|
-
pcb_component_id:
|
|
2126
|
-
subcircuit_id:
|
|
2136
|
+
pcb_component_id: z96.string(),
|
|
2137
|
+
subcircuit_id: z96.string().optional(),
|
|
2127
2138
|
layer: layer_ref,
|
|
2128
|
-
route:
|
|
2139
|
+
route: z96.array(point),
|
|
2129
2140
|
stroke_width: length,
|
|
2130
|
-
color:
|
|
2141
|
+
color: z96.string().optional()
|
|
2131
2142
|
}).describe(
|
|
2132
2143
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2133
2144
|
);
|
|
2134
2145
|
expectTypesMatch(true);
|
|
2135
2146
|
|
|
2136
2147
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2137
|
-
import { z as
|
|
2138
|
-
var pcb_fabrication_note_rect =
|
|
2139
|
-
type:
|
|
2148
|
+
import { z as z97 } from "zod";
|
|
2149
|
+
var pcb_fabrication_note_rect = z97.object({
|
|
2150
|
+
type: z97.literal("pcb_fabrication_note_rect"),
|
|
2140
2151
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2141
2152
|
"pcb_fabrication_note_rect"
|
|
2142
2153
|
),
|
|
2143
|
-
pcb_component_id:
|
|
2144
|
-
pcb_group_id:
|
|
2145
|
-
subcircuit_id:
|
|
2154
|
+
pcb_component_id: z97.string(),
|
|
2155
|
+
pcb_group_id: z97.string().optional(),
|
|
2156
|
+
subcircuit_id: z97.string().optional(),
|
|
2146
2157
|
center: point,
|
|
2147
2158
|
width: length,
|
|
2148
2159
|
height: length,
|
|
2149
2160
|
layer: visible_layer,
|
|
2150
2161
|
stroke_width: length.default("0.1mm"),
|
|
2151
2162
|
corner_radius: length.optional(),
|
|
2152
|
-
is_filled:
|
|
2153
|
-
has_stroke:
|
|
2154
|
-
is_stroke_dashed:
|
|
2155
|
-
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()
|
|
2156
2167
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2157
2168
|
expectTypesMatch(true);
|
|
2158
2169
|
|
|
2159
2170
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2160
|
-
import { z as
|
|
2161
|
-
var pcb_fabrication_note_dimension =
|
|
2162
|
-
type:
|
|
2171
|
+
import { z as z98 } from "zod";
|
|
2172
|
+
var pcb_fabrication_note_dimension = z98.object({
|
|
2173
|
+
type: z98.literal("pcb_fabrication_note_dimension"),
|
|
2163
2174
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2164
2175
|
"pcb_fabrication_note_dimension"
|
|
2165
2176
|
),
|
|
2166
|
-
pcb_component_id:
|
|
2167
|
-
pcb_group_id:
|
|
2168
|
-
subcircuit_id:
|
|
2177
|
+
pcb_component_id: z98.string(),
|
|
2178
|
+
pcb_group_id: z98.string().optional(),
|
|
2179
|
+
subcircuit_id: z98.string().optional(),
|
|
2169
2180
|
layer: visible_layer,
|
|
2170
2181
|
from: point,
|
|
2171
2182
|
to: point,
|
|
2172
|
-
text:
|
|
2173
|
-
text_ccw_rotation:
|
|
2183
|
+
text: z98.string().optional(),
|
|
2184
|
+
text_ccw_rotation: z98.number().optional(),
|
|
2174
2185
|
offset: length.optional(),
|
|
2175
2186
|
offset_distance: length.optional(),
|
|
2176
|
-
offset_direction:
|
|
2177
|
-
x:
|
|
2178
|
-
y:
|
|
2187
|
+
offset_direction: z98.object({
|
|
2188
|
+
x: z98.number(),
|
|
2189
|
+
y: z98.number()
|
|
2179
2190
|
}).optional(),
|
|
2180
|
-
font:
|
|
2191
|
+
font: z98.literal("tscircuit2024").default("tscircuit2024"),
|
|
2181
2192
|
font_size: length.default("1mm"),
|
|
2182
|
-
color:
|
|
2193
|
+
color: z98.string().optional(),
|
|
2183
2194
|
arrow_size: length.default("1mm")
|
|
2184
2195
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2185
2196
|
expectTypesMatch(true);
|
|
2186
2197
|
|
|
2187
2198
|
// src/pcb/pcb_note_text.ts
|
|
2188
|
-
import { z as z98 } from "zod";
|
|
2189
|
-
var pcb_note_text = z98.object({
|
|
2190
|
-
type: z98.literal("pcb_note_text"),
|
|
2191
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2192
|
-
pcb_component_id: z98.string().optional(),
|
|
2193
|
-
pcb_group_id: z98.string().optional(),
|
|
2194
|
-
subcircuit_id: z98.string().optional(),
|
|
2195
|
-
name: z98.string().optional(),
|
|
2196
|
-
font: z98.literal("tscircuit2024").default("tscircuit2024"),
|
|
2197
|
-
font_size: distance.default("1mm"),
|
|
2198
|
-
text: z98.string().optional(),
|
|
2199
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2200
|
-
anchor_alignment: z98.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2201
|
-
color: z98.string().optional()
|
|
2202
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
2203
|
-
expectTypesMatch(true);
|
|
2204
|
-
|
|
2205
|
-
// src/pcb/pcb_note_rect.ts
|
|
2206
2199
|
import { z as z99 } from "zod";
|
|
2207
|
-
var
|
|
2208
|
-
type: z99.literal("
|
|
2209
|
-
|
|
2200
|
+
var pcb_note_text = z99.object({
|
|
2201
|
+
type: z99.literal("pcb_note_text"),
|
|
2202
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2210
2203
|
pcb_component_id: z99.string().optional(),
|
|
2211
2204
|
pcb_group_id: z99.string().optional(),
|
|
2212
2205
|
subcircuit_id: z99.string().optional(),
|
|
2213
2206
|
name: z99.string().optional(),
|
|
2207
|
+
font: z99.literal("tscircuit2024").default("tscircuit2024"),
|
|
2208
|
+
font_size: distance.default("1mm"),
|
|
2214
2209
|
text: z99.string().optional(),
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
height: length,
|
|
2218
|
-
stroke_width: length.default("0.1mm"),
|
|
2219
|
-
corner_radius: length.optional(),
|
|
2220
|
-
is_filled: z99.boolean().optional(),
|
|
2221
|
-
has_stroke: z99.boolean().optional(),
|
|
2222
|
-
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"),
|
|
2223
2212
|
color: z99.string().optional()
|
|
2224
|
-
}).describe("Defines a
|
|
2213
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
2225
2214
|
expectTypesMatch(true);
|
|
2226
2215
|
|
|
2227
|
-
// src/pcb/
|
|
2216
|
+
// src/pcb/pcb_note_rect.ts
|
|
2228
2217
|
import { z as z100 } from "zod";
|
|
2229
|
-
var
|
|
2230
|
-
type: z100.literal("
|
|
2231
|
-
|
|
2218
|
+
var pcb_note_rect = z100.object({
|
|
2219
|
+
type: z100.literal("pcb_note_rect"),
|
|
2220
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2232
2221
|
pcb_component_id: z100.string().optional(),
|
|
2233
2222
|
pcb_group_id: z100.string().optional(),
|
|
2234
2223
|
subcircuit_id: z100.string().optional(),
|
|
2235
2224
|
name: z100.string().optional(),
|
|
2236
2225
|
text: z100.string().optional(),
|
|
2237
|
-
|
|
2226
|
+
center: point,
|
|
2227
|
+
width: length,
|
|
2228
|
+
height: length,
|
|
2238
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(),
|
|
2239
2234
|
color: z100.string().optional()
|
|
2240
|
-
}).describe("Defines a
|
|
2235
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2241
2236
|
expectTypesMatch(true);
|
|
2242
2237
|
|
|
2243
|
-
// src/pcb/
|
|
2238
|
+
// src/pcb/pcb_note_path.ts
|
|
2244
2239
|
import { z as z101 } from "zod";
|
|
2245
|
-
var
|
|
2246
|
-
type: z101.literal("
|
|
2247
|
-
|
|
2240
|
+
var pcb_note_path = z101.object({
|
|
2241
|
+
type: z101.literal("pcb_note_path"),
|
|
2242
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2248
2243
|
pcb_component_id: z101.string().optional(),
|
|
2249
2244
|
pcb_group_id: z101.string().optional(),
|
|
2250
2245
|
subcircuit_id: z101.string().optional(),
|
|
2251
2246
|
name: z101.string().optional(),
|
|
2252
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(),
|
|
2253
2264
|
x1: distance,
|
|
2254
2265
|
y1: distance,
|
|
2255
2266
|
x2: distance,
|
|
2256
2267
|
y2: distance,
|
|
2257
2268
|
stroke_width: distance.default("0.1mm"),
|
|
2258
|
-
color:
|
|
2259
|
-
is_dashed:
|
|
2269
|
+
color: z102.string().optional(),
|
|
2270
|
+
is_dashed: z102.boolean().optional()
|
|
2260
2271
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2261
2272
|
expectTypesMatch(true);
|
|
2262
2273
|
|
|
2263
2274
|
// src/pcb/pcb_note_dimension.ts
|
|
2264
|
-
import { z as
|
|
2265
|
-
var pcb_note_dimension =
|
|
2266
|
-
type:
|
|
2275
|
+
import { z as z103 } from "zod";
|
|
2276
|
+
var pcb_note_dimension = z103.object({
|
|
2277
|
+
type: z103.literal("pcb_note_dimension"),
|
|
2267
2278
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2268
|
-
pcb_component_id:
|
|
2269
|
-
pcb_group_id:
|
|
2270
|
-
subcircuit_id:
|
|
2271
|
-
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(),
|
|
2272
2283
|
from: point,
|
|
2273
2284
|
to: point,
|
|
2274
|
-
text:
|
|
2275
|
-
text_ccw_rotation:
|
|
2285
|
+
text: z103.string().optional(),
|
|
2286
|
+
text_ccw_rotation: z103.number().optional(),
|
|
2276
2287
|
offset_distance: length.optional(),
|
|
2277
|
-
offset_direction:
|
|
2278
|
-
x:
|
|
2279
|
-
y:
|
|
2288
|
+
offset_direction: z103.object({
|
|
2289
|
+
x: z103.number(),
|
|
2290
|
+
y: z103.number()
|
|
2280
2291
|
}).optional(),
|
|
2281
|
-
font:
|
|
2292
|
+
font: z103.literal("tscircuit2024").default("tscircuit2024"),
|
|
2282
2293
|
font_size: length.default("1mm"),
|
|
2283
|
-
color:
|
|
2294
|
+
color: z103.string().optional(),
|
|
2284
2295
|
arrow_size: length.default("1mm")
|
|
2285
2296
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2286
2297
|
expectTypesMatch(true);
|
|
2287
2298
|
|
|
2288
2299
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2289
|
-
import { z as
|
|
2290
|
-
var pcb_footprint_overlap_error =
|
|
2291
|
-
type:
|
|
2300
|
+
import { z as z104 } from "zod";
|
|
2301
|
+
var pcb_footprint_overlap_error = z104.object({
|
|
2302
|
+
type: z104.literal("pcb_footprint_overlap_error"),
|
|
2292
2303
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2293
|
-
error_type:
|
|
2294
|
-
message:
|
|
2295
|
-
pcb_smtpad_ids:
|
|
2296
|
-
pcb_plated_hole_ids:
|
|
2297
|
-
pcb_hole_ids:
|
|
2298
|
-
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()
|
|
2299
2310
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2300
2311
|
expectTypesMatch(
|
|
2301
2312
|
true
|
|
2302
2313
|
);
|
|
2303
2314
|
|
|
2304
2315
|
// src/pcb/pcb_keepout.ts
|
|
2305
|
-
import { z as
|
|
2306
|
-
var pcb_keepout =
|
|
2307
|
-
type:
|
|
2308
|
-
shape:
|
|
2309
|
-
pcb_group_id:
|
|
2310
|
-
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(),
|
|
2311
2322
|
center: point,
|
|
2312
2323
|
width: distance,
|
|
2313
2324
|
height: distance,
|
|
2314
|
-
pcb_keepout_id:
|
|
2315
|
-
layers:
|
|
2325
|
+
pcb_keepout_id: z105.string(),
|
|
2326
|
+
layers: z105.array(z105.string()),
|
|
2316
2327
|
// Specify layers where the keepout applies
|
|
2317
|
-
description:
|
|
2328
|
+
description: z105.string().optional()
|
|
2318
2329
|
// Optional description of the keepout
|
|
2319
2330
|
}).or(
|
|
2320
|
-
|
|
2321
|
-
type:
|
|
2322
|
-
shape:
|
|
2323
|
-
pcb_group_id:
|
|
2324
|
-
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(),
|
|
2325
2336
|
center: point,
|
|
2326
2337
|
radius: distance,
|
|
2327
|
-
pcb_keepout_id:
|
|
2328
|
-
layers:
|
|
2338
|
+
pcb_keepout_id: z105.string(),
|
|
2339
|
+
layers: z105.array(z105.string()),
|
|
2329
2340
|
// Specify layers where the keepout applies
|
|
2330
|
-
description:
|
|
2341
|
+
description: z105.string().optional()
|
|
2331
2342
|
// Optional description of the keepout
|
|
2332
2343
|
})
|
|
2333
2344
|
);
|
|
2334
2345
|
expectTypesMatch(true);
|
|
2335
2346
|
|
|
2336
2347
|
// src/pcb/pcb_cutout.ts
|
|
2337
|
-
import { z as
|
|
2338
|
-
var pcb_cutout_base =
|
|
2339
|
-
type:
|
|
2348
|
+
import { z as z106 } from "zod";
|
|
2349
|
+
var pcb_cutout_base = z106.object({
|
|
2350
|
+
type: z106.literal("pcb_cutout"),
|
|
2340
2351
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2341
|
-
pcb_group_id:
|
|
2342
|
-
subcircuit_id:
|
|
2352
|
+
pcb_group_id: z106.string().optional(),
|
|
2353
|
+
subcircuit_id: z106.string().optional()
|
|
2343
2354
|
});
|
|
2344
2355
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2345
|
-
shape:
|
|
2356
|
+
shape: z106.literal("rect"),
|
|
2346
2357
|
center: point,
|
|
2347
2358
|
width: length,
|
|
2348
2359
|
height: length,
|
|
@@ -2350,17 +2361,17 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2350
2361
|
});
|
|
2351
2362
|
expectTypesMatch(true);
|
|
2352
2363
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2353
|
-
shape:
|
|
2364
|
+
shape: z106.literal("circle"),
|
|
2354
2365
|
center: point,
|
|
2355
2366
|
radius: length
|
|
2356
2367
|
});
|
|
2357
2368
|
expectTypesMatch(true);
|
|
2358
2369
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2359
|
-
shape:
|
|
2360
|
-
points:
|
|
2370
|
+
shape: z106.literal("polygon"),
|
|
2371
|
+
points: z106.array(point)
|
|
2361
2372
|
});
|
|
2362
2373
|
expectTypesMatch(true);
|
|
2363
|
-
var pcb_cutout =
|
|
2374
|
+
var pcb_cutout = z106.discriminatedUnion("shape", [
|
|
2364
2375
|
pcb_cutout_rect,
|
|
2365
2376
|
pcb_cutout_circle,
|
|
2366
2377
|
pcb_cutout_polygon
|
|
@@ -2368,121 +2379,121 @@ var pcb_cutout = z105.discriminatedUnion("shape", [
|
|
|
2368
2379
|
expectTypesMatch(true);
|
|
2369
2380
|
|
|
2370
2381
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2371
|
-
import { z as
|
|
2372
|
-
var pcb_missing_footprint_error =
|
|
2373
|
-
type:
|
|
2382
|
+
import { z as z107 } from "zod";
|
|
2383
|
+
var pcb_missing_footprint_error = z107.object({
|
|
2384
|
+
type: z107.literal("pcb_missing_footprint_error"),
|
|
2374
2385
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2375
2386
|
"pcb_missing_footprint_error"
|
|
2376
2387
|
),
|
|
2377
|
-
pcb_group_id:
|
|
2378
|
-
subcircuit_id:
|
|
2379
|
-
error_type:
|
|
2380
|
-
source_component_id:
|
|
2381
|
-
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()
|
|
2382
2393
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2383
2394
|
expectTypesMatch(
|
|
2384
2395
|
true
|
|
2385
2396
|
);
|
|
2386
2397
|
|
|
2387
2398
|
// src/pcb/external_footprint_load_error.ts
|
|
2388
|
-
import { z as
|
|
2389
|
-
var external_footprint_load_error =
|
|
2390
|
-
type:
|
|
2399
|
+
import { z as z108 } from "zod";
|
|
2400
|
+
var external_footprint_load_error = z108.object({
|
|
2401
|
+
type: z108.literal("external_footprint_load_error"),
|
|
2391
2402
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2392
2403
|
"external_footprint_load_error"
|
|
2393
2404
|
),
|
|
2394
|
-
pcb_component_id:
|
|
2395
|
-
source_component_id:
|
|
2396
|
-
pcb_group_id:
|
|
2397
|
-
subcircuit_id:
|
|
2398
|
-
footprinter_string:
|
|
2399
|
-
error_type:
|
|
2400
|
-
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()
|
|
2401
2412
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2402
2413
|
expectTypesMatch(true);
|
|
2403
2414
|
|
|
2404
2415
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2405
|
-
import { z as
|
|
2406
|
-
var circuit_json_footprint_load_error =
|
|
2407
|
-
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"),
|
|
2408
2419
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2409
2420
|
"circuit_json_footprint_load_error"
|
|
2410
2421
|
),
|
|
2411
|
-
pcb_component_id:
|
|
2412
|
-
source_component_id:
|
|
2413
|
-
pcb_group_id:
|
|
2414
|
-
subcircuit_id:
|
|
2415
|
-
error_type:
|
|
2416
|
-
message:
|
|
2417
|
-
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()
|
|
2418
2429
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
2419
2430
|
expectTypesMatch(true);
|
|
2420
2431
|
|
|
2421
2432
|
// src/pcb/pcb_group.ts
|
|
2422
|
-
import { z as
|
|
2423
|
-
var pcb_group =
|
|
2424
|
-
type:
|
|
2433
|
+
import { z as z110 } from "zod";
|
|
2434
|
+
var pcb_group = z110.object({
|
|
2435
|
+
type: z110.literal("pcb_group"),
|
|
2425
2436
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
2426
|
-
source_group_id:
|
|
2427
|
-
is_subcircuit:
|
|
2428
|
-
subcircuit_id:
|
|
2437
|
+
source_group_id: z110.string(),
|
|
2438
|
+
is_subcircuit: z110.boolean().optional(),
|
|
2439
|
+
subcircuit_id: z110.string().optional(),
|
|
2429
2440
|
width: length.optional(),
|
|
2430
2441
|
height: length.optional(),
|
|
2431
2442
|
center: point,
|
|
2432
|
-
outline:
|
|
2443
|
+
outline: z110.array(point).optional(),
|
|
2433
2444
|
anchor_position: point.optional(),
|
|
2434
|
-
anchor_alignment:
|
|
2435
|
-
pcb_component_ids:
|
|
2436
|
-
child_layout_mode:
|
|
2437
|
-
name:
|
|
2438
|
-
description:
|
|
2439
|
-
layout_mode:
|
|
2440
|
-
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({
|
|
2441
2452
|
trace_clearance: length
|
|
2442
2453
|
}).optional(),
|
|
2443
|
-
autorouter_used_string:
|
|
2454
|
+
autorouter_used_string: z110.string().optional()
|
|
2444
2455
|
}).describe("Defines a group of components on the PCB");
|
|
2445
2456
|
expectTypesMatch(true);
|
|
2446
2457
|
|
|
2447
2458
|
// src/pcb/pcb_autorouting_error.ts
|
|
2448
|
-
import { z as
|
|
2449
|
-
var pcb_autorouting_error =
|
|
2450
|
-
type:
|
|
2459
|
+
import { z as z111 } from "zod";
|
|
2460
|
+
var pcb_autorouting_error = z111.object({
|
|
2461
|
+
type: z111.literal("pcb_autorouting_error"),
|
|
2451
2462
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
2452
|
-
error_type:
|
|
2453
|
-
message:
|
|
2454
|
-
subcircuit_id:
|
|
2463
|
+
error_type: z111.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
2464
|
+
message: z111.string(),
|
|
2465
|
+
subcircuit_id: z111.string().optional()
|
|
2455
2466
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
2456
2467
|
expectTypesMatch(true);
|
|
2457
2468
|
|
|
2458
2469
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
2459
|
-
import { z as
|
|
2460
|
-
var pcb_manual_edit_conflict_warning =
|
|
2461
|
-
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"),
|
|
2462
2473
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
2463
2474
|
"pcb_manual_edit_conflict_warning"
|
|
2464
2475
|
),
|
|
2465
|
-
warning_type:
|
|
2466
|
-
message:
|
|
2467
|
-
pcb_component_id:
|
|
2468
|
-
pcb_group_id:
|
|
2469
|
-
subcircuit_id:
|
|
2470
|
-
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()
|
|
2471
2482
|
}).describe(
|
|
2472
2483
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
2473
2484
|
);
|
|
2474
2485
|
expectTypesMatch(true);
|
|
2475
2486
|
|
|
2476
2487
|
// src/pcb/pcb_breakout_point.ts
|
|
2477
|
-
import { z as
|
|
2478
|
-
var pcb_breakout_point =
|
|
2479
|
-
type:
|
|
2488
|
+
import { z as z113 } from "zod";
|
|
2489
|
+
var pcb_breakout_point = z113.object({
|
|
2490
|
+
type: z113.literal("pcb_breakout_point"),
|
|
2480
2491
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
2481
|
-
pcb_group_id:
|
|
2482
|
-
subcircuit_id:
|
|
2483
|
-
source_trace_id:
|
|
2484
|
-
source_port_id:
|
|
2485
|
-
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(),
|
|
2486
2497
|
x: distance,
|
|
2487
2498
|
y: distance
|
|
2488
2499
|
}).describe(
|
|
@@ -2491,61 +2502,61 @@ var pcb_breakout_point = z112.object({
|
|
|
2491
2502
|
expectTypesMatch(true);
|
|
2492
2503
|
|
|
2493
2504
|
// src/pcb/pcb_ground_plane.ts
|
|
2494
|
-
import { z as
|
|
2495
|
-
var pcb_ground_plane =
|
|
2496
|
-
type:
|
|
2505
|
+
import { z as z114 } from "zod";
|
|
2506
|
+
var pcb_ground_plane = z114.object({
|
|
2507
|
+
type: z114.literal("pcb_ground_plane"),
|
|
2497
2508
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
2498
|
-
source_pcb_ground_plane_id:
|
|
2499
|
-
source_net_id:
|
|
2500
|
-
pcb_group_id:
|
|
2501
|
-
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()
|
|
2502
2513
|
}).describe("Defines a ground plane on the PCB");
|
|
2503
2514
|
expectTypesMatch(true);
|
|
2504
2515
|
|
|
2505
2516
|
// src/pcb/pcb_ground_plane_region.ts
|
|
2506
|
-
import { z as
|
|
2507
|
-
var pcb_ground_plane_region =
|
|
2508
|
-
type:
|
|
2517
|
+
import { z as z115 } from "zod";
|
|
2518
|
+
var pcb_ground_plane_region = z115.object({
|
|
2519
|
+
type: z115.literal("pcb_ground_plane_region"),
|
|
2509
2520
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
2510
2521
|
"pcb_ground_plane_region"
|
|
2511
2522
|
),
|
|
2512
|
-
pcb_ground_plane_id:
|
|
2513
|
-
pcb_group_id:
|
|
2514
|
-
subcircuit_id:
|
|
2523
|
+
pcb_ground_plane_id: z115.string(),
|
|
2524
|
+
pcb_group_id: z115.string().optional(),
|
|
2525
|
+
subcircuit_id: z115.string().optional(),
|
|
2515
2526
|
layer: layer_ref,
|
|
2516
|
-
points:
|
|
2527
|
+
points: z115.array(point)
|
|
2517
2528
|
}).describe("Defines a polygon region of a ground plane");
|
|
2518
2529
|
expectTypesMatch(true);
|
|
2519
2530
|
|
|
2520
2531
|
// src/pcb/pcb_thermal_spoke.ts
|
|
2521
|
-
import { z as
|
|
2522
|
-
var pcb_thermal_spoke =
|
|
2523
|
-
type:
|
|
2532
|
+
import { z as z116 } from "zod";
|
|
2533
|
+
var pcb_thermal_spoke = z116.object({
|
|
2534
|
+
type: z116.literal("pcb_thermal_spoke"),
|
|
2524
2535
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
2525
|
-
pcb_ground_plane_id:
|
|
2526
|
-
shape:
|
|
2527
|
-
spoke_count:
|
|
2536
|
+
pcb_ground_plane_id: z116.string(),
|
|
2537
|
+
shape: z116.string(),
|
|
2538
|
+
spoke_count: z116.number(),
|
|
2528
2539
|
spoke_thickness: distance,
|
|
2529
2540
|
spoke_inner_diameter: distance,
|
|
2530
2541
|
spoke_outer_diameter: distance,
|
|
2531
|
-
pcb_plated_hole_id:
|
|
2532
|
-
subcircuit_id:
|
|
2542
|
+
pcb_plated_hole_id: z116.string().optional(),
|
|
2543
|
+
subcircuit_id: z116.string().optional()
|
|
2533
2544
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
2534
2545
|
expectTypesMatch(true);
|
|
2535
2546
|
|
|
2536
2547
|
// src/pcb/pcb_copper_pour.ts
|
|
2537
|
-
import { z as
|
|
2538
|
-
var pcb_copper_pour_base =
|
|
2539
|
-
type:
|
|
2548
|
+
import { z as z117 } from "zod";
|
|
2549
|
+
var pcb_copper_pour_base = z117.object({
|
|
2550
|
+
type: z117.literal("pcb_copper_pour"),
|
|
2540
2551
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
2541
|
-
pcb_group_id:
|
|
2542
|
-
subcircuit_id:
|
|
2552
|
+
pcb_group_id: z117.string().optional(),
|
|
2553
|
+
subcircuit_id: z117.string().optional(),
|
|
2543
2554
|
layer: layer_ref,
|
|
2544
|
-
source_net_id:
|
|
2545
|
-
covered_with_solder_mask:
|
|
2555
|
+
source_net_id: z117.string().optional(),
|
|
2556
|
+
covered_with_solder_mask: z117.boolean().optional().default(true)
|
|
2546
2557
|
});
|
|
2547
2558
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
2548
|
-
shape:
|
|
2559
|
+
shape: z117.literal("rect"),
|
|
2549
2560
|
center: point,
|
|
2550
2561
|
width: length,
|
|
2551
2562
|
height: length,
|
|
@@ -2553,16 +2564,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
2553
2564
|
});
|
|
2554
2565
|
expectTypesMatch(true);
|
|
2555
2566
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
2556
|
-
shape:
|
|
2567
|
+
shape: z117.literal("brep"),
|
|
2557
2568
|
brep_shape
|
|
2558
2569
|
});
|
|
2559
2570
|
expectTypesMatch(true);
|
|
2560
2571
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
2561
|
-
shape:
|
|
2562
|
-
points:
|
|
2572
|
+
shape: z117.literal("polygon"),
|
|
2573
|
+
points: z117.array(point)
|
|
2563
2574
|
});
|
|
2564
2575
|
expectTypesMatch(true);
|
|
2565
|
-
var pcb_copper_pour =
|
|
2576
|
+
var pcb_copper_pour = z117.discriminatedUnion("shape", [
|
|
2566
2577
|
pcb_copper_pour_rect,
|
|
2567
2578
|
pcb_copper_pour_brep,
|
|
2568
2579
|
pcb_copper_pour_polygon
|
|
@@ -2570,147 +2581,147 @@ var pcb_copper_pour = z116.discriminatedUnion("shape", [
|
|
|
2570
2581
|
expectTypesMatch(true);
|
|
2571
2582
|
|
|
2572
2583
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
2573
|
-
import { z as
|
|
2574
|
-
var pcb_component_outside_board_error =
|
|
2575
|
-
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"),
|
|
2576
2587
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
2577
2588
|
"pcb_component_outside_board_error"
|
|
2578
2589
|
),
|
|
2579
|
-
error_type:
|
|
2580
|
-
message:
|
|
2581
|
-
pcb_component_id:
|
|
2582
|
-
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(),
|
|
2583
2594
|
component_center: point,
|
|
2584
|
-
component_bounds:
|
|
2585
|
-
min_x:
|
|
2586
|
-
max_x:
|
|
2587
|
-
min_y:
|
|
2588
|
-
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()
|
|
2589
2600
|
}),
|
|
2590
|
-
subcircuit_id:
|
|
2591
|
-
source_component_id:
|
|
2601
|
+
subcircuit_id: z118.string().optional(),
|
|
2602
|
+
source_component_id: z118.string().optional()
|
|
2592
2603
|
}).describe(
|
|
2593
2604
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
2594
2605
|
);
|
|
2595
2606
|
expectTypesMatch(true);
|
|
2596
2607
|
|
|
2597
2608
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
2598
|
-
import { z as
|
|
2599
|
-
var pcb_component_invalid_layer_error =
|
|
2600
|
-
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"),
|
|
2601
2612
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
2602
2613
|
"pcb_component_invalid_layer_error"
|
|
2603
2614
|
),
|
|
2604
|
-
error_type:
|
|
2605
|
-
message:
|
|
2606
|
-
pcb_component_id:
|
|
2607
|
-
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(),
|
|
2608
2619
|
layer: layer_ref,
|
|
2609
|
-
subcircuit_id:
|
|
2620
|
+
subcircuit_id: z119.string().optional()
|
|
2610
2621
|
}).describe(
|
|
2611
2622
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
2612
2623
|
);
|
|
2613
2624
|
expectTypesMatch(true);
|
|
2614
2625
|
|
|
2615
2626
|
// src/pcb/pcb_via_clearance_error.ts
|
|
2616
|
-
import { z as
|
|
2617
|
-
var pcb_via_clearance_error =
|
|
2618
|
-
type:
|
|
2627
|
+
import { z as z120 } from "zod";
|
|
2628
|
+
var pcb_via_clearance_error = z120.object({
|
|
2629
|
+
type: z120.literal("pcb_via_clearance_error"),
|
|
2619
2630
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2620
|
-
error_type:
|
|
2621
|
-
message:
|
|
2622
|
-
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),
|
|
2623
2634
|
minimum_clearance: distance.optional(),
|
|
2624
2635
|
actual_clearance: distance.optional(),
|
|
2625
|
-
pcb_center:
|
|
2626
|
-
x:
|
|
2627
|
-
y:
|
|
2636
|
+
pcb_center: z120.object({
|
|
2637
|
+
x: z120.number().optional(),
|
|
2638
|
+
y: z120.number().optional()
|
|
2628
2639
|
}).optional(),
|
|
2629
|
-
subcircuit_id:
|
|
2640
|
+
subcircuit_id: z120.string().optional()
|
|
2630
2641
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
2631
2642
|
expectTypesMatch(true);
|
|
2632
2643
|
|
|
2633
2644
|
// src/pcb/pcb_courtyard_rect.ts
|
|
2634
|
-
import { z as
|
|
2635
|
-
var pcb_courtyard_rect =
|
|
2636
|
-
type:
|
|
2645
|
+
import { z as z121 } from "zod";
|
|
2646
|
+
var pcb_courtyard_rect = z121.object({
|
|
2647
|
+
type: z121.literal("pcb_courtyard_rect"),
|
|
2637
2648
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
2638
|
-
pcb_component_id:
|
|
2639
|
-
pcb_group_id:
|
|
2640
|
-
subcircuit_id:
|
|
2649
|
+
pcb_component_id: z121.string(),
|
|
2650
|
+
pcb_group_id: z121.string().optional(),
|
|
2651
|
+
subcircuit_id: z121.string().optional(),
|
|
2641
2652
|
center: point,
|
|
2642
2653
|
width: length,
|
|
2643
2654
|
height: length,
|
|
2644
2655
|
layer: visible_layer,
|
|
2645
|
-
color:
|
|
2656
|
+
color: z121.string().optional()
|
|
2646
2657
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
2647
2658
|
expectTypesMatch(true);
|
|
2648
2659
|
|
|
2649
2660
|
// src/pcb/pcb_courtyard_outline.ts
|
|
2650
|
-
import { z as
|
|
2651
|
-
var pcb_courtyard_outline =
|
|
2652
|
-
type:
|
|
2661
|
+
import { z as z122 } from "zod";
|
|
2662
|
+
var pcb_courtyard_outline = z122.object({
|
|
2663
|
+
type: z122.literal("pcb_courtyard_outline"),
|
|
2653
2664
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
2654
2665
|
"pcb_courtyard_outline"
|
|
2655
2666
|
),
|
|
2656
|
-
pcb_component_id:
|
|
2657
|
-
pcb_group_id:
|
|
2658
|
-
subcircuit_id:
|
|
2667
|
+
pcb_component_id: z122.string(),
|
|
2668
|
+
pcb_group_id: z122.string().optional(),
|
|
2669
|
+
subcircuit_id: z122.string().optional(),
|
|
2659
2670
|
layer: visible_layer,
|
|
2660
|
-
outline:
|
|
2671
|
+
outline: z122.array(point).min(2),
|
|
2661
2672
|
stroke_width: length.default("0.1mm"),
|
|
2662
|
-
is_closed:
|
|
2663
|
-
is_stroke_dashed:
|
|
2664
|
-
color:
|
|
2673
|
+
is_closed: z122.boolean().optional(),
|
|
2674
|
+
is_stroke_dashed: z122.boolean().optional(),
|
|
2675
|
+
color: z122.string().optional()
|
|
2665
2676
|
}).describe("Defines a courtyard outline on the PCB");
|
|
2666
2677
|
expectTypesMatch(true);
|
|
2667
2678
|
|
|
2668
2679
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
2669
|
-
import { z as
|
|
2670
|
-
var pcb_courtyard_polygon =
|
|
2671
|
-
type:
|
|
2680
|
+
import { z as z123 } from "zod";
|
|
2681
|
+
var pcb_courtyard_polygon = z123.object({
|
|
2682
|
+
type: z123.literal("pcb_courtyard_polygon"),
|
|
2672
2683
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
2673
2684
|
"pcb_courtyard_polygon"
|
|
2674
2685
|
),
|
|
2675
|
-
pcb_component_id:
|
|
2676
|
-
pcb_group_id:
|
|
2677
|
-
subcircuit_id:
|
|
2686
|
+
pcb_component_id: z123.string(),
|
|
2687
|
+
pcb_group_id: z123.string().optional(),
|
|
2688
|
+
subcircuit_id: z123.string().optional(),
|
|
2678
2689
|
layer: visible_layer,
|
|
2679
|
-
points:
|
|
2680
|
-
color:
|
|
2690
|
+
points: z123.array(point).min(3),
|
|
2691
|
+
color: z123.string().optional()
|
|
2681
2692
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
2682
2693
|
expectTypesMatch(true);
|
|
2683
2694
|
|
|
2684
2695
|
// src/cad/cad_component.ts
|
|
2685
|
-
import { z as
|
|
2686
|
-
var cad_component =
|
|
2687
|
-
type:
|
|
2688
|
-
cad_component_id:
|
|
2689
|
-
pcb_component_id:
|
|
2690
|
-
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(),
|
|
2691
2702
|
position: point3,
|
|
2692
2703
|
rotation: point3.optional(),
|
|
2693
2704
|
size: point3.optional(),
|
|
2694
2705
|
layer: layer_ref.optional(),
|
|
2695
|
-
subcircuit_id:
|
|
2706
|
+
subcircuit_id: z124.string().optional(),
|
|
2696
2707
|
// These are all ways to generate/load the 3d model
|
|
2697
|
-
footprinter_string:
|
|
2698
|
-
model_obj_url:
|
|
2699
|
-
model_stl_url:
|
|
2700
|
-
model_3mf_url:
|
|
2701
|
-
model_gltf_url:
|
|
2702
|
-
model_glb_url:
|
|
2703
|
-
model_step_url:
|
|
2704
|
-
model_wrl_url:
|
|
2705
|
-
model_unit_to_mm_scale_factor:
|
|
2706
|
-
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()
|
|
2707
2718
|
}).describe("Defines a component on the PCB");
|
|
2708
2719
|
expectTypesMatch(true);
|
|
2709
2720
|
|
|
2710
2721
|
// src/simulation/simulation_voltage_source.ts
|
|
2711
|
-
import { z as
|
|
2712
|
-
var wave_shape =
|
|
2713
|
-
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) => {
|
|
2714
2725
|
if (typeof val === "string") {
|
|
2715
2726
|
if (val.endsWith("%")) {
|
|
2716
2727
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -2719,30 +2730,30 @@ var percentage = z124.union([z124.string(), z124.number()]).transform((val) => {
|
|
|
2719
2730
|
}
|
|
2720
2731
|
return val;
|
|
2721
2732
|
}).pipe(
|
|
2722
|
-
|
|
2733
|
+
z125.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
2723
2734
|
);
|
|
2724
|
-
var simulation_dc_voltage_source =
|
|
2725
|
-
type:
|
|
2735
|
+
var simulation_dc_voltage_source = z125.object({
|
|
2736
|
+
type: z125.literal("simulation_voltage_source"),
|
|
2726
2737
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2727
2738
|
"simulation_voltage_source"
|
|
2728
2739
|
),
|
|
2729
|
-
is_dc_source:
|
|
2730
|
-
positive_source_port_id:
|
|
2731
|
-
negative_source_port_id:
|
|
2732
|
-
positive_source_net_id:
|
|
2733
|
-
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(),
|
|
2734
2745
|
voltage
|
|
2735
2746
|
}).describe("Defines a DC voltage source for simulation");
|
|
2736
|
-
var simulation_ac_voltage_source =
|
|
2737
|
-
type:
|
|
2747
|
+
var simulation_ac_voltage_source = z125.object({
|
|
2748
|
+
type: z125.literal("simulation_voltage_source"),
|
|
2738
2749
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2739
2750
|
"simulation_voltage_source"
|
|
2740
2751
|
),
|
|
2741
|
-
is_dc_source:
|
|
2742
|
-
terminal1_source_port_id:
|
|
2743
|
-
terminal2_source_port_id:
|
|
2744
|
-
terminal1_source_net_id:
|
|
2745
|
-
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(),
|
|
2746
2757
|
voltage: voltage.optional(),
|
|
2747
2758
|
frequency: frequency.optional(),
|
|
2748
2759
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -2750,25 +2761,25 @@ var simulation_ac_voltage_source = z124.object({
|
|
|
2750
2761
|
phase: rotation.optional(),
|
|
2751
2762
|
duty_cycle: percentage.optional()
|
|
2752
2763
|
}).describe("Defines an AC voltage source for simulation");
|
|
2753
|
-
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");
|
|
2754
2765
|
expectTypesMatch(true);
|
|
2755
2766
|
expectTypesMatch(true);
|
|
2756
2767
|
expectTypesMatch(true);
|
|
2757
2768
|
|
|
2758
2769
|
// src/simulation/simulation_experiment.ts
|
|
2759
|
-
import { z as
|
|
2760
|
-
var experiment_type =
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
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")
|
|
2765
2776
|
]);
|
|
2766
|
-
var simulation_experiment =
|
|
2767
|
-
type:
|
|
2777
|
+
var simulation_experiment = z126.object({
|
|
2778
|
+
type: z126.literal("simulation_experiment"),
|
|
2768
2779
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
2769
2780
|
"simulation_experiment"
|
|
2770
2781
|
),
|
|
2771
|
-
name:
|
|
2782
|
+
name: z126.string(),
|
|
2772
2783
|
experiment_type,
|
|
2773
2784
|
time_per_step: duration_ms.optional(),
|
|
2774
2785
|
start_time_ms: ms.optional(),
|
|
@@ -2777,49 +2788,50 @@ var simulation_experiment = z125.object({
|
|
|
2777
2788
|
expectTypesMatch(true);
|
|
2778
2789
|
|
|
2779
2790
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
2780
|
-
import { z as
|
|
2781
|
-
var simulation_transient_voltage_graph =
|
|
2782
|
-
type:
|
|
2791
|
+
import { z as z127 } from "zod";
|
|
2792
|
+
var simulation_transient_voltage_graph = z127.object({
|
|
2793
|
+
type: z127.literal("simulation_transient_voltage_graph"),
|
|
2783
2794
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
2784
2795
|
"simulation_transient_voltage_graph"
|
|
2785
2796
|
),
|
|
2786
|
-
simulation_experiment_id:
|
|
2787
|
-
timestamps_ms:
|
|
2788
|
-
voltage_levels:
|
|
2789
|
-
schematic_voltage_probe_id:
|
|
2790
|
-
simulation_voltage_probe_id:
|
|
2791
|
-
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(),
|
|
2792
2803
|
time_per_step: duration_ms,
|
|
2793
2804
|
start_time_ms: ms,
|
|
2794
2805
|
end_time_ms: ms,
|
|
2795
|
-
name:
|
|
2806
|
+
name: z127.string().optional()
|
|
2796
2807
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
2797
2808
|
expectTypesMatch(true);
|
|
2798
2809
|
|
|
2799
2810
|
// src/simulation/simulation_switch.ts
|
|
2800
|
-
import { z as
|
|
2801
|
-
var simulation_switch =
|
|
2802
|
-
type:
|
|
2811
|
+
import { z as z128 } from "zod";
|
|
2812
|
+
var simulation_switch = z128.object({
|
|
2813
|
+
type: z128.literal("simulation_switch"),
|
|
2803
2814
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
2804
|
-
source_component_id:
|
|
2815
|
+
source_component_id: z128.string().optional(),
|
|
2805
2816
|
closes_at: ms.optional(),
|
|
2806
2817
|
opens_at: ms.optional(),
|
|
2807
|
-
starts_closed:
|
|
2818
|
+
starts_closed: z128.boolean().optional(),
|
|
2808
2819
|
switching_frequency: frequency.optional()
|
|
2809
2820
|
}).describe("Defines a switch for simulation timing control");
|
|
2810
2821
|
expectTypesMatch(true);
|
|
2811
2822
|
|
|
2812
2823
|
// src/simulation/simulation_voltage_probe.ts
|
|
2813
|
-
import { z as
|
|
2814
|
-
var simulation_voltage_probe =
|
|
2815
|
-
type:
|
|
2824
|
+
import { z as z129 } from "zod";
|
|
2825
|
+
var simulation_voltage_probe = z129.object({
|
|
2826
|
+
type: z129.literal("simulation_voltage_probe"),
|
|
2816
2827
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
2817
2828
|
"simulation_voltage_probe"
|
|
2818
2829
|
),
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
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()
|
|
2823
2835
|
}).describe(
|
|
2824
2836
|
"Defines a voltage probe for simulation, connected to a port or a net"
|
|
2825
2837
|
).refine(
|
|
@@ -2831,22 +2843,22 @@ var simulation_voltage_probe = z128.object({
|
|
|
2831
2843
|
expectTypesMatch(true);
|
|
2832
2844
|
|
|
2833
2845
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
2834
|
-
import { z as
|
|
2835
|
-
var simulation_unknown_experiment_error =
|
|
2836
|
-
type:
|
|
2846
|
+
import { z as z130 } from "zod";
|
|
2847
|
+
var simulation_unknown_experiment_error = z130.object({
|
|
2848
|
+
type: z130.literal("simulation_unknown_experiment_error"),
|
|
2837
2849
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
2838
2850
|
"simulation_unknown_experiment_error"
|
|
2839
2851
|
),
|
|
2840
|
-
error_type:
|
|
2841
|
-
message:
|
|
2842
|
-
simulation_experiment_id:
|
|
2843
|
-
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()
|
|
2844
2856
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
2845
2857
|
expectTypesMatch(true);
|
|
2846
2858
|
|
|
2847
2859
|
// src/any_circuit_element.ts
|
|
2848
|
-
import { z as
|
|
2849
|
-
var any_circuit_element =
|
|
2860
|
+
import { z as z131 } from "zod";
|
|
2861
|
+
var any_circuit_element = z131.union([
|
|
2850
2862
|
source_trace,
|
|
2851
2863
|
source_port,
|
|
2852
2864
|
any_source_component,
|
|
@@ -3131,6 +3143,7 @@ export {
|
|
|
3131
3143
|
source_simple_switch,
|
|
3132
3144
|
source_simple_test_point,
|
|
3133
3145
|
source_simple_transistor,
|
|
3146
|
+
source_simple_voltage_probe,
|
|
3134
3147
|
source_trace,
|
|
3135
3148
|
source_trace_not_connected_error,
|
|
3136
3149
|
supplier_name,
|