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