circuit-json 0.0.236 → 0.0.238
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 +14 -0
- package/dist/index.d.mts +260 -18
- package/dist/index.mjs +820 -808
- 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,215 @@ 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().optional(),
|
|
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(),
|
|
844
|
+
// TODO: make required in a future release
|
|
845
|
+
subcircuit_connectivity_map_key: z45.string().optional()
|
|
836
846
|
});
|
|
837
847
|
expectTypesMatch(true);
|
|
838
848
|
|
|
839
849
|
// src/schematic/schematic_text.ts
|
|
840
|
-
import { z as
|
|
850
|
+
import { z as z47 } from "zod";
|
|
841
851
|
|
|
842
852
|
// src/common/FivePointAnchor.ts
|
|
843
|
-
import { z as
|
|
844
|
-
var fivePointAnchor =
|
|
853
|
+
import { z as z46 } from "zod";
|
|
854
|
+
var fivePointAnchor = z46.enum([
|
|
845
855
|
"center",
|
|
846
856
|
"left",
|
|
847
857
|
"right",
|
|
@@ -851,111 +861,111 @@ var fivePointAnchor = z45.enum([
|
|
|
851
861
|
expectTypesMatch(true);
|
|
852
862
|
|
|
853
863
|
// 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:
|
|
864
|
+
var schematic_text = z47.object({
|
|
865
|
+
type: z47.literal("schematic_text"),
|
|
866
|
+
schematic_component_id: z47.string().optional(),
|
|
867
|
+
schematic_text_id: z47.string(),
|
|
868
|
+
text: z47.string(),
|
|
869
|
+
font_size: z47.number().default(0.18),
|
|
870
|
+
position: z47.object({
|
|
861
871
|
x: distance,
|
|
862
872
|
y: distance
|
|
863
873
|
}),
|
|
864
|
-
rotation:
|
|
865
|
-
anchor:
|
|
866
|
-
color:
|
|
867
|
-
subcircuit_id:
|
|
874
|
+
rotation: z47.number().default(0),
|
|
875
|
+
anchor: z47.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
876
|
+
color: z47.string().default("#000000"),
|
|
877
|
+
subcircuit_id: z47.string().optional()
|
|
868
878
|
});
|
|
869
879
|
expectTypesMatch(true);
|
|
870
880
|
|
|
871
881
|
// 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:
|
|
882
|
+
import { z as z48 } from "zod";
|
|
883
|
+
var schematic_port = z48.object({
|
|
884
|
+
type: z48.literal("schematic_port"),
|
|
885
|
+
schematic_port_id: z48.string(),
|
|
886
|
+
source_port_id: z48.string(),
|
|
887
|
+
schematic_component_id: z48.string().optional(),
|
|
878
888
|
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
|
-
has_input_arrow:
|
|
888
|
-
has_output_arrow:
|
|
889
|
+
facing_direction: z48.enum(["up", "down", "left", "right"]).optional(),
|
|
890
|
+
distance_from_component_edge: z48.number().optional(),
|
|
891
|
+
side_of_component: z48.enum(["top", "bottom", "left", "right"]).optional(),
|
|
892
|
+
true_ccw_index: z48.number().optional(),
|
|
893
|
+
pin_number: z48.number().optional(),
|
|
894
|
+
display_pin_label: z48.string().optional(),
|
|
895
|
+
subcircuit_id: z48.string().optional(),
|
|
896
|
+
is_connected: z48.boolean().optional(),
|
|
897
|
+
has_input_arrow: z48.boolean().optional(),
|
|
898
|
+
has_output_arrow: z48.boolean().optional()
|
|
889
899
|
}).describe("Defines a port on a schematic component");
|
|
890
900
|
expectTypesMatch(true);
|
|
891
901
|
|
|
892
902
|
// src/schematic/schematic_net_label.ts
|
|
893
|
-
import { z as
|
|
894
|
-
var schematic_net_label =
|
|
895
|
-
type:
|
|
903
|
+
import { z as z49 } from "zod";
|
|
904
|
+
var schematic_net_label = z49.object({
|
|
905
|
+
type: z49.literal("schematic_net_label"),
|
|
896
906
|
schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
|
|
897
|
-
schematic_trace_id:
|
|
898
|
-
source_trace_id:
|
|
899
|
-
source_net_id:
|
|
907
|
+
schematic_trace_id: z49.string().optional(),
|
|
908
|
+
source_trace_id: z49.string().optional(),
|
|
909
|
+
source_net_id: z49.string(),
|
|
900
910
|
center: point,
|
|
901
911
|
anchor_position: point.optional(),
|
|
902
|
-
anchor_side:
|
|
903
|
-
text:
|
|
904
|
-
symbol_name:
|
|
905
|
-
is_movable:
|
|
906
|
-
subcircuit_id:
|
|
912
|
+
anchor_side: z49.enum(["top", "bottom", "left", "right"]),
|
|
913
|
+
text: z49.string(),
|
|
914
|
+
symbol_name: z49.string().optional(),
|
|
915
|
+
is_movable: z49.boolean().optional(),
|
|
916
|
+
subcircuit_id: z49.string().optional()
|
|
907
917
|
});
|
|
908
918
|
expectTypesMatch(true);
|
|
909
919
|
|
|
910
920
|
// src/schematic/schematic_error.ts
|
|
911
|
-
import { z as
|
|
912
|
-
var schematic_error =
|
|
913
|
-
type:
|
|
914
|
-
schematic_error_id:
|
|
921
|
+
import { z as z50 } from "zod";
|
|
922
|
+
var schematic_error = z50.object({
|
|
923
|
+
type: z50.literal("schematic_error"),
|
|
924
|
+
schematic_error_id: z50.string(),
|
|
915
925
|
// eventually each error type should be broken out into a dir of files
|
|
916
|
-
error_type:
|
|
917
|
-
message:
|
|
918
|
-
subcircuit_id:
|
|
926
|
+
error_type: z50.literal("schematic_port_not_found").default("schematic_port_not_found"),
|
|
927
|
+
message: z50.string(),
|
|
928
|
+
subcircuit_id: z50.string().optional()
|
|
919
929
|
}).describe("Defines a schematic error on the schematic");
|
|
920
930
|
expectTypesMatch(true);
|
|
921
931
|
|
|
922
932
|
// src/schematic/schematic_layout_error.ts
|
|
923
|
-
import { z as
|
|
924
|
-
var schematic_layout_error =
|
|
925
|
-
type:
|
|
933
|
+
import { z as z51 } from "zod";
|
|
934
|
+
var schematic_layout_error = z51.object({
|
|
935
|
+
type: z51.literal("schematic_layout_error"),
|
|
926
936
|
schematic_layout_error_id: getZodPrefixedIdWithDefault(
|
|
927
937
|
"schematic_layout_error"
|
|
928
938
|
),
|
|
929
|
-
error_type:
|
|
930
|
-
message:
|
|
931
|
-
source_group_id:
|
|
932
|
-
schematic_group_id:
|
|
933
|
-
subcircuit_id:
|
|
939
|
+
error_type: z51.literal("schematic_layout_error").default("schematic_layout_error"),
|
|
940
|
+
message: z51.string(),
|
|
941
|
+
source_group_id: z51.string(),
|
|
942
|
+
schematic_group_id: z51.string(),
|
|
943
|
+
subcircuit_id: z51.string().optional()
|
|
934
944
|
}).describe("Error emitted when schematic layout fails for a group");
|
|
935
945
|
expectTypesMatch(true);
|
|
936
946
|
|
|
937
947
|
// src/schematic/schematic_debug_object.ts
|
|
938
|
-
import { z as
|
|
939
|
-
var schematic_debug_object_base =
|
|
940
|
-
type:
|
|
941
|
-
label:
|
|
942
|
-
subcircuit_id:
|
|
948
|
+
import { z as z52 } from "zod";
|
|
949
|
+
var schematic_debug_object_base = z52.object({
|
|
950
|
+
type: z52.literal("schematic_debug_object"),
|
|
951
|
+
label: z52.string().optional(),
|
|
952
|
+
subcircuit_id: z52.string().optional()
|
|
943
953
|
});
|
|
944
954
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
945
|
-
shape:
|
|
955
|
+
shape: z52.literal("rect"),
|
|
946
956
|
center: point,
|
|
947
957
|
size
|
|
948
958
|
});
|
|
949
959
|
var schematic_debug_line = schematic_debug_object_base.extend({
|
|
950
|
-
shape:
|
|
960
|
+
shape: z52.literal("line"),
|
|
951
961
|
start: point,
|
|
952
962
|
end: point
|
|
953
963
|
});
|
|
954
964
|
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
955
|
-
shape:
|
|
965
|
+
shape: z52.literal("point"),
|
|
956
966
|
center: point
|
|
957
967
|
});
|
|
958
|
-
var schematic_debug_object =
|
|
968
|
+
var schematic_debug_object = z52.discriminatedUnion("shape", [
|
|
959
969
|
schematic_debug_rect,
|
|
960
970
|
schematic_debug_line,
|
|
961
971
|
schematic_debug_point
|
|
@@ -963,93 +973,93 @@ var schematic_debug_object = z51.discriminatedUnion("shape", [
|
|
|
963
973
|
expectTypesMatch(true);
|
|
964
974
|
|
|
965
975
|
// src/schematic/schematic_voltage_probe.ts
|
|
966
|
-
import { z as
|
|
967
|
-
var schematic_voltage_probe =
|
|
968
|
-
type:
|
|
969
|
-
schematic_voltage_probe_id:
|
|
976
|
+
import { z as z53 } from "zod";
|
|
977
|
+
var schematic_voltage_probe = z53.object({
|
|
978
|
+
type: z53.literal("schematic_voltage_probe"),
|
|
979
|
+
schematic_voltage_probe_id: z53.string(),
|
|
970
980
|
position: point,
|
|
971
|
-
schematic_trace_id:
|
|
981
|
+
schematic_trace_id: z53.string(),
|
|
972
982
|
voltage: voltage.optional(),
|
|
973
|
-
subcircuit_id:
|
|
983
|
+
subcircuit_id: z53.string().optional()
|
|
974
984
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
975
985
|
expectTypesMatch(true);
|
|
976
986
|
|
|
977
987
|
// src/schematic/schematic_manual_edit_conflict_warning.ts
|
|
978
|
-
import { z as
|
|
979
|
-
var schematic_manual_edit_conflict_warning =
|
|
980
|
-
type:
|
|
988
|
+
import { z as z54 } from "zod";
|
|
989
|
+
var schematic_manual_edit_conflict_warning = z54.object({
|
|
990
|
+
type: z54.literal("schematic_manual_edit_conflict_warning"),
|
|
981
991
|
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
982
992
|
"schematic_manual_edit_conflict_warning"
|
|
983
993
|
),
|
|
984
|
-
warning_type:
|
|
985
|
-
message:
|
|
986
|
-
schematic_component_id:
|
|
987
|
-
schematic_group_id:
|
|
988
|
-
subcircuit_id:
|
|
989
|
-
source_component_id:
|
|
994
|
+
warning_type: z54.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),
|
|
995
|
+
message: z54.string(),
|
|
996
|
+
schematic_component_id: z54.string(),
|
|
997
|
+
schematic_group_id: z54.string().optional(),
|
|
998
|
+
subcircuit_id: z54.string().optional(),
|
|
999
|
+
source_component_id: z54.string()
|
|
990
1000
|
}).describe(
|
|
991
1001
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
992
1002
|
);
|
|
993
1003
|
expectTypesMatch(true);
|
|
994
1004
|
|
|
995
1005
|
// src/schematic/schematic_group.ts
|
|
996
|
-
import { z as
|
|
997
|
-
var schematic_group =
|
|
998
|
-
type:
|
|
1006
|
+
import { z as z55 } from "zod";
|
|
1007
|
+
var schematic_group = z55.object({
|
|
1008
|
+
type: z55.literal("schematic_group"),
|
|
999
1009
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
1000
|
-
source_group_id:
|
|
1001
|
-
is_subcircuit:
|
|
1002
|
-
subcircuit_id:
|
|
1010
|
+
source_group_id: z55.string(),
|
|
1011
|
+
is_subcircuit: z55.boolean().optional(),
|
|
1012
|
+
subcircuit_id: z55.string().optional(),
|
|
1003
1013
|
width: length,
|
|
1004
1014
|
height: length,
|
|
1005
1015
|
center: point,
|
|
1006
|
-
schematic_component_ids:
|
|
1007
|
-
name:
|
|
1008
|
-
description:
|
|
1016
|
+
schematic_component_ids: z55.array(z55.string()),
|
|
1017
|
+
name: z55.string().optional(),
|
|
1018
|
+
description: z55.string().optional()
|
|
1009
1019
|
}).describe("Defines a group of components on the schematic");
|
|
1010
1020
|
expectTypesMatch(true);
|
|
1011
1021
|
|
|
1012
1022
|
// src/schematic/schematic_table.ts
|
|
1013
|
-
import { z as
|
|
1014
|
-
var schematic_table =
|
|
1015
|
-
type:
|
|
1023
|
+
import { z as z56 } from "zod";
|
|
1024
|
+
var schematic_table = z56.object({
|
|
1025
|
+
type: z56.literal("schematic_table"),
|
|
1016
1026
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
1017
1027
|
anchor_position: point,
|
|
1018
|
-
column_widths:
|
|
1019
|
-
row_heights:
|
|
1028
|
+
column_widths: z56.array(distance),
|
|
1029
|
+
row_heights: z56.array(distance),
|
|
1020
1030
|
cell_padding: distance.optional(),
|
|
1021
1031
|
border_width: distance.optional(),
|
|
1022
|
-
subcircuit_id:
|
|
1023
|
-
schematic_component_id:
|
|
1032
|
+
subcircuit_id: z56.string().optional(),
|
|
1033
|
+
schematic_component_id: z56.string().optional(),
|
|
1024
1034
|
anchor: ninePointAnchor.optional()
|
|
1025
1035
|
}).describe("Defines a table on the schematic");
|
|
1026
1036
|
expectTypesMatch(true);
|
|
1027
1037
|
|
|
1028
1038
|
// src/schematic/schematic_table_cell.ts
|
|
1029
|
-
import { z as
|
|
1030
|
-
var schematic_table_cell =
|
|
1031
|
-
type:
|
|
1039
|
+
import { z as z57 } from "zod";
|
|
1040
|
+
var schematic_table_cell = z57.object({
|
|
1041
|
+
type: z57.literal("schematic_table_cell"),
|
|
1032
1042
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
1033
1043
|
"schematic_table_cell"
|
|
1034
1044
|
),
|
|
1035
|
-
schematic_table_id:
|
|
1036
|
-
start_row_index:
|
|
1037
|
-
end_row_index:
|
|
1038
|
-
start_column_index:
|
|
1039
|
-
end_column_index:
|
|
1040
|
-
text:
|
|
1045
|
+
schematic_table_id: z57.string(),
|
|
1046
|
+
start_row_index: z57.number(),
|
|
1047
|
+
end_row_index: z57.number(),
|
|
1048
|
+
start_column_index: z57.number(),
|
|
1049
|
+
end_column_index: z57.number(),
|
|
1050
|
+
text: z57.string().optional(),
|
|
1041
1051
|
center: point,
|
|
1042
1052
|
width: distance,
|
|
1043
1053
|
height: distance,
|
|
1044
|
-
horizontal_align:
|
|
1045
|
-
vertical_align:
|
|
1054
|
+
horizontal_align: z57.enum(["left", "center", "right"]).optional(),
|
|
1055
|
+
vertical_align: z57.enum(["top", "middle", "bottom"]).optional(),
|
|
1046
1056
|
font_size: distance.optional(),
|
|
1047
|
-
subcircuit_id:
|
|
1057
|
+
subcircuit_id: z57.string().optional()
|
|
1048
1058
|
}).describe("Defines a cell within a schematic_table");
|
|
1049
1059
|
expectTypesMatch(true);
|
|
1050
1060
|
|
|
1051
1061
|
// src/pcb/properties/layer_ref.ts
|
|
1052
|
-
import { z as
|
|
1062
|
+
import { z as z58 } from "zod";
|
|
1053
1063
|
var all_layers = [
|
|
1054
1064
|
"top",
|
|
1055
1065
|
"bottom",
|
|
@@ -1060,9 +1070,9 @@ var all_layers = [
|
|
|
1060
1070
|
"inner5",
|
|
1061
1071
|
"inner6"
|
|
1062
1072
|
];
|
|
1063
|
-
var layer_string =
|
|
1073
|
+
var layer_string = z58.enum(all_layers);
|
|
1064
1074
|
var layer_ref = layer_string.or(
|
|
1065
|
-
|
|
1075
|
+
z58.object({
|
|
1066
1076
|
name: layer_string
|
|
1067
1077
|
})
|
|
1068
1078
|
).transform((layer) => {
|
|
@@ -1072,56 +1082,56 @@ var layer_ref = layer_string.or(
|
|
|
1072
1082
|
return layer.name;
|
|
1073
1083
|
});
|
|
1074
1084
|
expectTypesMatch(true);
|
|
1075
|
-
var visible_layer =
|
|
1085
|
+
var visible_layer = z58.enum(["top", "bottom"]);
|
|
1076
1086
|
|
|
1077
1087
|
// src/pcb/properties/pcb_route_hints.ts
|
|
1078
|
-
import { z as
|
|
1079
|
-
var pcb_route_hint =
|
|
1088
|
+
import { z as z59 } from "zod";
|
|
1089
|
+
var pcb_route_hint = z59.object({
|
|
1080
1090
|
x: distance,
|
|
1081
1091
|
y: distance,
|
|
1082
|
-
via:
|
|
1092
|
+
via: z59.boolean().optional(),
|
|
1083
1093
|
via_to_layer: layer_ref.optional()
|
|
1084
1094
|
});
|
|
1085
|
-
var pcb_route_hints =
|
|
1095
|
+
var pcb_route_hints = z59.array(pcb_route_hint);
|
|
1086
1096
|
expectTypesMatch(true);
|
|
1087
1097
|
expectTypesMatch(true);
|
|
1088
1098
|
|
|
1089
1099
|
// src/pcb/properties/route_hint_point.ts
|
|
1090
|
-
import { z as
|
|
1091
|
-
var route_hint_point =
|
|
1100
|
+
import { z as z60 } from "zod";
|
|
1101
|
+
var route_hint_point = z60.object({
|
|
1092
1102
|
x: distance,
|
|
1093
1103
|
y: distance,
|
|
1094
|
-
via:
|
|
1104
|
+
via: z60.boolean().optional(),
|
|
1095
1105
|
to_layer: layer_ref.optional(),
|
|
1096
1106
|
trace_width: distance.optional()
|
|
1097
1107
|
});
|
|
1098
1108
|
expectTypesMatch(true);
|
|
1099
1109
|
|
|
1100
1110
|
// src/pcb/pcb_component.ts
|
|
1101
|
-
import { z as
|
|
1102
|
-
var pcb_component =
|
|
1103
|
-
type:
|
|
1111
|
+
import { z as z61 } from "zod";
|
|
1112
|
+
var pcb_component = z61.object({
|
|
1113
|
+
type: z61.literal("pcb_component"),
|
|
1104
1114
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
1105
|
-
source_component_id:
|
|
1115
|
+
source_component_id: z61.string(),
|
|
1106
1116
|
center: point,
|
|
1107
1117
|
layer: layer_ref,
|
|
1108
1118
|
rotation,
|
|
1109
1119
|
width: length,
|
|
1110
1120
|
height: length,
|
|
1111
|
-
subcircuit_id:
|
|
1112
|
-
pcb_group_id:
|
|
1121
|
+
subcircuit_id: z61.string().optional(),
|
|
1122
|
+
pcb_group_id: z61.string().optional()
|
|
1113
1123
|
}).describe("Defines a component on the PCB");
|
|
1114
1124
|
expectTypesMatch(true);
|
|
1115
1125
|
|
|
1116
1126
|
// src/pcb/pcb_hole.ts
|
|
1117
|
-
import { z as
|
|
1118
|
-
var pcb_hole_circle_or_square =
|
|
1119
|
-
type:
|
|
1127
|
+
import { z as z62 } from "zod";
|
|
1128
|
+
var pcb_hole_circle_or_square = z62.object({
|
|
1129
|
+
type: z62.literal("pcb_hole"),
|
|
1120
1130
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1121
|
-
pcb_group_id:
|
|
1122
|
-
subcircuit_id:
|
|
1123
|
-
hole_shape:
|
|
1124
|
-
hole_diameter:
|
|
1131
|
+
pcb_group_id: z62.string().optional(),
|
|
1132
|
+
subcircuit_id: z62.string().optional(),
|
|
1133
|
+
hole_shape: z62.enum(["circle", "square"]),
|
|
1134
|
+
hole_diameter: z62.number(),
|
|
1125
1135
|
x: distance,
|
|
1126
1136
|
y: distance
|
|
1127
1137
|
});
|
|
@@ -1129,14 +1139,14 @@ var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
|
1129
1139
|
"Defines a circular or square hole on the PCB"
|
|
1130
1140
|
);
|
|
1131
1141
|
expectTypesMatch(true);
|
|
1132
|
-
var pcb_hole_oval =
|
|
1133
|
-
type:
|
|
1142
|
+
var pcb_hole_oval = z62.object({
|
|
1143
|
+
type: z62.literal("pcb_hole"),
|
|
1134
1144
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1135
|
-
pcb_group_id:
|
|
1136
|
-
subcircuit_id:
|
|
1137
|
-
hole_shape:
|
|
1138
|
-
hole_width:
|
|
1139
|
-
hole_height:
|
|
1145
|
+
pcb_group_id: z62.string().optional(),
|
|
1146
|
+
subcircuit_id: z62.string().optional(),
|
|
1147
|
+
hole_shape: z62.literal("oval"),
|
|
1148
|
+
hole_width: z62.number(),
|
|
1149
|
+
hole_height: z62.number(),
|
|
1140
1150
|
x: distance,
|
|
1141
1151
|
y: distance
|
|
1142
1152
|
});
|
|
@@ -1147,98 +1157,98 @@ expectTypesMatch(true);
|
|
|
1147
1157
|
var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval);
|
|
1148
1158
|
|
|
1149
1159
|
// src/pcb/pcb_plated_hole.ts
|
|
1150
|
-
import { z as
|
|
1151
|
-
var pcb_plated_hole_circle =
|
|
1152
|
-
type:
|
|
1153
|
-
shape:
|
|
1154
|
-
pcb_group_id:
|
|
1155
|
-
subcircuit_id:
|
|
1156
|
-
outer_diameter:
|
|
1157
|
-
hole_diameter:
|
|
1160
|
+
import { z as z63 } from "zod";
|
|
1161
|
+
var pcb_plated_hole_circle = z63.object({
|
|
1162
|
+
type: z63.literal("pcb_plated_hole"),
|
|
1163
|
+
shape: z63.literal("circle"),
|
|
1164
|
+
pcb_group_id: z63.string().optional(),
|
|
1165
|
+
subcircuit_id: z63.string().optional(),
|
|
1166
|
+
outer_diameter: z63.number(),
|
|
1167
|
+
hole_diameter: z63.number(),
|
|
1158
1168
|
x: distance,
|
|
1159
1169
|
y: distance,
|
|
1160
|
-
layers:
|
|
1161
|
-
port_hints:
|
|
1162
|
-
pcb_component_id:
|
|
1163
|
-
pcb_port_id:
|
|
1170
|
+
layers: z63.array(layer_ref),
|
|
1171
|
+
port_hints: z63.array(z63.string()).optional(),
|
|
1172
|
+
pcb_component_id: z63.string().optional(),
|
|
1173
|
+
pcb_port_id: z63.string().optional(),
|
|
1164
1174
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1165
1175
|
});
|
|
1166
|
-
var pcb_plated_hole_oval =
|
|
1167
|
-
type:
|
|
1168
|
-
shape:
|
|
1169
|
-
pcb_group_id:
|
|
1170
|
-
subcircuit_id:
|
|
1171
|
-
outer_width:
|
|
1172
|
-
outer_height:
|
|
1173
|
-
hole_width:
|
|
1174
|
-
hole_height:
|
|
1176
|
+
var pcb_plated_hole_oval = z63.object({
|
|
1177
|
+
type: z63.literal("pcb_plated_hole"),
|
|
1178
|
+
shape: z63.enum(["oval", "pill"]),
|
|
1179
|
+
pcb_group_id: z63.string().optional(),
|
|
1180
|
+
subcircuit_id: z63.string().optional(),
|
|
1181
|
+
outer_width: z63.number(),
|
|
1182
|
+
outer_height: z63.number(),
|
|
1183
|
+
hole_width: z63.number(),
|
|
1184
|
+
hole_height: z63.number(),
|
|
1175
1185
|
x: distance,
|
|
1176
1186
|
y: distance,
|
|
1177
|
-
layers:
|
|
1178
|
-
port_hints:
|
|
1179
|
-
pcb_component_id:
|
|
1180
|
-
pcb_port_id:
|
|
1187
|
+
layers: z63.array(layer_ref),
|
|
1188
|
+
port_hints: z63.array(z63.string()).optional(),
|
|
1189
|
+
pcb_component_id: z63.string().optional(),
|
|
1190
|
+
pcb_port_id: z63.string().optional(),
|
|
1181
1191
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1182
1192
|
});
|
|
1183
|
-
var pcb_circular_hole_with_rect_pad =
|
|
1184
|
-
type:
|
|
1185
|
-
shape:
|
|
1186
|
-
pcb_group_id:
|
|
1187
|
-
subcircuit_id:
|
|
1188
|
-
hole_shape:
|
|
1189
|
-
pad_shape:
|
|
1190
|
-
hole_diameter:
|
|
1191
|
-
rect_pad_width:
|
|
1192
|
-
rect_pad_height:
|
|
1193
|
+
var pcb_circular_hole_with_rect_pad = z63.object({
|
|
1194
|
+
type: z63.literal("pcb_plated_hole"),
|
|
1195
|
+
shape: z63.literal("circular_hole_with_rect_pad"),
|
|
1196
|
+
pcb_group_id: z63.string().optional(),
|
|
1197
|
+
subcircuit_id: z63.string().optional(),
|
|
1198
|
+
hole_shape: z63.literal("circle"),
|
|
1199
|
+
pad_shape: z63.literal("rect"),
|
|
1200
|
+
hole_diameter: z63.number(),
|
|
1201
|
+
rect_pad_width: z63.number(),
|
|
1202
|
+
rect_pad_height: z63.number(),
|
|
1193
1203
|
x: distance,
|
|
1194
1204
|
y: distance,
|
|
1195
|
-
layers:
|
|
1196
|
-
port_hints:
|
|
1197
|
-
pcb_component_id:
|
|
1198
|
-
pcb_port_id:
|
|
1205
|
+
layers: z63.array(layer_ref),
|
|
1206
|
+
port_hints: z63.array(z63.string()).optional(),
|
|
1207
|
+
pcb_component_id: z63.string().optional(),
|
|
1208
|
+
pcb_port_id: z63.string().optional(),
|
|
1199
1209
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1200
1210
|
});
|
|
1201
|
-
var pcb_pill_hole_with_rect_pad =
|
|
1202
|
-
type:
|
|
1203
|
-
shape:
|
|
1204
|
-
pcb_group_id:
|
|
1205
|
-
subcircuit_id:
|
|
1206
|
-
hole_shape:
|
|
1207
|
-
pad_shape:
|
|
1208
|
-
hole_width:
|
|
1209
|
-
hole_height:
|
|
1210
|
-
rect_pad_width:
|
|
1211
|
-
rect_pad_height:
|
|
1211
|
+
var pcb_pill_hole_with_rect_pad = z63.object({
|
|
1212
|
+
type: z63.literal("pcb_plated_hole"),
|
|
1213
|
+
shape: z63.literal("pill_hole_with_rect_pad"),
|
|
1214
|
+
pcb_group_id: z63.string().optional(),
|
|
1215
|
+
subcircuit_id: z63.string().optional(),
|
|
1216
|
+
hole_shape: z63.literal("pill"),
|
|
1217
|
+
pad_shape: z63.literal("rect"),
|
|
1218
|
+
hole_width: z63.number(),
|
|
1219
|
+
hole_height: z63.number(),
|
|
1220
|
+
rect_pad_width: z63.number(),
|
|
1221
|
+
rect_pad_height: z63.number(),
|
|
1212
1222
|
x: distance,
|
|
1213
1223
|
y: distance,
|
|
1214
|
-
layers:
|
|
1215
|
-
port_hints:
|
|
1216
|
-
pcb_component_id:
|
|
1217
|
-
pcb_port_id:
|
|
1224
|
+
layers: z63.array(layer_ref),
|
|
1225
|
+
port_hints: z63.array(z63.string()).optional(),
|
|
1226
|
+
pcb_component_id: z63.string().optional(),
|
|
1227
|
+
pcb_port_id: z63.string().optional(),
|
|
1218
1228
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1219
1229
|
});
|
|
1220
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
1221
|
-
type:
|
|
1222
|
-
shape:
|
|
1223
|
-
pcb_group_id:
|
|
1224
|
-
subcircuit_id:
|
|
1225
|
-
hole_shape:
|
|
1226
|
-
pad_shape:
|
|
1227
|
-
hole_width:
|
|
1228
|
-
hole_height:
|
|
1230
|
+
var pcb_rotated_pill_hole_with_rect_pad = z63.object({
|
|
1231
|
+
type: z63.literal("pcb_plated_hole"),
|
|
1232
|
+
shape: z63.literal("rotated_pill_hole_with_rect_pad"),
|
|
1233
|
+
pcb_group_id: z63.string().optional(),
|
|
1234
|
+
subcircuit_id: z63.string().optional(),
|
|
1235
|
+
hole_shape: z63.literal("rotated_pill"),
|
|
1236
|
+
pad_shape: z63.literal("rect"),
|
|
1237
|
+
hole_width: z63.number(),
|
|
1238
|
+
hole_height: z63.number(),
|
|
1229
1239
|
hole_ccw_rotation: rotation,
|
|
1230
|
-
rect_pad_width:
|
|
1231
|
-
rect_pad_height:
|
|
1240
|
+
rect_pad_width: z63.number(),
|
|
1241
|
+
rect_pad_height: z63.number(),
|
|
1232
1242
|
rect_ccw_rotation: rotation,
|
|
1233
1243
|
x: distance,
|
|
1234
1244
|
y: distance,
|
|
1235
|
-
layers:
|
|
1236
|
-
port_hints:
|
|
1237
|
-
pcb_component_id:
|
|
1238
|
-
pcb_port_id:
|
|
1245
|
+
layers: z63.array(layer_ref),
|
|
1246
|
+
port_hints: z63.array(z63.string()).optional(),
|
|
1247
|
+
pcb_component_id: z63.string().optional(),
|
|
1248
|
+
pcb_port_id: z63.string().optional(),
|
|
1239
1249
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1240
1250
|
});
|
|
1241
|
-
var pcb_plated_hole =
|
|
1251
|
+
var pcb_plated_hole = z63.union([
|
|
1242
1252
|
pcb_plated_hole_circle,
|
|
1243
1253
|
pcb_plated_hole_oval,
|
|
1244
1254
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -1254,113 +1264,113 @@ expectTypesMatch(true);
|
|
|
1254
1264
|
expectTypesMatch(true);
|
|
1255
1265
|
|
|
1256
1266
|
// src/pcb/pcb_port.ts
|
|
1257
|
-
import { z as
|
|
1258
|
-
var pcb_port =
|
|
1259
|
-
type:
|
|
1267
|
+
import { z as z64 } from "zod";
|
|
1268
|
+
var pcb_port = z64.object({
|
|
1269
|
+
type: z64.literal("pcb_port"),
|
|
1260
1270
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
1261
|
-
pcb_group_id:
|
|
1262
|
-
subcircuit_id:
|
|
1263
|
-
source_port_id:
|
|
1264
|
-
pcb_component_id:
|
|
1271
|
+
pcb_group_id: z64.string().optional(),
|
|
1272
|
+
subcircuit_id: z64.string().optional(),
|
|
1273
|
+
source_port_id: z64.string(),
|
|
1274
|
+
pcb_component_id: z64.string(),
|
|
1265
1275
|
x: distance,
|
|
1266
1276
|
y: distance,
|
|
1267
|
-
layers:
|
|
1277
|
+
layers: z64.array(layer_ref)
|
|
1268
1278
|
}).describe("Defines a port on the PCB");
|
|
1269
1279
|
expectTypesMatch(true);
|
|
1270
1280
|
|
|
1271
1281
|
// src/pcb/pcb_smtpad.ts
|
|
1272
|
-
import { z as
|
|
1273
|
-
var pcb_smtpad_circle =
|
|
1274
|
-
type:
|
|
1275
|
-
shape:
|
|
1282
|
+
import { z as z65 } from "zod";
|
|
1283
|
+
var pcb_smtpad_circle = z65.object({
|
|
1284
|
+
type: z65.literal("pcb_smtpad"),
|
|
1285
|
+
shape: z65.literal("circle"),
|
|
1276
1286
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1277
|
-
pcb_group_id:
|
|
1278
|
-
subcircuit_id:
|
|
1287
|
+
pcb_group_id: z65.string().optional(),
|
|
1288
|
+
subcircuit_id: z65.string().optional(),
|
|
1279
1289
|
x: distance,
|
|
1280
1290
|
y: distance,
|
|
1281
|
-
radius:
|
|
1291
|
+
radius: z65.number(),
|
|
1282
1292
|
layer: layer_ref,
|
|
1283
|
-
port_hints:
|
|
1284
|
-
pcb_component_id:
|
|
1285
|
-
pcb_port_id:
|
|
1293
|
+
port_hints: z65.array(z65.string()).optional(),
|
|
1294
|
+
pcb_component_id: z65.string().optional(),
|
|
1295
|
+
pcb_port_id: z65.string().optional()
|
|
1286
1296
|
});
|
|
1287
|
-
var pcb_smtpad_rect =
|
|
1288
|
-
type:
|
|
1289
|
-
shape:
|
|
1297
|
+
var pcb_smtpad_rect = z65.object({
|
|
1298
|
+
type: z65.literal("pcb_smtpad"),
|
|
1299
|
+
shape: z65.literal("rect"),
|
|
1290
1300
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1291
|
-
pcb_group_id:
|
|
1292
|
-
subcircuit_id:
|
|
1301
|
+
pcb_group_id: z65.string().optional(),
|
|
1302
|
+
subcircuit_id: z65.string().optional(),
|
|
1293
1303
|
x: distance,
|
|
1294
1304
|
y: distance,
|
|
1295
|
-
width:
|
|
1296
|
-
height:
|
|
1305
|
+
width: z65.number(),
|
|
1306
|
+
height: z65.number(),
|
|
1297
1307
|
layer: layer_ref,
|
|
1298
|
-
port_hints:
|
|
1299
|
-
pcb_component_id:
|
|
1300
|
-
pcb_port_id:
|
|
1308
|
+
port_hints: z65.array(z65.string()).optional(),
|
|
1309
|
+
pcb_component_id: z65.string().optional(),
|
|
1310
|
+
pcb_port_id: z65.string().optional()
|
|
1301
1311
|
});
|
|
1302
|
-
var pcb_smtpad_rotated_rect =
|
|
1303
|
-
type:
|
|
1304
|
-
shape:
|
|
1312
|
+
var pcb_smtpad_rotated_rect = z65.object({
|
|
1313
|
+
type: z65.literal("pcb_smtpad"),
|
|
1314
|
+
shape: z65.literal("rotated_rect"),
|
|
1305
1315
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1306
|
-
pcb_group_id:
|
|
1307
|
-
subcircuit_id:
|
|
1316
|
+
pcb_group_id: z65.string().optional(),
|
|
1317
|
+
subcircuit_id: z65.string().optional(),
|
|
1308
1318
|
x: distance,
|
|
1309
1319
|
y: distance,
|
|
1310
|
-
width:
|
|
1311
|
-
height:
|
|
1320
|
+
width: z65.number(),
|
|
1321
|
+
height: z65.number(),
|
|
1312
1322
|
ccw_rotation: rotation,
|
|
1313
1323
|
layer: layer_ref,
|
|
1314
|
-
port_hints:
|
|
1315
|
-
pcb_component_id:
|
|
1316
|
-
pcb_port_id:
|
|
1324
|
+
port_hints: z65.array(z65.string()).optional(),
|
|
1325
|
+
pcb_component_id: z65.string().optional(),
|
|
1326
|
+
pcb_port_id: z65.string().optional()
|
|
1317
1327
|
});
|
|
1318
|
-
var pcb_smtpad_pill =
|
|
1319
|
-
type:
|
|
1320
|
-
shape:
|
|
1328
|
+
var pcb_smtpad_pill = z65.object({
|
|
1329
|
+
type: z65.literal("pcb_smtpad"),
|
|
1330
|
+
shape: z65.literal("pill"),
|
|
1321
1331
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1322
|
-
pcb_group_id:
|
|
1323
|
-
subcircuit_id:
|
|
1332
|
+
pcb_group_id: z65.string().optional(),
|
|
1333
|
+
subcircuit_id: z65.string().optional(),
|
|
1324
1334
|
x: distance,
|
|
1325
1335
|
y: distance,
|
|
1326
|
-
width:
|
|
1327
|
-
height:
|
|
1328
|
-
radius:
|
|
1336
|
+
width: z65.number(),
|
|
1337
|
+
height: z65.number(),
|
|
1338
|
+
radius: z65.number(),
|
|
1329
1339
|
layer: layer_ref,
|
|
1330
|
-
port_hints:
|
|
1331
|
-
pcb_component_id:
|
|
1332
|
-
pcb_port_id:
|
|
1340
|
+
port_hints: z65.array(z65.string()).optional(),
|
|
1341
|
+
pcb_component_id: z65.string().optional(),
|
|
1342
|
+
pcb_port_id: z65.string().optional()
|
|
1333
1343
|
});
|
|
1334
|
-
var pcb_smtpad_rotated_pill =
|
|
1335
|
-
type:
|
|
1336
|
-
shape:
|
|
1344
|
+
var pcb_smtpad_rotated_pill = z65.object({
|
|
1345
|
+
type: z65.literal("pcb_smtpad"),
|
|
1346
|
+
shape: z65.literal("rotated_pill"),
|
|
1337
1347
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1338
|
-
pcb_group_id:
|
|
1339
|
-
subcircuit_id:
|
|
1348
|
+
pcb_group_id: z65.string().optional(),
|
|
1349
|
+
subcircuit_id: z65.string().optional(),
|
|
1340
1350
|
x: distance,
|
|
1341
1351
|
y: distance,
|
|
1342
|
-
width:
|
|
1343
|
-
height:
|
|
1344
|
-
radius:
|
|
1352
|
+
width: z65.number(),
|
|
1353
|
+
height: z65.number(),
|
|
1354
|
+
radius: z65.number(),
|
|
1345
1355
|
ccw_rotation: rotation,
|
|
1346
1356
|
layer: layer_ref,
|
|
1347
|
-
port_hints:
|
|
1348
|
-
pcb_component_id:
|
|
1349
|
-
pcb_port_id:
|
|
1357
|
+
port_hints: z65.array(z65.string()).optional(),
|
|
1358
|
+
pcb_component_id: z65.string().optional(),
|
|
1359
|
+
pcb_port_id: z65.string().optional()
|
|
1350
1360
|
});
|
|
1351
|
-
var pcb_smtpad_polygon =
|
|
1352
|
-
type:
|
|
1353
|
-
shape:
|
|
1361
|
+
var pcb_smtpad_polygon = z65.object({
|
|
1362
|
+
type: z65.literal("pcb_smtpad"),
|
|
1363
|
+
shape: z65.literal("polygon"),
|
|
1354
1364
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1355
|
-
pcb_group_id:
|
|
1356
|
-
subcircuit_id:
|
|
1357
|
-
points:
|
|
1365
|
+
pcb_group_id: z65.string().optional(),
|
|
1366
|
+
subcircuit_id: z65.string().optional(),
|
|
1367
|
+
points: z65.array(point),
|
|
1358
1368
|
layer: layer_ref,
|
|
1359
|
-
port_hints:
|
|
1360
|
-
pcb_component_id:
|
|
1361
|
-
pcb_port_id:
|
|
1369
|
+
port_hints: z65.array(z65.string()).optional(),
|
|
1370
|
+
pcb_component_id: z65.string().optional(),
|
|
1371
|
+
pcb_port_id: z65.string().optional()
|
|
1362
1372
|
});
|
|
1363
|
-
var pcb_smtpad =
|
|
1373
|
+
var pcb_smtpad = z65.discriminatedUnion("shape", [
|
|
1364
1374
|
pcb_smtpad_circle,
|
|
1365
1375
|
pcb_smtpad_rect,
|
|
1366
1376
|
pcb_smtpad_rotated_rect,
|
|
@@ -1376,79 +1386,79 @@ expectTypesMatch(true);
|
|
|
1376
1386
|
expectTypesMatch(true);
|
|
1377
1387
|
|
|
1378
1388
|
// src/pcb/pcb_solder_paste.ts
|
|
1379
|
-
import { z as
|
|
1380
|
-
var pcb_solder_paste_circle =
|
|
1381
|
-
type:
|
|
1382
|
-
shape:
|
|
1389
|
+
import { z as z66 } from "zod";
|
|
1390
|
+
var pcb_solder_paste_circle = z66.object({
|
|
1391
|
+
type: z66.literal("pcb_solder_paste"),
|
|
1392
|
+
shape: z66.literal("circle"),
|
|
1383
1393
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1384
|
-
pcb_group_id:
|
|
1385
|
-
subcircuit_id:
|
|
1394
|
+
pcb_group_id: z66.string().optional(),
|
|
1395
|
+
subcircuit_id: z66.string().optional(),
|
|
1386
1396
|
x: distance,
|
|
1387
1397
|
y: distance,
|
|
1388
|
-
radius:
|
|
1398
|
+
radius: z66.number(),
|
|
1389
1399
|
layer: layer_ref,
|
|
1390
|
-
pcb_component_id:
|
|
1391
|
-
pcb_smtpad_id:
|
|
1400
|
+
pcb_component_id: z66.string().optional(),
|
|
1401
|
+
pcb_smtpad_id: z66.string().optional()
|
|
1392
1402
|
});
|
|
1393
|
-
var pcb_solder_paste_rect =
|
|
1394
|
-
type:
|
|
1395
|
-
shape:
|
|
1403
|
+
var pcb_solder_paste_rect = z66.object({
|
|
1404
|
+
type: z66.literal("pcb_solder_paste"),
|
|
1405
|
+
shape: z66.literal("rect"),
|
|
1396
1406
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1397
|
-
pcb_group_id:
|
|
1398
|
-
subcircuit_id:
|
|
1407
|
+
pcb_group_id: z66.string().optional(),
|
|
1408
|
+
subcircuit_id: z66.string().optional(),
|
|
1399
1409
|
x: distance,
|
|
1400
1410
|
y: distance,
|
|
1401
|
-
width:
|
|
1402
|
-
height:
|
|
1411
|
+
width: z66.number(),
|
|
1412
|
+
height: z66.number(),
|
|
1403
1413
|
layer: layer_ref,
|
|
1404
|
-
pcb_component_id:
|
|
1405
|
-
pcb_smtpad_id:
|
|
1414
|
+
pcb_component_id: z66.string().optional(),
|
|
1415
|
+
pcb_smtpad_id: z66.string().optional()
|
|
1406
1416
|
});
|
|
1407
|
-
var pcb_solder_paste_pill =
|
|
1408
|
-
type:
|
|
1409
|
-
shape:
|
|
1417
|
+
var pcb_solder_paste_pill = z66.object({
|
|
1418
|
+
type: z66.literal("pcb_solder_paste"),
|
|
1419
|
+
shape: z66.literal("pill"),
|
|
1410
1420
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1411
|
-
pcb_group_id:
|
|
1412
|
-
subcircuit_id:
|
|
1421
|
+
pcb_group_id: z66.string().optional(),
|
|
1422
|
+
subcircuit_id: z66.string().optional(),
|
|
1413
1423
|
x: distance,
|
|
1414
1424
|
y: distance,
|
|
1415
|
-
width:
|
|
1416
|
-
height:
|
|
1417
|
-
radius:
|
|
1425
|
+
width: z66.number(),
|
|
1426
|
+
height: z66.number(),
|
|
1427
|
+
radius: z66.number(),
|
|
1418
1428
|
layer: layer_ref,
|
|
1419
|
-
pcb_component_id:
|
|
1420
|
-
pcb_smtpad_id:
|
|
1429
|
+
pcb_component_id: z66.string().optional(),
|
|
1430
|
+
pcb_smtpad_id: z66.string().optional()
|
|
1421
1431
|
});
|
|
1422
|
-
var pcb_solder_paste_rotated_rect =
|
|
1423
|
-
type:
|
|
1424
|
-
shape:
|
|
1432
|
+
var pcb_solder_paste_rotated_rect = z66.object({
|
|
1433
|
+
type: z66.literal("pcb_solder_paste"),
|
|
1434
|
+
shape: z66.literal("rotated_rect"),
|
|
1425
1435
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1426
|
-
pcb_group_id:
|
|
1427
|
-
subcircuit_id:
|
|
1436
|
+
pcb_group_id: z66.string().optional(),
|
|
1437
|
+
subcircuit_id: z66.string().optional(),
|
|
1428
1438
|
x: distance,
|
|
1429
1439
|
y: distance,
|
|
1430
|
-
width:
|
|
1431
|
-
height:
|
|
1440
|
+
width: z66.number(),
|
|
1441
|
+
height: z66.number(),
|
|
1432
1442
|
ccw_rotation: distance,
|
|
1433
1443
|
layer: layer_ref,
|
|
1434
|
-
pcb_component_id:
|
|
1435
|
-
pcb_smtpad_id:
|
|
1444
|
+
pcb_component_id: z66.string().optional(),
|
|
1445
|
+
pcb_smtpad_id: z66.string().optional()
|
|
1436
1446
|
});
|
|
1437
|
-
var pcb_solder_paste_oval =
|
|
1438
|
-
type:
|
|
1439
|
-
shape:
|
|
1447
|
+
var pcb_solder_paste_oval = z66.object({
|
|
1448
|
+
type: z66.literal("pcb_solder_paste"),
|
|
1449
|
+
shape: z66.literal("oval"),
|
|
1440
1450
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1441
|
-
pcb_group_id:
|
|
1442
|
-
subcircuit_id:
|
|
1451
|
+
pcb_group_id: z66.string().optional(),
|
|
1452
|
+
subcircuit_id: z66.string().optional(),
|
|
1443
1453
|
x: distance,
|
|
1444
1454
|
y: distance,
|
|
1445
|
-
width:
|
|
1446
|
-
height:
|
|
1455
|
+
width: z66.number(),
|
|
1456
|
+
height: z66.number(),
|
|
1447
1457
|
layer: layer_ref,
|
|
1448
|
-
pcb_component_id:
|
|
1449
|
-
pcb_smtpad_id:
|
|
1458
|
+
pcb_component_id: z66.string().optional(),
|
|
1459
|
+
pcb_smtpad_id: z66.string().optional()
|
|
1450
1460
|
});
|
|
1451
|
-
var pcb_solder_paste =
|
|
1461
|
+
var pcb_solder_paste = z66.union([
|
|
1452
1462
|
pcb_solder_paste_circle,
|
|
1453
1463
|
pcb_solder_paste_rect,
|
|
1454
1464
|
pcb_solder_paste_pill,
|
|
@@ -1464,134 +1474,134 @@ expectTypesMatch(
|
|
|
1464
1474
|
expectTypesMatch(true);
|
|
1465
1475
|
|
|
1466
1476
|
// src/pcb/pcb_text.ts
|
|
1467
|
-
import { z as
|
|
1468
|
-
var pcb_text =
|
|
1469
|
-
type:
|
|
1477
|
+
import { z as z67 } from "zod";
|
|
1478
|
+
var pcb_text = z67.object({
|
|
1479
|
+
type: z67.literal("pcb_text"),
|
|
1470
1480
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
1471
|
-
pcb_group_id:
|
|
1472
|
-
subcircuit_id:
|
|
1473
|
-
text:
|
|
1481
|
+
pcb_group_id: z67.string().optional(),
|
|
1482
|
+
subcircuit_id: z67.string().optional(),
|
|
1483
|
+
text: z67.string(),
|
|
1474
1484
|
center: point,
|
|
1475
1485
|
layer: layer_ref,
|
|
1476
1486
|
width: length,
|
|
1477
1487
|
height: length,
|
|
1478
|
-
lines:
|
|
1488
|
+
lines: z67.number(),
|
|
1479
1489
|
// @ts-ignore
|
|
1480
|
-
align:
|
|
1490
|
+
align: z67.enum(["bottom-left"])
|
|
1481
1491
|
}).describe("Defines text on the PCB");
|
|
1482
1492
|
expectTypesMatch(true);
|
|
1483
1493
|
|
|
1484
1494
|
// src/pcb/pcb_trace.ts
|
|
1485
|
-
import { z as
|
|
1486
|
-
var pcb_trace_route_point_wire =
|
|
1487
|
-
route_type:
|
|
1495
|
+
import { z as z68 } from "zod";
|
|
1496
|
+
var pcb_trace_route_point_wire = z68.object({
|
|
1497
|
+
route_type: z68.literal("wire"),
|
|
1488
1498
|
x: distance,
|
|
1489
1499
|
y: distance,
|
|
1490
1500
|
width: distance,
|
|
1491
|
-
start_pcb_port_id:
|
|
1492
|
-
end_pcb_port_id:
|
|
1501
|
+
start_pcb_port_id: z68.string().optional(),
|
|
1502
|
+
end_pcb_port_id: z68.string().optional(),
|
|
1493
1503
|
layer: layer_ref
|
|
1494
1504
|
});
|
|
1495
|
-
var pcb_trace_route_point_via =
|
|
1496
|
-
route_type:
|
|
1505
|
+
var pcb_trace_route_point_via = z68.object({
|
|
1506
|
+
route_type: z68.literal("via"),
|
|
1497
1507
|
x: distance,
|
|
1498
1508
|
y: distance,
|
|
1499
1509
|
hole_diameter: distance.optional(),
|
|
1500
1510
|
outer_diameter: distance.optional(),
|
|
1501
|
-
from_layer:
|
|
1502
|
-
to_layer:
|
|
1511
|
+
from_layer: z68.string(),
|
|
1512
|
+
to_layer: z68.string()
|
|
1503
1513
|
});
|
|
1504
|
-
var pcb_trace_route_point =
|
|
1514
|
+
var pcb_trace_route_point = z68.union([
|
|
1505
1515
|
pcb_trace_route_point_wire,
|
|
1506
1516
|
pcb_trace_route_point_via
|
|
1507
1517
|
]);
|
|
1508
|
-
var pcb_trace =
|
|
1509
|
-
type:
|
|
1510
|
-
source_trace_id:
|
|
1511
|
-
pcb_component_id:
|
|
1518
|
+
var pcb_trace = z68.object({
|
|
1519
|
+
type: z68.literal("pcb_trace"),
|
|
1520
|
+
source_trace_id: z68.string().optional(),
|
|
1521
|
+
pcb_component_id: z68.string().optional(),
|
|
1512
1522
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
1513
|
-
pcb_group_id:
|
|
1514
|
-
subcircuit_id:
|
|
1515
|
-
route_thickness_mode:
|
|
1516
|
-
route_order_index:
|
|
1517
|
-
should_round_corners:
|
|
1518
|
-
trace_length:
|
|
1519
|
-
route:
|
|
1523
|
+
pcb_group_id: z68.string().optional(),
|
|
1524
|
+
subcircuit_id: z68.string().optional(),
|
|
1525
|
+
route_thickness_mode: z68.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
1526
|
+
route_order_index: z68.number().optional(),
|
|
1527
|
+
should_round_corners: z68.boolean().optional(),
|
|
1528
|
+
trace_length: z68.number().optional(),
|
|
1529
|
+
route: z68.array(pcb_trace_route_point)
|
|
1520
1530
|
}).describe("Defines a trace on the PCB");
|
|
1521
1531
|
expectTypesMatch(true);
|
|
1522
1532
|
expectTypesMatch(true);
|
|
1523
1533
|
|
|
1524
1534
|
// src/pcb/pcb_trace_error.ts
|
|
1525
|
-
import { z as
|
|
1526
|
-
var pcb_trace_error =
|
|
1527
|
-
type:
|
|
1535
|
+
import { z as z69 } from "zod";
|
|
1536
|
+
var pcb_trace_error = z69.object({
|
|
1537
|
+
type: z69.literal("pcb_trace_error"),
|
|
1528
1538
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
1529
|
-
error_type:
|
|
1530
|
-
message:
|
|
1539
|
+
error_type: z69.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
1540
|
+
message: z69.string(),
|
|
1531
1541
|
center: point.optional(),
|
|
1532
|
-
pcb_trace_id:
|
|
1533
|
-
source_trace_id:
|
|
1534
|
-
pcb_component_ids:
|
|
1535
|
-
pcb_port_ids:
|
|
1536
|
-
subcircuit_id:
|
|
1542
|
+
pcb_trace_id: z69.string(),
|
|
1543
|
+
source_trace_id: z69.string(),
|
|
1544
|
+
pcb_component_ids: z69.array(z69.string()),
|
|
1545
|
+
pcb_port_ids: z69.array(z69.string()),
|
|
1546
|
+
subcircuit_id: z69.string().optional()
|
|
1537
1547
|
}).describe("Defines a trace error on the PCB");
|
|
1538
1548
|
expectTypesMatch(true);
|
|
1539
1549
|
|
|
1540
1550
|
// src/pcb/pcb_trace_missing_error.ts
|
|
1541
|
-
import { z as
|
|
1542
|
-
var pcb_trace_missing_error =
|
|
1543
|
-
type:
|
|
1551
|
+
import { z as z70 } from "zod";
|
|
1552
|
+
var pcb_trace_missing_error = z70.object({
|
|
1553
|
+
type: z70.literal("pcb_trace_missing_error"),
|
|
1544
1554
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
1545
1555
|
"pcb_trace_missing_error"
|
|
1546
1556
|
),
|
|
1547
|
-
error_type:
|
|
1548
|
-
message:
|
|
1557
|
+
error_type: z70.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
1558
|
+
message: z70.string(),
|
|
1549
1559
|
center: point.optional(),
|
|
1550
|
-
source_trace_id:
|
|
1551
|
-
pcb_component_ids:
|
|
1552
|
-
pcb_port_ids:
|
|
1553
|
-
subcircuit_id:
|
|
1560
|
+
source_trace_id: z70.string(),
|
|
1561
|
+
pcb_component_ids: z70.array(z70.string()),
|
|
1562
|
+
pcb_port_ids: z70.array(z70.string()),
|
|
1563
|
+
subcircuit_id: z70.string().optional()
|
|
1554
1564
|
}).describe(
|
|
1555
1565
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
1556
1566
|
);
|
|
1557
1567
|
expectTypesMatch(true);
|
|
1558
1568
|
|
|
1559
1569
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
1560
|
-
import { z as
|
|
1561
|
-
var pcb_port_not_matched_error =
|
|
1562
|
-
type:
|
|
1570
|
+
import { z as z71 } from "zod";
|
|
1571
|
+
var pcb_port_not_matched_error = z71.object({
|
|
1572
|
+
type: z71.literal("pcb_port_not_matched_error"),
|
|
1563
1573
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1564
|
-
error_type:
|
|
1565
|
-
message:
|
|
1566
|
-
pcb_component_ids:
|
|
1567
|
-
subcircuit_id:
|
|
1574
|
+
error_type: z71.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
1575
|
+
message: z71.string(),
|
|
1576
|
+
pcb_component_ids: z71.array(z71.string()),
|
|
1577
|
+
subcircuit_id: z71.string().optional()
|
|
1568
1578
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
1569
1579
|
expectTypesMatch(true);
|
|
1570
1580
|
|
|
1571
1581
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
1572
|
-
import { z as
|
|
1573
|
-
var pcb_port_not_connected_error =
|
|
1574
|
-
type:
|
|
1582
|
+
import { z as z72 } from "zod";
|
|
1583
|
+
var pcb_port_not_connected_error = z72.object({
|
|
1584
|
+
type: z72.literal("pcb_port_not_connected_error"),
|
|
1575
1585
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
1576
1586
|
"pcb_port_not_connected_error"
|
|
1577
1587
|
),
|
|
1578
|
-
error_type:
|
|
1579
|
-
message:
|
|
1580
|
-
pcb_port_ids:
|
|
1581
|
-
pcb_component_ids:
|
|
1582
|
-
subcircuit_id:
|
|
1588
|
+
error_type: z72.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
1589
|
+
message: z72.string(),
|
|
1590
|
+
pcb_port_ids: z72.array(z72.string()),
|
|
1591
|
+
pcb_component_ids: z72.array(z72.string()),
|
|
1592
|
+
subcircuit_id: z72.string().optional()
|
|
1583
1593
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
1584
1594
|
expectTypesMatch(
|
|
1585
1595
|
true
|
|
1586
1596
|
);
|
|
1587
1597
|
|
|
1588
1598
|
// src/pcb/pcb_via.ts
|
|
1589
|
-
import { z as
|
|
1590
|
-
var pcb_via =
|
|
1591
|
-
type:
|
|
1599
|
+
import { z as z73 } from "zod";
|
|
1600
|
+
var pcb_via = z73.object({
|
|
1601
|
+
type: z73.literal("pcb_via"),
|
|
1592
1602
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
1593
|
-
pcb_group_id:
|
|
1594
|
-
subcircuit_id:
|
|
1603
|
+
pcb_group_id: z73.string().optional(),
|
|
1604
|
+
subcircuit_id: z73.string().optional(),
|
|
1595
1605
|
x: distance,
|
|
1596
1606
|
y: distance,
|
|
1597
1607
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -1600,59 +1610,59 @@ var pcb_via = z72.object({
|
|
|
1600
1610
|
from_layer: layer_ref.optional(),
|
|
1601
1611
|
/** @deprecated */
|
|
1602
1612
|
to_layer: layer_ref.optional(),
|
|
1603
|
-
layers:
|
|
1604
|
-
pcb_trace_id:
|
|
1613
|
+
layers: z73.array(layer_ref),
|
|
1614
|
+
pcb_trace_id: z73.string().optional()
|
|
1605
1615
|
}).describe("Defines a via on the PCB");
|
|
1606
1616
|
expectTypesMatch(true);
|
|
1607
1617
|
|
|
1608
1618
|
// src/pcb/pcb_board.ts
|
|
1609
|
-
import { z as
|
|
1610
|
-
var pcb_board =
|
|
1611
|
-
type:
|
|
1619
|
+
import { z as z74 } from "zod";
|
|
1620
|
+
var pcb_board = z74.object({
|
|
1621
|
+
type: z74.literal("pcb_board"),
|
|
1612
1622
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
1613
|
-
is_subcircuit:
|
|
1614
|
-
subcircuit_id:
|
|
1623
|
+
is_subcircuit: z74.boolean().optional(),
|
|
1624
|
+
subcircuit_id: z74.string().optional(),
|
|
1615
1625
|
width: length,
|
|
1616
1626
|
height: length,
|
|
1617
1627
|
center: point,
|
|
1618
1628
|
thickness: length.optional().default(1.4),
|
|
1619
|
-
num_layers:
|
|
1620
|
-
outline:
|
|
1621
|
-
material:
|
|
1629
|
+
num_layers: z74.number().optional().default(4),
|
|
1630
|
+
outline: z74.array(point).optional(),
|
|
1631
|
+
material: z74.enum(["fr4", "fr1"]).default("fr4")
|
|
1622
1632
|
}).describe("Defines the board outline of the PCB");
|
|
1623
1633
|
expectTypesMatch(true);
|
|
1624
1634
|
|
|
1625
1635
|
// src/pcb/pcb_placement_error.ts
|
|
1626
|
-
import { z as
|
|
1627
|
-
var pcb_placement_error =
|
|
1628
|
-
type:
|
|
1636
|
+
import { z as z75 } from "zod";
|
|
1637
|
+
var pcb_placement_error = z75.object({
|
|
1638
|
+
type: z75.literal("pcb_placement_error"),
|
|
1629
1639
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
1630
|
-
error_type:
|
|
1631
|
-
message:
|
|
1632
|
-
subcircuit_id:
|
|
1640
|
+
error_type: z75.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
1641
|
+
message: z75.string(),
|
|
1642
|
+
subcircuit_id: z75.string().optional()
|
|
1633
1643
|
}).describe("Defines a placement error on the PCB");
|
|
1634
1644
|
expectTypesMatch(true);
|
|
1635
1645
|
|
|
1636
1646
|
// src/pcb/pcb_trace_hint.ts
|
|
1637
|
-
import { z as
|
|
1638
|
-
var pcb_trace_hint =
|
|
1639
|
-
type:
|
|
1647
|
+
import { z as z76 } from "zod";
|
|
1648
|
+
var pcb_trace_hint = z76.object({
|
|
1649
|
+
type: z76.literal("pcb_trace_hint"),
|
|
1640
1650
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
1641
|
-
pcb_port_id:
|
|
1642
|
-
pcb_component_id:
|
|
1643
|
-
route:
|
|
1644
|
-
subcircuit_id:
|
|
1651
|
+
pcb_port_id: z76.string(),
|
|
1652
|
+
pcb_component_id: z76.string(),
|
|
1653
|
+
route: z76.array(route_hint_point),
|
|
1654
|
+
subcircuit_id: z76.string().optional()
|
|
1645
1655
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
1646
1656
|
expectTypesMatch(true);
|
|
1647
1657
|
|
|
1648
1658
|
// src/pcb/pcb_silkscreen_line.ts
|
|
1649
|
-
import { z as
|
|
1650
|
-
var pcb_silkscreen_line =
|
|
1651
|
-
type:
|
|
1659
|
+
import { z as z77 } from "zod";
|
|
1660
|
+
var pcb_silkscreen_line = z77.object({
|
|
1661
|
+
type: z77.literal("pcb_silkscreen_line"),
|
|
1652
1662
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
1653
|
-
pcb_component_id:
|
|
1654
|
-
pcb_group_id:
|
|
1655
|
-
subcircuit_id:
|
|
1663
|
+
pcb_component_id: z77.string(),
|
|
1664
|
+
pcb_group_id: z77.string().optional(),
|
|
1665
|
+
subcircuit_id: z77.string().optional(),
|
|
1656
1666
|
stroke_width: distance.default("0.1mm"),
|
|
1657
1667
|
x1: distance,
|
|
1658
1668
|
y1: distance,
|
|
@@ -1663,67 +1673,67 @@ var pcb_silkscreen_line = z76.object({
|
|
|
1663
1673
|
expectTypesMatch(true);
|
|
1664
1674
|
|
|
1665
1675
|
// src/pcb/pcb_silkscreen_path.ts
|
|
1666
|
-
import { z as
|
|
1667
|
-
var pcb_silkscreen_path =
|
|
1668
|
-
type:
|
|
1676
|
+
import { z as z78 } from "zod";
|
|
1677
|
+
var pcb_silkscreen_path = z78.object({
|
|
1678
|
+
type: z78.literal("pcb_silkscreen_path"),
|
|
1669
1679
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
1670
|
-
pcb_component_id:
|
|
1671
|
-
pcb_group_id:
|
|
1672
|
-
subcircuit_id:
|
|
1680
|
+
pcb_component_id: z78.string(),
|
|
1681
|
+
pcb_group_id: z78.string().optional(),
|
|
1682
|
+
subcircuit_id: z78.string().optional(),
|
|
1673
1683
|
layer: visible_layer,
|
|
1674
|
-
route:
|
|
1684
|
+
route: z78.array(point),
|
|
1675
1685
|
stroke_width: length
|
|
1676
1686
|
}).describe("Defines a silkscreen path on the PCB");
|
|
1677
1687
|
expectTypesMatch(true);
|
|
1678
1688
|
|
|
1679
1689
|
// src/pcb/pcb_silkscreen_text.ts
|
|
1680
|
-
import { z as
|
|
1681
|
-
var pcb_silkscreen_text =
|
|
1682
|
-
type:
|
|
1690
|
+
import { z as z79 } from "zod";
|
|
1691
|
+
var pcb_silkscreen_text = z79.object({
|
|
1692
|
+
type: z79.literal("pcb_silkscreen_text"),
|
|
1683
1693
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
1684
|
-
pcb_group_id:
|
|
1685
|
-
subcircuit_id:
|
|
1686
|
-
font:
|
|
1694
|
+
pcb_group_id: z79.string().optional(),
|
|
1695
|
+
subcircuit_id: z79.string().optional(),
|
|
1696
|
+
font: z79.literal("tscircuit2024").default("tscircuit2024"),
|
|
1687
1697
|
font_size: distance.default("0.2mm"),
|
|
1688
|
-
pcb_component_id:
|
|
1689
|
-
text:
|
|
1690
|
-
ccw_rotation:
|
|
1698
|
+
pcb_component_id: z79.string(),
|
|
1699
|
+
text: z79.string(),
|
|
1700
|
+
ccw_rotation: z79.number().optional(),
|
|
1691
1701
|
layer: layer_ref,
|
|
1692
|
-
is_mirrored:
|
|
1702
|
+
is_mirrored: z79.boolean().default(false).optional(),
|
|
1693
1703
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1694
1704
|
anchor_alignment: ninePointAnchor.default("center")
|
|
1695
1705
|
}).describe("Defines silkscreen text on the PCB");
|
|
1696
1706
|
expectTypesMatch(true);
|
|
1697
1707
|
|
|
1698
1708
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
1699
|
-
import { z as
|
|
1700
|
-
var pcb_silkscreen_rect =
|
|
1701
|
-
type:
|
|
1709
|
+
import { z as z80 } from "zod";
|
|
1710
|
+
var pcb_silkscreen_rect = z80.object({
|
|
1711
|
+
type: z80.literal("pcb_silkscreen_rect"),
|
|
1702
1712
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
1703
|
-
pcb_component_id:
|
|
1704
|
-
pcb_group_id:
|
|
1705
|
-
subcircuit_id:
|
|
1713
|
+
pcb_component_id: z80.string(),
|
|
1714
|
+
pcb_group_id: z80.string().optional(),
|
|
1715
|
+
subcircuit_id: z80.string().optional(),
|
|
1706
1716
|
center: point,
|
|
1707
1717
|
width: length,
|
|
1708
1718
|
height: length,
|
|
1709
1719
|
layer: layer_ref,
|
|
1710
1720
|
stroke_width: length.default("1mm"),
|
|
1711
|
-
is_filled:
|
|
1712
|
-
has_stroke:
|
|
1713
|
-
is_stroke_dashed:
|
|
1721
|
+
is_filled: z80.boolean().default(true).optional(),
|
|
1722
|
+
has_stroke: z80.boolean().optional(),
|
|
1723
|
+
is_stroke_dashed: z80.boolean().optional()
|
|
1714
1724
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
1715
1725
|
expectTypesMatch(true);
|
|
1716
1726
|
|
|
1717
1727
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
1718
|
-
import { z as
|
|
1719
|
-
var pcb_silkscreen_circle =
|
|
1720
|
-
type:
|
|
1728
|
+
import { z as z81 } from "zod";
|
|
1729
|
+
var pcb_silkscreen_circle = z81.object({
|
|
1730
|
+
type: z81.literal("pcb_silkscreen_circle"),
|
|
1721
1731
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
1722
1732
|
"pcb_silkscreen_circle"
|
|
1723
1733
|
),
|
|
1724
|
-
pcb_component_id:
|
|
1725
|
-
pcb_group_id:
|
|
1726
|
-
subcircuit_id:
|
|
1734
|
+
pcb_component_id: z81.string(),
|
|
1735
|
+
pcb_group_id: z81.string().optional(),
|
|
1736
|
+
subcircuit_id: z81.string().optional(),
|
|
1727
1737
|
center: point,
|
|
1728
1738
|
radius: length,
|
|
1729
1739
|
layer: visible_layer,
|
|
@@ -1732,13 +1742,13 @@ var pcb_silkscreen_circle = z80.object({
|
|
|
1732
1742
|
expectTypesMatch(true);
|
|
1733
1743
|
|
|
1734
1744
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
1735
|
-
import { z as
|
|
1736
|
-
var pcb_silkscreen_oval =
|
|
1737
|
-
type:
|
|
1745
|
+
import { z as z82 } from "zod";
|
|
1746
|
+
var pcb_silkscreen_oval = z82.object({
|
|
1747
|
+
type: z82.literal("pcb_silkscreen_oval"),
|
|
1738
1748
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
1739
|
-
pcb_component_id:
|
|
1740
|
-
pcb_group_id:
|
|
1741
|
-
subcircuit_id:
|
|
1749
|
+
pcb_component_id: z82.string(),
|
|
1750
|
+
pcb_group_id: z82.string().optional(),
|
|
1751
|
+
subcircuit_id: z82.string().optional(),
|
|
1742
1752
|
center: point,
|
|
1743
1753
|
radius_x: distance,
|
|
1744
1754
|
radius_y: distance,
|
|
@@ -1747,103 +1757,103 @@ var pcb_silkscreen_oval = z81.object({
|
|
|
1747
1757
|
expectTypesMatch(true);
|
|
1748
1758
|
|
|
1749
1759
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
1750
|
-
import { z as
|
|
1751
|
-
var pcb_fabrication_note_text =
|
|
1752
|
-
type:
|
|
1760
|
+
import { z as z83 } from "zod";
|
|
1761
|
+
var pcb_fabrication_note_text = z83.object({
|
|
1762
|
+
type: z83.literal("pcb_fabrication_note_text"),
|
|
1753
1763
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
1754
1764
|
"pcb_fabrication_note_text"
|
|
1755
1765
|
),
|
|
1756
|
-
subcircuit_id:
|
|
1757
|
-
pcb_group_id:
|
|
1758
|
-
font:
|
|
1766
|
+
subcircuit_id: z83.string().optional(),
|
|
1767
|
+
pcb_group_id: z83.string().optional(),
|
|
1768
|
+
font: z83.literal("tscircuit2024").default("tscircuit2024"),
|
|
1759
1769
|
font_size: distance.default("1mm"),
|
|
1760
|
-
pcb_component_id:
|
|
1761
|
-
text:
|
|
1770
|
+
pcb_component_id: z83.string(),
|
|
1771
|
+
text: z83.string(),
|
|
1762
1772
|
layer: visible_layer,
|
|
1763
1773
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1764
|
-
anchor_alignment:
|
|
1765
|
-
color:
|
|
1774
|
+
anchor_alignment: z83.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
1775
|
+
color: z83.string().optional()
|
|
1766
1776
|
}).describe(
|
|
1767
1777
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
1768
1778
|
);
|
|
1769
1779
|
expectTypesMatch(true);
|
|
1770
1780
|
|
|
1771
1781
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
1772
|
-
import { z as
|
|
1773
|
-
var pcb_fabrication_note_path =
|
|
1774
|
-
type:
|
|
1782
|
+
import { z as z84 } from "zod";
|
|
1783
|
+
var pcb_fabrication_note_path = z84.object({
|
|
1784
|
+
type: z84.literal("pcb_fabrication_note_path"),
|
|
1775
1785
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
1776
1786
|
"pcb_fabrication_note_path"
|
|
1777
1787
|
),
|
|
1778
|
-
pcb_component_id:
|
|
1779
|
-
subcircuit_id:
|
|
1788
|
+
pcb_component_id: z84.string(),
|
|
1789
|
+
subcircuit_id: z84.string().optional(),
|
|
1780
1790
|
layer: layer_ref,
|
|
1781
|
-
route:
|
|
1791
|
+
route: z84.array(point),
|
|
1782
1792
|
stroke_width: length,
|
|
1783
|
-
color:
|
|
1793
|
+
color: z84.string().optional()
|
|
1784
1794
|
}).describe(
|
|
1785
1795
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
1786
1796
|
);
|
|
1787
1797
|
expectTypesMatch(true);
|
|
1788
1798
|
|
|
1789
1799
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
1790
|
-
import { z as
|
|
1791
|
-
var pcb_footprint_overlap_error =
|
|
1792
|
-
type:
|
|
1800
|
+
import { z as z85 } from "zod";
|
|
1801
|
+
var pcb_footprint_overlap_error = z85.object({
|
|
1802
|
+
type: z85.literal("pcb_footprint_overlap_error"),
|
|
1793
1803
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1794
|
-
error_type:
|
|
1795
|
-
message:
|
|
1796
|
-
pcb_smtpad_ids:
|
|
1797
|
-
pcb_plated_hole_ids:
|
|
1798
|
-
pcb_hole_ids:
|
|
1799
|
-
pcb_keepout_ids:
|
|
1804
|
+
error_type: z85.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
1805
|
+
message: z85.string(),
|
|
1806
|
+
pcb_smtpad_ids: z85.array(z85.string()).optional(),
|
|
1807
|
+
pcb_plated_hole_ids: z85.array(z85.string()).optional(),
|
|
1808
|
+
pcb_hole_ids: z85.array(z85.string()).optional(),
|
|
1809
|
+
pcb_keepout_ids: z85.array(z85.string()).optional()
|
|
1800
1810
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
1801
1811
|
expectTypesMatch(
|
|
1802
1812
|
true
|
|
1803
1813
|
);
|
|
1804
1814
|
|
|
1805
1815
|
// src/pcb/pcb_keepout.ts
|
|
1806
|
-
import { z as
|
|
1807
|
-
var pcb_keepout =
|
|
1808
|
-
type:
|
|
1809
|
-
shape:
|
|
1810
|
-
pcb_group_id:
|
|
1811
|
-
subcircuit_id:
|
|
1816
|
+
import { z as z86 } from "zod";
|
|
1817
|
+
var pcb_keepout = z86.object({
|
|
1818
|
+
type: z86.literal("pcb_keepout"),
|
|
1819
|
+
shape: z86.literal("rect"),
|
|
1820
|
+
pcb_group_id: z86.string().optional(),
|
|
1821
|
+
subcircuit_id: z86.string().optional(),
|
|
1812
1822
|
center: point,
|
|
1813
1823
|
width: distance,
|
|
1814
1824
|
height: distance,
|
|
1815
|
-
pcb_keepout_id:
|
|
1816
|
-
layers:
|
|
1825
|
+
pcb_keepout_id: z86.string(),
|
|
1826
|
+
layers: z86.array(z86.string()),
|
|
1817
1827
|
// Specify layers where the keepout applies
|
|
1818
|
-
description:
|
|
1828
|
+
description: z86.string().optional()
|
|
1819
1829
|
// Optional description of the keepout
|
|
1820
1830
|
}).or(
|
|
1821
|
-
|
|
1822
|
-
type:
|
|
1823
|
-
shape:
|
|
1824
|
-
pcb_group_id:
|
|
1825
|
-
subcircuit_id:
|
|
1831
|
+
z86.object({
|
|
1832
|
+
type: z86.literal("pcb_keepout"),
|
|
1833
|
+
shape: z86.literal("circle"),
|
|
1834
|
+
pcb_group_id: z86.string().optional(),
|
|
1835
|
+
subcircuit_id: z86.string().optional(),
|
|
1826
1836
|
center: point,
|
|
1827
1837
|
radius: distance,
|
|
1828
|
-
pcb_keepout_id:
|
|
1829
|
-
layers:
|
|
1838
|
+
pcb_keepout_id: z86.string(),
|
|
1839
|
+
layers: z86.array(z86.string()),
|
|
1830
1840
|
// Specify layers where the keepout applies
|
|
1831
|
-
description:
|
|
1841
|
+
description: z86.string().optional()
|
|
1832
1842
|
// Optional description of the keepout
|
|
1833
1843
|
})
|
|
1834
1844
|
);
|
|
1835
1845
|
expectTypesMatch(true);
|
|
1836
1846
|
|
|
1837
1847
|
// src/pcb/pcb_cutout.ts
|
|
1838
|
-
import { z as
|
|
1839
|
-
var pcb_cutout_base =
|
|
1840
|
-
type:
|
|
1848
|
+
import { z as z87 } from "zod";
|
|
1849
|
+
var pcb_cutout_base = z87.object({
|
|
1850
|
+
type: z87.literal("pcb_cutout"),
|
|
1841
1851
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
1842
|
-
pcb_group_id:
|
|
1843
|
-
subcircuit_id:
|
|
1852
|
+
pcb_group_id: z87.string().optional(),
|
|
1853
|
+
subcircuit_id: z87.string().optional()
|
|
1844
1854
|
});
|
|
1845
1855
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
1846
|
-
shape:
|
|
1856
|
+
shape: z87.literal("rect"),
|
|
1847
1857
|
center: point,
|
|
1848
1858
|
width: length,
|
|
1849
1859
|
height: length,
|
|
@@ -1851,17 +1861,17 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
1851
1861
|
});
|
|
1852
1862
|
expectTypesMatch(true);
|
|
1853
1863
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
1854
|
-
shape:
|
|
1864
|
+
shape: z87.literal("circle"),
|
|
1855
1865
|
center: point,
|
|
1856
1866
|
radius: length
|
|
1857
1867
|
});
|
|
1858
1868
|
expectTypesMatch(true);
|
|
1859
1869
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
1860
|
-
shape:
|
|
1861
|
-
points:
|
|
1870
|
+
shape: z87.literal("polygon"),
|
|
1871
|
+
points: z87.array(point)
|
|
1862
1872
|
});
|
|
1863
1873
|
expectTypesMatch(true);
|
|
1864
|
-
var pcb_cutout =
|
|
1874
|
+
var pcb_cutout = z87.discriminatedUnion("shape", [
|
|
1865
1875
|
pcb_cutout_rect,
|
|
1866
1876
|
pcb_cutout_circle,
|
|
1867
1877
|
pcb_cutout_polygon
|
|
@@ -1869,83 +1879,83 @@ var pcb_cutout = z86.discriminatedUnion("shape", [
|
|
|
1869
1879
|
expectTypesMatch(true);
|
|
1870
1880
|
|
|
1871
1881
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
1872
|
-
import { z as
|
|
1873
|
-
var pcb_missing_footprint_error =
|
|
1874
|
-
type:
|
|
1882
|
+
import { z as z88 } from "zod";
|
|
1883
|
+
var pcb_missing_footprint_error = z88.object({
|
|
1884
|
+
type: z88.literal("pcb_missing_footprint_error"),
|
|
1875
1885
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
1876
1886
|
"pcb_missing_footprint_error"
|
|
1877
1887
|
),
|
|
1878
|
-
pcb_group_id:
|
|
1879
|
-
subcircuit_id:
|
|
1880
|
-
error_type:
|
|
1881
|
-
source_component_id:
|
|
1882
|
-
message:
|
|
1888
|
+
pcb_group_id: z88.string().optional(),
|
|
1889
|
+
subcircuit_id: z88.string().optional(),
|
|
1890
|
+
error_type: z88.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
1891
|
+
source_component_id: z88.string(),
|
|
1892
|
+
message: z88.string()
|
|
1883
1893
|
}).describe("Defines a missing footprint error on the PCB");
|
|
1884
1894
|
expectTypesMatch(
|
|
1885
1895
|
true
|
|
1886
1896
|
);
|
|
1887
1897
|
|
|
1888
1898
|
// src/pcb/pcb_group.ts
|
|
1889
|
-
import { z as
|
|
1890
|
-
var pcb_group =
|
|
1891
|
-
type:
|
|
1899
|
+
import { z as z89 } from "zod";
|
|
1900
|
+
var pcb_group = z89.object({
|
|
1901
|
+
type: z89.literal("pcb_group"),
|
|
1892
1902
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
1893
|
-
source_group_id:
|
|
1894
|
-
is_subcircuit:
|
|
1895
|
-
subcircuit_id:
|
|
1903
|
+
source_group_id: z89.string(),
|
|
1904
|
+
is_subcircuit: z89.boolean().optional(),
|
|
1905
|
+
subcircuit_id: z89.string().optional(),
|
|
1896
1906
|
width: length,
|
|
1897
1907
|
height: length,
|
|
1898
1908
|
center: point,
|
|
1899
|
-
pcb_component_ids:
|
|
1900
|
-
name:
|
|
1901
|
-
description:
|
|
1902
|
-
layout_mode:
|
|
1903
|
-
autorouter_configuration:
|
|
1909
|
+
pcb_component_ids: z89.array(z89.string()),
|
|
1910
|
+
name: z89.string().optional(),
|
|
1911
|
+
description: z89.string().optional(),
|
|
1912
|
+
layout_mode: z89.string().optional(),
|
|
1913
|
+
autorouter_configuration: z89.object({
|
|
1904
1914
|
trace_clearance: length
|
|
1905
1915
|
}).optional(),
|
|
1906
|
-
autorouter_used_string:
|
|
1916
|
+
autorouter_used_string: z89.string().optional()
|
|
1907
1917
|
}).describe("Defines a group of components on the PCB");
|
|
1908
1918
|
expectTypesMatch(true);
|
|
1909
1919
|
|
|
1910
1920
|
// src/pcb/pcb_autorouting_error.ts
|
|
1911
|
-
import { z as
|
|
1912
|
-
var pcb_autorouting_error =
|
|
1913
|
-
type:
|
|
1921
|
+
import { z as z90 } from "zod";
|
|
1922
|
+
var pcb_autorouting_error = z90.object({
|
|
1923
|
+
type: z90.literal("pcb_autorouting_error"),
|
|
1914
1924
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
1915
|
-
error_type:
|
|
1916
|
-
message:
|
|
1917
|
-
subcircuit_id:
|
|
1925
|
+
error_type: z90.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
1926
|
+
message: z90.string(),
|
|
1927
|
+
subcircuit_id: z90.string().optional()
|
|
1918
1928
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
1919
1929
|
expectTypesMatch(true);
|
|
1920
1930
|
|
|
1921
1931
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
1922
|
-
import { z as
|
|
1923
|
-
var pcb_manual_edit_conflict_warning =
|
|
1924
|
-
type:
|
|
1932
|
+
import { z as z91 } from "zod";
|
|
1933
|
+
var pcb_manual_edit_conflict_warning = z91.object({
|
|
1934
|
+
type: z91.literal("pcb_manual_edit_conflict_warning"),
|
|
1925
1935
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1926
1936
|
"pcb_manual_edit_conflict_warning"
|
|
1927
1937
|
),
|
|
1928
|
-
warning_type:
|
|
1929
|
-
message:
|
|
1930
|
-
pcb_component_id:
|
|
1931
|
-
pcb_group_id:
|
|
1932
|
-
subcircuit_id:
|
|
1933
|
-
source_component_id:
|
|
1938
|
+
warning_type: z91.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
1939
|
+
message: z91.string(),
|
|
1940
|
+
pcb_component_id: z91.string(),
|
|
1941
|
+
pcb_group_id: z91.string().optional(),
|
|
1942
|
+
subcircuit_id: z91.string().optional(),
|
|
1943
|
+
source_component_id: z91.string()
|
|
1934
1944
|
}).describe(
|
|
1935
1945
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
1936
1946
|
);
|
|
1937
1947
|
expectTypesMatch(true);
|
|
1938
1948
|
|
|
1939
1949
|
// src/pcb/pcb_breakout_point.ts
|
|
1940
|
-
import { z as
|
|
1941
|
-
var pcb_breakout_point =
|
|
1942
|
-
type:
|
|
1950
|
+
import { z as z92 } from "zod";
|
|
1951
|
+
var pcb_breakout_point = z92.object({
|
|
1952
|
+
type: z92.literal("pcb_breakout_point"),
|
|
1943
1953
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
1944
|
-
pcb_group_id:
|
|
1945
|
-
subcircuit_id:
|
|
1946
|
-
source_trace_id:
|
|
1947
|
-
source_port_id:
|
|
1948
|
-
source_net_id:
|
|
1954
|
+
pcb_group_id: z92.string(),
|
|
1955
|
+
subcircuit_id: z92.string().optional(),
|
|
1956
|
+
source_trace_id: z92.string().optional(),
|
|
1957
|
+
source_port_id: z92.string().optional(),
|
|
1958
|
+
source_net_id: z92.string().optional(),
|
|
1949
1959
|
x: distance,
|
|
1950
1960
|
y: distance
|
|
1951
1961
|
}).describe(
|
|
@@ -1954,73 +1964,73 @@ var pcb_breakout_point = z91.object({
|
|
|
1954
1964
|
expectTypesMatch(true);
|
|
1955
1965
|
|
|
1956
1966
|
// src/pcb/pcb_ground_plane.ts
|
|
1957
|
-
import { z as
|
|
1958
|
-
var pcb_ground_plane =
|
|
1959
|
-
type:
|
|
1967
|
+
import { z as z93 } from "zod";
|
|
1968
|
+
var pcb_ground_plane = z93.object({
|
|
1969
|
+
type: z93.literal("pcb_ground_plane"),
|
|
1960
1970
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
1961
|
-
source_pcb_ground_plane_id:
|
|
1962
|
-
source_net_id:
|
|
1963
|
-
pcb_group_id:
|
|
1964
|
-
subcircuit_id:
|
|
1971
|
+
source_pcb_ground_plane_id: z93.string(),
|
|
1972
|
+
source_net_id: z93.string(),
|
|
1973
|
+
pcb_group_id: z93.string().optional(),
|
|
1974
|
+
subcircuit_id: z93.string().optional()
|
|
1965
1975
|
}).describe("Defines a ground plane on the PCB");
|
|
1966
1976
|
expectTypesMatch(true);
|
|
1967
1977
|
|
|
1968
1978
|
// src/pcb/pcb_ground_plane_region.ts
|
|
1969
|
-
import { z as
|
|
1970
|
-
var pcb_ground_plane_region =
|
|
1971
|
-
type:
|
|
1979
|
+
import { z as z94 } from "zod";
|
|
1980
|
+
var pcb_ground_plane_region = z94.object({
|
|
1981
|
+
type: z94.literal("pcb_ground_plane_region"),
|
|
1972
1982
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
1973
1983
|
"pcb_ground_plane_region"
|
|
1974
1984
|
),
|
|
1975
|
-
pcb_ground_plane_id:
|
|
1976
|
-
pcb_group_id:
|
|
1977
|
-
subcircuit_id:
|
|
1985
|
+
pcb_ground_plane_id: z94.string(),
|
|
1986
|
+
pcb_group_id: z94.string().optional(),
|
|
1987
|
+
subcircuit_id: z94.string().optional(),
|
|
1978
1988
|
layer: layer_ref,
|
|
1979
|
-
points:
|
|
1989
|
+
points: z94.array(point)
|
|
1980
1990
|
}).describe("Defines a polygon region of a ground plane");
|
|
1981
1991
|
expectTypesMatch(true);
|
|
1982
1992
|
|
|
1983
1993
|
// src/pcb/pcb_thermal_spoke.ts
|
|
1984
|
-
import { z as
|
|
1985
|
-
var pcb_thermal_spoke =
|
|
1986
|
-
type:
|
|
1994
|
+
import { z as z95 } from "zod";
|
|
1995
|
+
var pcb_thermal_spoke = z95.object({
|
|
1996
|
+
type: z95.literal("pcb_thermal_spoke"),
|
|
1987
1997
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
1988
|
-
pcb_ground_plane_id:
|
|
1989
|
-
shape:
|
|
1990
|
-
spoke_count:
|
|
1998
|
+
pcb_ground_plane_id: z95.string(),
|
|
1999
|
+
shape: z95.string(),
|
|
2000
|
+
spoke_count: z95.number(),
|
|
1991
2001
|
spoke_thickness: distance,
|
|
1992
2002
|
spoke_inner_diameter: distance,
|
|
1993
2003
|
spoke_outer_diameter: distance,
|
|
1994
|
-
pcb_plated_hole_id:
|
|
1995
|
-
subcircuit_id:
|
|
2004
|
+
pcb_plated_hole_id: z95.string().optional(),
|
|
2005
|
+
subcircuit_id: z95.string().optional()
|
|
1996
2006
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
1997
2007
|
expectTypesMatch(true);
|
|
1998
2008
|
|
|
1999
2009
|
// src/cad/cad_component.ts
|
|
2000
|
-
import { z as
|
|
2001
|
-
var cad_component =
|
|
2002
|
-
type:
|
|
2003
|
-
cad_component_id:
|
|
2004
|
-
pcb_component_id:
|
|
2005
|
-
source_component_id:
|
|
2010
|
+
import { z as z96 } from "zod";
|
|
2011
|
+
var cad_component = z96.object({
|
|
2012
|
+
type: z96.literal("cad_component"),
|
|
2013
|
+
cad_component_id: z96.string(),
|
|
2014
|
+
pcb_component_id: z96.string(),
|
|
2015
|
+
source_component_id: z96.string(),
|
|
2006
2016
|
position: point3,
|
|
2007
2017
|
rotation: point3.optional(),
|
|
2008
2018
|
size: point3.optional(),
|
|
2009
2019
|
layer: layer_ref.optional(),
|
|
2010
|
-
subcircuit_id:
|
|
2020
|
+
subcircuit_id: z96.string().optional(),
|
|
2011
2021
|
// These are all ways to generate/load the 3d model
|
|
2012
|
-
footprinter_string:
|
|
2013
|
-
model_obj_url:
|
|
2014
|
-
model_stl_url:
|
|
2015
|
-
model_3mf_url:
|
|
2016
|
-
model_jscad:
|
|
2022
|
+
footprinter_string: z96.string().optional(),
|
|
2023
|
+
model_obj_url: z96.string().optional(),
|
|
2024
|
+
model_stl_url: z96.string().optional(),
|
|
2025
|
+
model_3mf_url: z96.string().optional(),
|
|
2026
|
+
model_jscad: z96.any().optional()
|
|
2017
2027
|
}).describe("Defines a component on the PCB");
|
|
2018
2028
|
expectTypesMatch(true);
|
|
2019
2029
|
|
|
2020
2030
|
// src/simulation/simulation_voltage_source.ts
|
|
2021
|
-
import { z as
|
|
2022
|
-
var wave_shape =
|
|
2023
|
-
var percentage =
|
|
2031
|
+
import { z as z97 } from "zod";
|
|
2032
|
+
var wave_shape = z97.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
2033
|
+
var percentage = z97.union([z97.string(), z97.number()]).transform((val) => {
|
|
2024
2034
|
if (typeof val === "string") {
|
|
2025
2035
|
if (val.endsWith("%")) {
|
|
2026
2036
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -2029,30 +2039,30 @@ var percentage = z96.union([z96.string(), z96.number()]).transform((val) => {
|
|
|
2029
2039
|
}
|
|
2030
2040
|
return val;
|
|
2031
2041
|
}).pipe(
|
|
2032
|
-
|
|
2042
|
+
z97.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
2033
2043
|
);
|
|
2034
|
-
var simulation_dc_voltage_source =
|
|
2035
|
-
type:
|
|
2044
|
+
var simulation_dc_voltage_source = z97.object({
|
|
2045
|
+
type: z97.literal("simulation_voltage_source"),
|
|
2036
2046
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2037
2047
|
"simulation_voltage_source"
|
|
2038
2048
|
),
|
|
2039
|
-
is_dc_source:
|
|
2040
|
-
positive_source_port_id:
|
|
2041
|
-
negative_source_port_id:
|
|
2042
|
-
positive_source_net_id:
|
|
2043
|
-
negative_source_net_id:
|
|
2049
|
+
is_dc_source: z97.literal(true).optional().default(true),
|
|
2050
|
+
positive_source_port_id: z97.string().optional(),
|
|
2051
|
+
negative_source_port_id: z97.string().optional(),
|
|
2052
|
+
positive_source_net_id: z97.string().optional(),
|
|
2053
|
+
negative_source_net_id: z97.string().optional(),
|
|
2044
2054
|
voltage
|
|
2045
2055
|
}).describe("Defines a DC voltage source for simulation");
|
|
2046
|
-
var simulation_ac_voltage_source =
|
|
2047
|
-
type:
|
|
2056
|
+
var simulation_ac_voltage_source = z97.object({
|
|
2057
|
+
type: z97.literal("simulation_voltage_source"),
|
|
2048
2058
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2049
2059
|
"simulation_voltage_source"
|
|
2050
2060
|
),
|
|
2051
|
-
is_dc_source:
|
|
2052
|
-
terminal1_source_port_id:
|
|
2053
|
-
terminal2_source_port_id:
|
|
2054
|
-
terminal1_source_net_id:
|
|
2055
|
-
terminal2_source_net_id:
|
|
2061
|
+
is_dc_source: z97.literal(false),
|
|
2062
|
+
terminal1_source_port_id: z97.string().optional(),
|
|
2063
|
+
terminal2_source_port_id: z97.string().optional(),
|
|
2064
|
+
terminal1_source_net_id: z97.string().optional(),
|
|
2065
|
+
terminal2_source_net_id: z97.string().optional(),
|
|
2056
2066
|
voltage: voltage.optional(),
|
|
2057
2067
|
frequency: frequency.optional(),
|
|
2058
2068
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -2060,14 +2070,14 @@ var simulation_ac_voltage_source = z96.object({
|
|
|
2060
2070
|
phase: rotation.optional(),
|
|
2061
2071
|
duty_cycle: percentage.optional()
|
|
2062
2072
|
}).describe("Defines an AC voltage source for simulation");
|
|
2063
|
-
var simulation_voltage_source =
|
|
2073
|
+
var simulation_voltage_source = z97.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
2064
2074
|
expectTypesMatch(true);
|
|
2065
2075
|
expectTypesMatch(true);
|
|
2066
2076
|
expectTypesMatch(true);
|
|
2067
2077
|
|
|
2068
2078
|
// src/any_circuit_element.ts
|
|
2069
|
-
import { z as
|
|
2070
|
-
var any_circuit_element =
|
|
2079
|
+
import { z as z98 } from "zod";
|
|
2080
|
+
var any_circuit_element = z98.union([
|
|
2071
2081
|
source_trace,
|
|
2072
2082
|
source_port,
|
|
2073
2083
|
any_source_component,
|
|
@@ -2082,6 +2092,7 @@ var any_circuit_element = z97.union([
|
|
|
2082
2092
|
source_simple_battery,
|
|
2083
2093
|
source_simple_inductor,
|
|
2084
2094
|
source_simple_pin_header,
|
|
2095
|
+
source_simple_pinout,
|
|
2085
2096
|
source_simple_resonator,
|
|
2086
2097
|
source_simple_switch,
|
|
2087
2098
|
source_simple_transistor,
|
|
@@ -2268,6 +2279,7 @@ export {
|
|
|
2268
2279
|
source_simple_led,
|
|
2269
2280
|
source_simple_mosfet,
|
|
2270
2281
|
source_simple_pin_header,
|
|
2282
|
+
source_simple_pinout,
|
|
2271
2283
|
source_simple_potentiometer,
|
|
2272
2284
|
source_simple_power_source,
|
|
2273
2285
|
source_simple_push_button,
|