circuit-json 0.0.82 → 0.0.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +284 -8
- package/dist/index.mjs +169 -137
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -3
package/dist/index.mjs
CHANGED
|
@@ -95,7 +95,8 @@ var unitMappings = {
|
|
|
95
95
|
IN: 25.4,
|
|
96
96
|
FT: 304.8,
|
|
97
97
|
yd: 914.4,
|
|
98
|
-
mi: 1609344
|
|
98
|
+
mi: 1609344,
|
|
99
|
+
mil: 0.0254
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
};
|
|
@@ -665,68 +666,97 @@ var pcb_smtpad = z38.union([pcb_smtpad_circle, pcb_smtpad_rect]).describe("Defin
|
|
|
665
666
|
expectTypesMatch(true);
|
|
666
667
|
expectTypesMatch(true);
|
|
667
668
|
|
|
668
|
-
// src/pcb/
|
|
669
|
+
// src/pcb/pcb_solder_paste.ts
|
|
669
670
|
import { z as z39 } from "zod";
|
|
670
|
-
var
|
|
671
|
-
type: z39.literal("
|
|
671
|
+
var pcb_solder_paste_circle = z39.object({
|
|
672
|
+
type: z39.literal("pcb_solder_paste"),
|
|
673
|
+
shape: z39.literal("circle"),
|
|
674
|
+
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
675
|
+
x: distance,
|
|
676
|
+
y: distance,
|
|
677
|
+
radius: z39.number(),
|
|
678
|
+
layer: layer_ref,
|
|
679
|
+
pcb_component_id: z39.string().optional(),
|
|
680
|
+
pcb_smtpad_id: z39.string().optional()
|
|
681
|
+
});
|
|
682
|
+
var pcb_solder_paste_rect = z39.object({
|
|
683
|
+
type: z39.literal("pcb_solder_paste"),
|
|
684
|
+
shape: z39.literal("rect"),
|
|
685
|
+
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
686
|
+
x: distance,
|
|
687
|
+
y: distance,
|
|
688
|
+
width: z39.number(),
|
|
689
|
+
height: z39.number(),
|
|
690
|
+
layer: layer_ref,
|
|
691
|
+
pcb_component_id: z39.string().optional(),
|
|
692
|
+
pcb_smtpad_id: z39.string().optional()
|
|
693
|
+
});
|
|
694
|
+
var pcb_solder_paste = z39.union([pcb_solder_paste_circle, pcb_solder_paste_rect]).describe("Defines solderpaste on the PCB");
|
|
695
|
+
expectTypesMatch(true);
|
|
696
|
+
expectTypesMatch(true);
|
|
697
|
+
|
|
698
|
+
// src/pcb/pcb_text.ts
|
|
699
|
+
import { z as z40 } from "zod";
|
|
700
|
+
var pcb_text = z40.object({
|
|
701
|
+
type: z40.literal("pcb_text"),
|
|
672
702
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
673
|
-
text:
|
|
703
|
+
text: z40.string(),
|
|
674
704
|
center: point,
|
|
675
705
|
layer: layer_ref,
|
|
676
706
|
width: length,
|
|
677
707
|
height: length,
|
|
678
|
-
lines:
|
|
679
|
-
align:
|
|
708
|
+
lines: z40.number(),
|
|
709
|
+
align: z40.enum(["bottom-left"])
|
|
680
710
|
}).describe("Defines text on the PCB");
|
|
681
711
|
expectTypesMatch(true);
|
|
682
712
|
|
|
683
713
|
// src/pcb/pcb_trace.ts
|
|
684
|
-
import { z as
|
|
685
|
-
var pcb_trace_route_point_wire =
|
|
686
|
-
route_type:
|
|
714
|
+
import { z as z41 } from "zod";
|
|
715
|
+
var pcb_trace_route_point_wire = z41.object({
|
|
716
|
+
route_type: z41.literal("wire"),
|
|
687
717
|
x: distance,
|
|
688
718
|
y: distance,
|
|
689
719
|
width: distance,
|
|
690
|
-
start_pcb_port_id:
|
|
691
|
-
end_pcb_port_id:
|
|
720
|
+
start_pcb_port_id: z41.string().optional(),
|
|
721
|
+
end_pcb_port_id: z41.string().optional(),
|
|
692
722
|
layer: layer_ref
|
|
693
723
|
});
|
|
694
|
-
var pcb_trace_route_point_via =
|
|
695
|
-
route_type:
|
|
724
|
+
var pcb_trace_route_point_via = z41.object({
|
|
725
|
+
route_type: z41.literal("via"),
|
|
696
726
|
x: distance,
|
|
697
727
|
y: distance,
|
|
698
|
-
from_layer:
|
|
699
|
-
to_layer:
|
|
728
|
+
from_layer: z41.string(),
|
|
729
|
+
to_layer: z41.string()
|
|
700
730
|
});
|
|
701
|
-
var pcb_trace_route_point =
|
|
731
|
+
var pcb_trace_route_point = z41.union([
|
|
702
732
|
pcb_trace_route_point_wire,
|
|
703
733
|
pcb_trace_route_point_via
|
|
704
734
|
]);
|
|
705
|
-
var pcb_trace =
|
|
706
|
-
type:
|
|
707
|
-
source_trace_id:
|
|
708
|
-
pcb_component_id:
|
|
735
|
+
var pcb_trace = z41.object({
|
|
736
|
+
type: z41.literal("pcb_trace"),
|
|
737
|
+
source_trace_id: z41.string().optional(),
|
|
738
|
+
pcb_component_id: z41.string().optional(),
|
|
709
739
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
710
|
-
route_thickness_mode:
|
|
711
|
-
route_order_index:
|
|
712
|
-
should_round_corners:
|
|
713
|
-
route:
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
route_type:
|
|
740
|
+
route_thickness_mode: z41.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
741
|
+
route_order_index: z41.number().optional(),
|
|
742
|
+
should_round_corners: z41.boolean().optional(),
|
|
743
|
+
route: z41.array(
|
|
744
|
+
z41.union([
|
|
745
|
+
z41.object({
|
|
746
|
+
route_type: z41.literal("wire"),
|
|
717
747
|
x: distance,
|
|
718
748
|
y: distance,
|
|
719
749
|
width: distance,
|
|
720
|
-
start_pcb_port_id:
|
|
721
|
-
end_pcb_port_id:
|
|
750
|
+
start_pcb_port_id: z41.string().optional(),
|
|
751
|
+
end_pcb_port_id: z41.string().optional(),
|
|
722
752
|
layer: layer_ref
|
|
723
753
|
}),
|
|
724
|
-
|
|
725
|
-
route_type:
|
|
754
|
+
z41.object({
|
|
755
|
+
route_type: z41.literal("via"),
|
|
726
756
|
x: distance,
|
|
727
757
|
y: distance,
|
|
728
|
-
from_layer:
|
|
729
|
-
to_layer:
|
|
758
|
+
from_layer: z41.string(),
|
|
759
|
+
to_layer: z41.string()
|
|
730
760
|
})
|
|
731
761
|
])
|
|
732
762
|
)
|
|
@@ -735,34 +765,34 @@ expectTypesMatch(true);
|
|
|
735
765
|
expectTypesMatch(true);
|
|
736
766
|
|
|
737
767
|
// src/pcb/pcb_trace_error.ts
|
|
738
|
-
import { z as
|
|
739
|
-
var pcb_trace_error =
|
|
740
|
-
type:
|
|
768
|
+
import { z as z42 } from "zod";
|
|
769
|
+
var pcb_trace_error = z42.object({
|
|
770
|
+
type: z42.literal("pcb_trace_error"),
|
|
741
771
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
742
|
-
error_type:
|
|
743
|
-
message:
|
|
772
|
+
error_type: z42.literal("pcb_trace_error"),
|
|
773
|
+
message: z42.string(),
|
|
744
774
|
center: point.optional(),
|
|
745
|
-
pcb_trace_id:
|
|
746
|
-
source_trace_id:
|
|
747
|
-
pcb_component_ids:
|
|
748
|
-
pcb_port_ids:
|
|
775
|
+
pcb_trace_id: z42.string(),
|
|
776
|
+
source_trace_id: z42.string(),
|
|
777
|
+
pcb_component_ids: z42.array(z42.string()),
|
|
778
|
+
pcb_port_ids: z42.array(z42.string())
|
|
749
779
|
}).describe("Defines a trace error on the PCB");
|
|
750
780
|
expectTypesMatch(true);
|
|
751
781
|
|
|
752
782
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
753
|
-
import { z as
|
|
754
|
-
var pcb_port_not_matched_error =
|
|
755
|
-
type:
|
|
783
|
+
import { z as z43 } from "zod";
|
|
784
|
+
var pcb_port_not_matched_error = z43.object({
|
|
785
|
+
type: z43.literal("pcb_port_not_matched_error"),
|
|
756
786
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
757
|
-
message:
|
|
758
|
-
pcb_component_ids:
|
|
787
|
+
message: z43.string(),
|
|
788
|
+
pcb_component_ids: z43.array(z43.string())
|
|
759
789
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
760
790
|
expectTypesMatch(true);
|
|
761
791
|
|
|
762
792
|
// src/pcb/pcb_via.ts
|
|
763
|
-
import { z as
|
|
764
|
-
var pcb_via =
|
|
765
|
-
type:
|
|
793
|
+
import { z as z44 } from "zod";
|
|
794
|
+
var pcb_via = z44.object({
|
|
795
|
+
type: z44.literal("pcb_via"),
|
|
766
796
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
767
797
|
x: distance,
|
|
768
798
|
y: distance,
|
|
@@ -772,51 +802,51 @@ var pcb_via = z43.object({
|
|
|
772
802
|
from_layer: layer_ref.optional(),
|
|
773
803
|
/** @deprecated */
|
|
774
804
|
to_layer: layer_ref.optional(),
|
|
775
|
-
layers:
|
|
776
|
-
pcb_trace_id:
|
|
805
|
+
layers: z44.array(layer_ref),
|
|
806
|
+
pcb_trace_id: z44.string().optional()
|
|
777
807
|
}).describe("Defines a via on the PCB");
|
|
778
808
|
expectTypesMatch(true);
|
|
779
809
|
|
|
780
810
|
// src/pcb/pcb_board.ts
|
|
781
|
-
import { z as
|
|
782
|
-
var pcb_board =
|
|
783
|
-
type:
|
|
811
|
+
import { z as z45 } from "zod";
|
|
812
|
+
var pcb_board = z45.object({
|
|
813
|
+
type: z45.literal("pcb_board"),
|
|
784
814
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
785
815
|
width: length,
|
|
786
816
|
height: length,
|
|
787
817
|
center: point,
|
|
788
818
|
thickness: length.optional().default(1.4),
|
|
789
|
-
num_layers:
|
|
790
|
-
outline:
|
|
819
|
+
num_layers: z45.number().optional().default(4),
|
|
820
|
+
outline: z45.array(point).optional()
|
|
791
821
|
}).describe("Defines the board outline of the PCB");
|
|
792
822
|
expectTypesMatch(true);
|
|
793
823
|
|
|
794
824
|
// src/pcb/pcb_placement_error.ts
|
|
795
|
-
import { z as
|
|
796
|
-
var pcb_placement_error =
|
|
797
|
-
type:
|
|
825
|
+
import { z as z46 } from "zod";
|
|
826
|
+
var pcb_placement_error = z46.object({
|
|
827
|
+
type: z46.literal("pcb_placement_error"),
|
|
798
828
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
799
|
-
message:
|
|
829
|
+
message: z46.string()
|
|
800
830
|
}).describe("Defines a placement error on the PCB");
|
|
801
831
|
expectTypesMatch(true);
|
|
802
832
|
|
|
803
833
|
// src/pcb/pcb_trace_hint.ts
|
|
804
|
-
import { z as
|
|
805
|
-
var pcb_trace_hint =
|
|
806
|
-
type:
|
|
834
|
+
import { z as z47 } from "zod";
|
|
835
|
+
var pcb_trace_hint = z47.object({
|
|
836
|
+
type: z47.literal("pcb_trace_hint"),
|
|
807
837
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
808
|
-
pcb_port_id:
|
|
809
|
-
pcb_component_id:
|
|
810
|
-
route:
|
|
838
|
+
pcb_port_id: z47.string(),
|
|
839
|
+
pcb_component_id: z47.string(),
|
|
840
|
+
route: z47.array(route_hint_point)
|
|
811
841
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
812
842
|
expectTypesMatch(true);
|
|
813
843
|
|
|
814
844
|
// src/pcb/pcb_silkscreen_line.ts
|
|
815
|
-
import { z as
|
|
816
|
-
var pcb_silkscreen_line =
|
|
817
|
-
type:
|
|
845
|
+
import { z as z48 } from "zod";
|
|
846
|
+
var pcb_silkscreen_line = z48.object({
|
|
847
|
+
type: z48.literal("pcb_silkscreen_line"),
|
|
818
848
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
819
|
-
pcb_component_id:
|
|
849
|
+
pcb_component_id: z48.string(),
|
|
820
850
|
stroke_width: distance.default("0.1mm"),
|
|
821
851
|
x1: distance,
|
|
822
852
|
y1: distance,
|
|
@@ -827,39 +857,39 @@ var pcb_silkscreen_line = z47.object({
|
|
|
827
857
|
expectTypesMatch(true);
|
|
828
858
|
|
|
829
859
|
// src/pcb/pcb_silkscreen_path.ts
|
|
830
|
-
import { z as
|
|
831
|
-
var pcb_silkscreen_path =
|
|
832
|
-
type:
|
|
860
|
+
import { z as z49 } from "zod";
|
|
861
|
+
var pcb_silkscreen_path = z49.object({
|
|
862
|
+
type: z49.literal("pcb_silkscreen_path"),
|
|
833
863
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
834
|
-
pcb_component_id:
|
|
864
|
+
pcb_component_id: z49.string(),
|
|
835
865
|
layer: visible_layer,
|
|
836
|
-
route:
|
|
866
|
+
route: z49.array(point),
|
|
837
867
|
stroke_width: length
|
|
838
868
|
}).describe("Defines a silkscreen path on the PCB");
|
|
839
869
|
expectTypesMatch(true);
|
|
840
870
|
|
|
841
871
|
// src/pcb/pcb_silkscreen_text.ts
|
|
842
|
-
import { z as
|
|
843
|
-
var pcb_silkscreen_text =
|
|
844
|
-
type:
|
|
872
|
+
import { z as z50 } from "zod";
|
|
873
|
+
var pcb_silkscreen_text = z50.object({
|
|
874
|
+
type: z50.literal("pcb_silkscreen_text"),
|
|
845
875
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
846
|
-
font:
|
|
876
|
+
font: z50.literal("tscircuit2024").default("tscircuit2024"),
|
|
847
877
|
font_size: distance.default("0.2mm"),
|
|
848
|
-
pcb_component_id:
|
|
849
|
-
text:
|
|
878
|
+
pcb_component_id: z50.string(),
|
|
879
|
+
text: z50.string(),
|
|
850
880
|
layer: layer_ref,
|
|
851
|
-
is_mirrored:
|
|
881
|
+
is_mirrored: z50.boolean().default(false).optional(),
|
|
852
882
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
853
|
-
anchor_alignment:
|
|
883
|
+
anchor_alignment: z50.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center")
|
|
854
884
|
}).describe("Defines silkscreen text on the PCB");
|
|
855
885
|
expectTypesMatch(true);
|
|
856
886
|
|
|
857
887
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
858
|
-
import { z as
|
|
859
|
-
var pcb_silkscreen_rect =
|
|
860
|
-
type:
|
|
888
|
+
import { z as z51 } from "zod";
|
|
889
|
+
var pcb_silkscreen_rect = z51.object({
|
|
890
|
+
type: z51.literal("pcb_silkscreen_rect"),
|
|
861
891
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
862
|
-
pcb_component_id:
|
|
892
|
+
pcb_component_id: z51.string(),
|
|
863
893
|
center: point,
|
|
864
894
|
width: length,
|
|
865
895
|
height: length,
|
|
@@ -868,13 +898,13 @@ var pcb_silkscreen_rect = z50.object({
|
|
|
868
898
|
expectTypesMatch(true);
|
|
869
899
|
|
|
870
900
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
871
|
-
import { z as
|
|
872
|
-
var pcb_silkscreen_circle =
|
|
873
|
-
type:
|
|
901
|
+
import { z as z52 } from "zod";
|
|
902
|
+
var pcb_silkscreen_circle = z52.object({
|
|
903
|
+
type: z52.literal("pcb_silkscreen_circle"),
|
|
874
904
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
875
905
|
"pcb_silkscreen_circle"
|
|
876
906
|
),
|
|
877
|
-
pcb_component_id:
|
|
907
|
+
pcb_component_id: z52.string(),
|
|
878
908
|
center: point,
|
|
879
909
|
radius: length,
|
|
880
910
|
layer: visible_layer
|
|
@@ -882,11 +912,11 @@ var pcb_silkscreen_circle = z51.object({
|
|
|
882
912
|
expectTypesMatch(true);
|
|
883
913
|
|
|
884
914
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
885
|
-
import { z as
|
|
886
|
-
var pcb_silkscreen_oval =
|
|
887
|
-
type:
|
|
915
|
+
import { z as z53 } from "zod";
|
|
916
|
+
var pcb_silkscreen_oval = z53.object({
|
|
917
|
+
type: z53.literal("pcb_silkscreen_oval"),
|
|
888
918
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
889
|
-
pcb_component_id:
|
|
919
|
+
pcb_component_id: z53.string(),
|
|
890
920
|
center: point,
|
|
891
921
|
radius_x: distance,
|
|
892
922
|
radius_y: distance,
|
|
@@ -895,91 +925,91 @@ var pcb_silkscreen_oval = z52.object({
|
|
|
895
925
|
expectTypesMatch(true);
|
|
896
926
|
|
|
897
927
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
898
|
-
import { z as
|
|
899
|
-
var pcb_fabrication_note_text =
|
|
900
|
-
type:
|
|
928
|
+
import { z as z54 } from "zod";
|
|
929
|
+
var pcb_fabrication_note_text = z54.object({
|
|
930
|
+
type: z54.literal("pcb_fabrication_note_text"),
|
|
901
931
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
902
932
|
"pcb_fabrication_note_text"
|
|
903
933
|
),
|
|
904
|
-
font:
|
|
934
|
+
font: z54.literal("tscircuit2024").default("tscircuit2024"),
|
|
905
935
|
font_size: distance.default("1mm"),
|
|
906
|
-
pcb_component_id:
|
|
907
|
-
text:
|
|
936
|
+
pcb_component_id: z54.string(),
|
|
937
|
+
text: z54.string(),
|
|
908
938
|
layer: visible_layer,
|
|
909
939
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
910
|
-
anchor_alignment:
|
|
911
|
-
color:
|
|
940
|
+
anchor_alignment: z54.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
941
|
+
color: z54.string().optional()
|
|
912
942
|
}).describe(
|
|
913
943
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
914
944
|
);
|
|
915
945
|
expectTypesMatch(true);
|
|
916
946
|
|
|
917
947
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
918
|
-
import { z as
|
|
919
|
-
var pcb_fabrication_note_path =
|
|
920
|
-
type:
|
|
948
|
+
import { z as z55 } from "zod";
|
|
949
|
+
var pcb_fabrication_note_path = z55.object({
|
|
950
|
+
type: z55.literal("pcb_fabrication_note_path"),
|
|
921
951
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
922
952
|
"pcb_fabrication_note_path"
|
|
923
953
|
),
|
|
924
|
-
pcb_component_id:
|
|
954
|
+
pcb_component_id: z55.string(),
|
|
925
955
|
layer: layer_ref,
|
|
926
|
-
route:
|
|
956
|
+
route: z55.array(point),
|
|
927
957
|
stroke_width: length,
|
|
928
|
-
color:
|
|
958
|
+
color: z55.string().optional()
|
|
929
959
|
}).describe(
|
|
930
960
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
931
961
|
);
|
|
932
962
|
expectTypesMatch(true);
|
|
933
963
|
|
|
934
964
|
// src/pcb/pcb_keepout.ts
|
|
935
|
-
import { z as
|
|
936
|
-
var pcb_keepout =
|
|
937
|
-
type:
|
|
938
|
-
shape:
|
|
965
|
+
import { z as z56 } from "zod";
|
|
966
|
+
var pcb_keepout = z56.object({
|
|
967
|
+
type: z56.literal("pcb_keepout"),
|
|
968
|
+
shape: z56.literal("rect"),
|
|
939
969
|
center: point,
|
|
940
970
|
width: distance,
|
|
941
971
|
height: distance,
|
|
942
|
-
pcb_keepout_id:
|
|
943
|
-
layers:
|
|
972
|
+
pcb_keepout_id: z56.string(),
|
|
973
|
+
layers: z56.array(z56.string()),
|
|
944
974
|
// Specify layers where the keepout applies
|
|
945
|
-
description:
|
|
975
|
+
description: z56.string().optional()
|
|
946
976
|
// Optional description of the keepout
|
|
947
977
|
}).or(
|
|
948
|
-
|
|
949
|
-
type:
|
|
950
|
-
shape:
|
|
978
|
+
z56.object({
|
|
979
|
+
type: z56.literal("pcb_keepout"),
|
|
980
|
+
shape: z56.literal("circle"),
|
|
951
981
|
center: point,
|
|
952
982
|
radius: distance,
|
|
953
|
-
pcb_keepout_id:
|
|
954
|
-
layers:
|
|
983
|
+
pcb_keepout_id: z56.string(),
|
|
984
|
+
layers: z56.array(z56.string()),
|
|
955
985
|
// Specify layers where the keepout applies
|
|
956
|
-
description:
|
|
986
|
+
description: z56.string().optional()
|
|
957
987
|
// Optional description of the keepout
|
|
958
988
|
})
|
|
959
989
|
);
|
|
960
990
|
|
|
961
991
|
// src/cad/cad_component.ts
|
|
962
|
-
import { z as
|
|
963
|
-
var cad_component =
|
|
964
|
-
type:
|
|
965
|
-
cad_component_id:
|
|
966
|
-
pcb_component_id:
|
|
967
|
-
source_component_id:
|
|
992
|
+
import { z as z57 } from "zod";
|
|
993
|
+
var cad_component = z57.object({
|
|
994
|
+
type: z57.literal("cad_component"),
|
|
995
|
+
cad_component_id: z57.string(),
|
|
996
|
+
pcb_component_id: z57.string(),
|
|
997
|
+
source_component_id: z57.string(),
|
|
968
998
|
position: point3,
|
|
969
999
|
rotation: point3.optional(),
|
|
970
1000
|
size: point3.optional(),
|
|
971
1001
|
layer: layer_ref.optional(),
|
|
972
1002
|
// These are all ways to generate/load the 3d model
|
|
973
|
-
footprinter_string:
|
|
974
|
-
model_obj_url:
|
|
975
|
-
model_stl_url:
|
|
976
|
-
model_3mf_url:
|
|
977
|
-
model_jscad:
|
|
1003
|
+
footprinter_string: z57.string().optional(),
|
|
1004
|
+
model_obj_url: z57.string().optional(),
|
|
1005
|
+
model_stl_url: z57.string().optional(),
|
|
1006
|
+
model_3mf_url: z57.string().optional(),
|
|
1007
|
+
model_jscad: z57.any().optional()
|
|
978
1008
|
}).describe("Defines a component on the PCB");
|
|
979
1009
|
|
|
980
1010
|
// src/any_circuit_element.ts
|
|
981
|
-
import { z as
|
|
982
|
-
var any_circuit_element =
|
|
1011
|
+
import { z as z58 } from "zod";
|
|
1012
|
+
var any_circuit_element = z58.union([
|
|
983
1013
|
source_trace,
|
|
984
1014
|
source_port,
|
|
985
1015
|
any_source_component,
|
|
@@ -1001,6 +1031,7 @@ var any_circuit_element = z57.union([
|
|
|
1001
1031
|
pcb_trace,
|
|
1002
1032
|
pcb_via,
|
|
1003
1033
|
pcb_smtpad,
|
|
1034
|
+
pcb_solder_paste,
|
|
1004
1035
|
pcb_board,
|
|
1005
1036
|
pcb_trace_hint,
|
|
1006
1037
|
pcb_silkscreen_line,
|
|
@@ -1061,6 +1092,7 @@ export {
|
|
|
1061
1092
|
pcb_silkscreen_rect,
|
|
1062
1093
|
pcb_silkscreen_text,
|
|
1063
1094
|
pcb_smtpad,
|
|
1095
|
+
pcb_solder_paste,
|
|
1064
1096
|
pcb_text,
|
|
1065
1097
|
pcb_trace,
|
|
1066
1098
|
pcb_trace_error,
|