easyeda 0.0.143 → 0.0.145

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.
@@ -727,6 +727,10 @@ __export(dist_exports, {
727
727
  pcb_autorouting_error: () => pcb_autorouting_error,
728
728
  pcb_board: () => pcb_board,
729
729
  pcb_component: () => pcb_component,
730
+ pcb_cutout: () => pcb_cutout,
731
+ pcb_cutout_circle: () => pcb_cutout_circle,
732
+ pcb_cutout_polygon: () => pcb_cutout_polygon,
733
+ pcb_cutout_rect: () => pcb_cutout_rect,
730
734
  pcb_fabrication_note_path: () => pcb_fabrication_note_path,
731
735
  pcb_fabrication_note_text: () => pcb_fabrication_note_text,
732
736
  pcb_group: () => pcb_group,
@@ -734,7 +738,7 @@ __export(dist_exports, {
734
738
  pcb_hole_circle_or_square_shape: () => pcb_hole_circle_or_square_shape,
735
739
  pcb_hole_oval_shape: () => pcb_hole_oval_shape,
736
740
  pcb_keepout: () => pcb_keepout,
737
- pcb_manual_edit_conflict_error: () => pcb_manual_edit_conflict_error,
741
+ pcb_manual_edit_conflict_warning: () => pcb_manual_edit_conflict_warning,
738
742
  pcb_missing_footprint_error: () => pcb_missing_footprint_error,
739
743
  pcb_placement_error: () => pcb_placement_error,
740
744
  pcb_plated_hole: () => pcb_plated_hole,
@@ -777,7 +781,9 @@ __export(dist_exports, {
777
781
  schematic_debug_point: () => schematic_debug_point,
778
782
  schematic_debug_rect: () => schematic_debug_rect,
779
783
  schematic_error: () => schematic_error,
784
+ schematic_group: () => schematic_group,
780
785
  schematic_line: () => schematic_line,
786
+ schematic_manual_edit_conflict_warning: () => schematic_manual_edit_conflict_warning,
781
787
  schematic_net_label: () => schematic_net_label,
782
788
  schematic_path: () => schematic_path,
783
789
  schematic_pin_styles: () => schematic_pin_styles,
@@ -787,8 +793,10 @@ __export(dist_exports, {
787
793
  schematic_voltage_probe: () => schematic_voltage_probe,
788
794
  size: () => size,
789
795
  source_component_base: () => source_component_base,
796
+ source_failed_to_create_component_error: () => source_failed_to_create_component_error,
790
797
  source_group: () => source_group,
791
798
  source_led: () => source_led,
799
+ source_missing_property_error: () => source_missing_property_error,
792
800
  source_net: () => source_net,
793
801
  source_port: () => source_port,
794
802
  source_project_metadata: () => source_project_metadata,
@@ -800,6 +808,7 @@ __export(dist_exports, {
800
808
  source_simple_diode: () => source_simple_diode,
801
809
  source_simple_ground: () => source_simple_ground,
802
810
  source_simple_inductor: () => source_simple_inductor,
811
+ source_simple_led: () => source_simple_led,
803
812
  source_simple_mosfet: () => source_simple_mosfet,
804
813
  source_simple_pin_header: () => source_simple_pin_header,
805
814
  source_simple_potentiometer: () => source_simple_potentiometer,
@@ -845,8 +854,8 @@ import { z as z12 } from "zod";
845
854
  import { z as z13 } from "zod";
846
855
  import { z as z14 } from "zod";
847
856
  import { z as z15 } from "zod";
848
- import { z as z27 } from "zod";
849
857
  import { z as z16 } from "zod";
858
+ import { z as z31 } from "zod";
850
859
  import { z as z17 } from "zod";
851
860
  import { z as z18 } from "zod";
852
861
  import { z as z19 } from "zod";
@@ -857,10 +866,10 @@ import { z as z23 } from "zod";
857
866
  import { z as z24 } from "zod";
858
867
  import { z as z25 } from "zod";
859
868
  import { z as z26 } from "zod";
869
+ import { z as z27 } from "zod";
860
870
  import { z as z28 } from "zod";
861
871
  import { z as z29 } from "zod";
862
872
  import { z as z30 } from "zod";
863
- import { z as z31 } from "zod";
864
873
  import { z as z322 } from "zod";
865
874
  import { z as z33 } from "zod";
866
875
  import { z as z34 } from "zod";
@@ -870,9 +879,9 @@ import { z as z37 } from "zod";
870
879
  import { z as z38 } from "zod";
871
880
  import { z as z39 } from "zod";
872
881
  import { z as z40 } from "zod";
882
+ import { z as z43 } from "zod";
873
883
  import { z as z41 } from "zod";
874
884
  import { z as z422 } from "zod";
875
- import { z as z43 } from "zod";
876
885
  import { z as z44 } from "zod";
877
886
  import { z as z45 } from "zod";
878
887
  import { z as z46 } from "zod";
@@ -904,6 +913,15 @@ import { z as z71 } from "zod";
904
913
  import { z as z72 } from "zod";
905
914
  import { z as z73 } from "zod";
906
915
  import { z as z74 } from "zod";
916
+ import { z as z75 } from "zod";
917
+ import { z as z76 } from "zod";
918
+ import { z as z77 } from "zod";
919
+ import { z as z78 } from "zod";
920
+ import { z as z79 } from "zod";
921
+ import { z as z80 } from "zod";
922
+ import { z as z81 } from "zod";
923
+ import { z as z82 } from "zod";
924
+ import { z as z83 } from "zod";
907
925
  var unitMappings = {
908
926
  Hz: {
909
927
  baseUnit: "Hz",
@@ -1161,6 +1179,18 @@ expectTypesMatch("extra props b");
1161
1179
  expectTypesMatch("missing props b");
1162
1180
  expectTypesMatch(true);
1163
1181
  expectTypesMatch("mismatched prop types: a");
1182
+ var expectStringUnionsMatch = (shouldBe) => {
1183
+ };
1184
+ expectStringUnionsMatch(true);
1185
+ expectStringUnionsMatch(
1186
+ 'T1 has extra: "c", T2 has extra: "d"'
1187
+ );
1188
+ expectStringUnionsMatch('T1 has extra: "c"');
1189
+ expectStringUnionsMatch('T2 has extra: "c"');
1190
+ expectStringUnionsMatch(
1191
+ 'T1 has extra: "d", T2 has extra: "c"'
1192
+ );
1193
+ expectStringUnionsMatch(true);
1164
1194
  var source_component_base = z7.object({
1165
1195
  type: z7.literal("source_component"),
1166
1196
  ftype: z7.string().optional(),
@@ -1168,7 +1198,10 @@ var source_component_base = z7.object({
1168
1198
  name: z7.string(),
1169
1199
  manufacturer_part_number: z7.string().optional(),
1170
1200
  supplier_part_numbers: z7.record(supplier_name, z7.array(z7.string())).optional(),
1171
- display_value: z7.string().optional()
1201
+ display_value: z7.string().optional(),
1202
+ are_pins_interchangeable: z7.boolean().optional(),
1203
+ internally_connected_source_port_ids: z7.array(z7.array(z7.string())).optional(),
1204
+ source_group_id: z7.string().optional()
1172
1205
  });
1173
1206
  expectTypesMatch(true);
1174
1207
  var source_simple_capacitor = source_component_base.extend({
@@ -1189,88 +1222,131 @@ var source_simple_diode = source_component_base.extend({
1189
1222
  ftype: z10.literal("simple_diode")
1190
1223
  });
1191
1224
  expectTypesMatch(true);
1225
+ var source_simple_led = source_simple_diode.extend({
1226
+ ftype: z11.literal("simple_led"),
1227
+ color: z11.string().optional(),
1228
+ wavelength: z11.string().optional()
1229
+ });
1230
+ expectTypesMatch(true);
1192
1231
  var source_simple_ground = source_component_base.extend({
1193
- ftype: z11.literal("simple_ground")
1232
+ ftype: z12.literal("simple_ground")
1194
1233
  });
1195
1234
  expectTypesMatch(true);
1196
1235
  var source_simple_bug = source_component_base.extend({
1197
- ftype: z12.literal("simple_bug")
1236
+ ftype: z13.literal("simple_bug")
1198
1237
  }).describe("@deprecated");
1199
1238
  var source_simple_chip = source_component_base.extend({
1200
- ftype: z13.literal("simple_chip")
1239
+ ftype: z14.literal("simple_chip")
1201
1240
  });
1202
1241
  expectTypesMatch(true);
1203
1242
  var source_led = source_simple_diode.extend({
1204
- ftype: z14.literal("led")
1243
+ ftype: z15.literal("led")
1205
1244
  });
1206
1245
  expectTypesMatch(true);
1207
1246
  var source_simple_power_source = source_component_base.extend({
1208
- ftype: z15.literal("simple_power_source"),
1247
+ ftype: z16.literal("simple_power_source"),
1209
1248
  voltage
1210
1249
  });
1211
1250
  expectTypesMatch(true);
1251
+ var source_simple_fuse = source_component_base.extend({
1252
+ ftype: z17.literal("simple_fuse"),
1253
+ current_rating_amps: z17.number().describe("Nominal current in amps the fuse is rated for"),
1254
+ voltage_rating_volts: z17.number().describe("Voltage rating in volts, e.g. \xB15V would be 5")
1255
+ });
1256
+ expectTypesMatch(true);
1212
1257
  var source_simple_battery = source_component_base.extend({
1213
- ftype: z16.literal("simple_battery"),
1258
+ ftype: z18.literal("simple_battery"),
1214
1259
  capacity: battery_capacity
1215
1260
  });
1216
1261
  expectTypesMatch(true);
1217
1262
  var source_simple_inductor = source_component_base.extend({
1218
- ftype: z17.literal("simple_inductor"),
1263
+ ftype: z19.literal("simple_inductor"),
1219
1264
  inductance
1220
1265
  });
1221
1266
  expectTypesMatch(true);
1222
1267
  var source_simple_push_button = source_component_base.extend({
1223
- ftype: z18.literal("simple_push_button")
1268
+ ftype: z20.literal("simple_push_button")
1224
1269
  });
1225
1270
  expectTypesMatch(true);
1226
1271
  var source_simple_potentiometer = source_component_base.extend({
1227
- ftype: z19.literal("simple_potentiometer"),
1272
+ ftype: z21.literal("simple_potentiometer"),
1228
1273
  max_resistance: resistance
1229
1274
  });
1230
1275
  var source_simple_crystal = source_component_base.extend({
1231
- ftype: z20.literal("simple_crystal"),
1232
- frequency: z20.number().describe("Frequency in Hz"),
1233
- load_capacitance: z20.number().optional().describe("Load capacitance in pF")
1276
+ ftype: z222.literal("simple_crystal"),
1277
+ frequency: z222.number().describe("Frequency in Hz"),
1278
+ load_capacitance: z222.number().optional().describe("Load capacitance in pF")
1234
1279
  });
1235
1280
  expectTypesMatch(true);
1236
1281
  var source_simple_pin_header = source_component_base.extend({
1237
- ftype: z21.literal("simple_pin_header"),
1238
- pin_count: z21.number(),
1239
- gender: z21.enum(["male", "female"]).optional().default("male")
1282
+ ftype: z23.literal("simple_pin_header"),
1283
+ pin_count: z23.number(),
1284
+ gender: z23.enum(["male", "female"]).optional().default("male")
1240
1285
  });
1241
1286
  var source_simple_resonator = source_component_base.extend({
1242
- ftype: z222.literal("simple_resonator"),
1287
+ ftype: z24.literal("simple_resonator"),
1243
1288
  load_capacitance: capacitance,
1244
1289
  equivalent_series_resistance: resistance.optional(),
1245
1290
  frequency
1246
1291
  });
1247
1292
  expectTypesMatch(true);
1248
1293
  var source_simple_transistor = source_component_base.extend({
1249
- ftype: z23.literal("simple_transistor"),
1250
- transistor_type: z23.enum(["npn", "pnp"])
1294
+ ftype: z25.literal("simple_transistor"),
1295
+ transistor_type: z25.enum(["npn", "pnp"])
1251
1296
  });
1252
1297
  expectTypesMatch(true);
1253
1298
  var source_simple_mosfet = source_component_base.extend({
1254
- ftype: z24.literal("simple_mosfet"),
1255
- channel_type: z24.enum(["n", "p"]),
1256
- mosfet_mode: z24.enum(["enhancement", "depletion"])
1299
+ ftype: z26.literal("simple_mosfet"),
1300
+ channel_type: z26.enum(["n", "p"]),
1301
+ mosfet_mode: z26.enum(["enhancement", "depletion"])
1257
1302
  });
1258
1303
  expectTypesMatch(true);
1259
1304
  var source_simple_switch = source_component_base.extend({
1260
- ftype: z25.literal("simple_switch")
1305
+ ftype: z27.literal("simple_switch")
1261
1306
  });
1262
1307
  expectTypesMatch(true);
1263
- var source_project_metadata = z26.object({
1264
- type: z26.literal("source_project_metadata"),
1265
- name: z26.string().optional(),
1266
- software_used_string: z26.string().optional(),
1267
- created_at: z26.string().datetime().optional()
1308
+ var source_project_metadata = z28.object({
1309
+ type: z28.literal("source_project_metadata"),
1310
+ name: z28.string().optional(),
1311
+ software_used_string: z28.string().optional(),
1312
+ created_at: z28.string().datetime().optional()
1268
1313
  });
1269
1314
  expectTypesMatch(true);
1270
- var any_source_component = z27.union([
1315
+ var source_missing_property_error = z29.object({
1316
+ type: z29.literal("source_missing_property_error"),
1317
+ source_missing_property_error_id: getZodPrefixedIdWithDefault(
1318
+ "source_missing_property_error"
1319
+ ),
1320
+ source_component_id: z29.string(),
1321
+ property_name: z29.string(),
1322
+ error_type: z29.literal("source_missing_property_error"),
1323
+ message: z29.string()
1324
+ }).describe("The source code is missing a property");
1325
+ expectTypesMatch(true);
1326
+ var source_failed_to_create_component_error = z30.object({
1327
+ type: z30.literal("source_failed_to_create_component_error"),
1328
+ source_failed_to_create_component_error_id: getZodPrefixedIdWithDefault(
1329
+ "source_failed_to_create_component_error"
1330
+ ),
1331
+ component_name: z30.string().optional(),
1332
+ subcircuit_id: z30.string().optional(),
1333
+ parent_source_component_id: z30.string().optional(),
1334
+ message: z30.string(),
1335
+ pcb_center: z30.object({
1336
+ x: z30.number().optional(),
1337
+ y: z30.number().optional()
1338
+ }).optional(),
1339
+ schematic_center: z30.object({
1340
+ x: z30.number().optional(),
1341
+ y: z30.number().optional()
1342
+ }).optional()
1343
+ }).describe("Error emitted when a component fails to be constructed");
1344
+ expectTypesMatch(true);
1345
+ var any_source_component = z31.union([
1271
1346
  source_simple_resistor,
1272
1347
  source_simple_capacitor,
1273
1348
  source_simple_diode,
1349
+ source_simple_led,
1274
1350
  source_simple_ground,
1275
1351
  source_simple_chip,
1276
1352
  source_simple_bug,
@@ -1286,237 +1362,294 @@ var any_source_component = z27.union([
1286
1362
  source_simple_switch,
1287
1363
  source_simple_transistor,
1288
1364
  source_simple_mosfet,
1289
- source_project_metadata
1365
+ source_simple_fuse,
1366
+ source_project_metadata,
1367
+ source_missing_property_error,
1368
+ source_failed_to_create_component_error
1290
1369
  ]);
1291
- var source_port = z28.object({
1292
- type: z28.literal("source_port"),
1293
- pin_number: z28.number().optional(),
1294
- port_hints: z28.array(z28.string()).optional(),
1295
- name: z28.string(),
1296
- source_port_id: z28.string(),
1297
- source_component_id: z28.string(),
1298
- subcircuit_id: z28.string().optional()
1299
- });
1300
- expectTypesMatch(true);
1301
- var source_trace = z29.object({
1302
- type: z29.literal("source_trace"),
1303
- source_trace_id: z29.string(),
1304
- connected_source_port_ids: z29.array(z29.string()),
1305
- connected_source_net_ids: z29.array(z29.string()),
1306
- subcircuit_id: z29.string().optional(),
1307
- subcircuit_connectivity_map_key: z29.string().optional(),
1308
- max_length: z29.number().optional(),
1309
- min_trace_thickness: z29.number().optional(),
1310
- display_name: z29.string().optional()
1311
- });
1312
- expectTypesMatch(true);
1313
- var source_group = z30.object({
1314
- type: z30.literal("source_group"),
1315
- source_group_id: z30.string(),
1316
- subcircuit_id: z30.string().optional(),
1317
- parent_subcircuit_id: z30.string().optional(),
1318
- is_subcircuit: z30.boolean().optional(),
1319
- name: z30.string().optional()
1320
- });
1321
- var source_net = z31.object({
1322
- type: z31.literal("source_net"),
1323
- source_net_id: z31.string(),
1324
- name: z31.string(),
1325
- member_source_group_ids: z31.array(z31.string()),
1326
- is_power: z31.boolean().optional(),
1327
- is_ground: z31.boolean().optional(),
1328
- is_digital_signal: z31.boolean().optional(),
1329
- is_analog_signal: z31.boolean().optional(),
1330
- trace_width: z31.number().optional(),
1331
- subcircuit_id: z31.string().optional()
1332
- });
1333
- var schematic_box = z322.object({
1334
- type: z322.literal("schematic_box"),
1335
- schematic_component_id: z322.string(),
1370
+ var source_port = z322.object({
1371
+ type: z322.literal("source_port"),
1372
+ pin_number: z322.number().optional(),
1373
+ port_hints: z322.array(z322.string()).optional(),
1374
+ name: z322.string(),
1375
+ source_port_id: z322.string(),
1376
+ source_component_id: z322.string(),
1377
+ subcircuit_id: z322.string().optional()
1378
+ });
1379
+ expectTypesMatch(true);
1380
+ var source_trace = z33.object({
1381
+ type: z33.literal("source_trace"),
1382
+ source_trace_id: z33.string(),
1383
+ connected_source_port_ids: z33.array(z33.string()),
1384
+ connected_source_net_ids: z33.array(z33.string()),
1385
+ subcircuit_id: z33.string().optional(),
1386
+ subcircuit_connectivity_map_key: z33.string().optional(),
1387
+ max_length: z33.number().optional(),
1388
+ min_trace_thickness: z33.number().optional(),
1389
+ display_name: z33.string().optional()
1390
+ });
1391
+ expectTypesMatch(true);
1392
+ var source_group = z34.object({
1393
+ type: z34.literal("source_group"),
1394
+ source_group_id: z34.string(),
1395
+ subcircuit_id: z34.string().optional(),
1396
+ parent_subcircuit_id: z34.string().optional(),
1397
+ is_subcircuit: z34.boolean().optional(),
1398
+ name: z34.string().optional()
1399
+ });
1400
+ var source_net = z35.object({
1401
+ type: z35.literal("source_net"),
1402
+ source_net_id: z35.string(),
1403
+ name: z35.string(),
1404
+ member_source_group_ids: z35.array(z35.string()),
1405
+ is_power: z35.boolean().optional(),
1406
+ is_ground: z35.boolean().optional(),
1407
+ is_digital_signal: z35.boolean().optional(),
1408
+ is_analog_signal: z35.boolean().optional(),
1409
+ trace_width: z35.number().optional(),
1410
+ subcircuit_id: z35.string().optional()
1411
+ });
1412
+ var schematic_box = z36.object({
1413
+ type: z36.literal("schematic_box"),
1414
+ schematic_component_id: z36.string(),
1336
1415
  width: distance,
1337
1416
  height: distance,
1417
+ is_dashed: z36.boolean().default(false),
1338
1418
  x: distance,
1339
1419
  y: distance
1340
1420
  }).describe("Draws a box on the schematic");
1341
1421
  expectTypesMatch(true);
1342
- var schematic_path = z33.object({
1343
- type: z33.literal("schematic_path"),
1344
- schematic_component_id: z33.string(),
1345
- fill_color: z33.enum(["red", "blue"]).optional(),
1346
- is_filled: z33.boolean().optional(),
1347
- points: z33.array(point)
1422
+ var schematic_path = z37.object({
1423
+ type: z37.literal("schematic_path"),
1424
+ schematic_component_id: z37.string(),
1425
+ fill_color: z37.enum(["red", "blue"]).optional(),
1426
+ is_filled: z37.boolean().optional(),
1427
+ points: z37.array(point)
1348
1428
  });
1349
1429
  expectTypesMatch(true);
1350
- var schematic_pin_styles = z34.record(
1351
- z34.object({
1430
+ var schematic_pin_styles = z38.record(
1431
+ z38.object({
1352
1432
  left_margin: length.optional(),
1353
1433
  right_margin: length.optional(),
1354
1434
  top_margin: length.optional(),
1355
1435
  bottom_margin: length.optional()
1356
1436
  })
1357
1437
  );
1358
- var schematic_component_port_arrangement_by_size = z34.object({
1359
- left_size: z34.number(),
1360
- right_size: z34.number(),
1361
- top_size: z34.number().optional(),
1362
- bottom_size: z34.number().optional()
1438
+ var schematic_component_port_arrangement_by_size = z38.object({
1439
+ left_size: z38.number(),
1440
+ right_size: z38.number(),
1441
+ top_size: z38.number().optional(),
1442
+ bottom_size: z38.number().optional()
1363
1443
  });
1364
1444
  expectTypesMatch(true);
1365
- var schematic_component_port_arrangement_by_sides = z34.object({
1366
- left_side: z34.object({
1367
- pins: z34.array(z34.number()),
1445
+ var schematic_component_port_arrangement_by_sides = z38.object({
1446
+ left_side: z38.object({
1447
+ pins: z38.array(z38.number()),
1368
1448
  // @ts-ignore
1369
- direction: z34.enum(["top-to-bottom", "bottom-to-top"]).optional()
1449
+ direction: z38.enum(["top-to-bottom", "bottom-to-top"]).optional()
1370
1450
  }).optional(),
1371
- right_side: z34.object({
1372
- pins: z34.array(z34.number()),
1451
+ right_side: z38.object({
1452
+ pins: z38.array(z38.number()),
1373
1453
  // @ts-ignore
1374
- direction: z34.enum(["top-to-bottom", "bottom-to-top"]).optional()
1454
+ direction: z38.enum(["top-to-bottom", "bottom-to-top"]).optional()
1375
1455
  }).optional(),
1376
- top_side: z34.object({
1377
- pins: z34.array(z34.number()),
1456
+ top_side: z38.object({
1457
+ pins: z38.array(z38.number()),
1378
1458
  // @ts-ignore
1379
- direction: z34.enum(["left-to-right", "right-to-left"]).optional()
1459
+ direction: z38.enum(["left-to-right", "right-to-left"]).optional()
1380
1460
  }).optional(),
1381
- bottom_side: z34.object({
1382
- pins: z34.array(z34.number()),
1461
+ bottom_side: z38.object({
1462
+ pins: z38.array(z38.number()),
1383
1463
  // @ts-ignore
1384
- direction: z34.enum(["left-to-right", "right-to-left"]).optional()
1464
+ direction: z38.enum(["left-to-right", "right-to-left"]).optional()
1385
1465
  }).optional()
1386
1466
  });
1387
1467
  expectTypesMatch(true);
1388
- var port_arrangement = z34.union([
1468
+ var port_arrangement = z38.union([
1389
1469
  schematic_component_port_arrangement_by_size,
1390
1470
  schematic_component_port_arrangement_by_sides
1391
1471
  ]);
1392
- var schematic_component = z34.object({
1393
- type: z34.literal("schematic_component"),
1472
+ var schematic_component = z38.object({
1473
+ type: z38.literal("schematic_component"),
1394
1474
  size,
1395
1475
  center: point,
1396
- source_component_id: z34.string(),
1397
- schematic_component_id: z34.string(),
1476
+ source_component_id: z38.string(),
1477
+ schematic_component_id: z38.string(),
1398
1478
  pin_spacing: length.optional(),
1399
1479
  pin_styles: schematic_pin_styles.optional(),
1400
1480
  box_width: length.optional(),
1401
- symbol_name: z34.string().optional(),
1481
+ symbol_name: z38.string().optional(),
1402
1482
  port_arrangement: port_arrangement.optional(),
1403
- port_labels: z34.record(z34.string()).optional(),
1404
- symbol_display_value: z34.string().optional()
1483
+ port_labels: z38.record(z38.string()).optional(),
1484
+ symbol_display_value: z38.string().optional(),
1485
+ subcircuit_id: z38.string().optional(),
1486
+ schematic_group_id: z38.string().optional()
1405
1487
  });
1406
1488
  expectTypesMatch(true);
1407
- var schematic_line = z35.object({
1408
- type: z35.literal("schematic_line"),
1409
- schematic_component_id: z35.string(),
1489
+ var schematic_line = z39.object({
1490
+ type: z39.literal("schematic_line"),
1491
+ schematic_component_id: z39.string(),
1410
1492
  x1: distance,
1411
1493
  x2: distance,
1412
1494
  y1: distance,
1413
1495
  y2: distance
1414
1496
  });
1415
1497
  expectTypesMatch(true);
1416
- var schematic_trace = z36.object({
1417
- type: z36.literal("schematic_trace"),
1418
- schematic_trace_id: z36.string(),
1419
- source_trace_id: z36.string(),
1420
- junctions: z36.array(
1421
- z36.object({
1422
- x: z36.number(),
1423
- y: z36.number()
1498
+ var schematic_trace = z40.object({
1499
+ type: z40.literal("schematic_trace"),
1500
+ schematic_trace_id: z40.string(),
1501
+ source_trace_id: z40.string(),
1502
+ junctions: z40.array(
1503
+ z40.object({
1504
+ x: z40.number(),
1505
+ y: z40.number()
1424
1506
  })
1425
1507
  ),
1426
- edges: z36.array(
1427
- z36.object({
1428
- from: z36.object({
1429
- x: z36.number(),
1430
- y: z36.number()
1508
+ edges: z40.array(
1509
+ z40.object({
1510
+ from: z40.object({
1511
+ x: z40.number(),
1512
+ y: z40.number()
1431
1513
  }),
1432
- to: z36.object({
1433
- x: z36.number(),
1434
- y: z36.number()
1514
+ to: z40.object({
1515
+ x: z40.number(),
1516
+ y: z40.number()
1435
1517
  }),
1436
- is_crossing: z36.boolean().optional(),
1437
- from_schematic_port_id: z36.string().optional(),
1438
- to_schematic_port_id: z36.string().optional()
1518
+ is_crossing: z40.boolean().optional(),
1519
+ from_schematic_port_id: z40.string().optional(),
1520
+ to_schematic_port_id: z40.string().optional()
1439
1521
  })
1440
1522
  )
1441
1523
  });
1442
1524
  expectTypesMatch(true);
1443
- var schematic_text = z37.object({
1444
- type: z37.literal("schematic_text"),
1445
- schematic_component_id: z37.string(),
1446
- schematic_text_id: z37.string(),
1447
- text: z37.string(),
1448
- position: z37.object({
1525
+ var ninePointAnchor = z41.enum([
1526
+ "top_left",
1527
+ "top_center",
1528
+ "top_right",
1529
+ "center_left",
1530
+ "center",
1531
+ "center_right",
1532
+ "bottom_left",
1533
+ "bottom_center",
1534
+ "bottom_right"
1535
+ ]);
1536
+ var fivePointAnchor = z422.enum([
1537
+ "center",
1538
+ "left",
1539
+ "right",
1540
+ "top",
1541
+ "bottom"
1542
+ ]);
1543
+ var schematic_text = z43.object({
1544
+ type: z43.literal("schematic_text"),
1545
+ schematic_component_id: z43.string().optional(),
1546
+ schematic_text_id: z43.string(),
1547
+ text: z43.string(),
1548
+ font_size: z43.number().default(0.18),
1549
+ position: z43.object({
1449
1550
  x: distance,
1450
1551
  y: distance
1451
1552
  }),
1452
- rotation: z37.number().default(0),
1453
- anchor: z37.enum(["center", "left", "right", "top", "bottom"]).default("center"),
1454
- color: z37.string().default("#000000")
1553
+ rotation: z43.number().default(0),
1554
+ anchor: z43.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
1555
+ color: z43.string().default("#000000")
1455
1556
  });
1456
1557
  expectTypesMatch(true);
1457
- var schematic_port = z38.object({
1458
- type: z38.literal("schematic_port"),
1459
- schematic_port_id: z38.string(),
1460
- source_port_id: z38.string(),
1461
- schematic_component_id: z38.string().optional(),
1558
+ var schematic_port = z44.object({
1559
+ type: z44.literal("schematic_port"),
1560
+ schematic_port_id: z44.string(),
1561
+ source_port_id: z44.string(),
1562
+ schematic_component_id: z44.string().optional(),
1462
1563
  center: point,
1463
- facing_direction: z38.enum(["up", "down", "left", "right"]).optional(),
1464
- distance_from_component_edge: z38.number().optional(),
1465
- side_of_component: z38.enum(["top", "bottom", "left", "right"]).optional(),
1466
- true_ccw_index: z38.number().optional(),
1467
- pin_number: z38.number().optional(),
1468
- display_pin_label: z38.string().optional()
1564
+ facing_direction: z44.enum(["up", "down", "left", "right"]).optional(),
1565
+ distance_from_component_edge: z44.number().optional(),
1566
+ side_of_component: z44.enum(["top", "bottom", "left", "right"]).optional(),
1567
+ true_ccw_index: z44.number().optional(),
1568
+ pin_number: z44.number().optional(),
1569
+ display_pin_label: z44.string().optional()
1469
1570
  }).describe("Defines a port on a schematic component");
1470
1571
  expectTypesMatch(true);
1471
- var schematic_net_label = z39.object({
1472
- type: z39.literal("schematic_net_label"),
1473
- source_net_id: z39.string(),
1572
+ var schematic_net_label = z45.object({
1573
+ type: z45.literal("schematic_net_label"),
1574
+ schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
1575
+ schematic_trace_id: z45.string().optional(),
1576
+ source_trace_id: z45.string().optional(),
1577
+ source_net_id: z45.string(),
1474
1578
  center: point,
1475
1579
  anchor_position: point.optional(),
1476
- anchor_side: z39.enum(["top", "bottom", "left", "right"]),
1477
- text: z39.string(),
1478
- symbol_name: z39.string().optional()
1580
+ anchor_side: z45.enum(["top", "bottom", "left", "right"]),
1581
+ text: z45.string(),
1582
+ symbol_name: z45.string().optional()
1479
1583
  });
1480
- var schematic_error = z40.object({
1481
- type: z40.literal("schematic_error"),
1482
- schematic_error_id: z40.string(),
1584
+ expectTypesMatch(true);
1585
+ var schematic_error = z46.object({
1586
+ type: z46.literal("schematic_error"),
1587
+ schematic_error_id: z46.string(),
1483
1588
  // eventually each error type should be broken out into a dir of files
1484
- error_type: z40.literal("schematic_port_not_found"),
1485
- message: z40.string()
1589
+ error_type: z46.literal("schematic_port_not_found"),
1590
+ message: z46.string()
1486
1591
  }).describe("Defines a schematic error on the schematic");
1487
1592
  expectTypesMatch(true);
1488
- var schematic_debug_object_base = z41.object({
1489
- type: z41.literal("schematic_debug_object"),
1490
- label: z41.string().optional()
1593
+ var schematic_debug_object_base = z47.object({
1594
+ type: z47.literal("schematic_debug_object"),
1595
+ label: z47.string().optional()
1491
1596
  });
1492
1597
  var schematic_debug_rect = schematic_debug_object_base.extend({
1493
- shape: z41.literal("rect"),
1598
+ shape: z47.literal("rect"),
1494
1599
  center: point,
1495
1600
  size
1496
1601
  });
1497
1602
  var schematic_debug_line = schematic_debug_object_base.extend({
1498
- shape: z41.literal("line"),
1603
+ shape: z47.literal("line"),
1499
1604
  start: point,
1500
1605
  end: point
1501
1606
  });
1502
1607
  var schematic_debug_point = schematic_debug_object_base.extend({
1503
- shape: z41.literal("point"),
1608
+ shape: z47.literal("point"),
1504
1609
  center: point
1505
1610
  });
1506
- var schematic_debug_object = z41.discriminatedUnion("shape", [
1611
+ var schematic_debug_object = z47.discriminatedUnion("shape", [
1507
1612
  schematic_debug_rect,
1508
1613
  schematic_debug_line,
1509
1614
  schematic_debug_point
1510
1615
  ]);
1511
1616
  expectTypesMatch(true);
1512
- var schematic_voltage_probe = z422.object({
1513
- type: z422.literal("schematic_voltage_probe"),
1514
- schematic_voltage_probe_id: z422.string(),
1617
+ var schematic_voltage_probe = z48.object({
1618
+ type: z48.literal("schematic_voltage_probe"),
1619
+ schematic_voltage_probe_id: z48.string(),
1515
1620
  position: point,
1516
- schematic_trace_id: z422.string(),
1621
+ schematic_trace_id: z48.string(),
1517
1622
  voltage: voltage.optional()
1518
1623
  }).describe("Defines a voltage probe measurement point on a schematic trace");
1519
1624
  expectTypesMatch(true);
1625
+ var schematic_manual_edit_conflict_warning = z49.object({
1626
+ type: z49.literal("schematic_manual_edit_conflict_warning"),
1627
+ schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
1628
+ "schematic_manual_edit_conflict_warning"
1629
+ ),
1630
+ message: z49.string(),
1631
+ schematic_component_id: z49.string(),
1632
+ schematic_group_id: z49.string().optional(),
1633
+ subcircuit_id: z49.string().optional(),
1634
+ source_component_id: z49.string()
1635
+ }).describe(
1636
+ "Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
1637
+ );
1638
+ expectTypesMatch(true);
1639
+ var schematic_group = z50.object({
1640
+ type: z50.literal("schematic_group"),
1641
+ schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
1642
+ source_group_id: z50.string(),
1643
+ is_subcircuit: z50.boolean().optional(),
1644
+ subcircuit_id: z50.string().optional(),
1645
+ width: length,
1646
+ height: length,
1647
+ center: point,
1648
+ schematic_component_ids: z50.array(z50.string()),
1649
+ name: z50.string().optional(),
1650
+ description: z50.string().optional()
1651
+ }).describe("Defines a group of components on the schematic");
1652
+ expectTypesMatch(true);
1520
1653
  var all_layers = [
1521
1654
  "top",
1522
1655
  "bottom",
@@ -1527,9 +1660,9 @@ var all_layers = [
1527
1660
  "inner5",
1528
1661
  "inner6"
1529
1662
  ];
1530
- var layer_string = z43.enum(all_layers);
1663
+ var layer_string = z51.enum(all_layers);
1531
1664
  var layer_ref = layer_string.or(
1532
- z43.object({
1665
+ z51.object({
1533
1666
  name: layer_string
1534
1667
  })
1535
1668
  ).transform((layer) => {
@@ -1538,40 +1671,41 @@ var layer_ref = layer_string.or(
1538
1671
  }
1539
1672
  return layer.name;
1540
1673
  });
1541
- var visible_layer = z43.enum(["top", "bottom"]);
1542
- var pcb_route_hint = z44.object({
1674
+ var visible_layer = z51.enum(["top", "bottom"]);
1675
+ var pcb_route_hint = z52.object({
1543
1676
  x: distance,
1544
1677
  y: distance,
1545
- via: z44.boolean().optional(),
1678
+ via: z52.boolean().optional(),
1546
1679
  via_to_layer: layer_ref.optional()
1547
1680
  });
1548
- var pcb_route_hints = z44.array(pcb_route_hint);
1549
- var route_hint_point = z45.object({
1681
+ var pcb_route_hints = z52.array(pcb_route_hint);
1682
+ var route_hint_point = z53.object({
1550
1683
  x: distance,
1551
1684
  y: distance,
1552
- via: z45.boolean().optional(),
1685
+ via: z53.boolean().optional(),
1553
1686
  to_layer: layer_ref.optional(),
1554
1687
  trace_width: distance.optional()
1555
1688
  });
1556
- var pcb_component = z46.object({
1557
- type: z46.literal("pcb_component"),
1689
+ var pcb_component = z54.object({
1690
+ type: z54.literal("pcb_component"),
1558
1691
  pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
1559
- source_component_id: z46.string(),
1692
+ source_component_id: z54.string(),
1560
1693
  center: point,
1561
1694
  layer: layer_ref,
1562
1695
  rotation,
1563
1696
  width: length,
1564
1697
  height: length,
1565
- subcircuit_id: z46.string().optional()
1698
+ subcircuit_id: z54.string().optional(),
1699
+ pcb_group_id: z54.string().optional()
1566
1700
  }).describe("Defines a component on the PCB");
1567
1701
  expectTypesMatch(true);
1568
- var pcb_hole_circle_or_square = z47.object({
1569
- type: z47.literal("pcb_hole"),
1702
+ var pcb_hole_circle_or_square = z55.object({
1703
+ type: z55.literal("pcb_hole"),
1570
1704
  pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
1571
- pcb_group_id: z47.string().optional(),
1572
- subcircuit_id: z47.string().optional(),
1573
- hole_shape: z47.enum(["circle", "square"]),
1574
- hole_diameter: z47.number(),
1705
+ pcb_group_id: z55.string().optional(),
1706
+ subcircuit_id: z55.string().optional(),
1707
+ hole_shape: z55.enum(["circle", "square"]),
1708
+ hole_diameter: z55.number(),
1575
1709
  x: distance,
1576
1710
  y: distance
1577
1711
  });
@@ -1579,14 +1713,14 @@ var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
1579
1713
  "Defines a circular or square hole on the PCB"
1580
1714
  );
1581
1715
  expectTypesMatch(true);
1582
- var pcb_hole_oval = z47.object({
1583
- type: z47.literal("pcb_hole"),
1716
+ var pcb_hole_oval = z55.object({
1717
+ type: z55.literal("pcb_hole"),
1584
1718
  pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
1585
- pcb_group_id: z47.string().optional(),
1586
- subcircuit_id: z47.string().optional(),
1587
- hole_shape: z47.literal("oval"),
1588
- hole_width: z47.number(),
1589
- hole_height: z47.number(),
1719
+ pcb_group_id: z55.string().optional(),
1720
+ subcircuit_id: z55.string().optional(),
1721
+ hole_shape: z55.literal("oval"),
1722
+ hole_width: z55.number(),
1723
+ hole_height: z55.number(),
1590
1724
  x: distance,
1591
1725
  y: distance
1592
1726
  });
@@ -1595,159 +1729,161 @@ var pcb_hole_oval_shape = pcb_hole_oval.describe(
1595
1729
  );
1596
1730
  expectTypesMatch(true);
1597
1731
  var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval);
1598
- var pcb_plated_hole_circle = z48.object({
1599
- type: z48.literal("pcb_plated_hole"),
1600
- shape: z48.literal("circle"),
1601
- pcb_group_id: z48.string().optional(),
1602
- subcircuit_id: z48.string().optional(),
1603
- outer_diameter: z48.number(),
1604
- hole_diameter: z48.number(),
1732
+ var pcb_plated_hole_circle = z56.object({
1733
+ type: z56.literal("pcb_plated_hole"),
1734
+ shape: z56.literal("circle"),
1735
+ pcb_group_id: z56.string().optional(),
1736
+ subcircuit_id: z56.string().optional(),
1737
+ outer_diameter: z56.number(),
1738
+ hole_diameter: z56.number(),
1605
1739
  x: distance,
1606
1740
  y: distance,
1607
- layers: z48.array(layer_ref),
1608
- port_hints: z48.array(z48.string()).optional(),
1609
- pcb_component_id: z48.string().optional(),
1610
- pcb_port_id: z48.string().optional(),
1741
+ layers: z56.array(layer_ref),
1742
+ port_hints: z56.array(z56.string()).optional(),
1743
+ pcb_component_id: z56.string().optional(),
1744
+ pcb_port_id: z56.string().optional(),
1611
1745
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
1612
1746
  });
1613
- var pcb_plated_hole_oval = z48.object({
1614
- type: z48.literal("pcb_plated_hole"),
1615
- shape: z48.enum(["oval", "pill"]),
1616
- pcb_group_id: z48.string().optional(),
1617
- subcircuit_id: z48.string().optional(),
1618
- outer_width: z48.number(),
1619
- outer_height: z48.number(),
1620
- hole_width: z48.number(),
1621
- hole_height: z48.number(),
1747
+ var pcb_plated_hole_oval = z56.object({
1748
+ type: z56.literal("pcb_plated_hole"),
1749
+ shape: z56.enum(["oval", "pill"]),
1750
+ pcb_group_id: z56.string().optional(),
1751
+ subcircuit_id: z56.string().optional(),
1752
+ outer_width: z56.number(),
1753
+ outer_height: z56.number(),
1754
+ hole_width: z56.number(),
1755
+ hole_height: z56.number(),
1622
1756
  x: distance,
1623
1757
  y: distance,
1624
- layers: z48.array(layer_ref),
1625
- port_hints: z48.array(z48.string()).optional(),
1626
- pcb_component_id: z48.string().optional(),
1627
- pcb_port_id: z48.string().optional(),
1758
+ layers: z56.array(layer_ref),
1759
+ port_hints: z56.array(z56.string()).optional(),
1760
+ pcb_component_id: z56.string().optional(),
1761
+ pcb_port_id: z56.string().optional(),
1628
1762
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
1629
1763
  });
1630
- var pcb_circular_hole_with_rect_pad = z48.object({
1631
- type: z48.literal("pcb_plated_hole"),
1632
- shape: z48.literal("circular_hole_with_rect_pad"),
1633
- pcb_group_id: z48.string().optional(),
1634
- subcircuit_id: z48.string().optional(),
1635
- hole_shape: z48.literal("circle"),
1636
- pad_shape: z48.literal("rect"),
1637
- hole_diameter: z48.number(),
1638
- rect_pad_width: z48.number(),
1639
- rect_pad_height: z48.number(),
1764
+ var pcb_circular_hole_with_rect_pad = z56.object({
1765
+ type: z56.literal("pcb_plated_hole"),
1766
+ shape: z56.literal("circular_hole_with_rect_pad"),
1767
+ pcb_group_id: z56.string().optional(),
1768
+ subcircuit_id: z56.string().optional(),
1769
+ hole_shape: z56.literal("circle"),
1770
+ pad_shape: z56.literal("rect"),
1771
+ hole_diameter: z56.number(),
1772
+ rect_pad_width: z56.number(),
1773
+ rect_pad_height: z56.number(),
1640
1774
  x: distance,
1641
1775
  y: distance,
1642
- layers: z48.array(layer_ref),
1643
- port_hints: z48.array(z48.string()).optional(),
1644
- pcb_component_id: z48.string().optional(),
1645
- pcb_port_id: z48.string().optional(),
1776
+ layers: z56.array(layer_ref),
1777
+ port_hints: z56.array(z56.string()).optional(),
1778
+ pcb_component_id: z56.string().optional(),
1779
+ pcb_port_id: z56.string().optional(),
1646
1780
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
1647
1781
  });
1648
- var pcb_pill_hole_with_rect_pad = z48.object({
1649
- type: z48.literal("pcb_plated_hole"),
1650
- shape: z48.literal("pill_hole_with_rect_pad"),
1651
- pcb_group_id: z48.string().optional(),
1652
- subcircuit_id: z48.string().optional(),
1653
- hole_shape: z48.literal("pill"),
1654
- pad_shape: z48.literal("rect"),
1655
- hole_width: z48.number(),
1656
- hole_height: z48.number(),
1657
- rect_pad_width: z48.number(),
1658
- rect_pad_height: z48.number(),
1782
+ var pcb_pill_hole_with_rect_pad = z56.object({
1783
+ type: z56.literal("pcb_plated_hole"),
1784
+ shape: z56.literal("pill_hole_with_rect_pad"),
1785
+ pcb_group_id: z56.string().optional(),
1786
+ subcircuit_id: z56.string().optional(),
1787
+ hole_shape: z56.literal("pill"),
1788
+ pad_shape: z56.literal("rect"),
1789
+ hole_width: z56.number(),
1790
+ hole_height: z56.number(),
1791
+ rect_pad_width: z56.number(),
1792
+ rect_pad_height: z56.number(),
1659
1793
  x: distance,
1660
1794
  y: distance,
1661
- layers: z48.array(layer_ref),
1662
- port_hints: z48.array(z48.string()).optional(),
1663
- pcb_component_id: z48.string().optional(),
1664
- pcb_port_id: z48.string().optional(),
1795
+ layers: z56.array(layer_ref),
1796
+ port_hints: z56.array(z56.string()).optional(),
1797
+ pcb_component_id: z56.string().optional(),
1798
+ pcb_port_id: z56.string().optional(),
1665
1799
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
1666
1800
  });
1667
- var pcb_plated_hole = z48.union([
1801
+ var pcb_plated_hole = z56.union([
1668
1802
  pcb_plated_hole_circle,
1669
1803
  pcb_plated_hole_oval,
1670
- pcb_circular_hole_with_rect_pad
1804
+ pcb_circular_hole_with_rect_pad,
1805
+ pcb_pill_hole_with_rect_pad
1671
1806
  ]);
1672
1807
  expectTypesMatch(
1673
1808
  true
1674
1809
  );
1675
1810
  expectTypesMatch(true);
1676
1811
  expectTypesMatch(true);
1677
- var pcb_port = z49.object({
1678
- type: z49.literal("pcb_port"),
1812
+ expectTypesMatch(true);
1813
+ var pcb_port = z57.object({
1814
+ type: z57.literal("pcb_port"),
1679
1815
  pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
1680
- pcb_group_id: z49.string().optional(),
1681
- subcircuit_id: z49.string().optional(),
1682
- source_port_id: z49.string(),
1683
- pcb_component_id: z49.string(),
1816
+ pcb_group_id: z57.string().optional(),
1817
+ subcircuit_id: z57.string().optional(),
1818
+ source_port_id: z57.string(),
1819
+ pcb_component_id: z57.string(),
1684
1820
  x: distance,
1685
1821
  y: distance,
1686
- layers: z49.array(layer_ref)
1822
+ layers: z57.array(layer_ref)
1687
1823
  }).describe("Defines a port on the PCB");
1688
1824
  expectTypesMatch(true);
1689
- var pcb_smtpad_circle = z50.object({
1690
- type: z50.literal("pcb_smtpad"),
1691
- shape: z50.literal("circle"),
1825
+ var pcb_smtpad_circle = z58.object({
1826
+ type: z58.literal("pcb_smtpad"),
1827
+ shape: z58.literal("circle"),
1692
1828
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
1693
- pcb_group_id: z50.string().optional(),
1694
- subcircuit_id: z50.string().optional(),
1829
+ pcb_group_id: z58.string().optional(),
1830
+ subcircuit_id: z58.string().optional(),
1695
1831
  x: distance,
1696
1832
  y: distance,
1697
- radius: z50.number(),
1833
+ radius: z58.number(),
1698
1834
  layer: layer_ref,
1699
- port_hints: z50.array(z50.string()).optional(),
1700
- pcb_component_id: z50.string().optional(),
1701
- pcb_port_id: z50.string().optional()
1835
+ port_hints: z58.array(z58.string()).optional(),
1836
+ pcb_component_id: z58.string().optional(),
1837
+ pcb_port_id: z58.string().optional()
1702
1838
  });
1703
- var pcb_smtpad_rect = z50.object({
1704
- type: z50.literal("pcb_smtpad"),
1705
- shape: z50.literal("rect"),
1839
+ var pcb_smtpad_rect = z58.object({
1840
+ type: z58.literal("pcb_smtpad"),
1841
+ shape: z58.literal("rect"),
1706
1842
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
1707
- pcb_group_id: z50.string().optional(),
1708
- subcircuit_id: z50.string().optional(),
1843
+ pcb_group_id: z58.string().optional(),
1844
+ subcircuit_id: z58.string().optional(),
1709
1845
  x: distance,
1710
1846
  y: distance,
1711
- width: z50.number(),
1712
- height: z50.number(),
1847
+ width: z58.number(),
1848
+ height: z58.number(),
1713
1849
  layer: layer_ref,
1714
- port_hints: z50.array(z50.string()).optional(),
1715
- pcb_component_id: z50.string().optional(),
1716
- pcb_port_id: z50.string().optional()
1850
+ port_hints: z58.array(z58.string()).optional(),
1851
+ pcb_component_id: z58.string().optional(),
1852
+ pcb_port_id: z58.string().optional()
1717
1853
  });
1718
- var pcb_smtpad_rotated_rect = z50.object({
1719
- type: z50.literal("pcb_smtpad"),
1720
- shape: z50.literal("rotated_rect"),
1854
+ var pcb_smtpad_rotated_rect = z58.object({
1855
+ type: z58.literal("pcb_smtpad"),
1856
+ shape: z58.literal("rotated_rect"),
1721
1857
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
1722
- pcb_group_id: z50.string().optional(),
1723
- subcircuit_id: z50.string().optional(),
1858
+ pcb_group_id: z58.string().optional(),
1859
+ subcircuit_id: z58.string().optional(),
1724
1860
  x: distance,
1725
1861
  y: distance,
1726
- width: z50.number(),
1727
- height: z50.number(),
1862
+ width: z58.number(),
1863
+ height: z58.number(),
1728
1864
  ccw_rotation: rotation,
1729
1865
  layer: layer_ref,
1730
- port_hints: z50.array(z50.string()).optional(),
1731
- pcb_component_id: z50.string().optional(),
1732
- pcb_port_id: z50.string().optional()
1866
+ port_hints: z58.array(z58.string()).optional(),
1867
+ pcb_component_id: z58.string().optional(),
1868
+ pcb_port_id: z58.string().optional()
1733
1869
  });
1734
- var pcb_smtpad_pill = z50.object({
1735
- type: z50.literal("pcb_smtpad"),
1736
- shape: z50.literal("pill"),
1870
+ var pcb_smtpad_pill = z58.object({
1871
+ type: z58.literal("pcb_smtpad"),
1872
+ shape: z58.literal("pill"),
1737
1873
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
1738
- pcb_group_id: z50.string().optional(),
1739
- subcircuit_id: z50.string().optional(),
1874
+ pcb_group_id: z58.string().optional(),
1875
+ subcircuit_id: z58.string().optional(),
1740
1876
  x: distance,
1741
1877
  y: distance,
1742
- width: z50.number(),
1743
- height: z50.number(),
1744
- radius: z50.number(),
1878
+ width: z58.number(),
1879
+ height: z58.number(),
1880
+ radius: z58.number(),
1745
1881
  layer: layer_ref,
1746
- port_hints: z50.array(z50.string()).optional(),
1747
- pcb_component_id: z50.string().optional(),
1748
- pcb_port_id: z50.string().optional()
1882
+ port_hints: z58.array(z58.string()).optional(),
1883
+ pcb_component_id: z58.string().optional(),
1884
+ pcb_port_id: z58.string().optional()
1749
1885
  });
1750
- var pcb_smtpad = z50.union([
1886
+ var pcb_smtpad = z58.union([
1751
1887
  pcb_smtpad_circle,
1752
1888
  pcb_smtpad_rect,
1753
1889
  pcb_smtpad_rotated_rect,
@@ -1757,129 +1893,167 @@ expectTypesMatch(true);
1757
1893
  expectTypesMatch(true);
1758
1894
  expectTypesMatch(true);
1759
1895
  expectTypesMatch(true);
1760
- var pcb_solder_paste_circle = z51.object({
1761
- type: z51.literal("pcb_solder_paste"),
1762
- shape: z51.literal("circle"),
1896
+ var pcb_solder_paste_circle = z59.object({
1897
+ type: z59.literal("pcb_solder_paste"),
1898
+ shape: z59.literal("circle"),
1899
+ pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
1900
+ pcb_group_id: z59.string().optional(),
1901
+ subcircuit_id: z59.string().optional(),
1902
+ x: distance,
1903
+ y: distance,
1904
+ radius: z59.number(),
1905
+ layer: layer_ref,
1906
+ pcb_component_id: z59.string().optional(),
1907
+ pcb_smtpad_id: z59.string().optional()
1908
+ });
1909
+ var pcb_solder_paste_rect = z59.object({
1910
+ type: z59.literal("pcb_solder_paste"),
1911
+ shape: z59.literal("rect"),
1763
1912
  pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
1764
- pcb_group_id: z51.string().optional(),
1765
- subcircuit_id: z51.string().optional(),
1913
+ pcb_group_id: z59.string().optional(),
1914
+ subcircuit_id: z59.string().optional(),
1766
1915
  x: distance,
1767
1916
  y: distance,
1768
- radius: z51.number(),
1917
+ width: z59.number(),
1918
+ height: z59.number(),
1769
1919
  layer: layer_ref,
1770
- pcb_component_id: z51.string().optional(),
1771
- pcb_smtpad_id: z51.string().optional()
1920
+ pcb_component_id: z59.string().optional(),
1921
+ pcb_smtpad_id: z59.string().optional()
1772
1922
  });
1773
- var pcb_solder_paste_rect = z51.object({
1774
- type: z51.literal("pcb_solder_paste"),
1775
- shape: z51.literal("rect"),
1923
+ var pcb_solder_paste_pill = z59.object({
1924
+ type: z59.literal("pcb_solder_paste"),
1925
+ shape: z59.literal("pill"),
1776
1926
  pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
1777
- pcb_group_id: z51.string().optional(),
1778
- subcircuit_id: z51.string().optional(),
1927
+ pcb_group_id: z59.string().optional(),
1928
+ subcircuit_id: z59.string().optional(),
1779
1929
  x: distance,
1780
1930
  y: distance,
1781
- width: z51.number(),
1782
- height: z51.number(),
1931
+ width: z59.number(),
1932
+ height: z59.number(),
1933
+ radius: z59.number(),
1783
1934
  layer: layer_ref,
1784
- pcb_component_id: z51.string().optional(),
1785
- pcb_smtpad_id: z51.string().optional()
1935
+ pcb_component_id: z59.string().optional(),
1936
+ pcb_smtpad_id: z59.string().optional()
1786
1937
  });
1787
- var pcb_solder_paste = z51.union([pcb_solder_paste_circle, pcb_solder_paste_rect]).describe("Defines solderpaste on the PCB");
1938
+ var pcb_solder_paste_rotated_rect = z59.object({
1939
+ type: z59.literal("pcb_solder_paste"),
1940
+ shape: z59.literal("rotated_rect"),
1941
+ pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
1942
+ pcb_group_id: z59.string().optional(),
1943
+ subcircuit_id: z59.string().optional(),
1944
+ x: distance,
1945
+ y: distance,
1946
+ width: z59.number(),
1947
+ height: z59.number(),
1948
+ ccw_rotation: distance,
1949
+ layer: layer_ref,
1950
+ pcb_component_id: z59.string().optional(),
1951
+ pcb_smtpad_id: z59.string().optional()
1952
+ });
1953
+ var pcb_solder_paste_oval = z59.object({
1954
+ type: z59.literal("pcb_solder_paste"),
1955
+ shape: z59.literal("oval"),
1956
+ pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
1957
+ pcb_group_id: z59.string().optional(),
1958
+ subcircuit_id: z59.string().optional(),
1959
+ x: distance,
1960
+ y: distance,
1961
+ width: z59.number(),
1962
+ height: z59.number(),
1963
+ layer: layer_ref,
1964
+ pcb_component_id: z59.string().optional(),
1965
+ pcb_smtpad_id: z59.string().optional()
1966
+ });
1967
+ var pcb_solder_paste = z59.union([
1968
+ pcb_solder_paste_circle,
1969
+ pcb_solder_paste_rect,
1970
+ pcb_solder_paste_pill,
1971
+ pcb_solder_paste_rotated_rect,
1972
+ pcb_solder_paste_oval
1973
+ ]).describe("Defines solderpaste on the PCB");
1974
+ expectTypesMatch(true);
1788
1975
  expectTypesMatch(true);
1789
1976
  expectTypesMatch(true);
1790
- var pcb_text = z52.object({
1791
- type: z52.literal("pcb_text"),
1977
+ expectTypesMatch(
1978
+ true
1979
+ );
1980
+ expectTypesMatch(true);
1981
+ var pcb_text = z60.object({
1982
+ type: z60.literal("pcb_text"),
1792
1983
  pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
1793
- pcb_group_id: z52.string().optional(),
1794
- subcircuit_id: z52.string().optional(),
1795
- text: z52.string(),
1984
+ pcb_group_id: z60.string().optional(),
1985
+ subcircuit_id: z60.string().optional(),
1986
+ text: z60.string(),
1796
1987
  center: point,
1797
1988
  layer: layer_ref,
1798
1989
  width: length,
1799
1990
  height: length,
1800
- lines: z52.number(),
1991
+ lines: z60.number(),
1801
1992
  // @ts-ignore
1802
- align: z52.enum(["bottom-left"])
1993
+ align: z60.enum(["bottom-left"])
1803
1994
  }).describe("Defines text on the PCB");
1804
1995
  expectTypesMatch(true);
1805
- var pcb_trace_route_point_wire = z53.object({
1806
- route_type: z53.literal("wire"),
1996
+ var pcb_trace_route_point_wire = z61.object({
1997
+ route_type: z61.literal("wire"),
1807
1998
  x: distance,
1808
1999
  y: distance,
1809
2000
  width: distance,
1810
- start_pcb_port_id: z53.string().optional(),
1811
- end_pcb_port_id: z53.string().optional(),
2001
+ start_pcb_port_id: z61.string().optional(),
2002
+ end_pcb_port_id: z61.string().optional(),
1812
2003
  layer: layer_ref
1813
2004
  });
1814
- var pcb_trace_route_point_via = z53.object({
1815
- route_type: z53.literal("via"),
2005
+ var pcb_trace_route_point_via = z61.object({
2006
+ route_type: z61.literal("via"),
1816
2007
  x: distance,
1817
2008
  y: distance,
1818
- from_layer: z53.string(),
1819
- to_layer: z53.string()
2009
+ hole_diameter: distance.optional(),
2010
+ outer_diameter: distance.optional(),
2011
+ from_layer: z61.string(),
2012
+ to_layer: z61.string()
1820
2013
  });
1821
- var pcb_trace_route_point = z53.union([
2014
+ var pcb_trace_route_point = z61.union([
1822
2015
  pcb_trace_route_point_wire,
1823
2016
  pcb_trace_route_point_via
1824
2017
  ]);
1825
- var pcb_trace = z53.object({
1826
- type: z53.literal("pcb_trace"),
1827
- source_trace_id: z53.string().optional(),
1828
- pcb_component_id: z53.string().optional(),
2018
+ var pcb_trace = z61.object({
2019
+ type: z61.literal("pcb_trace"),
2020
+ source_trace_id: z61.string().optional(),
2021
+ pcb_component_id: z61.string().optional(),
1829
2022
  pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
1830
- pcb_group_id: z53.string().optional(),
1831
- subcircuit_id: z53.string().optional(),
1832
- route_thickness_mode: z53.enum(["constant", "interpolated"]).default("constant").optional(),
1833
- route_order_index: z53.number().optional(),
1834
- should_round_corners: z53.boolean().optional(),
1835
- trace_length: z53.number().optional(),
1836
- route: z53.array(
1837
- z53.union([
1838
- z53.object({
1839
- route_type: z53.literal("wire"),
1840
- x: distance,
1841
- y: distance,
1842
- width: distance,
1843
- start_pcb_port_id: z53.string().optional(),
1844
- end_pcb_port_id: z53.string().optional(),
1845
- layer: layer_ref
1846
- }),
1847
- z53.object({
1848
- route_type: z53.literal("via"),
1849
- x: distance,
1850
- y: distance,
1851
- from_layer: z53.string(),
1852
- to_layer: z53.string()
1853
- })
1854
- ])
1855
- )
2023
+ pcb_group_id: z61.string().optional(),
2024
+ subcircuit_id: z61.string().optional(),
2025
+ route_thickness_mode: z61.enum(["constant", "interpolated"]).default("constant").optional(),
2026
+ route_order_index: z61.number().optional(),
2027
+ should_round_corners: z61.boolean().optional(),
2028
+ trace_length: z61.number().optional(),
2029
+ route: z61.array(pcb_trace_route_point)
1856
2030
  }).describe("Defines a trace on the PCB");
1857
2031
  expectTypesMatch(true);
1858
2032
  expectTypesMatch(true);
1859
- var pcb_trace_error = z54.object({
1860
- type: z54.literal("pcb_trace_error"),
2033
+ var pcb_trace_error = z62.object({
2034
+ type: z62.literal("pcb_trace_error"),
1861
2035
  pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
1862
- error_type: z54.literal("pcb_trace_error"),
1863
- message: z54.string(),
2036
+ error_type: z62.literal("pcb_trace_error"),
2037
+ message: z62.string(),
1864
2038
  center: point.optional(),
1865
- pcb_trace_id: z54.string(),
1866
- source_trace_id: z54.string(),
1867
- pcb_component_ids: z54.array(z54.string()),
1868
- pcb_port_ids: z54.array(z54.string())
2039
+ pcb_trace_id: z62.string(),
2040
+ source_trace_id: z62.string(),
2041
+ pcb_component_ids: z62.array(z62.string()),
2042
+ pcb_port_ids: z62.array(z62.string())
1869
2043
  }).describe("Defines a trace error on the PCB");
1870
2044
  expectTypesMatch(true);
1871
- var pcb_port_not_matched_error = z55.object({
1872
- type: z55.literal("pcb_port_not_matched_error"),
2045
+ var pcb_port_not_matched_error = z63.object({
2046
+ type: z63.literal("pcb_port_not_matched_error"),
1873
2047
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
1874
- message: z55.string(),
1875
- pcb_component_ids: z55.array(z55.string())
2048
+ message: z63.string(),
2049
+ pcb_component_ids: z63.array(z63.string())
1876
2050
  }).describe("Defines a trace error on the PCB where a port is not matched");
1877
2051
  expectTypesMatch(true);
1878
- var pcb_via = z56.object({
1879
- type: z56.literal("pcb_via"),
2052
+ var pcb_via = z64.object({
2053
+ type: z64.literal("pcb_via"),
1880
2054
  pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
1881
- pcb_group_id: z56.string().optional(),
1882
- subcircuit_id: z56.string().optional(),
2055
+ pcb_group_id: z64.string().optional(),
2056
+ subcircuit_id: z64.string().optional(),
1883
2057
  x: distance,
1884
2058
  y: distance,
1885
2059
  outer_diameter: distance.default("0.6mm"),
@@ -1888,43 +2062,44 @@ var pcb_via = z56.object({
1888
2062
  from_layer: layer_ref.optional(),
1889
2063
  /** @deprecated */
1890
2064
  to_layer: layer_ref.optional(),
1891
- layers: z56.array(layer_ref),
1892
- pcb_trace_id: z56.string().optional()
2065
+ layers: z64.array(layer_ref),
2066
+ pcb_trace_id: z64.string().optional()
1893
2067
  }).describe("Defines a via on the PCB");
1894
2068
  expectTypesMatch(true);
1895
- var pcb_board = z57.object({
1896
- type: z57.literal("pcb_board"),
2069
+ var pcb_board = z65.object({
2070
+ type: z65.literal("pcb_board"),
1897
2071
  pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
1898
- is_subcircuit: z57.boolean().optional(),
1899
- subcircuit_id: z57.string().optional(),
2072
+ is_subcircuit: z65.boolean().optional(),
2073
+ subcircuit_id: z65.string().optional(),
1900
2074
  width: length,
1901
2075
  height: length,
1902
2076
  center: point,
1903
2077
  thickness: length.optional().default(1.4),
1904
- num_layers: z57.number().optional().default(4),
1905
- outline: z57.array(point).optional()
2078
+ num_layers: z65.number().optional().default(4),
2079
+ outline: z65.array(point).optional(),
2080
+ material: z65.enum(["fr4", "fr1"]).default("fr4")
1906
2081
  }).describe("Defines the board outline of the PCB");
1907
2082
  expectTypesMatch(true);
1908
- var pcb_placement_error = z58.object({
1909
- type: z58.literal("pcb_placement_error"),
2083
+ var pcb_placement_error = z66.object({
2084
+ type: z66.literal("pcb_placement_error"),
1910
2085
  pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
1911
- message: z58.string()
2086
+ message: z66.string()
1912
2087
  }).describe("Defines a placement error on the PCB");
1913
2088
  expectTypesMatch(true);
1914
- var pcb_trace_hint = z59.object({
1915
- type: z59.literal("pcb_trace_hint"),
2089
+ var pcb_trace_hint = z67.object({
2090
+ type: z67.literal("pcb_trace_hint"),
1916
2091
  pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
1917
- pcb_port_id: z59.string(),
1918
- pcb_component_id: z59.string(),
1919
- route: z59.array(route_hint_point)
2092
+ pcb_port_id: z67.string(),
2093
+ pcb_component_id: z67.string(),
2094
+ route: z67.array(route_hint_point)
1920
2095
  }).describe("A hint that can be used during generation of a PCB trace");
1921
2096
  expectTypesMatch(true);
1922
- var pcb_silkscreen_line = z60.object({
1923
- type: z60.literal("pcb_silkscreen_line"),
2097
+ var pcb_silkscreen_line = z68.object({
2098
+ type: z68.literal("pcb_silkscreen_line"),
1924
2099
  pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
1925
- pcb_component_id: z60.string(),
1926
- pcb_group_id: z60.string().optional(),
1927
- subcircuit_id: z60.string().optional(),
2100
+ pcb_component_id: z68.string(),
2101
+ pcb_group_id: z68.string().optional(),
2102
+ subcircuit_id: z68.string().optional(),
1928
2103
  stroke_width: distance.default("0.1mm"),
1929
2104
  x1: distance,
1930
2105
  y1: distance,
@@ -1933,39 +2108,39 @@ var pcb_silkscreen_line = z60.object({
1933
2108
  layer: visible_layer
1934
2109
  }).describe("Defines a silkscreen line on the PCB");
1935
2110
  expectTypesMatch(true);
1936
- var pcb_silkscreen_path = z61.object({
1937
- type: z61.literal("pcb_silkscreen_path"),
2111
+ var pcb_silkscreen_path = z69.object({
2112
+ type: z69.literal("pcb_silkscreen_path"),
1938
2113
  pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
1939
- pcb_component_id: z61.string(),
1940
- pcb_group_id: z61.string().optional(),
1941
- subcircuit_id: z61.string().optional(),
2114
+ pcb_component_id: z69.string(),
2115
+ pcb_group_id: z69.string().optional(),
2116
+ subcircuit_id: z69.string().optional(),
1942
2117
  layer: visible_layer,
1943
- route: z61.array(point),
2118
+ route: z69.array(point),
1944
2119
  stroke_width: length
1945
2120
  }).describe("Defines a silkscreen path on the PCB");
1946
2121
  expectTypesMatch(true);
1947
- var pcb_silkscreen_text = z62.object({
1948
- type: z62.literal("pcb_silkscreen_text"),
2122
+ var pcb_silkscreen_text = z70.object({
2123
+ type: z70.literal("pcb_silkscreen_text"),
1949
2124
  pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
1950
- pcb_group_id: z62.string().optional(),
1951
- subcircuit_id: z62.string().optional(),
1952
- font: z62.literal("tscircuit2024").default("tscircuit2024"),
2125
+ pcb_group_id: z70.string().optional(),
2126
+ subcircuit_id: z70.string().optional(),
2127
+ font: z70.literal("tscircuit2024").default("tscircuit2024"),
1953
2128
  font_size: distance.default("0.2mm"),
1954
- pcb_component_id: z62.string(),
1955
- text: z62.string(),
1956
- ccw_rotation: z62.number().optional(),
2129
+ pcb_component_id: z70.string(),
2130
+ text: z70.string(),
2131
+ ccw_rotation: z70.number().optional(),
1957
2132
  layer: layer_ref,
1958
- is_mirrored: z62.boolean().default(false).optional(),
2133
+ is_mirrored: z70.boolean().default(false).optional(),
1959
2134
  anchor_position: point.default({ x: 0, y: 0 }),
1960
- anchor_alignment: z62.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center")
2135
+ anchor_alignment: ninePointAnchor.default("center")
1961
2136
  }).describe("Defines silkscreen text on the PCB");
1962
2137
  expectTypesMatch(true);
1963
- var pcb_silkscreen_rect = z63.object({
1964
- type: z63.literal("pcb_silkscreen_rect"),
2138
+ var pcb_silkscreen_rect = z71.object({
2139
+ type: z71.literal("pcb_silkscreen_rect"),
1965
2140
  pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
1966
- pcb_component_id: z63.string(),
1967
- pcb_group_id: z63.string().optional(),
1968
- subcircuit_id: z63.string().optional(),
2141
+ pcb_component_id: z71.string(),
2142
+ pcb_group_id: z71.string().optional(),
2143
+ subcircuit_id: z71.string().optional(),
1969
2144
  center: point,
1970
2145
  width: length,
1971
2146
  height: length,
@@ -1973,157 +2148,190 @@ var pcb_silkscreen_rect = z63.object({
1973
2148
  stroke_width: length.default("1mm")
1974
2149
  }).describe("Defines a silkscreen rect on the PCB");
1975
2150
  expectTypesMatch(true);
1976
- var pcb_silkscreen_circle = z64.object({
1977
- type: z64.literal("pcb_silkscreen_circle"),
2151
+ var pcb_silkscreen_circle = z72.object({
2152
+ type: z72.literal("pcb_silkscreen_circle"),
1978
2153
  pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
1979
2154
  "pcb_silkscreen_circle"
1980
2155
  ),
1981
- pcb_component_id: z64.string(),
1982
- pcb_group_id: z64.string().optional(),
1983
- subcircuit_id: z64.string().optional(),
2156
+ pcb_component_id: z72.string(),
2157
+ pcb_group_id: z72.string().optional(),
2158
+ subcircuit_id: z72.string().optional(),
1984
2159
  center: point,
1985
2160
  radius: length,
1986
2161
  layer: visible_layer,
1987
2162
  stroke_width: length.default("1mm")
1988
2163
  }).describe("Defines a silkscreen circle on the PCB");
1989
2164
  expectTypesMatch(true);
1990
- var pcb_silkscreen_oval = z65.object({
1991
- type: z65.literal("pcb_silkscreen_oval"),
2165
+ var pcb_silkscreen_oval = z73.object({
2166
+ type: z73.literal("pcb_silkscreen_oval"),
1992
2167
  pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
1993
- pcb_component_id: z65.string(),
1994
- pcb_group_id: z65.string().optional(),
1995
- subcircuit_id: z65.string().optional(),
2168
+ pcb_component_id: z73.string(),
2169
+ pcb_group_id: z73.string().optional(),
2170
+ subcircuit_id: z73.string().optional(),
1996
2171
  center: point,
1997
2172
  radius_x: distance,
1998
2173
  radius_y: distance,
1999
2174
  layer: visible_layer
2000
2175
  }).describe("Defines a silkscreen oval on the PCB");
2001
2176
  expectTypesMatch(true);
2002
- var pcb_fabrication_note_text = z66.object({
2003
- type: z66.literal("pcb_fabrication_note_text"),
2177
+ var pcb_fabrication_note_text = z74.object({
2178
+ type: z74.literal("pcb_fabrication_note_text"),
2004
2179
  pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
2005
2180
  "pcb_fabrication_note_text"
2006
2181
  ),
2007
- subcircuit_id: z66.string().optional(),
2008
- pcb_group_id: z66.string().optional(),
2009
- font: z66.literal("tscircuit2024").default("tscircuit2024"),
2182
+ subcircuit_id: z74.string().optional(),
2183
+ pcb_group_id: z74.string().optional(),
2184
+ font: z74.literal("tscircuit2024").default("tscircuit2024"),
2010
2185
  font_size: distance.default("1mm"),
2011
- pcb_component_id: z66.string(),
2012
- text: z66.string(),
2186
+ pcb_component_id: z74.string(),
2187
+ text: z74.string(),
2013
2188
  layer: visible_layer,
2014
2189
  anchor_position: point.default({ x: 0, y: 0 }),
2015
- anchor_alignment: z66.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
2016
- color: z66.string().optional()
2190
+ anchor_alignment: z74.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
2191
+ color: z74.string().optional()
2017
2192
  }).describe(
2018
2193
  "Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
2019
2194
  );
2020
2195
  expectTypesMatch(true);
2021
- var pcb_fabrication_note_path = z67.object({
2022
- type: z67.literal("pcb_fabrication_note_path"),
2196
+ var pcb_fabrication_note_path = z75.object({
2197
+ type: z75.literal("pcb_fabrication_note_path"),
2023
2198
  pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
2024
2199
  "pcb_fabrication_note_path"
2025
2200
  ),
2026
- pcb_component_id: z67.string(),
2027
- subcircuit_id: z67.string().optional(),
2201
+ pcb_component_id: z75.string(),
2202
+ subcircuit_id: z75.string().optional(),
2028
2203
  layer: layer_ref,
2029
- route: z67.array(point),
2204
+ route: z75.array(point),
2030
2205
  stroke_width: length,
2031
- color: z67.string().optional()
2206
+ color: z75.string().optional()
2032
2207
  }).describe(
2033
2208
  "Defines a fabrication path on the PCB for fabricators or assemblers"
2034
2209
  );
2035
2210
  expectTypesMatch(true);
2036
- var pcb_keepout = z68.object({
2037
- type: z68.literal("pcb_keepout"),
2038
- shape: z68.literal("rect"),
2039
- pcb_group_id: z68.string().optional(),
2040
- subcircuit_id: z68.string().optional(),
2211
+ var pcb_keepout = z76.object({
2212
+ type: z76.literal("pcb_keepout"),
2213
+ shape: z76.literal("rect"),
2214
+ pcb_group_id: z76.string().optional(),
2215
+ subcircuit_id: z76.string().optional(),
2041
2216
  center: point,
2042
2217
  width: distance,
2043
2218
  height: distance,
2044
- pcb_keepout_id: z68.string(),
2045
- layers: z68.array(z68.string()),
2219
+ pcb_keepout_id: z76.string(),
2220
+ layers: z76.array(z76.string()),
2046
2221
  // Specify layers where the keepout applies
2047
- description: z68.string().optional()
2222
+ description: z76.string().optional()
2048
2223
  // Optional description of the keepout
2049
2224
  }).or(
2050
- z68.object({
2051
- type: z68.literal("pcb_keepout"),
2052
- shape: z68.literal("circle"),
2053
- pcb_group_id: z68.string().optional(),
2054
- subcircuit_id: z68.string().optional(),
2225
+ z76.object({
2226
+ type: z76.literal("pcb_keepout"),
2227
+ shape: z76.literal("circle"),
2228
+ pcb_group_id: z76.string().optional(),
2229
+ subcircuit_id: z76.string().optional(),
2055
2230
  center: point,
2056
2231
  radius: distance,
2057
- pcb_keepout_id: z68.string(),
2058
- layers: z68.array(z68.string()),
2232
+ pcb_keepout_id: z76.string(),
2233
+ layers: z76.array(z76.string()),
2059
2234
  // Specify layers where the keepout applies
2060
- description: z68.string().optional()
2235
+ description: z76.string().optional()
2061
2236
  // Optional description of the keepout
2062
2237
  })
2063
2238
  );
2064
- var pcb_missing_footprint_error = z69.object({
2065
- type: z69.literal("pcb_missing_footprint_error"),
2239
+ var pcb_cutout_base = z77.object({
2240
+ type: z77.literal("pcb_cutout"),
2241
+ pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
2242
+ pcb_group_id: z77.string().optional(),
2243
+ subcircuit_id: z77.string().optional()
2244
+ });
2245
+ var pcb_cutout_rect = pcb_cutout_base.extend({
2246
+ shape: z77.literal("rect"),
2247
+ center: point,
2248
+ width: length,
2249
+ height: length,
2250
+ rotation: rotation.optional()
2251
+ });
2252
+ expectTypesMatch(true);
2253
+ var pcb_cutout_circle = pcb_cutout_base.extend({
2254
+ shape: z77.literal("circle"),
2255
+ center: point,
2256
+ radius: length
2257
+ });
2258
+ expectTypesMatch(true);
2259
+ var pcb_cutout_polygon = pcb_cutout_base.extend({
2260
+ shape: z77.literal("polygon"),
2261
+ points: z77.array(point)
2262
+ });
2263
+ expectTypesMatch(true);
2264
+ var pcb_cutout = z77.discriminatedUnion("shape", [
2265
+ pcb_cutout_rect,
2266
+ pcb_cutout_circle,
2267
+ pcb_cutout_polygon
2268
+ ]).describe("Defines a cutout on the PCB, removing board material.");
2269
+ expectTypesMatch(true);
2270
+ var pcb_missing_footprint_error = z78.object({
2271
+ type: z78.literal("pcb_missing_footprint_error"),
2066
2272
  pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
2067
2273
  "pcb_missing_footprint_error"
2068
2274
  ),
2069
- pcb_group_id: z69.string().optional(),
2070
- subcircuit_id: z69.string().optional(),
2071
- error_type: z69.literal("pcb_missing_footprint_error"),
2072
- source_component_id: z69.string(),
2073
- message: z69.string()
2275
+ pcb_group_id: z78.string().optional(),
2276
+ subcircuit_id: z78.string().optional(),
2277
+ error_type: z78.literal("pcb_missing_footprint_error"),
2278
+ source_component_id: z78.string(),
2279
+ message: z78.string()
2074
2280
  }).describe("Defines a missing footprint error on the PCB");
2075
2281
  expectTypesMatch(
2076
2282
  true
2077
2283
  );
2078
- var pcb_manual_edit_conflict_error = z70.object({
2079
- type: z70.literal("pcb_manual_edit_conflict_error"),
2080
- pcb_error_id: getZodPrefixedIdWithDefault("pcb_manual_edit_conflict_error"),
2081
- message: z70.string(),
2082
- pcb_component_id: z70.string(),
2083
- pcb_group_id: z70.string().optional(),
2084
- subcircuit_id: z70.string().optional(),
2085
- source_component_id: z70.string()
2086
- }).describe(
2087
- "Error emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
2088
- );
2089
- expectTypesMatch(true);
2090
- var pcb_group = z71.object({
2091
- type: z71.literal("pcb_group"),
2284
+ var pcb_group = z79.object({
2285
+ type: z79.literal("pcb_group"),
2092
2286
  pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
2093
- source_group_id: z71.string(),
2094
- is_subcircuit: z71.boolean().optional(),
2095
- subcircuit_id: z71.string().optional(),
2287
+ source_group_id: z79.string(),
2288
+ is_subcircuit: z79.boolean().optional(),
2289
+ subcircuit_id: z79.string().optional(),
2096
2290
  width: length,
2097
2291
  height: length,
2098
2292
  center: point,
2099
- pcb_component_ids: z71.array(z71.string()),
2100
- name: z71.string().optional(),
2101
- description: z71.string().optional()
2293
+ pcb_component_ids: z79.array(z79.string()),
2294
+ name: z79.string().optional(),
2295
+ description: z79.string().optional()
2102
2296
  }).describe("Defines a group of components on the PCB");
2103
2297
  expectTypesMatch(true);
2104
- var pcb_autorouting_error = z72.object({
2105
- type: z72.literal("pcb_autorouting_error"),
2298
+ var pcb_autorouting_error = z80.object({
2299
+ type: z80.literal("pcb_autorouting_error"),
2106
2300
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
2107
- message: z72.string()
2301
+ message: z80.string()
2108
2302
  }).describe("The autorouting has failed to route a portion of the board");
2109
2303
  expectTypesMatch(true);
2110
- var cad_component = z73.object({
2111
- type: z73.literal("cad_component"),
2112
- cad_component_id: z73.string(),
2113
- pcb_component_id: z73.string(),
2114
- source_component_id: z73.string(),
2304
+ var pcb_manual_edit_conflict_warning = z81.object({
2305
+ type: z81.literal("pcb_manual_edit_conflict_warning"),
2306
+ pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
2307
+ "pcb_manual_edit_conflict_warning"
2308
+ ),
2309
+ message: z81.string(),
2310
+ pcb_component_id: z81.string(),
2311
+ pcb_group_id: z81.string().optional(),
2312
+ subcircuit_id: z81.string().optional(),
2313
+ source_component_id: z81.string()
2314
+ }).describe(
2315
+ "Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
2316
+ );
2317
+ expectTypesMatch(true);
2318
+ var cad_component = z82.object({
2319
+ type: z82.literal("cad_component"),
2320
+ cad_component_id: z82.string(),
2321
+ pcb_component_id: z82.string(),
2322
+ source_component_id: z82.string(),
2115
2323
  position: point3,
2116
2324
  rotation: point3.optional(),
2117
2325
  size: point3.optional(),
2118
2326
  layer: layer_ref.optional(),
2119
2327
  // These are all ways to generate/load the 3d model
2120
- footprinter_string: z73.string().optional(),
2121
- model_obj_url: z73.string().optional(),
2122
- model_stl_url: z73.string().optional(),
2123
- model_3mf_url: z73.string().optional(),
2124
- model_jscad: z73.any().optional()
2328
+ footprinter_string: z82.string().optional(),
2329
+ model_obj_url: z82.string().optional(),
2330
+ model_stl_url: z82.string().optional(),
2331
+ model_3mf_url: z82.string().optional(),
2332
+ model_jscad: z82.any().optional()
2125
2333
  }).describe("Defines a component on the PCB");
2126
- var any_circuit_element = z74.union([
2334
+ var any_circuit_element = z83.union([
2127
2335
  source_trace,
2128
2336
  source_port,
2129
2337
  any_source_component,
@@ -2134,6 +2342,7 @@ var any_circuit_element = z74.union([
2134
2342
  source_simple_chip,
2135
2343
  source_simple_capacitor,
2136
2344
  source_simple_diode,
2345
+ source_simple_led,
2137
2346
  source_simple_resistor,
2138
2347
  source_simple_power_source,
2139
2348
  source_simple_battery,
@@ -2149,7 +2358,7 @@ var any_circuit_element = z74.union([
2149
2358
  pcb_component,
2150
2359
  pcb_hole,
2151
2360
  pcb_missing_footprint_error,
2152
- pcb_manual_edit_conflict_error,
2361
+ pcb_manual_edit_conflict_warning,
2153
2362
  pcb_plated_hole,
2154
2363
  pcb_keepout,
2155
2364
  pcb_port,
@@ -2173,6 +2382,7 @@ var any_circuit_element = z74.union([
2173
2382
  pcb_fabrication_note_path,
2174
2383
  pcb_fabrication_note_text,
2175
2384
  pcb_autorouting_error,
2385
+ pcb_cutout,
2176
2386
  schematic_box,
2177
2387
  schematic_text,
2178
2388
  schematic_line,
@@ -2184,9 +2394,13 @@ var any_circuit_element = z74.union([
2184
2394
  schematic_net_label,
2185
2395
  schematic_debug_object,
2186
2396
  schematic_voltage_probe,
2397
+ schematic_manual_edit_conflict_warning,
2398
+ schematic_group,
2187
2399
  cad_component
2188
2400
  ]);
2189
2401
  var any_soup_element = any_circuit_element;
2402
+ expectTypesMatch(true);
2403
+ expectStringUnionsMatch(true);
2190
2404
 
2191
2405
  // node_modules/@tscircuit/soup-util/dist/index.js
2192
2406
  import { applyToPoint, decomposeTSR } from "transformation-matrix";
@@ -2725,82 +2939,7 @@ var computeCenterOffset = (easyeda) => {
2725
2939
 
2726
2940
  // lib/convert-easyeda-json-to-tscircuit-soup-json.ts
2727
2941
  import { mm as mm3 } from "@tscircuit/mm";
2728
-
2729
- // lib/websafe/normalize-pin-labels.ts
2730
- var normalizePinLabels = (inputPinLabels) => {
2731
- const unqInputPinLabels = inputPinLabels.map((labels) => [...new Set(labels)]);
2732
- const result = unqInputPinLabels.map(() => []);
2733
- const desiredNumbers = unqInputPinLabels.map(() => null);
2734
- for (let i = 0; i < unqInputPinLabels.length; i++) {
2735
- for (const label of unqInputPinLabels[i]) {
2736
- if (/^\d+$/.test(label)) {
2737
- desiredNumbers[i] = Number.parseInt(label);
2738
- break;
2739
- }
2740
- }
2741
- }
2742
- let highestPinNumber = 0;
2743
- const alreadyAcceptedDesiredNumbers = /* @__PURE__ */ new Set();
2744
- for (let i = 0; i < desiredNumbers.length; i++) {
2745
- const desiredNumber = desiredNumbers[i];
2746
- if (desiredNumber === null || desiredNumber < 1) {
2747
- continue;
2748
- }
2749
- if (!alreadyAcceptedDesiredNumbers.has(desiredNumber)) {
2750
- alreadyAcceptedDesiredNumbers.add(desiredNumber);
2751
- result[i].push(`pin${desiredNumber}`);
2752
- highestPinNumber = Math.max(highestPinNumber, desiredNumber);
2753
- continue;
2754
- }
2755
- let existingAltsForPin = 0;
2756
- for (const label of result[i]) {
2757
- if (label.startsWith(`pin${desiredNumber}_alt`)) {
2758
- existingAltsForPin++;
2759
- }
2760
- }
2761
- result[i].push(`pin${desiredNumber}_alt${existingAltsForPin + 1}`);
2762
- }
2763
- for (let i = 0; i < result.length; i++) {
2764
- const firstLabel = result[i][0];
2765
- if (firstLabel?.includes("_alt")) {
2766
- highestPinNumber++;
2767
- result[i].unshift(`pin${highestPinNumber}`);
2768
- }
2769
- }
2770
- for (let i = 0; i < result.length; i++) {
2771
- if (result[i].length === 0) {
2772
- highestPinNumber++;
2773
- result[i].push(`pin${highestPinNumber}`);
2774
- }
2775
- }
2776
- const totalLabelCounts = {};
2777
- for (const inputLabels of unqInputPinLabels) {
2778
- for (const label of inputLabels) {
2779
- if (/^\d+$/.test(label)) {
2780
- continue;
2781
- }
2782
- totalLabelCounts[label] = (totalLabelCounts[label] ?? 0) + 1;
2783
- }
2784
- }
2785
- const incrementalLabelCounts = {};
2786
- for (let i = 0; i < unqInputPinLabels.length; i++) {
2787
- const inputLabels = unqInputPinLabels[i];
2788
- for (const label of inputLabels) {
2789
- if (/^\d+$/.test(label)) {
2790
- continue;
2791
- }
2792
- if (totalLabelCounts[label] === 1) {
2793
- result[i].push(label);
2794
- } else {
2795
- incrementalLabelCounts[label] = (incrementalLabelCounts[label] ?? 0) + 1;
2796
- result[i].push(`${label}${incrementalLabelCounts[label]}`);
2797
- }
2798
- }
2799
- }
2800
- return result;
2801
- };
2802
-
2803
- // lib/convert-easyeda-json-to-tscircuit-soup-json.ts
2942
+ import { normalizePinLabels } from "@tscircuit/core";
2804
2943
  var mil2mm = (mil) => {
2805
2944
  if (typeof mil === "number") return mm3(`${mil}mil`);
2806
2945
  if (mil.match(/^\d+$/)) return mm3(`${mil}mil`);