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