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