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