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.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/pcb_text.ts
668
+ // src/pcb/pcb_solder_paste.ts
669
669
  import { z as z39 } from "zod";
670
- var pcb_text = z39.object({
671
- type: z39.literal("pcb_text"),
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: z39.string(),
702
+ text: z40.string(),
674
703
  center: point,
675
704
  layer: layer_ref,
676
705
  width: length,
677
706
  height: length,
678
- lines: z39.number(),
679
- align: z39.enum(["bottom-left"])
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 z40 } from "zod";
685
- var pcb_trace_route_point_wire = z40.object({
686
- route_type: z40.literal("wire"),
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: z40.string().optional(),
691
- end_pcb_port_id: z40.string().optional(),
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 = z40.object({
695
- route_type: z40.literal("via"),
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: z40.string(),
699
- to_layer: z40.string()
727
+ from_layer: z41.string(),
728
+ to_layer: z41.string()
700
729
  });
701
- var pcb_trace_route_point = z40.union([
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 = z40.object({
706
- type: z40.literal("pcb_trace"),
707
- source_trace_id: z40.string().optional(),
708
- pcb_component_id: z40.string().optional(),
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: z40.enum(["constant", "interpolated"]).default("constant").optional(),
711
- route_order_index: z40.number().optional(),
712
- should_round_corners: z40.boolean().optional(),
713
- route: z40.array(
714
- z40.union([
715
- z40.object({
716
- route_type: z40.literal("wire"),
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: z40.string().optional(),
721
- end_pcb_port_id: z40.string().optional(),
749
+ start_pcb_port_id: z41.string().optional(),
750
+ end_pcb_port_id: z41.string().optional(),
722
751
  layer: layer_ref
723
752
  }),
724
- z40.object({
725
- route_type: z40.literal("via"),
753
+ z41.object({
754
+ route_type: z41.literal("via"),
726
755
  x: distance,
727
756
  y: distance,
728
- from_layer: z40.string(),
729
- to_layer: z40.string()
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 z41 } from "zod";
739
- var pcb_trace_error = z41.object({
740
- type: z41.literal("pcb_trace_error"),
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: z41.literal("pcb_trace_error"),
743
- message: z41.string(),
771
+ error_type: z42.literal("pcb_trace_error"),
772
+ message: z42.string(),
744
773
  center: point.optional(),
745
- pcb_trace_id: z41.string(),
746
- source_trace_id: z41.string(),
747
- pcb_component_ids: z41.array(z41.string()),
748
- pcb_port_ids: z41.array(z41.string())
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 z42 } from "zod";
754
- var pcb_port_not_matched_error = z42.object({
755
- type: z42.literal("pcb_port_not_matched_error"),
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: z42.string(),
758
- pcb_component_ids: z42.array(z42.string())
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 z43 } from "zod";
764
- var pcb_via = z43.object({
765
- type: z43.literal("pcb_via"),
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: z43.array(layer_ref),
776
- pcb_trace_id: z43.string().optional()
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 z44 } from "zod";
782
- var pcb_board = z44.object({
783
- type: z44.literal("pcb_board"),
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: z44.number().optional().default(4),
790
- outline: z44.array(point).optional()
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 z45 } from "zod";
796
- var pcb_placement_error = z45.object({
797
- type: z45.literal("pcb_placement_error"),
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: z45.string()
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 z46 } from "zod";
805
- var pcb_trace_hint = z46.object({
806
- type: z46.literal("pcb_trace_hint"),
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: z46.string(),
809
- pcb_component_id: z46.string(),
810
- route: z46.array(route_hint_point)
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 z47 } from "zod";
816
- var pcb_silkscreen_line = z47.object({
817
- type: z47.literal("pcb_silkscreen_line"),
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: z47.string(),
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 z48 } from "zod";
831
- var pcb_silkscreen_path = z48.object({
832
- type: z48.literal("pcb_silkscreen_path"),
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: z48.string(),
863
+ pcb_component_id: z49.string(),
835
864
  layer: visible_layer,
836
- route: z48.array(point),
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 z49 } from "zod";
843
- var pcb_silkscreen_text = z49.object({
844
- type: z49.literal("pcb_silkscreen_text"),
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: z49.literal("tscircuit2024").default("tscircuit2024"),
875
+ font: z50.literal("tscircuit2024").default("tscircuit2024"),
847
876
  font_size: distance.default("0.2mm"),
848
- pcb_component_id: z49.string(),
849
- text: z49.string(),
877
+ pcb_component_id: z50.string(),
878
+ text: z50.string(),
850
879
  layer: layer_ref,
851
- is_mirrored: z49.boolean().default(false).optional(),
880
+ is_mirrored: z50.boolean().default(false).optional(),
852
881
  anchor_position: point.default({ x: 0, y: 0 }),
853
- anchor_alignment: z49.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center")
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 z50 } from "zod";
859
- var pcb_silkscreen_rect = z50.object({
860
- type: z50.literal("pcb_silkscreen_rect"),
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: z50.string(),
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 z51 } from "zod";
872
- var pcb_silkscreen_circle = z51.object({
873
- type: z51.literal("pcb_silkscreen_circle"),
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: z51.string(),
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 z52 } from "zod";
886
- var pcb_silkscreen_oval = z52.object({
887
- type: z52.literal("pcb_silkscreen_oval"),
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: z52.string(),
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 z53 } from "zod";
899
- var pcb_fabrication_note_text = z53.object({
900
- type: z53.literal("pcb_fabrication_note_text"),
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: z53.literal("tscircuit2024").default("tscircuit2024"),
933
+ font: z54.literal("tscircuit2024").default("tscircuit2024"),
905
934
  font_size: distance.default("1mm"),
906
- pcb_component_id: z53.string(),
907
- text: z53.string(),
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: z53.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
911
- color: z53.string().optional()
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 z54 } from "zod";
919
- var pcb_fabrication_note_path = z54.object({
920
- type: z54.literal("pcb_fabrication_note_path"),
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: z54.string(),
953
+ pcb_component_id: z55.string(),
925
954
  layer: layer_ref,
926
- route: z54.array(point),
955
+ route: z55.array(point),
927
956
  stroke_width: length,
928
- color: z54.string().optional()
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 z55 } from "zod";
936
- var pcb_keepout = z55.object({
937
- type: z55.literal("pcb_keepout"),
938
- shape: z55.literal("rect"),
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: z55.string(),
943
- layers: z55.array(z55.string()),
971
+ pcb_keepout_id: z56.string(),
972
+ layers: z56.array(z56.string()),
944
973
  // Specify layers where the keepout applies
945
- description: z55.string().optional()
974
+ description: z56.string().optional()
946
975
  // Optional description of the keepout
947
976
  }).or(
948
- z55.object({
949
- type: z55.literal("pcb_keepout"),
950
- shape: z55.literal("circle"),
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: z55.string(),
954
- layers: z55.array(z55.string()),
982
+ pcb_keepout_id: z56.string(),
983
+ layers: z56.array(z56.string()),
955
984
  // Specify layers where the keepout applies
956
- description: z55.string().optional()
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 z56 } from "zod";
963
- var cad_component = z56.object({
964
- type: z56.literal("cad_component"),
965
- cad_component_id: z56.string(),
966
- pcb_component_id: z56.string(),
967
- source_component_id: z56.string(),
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: z56.string().optional(),
974
- model_obj_url: z56.string().optional(),
975
- model_stl_url: z56.string().optional(),
976
- model_3mf_url: z56.string().optional(),
977
- model_jscad: z56.any().optional()
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 z57 } from "zod";
982
- var any_circuit_element = z57.union([
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,