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