circuit-json 0.0.127 → 0.0.129

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
@@ -195,7 +195,9 @@ var parseAndConvertSiUnit = (v) => {
195
195
  // src/units/index.ts
196
196
  import { z } from "zod";
197
197
  var resistance = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v).value);
198
- var capacitance = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v).value);
198
+ var capacitance = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v).value).transform((value) => {
199
+ return Number.parseFloat(value.toPrecision(12));
200
+ });
199
201
  var inductance = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v).value);
200
202
  var voltage = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v).value);
201
203
  var length = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v).value);
@@ -352,7 +354,7 @@ var source_simple_power_source = source_component_base.extend({
352
354
  expectTypesMatch(true);
353
355
 
354
356
  // src/source/any_source_component.ts
355
- import { z as z24 } from "zod";
357
+ import { z as z25 } from "zod";
356
358
 
357
359
  // src/source/source_simple_battery.ts
358
360
  import { z as z16 } from "zod";
@@ -419,8 +421,17 @@ var source_simple_transistor = source_component_base.extend({
419
421
  });
420
422
  expectTypesMatch(true);
421
423
 
424
+ // src/source/source_simple_mosfet.ts
425
+ import { z as z24 } from "zod";
426
+ var source_simple_mosfet = source_component_base.extend({
427
+ ftype: z24.literal("simple_mosfet"),
428
+ channel_type: z24.enum(["n", "p"]),
429
+ mosfet_mode: z24.enum(["enhancement", "depletion"])
430
+ });
431
+ expectTypesMatch(true);
432
+
422
433
  // src/source/any_source_component.ts
423
- var any_source_component = z24.union([
434
+ var any_source_component = z25.union([
424
435
  source_simple_resistor,
425
436
  source_simple_capacitor,
426
437
  source_simple_diode,
@@ -436,61 +447,62 @@ var any_source_component = z24.union([
436
447
  source_simple_crystal,
437
448
  source_simple_pin_header,
438
449
  source_simple_resonator,
439
- source_simple_transistor
450
+ source_simple_transistor,
451
+ source_simple_mosfet
440
452
  ]);
441
453
 
442
454
  // src/source/source_port.ts
443
- import { z as z25 } from "zod";
444
- var source_port = z25.object({
445
- type: z25.literal("source_port"),
446
- pin_number: z25.number().optional(),
447
- port_hints: z25.array(z25.string()).optional(),
448
- name: z25.string(),
449
- source_port_id: z25.string(),
450
- source_component_id: z25.string()
455
+ import { z as z26 } from "zod";
456
+ var source_port = z26.object({
457
+ type: z26.literal("source_port"),
458
+ pin_number: z26.number().optional(),
459
+ port_hints: z26.array(z26.string()).optional(),
460
+ name: z26.string(),
461
+ source_port_id: z26.string(),
462
+ source_component_id: z26.string()
451
463
  });
452
464
  expectTypesMatch(true);
453
465
 
454
466
  // src/source/source_trace.ts
455
- import { z as z26 } from "zod";
456
- var source_trace = z26.object({
457
- type: z26.literal("source_trace"),
458
- source_trace_id: z26.string(),
459
- connected_source_port_ids: z26.array(z26.string()),
460
- connected_source_net_ids: z26.array(z26.string()),
461
- subcircuit_connectivity_map_key: z26.string().optional(),
462
- max_length: z26.number().optional(),
463
- display_name: z26.string().optional()
467
+ import { z as z27 } from "zod";
468
+ var source_trace = z27.object({
469
+ type: z27.literal("source_trace"),
470
+ source_trace_id: z27.string(),
471
+ connected_source_port_ids: z27.array(z27.string()),
472
+ connected_source_net_ids: z27.array(z27.string()),
473
+ subcircuit_connectivity_map_key: z27.string().optional(),
474
+ max_length: z27.number().optional(),
475
+ display_name: z27.string().optional()
464
476
  });
465
477
  expectTypesMatch(true);
466
478
 
467
479
  // src/source/source_group.ts
468
- import { z as z27 } from "zod";
469
- var source_group = z27.object({
470
- type: z27.literal("source_group"),
471
- source_group_id: z27.string(),
472
- name: z27.string().optional()
480
+ import { z as z28 } from "zod";
481
+ var source_group = z28.object({
482
+ type: z28.literal("source_group"),
483
+ source_group_id: z28.string(),
484
+ name: z28.string().optional()
473
485
  });
474
486
 
475
487
  // src/source/source_net.ts
476
- import { z as z28 } from "zod";
477
- var source_net = z28.object({
478
- type: z28.literal("source_net"),
479
- source_net_id: z28.string(),
480
- name: z28.string(),
481
- member_source_group_ids: z28.array(z28.string()),
482
- is_power: z28.boolean().optional(),
483
- is_ground: z28.boolean().optional(),
484
- is_digital_signal: z28.boolean().optional(),
485
- is_analog_signal: z28.boolean().optional(),
486
- trace_width: z28.number().optional()
488
+ import { z as z29 } from "zod";
489
+ var source_net = z29.object({
490
+ type: z29.literal("source_net"),
491
+ source_net_id: z29.string(),
492
+ name: z29.string(),
493
+ member_source_group_ids: z29.array(z29.string()),
494
+ is_power: z29.boolean().optional(),
495
+ is_ground: z29.boolean().optional(),
496
+ is_digital_signal: z29.boolean().optional(),
497
+ is_analog_signal: z29.boolean().optional(),
498
+ trace_width: z29.number().optional()
487
499
  });
488
500
 
489
501
  // src/schematic/schematic_box.ts
490
- import { z as z29 } from "zod";
491
- var schematic_box = z29.object({
492
- type: z29.literal("schematic_box"),
493
- schematic_component_id: z29.string(),
502
+ import { z as z30 } from "zod";
503
+ var schematic_box = z30.object({
504
+ type: z30.literal("schematic_box"),
505
+ schematic_component_id: z30.string(),
494
506
  width: distance,
495
507
  height: distance,
496
508
  x: distance,
@@ -499,82 +511,82 @@ var schematic_box = z29.object({
499
511
  expectTypesMatch(true);
500
512
 
501
513
  // src/schematic/schematic_path.ts
502
- import { z as z30 } from "zod";
503
- var schematic_path = z30.object({
504
- type: z30.literal("schematic_path"),
505
- schematic_component_id: z30.string(),
506
- fill_color: z30.enum(["red", "blue"]).optional(),
507
- is_filled: z30.boolean().optional(),
508
- points: z30.array(point)
514
+ import { z as z31 } from "zod";
515
+ var schematic_path = z31.object({
516
+ type: z31.literal("schematic_path"),
517
+ schematic_component_id: z31.string(),
518
+ fill_color: z31.enum(["red", "blue"]).optional(),
519
+ is_filled: z31.boolean().optional(),
520
+ points: z31.array(point)
509
521
  });
510
522
  expectTypesMatch(true);
511
523
 
512
524
  // src/schematic/schematic_component.ts
513
- import { z as z31 } from "zod";
514
- var schematic_pin_styles = z31.record(
515
- z31.object({
525
+ import { z as z32 } from "zod";
526
+ var schematic_pin_styles = z32.record(
527
+ z32.object({
516
528
  left_margin: length.optional(),
517
529
  right_margin: length.optional(),
518
530
  top_margin: length.optional(),
519
531
  bottom_margin: length.optional()
520
532
  })
521
533
  );
522
- var schematic_component_port_arrangement_by_size = z31.object({
523
- left_size: z31.number(),
524
- right_size: z31.number(),
525
- top_size: z31.number().optional(),
526
- bottom_size: z31.number().optional()
534
+ var schematic_component_port_arrangement_by_size = z32.object({
535
+ left_size: z32.number(),
536
+ right_size: z32.number(),
537
+ top_size: z32.number().optional(),
538
+ bottom_size: z32.number().optional()
527
539
  });
528
540
  expectTypesMatch(true);
529
- var schematic_component_port_arrangement_by_sides = z31.object({
530
- left_side: z31.object({
531
- pins: z31.array(z31.number()),
541
+ var schematic_component_port_arrangement_by_sides = z32.object({
542
+ left_side: z32.object({
543
+ pins: z32.array(z32.number()),
532
544
  // @ts-ignore
533
- direction: z31.enum(["top-to-bottom", "bottom-to-top"]).optional()
545
+ direction: z32.enum(["top-to-bottom", "bottom-to-top"]).optional()
534
546
  }).optional(),
535
- right_side: z31.object({
536
- pins: z31.array(z31.number()),
547
+ right_side: z32.object({
548
+ pins: z32.array(z32.number()),
537
549
  // @ts-ignore
538
- direction: z31.enum(["top-to-bottom", "bottom-to-top"]).optional()
550
+ direction: z32.enum(["top-to-bottom", "bottom-to-top"]).optional()
539
551
  }).optional(),
540
- top_side: z31.object({
541
- pins: z31.array(z31.number()),
552
+ top_side: z32.object({
553
+ pins: z32.array(z32.number()),
542
554
  // @ts-ignore
543
- direction: z31.enum(["left-to-right", "right-to-left"]).optional()
555
+ direction: z32.enum(["left-to-right", "right-to-left"]).optional()
544
556
  }).optional(),
545
- bottom_side: z31.object({
546
- pins: z31.array(z31.number()),
557
+ bottom_side: z32.object({
558
+ pins: z32.array(z32.number()),
547
559
  // @ts-ignore
548
- direction: z31.enum(["left-to-right", "right-to-left"]).optional()
560
+ direction: z32.enum(["left-to-right", "right-to-left"]).optional()
549
561
  }).optional()
550
562
  });
551
563
  expectTypesMatch(true);
552
- var port_arrangement = z31.union([
564
+ var port_arrangement = z32.union([
553
565
  schematic_component_port_arrangement_by_size,
554
566
  schematic_component_port_arrangement_by_sides
555
567
  ]);
556
- var schematic_component = z31.object({
557
- type: z31.literal("schematic_component"),
568
+ var schematic_component = z32.object({
569
+ type: z32.literal("schematic_component"),
558
570
  rotation: rotation.default(0),
559
571
  size,
560
572
  center: point,
561
- source_component_id: z31.string(),
562
- schematic_component_id: z31.string(),
573
+ source_component_id: z32.string(),
574
+ schematic_component_id: z32.string(),
563
575
  pin_spacing: length.optional(),
564
576
  pin_styles: schematic_pin_styles.optional(),
565
577
  box_width: length.optional(),
566
- symbol_name: z31.string().optional(),
578
+ symbol_name: z32.string().optional(),
567
579
  port_arrangement: port_arrangement.optional(),
568
- port_labels: z31.record(z31.string()).optional(),
569
- symbol_display_value: z31.string().optional()
580
+ port_labels: z32.record(z32.string()).optional(),
581
+ symbol_display_value: z32.string().optional()
570
582
  });
571
583
  expectTypesMatch(true);
572
584
 
573
585
  // src/schematic/schematic_line.ts
574
- import { z as z32 } from "zod";
575
- var schematic_line = z32.object({
576
- type: z32.literal("schematic_line"),
577
- schematic_component_id: z32.string(),
586
+ import { z as z33 } from "zod";
587
+ var schematic_line = z33.object({
588
+ type: z33.literal("schematic_line"),
589
+ schematic_component_id: z33.string(),
578
590
  x1: distance,
579
591
  x2: distance,
580
592
  y1: distance,
@@ -583,113 +595,113 @@ var schematic_line = z32.object({
583
595
  expectTypesMatch(true);
584
596
 
585
597
  // src/schematic/schematic_trace.ts
586
- import { z as z33 } from "zod";
587
- var schematic_trace = z33.object({
588
- type: z33.literal("schematic_trace"),
589
- schematic_trace_id: z33.string(),
590
- source_trace_id: z33.string(),
591
- junctions: z33.array(
592
- z33.object({
593
- x: z33.number(),
594
- y: z33.number()
598
+ import { z as z34 } from "zod";
599
+ var schematic_trace = z34.object({
600
+ type: z34.literal("schematic_trace"),
601
+ schematic_trace_id: z34.string(),
602
+ source_trace_id: z34.string(),
603
+ junctions: z34.array(
604
+ z34.object({
605
+ x: z34.number(),
606
+ y: z34.number()
595
607
  })
596
608
  ),
597
- edges: z33.array(
598
- z33.object({
599
- from: z33.object({
600
- x: z33.number(),
601
- y: z33.number()
609
+ edges: z34.array(
610
+ z34.object({
611
+ from: z34.object({
612
+ x: z34.number(),
613
+ y: z34.number()
602
614
  }),
603
- to: z33.object({
604
- x: z33.number(),
605
- y: z33.number()
615
+ to: z34.object({
616
+ x: z34.number(),
617
+ y: z34.number()
606
618
  }),
607
- is_crossing: z33.boolean().optional(),
608
- from_schematic_port_id: z33.string().optional(),
609
- to_schematic_port_id: z33.string().optional()
619
+ is_crossing: z34.boolean().optional(),
620
+ from_schematic_port_id: z34.string().optional(),
621
+ to_schematic_port_id: z34.string().optional()
610
622
  })
611
623
  )
612
624
  });
613
625
  expectTypesMatch(true);
614
626
 
615
627
  // src/schematic/schematic_text.ts
616
- import { z as z34 } from "zod";
617
- var schematic_text = z34.object({
618
- type: z34.literal("schematic_text"),
619
- schematic_component_id: z34.string(),
620
- schematic_text_id: z34.string(),
621
- text: z34.string(),
622
- position: z34.object({
628
+ import { z as z35 } from "zod";
629
+ var schematic_text = z35.object({
630
+ type: z35.literal("schematic_text"),
631
+ schematic_component_id: z35.string(),
632
+ schematic_text_id: z35.string(),
633
+ text: z35.string(),
634
+ position: z35.object({
623
635
  x: distance,
624
636
  y: distance
625
637
  }),
626
- rotation: z34.number().default(0),
627
- anchor: z34.enum(["center", "left", "right", "top", "bottom"]).default("center"),
628
- color: z34.string().default("#000000")
638
+ rotation: z35.number().default(0),
639
+ anchor: z35.enum(["center", "left", "right", "top", "bottom"]).default("center"),
640
+ color: z35.string().default("#000000")
629
641
  });
630
642
  expectTypesMatch(true);
631
643
 
632
644
  // src/schematic/schematic_port.ts
633
- import { z as z35 } from "zod";
634
- var schematic_port = z35.object({
635
- type: z35.literal("schematic_port"),
636
- schematic_port_id: z35.string(),
637
- source_port_id: z35.string(),
638
- schematic_component_id: z35.string().optional(),
645
+ import { z as z36 } from "zod";
646
+ var schematic_port = z36.object({
647
+ type: z36.literal("schematic_port"),
648
+ schematic_port_id: z36.string(),
649
+ source_port_id: z36.string(),
650
+ schematic_component_id: z36.string().optional(),
639
651
  center: point,
640
- facing_direction: z35.enum(["up", "down", "left", "right"]).optional(),
641
- distance_from_component_edge: z35.number().optional(),
642
- side_of_component: z35.enum(["top", "bottom", "left", "right"]).optional(),
643
- true_ccw_index: z35.number().optional(),
644
- pin_number: z35.number().optional(),
645
- display_pin_label: z35.string().optional()
652
+ facing_direction: z36.enum(["up", "down", "left", "right"]).optional(),
653
+ distance_from_component_edge: z36.number().optional(),
654
+ side_of_component: z36.enum(["top", "bottom", "left", "right"]).optional(),
655
+ true_ccw_index: z36.number().optional(),
656
+ pin_number: z36.number().optional(),
657
+ display_pin_label: z36.string().optional()
646
658
  }).describe("Defines a port on a schematic component");
647
659
  expectTypesMatch(true);
648
660
 
649
661
  // src/schematic/schematic_net_label.ts
650
- import { z as z36 } from "zod";
651
- var schematic_net_label = z36.object({
652
- type: z36.literal("schematic_net_label"),
653
- source_net_id: z36.string(),
662
+ import { z as z37 } from "zod";
663
+ var schematic_net_label = z37.object({
664
+ type: z37.literal("schematic_net_label"),
665
+ source_net_id: z37.string(),
654
666
  center: point,
655
667
  anchor_position: point.optional(),
656
- anchor_side: z36.enum(["top", "bottom", "left", "right"]),
657
- text: z36.string(),
658
- symbol_name: z36.string().optional()
668
+ anchor_side: z37.enum(["top", "bottom", "left", "right"]),
669
+ text: z37.string(),
670
+ symbol_name: z37.string().optional()
659
671
  });
660
672
 
661
673
  // src/schematic/schematic_error.ts
662
- import { z as z37 } from "zod";
663
- var schematic_error = z37.object({
664
- type: z37.literal("schematic_error"),
665
- schematic_error_id: z37.string(),
674
+ import { z as z38 } from "zod";
675
+ var schematic_error = z38.object({
676
+ type: z38.literal("schematic_error"),
677
+ schematic_error_id: z38.string(),
666
678
  // eventually each error type should be broken out into a dir of files
667
- error_type: z37.literal("schematic_port_not_found"),
668
- message: z37.string()
679
+ error_type: z38.literal("schematic_port_not_found"),
680
+ message: z38.string()
669
681
  }).describe("Defines a schematic error on the schematic");
670
682
  expectTypesMatch(true);
671
683
 
672
684
  // src/schematic/schematic_debug_object.ts
673
- import { z as z38 } from "zod";
674
- var schematic_debug_object_base = z38.object({
675
- type: z38.literal("schematic_debug_object"),
676
- label: z38.string().optional()
685
+ import { z as z39 } from "zod";
686
+ var schematic_debug_object_base = z39.object({
687
+ type: z39.literal("schematic_debug_object"),
688
+ label: z39.string().optional()
677
689
  });
678
690
  var schematic_debug_rect = schematic_debug_object_base.extend({
679
- shape: z38.literal("rect"),
691
+ shape: z39.literal("rect"),
680
692
  center: point,
681
693
  size
682
694
  });
683
695
  var schematic_debug_line = schematic_debug_object_base.extend({
684
- shape: z38.literal("line"),
696
+ shape: z39.literal("line"),
685
697
  start: point,
686
698
  end: point
687
699
  });
688
700
  var schematic_debug_point = schematic_debug_object_base.extend({
689
- shape: z38.literal("point"),
701
+ shape: z39.literal("point"),
690
702
  center: point
691
703
  });
692
- var schematic_debug_object = z38.discriminatedUnion("shape", [
704
+ var schematic_debug_object = z39.discriminatedUnion("shape", [
693
705
  schematic_debug_rect,
694
706
  schematic_debug_line,
695
707
  schematic_debug_point
@@ -697,18 +709,18 @@ var schematic_debug_object = z38.discriminatedUnion("shape", [
697
709
  expectTypesMatch(true);
698
710
 
699
711
  // src/schematic/schematic_voltage_probe.ts
700
- import { z as z39 } from "zod";
701
- var schematic_voltage_probe = z39.object({
702
- type: z39.literal("schematic_voltage_probe"),
703
- schematic_voltage_probe_id: z39.string(),
712
+ import { z as z40 } from "zod";
713
+ var schematic_voltage_probe = z40.object({
714
+ type: z40.literal("schematic_voltage_probe"),
715
+ schematic_voltage_probe_id: z40.string(),
704
716
  position: point,
705
- schematic_trace_id: z39.string(),
717
+ schematic_trace_id: z40.string(),
706
718
  voltage: voltage.optional()
707
719
  }).describe("Defines a voltage probe measurement point on a schematic trace");
708
720
  expectTypesMatch(true);
709
721
 
710
722
  // src/pcb/properties/layer_ref.ts
711
- import { z as z40 } from "zod";
723
+ import { z as z41 } from "zod";
712
724
  var all_layers = [
713
725
  "top",
714
726
  "bottom",
@@ -719,9 +731,9 @@ var all_layers = [
719
731
  "inner5",
720
732
  "inner6"
721
733
  ];
722
- var layer_string = z40.enum(all_layers);
734
+ var layer_string = z41.enum(all_layers);
723
735
  var layer_ref = layer_string.or(
724
- z40.object({
736
+ z41.object({
725
737
  name: layer_string
726
738
  })
727
739
  ).transform((layer) => {
@@ -730,34 +742,34 @@ var layer_ref = layer_string.or(
730
742
  }
731
743
  return layer.name;
732
744
  });
733
- var visible_layer = z40.enum(["top", "bottom"]);
745
+ var visible_layer = z41.enum(["top", "bottom"]);
734
746
 
735
747
  // src/pcb/properties/pcb_route_hints.ts
736
- import { z as z41 } from "zod";
737
- var pcb_route_hint = z41.object({
748
+ import { z as z42 } from "zod";
749
+ var pcb_route_hint = z42.object({
738
750
  x: distance,
739
751
  y: distance,
740
- via: z41.boolean().optional(),
752
+ via: z42.boolean().optional(),
741
753
  via_to_layer: layer_ref.optional()
742
754
  });
743
- var pcb_route_hints = z41.array(pcb_route_hint);
755
+ var pcb_route_hints = z42.array(pcb_route_hint);
744
756
 
745
757
  // src/pcb/properties/route_hint_point.ts
746
- import { z as z42 } from "zod";
747
- var route_hint_point = z42.object({
758
+ import { z as z43 } from "zod";
759
+ var route_hint_point = z43.object({
748
760
  x: distance,
749
761
  y: distance,
750
- via: z42.boolean().optional(),
762
+ via: z43.boolean().optional(),
751
763
  to_layer: layer_ref.optional(),
752
764
  trace_width: distance.optional()
753
765
  });
754
766
 
755
767
  // src/pcb/pcb_component.ts
756
- import { z as z43 } from "zod";
757
- var pcb_component = z43.object({
758
- type: z43.literal("pcb_component"),
768
+ import { z as z44 } from "zod";
769
+ var pcb_component = z44.object({
770
+ type: z44.literal("pcb_component"),
759
771
  pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
760
- source_component_id: z43.string(),
772
+ source_component_id: z44.string(),
761
773
  center: point,
762
774
  layer: layer_ref,
763
775
  rotation,
@@ -767,12 +779,12 @@ var pcb_component = z43.object({
767
779
  expectTypesMatch(true);
768
780
 
769
781
  // src/pcb/pcb_hole.ts
770
- import { z as z44 } from "zod";
771
- var pcb_hole_circle_or_square = z44.object({
772
- type: z44.literal("pcb_hole"),
782
+ import { z as z45 } from "zod";
783
+ var pcb_hole_circle_or_square = z45.object({
784
+ type: z45.literal("pcb_hole"),
773
785
  pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
774
- hole_shape: z44.enum(["circle", "square"]),
775
- hole_diameter: z44.number(),
786
+ hole_shape: z45.enum(["circle", "square"]),
787
+ hole_diameter: z45.number(),
776
788
  x: distance,
777
789
  y: distance
778
790
  });
@@ -780,12 +792,12 @@ var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
780
792
  "Defines a circular or square hole on the PCB"
781
793
  );
782
794
  expectTypesMatch(true);
783
- var pcb_hole_oval = z44.object({
784
- type: z44.literal("pcb_hole"),
795
+ var pcb_hole_oval = z45.object({
796
+ type: z45.literal("pcb_hole"),
785
797
  pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
786
- hole_shape: z44.literal("oval"),
787
- hole_width: z44.number(),
788
- hole_height: z44.number(),
798
+ hole_shape: z45.literal("oval"),
799
+ hole_width: z45.number(),
800
+ hole_height: z45.number(),
789
801
  x: distance,
790
802
  y: distance
791
803
  });
@@ -796,52 +808,52 @@ expectTypesMatch(true);
796
808
  var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval);
797
809
 
798
810
  // src/pcb/pcb_plated_hole.ts
799
- import { z as z45 } from "zod";
800
- var pcb_plated_hole_circle = z45.object({
801
- type: z45.literal("pcb_plated_hole"),
802
- shape: z45.literal("circle"),
803
- outer_diameter: z45.number(),
804
- hole_diameter: z45.number(),
811
+ import { z as z46 } from "zod";
812
+ var pcb_plated_hole_circle = z46.object({
813
+ type: z46.literal("pcb_plated_hole"),
814
+ shape: z46.literal("circle"),
815
+ outer_diameter: z46.number(),
816
+ hole_diameter: z46.number(),
805
817
  x: distance,
806
818
  y: distance,
807
- layers: z45.array(layer_ref),
808
- port_hints: z45.array(z45.string()).optional(),
809
- pcb_component_id: z45.string().optional(),
810
- pcb_port_id: z45.string().optional(),
819
+ layers: z46.array(layer_ref),
820
+ port_hints: z46.array(z46.string()).optional(),
821
+ pcb_component_id: z46.string().optional(),
822
+ pcb_port_id: z46.string().optional(),
811
823
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
812
824
  });
813
- var pcb_plated_hole_oval = z45.object({
814
- type: z45.literal("pcb_plated_hole"),
815
- shape: z45.enum(["oval", "pill"]),
816
- outer_width: z45.number(),
817
- outer_height: z45.number(),
818
- hole_width: z45.number(),
819
- hole_height: z45.number(),
825
+ var pcb_plated_hole_oval = z46.object({
826
+ type: z46.literal("pcb_plated_hole"),
827
+ shape: z46.enum(["oval", "pill"]),
828
+ outer_width: z46.number(),
829
+ outer_height: z46.number(),
830
+ hole_width: z46.number(),
831
+ hole_height: z46.number(),
820
832
  x: distance,
821
833
  y: distance,
822
- layers: z45.array(layer_ref),
823
- port_hints: z45.array(z45.string()).optional(),
824
- pcb_component_id: z45.string().optional(),
825
- pcb_port_id: z45.string().optional(),
834
+ layers: z46.array(layer_ref),
835
+ port_hints: z46.array(z46.string()).optional(),
836
+ pcb_component_id: z46.string().optional(),
837
+ pcb_port_id: z46.string().optional(),
826
838
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
827
839
  });
828
- var pcb_circular_hole_with_rect_pad = z45.object({
829
- type: z45.literal("pcb_plated_hole"),
830
- shape: z45.literal("circular_hole_with_rect_pad"),
831
- hole_shape: z45.literal("circle"),
832
- pad_shape: z45.literal("rect"),
833
- hole_diameter: z45.number(),
834
- rect_pad_width: z45.number(),
835
- rect_pad_height: z45.number(),
840
+ var pcb_circular_hole_with_rect_pad = z46.object({
841
+ type: z46.literal("pcb_plated_hole"),
842
+ shape: z46.literal("circular_hole_with_rect_pad"),
843
+ hole_shape: z46.literal("circle"),
844
+ pad_shape: z46.literal("rect"),
845
+ hole_diameter: z46.number(),
846
+ rect_pad_width: z46.number(),
847
+ rect_pad_height: z46.number(),
836
848
  x: distance,
837
849
  y: distance,
838
- layers: z45.array(layer_ref),
839
- port_hints: z45.array(z45.string()).optional(),
840
- pcb_component_id: z45.string().optional(),
841
- pcb_port_id: z45.string().optional(),
850
+ layers: z46.array(layer_ref),
851
+ port_hints: z46.array(z46.string()).optional(),
852
+ pcb_component_id: z46.string().optional(),
853
+ pcb_port_id: z46.string().optional(),
842
854
  pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
843
855
  });
844
- var pcb_plated_hole = z45.union([
856
+ var pcb_plated_hole = z46.union([
845
857
  pcb_plated_hole_circle,
846
858
  pcb_plated_hole_oval,
847
859
  pcb_circular_hole_with_rect_pad
@@ -853,157 +865,157 @@ expectTypesMatch(true);
853
865
  expectTypesMatch(true);
854
866
 
855
867
  // src/pcb/pcb_port.ts
856
- import { z as z46 } from "zod";
857
- var pcb_port = z46.object({
858
- type: z46.literal("pcb_port"),
868
+ import { z as z47 } from "zod";
869
+ var pcb_port = z47.object({
870
+ type: z47.literal("pcb_port"),
859
871
  pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
860
- source_port_id: z46.string(),
861
- pcb_component_id: z46.string(),
872
+ source_port_id: z47.string(),
873
+ pcb_component_id: z47.string(),
862
874
  x: distance,
863
875
  y: distance,
864
- layers: z46.array(layer_ref)
876
+ layers: z47.array(layer_ref)
865
877
  }).describe("Defines a port on the PCB");
866
878
  expectTypesMatch(true);
867
879
 
868
880
  // src/pcb/pcb_smtpad.ts
869
- import { z as z47 } from "zod";
870
- var pcb_smtpad_circle = z47.object({
871
- type: z47.literal("pcb_smtpad"),
872
- shape: z47.literal("circle"),
881
+ import { z as z48 } from "zod";
882
+ var pcb_smtpad_circle = z48.object({
883
+ type: z48.literal("pcb_smtpad"),
884
+ shape: z48.literal("circle"),
873
885
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
874
886
  x: distance,
875
887
  y: distance,
876
- radius: z47.number(),
888
+ radius: z48.number(),
877
889
  layer: layer_ref,
878
- port_hints: z47.array(z47.string()).optional(),
879
- pcb_component_id: z47.string().optional(),
880
- pcb_port_id: z47.string().optional()
890
+ port_hints: z48.array(z48.string()).optional(),
891
+ pcb_component_id: z48.string().optional(),
892
+ pcb_port_id: z48.string().optional()
881
893
  });
882
- var pcb_smtpad_rect = z47.object({
883
- type: z47.literal("pcb_smtpad"),
884
- shape: z47.literal("rect"),
894
+ var pcb_smtpad_rect = z48.object({
895
+ type: z48.literal("pcb_smtpad"),
896
+ shape: z48.literal("rect"),
885
897
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
886
898
  x: distance,
887
899
  y: distance,
888
- width: z47.number(),
889
- height: z47.number(),
900
+ width: z48.number(),
901
+ height: z48.number(),
890
902
  layer: layer_ref,
891
- port_hints: z47.array(z47.string()).optional(),
892
- pcb_component_id: z47.string().optional(),
893
- pcb_port_id: z47.string().optional()
903
+ port_hints: z48.array(z48.string()).optional(),
904
+ pcb_component_id: z48.string().optional(),
905
+ pcb_port_id: z48.string().optional()
894
906
  });
895
- var pcb_smtpad_rotated_rect = z47.object({
896
- type: z47.literal("pcb_smtpad"),
897
- shape: z47.literal("rotated_rect"),
907
+ var pcb_smtpad_rotated_rect = z48.object({
908
+ type: z48.literal("pcb_smtpad"),
909
+ shape: z48.literal("rotated_rect"),
898
910
  pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
899
911
  x: distance,
900
912
  y: distance,
901
- width: z47.number(),
902
- height: z47.number(),
913
+ width: z48.number(),
914
+ height: z48.number(),
903
915
  ccw_rotation: rotation,
904
916
  layer: layer_ref,
905
- port_hints: z47.array(z47.string()).optional(),
906
- pcb_component_id: z47.string().optional(),
907
- pcb_port_id: z47.string().optional()
917
+ port_hints: z48.array(z48.string()).optional(),
918
+ pcb_component_id: z48.string().optional(),
919
+ pcb_port_id: z48.string().optional()
908
920
  });
909
- var pcb_smtpad = z47.union([pcb_smtpad_circle, pcb_smtpad_rect, pcb_smtpad_rotated_rect]).describe("Defines an SMT pad on the PCB");
921
+ var pcb_smtpad = z48.union([pcb_smtpad_circle, pcb_smtpad_rect, pcb_smtpad_rotated_rect]).describe("Defines an SMT pad on the PCB");
910
922
  expectTypesMatch(true);
911
923
  expectTypesMatch(true);
912
924
  expectTypesMatch(true);
913
925
 
914
926
  // src/pcb/pcb_solder_paste.ts
915
- import { z as z48 } from "zod";
916
- var pcb_solder_paste_circle = z48.object({
917
- type: z48.literal("pcb_solder_paste"),
918
- shape: z48.literal("circle"),
927
+ import { z as z49 } from "zod";
928
+ var pcb_solder_paste_circle = z49.object({
929
+ type: z49.literal("pcb_solder_paste"),
930
+ shape: z49.literal("circle"),
919
931
  pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
920
932
  x: distance,
921
933
  y: distance,
922
- radius: z48.number(),
934
+ radius: z49.number(),
923
935
  layer: layer_ref,
924
- pcb_component_id: z48.string().optional(),
925
- pcb_smtpad_id: z48.string().optional()
936
+ pcb_component_id: z49.string().optional(),
937
+ pcb_smtpad_id: z49.string().optional()
926
938
  });
927
- var pcb_solder_paste_rect = z48.object({
928
- type: z48.literal("pcb_solder_paste"),
929
- shape: z48.literal("rect"),
939
+ var pcb_solder_paste_rect = z49.object({
940
+ type: z49.literal("pcb_solder_paste"),
941
+ shape: z49.literal("rect"),
930
942
  pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
931
943
  x: distance,
932
944
  y: distance,
933
- width: z48.number(),
934
- height: z48.number(),
945
+ width: z49.number(),
946
+ height: z49.number(),
935
947
  layer: layer_ref,
936
- pcb_component_id: z48.string().optional(),
937
- pcb_smtpad_id: z48.string().optional()
948
+ pcb_component_id: z49.string().optional(),
949
+ pcb_smtpad_id: z49.string().optional()
938
950
  });
939
- var pcb_solder_paste = z48.union([pcb_solder_paste_circle, pcb_solder_paste_rect]).describe("Defines solderpaste on the PCB");
951
+ var pcb_solder_paste = z49.union([pcb_solder_paste_circle, pcb_solder_paste_rect]).describe("Defines solderpaste on the PCB");
940
952
  expectTypesMatch(true);
941
953
  expectTypesMatch(true);
942
954
 
943
955
  // src/pcb/pcb_text.ts
944
- import { z as z49 } from "zod";
945
- var pcb_text = z49.object({
946
- type: z49.literal("pcb_text"),
956
+ import { z as z50 } from "zod";
957
+ var pcb_text = z50.object({
958
+ type: z50.literal("pcb_text"),
947
959
  pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
948
- text: z49.string(),
960
+ text: z50.string(),
949
961
  center: point,
950
962
  layer: layer_ref,
951
963
  width: length,
952
964
  height: length,
953
- lines: z49.number(),
965
+ lines: z50.number(),
954
966
  // @ts-ignore
955
- align: z49.enum(["bottom-left"])
967
+ align: z50.enum(["bottom-left"])
956
968
  }).describe("Defines text on the PCB");
957
969
  expectTypesMatch(true);
958
970
 
959
971
  // src/pcb/pcb_trace.ts
960
- import { z as z50 } from "zod";
961
- var pcb_trace_route_point_wire = z50.object({
962
- route_type: z50.literal("wire"),
972
+ import { z as z51 } from "zod";
973
+ var pcb_trace_route_point_wire = z51.object({
974
+ route_type: z51.literal("wire"),
963
975
  x: distance,
964
976
  y: distance,
965
977
  width: distance,
966
- start_pcb_port_id: z50.string().optional(),
967
- end_pcb_port_id: z50.string().optional(),
978
+ start_pcb_port_id: z51.string().optional(),
979
+ end_pcb_port_id: z51.string().optional(),
968
980
  layer: layer_ref
969
981
  });
970
- var pcb_trace_route_point_via = z50.object({
971
- route_type: z50.literal("via"),
982
+ var pcb_trace_route_point_via = z51.object({
983
+ route_type: z51.literal("via"),
972
984
  x: distance,
973
985
  y: distance,
974
- from_layer: z50.string(),
975
- to_layer: z50.string()
986
+ from_layer: z51.string(),
987
+ to_layer: z51.string()
976
988
  });
977
- var pcb_trace_route_point = z50.union([
989
+ var pcb_trace_route_point = z51.union([
978
990
  pcb_trace_route_point_wire,
979
991
  pcb_trace_route_point_via
980
992
  ]);
981
- var pcb_trace = z50.object({
982
- type: z50.literal("pcb_trace"),
983
- source_trace_id: z50.string().optional(),
984
- pcb_component_id: z50.string().optional(),
993
+ var pcb_trace = z51.object({
994
+ type: z51.literal("pcb_trace"),
995
+ source_trace_id: z51.string().optional(),
996
+ pcb_component_id: z51.string().optional(),
985
997
  pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
986
- route_thickness_mode: z50.enum(["constant", "interpolated"]).default("constant").optional(),
987
- route_order_index: z50.number().optional(),
988
- should_round_corners: z50.boolean().optional(),
989
- trace_length: z50.number().optional(),
990
- route: z50.array(
991
- z50.union([
992
- z50.object({
993
- route_type: z50.literal("wire"),
998
+ route_thickness_mode: z51.enum(["constant", "interpolated"]).default("constant").optional(),
999
+ route_order_index: z51.number().optional(),
1000
+ should_round_corners: z51.boolean().optional(),
1001
+ trace_length: z51.number().optional(),
1002
+ route: z51.array(
1003
+ z51.union([
1004
+ z51.object({
1005
+ route_type: z51.literal("wire"),
994
1006
  x: distance,
995
1007
  y: distance,
996
1008
  width: distance,
997
- start_pcb_port_id: z50.string().optional(),
998
- end_pcb_port_id: z50.string().optional(),
1009
+ start_pcb_port_id: z51.string().optional(),
1010
+ end_pcb_port_id: z51.string().optional(),
999
1011
  layer: layer_ref
1000
1012
  }),
1001
- z50.object({
1002
- route_type: z50.literal("via"),
1013
+ z51.object({
1014
+ route_type: z51.literal("via"),
1003
1015
  x: distance,
1004
1016
  y: distance,
1005
- from_layer: z50.string(),
1006
- to_layer: z50.string()
1017
+ from_layer: z51.string(),
1018
+ to_layer: z51.string()
1007
1019
  })
1008
1020
  ])
1009
1021
  )
@@ -1012,34 +1024,34 @@ expectTypesMatch(true);
1012
1024
  expectTypesMatch(true);
1013
1025
 
1014
1026
  // src/pcb/pcb_trace_error.ts
1015
- import { z as z51 } from "zod";
1016
- var pcb_trace_error = z51.object({
1017
- type: z51.literal("pcb_trace_error"),
1027
+ import { z as z52 } from "zod";
1028
+ var pcb_trace_error = z52.object({
1029
+ type: z52.literal("pcb_trace_error"),
1018
1030
  pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
1019
- error_type: z51.literal("pcb_trace_error"),
1020
- message: z51.string(),
1031
+ error_type: z52.literal("pcb_trace_error"),
1032
+ message: z52.string(),
1021
1033
  center: point.optional(),
1022
- pcb_trace_id: z51.string(),
1023
- source_trace_id: z51.string(),
1024
- pcb_component_ids: z51.array(z51.string()),
1025
- pcb_port_ids: z51.array(z51.string())
1034
+ pcb_trace_id: z52.string(),
1035
+ source_trace_id: z52.string(),
1036
+ pcb_component_ids: z52.array(z52.string()),
1037
+ pcb_port_ids: z52.array(z52.string())
1026
1038
  }).describe("Defines a trace error on the PCB");
1027
1039
  expectTypesMatch(true);
1028
1040
 
1029
1041
  // src/pcb/pcb_port_not_matched_error.ts
1030
- import { z as z52 } from "zod";
1031
- var pcb_port_not_matched_error = z52.object({
1032
- type: z52.literal("pcb_port_not_matched_error"),
1042
+ import { z as z53 } from "zod";
1043
+ var pcb_port_not_matched_error = z53.object({
1044
+ type: z53.literal("pcb_port_not_matched_error"),
1033
1045
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
1034
- message: z52.string(),
1035
- pcb_component_ids: z52.array(z52.string())
1046
+ message: z53.string(),
1047
+ pcb_component_ids: z53.array(z53.string())
1036
1048
  }).describe("Defines a trace error on the PCB where a port is not matched");
1037
1049
  expectTypesMatch(true);
1038
1050
 
1039
1051
  // src/pcb/pcb_via.ts
1040
- import { z as z53 } from "zod";
1041
- var pcb_via = z53.object({
1042
- type: z53.literal("pcb_via"),
1052
+ import { z as z54 } from "zod";
1053
+ var pcb_via = z54.object({
1054
+ type: z54.literal("pcb_via"),
1043
1055
  pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
1044
1056
  x: distance,
1045
1057
  y: distance,
@@ -1049,51 +1061,51 @@ var pcb_via = z53.object({
1049
1061
  from_layer: layer_ref.optional(),
1050
1062
  /** @deprecated */
1051
1063
  to_layer: layer_ref.optional(),
1052
- layers: z53.array(layer_ref),
1053
- pcb_trace_id: z53.string().optional()
1064
+ layers: z54.array(layer_ref),
1065
+ pcb_trace_id: z54.string().optional()
1054
1066
  }).describe("Defines a via on the PCB");
1055
1067
  expectTypesMatch(true);
1056
1068
 
1057
1069
  // src/pcb/pcb_board.ts
1058
- import { z as z54 } from "zod";
1059
- var pcb_board = z54.object({
1060
- type: z54.literal("pcb_board"),
1070
+ import { z as z55 } from "zod";
1071
+ var pcb_board = z55.object({
1072
+ type: z55.literal("pcb_board"),
1061
1073
  pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
1062
1074
  width: length,
1063
1075
  height: length,
1064
1076
  center: point,
1065
1077
  thickness: length.optional().default(1.4),
1066
- num_layers: z54.number().optional().default(4),
1067
- outline: z54.array(point).optional()
1078
+ num_layers: z55.number().optional().default(4),
1079
+ outline: z55.array(point).optional()
1068
1080
  }).describe("Defines the board outline of the PCB");
1069
1081
  expectTypesMatch(true);
1070
1082
 
1071
1083
  // src/pcb/pcb_placement_error.ts
1072
- import { z as z55 } from "zod";
1073
- var pcb_placement_error = z55.object({
1074
- type: z55.literal("pcb_placement_error"),
1084
+ import { z as z56 } from "zod";
1085
+ var pcb_placement_error = z56.object({
1086
+ type: z56.literal("pcb_placement_error"),
1075
1087
  pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
1076
- message: z55.string()
1088
+ message: z56.string()
1077
1089
  }).describe("Defines a placement error on the PCB");
1078
1090
  expectTypesMatch(true);
1079
1091
 
1080
1092
  // src/pcb/pcb_trace_hint.ts
1081
- import { z as z56 } from "zod";
1082
- var pcb_trace_hint = z56.object({
1083
- type: z56.literal("pcb_trace_hint"),
1093
+ import { z as z57 } from "zod";
1094
+ var pcb_trace_hint = z57.object({
1095
+ type: z57.literal("pcb_trace_hint"),
1084
1096
  pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
1085
- pcb_port_id: z56.string(),
1086
- pcb_component_id: z56.string(),
1087
- route: z56.array(route_hint_point)
1097
+ pcb_port_id: z57.string(),
1098
+ pcb_component_id: z57.string(),
1099
+ route: z57.array(route_hint_point)
1088
1100
  }).describe("A hint that can be used during generation of a PCB trace");
1089
1101
  expectTypesMatch(true);
1090
1102
 
1091
1103
  // src/pcb/pcb_silkscreen_line.ts
1092
- import { z as z57 } from "zod";
1093
- var pcb_silkscreen_line = z57.object({
1094
- type: z57.literal("pcb_silkscreen_line"),
1104
+ import { z as z58 } from "zod";
1105
+ var pcb_silkscreen_line = z58.object({
1106
+ type: z58.literal("pcb_silkscreen_line"),
1095
1107
  pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
1096
- pcb_component_id: z57.string(),
1108
+ pcb_component_id: z58.string(),
1097
1109
  stroke_width: distance.default("0.1mm"),
1098
1110
  x1: distance,
1099
1111
  y1: distance,
@@ -1104,40 +1116,40 @@ var pcb_silkscreen_line = z57.object({
1104
1116
  expectTypesMatch(true);
1105
1117
 
1106
1118
  // src/pcb/pcb_silkscreen_path.ts
1107
- import { z as z58 } from "zod";
1108
- var pcb_silkscreen_path = z58.object({
1109
- type: z58.literal("pcb_silkscreen_path"),
1119
+ import { z as z59 } from "zod";
1120
+ var pcb_silkscreen_path = z59.object({
1121
+ type: z59.literal("pcb_silkscreen_path"),
1110
1122
  pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
1111
- pcb_component_id: z58.string(),
1123
+ pcb_component_id: z59.string(),
1112
1124
  layer: visible_layer,
1113
- route: z58.array(point),
1125
+ route: z59.array(point),
1114
1126
  stroke_width: length
1115
1127
  }).describe("Defines a silkscreen path on the PCB");
1116
1128
  expectTypesMatch(true);
1117
1129
 
1118
1130
  // src/pcb/pcb_silkscreen_text.ts
1119
- import { z as z59 } from "zod";
1120
- var pcb_silkscreen_text = z59.object({
1121
- type: z59.literal("pcb_silkscreen_text"),
1131
+ import { z as z60 } from "zod";
1132
+ var pcb_silkscreen_text = z60.object({
1133
+ type: z60.literal("pcb_silkscreen_text"),
1122
1134
  pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
1123
- font: z59.literal("tscircuit2024").default("tscircuit2024"),
1135
+ font: z60.literal("tscircuit2024").default("tscircuit2024"),
1124
1136
  font_size: distance.default("0.2mm"),
1125
- pcb_component_id: z59.string(),
1126
- text: z59.string(),
1127
- ccw_rotation: z59.number().optional(),
1137
+ pcb_component_id: z60.string(),
1138
+ text: z60.string(),
1139
+ ccw_rotation: z60.number().optional(),
1128
1140
  layer: layer_ref,
1129
- is_mirrored: z59.boolean().default(false).optional(),
1141
+ is_mirrored: z60.boolean().default(false).optional(),
1130
1142
  anchor_position: point.default({ x: 0, y: 0 }),
1131
- anchor_alignment: z59.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center")
1143
+ anchor_alignment: z60.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center")
1132
1144
  }).describe("Defines silkscreen text on the PCB");
1133
1145
  expectTypesMatch(true);
1134
1146
 
1135
1147
  // src/pcb/pcb_silkscreen_rect.ts
1136
- import { z as z60 } from "zod";
1137
- var pcb_silkscreen_rect = z60.object({
1138
- type: z60.literal("pcb_silkscreen_rect"),
1148
+ import { z as z61 } from "zod";
1149
+ var pcb_silkscreen_rect = z61.object({
1150
+ type: z61.literal("pcb_silkscreen_rect"),
1139
1151
  pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
1140
- pcb_component_id: z60.string(),
1152
+ pcb_component_id: z61.string(),
1141
1153
  center: point,
1142
1154
  width: length,
1143
1155
  height: length,
@@ -1146,13 +1158,13 @@ var pcb_silkscreen_rect = z60.object({
1146
1158
  expectTypesMatch(true);
1147
1159
 
1148
1160
  // src/pcb/pcb_silkscreen_circle.ts
1149
- import { z as z61 } from "zod";
1150
- var pcb_silkscreen_circle = z61.object({
1151
- type: z61.literal("pcb_silkscreen_circle"),
1161
+ import { z as z62 } from "zod";
1162
+ var pcb_silkscreen_circle = z62.object({
1163
+ type: z62.literal("pcb_silkscreen_circle"),
1152
1164
  pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
1153
1165
  "pcb_silkscreen_circle"
1154
1166
  ),
1155
- pcb_component_id: z61.string(),
1167
+ pcb_component_id: z62.string(),
1156
1168
  center: point,
1157
1169
  radius: length,
1158
1170
  layer: visible_layer
@@ -1160,11 +1172,11 @@ var pcb_silkscreen_circle = z61.object({
1160
1172
  expectTypesMatch(true);
1161
1173
 
1162
1174
  // src/pcb/pcb_silkscreen_oval.ts
1163
- import { z as z62 } from "zod";
1164
- var pcb_silkscreen_oval = z62.object({
1165
- type: z62.literal("pcb_silkscreen_oval"),
1175
+ import { z as z63 } from "zod";
1176
+ var pcb_silkscreen_oval = z63.object({
1177
+ type: z63.literal("pcb_silkscreen_oval"),
1166
1178
  pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
1167
- pcb_component_id: z62.string(),
1179
+ pcb_component_id: z63.string(),
1168
1180
  center: point,
1169
1181
  radius_x: distance,
1170
1182
  radius_y: distance,
@@ -1173,133 +1185,133 @@ var pcb_silkscreen_oval = z62.object({
1173
1185
  expectTypesMatch(true);
1174
1186
 
1175
1187
  // src/pcb/pcb_fabrication_note_text.ts
1176
- import { z as z63 } from "zod";
1177
- var pcb_fabrication_note_text = z63.object({
1178
- type: z63.literal("pcb_fabrication_note_text"),
1188
+ import { z as z64 } from "zod";
1189
+ var pcb_fabrication_note_text = z64.object({
1190
+ type: z64.literal("pcb_fabrication_note_text"),
1179
1191
  pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
1180
1192
  "pcb_fabrication_note_text"
1181
1193
  ),
1182
- font: z63.literal("tscircuit2024").default("tscircuit2024"),
1194
+ font: z64.literal("tscircuit2024").default("tscircuit2024"),
1183
1195
  font_size: distance.default("1mm"),
1184
- pcb_component_id: z63.string(),
1185
- text: z63.string(),
1196
+ pcb_component_id: z64.string(),
1197
+ text: z64.string(),
1186
1198
  layer: visible_layer,
1187
1199
  anchor_position: point.default({ x: 0, y: 0 }),
1188
- anchor_alignment: z63.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
1189
- color: z63.string().optional()
1200
+ anchor_alignment: z64.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
1201
+ color: z64.string().optional()
1190
1202
  }).describe(
1191
1203
  "Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
1192
1204
  );
1193
1205
  expectTypesMatch(true);
1194
1206
 
1195
1207
  // src/pcb/pcb_fabrication_note_path.ts
1196
- import { z as z64 } from "zod";
1197
- var pcb_fabrication_note_path = z64.object({
1198
- type: z64.literal("pcb_fabrication_note_path"),
1208
+ import { z as z65 } from "zod";
1209
+ var pcb_fabrication_note_path = z65.object({
1210
+ type: z65.literal("pcb_fabrication_note_path"),
1199
1211
  pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
1200
1212
  "pcb_fabrication_note_path"
1201
1213
  ),
1202
- pcb_component_id: z64.string(),
1214
+ pcb_component_id: z65.string(),
1203
1215
  layer: layer_ref,
1204
- route: z64.array(point),
1216
+ route: z65.array(point),
1205
1217
  stroke_width: length,
1206
- color: z64.string().optional()
1218
+ color: z65.string().optional()
1207
1219
  }).describe(
1208
1220
  "Defines a fabrication path on the PCB for fabricators or assemblers"
1209
1221
  );
1210
1222
  expectTypesMatch(true);
1211
1223
 
1212
1224
  // src/pcb/pcb_keepout.ts
1213
- import { z as z65 } from "zod";
1214
- var pcb_keepout = z65.object({
1215
- type: z65.literal("pcb_keepout"),
1216
- shape: z65.literal("rect"),
1225
+ import { z as z66 } from "zod";
1226
+ var pcb_keepout = z66.object({
1227
+ type: z66.literal("pcb_keepout"),
1228
+ shape: z66.literal("rect"),
1217
1229
  center: point,
1218
1230
  width: distance,
1219
1231
  height: distance,
1220
- pcb_keepout_id: z65.string(),
1221
- layers: z65.array(z65.string()),
1232
+ pcb_keepout_id: z66.string(),
1233
+ layers: z66.array(z66.string()),
1222
1234
  // Specify layers where the keepout applies
1223
- description: z65.string().optional()
1235
+ description: z66.string().optional()
1224
1236
  // Optional description of the keepout
1225
1237
  }).or(
1226
- z65.object({
1227
- type: z65.literal("pcb_keepout"),
1228
- shape: z65.literal("circle"),
1238
+ z66.object({
1239
+ type: z66.literal("pcb_keepout"),
1240
+ shape: z66.literal("circle"),
1229
1241
  center: point,
1230
1242
  radius: distance,
1231
- pcb_keepout_id: z65.string(),
1232
- layers: z65.array(z65.string()),
1243
+ pcb_keepout_id: z66.string(),
1244
+ layers: z66.array(z66.string()),
1233
1245
  // Specify layers where the keepout applies
1234
- description: z65.string().optional()
1246
+ description: z66.string().optional()
1235
1247
  // Optional description of the keepout
1236
1248
  })
1237
1249
  );
1238
1250
 
1239
1251
  // src/pcb/pcb_missing_footprint_error.ts
1240
- import { z as z66 } from "zod";
1241
- var pcb_missing_footprint_error = z66.object({
1242
- type: z66.literal("pcb_missing_footprint_error"),
1252
+ import { z as z67 } from "zod";
1253
+ var pcb_missing_footprint_error = z67.object({
1254
+ type: z67.literal("pcb_missing_footprint_error"),
1243
1255
  pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
1244
1256
  "pcb_missing_footprint_error"
1245
1257
  ),
1246
- error_type: z66.literal("pcb_missing_footprint_error"),
1247
- source_component_id: z66.string(),
1248
- message: z66.string()
1258
+ error_type: z67.literal("pcb_missing_footprint_error"),
1259
+ source_component_id: z67.string(),
1260
+ message: z67.string()
1249
1261
  }).describe("Defines a missing footprint error on the PCB");
1250
1262
  expectTypesMatch(
1251
1263
  true
1252
1264
  );
1253
1265
 
1254
1266
  // src/pcb/pcb_manual_edit_conflict_error.ts
1255
- import { z as z67 } from "zod";
1256
- var pcb_manual_edit_conflict_error = z67.object({
1257
- type: z67.literal("pcb_manual_edit_conflict_error"),
1267
+ import { z as z68 } from "zod";
1268
+ var pcb_manual_edit_conflict_error = z68.object({
1269
+ type: z68.literal("pcb_manual_edit_conflict_error"),
1258
1270
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_manual_edit_conflict_error"),
1259
- message: z67.string(),
1260
- pcb_component_id: z67.string(),
1261
- source_component_id: z67.string()
1271
+ message: z68.string(),
1272
+ pcb_component_id: z68.string(),
1273
+ source_component_id: z68.string()
1262
1274
  }).describe(
1263
1275
  "Error emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
1264
1276
  );
1265
1277
  expectTypesMatch(true);
1266
1278
 
1267
1279
  // src/pcb/pcb_group.ts
1268
- import { z as z68 } from "zod";
1269
- var pcb_group = z68.object({
1270
- type: z68.literal("pcb_group"),
1280
+ import { z as z69 } from "zod";
1281
+ var pcb_group = z69.object({
1282
+ type: z69.literal("pcb_group"),
1271
1283
  pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
1272
1284
  width: length,
1273
1285
  height: length,
1274
1286
  center: point,
1275
- pcb_component_ids: z68.array(z68.string()),
1276
- name: z68.string().optional(),
1277
- description: z68.string().optional()
1287
+ pcb_component_ids: z69.array(z69.string()),
1288
+ name: z69.string().optional(),
1289
+ description: z69.string().optional()
1278
1290
  }).describe("Defines a group of components on the PCB");
1279
1291
  expectTypesMatch(true);
1280
1292
 
1281
1293
  // src/cad/cad_component.ts
1282
- import { z as z69 } from "zod";
1283
- var cad_component = z69.object({
1284
- type: z69.literal("cad_component"),
1285
- cad_component_id: z69.string(),
1286
- pcb_component_id: z69.string(),
1287
- source_component_id: z69.string(),
1294
+ import { z as z70 } from "zod";
1295
+ var cad_component = z70.object({
1296
+ type: z70.literal("cad_component"),
1297
+ cad_component_id: z70.string(),
1298
+ pcb_component_id: z70.string(),
1299
+ source_component_id: z70.string(),
1288
1300
  position: point3,
1289
1301
  rotation: point3.optional(),
1290
1302
  size: point3.optional(),
1291
1303
  layer: layer_ref.optional(),
1292
1304
  // These are all ways to generate/load the 3d model
1293
- footprinter_string: z69.string().optional(),
1294
- model_obj_url: z69.string().optional(),
1295
- model_stl_url: z69.string().optional(),
1296
- model_3mf_url: z69.string().optional(),
1297
- model_jscad: z69.any().optional()
1305
+ footprinter_string: z70.string().optional(),
1306
+ model_obj_url: z70.string().optional(),
1307
+ model_stl_url: z70.string().optional(),
1308
+ model_3mf_url: z70.string().optional(),
1309
+ model_jscad: z70.any().optional()
1298
1310
  }).describe("Defines a component on the PCB");
1299
1311
 
1300
1312
  // src/any_circuit_element.ts
1301
- import { z as z70 } from "zod";
1302
- var any_circuit_element = z70.union([
1313
+ import { z as z71 } from "zod";
1314
+ var any_circuit_element = z71.union([
1303
1315
  source_trace,
1304
1316
  source_port,
1305
1317
  any_source_component,
@@ -1317,6 +1329,7 @@ var any_circuit_element = z70.union([
1317
1329
  source_simple_pin_header,
1318
1330
  source_simple_resonator,
1319
1331
  source_simple_transistor,
1332
+ source_simple_mosfet,
1320
1333
  source_simple_potentiometer,
1321
1334
  source_simple_push_button,
1322
1335
  pcb_component,
@@ -1448,6 +1461,7 @@ export {
1448
1461
  source_simple_diode,
1449
1462
  source_simple_ground,
1450
1463
  source_simple_inductor,
1464
+ source_simple_mosfet,
1451
1465
  source_simple_pin_header,
1452
1466
  source_simple_potentiometer,
1453
1467
  source_simple_power_source,