circuit-json 0.0.105 → 0.0.107
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 +366 -10
- package/dist/index.mjs +394 -368
- 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"]).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,140 +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"),
|
|
795
|
+
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
796
|
+
x: distance,
|
|
797
|
+
y: distance,
|
|
798
|
+
radius: z44.number(),
|
|
799
|
+
layer: layer_ref,
|
|
800
|
+
port_hints: z44.array(z44.string()).optional(),
|
|
801
|
+
pcb_component_id: z44.string().optional(),
|
|
802
|
+
pcb_port_id: z44.string().optional()
|
|
803
|
+
});
|
|
804
|
+
var pcb_smtpad_rect = z44.object({
|
|
805
|
+
type: z44.literal("pcb_smtpad"),
|
|
806
|
+
shape: z44.literal("rect"),
|
|
786
807
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
787
808
|
x: distance,
|
|
788
809
|
y: distance,
|
|
789
|
-
|
|
810
|
+
width: z44.number(),
|
|
811
|
+
height: z44.number(),
|
|
790
812
|
layer: layer_ref,
|
|
791
|
-
port_hints:
|
|
792
|
-
pcb_component_id:
|
|
793
|
-
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()
|
|
794
816
|
});
|
|
795
|
-
var
|
|
796
|
-
type:
|
|
797
|
-
shape:
|
|
817
|
+
var pcb_smtpad_rotated_rect = z44.object({
|
|
818
|
+
type: z44.literal("pcb_smtpad"),
|
|
819
|
+
shape: z44.literal("rotated_rect"),
|
|
798
820
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
799
821
|
x: distance,
|
|
800
822
|
y: distance,
|
|
801
|
-
width:
|
|
802
|
-
height:
|
|
823
|
+
width: z44.number(),
|
|
824
|
+
height: z44.number(),
|
|
825
|
+
ccw_rotation: rotation,
|
|
803
826
|
layer: layer_ref,
|
|
804
|
-
port_hints:
|
|
805
|
-
pcb_component_id:
|
|
806
|
-
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()
|
|
807
830
|
});
|
|
808
|
-
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");
|
|
832
|
+
expectTypesMatch(true);
|
|
809
833
|
expectTypesMatch(true);
|
|
810
834
|
expectTypesMatch(true);
|
|
811
835
|
|
|
812
836
|
// src/pcb/pcb_solder_paste.ts
|
|
813
|
-
import { z as
|
|
814
|
-
var pcb_solder_paste_circle =
|
|
815
|
-
type:
|
|
816
|
-
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"),
|
|
817
841
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
818
842
|
x: distance,
|
|
819
843
|
y: distance,
|
|
820
|
-
radius:
|
|
844
|
+
radius: z45.number(),
|
|
821
845
|
layer: layer_ref,
|
|
822
|
-
pcb_component_id:
|
|
823
|
-
pcb_smtpad_id:
|
|
846
|
+
pcb_component_id: z45.string().optional(),
|
|
847
|
+
pcb_smtpad_id: z45.string().optional()
|
|
824
848
|
});
|
|
825
|
-
var pcb_solder_paste_rect =
|
|
826
|
-
type:
|
|
827
|
-
shape:
|
|
849
|
+
var pcb_solder_paste_rect = z45.object({
|
|
850
|
+
type: z45.literal("pcb_solder_paste"),
|
|
851
|
+
shape: z45.literal("rect"),
|
|
828
852
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
829
853
|
x: distance,
|
|
830
854
|
y: distance,
|
|
831
|
-
width:
|
|
832
|
-
height:
|
|
855
|
+
width: z45.number(),
|
|
856
|
+
height: z45.number(),
|
|
833
857
|
layer: layer_ref,
|
|
834
|
-
pcb_component_id:
|
|
835
|
-
pcb_smtpad_id:
|
|
858
|
+
pcb_component_id: z45.string().optional(),
|
|
859
|
+
pcb_smtpad_id: z45.string().optional()
|
|
836
860
|
});
|
|
837
|
-
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");
|
|
838
862
|
expectTypesMatch(true);
|
|
839
863
|
expectTypesMatch(true);
|
|
840
864
|
|
|
841
865
|
// src/pcb/pcb_text.ts
|
|
842
|
-
import { z as
|
|
843
|
-
var pcb_text =
|
|
844
|
-
type:
|
|
866
|
+
import { z as z46 } from "zod";
|
|
867
|
+
var pcb_text = z46.object({
|
|
868
|
+
type: z46.literal("pcb_text"),
|
|
845
869
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
846
|
-
text:
|
|
870
|
+
text: z46.string(),
|
|
847
871
|
center: point,
|
|
848
872
|
layer: layer_ref,
|
|
849
873
|
width: length,
|
|
850
874
|
height: length,
|
|
851
|
-
lines:
|
|
852
|
-
align:
|
|
875
|
+
lines: z46.number(),
|
|
876
|
+
align: z46.enum(["bottom-left"])
|
|
853
877
|
}).describe("Defines text on the PCB");
|
|
854
878
|
expectTypesMatch(true);
|
|
855
879
|
|
|
856
880
|
// src/pcb/pcb_trace.ts
|
|
857
|
-
import { z as
|
|
858
|
-
var pcb_trace_route_point_wire =
|
|
859
|
-
route_type:
|
|
881
|
+
import { z as z47 } from "zod";
|
|
882
|
+
var pcb_trace_route_point_wire = z47.object({
|
|
883
|
+
route_type: z47.literal("wire"),
|
|
860
884
|
x: distance,
|
|
861
885
|
y: distance,
|
|
862
886
|
width: distance,
|
|
863
|
-
start_pcb_port_id:
|
|
864
|
-
end_pcb_port_id:
|
|
887
|
+
start_pcb_port_id: z47.string().optional(),
|
|
888
|
+
end_pcb_port_id: z47.string().optional(),
|
|
865
889
|
layer: layer_ref
|
|
866
890
|
});
|
|
867
|
-
var pcb_trace_route_point_via =
|
|
868
|
-
route_type:
|
|
891
|
+
var pcb_trace_route_point_via = z47.object({
|
|
892
|
+
route_type: z47.literal("via"),
|
|
869
893
|
x: distance,
|
|
870
894
|
y: distance,
|
|
871
|
-
from_layer:
|
|
872
|
-
to_layer:
|
|
895
|
+
from_layer: z47.string(),
|
|
896
|
+
to_layer: z47.string()
|
|
873
897
|
});
|
|
874
|
-
var pcb_trace_route_point =
|
|
898
|
+
var pcb_trace_route_point = z47.union([
|
|
875
899
|
pcb_trace_route_point_wire,
|
|
876
900
|
pcb_trace_route_point_via
|
|
877
901
|
]);
|
|
878
|
-
var pcb_trace =
|
|
879
|
-
type:
|
|
880
|
-
source_trace_id:
|
|
881
|
-
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(),
|
|
882
906
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
883
|
-
route_thickness_mode:
|
|
884
|
-
route_order_index:
|
|
885
|
-
should_round_corners:
|
|
886
|
-
route:
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
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"),
|
|
890
914
|
x: distance,
|
|
891
915
|
y: distance,
|
|
892
916
|
width: distance,
|
|
893
|
-
start_pcb_port_id:
|
|
894
|
-
end_pcb_port_id:
|
|
917
|
+
start_pcb_port_id: z47.string().optional(),
|
|
918
|
+
end_pcb_port_id: z47.string().optional(),
|
|
895
919
|
layer: layer_ref
|
|
896
920
|
}),
|
|
897
|
-
|
|
898
|
-
route_type:
|
|
921
|
+
z47.object({
|
|
922
|
+
route_type: z47.literal("via"),
|
|
899
923
|
x: distance,
|
|
900
924
|
y: distance,
|
|
901
|
-
from_layer:
|
|
902
|
-
to_layer:
|
|
925
|
+
from_layer: z47.string(),
|
|
926
|
+
to_layer: z47.string()
|
|
903
927
|
})
|
|
904
928
|
])
|
|
905
929
|
)
|
|
@@ -908,34 +932,34 @@ expectTypesMatch(true);
|
|
|
908
932
|
expectTypesMatch(true);
|
|
909
933
|
|
|
910
934
|
// src/pcb/pcb_trace_error.ts
|
|
911
|
-
import { z as
|
|
912
|
-
var pcb_trace_error =
|
|
913
|
-
type:
|
|
935
|
+
import { z as z48 } from "zod";
|
|
936
|
+
var pcb_trace_error = z48.object({
|
|
937
|
+
type: z48.literal("pcb_trace_error"),
|
|
914
938
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
915
|
-
error_type:
|
|
916
|
-
message:
|
|
939
|
+
error_type: z48.literal("pcb_trace_error"),
|
|
940
|
+
message: z48.string(),
|
|
917
941
|
center: point.optional(),
|
|
918
|
-
pcb_trace_id:
|
|
919
|
-
source_trace_id:
|
|
920
|
-
pcb_component_ids:
|
|
921
|
-
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())
|
|
922
946
|
}).describe("Defines a trace error on the PCB");
|
|
923
947
|
expectTypesMatch(true);
|
|
924
948
|
|
|
925
949
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
926
|
-
import { z as
|
|
927
|
-
var pcb_port_not_matched_error =
|
|
928
|
-
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"),
|
|
929
953
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
930
|
-
message:
|
|
931
|
-
pcb_component_ids:
|
|
954
|
+
message: z49.string(),
|
|
955
|
+
pcb_component_ids: z49.array(z49.string())
|
|
932
956
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
933
957
|
expectTypesMatch(true);
|
|
934
958
|
|
|
935
959
|
// src/pcb/pcb_via.ts
|
|
936
|
-
import { z as
|
|
937
|
-
var pcb_via =
|
|
938
|
-
type:
|
|
960
|
+
import { z as z50 } from "zod";
|
|
961
|
+
var pcb_via = z50.object({
|
|
962
|
+
type: z50.literal("pcb_via"),
|
|
939
963
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
940
964
|
x: distance,
|
|
941
965
|
y: distance,
|
|
@@ -945,51 +969,51 @@ var pcb_via = z49.object({
|
|
|
945
969
|
from_layer: layer_ref.optional(),
|
|
946
970
|
/** @deprecated */
|
|
947
971
|
to_layer: layer_ref.optional(),
|
|
948
|
-
layers:
|
|
949
|
-
pcb_trace_id:
|
|
972
|
+
layers: z50.array(layer_ref),
|
|
973
|
+
pcb_trace_id: z50.string().optional()
|
|
950
974
|
}).describe("Defines a via on the PCB");
|
|
951
975
|
expectTypesMatch(true);
|
|
952
976
|
|
|
953
977
|
// src/pcb/pcb_board.ts
|
|
954
|
-
import { z as
|
|
955
|
-
var pcb_board =
|
|
956
|
-
type:
|
|
978
|
+
import { z as z51 } from "zod";
|
|
979
|
+
var pcb_board = z51.object({
|
|
980
|
+
type: z51.literal("pcb_board"),
|
|
957
981
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
958
982
|
width: length,
|
|
959
983
|
height: length,
|
|
960
984
|
center: point,
|
|
961
985
|
thickness: length.optional().default(1.4),
|
|
962
|
-
num_layers:
|
|
963
|
-
outline:
|
|
986
|
+
num_layers: z51.number().optional().default(4),
|
|
987
|
+
outline: z51.array(point).optional()
|
|
964
988
|
}).describe("Defines the board outline of the PCB");
|
|
965
989
|
expectTypesMatch(true);
|
|
966
990
|
|
|
967
991
|
// src/pcb/pcb_placement_error.ts
|
|
968
|
-
import { z as
|
|
969
|
-
var pcb_placement_error =
|
|
970
|
-
type:
|
|
992
|
+
import { z as z52 } from "zod";
|
|
993
|
+
var pcb_placement_error = z52.object({
|
|
994
|
+
type: z52.literal("pcb_placement_error"),
|
|
971
995
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
972
|
-
message:
|
|
996
|
+
message: z52.string()
|
|
973
997
|
}).describe("Defines a placement error on the PCB");
|
|
974
998
|
expectTypesMatch(true);
|
|
975
999
|
|
|
976
1000
|
// src/pcb/pcb_trace_hint.ts
|
|
977
|
-
import { z as
|
|
978
|
-
var pcb_trace_hint =
|
|
979
|
-
type:
|
|
1001
|
+
import { z as z53 } from "zod";
|
|
1002
|
+
var pcb_trace_hint = z53.object({
|
|
1003
|
+
type: z53.literal("pcb_trace_hint"),
|
|
980
1004
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
981
|
-
pcb_port_id:
|
|
982
|
-
pcb_component_id:
|
|
983
|
-
route:
|
|
1005
|
+
pcb_port_id: z53.string(),
|
|
1006
|
+
pcb_component_id: z53.string(),
|
|
1007
|
+
route: z53.array(route_hint_point)
|
|
984
1008
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
985
1009
|
expectTypesMatch(true);
|
|
986
1010
|
|
|
987
1011
|
// src/pcb/pcb_silkscreen_line.ts
|
|
988
|
-
import { z as
|
|
989
|
-
var pcb_silkscreen_line =
|
|
990
|
-
type:
|
|
1012
|
+
import { z as z54 } from "zod";
|
|
1013
|
+
var pcb_silkscreen_line = z54.object({
|
|
1014
|
+
type: z54.literal("pcb_silkscreen_line"),
|
|
991
1015
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
992
|
-
pcb_component_id:
|
|
1016
|
+
pcb_component_id: z54.string(),
|
|
993
1017
|
stroke_width: distance.default("0.1mm"),
|
|
994
1018
|
x1: distance,
|
|
995
1019
|
y1: distance,
|
|
@@ -1000,39 +1024,39 @@ var pcb_silkscreen_line = z53.object({
|
|
|
1000
1024
|
expectTypesMatch(true);
|
|
1001
1025
|
|
|
1002
1026
|
// src/pcb/pcb_silkscreen_path.ts
|
|
1003
|
-
import { z as
|
|
1004
|
-
var pcb_silkscreen_path =
|
|
1005
|
-
type:
|
|
1027
|
+
import { z as z55 } from "zod";
|
|
1028
|
+
var pcb_silkscreen_path = z55.object({
|
|
1029
|
+
type: z55.literal("pcb_silkscreen_path"),
|
|
1006
1030
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
1007
|
-
pcb_component_id:
|
|
1031
|
+
pcb_component_id: z55.string(),
|
|
1008
1032
|
layer: visible_layer,
|
|
1009
|
-
route:
|
|
1033
|
+
route: z55.array(point),
|
|
1010
1034
|
stroke_width: length
|
|
1011
1035
|
}).describe("Defines a silkscreen path on the PCB");
|
|
1012
1036
|
expectTypesMatch(true);
|
|
1013
1037
|
|
|
1014
1038
|
// src/pcb/pcb_silkscreen_text.ts
|
|
1015
|
-
import { z as
|
|
1016
|
-
var pcb_silkscreen_text =
|
|
1017
|
-
type:
|
|
1039
|
+
import { z as z56 } from "zod";
|
|
1040
|
+
var pcb_silkscreen_text = z56.object({
|
|
1041
|
+
type: z56.literal("pcb_silkscreen_text"),
|
|
1018
1042
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
1019
|
-
font:
|
|
1043
|
+
font: z56.literal("tscircuit2024").default("tscircuit2024"),
|
|
1020
1044
|
font_size: distance.default("0.2mm"),
|
|
1021
|
-
pcb_component_id:
|
|
1022
|
-
text:
|
|
1045
|
+
pcb_component_id: z56.string(),
|
|
1046
|
+
text: z56.string(),
|
|
1023
1047
|
layer: layer_ref,
|
|
1024
|
-
is_mirrored:
|
|
1048
|
+
is_mirrored: z56.boolean().default(false).optional(),
|
|
1025
1049
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1026
|
-
anchor_alignment:
|
|
1050
|
+
anchor_alignment: z56.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center")
|
|
1027
1051
|
}).describe("Defines silkscreen text on the PCB");
|
|
1028
1052
|
expectTypesMatch(true);
|
|
1029
1053
|
|
|
1030
1054
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
1031
|
-
import { z as
|
|
1032
|
-
var pcb_silkscreen_rect =
|
|
1033
|
-
type:
|
|
1055
|
+
import { z as z57 } from "zod";
|
|
1056
|
+
var pcb_silkscreen_rect = z57.object({
|
|
1057
|
+
type: z57.literal("pcb_silkscreen_rect"),
|
|
1034
1058
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
1035
|
-
pcb_component_id:
|
|
1059
|
+
pcb_component_id: z57.string(),
|
|
1036
1060
|
center: point,
|
|
1037
1061
|
width: length,
|
|
1038
1062
|
height: length,
|
|
@@ -1041,13 +1065,13 @@ var pcb_silkscreen_rect = z56.object({
|
|
|
1041
1065
|
expectTypesMatch(true);
|
|
1042
1066
|
|
|
1043
1067
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
1044
|
-
import { z as
|
|
1045
|
-
var pcb_silkscreen_circle =
|
|
1046
|
-
type:
|
|
1068
|
+
import { z as z58 } from "zod";
|
|
1069
|
+
var pcb_silkscreen_circle = z58.object({
|
|
1070
|
+
type: z58.literal("pcb_silkscreen_circle"),
|
|
1047
1071
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
1048
1072
|
"pcb_silkscreen_circle"
|
|
1049
1073
|
),
|
|
1050
|
-
pcb_component_id:
|
|
1074
|
+
pcb_component_id: z58.string(),
|
|
1051
1075
|
center: point,
|
|
1052
1076
|
radius: length,
|
|
1053
1077
|
layer: visible_layer
|
|
@@ -1055,11 +1079,11 @@ var pcb_silkscreen_circle = z57.object({
|
|
|
1055
1079
|
expectTypesMatch(true);
|
|
1056
1080
|
|
|
1057
1081
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
1058
|
-
import { z as
|
|
1059
|
-
var pcb_silkscreen_oval =
|
|
1060
|
-
type:
|
|
1082
|
+
import { z as z59 } from "zod";
|
|
1083
|
+
var pcb_silkscreen_oval = z59.object({
|
|
1084
|
+
type: z59.literal("pcb_silkscreen_oval"),
|
|
1061
1085
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
1062
|
-
pcb_component_id:
|
|
1086
|
+
pcb_component_id: z59.string(),
|
|
1063
1087
|
center: point,
|
|
1064
1088
|
radius_x: distance,
|
|
1065
1089
|
radius_y: distance,
|
|
@@ -1068,106 +1092,106 @@ var pcb_silkscreen_oval = z58.object({
|
|
|
1068
1092
|
expectTypesMatch(true);
|
|
1069
1093
|
|
|
1070
1094
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
1071
|
-
import { z as
|
|
1072
|
-
var pcb_fabrication_note_text =
|
|
1073
|
-
type:
|
|
1095
|
+
import { z as z60 } from "zod";
|
|
1096
|
+
var pcb_fabrication_note_text = z60.object({
|
|
1097
|
+
type: z60.literal("pcb_fabrication_note_text"),
|
|
1074
1098
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
1075
1099
|
"pcb_fabrication_note_text"
|
|
1076
1100
|
),
|
|
1077
|
-
font:
|
|
1101
|
+
font: z60.literal("tscircuit2024").default("tscircuit2024"),
|
|
1078
1102
|
font_size: distance.default("1mm"),
|
|
1079
|
-
pcb_component_id:
|
|
1080
|
-
text:
|
|
1103
|
+
pcb_component_id: z60.string(),
|
|
1104
|
+
text: z60.string(),
|
|
1081
1105
|
layer: visible_layer,
|
|
1082
1106
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1083
|
-
anchor_alignment:
|
|
1084
|
-
color:
|
|
1107
|
+
anchor_alignment: z60.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
1108
|
+
color: z60.string().optional()
|
|
1085
1109
|
}).describe(
|
|
1086
1110
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
1087
1111
|
);
|
|
1088
1112
|
expectTypesMatch(true);
|
|
1089
1113
|
|
|
1090
1114
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
1091
|
-
import { z as
|
|
1092
|
-
var pcb_fabrication_note_path =
|
|
1093
|
-
type:
|
|
1115
|
+
import { z as z61 } from "zod";
|
|
1116
|
+
var pcb_fabrication_note_path = z61.object({
|
|
1117
|
+
type: z61.literal("pcb_fabrication_note_path"),
|
|
1094
1118
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
1095
1119
|
"pcb_fabrication_note_path"
|
|
1096
1120
|
),
|
|
1097
|
-
pcb_component_id:
|
|
1121
|
+
pcb_component_id: z61.string(),
|
|
1098
1122
|
layer: layer_ref,
|
|
1099
|
-
route:
|
|
1123
|
+
route: z61.array(point),
|
|
1100
1124
|
stroke_width: length,
|
|
1101
|
-
color:
|
|
1125
|
+
color: z61.string().optional()
|
|
1102
1126
|
}).describe(
|
|
1103
1127
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
1104
1128
|
);
|
|
1105
1129
|
expectTypesMatch(true);
|
|
1106
1130
|
|
|
1107
1131
|
// src/pcb/pcb_keepout.ts
|
|
1108
|
-
import { z as
|
|
1109
|
-
var pcb_keepout =
|
|
1110
|
-
type:
|
|
1111
|
-
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"),
|
|
1112
1136
|
center: point,
|
|
1113
1137
|
width: distance,
|
|
1114
1138
|
height: distance,
|
|
1115
|
-
pcb_keepout_id:
|
|
1116
|
-
layers:
|
|
1139
|
+
pcb_keepout_id: z62.string(),
|
|
1140
|
+
layers: z62.array(z62.string()),
|
|
1117
1141
|
// Specify layers where the keepout applies
|
|
1118
|
-
description:
|
|
1142
|
+
description: z62.string().optional()
|
|
1119
1143
|
// Optional description of the keepout
|
|
1120
1144
|
}).or(
|
|
1121
|
-
|
|
1122
|
-
type:
|
|
1123
|
-
shape:
|
|
1145
|
+
z62.object({
|
|
1146
|
+
type: z62.literal("pcb_keepout"),
|
|
1147
|
+
shape: z62.literal("circle"),
|
|
1124
1148
|
center: point,
|
|
1125
1149
|
radius: distance,
|
|
1126
|
-
pcb_keepout_id:
|
|
1127
|
-
layers:
|
|
1150
|
+
pcb_keepout_id: z62.string(),
|
|
1151
|
+
layers: z62.array(z62.string()),
|
|
1128
1152
|
// Specify layers where the keepout applies
|
|
1129
|
-
description:
|
|
1153
|
+
description: z62.string().optional()
|
|
1130
1154
|
// Optional description of the keepout
|
|
1131
1155
|
})
|
|
1132
1156
|
);
|
|
1133
1157
|
|
|
1134
1158
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
1135
|
-
import { z as
|
|
1136
|
-
var pcb_missing_footprint_error =
|
|
1137
|
-
type:
|
|
1159
|
+
import { z as z63 } from "zod";
|
|
1160
|
+
var pcb_missing_footprint_error = z63.object({
|
|
1161
|
+
type: z63.literal("pcb_missing_footprint_error"),
|
|
1138
1162
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
1139
1163
|
"pcb_missing_footprint_error"
|
|
1140
1164
|
),
|
|
1141
|
-
error_type:
|
|
1142
|
-
source_component_id:
|
|
1143
|
-
message:
|
|
1165
|
+
error_type: z63.literal("pcb_missing_footprint_error"),
|
|
1166
|
+
source_component_id: z63.string(),
|
|
1167
|
+
message: z63.string()
|
|
1144
1168
|
}).describe("Defines a missing footprint error on the PCB");
|
|
1145
1169
|
expectTypesMatch(
|
|
1146
1170
|
true
|
|
1147
1171
|
);
|
|
1148
1172
|
|
|
1149
1173
|
// src/cad/cad_component.ts
|
|
1150
|
-
import { z as
|
|
1151
|
-
var cad_component =
|
|
1152
|
-
type:
|
|
1153
|
-
cad_component_id:
|
|
1154
|
-
pcb_component_id:
|
|
1155
|
-
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(),
|
|
1156
1180
|
position: point3,
|
|
1157
1181
|
rotation: point3.optional(),
|
|
1158
1182
|
size: point3.optional(),
|
|
1159
1183
|
layer: layer_ref.optional(),
|
|
1160
1184
|
// These are all ways to generate/load the 3d model
|
|
1161
|
-
footprinter_string:
|
|
1162
|
-
model_obj_url:
|
|
1163
|
-
model_stl_url:
|
|
1164
|
-
model_3mf_url:
|
|
1165
|
-
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()
|
|
1166
1190
|
}).describe("Defines a component on the PCB");
|
|
1167
1191
|
|
|
1168
1192
|
// src/any_circuit_element.ts
|
|
1169
|
-
import { z as
|
|
1170
|
-
var any_circuit_element =
|
|
1193
|
+
import { z as z65 } from "zod";
|
|
1194
|
+
var any_circuit_element = z65.union([
|
|
1171
1195
|
source_trace,
|
|
1172
1196
|
source_port,
|
|
1173
1197
|
any_source_component,
|
|
@@ -1182,6 +1206,7 @@ var any_circuit_element = z64.union([
|
|
|
1182
1206
|
source_simple_power_source,
|
|
1183
1207
|
source_simple_battery,
|
|
1184
1208
|
source_simple_inductor,
|
|
1209
|
+
source_simple_pin_header,
|
|
1185
1210
|
source_simple_potentiometer,
|
|
1186
1211
|
source_simple_push_button,
|
|
1187
1212
|
pcb_component,
|
|
@@ -1307,6 +1332,7 @@ export {
|
|
|
1307
1332
|
source_simple_diode,
|
|
1308
1333
|
source_simple_ground,
|
|
1309
1334
|
source_simple_inductor,
|
|
1335
|
+
source_simple_pin_header,
|
|
1310
1336
|
source_simple_potentiometer,
|
|
1311
1337
|
source_simple_power_source,
|
|
1312
1338
|
source_simple_push_button,
|