circuit-json 0.0.188 → 0.0.190
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 +13 -0
- package/dist/index.d.mts +530 -538
- package/dist/index.mjs +622 -612
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -380,59 +380,68 @@ var source_simple_power_source = source_component_base.extend({
|
|
|
380
380
|
expectTypesMatch(true);
|
|
381
381
|
|
|
382
382
|
// src/source/any_source_component.ts
|
|
383
|
-
import { z as
|
|
383
|
+
import { z as z31 } from "zod";
|
|
384
384
|
|
|
385
|
-
// src/source/
|
|
385
|
+
// src/source/source_simple_fuse.ts
|
|
386
386
|
import { z as z17 } from "zod";
|
|
387
|
+
var source_simple_fuse = source_component_base.extend({
|
|
388
|
+
ftype: z17.literal("simple_fuse"),
|
|
389
|
+
current_rating_amps: z17.number().describe("Nominal current in amps the fuse is rated for"),
|
|
390
|
+
voltage_rating_volts: z17.number().describe("Voltage rating in volts, e.g. \xB15V would be 5")
|
|
391
|
+
});
|
|
392
|
+
expectTypesMatch(true);
|
|
393
|
+
|
|
394
|
+
// src/source/source_simple_battery.ts
|
|
395
|
+
import { z as z18 } from "zod";
|
|
387
396
|
var source_simple_battery = source_component_base.extend({
|
|
388
|
-
ftype:
|
|
397
|
+
ftype: z18.literal("simple_battery"),
|
|
389
398
|
capacity: battery_capacity
|
|
390
399
|
});
|
|
391
400
|
expectTypesMatch(true);
|
|
392
401
|
|
|
393
402
|
// src/source/source_simple_inductor.ts
|
|
394
|
-
import { z as
|
|
403
|
+
import { z as z19 } from "zod";
|
|
395
404
|
var source_simple_inductor = source_component_base.extend({
|
|
396
|
-
ftype:
|
|
405
|
+
ftype: z19.literal("simple_inductor"),
|
|
397
406
|
inductance
|
|
398
407
|
});
|
|
399
408
|
expectTypesMatch(true);
|
|
400
409
|
|
|
401
410
|
// src/source/source_simple_push_button.ts
|
|
402
|
-
import { z as
|
|
411
|
+
import { z as z20 } from "zod";
|
|
403
412
|
var source_simple_push_button = source_component_base.extend({
|
|
404
|
-
ftype:
|
|
413
|
+
ftype: z20.literal("simple_push_button")
|
|
405
414
|
});
|
|
406
415
|
expectTypesMatch(true);
|
|
407
416
|
|
|
408
417
|
// src/source/source_simple_potentiometer.ts
|
|
409
|
-
import { z as
|
|
418
|
+
import { z as z21 } from "zod";
|
|
410
419
|
var source_simple_potentiometer = source_component_base.extend({
|
|
411
|
-
ftype:
|
|
420
|
+
ftype: z21.literal("simple_potentiometer"),
|
|
412
421
|
max_resistance: resistance
|
|
413
422
|
});
|
|
414
423
|
|
|
415
424
|
// src/source/source_simple_crystal.ts
|
|
416
|
-
import { z as
|
|
425
|
+
import { z as z22 } from "zod";
|
|
417
426
|
var source_simple_crystal = source_component_base.extend({
|
|
418
|
-
ftype:
|
|
419
|
-
frequency:
|
|
420
|
-
load_capacitance:
|
|
427
|
+
ftype: z22.literal("simple_crystal"),
|
|
428
|
+
frequency: z22.number().describe("Frequency in Hz"),
|
|
429
|
+
load_capacitance: z22.number().optional().describe("Load capacitance in pF")
|
|
421
430
|
});
|
|
422
431
|
expectTypesMatch(true);
|
|
423
432
|
|
|
424
433
|
// src/source/source_simple_pin_header.ts
|
|
425
|
-
import { z as
|
|
434
|
+
import { z as z23 } from "zod";
|
|
426
435
|
var source_simple_pin_header = source_component_base.extend({
|
|
427
|
-
ftype:
|
|
428
|
-
pin_count:
|
|
429
|
-
gender:
|
|
436
|
+
ftype: z23.literal("simple_pin_header"),
|
|
437
|
+
pin_count: z23.number(),
|
|
438
|
+
gender: z23.enum(["male", "female"]).optional().default("male")
|
|
430
439
|
});
|
|
431
440
|
|
|
432
441
|
// src/source/source_simple_resonator.ts
|
|
433
|
-
import { z as
|
|
442
|
+
import { z as z24 } from "zod";
|
|
434
443
|
var source_simple_resonator = source_component_base.extend({
|
|
435
|
-
ftype:
|
|
444
|
+
ftype: z24.literal("simple_resonator"),
|
|
436
445
|
load_capacitance: capacitance,
|
|
437
446
|
equivalent_series_resistance: resistance.optional(),
|
|
438
447
|
frequency
|
|
@@ -440,77 +449,77 @@ var source_simple_resonator = source_component_base.extend({
|
|
|
440
449
|
expectTypesMatch(true);
|
|
441
450
|
|
|
442
451
|
// src/source/source_simple_transistor.ts
|
|
443
|
-
import { z as
|
|
452
|
+
import { z as z25 } from "zod";
|
|
444
453
|
var source_simple_transistor = source_component_base.extend({
|
|
445
|
-
ftype:
|
|
446
|
-
transistor_type:
|
|
454
|
+
ftype: z25.literal("simple_transistor"),
|
|
455
|
+
transistor_type: z25.enum(["npn", "pnp"])
|
|
447
456
|
});
|
|
448
457
|
expectTypesMatch(true);
|
|
449
458
|
|
|
450
459
|
// src/source/source_simple_mosfet.ts
|
|
451
|
-
import { z as
|
|
460
|
+
import { z as z26 } from "zod";
|
|
452
461
|
var source_simple_mosfet = source_component_base.extend({
|
|
453
|
-
ftype:
|
|
454
|
-
channel_type:
|
|
455
|
-
mosfet_mode:
|
|
462
|
+
ftype: z26.literal("simple_mosfet"),
|
|
463
|
+
channel_type: z26.enum(["n", "p"]),
|
|
464
|
+
mosfet_mode: z26.enum(["enhancement", "depletion"])
|
|
456
465
|
});
|
|
457
466
|
expectTypesMatch(true);
|
|
458
467
|
|
|
459
468
|
// src/source/source_simple_switch.ts
|
|
460
|
-
import { z as
|
|
469
|
+
import { z as z27 } from "zod";
|
|
461
470
|
var source_simple_switch = source_component_base.extend({
|
|
462
|
-
ftype:
|
|
471
|
+
ftype: z27.literal("simple_switch")
|
|
463
472
|
});
|
|
464
473
|
expectTypesMatch(true);
|
|
465
474
|
|
|
466
475
|
// src/source/source_project_metadata.ts
|
|
467
|
-
import { z as
|
|
468
|
-
var source_project_metadata =
|
|
469
|
-
type:
|
|
470
|
-
name:
|
|
471
|
-
software_used_string:
|
|
472
|
-
created_at:
|
|
476
|
+
import { z as z28 } from "zod";
|
|
477
|
+
var source_project_metadata = z28.object({
|
|
478
|
+
type: z28.literal("source_project_metadata"),
|
|
479
|
+
name: z28.string().optional(),
|
|
480
|
+
software_used_string: z28.string().optional(),
|
|
481
|
+
created_at: z28.string().datetime().optional()
|
|
473
482
|
});
|
|
474
483
|
expectTypesMatch(true);
|
|
475
484
|
|
|
476
485
|
// src/source/source_missing_property_error.ts
|
|
477
|
-
import { z as
|
|
478
|
-
var source_missing_property_error =
|
|
479
|
-
type:
|
|
486
|
+
import { z as z29 } from "zod";
|
|
487
|
+
var source_missing_property_error = z29.object({
|
|
488
|
+
type: z29.literal("source_missing_property_error"),
|
|
480
489
|
source_missing_property_error_id: getZodPrefixedIdWithDefault(
|
|
481
490
|
"source_missing_property_error"
|
|
482
491
|
),
|
|
483
|
-
source_component_id:
|
|
484
|
-
property_name:
|
|
485
|
-
error_type:
|
|
486
|
-
message:
|
|
492
|
+
source_component_id: z29.string(),
|
|
493
|
+
property_name: z29.string(),
|
|
494
|
+
error_type: z29.literal("source_missing_property_error"),
|
|
495
|
+
message: z29.string()
|
|
487
496
|
}).describe("The source code is missing a property");
|
|
488
497
|
expectTypesMatch(true);
|
|
489
498
|
|
|
490
499
|
// src/source/source_failed_to_create_component_error.ts
|
|
491
|
-
import { z as
|
|
492
|
-
var source_failed_to_create_component_error =
|
|
493
|
-
type:
|
|
500
|
+
import { z as z30 } from "zod";
|
|
501
|
+
var source_failed_to_create_component_error = z30.object({
|
|
502
|
+
type: z30.literal("source_failed_to_create_component_error"),
|
|
494
503
|
source_failed_to_create_component_error_id: getZodPrefixedIdWithDefault(
|
|
495
504
|
"source_failed_to_create_component_error"
|
|
496
505
|
),
|
|
497
|
-
component_name:
|
|
498
|
-
subcircuit_id:
|
|
499
|
-
parent_source_component_id:
|
|
500
|
-
message:
|
|
501
|
-
pcb_center:
|
|
502
|
-
x:
|
|
503
|
-
y:
|
|
506
|
+
component_name: z30.string().optional(),
|
|
507
|
+
subcircuit_id: z30.string().optional(),
|
|
508
|
+
parent_source_component_id: z30.string().optional(),
|
|
509
|
+
message: z30.string(),
|
|
510
|
+
pcb_center: z30.object({
|
|
511
|
+
x: z30.number().optional(),
|
|
512
|
+
y: z30.number().optional()
|
|
504
513
|
}).optional(),
|
|
505
|
-
schematic_center:
|
|
506
|
-
x:
|
|
507
|
-
y:
|
|
514
|
+
schematic_center: z30.object({
|
|
515
|
+
x: z30.number().optional(),
|
|
516
|
+
y: z30.number().optional()
|
|
508
517
|
}).optional()
|
|
509
518
|
}).describe("Error emitted when a component fails to be constructed");
|
|
510
519
|
expectTypesMatch(true);
|
|
511
520
|
|
|
512
521
|
// src/source/any_source_component.ts
|
|
513
|
-
var any_source_component =
|
|
522
|
+
var any_source_component = z31.union([
|
|
514
523
|
source_simple_resistor,
|
|
515
524
|
source_simple_capacitor,
|
|
516
525
|
source_simple_diode,
|
|
@@ -530,156 +539,157 @@ var any_source_component = z30.union([
|
|
|
530
539
|
source_simple_switch,
|
|
531
540
|
source_simple_transistor,
|
|
532
541
|
source_simple_mosfet,
|
|
542
|
+
source_simple_fuse,
|
|
533
543
|
source_project_metadata,
|
|
534
544
|
source_missing_property_error,
|
|
535
545
|
source_failed_to_create_component_error
|
|
536
546
|
]);
|
|
537
547
|
|
|
538
548
|
// src/source/source_port.ts
|
|
539
|
-
import { z as
|
|
540
|
-
var source_port =
|
|
541
|
-
type:
|
|
542
|
-
pin_number:
|
|
543
|
-
port_hints:
|
|
544
|
-
name:
|
|
545
|
-
source_port_id:
|
|
546
|
-
source_component_id:
|
|
547
|
-
subcircuit_id:
|
|
549
|
+
import { z as z32 } from "zod";
|
|
550
|
+
var source_port = z32.object({
|
|
551
|
+
type: z32.literal("source_port"),
|
|
552
|
+
pin_number: z32.number().optional(),
|
|
553
|
+
port_hints: z32.array(z32.string()).optional(),
|
|
554
|
+
name: z32.string(),
|
|
555
|
+
source_port_id: z32.string(),
|
|
556
|
+
source_component_id: z32.string(),
|
|
557
|
+
subcircuit_id: z32.string().optional()
|
|
548
558
|
});
|
|
549
559
|
expectTypesMatch(true);
|
|
550
560
|
|
|
551
561
|
// src/source/source_trace.ts
|
|
552
|
-
import { z as
|
|
553
|
-
var source_trace =
|
|
554
|
-
type:
|
|
555
|
-
source_trace_id:
|
|
556
|
-
connected_source_port_ids:
|
|
557
|
-
connected_source_net_ids:
|
|
558
|
-
subcircuit_id:
|
|
559
|
-
subcircuit_connectivity_map_key:
|
|
560
|
-
max_length:
|
|
561
|
-
min_trace_thickness:
|
|
562
|
-
display_name:
|
|
562
|
+
import { z as z33 } from "zod";
|
|
563
|
+
var source_trace = z33.object({
|
|
564
|
+
type: z33.literal("source_trace"),
|
|
565
|
+
source_trace_id: z33.string(),
|
|
566
|
+
connected_source_port_ids: z33.array(z33.string()),
|
|
567
|
+
connected_source_net_ids: z33.array(z33.string()),
|
|
568
|
+
subcircuit_id: z33.string().optional(),
|
|
569
|
+
subcircuit_connectivity_map_key: z33.string().optional(),
|
|
570
|
+
max_length: z33.number().optional(),
|
|
571
|
+
min_trace_thickness: z33.number().optional(),
|
|
572
|
+
display_name: z33.string().optional()
|
|
563
573
|
});
|
|
564
574
|
expectTypesMatch(true);
|
|
565
575
|
|
|
566
576
|
// src/source/source_group.ts
|
|
567
|
-
import { z as
|
|
568
|
-
var source_group =
|
|
569
|
-
type:
|
|
570
|
-
source_group_id:
|
|
571
|
-
subcircuit_id:
|
|
572
|
-
parent_subcircuit_id:
|
|
573
|
-
is_subcircuit:
|
|
574
|
-
name:
|
|
577
|
+
import { z as z34 } from "zod";
|
|
578
|
+
var source_group = z34.object({
|
|
579
|
+
type: z34.literal("source_group"),
|
|
580
|
+
source_group_id: z34.string(),
|
|
581
|
+
subcircuit_id: z34.string().optional(),
|
|
582
|
+
parent_subcircuit_id: z34.string().optional(),
|
|
583
|
+
is_subcircuit: z34.boolean().optional(),
|
|
584
|
+
name: z34.string().optional()
|
|
575
585
|
});
|
|
576
586
|
|
|
577
587
|
// src/source/source_net.ts
|
|
578
|
-
import { z as
|
|
579
|
-
var source_net =
|
|
580
|
-
type:
|
|
581
|
-
source_net_id:
|
|
582
|
-
name:
|
|
583
|
-
member_source_group_ids:
|
|
584
|
-
is_power:
|
|
585
|
-
is_ground:
|
|
586
|
-
is_digital_signal:
|
|
587
|
-
is_analog_signal:
|
|
588
|
-
trace_width:
|
|
589
|
-
subcircuit_id:
|
|
588
|
+
import { z as z35 } from "zod";
|
|
589
|
+
var source_net = z35.object({
|
|
590
|
+
type: z35.literal("source_net"),
|
|
591
|
+
source_net_id: z35.string(),
|
|
592
|
+
name: z35.string(),
|
|
593
|
+
member_source_group_ids: z35.array(z35.string()),
|
|
594
|
+
is_power: z35.boolean().optional(),
|
|
595
|
+
is_ground: z35.boolean().optional(),
|
|
596
|
+
is_digital_signal: z35.boolean().optional(),
|
|
597
|
+
is_analog_signal: z35.boolean().optional(),
|
|
598
|
+
trace_width: z35.number().optional(),
|
|
599
|
+
subcircuit_id: z35.string().optional()
|
|
590
600
|
});
|
|
591
601
|
|
|
592
602
|
// src/schematic/schematic_box.ts
|
|
593
|
-
import { z as
|
|
594
|
-
var schematic_box =
|
|
595
|
-
type:
|
|
596
|
-
schematic_component_id:
|
|
603
|
+
import { z as z36 } from "zod";
|
|
604
|
+
var schematic_box = z36.object({
|
|
605
|
+
type: z36.literal("schematic_box"),
|
|
606
|
+
schematic_component_id: z36.string(),
|
|
597
607
|
width: distance,
|
|
598
608
|
height: distance,
|
|
599
|
-
is_dashed:
|
|
609
|
+
is_dashed: z36.boolean().default(false),
|
|
600
610
|
x: distance,
|
|
601
611
|
y: distance
|
|
602
612
|
}).describe("Draws a box on the schematic");
|
|
603
613
|
expectTypesMatch(true);
|
|
604
614
|
|
|
605
615
|
// src/schematic/schematic_path.ts
|
|
606
|
-
import { z as
|
|
607
|
-
var schematic_path =
|
|
608
|
-
type:
|
|
609
|
-
schematic_component_id:
|
|
610
|
-
fill_color:
|
|
611
|
-
is_filled:
|
|
612
|
-
points:
|
|
616
|
+
import { z as z37 } from "zod";
|
|
617
|
+
var schematic_path = z37.object({
|
|
618
|
+
type: z37.literal("schematic_path"),
|
|
619
|
+
schematic_component_id: z37.string(),
|
|
620
|
+
fill_color: z37.enum(["red", "blue"]).optional(),
|
|
621
|
+
is_filled: z37.boolean().optional(),
|
|
622
|
+
points: z37.array(point)
|
|
613
623
|
});
|
|
614
624
|
expectTypesMatch(true);
|
|
615
625
|
|
|
616
626
|
// src/schematic/schematic_component.ts
|
|
617
|
-
import { z as
|
|
618
|
-
var schematic_pin_styles =
|
|
619
|
-
|
|
627
|
+
import { z as z38 } from "zod";
|
|
628
|
+
var schematic_pin_styles = z38.record(
|
|
629
|
+
z38.object({
|
|
620
630
|
left_margin: length.optional(),
|
|
621
631
|
right_margin: length.optional(),
|
|
622
632
|
top_margin: length.optional(),
|
|
623
633
|
bottom_margin: length.optional()
|
|
624
634
|
})
|
|
625
635
|
);
|
|
626
|
-
var schematic_component_port_arrangement_by_size =
|
|
627
|
-
left_size:
|
|
628
|
-
right_size:
|
|
629
|
-
top_size:
|
|
630
|
-
bottom_size:
|
|
636
|
+
var schematic_component_port_arrangement_by_size = z38.object({
|
|
637
|
+
left_size: z38.number(),
|
|
638
|
+
right_size: z38.number(),
|
|
639
|
+
top_size: z38.number().optional(),
|
|
640
|
+
bottom_size: z38.number().optional()
|
|
631
641
|
});
|
|
632
642
|
expectTypesMatch(true);
|
|
633
|
-
var schematic_component_port_arrangement_by_sides =
|
|
634
|
-
left_side:
|
|
635
|
-
pins:
|
|
643
|
+
var schematic_component_port_arrangement_by_sides = z38.object({
|
|
644
|
+
left_side: z38.object({
|
|
645
|
+
pins: z38.array(z38.number()),
|
|
636
646
|
// @ts-ignore
|
|
637
|
-
direction:
|
|
647
|
+
direction: z38.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
638
648
|
}).optional(),
|
|
639
|
-
right_side:
|
|
640
|
-
pins:
|
|
649
|
+
right_side: z38.object({
|
|
650
|
+
pins: z38.array(z38.number()),
|
|
641
651
|
// @ts-ignore
|
|
642
|
-
direction:
|
|
652
|
+
direction: z38.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
643
653
|
}).optional(),
|
|
644
|
-
top_side:
|
|
645
|
-
pins:
|
|
654
|
+
top_side: z38.object({
|
|
655
|
+
pins: z38.array(z38.number()),
|
|
646
656
|
// @ts-ignore
|
|
647
|
-
direction:
|
|
657
|
+
direction: z38.enum(["left-to-right", "right-to-left"]).optional()
|
|
648
658
|
}).optional(),
|
|
649
|
-
bottom_side:
|
|
650
|
-
pins:
|
|
659
|
+
bottom_side: z38.object({
|
|
660
|
+
pins: z38.array(z38.number()),
|
|
651
661
|
// @ts-ignore
|
|
652
|
-
direction:
|
|
662
|
+
direction: z38.enum(["left-to-right", "right-to-left"]).optional()
|
|
653
663
|
}).optional()
|
|
654
664
|
});
|
|
655
665
|
expectTypesMatch(true);
|
|
656
|
-
var port_arrangement =
|
|
666
|
+
var port_arrangement = z38.union([
|
|
657
667
|
schematic_component_port_arrangement_by_size,
|
|
658
668
|
schematic_component_port_arrangement_by_sides
|
|
659
669
|
]);
|
|
660
|
-
var schematic_component =
|
|
661
|
-
type:
|
|
670
|
+
var schematic_component = z38.object({
|
|
671
|
+
type: z38.literal("schematic_component"),
|
|
662
672
|
size,
|
|
663
673
|
center: point,
|
|
664
|
-
source_component_id:
|
|
665
|
-
schematic_component_id:
|
|
674
|
+
source_component_id: z38.string(),
|
|
675
|
+
schematic_component_id: z38.string(),
|
|
666
676
|
pin_spacing: length.optional(),
|
|
667
677
|
pin_styles: schematic_pin_styles.optional(),
|
|
668
678
|
box_width: length.optional(),
|
|
669
|
-
symbol_name:
|
|
679
|
+
symbol_name: z38.string().optional(),
|
|
670
680
|
port_arrangement: port_arrangement.optional(),
|
|
671
|
-
port_labels:
|
|
672
|
-
symbol_display_value:
|
|
673
|
-
subcircuit_id:
|
|
674
|
-
schematic_group_id:
|
|
681
|
+
port_labels: z38.record(z38.string()).optional(),
|
|
682
|
+
symbol_display_value: z38.string().optional(),
|
|
683
|
+
subcircuit_id: z38.string().optional(),
|
|
684
|
+
schematic_group_id: z38.string().optional()
|
|
675
685
|
});
|
|
676
686
|
expectTypesMatch(true);
|
|
677
687
|
|
|
678
688
|
// src/schematic/schematic_line.ts
|
|
679
|
-
import { z as
|
|
680
|
-
var schematic_line =
|
|
681
|
-
type:
|
|
682
|
-
schematic_component_id:
|
|
689
|
+
import { z as z39 } from "zod";
|
|
690
|
+
var schematic_line = z39.object({
|
|
691
|
+
type: z39.literal("schematic_line"),
|
|
692
|
+
schematic_component_id: z39.string(),
|
|
683
693
|
x1: distance,
|
|
684
694
|
x2: distance,
|
|
685
695
|
y1: distance,
|
|
@@ -688,41 +698,41 @@ var schematic_line = z38.object({
|
|
|
688
698
|
expectTypesMatch(true);
|
|
689
699
|
|
|
690
700
|
// src/schematic/schematic_trace.ts
|
|
691
|
-
import { z as
|
|
692
|
-
var schematic_trace =
|
|
693
|
-
type:
|
|
694
|
-
schematic_trace_id:
|
|
695
|
-
source_trace_id:
|
|
696
|
-
junctions:
|
|
697
|
-
|
|
698
|
-
x:
|
|
699
|
-
y:
|
|
701
|
+
import { z as z40 } from "zod";
|
|
702
|
+
var schematic_trace = z40.object({
|
|
703
|
+
type: z40.literal("schematic_trace"),
|
|
704
|
+
schematic_trace_id: z40.string(),
|
|
705
|
+
source_trace_id: z40.string(),
|
|
706
|
+
junctions: z40.array(
|
|
707
|
+
z40.object({
|
|
708
|
+
x: z40.number(),
|
|
709
|
+
y: z40.number()
|
|
700
710
|
})
|
|
701
711
|
),
|
|
702
|
-
edges:
|
|
703
|
-
|
|
704
|
-
from:
|
|
705
|
-
x:
|
|
706
|
-
y:
|
|
712
|
+
edges: z40.array(
|
|
713
|
+
z40.object({
|
|
714
|
+
from: z40.object({
|
|
715
|
+
x: z40.number(),
|
|
716
|
+
y: z40.number()
|
|
707
717
|
}),
|
|
708
|
-
to:
|
|
709
|
-
x:
|
|
710
|
-
y:
|
|
718
|
+
to: z40.object({
|
|
719
|
+
x: z40.number(),
|
|
720
|
+
y: z40.number()
|
|
711
721
|
}),
|
|
712
|
-
is_crossing:
|
|
713
|
-
from_schematic_port_id:
|
|
714
|
-
to_schematic_port_id:
|
|
722
|
+
is_crossing: z40.boolean().optional(),
|
|
723
|
+
from_schematic_port_id: z40.string().optional(),
|
|
724
|
+
to_schematic_port_id: z40.string().optional()
|
|
715
725
|
})
|
|
716
726
|
)
|
|
717
727
|
});
|
|
718
728
|
expectTypesMatch(true);
|
|
719
729
|
|
|
720
730
|
// src/schematic/schematic_text.ts
|
|
721
|
-
import { z as
|
|
731
|
+
import { z as z43 } from "zod";
|
|
722
732
|
|
|
723
733
|
// src/common/NinePointAnchor.ts
|
|
724
|
-
import { z as
|
|
725
|
-
var ninePointAnchor =
|
|
734
|
+
import { z as z41 } from "zod";
|
|
735
|
+
var ninePointAnchor = z41.enum([
|
|
726
736
|
"top_left",
|
|
727
737
|
"top_center",
|
|
728
738
|
"top_right",
|
|
@@ -735,8 +745,8 @@ var ninePointAnchor = z40.enum([
|
|
|
735
745
|
]);
|
|
736
746
|
|
|
737
747
|
// src/common/FivePointAnchor.ts
|
|
738
|
-
import { z as
|
|
739
|
-
var fivePointAnchor =
|
|
748
|
+
import { z as z42 } from "zod";
|
|
749
|
+
var fivePointAnchor = z42.enum([
|
|
740
750
|
"center",
|
|
741
751
|
"left",
|
|
742
752
|
"right",
|
|
@@ -745,87 +755,87 @@ var fivePointAnchor = z41.enum([
|
|
|
745
755
|
]);
|
|
746
756
|
|
|
747
757
|
// src/schematic/schematic_text.ts
|
|
748
|
-
var schematic_text =
|
|
749
|
-
type:
|
|
750
|
-
schematic_component_id:
|
|
751
|
-
schematic_text_id:
|
|
752
|
-
text:
|
|
753
|
-
font_size:
|
|
754
|
-
position:
|
|
758
|
+
var schematic_text = z43.object({
|
|
759
|
+
type: z43.literal("schematic_text"),
|
|
760
|
+
schematic_component_id: z43.string().optional(),
|
|
761
|
+
schematic_text_id: z43.string(),
|
|
762
|
+
text: z43.string(),
|
|
763
|
+
font_size: z43.number().default(0.18),
|
|
764
|
+
position: z43.object({
|
|
755
765
|
x: distance,
|
|
756
766
|
y: distance
|
|
757
767
|
}),
|
|
758
|
-
rotation:
|
|
759
|
-
anchor:
|
|
760
|
-
color:
|
|
768
|
+
rotation: z43.number().default(0),
|
|
769
|
+
anchor: z43.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
770
|
+
color: z43.string().default("#000000")
|
|
761
771
|
});
|
|
762
772
|
expectTypesMatch(true);
|
|
763
773
|
|
|
764
774
|
// src/schematic/schematic_port.ts
|
|
765
|
-
import { z as
|
|
766
|
-
var schematic_port =
|
|
767
|
-
type:
|
|
768
|
-
schematic_port_id:
|
|
769
|
-
source_port_id:
|
|
770
|
-
schematic_component_id:
|
|
775
|
+
import { z as z44 } from "zod";
|
|
776
|
+
var schematic_port = z44.object({
|
|
777
|
+
type: z44.literal("schematic_port"),
|
|
778
|
+
schematic_port_id: z44.string(),
|
|
779
|
+
source_port_id: z44.string(),
|
|
780
|
+
schematic_component_id: z44.string().optional(),
|
|
771
781
|
center: point,
|
|
772
|
-
facing_direction:
|
|
773
|
-
distance_from_component_edge:
|
|
774
|
-
side_of_component:
|
|
775
|
-
true_ccw_index:
|
|
776
|
-
pin_number:
|
|
777
|
-
display_pin_label:
|
|
782
|
+
facing_direction: z44.enum(["up", "down", "left", "right"]).optional(),
|
|
783
|
+
distance_from_component_edge: z44.number().optional(),
|
|
784
|
+
side_of_component: z44.enum(["top", "bottom", "left", "right"]).optional(),
|
|
785
|
+
true_ccw_index: z44.number().optional(),
|
|
786
|
+
pin_number: z44.number().optional(),
|
|
787
|
+
display_pin_label: z44.string().optional()
|
|
778
788
|
}).describe("Defines a port on a schematic component");
|
|
779
789
|
expectTypesMatch(true);
|
|
780
790
|
|
|
781
791
|
// src/schematic/schematic_net_label.ts
|
|
782
|
-
import { z as
|
|
783
|
-
var schematic_net_label =
|
|
784
|
-
type:
|
|
792
|
+
import { z as z45 } from "zod";
|
|
793
|
+
var schematic_net_label = z45.object({
|
|
794
|
+
type: z45.literal("schematic_net_label"),
|
|
785
795
|
schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
|
|
786
|
-
schematic_trace_id:
|
|
787
|
-
source_trace_id:
|
|
788
|
-
source_net_id:
|
|
796
|
+
schematic_trace_id: z45.string().optional(),
|
|
797
|
+
source_trace_id: z45.string().optional(),
|
|
798
|
+
source_net_id: z45.string(),
|
|
789
799
|
center: point,
|
|
790
800
|
anchor_position: point.optional(),
|
|
791
|
-
anchor_side:
|
|
792
|
-
text:
|
|
793
|
-
symbol_name:
|
|
801
|
+
anchor_side: z45.enum(["top", "bottom", "left", "right"]),
|
|
802
|
+
text: z45.string(),
|
|
803
|
+
symbol_name: z45.string().optional()
|
|
794
804
|
});
|
|
795
805
|
expectTypesMatch(true);
|
|
796
806
|
|
|
797
807
|
// src/schematic/schematic_error.ts
|
|
798
|
-
import { z as
|
|
799
|
-
var schematic_error =
|
|
800
|
-
type:
|
|
801
|
-
schematic_error_id:
|
|
808
|
+
import { z as z46 } from "zod";
|
|
809
|
+
var schematic_error = z46.object({
|
|
810
|
+
type: z46.literal("schematic_error"),
|
|
811
|
+
schematic_error_id: z46.string(),
|
|
802
812
|
// eventually each error type should be broken out into a dir of files
|
|
803
|
-
error_type:
|
|
804
|
-
message:
|
|
813
|
+
error_type: z46.literal("schematic_port_not_found"),
|
|
814
|
+
message: z46.string()
|
|
805
815
|
}).describe("Defines a schematic error on the schematic");
|
|
806
816
|
expectTypesMatch(true);
|
|
807
817
|
|
|
808
818
|
// src/schematic/schematic_debug_object.ts
|
|
809
|
-
import { z as
|
|
810
|
-
var schematic_debug_object_base =
|
|
811
|
-
type:
|
|
812
|
-
label:
|
|
819
|
+
import { z as z47 } from "zod";
|
|
820
|
+
var schematic_debug_object_base = z47.object({
|
|
821
|
+
type: z47.literal("schematic_debug_object"),
|
|
822
|
+
label: z47.string().optional()
|
|
813
823
|
});
|
|
814
824
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
815
|
-
shape:
|
|
825
|
+
shape: z47.literal("rect"),
|
|
816
826
|
center: point,
|
|
817
827
|
size
|
|
818
828
|
});
|
|
819
829
|
var schematic_debug_line = schematic_debug_object_base.extend({
|
|
820
|
-
shape:
|
|
830
|
+
shape: z47.literal("line"),
|
|
821
831
|
start: point,
|
|
822
832
|
end: point
|
|
823
833
|
});
|
|
824
834
|
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
825
|
-
shape:
|
|
835
|
+
shape: z47.literal("point"),
|
|
826
836
|
center: point
|
|
827
837
|
});
|
|
828
|
-
var schematic_debug_object =
|
|
838
|
+
var schematic_debug_object = z47.discriminatedUnion("shape", [
|
|
829
839
|
schematic_debug_rect,
|
|
830
840
|
schematic_debug_line,
|
|
831
841
|
schematic_debug_point
|
|
@@ -833,52 +843,52 @@ var schematic_debug_object = z46.discriminatedUnion("shape", [
|
|
|
833
843
|
expectTypesMatch(true);
|
|
834
844
|
|
|
835
845
|
// src/schematic/schematic_voltage_probe.ts
|
|
836
|
-
import { z as
|
|
837
|
-
var schematic_voltage_probe =
|
|
838
|
-
type:
|
|
839
|
-
schematic_voltage_probe_id:
|
|
846
|
+
import { z as z48 } from "zod";
|
|
847
|
+
var schematic_voltage_probe = z48.object({
|
|
848
|
+
type: z48.literal("schematic_voltage_probe"),
|
|
849
|
+
schematic_voltage_probe_id: z48.string(),
|
|
840
850
|
position: point,
|
|
841
|
-
schematic_trace_id:
|
|
851
|
+
schematic_trace_id: z48.string(),
|
|
842
852
|
voltage: voltage.optional()
|
|
843
853
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
844
854
|
expectTypesMatch(true);
|
|
845
855
|
|
|
846
856
|
// src/schematic/schematic_manual_edit_conflict_warning.ts
|
|
847
|
-
import { z as
|
|
848
|
-
var schematic_manual_edit_conflict_warning =
|
|
849
|
-
type:
|
|
857
|
+
import { z as z49 } from "zod";
|
|
858
|
+
var schematic_manual_edit_conflict_warning = z49.object({
|
|
859
|
+
type: z49.literal("schematic_manual_edit_conflict_warning"),
|
|
850
860
|
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
851
861
|
"schematic_manual_edit_conflict_warning"
|
|
852
862
|
),
|
|
853
|
-
message:
|
|
854
|
-
schematic_component_id:
|
|
855
|
-
schematic_group_id:
|
|
856
|
-
subcircuit_id:
|
|
857
|
-
source_component_id:
|
|
863
|
+
message: z49.string(),
|
|
864
|
+
schematic_component_id: z49.string(),
|
|
865
|
+
schematic_group_id: z49.string().optional(),
|
|
866
|
+
subcircuit_id: z49.string().optional(),
|
|
867
|
+
source_component_id: z49.string()
|
|
858
868
|
}).describe(
|
|
859
869
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
860
870
|
);
|
|
861
871
|
expectTypesMatch(true);
|
|
862
872
|
|
|
863
873
|
// src/schematic/schematic_group.ts
|
|
864
|
-
import { z as
|
|
865
|
-
var schematic_group =
|
|
866
|
-
type:
|
|
874
|
+
import { z as z50 } from "zod";
|
|
875
|
+
var schematic_group = z50.object({
|
|
876
|
+
type: z50.literal("schematic_group"),
|
|
867
877
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
868
|
-
source_group_id:
|
|
869
|
-
is_subcircuit:
|
|
870
|
-
subcircuit_id:
|
|
878
|
+
source_group_id: z50.string(),
|
|
879
|
+
is_subcircuit: z50.boolean().optional(),
|
|
880
|
+
subcircuit_id: z50.string().optional(),
|
|
871
881
|
width: length,
|
|
872
882
|
height: length,
|
|
873
883
|
center: point,
|
|
874
|
-
schematic_component_ids:
|
|
875
|
-
name:
|
|
876
|
-
description:
|
|
884
|
+
schematic_component_ids: z50.array(z50.string()),
|
|
885
|
+
name: z50.string().optional(),
|
|
886
|
+
description: z50.string().optional()
|
|
877
887
|
}).describe("Defines a group of components on the schematic");
|
|
878
888
|
expectTypesMatch(true);
|
|
879
889
|
|
|
880
890
|
// src/pcb/properties/layer_ref.ts
|
|
881
|
-
import { z as
|
|
891
|
+
import { z as z51 } from "zod";
|
|
882
892
|
var all_layers = [
|
|
883
893
|
"top",
|
|
884
894
|
"bottom",
|
|
@@ -889,9 +899,9 @@ var all_layers = [
|
|
|
889
899
|
"inner5",
|
|
890
900
|
"inner6"
|
|
891
901
|
];
|
|
892
|
-
var layer_string =
|
|
902
|
+
var layer_string = z51.enum(all_layers);
|
|
893
903
|
var layer_ref = layer_string.or(
|
|
894
|
-
|
|
904
|
+
z51.object({
|
|
895
905
|
name: layer_string
|
|
896
906
|
})
|
|
897
907
|
).transform((layer) => {
|
|
@@ -900,53 +910,53 @@ var layer_ref = layer_string.or(
|
|
|
900
910
|
}
|
|
901
911
|
return layer.name;
|
|
902
912
|
});
|
|
903
|
-
var visible_layer =
|
|
913
|
+
var visible_layer = z51.enum(["top", "bottom"]);
|
|
904
914
|
|
|
905
915
|
// src/pcb/properties/pcb_route_hints.ts
|
|
906
|
-
import { z as
|
|
907
|
-
var pcb_route_hint =
|
|
916
|
+
import { z as z52 } from "zod";
|
|
917
|
+
var pcb_route_hint = z52.object({
|
|
908
918
|
x: distance,
|
|
909
919
|
y: distance,
|
|
910
|
-
via:
|
|
920
|
+
via: z52.boolean().optional(),
|
|
911
921
|
via_to_layer: layer_ref.optional()
|
|
912
922
|
});
|
|
913
|
-
var pcb_route_hints =
|
|
923
|
+
var pcb_route_hints = z52.array(pcb_route_hint);
|
|
914
924
|
|
|
915
925
|
// src/pcb/properties/route_hint_point.ts
|
|
916
|
-
import { z as
|
|
917
|
-
var route_hint_point =
|
|
926
|
+
import { z as z53 } from "zod";
|
|
927
|
+
var route_hint_point = z53.object({
|
|
918
928
|
x: distance,
|
|
919
929
|
y: distance,
|
|
920
|
-
via:
|
|
930
|
+
via: z53.boolean().optional(),
|
|
921
931
|
to_layer: layer_ref.optional(),
|
|
922
932
|
trace_width: distance.optional()
|
|
923
933
|
});
|
|
924
934
|
|
|
925
935
|
// src/pcb/pcb_component.ts
|
|
926
|
-
import { z as
|
|
927
|
-
var pcb_component =
|
|
928
|
-
type:
|
|
936
|
+
import { z as z54 } from "zod";
|
|
937
|
+
var pcb_component = z54.object({
|
|
938
|
+
type: z54.literal("pcb_component"),
|
|
929
939
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
930
|
-
source_component_id:
|
|
940
|
+
source_component_id: z54.string(),
|
|
931
941
|
center: point,
|
|
932
942
|
layer: layer_ref,
|
|
933
943
|
rotation,
|
|
934
944
|
width: length,
|
|
935
945
|
height: length,
|
|
936
|
-
subcircuit_id:
|
|
937
|
-
pcb_group_id:
|
|
946
|
+
subcircuit_id: z54.string().optional(),
|
|
947
|
+
pcb_group_id: z54.string().optional()
|
|
938
948
|
}).describe("Defines a component on the PCB");
|
|
939
949
|
expectTypesMatch(true);
|
|
940
950
|
|
|
941
951
|
// src/pcb/pcb_hole.ts
|
|
942
|
-
import { z as
|
|
943
|
-
var pcb_hole_circle_or_square =
|
|
944
|
-
type:
|
|
952
|
+
import { z as z55 } from "zod";
|
|
953
|
+
var pcb_hole_circle_or_square = z55.object({
|
|
954
|
+
type: z55.literal("pcb_hole"),
|
|
945
955
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
946
|
-
pcb_group_id:
|
|
947
|
-
subcircuit_id:
|
|
948
|
-
hole_shape:
|
|
949
|
-
hole_diameter:
|
|
956
|
+
pcb_group_id: z55.string().optional(),
|
|
957
|
+
subcircuit_id: z55.string().optional(),
|
|
958
|
+
hole_shape: z55.enum(["circle", "square"]),
|
|
959
|
+
hole_diameter: z55.number(),
|
|
950
960
|
x: distance,
|
|
951
961
|
y: distance
|
|
952
962
|
});
|
|
@@ -954,14 +964,14 @@ var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
|
954
964
|
"Defines a circular or square hole on the PCB"
|
|
955
965
|
);
|
|
956
966
|
expectTypesMatch(true);
|
|
957
|
-
var pcb_hole_oval =
|
|
958
|
-
type:
|
|
967
|
+
var pcb_hole_oval = z55.object({
|
|
968
|
+
type: z55.literal("pcb_hole"),
|
|
959
969
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
960
|
-
pcb_group_id:
|
|
961
|
-
subcircuit_id:
|
|
962
|
-
hole_shape:
|
|
963
|
-
hole_width:
|
|
964
|
-
hole_height:
|
|
970
|
+
pcb_group_id: z55.string().optional(),
|
|
971
|
+
subcircuit_id: z55.string().optional(),
|
|
972
|
+
hole_shape: z55.literal("oval"),
|
|
973
|
+
hole_width: z55.number(),
|
|
974
|
+
hole_height: z55.number(),
|
|
965
975
|
x: distance,
|
|
966
976
|
y: distance
|
|
967
977
|
});
|
|
@@ -972,77 +982,77 @@ expectTypesMatch(true);
|
|
|
972
982
|
var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval);
|
|
973
983
|
|
|
974
984
|
// src/pcb/pcb_plated_hole.ts
|
|
975
|
-
import { z as
|
|
976
|
-
var pcb_plated_hole_circle =
|
|
977
|
-
type:
|
|
978
|
-
shape:
|
|
979
|
-
pcb_group_id:
|
|
980
|
-
subcircuit_id:
|
|
981
|
-
outer_diameter:
|
|
982
|
-
hole_diameter:
|
|
985
|
+
import { z as z56 } from "zod";
|
|
986
|
+
var pcb_plated_hole_circle = z56.object({
|
|
987
|
+
type: z56.literal("pcb_plated_hole"),
|
|
988
|
+
shape: z56.literal("circle"),
|
|
989
|
+
pcb_group_id: z56.string().optional(),
|
|
990
|
+
subcircuit_id: z56.string().optional(),
|
|
991
|
+
outer_diameter: z56.number(),
|
|
992
|
+
hole_diameter: z56.number(),
|
|
983
993
|
x: distance,
|
|
984
994
|
y: distance,
|
|
985
|
-
layers:
|
|
986
|
-
port_hints:
|
|
987
|
-
pcb_component_id:
|
|
988
|
-
pcb_port_id:
|
|
995
|
+
layers: z56.array(layer_ref),
|
|
996
|
+
port_hints: z56.array(z56.string()).optional(),
|
|
997
|
+
pcb_component_id: z56.string().optional(),
|
|
998
|
+
pcb_port_id: z56.string().optional(),
|
|
989
999
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
990
1000
|
});
|
|
991
|
-
var pcb_plated_hole_oval =
|
|
992
|
-
type:
|
|
993
|
-
shape:
|
|
994
|
-
pcb_group_id:
|
|
995
|
-
subcircuit_id:
|
|
996
|
-
outer_width:
|
|
997
|
-
outer_height:
|
|
998
|
-
hole_width:
|
|
999
|
-
hole_height:
|
|
1001
|
+
var pcb_plated_hole_oval = z56.object({
|
|
1002
|
+
type: z56.literal("pcb_plated_hole"),
|
|
1003
|
+
shape: z56.enum(["oval", "pill"]),
|
|
1004
|
+
pcb_group_id: z56.string().optional(),
|
|
1005
|
+
subcircuit_id: z56.string().optional(),
|
|
1006
|
+
outer_width: z56.number(),
|
|
1007
|
+
outer_height: z56.number(),
|
|
1008
|
+
hole_width: z56.number(),
|
|
1009
|
+
hole_height: z56.number(),
|
|
1000
1010
|
x: distance,
|
|
1001
1011
|
y: distance,
|
|
1002
|
-
layers:
|
|
1003
|
-
port_hints:
|
|
1004
|
-
pcb_component_id:
|
|
1005
|
-
pcb_port_id:
|
|
1012
|
+
layers: z56.array(layer_ref),
|
|
1013
|
+
port_hints: z56.array(z56.string()).optional(),
|
|
1014
|
+
pcb_component_id: z56.string().optional(),
|
|
1015
|
+
pcb_port_id: z56.string().optional(),
|
|
1006
1016
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1007
1017
|
});
|
|
1008
|
-
var pcb_circular_hole_with_rect_pad =
|
|
1009
|
-
type:
|
|
1010
|
-
shape:
|
|
1011
|
-
pcb_group_id:
|
|
1012
|
-
subcircuit_id:
|
|
1013
|
-
hole_shape:
|
|
1014
|
-
pad_shape:
|
|
1015
|
-
hole_diameter:
|
|
1016
|
-
rect_pad_width:
|
|
1017
|
-
rect_pad_height:
|
|
1018
|
+
var pcb_circular_hole_with_rect_pad = z56.object({
|
|
1019
|
+
type: z56.literal("pcb_plated_hole"),
|
|
1020
|
+
shape: z56.literal("circular_hole_with_rect_pad"),
|
|
1021
|
+
pcb_group_id: z56.string().optional(),
|
|
1022
|
+
subcircuit_id: z56.string().optional(),
|
|
1023
|
+
hole_shape: z56.literal("circle"),
|
|
1024
|
+
pad_shape: z56.literal("rect"),
|
|
1025
|
+
hole_diameter: z56.number(),
|
|
1026
|
+
rect_pad_width: z56.number(),
|
|
1027
|
+
rect_pad_height: z56.number(),
|
|
1018
1028
|
x: distance,
|
|
1019
1029
|
y: distance,
|
|
1020
|
-
layers:
|
|
1021
|
-
port_hints:
|
|
1022
|
-
pcb_component_id:
|
|
1023
|
-
pcb_port_id:
|
|
1030
|
+
layers: z56.array(layer_ref),
|
|
1031
|
+
port_hints: z56.array(z56.string()).optional(),
|
|
1032
|
+
pcb_component_id: z56.string().optional(),
|
|
1033
|
+
pcb_port_id: z56.string().optional(),
|
|
1024
1034
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1025
1035
|
});
|
|
1026
|
-
var pcb_pill_hole_with_rect_pad =
|
|
1027
|
-
type:
|
|
1028
|
-
shape:
|
|
1029
|
-
pcb_group_id:
|
|
1030
|
-
subcircuit_id:
|
|
1031
|
-
hole_shape:
|
|
1032
|
-
pad_shape:
|
|
1033
|
-
hole_width:
|
|
1034
|
-
hole_height:
|
|
1035
|
-
rect_pad_width:
|
|
1036
|
-
rect_pad_height:
|
|
1036
|
+
var pcb_pill_hole_with_rect_pad = z56.object({
|
|
1037
|
+
type: z56.literal("pcb_plated_hole"),
|
|
1038
|
+
shape: z56.literal("pill_hole_with_rect_pad"),
|
|
1039
|
+
pcb_group_id: z56.string().optional(),
|
|
1040
|
+
subcircuit_id: z56.string().optional(),
|
|
1041
|
+
hole_shape: z56.literal("pill"),
|
|
1042
|
+
pad_shape: z56.literal("rect"),
|
|
1043
|
+
hole_width: z56.number(),
|
|
1044
|
+
hole_height: z56.number(),
|
|
1045
|
+
rect_pad_width: z56.number(),
|
|
1046
|
+
rect_pad_height: z56.number(),
|
|
1037
1047
|
x: distance,
|
|
1038
1048
|
y: distance,
|
|
1039
|
-
layers:
|
|
1040
|
-
port_hints:
|
|
1041
|
-
pcb_component_id:
|
|
1042
|
-
pcb_port_id:
|
|
1049
|
+
layers: z56.array(layer_ref),
|
|
1050
|
+
port_hints: z56.array(z56.string()).optional(),
|
|
1051
|
+
pcb_component_id: z56.string().optional(),
|
|
1052
|
+
pcb_port_id: z56.string().optional(),
|
|
1043
1053
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1044
1054
|
});
|
|
1045
|
-
var pcb_plated_hole =
|
|
1055
|
+
var pcb_plated_hole = z56.union([
|
|
1046
1056
|
pcb_plated_hole_circle,
|
|
1047
1057
|
pcb_plated_hole_oval,
|
|
1048
1058
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -1056,84 +1066,84 @@ expectTypesMatch(true);
|
|
|
1056
1066
|
expectTypesMatch(true);
|
|
1057
1067
|
|
|
1058
1068
|
// src/pcb/pcb_port.ts
|
|
1059
|
-
import { z as
|
|
1060
|
-
var pcb_port =
|
|
1061
|
-
type:
|
|
1069
|
+
import { z as z57 } from "zod";
|
|
1070
|
+
var pcb_port = z57.object({
|
|
1071
|
+
type: z57.literal("pcb_port"),
|
|
1062
1072
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
1063
|
-
pcb_group_id:
|
|
1064
|
-
subcircuit_id:
|
|
1065
|
-
source_port_id:
|
|
1066
|
-
pcb_component_id:
|
|
1073
|
+
pcb_group_id: z57.string().optional(),
|
|
1074
|
+
subcircuit_id: z57.string().optional(),
|
|
1075
|
+
source_port_id: z57.string(),
|
|
1076
|
+
pcb_component_id: z57.string(),
|
|
1067
1077
|
x: distance,
|
|
1068
1078
|
y: distance,
|
|
1069
|
-
layers:
|
|
1079
|
+
layers: z57.array(layer_ref)
|
|
1070
1080
|
}).describe("Defines a port on the PCB");
|
|
1071
1081
|
expectTypesMatch(true);
|
|
1072
1082
|
|
|
1073
1083
|
// src/pcb/pcb_smtpad.ts
|
|
1074
|
-
import { z as
|
|
1075
|
-
var pcb_smtpad_circle =
|
|
1076
|
-
type:
|
|
1077
|
-
shape:
|
|
1084
|
+
import { z as z58 } from "zod";
|
|
1085
|
+
var pcb_smtpad_circle = z58.object({
|
|
1086
|
+
type: z58.literal("pcb_smtpad"),
|
|
1087
|
+
shape: z58.literal("circle"),
|
|
1078
1088
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1079
|
-
pcb_group_id:
|
|
1080
|
-
subcircuit_id:
|
|
1089
|
+
pcb_group_id: z58.string().optional(),
|
|
1090
|
+
subcircuit_id: z58.string().optional(),
|
|
1081
1091
|
x: distance,
|
|
1082
1092
|
y: distance,
|
|
1083
|
-
radius:
|
|
1093
|
+
radius: z58.number(),
|
|
1084
1094
|
layer: layer_ref,
|
|
1085
|
-
port_hints:
|
|
1086
|
-
pcb_component_id:
|
|
1087
|
-
pcb_port_id:
|
|
1095
|
+
port_hints: z58.array(z58.string()).optional(),
|
|
1096
|
+
pcb_component_id: z58.string().optional(),
|
|
1097
|
+
pcb_port_id: z58.string().optional()
|
|
1088
1098
|
});
|
|
1089
|
-
var pcb_smtpad_rect =
|
|
1090
|
-
type:
|
|
1091
|
-
shape:
|
|
1099
|
+
var pcb_smtpad_rect = z58.object({
|
|
1100
|
+
type: z58.literal("pcb_smtpad"),
|
|
1101
|
+
shape: z58.literal("rect"),
|
|
1092
1102
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1093
|
-
pcb_group_id:
|
|
1094
|
-
subcircuit_id:
|
|
1103
|
+
pcb_group_id: z58.string().optional(),
|
|
1104
|
+
subcircuit_id: z58.string().optional(),
|
|
1095
1105
|
x: distance,
|
|
1096
1106
|
y: distance,
|
|
1097
|
-
width:
|
|
1098
|
-
height:
|
|
1107
|
+
width: z58.number(),
|
|
1108
|
+
height: z58.number(),
|
|
1099
1109
|
layer: layer_ref,
|
|
1100
|
-
port_hints:
|
|
1101
|
-
pcb_component_id:
|
|
1102
|
-
pcb_port_id:
|
|
1110
|
+
port_hints: z58.array(z58.string()).optional(),
|
|
1111
|
+
pcb_component_id: z58.string().optional(),
|
|
1112
|
+
pcb_port_id: z58.string().optional()
|
|
1103
1113
|
});
|
|
1104
|
-
var pcb_smtpad_rotated_rect =
|
|
1105
|
-
type:
|
|
1106
|
-
shape:
|
|
1114
|
+
var pcb_smtpad_rotated_rect = z58.object({
|
|
1115
|
+
type: z58.literal("pcb_smtpad"),
|
|
1116
|
+
shape: z58.literal("rotated_rect"),
|
|
1107
1117
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1108
|
-
pcb_group_id:
|
|
1109
|
-
subcircuit_id:
|
|
1118
|
+
pcb_group_id: z58.string().optional(),
|
|
1119
|
+
subcircuit_id: z58.string().optional(),
|
|
1110
1120
|
x: distance,
|
|
1111
1121
|
y: distance,
|
|
1112
|
-
width:
|
|
1113
|
-
height:
|
|
1122
|
+
width: z58.number(),
|
|
1123
|
+
height: z58.number(),
|
|
1114
1124
|
ccw_rotation: rotation,
|
|
1115
1125
|
layer: layer_ref,
|
|
1116
|
-
port_hints:
|
|
1117
|
-
pcb_component_id:
|
|
1118
|
-
pcb_port_id:
|
|
1126
|
+
port_hints: z58.array(z58.string()).optional(),
|
|
1127
|
+
pcb_component_id: z58.string().optional(),
|
|
1128
|
+
pcb_port_id: z58.string().optional()
|
|
1119
1129
|
});
|
|
1120
|
-
var pcb_smtpad_pill =
|
|
1121
|
-
type:
|
|
1122
|
-
shape:
|
|
1130
|
+
var pcb_smtpad_pill = z58.object({
|
|
1131
|
+
type: z58.literal("pcb_smtpad"),
|
|
1132
|
+
shape: z58.literal("pill"),
|
|
1123
1133
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1124
|
-
pcb_group_id:
|
|
1125
|
-
subcircuit_id:
|
|
1134
|
+
pcb_group_id: z58.string().optional(),
|
|
1135
|
+
subcircuit_id: z58.string().optional(),
|
|
1126
1136
|
x: distance,
|
|
1127
1137
|
y: distance,
|
|
1128
|
-
width:
|
|
1129
|
-
height:
|
|
1130
|
-
radius:
|
|
1138
|
+
width: z58.number(),
|
|
1139
|
+
height: z58.number(),
|
|
1140
|
+
radius: z58.number(),
|
|
1131
1141
|
layer: layer_ref,
|
|
1132
|
-
port_hints:
|
|
1133
|
-
pcb_component_id:
|
|
1134
|
-
pcb_port_id:
|
|
1142
|
+
port_hints: z58.array(z58.string()).optional(),
|
|
1143
|
+
pcb_component_id: z58.string().optional(),
|
|
1144
|
+
pcb_port_id: z58.string().optional()
|
|
1135
1145
|
});
|
|
1136
|
-
var pcb_smtpad =
|
|
1146
|
+
var pcb_smtpad = z58.union([
|
|
1137
1147
|
pcb_smtpad_circle,
|
|
1138
1148
|
pcb_smtpad_rect,
|
|
1139
1149
|
pcb_smtpad_rotated_rect,
|
|
@@ -1145,79 +1155,79 @@ expectTypesMatch(true);
|
|
|
1145
1155
|
expectTypesMatch(true);
|
|
1146
1156
|
|
|
1147
1157
|
// src/pcb/pcb_solder_paste.ts
|
|
1148
|
-
import { z as
|
|
1149
|
-
var pcb_solder_paste_circle =
|
|
1150
|
-
type:
|
|
1151
|
-
shape:
|
|
1158
|
+
import { z as z59 } from "zod";
|
|
1159
|
+
var pcb_solder_paste_circle = z59.object({
|
|
1160
|
+
type: z59.literal("pcb_solder_paste"),
|
|
1161
|
+
shape: z59.literal("circle"),
|
|
1152
1162
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1153
|
-
pcb_group_id:
|
|
1154
|
-
subcircuit_id:
|
|
1163
|
+
pcb_group_id: z59.string().optional(),
|
|
1164
|
+
subcircuit_id: z59.string().optional(),
|
|
1155
1165
|
x: distance,
|
|
1156
1166
|
y: distance,
|
|
1157
|
-
radius:
|
|
1167
|
+
radius: z59.number(),
|
|
1158
1168
|
layer: layer_ref,
|
|
1159
|
-
pcb_component_id:
|
|
1160
|
-
pcb_smtpad_id:
|
|
1169
|
+
pcb_component_id: z59.string().optional(),
|
|
1170
|
+
pcb_smtpad_id: z59.string().optional()
|
|
1161
1171
|
});
|
|
1162
|
-
var pcb_solder_paste_rect =
|
|
1163
|
-
type:
|
|
1164
|
-
shape:
|
|
1172
|
+
var pcb_solder_paste_rect = z59.object({
|
|
1173
|
+
type: z59.literal("pcb_solder_paste"),
|
|
1174
|
+
shape: z59.literal("rect"),
|
|
1165
1175
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1166
|
-
pcb_group_id:
|
|
1167
|
-
subcircuit_id:
|
|
1176
|
+
pcb_group_id: z59.string().optional(),
|
|
1177
|
+
subcircuit_id: z59.string().optional(),
|
|
1168
1178
|
x: distance,
|
|
1169
1179
|
y: distance,
|
|
1170
|
-
width:
|
|
1171
|
-
height:
|
|
1180
|
+
width: z59.number(),
|
|
1181
|
+
height: z59.number(),
|
|
1172
1182
|
layer: layer_ref,
|
|
1173
|
-
pcb_component_id:
|
|
1174
|
-
pcb_smtpad_id:
|
|
1183
|
+
pcb_component_id: z59.string().optional(),
|
|
1184
|
+
pcb_smtpad_id: z59.string().optional()
|
|
1175
1185
|
});
|
|
1176
|
-
var pcb_solder_paste_pill =
|
|
1177
|
-
type:
|
|
1178
|
-
shape:
|
|
1186
|
+
var pcb_solder_paste_pill = z59.object({
|
|
1187
|
+
type: z59.literal("pcb_solder_paste"),
|
|
1188
|
+
shape: z59.literal("pill"),
|
|
1179
1189
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1180
|
-
pcb_group_id:
|
|
1181
|
-
subcircuit_id:
|
|
1190
|
+
pcb_group_id: z59.string().optional(),
|
|
1191
|
+
subcircuit_id: z59.string().optional(),
|
|
1182
1192
|
x: distance,
|
|
1183
1193
|
y: distance,
|
|
1184
|
-
width:
|
|
1185
|
-
height:
|
|
1186
|
-
radius:
|
|
1194
|
+
width: z59.number(),
|
|
1195
|
+
height: z59.number(),
|
|
1196
|
+
radius: z59.number(),
|
|
1187
1197
|
layer: layer_ref,
|
|
1188
|
-
pcb_component_id:
|
|
1189
|
-
pcb_smtpad_id:
|
|
1198
|
+
pcb_component_id: z59.string().optional(),
|
|
1199
|
+
pcb_smtpad_id: z59.string().optional()
|
|
1190
1200
|
});
|
|
1191
|
-
var pcb_solder_paste_rotated_rect =
|
|
1192
|
-
type:
|
|
1193
|
-
shape:
|
|
1201
|
+
var pcb_solder_paste_rotated_rect = z59.object({
|
|
1202
|
+
type: z59.literal("pcb_solder_paste"),
|
|
1203
|
+
shape: z59.literal("rotated_rect"),
|
|
1194
1204
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1195
|
-
pcb_group_id:
|
|
1196
|
-
subcircuit_id:
|
|
1205
|
+
pcb_group_id: z59.string().optional(),
|
|
1206
|
+
subcircuit_id: z59.string().optional(),
|
|
1197
1207
|
x: distance,
|
|
1198
1208
|
y: distance,
|
|
1199
|
-
width:
|
|
1200
|
-
height:
|
|
1209
|
+
width: z59.number(),
|
|
1210
|
+
height: z59.number(),
|
|
1201
1211
|
ccw_rotation: distance,
|
|
1202
1212
|
layer: layer_ref,
|
|
1203
|
-
pcb_component_id:
|
|
1204
|
-
pcb_smtpad_id:
|
|
1213
|
+
pcb_component_id: z59.string().optional(),
|
|
1214
|
+
pcb_smtpad_id: z59.string().optional()
|
|
1205
1215
|
});
|
|
1206
|
-
var pcb_solder_paste_oval =
|
|
1207
|
-
type:
|
|
1208
|
-
shape:
|
|
1216
|
+
var pcb_solder_paste_oval = z59.object({
|
|
1217
|
+
type: z59.literal("pcb_solder_paste"),
|
|
1218
|
+
shape: z59.literal("oval"),
|
|
1209
1219
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1210
|
-
pcb_group_id:
|
|
1211
|
-
subcircuit_id:
|
|
1220
|
+
pcb_group_id: z59.string().optional(),
|
|
1221
|
+
subcircuit_id: z59.string().optional(),
|
|
1212
1222
|
x: distance,
|
|
1213
1223
|
y: distance,
|
|
1214
|
-
width:
|
|
1215
|
-
height:
|
|
1224
|
+
width: z59.number(),
|
|
1225
|
+
height: z59.number(),
|
|
1216
1226
|
layer: layer_ref,
|
|
1217
|
-
pcb_component_id:
|
|
1218
|
-
pcb_smtpad_id:
|
|
1227
|
+
pcb_component_id: z59.string().optional(),
|
|
1228
|
+
pcb_smtpad_id: z59.string().optional()
|
|
1219
1229
|
});
|
|
1220
|
-
var pcb_solder_paste =
|
|
1230
|
+
var pcb_solder_paste = z59.union([
|
|
1221
1231
|
pcb_solder_paste_circle,
|
|
1222
1232
|
pcb_solder_paste_rect,
|
|
1223
1233
|
pcb_solder_paste_pill,
|
|
@@ -1233,95 +1243,95 @@ expectTypesMatch(
|
|
|
1233
1243
|
expectTypesMatch(true);
|
|
1234
1244
|
|
|
1235
1245
|
// src/pcb/pcb_text.ts
|
|
1236
|
-
import { z as
|
|
1237
|
-
var pcb_text =
|
|
1238
|
-
type:
|
|
1246
|
+
import { z as z60 } from "zod";
|
|
1247
|
+
var pcb_text = z60.object({
|
|
1248
|
+
type: z60.literal("pcb_text"),
|
|
1239
1249
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
1240
|
-
pcb_group_id:
|
|
1241
|
-
subcircuit_id:
|
|
1242
|
-
text:
|
|
1250
|
+
pcb_group_id: z60.string().optional(),
|
|
1251
|
+
subcircuit_id: z60.string().optional(),
|
|
1252
|
+
text: z60.string(),
|
|
1243
1253
|
center: point,
|
|
1244
1254
|
layer: layer_ref,
|
|
1245
1255
|
width: length,
|
|
1246
1256
|
height: length,
|
|
1247
|
-
lines:
|
|
1257
|
+
lines: z60.number(),
|
|
1248
1258
|
// @ts-ignore
|
|
1249
|
-
align:
|
|
1259
|
+
align: z60.enum(["bottom-left"])
|
|
1250
1260
|
}).describe("Defines text on the PCB");
|
|
1251
1261
|
expectTypesMatch(true);
|
|
1252
1262
|
|
|
1253
1263
|
// src/pcb/pcb_trace.ts
|
|
1254
|
-
import { z as
|
|
1255
|
-
var pcb_trace_route_point_wire =
|
|
1256
|
-
route_type:
|
|
1264
|
+
import { z as z61 } from "zod";
|
|
1265
|
+
var pcb_trace_route_point_wire = z61.object({
|
|
1266
|
+
route_type: z61.literal("wire"),
|
|
1257
1267
|
x: distance,
|
|
1258
1268
|
y: distance,
|
|
1259
1269
|
width: distance,
|
|
1260
|
-
start_pcb_port_id:
|
|
1261
|
-
end_pcb_port_id:
|
|
1270
|
+
start_pcb_port_id: z61.string().optional(),
|
|
1271
|
+
end_pcb_port_id: z61.string().optional(),
|
|
1262
1272
|
layer: layer_ref
|
|
1263
1273
|
});
|
|
1264
|
-
var pcb_trace_route_point_via =
|
|
1265
|
-
route_type:
|
|
1274
|
+
var pcb_trace_route_point_via = z61.object({
|
|
1275
|
+
route_type: z61.literal("via"),
|
|
1266
1276
|
x: distance,
|
|
1267
1277
|
y: distance,
|
|
1268
1278
|
hole_diameter: distance.optional(),
|
|
1269
1279
|
outer_diameter: distance.optional(),
|
|
1270
|
-
from_layer:
|
|
1271
|
-
to_layer:
|
|
1280
|
+
from_layer: z61.string(),
|
|
1281
|
+
to_layer: z61.string()
|
|
1272
1282
|
});
|
|
1273
|
-
var pcb_trace_route_point =
|
|
1283
|
+
var pcb_trace_route_point = z61.union([
|
|
1274
1284
|
pcb_trace_route_point_wire,
|
|
1275
1285
|
pcb_trace_route_point_via
|
|
1276
1286
|
]);
|
|
1277
|
-
var pcb_trace =
|
|
1278
|
-
type:
|
|
1279
|
-
source_trace_id:
|
|
1280
|
-
pcb_component_id:
|
|
1287
|
+
var pcb_trace = z61.object({
|
|
1288
|
+
type: z61.literal("pcb_trace"),
|
|
1289
|
+
source_trace_id: z61.string().optional(),
|
|
1290
|
+
pcb_component_id: z61.string().optional(),
|
|
1281
1291
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
1282
|
-
pcb_group_id:
|
|
1283
|
-
subcircuit_id:
|
|
1284
|
-
route_thickness_mode:
|
|
1285
|
-
route_order_index:
|
|
1286
|
-
should_round_corners:
|
|
1287
|
-
trace_length:
|
|
1288
|
-
route:
|
|
1292
|
+
pcb_group_id: z61.string().optional(),
|
|
1293
|
+
subcircuit_id: z61.string().optional(),
|
|
1294
|
+
route_thickness_mode: z61.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
1295
|
+
route_order_index: z61.number().optional(),
|
|
1296
|
+
should_round_corners: z61.boolean().optional(),
|
|
1297
|
+
trace_length: z61.number().optional(),
|
|
1298
|
+
route: z61.array(pcb_trace_route_point)
|
|
1289
1299
|
}).describe("Defines a trace on the PCB");
|
|
1290
1300
|
expectTypesMatch(true);
|
|
1291
1301
|
expectTypesMatch(true);
|
|
1292
1302
|
|
|
1293
1303
|
// src/pcb/pcb_trace_error.ts
|
|
1294
|
-
import { z as
|
|
1295
|
-
var pcb_trace_error =
|
|
1296
|
-
type:
|
|
1304
|
+
import { z as z62 } from "zod";
|
|
1305
|
+
var pcb_trace_error = z62.object({
|
|
1306
|
+
type: z62.literal("pcb_trace_error"),
|
|
1297
1307
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
1298
|
-
error_type:
|
|
1299
|
-
message:
|
|
1308
|
+
error_type: z62.literal("pcb_trace_error"),
|
|
1309
|
+
message: z62.string(),
|
|
1300
1310
|
center: point.optional(),
|
|
1301
|
-
pcb_trace_id:
|
|
1302
|
-
source_trace_id:
|
|
1303
|
-
pcb_component_ids:
|
|
1304
|
-
pcb_port_ids:
|
|
1311
|
+
pcb_trace_id: z62.string(),
|
|
1312
|
+
source_trace_id: z62.string(),
|
|
1313
|
+
pcb_component_ids: z62.array(z62.string()),
|
|
1314
|
+
pcb_port_ids: z62.array(z62.string())
|
|
1305
1315
|
}).describe("Defines a trace error on the PCB");
|
|
1306
1316
|
expectTypesMatch(true);
|
|
1307
1317
|
|
|
1308
1318
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
1309
|
-
import { z as
|
|
1310
|
-
var pcb_port_not_matched_error =
|
|
1311
|
-
type:
|
|
1319
|
+
import { z as z63 } from "zod";
|
|
1320
|
+
var pcb_port_not_matched_error = z63.object({
|
|
1321
|
+
type: z63.literal("pcb_port_not_matched_error"),
|
|
1312
1322
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1313
|
-
message:
|
|
1314
|
-
pcb_component_ids:
|
|
1323
|
+
message: z63.string(),
|
|
1324
|
+
pcb_component_ids: z63.array(z63.string())
|
|
1315
1325
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
1316
1326
|
expectTypesMatch(true);
|
|
1317
1327
|
|
|
1318
1328
|
// src/pcb/pcb_via.ts
|
|
1319
|
-
import { z as
|
|
1320
|
-
var pcb_via =
|
|
1321
|
-
type:
|
|
1329
|
+
import { z as z64 } from "zod";
|
|
1330
|
+
var pcb_via = z64.object({
|
|
1331
|
+
type: z64.literal("pcb_via"),
|
|
1322
1332
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
1323
|
-
pcb_group_id:
|
|
1324
|
-
subcircuit_id:
|
|
1333
|
+
pcb_group_id: z64.string().optional(),
|
|
1334
|
+
subcircuit_id: z64.string().optional(),
|
|
1325
1335
|
x: distance,
|
|
1326
1336
|
y: distance,
|
|
1327
1337
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -1330,56 +1340,56 @@ var pcb_via = z63.object({
|
|
|
1330
1340
|
from_layer: layer_ref.optional(),
|
|
1331
1341
|
/** @deprecated */
|
|
1332
1342
|
to_layer: layer_ref.optional(),
|
|
1333
|
-
layers:
|
|
1334
|
-
pcb_trace_id:
|
|
1343
|
+
layers: z64.array(layer_ref),
|
|
1344
|
+
pcb_trace_id: z64.string().optional()
|
|
1335
1345
|
}).describe("Defines a via on the PCB");
|
|
1336
1346
|
expectTypesMatch(true);
|
|
1337
1347
|
|
|
1338
1348
|
// src/pcb/pcb_board.ts
|
|
1339
|
-
import { z as
|
|
1340
|
-
var pcb_board =
|
|
1341
|
-
type:
|
|
1349
|
+
import { z as z65 } from "zod";
|
|
1350
|
+
var pcb_board = z65.object({
|
|
1351
|
+
type: z65.literal("pcb_board"),
|
|
1342
1352
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
1343
|
-
is_subcircuit:
|
|
1344
|
-
subcircuit_id:
|
|
1353
|
+
is_subcircuit: z65.boolean().optional(),
|
|
1354
|
+
subcircuit_id: z65.string().optional(),
|
|
1345
1355
|
width: length,
|
|
1346
1356
|
height: length,
|
|
1347
1357
|
center: point,
|
|
1348
1358
|
thickness: length.optional().default(1.4),
|
|
1349
|
-
num_layers:
|
|
1350
|
-
outline:
|
|
1351
|
-
material:
|
|
1359
|
+
num_layers: z65.number().optional().default(4),
|
|
1360
|
+
outline: z65.array(point).optional(),
|
|
1361
|
+
material: z65.enum(["fr4", "fr1"]).default("fr4")
|
|
1352
1362
|
}).describe("Defines the board outline of the PCB");
|
|
1353
1363
|
expectTypesMatch(true);
|
|
1354
1364
|
|
|
1355
1365
|
// src/pcb/pcb_placement_error.ts
|
|
1356
|
-
import { z as
|
|
1357
|
-
var pcb_placement_error =
|
|
1358
|
-
type:
|
|
1366
|
+
import { z as z66 } from "zod";
|
|
1367
|
+
var pcb_placement_error = z66.object({
|
|
1368
|
+
type: z66.literal("pcb_placement_error"),
|
|
1359
1369
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
1360
|
-
message:
|
|
1370
|
+
message: z66.string()
|
|
1361
1371
|
}).describe("Defines a placement error on the PCB");
|
|
1362
1372
|
expectTypesMatch(true);
|
|
1363
1373
|
|
|
1364
1374
|
// src/pcb/pcb_trace_hint.ts
|
|
1365
|
-
import { z as
|
|
1366
|
-
var pcb_trace_hint =
|
|
1367
|
-
type:
|
|
1375
|
+
import { z as z67 } from "zod";
|
|
1376
|
+
var pcb_trace_hint = z67.object({
|
|
1377
|
+
type: z67.literal("pcb_trace_hint"),
|
|
1368
1378
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
1369
|
-
pcb_port_id:
|
|
1370
|
-
pcb_component_id:
|
|
1371
|
-
route:
|
|
1379
|
+
pcb_port_id: z67.string(),
|
|
1380
|
+
pcb_component_id: z67.string(),
|
|
1381
|
+
route: z67.array(route_hint_point)
|
|
1372
1382
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
1373
1383
|
expectTypesMatch(true);
|
|
1374
1384
|
|
|
1375
1385
|
// src/pcb/pcb_silkscreen_line.ts
|
|
1376
|
-
import { z as
|
|
1377
|
-
var pcb_silkscreen_line =
|
|
1378
|
-
type:
|
|
1386
|
+
import { z as z68 } from "zod";
|
|
1387
|
+
var pcb_silkscreen_line = z68.object({
|
|
1388
|
+
type: z68.literal("pcb_silkscreen_line"),
|
|
1379
1389
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
1380
|
-
pcb_component_id:
|
|
1381
|
-
pcb_group_id:
|
|
1382
|
-
subcircuit_id:
|
|
1390
|
+
pcb_component_id: z68.string(),
|
|
1391
|
+
pcb_group_id: z68.string().optional(),
|
|
1392
|
+
subcircuit_id: z68.string().optional(),
|
|
1383
1393
|
stroke_width: distance.default("0.1mm"),
|
|
1384
1394
|
x1: distance,
|
|
1385
1395
|
y1: distance,
|
|
@@ -1390,46 +1400,46 @@ var pcb_silkscreen_line = z67.object({
|
|
|
1390
1400
|
expectTypesMatch(true);
|
|
1391
1401
|
|
|
1392
1402
|
// src/pcb/pcb_silkscreen_path.ts
|
|
1393
|
-
import { z as
|
|
1394
|
-
var pcb_silkscreen_path =
|
|
1395
|
-
type:
|
|
1403
|
+
import { z as z69 } from "zod";
|
|
1404
|
+
var pcb_silkscreen_path = z69.object({
|
|
1405
|
+
type: z69.literal("pcb_silkscreen_path"),
|
|
1396
1406
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
1397
|
-
pcb_component_id:
|
|
1398
|
-
pcb_group_id:
|
|
1399
|
-
subcircuit_id:
|
|
1407
|
+
pcb_component_id: z69.string(),
|
|
1408
|
+
pcb_group_id: z69.string().optional(),
|
|
1409
|
+
subcircuit_id: z69.string().optional(),
|
|
1400
1410
|
layer: visible_layer,
|
|
1401
|
-
route:
|
|
1411
|
+
route: z69.array(point),
|
|
1402
1412
|
stroke_width: length
|
|
1403
1413
|
}).describe("Defines a silkscreen path on the PCB");
|
|
1404
1414
|
expectTypesMatch(true);
|
|
1405
1415
|
|
|
1406
1416
|
// src/pcb/pcb_silkscreen_text.ts
|
|
1407
|
-
import { z as
|
|
1408
|
-
var pcb_silkscreen_text =
|
|
1409
|
-
type:
|
|
1417
|
+
import { z as z70 } from "zod";
|
|
1418
|
+
var pcb_silkscreen_text = z70.object({
|
|
1419
|
+
type: z70.literal("pcb_silkscreen_text"),
|
|
1410
1420
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
1411
|
-
pcb_group_id:
|
|
1412
|
-
subcircuit_id:
|
|
1413
|
-
font:
|
|
1421
|
+
pcb_group_id: z70.string().optional(),
|
|
1422
|
+
subcircuit_id: z70.string().optional(),
|
|
1423
|
+
font: z70.literal("tscircuit2024").default("tscircuit2024"),
|
|
1414
1424
|
font_size: distance.default("0.2mm"),
|
|
1415
|
-
pcb_component_id:
|
|
1416
|
-
text:
|
|
1417
|
-
ccw_rotation:
|
|
1425
|
+
pcb_component_id: z70.string(),
|
|
1426
|
+
text: z70.string(),
|
|
1427
|
+
ccw_rotation: z70.number().optional(),
|
|
1418
1428
|
layer: layer_ref,
|
|
1419
|
-
is_mirrored:
|
|
1429
|
+
is_mirrored: z70.boolean().default(false).optional(),
|
|
1420
1430
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1421
1431
|
anchor_alignment: ninePointAnchor.default("center")
|
|
1422
1432
|
}).describe("Defines silkscreen text on the PCB");
|
|
1423
1433
|
expectTypesMatch(true);
|
|
1424
1434
|
|
|
1425
1435
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
1426
|
-
import { z as
|
|
1427
|
-
var pcb_silkscreen_rect =
|
|
1428
|
-
type:
|
|
1436
|
+
import { z as z71 } from "zod";
|
|
1437
|
+
var pcb_silkscreen_rect = z71.object({
|
|
1438
|
+
type: z71.literal("pcb_silkscreen_rect"),
|
|
1429
1439
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
1430
|
-
pcb_component_id:
|
|
1431
|
-
pcb_group_id:
|
|
1432
|
-
subcircuit_id:
|
|
1440
|
+
pcb_component_id: z71.string(),
|
|
1441
|
+
pcb_group_id: z71.string().optional(),
|
|
1442
|
+
subcircuit_id: z71.string().optional(),
|
|
1433
1443
|
center: point,
|
|
1434
1444
|
width: length,
|
|
1435
1445
|
height: length,
|
|
@@ -1439,15 +1449,15 @@ var pcb_silkscreen_rect = z70.object({
|
|
|
1439
1449
|
expectTypesMatch(true);
|
|
1440
1450
|
|
|
1441
1451
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
1442
|
-
import { z as
|
|
1443
|
-
var pcb_silkscreen_circle =
|
|
1444
|
-
type:
|
|
1452
|
+
import { z as z72 } from "zod";
|
|
1453
|
+
var pcb_silkscreen_circle = z72.object({
|
|
1454
|
+
type: z72.literal("pcb_silkscreen_circle"),
|
|
1445
1455
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
1446
1456
|
"pcb_silkscreen_circle"
|
|
1447
1457
|
),
|
|
1448
|
-
pcb_component_id:
|
|
1449
|
-
pcb_group_id:
|
|
1450
|
-
subcircuit_id:
|
|
1458
|
+
pcb_component_id: z72.string(),
|
|
1459
|
+
pcb_group_id: z72.string().optional(),
|
|
1460
|
+
subcircuit_id: z72.string().optional(),
|
|
1451
1461
|
center: point,
|
|
1452
1462
|
radius: length,
|
|
1453
1463
|
layer: visible_layer,
|
|
@@ -1456,13 +1466,13 @@ var pcb_silkscreen_circle = z71.object({
|
|
|
1456
1466
|
expectTypesMatch(true);
|
|
1457
1467
|
|
|
1458
1468
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
1459
|
-
import { z as
|
|
1460
|
-
var pcb_silkscreen_oval =
|
|
1461
|
-
type:
|
|
1469
|
+
import { z as z73 } from "zod";
|
|
1470
|
+
var pcb_silkscreen_oval = z73.object({
|
|
1471
|
+
type: z73.literal("pcb_silkscreen_oval"),
|
|
1462
1472
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
1463
|
-
pcb_component_id:
|
|
1464
|
-
pcb_group_id:
|
|
1465
|
-
subcircuit_id:
|
|
1473
|
+
pcb_component_id: z73.string(),
|
|
1474
|
+
pcb_group_id: z73.string().optional(),
|
|
1475
|
+
subcircuit_id: z73.string().optional(),
|
|
1466
1476
|
center: point,
|
|
1467
1477
|
radius_x: distance,
|
|
1468
1478
|
radius_y: distance,
|
|
@@ -1471,86 +1481,86 @@ var pcb_silkscreen_oval = z72.object({
|
|
|
1471
1481
|
expectTypesMatch(true);
|
|
1472
1482
|
|
|
1473
1483
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
1474
|
-
import { z as
|
|
1475
|
-
var pcb_fabrication_note_text =
|
|
1476
|
-
type:
|
|
1484
|
+
import { z as z74 } from "zod";
|
|
1485
|
+
var pcb_fabrication_note_text = z74.object({
|
|
1486
|
+
type: z74.literal("pcb_fabrication_note_text"),
|
|
1477
1487
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
1478
1488
|
"pcb_fabrication_note_text"
|
|
1479
1489
|
),
|
|
1480
|
-
subcircuit_id:
|
|
1481
|
-
pcb_group_id:
|
|
1482
|
-
font:
|
|
1490
|
+
subcircuit_id: z74.string().optional(),
|
|
1491
|
+
pcb_group_id: z74.string().optional(),
|
|
1492
|
+
font: z74.literal("tscircuit2024").default("tscircuit2024"),
|
|
1483
1493
|
font_size: distance.default("1mm"),
|
|
1484
|
-
pcb_component_id:
|
|
1485
|
-
text:
|
|
1494
|
+
pcb_component_id: z74.string(),
|
|
1495
|
+
text: z74.string(),
|
|
1486
1496
|
layer: visible_layer,
|
|
1487
1497
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1488
|
-
anchor_alignment:
|
|
1489
|
-
color:
|
|
1498
|
+
anchor_alignment: z74.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
1499
|
+
color: z74.string().optional()
|
|
1490
1500
|
}).describe(
|
|
1491
1501
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
1492
1502
|
);
|
|
1493
1503
|
expectTypesMatch(true);
|
|
1494
1504
|
|
|
1495
1505
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
1496
|
-
import { z as
|
|
1497
|
-
var pcb_fabrication_note_path =
|
|
1498
|
-
type:
|
|
1506
|
+
import { z as z75 } from "zod";
|
|
1507
|
+
var pcb_fabrication_note_path = z75.object({
|
|
1508
|
+
type: z75.literal("pcb_fabrication_note_path"),
|
|
1499
1509
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
1500
1510
|
"pcb_fabrication_note_path"
|
|
1501
1511
|
),
|
|
1502
|
-
pcb_component_id:
|
|
1503
|
-
subcircuit_id:
|
|
1512
|
+
pcb_component_id: z75.string(),
|
|
1513
|
+
subcircuit_id: z75.string().optional(),
|
|
1504
1514
|
layer: layer_ref,
|
|
1505
|
-
route:
|
|
1515
|
+
route: z75.array(point),
|
|
1506
1516
|
stroke_width: length,
|
|
1507
|
-
color:
|
|
1517
|
+
color: z75.string().optional()
|
|
1508
1518
|
}).describe(
|
|
1509
1519
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
1510
1520
|
);
|
|
1511
1521
|
expectTypesMatch(true);
|
|
1512
1522
|
|
|
1513
1523
|
// src/pcb/pcb_keepout.ts
|
|
1514
|
-
import { z as
|
|
1515
|
-
var pcb_keepout =
|
|
1516
|
-
type:
|
|
1517
|
-
shape:
|
|
1518
|
-
pcb_group_id:
|
|
1519
|
-
subcircuit_id:
|
|
1524
|
+
import { z as z76 } from "zod";
|
|
1525
|
+
var pcb_keepout = z76.object({
|
|
1526
|
+
type: z76.literal("pcb_keepout"),
|
|
1527
|
+
shape: z76.literal("rect"),
|
|
1528
|
+
pcb_group_id: z76.string().optional(),
|
|
1529
|
+
subcircuit_id: z76.string().optional(),
|
|
1520
1530
|
center: point,
|
|
1521
1531
|
width: distance,
|
|
1522
1532
|
height: distance,
|
|
1523
|
-
pcb_keepout_id:
|
|
1524
|
-
layers:
|
|
1533
|
+
pcb_keepout_id: z76.string(),
|
|
1534
|
+
layers: z76.array(z76.string()),
|
|
1525
1535
|
// Specify layers where the keepout applies
|
|
1526
|
-
description:
|
|
1536
|
+
description: z76.string().optional()
|
|
1527
1537
|
// Optional description of the keepout
|
|
1528
1538
|
}).or(
|
|
1529
|
-
|
|
1530
|
-
type:
|
|
1531
|
-
shape:
|
|
1532
|
-
pcb_group_id:
|
|
1533
|
-
subcircuit_id:
|
|
1539
|
+
z76.object({
|
|
1540
|
+
type: z76.literal("pcb_keepout"),
|
|
1541
|
+
shape: z76.literal("circle"),
|
|
1542
|
+
pcb_group_id: z76.string().optional(),
|
|
1543
|
+
subcircuit_id: z76.string().optional(),
|
|
1534
1544
|
center: point,
|
|
1535
1545
|
radius: distance,
|
|
1536
|
-
pcb_keepout_id:
|
|
1537
|
-
layers:
|
|
1546
|
+
pcb_keepout_id: z76.string(),
|
|
1547
|
+
layers: z76.array(z76.string()),
|
|
1538
1548
|
// Specify layers where the keepout applies
|
|
1539
|
-
description:
|
|
1549
|
+
description: z76.string().optional()
|
|
1540
1550
|
// Optional description of the keepout
|
|
1541
1551
|
})
|
|
1542
1552
|
);
|
|
1543
1553
|
|
|
1544
1554
|
// src/pcb/pcb_cutout.ts
|
|
1545
|
-
import { z as
|
|
1546
|
-
var pcb_cutout_base =
|
|
1547
|
-
type:
|
|
1555
|
+
import { z as z77 } from "zod";
|
|
1556
|
+
var pcb_cutout_base = z77.object({
|
|
1557
|
+
type: z77.literal("pcb_cutout"),
|
|
1548
1558
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
1549
|
-
pcb_group_id:
|
|
1550
|
-
subcircuit_id:
|
|
1559
|
+
pcb_group_id: z77.string().optional(),
|
|
1560
|
+
subcircuit_id: z77.string().optional()
|
|
1551
1561
|
});
|
|
1552
1562
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
1553
|
-
shape:
|
|
1563
|
+
shape: z77.literal("rect"),
|
|
1554
1564
|
center: point,
|
|
1555
1565
|
width: length,
|
|
1556
1566
|
height: length,
|
|
@@ -1558,17 +1568,17 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
1558
1568
|
});
|
|
1559
1569
|
expectTypesMatch(true);
|
|
1560
1570
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
1561
|
-
shape:
|
|
1571
|
+
shape: z77.literal("circle"),
|
|
1562
1572
|
center: point,
|
|
1563
1573
|
radius: length
|
|
1564
1574
|
});
|
|
1565
1575
|
expectTypesMatch(true);
|
|
1566
1576
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
1567
|
-
shape:
|
|
1568
|
-
points:
|
|
1577
|
+
shape: z77.literal("polygon"),
|
|
1578
|
+
points: z77.array(point)
|
|
1569
1579
|
});
|
|
1570
1580
|
expectTypesMatch(true);
|
|
1571
|
-
var pcb_cutout =
|
|
1581
|
+
var pcb_cutout = z77.discriminatedUnion("shape", [
|
|
1572
1582
|
pcb_cutout_rect,
|
|
1573
1583
|
pcb_cutout_circle,
|
|
1574
1584
|
pcb_cutout_polygon
|
|
@@ -1576,87 +1586,87 @@ var pcb_cutout = z76.discriminatedUnion("shape", [
|
|
|
1576
1586
|
expectTypesMatch(true);
|
|
1577
1587
|
|
|
1578
1588
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
1579
|
-
import { z as
|
|
1580
|
-
var pcb_missing_footprint_error =
|
|
1581
|
-
type:
|
|
1589
|
+
import { z as z78 } from "zod";
|
|
1590
|
+
var pcb_missing_footprint_error = z78.object({
|
|
1591
|
+
type: z78.literal("pcb_missing_footprint_error"),
|
|
1582
1592
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
1583
1593
|
"pcb_missing_footprint_error"
|
|
1584
1594
|
),
|
|
1585
|
-
pcb_group_id:
|
|
1586
|
-
subcircuit_id:
|
|
1587
|
-
error_type:
|
|
1588
|
-
source_component_id:
|
|
1589
|
-
message:
|
|
1595
|
+
pcb_group_id: z78.string().optional(),
|
|
1596
|
+
subcircuit_id: z78.string().optional(),
|
|
1597
|
+
error_type: z78.literal("pcb_missing_footprint_error"),
|
|
1598
|
+
source_component_id: z78.string(),
|
|
1599
|
+
message: z78.string()
|
|
1590
1600
|
}).describe("Defines a missing footprint error on the PCB");
|
|
1591
1601
|
expectTypesMatch(
|
|
1592
1602
|
true
|
|
1593
1603
|
);
|
|
1594
1604
|
|
|
1595
1605
|
// src/pcb/pcb_group.ts
|
|
1596
|
-
import { z as
|
|
1597
|
-
var pcb_group =
|
|
1598
|
-
type:
|
|
1606
|
+
import { z as z79 } from "zod";
|
|
1607
|
+
var pcb_group = z79.object({
|
|
1608
|
+
type: z79.literal("pcb_group"),
|
|
1599
1609
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
1600
|
-
source_group_id:
|
|
1601
|
-
is_subcircuit:
|
|
1602
|
-
subcircuit_id:
|
|
1610
|
+
source_group_id: z79.string(),
|
|
1611
|
+
is_subcircuit: z79.boolean().optional(),
|
|
1612
|
+
subcircuit_id: z79.string().optional(),
|
|
1603
1613
|
width: length,
|
|
1604
1614
|
height: length,
|
|
1605
1615
|
center: point,
|
|
1606
|
-
pcb_component_ids:
|
|
1607
|
-
name:
|
|
1608
|
-
description:
|
|
1616
|
+
pcb_component_ids: z79.array(z79.string()),
|
|
1617
|
+
name: z79.string().optional(),
|
|
1618
|
+
description: z79.string().optional()
|
|
1609
1619
|
}).describe("Defines a group of components on the PCB");
|
|
1610
1620
|
expectTypesMatch(true);
|
|
1611
1621
|
|
|
1612
1622
|
// src/pcb/pcb_autorouting_error.ts
|
|
1613
|
-
import { z as
|
|
1614
|
-
var pcb_autorouting_error =
|
|
1615
|
-
type:
|
|
1623
|
+
import { z as z80 } from "zod";
|
|
1624
|
+
var pcb_autorouting_error = z80.object({
|
|
1625
|
+
type: z80.literal("pcb_autorouting_error"),
|
|
1616
1626
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
1617
|
-
message:
|
|
1627
|
+
message: z80.string()
|
|
1618
1628
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
1619
1629
|
expectTypesMatch(true);
|
|
1620
1630
|
|
|
1621
1631
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
1622
|
-
import { z as
|
|
1623
|
-
var pcb_manual_edit_conflict_warning =
|
|
1624
|
-
type:
|
|
1632
|
+
import { z as z81 } from "zod";
|
|
1633
|
+
var pcb_manual_edit_conflict_warning = z81.object({
|
|
1634
|
+
type: z81.literal("pcb_manual_edit_conflict_warning"),
|
|
1625
1635
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1626
1636
|
"pcb_manual_edit_conflict_warning"
|
|
1627
1637
|
),
|
|
1628
|
-
message:
|
|
1629
|
-
pcb_component_id:
|
|
1630
|
-
pcb_group_id:
|
|
1631
|
-
subcircuit_id:
|
|
1632
|
-
source_component_id:
|
|
1638
|
+
message: z81.string(),
|
|
1639
|
+
pcb_component_id: z81.string(),
|
|
1640
|
+
pcb_group_id: z81.string().optional(),
|
|
1641
|
+
subcircuit_id: z81.string().optional(),
|
|
1642
|
+
source_component_id: z81.string()
|
|
1633
1643
|
}).describe(
|
|
1634
1644
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
1635
1645
|
);
|
|
1636
1646
|
expectTypesMatch(true);
|
|
1637
1647
|
|
|
1638
1648
|
// src/cad/cad_component.ts
|
|
1639
|
-
import { z as
|
|
1640
|
-
var cad_component =
|
|
1641
|
-
type:
|
|
1642
|
-
cad_component_id:
|
|
1643
|
-
pcb_component_id:
|
|
1644
|
-
source_component_id:
|
|
1649
|
+
import { z as z82 } from "zod";
|
|
1650
|
+
var cad_component = z82.object({
|
|
1651
|
+
type: z82.literal("cad_component"),
|
|
1652
|
+
cad_component_id: z82.string(),
|
|
1653
|
+
pcb_component_id: z82.string(),
|
|
1654
|
+
source_component_id: z82.string(),
|
|
1645
1655
|
position: point3,
|
|
1646
1656
|
rotation: point3.optional(),
|
|
1647
1657
|
size: point3.optional(),
|
|
1648
1658
|
layer: layer_ref.optional(),
|
|
1649
1659
|
// These are all ways to generate/load the 3d model
|
|
1650
|
-
footprinter_string:
|
|
1651
|
-
model_obj_url:
|
|
1652
|
-
model_stl_url:
|
|
1653
|
-
model_3mf_url:
|
|
1654
|
-
model_jscad:
|
|
1660
|
+
footprinter_string: z82.string().optional(),
|
|
1661
|
+
model_obj_url: z82.string().optional(),
|
|
1662
|
+
model_stl_url: z82.string().optional(),
|
|
1663
|
+
model_3mf_url: z82.string().optional(),
|
|
1664
|
+
model_jscad: z82.any().optional()
|
|
1655
1665
|
}).describe("Defines a component on the PCB");
|
|
1656
1666
|
|
|
1657
1667
|
// src/any_circuit_element.ts
|
|
1658
|
-
import { z as
|
|
1659
|
-
var any_circuit_element =
|
|
1668
|
+
import { z as z83 } from "zod";
|
|
1669
|
+
var any_circuit_element = z83.union([
|
|
1660
1670
|
source_trace,
|
|
1661
1671
|
source_port,
|
|
1662
1672
|
any_source_component,
|