circuit-json 0.0.206 → 0.0.208

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
@@ -230,11 +230,35 @@ var battery_capacity = z.number().or(z.string().endsWith("mAh")).transform((v) =
230
230
 
231
231
  // src/common/point.ts
232
232
  import { z as z2 } from "zod";
233
+
234
+ // src/utils/expect-types-match.ts
235
+ var expectTypesMatch = (shouldBe) => {
236
+ };
237
+ expectTypesMatch("extra props b");
238
+ expectTypesMatch("missing props b");
239
+ expectTypesMatch(true);
240
+ expectTypesMatch("mismatched prop types: a");
241
+ var expectStringUnionsMatch = (shouldBe) => {
242
+ };
243
+ expectStringUnionsMatch(true);
244
+ expectStringUnionsMatch(
245
+ 'T1 has extra: "c", T2 has extra: "d"'
246
+ );
247
+ expectStringUnionsMatch('T1 has extra: "c"');
248
+ expectStringUnionsMatch('T2 has extra: "c"');
249
+ expectStringUnionsMatch(
250
+ 'T1 has extra: "d", T2 has extra: "c"'
251
+ );
252
+ expectStringUnionsMatch(true);
253
+
254
+ // src/common/point.ts
233
255
  var point = z2.object({
234
256
  x: distance,
235
257
  y: distance
236
258
  });
237
259
  var position = point;
260
+ expectTypesMatch(true);
261
+ expectTypesMatch(true);
238
262
 
239
263
  // src/common/point3.ts
240
264
  import { z as z3 } from "zod";
@@ -244,6 +268,7 @@ var point3 = z3.object({
244
268
  z: distance
245
269
  });
246
270
  var position3 = point3;
271
+ expectTypesMatch(true);
247
272
 
248
273
  // src/common/size.ts
249
274
  import { z as z4 } from "zod";
@@ -251,6 +276,7 @@ var size = z4.object({
251
276
  width: z4.number(),
252
277
  height: z4.number()
253
278
  });
279
+ expectTypesMatch(true);
254
280
 
255
281
  // src/common/getZodPrefixedIdWithDefault.ts
256
282
  import { z as z5 } from "zod";
@@ -272,6 +298,7 @@ var ninePointAnchor = z6.enum([
272
298
  "bottom_center",
273
299
  "bottom_right"
274
300
  ]);
301
+ expectTypesMatch(true);
275
302
 
276
303
  // src/source/source_simple_capacitor.ts
277
304
  import { z as z9 } from "zod";
@@ -286,26 +313,7 @@ var supplier_name = z7.enum([
286
313
  "mouser",
287
314
  "lcsc"
288
315
  ]);
289
-
290
- // src/utils/expect-types-match.ts
291
- var expectTypesMatch = (shouldBe) => {
292
- };
293
- expectTypesMatch("extra props b");
294
- expectTypesMatch("missing props b");
295
316
  expectTypesMatch(true);
296
- expectTypesMatch("mismatched prop types: a");
297
- var expectStringUnionsMatch = (shouldBe) => {
298
- };
299
- expectStringUnionsMatch(true);
300
- expectStringUnionsMatch(
301
- 'T1 has extra: "c", T2 has extra: "d"'
302
- );
303
- expectStringUnionsMatch('T1 has extra: "c"');
304
- expectStringUnionsMatch('T2 has extra: "c"');
305
- expectStringUnionsMatch(
306
- 'T1 has extra: "d", T2 has extra: "c"'
307
- );
308
- expectStringUnionsMatch(true);
309
317
 
310
318
  // src/source/base/source_component_base.ts
311
319
  import { z as z8 } from "zod";
@@ -365,66 +373,60 @@ var source_simple_ground = source_component_base.extend({
365
373
  });
366
374
  expectTypesMatch(true);
367
375
 
368
- // src/source/source_simple_bug.ts
369
- import { z as z14 } from "zod";
370
- var source_simple_bug = source_component_base.extend({
371
- ftype: z14.literal("simple_bug")
372
- }).describe("@deprecated");
373
-
374
376
  // src/source/source_simple_chip.ts
375
- import { z as z15 } from "zod";
377
+ import { z as z14 } from "zod";
376
378
  var source_simple_chip = source_component_base.extend({
377
- ftype: z15.literal("simple_chip")
379
+ ftype: z14.literal("simple_chip")
378
380
  });
379
381
  expectTypesMatch(true);
380
382
 
381
383
  // src/source/source_simple_power_source.ts
382
- import { z as z16 } from "zod";
384
+ import { z as z15 } from "zod";
383
385
  var source_simple_power_source = source_component_base.extend({
384
- ftype: z16.literal("simple_power_source"),
386
+ ftype: z15.literal("simple_power_source"),
385
387
  voltage
386
388
  });
387
389
  expectTypesMatch(true);
388
390
 
389
391
  // src/source/any_source_component.ts
390
- import { z as z32 } from "zod";
392
+ import { z as z31 } from "zod";
391
393
 
392
394
  // src/source/source_simple_fuse.ts
393
- import { z as z17 } from "zod";
395
+ import { z as z16 } from "zod";
394
396
  var source_simple_fuse = source_component_base.extend({
395
- ftype: z17.literal("simple_fuse"),
396
- current_rating_amps: z17.number().describe("Nominal current in amps the fuse is rated for"),
397
- voltage_rating_volts: z17.number().describe("Voltage rating in volts, e.g. \xB15V would be 5")
397
+ ftype: z16.literal("simple_fuse"),
398
+ current_rating_amps: z16.number().describe("Nominal current in amps the fuse is rated for"),
399
+ voltage_rating_volts: z16.number().describe("Voltage rating in volts, e.g. \xB15V would be 5")
398
400
  });
399
401
  expectTypesMatch(true);
400
402
 
401
403
  // src/source/source_simple_battery.ts
402
- import { z as z18 } from "zod";
404
+ import { z as z17 } from "zod";
403
405
  var source_simple_battery = source_component_base.extend({
404
- ftype: z18.literal("simple_battery"),
406
+ ftype: z17.literal("simple_battery"),
405
407
  capacity: battery_capacity
406
408
  });
407
409
  expectTypesMatch(true);
408
410
 
409
411
  // src/source/source_simple_inductor.ts
410
- import { z as z19 } from "zod";
412
+ import { z as z18 } from "zod";
411
413
  var source_simple_inductor = source_component_base.extend({
412
- ftype: z19.literal("simple_inductor"),
414
+ ftype: z18.literal("simple_inductor"),
413
415
  inductance
414
416
  });
415
417
  expectTypesMatch(true);
416
418
 
417
419
  // src/source/source_simple_push_button.ts
418
- import { z as z20 } from "zod";
420
+ import { z as z19 } from "zod";
419
421
  var source_simple_push_button = source_component_base.extend({
420
- ftype: z20.literal("simple_push_button")
422
+ ftype: z19.literal("simple_push_button")
421
423
  });
422
424
  expectTypesMatch(true);
423
425
 
424
426
  // src/source/source_simple_potentiometer.ts
425
- import { z as z21 } from "zod";
427
+ import { z as z20 } from "zod";
426
428
  var source_simple_potentiometer = source_component_base.extend({
427
- ftype: z21.literal("simple_potentiometer"),
429
+ ftype: z20.literal("simple_potentiometer"),
428
430
  max_resistance: resistance
429
431
  });
430
432
  expectTypesMatch(
@@ -432,27 +434,27 @@ expectTypesMatch(
432
434
  );
433
435
 
434
436
  // src/source/source_simple_crystal.ts
435
- import { z as z22 } from "zod";
437
+ import { z as z21 } from "zod";
436
438
  var source_simple_crystal = source_component_base.extend({
437
- ftype: z22.literal("simple_crystal"),
438
- frequency: z22.number().describe("Frequency in Hz"),
439
- load_capacitance: z22.number().optional().describe("Load capacitance in pF")
439
+ ftype: z21.literal("simple_crystal"),
440
+ frequency: z21.number().describe("Frequency in Hz"),
441
+ load_capacitance: z21.number().optional().describe("Load capacitance in pF")
440
442
  });
441
443
  expectTypesMatch(true);
442
444
 
443
445
  // src/source/source_simple_pin_header.ts
444
- import { z as z23 } from "zod";
446
+ import { z as z22 } from "zod";
445
447
  var source_simple_pin_header = source_component_base.extend({
446
- ftype: z23.literal("simple_pin_header"),
447
- pin_count: z23.number(),
448
- gender: z23.enum(["male", "female"]).optional().default("male")
448
+ ftype: z22.literal("simple_pin_header"),
449
+ pin_count: z22.number(),
450
+ gender: z22.enum(["male", "female"]).optional().default("male")
449
451
  });
450
452
  expectTypesMatch(true);
451
453
 
452
454
  // src/source/source_simple_resonator.ts
453
- import { z as z24 } from "zod";
455
+ import { z as z23 } from "zod";
454
456
  var source_simple_resonator = source_component_base.extend({
455
- ftype: z24.literal("simple_resonator"),
457
+ ftype: z23.literal("simple_resonator"),
456
458
  load_capacitance: capacitance,
457
459
  equivalent_series_resistance: resistance.optional(),
458
460
  frequency
@@ -460,99 +462,98 @@ var source_simple_resonator = source_component_base.extend({
460
462
  expectTypesMatch(true);
461
463
 
462
464
  // src/source/source_simple_transistor.ts
463
- import { z as z25 } from "zod";
465
+ import { z as z24 } from "zod";
464
466
  var source_simple_transistor = source_component_base.extend({
465
- ftype: z25.literal("simple_transistor"),
466
- transistor_type: z25.enum(["npn", "pnp"])
467
+ ftype: z24.literal("simple_transistor"),
468
+ transistor_type: z24.enum(["npn", "pnp"])
467
469
  });
468
470
  expectTypesMatch(true);
469
471
 
470
472
  // src/source/source_simple_test_point.ts
471
- import { z as z26 } from "zod";
473
+ import { z as z25 } from "zod";
472
474
  var source_simple_test_point = source_component_base.extend({
473
- ftype: z26.literal("simple_test_point"),
474
- footprint_variant: z26.enum(["pad", "through_hole"]).optional(),
475
- pad_shape: z26.enum(["rect", "circle"]).optional(),
476
- pad_diameter: z26.union([z26.number(), z26.string()]).optional(),
477
- hole_diameter: z26.union([z26.number(), z26.string()]).optional(),
478
- width: z26.union([z26.number(), z26.string()]).optional(),
479
- height: z26.union([z26.number(), z26.string()]).optional()
475
+ ftype: z25.literal("simple_test_point"),
476
+ footprint_variant: z25.enum(["pad", "through_hole"]).optional(),
477
+ pad_shape: z25.enum(["rect", "circle"]).optional(),
478
+ pad_diameter: z25.union([z25.number(), z25.string()]).optional(),
479
+ hole_diameter: z25.union([z25.number(), z25.string()]).optional(),
480
+ width: z25.union([z25.number(), z25.string()]).optional(),
481
+ height: z25.union([z25.number(), z25.string()]).optional()
480
482
  });
481
483
  expectTypesMatch(true);
482
484
 
483
485
  // src/source/source_simple_mosfet.ts
484
- import { z as z27 } from "zod";
486
+ import { z as z26 } from "zod";
485
487
  var source_simple_mosfet = source_component_base.extend({
486
- ftype: z27.literal("simple_mosfet"),
487
- channel_type: z27.enum(["n", "p"]),
488
- mosfet_mode: z27.enum(["enhancement", "depletion"])
488
+ ftype: z26.literal("simple_mosfet"),
489
+ channel_type: z26.enum(["n", "p"]),
490
+ mosfet_mode: z26.enum(["enhancement", "depletion"])
489
491
  });
490
492
  expectTypesMatch(true);
491
493
 
492
494
  // src/source/source_simple_switch.ts
493
- import { z as z28 } from "zod";
495
+ import { z as z27 } from "zod";
494
496
  var source_simple_switch = source_component_base.extend({
495
- ftype: z28.literal("simple_switch")
497
+ ftype: z27.literal("simple_switch")
496
498
  });
497
499
  expectTypesMatch(true);
498
500
 
499
501
  // src/source/source_project_metadata.ts
500
- import { z as z29 } from "zod";
501
- var source_project_metadata = z29.object({
502
- type: z29.literal("source_project_metadata"),
503
- name: z29.string().optional(),
504
- software_used_string: z29.string().optional(),
505
- project_url: z29.string().optional(),
506
- created_at: z29.string().datetime().optional()
502
+ import { z as z28 } from "zod";
503
+ var source_project_metadata = z28.object({
504
+ type: z28.literal("source_project_metadata"),
505
+ name: z28.string().optional(),
506
+ software_used_string: z28.string().optional(),
507
+ project_url: z28.string().optional(),
508
+ created_at: z28.string().datetime().optional()
507
509
  });
508
510
  expectTypesMatch(true);
509
511
 
510
512
  // src/source/source_missing_property_error.ts
511
- import { z as z30 } from "zod";
512
- var source_missing_property_error = z30.object({
513
- type: z30.literal("source_missing_property_error"),
513
+ import { z as z29 } from "zod";
514
+ var source_missing_property_error = z29.object({
515
+ type: z29.literal("source_missing_property_error"),
514
516
  source_missing_property_error_id: getZodPrefixedIdWithDefault(
515
517
  "source_missing_property_error"
516
518
  ),
517
- source_component_id: z30.string(),
518
- property_name: z30.string(),
519
- error_type: z30.literal("source_missing_property_error").default("source_missing_property_error"),
520
- message: z30.string()
519
+ source_component_id: z29.string(),
520
+ property_name: z29.string(),
521
+ error_type: z29.literal("source_missing_property_error").default("source_missing_property_error"),
522
+ message: z29.string()
521
523
  }).describe("The source code is missing a property");
522
524
  expectTypesMatch(true);
523
525
 
524
526
  // src/source/source_failed_to_create_component_error.ts
525
- import { z as z31 } from "zod";
526
- var source_failed_to_create_component_error = z31.object({
527
- type: z31.literal("source_failed_to_create_component_error"),
527
+ import { z as z30 } from "zod";
528
+ var source_failed_to_create_component_error = z30.object({
529
+ type: z30.literal("source_failed_to_create_component_error"),
528
530
  source_failed_to_create_component_error_id: getZodPrefixedIdWithDefault(
529
531
  "source_failed_to_create_component_error"
530
532
  ),
531
- error_type: z31.literal("source_failed_to_create_component_error").default("source_failed_to_create_component_error"),
532
- component_name: z31.string().optional(),
533
- subcircuit_id: z31.string().optional(),
534
- parent_source_component_id: z31.string().optional(),
535
- message: z31.string(),
536
- pcb_center: z31.object({
537
- x: z31.number().optional(),
538
- y: z31.number().optional()
533
+ error_type: z30.literal("source_failed_to_create_component_error").default("source_failed_to_create_component_error"),
534
+ component_name: z30.string().optional(),
535
+ subcircuit_id: z30.string().optional(),
536
+ parent_source_component_id: z30.string().optional(),
537
+ message: z30.string(),
538
+ pcb_center: z30.object({
539
+ x: z30.number().optional(),
540
+ y: z30.number().optional()
539
541
  }).optional(),
540
- schematic_center: z31.object({
541
- x: z31.number().optional(),
542
- y: z31.number().optional()
542
+ schematic_center: z30.object({
543
+ x: z30.number().optional(),
544
+ y: z30.number().optional()
543
545
  }).optional()
544
546
  }).describe("Error emitted when a component fails to be constructed");
545
547
  expectTypesMatch(true);
546
548
 
547
549
  // src/source/any_source_component.ts
548
- var any_source_component = z32.union([
550
+ var any_source_component = z31.union([
549
551
  source_simple_resistor,
550
552
  source_simple_capacitor,
551
553
  source_simple_diode,
552
554
  source_simple_led,
553
555
  source_simple_ground,
554
556
  source_simple_chip,
555
- source_simple_bug,
556
557
  source_simple_power_source,
557
558
  source_simple_battery,
558
559
  source_simple_inductor,
@@ -570,62 +571,76 @@ var any_source_component = z32.union([
570
571
  source_missing_property_error,
571
572
  source_failed_to_create_component_error
572
573
  ]);
574
+ expectTypesMatch(true);
573
575
 
574
576
  // src/source/source_port.ts
577
+ import { z as z32 } from "zod";
578
+ var source_port = z32.object({
579
+ type: z32.literal("source_port"),
580
+ pin_number: z32.number().optional(),
581
+ port_hints: z32.array(z32.string()).optional(),
582
+ name: z32.string(),
583
+ source_port_id: z32.string(),
584
+ source_component_id: z32.string(),
585
+ subcircuit_id: z32.string().optional(),
586
+ subcircuit_connectivity_map_key: z32.string().optional()
587
+ });
588
+ expectTypesMatch(true);
589
+
590
+ // src/source/source_trace.ts
575
591
  import { z as z33 } from "zod";
576
- var source_port = z33.object({
577
- type: z33.literal("source_port"),
578
- pin_number: z33.number().optional(),
579
- port_hints: z33.array(z33.string()).optional(),
580
- name: z33.string(),
581
- source_port_id: z33.string(),
582
- source_component_id: z33.string(),
592
+ var source_trace = z33.object({
593
+ type: z33.literal("source_trace"),
594
+ source_trace_id: z33.string(),
595
+ connected_source_port_ids: z33.array(z33.string()),
596
+ connected_source_net_ids: z33.array(z33.string()),
583
597
  subcircuit_id: z33.string().optional(),
584
- subcircuit_connectivity_map_key: z33.string().optional()
598
+ subcircuit_connectivity_map_key: z33.string().optional(),
599
+ max_length: z33.number().optional(),
600
+ min_trace_thickness: z33.number().optional(),
601
+ display_name: z33.string().optional()
585
602
  });
586
603
  expectTypesMatch(true);
587
604
 
588
- // src/source/source_trace.ts
605
+ // src/source/source_group.ts
589
606
  import { z as z34 } from "zod";
590
- var source_trace = z34.object({
591
- type: z34.literal("source_trace"),
592
- source_trace_id: z34.string(),
593
- connected_source_port_ids: z34.array(z34.string()),
594
- connected_source_net_ids: z34.array(z34.string()),
607
+ var source_group = z34.object({
608
+ type: z34.literal("source_group"),
609
+ source_group_id: z34.string(),
595
610
  subcircuit_id: z34.string().optional(),
596
- subcircuit_connectivity_map_key: z34.string().optional(),
597
- max_length: z34.number().optional(),
598
- min_trace_thickness: z34.number().optional(),
599
- display_name: z34.string().optional()
611
+ parent_subcircuit_id: z34.string().optional(),
612
+ is_subcircuit: z34.boolean().optional(),
613
+ name: z34.string().optional()
600
614
  });
601
615
  expectTypesMatch(true);
602
616
 
603
- // src/source/source_group.ts
617
+ // src/source/source_net.ts
604
618
  import { z as z35 } from "zod";
605
- var source_group = z35.object({
606
- type: z35.literal("source_group"),
607
- source_group_id: z35.string(),
619
+ var source_net = z35.object({
620
+ type: z35.literal("source_net"),
621
+ source_net_id: z35.string(),
622
+ name: z35.string(),
623
+ member_source_group_ids: z35.array(z35.string()),
624
+ is_power: z35.boolean().optional(),
625
+ is_ground: z35.boolean().optional(),
626
+ is_digital_signal: z35.boolean().optional(),
627
+ is_analog_signal: z35.boolean().optional(),
628
+ trace_width: z35.number().optional(),
608
629
  subcircuit_id: z35.string().optional(),
609
- parent_subcircuit_id: z35.string().optional(),
610
- is_subcircuit: z35.boolean().optional(),
611
- name: z35.string().optional()
630
+ subcircuit_connectivity_map_key: z35.string().optional()
612
631
  });
632
+ expectTypesMatch(true);
613
633
 
614
- // src/source/source_net.ts
634
+ // src/source/source_pcb_ground_plane.ts
615
635
  import { z as z36 } from "zod";
616
- var source_net = z36.object({
617
- type: z36.literal("source_net"),
636
+ var source_pcb_ground_plane = z36.object({
637
+ type: z36.literal("source_pcb_ground_plane"),
638
+ source_pcb_ground_plane_id: z36.string(),
639
+ source_group_id: z36.string(),
618
640
  source_net_id: z36.string(),
619
- name: z36.string(),
620
- member_source_group_ids: z36.array(z36.string()),
621
- is_power: z36.boolean().optional(),
622
- is_ground: z36.boolean().optional(),
623
- is_digital_signal: z36.boolean().optional(),
624
- is_analog_signal: z36.boolean().optional(),
625
- trace_width: z36.number().optional(),
626
- subcircuit_id: z36.string().optional(),
627
- subcircuit_connectivity_map_key: z36.string().optional()
628
- });
641
+ subcircuit_id: z36.string().optional()
642
+ }).describe("Defines a ground plane in the source domain");
643
+ expectTypesMatch(true);
629
644
 
630
645
  // src/schematic/schematic_box.ts
631
646
  import { z as z37 } from "zod";
@@ -767,6 +782,7 @@ var fivePointAnchor = z42.enum([
767
782
  "top",
768
783
  "bottom"
769
784
  ]);
785
+ expectTypesMatch(true);
770
786
 
771
787
  // src/schematic/schematic_text.ts
772
788
  var schematic_text = z43.object({
@@ -939,6 +955,7 @@ var layer_ref = layer_string.or(
939
955
  }
940
956
  return layer.name;
941
957
  });
958
+ expectTypesMatch(true);
942
959
  var visible_layer = z52.enum(["top", "bottom"]);
943
960
 
944
961
  // src/pcb/properties/pcb_route_hints.ts
@@ -950,6 +967,8 @@ var pcb_route_hint = z53.object({
950
967
  via_to_layer: layer_ref.optional()
951
968
  });
952
969
  var pcb_route_hints = z53.array(pcb_route_hint);
970
+ expectTypesMatch(true);
971
+ expectTypesMatch(true);
953
972
 
954
973
  // src/pcb/properties/route_hint_point.ts
955
974
  import { z as z54 } from "zod";
@@ -960,6 +979,7 @@ var route_hint_point = z54.object({
960
979
  to_layer: layer_ref.optional(),
961
980
  trace_width: distance.optional()
962
981
  });
982
+ expectTypesMatch(true);
963
983
 
964
984
  // src/pcb/pcb_component.ts
965
985
  import { z as z55 } from "zod";
@@ -1598,6 +1618,7 @@ var pcb_keepout = z77.object({
1598
1618
  // Optional description of the keepout
1599
1619
  })
1600
1620
  );
1621
+ expectTypesMatch(true);
1601
1622
 
1602
1623
  // src/pcb/pcb_cutout.ts
1603
1624
  import { z as z78 } from "zod";
@@ -1712,34 +1733,76 @@ var pcb_breakout_point = z83.object({
1712
1733
  );
1713
1734
  expectTypesMatch(true);
1714
1735
 
1715
- // src/cad/cad_component.ts
1736
+ // src/pcb/pcb_ground_plane.ts
1716
1737
  import { z as z84 } from "zod";
1717
- var cad_component = z84.object({
1718
- type: z84.literal("cad_component"),
1719
- cad_component_id: z84.string(),
1720
- pcb_component_id: z84.string(),
1721
- source_component_id: z84.string(),
1738
+ var pcb_ground_plane = z84.object({
1739
+ type: z84.literal("pcb_ground_plane"),
1740
+ pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
1741
+ source_pcb_ground_plane_id: z84.string(),
1742
+ source_net_id: z84.string(),
1743
+ pcb_group_id: z84.string().optional(),
1744
+ subcircuit_id: z84.string().optional()
1745
+ }).describe("Defines a ground plane on the PCB");
1746
+ expectTypesMatch(true);
1747
+
1748
+ // src/pcb/pcb_ground_plane_region.ts
1749
+ import { z as z85 } from "zod";
1750
+ var pcb_ground_plane_region = z85.object({
1751
+ type: z85.literal("pcb_ground_plane_region"),
1752
+ pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
1753
+ "pcb_ground_plane_region"
1754
+ ),
1755
+ pcb_ground_plane_id: z85.string(),
1756
+ pcb_group_id: z85.string().optional(),
1757
+ subcircuit_id: z85.string().optional(),
1758
+ layer: layer_ref,
1759
+ points: z85.array(point)
1760
+ }).describe("Defines a polygon region of a ground plane");
1761
+ expectTypesMatch(true);
1762
+
1763
+ // src/pcb/pcb_thermal_spoke.ts
1764
+ import { z as z86 } from "zod";
1765
+ var pcb_thermal_spoke = z86.object({
1766
+ type: z86.literal("pcb_thermal_spoke"),
1767
+ pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
1768
+ pcb_ground_plane_id: z86.string(),
1769
+ shape: z86.string(),
1770
+ spoke_count: z86.number(),
1771
+ spoke_thickness: distance,
1772
+ spoke_inner_diameter: distance,
1773
+ spoke_outer_diameter: distance,
1774
+ pcb_plated_hole_id: z86.string().optional()
1775
+ }).describe("Pattern for connecting a ground plane to a plated hole");
1776
+ expectTypesMatch(true);
1777
+
1778
+ // src/cad/cad_component.ts
1779
+ import { z as z87 } from "zod";
1780
+ var cad_component = z87.object({
1781
+ type: z87.literal("cad_component"),
1782
+ cad_component_id: z87.string(),
1783
+ pcb_component_id: z87.string(),
1784
+ source_component_id: z87.string(),
1722
1785
  position: point3,
1723
1786
  rotation: point3.optional(),
1724
1787
  size: point3.optional(),
1725
1788
  layer: layer_ref.optional(),
1726
1789
  // These are all ways to generate/load the 3d model
1727
- footprinter_string: z84.string().optional(),
1728
- model_obj_url: z84.string().optional(),
1729
- model_stl_url: z84.string().optional(),
1730
- model_3mf_url: z84.string().optional(),
1731
- model_jscad: z84.any().optional()
1790
+ footprinter_string: z87.string().optional(),
1791
+ model_obj_url: z87.string().optional(),
1792
+ model_stl_url: z87.string().optional(),
1793
+ model_3mf_url: z87.string().optional(),
1794
+ model_jscad: z87.any().optional()
1732
1795
  }).describe("Defines a component on the PCB");
1796
+ expectTypesMatch(true);
1733
1797
 
1734
1798
  // src/any_circuit_element.ts
1735
- import { z as z85 } from "zod";
1736
- var any_circuit_element = z85.union([
1799
+ import { z as z88 } from "zod";
1800
+ var any_circuit_element = z88.union([
1737
1801
  source_trace,
1738
1802
  source_port,
1739
1803
  any_source_component,
1740
1804
  source_net,
1741
1805
  source_group,
1742
- source_simple_bug,
1743
1806
  source_simple_chip,
1744
1807
  source_simple_capacitor,
1745
1808
  source_simple_diode,
@@ -1756,6 +1819,7 @@ var any_circuit_element = z85.union([
1756
1819
  source_simple_mosfet,
1757
1820
  source_simple_potentiometer,
1758
1821
  source_simple_push_button,
1822
+ source_pcb_ground_plane,
1759
1823
  source_project_metadata,
1760
1824
  pcb_component,
1761
1825
  pcb_hole,
@@ -1786,6 +1850,9 @@ var any_circuit_element = z85.union([
1786
1850
  pcb_autorouting_error,
1787
1851
  pcb_breakout_point,
1788
1852
  pcb_cutout,
1853
+ pcb_ground_plane,
1854
+ pcb_ground_plane_region,
1855
+ pcb_thermal_spoke,
1789
1856
  schematic_box,
1790
1857
  schematic_text,
1791
1858
  schematic_line,
@@ -1832,6 +1899,8 @@ export {
1832
1899
  pcb_cutout_rect,
1833
1900
  pcb_fabrication_note_path,
1834
1901
  pcb_fabrication_note_text,
1902
+ pcb_ground_plane,
1903
+ pcb_ground_plane_region,
1835
1904
  pcb_group,
1836
1905
  pcb_hole,
1837
1906
  pcb_hole_circle_or_square_shape,
@@ -1855,6 +1924,7 @@ export {
1855
1924
  pcb_smtpad_pill,
1856
1925
  pcb_solder_paste,
1857
1926
  pcb_text,
1927
+ pcb_thermal_spoke,
1858
1928
  pcb_trace,
1859
1929
  pcb_trace_error,
1860
1930
  pcb_trace_hint,
@@ -1897,10 +1967,10 @@ export {
1897
1967
  source_group,
1898
1968
  source_missing_property_error,
1899
1969
  source_net,
1970
+ source_pcb_ground_plane,
1900
1971
  source_port,
1901
1972
  source_project_metadata,
1902
1973
  source_simple_battery,
1903
- source_simple_bug,
1904
1974
  source_simple_capacitor,
1905
1975
  source_simple_chip,
1906
1976
  source_simple_crystal,