circuit-json 0.0.206 → 0.0.207
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 +79 -0
- package/dist/index.d.mts +415 -2
- package/dist/index.mjs +608 -547
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -627,97 +627,108 @@ var source_net = z36.object({
|
|
|
627
627
|
subcircuit_connectivity_map_key: z36.string().optional()
|
|
628
628
|
});
|
|
629
629
|
|
|
630
|
-
// src/
|
|
630
|
+
// src/source/source_pcb_ground_plane.ts
|
|
631
631
|
import { z as z37 } from "zod";
|
|
632
|
-
var
|
|
633
|
-
type: z37.literal("
|
|
634
|
-
|
|
632
|
+
var source_pcb_ground_plane = z37.object({
|
|
633
|
+
type: z37.literal("source_pcb_ground_plane"),
|
|
634
|
+
source_pcb_ground_plane_id: z37.string(),
|
|
635
|
+
source_group_id: z37.string(),
|
|
636
|
+
source_net_id: z37.string(),
|
|
637
|
+
subcircuit_id: z37.string().optional()
|
|
638
|
+
}).describe("Defines a ground plane in the source domain");
|
|
639
|
+
expectTypesMatch(true);
|
|
640
|
+
|
|
641
|
+
// src/schematic/schematic_box.ts
|
|
642
|
+
import { z as z38 } from "zod";
|
|
643
|
+
var schematic_box = z38.object({
|
|
644
|
+
type: z38.literal("schematic_box"),
|
|
645
|
+
schematic_component_id: z38.string(),
|
|
635
646
|
width: distance,
|
|
636
647
|
height: distance,
|
|
637
|
-
is_dashed:
|
|
648
|
+
is_dashed: z38.boolean().default(false),
|
|
638
649
|
x: distance,
|
|
639
650
|
y: distance
|
|
640
651
|
}).describe("Draws a box on the schematic");
|
|
641
652
|
expectTypesMatch(true);
|
|
642
653
|
|
|
643
654
|
// src/schematic/schematic_path.ts
|
|
644
|
-
import { z as
|
|
645
|
-
var schematic_path =
|
|
646
|
-
type:
|
|
647
|
-
schematic_component_id:
|
|
648
|
-
fill_color:
|
|
649
|
-
is_filled:
|
|
650
|
-
points:
|
|
655
|
+
import { z as z39 } from "zod";
|
|
656
|
+
var schematic_path = z39.object({
|
|
657
|
+
type: z39.literal("schematic_path"),
|
|
658
|
+
schematic_component_id: z39.string(),
|
|
659
|
+
fill_color: z39.enum(["red", "blue"]).optional(),
|
|
660
|
+
is_filled: z39.boolean().optional(),
|
|
661
|
+
points: z39.array(point)
|
|
651
662
|
});
|
|
652
663
|
expectTypesMatch(true);
|
|
653
664
|
|
|
654
665
|
// src/schematic/schematic_component.ts
|
|
655
|
-
import { z as
|
|
656
|
-
var schematic_pin_styles =
|
|
657
|
-
|
|
666
|
+
import { z as z40 } from "zod";
|
|
667
|
+
var schematic_pin_styles = z40.record(
|
|
668
|
+
z40.object({
|
|
658
669
|
left_margin: length.optional(),
|
|
659
670
|
right_margin: length.optional(),
|
|
660
671
|
top_margin: length.optional(),
|
|
661
672
|
bottom_margin: length.optional()
|
|
662
673
|
})
|
|
663
674
|
);
|
|
664
|
-
var schematic_component_port_arrangement_by_size =
|
|
665
|
-
left_size:
|
|
666
|
-
right_size:
|
|
667
|
-
top_size:
|
|
668
|
-
bottom_size:
|
|
675
|
+
var schematic_component_port_arrangement_by_size = z40.object({
|
|
676
|
+
left_size: z40.number(),
|
|
677
|
+
right_size: z40.number(),
|
|
678
|
+
top_size: z40.number().optional(),
|
|
679
|
+
bottom_size: z40.number().optional()
|
|
669
680
|
});
|
|
670
681
|
expectTypesMatch(true);
|
|
671
|
-
var schematic_component_port_arrangement_by_sides =
|
|
672
|
-
left_side:
|
|
673
|
-
pins:
|
|
682
|
+
var schematic_component_port_arrangement_by_sides = z40.object({
|
|
683
|
+
left_side: z40.object({
|
|
684
|
+
pins: z40.array(z40.number()),
|
|
674
685
|
// @ts-ignore
|
|
675
|
-
direction:
|
|
686
|
+
direction: z40.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
676
687
|
}).optional(),
|
|
677
|
-
right_side:
|
|
678
|
-
pins:
|
|
688
|
+
right_side: z40.object({
|
|
689
|
+
pins: z40.array(z40.number()),
|
|
679
690
|
// @ts-ignore
|
|
680
|
-
direction:
|
|
691
|
+
direction: z40.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
681
692
|
}).optional(),
|
|
682
|
-
top_side:
|
|
683
|
-
pins:
|
|
693
|
+
top_side: z40.object({
|
|
694
|
+
pins: z40.array(z40.number()),
|
|
684
695
|
// @ts-ignore
|
|
685
|
-
direction:
|
|
696
|
+
direction: z40.enum(["left-to-right", "right-to-left"]).optional()
|
|
686
697
|
}).optional(),
|
|
687
|
-
bottom_side:
|
|
688
|
-
pins:
|
|
698
|
+
bottom_side: z40.object({
|
|
699
|
+
pins: z40.array(z40.number()),
|
|
689
700
|
// @ts-ignore
|
|
690
|
-
direction:
|
|
701
|
+
direction: z40.enum(["left-to-right", "right-to-left"]).optional()
|
|
691
702
|
}).optional()
|
|
692
703
|
});
|
|
693
704
|
expectTypesMatch(true);
|
|
694
|
-
var port_arrangement =
|
|
705
|
+
var port_arrangement = z40.union([
|
|
695
706
|
schematic_component_port_arrangement_by_size,
|
|
696
707
|
schematic_component_port_arrangement_by_sides
|
|
697
708
|
]);
|
|
698
|
-
var schematic_component =
|
|
699
|
-
type:
|
|
709
|
+
var schematic_component = z40.object({
|
|
710
|
+
type: z40.literal("schematic_component"),
|
|
700
711
|
size,
|
|
701
712
|
center: point,
|
|
702
|
-
source_component_id:
|
|
703
|
-
schematic_component_id:
|
|
713
|
+
source_component_id: z40.string(),
|
|
714
|
+
schematic_component_id: z40.string(),
|
|
704
715
|
pin_spacing: length.optional(),
|
|
705
716
|
pin_styles: schematic_pin_styles.optional(),
|
|
706
717
|
box_width: length.optional(),
|
|
707
|
-
symbol_name:
|
|
718
|
+
symbol_name: z40.string().optional(),
|
|
708
719
|
port_arrangement: port_arrangement.optional(),
|
|
709
|
-
port_labels:
|
|
710
|
-
symbol_display_value:
|
|
711
|
-
subcircuit_id:
|
|
712
|
-
schematic_group_id:
|
|
720
|
+
port_labels: z40.record(z40.string()).optional(),
|
|
721
|
+
symbol_display_value: z40.string().optional(),
|
|
722
|
+
subcircuit_id: z40.string().optional(),
|
|
723
|
+
schematic_group_id: z40.string().optional()
|
|
713
724
|
});
|
|
714
725
|
expectTypesMatch(true);
|
|
715
726
|
|
|
716
727
|
// src/schematic/schematic_line.ts
|
|
717
|
-
import { z as
|
|
718
|
-
var schematic_line =
|
|
719
|
-
type:
|
|
720
|
-
schematic_component_id:
|
|
728
|
+
import { z as z41 } from "zod";
|
|
729
|
+
var schematic_line = z41.object({
|
|
730
|
+
type: z41.literal("schematic_line"),
|
|
731
|
+
schematic_component_id: z41.string(),
|
|
721
732
|
x1: distance,
|
|
722
733
|
x2: distance,
|
|
723
734
|
y1: distance,
|
|
@@ -726,41 +737,41 @@ var schematic_line = z40.object({
|
|
|
726
737
|
expectTypesMatch(true);
|
|
727
738
|
|
|
728
739
|
// src/schematic/schematic_trace.ts
|
|
729
|
-
import { z as
|
|
730
|
-
var schematic_trace =
|
|
731
|
-
type:
|
|
732
|
-
schematic_trace_id:
|
|
733
|
-
source_trace_id:
|
|
734
|
-
junctions:
|
|
735
|
-
|
|
736
|
-
x:
|
|
737
|
-
y:
|
|
740
|
+
import { z as z42 } from "zod";
|
|
741
|
+
var schematic_trace = z42.object({
|
|
742
|
+
type: z42.literal("schematic_trace"),
|
|
743
|
+
schematic_trace_id: z42.string(),
|
|
744
|
+
source_trace_id: z42.string(),
|
|
745
|
+
junctions: z42.array(
|
|
746
|
+
z42.object({
|
|
747
|
+
x: z42.number(),
|
|
748
|
+
y: z42.number()
|
|
738
749
|
})
|
|
739
750
|
),
|
|
740
|
-
edges:
|
|
741
|
-
|
|
742
|
-
from:
|
|
743
|
-
x:
|
|
744
|
-
y:
|
|
751
|
+
edges: z42.array(
|
|
752
|
+
z42.object({
|
|
753
|
+
from: z42.object({
|
|
754
|
+
x: z42.number(),
|
|
755
|
+
y: z42.number()
|
|
745
756
|
}),
|
|
746
|
-
to:
|
|
747
|
-
x:
|
|
748
|
-
y:
|
|
757
|
+
to: z42.object({
|
|
758
|
+
x: z42.number(),
|
|
759
|
+
y: z42.number()
|
|
749
760
|
}),
|
|
750
|
-
is_crossing:
|
|
751
|
-
from_schematic_port_id:
|
|
752
|
-
to_schematic_port_id:
|
|
761
|
+
is_crossing: z42.boolean().optional(),
|
|
762
|
+
from_schematic_port_id: z42.string().optional(),
|
|
763
|
+
to_schematic_port_id: z42.string().optional()
|
|
753
764
|
})
|
|
754
765
|
)
|
|
755
766
|
});
|
|
756
767
|
expectTypesMatch(true);
|
|
757
768
|
|
|
758
769
|
// src/schematic/schematic_text.ts
|
|
759
|
-
import { z as
|
|
770
|
+
import { z as z44 } from "zod";
|
|
760
771
|
|
|
761
772
|
// src/common/FivePointAnchor.ts
|
|
762
|
-
import { z as
|
|
763
|
-
var fivePointAnchor =
|
|
773
|
+
import { z as z43 } from "zod";
|
|
774
|
+
var fivePointAnchor = z43.enum([
|
|
764
775
|
"center",
|
|
765
776
|
"left",
|
|
766
777
|
"right",
|
|
@@ -769,101 +780,101 @@ var fivePointAnchor = z42.enum([
|
|
|
769
780
|
]);
|
|
770
781
|
|
|
771
782
|
// src/schematic/schematic_text.ts
|
|
772
|
-
var schematic_text =
|
|
773
|
-
type:
|
|
774
|
-
schematic_component_id:
|
|
775
|
-
schematic_text_id:
|
|
776
|
-
text:
|
|
777
|
-
font_size:
|
|
778
|
-
position:
|
|
783
|
+
var schematic_text = z44.object({
|
|
784
|
+
type: z44.literal("schematic_text"),
|
|
785
|
+
schematic_component_id: z44.string().optional(),
|
|
786
|
+
schematic_text_id: z44.string(),
|
|
787
|
+
text: z44.string(),
|
|
788
|
+
font_size: z44.number().default(0.18),
|
|
789
|
+
position: z44.object({
|
|
779
790
|
x: distance,
|
|
780
791
|
y: distance
|
|
781
792
|
}),
|
|
782
|
-
rotation:
|
|
783
|
-
anchor:
|
|
784
|
-
color:
|
|
793
|
+
rotation: z44.number().default(0),
|
|
794
|
+
anchor: z44.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
795
|
+
color: z44.string().default("#000000")
|
|
785
796
|
});
|
|
786
797
|
expectTypesMatch(true);
|
|
787
798
|
|
|
788
799
|
// src/schematic/schematic_port.ts
|
|
789
|
-
import { z as
|
|
790
|
-
var schematic_port =
|
|
791
|
-
type:
|
|
792
|
-
schematic_port_id:
|
|
793
|
-
source_port_id:
|
|
794
|
-
schematic_component_id:
|
|
800
|
+
import { z as z45 } from "zod";
|
|
801
|
+
var schematic_port = z45.object({
|
|
802
|
+
type: z45.literal("schematic_port"),
|
|
803
|
+
schematic_port_id: z45.string(),
|
|
804
|
+
source_port_id: z45.string(),
|
|
805
|
+
schematic_component_id: z45.string().optional(),
|
|
795
806
|
center: point,
|
|
796
|
-
facing_direction:
|
|
797
|
-
distance_from_component_edge:
|
|
798
|
-
side_of_component:
|
|
799
|
-
true_ccw_index:
|
|
800
|
-
pin_number:
|
|
801
|
-
display_pin_label:
|
|
807
|
+
facing_direction: z45.enum(["up", "down", "left", "right"]).optional(),
|
|
808
|
+
distance_from_component_edge: z45.number().optional(),
|
|
809
|
+
side_of_component: z45.enum(["top", "bottom", "left", "right"]).optional(),
|
|
810
|
+
true_ccw_index: z45.number().optional(),
|
|
811
|
+
pin_number: z45.number().optional(),
|
|
812
|
+
display_pin_label: z45.string().optional()
|
|
802
813
|
}).describe("Defines a port on a schematic component");
|
|
803
814
|
expectTypesMatch(true);
|
|
804
815
|
|
|
805
816
|
// src/schematic/schematic_net_label.ts
|
|
806
|
-
import { z as
|
|
807
|
-
var schematic_net_label =
|
|
808
|
-
type:
|
|
817
|
+
import { z as z46 } from "zod";
|
|
818
|
+
var schematic_net_label = z46.object({
|
|
819
|
+
type: z46.literal("schematic_net_label"),
|
|
809
820
|
schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
|
|
810
|
-
schematic_trace_id:
|
|
811
|
-
source_trace_id:
|
|
812
|
-
source_net_id:
|
|
821
|
+
schematic_trace_id: z46.string().optional(),
|
|
822
|
+
source_trace_id: z46.string().optional(),
|
|
823
|
+
source_net_id: z46.string(),
|
|
813
824
|
center: point,
|
|
814
825
|
anchor_position: point.optional(),
|
|
815
|
-
anchor_side:
|
|
816
|
-
text:
|
|
817
|
-
symbol_name:
|
|
826
|
+
anchor_side: z46.enum(["top", "bottom", "left", "right"]),
|
|
827
|
+
text: z46.string(),
|
|
828
|
+
symbol_name: z46.string().optional()
|
|
818
829
|
});
|
|
819
830
|
expectTypesMatch(true);
|
|
820
831
|
|
|
821
832
|
// src/schematic/schematic_error.ts
|
|
822
|
-
import { z as
|
|
823
|
-
var schematic_error =
|
|
824
|
-
type:
|
|
825
|
-
schematic_error_id:
|
|
833
|
+
import { z as z47 } from "zod";
|
|
834
|
+
var schematic_error = z47.object({
|
|
835
|
+
type: z47.literal("schematic_error"),
|
|
836
|
+
schematic_error_id: z47.string(),
|
|
826
837
|
// eventually each error type should be broken out into a dir of files
|
|
827
|
-
error_type:
|
|
828
|
-
message:
|
|
838
|
+
error_type: z47.literal("schematic_port_not_found").default("schematic_port_not_found"),
|
|
839
|
+
message: z47.string()
|
|
829
840
|
}).describe("Defines a schematic error on the schematic");
|
|
830
841
|
expectTypesMatch(true);
|
|
831
842
|
|
|
832
843
|
// src/schematic/schematic_layout_error.ts
|
|
833
|
-
import { z as
|
|
834
|
-
var schematic_layout_error =
|
|
835
|
-
type:
|
|
844
|
+
import { z as z48 } from "zod";
|
|
845
|
+
var schematic_layout_error = z48.object({
|
|
846
|
+
type: z48.literal("schematic_layout_error"),
|
|
836
847
|
schematic_layout_error_id: getZodPrefixedIdWithDefault(
|
|
837
848
|
"schematic_layout_error"
|
|
838
849
|
),
|
|
839
|
-
error_type:
|
|
840
|
-
message:
|
|
841
|
-
source_group_id:
|
|
842
|
-
schematic_group_id:
|
|
850
|
+
error_type: z48.literal("schematic_layout_error").default("schematic_layout_error"),
|
|
851
|
+
message: z48.string(),
|
|
852
|
+
source_group_id: z48.string(),
|
|
853
|
+
schematic_group_id: z48.string()
|
|
843
854
|
}).describe("Error emitted when schematic layout fails for a group");
|
|
844
855
|
expectTypesMatch(true);
|
|
845
856
|
|
|
846
857
|
// src/schematic/schematic_debug_object.ts
|
|
847
|
-
import { z as
|
|
848
|
-
var schematic_debug_object_base =
|
|
849
|
-
type:
|
|
850
|
-
label:
|
|
858
|
+
import { z as z49 } from "zod";
|
|
859
|
+
var schematic_debug_object_base = z49.object({
|
|
860
|
+
type: z49.literal("schematic_debug_object"),
|
|
861
|
+
label: z49.string().optional()
|
|
851
862
|
});
|
|
852
863
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
853
|
-
shape:
|
|
864
|
+
shape: z49.literal("rect"),
|
|
854
865
|
center: point,
|
|
855
866
|
size
|
|
856
867
|
});
|
|
857
868
|
var schematic_debug_line = schematic_debug_object_base.extend({
|
|
858
|
-
shape:
|
|
869
|
+
shape: z49.literal("line"),
|
|
859
870
|
start: point,
|
|
860
871
|
end: point
|
|
861
872
|
});
|
|
862
873
|
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
863
|
-
shape:
|
|
874
|
+
shape: z49.literal("point"),
|
|
864
875
|
center: point
|
|
865
876
|
});
|
|
866
|
-
var schematic_debug_object =
|
|
877
|
+
var schematic_debug_object = z49.discriminatedUnion("shape", [
|
|
867
878
|
schematic_debug_rect,
|
|
868
879
|
schematic_debug_line,
|
|
869
880
|
schematic_debug_point
|
|
@@ -871,53 +882,53 @@ var schematic_debug_object = z48.discriminatedUnion("shape", [
|
|
|
871
882
|
expectTypesMatch(true);
|
|
872
883
|
|
|
873
884
|
// src/schematic/schematic_voltage_probe.ts
|
|
874
|
-
import { z as
|
|
875
|
-
var schematic_voltage_probe =
|
|
876
|
-
type:
|
|
877
|
-
schematic_voltage_probe_id:
|
|
885
|
+
import { z as z50 } from "zod";
|
|
886
|
+
var schematic_voltage_probe = z50.object({
|
|
887
|
+
type: z50.literal("schematic_voltage_probe"),
|
|
888
|
+
schematic_voltage_probe_id: z50.string(),
|
|
878
889
|
position: point,
|
|
879
|
-
schematic_trace_id:
|
|
890
|
+
schematic_trace_id: z50.string(),
|
|
880
891
|
voltage: voltage.optional()
|
|
881
892
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
882
893
|
expectTypesMatch(true);
|
|
883
894
|
|
|
884
895
|
// src/schematic/schematic_manual_edit_conflict_warning.ts
|
|
885
|
-
import { z as
|
|
886
|
-
var schematic_manual_edit_conflict_warning =
|
|
887
|
-
type:
|
|
896
|
+
import { z as z51 } from "zod";
|
|
897
|
+
var schematic_manual_edit_conflict_warning = z51.object({
|
|
898
|
+
type: z51.literal("schematic_manual_edit_conflict_warning"),
|
|
888
899
|
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
889
900
|
"schematic_manual_edit_conflict_warning"
|
|
890
901
|
),
|
|
891
|
-
warning_type:
|
|
892
|
-
message:
|
|
893
|
-
schematic_component_id:
|
|
894
|
-
schematic_group_id:
|
|
895
|
-
subcircuit_id:
|
|
896
|
-
source_component_id:
|
|
902
|
+
warning_type: z51.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),
|
|
903
|
+
message: z51.string(),
|
|
904
|
+
schematic_component_id: z51.string(),
|
|
905
|
+
schematic_group_id: z51.string().optional(),
|
|
906
|
+
subcircuit_id: z51.string().optional(),
|
|
907
|
+
source_component_id: z51.string()
|
|
897
908
|
}).describe(
|
|
898
909
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
899
910
|
);
|
|
900
911
|
expectTypesMatch(true);
|
|
901
912
|
|
|
902
913
|
// src/schematic/schematic_group.ts
|
|
903
|
-
import { z as
|
|
904
|
-
var schematic_group =
|
|
905
|
-
type:
|
|
914
|
+
import { z as z52 } from "zod";
|
|
915
|
+
var schematic_group = z52.object({
|
|
916
|
+
type: z52.literal("schematic_group"),
|
|
906
917
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
907
|
-
source_group_id:
|
|
908
|
-
is_subcircuit:
|
|
909
|
-
subcircuit_id:
|
|
918
|
+
source_group_id: z52.string(),
|
|
919
|
+
is_subcircuit: z52.boolean().optional(),
|
|
920
|
+
subcircuit_id: z52.string().optional(),
|
|
910
921
|
width: length,
|
|
911
922
|
height: length,
|
|
912
923
|
center: point,
|
|
913
|
-
schematic_component_ids:
|
|
914
|
-
name:
|
|
915
|
-
description:
|
|
924
|
+
schematic_component_ids: z52.array(z52.string()),
|
|
925
|
+
name: z52.string().optional(),
|
|
926
|
+
description: z52.string().optional()
|
|
916
927
|
}).describe("Defines a group of components on the schematic");
|
|
917
928
|
expectTypesMatch(true);
|
|
918
929
|
|
|
919
930
|
// src/pcb/properties/layer_ref.ts
|
|
920
|
-
import { z as
|
|
931
|
+
import { z as z53 } from "zod";
|
|
921
932
|
var all_layers = [
|
|
922
933
|
"top",
|
|
923
934
|
"bottom",
|
|
@@ -928,9 +939,9 @@ var all_layers = [
|
|
|
928
939
|
"inner5",
|
|
929
940
|
"inner6"
|
|
930
941
|
];
|
|
931
|
-
var layer_string =
|
|
942
|
+
var layer_string = z53.enum(all_layers);
|
|
932
943
|
var layer_ref = layer_string.or(
|
|
933
|
-
|
|
944
|
+
z53.object({
|
|
934
945
|
name: layer_string
|
|
935
946
|
})
|
|
936
947
|
).transform((layer) => {
|
|
@@ -939,53 +950,53 @@ var layer_ref = layer_string.or(
|
|
|
939
950
|
}
|
|
940
951
|
return layer.name;
|
|
941
952
|
});
|
|
942
|
-
var visible_layer =
|
|
953
|
+
var visible_layer = z53.enum(["top", "bottom"]);
|
|
943
954
|
|
|
944
955
|
// src/pcb/properties/pcb_route_hints.ts
|
|
945
|
-
import { z as
|
|
946
|
-
var pcb_route_hint =
|
|
956
|
+
import { z as z54 } from "zod";
|
|
957
|
+
var pcb_route_hint = z54.object({
|
|
947
958
|
x: distance,
|
|
948
959
|
y: distance,
|
|
949
|
-
via:
|
|
960
|
+
via: z54.boolean().optional(),
|
|
950
961
|
via_to_layer: layer_ref.optional()
|
|
951
962
|
});
|
|
952
|
-
var pcb_route_hints =
|
|
963
|
+
var pcb_route_hints = z54.array(pcb_route_hint);
|
|
953
964
|
|
|
954
965
|
// src/pcb/properties/route_hint_point.ts
|
|
955
|
-
import { z as
|
|
956
|
-
var route_hint_point =
|
|
966
|
+
import { z as z55 } from "zod";
|
|
967
|
+
var route_hint_point = z55.object({
|
|
957
968
|
x: distance,
|
|
958
969
|
y: distance,
|
|
959
|
-
via:
|
|
970
|
+
via: z55.boolean().optional(),
|
|
960
971
|
to_layer: layer_ref.optional(),
|
|
961
972
|
trace_width: distance.optional()
|
|
962
973
|
});
|
|
963
974
|
|
|
964
975
|
// src/pcb/pcb_component.ts
|
|
965
|
-
import { z as
|
|
966
|
-
var pcb_component =
|
|
967
|
-
type:
|
|
976
|
+
import { z as z56 } from "zod";
|
|
977
|
+
var pcb_component = z56.object({
|
|
978
|
+
type: z56.literal("pcb_component"),
|
|
968
979
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
969
|
-
source_component_id:
|
|
980
|
+
source_component_id: z56.string(),
|
|
970
981
|
center: point,
|
|
971
982
|
layer: layer_ref,
|
|
972
983
|
rotation,
|
|
973
984
|
width: length,
|
|
974
985
|
height: length,
|
|
975
|
-
subcircuit_id:
|
|
976
|
-
pcb_group_id:
|
|
986
|
+
subcircuit_id: z56.string().optional(),
|
|
987
|
+
pcb_group_id: z56.string().optional()
|
|
977
988
|
}).describe("Defines a component on the PCB");
|
|
978
989
|
expectTypesMatch(true);
|
|
979
990
|
|
|
980
991
|
// src/pcb/pcb_hole.ts
|
|
981
|
-
import { z as
|
|
982
|
-
var pcb_hole_circle_or_square =
|
|
983
|
-
type:
|
|
992
|
+
import { z as z57 } from "zod";
|
|
993
|
+
var pcb_hole_circle_or_square = z57.object({
|
|
994
|
+
type: z57.literal("pcb_hole"),
|
|
984
995
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
985
|
-
pcb_group_id:
|
|
986
|
-
subcircuit_id:
|
|
987
|
-
hole_shape:
|
|
988
|
-
hole_diameter:
|
|
996
|
+
pcb_group_id: z57.string().optional(),
|
|
997
|
+
subcircuit_id: z57.string().optional(),
|
|
998
|
+
hole_shape: z57.enum(["circle", "square"]),
|
|
999
|
+
hole_diameter: z57.number(),
|
|
989
1000
|
x: distance,
|
|
990
1001
|
y: distance
|
|
991
1002
|
});
|
|
@@ -993,14 +1004,14 @@ var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
|
993
1004
|
"Defines a circular or square hole on the PCB"
|
|
994
1005
|
);
|
|
995
1006
|
expectTypesMatch(true);
|
|
996
|
-
var pcb_hole_oval =
|
|
997
|
-
type:
|
|
1007
|
+
var pcb_hole_oval = z57.object({
|
|
1008
|
+
type: z57.literal("pcb_hole"),
|
|
998
1009
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
999
|
-
pcb_group_id:
|
|
1000
|
-
subcircuit_id:
|
|
1001
|
-
hole_shape:
|
|
1002
|
-
hole_width:
|
|
1003
|
-
hole_height:
|
|
1010
|
+
pcb_group_id: z57.string().optional(),
|
|
1011
|
+
subcircuit_id: z57.string().optional(),
|
|
1012
|
+
hole_shape: z57.literal("oval"),
|
|
1013
|
+
hole_width: z57.number(),
|
|
1014
|
+
hole_height: z57.number(),
|
|
1004
1015
|
x: distance,
|
|
1005
1016
|
y: distance
|
|
1006
1017
|
});
|
|
@@ -1011,77 +1022,77 @@ expectTypesMatch(true);
|
|
|
1011
1022
|
var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval);
|
|
1012
1023
|
|
|
1013
1024
|
// src/pcb/pcb_plated_hole.ts
|
|
1014
|
-
import { z as
|
|
1015
|
-
var pcb_plated_hole_circle =
|
|
1016
|
-
type:
|
|
1017
|
-
shape:
|
|
1018
|
-
pcb_group_id:
|
|
1019
|
-
subcircuit_id:
|
|
1020
|
-
outer_diameter:
|
|
1021
|
-
hole_diameter:
|
|
1025
|
+
import { z as z58 } from "zod";
|
|
1026
|
+
var pcb_plated_hole_circle = z58.object({
|
|
1027
|
+
type: z58.literal("pcb_plated_hole"),
|
|
1028
|
+
shape: z58.literal("circle"),
|
|
1029
|
+
pcb_group_id: z58.string().optional(),
|
|
1030
|
+
subcircuit_id: z58.string().optional(),
|
|
1031
|
+
outer_diameter: z58.number(),
|
|
1032
|
+
hole_diameter: z58.number(),
|
|
1022
1033
|
x: distance,
|
|
1023
1034
|
y: distance,
|
|
1024
|
-
layers:
|
|
1025
|
-
port_hints:
|
|
1026
|
-
pcb_component_id:
|
|
1027
|
-
pcb_port_id:
|
|
1035
|
+
layers: z58.array(layer_ref),
|
|
1036
|
+
port_hints: z58.array(z58.string()).optional(),
|
|
1037
|
+
pcb_component_id: z58.string().optional(),
|
|
1038
|
+
pcb_port_id: z58.string().optional(),
|
|
1028
1039
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1029
1040
|
});
|
|
1030
|
-
var pcb_plated_hole_oval =
|
|
1031
|
-
type:
|
|
1032
|
-
shape:
|
|
1033
|
-
pcb_group_id:
|
|
1034
|
-
subcircuit_id:
|
|
1035
|
-
outer_width:
|
|
1036
|
-
outer_height:
|
|
1037
|
-
hole_width:
|
|
1038
|
-
hole_height:
|
|
1041
|
+
var pcb_plated_hole_oval = z58.object({
|
|
1042
|
+
type: z58.literal("pcb_plated_hole"),
|
|
1043
|
+
shape: z58.enum(["oval", "pill"]),
|
|
1044
|
+
pcb_group_id: z58.string().optional(),
|
|
1045
|
+
subcircuit_id: z58.string().optional(),
|
|
1046
|
+
outer_width: z58.number(),
|
|
1047
|
+
outer_height: z58.number(),
|
|
1048
|
+
hole_width: z58.number(),
|
|
1049
|
+
hole_height: z58.number(),
|
|
1039
1050
|
x: distance,
|
|
1040
1051
|
y: distance,
|
|
1041
|
-
layers:
|
|
1042
|
-
port_hints:
|
|
1043
|
-
pcb_component_id:
|
|
1044
|
-
pcb_port_id:
|
|
1052
|
+
layers: z58.array(layer_ref),
|
|
1053
|
+
port_hints: z58.array(z58.string()).optional(),
|
|
1054
|
+
pcb_component_id: z58.string().optional(),
|
|
1055
|
+
pcb_port_id: z58.string().optional(),
|
|
1045
1056
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1046
1057
|
});
|
|
1047
|
-
var pcb_circular_hole_with_rect_pad =
|
|
1048
|
-
type:
|
|
1049
|
-
shape:
|
|
1050
|
-
pcb_group_id:
|
|
1051
|
-
subcircuit_id:
|
|
1052
|
-
hole_shape:
|
|
1053
|
-
pad_shape:
|
|
1054
|
-
hole_diameter:
|
|
1055
|
-
rect_pad_width:
|
|
1056
|
-
rect_pad_height:
|
|
1058
|
+
var pcb_circular_hole_with_rect_pad = z58.object({
|
|
1059
|
+
type: z58.literal("pcb_plated_hole"),
|
|
1060
|
+
shape: z58.literal("circular_hole_with_rect_pad"),
|
|
1061
|
+
pcb_group_id: z58.string().optional(),
|
|
1062
|
+
subcircuit_id: z58.string().optional(),
|
|
1063
|
+
hole_shape: z58.literal("circle"),
|
|
1064
|
+
pad_shape: z58.literal("rect"),
|
|
1065
|
+
hole_diameter: z58.number(),
|
|
1066
|
+
rect_pad_width: z58.number(),
|
|
1067
|
+
rect_pad_height: z58.number(),
|
|
1057
1068
|
x: distance,
|
|
1058
1069
|
y: distance,
|
|
1059
|
-
layers:
|
|
1060
|
-
port_hints:
|
|
1061
|
-
pcb_component_id:
|
|
1062
|
-
pcb_port_id:
|
|
1070
|
+
layers: z58.array(layer_ref),
|
|
1071
|
+
port_hints: z58.array(z58.string()).optional(),
|
|
1072
|
+
pcb_component_id: z58.string().optional(),
|
|
1073
|
+
pcb_port_id: z58.string().optional(),
|
|
1063
1074
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1064
1075
|
});
|
|
1065
|
-
var pcb_pill_hole_with_rect_pad =
|
|
1066
|
-
type:
|
|
1067
|
-
shape:
|
|
1068
|
-
pcb_group_id:
|
|
1069
|
-
subcircuit_id:
|
|
1070
|
-
hole_shape:
|
|
1071
|
-
pad_shape:
|
|
1072
|
-
hole_width:
|
|
1073
|
-
hole_height:
|
|
1074
|
-
rect_pad_width:
|
|
1075
|
-
rect_pad_height:
|
|
1076
|
+
var pcb_pill_hole_with_rect_pad = z58.object({
|
|
1077
|
+
type: z58.literal("pcb_plated_hole"),
|
|
1078
|
+
shape: z58.literal("pill_hole_with_rect_pad"),
|
|
1079
|
+
pcb_group_id: z58.string().optional(),
|
|
1080
|
+
subcircuit_id: z58.string().optional(),
|
|
1081
|
+
hole_shape: z58.literal("pill"),
|
|
1082
|
+
pad_shape: z58.literal("rect"),
|
|
1083
|
+
hole_width: z58.number(),
|
|
1084
|
+
hole_height: z58.number(),
|
|
1085
|
+
rect_pad_width: z58.number(),
|
|
1086
|
+
rect_pad_height: z58.number(),
|
|
1076
1087
|
x: distance,
|
|
1077
1088
|
y: distance,
|
|
1078
|
-
layers:
|
|
1079
|
-
port_hints:
|
|
1080
|
-
pcb_component_id:
|
|
1081
|
-
pcb_port_id:
|
|
1089
|
+
layers: z58.array(layer_ref),
|
|
1090
|
+
port_hints: z58.array(z58.string()).optional(),
|
|
1091
|
+
pcb_component_id: z58.string().optional(),
|
|
1092
|
+
pcb_port_id: z58.string().optional(),
|
|
1082
1093
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1083
1094
|
});
|
|
1084
|
-
var pcb_plated_hole =
|
|
1095
|
+
var pcb_plated_hole = z58.union([
|
|
1085
1096
|
pcb_plated_hole_circle,
|
|
1086
1097
|
pcb_plated_hole_oval,
|
|
1087
1098
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -1095,96 +1106,96 @@ expectTypesMatch(true);
|
|
|
1095
1106
|
expectTypesMatch(true);
|
|
1096
1107
|
|
|
1097
1108
|
// src/pcb/pcb_port.ts
|
|
1098
|
-
import { z as
|
|
1099
|
-
var pcb_port =
|
|
1100
|
-
type:
|
|
1109
|
+
import { z as z59 } from "zod";
|
|
1110
|
+
var pcb_port = z59.object({
|
|
1111
|
+
type: z59.literal("pcb_port"),
|
|
1101
1112
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
1102
|
-
pcb_group_id:
|
|
1103
|
-
subcircuit_id:
|
|
1104
|
-
source_port_id:
|
|
1105
|
-
pcb_component_id:
|
|
1113
|
+
pcb_group_id: z59.string().optional(),
|
|
1114
|
+
subcircuit_id: z59.string().optional(),
|
|
1115
|
+
source_port_id: z59.string(),
|
|
1116
|
+
pcb_component_id: z59.string(),
|
|
1106
1117
|
x: distance,
|
|
1107
1118
|
y: distance,
|
|
1108
|
-
layers:
|
|
1119
|
+
layers: z59.array(layer_ref)
|
|
1109
1120
|
}).describe("Defines a port on the PCB");
|
|
1110
1121
|
expectTypesMatch(true);
|
|
1111
1122
|
|
|
1112
1123
|
// src/pcb/pcb_smtpad.ts
|
|
1113
|
-
import { z as
|
|
1114
|
-
var pcb_smtpad_circle =
|
|
1115
|
-
type:
|
|
1116
|
-
shape:
|
|
1124
|
+
import { z as z60 } from "zod";
|
|
1125
|
+
var pcb_smtpad_circle = z60.object({
|
|
1126
|
+
type: z60.literal("pcb_smtpad"),
|
|
1127
|
+
shape: z60.literal("circle"),
|
|
1117
1128
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1118
|
-
pcb_group_id:
|
|
1119
|
-
subcircuit_id:
|
|
1129
|
+
pcb_group_id: z60.string().optional(),
|
|
1130
|
+
subcircuit_id: z60.string().optional(),
|
|
1120
1131
|
x: distance,
|
|
1121
1132
|
y: distance,
|
|
1122
|
-
radius:
|
|
1133
|
+
radius: z60.number(),
|
|
1123
1134
|
layer: layer_ref,
|
|
1124
|
-
port_hints:
|
|
1125
|
-
pcb_component_id:
|
|
1126
|
-
pcb_port_id:
|
|
1135
|
+
port_hints: z60.array(z60.string()).optional(),
|
|
1136
|
+
pcb_component_id: z60.string().optional(),
|
|
1137
|
+
pcb_port_id: z60.string().optional()
|
|
1127
1138
|
});
|
|
1128
|
-
var pcb_smtpad_rect =
|
|
1129
|
-
type:
|
|
1130
|
-
shape:
|
|
1139
|
+
var pcb_smtpad_rect = z60.object({
|
|
1140
|
+
type: z60.literal("pcb_smtpad"),
|
|
1141
|
+
shape: z60.literal("rect"),
|
|
1131
1142
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1132
|
-
pcb_group_id:
|
|
1133
|
-
subcircuit_id:
|
|
1143
|
+
pcb_group_id: z60.string().optional(),
|
|
1144
|
+
subcircuit_id: z60.string().optional(),
|
|
1134
1145
|
x: distance,
|
|
1135
1146
|
y: distance,
|
|
1136
|
-
width:
|
|
1137
|
-
height:
|
|
1147
|
+
width: z60.number(),
|
|
1148
|
+
height: z60.number(),
|
|
1138
1149
|
layer: layer_ref,
|
|
1139
|
-
port_hints:
|
|
1140
|
-
pcb_component_id:
|
|
1141
|
-
pcb_port_id:
|
|
1150
|
+
port_hints: z60.array(z60.string()).optional(),
|
|
1151
|
+
pcb_component_id: z60.string().optional(),
|
|
1152
|
+
pcb_port_id: z60.string().optional()
|
|
1142
1153
|
});
|
|
1143
|
-
var pcb_smtpad_rotated_rect =
|
|
1144
|
-
type:
|
|
1145
|
-
shape:
|
|
1154
|
+
var pcb_smtpad_rotated_rect = z60.object({
|
|
1155
|
+
type: z60.literal("pcb_smtpad"),
|
|
1156
|
+
shape: z60.literal("rotated_rect"),
|
|
1146
1157
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1147
|
-
pcb_group_id:
|
|
1148
|
-
subcircuit_id:
|
|
1158
|
+
pcb_group_id: z60.string().optional(),
|
|
1159
|
+
subcircuit_id: z60.string().optional(),
|
|
1149
1160
|
x: distance,
|
|
1150
1161
|
y: distance,
|
|
1151
|
-
width:
|
|
1152
|
-
height:
|
|
1162
|
+
width: z60.number(),
|
|
1163
|
+
height: z60.number(),
|
|
1153
1164
|
ccw_rotation: rotation,
|
|
1154
1165
|
layer: layer_ref,
|
|
1155
|
-
port_hints:
|
|
1156
|
-
pcb_component_id:
|
|
1157
|
-
pcb_port_id:
|
|
1166
|
+
port_hints: z60.array(z60.string()).optional(),
|
|
1167
|
+
pcb_component_id: z60.string().optional(),
|
|
1168
|
+
pcb_port_id: z60.string().optional()
|
|
1158
1169
|
});
|
|
1159
|
-
var pcb_smtpad_pill =
|
|
1160
|
-
type:
|
|
1161
|
-
shape:
|
|
1170
|
+
var pcb_smtpad_pill = z60.object({
|
|
1171
|
+
type: z60.literal("pcb_smtpad"),
|
|
1172
|
+
shape: z60.literal("pill"),
|
|
1162
1173
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1163
|
-
pcb_group_id:
|
|
1164
|
-
subcircuit_id:
|
|
1174
|
+
pcb_group_id: z60.string().optional(),
|
|
1175
|
+
subcircuit_id: z60.string().optional(),
|
|
1165
1176
|
x: distance,
|
|
1166
1177
|
y: distance,
|
|
1167
|
-
width:
|
|
1168
|
-
height:
|
|
1169
|
-
radius:
|
|
1178
|
+
width: z60.number(),
|
|
1179
|
+
height: z60.number(),
|
|
1180
|
+
radius: z60.number(),
|
|
1170
1181
|
layer: layer_ref,
|
|
1171
|
-
port_hints:
|
|
1172
|
-
pcb_component_id:
|
|
1173
|
-
pcb_port_id:
|
|
1182
|
+
port_hints: z60.array(z60.string()).optional(),
|
|
1183
|
+
pcb_component_id: z60.string().optional(),
|
|
1184
|
+
pcb_port_id: z60.string().optional()
|
|
1174
1185
|
});
|
|
1175
|
-
var pcb_smtpad_polygon =
|
|
1176
|
-
type:
|
|
1177
|
-
shape:
|
|
1186
|
+
var pcb_smtpad_polygon = z60.object({
|
|
1187
|
+
type: z60.literal("pcb_smtpad"),
|
|
1188
|
+
shape: z60.literal("polygon"),
|
|
1178
1189
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1179
|
-
pcb_group_id:
|
|
1180
|
-
subcircuit_id:
|
|
1181
|
-
points:
|
|
1190
|
+
pcb_group_id: z60.string().optional(),
|
|
1191
|
+
subcircuit_id: z60.string().optional(),
|
|
1192
|
+
points: z60.array(point),
|
|
1182
1193
|
layer: layer_ref,
|
|
1183
|
-
port_hints:
|
|
1184
|
-
pcb_component_id:
|
|
1185
|
-
pcb_port_id:
|
|
1194
|
+
port_hints: z60.array(z60.string()).optional(),
|
|
1195
|
+
pcb_component_id: z60.string().optional(),
|
|
1196
|
+
pcb_port_id: z60.string().optional()
|
|
1186
1197
|
});
|
|
1187
|
-
var pcb_smtpad =
|
|
1198
|
+
var pcb_smtpad = z60.discriminatedUnion("shape", [
|
|
1188
1199
|
pcb_smtpad_circle,
|
|
1189
1200
|
pcb_smtpad_rect,
|
|
1190
1201
|
pcb_smtpad_rotated_rect,
|
|
@@ -1198,79 +1209,79 @@ expectTypesMatch(true);
|
|
|
1198
1209
|
expectTypesMatch(true);
|
|
1199
1210
|
|
|
1200
1211
|
// src/pcb/pcb_solder_paste.ts
|
|
1201
|
-
import { z as
|
|
1202
|
-
var pcb_solder_paste_circle =
|
|
1203
|
-
type:
|
|
1204
|
-
shape:
|
|
1212
|
+
import { z as z61 } from "zod";
|
|
1213
|
+
var pcb_solder_paste_circle = z61.object({
|
|
1214
|
+
type: z61.literal("pcb_solder_paste"),
|
|
1215
|
+
shape: z61.literal("circle"),
|
|
1205
1216
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1206
|
-
pcb_group_id:
|
|
1207
|
-
subcircuit_id:
|
|
1217
|
+
pcb_group_id: z61.string().optional(),
|
|
1218
|
+
subcircuit_id: z61.string().optional(),
|
|
1208
1219
|
x: distance,
|
|
1209
1220
|
y: distance,
|
|
1210
|
-
radius:
|
|
1221
|
+
radius: z61.number(),
|
|
1211
1222
|
layer: layer_ref,
|
|
1212
|
-
pcb_component_id:
|
|
1213
|
-
pcb_smtpad_id:
|
|
1223
|
+
pcb_component_id: z61.string().optional(),
|
|
1224
|
+
pcb_smtpad_id: z61.string().optional()
|
|
1214
1225
|
});
|
|
1215
|
-
var pcb_solder_paste_rect =
|
|
1216
|
-
type:
|
|
1217
|
-
shape:
|
|
1226
|
+
var pcb_solder_paste_rect = z61.object({
|
|
1227
|
+
type: z61.literal("pcb_solder_paste"),
|
|
1228
|
+
shape: z61.literal("rect"),
|
|
1218
1229
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1219
|
-
pcb_group_id:
|
|
1220
|
-
subcircuit_id:
|
|
1230
|
+
pcb_group_id: z61.string().optional(),
|
|
1231
|
+
subcircuit_id: z61.string().optional(),
|
|
1221
1232
|
x: distance,
|
|
1222
1233
|
y: distance,
|
|
1223
|
-
width:
|
|
1224
|
-
height:
|
|
1234
|
+
width: z61.number(),
|
|
1235
|
+
height: z61.number(),
|
|
1225
1236
|
layer: layer_ref,
|
|
1226
|
-
pcb_component_id:
|
|
1227
|
-
pcb_smtpad_id:
|
|
1237
|
+
pcb_component_id: z61.string().optional(),
|
|
1238
|
+
pcb_smtpad_id: z61.string().optional()
|
|
1228
1239
|
});
|
|
1229
|
-
var pcb_solder_paste_pill =
|
|
1230
|
-
type:
|
|
1231
|
-
shape:
|
|
1240
|
+
var pcb_solder_paste_pill = z61.object({
|
|
1241
|
+
type: z61.literal("pcb_solder_paste"),
|
|
1242
|
+
shape: z61.literal("pill"),
|
|
1232
1243
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1233
|
-
pcb_group_id:
|
|
1234
|
-
subcircuit_id:
|
|
1244
|
+
pcb_group_id: z61.string().optional(),
|
|
1245
|
+
subcircuit_id: z61.string().optional(),
|
|
1235
1246
|
x: distance,
|
|
1236
1247
|
y: distance,
|
|
1237
|
-
width:
|
|
1238
|
-
height:
|
|
1239
|
-
radius:
|
|
1248
|
+
width: z61.number(),
|
|
1249
|
+
height: z61.number(),
|
|
1250
|
+
radius: z61.number(),
|
|
1240
1251
|
layer: layer_ref,
|
|
1241
|
-
pcb_component_id:
|
|
1242
|
-
pcb_smtpad_id:
|
|
1252
|
+
pcb_component_id: z61.string().optional(),
|
|
1253
|
+
pcb_smtpad_id: z61.string().optional()
|
|
1243
1254
|
});
|
|
1244
|
-
var pcb_solder_paste_rotated_rect =
|
|
1245
|
-
type:
|
|
1246
|
-
shape:
|
|
1255
|
+
var pcb_solder_paste_rotated_rect = z61.object({
|
|
1256
|
+
type: z61.literal("pcb_solder_paste"),
|
|
1257
|
+
shape: z61.literal("rotated_rect"),
|
|
1247
1258
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1248
|
-
pcb_group_id:
|
|
1249
|
-
subcircuit_id:
|
|
1259
|
+
pcb_group_id: z61.string().optional(),
|
|
1260
|
+
subcircuit_id: z61.string().optional(),
|
|
1250
1261
|
x: distance,
|
|
1251
1262
|
y: distance,
|
|
1252
|
-
width:
|
|
1253
|
-
height:
|
|
1263
|
+
width: z61.number(),
|
|
1264
|
+
height: z61.number(),
|
|
1254
1265
|
ccw_rotation: distance,
|
|
1255
1266
|
layer: layer_ref,
|
|
1256
|
-
pcb_component_id:
|
|
1257
|
-
pcb_smtpad_id:
|
|
1267
|
+
pcb_component_id: z61.string().optional(),
|
|
1268
|
+
pcb_smtpad_id: z61.string().optional()
|
|
1258
1269
|
});
|
|
1259
|
-
var pcb_solder_paste_oval =
|
|
1260
|
-
type:
|
|
1261
|
-
shape:
|
|
1270
|
+
var pcb_solder_paste_oval = z61.object({
|
|
1271
|
+
type: z61.literal("pcb_solder_paste"),
|
|
1272
|
+
shape: z61.literal("oval"),
|
|
1262
1273
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1263
|
-
pcb_group_id:
|
|
1264
|
-
subcircuit_id:
|
|
1274
|
+
pcb_group_id: z61.string().optional(),
|
|
1275
|
+
subcircuit_id: z61.string().optional(),
|
|
1265
1276
|
x: distance,
|
|
1266
1277
|
y: distance,
|
|
1267
|
-
width:
|
|
1268
|
-
height:
|
|
1278
|
+
width: z61.number(),
|
|
1279
|
+
height: z61.number(),
|
|
1269
1280
|
layer: layer_ref,
|
|
1270
|
-
pcb_component_id:
|
|
1271
|
-
pcb_smtpad_id:
|
|
1281
|
+
pcb_component_id: z61.string().optional(),
|
|
1282
|
+
pcb_smtpad_id: z61.string().optional()
|
|
1272
1283
|
});
|
|
1273
|
-
var pcb_solder_paste =
|
|
1284
|
+
var pcb_solder_paste = z61.union([
|
|
1274
1285
|
pcb_solder_paste_circle,
|
|
1275
1286
|
pcb_solder_paste_rect,
|
|
1276
1287
|
pcb_solder_paste_pill,
|
|
@@ -1286,96 +1297,96 @@ expectTypesMatch(
|
|
|
1286
1297
|
expectTypesMatch(true);
|
|
1287
1298
|
|
|
1288
1299
|
// src/pcb/pcb_text.ts
|
|
1289
|
-
import { z as
|
|
1290
|
-
var pcb_text =
|
|
1291
|
-
type:
|
|
1300
|
+
import { z as z62 } from "zod";
|
|
1301
|
+
var pcb_text = z62.object({
|
|
1302
|
+
type: z62.literal("pcb_text"),
|
|
1292
1303
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
1293
|
-
pcb_group_id:
|
|
1294
|
-
subcircuit_id:
|
|
1295
|
-
text:
|
|
1304
|
+
pcb_group_id: z62.string().optional(),
|
|
1305
|
+
subcircuit_id: z62.string().optional(),
|
|
1306
|
+
text: z62.string(),
|
|
1296
1307
|
center: point,
|
|
1297
1308
|
layer: layer_ref,
|
|
1298
1309
|
width: length,
|
|
1299
1310
|
height: length,
|
|
1300
|
-
lines:
|
|
1311
|
+
lines: z62.number(),
|
|
1301
1312
|
// @ts-ignore
|
|
1302
|
-
align:
|
|
1313
|
+
align: z62.enum(["bottom-left"])
|
|
1303
1314
|
}).describe("Defines text on the PCB");
|
|
1304
1315
|
expectTypesMatch(true);
|
|
1305
1316
|
|
|
1306
1317
|
// src/pcb/pcb_trace.ts
|
|
1307
|
-
import { z as
|
|
1308
|
-
var pcb_trace_route_point_wire =
|
|
1309
|
-
route_type:
|
|
1318
|
+
import { z as z63 } from "zod";
|
|
1319
|
+
var pcb_trace_route_point_wire = z63.object({
|
|
1320
|
+
route_type: z63.literal("wire"),
|
|
1310
1321
|
x: distance,
|
|
1311
1322
|
y: distance,
|
|
1312
1323
|
width: distance,
|
|
1313
|
-
start_pcb_port_id:
|
|
1314
|
-
end_pcb_port_id:
|
|
1324
|
+
start_pcb_port_id: z63.string().optional(),
|
|
1325
|
+
end_pcb_port_id: z63.string().optional(),
|
|
1315
1326
|
layer: layer_ref
|
|
1316
1327
|
});
|
|
1317
|
-
var pcb_trace_route_point_via =
|
|
1318
|
-
route_type:
|
|
1328
|
+
var pcb_trace_route_point_via = z63.object({
|
|
1329
|
+
route_type: z63.literal("via"),
|
|
1319
1330
|
x: distance,
|
|
1320
1331
|
y: distance,
|
|
1321
1332
|
hole_diameter: distance.optional(),
|
|
1322
1333
|
outer_diameter: distance.optional(),
|
|
1323
|
-
from_layer:
|
|
1324
|
-
to_layer:
|
|
1334
|
+
from_layer: z63.string(),
|
|
1335
|
+
to_layer: z63.string()
|
|
1325
1336
|
});
|
|
1326
|
-
var pcb_trace_route_point =
|
|
1337
|
+
var pcb_trace_route_point = z63.union([
|
|
1327
1338
|
pcb_trace_route_point_wire,
|
|
1328
1339
|
pcb_trace_route_point_via
|
|
1329
1340
|
]);
|
|
1330
|
-
var pcb_trace =
|
|
1331
|
-
type:
|
|
1332
|
-
source_trace_id:
|
|
1333
|
-
pcb_component_id:
|
|
1341
|
+
var pcb_trace = z63.object({
|
|
1342
|
+
type: z63.literal("pcb_trace"),
|
|
1343
|
+
source_trace_id: z63.string().optional(),
|
|
1344
|
+
pcb_component_id: z63.string().optional(),
|
|
1334
1345
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
1335
|
-
pcb_group_id:
|
|
1336
|
-
subcircuit_id:
|
|
1337
|
-
route_thickness_mode:
|
|
1338
|
-
route_order_index:
|
|
1339
|
-
should_round_corners:
|
|
1340
|
-
trace_length:
|
|
1341
|
-
route:
|
|
1346
|
+
pcb_group_id: z63.string().optional(),
|
|
1347
|
+
subcircuit_id: z63.string().optional(),
|
|
1348
|
+
route_thickness_mode: z63.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
1349
|
+
route_order_index: z63.number().optional(),
|
|
1350
|
+
should_round_corners: z63.boolean().optional(),
|
|
1351
|
+
trace_length: z63.number().optional(),
|
|
1352
|
+
route: z63.array(pcb_trace_route_point)
|
|
1342
1353
|
}).describe("Defines a trace on the PCB");
|
|
1343
1354
|
expectTypesMatch(true);
|
|
1344
1355
|
expectTypesMatch(true);
|
|
1345
1356
|
|
|
1346
1357
|
// src/pcb/pcb_trace_error.ts
|
|
1347
|
-
import { z as
|
|
1348
|
-
var pcb_trace_error =
|
|
1349
|
-
type:
|
|
1358
|
+
import { z as z64 } from "zod";
|
|
1359
|
+
var pcb_trace_error = z64.object({
|
|
1360
|
+
type: z64.literal("pcb_trace_error"),
|
|
1350
1361
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
1351
|
-
error_type:
|
|
1352
|
-
message:
|
|
1362
|
+
error_type: z64.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
1363
|
+
message: z64.string(),
|
|
1353
1364
|
center: point.optional(),
|
|
1354
|
-
pcb_trace_id:
|
|
1355
|
-
source_trace_id:
|
|
1356
|
-
pcb_component_ids:
|
|
1357
|
-
pcb_port_ids:
|
|
1365
|
+
pcb_trace_id: z64.string(),
|
|
1366
|
+
source_trace_id: z64.string(),
|
|
1367
|
+
pcb_component_ids: z64.array(z64.string()),
|
|
1368
|
+
pcb_port_ids: z64.array(z64.string())
|
|
1358
1369
|
}).describe("Defines a trace error on the PCB");
|
|
1359
1370
|
expectTypesMatch(true);
|
|
1360
1371
|
|
|
1361
1372
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
1362
|
-
import { z as
|
|
1363
|
-
var pcb_port_not_matched_error =
|
|
1364
|
-
type:
|
|
1373
|
+
import { z as z65 } from "zod";
|
|
1374
|
+
var pcb_port_not_matched_error = z65.object({
|
|
1375
|
+
type: z65.literal("pcb_port_not_matched_error"),
|
|
1365
1376
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1366
|
-
error_type:
|
|
1367
|
-
message:
|
|
1368
|
-
pcb_component_ids:
|
|
1377
|
+
error_type: z65.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
1378
|
+
message: z65.string(),
|
|
1379
|
+
pcb_component_ids: z65.array(z65.string())
|
|
1369
1380
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
1370
1381
|
expectTypesMatch(true);
|
|
1371
1382
|
|
|
1372
1383
|
// src/pcb/pcb_via.ts
|
|
1373
|
-
import { z as
|
|
1374
|
-
var pcb_via =
|
|
1375
|
-
type:
|
|
1384
|
+
import { z as z66 } from "zod";
|
|
1385
|
+
var pcb_via = z66.object({
|
|
1386
|
+
type: z66.literal("pcb_via"),
|
|
1376
1387
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
1377
|
-
pcb_group_id:
|
|
1378
|
-
subcircuit_id:
|
|
1388
|
+
pcb_group_id: z66.string().optional(),
|
|
1389
|
+
subcircuit_id: z66.string().optional(),
|
|
1379
1390
|
x: distance,
|
|
1380
1391
|
y: distance,
|
|
1381
1392
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -1384,57 +1395,57 @@ var pcb_via = z65.object({
|
|
|
1384
1395
|
from_layer: layer_ref.optional(),
|
|
1385
1396
|
/** @deprecated */
|
|
1386
1397
|
to_layer: layer_ref.optional(),
|
|
1387
|
-
layers:
|
|
1388
|
-
pcb_trace_id:
|
|
1398
|
+
layers: z66.array(layer_ref),
|
|
1399
|
+
pcb_trace_id: z66.string().optional()
|
|
1389
1400
|
}).describe("Defines a via on the PCB");
|
|
1390
1401
|
expectTypesMatch(true);
|
|
1391
1402
|
|
|
1392
1403
|
// src/pcb/pcb_board.ts
|
|
1393
|
-
import { z as
|
|
1394
|
-
var pcb_board =
|
|
1395
|
-
type:
|
|
1404
|
+
import { z as z67 } from "zod";
|
|
1405
|
+
var pcb_board = z67.object({
|
|
1406
|
+
type: z67.literal("pcb_board"),
|
|
1396
1407
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
1397
|
-
is_subcircuit:
|
|
1398
|
-
subcircuit_id:
|
|
1408
|
+
is_subcircuit: z67.boolean().optional(),
|
|
1409
|
+
subcircuit_id: z67.string().optional(),
|
|
1399
1410
|
width: length,
|
|
1400
1411
|
height: length,
|
|
1401
1412
|
center: point,
|
|
1402
1413
|
thickness: length.optional().default(1.4),
|
|
1403
|
-
num_layers:
|
|
1404
|
-
outline:
|
|
1405
|
-
material:
|
|
1414
|
+
num_layers: z67.number().optional().default(4),
|
|
1415
|
+
outline: z67.array(point).optional(),
|
|
1416
|
+
material: z67.enum(["fr4", "fr1"]).default("fr4")
|
|
1406
1417
|
}).describe("Defines the board outline of the PCB");
|
|
1407
1418
|
expectTypesMatch(true);
|
|
1408
1419
|
|
|
1409
1420
|
// src/pcb/pcb_placement_error.ts
|
|
1410
|
-
import { z as
|
|
1411
|
-
var pcb_placement_error =
|
|
1412
|
-
type:
|
|
1421
|
+
import { z as z68 } from "zod";
|
|
1422
|
+
var pcb_placement_error = z68.object({
|
|
1423
|
+
type: z68.literal("pcb_placement_error"),
|
|
1413
1424
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
1414
|
-
error_type:
|
|
1415
|
-
message:
|
|
1425
|
+
error_type: z68.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
1426
|
+
message: z68.string()
|
|
1416
1427
|
}).describe("Defines a placement error on the PCB");
|
|
1417
1428
|
expectTypesMatch(true);
|
|
1418
1429
|
|
|
1419
1430
|
// src/pcb/pcb_trace_hint.ts
|
|
1420
|
-
import { z as
|
|
1421
|
-
var pcb_trace_hint =
|
|
1422
|
-
type:
|
|
1431
|
+
import { z as z69 } from "zod";
|
|
1432
|
+
var pcb_trace_hint = z69.object({
|
|
1433
|
+
type: z69.literal("pcb_trace_hint"),
|
|
1423
1434
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
1424
|
-
pcb_port_id:
|
|
1425
|
-
pcb_component_id:
|
|
1426
|
-
route:
|
|
1435
|
+
pcb_port_id: z69.string(),
|
|
1436
|
+
pcb_component_id: z69.string(),
|
|
1437
|
+
route: z69.array(route_hint_point)
|
|
1427
1438
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
1428
1439
|
expectTypesMatch(true);
|
|
1429
1440
|
|
|
1430
1441
|
// src/pcb/pcb_silkscreen_line.ts
|
|
1431
|
-
import { z as
|
|
1432
|
-
var pcb_silkscreen_line =
|
|
1433
|
-
type:
|
|
1442
|
+
import { z as z70 } from "zod";
|
|
1443
|
+
var pcb_silkscreen_line = z70.object({
|
|
1444
|
+
type: z70.literal("pcb_silkscreen_line"),
|
|
1434
1445
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
1435
|
-
pcb_component_id:
|
|
1436
|
-
pcb_group_id:
|
|
1437
|
-
subcircuit_id:
|
|
1446
|
+
pcb_component_id: z70.string(),
|
|
1447
|
+
pcb_group_id: z70.string().optional(),
|
|
1448
|
+
subcircuit_id: z70.string().optional(),
|
|
1438
1449
|
stroke_width: distance.default("0.1mm"),
|
|
1439
1450
|
x1: distance,
|
|
1440
1451
|
y1: distance,
|
|
@@ -1445,67 +1456,67 @@ var pcb_silkscreen_line = z69.object({
|
|
|
1445
1456
|
expectTypesMatch(true);
|
|
1446
1457
|
|
|
1447
1458
|
// src/pcb/pcb_silkscreen_path.ts
|
|
1448
|
-
import { z as
|
|
1449
|
-
var pcb_silkscreen_path =
|
|
1450
|
-
type:
|
|
1459
|
+
import { z as z71 } from "zod";
|
|
1460
|
+
var pcb_silkscreen_path = z71.object({
|
|
1461
|
+
type: z71.literal("pcb_silkscreen_path"),
|
|
1451
1462
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
1452
|
-
pcb_component_id:
|
|
1453
|
-
pcb_group_id:
|
|
1454
|
-
subcircuit_id:
|
|
1463
|
+
pcb_component_id: z71.string(),
|
|
1464
|
+
pcb_group_id: z71.string().optional(),
|
|
1465
|
+
subcircuit_id: z71.string().optional(),
|
|
1455
1466
|
layer: visible_layer,
|
|
1456
|
-
route:
|
|
1467
|
+
route: z71.array(point),
|
|
1457
1468
|
stroke_width: length
|
|
1458
1469
|
}).describe("Defines a silkscreen path on the PCB");
|
|
1459
1470
|
expectTypesMatch(true);
|
|
1460
1471
|
|
|
1461
1472
|
// src/pcb/pcb_silkscreen_text.ts
|
|
1462
|
-
import { z as
|
|
1463
|
-
var pcb_silkscreen_text =
|
|
1464
|
-
type:
|
|
1473
|
+
import { z as z72 } from "zod";
|
|
1474
|
+
var pcb_silkscreen_text = z72.object({
|
|
1475
|
+
type: z72.literal("pcb_silkscreen_text"),
|
|
1465
1476
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
1466
|
-
pcb_group_id:
|
|
1467
|
-
subcircuit_id:
|
|
1468
|
-
font:
|
|
1477
|
+
pcb_group_id: z72.string().optional(),
|
|
1478
|
+
subcircuit_id: z72.string().optional(),
|
|
1479
|
+
font: z72.literal("tscircuit2024").default("tscircuit2024"),
|
|
1469
1480
|
font_size: distance.default("0.2mm"),
|
|
1470
|
-
pcb_component_id:
|
|
1471
|
-
text:
|
|
1472
|
-
ccw_rotation:
|
|
1481
|
+
pcb_component_id: z72.string(),
|
|
1482
|
+
text: z72.string(),
|
|
1483
|
+
ccw_rotation: z72.number().optional(),
|
|
1473
1484
|
layer: layer_ref,
|
|
1474
|
-
is_mirrored:
|
|
1485
|
+
is_mirrored: z72.boolean().default(false).optional(),
|
|
1475
1486
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1476
1487
|
anchor_alignment: ninePointAnchor.default("center")
|
|
1477
1488
|
}).describe("Defines silkscreen text on the PCB");
|
|
1478
1489
|
expectTypesMatch(true);
|
|
1479
1490
|
|
|
1480
1491
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
1481
|
-
import { z as
|
|
1482
|
-
var pcb_silkscreen_rect =
|
|
1483
|
-
type:
|
|
1492
|
+
import { z as z73 } from "zod";
|
|
1493
|
+
var pcb_silkscreen_rect = z73.object({
|
|
1494
|
+
type: z73.literal("pcb_silkscreen_rect"),
|
|
1484
1495
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
1485
|
-
pcb_component_id:
|
|
1486
|
-
pcb_group_id:
|
|
1487
|
-
subcircuit_id:
|
|
1496
|
+
pcb_component_id: z73.string(),
|
|
1497
|
+
pcb_group_id: z73.string().optional(),
|
|
1498
|
+
subcircuit_id: z73.string().optional(),
|
|
1488
1499
|
center: point,
|
|
1489
1500
|
width: length,
|
|
1490
1501
|
height: length,
|
|
1491
1502
|
layer: layer_ref,
|
|
1492
1503
|
stroke_width: length.default("1mm"),
|
|
1493
|
-
is_filled:
|
|
1494
|
-
has_stroke:
|
|
1495
|
-
is_stroke_dashed:
|
|
1504
|
+
is_filled: z73.boolean().default(true).optional(),
|
|
1505
|
+
has_stroke: z73.boolean().optional(),
|
|
1506
|
+
is_stroke_dashed: z73.boolean().optional()
|
|
1496
1507
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
1497
1508
|
expectTypesMatch(true);
|
|
1498
1509
|
|
|
1499
1510
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
1500
|
-
import { z as
|
|
1501
|
-
var pcb_silkscreen_circle =
|
|
1502
|
-
type:
|
|
1511
|
+
import { z as z74 } from "zod";
|
|
1512
|
+
var pcb_silkscreen_circle = z74.object({
|
|
1513
|
+
type: z74.literal("pcb_silkscreen_circle"),
|
|
1503
1514
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
1504
1515
|
"pcb_silkscreen_circle"
|
|
1505
1516
|
),
|
|
1506
|
-
pcb_component_id:
|
|
1507
|
-
pcb_group_id:
|
|
1508
|
-
subcircuit_id:
|
|
1517
|
+
pcb_component_id: z74.string(),
|
|
1518
|
+
pcb_group_id: z74.string().optional(),
|
|
1519
|
+
subcircuit_id: z74.string().optional(),
|
|
1509
1520
|
center: point,
|
|
1510
1521
|
radius: length,
|
|
1511
1522
|
layer: visible_layer,
|
|
@@ -1514,13 +1525,13 @@ var pcb_silkscreen_circle = z73.object({
|
|
|
1514
1525
|
expectTypesMatch(true);
|
|
1515
1526
|
|
|
1516
1527
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
1517
|
-
import { z as
|
|
1518
|
-
var pcb_silkscreen_oval =
|
|
1519
|
-
type:
|
|
1528
|
+
import { z as z75 } from "zod";
|
|
1529
|
+
var pcb_silkscreen_oval = z75.object({
|
|
1530
|
+
type: z75.literal("pcb_silkscreen_oval"),
|
|
1520
1531
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
1521
|
-
pcb_component_id:
|
|
1522
|
-
pcb_group_id:
|
|
1523
|
-
subcircuit_id:
|
|
1532
|
+
pcb_component_id: z75.string(),
|
|
1533
|
+
pcb_group_id: z75.string().optional(),
|
|
1534
|
+
subcircuit_id: z75.string().optional(),
|
|
1524
1535
|
center: point,
|
|
1525
1536
|
radius_x: distance,
|
|
1526
1537
|
radius_y: distance,
|
|
@@ -1529,86 +1540,86 @@ var pcb_silkscreen_oval = z74.object({
|
|
|
1529
1540
|
expectTypesMatch(true);
|
|
1530
1541
|
|
|
1531
1542
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
1532
|
-
import { z as
|
|
1533
|
-
var pcb_fabrication_note_text =
|
|
1534
|
-
type:
|
|
1543
|
+
import { z as z76 } from "zod";
|
|
1544
|
+
var pcb_fabrication_note_text = z76.object({
|
|
1545
|
+
type: z76.literal("pcb_fabrication_note_text"),
|
|
1535
1546
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
1536
1547
|
"pcb_fabrication_note_text"
|
|
1537
1548
|
),
|
|
1538
|
-
subcircuit_id:
|
|
1539
|
-
pcb_group_id:
|
|
1540
|
-
font:
|
|
1549
|
+
subcircuit_id: z76.string().optional(),
|
|
1550
|
+
pcb_group_id: z76.string().optional(),
|
|
1551
|
+
font: z76.literal("tscircuit2024").default("tscircuit2024"),
|
|
1541
1552
|
font_size: distance.default("1mm"),
|
|
1542
|
-
pcb_component_id:
|
|
1543
|
-
text:
|
|
1553
|
+
pcb_component_id: z76.string(),
|
|
1554
|
+
text: z76.string(),
|
|
1544
1555
|
layer: visible_layer,
|
|
1545
1556
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1546
|
-
anchor_alignment:
|
|
1547
|
-
color:
|
|
1557
|
+
anchor_alignment: z76.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
1558
|
+
color: z76.string().optional()
|
|
1548
1559
|
}).describe(
|
|
1549
1560
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
1550
1561
|
);
|
|
1551
1562
|
expectTypesMatch(true);
|
|
1552
1563
|
|
|
1553
1564
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
1554
|
-
import { z as
|
|
1555
|
-
var pcb_fabrication_note_path =
|
|
1556
|
-
type:
|
|
1565
|
+
import { z as z77 } from "zod";
|
|
1566
|
+
var pcb_fabrication_note_path = z77.object({
|
|
1567
|
+
type: z77.literal("pcb_fabrication_note_path"),
|
|
1557
1568
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
1558
1569
|
"pcb_fabrication_note_path"
|
|
1559
1570
|
),
|
|
1560
|
-
pcb_component_id:
|
|
1561
|
-
subcircuit_id:
|
|
1571
|
+
pcb_component_id: z77.string(),
|
|
1572
|
+
subcircuit_id: z77.string().optional(),
|
|
1562
1573
|
layer: layer_ref,
|
|
1563
|
-
route:
|
|
1574
|
+
route: z77.array(point),
|
|
1564
1575
|
stroke_width: length,
|
|
1565
|
-
color:
|
|
1576
|
+
color: z77.string().optional()
|
|
1566
1577
|
}).describe(
|
|
1567
1578
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
1568
1579
|
);
|
|
1569
1580
|
expectTypesMatch(true);
|
|
1570
1581
|
|
|
1571
1582
|
// src/pcb/pcb_keepout.ts
|
|
1572
|
-
import { z as
|
|
1573
|
-
var pcb_keepout =
|
|
1574
|
-
type:
|
|
1575
|
-
shape:
|
|
1576
|
-
pcb_group_id:
|
|
1577
|
-
subcircuit_id:
|
|
1583
|
+
import { z as z78 } from "zod";
|
|
1584
|
+
var pcb_keepout = z78.object({
|
|
1585
|
+
type: z78.literal("pcb_keepout"),
|
|
1586
|
+
shape: z78.literal("rect"),
|
|
1587
|
+
pcb_group_id: z78.string().optional(),
|
|
1588
|
+
subcircuit_id: z78.string().optional(),
|
|
1578
1589
|
center: point,
|
|
1579
1590
|
width: distance,
|
|
1580
1591
|
height: distance,
|
|
1581
|
-
pcb_keepout_id:
|
|
1582
|
-
layers:
|
|
1592
|
+
pcb_keepout_id: z78.string(),
|
|
1593
|
+
layers: z78.array(z78.string()),
|
|
1583
1594
|
// Specify layers where the keepout applies
|
|
1584
|
-
description:
|
|
1595
|
+
description: z78.string().optional()
|
|
1585
1596
|
// Optional description of the keepout
|
|
1586
1597
|
}).or(
|
|
1587
|
-
|
|
1588
|
-
type:
|
|
1589
|
-
shape:
|
|
1590
|
-
pcb_group_id:
|
|
1591
|
-
subcircuit_id:
|
|
1598
|
+
z78.object({
|
|
1599
|
+
type: z78.literal("pcb_keepout"),
|
|
1600
|
+
shape: z78.literal("circle"),
|
|
1601
|
+
pcb_group_id: z78.string().optional(),
|
|
1602
|
+
subcircuit_id: z78.string().optional(),
|
|
1592
1603
|
center: point,
|
|
1593
1604
|
radius: distance,
|
|
1594
|
-
pcb_keepout_id:
|
|
1595
|
-
layers:
|
|
1605
|
+
pcb_keepout_id: z78.string(),
|
|
1606
|
+
layers: z78.array(z78.string()),
|
|
1596
1607
|
// Specify layers where the keepout applies
|
|
1597
|
-
description:
|
|
1608
|
+
description: z78.string().optional()
|
|
1598
1609
|
// Optional description of the keepout
|
|
1599
1610
|
})
|
|
1600
1611
|
);
|
|
1601
1612
|
|
|
1602
1613
|
// src/pcb/pcb_cutout.ts
|
|
1603
|
-
import { z as
|
|
1604
|
-
var pcb_cutout_base =
|
|
1605
|
-
type:
|
|
1614
|
+
import { z as z79 } from "zod";
|
|
1615
|
+
var pcb_cutout_base = z79.object({
|
|
1616
|
+
type: z79.literal("pcb_cutout"),
|
|
1606
1617
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
1607
|
-
pcb_group_id:
|
|
1608
|
-
subcircuit_id:
|
|
1618
|
+
pcb_group_id: z79.string().optional(),
|
|
1619
|
+
subcircuit_id: z79.string().optional()
|
|
1609
1620
|
});
|
|
1610
1621
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
1611
|
-
shape:
|
|
1622
|
+
shape: z79.literal("rect"),
|
|
1612
1623
|
center: point,
|
|
1613
1624
|
width: length,
|
|
1614
1625
|
height: length,
|
|
@@ -1616,17 +1627,17 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
1616
1627
|
});
|
|
1617
1628
|
expectTypesMatch(true);
|
|
1618
1629
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
1619
|
-
shape:
|
|
1630
|
+
shape: z79.literal("circle"),
|
|
1620
1631
|
center: point,
|
|
1621
1632
|
radius: length
|
|
1622
1633
|
});
|
|
1623
1634
|
expectTypesMatch(true);
|
|
1624
1635
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
1625
|
-
shape:
|
|
1626
|
-
points:
|
|
1636
|
+
shape: z79.literal("polygon"),
|
|
1637
|
+
points: z79.array(point)
|
|
1627
1638
|
});
|
|
1628
1639
|
expectTypesMatch(true);
|
|
1629
|
-
var pcb_cutout =
|
|
1640
|
+
var pcb_cutout = z79.discriminatedUnion("shape", [
|
|
1630
1641
|
pcb_cutout_rect,
|
|
1631
1642
|
pcb_cutout_circle,
|
|
1632
1643
|
pcb_cutout_polygon
|
|
@@ -1634,77 +1645,77 @@ var pcb_cutout = z78.discriminatedUnion("shape", [
|
|
|
1634
1645
|
expectTypesMatch(true);
|
|
1635
1646
|
|
|
1636
1647
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
1637
|
-
import { z as
|
|
1638
|
-
var pcb_missing_footprint_error =
|
|
1639
|
-
type:
|
|
1648
|
+
import { z as z80 } from "zod";
|
|
1649
|
+
var pcb_missing_footprint_error = z80.object({
|
|
1650
|
+
type: z80.literal("pcb_missing_footprint_error"),
|
|
1640
1651
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
1641
1652
|
"pcb_missing_footprint_error"
|
|
1642
1653
|
),
|
|
1643
|
-
pcb_group_id:
|
|
1644
|
-
subcircuit_id:
|
|
1645
|
-
error_type:
|
|
1646
|
-
source_component_id:
|
|
1647
|
-
message:
|
|
1654
|
+
pcb_group_id: z80.string().optional(),
|
|
1655
|
+
subcircuit_id: z80.string().optional(),
|
|
1656
|
+
error_type: z80.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
1657
|
+
source_component_id: z80.string(),
|
|
1658
|
+
message: z80.string()
|
|
1648
1659
|
}).describe("Defines a missing footprint error on the PCB");
|
|
1649
1660
|
expectTypesMatch(
|
|
1650
1661
|
true
|
|
1651
1662
|
);
|
|
1652
1663
|
|
|
1653
1664
|
// src/pcb/pcb_group.ts
|
|
1654
|
-
import { z as
|
|
1655
|
-
var pcb_group =
|
|
1656
|
-
type:
|
|
1665
|
+
import { z as z81 } from "zod";
|
|
1666
|
+
var pcb_group = z81.object({
|
|
1667
|
+
type: z81.literal("pcb_group"),
|
|
1657
1668
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
1658
|
-
source_group_id:
|
|
1659
|
-
is_subcircuit:
|
|
1660
|
-
subcircuit_id:
|
|
1669
|
+
source_group_id: z81.string(),
|
|
1670
|
+
is_subcircuit: z81.boolean().optional(),
|
|
1671
|
+
subcircuit_id: z81.string().optional(),
|
|
1661
1672
|
width: length,
|
|
1662
1673
|
height: length,
|
|
1663
1674
|
center: point,
|
|
1664
|
-
pcb_component_ids:
|
|
1665
|
-
name:
|
|
1666
|
-
description:
|
|
1675
|
+
pcb_component_ids: z81.array(z81.string()),
|
|
1676
|
+
name: z81.string().optional(),
|
|
1677
|
+
description: z81.string().optional()
|
|
1667
1678
|
}).describe("Defines a group of components on the PCB");
|
|
1668
1679
|
expectTypesMatch(true);
|
|
1669
1680
|
|
|
1670
1681
|
// src/pcb/pcb_autorouting_error.ts
|
|
1671
|
-
import { z as
|
|
1672
|
-
var pcb_autorouting_error =
|
|
1673
|
-
type:
|
|
1682
|
+
import { z as z82 } from "zod";
|
|
1683
|
+
var pcb_autorouting_error = z82.object({
|
|
1684
|
+
type: z82.literal("pcb_autorouting_error"),
|
|
1674
1685
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
1675
|
-
error_type:
|
|
1676
|
-
message:
|
|
1686
|
+
error_type: z82.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
1687
|
+
message: z82.string()
|
|
1677
1688
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
1678
1689
|
expectTypesMatch(true);
|
|
1679
1690
|
|
|
1680
1691
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
1681
|
-
import { z as
|
|
1682
|
-
var pcb_manual_edit_conflict_warning =
|
|
1683
|
-
type:
|
|
1692
|
+
import { z as z83 } from "zod";
|
|
1693
|
+
var pcb_manual_edit_conflict_warning = z83.object({
|
|
1694
|
+
type: z83.literal("pcb_manual_edit_conflict_warning"),
|
|
1684
1695
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1685
1696
|
"pcb_manual_edit_conflict_warning"
|
|
1686
1697
|
),
|
|
1687
|
-
warning_type:
|
|
1688
|
-
message:
|
|
1689
|
-
pcb_component_id:
|
|
1690
|
-
pcb_group_id:
|
|
1691
|
-
subcircuit_id:
|
|
1692
|
-
source_component_id:
|
|
1698
|
+
warning_type: z83.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
1699
|
+
message: z83.string(),
|
|
1700
|
+
pcb_component_id: z83.string(),
|
|
1701
|
+
pcb_group_id: z83.string().optional(),
|
|
1702
|
+
subcircuit_id: z83.string().optional(),
|
|
1703
|
+
source_component_id: z83.string()
|
|
1693
1704
|
}).describe(
|
|
1694
1705
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
1695
1706
|
);
|
|
1696
1707
|
expectTypesMatch(true);
|
|
1697
1708
|
|
|
1698
1709
|
// src/pcb/pcb_breakout_point.ts
|
|
1699
|
-
import { z as
|
|
1700
|
-
var pcb_breakout_point =
|
|
1701
|
-
type:
|
|
1710
|
+
import { z as z84 } from "zod";
|
|
1711
|
+
var pcb_breakout_point = z84.object({
|
|
1712
|
+
type: z84.literal("pcb_breakout_point"),
|
|
1702
1713
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
1703
|
-
pcb_group_id:
|
|
1704
|
-
subcircuit_id:
|
|
1705
|
-
source_trace_id:
|
|
1706
|
-
source_port_id:
|
|
1707
|
-
source_net_id:
|
|
1714
|
+
pcb_group_id: z84.string(),
|
|
1715
|
+
subcircuit_id: z84.string().optional(),
|
|
1716
|
+
source_trace_id: z84.string().optional(),
|
|
1717
|
+
source_port_id: z84.string().optional(),
|
|
1718
|
+
source_net_id: z84.string().optional(),
|
|
1708
1719
|
x: distance,
|
|
1709
1720
|
y: distance
|
|
1710
1721
|
}).describe(
|
|
@@ -1712,28 +1723,70 @@ var pcb_breakout_point = z83.object({
|
|
|
1712
1723
|
);
|
|
1713
1724
|
expectTypesMatch(true);
|
|
1714
1725
|
|
|
1726
|
+
// src/pcb/pcb_ground_plane.ts
|
|
1727
|
+
import { z as z85 } from "zod";
|
|
1728
|
+
var pcb_ground_plane = z85.object({
|
|
1729
|
+
type: z85.literal("pcb_ground_plane"),
|
|
1730
|
+
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
1731
|
+
source_pcb_ground_plane_id: z85.string(),
|
|
1732
|
+
source_net_id: z85.string(),
|
|
1733
|
+
pcb_group_id: z85.string().optional(),
|
|
1734
|
+
subcircuit_id: z85.string().optional()
|
|
1735
|
+
}).describe("Defines a ground plane on the PCB");
|
|
1736
|
+
expectTypesMatch(true);
|
|
1737
|
+
|
|
1738
|
+
// src/pcb/pcb_ground_plane_region.ts
|
|
1739
|
+
import { z as z86 } from "zod";
|
|
1740
|
+
var pcb_ground_plane_region = z86.object({
|
|
1741
|
+
type: z86.literal("pcb_ground_plane_region"),
|
|
1742
|
+
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
1743
|
+
"pcb_ground_plane_region"
|
|
1744
|
+
),
|
|
1745
|
+
pcb_ground_plane_id: z86.string(),
|
|
1746
|
+
pcb_group_id: z86.string().optional(),
|
|
1747
|
+
subcircuit_id: z86.string().optional(),
|
|
1748
|
+
layer: layer_ref,
|
|
1749
|
+
points: z86.array(point)
|
|
1750
|
+
}).describe("Defines a polygon region of a ground plane");
|
|
1751
|
+
expectTypesMatch(true);
|
|
1752
|
+
|
|
1753
|
+
// src/pcb/pcb_thermal_spoke.ts
|
|
1754
|
+
import { z as z87 } from "zod";
|
|
1755
|
+
var pcb_thermal_spoke = z87.object({
|
|
1756
|
+
type: z87.literal("pcb_thermal_spoke"),
|
|
1757
|
+
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
1758
|
+
pcb_ground_plane_id: z87.string(),
|
|
1759
|
+
shape: z87.string(),
|
|
1760
|
+
spoke_count: z87.number(),
|
|
1761
|
+
spoke_thickness: distance,
|
|
1762
|
+
spoke_inner_diameter: distance,
|
|
1763
|
+
spoke_outer_diameter: distance,
|
|
1764
|
+
pcb_plated_hole_id: z87.string().optional()
|
|
1765
|
+
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
1766
|
+
expectTypesMatch(true);
|
|
1767
|
+
|
|
1715
1768
|
// src/cad/cad_component.ts
|
|
1716
|
-
import { z as
|
|
1717
|
-
var cad_component =
|
|
1718
|
-
type:
|
|
1719
|
-
cad_component_id:
|
|
1720
|
-
pcb_component_id:
|
|
1721
|
-
source_component_id:
|
|
1769
|
+
import { z as z88 } from "zod";
|
|
1770
|
+
var cad_component = z88.object({
|
|
1771
|
+
type: z88.literal("cad_component"),
|
|
1772
|
+
cad_component_id: z88.string(),
|
|
1773
|
+
pcb_component_id: z88.string(),
|
|
1774
|
+
source_component_id: z88.string(),
|
|
1722
1775
|
position: point3,
|
|
1723
1776
|
rotation: point3.optional(),
|
|
1724
1777
|
size: point3.optional(),
|
|
1725
1778
|
layer: layer_ref.optional(),
|
|
1726
1779
|
// These are all ways to generate/load the 3d model
|
|
1727
|
-
footprinter_string:
|
|
1728
|
-
model_obj_url:
|
|
1729
|
-
model_stl_url:
|
|
1730
|
-
model_3mf_url:
|
|
1731
|
-
model_jscad:
|
|
1780
|
+
footprinter_string: z88.string().optional(),
|
|
1781
|
+
model_obj_url: z88.string().optional(),
|
|
1782
|
+
model_stl_url: z88.string().optional(),
|
|
1783
|
+
model_3mf_url: z88.string().optional(),
|
|
1784
|
+
model_jscad: z88.any().optional()
|
|
1732
1785
|
}).describe("Defines a component on the PCB");
|
|
1733
1786
|
|
|
1734
1787
|
// src/any_circuit_element.ts
|
|
1735
|
-
import { z as
|
|
1736
|
-
var any_circuit_element =
|
|
1788
|
+
import { z as z89 } from "zod";
|
|
1789
|
+
var any_circuit_element = z89.union([
|
|
1737
1790
|
source_trace,
|
|
1738
1791
|
source_port,
|
|
1739
1792
|
any_source_component,
|
|
@@ -1756,6 +1809,7 @@ var any_circuit_element = z85.union([
|
|
|
1756
1809
|
source_simple_mosfet,
|
|
1757
1810
|
source_simple_potentiometer,
|
|
1758
1811
|
source_simple_push_button,
|
|
1812
|
+
source_pcb_ground_plane,
|
|
1759
1813
|
source_project_metadata,
|
|
1760
1814
|
pcb_component,
|
|
1761
1815
|
pcb_hole,
|
|
@@ -1786,6 +1840,9 @@ var any_circuit_element = z85.union([
|
|
|
1786
1840
|
pcb_autorouting_error,
|
|
1787
1841
|
pcb_breakout_point,
|
|
1788
1842
|
pcb_cutout,
|
|
1843
|
+
pcb_ground_plane,
|
|
1844
|
+
pcb_ground_plane_region,
|
|
1845
|
+
pcb_thermal_spoke,
|
|
1789
1846
|
schematic_box,
|
|
1790
1847
|
schematic_text,
|
|
1791
1848
|
schematic_line,
|
|
@@ -1832,6 +1889,8 @@ export {
|
|
|
1832
1889
|
pcb_cutout_rect,
|
|
1833
1890
|
pcb_fabrication_note_path,
|
|
1834
1891
|
pcb_fabrication_note_text,
|
|
1892
|
+
pcb_ground_plane,
|
|
1893
|
+
pcb_ground_plane_region,
|
|
1835
1894
|
pcb_group,
|
|
1836
1895
|
pcb_hole,
|
|
1837
1896
|
pcb_hole_circle_or_square_shape,
|
|
@@ -1855,6 +1914,7 @@ export {
|
|
|
1855
1914
|
pcb_smtpad_pill,
|
|
1856
1915
|
pcb_solder_paste,
|
|
1857
1916
|
pcb_text,
|
|
1917
|
+
pcb_thermal_spoke,
|
|
1858
1918
|
pcb_trace,
|
|
1859
1919
|
pcb_trace_error,
|
|
1860
1920
|
pcb_trace_hint,
|
|
@@ -1897,6 +1957,7 @@ export {
|
|
|
1897
1957
|
source_group,
|
|
1898
1958
|
source_missing_property_error,
|
|
1899
1959
|
source_net,
|
|
1960
|
+
source_pcb_ground_plane,
|
|
1900
1961
|
source_port,
|
|
1901
1962
|
source_project_metadata,
|
|
1902
1963
|
source_simple_battery,
|