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