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