circuit-json 0.0.135 → 0.0.137

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