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