circuit-json 0.0.102 → 0.0.103
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/dist/index.d.mts +34 -1
- package/dist/index.mjs +342 -334
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -419,11 +419,18 @@ var source_net = z23.object({
|
|
|
419
419
|
trace_width: z23.number().optional()
|
|
420
420
|
});
|
|
421
421
|
|
|
422
|
-
// src/
|
|
422
|
+
// src/source/source_simple_potentiometer.ts
|
|
423
423
|
import { z as z24 } from "zod";
|
|
424
|
-
var
|
|
425
|
-
|
|
426
|
-
|
|
424
|
+
var source_simple_potentiometer = source_component_base.extend({
|
|
425
|
+
ftype: z24.literal("simple_potentiometer"),
|
|
426
|
+
max_resistance: resistance
|
|
427
|
+
});
|
|
428
|
+
|
|
429
|
+
// src/schematic/schematic_box.ts
|
|
430
|
+
import { z as z25 } from "zod";
|
|
431
|
+
var schematic_box = z25.object({
|
|
432
|
+
type: z25.literal("schematic_box"),
|
|
433
|
+
schematic_component_id: z25.string(),
|
|
427
434
|
width: distance,
|
|
428
435
|
height: distance,
|
|
429
436
|
x: distance,
|
|
@@ -431,77 +438,77 @@ var schematic_box = z24.object({
|
|
|
431
438
|
}).describe("Draws a box on the schematic");
|
|
432
439
|
|
|
433
440
|
// src/schematic/schematic_path.ts
|
|
434
|
-
import { z as
|
|
435
|
-
var schematic_path =
|
|
436
|
-
type:
|
|
437
|
-
schematic_component_id:
|
|
438
|
-
fill_color:
|
|
439
|
-
is_filled:
|
|
440
|
-
points:
|
|
441
|
+
import { z as z26 } from "zod";
|
|
442
|
+
var schematic_path = z26.object({
|
|
443
|
+
type: z26.literal("schematic_path"),
|
|
444
|
+
schematic_component_id: z26.string(),
|
|
445
|
+
fill_color: z26.enum(["red", "blue"]).optional(),
|
|
446
|
+
is_filled: z26.boolean().optional(),
|
|
447
|
+
points: z26.array(point)
|
|
441
448
|
});
|
|
442
449
|
|
|
443
450
|
// src/schematic/schematic_component.ts
|
|
444
|
-
import { z as
|
|
445
|
-
var schematic_pin_styles =
|
|
446
|
-
|
|
451
|
+
import { z as z27 } from "zod";
|
|
452
|
+
var schematic_pin_styles = z27.record(
|
|
453
|
+
z27.object({
|
|
447
454
|
left_margin: length.optional(),
|
|
448
455
|
right_margin: length.optional(),
|
|
449
456
|
top_margin: length.optional(),
|
|
450
457
|
bottom_margin: length.optional()
|
|
451
458
|
})
|
|
452
459
|
);
|
|
453
|
-
var schematic_component_port_arrangement_by_size =
|
|
454
|
-
left_size:
|
|
455
|
-
right_size:
|
|
456
|
-
top_size:
|
|
457
|
-
bottom_size:
|
|
460
|
+
var schematic_component_port_arrangement_by_size = z27.object({
|
|
461
|
+
left_size: z27.number(),
|
|
462
|
+
right_size: z27.number(),
|
|
463
|
+
top_size: z27.number().optional(),
|
|
464
|
+
bottom_size: z27.number().optional()
|
|
458
465
|
});
|
|
459
466
|
expectTypesMatch(true);
|
|
460
|
-
var schematic_component_port_arrangement_by_sides =
|
|
461
|
-
left_side:
|
|
462
|
-
pins:
|
|
463
|
-
direction:
|
|
467
|
+
var schematic_component_port_arrangement_by_sides = z27.object({
|
|
468
|
+
left_side: z27.object({
|
|
469
|
+
pins: z27.array(z27.number()),
|
|
470
|
+
direction: z27.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
464
471
|
}).optional(),
|
|
465
|
-
right_side:
|
|
466
|
-
pins:
|
|
467
|
-
direction:
|
|
472
|
+
right_side: z27.object({
|
|
473
|
+
pins: z27.array(z27.number()),
|
|
474
|
+
direction: z27.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
468
475
|
}).optional(),
|
|
469
|
-
top_side:
|
|
470
|
-
pins:
|
|
471
|
-
direction:
|
|
476
|
+
top_side: z27.object({
|
|
477
|
+
pins: z27.array(z27.number()),
|
|
478
|
+
direction: z27.enum(["left-to-right", "right-to-left"]).optional()
|
|
472
479
|
}).optional(),
|
|
473
|
-
bottom_side:
|
|
474
|
-
pins:
|
|
475
|
-
direction:
|
|
480
|
+
bottom_side: z27.object({
|
|
481
|
+
pins: z27.array(z27.number()),
|
|
482
|
+
direction: z27.enum(["left-to-right", "right-to-left"]).optional()
|
|
476
483
|
}).optional()
|
|
477
484
|
});
|
|
478
485
|
expectTypesMatch(true);
|
|
479
|
-
var port_arrangement =
|
|
486
|
+
var port_arrangement = z27.union([
|
|
480
487
|
schematic_component_port_arrangement_by_size,
|
|
481
488
|
schematic_component_port_arrangement_by_sides
|
|
482
489
|
]);
|
|
483
|
-
var schematic_component =
|
|
484
|
-
type:
|
|
490
|
+
var schematic_component = z27.object({
|
|
491
|
+
type: z27.literal("schematic_component"),
|
|
485
492
|
rotation: rotation.default(0),
|
|
486
493
|
size,
|
|
487
494
|
center: point,
|
|
488
|
-
source_component_id:
|
|
489
|
-
schematic_component_id:
|
|
495
|
+
source_component_id: z27.string(),
|
|
496
|
+
schematic_component_id: z27.string(),
|
|
490
497
|
pin_spacing: length.optional(),
|
|
491
498
|
pin_styles: schematic_pin_styles.optional(),
|
|
492
499
|
box_width: length.optional(),
|
|
493
|
-
symbol_name:
|
|
500
|
+
symbol_name: z27.string().optional(),
|
|
494
501
|
port_arrangement: port_arrangement.optional(),
|
|
495
|
-
port_labels:
|
|
496
|
-
symbol_display_value:
|
|
502
|
+
port_labels: z27.record(z27.string()).optional(),
|
|
503
|
+
symbol_display_value: z27.string().optional()
|
|
497
504
|
});
|
|
498
505
|
expectTypesMatch(true);
|
|
499
506
|
|
|
500
507
|
// src/schematic/schematic_line.ts
|
|
501
|
-
import { z as
|
|
502
|
-
var schematic_line =
|
|
503
|
-
type:
|
|
504
|
-
schematic_component_id:
|
|
508
|
+
import { z as z28 } from "zod";
|
|
509
|
+
var schematic_line = z28.object({
|
|
510
|
+
type: z28.literal("schematic_line"),
|
|
511
|
+
schematic_component_id: z28.string(),
|
|
505
512
|
x1: distance,
|
|
506
513
|
x2: distance,
|
|
507
514
|
y1: distance,
|
|
@@ -509,111 +516,111 @@ var schematic_line = z27.object({
|
|
|
509
516
|
});
|
|
510
517
|
|
|
511
518
|
// src/schematic/schematic_trace.ts
|
|
512
|
-
import { z as
|
|
513
|
-
var schematic_trace =
|
|
514
|
-
type:
|
|
515
|
-
schematic_trace_id:
|
|
516
|
-
source_trace_id:
|
|
517
|
-
junctions:
|
|
518
|
-
|
|
519
|
-
x:
|
|
520
|
-
y:
|
|
519
|
+
import { z as z29 } from "zod";
|
|
520
|
+
var schematic_trace = z29.object({
|
|
521
|
+
type: z29.literal("schematic_trace"),
|
|
522
|
+
schematic_trace_id: z29.string(),
|
|
523
|
+
source_trace_id: z29.string(),
|
|
524
|
+
junctions: z29.array(
|
|
525
|
+
z29.object({
|
|
526
|
+
x: z29.number(),
|
|
527
|
+
y: z29.number()
|
|
521
528
|
})
|
|
522
529
|
),
|
|
523
|
-
edges:
|
|
524
|
-
|
|
525
|
-
from:
|
|
526
|
-
x:
|
|
527
|
-
y:
|
|
530
|
+
edges: z29.array(
|
|
531
|
+
z29.object({
|
|
532
|
+
from: z29.object({
|
|
533
|
+
x: z29.number(),
|
|
534
|
+
y: z29.number()
|
|
528
535
|
}),
|
|
529
|
-
to:
|
|
530
|
-
x:
|
|
531
|
-
y:
|
|
536
|
+
to: z29.object({
|
|
537
|
+
x: z29.number(),
|
|
538
|
+
y: z29.number()
|
|
532
539
|
}),
|
|
533
|
-
is_crossing:
|
|
534
|
-
from_schematic_port_id:
|
|
535
|
-
to_schematic_port_id:
|
|
540
|
+
is_crossing: z29.boolean().optional(),
|
|
541
|
+
from_schematic_port_id: z29.string().optional(),
|
|
542
|
+
to_schematic_port_id: z29.string().optional()
|
|
536
543
|
})
|
|
537
544
|
)
|
|
538
545
|
});
|
|
539
546
|
expectTypesMatch(true);
|
|
540
547
|
|
|
541
548
|
// src/schematic/schematic_text.ts
|
|
542
|
-
import { z as
|
|
543
|
-
var schematic_text =
|
|
544
|
-
type:
|
|
545
|
-
schematic_component_id:
|
|
546
|
-
schematic_text_id:
|
|
547
|
-
text:
|
|
548
|
-
position:
|
|
549
|
+
import { z as z30 } from "zod";
|
|
550
|
+
var schematic_text = z30.object({
|
|
551
|
+
type: z30.literal("schematic_text"),
|
|
552
|
+
schematic_component_id: z30.string(),
|
|
553
|
+
schematic_text_id: z30.string(),
|
|
554
|
+
text: z30.string(),
|
|
555
|
+
position: z30.object({
|
|
549
556
|
x: distance,
|
|
550
557
|
y: distance
|
|
551
558
|
}),
|
|
552
|
-
rotation:
|
|
553
|
-
anchor:
|
|
554
|
-
color:
|
|
559
|
+
rotation: z30.number().default(0),
|
|
560
|
+
anchor: z30.enum(["center", "left", "right", "top", "bottom"]).default("center"),
|
|
561
|
+
color: z30.string().default("#000000")
|
|
555
562
|
});
|
|
556
563
|
|
|
557
564
|
// src/schematic/schematic_port.ts
|
|
558
|
-
import { z as
|
|
559
|
-
var schematic_port =
|
|
560
|
-
type:
|
|
561
|
-
schematic_port_id:
|
|
562
|
-
source_port_id:
|
|
563
|
-
schematic_component_id:
|
|
565
|
+
import { z as z31 } from "zod";
|
|
566
|
+
var schematic_port = z31.object({
|
|
567
|
+
type: z31.literal("schematic_port"),
|
|
568
|
+
schematic_port_id: z31.string(),
|
|
569
|
+
source_port_id: z31.string(),
|
|
570
|
+
schematic_component_id: z31.string().optional(),
|
|
564
571
|
center: point,
|
|
565
|
-
facing_direction:
|
|
566
|
-
distance_from_component_edge:
|
|
567
|
-
side_of_component:
|
|
568
|
-
true_ccw_index:
|
|
569
|
-
pin_number:
|
|
570
|
-
display_pin_label:
|
|
572
|
+
facing_direction: z31.enum(["up", "down", "left", "right"]).optional(),
|
|
573
|
+
distance_from_component_edge: z31.number().optional(),
|
|
574
|
+
side_of_component: z31.enum(["top", "bottom", "left", "right"]).optional(),
|
|
575
|
+
true_ccw_index: z31.number().optional(),
|
|
576
|
+
pin_number: z31.number().optional(),
|
|
577
|
+
display_pin_label: z31.string().optional()
|
|
571
578
|
}).describe("Defines a port on a schematic component");
|
|
572
579
|
expectTypesMatch(true);
|
|
573
580
|
|
|
574
581
|
// src/schematic/schematic_net_label.ts
|
|
575
|
-
import { z as
|
|
576
|
-
var schematic_net_label =
|
|
577
|
-
type:
|
|
578
|
-
source_net_id:
|
|
582
|
+
import { z as z32 } from "zod";
|
|
583
|
+
var schematic_net_label = z32.object({
|
|
584
|
+
type: z32.literal("schematic_net_label"),
|
|
585
|
+
source_net_id: z32.string(),
|
|
579
586
|
center: point,
|
|
580
587
|
anchor_position: point.optional(),
|
|
581
|
-
anchor_side:
|
|
582
|
-
text:
|
|
583
|
-
symbol_name:
|
|
588
|
+
anchor_side: z32.enum(["top", "bottom", "left", "right"]),
|
|
589
|
+
text: z32.string(),
|
|
590
|
+
symbol_name: z32.string().optional()
|
|
584
591
|
});
|
|
585
592
|
|
|
586
593
|
// src/schematic/schematic_error.ts
|
|
587
|
-
import { z as
|
|
588
|
-
var schematic_error =
|
|
589
|
-
schematic_error_id:
|
|
590
|
-
type:
|
|
594
|
+
import { z as z33 } from "zod";
|
|
595
|
+
var schematic_error = z33.object({
|
|
596
|
+
schematic_error_id: z33.string(),
|
|
597
|
+
type: z33.literal("schematic_error"),
|
|
591
598
|
// eventually each error type should be broken out into a dir of files
|
|
592
|
-
error_type:
|
|
593
|
-
message:
|
|
599
|
+
error_type: z33.literal("schematic_port_not_found"),
|
|
600
|
+
message: z33.string()
|
|
594
601
|
}).describe("Defines a schematic error on the schematic");
|
|
595
602
|
|
|
596
603
|
// src/schematic/schematic_debug_object.ts
|
|
597
|
-
import { z as
|
|
598
|
-
var schematic_debug_object_base =
|
|
599
|
-
type:
|
|
600
|
-
label:
|
|
604
|
+
import { z as z34 } from "zod";
|
|
605
|
+
var schematic_debug_object_base = z34.object({
|
|
606
|
+
type: z34.literal("schematic_debug_object"),
|
|
607
|
+
label: z34.string().optional()
|
|
601
608
|
});
|
|
602
609
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
603
|
-
shape:
|
|
610
|
+
shape: z34.literal("rect"),
|
|
604
611
|
center: point,
|
|
605
612
|
size
|
|
606
613
|
});
|
|
607
614
|
var schematic_debug_line = schematic_debug_object_base.extend({
|
|
608
|
-
shape:
|
|
615
|
+
shape: z34.literal("line"),
|
|
609
616
|
start: point,
|
|
610
617
|
end: point
|
|
611
618
|
});
|
|
612
619
|
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
613
|
-
shape:
|
|
620
|
+
shape: z34.literal("point"),
|
|
614
621
|
center: point
|
|
615
622
|
});
|
|
616
|
-
var schematic_debug_object =
|
|
623
|
+
var schematic_debug_object = z34.discriminatedUnion("shape", [
|
|
617
624
|
schematic_debug_rect,
|
|
618
625
|
schematic_debug_line,
|
|
619
626
|
schematic_debug_point
|
|
@@ -621,7 +628,7 @@ var schematic_debug_object = z33.discriminatedUnion("shape", [
|
|
|
621
628
|
expectTypesMatch(true);
|
|
622
629
|
|
|
623
630
|
// src/pcb/properties/layer_ref.ts
|
|
624
|
-
import { z as
|
|
631
|
+
import { z as z35 } from "zod";
|
|
625
632
|
var all_layers = [
|
|
626
633
|
"top",
|
|
627
634
|
"bottom",
|
|
@@ -632,9 +639,9 @@ var all_layers = [
|
|
|
632
639
|
"inner5",
|
|
633
640
|
"inner6"
|
|
634
641
|
];
|
|
635
|
-
var layer_string =
|
|
642
|
+
var layer_string = z35.enum(all_layers);
|
|
636
643
|
var layer_ref = layer_string.or(
|
|
637
|
-
|
|
644
|
+
z35.object({
|
|
638
645
|
name: layer_string
|
|
639
646
|
})
|
|
640
647
|
).transform((layer) => {
|
|
@@ -643,34 +650,34 @@ var layer_ref = layer_string.or(
|
|
|
643
650
|
}
|
|
644
651
|
return layer.name;
|
|
645
652
|
});
|
|
646
|
-
var visible_layer =
|
|
653
|
+
var visible_layer = z35.enum(["top", "bottom"]);
|
|
647
654
|
|
|
648
655
|
// src/pcb/properties/pcb_route_hints.ts
|
|
649
|
-
import { z as
|
|
650
|
-
var pcb_route_hint =
|
|
656
|
+
import { z as z36 } from "zod";
|
|
657
|
+
var pcb_route_hint = z36.object({
|
|
651
658
|
x: distance,
|
|
652
659
|
y: distance,
|
|
653
|
-
via:
|
|
660
|
+
via: z36.boolean().optional(),
|
|
654
661
|
via_to_layer: layer_ref.optional()
|
|
655
662
|
});
|
|
656
|
-
var pcb_route_hints =
|
|
663
|
+
var pcb_route_hints = z36.array(pcb_route_hint);
|
|
657
664
|
|
|
658
665
|
// src/pcb/properties/route_hint_point.ts
|
|
659
|
-
import { z as
|
|
660
|
-
var route_hint_point =
|
|
666
|
+
import { z as z37 } from "zod";
|
|
667
|
+
var route_hint_point = z37.object({
|
|
661
668
|
x: distance,
|
|
662
669
|
y: distance,
|
|
663
|
-
via:
|
|
670
|
+
via: z37.boolean().optional(),
|
|
664
671
|
to_layer: layer_ref.optional(),
|
|
665
672
|
trace_width: distance.optional()
|
|
666
673
|
});
|
|
667
674
|
|
|
668
675
|
// src/pcb/pcb_component.ts
|
|
669
|
-
import { z as
|
|
670
|
-
var pcb_component =
|
|
671
|
-
type:
|
|
676
|
+
import { z as z38 } from "zod";
|
|
677
|
+
var pcb_component = z38.object({
|
|
678
|
+
type: z38.literal("pcb_component"),
|
|
672
679
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
673
|
-
source_component_id:
|
|
680
|
+
source_component_id: z38.string(),
|
|
674
681
|
center: point,
|
|
675
682
|
layer: layer_ref,
|
|
676
683
|
rotation,
|
|
@@ -680,12 +687,12 @@ var pcb_component = z37.object({
|
|
|
680
687
|
expectTypesMatch(true);
|
|
681
688
|
|
|
682
689
|
// src/pcb/pcb_hole.ts
|
|
683
|
-
import { z as
|
|
684
|
-
var pcb_hole_circle_or_square =
|
|
685
|
-
type:
|
|
690
|
+
import { z as z39 } from "zod";
|
|
691
|
+
var pcb_hole_circle_or_square = z39.object({
|
|
692
|
+
type: z39.literal("pcb_hole"),
|
|
686
693
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
687
|
-
hole_shape:
|
|
688
|
-
hole_diameter:
|
|
694
|
+
hole_shape: z39.enum(["circle", "square"]),
|
|
695
|
+
hole_diameter: z39.number(),
|
|
689
696
|
x: distance,
|
|
690
697
|
y: distance
|
|
691
698
|
});
|
|
@@ -693,12 +700,12 @@ var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
|
693
700
|
"Defines a circular or square hole on the PCB"
|
|
694
701
|
);
|
|
695
702
|
expectTypesMatch(true);
|
|
696
|
-
var pcb_hole_oval =
|
|
697
|
-
type:
|
|
703
|
+
var pcb_hole_oval = z39.object({
|
|
704
|
+
type: z39.literal("pcb_hole"),
|
|
698
705
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
699
|
-
hole_shape:
|
|
700
|
-
hole_width:
|
|
701
|
-
hole_height:
|
|
706
|
+
hole_shape: z39.literal("oval"),
|
|
707
|
+
hole_width: z39.number(),
|
|
708
|
+
hole_height: z39.number(),
|
|
702
709
|
x: distance,
|
|
703
710
|
y: distance
|
|
704
711
|
});
|
|
@@ -709,36 +716,36 @@ expectTypesMatch(true);
|
|
|
709
716
|
var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval);
|
|
710
717
|
|
|
711
718
|
// src/pcb/pcb_plated_hole.ts
|
|
712
|
-
import { z as
|
|
713
|
-
var pcb_plated_hole_circle =
|
|
714
|
-
type:
|
|
715
|
-
shape:
|
|
716
|
-
outer_diameter:
|
|
717
|
-
hole_diameter:
|
|
719
|
+
import { z as z40 } from "zod";
|
|
720
|
+
var pcb_plated_hole_circle = z40.object({
|
|
721
|
+
type: z40.literal("pcb_plated_hole"),
|
|
722
|
+
shape: z40.literal("circle"),
|
|
723
|
+
outer_diameter: z40.number(),
|
|
724
|
+
hole_diameter: z40.number(),
|
|
718
725
|
x: distance,
|
|
719
726
|
y: distance,
|
|
720
|
-
layers:
|
|
721
|
-
port_hints:
|
|
722
|
-
pcb_component_id:
|
|
723
|
-
pcb_port_id:
|
|
727
|
+
layers: z40.array(layer_ref),
|
|
728
|
+
port_hints: z40.array(z40.string()).optional(),
|
|
729
|
+
pcb_component_id: z40.string().optional(),
|
|
730
|
+
pcb_port_id: z40.string().optional(),
|
|
724
731
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
725
732
|
});
|
|
726
|
-
var pcb_plated_hole_oval =
|
|
727
|
-
type:
|
|
728
|
-
shape:
|
|
729
|
-
outer_width:
|
|
730
|
-
outer_height:
|
|
731
|
-
hole_width:
|
|
732
|
-
hole_height:
|
|
733
|
+
var pcb_plated_hole_oval = z40.object({
|
|
734
|
+
type: z40.literal("pcb_plated_hole"),
|
|
735
|
+
shape: z40.enum(["oval", "pill"]),
|
|
736
|
+
outer_width: z40.number(),
|
|
737
|
+
outer_height: z40.number(),
|
|
738
|
+
hole_width: z40.number(),
|
|
739
|
+
hole_height: z40.number(),
|
|
733
740
|
x: distance,
|
|
734
741
|
y: distance,
|
|
735
|
-
layers:
|
|
736
|
-
port_hints:
|
|
737
|
-
pcb_component_id:
|
|
738
|
-
pcb_port_id:
|
|
742
|
+
layers: z40.array(layer_ref),
|
|
743
|
+
port_hints: z40.array(z40.string()).optional(),
|
|
744
|
+
pcb_component_id: z40.string().optional(),
|
|
745
|
+
pcb_port_id: z40.string().optional(),
|
|
739
746
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
740
747
|
});
|
|
741
|
-
var pcb_plated_hole =
|
|
748
|
+
var pcb_plated_hole = z40.union([
|
|
742
749
|
pcb_plated_hole_circle,
|
|
743
750
|
pcb_plated_hole_oval
|
|
744
751
|
]);
|
|
@@ -748,140 +755,140 @@ expectTypesMatch(
|
|
|
748
755
|
expectTypesMatch(true);
|
|
749
756
|
|
|
750
757
|
// src/pcb/pcb_port.ts
|
|
751
|
-
import { z as
|
|
752
|
-
var pcb_port =
|
|
753
|
-
type:
|
|
758
|
+
import { z as z41 } from "zod";
|
|
759
|
+
var pcb_port = z41.object({
|
|
760
|
+
type: z41.literal("pcb_port"),
|
|
754
761
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
755
|
-
source_port_id:
|
|
756
|
-
pcb_component_id:
|
|
762
|
+
source_port_id: z41.string(),
|
|
763
|
+
pcb_component_id: z41.string(),
|
|
757
764
|
x: distance,
|
|
758
765
|
y: distance,
|
|
759
|
-
layers:
|
|
766
|
+
layers: z41.array(layer_ref)
|
|
760
767
|
}).describe("Defines a port on the PCB");
|
|
761
768
|
expectTypesMatch(true);
|
|
762
769
|
|
|
763
770
|
// src/pcb/pcb_smtpad.ts
|
|
764
|
-
import { z as
|
|
765
|
-
var pcb_smtpad_circle =
|
|
766
|
-
type:
|
|
767
|
-
shape:
|
|
771
|
+
import { z as z42 } from "zod";
|
|
772
|
+
var pcb_smtpad_circle = z42.object({
|
|
773
|
+
type: z42.literal("pcb_smtpad"),
|
|
774
|
+
shape: z42.literal("circle"),
|
|
768
775
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
769
776
|
x: distance,
|
|
770
777
|
y: distance,
|
|
771
|
-
radius:
|
|
778
|
+
radius: z42.number(),
|
|
772
779
|
layer: layer_ref,
|
|
773
|
-
port_hints:
|
|
774
|
-
pcb_component_id:
|
|
775
|
-
pcb_port_id:
|
|
780
|
+
port_hints: z42.array(z42.string()).optional(),
|
|
781
|
+
pcb_component_id: z42.string().optional(),
|
|
782
|
+
pcb_port_id: z42.string().optional()
|
|
776
783
|
});
|
|
777
|
-
var pcb_smtpad_rect =
|
|
778
|
-
type:
|
|
779
|
-
shape:
|
|
784
|
+
var pcb_smtpad_rect = z42.object({
|
|
785
|
+
type: z42.literal("pcb_smtpad"),
|
|
786
|
+
shape: z42.literal("rect"),
|
|
780
787
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
781
788
|
x: distance,
|
|
782
789
|
y: distance,
|
|
783
|
-
width:
|
|
784
|
-
height:
|
|
790
|
+
width: z42.number(),
|
|
791
|
+
height: z42.number(),
|
|
785
792
|
layer: layer_ref,
|
|
786
|
-
port_hints:
|
|
787
|
-
pcb_component_id:
|
|
788
|
-
pcb_port_id:
|
|
793
|
+
port_hints: z42.array(z42.string()).optional(),
|
|
794
|
+
pcb_component_id: z42.string().optional(),
|
|
795
|
+
pcb_port_id: z42.string().optional()
|
|
789
796
|
});
|
|
790
|
-
var pcb_smtpad =
|
|
797
|
+
var pcb_smtpad = z42.union([pcb_smtpad_circle, pcb_smtpad_rect]).describe("Defines an SMT pad on the PCB");
|
|
791
798
|
expectTypesMatch(true);
|
|
792
799
|
expectTypesMatch(true);
|
|
793
800
|
|
|
794
801
|
// src/pcb/pcb_solder_paste.ts
|
|
795
|
-
import { z as
|
|
796
|
-
var pcb_solder_paste_circle =
|
|
797
|
-
type:
|
|
798
|
-
shape:
|
|
802
|
+
import { z as z43 } from "zod";
|
|
803
|
+
var pcb_solder_paste_circle = z43.object({
|
|
804
|
+
type: z43.literal("pcb_solder_paste"),
|
|
805
|
+
shape: z43.literal("circle"),
|
|
799
806
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
800
807
|
x: distance,
|
|
801
808
|
y: distance,
|
|
802
|
-
radius:
|
|
809
|
+
radius: z43.number(),
|
|
803
810
|
layer: layer_ref,
|
|
804
|
-
pcb_component_id:
|
|
805
|
-
pcb_smtpad_id:
|
|
811
|
+
pcb_component_id: z43.string().optional(),
|
|
812
|
+
pcb_smtpad_id: z43.string().optional()
|
|
806
813
|
});
|
|
807
|
-
var pcb_solder_paste_rect =
|
|
808
|
-
type:
|
|
809
|
-
shape:
|
|
814
|
+
var pcb_solder_paste_rect = z43.object({
|
|
815
|
+
type: z43.literal("pcb_solder_paste"),
|
|
816
|
+
shape: z43.literal("rect"),
|
|
810
817
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
811
818
|
x: distance,
|
|
812
819
|
y: distance,
|
|
813
|
-
width:
|
|
814
|
-
height:
|
|
820
|
+
width: z43.number(),
|
|
821
|
+
height: z43.number(),
|
|
815
822
|
layer: layer_ref,
|
|
816
|
-
pcb_component_id:
|
|
817
|
-
pcb_smtpad_id:
|
|
823
|
+
pcb_component_id: z43.string().optional(),
|
|
824
|
+
pcb_smtpad_id: z43.string().optional()
|
|
818
825
|
});
|
|
819
|
-
var pcb_solder_paste =
|
|
826
|
+
var pcb_solder_paste = z43.union([pcb_solder_paste_circle, pcb_solder_paste_rect]).describe("Defines solderpaste on the PCB");
|
|
820
827
|
expectTypesMatch(true);
|
|
821
828
|
expectTypesMatch(true);
|
|
822
829
|
|
|
823
830
|
// src/pcb/pcb_text.ts
|
|
824
|
-
import { z as
|
|
825
|
-
var pcb_text =
|
|
826
|
-
type:
|
|
831
|
+
import { z as z44 } from "zod";
|
|
832
|
+
var pcb_text = z44.object({
|
|
833
|
+
type: z44.literal("pcb_text"),
|
|
827
834
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
828
|
-
text:
|
|
835
|
+
text: z44.string(),
|
|
829
836
|
center: point,
|
|
830
837
|
layer: layer_ref,
|
|
831
838
|
width: length,
|
|
832
839
|
height: length,
|
|
833
|
-
lines:
|
|
834
|
-
align:
|
|
840
|
+
lines: z44.number(),
|
|
841
|
+
align: z44.enum(["bottom-left"])
|
|
835
842
|
}).describe("Defines text on the PCB");
|
|
836
843
|
expectTypesMatch(true);
|
|
837
844
|
|
|
838
845
|
// src/pcb/pcb_trace.ts
|
|
839
|
-
import { z as
|
|
840
|
-
var pcb_trace_route_point_wire =
|
|
841
|
-
route_type:
|
|
846
|
+
import { z as z45 } from "zod";
|
|
847
|
+
var pcb_trace_route_point_wire = z45.object({
|
|
848
|
+
route_type: z45.literal("wire"),
|
|
842
849
|
x: distance,
|
|
843
850
|
y: distance,
|
|
844
851
|
width: distance,
|
|
845
|
-
start_pcb_port_id:
|
|
846
|
-
end_pcb_port_id:
|
|
852
|
+
start_pcb_port_id: z45.string().optional(),
|
|
853
|
+
end_pcb_port_id: z45.string().optional(),
|
|
847
854
|
layer: layer_ref
|
|
848
855
|
});
|
|
849
|
-
var pcb_trace_route_point_via =
|
|
850
|
-
route_type:
|
|
856
|
+
var pcb_trace_route_point_via = z45.object({
|
|
857
|
+
route_type: z45.literal("via"),
|
|
851
858
|
x: distance,
|
|
852
859
|
y: distance,
|
|
853
|
-
from_layer:
|
|
854
|
-
to_layer:
|
|
860
|
+
from_layer: z45.string(),
|
|
861
|
+
to_layer: z45.string()
|
|
855
862
|
});
|
|
856
|
-
var pcb_trace_route_point =
|
|
863
|
+
var pcb_trace_route_point = z45.union([
|
|
857
864
|
pcb_trace_route_point_wire,
|
|
858
865
|
pcb_trace_route_point_via
|
|
859
866
|
]);
|
|
860
|
-
var pcb_trace =
|
|
861
|
-
type:
|
|
862
|
-
source_trace_id:
|
|
863
|
-
pcb_component_id:
|
|
867
|
+
var pcb_trace = z45.object({
|
|
868
|
+
type: z45.literal("pcb_trace"),
|
|
869
|
+
source_trace_id: z45.string().optional(),
|
|
870
|
+
pcb_component_id: z45.string().optional(),
|
|
864
871
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
865
|
-
route_thickness_mode:
|
|
866
|
-
route_order_index:
|
|
867
|
-
should_round_corners:
|
|
868
|
-
route:
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
route_type:
|
|
872
|
+
route_thickness_mode: z45.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
873
|
+
route_order_index: z45.number().optional(),
|
|
874
|
+
should_round_corners: z45.boolean().optional(),
|
|
875
|
+
route: z45.array(
|
|
876
|
+
z45.union([
|
|
877
|
+
z45.object({
|
|
878
|
+
route_type: z45.literal("wire"),
|
|
872
879
|
x: distance,
|
|
873
880
|
y: distance,
|
|
874
881
|
width: distance,
|
|
875
|
-
start_pcb_port_id:
|
|
876
|
-
end_pcb_port_id:
|
|
882
|
+
start_pcb_port_id: z45.string().optional(),
|
|
883
|
+
end_pcb_port_id: z45.string().optional(),
|
|
877
884
|
layer: layer_ref
|
|
878
885
|
}),
|
|
879
|
-
|
|
880
|
-
route_type:
|
|
886
|
+
z45.object({
|
|
887
|
+
route_type: z45.literal("via"),
|
|
881
888
|
x: distance,
|
|
882
889
|
y: distance,
|
|
883
|
-
from_layer:
|
|
884
|
-
to_layer:
|
|
890
|
+
from_layer: z45.string(),
|
|
891
|
+
to_layer: z45.string()
|
|
885
892
|
})
|
|
886
893
|
])
|
|
887
894
|
)
|
|
@@ -890,34 +897,34 @@ expectTypesMatch(true);
|
|
|
890
897
|
expectTypesMatch(true);
|
|
891
898
|
|
|
892
899
|
// src/pcb/pcb_trace_error.ts
|
|
893
|
-
import { z as
|
|
894
|
-
var pcb_trace_error =
|
|
895
|
-
type:
|
|
900
|
+
import { z as z46 } from "zod";
|
|
901
|
+
var pcb_trace_error = z46.object({
|
|
902
|
+
type: z46.literal("pcb_trace_error"),
|
|
896
903
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
897
|
-
error_type:
|
|
898
|
-
message:
|
|
904
|
+
error_type: z46.literal("pcb_trace_error"),
|
|
905
|
+
message: z46.string(),
|
|
899
906
|
center: point.optional(),
|
|
900
|
-
pcb_trace_id:
|
|
901
|
-
source_trace_id:
|
|
902
|
-
pcb_component_ids:
|
|
903
|
-
pcb_port_ids:
|
|
907
|
+
pcb_trace_id: z46.string(),
|
|
908
|
+
source_trace_id: z46.string(),
|
|
909
|
+
pcb_component_ids: z46.array(z46.string()),
|
|
910
|
+
pcb_port_ids: z46.array(z46.string())
|
|
904
911
|
}).describe("Defines a trace error on the PCB");
|
|
905
912
|
expectTypesMatch(true);
|
|
906
913
|
|
|
907
914
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
908
|
-
import { z as
|
|
909
|
-
var pcb_port_not_matched_error =
|
|
910
|
-
type:
|
|
915
|
+
import { z as z47 } from "zod";
|
|
916
|
+
var pcb_port_not_matched_error = z47.object({
|
|
917
|
+
type: z47.literal("pcb_port_not_matched_error"),
|
|
911
918
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
912
|
-
message:
|
|
913
|
-
pcb_component_ids:
|
|
919
|
+
message: z47.string(),
|
|
920
|
+
pcb_component_ids: z47.array(z47.string())
|
|
914
921
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
915
922
|
expectTypesMatch(true);
|
|
916
923
|
|
|
917
924
|
// src/pcb/pcb_via.ts
|
|
918
|
-
import { z as
|
|
919
|
-
var pcb_via =
|
|
920
|
-
type:
|
|
925
|
+
import { z as z48 } from "zod";
|
|
926
|
+
var pcb_via = z48.object({
|
|
927
|
+
type: z48.literal("pcb_via"),
|
|
921
928
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
922
929
|
x: distance,
|
|
923
930
|
y: distance,
|
|
@@ -927,51 +934,51 @@ var pcb_via = z47.object({
|
|
|
927
934
|
from_layer: layer_ref.optional(),
|
|
928
935
|
/** @deprecated */
|
|
929
936
|
to_layer: layer_ref.optional(),
|
|
930
|
-
layers:
|
|
931
|
-
pcb_trace_id:
|
|
937
|
+
layers: z48.array(layer_ref),
|
|
938
|
+
pcb_trace_id: z48.string().optional()
|
|
932
939
|
}).describe("Defines a via on the PCB");
|
|
933
940
|
expectTypesMatch(true);
|
|
934
941
|
|
|
935
942
|
// src/pcb/pcb_board.ts
|
|
936
|
-
import { z as
|
|
937
|
-
var pcb_board =
|
|
938
|
-
type:
|
|
943
|
+
import { z as z49 } from "zod";
|
|
944
|
+
var pcb_board = z49.object({
|
|
945
|
+
type: z49.literal("pcb_board"),
|
|
939
946
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
940
947
|
width: length,
|
|
941
948
|
height: length,
|
|
942
949
|
center: point,
|
|
943
950
|
thickness: length.optional().default(1.4),
|
|
944
|
-
num_layers:
|
|
945
|
-
outline:
|
|
951
|
+
num_layers: z49.number().optional().default(4),
|
|
952
|
+
outline: z49.array(point).optional()
|
|
946
953
|
}).describe("Defines the board outline of the PCB");
|
|
947
954
|
expectTypesMatch(true);
|
|
948
955
|
|
|
949
956
|
// src/pcb/pcb_placement_error.ts
|
|
950
|
-
import { z as
|
|
951
|
-
var pcb_placement_error =
|
|
952
|
-
type:
|
|
957
|
+
import { z as z50 } from "zod";
|
|
958
|
+
var pcb_placement_error = z50.object({
|
|
959
|
+
type: z50.literal("pcb_placement_error"),
|
|
953
960
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
954
|
-
message:
|
|
961
|
+
message: z50.string()
|
|
955
962
|
}).describe("Defines a placement error on the PCB");
|
|
956
963
|
expectTypesMatch(true);
|
|
957
964
|
|
|
958
965
|
// src/pcb/pcb_trace_hint.ts
|
|
959
|
-
import { z as
|
|
960
|
-
var pcb_trace_hint =
|
|
961
|
-
type:
|
|
966
|
+
import { z as z51 } from "zod";
|
|
967
|
+
var pcb_trace_hint = z51.object({
|
|
968
|
+
type: z51.literal("pcb_trace_hint"),
|
|
962
969
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
963
|
-
pcb_port_id:
|
|
964
|
-
pcb_component_id:
|
|
965
|
-
route:
|
|
970
|
+
pcb_port_id: z51.string(),
|
|
971
|
+
pcb_component_id: z51.string(),
|
|
972
|
+
route: z51.array(route_hint_point)
|
|
966
973
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
967
974
|
expectTypesMatch(true);
|
|
968
975
|
|
|
969
976
|
// src/pcb/pcb_silkscreen_line.ts
|
|
970
|
-
import { z as
|
|
971
|
-
var pcb_silkscreen_line =
|
|
972
|
-
type:
|
|
977
|
+
import { z as z52 } from "zod";
|
|
978
|
+
var pcb_silkscreen_line = z52.object({
|
|
979
|
+
type: z52.literal("pcb_silkscreen_line"),
|
|
973
980
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
974
|
-
pcb_component_id:
|
|
981
|
+
pcb_component_id: z52.string(),
|
|
975
982
|
stroke_width: distance.default("0.1mm"),
|
|
976
983
|
x1: distance,
|
|
977
984
|
y1: distance,
|
|
@@ -982,39 +989,39 @@ var pcb_silkscreen_line = z51.object({
|
|
|
982
989
|
expectTypesMatch(true);
|
|
983
990
|
|
|
984
991
|
// src/pcb/pcb_silkscreen_path.ts
|
|
985
|
-
import { z as
|
|
986
|
-
var pcb_silkscreen_path =
|
|
987
|
-
type:
|
|
992
|
+
import { z as z53 } from "zod";
|
|
993
|
+
var pcb_silkscreen_path = z53.object({
|
|
994
|
+
type: z53.literal("pcb_silkscreen_path"),
|
|
988
995
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
989
|
-
pcb_component_id:
|
|
996
|
+
pcb_component_id: z53.string(),
|
|
990
997
|
layer: visible_layer,
|
|
991
|
-
route:
|
|
998
|
+
route: z53.array(point),
|
|
992
999
|
stroke_width: length
|
|
993
1000
|
}).describe("Defines a silkscreen path on the PCB");
|
|
994
1001
|
expectTypesMatch(true);
|
|
995
1002
|
|
|
996
1003
|
// src/pcb/pcb_silkscreen_text.ts
|
|
997
|
-
import { z as
|
|
998
|
-
var pcb_silkscreen_text =
|
|
999
|
-
type:
|
|
1004
|
+
import { z as z54 } from "zod";
|
|
1005
|
+
var pcb_silkscreen_text = z54.object({
|
|
1006
|
+
type: z54.literal("pcb_silkscreen_text"),
|
|
1000
1007
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
1001
|
-
font:
|
|
1008
|
+
font: z54.literal("tscircuit2024").default("tscircuit2024"),
|
|
1002
1009
|
font_size: distance.default("0.2mm"),
|
|
1003
|
-
pcb_component_id:
|
|
1004
|
-
text:
|
|
1010
|
+
pcb_component_id: z54.string(),
|
|
1011
|
+
text: z54.string(),
|
|
1005
1012
|
layer: layer_ref,
|
|
1006
|
-
is_mirrored:
|
|
1013
|
+
is_mirrored: z54.boolean().default(false).optional(),
|
|
1007
1014
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1008
|
-
anchor_alignment:
|
|
1015
|
+
anchor_alignment: z54.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center")
|
|
1009
1016
|
}).describe("Defines silkscreen text on the PCB");
|
|
1010
1017
|
expectTypesMatch(true);
|
|
1011
1018
|
|
|
1012
1019
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
1013
|
-
import { z as
|
|
1014
|
-
var pcb_silkscreen_rect =
|
|
1015
|
-
type:
|
|
1020
|
+
import { z as z55 } from "zod";
|
|
1021
|
+
var pcb_silkscreen_rect = z55.object({
|
|
1022
|
+
type: z55.literal("pcb_silkscreen_rect"),
|
|
1016
1023
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
1017
|
-
pcb_component_id:
|
|
1024
|
+
pcb_component_id: z55.string(),
|
|
1018
1025
|
center: point,
|
|
1019
1026
|
width: length,
|
|
1020
1027
|
height: length,
|
|
@@ -1023,13 +1030,13 @@ var pcb_silkscreen_rect = z54.object({
|
|
|
1023
1030
|
expectTypesMatch(true);
|
|
1024
1031
|
|
|
1025
1032
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
1026
|
-
import { z as
|
|
1027
|
-
var pcb_silkscreen_circle =
|
|
1028
|
-
type:
|
|
1033
|
+
import { z as z56 } from "zod";
|
|
1034
|
+
var pcb_silkscreen_circle = z56.object({
|
|
1035
|
+
type: z56.literal("pcb_silkscreen_circle"),
|
|
1029
1036
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
1030
1037
|
"pcb_silkscreen_circle"
|
|
1031
1038
|
),
|
|
1032
|
-
pcb_component_id:
|
|
1039
|
+
pcb_component_id: z56.string(),
|
|
1033
1040
|
center: point,
|
|
1034
1041
|
radius: length,
|
|
1035
1042
|
layer: visible_layer
|
|
@@ -1037,11 +1044,11 @@ var pcb_silkscreen_circle = z55.object({
|
|
|
1037
1044
|
expectTypesMatch(true);
|
|
1038
1045
|
|
|
1039
1046
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
1040
|
-
import { z as
|
|
1041
|
-
var pcb_silkscreen_oval =
|
|
1042
|
-
type:
|
|
1047
|
+
import { z as z57 } from "zod";
|
|
1048
|
+
var pcb_silkscreen_oval = z57.object({
|
|
1049
|
+
type: z57.literal("pcb_silkscreen_oval"),
|
|
1043
1050
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
1044
|
-
pcb_component_id:
|
|
1051
|
+
pcb_component_id: z57.string(),
|
|
1045
1052
|
center: point,
|
|
1046
1053
|
radius_x: distance,
|
|
1047
1054
|
radius_y: distance,
|
|
@@ -1050,106 +1057,106 @@ var pcb_silkscreen_oval = z56.object({
|
|
|
1050
1057
|
expectTypesMatch(true);
|
|
1051
1058
|
|
|
1052
1059
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
1053
|
-
import { z as
|
|
1054
|
-
var pcb_fabrication_note_text =
|
|
1055
|
-
type:
|
|
1060
|
+
import { z as z58 } from "zod";
|
|
1061
|
+
var pcb_fabrication_note_text = z58.object({
|
|
1062
|
+
type: z58.literal("pcb_fabrication_note_text"),
|
|
1056
1063
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
1057
1064
|
"pcb_fabrication_note_text"
|
|
1058
1065
|
),
|
|
1059
|
-
font:
|
|
1066
|
+
font: z58.literal("tscircuit2024").default("tscircuit2024"),
|
|
1060
1067
|
font_size: distance.default("1mm"),
|
|
1061
|
-
pcb_component_id:
|
|
1062
|
-
text:
|
|
1068
|
+
pcb_component_id: z58.string(),
|
|
1069
|
+
text: z58.string(),
|
|
1063
1070
|
layer: visible_layer,
|
|
1064
1071
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1065
|
-
anchor_alignment:
|
|
1066
|
-
color:
|
|
1072
|
+
anchor_alignment: z58.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
1073
|
+
color: z58.string().optional()
|
|
1067
1074
|
}).describe(
|
|
1068
1075
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
1069
1076
|
);
|
|
1070
1077
|
expectTypesMatch(true);
|
|
1071
1078
|
|
|
1072
1079
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
1073
|
-
import { z as
|
|
1074
|
-
var pcb_fabrication_note_path =
|
|
1075
|
-
type:
|
|
1080
|
+
import { z as z59 } from "zod";
|
|
1081
|
+
var pcb_fabrication_note_path = z59.object({
|
|
1082
|
+
type: z59.literal("pcb_fabrication_note_path"),
|
|
1076
1083
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
1077
1084
|
"pcb_fabrication_note_path"
|
|
1078
1085
|
),
|
|
1079
|
-
pcb_component_id:
|
|
1086
|
+
pcb_component_id: z59.string(),
|
|
1080
1087
|
layer: layer_ref,
|
|
1081
|
-
route:
|
|
1088
|
+
route: z59.array(point),
|
|
1082
1089
|
stroke_width: length,
|
|
1083
|
-
color:
|
|
1090
|
+
color: z59.string().optional()
|
|
1084
1091
|
}).describe(
|
|
1085
1092
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
1086
1093
|
);
|
|
1087
1094
|
expectTypesMatch(true);
|
|
1088
1095
|
|
|
1089
1096
|
// src/pcb/pcb_keepout.ts
|
|
1090
|
-
import { z as
|
|
1091
|
-
var pcb_keepout =
|
|
1092
|
-
type:
|
|
1093
|
-
shape:
|
|
1097
|
+
import { z as z60 } from "zod";
|
|
1098
|
+
var pcb_keepout = z60.object({
|
|
1099
|
+
type: z60.literal("pcb_keepout"),
|
|
1100
|
+
shape: z60.literal("rect"),
|
|
1094
1101
|
center: point,
|
|
1095
1102
|
width: distance,
|
|
1096
1103
|
height: distance,
|
|
1097
|
-
pcb_keepout_id:
|
|
1098
|
-
layers:
|
|
1104
|
+
pcb_keepout_id: z60.string(),
|
|
1105
|
+
layers: z60.array(z60.string()),
|
|
1099
1106
|
// Specify layers where the keepout applies
|
|
1100
|
-
description:
|
|
1107
|
+
description: z60.string().optional()
|
|
1101
1108
|
// Optional description of the keepout
|
|
1102
1109
|
}).or(
|
|
1103
|
-
|
|
1104
|
-
type:
|
|
1105
|
-
shape:
|
|
1110
|
+
z60.object({
|
|
1111
|
+
type: z60.literal("pcb_keepout"),
|
|
1112
|
+
shape: z60.literal("circle"),
|
|
1106
1113
|
center: point,
|
|
1107
1114
|
radius: distance,
|
|
1108
|
-
pcb_keepout_id:
|
|
1109
|
-
layers:
|
|
1115
|
+
pcb_keepout_id: z60.string(),
|
|
1116
|
+
layers: z60.array(z60.string()),
|
|
1110
1117
|
// Specify layers where the keepout applies
|
|
1111
|
-
description:
|
|
1118
|
+
description: z60.string().optional()
|
|
1112
1119
|
// Optional description of the keepout
|
|
1113
1120
|
})
|
|
1114
1121
|
);
|
|
1115
1122
|
|
|
1116
1123
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
1117
|
-
import { z as
|
|
1118
|
-
var pcb_missing_footprint_error =
|
|
1119
|
-
type:
|
|
1124
|
+
import { z as z61 } from "zod";
|
|
1125
|
+
var pcb_missing_footprint_error = z61.object({
|
|
1126
|
+
type: z61.literal("pcb_missing_footprint_error"),
|
|
1120
1127
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
1121
1128
|
"pcb_missing_footprint_error"
|
|
1122
1129
|
),
|
|
1123
|
-
error_type:
|
|
1124
|
-
source_component_id:
|
|
1125
|
-
message:
|
|
1130
|
+
error_type: z61.literal("pcb_missing_footprint_error"),
|
|
1131
|
+
source_component_id: z61.string(),
|
|
1132
|
+
message: z61.string()
|
|
1126
1133
|
}).describe("Defines a missing footprint error on the PCB");
|
|
1127
1134
|
expectTypesMatch(
|
|
1128
1135
|
true
|
|
1129
1136
|
);
|
|
1130
1137
|
|
|
1131
1138
|
// src/cad/cad_component.ts
|
|
1132
|
-
import { z as
|
|
1133
|
-
var cad_component =
|
|
1134
|
-
type:
|
|
1135
|
-
cad_component_id:
|
|
1136
|
-
pcb_component_id:
|
|
1137
|
-
source_component_id:
|
|
1139
|
+
import { z as z62 } from "zod";
|
|
1140
|
+
var cad_component = z62.object({
|
|
1141
|
+
type: z62.literal("cad_component"),
|
|
1142
|
+
cad_component_id: z62.string(),
|
|
1143
|
+
pcb_component_id: z62.string(),
|
|
1144
|
+
source_component_id: z62.string(),
|
|
1138
1145
|
position: point3,
|
|
1139
1146
|
rotation: point3.optional(),
|
|
1140
1147
|
size: point3.optional(),
|
|
1141
1148
|
layer: layer_ref.optional(),
|
|
1142
1149
|
// These are all ways to generate/load the 3d model
|
|
1143
|
-
footprinter_string:
|
|
1144
|
-
model_obj_url:
|
|
1145
|
-
model_stl_url:
|
|
1146
|
-
model_3mf_url:
|
|
1147
|
-
model_jscad:
|
|
1150
|
+
footprinter_string: z62.string().optional(),
|
|
1151
|
+
model_obj_url: z62.string().optional(),
|
|
1152
|
+
model_stl_url: z62.string().optional(),
|
|
1153
|
+
model_3mf_url: z62.string().optional(),
|
|
1154
|
+
model_jscad: z62.any().optional()
|
|
1148
1155
|
}).describe("Defines a component on the PCB");
|
|
1149
1156
|
|
|
1150
1157
|
// src/any_circuit_element.ts
|
|
1151
|
-
import { z as
|
|
1152
|
-
var any_circuit_element =
|
|
1158
|
+
import { z as z63 } from "zod";
|
|
1159
|
+
var any_circuit_element = z63.union([
|
|
1153
1160
|
source_trace,
|
|
1154
1161
|
source_port,
|
|
1155
1162
|
any_source_component,
|
|
@@ -1286,6 +1293,7 @@ export {
|
|
|
1286
1293
|
source_simple_diode,
|
|
1287
1294
|
source_simple_ground,
|
|
1288
1295
|
source_simple_inductor,
|
|
1296
|
+
source_simple_potentiometer,
|
|
1289
1297
|
source_simple_power_source,
|
|
1290
1298
|
source_simple_push_button,
|
|
1291
1299
|
source_simple_resistor,
|