circuit-json 0.0.233 → 0.0.234
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/README.md +20 -0
- package/dist/index.d.mts +161 -2
- package/dist/index.mjs +751 -731
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -396,7 +396,7 @@ var source_simple_power_source = source_component_base.extend({
|
|
|
396
396
|
expectTypesMatch(true);
|
|
397
397
|
|
|
398
398
|
// src/source/any_source_component.ts
|
|
399
|
-
import { z as
|
|
399
|
+
import { z as z34 } from "zod";
|
|
400
400
|
|
|
401
401
|
// src/source/source_simple_fuse.ts
|
|
402
402
|
import { z as z16 } from "zod";
|
|
@@ -587,8 +587,25 @@ var source_property_ignored_warning = z32.object({
|
|
|
587
587
|
}).describe("The source property was ignored");
|
|
588
588
|
expectTypesMatch(true);
|
|
589
589
|
|
|
590
|
+
// src/source/source_pin_missing_trace_warning.ts
|
|
591
|
+
import { z as z33 } from "zod";
|
|
592
|
+
var source_pin_missing_trace_warning = z33.object({
|
|
593
|
+
type: z33.literal("source_pin_missing_trace_warning"),
|
|
594
|
+
source_pin_missing_trace_warning_id: getZodPrefixedIdWithDefault(
|
|
595
|
+
"source_pin_missing_trace_warning"
|
|
596
|
+
),
|
|
597
|
+
warning_type: z33.literal("source_pin_missing_trace_warning").default("source_pin_missing_trace_warning"),
|
|
598
|
+
message: z33.string(),
|
|
599
|
+
source_component_id: z33.string(),
|
|
600
|
+
source_port_id: z33.string(),
|
|
601
|
+
subcircuit_id: z33.string().optional()
|
|
602
|
+
}).describe(
|
|
603
|
+
"Warning emitted when a source component pin is missing a trace connection"
|
|
604
|
+
);
|
|
605
|
+
expectTypesMatch(true);
|
|
606
|
+
|
|
590
607
|
// src/source/any_source_component.ts
|
|
591
|
-
var any_source_component =
|
|
608
|
+
var any_source_component = z34.union([
|
|
592
609
|
source_simple_resistor,
|
|
593
610
|
source_simple_capacitor,
|
|
594
611
|
source_simple_diode,
|
|
@@ -612,218 +629,219 @@ var any_source_component = z33.union([
|
|
|
612
629
|
source_missing_property_error,
|
|
613
630
|
source_failed_to_create_component_error,
|
|
614
631
|
source_trace_not_connected_error,
|
|
615
|
-
source_property_ignored_warning
|
|
632
|
+
source_property_ignored_warning,
|
|
633
|
+
source_pin_missing_trace_warning
|
|
616
634
|
]);
|
|
617
635
|
expectTypesMatch(true);
|
|
618
636
|
|
|
619
637
|
// src/source/source_port.ts
|
|
620
|
-
import { z as z34 } from "zod";
|
|
621
|
-
var source_port = z34.object({
|
|
622
|
-
type: z34.literal("source_port"),
|
|
623
|
-
pin_number: z34.number().optional(),
|
|
624
|
-
port_hints: z34.array(z34.string()).optional(),
|
|
625
|
-
name: z34.string(),
|
|
626
|
-
source_port_id: z34.string(),
|
|
627
|
-
source_component_id: z34.string(),
|
|
628
|
-
subcircuit_id: z34.string().optional(),
|
|
629
|
-
subcircuit_connectivity_map_key: z34.string().optional()
|
|
630
|
-
});
|
|
631
|
-
expectTypesMatch(true);
|
|
632
|
-
|
|
633
|
-
// src/source/source_trace.ts
|
|
634
638
|
import { z as z35 } from "zod";
|
|
635
|
-
var
|
|
636
|
-
type: z35.literal("
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
639
|
+
var source_port = z35.object({
|
|
640
|
+
type: z35.literal("source_port"),
|
|
641
|
+
pin_number: z35.number().optional(),
|
|
642
|
+
port_hints: z35.array(z35.string()).optional(),
|
|
643
|
+
name: z35.string(),
|
|
644
|
+
source_port_id: z35.string(),
|
|
645
|
+
source_component_id: z35.string(),
|
|
640
646
|
subcircuit_id: z35.string().optional(),
|
|
641
|
-
subcircuit_connectivity_map_key: z35.string().optional()
|
|
642
|
-
max_length: z35.number().optional(),
|
|
643
|
-
min_trace_thickness: z35.number().optional(),
|
|
644
|
-
display_name: z35.string().optional()
|
|
647
|
+
subcircuit_connectivity_map_key: z35.string().optional()
|
|
645
648
|
});
|
|
646
649
|
expectTypesMatch(true);
|
|
647
650
|
|
|
648
|
-
// src/source/
|
|
651
|
+
// src/source/source_trace.ts
|
|
649
652
|
import { z as z36 } from "zod";
|
|
650
|
-
var
|
|
651
|
-
type: z36.literal("
|
|
652
|
-
|
|
653
|
+
var source_trace = z36.object({
|
|
654
|
+
type: z36.literal("source_trace"),
|
|
655
|
+
source_trace_id: z36.string(),
|
|
656
|
+
connected_source_port_ids: z36.array(z36.string()),
|
|
657
|
+
connected_source_net_ids: z36.array(z36.string()),
|
|
653
658
|
subcircuit_id: z36.string().optional(),
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
659
|
+
subcircuit_connectivity_map_key: z36.string().optional(),
|
|
660
|
+
max_length: z36.number().optional(),
|
|
661
|
+
min_trace_thickness: z36.number().optional(),
|
|
662
|
+
display_name: z36.string().optional()
|
|
658
663
|
});
|
|
659
664
|
expectTypesMatch(true);
|
|
660
665
|
|
|
661
|
-
// src/source/
|
|
666
|
+
// src/source/source_group.ts
|
|
662
667
|
import { z as z37 } from "zod";
|
|
663
|
-
var
|
|
664
|
-
type: z37.literal("
|
|
665
|
-
|
|
666
|
-
name: z37.string(),
|
|
667
|
-
member_source_group_ids: z37.array(z37.string()),
|
|
668
|
-
is_power: z37.boolean().optional(),
|
|
669
|
-
is_ground: z37.boolean().optional(),
|
|
670
|
-
is_digital_signal: z37.boolean().optional(),
|
|
671
|
-
is_analog_signal: z37.boolean().optional(),
|
|
672
|
-
trace_width: z37.number().optional(),
|
|
668
|
+
var source_group = z37.object({
|
|
669
|
+
type: z37.literal("source_group"),
|
|
670
|
+
source_group_id: z37.string(),
|
|
673
671
|
subcircuit_id: z37.string().optional(),
|
|
674
|
-
|
|
672
|
+
parent_subcircuit_id: z37.string().optional(),
|
|
673
|
+
parent_source_group_id: z37.string().optional(),
|
|
674
|
+
is_subcircuit: z37.boolean().optional(),
|
|
675
|
+
name: z37.string().optional()
|
|
675
676
|
});
|
|
676
677
|
expectTypesMatch(true);
|
|
677
678
|
|
|
678
|
-
// src/source/
|
|
679
|
+
// src/source/source_net.ts
|
|
679
680
|
import { z as z38 } from "zod";
|
|
680
|
-
var
|
|
681
|
-
type: z38.literal("
|
|
682
|
-
source_pcb_ground_plane_id: z38.string(),
|
|
683
|
-
source_group_id: z38.string(),
|
|
681
|
+
var source_net = z38.object({
|
|
682
|
+
type: z38.literal("source_net"),
|
|
684
683
|
source_net_id: z38.string(),
|
|
685
|
-
|
|
684
|
+
name: z38.string(),
|
|
685
|
+
member_source_group_ids: z38.array(z38.string()),
|
|
686
|
+
is_power: z38.boolean().optional(),
|
|
687
|
+
is_ground: z38.boolean().optional(),
|
|
688
|
+
is_digital_signal: z38.boolean().optional(),
|
|
689
|
+
is_analog_signal: z38.boolean().optional(),
|
|
690
|
+
trace_width: z38.number().optional(),
|
|
691
|
+
subcircuit_id: z38.string().optional(),
|
|
692
|
+
subcircuit_connectivity_map_key: z38.string().optional()
|
|
693
|
+
});
|
|
694
|
+
expectTypesMatch(true);
|
|
695
|
+
|
|
696
|
+
// src/source/source_pcb_ground_plane.ts
|
|
697
|
+
import { z as z39 } from "zod";
|
|
698
|
+
var source_pcb_ground_plane = z39.object({
|
|
699
|
+
type: z39.literal("source_pcb_ground_plane"),
|
|
700
|
+
source_pcb_ground_plane_id: z39.string(),
|
|
701
|
+
source_group_id: z39.string(),
|
|
702
|
+
source_net_id: z39.string(),
|
|
703
|
+
subcircuit_id: z39.string().optional()
|
|
686
704
|
}).describe("Defines a ground plane in the source domain");
|
|
687
705
|
expectTypesMatch(true);
|
|
688
706
|
|
|
689
707
|
// src/schematic/schematic_box.ts
|
|
690
|
-
import { z as
|
|
691
|
-
var schematic_box =
|
|
692
|
-
type:
|
|
693
|
-
schematic_component_id:
|
|
708
|
+
import { z as z40 } from "zod";
|
|
709
|
+
var schematic_box = z40.object({
|
|
710
|
+
type: z40.literal("schematic_box"),
|
|
711
|
+
schematic_component_id: z40.string().optional(),
|
|
694
712
|
width: distance,
|
|
695
713
|
height: distance,
|
|
696
|
-
is_dashed:
|
|
714
|
+
is_dashed: z40.boolean().default(false),
|
|
697
715
|
x: distance,
|
|
698
716
|
y: distance,
|
|
699
|
-
subcircuit_id:
|
|
717
|
+
subcircuit_id: z40.string().optional()
|
|
700
718
|
}).describe("Draws a box on the schematic");
|
|
701
719
|
expectTypesMatch(true);
|
|
702
720
|
|
|
703
721
|
// src/schematic/schematic_path.ts
|
|
704
|
-
import { z as
|
|
705
|
-
var schematic_path =
|
|
706
|
-
type:
|
|
707
|
-
schematic_component_id:
|
|
708
|
-
fill_color:
|
|
709
|
-
is_filled:
|
|
710
|
-
points:
|
|
711
|
-
subcircuit_id:
|
|
722
|
+
import { z as z41 } from "zod";
|
|
723
|
+
var schematic_path = z41.object({
|
|
724
|
+
type: z41.literal("schematic_path"),
|
|
725
|
+
schematic_component_id: z41.string(),
|
|
726
|
+
fill_color: z41.enum(["red", "blue"]).optional(),
|
|
727
|
+
is_filled: z41.boolean().optional(),
|
|
728
|
+
points: z41.array(point),
|
|
729
|
+
subcircuit_id: z41.string().optional()
|
|
712
730
|
});
|
|
713
731
|
expectTypesMatch(true);
|
|
714
732
|
|
|
715
733
|
// src/schematic/schematic_component.ts
|
|
716
|
-
import { z as
|
|
717
|
-
var schematic_pin_styles =
|
|
718
|
-
|
|
734
|
+
import { z as z42 } from "zod";
|
|
735
|
+
var schematic_pin_styles = z42.record(
|
|
736
|
+
z42.object({
|
|
719
737
|
left_margin: length.optional(),
|
|
720
738
|
right_margin: length.optional(),
|
|
721
739
|
top_margin: length.optional(),
|
|
722
740
|
bottom_margin: length.optional()
|
|
723
741
|
})
|
|
724
742
|
);
|
|
725
|
-
var schematic_component_port_arrangement_by_size =
|
|
726
|
-
left_size:
|
|
727
|
-
right_size:
|
|
728
|
-
top_size:
|
|
729
|
-
bottom_size:
|
|
743
|
+
var schematic_component_port_arrangement_by_size = z42.object({
|
|
744
|
+
left_size: z42.number(),
|
|
745
|
+
right_size: z42.number(),
|
|
746
|
+
top_size: z42.number().optional(),
|
|
747
|
+
bottom_size: z42.number().optional()
|
|
730
748
|
});
|
|
731
749
|
expectTypesMatch(true);
|
|
732
|
-
var schematic_component_port_arrangement_by_sides =
|
|
733
|
-
left_side:
|
|
734
|
-
pins:
|
|
750
|
+
var schematic_component_port_arrangement_by_sides = z42.object({
|
|
751
|
+
left_side: z42.object({
|
|
752
|
+
pins: z42.array(z42.number()),
|
|
735
753
|
// @ts-ignore
|
|
736
|
-
direction:
|
|
754
|
+
direction: z42.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
737
755
|
}).optional(),
|
|
738
|
-
right_side:
|
|
739
|
-
pins:
|
|
756
|
+
right_side: z42.object({
|
|
757
|
+
pins: z42.array(z42.number()),
|
|
740
758
|
// @ts-ignore
|
|
741
|
-
direction:
|
|
759
|
+
direction: z42.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
742
760
|
}).optional(),
|
|
743
|
-
top_side:
|
|
744
|
-
pins:
|
|
761
|
+
top_side: z42.object({
|
|
762
|
+
pins: z42.array(z42.number()),
|
|
745
763
|
// @ts-ignore
|
|
746
|
-
direction:
|
|
764
|
+
direction: z42.enum(["left-to-right", "right-to-left"]).optional()
|
|
747
765
|
}).optional(),
|
|
748
|
-
bottom_side:
|
|
749
|
-
pins:
|
|
766
|
+
bottom_side: z42.object({
|
|
767
|
+
pins: z42.array(z42.number()),
|
|
750
768
|
// @ts-ignore
|
|
751
|
-
direction:
|
|
769
|
+
direction: z42.enum(["left-to-right", "right-to-left"]).optional()
|
|
752
770
|
}).optional()
|
|
753
771
|
});
|
|
754
772
|
expectTypesMatch(true);
|
|
755
|
-
var port_arrangement =
|
|
773
|
+
var port_arrangement = z42.union([
|
|
756
774
|
schematic_component_port_arrangement_by_size,
|
|
757
775
|
schematic_component_port_arrangement_by_sides
|
|
758
776
|
]);
|
|
759
|
-
var schematic_component =
|
|
760
|
-
type:
|
|
777
|
+
var schematic_component = z42.object({
|
|
778
|
+
type: z42.literal("schematic_component"),
|
|
761
779
|
size,
|
|
762
780
|
center: point,
|
|
763
|
-
source_component_id:
|
|
764
|
-
schematic_component_id:
|
|
781
|
+
source_component_id: z42.string(),
|
|
782
|
+
schematic_component_id: z42.string(),
|
|
765
783
|
pin_spacing: length.optional(),
|
|
766
784
|
pin_styles: schematic_pin_styles.optional(),
|
|
767
785
|
box_width: length.optional(),
|
|
768
|
-
symbol_name:
|
|
786
|
+
symbol_name: z42.string().optional(),
|
|
769
787
|
port_arrangement: port_arrangement.optional(),
|
|
770
|
-
port_labels:
|
|
771
|
-
symbol_display_value:
|
|
772
|
-
subcircuit_id:
|
|
773
|
-
schematic_group_id:
|
|
788
|
+
port_labels: z42.record(z42.string()).optional(),
|
|
789
|
+
symbol_display_value: z42.string().optional(),
|
|
790
|
+
subcircuit_id: z42.string().optional(),
|
|
791
|
+
schematic_group_id: z42.string().optional()
|
|
774
792
|
});
|
|
775
793
|
expectTypesMatch(true);
|
|
776
794
|
|
|
777
795
|
// src/schematic/schematic_line.ts
|
|
778
|
-
import { z as
|
|
779
|
-
var schematic_line =
|
|
780
|
-
type:
|
|
781
|
-
schematic_component_id:
|
|
796
|
+
import { z as z43 } from "zod";
|
|
797
|
+
var schematic_line = z43.object({
|
|
798
|
+
type: z43.literal("schematic_line"),
|
|
799
|
+
schematic_component_id: z43.string(),
|
|
782
800
|
x1: distance,
|
|
783
801
|
x2: distance,
|
|
784
802
|
y1: distance,
|
|
785
803
|
y2: distance,
|
|
786
|
-
subcircuit_id:
|
|
804
|
+
subcircuit_id: z43.string().optional()
|
|
787
805
|
});
|
|
788
806
|
expectTypesMatch(true);
|
|
789
807
|
|
|
790
808
|
// src/schematic/schematic_trace.ts
|
|
791
|
-
import { z as
|
|
792
|
-
var schematic_trace =
|
|
793
|
-
type:
|
|
794
|
-
schematic_trace_id:
|
|
795
|
-
source_trace_id:
|
|
796
|
-
junctions:
|
|
797
|
-
|
|
798
|
-
x:
|
|
799
|
-
y:
|
|
809
|
+
import { z as z44 } from "zod";
|
|
810
|
+
var schematic_trace = z44.object({
|
|
811
|
+
type: z44.literal("schematic_trace"),
|
|
812
|
+
schematic_trace_id: z44.string(),
|
|
813
|
+
source_trace_id: z44.string(),
|
|
814
|
+
junctions: z44.array(
|
|
815
|
+
z44.object({
|
|
816
|
+
x: z44.number(),
|
|
817
|
+
y: z44.number()
|
|
800
818
|
})
|
|
801
819
|
),
|
|
802
|
-
edges:
|
|
803
|
-
|
|
804
|
-
from:
|
|
805
|
-
x:
|
|
806
|
-
y:
|
|
820
|
+
edges: z44.array(
|
|
821
|
+
z44.object({
|
|
822
|
+
from: z44.object({
|
|
823
|
+
x: z44.number(),
|
|
824
|
+
y: z44.number()
|
|
807
825
|
}),
|
|
808
|
-
to:
|
|
809
|
-
x:
|
|
810
|
-
y:
|
|
826
|
+
to: z44.object({
|
|
827
|
+
x: z44.number(),
|
|
828
|
+
y: z44.number()
|
|
811
829
|
}),
|
|
812
|
-
is_crossing:
|
|
813
|
-
from_schematic_port_id:
|
|
814
|
-
to_schematic_port_id:
|
|
830
|
+
is_crossing: z44.boolean().optional(),
|
|
831
|
+
from_schematic_port_id: z44.string().optional(),
|
|
832
|
+
to_schematic_port_id: z44.string().optional()
|
|
815
833
|
})
|
|
816
834
|
),
|
|
817
|
-
subcircuit_id:
|
|
835
|
+
subcircuit_id: z44.string().optional()
|
|
818
836
|
});
|
|
819
837
|
expectTypesMatch(true);
|
|
820
838
|
|
|
821
839
|
// src/schematic/schematic_text.ts
|
|
822
|
-
import { z as
|
|
840
|
+
import { z as z46 } from "zod";
|
|
823
841
|
|
|
824
842
|
// src/common/FivePointAnchor.ts
|
|
825
|
-
import { z as
|
|
826
|
-
var fivePointAnchor =
|
|
843
|
+
import { z as z45 } from "zod";
|
|
844
|
+
var fivePointAnchor = z45.enum([
|
|
827
845
|
"center",
|
|
828
846
|
"left",
|
|
829
847
|
"right",
|
|
@@ -833,109 +851,109 @@ var fivePointAnchor = z44.enum([
|
|
|
833
851
|
expectTypesMatch(true);
|
|
834
852
|
|
|
835
853
|
// src/schematic/schematic_text.ts
|
|
836
|
-
var schematic_text =
|
|
837
|
-
type:
|
|
838
|
-
schematic_component_id:
|
|
839
|
-
schematic_text_id:
|
|
840
|
-
text:
|
|
841
|
-
font_size:
|
|
842
|
-
position:
|
|
854
|
+
var schematic_text = z46.object({
|
|
855
|
+
type: z46.literal("schematic_text"),
|
|
856
|
+
schematic_component_id: z46.string().optional(),
|
|
857
|
+
schematic_text_id: z46.string(),
|
|
858
|
+
text: z46.string(),
|
|
859
|
+
font_size: z46.number().default(0.18),
|
|
860
|
+
position: z46.object({
|
|
843
861
|
x: distance,
|
|
844
862
|
y: distance
|
|
845
863
|
}),
|
|
846
|
-
rotation:
|
|
847
|
-
anchor:
|
|
848
|
-
color:
|
|
849
|
-
subcircuit_id:
|
|
864
|
+
rotation: z46.number().default(0),
|
|
865
|
+
anchor: z46.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
866
|
+
color: z46.string().default("#000000"),
|
|
867
|
+
subcircuit_id: z46.string().optional()
|
|
850
868
|
});
|
|
851
869
|
expectTypesMatch(true);
|
|
852
870
|
|
|
853
871
|
// src/schematic/schematic_port.ts
|
|
854
|
-
import { z as
|
|
855
|
-
var schematic_port =
|
|
856
|
-
type:
|
|
857
|
-
schematic_port_id:
|
|
858
|
-
source_port_id:
|
|
859
|
-
schematic_component_id:
|
|
872
|
+
import { z as z47 } from "zod";
|
|
873
|
+
var schematic_port = z47.object({
|
|
874
|
+
type: z47.literal("schematic_port"),
|
|
875
|
+
schematic_port_id: z47.string(),
|
|
876
|
+
source_port_id: z47.string(),
|
|
877
|
+
schematic_component_id: z47.string().optional(),
|
|
860
878
|
center: point,
|
|
861
|
-
facing_direction:
|
|
862
|
-
distance_from_component_edge:
|
|
863
|
-
side_of_component:
|
|
864
|
-
true_ccw_index:
|
|
865
|
-
pin_number:
|
|
866
|
-
display_pin_label:
|
|
867
|
-
subcircuit_id:
|
|
868
|
-
is_connected:
|
|
879
|
+
facing_direction: z47.enum(["up", "down", "left", "right"]).optional(),
|
|
880
|
+
distance_from_component_edge: z47.number().optional(),
|
|
881
|
+
side_of_component: z47.enum(["top", "bottom", "left", "right"]).optional(),
|
|
882
|
+
true_ccw_index: z47.number().optional(),
|
|
883
|
+
pin_number: z47.number().optional(),
|
|
884
|
+
display_pin_label: z47.string().optional(),
|
|
885
|
+
subcircuit_id: z47.string().optional(),
|
|
886
|
+
is_connected: z47.boolean().optional()
|
|
869
887
|
}).describe("Defines a port on a schematic component");
|
|
870
888
|
expectTypesMatch(true);
|
|
871
889
|
|
|
872
890
|
// src/schematic/schematic_net_label.ts
|
|
873
|
-
import { z as
|
|
874
|
-
var schematic_net_label =
|
|
875
|
-
type:
|
|
891
|
+
import { z as z48 } from "zod";
|
|
892
|
+
var schematic_net_label = z48.object({
|
|
893
|
+
type: z48.literal("schematic_net_label"),
|
|
876
894
|
schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
|
|
877
|
-
schematic_trace_id:
|
|
878
|
-
source_trace_id:
|
|
879
|
-
source_net_id:
|
|
895
|
+
schematic_trace_id: z48.string().optional(),
|
|
896
|
+
source_trace_id: z48.string().optional(),
|
|
897
|
+
source_net_id: z48.string(),
|
|
880
898
|
center: point,
|
|
881
899
|
anchor_position: point.optional(),
|
|
882
|
-
anchor_side:
|
|
883
|
-
text:
|
|
884
|
-
symbol_name:
|
|
885
|
-
is_movable:
|
|
886
|
-
subcircuit_id:
|
|
900
|
+
anchor_side: z48.enum(["top", "bottom", "left", "right"]),
|
|
901
|
+
text: z48.string(),
|
|
902
|
+
symbol_name: z48.string().optional(),
|
|
903
|
+
is_movable: z48.boolean().optional(),
|
|
904
|
+
subcircuit_id: z48.string().optional()
|
|
887
905
|
});
|
|
888
906
|
expectTypesMatch(true);
|
|
889
907
|
|
|
890
908
|
// src/schematic/schematic_error.ts
|
|
891
|
-
import { z as
|
|
892
|
-
var schematic_error =
|
|
893
|
-
type:
|
|
894
|
-
schematic_error_id:
|
|
909
|
+
import { z as z49 } from "zod";
|
|
910
|
+
var schematic_error = z49.object({
|
|
911
|
+
type: z49.literal("schematic_error"),
|
|
912
|
+
schematic_error_id: z49.string(),
|
|
895
913
|
// eventually each error type should be broken out into a dir of files
|
|
896
|
-
error_type:
|
|
897
|
-
message:
|
|
898
|
-
subcircuit_id:
|
|
914
|
+
error_type: z49.literal("schematic_port_not_found").default("schematic_port_not_found"),
|
|
915
|
+
message: z49.string(),
|
|
916
|
+
subcircuit_id: z49.string().optional()
|
|
899
917
|
}).describe("Defines a schematic error on the schematic");
|
|
900
918
|
expectTypesMatch(true);
|
|
901
919
|
|
|
902
920
|
// src/schematic/schematic_layout_error.ts
|
|
903
|
-
import { z as
|
|
904
|
-
var schematic_layout_error =
|
|
905
|
-
type:
|
|
921
|
+
import { z as z50 } from "zod";
|
|
922
|
+
var schematic_layout_error = z50.object({
|
|
923
|
+
type: z50.literal("schematic_layout_error"),
|
|
906
924
|
schematic_layout_error_id: getZodPrefixedIdWithDefault(
|
|
907
925
|
"schematic_layout_error"
|
|
908
926
|
),
|
|
909
|
-
error_type:
|
|
910
|
-
message:
|
|
911
|
-
source_group_id:
|
|
912
|
-
schematic_group_id:
|
|
913
|
-
subcircuit_id:
|
|
927
|
+
error_type: z50.literal("schematic_layout_error").default("schematic_layout_error"),
|
|
928
|
+
message: z50.string(),
|
|
929
|
+
source_group_id: z50.string(),
|
|
930
|
+
schematic_group_id: z50.string(),
|
|
931
|
+
subcircuit_id: z50.string().optional()
|
|
914
932
|
}).describe("Error emitted when schematic layout fails for a group");
|
|
915
933
|
expectTypesMatch(true);
|
|
916
934
|
|
|
917
935
|
// src/schematic/schematic_debug_object.ts
|
|
918
|
-
import { z as
|
|
919
|
-
var schematic_debug_object_base =
|
|
920
|
-
type:
|
|
921
|
-
label:
|
|
922
|
-
subcircuit_id:
|
|
936
|
+
import { z as z51 } from "zod";
|
|
937
|
+
var schematic_debug_object_base = z51.object({
|
|
938
|
+
type: z51.literal("schematic_debug_object"),
|
|
939
|
+
label: z51.string().optional(),
|
|
940
|
+
subcircuit_id: z51.string().optional()
|
|
923
941
|
});
|
|
924
942
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
925
|
-
shape:
|
|
943
|
+
shape: z51.literal("rect"),
|
|
926
944
|
center: point,
|
|
927
945
|
size
|
|
928
946
|
});
|
|
929
947
|
var schematic_debug_line = schematic_debug_object_base.extend({
|
|
930
|
-
shape:
|
|
948
|
+
shape: z51.literal("line"),
|
|
931
949
|
start: point,
|
|
932
950
|
end: point
|
|
933
951
|
});
|
|
934
952
|
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
935
|
-
shape:
|
|
953
|
+
shape: z51.literal("point"),
|
|
936
954
|
center: point
|
|
937
955
|
});
|
|
938
|
-
var schematic_debug_object =
|
|
956
|
+
var schematic_debug_object = z51.discriminatedUnion("shape", [
|
|
939
957
|
schematic_debug_rect,
|
|
940
958
|
schematic_debug_line,
|
|
941
959
|
schematic_debug_point
|
|
@@ -943,93 +961,93 @@ var schematic_debug_object = z50.discriminatedUnion("shape", [
|
|
|
943
961
|
expectTypesMatch(true);
|
|
944
962
|
|
|
945
963
|
// src/schematic/schematic_voltage_probe.ts
|
|
946
|
-
import { z as
|
|
947
|
-
var schematic_voltage_probe =
|
|
948
|
-
type:
|
|
949
|
-
schematic_voltage_probe_id:
|
|
964
|
+
import { z as z52 } from "zod";
|
|
965
|
+
var schematic_voltage_probe = z52.object({
|
|
966
|
+
type: z52.literal("schematic_voltage_probe"),
|
|
967
|
+
schematic_voltage_probe_id: z52.string(),
|
|
950
968
|
position: point,
|
|
951
|
-
schematic_trace_id:
|
|
969
|
+
schematic_trace_id: z52.string(),
|
|
952
970
|
voltage: voltage.optional(),
|
|
953
|
-
subcircuit_id:
|
|
971
|
+
subcircuit_id: z52.string().optional()
|
|
954
972
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
955
973
|
expectTypesMatch(true);
|
|
956
974
|
|
|
957
975
|
// src/schematic/schematic_manual_edit_conflict_warning.ts
|
|
958
|
-
import { z as
|
|
959
|
-
var schematic_manual_edit_conflict_warning =
|
|
960
|
-
type:
|
|
976
|
+
import { z as z53 } from "zod";
|
|
977
|
+
var schematic_manual_edit_conflict_warning = z53.object({
|
|
978
|
+
type: z53.literal("schematic_manual_edit_conflict_warning"),
|
|
961
979
|
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
962
980
|
"schematic_manual_edit_conflict_warning"
|
|
963
981
|
),
|
|
964
|
-
warning_type:
|
|
965
|
-
message:
|
|
966
|
-
schematic_component_id:
|
|
967
|
-
schematic_group_id:
|
|
968
|
-
subcircuit_id:
|
|
969
|
-
source_component_id:
|
|
982
|
+
warning_type: z53.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),
|
|
983
|
+
message: z53.string(),
|
|
984
|
+
schematic_component_id: z53.string(),
|
|
985
|
+
schematic_group_id: z53.string().optional(),
|
|
986
|
+
subcircuit_id: z53.string().optional(),
|
|
987
|
+
source_component_id: z53.string()
|
|
970
988
|
}).describe(
|
|
971
989
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
972
990
|
);
|
|
973
991
|
expectTypesMatch(true);
|
|
974
992
|
|
|
975
993
|
// src/schematic/schematic_group.ts
|
|
976
|
-
import { z as
|
|
977
|
-
var schematic_group =
|
|
978
|
-
type:
|
|
994
|
+
import { z as z54 } from "zod";
|
|
995
|
+
var schematic_group = z54.object({
|
|
996
|
+
type: z54.literal("schematic_group"),
|
|
979
997
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
980
|
-
source_group_id:
|
|
981
|
-
is_subcircuit:
|
|
982
|
-
subcircuit_id:
|
|
998
|
+
source_group_id: z54.string(),
|
|
999
|
+
is_subcircuit: z54.boolean().optional(),
|
|
1000
|
+
subcircuit_id: z54.string().optional(),
|
|
983
1001
|
width: length,
|
|
984
1002
|
height: length,
|
|
985
1003
|
center: point,
|
|
986
|
-
schematic_component_ids:
|
|
987
|
-
name:
|
|
988
|
-
description:
|
|
1004
|
+
schematic_component_ids: z54.array(z54.string()),
|
|
1005
|
+
name: z54.string().optional(),
|
|
1006
|
+
description: z54.string().optional()
|
|
989
1007
|
}).describe("Defines a group of components on the schematic");
|
|
990
1008
|
expectTypesMatch(true);
|
|
991
1009
|
|
|
992
1010
|
// src/schematic/schematic_table.ts
|
|
993
|
-
import { z as
|
|
994
|
-
var schematic_table =
|
|
995
|
-
type:
|
|
1011
|
+
import { z as z55 } from "zod";
|
|
1012
|
+
var schematic_table = z55.object({
|
|
1013
|
+
type: z55.literal("schematic_table"),
|
|
996
1014
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
997
1015
|
anchor_position: point,
|
|
998
|
-
column_widths:
|
|
999
|
-
row_heights:
|
|
1016
|
+
column_widths: z55.array(distance),
|
|
1017
|
+
row_heights: z55.array(distance),
|
|
1000
1018
|
cell_padding: distance.optional(),
|
|
1001
1019
|
border_width: distance.optional(),
|
|
1002
|
-
subcircuit_id:
|
|
1003
|
-
schematic_component_id:
|
|
1020
|
+
subcircuit_id: z55.string().optional(),
|
|
1021
|
+
schematic_component_id: z55.string().optional(),
|
|
1004
1022
|
anchor: ninePointAnchor.optional()
|
|
1005
1023
|
}).describe("Defines a table on the schematic");
|
|
1006
1024
|
expectTypesMatch(true);
|
|
1007
1025
|
|
|
1008
1026
|
// src/schematic/schematic_table_cell.ts
|
|
1009
|
-
import { z as
|
|
1010
|
-
var schematic_table_cell =
|
|
1011
|
-
type:
|
|
1027
|
+
import { z as z56 } from "zod";
|
|
1028
|
+
var schematic_table_cell = z56.object({
|
|
1029
|
+
type: z56.literal("schematic_table_cell"),
|
|
1012
1030
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
1013
1031
|
"schematic_table_cell"
|
|
1014
1032
|
),
|
|
1015
|
-
schematic_table_id:
|
|
1016
|
-
start_row_index:
|
|
1017
|
-
end_row_index:
|
|
1018
|
-
start_column_index:
|
|
1019
|
-
end_column_index:
|
|
1020
|
-
text:
|
|
1033
|
+
schematic_table_id: z56.string(),
|
|
1034
|
+
start_row_index: z56.number(),
|
|
1035
|
+
end_row_index: z56.number(),
|
|
1036
|
+
start_column_index: z56.number(),
|
|
1037
|
+
end_column_index: z56.number(),
|
|
1038
|
+
text: z56.string().optional(),
|
|
1021
1039
|
center: point,
|
|
1022
1040
|
width: distance,
|
|
1023
1041
|
height: distance,
|
|
1024
|
-
horizontal_align:
|
|
1025
|
-
vertical_align:
|
|
1042
|
+
horizontal_align: z56.enum(["left", "center", "right"]).optional(),
|
|
1043
|
+
vertical_align: z56.enum(["top", "middle", "bottom"]).optional(),
|
|
1026
1044
|
font_size: distance.optional(),
|
|
1027
|
-
subcircuit_id:
|
|
1045
|
+
subcircuit_id: z56.string().optional()
|
|
1028
1046
|
}).describe("Defines a cell within a schematic_table");
|
|
1029
1047
|
expectTypesMatch(true);
|
|
1030
1048
|
|
|
1031
1049
|
// src/pcb/properties/layer_ref.ts
|
|
1032
|
-
import { z as
|
|
1050
|
+
import { z as z57 } from "zod";
|
|
1033
1051
|
var all_layers = [
|
|
1034
1052
|
"top",
|
|
1035
1053
|
"bottom",
|
|
@@ -1040,9 +1058,9 @@ var all_layers = [
|
|
|
1040
1058
|
"inner5",
|
|
1041
1059
|
"inner6"
|
|
1042
1060
|
];
|
|
1043
|
-
var layer_string =
|
|
1061
|
+
var layer_string = z57.enum(all_layers);
|
|
1044
1062
|
var layer_ref = layer_string.or(
|
|
1045
|
-
|
|
1063
|
+
z57.object({
|
|
1046
1064
|
name: layer_string
|
|
1047
1065
|
})
|
|
1048
1066
|
).transform((layer) => {
|
|
@@ -1052,56 +1070,56 @@ var layer_ref = layer_string.or(
|
|
|
1052
1070
|
return layer.name;
|
|
1053
1071
|
});
|
|
1054
1072
|
expectTypesMatch(true);
|
|
1055
|
-
var visible_layer =
|
|
1073
|
+
var visible_layer = z57.enum(["top", "bottom"]);
|
|
1056
1074
|
|
|
1057
1075
|
// src/pcb/properties/pcb_route_hints.ts
|
|
1058
|
-
import { z as
|
|
1059
|
-
var pcb_route_hint =
|
|
1076
|
+
import { z as z58 } from "zod";
|
|
1077
|
+
var pcb_route_hint = z58.object({
|
|
1060
1078
|
x: distance,
|
|
1061
1079
|
y: distance,
|
|
1062
|
-
via:
|
|
1080
|
+
via: z58.boolean().optional(),
|
|
1063
1081
|
via_to_layer: layer_ref.optional()
|
|
1064
1082
|
});
|
|
1065
|
-
var pcb_route_hints =
|
|
1083
|
+
var pcb_route_hints = z58.array(pcb_route_hint);
|
|
1066
1084
|
expectTypesMatch(true);
|
|
1067
1085
|
expectTypesMatch(true);
|
|
1068
1086
|
|
|
1069
1087
|
// src/pcb/properties/route_hint_point.ts
|
|
1070
|
-
import { z as
|
|
1071
|
-
var route_hint_point =
|
|
1088
|
+
import { z as z59 } from "zod";
|
|
1089
|
+
var route_hint_point = z59.object({
|
|
1072
1090
|
x: distance,
|
|
1073
1091
|
y: distance,
|
|
1074
|
-
via:
|
|
1092
|
+
via: z59.boolean().optional(),
|
|
1075
1093
|
to_layer: layer_ref.optional(),
|
|
1076
1094
|
trace_width: distance.optional()
|
|
1077
1095
|
});
|
|
1078
1096
|
expectTypesMatch(true);
|
|
1079
1097
|
|
|
1080
1098
|
// src/pcb/pcb_component.ts
|
|
1081
|
-
import { z as
|
|
1082
|
-
var pcb_component =
|
|
1083
|
-
type:
|
|
1099
|
+
import { z as z60 } from "zod";
|
|
1100
|
+
var pcb_component = z60.object({
|
|
1101
|
+
type: z60.literal("pcb_component"),
|
|
1084
1102
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
1085
|
-
source_component_id:
|
|
1103
|
+
source_component_id: z60.string(),
|
|
1086
1104
|
center: point,
|
|
1087
1105
|
layer: layer_ref,
|
|
1088
1106
|
rotation,
|
|
1089
1107
|
width: length,
|
|
1090
1108
|
height: length,
|
|
1091
|
-
subcircuit_id:
|
|
1092
|
-
pcb_group_id:
|
|
1109
|
+
subcircuit_id: z60.string().optional(),
|
|
1110
|
+
pcb_group_id: z60.string().optional()
|
|
1093
1111
|
}).describe("Defines a component on the PCB");
|
|
1094
1112
|
expectTypesMatch(true);
|
|
1095
1113
|
|
|
1096
1114
|
// src/pcb/pcb_hole.ts
|
|
1097
|
-
import { z as
|
|
1098
|
-
var pcb_hole_circle_or_square =
|
|
1099
|
-
type:
|
|
1115
|
+
import { z as z61 } from "zod";
|
|
1116
|
+
var pcb_hole_circle_or_square = z61.object({
|
|
1117
|
+
type: z61.literal("pcb_hole"),
|
|
1100
1118
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1101
|
-
pcb_group_id:
|
|
1102
|
-
subcircuit_id:
|
|
1103
|
-
hole_shape:
|
|
1104
|
-
hole_diameter:
|
|
1119
|
+
pcb_group_id: z61.string().optional(),
|
|
1120
|
+
subcircuit_id: z61.string().optional(),
|
|
1121
|
+
hole_shape: z61.enum(["circle", "square"]),
|
|
1122
|
+
hole_diameter: z61.number(),
|
|
1105
1123
|
x: distance,
|
|
1106
1124
|
y: distance
|
|
1107
1125
|
});
|
|
@@ -1109,14 +1127,14 @@ var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
|
1109
1127
|
"Defines a circular or square hole on the PCB"
|
|
1110
1128
|
);
|
|
1111
1129
|
expectTypesMatch(true);
|
|
1112
|
-
var pcb_hole_oval =
|
|
1113
|
-
type:
|
|
1130
|
+
var pcb_hole_oval = z61.object({
|
|
1131
|
+
type: z61.literal("pcb_hole"),
|
|
1114
1132
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1115
|
-
pcb_group_id:
|
|
1116
|
-
subcircuit_id:
|
|
1117
|
-
hole_shape:
|
|
1118
|
-
hole_width:
|
|
1119
|
-
hole_height:
|
|
1133
|
+
pcb_group_id: z61.string().optional(),
|
|
1134
|
+
subcircuit_id: z61.string().optional(),
|
|
1135
|
+
hole_shape: z61.literal("oval"),
|
|
1136
|
+
hole_width: z61.number(),
|
|
1137
|
+
hole_height: z61.number(),
|
|
1120
1138
|
x: distance,
|
|
1121
1139
|
y: distance
|
|
1122
1140
|
});
|
|
@@ -1127,98 +1145,98 @@ expectTypesMatch(true);
|
|
|
1127
1145
|
var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval);
|
|
1128
1146
|
|
|
1129
1147
|
// src/pcb/pcb_plated_hole.ts
|
|
1130
|
-
import { z as
|
|
1131
|
-
var pcb_plated_hole_circle =
|
|
1132
|
-
type:
|
|
1133
|
-
shape:
|
|
1134
|
-
pcb_group_id:
|
|
1135
|
-
subcircuit_id:
|
|
1136
|
-
outer_diameter:
|
|
1137
|
-
hole_diameter:
|
|
1148
|
+
import { z as z62 } from "zod";
|
|
1149
|
+
var pcb_plated_hole_circle = z62.object({
|
|
1150
|
+
type: z62.literal("pcb_plated_hole"),
|
|
1151
|
+
shape: z62.literal("circle"),
|
|
1152
|
+
pcb_group_id: z62.string().optional(),
|
|
1153
|
+
subcircuit_id: z62.string().optional(),
|
|
1154
|
+
outer_diameter: z62.number(),
|
|
1155
|
+
hole_diameter: z62.number(),
|
|
1138
1156
|
x: distance,
|
|
1139
1157
|
y: distance,
|
|
1140
|
-
layers:
|
|
1141
|
-
port_hints:
|
|
1142
|
-
pcb_component_id:
|
|
1143
|
-
pcb_port_id:
|
|
1158
|
+
layers: z62.array(layer_ref),
|
|
1159
|
+
port_hints: z62.array(z62.string()).optional(),
|
|
1160
|
+
pcb_component_id: z62.string().optional(),
|
|
1161
|
+
pcb_port_id: z62.string().optional(),
|
|
1144
1162
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1145
1163
|
});
|
|
1146
|
-
var pcb_plated_hole_oval =
|
|
1147
|
-
type:
|
|
1148
|
-
shape:
|
|
1149
|
-
pcb_group_id:
|
|
1150
|
-
subcircuit_id:
|
|
1151
|
-
outer_width:
|
|
1152
|
-
outer_height:
|
|
1153
|
-
hole_width:
|
|
1154
|
-
hole_height:
|
|
1164
|
+
var pcb_plated_hole_oval = z62.object({
|
|
1165
|
+
type: z62.literal("pcb_plated_hole"),
|
|
1166
|
+
shape: z62.enum(["oval", "pill"]),
|
|
1167
|
+
pcb_group_id: z62.string().optional(),
|
|
1168
|
+
subcircuit_id: z62.string().optional(),
|
|
1169
|
+
outer_width: z62.number(),
|
|
1170
|
+
outer_height: z62.number(),
|
|
1171
|
+
hole_width: z62.number(),
|
|
1172
|
+
hole_height: z62.number(),
|
|
1155
1173
|
x: distance,
|
|
1156
1174
|
y: distance,
|
|
1157
|
-
layers:
|
|
1158
|
-
port_hints:
|
|
1159
|
-
pcb_component_id:
|
|
1160
|
-
pcb_port_id:
|
|
1175
|
+
layers: z62.array(layer_ref),
|
|
1176
|
+
port_hints: z62.array(z62.string()).optional(),
|
|
1177
|
+
pcb_component_id: z62.string().optional(),
|
|
1178
|
+
pcb_port_id: z62.string().optional(),
|
|
1161
1179
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1162
1180
|
});
|
|
1163
|
-
var pcb_circular_hole_with_rect_pad =
|
|
1164
|
-
type:
|
|
1165
|
-
shape:
|
|
1166
|
-
pcb_group_id:
|
|
1167
|
-
subcircuit_id:
|
|
1168
|
-
hole_shape:
|
|
1169
|
-
pad_shape:
|
|
1170
|
-
hole_diameter:
|
|
1171
|
-
rect_pad_width:
|
|
1172
|
-
rect_pad_height:
|
|
1181
|
+
var pcb_circular_hole_with_rect_pad = z62.object({
|
|
1182
|
+
type: z62.literal("pcb_plated_hole"),
|
|
1183
|
+
shape: z62.literal("circular_hole_with_rect_pad"),
|
|
1184
|
+
pcb_group_id: z62.string().optional(),
|
|
1185
|
+
subcircuit_id: z62.string().optional(),
|
|
1186
|
+
hole_shape: z62.literal("circle"),
|
|
1187
|
+
pad_shape: z62.literal("rect"),
|
|
1188
|
+
hole_diameter: z62.number(),
|
|
1189
|
+
rect_pad_width: z62.number(),
|
|
1190
|
+
rect_pad_height: z62.number(),
|
|
1173
1191
|
x: distance,
|
|
1174
1192
|
y: distance,
|
|
1175
|
-
layers:
|
|
1176
|
-
port_hints:
|
|
1177
|
-
pcb_component_id:
|
|
1178
|
-
pcb_port_id:
|
|
1193
|
+
layers: z62.array(layer_ref),
|
|
1194
|
+
port_hints: z62.array(z62.string()).optional(),
|
|
1195
|
+
pcb_component_id: z62.string().optional(),
|
|
1196
|
+
pcb_port_id: z62.string().optional(),
|
|
1179
1197
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1180
1198
|
});
|
|
1181
|
-
var pcb_pill_hole_with_rect_pad =
|
|
1182
|
-
type:
|
|
1183
|
-
shape:
|
|
1184
|
-
pcb_group_id:
|
|
1185
|
-
subcircuit_id:
|
|
1186
|
-
hole_shape:
|
|
1187
|
-
pad_shape:
|
|
1188
|
-
hole_width:
|
|
1189
|
-
hole_height:
|
|
1190
|
-
rect_pad_width:
|
|
1191
|
-
rect_pad_height:
|
|
1199
|
+
var pcb_pill_hole_with_rect_pad = z62.object({
|
|
1200
|
+
type: z62.literal("pcb_plated_hole"),
|
|
1201
|
+
shape: z62.literal("pill_hole_with_rect_pad"),
|
|
1202
|
+
pcb_group_id: z62.string().optional(),
|
|
1203
|
+
subcircuit_id: z62.string().optional(),
|
|
1204
|
+
hole_shape: z62.literal("pill"),
|
|
1205
|
+
pad_shape: z62.literal("rect"),
|
|
1206
|
+
hole_width: z62.number(),
|
|
1207
|
+
hole_height: z62.number(),
|
|
1208
|
+
rect_pad_width: z62.number(),
|
|
1209
|
+
rect_pad_height: z62.number(),
|
|
1192
1210
|
x: distance,
|
|
1193
1211
|
y: distance,
|
|
1194
|
-
layers:
|
|
1195
|
-
port_hints:
|
|
1196
|
-
pcb_component_id:
|
|
1197
|
-
pcb_port_id:
|
|
1212
|
+
layers: z62.array(layer_ref),
|
|
1213
|
+
port_hints: z62.array(z62.string()).optional(),
|
|
1214
|
+
pcb_component_id: z62.string().optional(),
|
|
1215
|
+
pcb_port_id: z62.string().optional(),
|
|
1198
1216
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1199
1217
|
});
|
|
1200
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
1201
|
-
type:
|
|
1202
|
-
shape:
|
|
1203
|
-
pcb_group_id:
|
|
1204
|
-
subcircuit_id:
|
|
1205
|
-
hole_shape:
|
|
1206
|
-
pad_shape:
|
|
1207
|
-
hole_width:
|
|
1208
|
-
hole_height:
|
|
1218
|
+
var pcb_rotated_pill_hole_with_rect_pad = z62.object({
|
|
1219
|
+
type: z62.literal("pcb_plated_hole"),
|
|
1220
|
+
shape: z62.literal("rotated_pill_hole_with_rect_pad"),
|
|
1221
|
+
pcb_group_id: z62.string().optional(),
|
|
1222
|
+
subcircuit_id: z62.string().optional(),
|
|
1223
|
+
hole_shape: z62.literal("rotated_pill"),
|
|
1224
|
+
pad_shape: z62.literal("rect"),
|
|
1225
|
+
hole_width: z62.number(),
|
|
1226
|
+
hole_height: z62.number(),
|
|
1209
1227
|
hole_ccw_rotation: rotation,
|
|
1210
|
-
rect_pad_width:
|
|
1211
|
-
rect_pad_height:
|
|
1228
|
+
rect_pad_width: z62.number(),
|
|
1229
|
+
rect_pad_height: z62.number(),
|
|
1212
1230
|
rect_ccw_rotation: rotation,
|
|
1213
1231
|
x: distance,
|
|
1214
1232
|
y: distance,
|
|
1215
|
-
layers:
|
|
1216
|
-
port_hints:
|
|
1217
|
-
pcb_component_id:
|
|
1218
|
-
pcb_port_id:
|
|
1233
|
+
layers: z62.array(layer_ref),
|
|
1234
|
+
port_hints: z62.array(z62.string()).optional(),
|
|
1235
|
+
pcb_component_id: z62.string().optional(),
|
|
1236
|
+
pcb_port_id: z62.string().optional(),
|
|
1219
1237
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1220
1238
|
});
|
|
1221
|
-
var pcb_plated_hole =
|
|
1239
|
+
var pcb_plated_hole = z62.union([
|
|
1222
1240
|
pcb_plated_hole_circle,
|
|
1223
1241
|
pcb_plated_hole_oval,
|
|
1224
1242
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -1234,113 +1252,113 @@ expectTypesMatch(true);
|
|
|
1234
1252
|
expectTypesMatch(true);
|
|
1235
1253
|
|
|
1236
1254
|
// src/pcb/pcb_port.ts
|
|
1237
|
-
import { z as
|
|
1238
|
-
var pcb_port =
|
|
1239
|
-
type:
|
|
1255
|
+
import { z as z63 } from "zod";
|
|
1256
|
+
var pcb_port = z63.object({
|
|
1257
|
+
type: z63.literal("pcb_port"),
|
|
1240
1258
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
1241
|
-
pcb_group_id:
|
|
1242
|
-
subcircuit_id:
|
|
1243
|
-
source_port_id:
|
|
1244
|
-
pcb_component_id:
|
|
1259
|
+
pcb_group_id: z63.string().optional(),
|
|
1260
|
+
subcircuit_id: z63.string().optional(),
|
|
1261
|
+
source_port_id: z63.string(),
|
|
1262
|
+
pcb_component_id: z63.string(),
|
|
1245
1263
|
x: distance,
|
|
1246
1264
|
y: distance,
|
|
1247
|
-
layers:
|
|
1265
|
+
layers: z63.array(layer_ref)
|
|
1248
1266
|
}).describe("Defines a port on the PCB");
|
|
1249
1267
|
expectTypesMatch(true);
|
|
1250
1268
|
|
|
1251
1269
|
// src/pcb/pcb_smtpad.ts
|
|
1252
|
-
import { z as
|
|
1253
|
-
var pcb_smtpad_circle =
|
|
1254
|
-
type:
|
|
1255
|
-
shape:
|
|
1270
|
+
import { z as z64 } from "zod";
|
|
1271
|
+
var pcb_smtpad_circle = z64.object({
|
|
1272
|
+
type: z64.literal("pcb_smtpad"),
|
|
1273
|
+
shape: z64.literal("circle"),
|
|
1256
1274
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1257
|
-
pcb_group_id:
|
|
1258
|
-
subcircuit_id:
|
|
1275
|
+
pcb_group_id: z64.string().optional(),
|
|
1276
|
+
subcircuit_id: z64.string().optional(),
|
|
1259
1277
|
x: distance,
|
|
1260
1278
|
y: distance,
|
|
1261
|
-
radius:
|
|
1279
|
+
radius: z64.number(),
|
|
1262
1280
|
layer: layer_ref,
|
|
1263
|
-
port_hints:
|
|
1264
|
-
pcb_component_id:
|
|
1265
|
-
pcb_port_id:
|
|
1281
|
+
port_hints: z64.array(z64.string()).optional(),
|
|
1282
|
+
pcb_component_id: z64.string().optional(),
|
|
1283
|
+
pcb_port_id: z64.string().optional()
|
|
1266
1284
|
});
|
|
1267
|
-
var pcb_smtpad_rect =
|
|
1268
|
-
type:
|
|
1269
|
-
shape:
|
|
1285
|
+
var pcb_smtpad_rect = z64.object({
|
|
1286
|
+
type: z64.literal("pcb_smtpad"),
|
|
1287
|
+
shape: z64.literal("rect"),
|
|
1270
1288
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1271
|
-
pcb_group_id:
|
|
1272
|
-
subcircuit_id:
|
|
1289
|
+
pcb_group_id: z64.string().optional(),
|
|
1290
|
+
subcircuit_id: z64.string().optional(),
|
|
1273
1291
|
x: distance,
|
|
1274
1292
|
y: distance,
|
|
1275
|
-
width:
|
|
1276
|
-
height:
|
|
1293
|
+
width: z64.number(),
|
|
1294
|
+
height: z64.number(),
|
|
1277
1295
|
layer: layer_ref,
|
|
1278
|
-
port_hints:
|
|
1279
|
-
pcb_component_id:
|
|
1280
|
-
pcb_port_id:
|
|
1296
|
+
port_hints: z64.array(z64.string()).optional(),
|
|
1297
|
+
pcb_component_id: z64.string().optional(),
|
|
1298
|
+
pcb_port_id: z64.string().optional()
|
|
1281
1299
|
});
|
|
1282
|
-
var pcb_smtpad_rotated_rect =
|
|
1283
|
-
type:
|
|
1284
|
-
shape:
|
|
1300
|
+
var pcb_smtpad_rotated_rect = z64.object({
|
|
1301
|
+
type: z64.literal("pcb_smtpad"),
|
|
1302
|
+
shape: z64.literal("rotated_rect"),
|
|
1285
1303
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1286
|
-
pcb_group_id:
|
|
1287
|
-
subcircuit_id:
|
|
1304
|
+
pcb_group_id: z64.string().optional(),
|
|
1305
|
+
subcircuit_id: z64.string().optional(),
|
|
1288
1306
|
x: distance,
|
|
1289
1307
|
y: distance,
|
|
1290
|
-
width:
|
|
1291
|
-
height:
|
|
1308
|
+
width: z64.number(),
|
|
1309
|
+
height: z64.number(),
|
|
1292
1310
|
ccw_rotation: rotation,
|
|
1293
1311
|
layer: layer_ref,
|
|
1294
|
-
port_hints:
|
|
1295
|
-
pcb_component_id:
|
|
1296
|
-
pcb_port_id:
|
|
1312
|
+
port_hints: z64.array(z64.string()).optional(),
|
|
1313
|
+
pcb_component_id: z64.string().optional(),
|
|
1314
|
+
pcb_port_id: z64.string().optional()
|
|
1297
1315
|
});
|
|
1298
|
-
var pcb_smtpad_pill =
|
|
1299
|
-
type:
|
|
1300
|
-
shape:
|
|
1316
|
+
var pcb_smtpad_pill = z64.object({
|
|
1317
|
+
type: z64.literal("pcb_smtpad"),
|
|
1318
|
+
shape: z64.literal("pill"),
|
|
1301
1319
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1302
|
-
pcb_group_id:
|
|
1303
|
-
subcircuit_id:
|
|
1320
|
+
pcb_group_id: z64.string().optional(),
|
|
1321
|
+
subcircuit_id: z64.string().optional(),
|
|
1304
1322
|
x: distance,
|
|
1305
1323
|
y: distance,
|
|
1306
|
-
width:
|
|
1307
|
-
height:
|
|
1308
|
-
radius:
|
|
1324
|
+
width: z64.number(),
|
|
1325
|
+
height: z64.number(),
|
|
1326
|
+
radius: z64.number(),
|
|
1309
1327
|
layer: layer_ref,
|
|
1310
|
-
port_hints:
|
|
1311
|
-
pcb_component_id:
|
|
1312
|
-
pcb_port_id:
|
|
1328
|
+
port_hints: z64.array(z64.string()).optional(),
|
|
1329
|
+
pcb_component_id: z64.string().optional(),
|
|
1330
|
+
pcb_port_id: z64.string().optional()
|
|
1313
1331
|
});
|
|
1314
|
-
var pcb_smtpad_rotated_pill =
|
|
1315
|
-
type:
|
|
1316
|
-
shape:
|
|
1332
|
+
var pcb_smtpad_rotated_pill = z64.object({
|
|
1333
|
+
type: z64.literal("pcb_smtpad"),
|
|
1334
|
+
shape: z64.literal("rotated_pill"),
|
|
1317
1335
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1318
|
-
pcb_group_id:
|
|
1319
|
-
subcircuit_id:
|
|
1336
|
+
pcb_group_id: z64.string().optional(),
|
|
1337
|
+
subcircuit_id: z64.string().optional(),
|
|
1320
1338
|
x: distance,
|
|
1321
1339
|
y: distance,
|
|
1322
|
-
width:
|
|
1323
|
-
height:
|
|
1324
|
-
radius:
|
|
1340
|
+
width: z64.number(),
|
|
1341
|
+
height: z64.number(),
|
|
1342
|
+
radius: z64.number(),
|
|
1325
1343
|
ccw_rotation: rotation,
|
|
1326
1344
|
layer: layer_ref,
|
|
1327
|
-
port_hints:
|
|
1328
|
-
pcb_component_id:
|
|
1329
|
-
pcb_port_id:
|
|
1345
|
+
port_hints: z64.array(z64.string()).optional(),
|
|
1346
|
+
pcb_component_id: z64.string().optional(),
|
|
1347
|
+
pcb_port_id: z64.string().optional()
|
|
1330
1348
|
});
|
|
1331
|
-
var pcb_smtpad_polygon =
|
|
1332
|
-
type:
|
|
1333
|
-
shape:
|
|
1349
|
+
var pcb_smtpad_polygon = z64.object({
|
|
1350
|
+
type: z64.literal("pcb_smtpad"),
|
|
1351
|
+
shape: z64.literal("polygon"),
|
|
1334
1352
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1335
|
-
pcb_group_id:
|
|
1336
|
-
subcircuit_id:
|
|
1337
|
-
points:
|
|
1353
|
+
pcb_group_id: z64.string().optional(),
|
|
1354
|
+
subcircuit_id: z64.string().optional(),
|
|
1355
|
+
points: z64.array(point),
|
|
1338
1356
|
layer: layer_ref,
|
|
1339
|
-
port_hints:
|
|
1340
|
-
pcb_component_id:
|
|
1341
|
-
pcb_port_id:
|
|
1357
|
+
port_hints: z64.array(z64.string()).optional(),
|
|
1358
|
+
pcb_component_id: z64.string().optional(),
|
|
1359
|
+
pcb_port_id: z64.string().optional()
|
|
1342
1360
|
});
|
|
1343
|
-
var pcb_smtpad =
|
|
1361
|
+
var pcb_smtpad = z64.discriminatedUnion("shape", [
|
|
1344
1362
|
pcb_smtpad_circle,
|
|
1345
1363
|
pcb_smtpad_rect,
|
|
1346
1364
|
pcb_smtpad_rotated_rect,
|
|
@@ -1356,79 +1374,79 @@ expectTypesMatch(true);
|
|
|
1356
1374
|
expectTypesMatch(true);
|
|
1357
1375
|
|
|
1358
1376
|
// src/pcb/pcb_solder_paste.ts
|
|
1359
|
-
import { z as
|
|
1360
|
-
var pcb_solder_paste_circle =
|
|
1361
|
-
type:
|
|
1362
|
-
shape:
|
|
1377
|
+
import { z as z65 } from "zod";
|
|
1378
|
+
var pcb_solder_paste_circle = z65.object({
|
|
1379
|
+
type: z65.literal("pcb_solder_paste"),
|
|
1380
|
+
shape: z65.literal("circle"),
|
|
1363
1381
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1364
|
-
pcb_group_id:
|
|
1365
|
-
subcircuit_id:
|
|
1382
|
+
pcb_group_id: z65.string().optional(),
|
|
1383
|
+
subcircuit_id: z65.string().optional(),
|
|
1366
1384
|
x: distance,
|
|
1367
1385
|
y: distance,
|
|
1368
|
-
radius:
|
|
1386
|
+
radius: z65.number(),
|
|
1369
1387
|
layer: layer_ref,
|
|
1370
|
-
pcb_component_id:
|
|
1371
|
-
pcb_smtpad_id:
|
|
1388
|
+
pcb_component_id: z65.string().optional(),
|
|
1389
|
+
pcb_smtpad_id: z65.string().optional()
|
|
1372
1390
|
});
|
|
1373
|
-
var pcb_solder_paste_rect =
|
|
1374
|
-
type:
|
|
1375
|
-
shape:
|
|
1391
|
+
var pcb_solder_paste_rect = z65.object({
|
|
1392
|
+
type: z65.literal("pcb_solder_paste"),
|
|
1393
|
+
shape: z65.literal("rect"),
|
|
1376
1394
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1377
|
-
pcb_group_id:
|
|
1378
|
-
subcircuit_id:
|
|
1395
|
+
pcb_group_id: z65.string().optional(),
|
|
1396
|
+
subcircuit_id: z65.string().optional(),
|
|
1379
1397
|
x: distance,
|
|
1380
1398
|
y: distance,
|
|
1381
|
-
width:
|
|
1382
|
-
height:
|
|
1399
|
+
width: z65.number(),
|
|
1400
|
+
height: z65.number(),
|
|
1383
1401
|
layer: layer_ref,
|
|
1384
|
-
pcb_component_id:
|
|
1385
|
-
pcb_smtpad_id:
|
|
1402
|
+
pcb_component_id: z65.string().optional(),
|
|
1403
|
+
pcb_smtpad_id: z65.string().optional()
|
|
1386
1404
|
});
|
|
1387
|
-
var pcb_solder_paste_pill =
|
|
1388
|
-
type:
|
|
1389
|
-
shape:
|
|
1405
|
+
var pcb_solder_paste_pill = z65.object({
|
|
1406
|
+
type: z65.literal("pcb_solder_paste"),
|
|
1407
|
+
shape: z65.literal("pill"),
|
|
1390
1408
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1391
|
-
pcb_group_id:
|
|
1392
|
-
subcircuit_id:
|
|
1409
|
+
pcb_group_id: z65.string().optional(),
|
|
1410
|
+
subcircuit_id: z65.string().optional(),
|
|
1393
1411
|
x: distance,
|
|
1394
1412
|
y: distance,
|
|
1395
|
-
width:
|
|
1396
|
-
height:
|
|
1397
|
-
radius:
|
|
1413
|
+
width: z65.number(),
|
|
1414
|
+
height: z65.number(),
|
|
1415
|
+
radius: z65.number(),
|
|
1398
1416
|
layer: layer_ref,
|
|
1399
|
-
pcb_component_id:
|
|
1400
|
-
pcb_smtpad_id:
|
|
1417
|
+
pcb_component_id: z65.string().optional(),
|
|
1418
|
+
pcb_smtpad_id: z65.string().optional()
|
|
1401
1419
|
});
|
|
1402
|
-
var pcb_solder_paste_rotated_rect =
|
|
1403
|
-
type:
|
|
1404
|
-
shape:
|
|
1420
|
+
var pcb_solder_paste_rotated_rect = z65.object({
|
|
1421
|
+
type: z65.literal("pcb_solder_paste"),
|
|
1422
|
+
shape: z65.literal("rotated_rect"),
|
|
1405
1423
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1406
|
-
pcb_group_id:
|
|
1407
|
-
subcircuit_id:
|
|
1424
|
+
pcb_group_id: z65.string().optional(),
|
|
1425
|
+
subcircuit_id: z65.string().optional(),
|
|
1408
1426
|
x: distance,
|
|
1409
1427
|
y: distance,
|
|
1410
|
-
width:
|
|
1411
|
-
height:
|
|
1428
|
+
width: z65.number(),
|
|
1429
|
+
height: z65.number(),
|
|
1412
1430
|
ccw_rotation: distance,
|
|
1413
1431
|
layer: layer_ref,
|
|
1414
|
-
pcb_component_id:
|
|
1415
|
-
pcb_smtpad_id:
|
|
1432
|
+
pcb_component_id: z65.string().optional(),
|
|
1433
|
+
pcb_smtpad_id: z65.string().optional()
|
|
1416
1434
|
});
|
|
1417
|
-
var pcb_solder_paste_oval =
|
|
1418
|
-
type:
|
|
1419
|
-
shape:
|
|
1435
|
+
var pcb_solder_paste_oval = z65.object({
|
|
1436
|
+
type: z65.literal("pcb_solder_paste"),
|
|
1437
|
+
shape: z65.literal("oval"),
|
|
1420
1438
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1421
|
-
pcb_group_id:
|
|
1422
|
-
subcircuit_id:
|
|
1439
|
+
pcb_group_id: z65.string().optional(),
|
|
1440
|
+
subcircuit_id: z65.string().optional(),
|
|
1423
1441
|
x: distance,
|
|
1424
1442
|
y: distance,
|
|
1425
|
-
width:
|
|
1426
|
-
height:
|
|
1443
|
+
width: z65.number(),
|
|
1444
|
+
height: z65.number(),
|
|
1427
1445
|
layer: layer_ref,
|
|
1428
|
-
pcb_component_id:
|
|
1429
|
-
pcb_smtpad_id:
|
|
1446
|
+
pcb_component_id: z65.string().optional(),
|
|
1447
|
+
pcb_smtpad_id: z65.string().optional()
|
|
1430
1448
|
});
|
|
1431
|
-
var pcb_solder_paste =
|
|
1449
|
+
var pcb_solder_paste = z65.union([
|
|
1432
1450
|
pcb_solder_paste_circle,
|
|
1433
1451
|
pcb_solder_paste_rect,
|
|
1434
1452
|
pcb_solder_paste_pill,
|
|
@@ -1444,134 +1462,134 @@ expectTypesMatch(
|
|
|
1444
1462
|
expectTypesMatch(true);
|
|
1445
1463
|
|
|
1446
1464
|
// src/pcb/pcb_text.ts
|
|
1447
|
-
import { z as
|
|
1448
|
-
var pcb_text =
|
|
1449
|
-
type:
|
|
1465
|
+
import { z as z66 } from "zod";
|
|
1466
|
+
var pcb_text = z66.object({
|
|
1467
|
+
type: z66.literal("pcb_text"),
|
|
1450
1468
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
1451
|
-
pcb_group_id:
|
|
1452
|
-
subcircuit_id:
|
|
1453
|
-
text:
|
|
1469
|
+
pcb_group_id: z66.string().optional(),
|
|
1470
|
+
subcircuit_id: z66.string().optional(),
|
|
1471
|
+
text: z66.string(),
|
|
1454
1472
|
center: point,
|
|
1455
1473
|
layer: layer_ref,
|
|
1456
1474
|
width: length,
|
|
1457
1475
|
height: length,
|
|
1458
|
-
lines:
|
|
1476
|
+
lines: z66.number(),
|
|
1459
1477
|
// @ts-ignore
|
|
1460
|
-
align:
|
|
1478
|
+
align: z66.enum(["bottom-left"])
|
|
1461
1479
|
}).describe("Defines text on the PCB");
|
|
1462
1480
|
expectTypesMatch(true);
|
|
1463
1481
|
|
|
1464
1482
|
// src/pcb/pcb_trace.ts
|
|
1465
|
-
import { z as
|
|
1466
|
-
var pcb_trace_route_point_wire =
|
|
1467
|
-
route_type:
|
|
1483
|
+
import { z as z67 } from "zod";
|
|
1484
|
+
var pcb_trace_route_point_wire = z67.object({
|
|
1485
|
+
route_type: z67.literal("wire"),
|
|
1468
1486
|
x: distance,
|
|
1469
1487
|
y: distance,
|
|
1470
1488
|
width: distance,
|
|
1471
|
-
start_pcb_port_id:
|
|
1472
|
-
end_pcb_port_id:
|
|
1489
|
+
start_pcb_port_id: z67.string().optional(),
|
|
1490
|
+
end_pcb_port_id: z67.string().optional(),
|
|
1473
1491
|
layer: layer_ref
|
|
1474
1492
|
});
|
|
1475
|
-
var pcb_trace_route_point_via =
|
|
1476
|
-
route_type:
|
|
1493
|
+
var pcb_trace_route_point_via = z67.object({
|
|
1494
|
+
route_type: z67.literal("via"),
|
|
1477
1495
|
x: distance,
|
|
1478
1496
|
y: distance,
|
|
1479
1497
|
hole_diameter: distance.optional(),
|
|
1480
1498
|
outer_diameter: distance.optional(),
|
|
1481
|
-
from_layer:
|
|
1482
|
-
to_layer:
|
|
1499
|
+
from_layer: z67.string(),
|
|
1500
|
+
to_layer: z67.string()
|
|
1483
1501
|
});
|
|
1484
|
-
var pcb_trace_route_point =
|
|
1502
|
+
var pcb_trace_route_point = z67.union([
|
|
1485
1503
|
pcb_trace_route_point_wire,
|
|
1486
1504
|
pcb_trace_route_point_via
|
|
1487
1505
|
]);
|
|
1488
|
-
var pcb_trace =
|
|
1489
|
-
type:
|
|
1490
|
-
source_trace_id:
|
|
1491
|
-
pcb_component_id:
|
|
1506
|
+
var pcb_trace = z67.object({
|
|
1507
|
+
type: z67.literal("pcb_trace"),
|
|
1508
|
+
source_trace_id: z67.string().optional(),
|
|
1509
|
+
pcb_component_id: z67.string().optional(),
|
|
1492
1510
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
1493
|
-
pcb_group_id:
|
|
1494
|
-
subcircuit_id:
|
|
1495
|
-
route_thickness_mode:
|
|
1496
|
-
route_order_index:
|
|
1497
|
-
should_round_corners:
|
|
1498
|
-
trace_length:
|
|
1499
|
-
route:
|
|
1511
|
+
pcb_group_id: z67.string().optional(),
|
|
1512
|
+
subcircuit_id: z67.string().optional(),
|
|
1513
|
+
route_thickness_mode: z67.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
1514
|
+
route_order_index: z67.number().optional(),
|
|
1515
|
+
should_round_corners: z67.boolean().optional(),
|
|
1516
|
+
trace_length: z67.number().optional(),
|
|
1517
|
+
route: z67.array(pcb_trace_route_point)
|
|
1500
1518
|
}).describe("Defines a trace on the PCB");
|
|
1501
1519
|
expectTypesMatch(true);
|
|
1502
1520
|
expectTypesMatch(true);
|
|
1503
1521
|
|
|
1504
1522
|
// src/pcb/pcb_trace_error.ts
|
|
1505
|
-
import { z as
|
|
1506
|
-
var pcb_trace_error =
|
|
1507
|
-
type:
|
|
1523
|
+
import { z as z68 } from "zod";
|
|
1524
|
+
var pcb_trace_error = z68.object({
|
|
1525
|
+
type: z68.literal("pcb_trace_error"),
|
|
1508
1526
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
1509
|
-
error_type:
|
|
1510
|
-
message:
|
|
1527
|
+
error_type: z68.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
1528
|
+
message: z68.string(),
|
|
1511
1529
|
center: point.optional(),
|
|
1512
|
-
pcb_trace_id:
|
|
1513
|
-
source_trace_id:
|
|
1514
|
-
pcb_component_ids:
|
|
1515
|
-
pcb_port_ids:
|
|
1516
|
-
subcircuit_id:
|
|
1530
|
+
pcb_trace_id: z68.string(),
|
|
1531
|
+
source_trace_id: z68.string(),
|
|
1532
|
+
pcb_component_ids: z68.array(z68.string()),
|
|
1533
|
+
pcb_port_ids: z68.array(z68.string()),
|
|
1534
|
+
subcircuit_id: z68.string().optional()
|
|
1517
1535
|
}).describe("Defines a trace error on the PCB");
|
|
1518
1536
|
expectTypesMatch(true);
|
|
1519
1537
|
|
|
1520
1538
|
// src/pcb/pcb_trace_missing_error.ts
|
|
1521
|
-
import { z as
|
|
1522
|
-
var pcb_trace_missing_error =
|
|
1523
|
-
type:
|
|
1539
|
+
import { z as z69 } from "zod";
|
|
1540
|
+
var pcb_trace_missing_error = z69.object({
|
|
1541
|
+
type: z69.literal("pcb_trace_missing_error"),
|
|
1524
1542
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
1525
1543
|
"pcb_trace_missing_error"
|
|
1526
1544
|
),
|
|
1527
|
-
error_type:
|
|
1528
|
-
message:
|
|
1545
|
+
error_type: z69.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
1546
|
+
message: z69.string(),
|
|
1529
1547
|
center: point.optional(),
|
|
1530
|
-
source_trace_id:
|
|
1531
|
-
pcb_component_ids:
|
|
1532
|
-
pcb_port_ids:
|
|
1533
|
-
subcircuit_id:
|
|
1548
|
+
source_trace_id: z69.string(),
|
|
1549
|
+
pcb_component_ids: z69.array(z69.string()),
|
|
1550
|
+
pcb_port_ids: z69.array(z69.string()),
|
|
1551
|
+
subcircuit_id: z69.string().optional()
|
|
1534
1552
|
}).describe(
|
|
1535
1553
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
1536
1554
|
);
|
|
1537
1555
|
expectTypesMatch(true);
|
|
1538
1556
|
|
|
1539
1557
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
1540
|
-
import { z as
|
|
1541
|
-
var pcb_port_not_matched_error =
|
|
1542
|
-
type:
|
|
1558
|
+
import { z as z70 } from "zod";
|
|
1559
|
+
var pcb_port_not_matched_error = z70.object({
|
|
1560
|
+
type: z70.literal("pcb_port_not_matched_error"),
|
|
1543
1561
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1544
|
-
error_type:
|
|
1545
|
-
message:
|
|
1546
|
-
pcb_component_ids:
|
|
1547
|
-
subcircuit_id:
|
|
1562
|
+
error_type: z70.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
1563
|
+
message: z70.string(),
|
|
1564
|
+
pcb_component_ids: z70.array(z70.string()),
|
|
1565
|
+
subcircuit_id: z70.string().optional()
|
|
1548
1566
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
1549
1567
|
expectTypesMatch(true);
|
|
1550
1568
|
|
|
1551
1569
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
1552
|
-
import { z as
|
|
1553
|
-
var pcb_port_not_connected_error =
|
|
1554
|
-
type:
|
|
1570
|
+
import { z as z71 } from "zod";
|
|
1571
|
+
var pcb_port_not_connected_error = z71.object({
|
|
1572
|
+
type: z71.literal("pcb_port_not_connected_error"),
|
|
1555
1573
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
1556
1574
|
"pcb_port_not_connected_error"
|
|
1557
1575
|
),
|
|
1558
|
-
error_type:
|
|
1559
|
-
message:
|
|
1560
|
-
pcb_port_ids:
|
|
1561
|
-
pcb_component_ids:
|
|
1562
|
-
subcircuit_id:
|
|
1576
|
+
error_type: z71.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
1577
|
+
message: z71.string(),
|
|
1578
|
+
pcb_port_ids: z71.array(z71.string()),
|
|
1579
|
+
pcb_component_ids: z71.array(z71.string()),
|
|
1580
|
+
subcircuit_id: z71.string().optional()
|
|
1563
1581
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
1564
1582
|
expectTypesMatch(
|
|
1565
1583
|
true
|
|
1566
1584
|
);
|
|
1567
1585
|
|
|
1568
1586
|
// src/pcb/pcb_via.ts
|
|
1569
|
-
import { z as
|
|
1570
|
-
var pcb_via =
|
|
1571
|
-
type:
|
|
1587
|
+
import { z as z72 } from "zod";
|
|
1588
|
+
var pcb_via = z72.object({
|
|
1589
|
+
type: z72.literal("pcb_via"),
|
|
1572
1590
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
1573
|
-
pcb_group_id:
|
|
1574
|
-
subcircuit_id:
|
|
1591
|
+
pcb_group_id: z72.string().optional(),
|
|
1592
|
+
subcircuit_id: z72.string().optional(),
|
|
1575
1593
|
x: distance,
|
|
1576
1594
|
y: distance,
|
|
1577
1595
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -1580,59 +1598,59 @@ var pcb_via = z71.object({
|
|
|
1580
1598
|
from_layer: layer_ref.optional(),
|
|
1581
1599
|
/** @deprecated */
|
|
1582
1600
|
to_layer: layer_ref.optional(),
|
|
1583
|
-
layers:
|
|
1584
|
-
pcb_trace_id:
|
|
1601
|
+
layers: z72.array(layer_ref),
|
|
1602
|
+
pcb_trace_id: z72.string().optional()
|
|
1585
1603
|
}).describe("Defines a via on the PCB");
|
|
1586
1604
|
expectTypesMatch(true);
|
|
1587
1605
|
|
|
1588
1606
|
// src/pcb/pcb_board.ts
|
|
1589
|
-
import { z as
|
|
1590
|
-
var pcb_board =
|
|
1591
|
-
type:
|
|
1607
|
+
import { z as z73 } from "zod";
|
|
1608
|
+
var pcb_board = z73.object({
|
|
1609
|
+
type: z73.literal("pcb_board"),
|
|
1592
1610
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
1593
|
-
is_subcircuit:
|
|
1594
|
-
subcircuit_id:
|
|
1611
|
+
is_subcircuit: z73.boolean().optional(),
|
|
1612
|
+
subcircuit_id: z73.string().optional(),
|
|
1595
1613
|
width: length,
|
|
1596
1614
|
height: length,
|
|
1597
1615
|
center: point,
|
|
1598
1616
|
thickness: length.optional().default(1.4),
|
|
1599
|
-
num_layers:
|
|
1600
|
-
outline:
|
|
1601
|
-
material:
|
|
1617
|
+
num_layers: z73.number().optional().default(4),
|
|
1618
|
+
outline: z73.array(point).optional(),
|
|
1619
|
+
material: z73.enum(["fr4", "fr1"]).default("fr4")
|
|
1602
1620
|
}).describe("Defines the board outline of the PCB");
|
|
1603
1621
|
expectTypesMatch(true);
|
|
1604
1622
|
|
|
1605
1623
|
// src/pcb/pcb_placement_error.ts
|
|
1606
|
-
import { z as
|
|
1607
|
-
var pcb_placement_error =
|
|
1608
|
-
type:
|
|
1624
|
+
import { z as z74 } from "zod";
|
|
1625
|
+
var pcb_placement_error = z74.object({
|
|
1626
|
+
type: z74.literal("pcb_placement_error"),
|
|
1609
1627
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
1610
|
-
error_type:
|
|
1611
|
-
message:
|
|
1612
|
-
subcircuit_id:
|
|
1628
|
+
error_type: z74.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
1629
|
+
message: z74.string(),
|
|
1630
|
+
subcircuit_id: z74.string().optional()
|
|
1613
1631
|
}).describe("Defines a placement error on the PCB");
|
|
1614
1632
|
expectTypesMatch(true);
|
|
1615
1633
|
|
|
1616
1634
|
// src/pcb/pcb_trace_hint.ts
|
|
1617
|
-
import { z as
|
|
1618
|
-
var pcb_trace_hint =
|
|
1619
|
-
type:
|
|
1635
|
+
import { z as z75 } from "zod";
|
|
1636
|
+
var pcb_trace_hint = z75.object({
|
|
1637
|
+
type: z75.literal("pcb_trace_hint"),
|
|
1620
1638
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
1621
|
-
pcb_port_id:
|
|
1622
|
-
pcb_component_id:
|
|
1623
|
-
route:
|
|
1624
|
-
subcircuit_id:
|
|
1639
|
+
pcb_port_id: z75.string(),
|
|
1640
|
+
pcb_component_id: z75.string(),
|
|
1641
|
+
route: z75.array(route_hint_point),
|
|
1642
|
+
subcircuit_id: z75.string().optional()
|
|
1625
1643
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
1626
1644
|
expectTypesMatch(true);
|
|
1627
1645
|
|
|
1628
1646
|
// src/pcb/pcb_silkscreen_line.ts
|
|
1629
|
-
import { z as
|
|
1630
|
-
var pcb_silkscreen_line =
|
|
1631
|
-
type:
|
|
1647
|
+
import { z as z76 } from "zod";
|
|
1648
|
+
var pcb_silkscreen_line = z76.object({
|
|
1649
|
+
type: z76.literal("pcb_silkscreen_line"),
|
|
1632
1650
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
1633
|
-
pcb_component_id:
|
|
1634
|
-
pcb_group_id:
|
|
1635
|
-
subcircuit_id:
|
|
1651
|
+
pcb_component_id: z76.string(),
|
|
1652
|
+
pcb_group_id: z76.string().optional(),
|
|
1653
|
+
subcircuit_id: z76.string().optional(),
|
|
1636
1654
|
stroke_width: distance.default("0.1mm"),
|
|
1637
1655
|
x1: distance,
|
|
1638
1656
|
y1: distance,
|
|
@@ -1643,67 +1661,67 @@ var pcb_silkscreen_line = z75.object({
|
|
|
1643
1661
|
expectTypesMatch(true);
|
|
1644
1662
|
|
|
1645
1663
|
// src/pcb/pcb_silkscreen_path.ts
|
|
1646
|
-
import { z as
|
|
1647
|
-
var pcb_silkscreen_path =
|
|
1648
|
-
type:
|
|
1664
|
+
import { z as z77 } from "zod";
|
|
1665
|
+
var pcb_silkscreen_path = z77.object({
|
|
1666
|
+
type: z77.literal("pcb_silkscreen_path"),
|
|
1649
1667
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
1650
|
-
pcb_component_id:
|
|
1651
|
-
pcb_group_id:
|
|
1652
|
-
subcircuit_id:
|
|
1668
|
+
pcb_component_id: z77.string(),
|
|
1669
|
+
pcb_group_id: z77.string().optional(),
|
|
1670
|
+
subcircuit_id: z77.string().optional(),
|
|
1653
1671
|
layer: visible_layer,
|
|
1654
|
-
route:
|
|
1672
|
+
route: z77.array(point),
|
|
1655
1673
|
stroke_width: length
|
|
1656
1674
|
}).describe("Defines a silkscreen path on the PCB");
|
|
1657
1675
|
expectTypesMatch(true);
|
|
1658
1676
|
|
|
1659
1677
|
// src/pcb/pcb_silkscreen_text.ts
|
|
1660
|
-
import { z as
|
|
1661
|
-
var pcb_silkscreen_text =
|
|
1662
|
-
type:
|
|
1678
|
+
import { z as z78 } from "zod";
|
|
1679
|
+
var pcb_silkscreen_text = z78.object({
|
|
1680
|
+
type: z78.literal("pcb_silkscreen_text"),
|
|
1663
1681
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
1664
|
-
pcb_group_id:
|
|
1665
|
-
subcircuit_id:
|
|
1666
|
-
font:
|
|
1682
|
+
pcb_group_id: z78.string().optional(),
|
|
1683
|
+
subcircuit_id: z78.string().optional(),
|
|
1684
|
+
font: z78.literal("tscircuit2024").default("tscircuit2024"),
|
|
1667
1685
|
font_size: distance.default("0.2mm"),
|
|
1668
|
-
pcb_component_id:
|
|
1669
|
-
text:
|
|
1670
|
-
ccw_rotation:
|
|
1686
|
+
pcb_component_id: z78.string(),
|
|
1687
|
+
text: z78.string(),
|
|
1688
|
+
ccw_rotation: z78.number().optional(),
|
|
1671
1689
|
layer: layer_ref,
|
|
1672
|
-
is_mirrored:
|
|
1690
|
+
is_mirrored: z78.boolean().default(false).optional(),
|
|
1673
1691
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1674
1692
|
anchor_alignment: ninePointAnchor.default("center")
|
|
1675
1693
|
}).describe("Defines silkscreen text on the PCB");
|
|
1676
1694
|
expectTypesMatch(true);
|
|
1677
1695
|
|
|
1678
1696
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
1679
|
-
import { z as
|
|
1680
|
-
var pcb_silkscreen_rect =
|
|
1681
|
-
type:
|
|
1697
|
+
import { z as z79 } from "zod";
|
|
1698
|
+
var pcb_silkscreen_rect = z79.object({
|
|
1699
|
+
type: z79.literal("pcb_silkscreen_rect"),
|
|
1682
1700
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
1683
|
-
pcb_component_id:
|
|
1684
|
-
pcb_group_id:
|
|
1685
|
-
subcircuit_id:
|
|
1701
|
+
pcb_component_id: z79.string(),
|
|
1702
|
+
pcb_group_id: z79.string().optional(),
|
|
1703
|
+
subcircuit_id: z79.string().optional(),
|
|
1686
1704
|
center: point,
|
|
1687
1705
|
width: length,
|
|
1688
1706
|
height: length,
|
|
1689
1707
|
layer: layer_ref,
|
|
1690
1708
|
stroke_width: length.default("1mm"),
|
|
1691
|
-
is_filled:
|
|
1692
|
-
has_stroke:
|
|
1693
|
-
is_stroke_dashed:
|
|
1709
|
+
is_filled: z79.boolean().default(true).optional(),
|
|
1710
|
+
has_stroke: z79.boolean().optional(),
|
|
1711
|
+
is_stroke_dashed: z79.boolean().optional()
|
|
1694
1712
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
1695
1713
|
expectTypesMatch(true);
|
|
1696
1714
|
|
|
1697
1715
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
1698
|
-
import { z as
|
|
1699
|
-
var pcb_silkscreen_circle =
|
|
1700
|
-
type:
|
|
1716
|
+
import { z as z80 } from "zod";
|
|
1717
|
+
var pcb_silkscreen_circle = z80.object({
|
|
1718
|
+
type: z80.literal("pcb_silkscreen_circle"),
|
|
1701
1719
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
1702
1720
|
"pcb_silkscreen_circle"
|
|
1703
1721
|
),
|
|
1704
|
-
pcb_component_id:
|
|
1705
|
-
pcb_group_id:
|
|
1706
|
-
subcircuit_id:
|
|
1722
|
+
pcb_component_id: z80.string(),
|
|
1723
|
+
pcb_group_id: z80.string().optional(),
|
|
1724
|
+
subcircuit_id: z80.string().optional(),
|
|
1707
1725
|
center: point,
|
|
1708
1726
|
radius: length,
|
|
1709
1727
|
layer: visible_layer,
|
|
@@ -1712,13 +1730,13 @@ var pcb_silkscreen_circle = z79.object({
|
|
|
1712
1730
|
expectTypesMatch(true);
|
|
1713
1731
|
|
|
1714
1732
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
1715
|
-
import { z as
|
|
1716
|
-
var pcb_silkscreen_oval =
|
|
1717
|
-
type:
|
|
1733
|
+
import { z as z81 } from "zod";
|
|
1734
|
+
var pcb_silkscreen_oval = z81.object({
|
|
1735
|
+
type: z81.literal("pcb_silkscreen_oval"),
|
|
1718
1736
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
1719
|
-
pcb_component_id:
|
|
1720
|
-
pcb_group_id:
|
|
1721
|
-
subcircuit_id:
|
|
1737
|
+
pcb_component_id: z81.string(),
|
|
1738
|
+
pcb_group_id: z81.string().optional(),
|
|
1739
|
+
subcircuit_id: z81.string().optional(),
|
|
1722
1740
|
center: point,
|
|
1723
1741
|
radius_x: distance,
|
|
1724
1742
|
radius_y: distance,
|
|
@@ -1727,103 +1745,103 @@ var pcb_silkscreen_oval = z80.object({
|
|
|
1727
1745
|
expectTypesMatch(true);
|
|
1728
1746
|
|
|
1729
1747
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
1730
|
-
import { z as
|
|
1731
|
-
var pcb_fabrication_note_text =
|
|
1732
|
-
type:
|
|
1748
|
+
import { z as z82 } from "zod";
|
|
1749
|
+
var pcb_fabrication_note_text = z82.object({
|
|
1750
|
+
type: z82.literal("pcb_fabrication_note_text"),
|
|
1733
1751
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
1734
1752
|
"pcb_fabrication_note_text"
|
|
1735
1753
|
),
|
|
1736
|
-
subcircuit_id:
|
|
1737
|
-
pcb_group_id:
|
|
1738
|
-
font:
|
|
1754
|
+
subcircuit_id: z82.string().optional(),
|
|
1755
|
+
pcb_group_id: z82.string().optional(),
|
|
1756
|
+
font: z82.literal("tscircuit2024").default("tscircuit2024"),
|
|
1739
1757
|
font_size: distance.default("1mm"),
|
|
1740
|
-
pcb_component_id:
|
|
1741
|
-
text:
|
|
1758
|
+
pcb_component_id: z82.string(),
|
|
1759
|
+
text: z82.string(),
|
|
1742
1760
|
layer: visible_layer,
|
|
1743
1761
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1744
|
-
anchor_alignment:
|
|
1745
|
-
color:
|
|
1762
|
+
anchor_alignment: z82.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
1763
|
+
color: z82.string().optional()
|
|
1746
1764
|
}).describe(
|
|
1747
1765
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
1748
1766
|
);
|
|
1749
1767
|
expectTypesMatch(true);
|
|
1750
1768
|
|
|
1751
1769
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
1752
|
-
import { z as
|
|
1753
|
-
var pcb_fabrication_note_path =
|
|
1754
|
-
type:
|
|
1770
|
+
import { z as z83 } from "zod";
|
|
1771
|
+
var pcb_fabrication_note_path = z83.object({
|
|
1772
|
+
type: z83.literal("pcb_fabrication_note_path"),
|
|
1755
1773
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
1756
1774
|
"pcb_fabrication_note_path"
|
|
1757
1775
|
),
|
|
1758
|
-
pcb_component_id:
|
|
1759
|
-
subcircuit_id:
|
|
1776
|
+
pcb_component_id: z83.string(),
|
|
1777
|
+
subcircuit_id: z83.string().optional(),
|
|
1760
1778
|
layer: layer_ref,
|
|
1761
|
-
route:
|
|
1779
|
+
route: z83.array(point),
|
|
1762
1780
|
stroke_width: length,
|
|
1763
|
-
color:
|
|
1781
|
+
color: z83.string().optional()
|
|
1764
1782
|
}).describe(
|
|
1765
1783
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
1766
1784
|
);
|
|
1767
1785
|
expectTypesMatch(true);
|
|
1768
1786
|
|
|
1769
1787
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
1770
|
-
import { z as
|
|
1771
|
-
var pcb_footprint_overlap_error =
|
|
1772
|
-
type:
|
|
1788
|
+
import { z as z84 } from "zod";
|
|
1789
|
+
var pcb_footprint_overlap_error = z84.object({
|
|
1790
|
+
type: z84.literal("pcb_footprint_overlap_error"),
|
|
1773
1791
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1774
|
-
error_type:
|
|
1775
|
-
message:
|
|
1776
|
-
pcb_smtpad_ids:
|
|
1777
|
-
pcb_plated_hole_ids:
|
|
1778
|
-
pcb_hole_ids:
|
|
1779
|
-
pcb_keepout_ids:
|
|
1792
|
+
error_type: z84.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
1793
|
+
message: z84.string(),
|
|
1794
|
+
pcb_smtpad_ids: z84.array(z84.string()).optional(),
|
|
1795
|
+
pcb_plated_hole_ids: z84.array(z84.string()).optional(),
|
|
1796
|
+
pcb_hole_ids: z84.array(z84.string()).optional(),
|
|
1797
|
+
pcb_keepout_ids: z84.array(z84.string()).optional()
|
|
1780
1798
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
1781
1799
|
expectTypesMatch(
|
|
1782
1800
|
true
|
|
1783
1801
|
);
|
|
1784
1802
|
|
|
1785
1803
|
// src/pcb/pcb_keepout.ts
|
|
1786
|
-
import { z as
|
|
1787
|
-
var pcb_keepout =
|
|
1788
|
-
type:
|
|
1789
|
-
shape:
|
|
1790
|
-
pcb_group_id:
|
|
1791
|
-
subcircuit_id:
|
|
1804
|
+
import { z as z85 } from "zod";
|
|
1805
|
+
var pcb_keepout = z85.object({
|
|
1806
|
+
type: z85.literal("pcb_keepout"),
|
|
1807
|
+
shape: z85.literal("rect"),
|
|
1808
|
+
pcb_group_id: z85.string().optional(),
|
|
1809
|
+
subcircuit_id: z85.string().optional(),
|
|
1792
1810
|
center: point,
|
|
1793
1811
|
width: distance,
|
|
1794
1812
|
height: distance,
|
|
1795
|
-
pcb_keepout_id:
|
|
1796
|
-
layers:
|
|
1813
|
+
pcb_keepout_id: z85.string(),
|
|
1814
|
+
layers: z85.array(z85.string()),
|
|
1797
1815
|
// Specify layers where the keepout applies
|
|
1798
|
-
description:
|
|
1816
|
+
description: z85.string().optional()
|
|
1799
1817
|
// Optional description of the keepout
|
|
1800
1818
|
}).or(
|
|
1801
|
-
|
|
1802
|
-
type:
|
|
1803
|
-
shape:
|
|
1804
|
-
pcb_group_id:
|
|
1805
|
-
subcircuit_id:
|
|
1819
|
+
z85.object({
|
|
1820
|
+
type: z85.literal("pcb_keepout"),
|
|
1821
|
+
shape: z85.literal("circle"),
|
|
1822
|
+
pcb_group_id: z85.string().optional(),
|
|
1823
|
+
subcircuit_id: z85.string().optional(),
|
|
1806
1824
|
center: point,
|
|
1807
1825
|
radius: distance,
|
|
1808
|
-
pcb_keepout_id:
|
|
1809
|
-
layers:
|
|
1826
|
+
pcb_keepout_id: z85.string(),
|
|
1827
|
+
layers: z85.array(z85.string()),
|
|
1810
1828
|
// Specify layers where the keepout applies
|
|
1811
|
-
description:
|
|
1829
|
+
description: z85.string().optional()
|
|
1812
1830
|
// Optional description of the keepout
|
|
1813
1831
|
})
|
|
1814
1832
|
);
|
|
1815
1833
|
expectTypesMatch(true);
|
|
1816
1834
|
|
|
1817
1835
|
// src/pcb/pcb_cutout.ts
|
|
1818
|
-
import { z as
|
|
1819
|
-
var pcb_cutout_base =
|
|
1820
|
-
type:
|
|
1836
|
+
import { z as z86 } from "zod";
|
|
1837
|
+
var pcb_cutout_base = z86.object({
|
|
1838
|
+
type: z86.literal("pcb_cutout"),
|
|
1821
1839
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
1822
|
-
pcb_group_id:
|
|
1823
|
-
subcircuit_id:
|
|
1840
|
+
pcb_group_id: z86.string().optional(),
|
|
1841
|
+
subcircuit_id: z86.string().optional()
|
|
1824
1842
|
});
|
|
1825
1843
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
1826
|
-
shape:
|
|
1844
|
+
shape: z86.literal("rect"),
|
|
1827
1845
|
center: point,
|
|
1828
1846
|
width: length,
|
|
1829
1847
|
height: length,
|
|
@@ -1831,17 +1849,17 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
1831
1849
|
});
|
|
1832
1850
|
expectTypesMatch(true);
|
|
1833
1851
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
1834
|
-
shape:
|
|
1852
|
+
shape: z86.literal("circle"),
|
|
1835
1853
|
center: point,
|
|
1836
1854
|
radius: length
|
|
1837
1855
|
});
|
|
1838
1856
|
expectTypesMatch(true);
|
|
1839
1857
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
1840
|
-
shape:
|
|
1841
|
-
points:
|
|
1858
|
+
shape: z86.literal("polygon"),
|
|
1859
|
+
points: z86.array(point)
|
|
1842
1860
|
});
|
|
1843
1861
|
expectTypesMatch(true);
|
|
1844
|
-
var pcb_cutout =
|
|
1862
|
+
var pcb_cutout = z86.discriminatedUnion("shape", [
|
|
1845
1863
|
pcb_cutout_rect,
|
|
1846
1864
|
pcb_cutout_circle,
|
|
1847
1865
|
pcb_cutout_polygon
|
|
@@ -1849,83 +1867,83 @@ var pcb_cutout = z85.discriminatedUnion("shape", [
|
|
|
1849
1867
|
expectTypesMatch(true);
|
|
1850
1868
|
|
|
1851
1869
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
1852
|
-
import { z as
|
|
1853
|
-
var pcb_missing_footprint_error =
|
|
1854
|
-
type:
|
|
1870
|
+
import { z as z87 } from "zod";
|
|
1871
|
+
var pcb_missing_footprint_error = z87.object({
|
|
1872
|
+
type: z87.literal("pcb_missing_footprint_error"),
|
|
1855
1873
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
1856
1874
|
"pcb_missing_footprint_error"
|
|
1857
1875
|
),
|
|
1858
|
-
pcb_group_id:
|
|
1859
|
-
subcircuit_id:
|
|
1860
|
-
error_type:
|
|
1861
|
-
source_component_id:
|
|
1862
|
-
message:
|
|
1876
|
+
pcb_group_id: z87.string().optional(),
|
|
1877
|
+
subcircuit_id: z87.string().optional(),
|
|
1878
|
+
error_type: z87.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
1879
|
+
source_component_id: z87.string(),
|
|
1880
|
+
message: z87.string()
|
|
1863
1881
|
}).describe("Defines a missing footprint error on the PCB");
|
|
1864
1882
|
expectTypesMatch(
|
|
1865
1883
|
true
|
|
1866
1884
|
);
|
|
1867
1885
|
|
|
1868
1886
|
// src/pcb/pcb_group.ts
|
|
1869
|
-
import { z as
|
|
1870
|
-
var pcb_group =
|
|
1871
|
-
type:
|
|
1887
|
+
import { z as z88 } from "zod";
|
|
1888
|
+
var pcb_group = z88.object({
|
|
1889
|
+
type: z88.literal("pcb_group"),
|
|
1872
1890
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
1873
|
-
source_group_id:
|
|
1874
|
-
is_subcircuit:
|
|
1875
|
-
subcircuit_id:
|
|
1891
|
+
source_group_id: z88.string(),
|
|
1892
|
+
is_subcircuit: z88.boolean().optional(),
|
|
1893
|
+
subcircuit_id: z88.string().optional(),
|
|
1876
1894
|
width: length,
|
|
1877
1895
|
height: length,
|
|
1878
1896
|
center: point,
|
|
1879
|
-
pcb_component_ids:
|
|
1880
|
-
name:
|
|
1881
|
-
description:
|
|
1882
|
-
layout_mode:
|
|
1883
|
-
autorouter_configuration:
|
|
1897
|
+
pcb_component_ids: z88.array(z88.string()),
|
|
1898
|
+
name: z88.string().optional(),
|
|
1899
|
+
description: z88.string().optional(),
|
|
1900
|
+
layout_mode: z88.string().optional(),
|
|
1901
|
+
autorouter_configuration: z88.object({
|
|
1884
1902
|
trace_clearance: length
|
|
1885
1903
|
}).optional(),
|
|
1886
|
-
autorouter_used_string:
|
|
1904
|
+
autorouter_used_string: z88.string().optional()
|
|
1887
1905
|
}).describe("Defines a group of components on the PCB");
|
|
1888
1906
|
expectTypesMatch(true);
|
|
1889
1907
|
|
|
1890
1908
|
// src/pcb/pcb_autorouting_error.ts
|
|
1891
|
-
import { z as
|
|
1892
|
-
var pcb_autorouting_error =
|
|
1893
|
-
type:
|
|
1909
|
+
import { z as z89 } from "zod";
|
|
1910
|
+
var pcb_autorouting_error = z89.object({
|
|
1911
|
+
type: z89.literal("pcb_autorouting_error"),
|
|
1894
1912
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
1895
|
-
error_type:
|
|
1896
|
-
message:
|
|
1897
|
-
subcircuit_id:
|
|
1913
|
+
error_type: z89.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
1914
|
+
message: z89.string(),
|
|
1915
|
+
subcircuit_id: z89.string().optional()
|
|
1898
1916
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
1899
1917
|
expectTypesMatch(true);
|
|
1900
1918
|
|
|
1901
1919
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
1902
|
-
import { z as
|
|
1903
|
-
var pcb_manual_edit_conflict_warning =
|
|
1904
|
-
type:
|
|
1920
|
+
import { z as z90 } from "zod";
|
|
1921
|
+
var pcb_manual_edit_conflict_warning = z90.object({
|
|
1922
|
+
type: z90.literal("pcb_manual_edit_conflict_warning"),
|
|
1905
1923
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1906
1924
|
"pcb_manual_edit_conflict_warning"
|
|
1907
1925
|
),
|
|
1908
|
-
warning_type:
|
|
1909
|
-
message:
|
|
1910
|
-
pcb_component_id:
|
|
1911
|
-
pcb_group_id:
|
|
1912
|
-
subcircuit_id:
|
|
1913
|
-
source_component_id:
|
|
1926
|
+
warning_type: z90.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
1927
|
+
message: z90.string(),
|
|
1928
|
+
pcb_component_id: z90.string(),
|
|
1929
|
+
pcb_group_id: z90.string().optional(),
|
|
1930
|
+
subcircuit_id: z90.string().optional(),
|
|
1931
|
+
source_component_id: z90.string()
|
|
1914
1932
|
}).describe(
|
|
1915
1933
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
1916
1934
|
);
|
|
1917
1935
|
expectTypesMatch(true);
|
|
1918
1936
|
|
|
1919
1937
|
// src/pcb/pcb_breakout_point.ts
|
|
1920
|
-
import { z as
|
|
1921
|
-
var pcb_breakout_point =
|
|
1922
|
-
type:
|
|
1938
|
+
import { z as z91 } from "zod";
|
|
1939
|
+
var pcb_breakout_point = z91.object({
|
|
1940
|
+
type: z91.literal("pcb_breakout_point"),
|
|
1923
1941
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
1924
|
-
pcb_group_id:
|
|
1925
|
-
subcircuit_id:
|
|
1926
|
-
source_trace_id:
|
|
1927
|
-
source_port_id:
|
|
1928
|
-
source_net_id:
|
|
1942
|
+
pcb_group_id: z91.string(),
|
|
1943
|
+
subcircuit_id: z91.string().optional(),
|
|
1944
|
+
source_trace_id: z91.string().optional(),
|
|
1945
|
+
source_port_id: z91.string().optional(),
|
|
1946
|
+
source_net_id: z91.string().optional(),
|
|
1929
1947
|
x: distance,
|
|
1930
1948
|
y: distance
|
|
1931
1949
|
}).describe(
|
|
@@ -1934,108 +1952,108 @@ var pcb_breakout_point = z90.object({
|
|
|
1934
1952
|
expectTypesMatch(true);
|
|
1935
1953
|
|
|
1936
1954
|
// src/pcb/pcb_ground_plane.ts
|
|
1937
|
-
import { z as
|
|
1938
|
-
var pcb_ground_plane =
|
|
1939
|
-
type:
|
|
1955
|
+
import { z as z92 } from "zod";
|
|
1956
|
+
var pcb_ground_plane = z92.object({
|
|
1957
|
+
type: z92.literal("pcb_ground_plane"),
|
|
1940
1958
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
1941
|
-
source_pcb_ground_plane_id:
|
|
1942
|
-
source_net_id:
|
|
1943
|
-
pcb_group_id:
|
|
1944
|
-
subcircuit_id:
|
|
1959
|
+
source_pcb_ground_plane_id: z92.string(),
|
|
1960
|
+
source_net_id: z92.string(),
|
|
1961
|
+
pcb_group_id: z92.string().optional(),
|
|
1962
|
+
subcircuit_id: z92.string().optional()
|
|
1945
1963
|
}).describe("Defines a ground plane on the PCB");
|
|
1946
1964
|
expectTypesMatch(true);
|
|
1947
1965
|
|
|
1948
1966
|
// src/pcb/pcb_ground_plane_region.ts
|
|
1949
|
-
import { z as
|
|
1950
|
-
var pcb_ground_plane_region =
|
|
1951
|
-
type:
|
|
1967
|
+
import { z as z93 } from "zod";
|
|
1968
|
+
var pcb_ground_plane_region = z93.object({
|
|
1969
|
+
type: z93.literal("pcb_ground_plane_region"),
|
|
1952
1970
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
1953
1971
|
"pcb_ground_plane_region"
|
|
1954
1972
|
),
|
|
1955
|
-
pcb_ground_plane_id:
|
|
1956
|
-
pcb_group_id:
|
|
1957
|
-
subcircuit_id:
|
|
1973
|
+
pcb_ground_plane_id: z93.string(),
|
|
1974
|
+
pcb_group_id: z93.string().optional(),
|
|
1975
|
+
subcircuit_id: z93.string().optional(),
|
|
1958
1976
|
layer: layer_ref,
|
|
1959
|
-
points:
|
|
1977
|
+
points: z93.array(point)
|
|
1960
1978
|
}).describe("Defines a polygon region of a ground plane");
|
|
1961
1979
|
expectTypesMatch(true);
|
|
1962
1980
|
|
|
1963
1981
|
// src/pcb/pcb_thermal_spoke.ts
|
|
1964
|
-
import { z as
|
|
1965
|
-
var pcb_thermal_spoke =
|
|
1966
|
-
type:
|
|
1982
|
+
import { z as z94 } from "zod";
|
|
1983
|
+
var pcb_thermal_spoke = z94.object({
|
|
1984
|
+
type: z94.literal("pcb_thermal_spoke"),
|
|
1967
1985
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
1968
|
-
pcb_ground_plane_id:
|
|
1969
|
-
shape:
|
|
1970
|
-
spoke_count:
|
|
1986
|
+
pcb_ground_plane_id: z94.string(),
|
|
1987
|
+
shape: z94.string(),
|
|
1988
|
+
spoke_count: z94.number(),
|
|
1971
1989
|
spoke_thickness: distance,
|
|
1972
1990
|
spoke_inner_diameter: distance,
|
|
1973
1991
|
spoke_outer_diameter: distance,
|
|
1974
|
-
pcb_plated_hole_id:
|
|
1975
|
-
subcircuit_id:
|
|
1992
|
+
pcb_plated_hole_id: z94.string().optional(),
|
|
1993
|
+
subcircuit_id: z94.string().optional()
|
|
1976
1994
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
1977
1995
|
expectTypesMatch(true);
|
|
1978
1996
|
|
|
1979
1997
|
// src/cad/cad_component.ts
|
|
1980
|
-
import { z as
|
|
1981
|
-
var cad_component =
|
|
1982
|
-
type:
|
|
1983
|
-
cad_component_id:
|
|
1984
|
-
pcb_component_id:
|
|
1985
|
-
source_component_id:
|
|
1998
|
+
import { z as z95 } from "zod";
|
|
1999
|
+
var cad_component = z95.object({
|
|
2000
|
+
type: z95.literal("cad_component"),
|
|
2001
|
+
cad_component_id: z95.string(),
|
|
2002
|
+
pcb_component_id: z95.string(),
|
|
2003
|
+
source_component_id: z95.string(),
|
|
1986
2004
|
position: point3,
|
|
1987
2005
|
rotation: point3.optional(),
|
|
1988
2006
|
size: point3.optional(),
|
|
1989
2007
|
layer: layer_ref.optional(),
|
|
1990
|
-
subcircuit_id:
|
|
2008
|
+
subcircuit_id: z95.string().optional(),
|
|
1991
2009
|
// These are all ways to generate/load the 3d model
|
|
1992
|
-
footprinter_string:
|
|
1993
|
-
model_obj_url:
|
|
1994
|
-
model_stl_url:
|
|
1995
|
-
model_3mf_url:
|
|
1996
|
-
model_jscad:
|
|
2010
|
+
footprinter_string: z95.string().optional(),
|
|
2011
|
+
model_obj_url: z95.string().optional(),
|
|
2012
|
+
model_stl_url: z95.string().optional(),
|
|
2013
|
+
model_3mf_url: z95.string().optional(),
|
|
2014
|
+
model_jscad: z95.any().optional()
|
|
1997
2015
|
}).describe("Defines a component on the PCB");
|
|
1998
2016
|
expectTypesMatch(true);
|
|
1999
2017
|
|
|
2000
2018
|
// src/simulation/simulation_voltage_source.ts
|
|
2001
|
-
import { z as
|
|
2002
|
-
var wave_shape =
|
|
2003
|
-
var simulation_dc_voltage_source =
|
|
2004
|
-
type:
|
|
2019
|
+
import { z as z96 } from "zod";
|
|
2020
|
+
var wave_shape = z96.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
2021
|
+
var simulation_dc_voltage_source = z96.object({
|
|
2022
|
+
type: z96.literal("simulation_voltage_source"),
|
|
2005
2023
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2006
2024
|
"simulation_voltage_source"
|
|
2007
2025
|
),
|
|
2008
|
-
is_dc_source:
|
|
2009
|
-
positive_source_port_id:
|
|
2010
|
-
negative_source_port_id:
|
|
2011
|
-
positive_source_net_id:
|
|
2012
|
-
negative_source_net_id:
|
|
2026
|
+
is_dc_source: z96.literal(true).optional().default(true),
|
|
2027
|
+
positive_source_port_id: z96.string().optional(),
|
|
2028
|
+
negative_source_port_id: z96.string().optional(),
|
|
2029
|
+
positive_source_net_id: z96.string().optional(),
|
|
2030
|
+
negative_source_net_id: z96.string().optional(),
|
|
2013
2031
|
voltage
|
|
2014
2032
|
}).describe("Defines a DC voltage source for simulation");
|
|
2015
|
-
var simulation_ac_voltage_source =
|
|
2016
|
-
type:
|
|
2033
|
+
var simulation_ac_voltage_source = z96.object({
|
|
2034
|
+
type: z96.literal("simulation_voltage_source"),
|
|
2017
2035
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2018
2036
|
"simulation_voltage_source"
|
|
2019
2037
|
),
|
|
2020
|
-
is_dc_source:
|
|
2021
|
-
terminal1_source_port_id:
|
|
2022
|
-
terminal2_source_port_id:
|
|
2023
|
-
terminal1_source_net_id:
|
|
2024
|
-
terminal2_source_net_id:
|
|
2038
|
+
is_dc_source: z96.literal(false),
|
|
2039
|
+
terminal1_source_port_id: z96.string().optional(),
|
|
2040
|
+
terminal2_source_port_id: z96.string().optional(),
|
|
2041
|
+
terminal1_source_net_id: z96.string().optional(),
|
|
2042
|
+
terminal2_source_net_id: z96.string().optional(),
|
|
2025
2043
|
voltage: voltage.optional(),
|
|
2026
2044
|
frequency: frequency.optional(),
|
|
2027
2045
|
peak_to_peak_voltage: voltage.optional(),
|
|
2028
2046
|
wave_shape: wave_shape.optional(),
|
|
2029
2047
|
phase: rotation.optional()
|
|
2030
2048
|
}).describe("Defines an AC voltage source for simulation");
|
|
2031
|
-
var simulation_voltage_source =
|
|
2049
|
+
var simulation_voltage_source = z96.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
2032
2050
|
expectTypesMatch(true);
|
|
2033
2051
|
expectTypesMatch(true);
|
|
2034
2052
|
expectTypesMatch(true);
|
|
2035
2053
|
|
|
2036
2054
|
// src/any_circuit_element.ts
|
|
2037
|
-
import { z as
|
|
2038
|
-
var any_circuit_element =
|
|
2055
|
+
import { z as z97 } from "zod";
|
|
2056
|
+
var any_circuit_element = z97.union([
|
|
2039
2057
|
source_trace,
|
|
2040
2058
|
source_port,
|
|
2041
2059
|
any_source_component,
|
|
@@ -2060,6 +2078,7 @@ var any_circuit_element = z96.union([
|
|
|
2060
2078
|
source_pcb_ground_plane,
|
|
2061
2079
|
source_project_metadata,
|
|
2062
2080
|
source_trace_not_connected_error,
|
|
2081
|
+
source_pin_missing_trace_warning,
|
|
2063
2082
|
pcb_component,
|
|
2064
2083
|
pcb_hole,
|
|
2065
2084
|
pcb_missing_footprint_error,
|
|
@@ -2221,6 +2240,7 @@ export {
|
|
|
2221
2240
|
source_missing_property_error,
|
|
2222
2241
|
source_net,
|
|
2223
2242
|
source_pcb_ground_plane,
|
|
2243
|
+
source_pin_missing_trace_warning,
|
|
2224
2244
|
source_port,
|
|
2225
2245
|
source_project_metadata,
|
|
2226
2246
|
source_property_ignored_warning,
|