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