circuit-json 0.0.129 → 0.0.131

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
@@ -481,6 +481,8 @@ import { z as z28 } from "zod";
481
481
  var source_group = z28.object({
482
482
  type: z28.literal("source_group"),
483
483
  source_group_id: z28.string(),
484
+ subcircuit_id: z28.string().optional(),
485
+ is_subcircuit: z28.boolean().optional(),
484
486
  name: z28.string().optional()
485
487
  });
486
488
 
@@ -774,7 +776,8 @@ var pcb_component = z44.object({
774
776
  layer: layer_ref,
775
777
  rotation,
776
778
  width: length,
777
- height: length
779
+ height: length,
780
+ subcircuit_id: z44.string().optional()
778
781
  }).describe("Defines a component on the PCB");
779
782
  expectTypesMatch(true);
780
783
 
@@ -783,6 +786,8 @@ import { z as z45 } from "zod";
783
786
  var pcb_hole_circle_or_square = z45.object({
784
787
  type: z45.literal("pcb_hole"),
785
788
  pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
789
+ pcb_group_id: z45.string().optional(),
790
+ subcircuit_id: z45.string().optional(),
786
791
  hole_shape: z45.enum(["circle", "square"]),
787
792
  hole_diameter: z45.number(),
788
793
  x: distance,
@@ -795,6 +800,8 @@ expectTypesMatch(true);
795
800
  var pcb_hole_oval = z45.object({
796
801
  type: z45.literal("pcb_hole"),
797
802
  pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
803
+ pcb_group_id: z45.string().optional(),
804
+ subcircuit_id: z45.string().optional(),
798
805
  hole_shape: z45.literal("oval"),
799
806
  hole_width: z45.number(),
800
807
  hole_height: z45.number(),
@@ -812,6 +819,8 @@ import { z as z46 } from "zod";
812
819
  var pcb_plated_hole_circle = z46.object({
813
820
  type: z46.literal("pcb_plated_hole"),
814
821
  shape: z46.literal("circle"),
822
+ pcb_group_id: z46.string().optional(),
823
+ subcircuit_id: z46.string().optional(),
815
824
  outer_diameter: z46.number(),
816
825
  hole_diameter: z46.number(),
817
826
  x: distance,
@@ -825,6 +834,8 @@ var pcb_plated_hole_circle = z46.object({
825
834
  var pcb_plated_hole_oval = z46.object({
826
835
  type: z46.literal("pcb_plated_hole"),
827
836
  shape: z46.enum(["oval", "pill"]),
837
+ pcb_group_id: z46.string().optional(),
838
+ subcircuit_id: z46.string().optional(),
828
839
  outer_width: z46.number(),
829
840
  outer_height: z46.number(),
830
841
  hole_width: z46.number(),
@@ -840,6 +851,8 @@ var pcb_plated_hole_oval = z46.object({
840
851
  var pcb_circular_hole_with_rect_pad = z46.object({
841
852
  type: z46.literal("pcb_plated_hole"),
842
853
  shape: z46.literal("circular_hole_with_rect_pad"),
854
+ pcb_group_id: z46.string().optional(),
855
+ subcircuit_id: z46.string().optional(),
843
856
  hole_shape: z46.literal("circle"),
844
857
  pad_shape: z46.literal("rect"),
845
858
  hole_diameter: z46.number(),
@@ -869,6 +882,8 @@ import { z as z47 } from "zod";
869
882
  var pcb_port = z47.object({
870
883
  type: z47.literal("pcb_port"),
871
884
  pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
885
+ pcb_group_id: z47.string().optional(),
886
+ subcircuit_id: z47.string().optional(),
872
887
  source_port_id: z47.string(),
873
888
  pcb_component_id: z47.string(),
874
889
  x: distance,
@@ -883,6 +898,8 @@ var pcb_smtpad_circle = z48.object({
883
898
  type: z48.literal("pcb_smtpad"),
884
899
  shape: z48.literal("circle"),
885
900
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
901
+ pcb_group_id: z48.string().optional(),
902
+ subcircuit_id: z48.string().optional(),
886
903
  x: distance,
887
904
  y: distance,
888
905
  radius: z48.number(),
@@ -895,6 +912,8 @@ var pcb_smtpad_rect = z48.object({
895
912
  type: z48.literal("pcb_smtpad"),
896
913
  shape: z48.literal("rect"),
897
914
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
915
+ pcb_group_id: z48.string().optional(),
916
+ subcircuit_id: z48.string().optional(),
898
917
  x: distance,
899
918
  y: distance,
900
919
  width: z48.number(),
@@ -908,6 +927,8 @@ var pcb_smtpad_rotated_rect = z48.object({
908
927
  type: z48.literal("pcb_smtpad"),
909
928
  shape: z48.literal("rotated_rect"),
910
929
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
930
+ pcb_group_id: z48.string().optional(),
931
+ subcircuit_id: z48.string().optional(),
911
932
  x: distance,
912
933
  y: distance,
913
934
  width: z48.number(),
@@ -918,7 +939,27 @@ var pcb_smtpad_rotated_rect = z48.object({
918
939
  pcb_component_id: z48.string().optional(),
919
940
  pcb_port_id: z48.string().optional()
920
941
  });
921
- var pcb_smtpad = z48.union([pcb_smtpad_circle, pcb_smtpad_rect, pcb_smtpad_rotated_rect]).describe("Defines an SMT pad on the PCB");
942
+ var pcb_smtpad_pill = z48.object({
943
+ type: z48.literal("pcb_smtpad"),
944
+ shape: z48.literal("pill"),
945
+ pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
946
+ x: distance,
947
+ y: distance,
948
+ width: z48.number(),
949
+ height: z48.number(),
950
+ radius: z48.number(),
951
+ layer: layer_ref,
952
+ port_hints: z48.array(z48.string()).optional(),
953
+ pcb_component_id: z48.string().optional(),
954
+ pcb_port_id: z48.string().optional()
955
+ });
956
+ var pcb_smtpad = z48.union([
957
+ pcb_smtpad_circle,
958
+ pcb_smtpad_rect,
959
+ pcb_smtpad_rotated_rect,
960
+ pcb_smtpad_pill
961
+ ]).describe("Defines an SMT pad on the PCB");
962
+ expectTypesMatch(true);
922
963
  expectTypesMatch(true);
923
964
  expectTypesMatch(true);
924
965
  expectTypesMatch(true);
@@ -929,6 +970,8 @@ var pcb_solder_paste_circle = z49.object({
929
970
  type: z49.literal("pcb_solder_paste"),
930
971
  shape: z49.literal("circle"),
931
972
  pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
973
+ pcb_group_id: z49.string().optional(),
974
+ subcircuit_id: z49.string().optional(),
932
975
  x: distance,
933
976
  y: distance,
934
977
  radius: z49.number(),
@@ -940,6 +983,8 @@ var pcb_solder_paste_rect = z49.object({
940
983
  type: z49.literal("pcb_solder_paste"),
941
984
  shape: z49.literal("rect"),
942
985
  pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
986
+ pcb_group_id: z49.string().optional(),
987
+ subcircuit_id: z49.string().optional(),
943
988
  x: distance,
944
989
  y: distance,
945
990
  width: z49.number(),
@@ -957,6 +1002,8 @@ import { z as z50 } from "zod";
957
1002
  var pcb_text = z50.object({
958
1003
  type: z50.literal("pcb_text"),
959
1004
  pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
1005
+ pcb_group_id: z50.string().optional(),
1006
+ subcircuit_id: z50.string().optional(),
960
1007
  text: z50.string(),
961
1008
  center: point,
962
1009
  layer: layer_ref,
@@ -995,6 +1042,8 @@ var pcb_trace = z51.object({
995
1042
  source_trace_id: z51.string().optional(),
996
1043
  pcb_component_id: z51.string().optional(),
997
1044
  pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
1045
+ pcb_group_id: z51.string().optional(),
1046
+ subcircuit_id: z51.string().optional(),
998
1047
  route_thickness_mode: z51.enum(["constant", "interpolated"]).default("constant").optional(),
999
1048
  route_order_index: z51.number().optional(),
1000
1049
  should_round_corners: z51.boolean().optional(),
@@ -1053,6 +1102,8 @@ import { z as z54 } from "zod";
1053
1102
  var pcb_via = z54.object({
1054
1103
  type: z54.literal("pcb_via"),
1055
1104
  pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
1105
+ pcb_group_id: z54.string().optional(),
1106
+ subcircuit_id: z54.string().optional(),
1056
1107
  x: distance,
1057
1108
  y: distance,
1058
1109
  outer_diameter: distance.default("0.6mm"),
@@ -1071,6 +1122,8 @@ import { z as z55 } from "zod";
1071
1122
  var pcb_board = z55.object({
1072
1123
  type: z55.literal("pcb_board"),
1073
1124
  pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
1125
+ is_subcircuit: z55.boolean().optional(),
1126
+ subcircuit_id: z55.string().optional(),
1074
1127
  width: length,
1075
1128
  height: length,
1076
1129
  center: point,
@@ -1106,6 +1159,8 @@ var pcb_silkscreen_line = z58.object({
1106
1159
  type: z58.literal("pcb_silkscreen_line"),
1107
1160
  pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
1108
1161
  pcb_component_id: z58.string(),
1162
+ pcb_group_id: z58.string().optional(),
1163
+ subcircuit_id: z58.string().optional(),
1109
1164
  stroke_width: distance.default("0.1mm"),
1110
1165
  x1: distance,
1111
1166
  y1: distance,
@@ -1121,6 +1176,8 @@ var pcb_silkscreen_path = z59.object({
1121
1176
  type: z59.literal("pcb_silkscreen_path"),
1122
1177
  pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
1123
1178
  pcb_component_id: z59.string(),
1179
+ pcb_group_id: z59.string().optional(),
1180
+ subcircuit_id: z59.string().optional(),
1124
1181
  layer: visible_layer,
1125
1182
  route: z59.array(point),
1126
1183
  stroke_width: length
@@ -1132,6 +1189,8 @@ import { z as z60 } from "zod";
1132
1189
  var pcb_silkscreen_text = z60.object({
1133
1190
  type: z60.literal("pcb_silkscreen_text"),
1134
1191
  pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
1192
+ pcb_group_id: z60.string().optional(),
1193
+ subcircuit_id: z60.string().optional(),
1135
1194
  font: z60.literal("tscircuit2024").default("tscircuit2024"),
1136
1195
  font_size: distance.default("0.2mm"),
1137
1196
  pcb_component_id: z60.string(),
@@ -1150,6 +1209,8 @@ var pcb_silkscreen_rect = z61.object({
1150
1209
  type: z61.literal("pcb_silkscreen_rect"),
1151
1210
  pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
1152
1211
  pcb_component_id: z61.string(),
1212
+ pcb_group_id: z61.string().optional(),
1213
+ subcircuit_id: z61.string().optional(),
1153
1214
  center: point,
1154
1215
  width: length,
1155
1216
  height: length,
@@ -1165,6 +1226,8 @@ var pcb_silkscreen_circle = z62.object({
1165
1226
  "pcb_silkscreen_circle"
1166
1227
  ),
1167
1228
  pcb_component_id: z62.string(),
1229
+ pcb_group_id: z62.string().optional(),
1230
+ subcircuit_id: z62.string().optional(),
1168
1231
  center: point,
1169
1232
  radius: length,
1170
1233
  layer: visible_layer
@@ -1177,6 +1240,8 @@ var pcb_silkscreen_oval = z63.object({
1177
1240
  type: z63.literal("pcb_silkscreen_oval"),
1178
1241
  pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
1179
1242
  pcb_component_id: z63.string(),
1243
+ pcb_group_id: z63.string().optional(),
1244
+ subcircuit_id: z63.string().optional(),
1180
1245
  center: point,
1181
1246
  radius_x: distance,
1182
1247
  radius_y: distance,
@@ -1191,6 +1256,8 @@ var pcb_fabrication_note_text = z64.object({
1191
1256
  pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
1192
1257
  "pcb_fabrication_note_text"
1193
1258
  ),
1259
+ subcircuit_id: z64.string().optional(),
1260
+ pcb_group_id: z64.string().optional(),
1194
1261
  font: z64.literal("tscircuit2024").default("tscircuit2024"),
1195
1262
  font_size: distance.default("1mm"),
1196
1263
  pcb_component_id: z64.string(),
@@ -1212,6 +1279,7 @@ var pcb_fabrication_note_path = z65.object({
1212
1279
  "pcb_fabrication_note_path"
1213
1280
  ),
1214
1281
  pcb_component_id: z65.string(),
1282
+ subcircuit_id: z65.string().optional(),
1215
1283
  layer: layer_ref,
1216
1284
  route: z65.array(point),
1217
1285
  stroke_width: length,
@@ -1226,6 +1294,8 @@ import { z as z66 } from "zod";
1226
1294
  var pcb_keepout = z66.object({
1227
1295
  type: z66.literal("pcb_keepout"),
1228
1296
  shape: z66.literal("rect"),
1297
+ pcb_group_id: z66.string().optional(),
1298
+ subcircuit_id: z66.string().optional(),
1229
1299
  center: point,
1230
1300
  width: distance,
1231
1301
  height: distance,
@@ -1238,6 +1308,8 @@ var pcb_keepout = z66.object({
1238
1308
  z66.object({
1239
1309
  type: z66.literal("pcb_keepout"),
1240
1310
  shape: z66.literal("circle"),
1311
+ pcb_group_id: z66.string().optional(),
1312
+ subcircuit_id: z66.string().optional(),
1241
1313
  center: point,
1242
1314
  radius: distance,
1243
1315
  pcb_keepout_id: z66.string(),
@@ -1255,6 +1327,8 @@ var pcb_missing_footprint_error = z67.object({
1255
1327
  pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
1256
1328
  "pcb_missing_footprint_error"
1257
1329
  ),
1330
+ pcb_group_id: z67.string().optional(),
1331
+ subcircuit_id: z67.string().optional(),
1258
1332
  error_type: z67.literal("pcb_missing_footprint_error"),
1259
1333
  source_component_id: z67.string(),
1260
1334
  message: z67.string()
@@ -1270,6 +1344,8 @@ var pcb_manual_edit_conflict_error = z68.object({
1270
1344
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_manual_edit_conflict_error"),
1271
1345
  message: z68.string(),
1272
1346
  pcb_component_id: z68.string(),
1347
+ pcb_group_id: z68.string().optional(),
1348
+ subcircuit_id: z68.string().optional(),
1273
1349
  source_component_id: z68.string()
1274
1350
  }).describe(
1275
1351
  "Error emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
@@ -1281,6 +1357,8 @@ import { z as z69 } from "zod";
1281
1357
  var pcb_group = z69.object({
1282
1358
  type: z69.literal("pcb_group"),
1283
1359
  pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
1360
+ is_subcircuit: z69.boolean().optional(),
1361
+ subcircuit_id: z69.string().optional(),
1284
1362
  width: length,
1285
1363
  height: length,
1286
1364
  center: point,
@@ -1412,6 +1490,7 @@ export {
1412
1490
  pcb_silkscreen_rect,
1413
1491
  pcb_silkscreen_text,
1414
1492
  pcb_smtpad,
1493
+ pcb_smtpad_pill,
1415
1494
  pcb_solder_paste,
1416
1495
  pcb_text,
1417
1496
  pcb_trace,