circuit-json 0.0.194 → 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 +525 -7
- package/dist/index.mjs +633 -603
- 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,168 +1095,182 @@ 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(),
|
|
1170
|
+
layer: layer_ref,
|
|
1171
|
+
port_hints: z60.array(z60.string()).optional(),
|
|
1172
|
+
pcb_component_id: z60.string().optional(),
|
|
1173
|
+
pcb_port_id: z60.string().optional()
|
|
1174
|
+
});
|
|
1175
|
+
var pcb_smtpad_polygon = z60.object({
|
|
1176
|
+
type: z60.literal("pcb_smtpad"),
|
|
1177
|
+
shape: z60.literal("polygon"),
|
|
1178
|
+
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1179
|
+
pcb_group_id: z60.string().optional(),
|
|
1180
|
+
subcircuit_id: z60.string().optional(),
|
|
1181
|
+
points: z60.array(point),
|
|
1156
1182
|
layer: layer_ref,
|
|
1157
|
-
port_hints:
|
|
1158
|
-
pcb_component_id:
|
|
1159
|
-
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()
|
|
1160
1186
|
});
|
|
1161
|
-
var pcb_smtpad =
|
|
1187
|
+
var pcb_smtpad = z60.union([
|
|
1162
1188
|
pcb_smtpad_circle,
|
|
1163
1189
|
pcb_smtpad_rect,
|
|
1164
1190
|
pcb_smtpad_rotated_rect,
|
|
1165
|
-
pcb_smtpad_pill
|
|
1191
|
+
pcb_smtpad_pill,
|
|
1192
|
+
pcb_smtpad_polygon
|
|
1166
1193
|
]).describe("Defines an SMT pad on the PCB");
|
|
1167
1194
|
expectTypesMatch(true);
|
|
1168
1195
|
expectTypesMatch(true);
|
|
1169
1196
|
expectTypesMatch(true);
|
|
1170
1197
|
expectTypesMatch(true);
|
|
1198
|
+
expectTypesMatch(true);
|
|
1171
1199
|
|
|
1172
1200
|
// src/pcb/pcb_solder_paste.ts
|
|
1173
|
-
import { z as
|
|
1174
|
-
var pcb_solder_paste_circle =
|
|
1175
|
-
type:
|
|
1176
|
-
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"),
|
|
1177
1205
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1178
|
-
pcb_group_id:
|
|
1179
|
-
subcircuit_id:
|
|
1206
|
+
pcb_group_id: z61.string().optional(),
|
|
1207
|
+
subcircuit_id: z61.string().optional(),
|
|
1180
1208
|
x: distance,
|
|
1181
1209
|
y: distance,
|
|
1182
|
-
radius:
|
|
1210
|
+
radius: z61.number(),
|
|
1183
1211
|
layer: layer_ref,
|
|
1184
|
-
pcb_component_id:
|
|
1185
|
-
pcb_smtpad_id:
|
|
1212
|
+
pcb_component_id: z61.string().optional(),
|
|
1213
|
+
pcb_smtpad_id: z61.string().optional()
|
|
1186
1214
|
});
|
|
1187
|
-
var pcb_solder_paste_rect =
|
|
1188
|
-
type:
|
|
1189
|
-
shape:
|
|
1215
|
+
var pcb_solder_paste_rect = z61.object({
|
|
1216
|
+
type: z61.literal("pcb_solder_paste"),
|
|
1217
|
+
shape: z61.literal("rect"),
|
|
1190
1218
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1191
|
-
pcb_group_id:
|
|
1192
|
-
subcircuit_id:
|
|
1219
|
+
pcb_group_id: z61.string().optional(),
|
|
1220
|
+
subcircuit_id: z61.string().optional(),
|
|
1193
1221
|
x: distance,
|
|
1194
1222
|
y: distance,
|
|
1195
|
-
width:
|
|
1196
|
-
height:
|
|
1223
|
+
width: z61.number(),
|
|
1224
|
+
height: z61.number(),
|
|
1197
1225
|
layer: layer_ref,
|
|
1198
|
-
pcb_component_id:
|
|
1199
|
-
pcb_smtpad_id:
|
|
1226
|
+
pcb_component_id: z61.string().optional(),
|
|
1227
|
+
pcb_smtpad_id: z61.string().optional()
|
|
1200
1228
|
});
|
|
1201
|
-
var pcb_solder_paste_pill =
|
|
1202
|
-
type:
|
|
1203
|
-
shape:
|
|
1229
|
+
var pcb_solder_paste_pill = z61.object({
|
|
1230
|
+
type: z61.literal("pcb_solder_paste"),
|
|
1231
|
+
shape: z61.literal("pill"),
|
|
1204
1232
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1205
|
-
pcb_group_id:
|
|
1206
|
-
subcircuit_id:
|
|
1233
|
+
pcb_group_id: z61.string().optional(),
|
|
1234
|
+
subcircuit_id: z61.string().optional(),
|
|
1207
1235
|
x: distance,
|
|
1208
1236
|
y: distance,
|
|
1209
|
-
width:
|
|
1210
|
-
height:
|
|
1211
|
-
radius:
|
|
1237
|
+
width: z61.number(),
|
|
1238
|
+
height: z61.number(),
|
|
1239
|
+
radius: z61.number(),
|
|
1212
1240
|
layer: layer_ref,
|
|
1213
|
-
pcb_component_id:
|
|
1214
|
-
pcb_smtpad_id:
|
|
1241
|
+
pcb_component_id: z61.string().optional(),
|
|
1242
|
+
pcb_smtpad_id: z61.string().optional()
|
|
1215
1243
|
});
|
|
1216
|
-
var pcb_solder_paste_rotated_rect =
|
|
1217
|
-
type:
|
|
1218
|
-
shape:
|
|
1244
|
+
var pcb_solder_paste_rotated_rect = z61.object({
|
|
1245
|
+
type: z61.literal("pcb_solder_paste"),
|
|
1246
|
+
shape: z61.literal("rotated_rect"),
|
|
1219
1247
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1220
|
-
pcb_group_id:
|
|
1221
|
-
subcircuit_id:
|
|
1248
|
+
pcb_group_id: z61.string().optional(),
|
|
1249
|
+
subcircuit_id: z61.string().optional(),
|
|
1222
1250
|
x: distance,
|
|
1223
1251
|
y: distance,
|
|
1224
|
-
width:
|
|
1225
|
-
height:
|
|
1252
|
+
width: z61.number(),
|
|
1253
|
+
height: z61.number(),
|
|
1226
1254
|
ccw_rotation: distance,
|
|
1227
1255
|
layer: layer_ref,
|
|
1228
|
-
pcb_component_id:
|
|
1229
|
-
pcb_smtpad_id:
|
|
1256
|
+
pcb_component_id: z61.string().optional(),
|
|
1257
|
+
pcb_smtpad_id: z61.string().optional()
|
|
1230
1258
|
});
|
|
1231
|
-
var pcb_solder_paste_oval =
|
|
1232
|
-
type:
|
|
1233
|
-
shape:
|
|
1259
|
+
var pcb_solder_paste_oval = z61.object({
|
|
1260
|
+
type: z61.literal("pcb_solder_paste"),
|
|
1261
|
+
shape: z61.literal("oval"),
|
|
1234
1262
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1235
|
-
pcb_group_id:
|
|
1236
|
-
subcircuit_id:
|
|
1263
|
+
pcb_group_id: z61.string().optional(),
|
|
1264
|
+
subcircuit_id: z61.string().optional(),
|
|
1237
1265
|
x: distance,
|
|
1238
1266
|
y: distance,
|
|
1239
|
-
width:
|
|
1240
|
-
height:
|
|
1267
|
+
width: z61.number(),
|
|
1268
|
+
height: z61.number(),
|
|
1241
1269
|
layer: layer_ref,
|
|
1242
|
-
pcb_component_id:
|
|
1243
|
-
pcb_smtpad_id:
|
|
1270
|
+
pcb_component_id: z61.string().optional(),
|
|
1271
|
+
pcb_smtpad_id: z61.string().optional()
|
|
1244
1272
|
});
|
|
1245
|
-
var pcb_solder_paste =
|
|
1273
|
+
var pcb_solder_paste = z61.union([
|
|
1246
1274
|
pcb_solder_paste_circle,
|
|
1247
1275
|
pcb_solder_paste_rect,
|
|
1248
1276
|
pcb_solder_paste_pill,
|
|
@@ -1258,95 +1286,95 @@ expectTypesMatch(
|
|
|
1258
1286
|
expectTypesMatch(true);
|
|
1259
1287
|
|
|
1260
1288
|
// src/pcb/pcb_text.ts
|
|
1261
|
-
import { z as
|
|
1262
|
-
var pcb_text =
|
|
1263
|
-
type:
|
|
1289
|
+
import { z as z62 } from "zod";
|
|
1290
|
+
var pcb_text = z62.object({
|
|
1291
|
+
type: z62.literal("pcb_text"),
|
|
1264
1292
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
1265
|
-
pcb_group_id:
|
|
1266
|
-
subcircuit_id:
|
|
1267
|
-
text:
|
|
1293
|
+
pcb_group_id: z62.string().optional(),
|
|
1294
|
+
subcircuit_id: z62.string().optional(),
|
|
1295
|
+
text: z62.string(),
|
|
1268
1296
|
center: point,
|
|
1269
1297
|
layer: layer_ref,
|
|
1270
1298
|
width: length,
|
|
1271
1299
|
height: length,
|
|
1272
|
-
lines:
|
|
1300
|
+
lines: z62.number(),
|
|
1273
1301
|
// @ts-ignore
|
|
1274
|
-
align:
|
|
1302
|
+
align: z62.enum(["bottom-left"])
|
|
1275
1303
|
}).describe("Defines text on the PCB");
|
|
1276
1304
|
expectTypesMatch(true);
|
|
1277
1305
|
|
|
1278
1306
|
// src/pcb/pcb_trace.ts
|
|
1279
|
-
import { z as
|
|
1280
|
-
var pcb_trace_route_point_wire =
|
|
1281
|
-
route_type:
|
|
1307
|
+
import { z as z63 } from "zod";
|
|
1308
|
+
var pcb_trace_route_point_wire = z63.object({
|
|
1309
|
+
route_type: z63.literal("wire"),
|
|
1282
1310
|
x: distance,
|
|
1283
1311
|
y: distance,
|
|
1284
1312
|
width: distance,
|
|
1285
|
-
start_pcb_port_id:
|
|
1286
|
-
end_pcb_port_id:
|
|
1313
|
+
start_pcb_port_id: z63.string().optional(),
|
|
1314
|
+
end_pcb_port_id: z63.string().optional(),
|
|
1287
1315
|
layer: layer_ref
|
|
1288
1316
|
});
|
|
1289
|
-
var pcb_trace_route_point_via =
|
|
1290
|
-
route_type:
|
|
1317
|
+
var pcb_trace_route_point_via = z63.object({
|
|
1318
|
+
route_type: z63.literal("via"),
|
|
1291
1319
|
x: distance,
|
|
1292
1320
|
y: distance,
|
|
1293
1321
|
hole_diameter: distance.optional(),
|
|
1294
1322
|
outer_diameter: distance.optional(),
|
|
1295
|
-
from_layer:
|
|
1296
|
-
to_layer:
|
|
1323
|
+
from_layer: z63.string(),
|
|
1324
|
+
to_layer: z63.string()
|
|
1297
1325
|
});
|
|
1298
|
-
var pcb_trace_route_point =
|
|
1326
|
+
var pcb_trace_route_point = z63.union([
|
|
1299
1327
|
pcb_trace_route_point_wire,
|
|
1300
1328
|
pcb_trace_route_point_via
|
|
1301
1329
|
]);
|
|
1302
|
-
var pcb_trace =
|
|
1303
|
-
type:
|
|
1304
|
-
source_trace_id:
|
|
1305
|
-
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(),
|
|
1306
1334
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
1307
|
-
pcb_group_id:
|
|
1308
|
-
subcircuit_id:
|
|
1309
|
-
route_thickness_mode:
|
|
1310
|
-
route_order_index:
|
|
1311
|
-
should_round_corners:
|
|
1312
|
-
trace_length:
|
|
1313
|
-
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)
|
|
1314
1342
|
}).describe("Defines a trace on the PCB");
|
|
1315
1343
|
expectTypesMatch(true);
|
|
1316
1344
|
expectTypesMatch(true);
|
|
1317
1345
|
|
|
1318
1346
|
// src/pcb/pcb_trace_error.ts
|
|
1319
|
-
import { z as
|
|
1320
|
-
var pcb_trace_error =
|
|
1321
|
-
type:
|
|
1347
|
+
import { z as z64 } from "zod";
|
|
1348
|
+
var pcb_trace_error = z64.object({
|
|
1349
|
+
type: z64.literal("pcb_trace_error"),
|
|
1322
1350
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
1323
|
-
error_type:
|
|
1324
|
-
message:
|
|
1351
|
+
error_type: z64.literal("pcb_trace_error"),
|
|
1352
|
+
message: z64.string(),
|
|
1325
1353
|
center: point.optional(),
|
|
1326
|
-
pcb_trace_id:
|
|
1327
|
-
source_trace_id:
|
|
1328
|
-
pcb_component_ids:
|
|
1329
|
-
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())
|
|
1330
1358
|
}).describe("Defines a trace error on the PCB");
|
|
1331
1359
|
expectTypesMatch(true);
|
|
1332
1360
|
|
|
1333
1361
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
1334
|
-
import { z as
|
|
1335
|
-
var pcb_port_not_matched_error =
|
|
1336
|
-
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"),
|
|
1337
1365
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1338
|
-
message:
|
|
1339
|
-
pcb_component_ids:
|
|
1366
|
+
message: z65.string(),
|
|
1367
|
+
pcb_component_ids: z65.array(z65.string())
|
|
1340
1368
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
1341
1369
|
expectTypesMatch(true);
|
|
1342
1370
|
|
|
1343
1371
|
// src/pcb/pcb_via.ts
|
|
1344
|
-
import { z as
|
|
1345
|
-
var pcb_via =
|
|
1346
|
-
type:
|
|
1372
|
+
import { z as z66 } from "zod";
|
|
1373
|
+
var pcb_via = z66.object({
|
|
1374
|
+
type: z66.literal("pcb_via"),
|
|
1347
1375
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
1348
|
-
pcb_group_id:
|
|
1349
|
-
subcircuit_id:
|
|
1376
|
+
pcb_group_id: z66.string().optional(),
|
|
1377
|
+
subcircuit_id: z66.string().optional(),
|
|
1350
1378
|
x: distance,
|
|
1351
1379
|
y: distance,
|
|
1352
1380
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -1355,56 +1383,56 @@ var pcb_via = z65.object({
|
|
|
1355
1383
|
from_layer: layer_ref.optional(),
|
|
1356
1384
|
/** @deprecated */
|
|
1357
1385
|
to_layer: layer_ref.optional(),
|
|
1358
|
-
layers:
|
|
1359
|
-
pcb_trace_id:
|
|
1386
|
+
layers: z66.array(layer_ref),
|
|
1387
|
+
pcb_trace_id: z66.string().optional()
|
|
1360
1388
|
}).describe("Defines a via on the PCB");
|
|
1361
1389
|
expectTypesMatch(true);
|
|
1362
1390
|
|
|
1363
1391
|
// src/pcb/pcb_board.ts
|
|
1364
|
-
import { z as
|
|
1365
|
-
var pcb_board =
|
|
1366
|
-
type:
|
|
1392
|
+
import { z as z67 } from "zod";
|
|
1393
|
+
var pcb_board = z67.object({
|
|
1394
|
+
type: z67.literal("pcb_board"),
|
|
1367
1395
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
1368
|
-
is_subcircuit:
|
|
1369
|
-
subcircuit_id:
|
|
1396
|
+
is_subcircuit: z67.boolean().optional(),
|
|
1397
|
+
subcircuit_id: z67.string().optional(),
|
|
1370
1398
|
width: length,
|
|
1371
1399
|
height: length,
|
|
1372
1400
|
center: point,
|
|
1373
1401
|
thickness: length.optional().default(1.4),
|
|
1374
|
-
num_layers:
|
|
1375
|
-
outline:
|
|
1376
|
-
material:
|
|
1402
|
+
num_layers: z67.number().optional().default(4),
|
|
1403
|
+
outline: z67.array(point).optional(),
|
|
1404
|
+
material: z67.enum(["fr4", "fr1"]).default("fr4")
|
|
1377
1405
|
}).describe("Defines the board outline of the PCB");
|
|
1378
1406
|
expectTypesMatch(true);
|
|
1379
1407
|
|
|
1380
1408
|
// src/pcb/pcb_placement_error.ts
|
|
1381
|
-
import { z as
|
|
1382
|
-
var pcb_placement_error =
|
|
1383
|
-
type:
|
|
1409
|
+
import { z as z68 } from "zod";
|
|
1410
|
+
var pcb_placement_error = z68.object({
|
|
1411
|
+
type: z68.literal("pcb_placement_error"),
|
|
1384
1412
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
1385
|
-
message:
|
|
1413
|
+
message: z68.string()
|
|
1386
1414
|
}).describe("Defines a placement error on the PCB");
|
|
1387
1415
|
expectTypesMatch(true);
|
|
1388
1416
|
|
|
1389
1417
|
// src/pcb/pcb_trace_hint.ts
|
|
1390
|
-
import { z as
|
|
1391
|
-
var pcb_trace_hint =
|
|
1392
|
-
type:
|
|
1418
|
+
import { z as z69 } from "zod";
|
|
1419
|
+
var pcb_trace_hint = z69.object({
|
|
1420
|
+
type: z69.literal("pcb_trace_hint"),
|
|
1393
1421
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
1394
|
-
pcb_port_id:
|
|
1395
|
-
pcb_component_id:
|
|
1396
|
-
route:
|
|
1422
|
+
pcb_port_id: z69.string(),
|
|
1423
|
+
pcb_component_id: z69.string(),
|
|
1424
|
+
route: z69.array(route_hint_point)
|
|
1397
1425
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
1398
1426
|
expectTypesMatch(true);
|
|
1399
1427
|
|
|
1400
1428
|
// src/pcb/pcb_silkscreen_line.ts
|
|
1401
|
-
import { z as
|
|
1402
|
-
var pcb_silkscreen_line =
|
|
1403
|
-
type:
|
|
1429
|
+
import { z as z70 } from "zod";
|
|
1430
|
+
var pcb_silkscreen_line = z70.object({
|
|
1431
|
+
type: z70.literal("pcb_silkscreen_line"),
|
|
1404
1432
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
1405
|
-
pcb_component_id:
|
|
1406
|
-
pcb_group_id:
|
|
1407
|
-
subcircuit_id:
|
|
1433
|
+
pcb_component_id: z70.string(),
|
|
1434
|
+
pcb_group_id: z70.string().optional(),
|
|
1435
|
+
subcircuit_id: z70.string().optional(),
|
|
1408
1436
|
stroke_width: distance.default("0.1mm"),
|
|
1409
1437
|
x1: distance,
|
|
1410
1438
|
y1: distance,
|
|
@@ -1415,67 +1443,67 @@ var pcb_silkscreen_line = z69.object({
|
|
|
1415
1443
|
expectTypesMatch(true);
|
|
1416
1444
|
|
|
1417
1445
|
// src/pcb/pcb_silkscreen_path.ts
|
|
1418
|
-
import { z as
|
|
1419
|
-
var pcb_silkscreen_path =
|
|
1420
|
-
type:
|
|
1446
|
+
import { z as z71 } from "zod";
|
|
1447
|
+
var pcb_silkscreen_path = z71.object({
|
|
1448
|
+
type: z71.literal("pcb_silkscreen_path"),
|
|
1421
1449
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
1422
|
-
pcb_component_id:
|
|
1423
|
-
pcb_group_id:
|
|
1424
|
-
subcircuit_id:
|
|
1450
|
+
pcb_component_id: z71.string(),
|
|
1451
|
+
pcb_group_id: z71.string().optional(),
|
|
1452
|
+
subcircuit_id: z71.string().optional(),
|
|
1425
1453
|
layer: visible_layer,
|
|
1426
|
-
route:
|
|
1454
|
+
route: z71.array(point),
|
|
1427
1455
|
stroke_width: length
|
|
1428
1456
|
}).describe("Defines a silkscreen path on the PCB");
|
|
1429
1457
|
expectTypesMatch(true);
|
|
1430
1458
|
|
|
1431
1459
|
// src/pcb/pcb_silkscreen_text.ts
|
|
1432
|
-
import { z as
|
|
1433
|
-
var pcb_silkscreen_text =
|
|
1434
|
-
type:
|
|
1460
|
+
import { z as z72 } from "zod";
|
|
1461
|
+
var pcb_silkscreen_text = z72.object({
|
|
1462
|
+
type: z72.literal("pcb_silkscreen_text"),
|
|
1435
1463
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
1436
|
-
pcb_group_id:
|
|
1437
|
-
subcircuit_id:
|
|
1438
|
-
font:
|
|
1464
|
+
pcb_group_id: z72.string().optional(),
|
|
1465
|
+
subcircuit_id: z72.string().optional(),
|
|
1466
|
+
font: z72.literal("tscircuit2024").default("tscircuit2024"),
|
|
1439
1467
|
font_size: distance.default("0.2mm"),
|
|
1440
|
-
pcb_component_id:
|
|
1441
|
-
text:
|
|
1442
|
-
ccw_rotation:
|
|
1468
|
+
pcb_component_id: z72.string(),
|
|
1469
|
+
text: z72.string(),
|
|
1470
|
+
ccw_rotation: z72.number().optional(),
|
|
1443
1471
|
layer: layer_ref,
|
|
1444
|
-
is_mirrored:
|
|
1472
|
+
is_mirrored: z72.boolean().default(false).optional(),
|
|
1445
1473
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1446
1474
|
anchor_alignment: ninePointAnchor.default("center")
|
|
1447
1475
|
}).describe("Defines silkscreen text on the PCB");
|
|
1448
1476
|
expectTypesMatch(true);
|
|
1449
1477
|
|
|
1450
1478
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
1451
|
-
import { z as
|
|
1452
|
-
var pcb_silkscreen_rect =
|
|
1453
|
-
type:
|
|
1479
|
+
import { z as z73 } from "zod";
|
|
1480
|
+
var pcb_silkscreen_rect = z73.object({
|
|
1481
|
+
type: z73.literal("pcb_silkscreen_rect"),
|
|
1454
1482
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
1455
|
-
pcb_component_id:
|
|
1456
|
-
pcb_group_id:
|
|
1457
|
-
subcircuit_id:
|
|
1483
|
+
pcb_component_id: z73.string(),
|
|
1484
|
+
pcb_group_id: z73.string().optional(),
|
|
1485
|
+
subcircuit_id: z73.string().optional(),
|
|
1458
1486
|
center: point,
|
|
1459
1487
|
width: length,
|
|
1460
1488
|
height: length,
|
|
1461
1489
|
layer: layer_ref,
|
|
1462
1490
|
stroke_width: length.default("1mm"),
|
|
1463
|
-
is_filled:
|
|
1464
|
-
has_stroke:
|
|
1465
|
-
is_stroke_dashed:
|
|
1491
|
+
is_filled: z73.boolean().default(true).optional(),
|
|
1492
|
+
has_stroke: z73.boolean().optional(),
|
|
1493
|
+
is_stroke_dashed: z73.boolean().optional()
|
|
1466
1494
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
1467
1495
|
expectTypesMatch(true);
|
|
1468
1496
|
|
|
1469
1497
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
1470
|
-
import { z as
|
|
1471
|
-
var pcb_silkscreen_circle =
|
|
1472
|
-
type:
|
|
1498
|
+
import { z as z74 } from "zod";
|
|
1499
|
+
var pcb_silkscreen_circle = z74.object({
|
|
1500
|
+
type: z74.literal("pcb_silkscreen_circle"),
|
|
1473
1501
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
1474
1502
|
"pcb_silkscreen_circle"
|
|
1475
1503
|
),
|
|
1476
|
-
pcb_component_id:
|
|
1477
|
-
pcb_group_id:
|
|
1478
|
-
subcircuit_id:
|
|
1504
|
+
pcb_component_id: z74.string(),
|
|
1505
|
+
pcb_group_id: z74.string().optional(),
|
|
1506
|
+
subcircuit_id: z74.string().optional(),
|
|
1479
1507
|
center: point,
|
|
1480
1508
|
radius: length,
|
|
1481
1509
|
layer: visible_layer,
|
|
@@ -1484,13 +1512,13 @@ var pcb_silkscreen_circle = z73.object({
|
|
|
1484
1512
|
expectTypesMatch(true);
|
|
1485
1513
|
|
|
1486
1514
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
1487
|
-
import { z as
|
|
1488
|
-
var pcb_silkscreen_oval =
|
|
1489
|
-
type:
|
|
1515
|
+
import { z as z75 } from "zod";
|
|
1516
|
+
var pcb_silkscreen_oval = z75.object({
|
|
1517
|
+
type: z75.literal("pcb_silkscreen_oval"),
|
|
1490
1518
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
1491
|
-
pcb_component_id:
|
|
1492
|
-
pcb_group_id:
|
|
1493
|
-
subcircuit_id:
|
|
1519
|
+
pcb_component_id: z75.string(),
|
|
1520
|
+
pcb_group_id: z75.string().optional(),
|
|
1521
|
+
subcircuit_id: z75.string().optional(),
|
|
1494
1522
|
center: point,
|
|
1495
1523
|
radius_x: distance,
|
|
1496
1524
|
radius_y: distance,
|
|
@@ -1499,86 +1527,86 @@ var pcb_silkscreen_oval = z74.object({
|
|
|
1499
1527
|
expectTypesMatch(true);
|
|
1500
1528
|
|
|
1501
1529
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
1502
|
-
import { z as
|
|
1503
|
-
var pcb_fabrication_note_text =
|
|
1504
|
-
type:
|
|
1530
|
+
import { z as z76 } from "zod";
|
|
1531
|
+
var pcb_fabrication_note_text = z76.object({
|
|
1532
|
+
type: z76.literal("pcb_fabrication_note_text"),
|
|
1505
1533
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
1506
1534
|
"pcb_fabrication_note_text"
|
|
1507
1535
|
),
|
|
1508
|
-
subcircuit_id:
|
|
1509
|
-
pcb_group_id:
|
|
1510
|
-
font:
|
|
1536
|
+
subcircuit_id: z76.string().optional(),
|
|
1537
|
+
pcb_group_id: z76.string().optional(),
|
|
1538
|
+
font: z76.literal("tscircuit2024").default("tscircuit2024"),
|
|
1511
1539
|
font_size: distance.default("1mm"),
|
|
1512
|
-
pcb_component_id:
|
|
1513
|
-
text:
|
|
1540
|
+
pcb_component_id: z76.string(),
|
|
1541
|
+
text: z76.string(),
|
|
1514
1542
|
layer: visible_layer,
|
|
1515
1543
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1516
|
-
anchor_alignment:
|
|
1517
|
-
color:
|
|
1544
|
+
anchor_alignment: z76.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
1545
|
+
color: z76.string().optional()
|
|
1518
1546
|
}).describe(
|
|
1519
1547
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
1520
1548
|
);
|
|
1521
1549
|
expectTypesMatch(true);
|
|
1522
1550
|
|
|
1523
1551
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
1524
|
-
import { z as
|
|
1525
|
-
var pcb_fabrication_note_path =
|
|
1526
|
-
type:
|
|
1552
|
+
import { z as z77 } from "zod";
|
|
1553
|
+
var pcb_fabrication_note_path = z77.object({
|
|
1554
|
+
type: z77.literal("pcb_fabrication_note_path"),
|
|
1527
1555
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
1528
1556
|
"pcb_fabrication_note_path"
|
|
1529
1557
|
),
|
|
1530
|
-
pcb_component_id:
|
|
1531
|
-
subcircuit_id:
|
|
1558
|
+
pcb_component_id: z77.string(),
|
|
1559
|
+
subcircuit_id: z77.string().optional(),
|
|
1532
1560
|
layer: layer_ref,
|
|
1533
|
-
route:
|
|
1561
|
+
route: z77.array(point),
|
|
1534
1562
|
stroke_width: length,
|
|
1535
|
-
color:
|
|
1563
|
+
color: z77.string().optional()
|
|
1536
1564
|
}).describe(
|
|
1537
1565
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
1538
1566
|
);
|
|
1539
1567
|
expectTypesMatch(true);
|
|
1540
1568
|
|
|
1541
1569
|
// src/pcb/pcb_keepout.ts
|
|
1542
|
-
import { z as
|
|
1543
|
-
var pcb_keepout =
|
|
1544
|
-
type:
|
|
1545
|
-
shape:
|
|
1546
|
-
pcb_group_id:
|
|
1547
|
-
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(),
|
|
1548
1576
|
center: point,
|
|
1549
1577
|
width: distance,
|
|
1550
1578
|
height: distance,
|
|
1551
|
-
pcb_keepout_id:
|
|
1552
|
-
layers:
|
|
1579
|
+
pcb_keepout_id: z78.string(),
|
|
1580
|
+
layers: z78.array(z78.string()),
|
|
1553
1581
|
// Specify layers where the keepout applies
|
|
1554
|
-
description:
|
|
1582
|
+
description: z78.string().optional()
|
|
1555
1583
|
// Optional description of the keepout
|
|
1556
1584
|
}).or(
|
|
1557
|
-
|
|
1558
|
-
type:
|
|
1559
|
-
shape:
|
|
1560
|
-
pcb_group_id:
|
|
1561
|
-
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(),
|
|
1562
1590
|
center: point,
|
|
1563
1591
|
radius: distance,
|
|
1564
|
-
pcb_keepout_id:
|
|
1565
|
-
layers:
|
|
1592
|
+
pcb_keepout_id: z78.string(),
|
|
1593
|
+
layers: z78.array(z78.string()),
|
|
1566
1594
|
// Specify layers where the keepout applies
|
|
1567
|
-
description:
|
|
1595
|
+
description: z78.string().optional()
|
|
1568
1596
|
// Optional description of the keepout
|
|
1569
1597
|
})
|
|
1570
1598
|
);
|
|
1571
1599
|
|
|
1572
1600
|
// src/pcb/pcb_cutout.ts
|
|
1573
|
-
import { z as
|
|
1574
|
-
var pcb_cutout_base =
|
|
1575
|
-
type:
|
|
1601
|
+
import { z as z79 } from "zod";
|
|
1602
|
+
var pcb_cutout_base = z79.object({
|
|
1603
|
+
type: z79.literal("pcb_cutout"),
|
|
1576
1604
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
1577
|
-
pcb_group_id:
|
|
1578
|
-
subcircuit_id:
|
|
1605
|
+
pcb_group_id: z79.string().optional(),
|
|
1606
|
+
subcircuit_id: z79.string().optional()
|
|
1579
1607
|
});
|
|
1580
1608
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
1581
|
-
shape:
|
|
1609
|
+
shape: z79.literal("rect"),
|
|
1582
1610
|
center: point,
|
|
1583
1611
|
width: length,
|
|
1584
1612
|
height: length,
|
|
@@ -1586,17 +1614,17 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
1586
1614
|
});
|
|
1587
1615
|
expectTypesMatch(true);
|
|
1588
1616
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
1589
|
-
shape:
|
|
1617
|
+
shape: z79.literal("circle"),
|
|
1590
1618
|
center: point,
|
|
1591
1619
|
radius: length
|
|
1592
1620
|
});
|
|
1593
1621
|
expectTypesMatch(true);
|
|
1594
1622
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
1595
|
-
shape:
|
|
1596
|
-
points:
|
|
1623
|
+
shape: z79.literal("polygon"),
|
|
1624
|
+
points: z79.array(point)
|
|
1597
1625
|
});
|
|
1598
1626
|
expectTypesMatch(true);
|
|
1599
|
-
var pcb_cutout =
|
|
1627
|
+
var pcb_cutout = z79.discriminatedUnion("shape", [
|
|
1600
1628
|
pcb_cutout_rect,
|
|
1601
1629
|
pcb_cutout_circle,
|
|
1602
1630
|
pcb_cutout_polygon
|
|
@@ -1604,87 +1632,87 @@ var pcb_cutout = z78.discriminatedUnion("shape", [
|
|
|
1604
1632
|
expectTypesMatch(true);
|
|
1605
1633
|
|
|
1606
1634
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
1607
|
-
import { z as
|
|
1608
|
-
var pcb_missing_footprint_error =
|
|
1609
|
-
type:
|
|
1635
|
+
import { z as z80 } from "zod";
|
|
1636
|
+
var pcb_missing_footprint_error = z80.object({
|
|
1637
|
+
type: z80.literal("pcb_missing_footprint_error"),
|
|
1610
1638
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
1611
1639
|
"pcb_missing_footprint_error"
|
|
1612
1640
|
),
|
|
1613
|
-
pcb_group_id:
|
|
1614
|
-
subcircuit_id:
|
|
1615
|
-
error_type:
|
|
1616
|
-
source_component_id:
|
|
1617
|
-
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()
|
|
1618
1646
|
}).describe("Defines a missing footprint error on the PCB");
|
|
1619
1647
|
expectTypesMatch(
|
|
1620
1648
|
true
|
|
1621
1649
|
);
|
|
1622
1650
|
|
|
1623
1651
|
// src/pcb/pcb_group.ts
|
|
1624
|
-
import { z as
|
|
1625
|
-
var pcb_group =
|
|
1626
|
-
type:
|
|
1652
|
+
import { z as z81 } from "zod";
|
|
1653
|
+
var pcb_group = z81.object({
|
|
1654
|
+
type: z81.literal("pcb_group"),
|
|
1627
1655
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
1628
|
-
source_group_id:
|
|
1629
|
-
is_subcircuit:
|
|
1630
|
-
subcircuit_id:
|
|
1656
|
+
source_group_id: z81.string(),
|
|
1657
|
+
is_subcircuit: z81.boolean().optional(),
|
|
1658
|
+
subcircuit_id: z81.string().optional(),
|
|
1631
1659
|
width: length,
|
|
1632
1660
|
height: length,
|
|
1633
1661
|
center: point,
|
|
1634
|
-
pcb_component_ids:
|
|
1635
|
-
name:
|
|
1636
|
-
description:
|
|
1662
|
+
pcb_component_ids: z81.array(z81.string()),
|
|
1663
|
+
name: z81.string().optional(),
|
|
1664
|
+
description: z81.string().optional()
|
|
1637
1665
|
}).describe("Defines a group of components on the PCB");
|
|
1638
1666
|
expectTypesMatch(true);
|
|
1639
1667
|
|
|
1640
1668
|
// src/pcb/pcb_autorouting_error.ts
|
|
1641
|
-
import { z as
|
|
1642
|
-
var pcb_autorouting_error =
|
|
1643
|
-
type:
|
|
1669
|
+
import { z as z82 } from "zod";
|
|
1670
|
+
var pcb_autorouting_error = z82.object({
|
|
1671
|
+
type: z82.literal("pcb_autorouting_error"),
|
|
1644
1672
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
1645
|
-
message:
|
|
1673
|
+
message: z82.string()
|
|
1646
1674
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
1647
1675
|
expectTypesMatch(true);
|
|
1648
1676
|
|
|
1649
1677
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
1650
|
-
import { z as
|
|
1651
|
-
var pcb_manual_edit_conflict_warning =
|
|
1652
|
-
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"),
|
|
1653
1681
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1654
1682
|
"pcb_manual_edit_conflict_warning"
|
|
1655
1683
|
),
|
|
1656
|
-
message:
|
|
1657
|
-
pcb_component_id:
|
|
1658
|
-
pcb_group_id:
|
|
1659
|
-
subcircuit_id:
|
|
1660
|
-
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()
|
|
1661
1689
|
}).describe(
|
|
1662
1690
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
1663
1691
|
);
|
|
1664
1692
|
expectTypesMatch(true);
|
|
1665
1693
|
|
|
1666
1694
|
// src/cad/cad_component.ts
|
|
1667
|
-
import { z as
|
|
1668
|
-
var cad_component =
|
|
1669
|
-
type:
|
|
1670
|
-
cad_component_id:
|
|
1671
|
-
pcb_component_id:
|
|
1672
|
-
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(),
|
|
1673
1701
|
position: point3,
|
|
1674
1702
|
rotation: point3.optional(),
|
|
1675
1703
|
size: point3.optional(),
|
|
1676
1704
|
layer: layer_ref.optional(),
|
|
1677
1705
|
// These are all ways to generate/load the 3d model
|
|
1678
|
-
footprinter_string:
|
|
1679
|
-
model_obj_url:
|
|
1680
|
-
model_stl_url:
|
|
1681
|
-
model_3mf_url:
|
|
1682
|
-
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()
|
|
1683
1711
|
}).describe("Defines a component on the PCB");
|
|
1684
1712
|
|
|
1685
1713
|
// src/any_circuit_element.ts
|
|
1686
|
-
import { z as
|
|
1687
|
-
var any_circuit_element =
|
|
1714
|
+
import { z as z85 } from "zod";
|
|
1715
|
+
var any_circuit_element = z85.union([
|
|
1688
1716
|
source_trace,
|
|
1689
1717
|
source_port,
|
|
1690
1718
|
any_source_component,
|
|
@@ -1704,6 +1732,7 @@ var any_circuit_element = z84.union([
|
|
|
1704
1732
|
source_simple_resonator,
|
|
1705
1733
|
source_simple_switch,
|
|
1706
1734
|
source_simple_transistor,
|
|
1735
|
+
source_simple_test_point,
|
|
1707
1736
|
source_simple_mosfet,
|
|
1708
1737
|
source_simple_potentiometer,
|
|
1709
1738
|
source_simple_push_button,
|
|
@@ -1865,6 +1894,7 @@ export {
|
|
|
1865
1894
|
source_simple_resistor,
|
|
1866
1895
|
source_simple_resonator,
|
|
1867
1896
|
source_simple_switch,
|
|
1897
|
+
source_simple_test_point,
|
|
1868
1898
|
source_simple_transistor,
|
|
1869
1899
|
source_trace,
|
|
1870
1900
|
supplier_name,
|