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