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