circuit-json 0.0.333 → 0.0.335
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 +15 -6
- package/dist/index.d.mts +169 -12
- package/dist/index.mjs +1299 -1290
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -378,77 +378,84 @@ var source_simple_diode = source_component_base.extend({
|
|
|
378
378
|
});
|
|
379
379
|
expectTypesMatch(true);
|
|
380
380
|
|
|
381
|
-
// src/source/
|
|
381
|
+
// src/source/source_simple_fiducial.ts
|
|
382
382
|
import { z as z12 } from "zod";
|
|
383
|
+
var source_simple_fiducial = source_component_base.extend({
|
|
384
|
+
ftype: z12.literal("simple_fiducial")
|
|
385
|
+
});
|
|
386
|
+
expectTypesMatch(true);
|
|
387
|
+
|
|
388
|
+
// src/source/source_simple_led.ts
|
|
389
|
+
import { z as z13 } from "zod";
|
|
383
390
|
var source_simple_led = source_simple_diode.extend({
|
|
384
|
-
ftype:
|
|
385
|
-
color:
|
|
386
|
-
wavelength:
|
|
391
|
+
ftype: z13.literal("simple_led"),
|
|
392
|
+
color: z13.string().optional(),
|
|
393
|
+
wavelength: z13.string().optional()
|
|
387
394
|
});
|
|
388
395
|
expectTypesMatch(true);
|
|
389
396
|
|
|
390
397
|
// src/source/source_simple_ground.ts
|
|
391
|
-
import { z as
|
|
398
|
+
import { z as z14 } from "zod";
|
|
392
399
|
var source_simple_ground = source_component_base.extend({
|
|
393
|
-
ftype:
|
|
400
|
+
ftype: z14.literal("simple_ground")
|
|
394
401
|
});
|
|
395
402
|
expectTypesMatch(true);
|
|
396
403
|
|
|
397
404
|
// src/source/source_simple_chip.ts
|
|
398
|
-
import { z as
|
|
405
|
+
import { z as z15 } from "zod";
|
|
399
406
|
var source_simple_chip = source_component_base.extend({
|
|
400
|
-
ftype:
|
|
407
|
+
ftype: z15.literal("simple_chip")
|
|
401
408
|
});
|
|
402
409
|
expectTypesMatch(true);
|
|
403
410
|
|
|
404
411
|
// src/source/source_simple_power_source.ts
|
|
405
|
-
import { z as
|
|
412
|
+
import { z as z16 } from "zod";
|
|
406
413
|
var source_simple_power_source = source_component_base.extend({
|
|
407
|
-
ftype:
|
|
414
|
+
ftype: z16.literal("simple_power_source"),
|
|
408
415
|
voltage
|
|
409
416
|
});
|
|
410
417
|
expectTypesMatch(true);
|
|
411
418
|
|
|
412
419
|
// src/source/any_source_component.ts
|
|
413
|
-
import { z as
|
|
420
|
+
import { z as z38 } from "zod";
|
|
414
421
|
|
|
415
422
|
// src/source/source_simple_fuse.ts
|
|
416
|
-
import { z as
|
|
423
|
+
import { z as z17 } from "zod";
|
|
417
424
|
var source_simple_fuse = source_component_base.extend({
|
|
418
|
-
ftype:
|
|
419
|
-
current_rating_amps:
|
|
420
|
-
voltage_rating_volts:
|
|
425
|
+
ftype: z17.literal("simple_fuse"),
|
|
426
|
+
current_rating_amps: z17.number().describe("Nominal current in amps the fuse is rated for"),
|
|
427
|
+
voltage_rating_volts: z17.number().describe("Voltage rating in volts, e.g. \xB15V would be 5")
|
|
421
428
|
});
|
|
422
429
|
expectTypesMatch(true);
|
|
423
430
|
|
|
424
431
|
// src/source/source_simple_battery.ts
|
|
425
|
-
import { z as
|
|
432
|
+
import { z as z18 } from "zod";
|
|
426
433
|
var source_simple_battery = source_component_base.extend({
|
|
427
|
-
ftype:
|
|
434
|
+
ftype: z18.literal("simple_battery"),
|
|
428
435
|
capacity: battery_capacity
|
|
429
436
|
});
|
|
430
437
|
expectTypesMatch(true);
|
|
431
438
|
|
|
432
439
|
// src/source/source_simple_inductor.ts
|
|
433
|
-
import { z as
|
|
440
|
+
import { z as z19 } from "zod";
|
|
434
441
|
var source_simple_inductor = source_component_base.extend({
|
|
435
|
-
ftype:
|
|
442
|
+
ftype: z19.literal("simple_inductor"),
|
|
436
443
|
inductance,
|
|
437
|
-
max_current_rating:
|
|
444
|
+
max_current_rating: z19.number().optional()
|
|
438
445
|
});
|
|
439
446
|
expectTypesMatch(true);
|
|
440
447
|
|
|
441
448
|
// src/source/source_simple_push_button.ts
|
|
442
|
-
import { z as
|
|
449
|
+
import { z as z20 } from "zod";
|
|
443
450
|
var source_simple_push_button = source_component_base.extend({
|
|
444
|
-
ftype:
|
|
451
|
+
ftype: z20.literal("simple_push_button")
|
|
445
452
|
});
|
|
446
453
|
expectTypesMatch(true);
|
|
447
454
|
|
|
448
455
|
// src/source/source_simple_potentiometer.ts
|
|
449
|
-
import { z as
|
|
456
|
+
import { z as z21 } from "zod";
|
|
450
457
|
var source_simple_potentiometer = source_component_base.extend({
|
|
451
|
-
ftype:
|
|
458
|
+
ftype: z21.literal("simple_potentiometer"),
|
|
452
459
|
max_resistance: resistance
|
|
453
460
|
});
|
|
454
461
|
expectTypesMatch(
|
|
@@ -456,34 +463,34 @@ expectTypesMatch(
|
|
|
456
463
|
);
|
|
457
464
|
|
|
458
465
|
// src/source/source_simple_crystal.ts
|
|
459
|
-
import { z as
|
|
466
|
+
import { z as z22 } from "zod";
|
|
460
467
|
var source_simple_crystal = source_component_base.extend({
|
|
461
|
-
ftype:
|
|
462
|
-
frequency:
|
|
463
|
-
load_capacitance:
|
|
468
|
+
ftype: z22.literal("simple_crystal"),
|
|
469
|
+
frequency: z22.number().describe("Frequency in Hz"),
|
|
470
|
+
load_capacitance: z22.number().optional().describe("Load capacitance in pF")
|
|
464
471
|
});
|
|
465
472
|
expectTypesMatch(true);
|
|
466
473
|
|
|
467
474
|
// src/source/source_simple_pin_header.ts
|
|
468
|
-
import { z as
|
|
475
|
+
import { z as z23 } from "zod";
|
|
469
476
|
var source_simple_pin_header = source_component_base.extend({
|
|
470
|
-
ftype:
|
|
471
|
-
pin_count:
|
|
472
|
-
gender:
|
|
477
|
+
ftype: z23.literal("simple_pin_header"),
|
|
478
|
+
pin_count: z23.number(),
|
|
479
|
+
gender: z23.enum(["male", "female"]).optional().default("male")
|
|
473
480
|
});
|
|
474
481
|
expectTypesMatch(true);
|
|
475
482
|
|
|
476
483
|
// src/source/source_simple_pinout.ts
|
|
477
|
-
import { z as
|
|
484
|
+
import { z as z24 } from "zod";
|
|
478
485
|
var source_simple_pinout = source_component_base.extend({
|
|
479
|
-
ftype:
|
|
486
|
+
ftype: z24.literal("simple_pinout")
|
|
480
487
|
});
|
|
481
488
|
expectTypesMatch(true);
|
|
482
489
|
|
|
483
490
|
// src/source/source_simple_resonator.ts
|
|
484
|
-
import { z as
|
|
491
|
+
import { z as z25 } from "zod";
|
|
485
492
|
var source_simple_resonator = source_component_base.extend({
|
|
486
|
-
ftype:
|
|
493
|
+
ftype: z25.literal("simple_resonator"),
|
|
487
494
|
load_capacitance: capacitance,
|
|
488
495
|
equivalent_series_resistance: resistance.optional(),
|
|
489
496
|
frequency
|
|
@@ -491,161 +498,162 @@ var source_simple_resonator = source_component_base.extend({
|
|
|
491
498
|
expectTypesMatch(true);
|
|
492
499
|
|
|
493
500
|
// src/source/source_simple_transistor.ts
|
|
494
|
-
import { z as
|
|
501
|
+
import { z as z26 } from "zod";
|
|
495
502
|
var source_simple_transistor = source_component_base.extend({
|
|
496
|
-
ftype:
|
|
497
|
-
transistor_type:
|
|
503
|
+
ftype: z26.literal("simple_transistor"),
|
|
504
|
+
transistor_type: z26.enum(["npn", "pnp"])
|
|
498
505
|
});
|
|
499
506
|
expectTypesMatch(true);
|
|
500
507
|
|
|
501
508
|
// src/source/source_simple_test_point.ts
|
|
502
|
-
import { z as
|
|
509
|
+
import { z as z27 } from "zod";
|
|
503
510
|
var source_simple_test_point = source_component_base.extend({
|
|
504
|
-
ftype:
|
|
505
|
-
footprint_variant:
|
|
506
|
-
pad_shape:
|
|
507
|
-
pad_diameter:
|
|
508
|
-
hole_diameter:
|
|
509
|
-
width:
|
|
510
|
-
height:
|
|
511
|
+
ftype: z27.literal("simple_test_point"),
|
|
512
|
+
footprint_variant: z27.enum(["pad", "through_hole"]).optional(),
|
|
513
|
+
pad_shape: z27.enum(["rect", "circle"]).optional(),
|
|
514
|
+
pad_diameter: z27.union([z27.number(), z27.string()]).optional(),
|
|
515
|
+
hole_diameter: z27.union([z27.number(), z27.string()]).optional(),
|
|
516
|
+
width: z27.union([z27.number(), z27.string()]).optional(),
|
|
517
|
+
height: z27.union([z27.number(), z27.string()]).optional()
|
|
511
518
|
});
|
|
512
519
|
expectTypesMatch(true);
|
|
513
520
|
|
|
514
521
|
// src/source/source_simple_mosfet.ts
|
|
515
|
-
import { z as
|
|
522
|
+
import { z as z28 } from "zod";
|
|
516
523
|
var source_simple_mosfet = source_component_base.extend({
|
|
517
|
-
ftype:
|
|
518
|
-
channel_type:
|
|
519
|
-
mosfet_mode:
|
|
524
|
+
ftype: z28.literal("simple_mosfet"),
|
|
525
|
+
channel_type: z28.enum(["n", "p"]),
|
|
526
|
+
mosfet_mode: z28.enum(["enhancement", "depletion"])
|
|
520
527
|
});
|
|
521
528
|
expectTypesMatch(true);
|
|
522
529
|
|
|
523
530
|
// src/source/source_simple_switch.ts
|
|
524
|
-
import { z as
|
|
531
|
+
import { z as z29 } from "zod";
|
|
525
532
|
var source_simple_switch = source_component_base.extend({
|
|
526
|
-
ftype:
|
|
533
|
+
ftype: z29.literal("simple_switch")
|
|
527
534
|
});
|
|
528
535
|
expectTypesMatch(true);
|
|
529
536
|
|
|
530
537
|
// src/source/source_project_metadata.ts
|
|
531
|
-
import { z as
|
|
532
|
-
var source_project_metadata =
|
|
533
|
-
type:
|
|
534
|
-
name:
|
|
535
|
-
software_used_string:
|
|
536
|
-
project_url:
|
|
538
|
+
import { z as z30 } from "zod";
|
|
539
|
+
var source_project_metadata = z30.object({
|
|
540
|
+
type: z30.literal("source_project_metadata"),
|
|
541
|
+
name: z30.string().optional(),
|
|
542
|
+
software_used_string: z30.string().optional(),
|
|
543
|
+
project_url: z30.string().optional(),
|
|
537
544
|
created_at: timestamp.optional()
|
|
538
545
|
});
|
|
539
546
|
expectTypesMatch(true);
|
|
540
547
|
|
|
541
548
|
// src/source/source_missing_property_error.ts
|
|
542
|
-
import { z as
|
|
543
|
-
var source_missing_property_error =
|
|
544
|
-
type:
|
|
549
|
+
import { z as z31 } from "zod";
|
|
550
|
+
var source_missing_property_error = z31.object({
|
|
551
|
+
type: z31.literal("source_missing_property_error"),
|
|
545
552
|
source_missing_property_error_id: getZodPrefixedIdWithDefault(
|
|
546
553
|
"source_missing_property_error"
|
|
547
554
|
),
|
|
548
|
-
source_component_id:
|
|
549
|
-
property_name:
|
|
550
|
-
subcircuit_id:
|
|
551
|
-
error_type:
|
|
552
|
-
message:
|
|
555
|
+
source_component_id: z31.string(),
|
|
556
|
+
property_name: z31.string(),
|
|
557
|
+
subcircuit_id: z31.string().optional(),
|
|
558
|
+
error_type: z31.literal("source_missing_property_error").default("source_missing_property_error"),
|
|
559
|
+
message: z31.string()
|
|
553
560
|
}).describe("The source code is missing a property");
|
|
554
561
|
expectTypesMatch(true);
|
|
555
562
|
|
|
556
563
|
// src/source/source_failed_to_create_component_error.ts
|
|
557
|
-
import { z as
|
|
558
|
-
var source_failed_to_create_component_error =
|
|
559
|
-
type:
|
|
564
|
+
import { z as z32 } from "zod";
|
|
565
|
+
var source_failed_to_create_component_error = z32.object({
|
|
566
|
+
type: z32.literal("source_failed_to_create_component_error"),
|
|
560
567
|
source_failed_to_create_component_error_id: getZodPrefixedIdWithDefault(
|
|
561
568
|
"source_failed_to_create_component_error"
|
|
562
569
|
),
|
|
563
|
-
error_type:
|
|
564
|
-
component_name:
|
|
565
|
-
subcircuit_id:
|
|
566
|
-
parent_source_component_id:
|
|
567
|
-
message:
|
|
568
|
-
pcb_center:
|
|
569
|
-
x:
|
|
570
|
-
y:
|
|
570
|
+
error_type: z32.literal("source_failed_to_create_component_error").default("source_failed_to_create_component_error"),
|
|
571
|
+
component_name: z32.string().optional(),
|
|
572
|
+
subcircuit_id: z32.string().optional(),
|
|
573
|
+
parent_source_component_id: z32.string().optional(),
|
|
574
|
+
message: z32.string(),
|
|
575
|
+
pcb_center: z32.object({
|
|
576
|
+
x: z32.number().optional(),
|
|
577
|
+
y: z32.number().optional()
|
|
571
578
|
}).optional(),
|
|
572
|
-
schematic_center:
|
|
573
|
-
x:
|
|
574
|
-
y:
|
|
579
|
+
schematic_center: z32.object({
|
|
580
|
+
x: z32.number().optional(),
|
|
581
|
+
y: z32.number().optional()
|
|
575
582
|
}).optional()
|
|
576
583
|
}).describe("Error emitted when a component fails to be constructed");
|
|
577
584
|
expectTypesMatch(true);
|
|
578
585
|
|
|
579
586
|
// src/source/source_trace_not_connected_error.ts
|
|
580
|
-
import { z as
|
|
581
|
-
var source_trace_not_connected_error =
|
|
582
|
-
type:
|
|
587
|
+
import { z as z33 } from "zod";
|
|
588
|
+
var source_trace_not_connected_error = z33.object({
|
|
589
|
+
type: z33.literal("source_trace_not_connected_error"),
|
|
583
590
|
source_trace_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
584
591
|
"source_trace_not_connected_error"
|
|
585
592
|
),
|
|
586
|
-
error_type:
|
|
587
|
-
message:
|
|
588
|
-
subcircuit_id:
|
|
589
|
-
source_group_id:
|
|
590
|
-
source_trace_id:
|
|
591
|
-
connected_source_port_ids:
|
|
592
|
-
selectors_not_found:
|
|
593
|
+
error_type: z33.literal("source_trace_not_connected_error").default("source_trace_not_connected_error"),
|
|
594
|
+
message: z33.string(),
|
|
595
|
+
subcircuit_id: z33.string().optional(),
|
|
596
|
+
source_group_id: z33.string().optional(),
|
|
597
|
+
source_trace_id: z33.string().optional(),
|
|
598
|
+
connected_source_port_ids: z33.array(z33.string()).optional(),
|
|
599
|
+
selectors_not_found: z33.array(z33.string()).optional()
|
|
593
600
|
}).describe("Occurs when a source trace selector does not match any ports");
|
|
594
601
|
expectTypesMatch(true);
|
|
595
602
|
|
|
596
603
|
// src/source/source_property_ignored_warning.ts
|
|
597
|
-
import { z as
|
|
598
|
-
var source_property_ignored_warning =
|
|
599
|
-
type:
|
|
604
|
+
import { z as z34 } from "zod";
|
|
605
|
+
var source_property_ignored_warning = z34.object({
|
|
606
|
+
type: z34.literal("source_property_ignored_warning"),
|
|
600
607
|
source_property_ignored_warning_id: getZodPrefixedIdWithDefault(
|
|
601
608
|
"source_property_ignored_warning"
|
|
602
609
|
),
|
|
603
|
-
source_component_id:
|
|
604
|
-
property_name:
|
|
605
|
-
subcircuit_id:
|
|
606
|
-
error_type:
|
|
607
|
-
message:
|
|
610
|
+
source_component_id: z34.string(),
|
|
611
|
+
property_name: z34.string(),
|
|
612
|
+
subcircuit_id: z34.string().optional(),
|
|
613
|
+
error_type: z34.literal("source_property_ignored_warning").default("source_property_ignored_warning"),
|
|
614
|
+
message: z34.string()
|
|
608
615
|
}).describe("The source property was ignored");
|
|
609
616
|
expectTypesMatch(true);
|
|
610
617
|
|
|
611
618
|
// src/source/source_pin_missing_trace_warning.ts
|
|
612
|
-
import { z as
|
|
613
|
-
var source_pin_missing_trace_warning =
|
|
614
|
-
type:
|
|
619
|
+
import { z as z35 } from "zod";
|
|
620
|
+
var source_pin_missing_trace_warning = z35.object({
|
|
621
|
+
type: z35.literal("source_pin_missing_trace_warning"),
|
|
615
622
|
source_pin_missing_trace_warning_id: getZodPrefixedIdWithDefault(
|
|
616
623
|
"source_pin_missing_trace_warning"
|
|
617
624
|
),
|
|
618
|
-
warning_type:
|
|
619
|
-
message:
|
|
620
|
-
source_component_id:
|
|
621
|
-
source_port_id:
|
|
622
|
-
subcircuit_id:
|
|
625
|
+
warning_type: z35.literal("source_pin_missing_trace_warning").default("source_pin_missing_trace_warning"),
|
|
626
|
+
message: z35.string(),
|
|
627
|
+
source_component_id: z35.string(),
|
|
628
|
+
source_port_id: z35.string(),
|
|
629
|
+
subcircuit_id: z35.string().optional()
|
|
623
630
|
}).describe(
|
|
624
631
|
"Warning emitted when a source component pin is missing a trace connection"
|
|
625
632
|
);
|
|
626
633
|
expectTypesMatch(true);
|
|
627
634
|
|
|
628
635
|
// src/source/source_simple_voltage_probe.ts
|
|
629
|
-
import { z as
|
|
636
|
+
import { z as z36 } from "zod";
|
|
630
637
|
var source_simple_voltage_probe = source_component_base.extend({
|
|
631
|
-
ftype:
|
|
638
|
+
ftype: z36.literal("simple_voltage_probe")
|
|
632
639
|
});
|
|
633
640
|
expectTypesMatch(
|
|
634
641
|
true
|
|
635
642
|
);
|
|
636
643
|
|
|
637
644
|
// src/source/source_interconnect.ts
|
|
638
|
-
import { z as
|
|
645
|
+
import { z as z37 } from "zod";
|
|
639
646
|
var source_interconnect = source_component_base.extend({
|
|
640
|
-
ftype:
|
|
647
|
+
ftype: z37.literal("interconnect")
|
|
641
648
|
});
|
|
642
649
|
expectTypesMatch(true);
|
|
643
650
|
|
|
644
651
|
// src/source/any_source_component.ts
|
|
645
|
-
var any_source_component =
|
|
652
|
+
var any_source_component = z38.union([
|
|
646
653
|
source_simple_resistor,
|
|
647
654
|
source_simple_capacitor,
|
|
648
655
|
source_simple_diode,
|
|
656
|
+
source_simple_fiducial,
|
|
649
657
|
source_simple_led,
|
|
650
658
|
source_simple_ground,
|
|
651
659
|
source_simple_chip,
|
|
@@ -675,106 +683,106 @@ var any_source_component = z37.union([
|
|
|
675
683
|
expectTypesMatch(true);
|
|
676
684
|
|
|
677
685
|
// src/source/source_port.ts
|
|
678
|
-
import { z as
|
|
679
|
-
var source_port =
|
|
680
|
-
type:
|
|
681
|
-
pin_number:
|
|
682
|
-
port_hints:
|
|
683
|
-
name:
|
|
684
|
-
source_port_id:
|
|
685
|
-
source_component_id:
|
|
686
|
-
source_group_id:
|
|
687
|
-
subcircuit_id:
|
|
688
|
-
subcircuit_connectivity_map_key:
|
|
689
|
-
must_be_connected:
|
|
686
|
+
import { z as z39 } from "zod";
|
|
687
|
+
var source_port = z39.object({
|
|
688
|
+
type: z39.literal("source_port"),
|
|
689
|
+
pin_number: z39.number().optional(),
|
|
690
|
+
port_hints: z39.array(z39.string()).optional(),
|
|
691
|
+
name: z39.string(),
|
|
692
|
+
source_port_id: z39.string(),
|
|
693
|
+
source_component_id: z39.string().optional(),
|
|
694
|
+
source_group_id: z39.string().optional(),
|
|
695
|
+
subcircuit_id: z39.string().optional(),
|
|
696
|
+
subcircuit_connectivity_map_key: z39.string().optional(),
|
|
697
|
+
must_be_connected: z39.boolean().optional()
|
|
690
698
|
});
|
|
691
699
|
expectTypesMatch(true);
|
|
692
700
|
|
|
693
701
|
// src/source/source_component_internal_connection.ts
|
|
694
|
-
import { z as
|
|
695
|
-
var source_component_internal_connection =
|
|
696
|
-
type:
|
|
697
|
-
source_component_internal_connection_id:
|
|
698
|
-
source_component_id:
|
|
699
|
-
source_port_ids:
|
|
700
|
-
subcircuit_id:
|
|
702
|
+
import { z as z40 } from "zod";
|
|
703
|
+
var source_component_internal_connection = z40.object({
|
|
704
|
+
type: z40.literal("source_component_internal_connection"),
|
|
705
|
+
source_component_internal_connection_id: z40.string(),
|
|
706
|
+
source_component_id: z40.string(),
|
|
707
|
+
source_port_ids: z40.array(z40.string()),
|
|
708
|
+
subcircuit_id: z40.string().optional()
|
|
701
709
|
});
|
|
702
710
|
expectTypesMatch(true);
|
|
703
711
|
|
|
704
712
|
// src/source/source_trace.ts
|
|
705
|
-
import { z as
|
|
706
|
-
var source_trace =
|
|
707
|
-
type:
|
|
708
|
-
source_trace_id:
|
|
709
|
-
connected_source_port_ids:
|
|
710
|
-
connected_source_net_ids:
|
|
711
|
-
subcircuit_id:
|
|
712
|
-
subcircuit_connectivity_map_key:
|
|
713
|
-
max_length:
|
|
714
|
-
min_trace_thickness:
|
|
715
|
-
display_name:
|
|
713
|
+
import { z as z41 } from "zod";
|
|
714
|
+
var source_trace = z41.object({
|
|
715
|
+
type: z41.literal("source_trace"),
|
|
716
|
+
source_trace_id: z41.string(),
|
|
717
|
+
connected_source_port_ids: z41.array(z41.string()),
|
|
718
|
+
connected_source_net_ids: z41.array(z41.string()),
|
|
719
|
+
subcircuit_id: z41.string().optional(),
|
|
720
|
+
subcircuit_connectivity_map_key: z41.string().optional(),
|
|
721
|
+
max_length: z41.number().optional(),
|
|
722
|
+
min_trace_thickness: z41.number().optional(),
|
|
723
|
+
display_name: z41.string().optional()
|
|
716
724
|
});
|
|
717
725
|
expectTypesMatch(true);
|
|
718
726
|
|
|
719
727
|
// src/source/source_group.ts
|
|
720
|
-
import { z as
|
|
721
|
-
var source_group =
|
|
722
|
-
type:
|
|
723
|
-
source_group_id:
|
|
724
|
-
subcircuit_id:
|
|
725
|
-
parent_subcircuit_id:
|
|
726
|
-
parent_source_group_id:
|
|
727
|
-
is_subcircuit:
|
|
728
|
-
show_as_schematic_box:
|
|
729
|
-
name:
|
|
730
|
-
was_automatically_named:
|
|
728
|
+
import { z as z42 } from "zod";
|
|
729
|
+
var source_group = z42.object({
|
|
730
|
+
type: z42.literal("source_group"),
|
|
731
|
+
source_group_id: z42.string(),
|
|
732
|
+
subcircuit_id: z42.string().optional(),
|
|
733
|
+
parent_subcircuit_id: z42.string().optional(),
|
|
734
|
+
parent_source_group_id: z42.string().optional(),
|
|
735
|
+
is_subcircuit: z42.boolean().optional(),
|
|
736
|
+
show_as_schematic_box: z42.boolean().optional(),
|
|
737
|
+
name: z42.string().optional(),
|
|
738
|
+
was_automatically_named: z42.boolean().optional()
|
|
731
739
|
});
|
|
732
740
|
expectTypesMatch(true);
|
|
733
741
|
|
|
734
742
|
// src/source/source_net.ts
|
|
735
|
-
import { z as
|
|
736
|
-
var source_net =
|
|
737
|
-
type:
|
|
738
|
-
source_net_id:
|
|
739
|
-
name:
|
|
740
|
-
member_source_group_ids:
|
|
741
|
-
is_power:
|
|
742
|
-
is_ground:
|
|
743
|
-
is_digital_signal:
|
|
744
|
-
is_analog_signal:
|
|
745
|
-
is_positive_voltage_source:
|
|
746
|
-
trace_width:
|
|
747
|
-
subcircuit_id:
|
|
748
|
-
subcircuit_connectivity_map_key:
|
|
743
|
+
import { z as z43 } from "zod";
|
|
744
|
+
var source_net = z43.object({
|
|
745
|
+
type: z43.literal("source_net"),
|
|
746
|
+
source_net_id: z43.string(),
|
|
747
|
+
name: z43.string(),
|
|
748
|
+
member_source_group_ids: z43.array(z43.string()),
|
|
749
|
+
is_power: z43.boolean().optional(),
|
|
750
|
+
is_ground: z43.boolean().optional(),
|
|
751
|
+
is_digital_signal: z43.boolean().optional(),
|
|
752
|
+
is_analog_signal: z43.boolean().optional(),
|
|
753
|
+
is_positive_voltage_source: z43.boolean().optional(),
|
|
754
|
+
trace_width: z43.number().optional(),
|
|
755
|
+
subcircuit_id: z43.string().optional(),
|
|
756
|
+
subcircuit_connectivity_map_key: z43.string().optional()
|
|
749
757
|
});
|
|
750
758
|
expectTypesMatch(true);
|
|
751
759
|
|
|
752
760
|
// src/source/source_board.ts
|
|
753
|
-
import { z as
|
|
754
|
-
var source_board =
|
|
755
|
-
type:
|
|
756
|
-
source_board_id:
|
|
757
|
-
source_group_id:
|
|
758
|
-
title:
|
|
761
|
+
import { z as z44 } from "zod";
|
|
762
|
+
var source_board = z44.object({
|
|
763
|
+
type: z44.literal("source_board"),
|
|
764
|
+
source_board_id: z44.string(),
|
|
765
|
+
source_group_id: z44.string(),
|
|
766
|
+
title: z44.string().optional()
|
|
759
767
|
}).describe("Defines a board in the source domain");
|
|
760
768
|
expectTypesMatch(true);
|
|
761
769
|
|
|
762
770
|
// src/source/source_pcb_ground_plane.ts
|
|
763
|
-
import { z as
|
|
764
|
-
var source_pcb_ground_plane =
|
|
765
|
-
type:
|
|
766
|
-
source_pcb_ground_plane_id:
|
|
767
|
-
source_group_id:
|
|
768
|
-
source_net_id:
|
|
769
|
-
subcircuit_id:
|
|
771
|
+
import { z as z45 } from "zod";
|
|
772
|
+
var source_pcb_ground_plane = z45.object({
|
|
773
|
+
type: z45.literal("source_pcb_ground_plane"),
|
|
774
|
+
source_pcb_ground_plane_id: z45.string(),
|
|
775
|
+
source_group_id: z45.string(),
|
|
776
|
+
source_net_id: z45.string(),
|
|
777
|
+
subcircuit_id: z45.string().optional()
|
|
770
778
|
}).describe("Defines a ground plane in the source domain");
|
|
771
779
|
expectTypesMatch(true);
|
|
772
780
|
|
|
773
781
|
// src/source/source_manually_placed_via.ts
|
|
774
|
-
import { z as
|
|
782
|
+
import { z as z47 } from "zod";
|
|
775
783
|
|
|
776
784
|
// src/pcb/properties/layer_ref.ts
|
|
777
|
-
import { z as
|
|
785
|
+
import { z as z46 } from "zod";
|
|
778
786
|
var all_layers = [
|
|
779
787
|
"top",
|
|
780
788
|
"bottom",
|
|
@@ -785,9 +793,9 @@ var all_layers = [
|
|
|
785
793
|
"inner5",
|
|
786
794
|
"inner6"
|
|
787
795
|
];
|
|
788
|
-
var layer_string =
|
|
796
|
+
var layer_string = z46.enum(all_layers);
|
|
789
797
|
var layer_ref = layer_string.or(
|
|
790
|
-
|
|
798
|
+
z46.object({
|
|
791
799
|
name: layer_string
|
|
792
800
|
})
|
|
793
801
|
).transform((layer) => {
|
|
@@ -797,253 +805,253 @@ var layer_ref = layer_string.or(
|
|
|
797
805
|
return layer.name;
|
|
798
806
|
});
|
|
799
807
|
expectTypesMatch(true);
|
|
800
|
-
var visible_layer =
|
|
808
|
+
var visible_layer = z46.enum(["top", "bottom"]);
|
|
801
809
|
|
|
802
810
|
// src/source/source_manually_placed_via.ts
|
|
803
|
-
var source_manually_placed_via =
|
|
804
|
-
type:
|
|
805
|
-
source_manually_placed_via_id:
|
|
806
|
-
source_group_id:
|
|
807
|
-
source_net_id:
|
|
808
|
-
subcircuit_id:
|
|
809
|
-
source_trace_id:
|
|
811
|
+
var source_manually_placed_via = z47.object({
|
|
812
|
+
type: z47.literal("source_manually_placed_via"),
|
|
813
|
+
source_manually_placed_via_id: z47.string(),
|
|
814
|
+
source_group_id: z47.string(),
|
|
815
|
+
source_net_id: z47.string(),
|
|
816
|
+
subcircuit_id: z47.string().optional(),
|
|
817
|
+
source_trace_id: z47.string().optional()
|
|
810
818
|
}).describe("Defines a via that is manually placed in the source domain");
|
|
811
819
|
expectTypesMatch(true);
|
|
812
820
|
|
|
813
821
|
// src/source/source_pin_must_be_connected_error.ts
|
|
814
|
-
import { z as
|
|
815
|
-
var source_pin_must_be_connected_error =
|
|
816
|
-
type:
|
|
822
|
+
import { z as z48 } from "zod";
|
|
823
|
+
var source_pin_must_be_connected_error = z48.object({
|
|
824
|
+
type: z48.literal("source_pin_must_be_connected_error"),
|
|
817
825
|
source_pin_must_be_connected_error_id: getZodPrefixedIdWithDefault(
|
|
818
826
|
"source_pin_must_be_connected_error"
|
|
819
827
|
),
|
|
820
|
-
error_type:
|
|
821
|
-
message:
|
|
822
|
-
source_component_id:
|
|
823
|
-
source_port_id:
|
|
824
|
-
subcircuit_id:
|
|
828
|
+
error_type: z48.literal("source_pin_must_be_connected_error").default("source_pin_must_be_connected_error"),
|
|
829
|
+
message: z48.string(),
|
|
830
|
+
source_component_id: z48.string(),
|
|
831
|
+
source_port_id: z48.string(),
|
|
832
|
+
subcircuit_id: z48.string().optional()
|
|
825
833
|
}).describe(
|
|
826
834
|
"Error emitted when a pin with mustBeConnected attribute is not connected to any trace"
|
|
827
835
|
);
|
|
828
836
|
expectTypesMatch(true);
|
|
829
837
|
|
|
830
838
|
// src/source/unknown_error_finding_part.ts
|
|
831
|
-
import { z as
|
|
832
|
-
var unknown_error_finding_part =
|
|
833
|
-
type:
|
|
839
|
+
import { z as z49 } from "zod";
|
|
840
|
+
var unknown_error_finding_part = z49.object({
|
|
841
|
+
type: z49.literal("unknown_error_finding_part"),
|
|
834
842
|
unknown_error_finding_part_id: getZodPrefixedIdWithDefault(
|
|
835
843
|
"unknown_error_finding_part"
|
|
836
844
|
),
|
|
837
|
-
error_type:
|
|
838
|
-
message:
|
|
839
|
-
source_component_id:
|
|
840
|
-
subcircuit_id:
|
|
845
|
+
error_type: z49.literal("unknown_error_finding_part").default("unknown_error_finding_part"),
|
|
846
|
+
message: z49.string(),
|
|
847
|
+
source_component_id: z49.string().optional(),
|
|
848
|
+
subcircuit_id: z49.string().optional()
|
|
841
849
|
}).describe(
|
|
842
850
|
"Error emitted when an unexpected error occurs while finding a part"
|
|
843
851
|
);
|
|
844
852
|
expectTypesMatch(true);
|
|
845
853
|
|
|
846
854
|
// src/schematic/schematic_box.ts
|
|
847
|
-
import { z as
|
|
848
|
-
var schematic_box =
|
|
849
|
-
type:
|
|
850
|
-
schematic_component_id:
|
|
855
|
+
import { z as z50 } from "zod";
|
|
856
|
+
var schematic_box = z50.object({
|
|
857
|
+
type: z50.literal("schematic_box"),
|
|
858
|
+
schematic_component_id: z50.string().optional(),
|
|
851
859
|
width: distance,
|
|
852
860
|
height: distance,
|
|
853
|
-
is_dashed:
|
|
861
|
+
is_dashed: z50.boolean().default(false),
|
|
854
862
|
x: distance,
|
|
855
863
|
y: distance,
|
|
856
|
-
subcircuit_id:
|
|
864
|
+
subcircuit_id: z50.string().optional()
|
|
857
865
|
}).describe("Draws a box on the schematic");
|
|
858
866
|
expectTypesMatch(true);
|
|
859
867
|
|
|
860
868
|
// src/schematic/schematic_path.ts
|
|
861
|
-
import { z as
|
|
862
|
-
var schematic_path =
|
|
863
|
-
type:
|
|
864
|
-
schematic_component_id:
|
|
865
|
-
fill_color:
|
|
866
|
-
is_filled:
|
|
867
|
-
points:
|
|
868
|
-
subcircuit_id:
|
|
869
|
+
import { z as z51 } from "zod";
|
|
870
|
+
var schematic_path = z51.object({
|
|
871
|
+
type: z51.literal("schematic_path"),
|
|
872
|
+
schematic_component_id: z51.string(),
|
|
873
|
+
fill_color: z51.enum(["red", "blue"]).optional(),
|
|
874
|
+
is_filled: z51.boolean().optional(),
|
|
875
|
+
points: z51.array(point),
|
|
876
|
+
subcircuit_id: z51.string().optional()
|
|
869
877
|
});
|
|
870
878
|
expectTypesMatch(true);
|
|
871
879
|
|
|
872
880
|
// src/schematic/schematic_component.ts
|
|
873
|
-
import { z as
|
|
874
|
-
var schematic_pin_styles =
|
|
875
|
-
|
|
881
|
+
import { z as z52 } from "zod";
|
|
882
|
+
var schematic_pin_styles = z52.record(
|
|
883
|
+
z52.object({
|
|
876
884
|
left_margin: length.optional(),
|
|
877
885
|
right_margin: length.optional(),
|
|
878
886
|
top_margin: length.optional(),
|
|
879
887
|
bottom_margin: length.optional()
|
|
880
888
|
})
|
|
881
889
|
);
|
|
882
|
-
var schematic_component_port_arrangement_by_size =
|
|
883
|
-
left_size:
|
|
884
|
-
right_size:
|
|
885
|
-
top_size:
|
|
886
|
-
bottom_size:
|
|
890
|
+
var schematic_component_port_arrangement_by_size = z52.object({
|
|
891
|
+
left_size: z52.number(),
|
|
892
|
+
right_size: z52.number(),
|
|
893
|
+
top_size: z52.number().optional(),
|
|
894
|
+
bottom_size: z52.number().optional()
|
|
887
895
|
});
|
|
888
896
|
expectTypesMatch(true);
|
|
889
|
-
var schematic_component_port_arrangement_by_sides =
|
|
890
|
-
left_side:
|
|
891
|
-
pins:
|
|
897
|
+
var schematic_component_port_arrangement_by_sides = z52.object({
|
|
898
|
+
left_side: z52.object({
|
|
899
|
+
pins: z52.array(z52.number()),
|
|
892
900
|
// @ts-ignore
|
|
893
|
-
direction:
|
|
901
|
+
direction: z52.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
894
902
|
}).optional(),
|
|
895
|
-
right_side:
|
|
896
|
-
pins:
|
|
903
|
+
right_side: z52.object({
|
|
904
|
+
pins: z52.array(z52.number()),
|
|
897
905
|
// @ts-ignore
|
|
898
|
-
direction:
|
|
906
|
+
direction: z52.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
899
907
|
}).optional(),
|
|
900
|
-
top_side:
|
|
901
|
-
pins:
|
|
908
|
+
top_side: z52.object({
|
|
909
|
+
pins: z52.array(z52.number()),
|
|
902
910
|
// @ts-ignore
|
|
903
|
-
direction:
|
|
911
|
+
direction: z52.enum(["left-to-right", "right-to-left"]).optional()
|
|
904
912
|
}).optional(),
|
|
905
|
-
bottom_side:
|
|
906
|
-
pins:
|
|
913
|
+
bottom_side: z52.object({
|
|
914
|
+
pins: z52.array(z52.number()),
|
|
907
915
|
// @ts-ignore
|
|
908
|
-
direction:
|
|
916
|
+
direction: z52.enum(["left-to-right", "right-to-left"]).optional()
|
|
909
917
|
}).optional()
|
|
910
918
|
});
|
|
911
919
|
expectTypesMatch(true);
|
|
912
|
-
var port_arrangement =
|
|
920
|
+
var port_arrangement = z52.union([
|
|
913
921
|
schematic_component_port_arrangement_by_size,
|
|
914
922
|
schematic_component_port_arrangement_by_sides
|
|
915
923
|
]);
|
|
916
|
-
var schematic_component =
|
|
917
|
-
type:
|
|
924
|
+
var schematic_component = z52.object({
|
|
925
|
+
type: z52.literal("schematic_component"),
|
|
918
926
|
size,
|
|
919
927
|
center: point,
|
|
920
|
-
source_component_id:
|
|
921
|
-
schematic_component_id:
|
|
928
|
+
source_component_id: z52.string().optional(),
|
|
929
|
+
schematic_component_id: z52.string(),
|
|
922
930
|
pin_spacing: length.optional(),
|
|
923
931
|
pin_styles: schematic_pin_styles.optional(),
|
|
924
932
|
box_width: length.optional(),
|
|
925
|
-
symbol_name:
|
|
933
|
+
symbol_name: z52.string().optional(),
|
|
926
934
|
port_arrangement: port_arrangement.optional(),
|
|
927
|
-
port_labels:
|
|
928
|
-
symbol_display_value:
|
|
929
|
-
subcircuit_id:
|
|
930
|
-
schematic_group_id:
|
|
931
|
-
is_schematic_group:
|
|
932
|
-
source_group_id:
|
|
933
|
-
is_box_with_pins:
|
|
935
|
+
port_labels: z52.record(z52.string()).optional(),
|
|
936
|
+
symbol_display_value: z52.string().optional(),
|
|
937
|
+
subcircuit_id: z52.string().optional(),
|
|
938
|
+
schematic_group_id: z52.string().optional(),
|
|
939
|
+
is_schematic_group: z52.boolean().optional(),
|
|
940
|
+
source_group_id: z52.string().optional(),
|
|
941
|
+
is_box_with_pins: z52.boolean().optional().default(true)
|
|
934
942
|
});
|
|
935
943
|
expectTypesMatch(true);
|
|
936
944
|
|
|
937
945
|
// src/schematic/schematic_line.ts
|
|
938
|
-
import { z as
|
|
939
|
-
var schematic_line =
|
|
940
|
-
type:
|
|
946
|
+
import { z as z53 } from "zod";
|
|
947
|
+
var schematic_line = z53.object({
|
|
948
|
+
type: z53.literal("schematic_line"),
|
|
941
949
|
schematic_line_id: getZodPrefixedIdWithDefault("schematic_line"),
|
|
942
|
-
schematic_component_id:
|
|
950
|
+
schematic_component_id: z53.string(),
|
|
943
951
|
x1: distance,
|
|
944
952
|
y1: distance,
|
|
945
953
|
x2: distance,
|
|
946
954
|
y2: distance,
|
|
947
955
|
stroke_width: distance.nullable().optional(),
|
|
948
|
-
color:
|
|
949
|
-
is_dashed:
|
|
950
|
-
subcircuit_id:
|
|
956
|
+
color: z53.string().default("#000000"),
|
|
957
|
+
is_dashed: z53.boolean().default(false),
|
|
958
|
+
subcircuit_id: z53.string().optional()
|
|
951
959
|
}).describe("Draws a styled line on the schematic");
|
|
952
960
|
expectTypesMatch(true);
|
|
953
961
|
|
|
954
962
|
// src/schematic/schematic_rect.ts
|
|
955
|
-
import { z as
|
|
956
|
-
var schematic_rect =
|
|
957
|
-
type:
|
|
963
|
+
import { z as z54 } from "zod";
|
|
964
|
+
var schematic_rect = z54.object({
|
|
965
|
+
type: z54.literal("schematic_rect"),
|
|
958
966
|
schematic_rect_id: getZodPrefixedIdWithDefault("schematic_rect"),
|
|
959
|
-
schematic_component_id:
|
|
967
|
+
schematic_component_id: z54.string(),
|
|
960
968
|
center: point,
|
|
961
969
|
width: distance,
|
|
962
970
|
height: distance,
|
|
963
971
|
rotation: rotation.default(0),
|
|
964
972
|
stroke_width: distance.nullable().optional(),
|
|
965
|
-
color:
|
|
966
|
-
is_filled:
|
|
967
|
-
fill_color:
|
|
968
|
-
is_dashed:
|
|
969
|
-
subcircuit_id:
|
|
973
|
+
color: z54.string().default("#000000"),
|
|
974
|
+
is_filled: z54.boolean().default(false),
|
|
975
|
+
fill_color: z54.string().optional(),
|
|
976
|
+
is_dashed: z54.boolean().default(false),
|
|
977
|
+
subcircuit_id: z54.string().optional()
|
|
970
978
|
}).describe("Draws a styled rectangle on the schematic");
|
|
971
979
|
expectTypesMatch(true);
|
|
972
980
|
|
|
973
981
|
// src/schematic/schematic_circle.ts
|
|
974
|
-
import { z as
|
|
975
|
-
var schematic_circle =
|
|
976
|
-
type:
|
|
982
|
+
import { z as z55 } from "zod";
|
|
983
|
+
var schematic_circle = z55.object({
|
|
984
|
+
type: z55.literal("schematic_circle"),
|
|
977
985
|
schematic_circle_id: getZodPrefixedIdWithDefault("schematic_circle"),
|
|
978
|
-
schematic_component_id:
|
|
986
|
+
schematic_component_id: z55.string(),
|
|
979
987
|
center: point,
|
|
980
988
|
radius: distance,
|
|
981
989
|
stroke_width: distance.nullable().optional(),
|
|
982
|
-
color:
|
|
983
|
-
is_filled:
|
|
984
|
-
fill_color:
|
|
985
|
-
is_dashed:
|
|
986
|
-
subcircuit_id:
|
|
990
|
+
color: z55.string().default("#000000"),
|
|
991
|
+
is_filled: z55.boolean().default(false),
|
|
992
|
+
fill_color: z55.string().optional(),
|
|
993
|
+
is_dashed: z55.boolean().default(false),
|
|
994
|
+
subcircuit_id: z55.string().optional()
|
|
987
995
|
}).describe("Draws a styled circle on the schematic");
|
|
988
996
|
expectTypesMatch(true);
|
|
989
997
|
|
|
990
998
|
// src/schematic/schematic_arc.ts
|
|
991
|
-
import { z as
|
|
992
|
-
var schematic_arc =
|
|
993
|
-
type:
|
|
999
|
+
import { z as z56 } from "zod";
|
|
1000
|
+
var schematic_arc = z56.object({
|
|
1001
|
+
type: z56.literal("schematic_arc"),
|
|
994
1002
|
schematic_arc_id: getZodPrefixedIdWithDefault("schematic_arc"),
|
|
995
|
-
schematic_component_id:
|
|
1003
|
+
schematic_component_id: z56.string(),
|
|
996
1004
|
center: point,
|
|
997
1005
|
radius: distance,
|
|
998
1006
|
start_angle_degrees: rotation,
|
|
999
1007
|
end_angle_degrees: rotation,
|
|
1000
|
-
direction:
|
|
1008
|
+
direction: z56.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
1001
1009
|
stroke_width: distance.nullable().optional(),
|
|
1002
|
-
color:
|
|
1003
|
-
is_dashed:
|
|
1004
|
-
subcircuit_id:
|
|
1010
|
+
color: z56.string().default("#000000"),
|
|
1011
|
+
is_dashed: z56.boolean().default(false),
|
|
1012
|
+
subcircuit_id: z56.string().optional()
|
|
1005
1013
|
}).describe("Draws a styled arc on the schematic");
|
|
1006
1014
|
expectTypesMatch(true);
|
|
1007
1015
|
|
|
1008
1016
|
// src/schematic/schematic_trace.ts
|
|
1009
|
-
import { z as
|
|
1010
|
-
var schematic_trace =
|
|
1011
|
-
type:
|
|
1012
|
-
schematic_trace_id:
|
|
1013
|
-
source_trace_id:
|
|
1014
|
-
junctions:
|
|
1015
|
-
|
|
1016
|
-
x:
|
|
1017
|
-
y:
|
|
1017
|
+
import { z as z57 } from "zod";
|
|
1018
|
+
var schematic_trace = z57.object({
|
|
1019
|
+
type: z57.literal("schematic_trace"),
|
|
1020
|
+
schematic_trace_id: z57.string(),
|
|
1021
|
+
source_trace_id: z57.string().optional(),
|
|
1022
|
+
junctions: z57.array(
|
|
1023
|
+
z57.object({
|
|
1024
|
+
x: z57.number(),
|
|
1025
|
+
y: z57.number()
|
|
1018
1026
|
})
|
|
1019
1027
|
),
|
|
1020
|
-
edges:
|
|
1021
|
-
|
|
1022
|
-
from:
|
|
1023
|
-
x:
|
|
1024
|
-
y:
|
|
1028
|
+
edges: z57.array(
|
|
1029
|
+
z57.object({
|
|
1030
|
+
from: z57.object({
|
|
1031
|
+
x: z57.number(),
|
|
1032
|
+
y: z57.number()
|
|
1025
1033
|
}),
|
|
1026
|
-
to:
|
|
1027
|
-
x:
|
|
1028
|
-
y:
|
|
1034
|
+
to: z57.object({
|
|
1035
|
+
x: z57.number(),
|
|
1036
|
+
y: z57.number()
|
|
1029
1037
|
}),
|
|
1030
|
-
is_crossing:
|
|
1031
|
-
from_schematic_port_id:
|
|
1032
|
-
to_schematic_port_id:
|
|
1038
|
+
is_crossing: z57.boolean().optional(),
|
|
1039
|
+
from_schematic_port_id: z57.string().optional(),
|
|
1040
|
+
to_schematic_port_id: z57.string().optional()
|
|
1033
1041
|
})
|
|
1034
1042
|
),
|
|
1035
|
-
subcircuit_id:
|
|
1043
|
+
subcircuit_id: z57.string().optional(),
|
|
1036
1044
|
// TODO: make required in a future release
|
|
1037
|
-
subcircuit_connectivity_map_key:
|
|
1045
|
+
subcircuit_connectivity_map_key: z57.string().optional()
|
|
1038
1046
|
});
|
|
1039
1047
|
expectTypesMatch(true);
|
|
1040
1048
|
|
|
1041
1049
|
// src/schematic/schematic_text.ts
|
|
1042
|
-
import { z as
|
|
1050
|
+
import { z as z59 } from "zod";
|
|
1043
1051
|
|
|
1044
1052
|
// src/common/FivePointAnchor.ts
|
|
1045
|
-
import { z as
|
|
1046
|
-
var fivePointAnchor =
|
|
1053
|
+
import { z as z58 } from "zod";
|
|
1054
|
+
var fivePointAnchor = z58.enum([
|
|
1047
1055
|
"center",
|
|
1048
1056
|
"left",
|
|
1049
1057
|
"right",
|
|
@@ -1053,111 +1061,111 @@ var fivePointAnchor = z57.enum([
|
|
|
1053
1061
|
expectTypesMatch(true);
|
|
1054
1062
|
|
|
1055
1063
|
// src/schematic/schematic_text.ts
|
|
1056
|
-
var schematic_text =
|
|
1057
|
-
type:
|
|
1058
|
-
schematic_component_id:
|
|
1059
|
-
schematic_text_id:
|
|
1060
|
-
text:
|
|
1061
|
-
font_size:
|
|
1062
|
-
position:
|
|
1064
|
+
var schematic_text = z59.object({
|
|
1065
|
+
type: z59.literal("schematic_text"),
|
|
1066
|
+
schematic_component_id: z59.string().optional(),
|
|
1067
|
+
schematic_text_id: z59.string(),
|
|
1068
|
+
text: z59.string(),
|
|
1069
|
+
font_size: z59.number().default(0.18),
|
|
1070
|
+
position: z59.object({
|
|
1063
1071
|
x: distance,
|
|
1064
1072
|
y: distance
|
|
1065
1073
|
}),
|
|
1066
|
-
rotation:
|
|
1067
|
-
anchor:
|
|
1068
|
-
color:
|
|
1069
|
-
subcircuit_id:
|
|
1074
|
+
rotation: z59.number().default(0),
|
|
1075
|
+
anchor: z59.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
1076
|
+
color: z59.string().default("#000000"),
|
|
1077
|
+
subcircuit_id: z59.string().optional()
|
|
1070
1078
|
});
|
|
1071
1079
|
expectTypesMatch(true);
|
|
1072
1080
|
|
|
1073
1081
|
// src/schematic/schematic_port.ts
|
|
1074
|
-
import { z as
|
|
1075
|
-
var schematic_port =
|
|
1076
|
-
type:
|
|
1077
|
-
schematic_port_id:
|
|
1078
|
-
source_port_id:
|
|
1079
|
-
schematic_component_id:
|
|
1082
|
+
import { z as z60 } from "zod";
|
|
1083
|
+
var schematic_port = z60.object({
|
|
1084
|
+
type: z60.literal("schematic_port"),
|
|
1085
|
+
schematic_port_id: z60.string(),
|
|
1086
|
+
source_port_id: z60.string(),
|
|
1087
|
+
schematic_component_id: z60.string().optional(),
|
|
1080
1088
|
center: point,
|
|
1081
|
-
facing_direction:
|
|
1082
|
-
distance_from_component_edge:
|
|
1083
|
-
side_of_component:
|
|
1084
|
-
true_ccw_index:
|
|
1085
|
-
pin_number:
|
|
1086
|
-
display_pin_label:
|
|
1087
|
-
subcircuit_id:
|
|
1088
|
-
is_connected:
|
|
1089
|
-
has_input_arrow:
|
|
1090
|
-
has_output_arrow:
|
|
1089
|
+
facing_direction: z60.enum(["up", "down", "left", "right"]).optional(),
|
|
1090
|
+
distance_from_component_edge: z60.number().optional(),
|
|
1091
|
+
side_of_component: z60.enum(["top", "bottom", "left", "right"]).optional(),
|
|
1092
|
+
true_ccw_index: z60.number().optional(),
|
|
1093
|
+
pin_number: z60.number().optional(),
|
|
1094
|
+
display_pin_label: z60.string().optional(),
|
|
1095
|
+
subcircuit_id: z60.string().optional(),
|
|
1096
|
+
is_connected: z60.boolean().optional(),
|
|
1097
|
+
has_input_arrow: z60.boolean().optional(),
|
|
1098
|
+
has_output_arrow: z60.boolean().optional()
|
|
1091
1099
|
}).describe("Defines a port on a schematic component");
|
|
1092
1100
|
expectTypesMatch(true);
|
|
1093
1101
|
|
|
1094
1102
|
// src/schematic/schematic_net_label.ts
|
|
1095
|
-
import { z as
|
|
1096
|
-
var schematic_net_label =
|
|
1097
|
-
type:
|
|
1103
|
+
import { z as z61 } from "zod";
|
|
1104
|
+
var schematic_net_label = z61.object({
|
|
1105
|
+
type: z61.literal("schematic_net_label"),
|
|
1098
1106
|
schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
|
|
1099
|
-
schematic_trace_id:
|
|
1100
|
-
source_trace_id:
|
|
1101
|
-
source_net_id:
|
|
1107
|
+
schematic_trace_id: z61.string().optional(),
|
|
1108
|
+
source_trace_id: z61.string().optional(),
|
|
1109
|
+
source_net_id: z61.string(),
|
|
1102
1110
|
center: point,
|
|
1103
1111
|
anchor_position: point.optional(),
|
|
1104
|
-
anchor_side:
|
|
1105
|
-
text:
|
|
1106
|
-
symbol_name:
|
|
1107
|
-
is_movable:
|
|
1108
|
-
subcircuit_id:
|
|
1112
|
+
anchor_side: z61.enum(["top", "bottom", "left", "right"]),
|
|
1113
|
+
text: z61.string(),
|
|
1114
|
+
symbol_name: z61.string().optional(),
|
|
1115
|
+
is_movable: z61.boolean().optional(),
|
|
1116
|
+
subcircuit_id: z61.string().optional()
|
|
1109
1117
|
});
|
|
1110
1118
|
expectTypesMatch(true);
|
|
1111
1119
|
|
|
1112
1120
|
// src/schematic/schematic_error.ts
|
|
1113
|
-
import { z as
|
|
1114
|
-
var schematic_error =
|
|
1115
|
-
type:
|
|
1116
|
-
schematic_error_id:
|
|
1121
|
+
import { z as z62 } from "zod";
|
|
1122
|
+
var schematic_error = z62.object({
|
|
1123
|
+
type: z62.literal("schematic_error"),
|
|
1124
|
+
schematic_error_id: z62.string(),
|
|
1117
1125
|
// eventually each error type should be broken out into a dir of files
|
|
1118
|
-
error_type:
|
|
1119
|
-
message:
|
|
1120
|
-
subcircuit_id:
|
|
1126
|
+
error_type: z62.literal("schematic_port_not_found").default("schematic_port_not_found"),
|
|
1127
|
+
message: z62.string(),
|
|
1128
|
+
subcircuit_id: z62.string().optional()
|
|
1121
1129
|
}).describe("Defines a schematic error on the schematic");
|
|
1122
1130
|
expectTypesMatch(true);
|
|
1123
1131
|
|
|
1124
1132
|
// src/schematic/schematic_layout_error.ts
|
|
1125
|
-
import { z as
|
|
1126
|
-
var schematic_layout_error =
|
|
1127
|
-
type:
|
|
1133
|
+
import { z as z63 } from "zod";
|
|
1134
|
+
var schematic_layout_error = z63.object({
|
|
1135
|
+
type: z63.literal("schematic_layout_error"),
|
|
1128
1136
|
schematic_layout_error_id: getZodPrefixedIdWithDefault(
|
|
1129
1137
|
"schematic_layout_error"
|
|
1130
1138
|
),
|
|
1131
|
-
error_type:
|
|
1132
|
-
message:
|
|
1133
|
-
source_group_id:
|
|
1134
|
-
schematic_group_id:
|
|
1135
|
-
subcircuit_id:
|
|
1139
|
+
error_type: z63.literal("schematic_layout_error").default("schematic_layout_error"),
|
|
1140
|
+
message: z63.string(),
|
|
1141
|
+
source_group_id: z63.string(),
|
|
1142
|
+
schematic_group_id: z63.string(),
|
|
1143
|
+
subcircuit_id: z63.string().optional()
|
|
1136
1144
|
}).describe("Error emitted when schematic layout fails for a group");
|
|
1137
1145
|
expectTypesMatch(true);
|
|
1138
1146
|
|
|
1139
1147
|
// src/schematic/schematic_debug_object.ts
|
|
1140
|
-
import { z as
|
|
1141
|
-
var schematic_debug_object_base =
|
|
1142
|
-
type:
|
|
1143
|
-
label:
|
|
1144
|
-
subcircuit_id:
|
|
1148
|
+
import { z as z64 } from "zod";
|
|
1149
|
+
var schematic_debug_object_base = z64.object({
|
|
1150
|
+
type: z64.literal("schematic_debug_object"),
|
|
1151
|
+
label: z64.string().optional(),
|
|
1152
|
+
subcircuit_id: z64.string().optional()
|
|
1145
1153
|
});
|
|
1146
1154
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
1147
|
-
shape:
|
|
1155
|
+
shape: z64.literal("rect"),
|
|
1148
1156
|
center: point,
|
|
1149
1157
|
size
|
|
1150
1158
|
});
|
|
1151
1159
|
var schematic_debug_line = schematic_debug_object_base.extend({
|
|
1152
|
-
shape:
|
|
1160
|
+
shape: z64.literal("line"),
|
|
1153
1161
|
start: point,
|
|
1154
1162
|
end: point
|
|
1155
1163
|
});
|
|
1156
1164
|
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
1157
|
-
shape:
|
|
1165
|
+
shape: z64.literal("point"),
|
|
1158
1166
|
center: point
|
|
1159
1167
|
});
|
|
1160
|
-
var schematic_debug_object =
|
|
1168
|
+
var schematic_debug_object = z64.discriminatedUnion("shape", [
|
|
1161
1169
|
schematic_debug_rect,
|
|
1162
1170
|
schematic_debug_line,
|
|
1163
1171
|
schematic_debug_point
|
|
@@ -1165,277 +1173,277 @@ var schematic_debug_object = z63.discriminatedUnion("shape", [
|
|
|
1165
1173
|
expectTypesMatch(true);
|
|
1166
1174
|
|
|
1167
1175
|
// src/schematic/schematic_voltage_probe.ts
|
|
1168
|
-
import { z as
|
|
1169
|
-
var schematic_voltage_probe =
|
|
1170
|
-
type:
|
|
1171
|
-
schematic_voltage_probe_id:
|
|
1172
|
-
source_component_id:
|
|
1173
|
-
name:
|
|
1176
|
+
import { z as z65 } from "zod";
|
|
1177
|
+
var schematic_voltage_probe = z65.object({
|
|
1178
|
+
type: z65.literal("schematic_voltage_probe"),
|
|
1179
|
+
schematic_voltage_probe_id: z65.string(),
|
|
1180
|
+
source_component_id: z65.string().optional(),
|
|
1181
|
+
name: z65.string().optional(),
|
|
1174
1182
|
position: point,
|
|
1175
|
-
schematic_trace_id:
|
|
1183
|
+
schematic_trace_id: z65.string(),
|
|
1176
1184
|
voltage: voltage.optional(),
|
|
1177
|
-
subcircuit_id:
|
|
1178
|
-
color:
|
|
1185
|
+
subcircuit_id: z65.string().optional(),
|
|
1186
|
+
color: z65.string().optional(),
|
|
1179
1187
|
label_alignment: ninePointAnchor.optional()
|
|
1180
1188
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
1181
1189
|
expectTypesMatch(true);
|
|
1182
1190
|
|
|
1183
1191
|
// src/schematic/schematic_manual_edit_conflict_warning.ts
|
|
1184
|
-
import { z as
|
|
1185
|
-
var schematic_manual_edit_conflict_warning =
|
|
1186
|
-
type:
|
|
1192
|
+
import { z as z66 } from "zod";
|
|
1193
|
+
var schematic_manual_edit_conflict_warning = z66.object({
|
|
1194
|
+
type: z66.literal("schematic_manual_edit_conflict_warning"),
|
|
1187
1195
|
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1188
1196
|
"schematic_manual_edit_conflict_warning"
|
|
1189
1197
|
),
|
|
1190
|
-
warning_type:
|
|
1191
|
-
message:
|
|
1192
|
-
schematic_component_id:
|
|
1193
|
-
schematic_group_id:
|
|
1194
|
-
subcircuit_id:
|
|
1195
|
-
source_component_id:
|
|
1198
|
+
warning_type: z66.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),
|
|
1199
|
+
message: z66.string(),
|
|
1200
|
+
schematic_component_id: z66.string(),
|
|
1201
|
+
schematic_group_id: z66.string().optional(),
|
|
1202
|
+
subcircuit_id: z66.string().optional(),
|
|
1203
|
+
source_component_id: z66.string()
|
|
1196
1204
|
}).describe(
|
|
1197
1205
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
1198
1206
|
);
|
|
1199
1207
|
expectTypesMatch(true);
|
|
1200
1208
|
|
|
1201
1209
|
// src/schematic/schematic_group.ts
|
|
1202
|
-
import { z as
|
|
1203
|
-
var schematic_group =
|
|
1204
|
-
type:
|
|
1210
|
+
import { z as z67 } from "zod";
|
|
1211
|
+
var schematic_group = z67.object({
|
|
1212
|
+
type: z67.literal("schematic_group"),
|
|
1205
1213
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
1206
|
-
source_group_id:
|
|
1207
|
-
is_subcircuit:
|
|
1208
|
-
subcircuit_id:
|
|
1214
|
+
source_group_id: z67.string(),
|
|
1215
|
+
is_subcircuit: z67.boolean().optional(),
|
|
1216
|
+
subcircuit_id: z67.string().optional(),
|
|
1209
1217
|
width: length,
|
|
1210
1218
|
height: length,
|
|
1211
1219
|
center: point,
|
|
1212
|
-
schematic_component_ids:
|
|
1213
|
-
show_as_schematic_box:
|
|
1214
|
-
name:
|
|
1215
|
-
description:
|
|
1220
|
+
schematic_component_ids: z67.array(z67.string()),
|
|
1221
|
+
show_as_schematic_box: z67.boolean().optional(),
|
|
1222
|
+
name: z67.string().optional(),
|
|
1223
|
+
description: z67.string().optional()
|
|
1216
1224
|
}).describe("Defines a group of components on the schematic");
|
|
1217
1225
|
expectTypesMatch(true);
|
|
1218
1226
|
|
|
1219
1227
|
// src/schematic/schematic_table.ts
|
|
1220
|
-
import { z as
|
|
1221
|
-
var schematic_table =
|
|
1222
|
-
type:
|
|
1228
|
+
import { z as z68 } from "zod";
|
|
1229
|
+
var schematic_table = z68.object({
|
|
1230
|
+
type: z68.literal("schematic_table"),
|
|
1223
1231
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
1224
1232
|
anchor_position: point,
|
|
1225
|
-
column_widths:
|
|
1226
|
-
row_heights:
|
|
1233
|
+
column_widths: z68.array(distance),
|
|
1234
|
+
row_heights: z68.array(distance),
|
|
1227
1235
|
cell_padding: distance.optional(),
|
|
1228
1236
|
border_width: distance.optional(),
|
|
1229
|
-
subcircuit_id:
|
|
1230
|
-
schematic_component_id:
|
|
1237
|
+
subcircuit_id: z68.string().optional(),
|
|
1238
|
+
schematic_component_id: z68.string().optional(),
|
|
1231
1239
|
anchor: ninePointAnchor.optional()
|
|
1232
1240
|
}).describe("Defines a table on the schematic");
|
|
1233
1241
|
expectTypesMatch(true);
|
|
1234
1242
|
|
|
1235
1243
|
// src/schematic/schematic_table_cell.ts
|
|
1236
|
-
import { z as
|
|
1237
|
-
var schematic_table_cell =
|
|
1238
|
-
type:
|
|
1244
|
+
import { z as z69 } from "zod";
|
|
1245
|
+
var schematic_table_cell = z69.object({
|
|
1246
|
+
type: z69.literal("schematic_table_cell"),
|
|
1239
1247
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
1240
1248
|
"schematic_table_cell"
|
|
1241
1249
|
),
|
|
1242
|
-
schematic_table_id:
|
|
1243
|
-
start_row_index:
|
|
1244
|
-
end_row_index:
|
|
1245
|
-
start_column_index:
|
|
1246
|
-
end_column_index:
|
|
1247
|
-
text:
|
|
1250
|
+
schematic_table_id: z69.string(),
|
|
1251
|
+
start_row_index: z69.number(),
|
|
1252
|
+
end_row_index: z69.number(),
|
|
1253
|
+
start_column_index: z69.number(),
|
|
1254
|
+
end_column_index: z69.number(),
|
|
1255
|
+
text: z69.string().optional(),
|
|
1248
1256
|
center: point,
|
|
1249
1257
|
width: distance,
|
|
1250
1258
|
height: distance,
|
|
1251
|
-
horizontal_align:
|
|
1252
|
-
vertical_align:
|
|
1259
|
+
horizontal_align: z69.enum(["left", "center", "right"]).optional(),
|
|
1260
|
+
vertical_align: z69.enum(["top", "middle", "bottom"]).optional(),
|
|
1253
1261
|
font_size: distance.optional(),
|
|
1254
|
-
subcircuit_id:
|
|
1262
|
+
subcircuit_id: z69.string().optional()
|
|
1255
1263
|
}).describe("Defines a cell within a schematic_table");
|
|
1256
1264
|
expectTypesMatch(true);
|
|
1257
1265
|
|
|
1258
1266
|
// src/schematic/schematic_sheet.ts
|
|
1259
|
-
import { z as
|
|
1260
|
-
var schematic_sheet =
|
|
1261
|
-
type:
|
|
1267
|
+
import { z as z70 } from "zod";
|
|
1268
|
+
var schematic_sheet = z70.object({
|
|
1269
|
+
type: z70.literal("schematic_sheet"),
|
|
1262
1270
|
schematic_sheet_id: getZodPrefixedIdWithDefault("schematic_sheet"),
|
|
1263
|
-
name:
|
|
1264
|
-
subcircuit_id:
|
|
1271
|
+
name: z70.string().optional(),
|
|
1272
|
+
subcircuit_id: z70.string().optional()
|
|
1265
1273
|
}).describe(
|
|
1266
1274
|
"Defines a schematic sheet or page that components can be placed on"
|
|
1267
1275
|
);
|
|
1268
1276
|
expectTypesMatch(true);
|
|
1269
1277
|
|
|
1270
1278
|
// src/pcb/properties/brep.ts
|
|
1271
|
-
import { z as
|
|
1272
|
-
var point_with_bulge =
|
|
1279
|
+
import { z as z71 } from "zod";
|
|
1280
|
+
var point_with_bulge = z71.object({
|
|
1273
1281
|
x: distance,
|
|
1274
1282
|
y: distance,
|
|
1275
|
-
bulge:
|
|
1283
|
+
bulge: z71.number().optional()
|
|
1276
1284
|
});
|
|
1277
1285
|
expectTypesMatch(true);
|
|
1278
|
-
var ring =
|
|
1279
|
-
vertices:
|
|
1286
|
+
var ring = z71.object({
|
|
1287
|
+
vertices: z71.array(point_with_bulge)
|
|
1280
1288
|
});
|
|
1281
1289
|
expectTypesMatch(true);
|
|
1282
|
-
var brep_shape =
|
|
1290
|
+
var brep_shape = z71.object({
|
|
1283
1291
|
outer_ring: ring,
|
|
1284
|
-
inner_rings:
|
|
1292
|
+
inner_rings: z71.array(ring).default([])
|
|
1285
1293
|
});
|
|
1286
1294
|
expectTypesMatch(true);
|
|
1287
1295
|
|
|
1288
1296
|
// src/pcb/properties/pcb_route_hints.ts
|
|
1289
|
-
import { z as
|
|
1290
|
-
var pcb_route_hint =
|
|
1297
|
+
import { z as z72 } from "zod";
|
|
1298
|
+
var pcb_route_hint = z72.object({
|
|
1291
1299
|
x: distance,
|
|
1292
1300
|
y: distance,
|
|
1293
|
-
via:
|
|
1301
|
+
via: z72.boolean().optional(),
|
|
1294
1302
|
via_to_layer: layer_ref.optional()
|
|
1295
1303
|
});
|
|
1296
|
-
var pcb_route_hints =
|
|
1304
|
+
var pcb_route_hints = z72.array(pcb_route_hint);
|
|
1297
1305
|
expectTypesMatch(true);
|
|
1298
1306
|
expectTypesMatch(true);
|
|
1299
1307
|
|
|
1300
1308
|
// src/pcb/properties/route_hint_point.ts
|
|
1301
|
-
import { z as
|
|
1302
|
-
var route_hint_point =
|
|
1309
|
+
import { z as z73 } from "zod";
|
|
1310
|
+
var route_hint_point = z73.object({
|
|
1303
1311
|
x: distance,
|
|
1304
1312
|
y: distance,
|
|
1305
|
-
via:
|
|
1313
|
+
via: z73.boolean().optional(),
|
|
1306
1314
|
to_layer: layer_ref.optional(),
|
|
1307
1315
|
trace_width: distance.optional()
|
|
1308
1316
|
});
|
|
1309
1317
|
expectTypesMatch(true);
|
|
1310
1318
|
|
|
1311
1319
|
// src/pcb/pcb_component.ts
|
|
1312
|
-
import { z as
|
|
1313
|
-
var pcb_component =
|
|
1314
|
-
type:
|
|
1320
|
+
import { z as z74 } from "zod";
|
|
1321
|
+
var pcb_component = z74.object({
|
|
1322
|
+
type: z74.literal("pcb_component"),
|
|
1315
1323
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
1316
|
-
source_component_id:
|
|
1324
|
+
source_component_id: z74.string(),
|
|
1317
1325
|
center: point,
|
|
1318
1326
|
layer: layer_ref,
|
|
1319
1327
|
rotation,
|
|
1320
|
-
display_offset_x:
|
|
1328
|
+
display_offset_x: z74.string().optional().describe(
|
|
1321
1329
|
"How to display the x offset for this part, usually corresponding with how the user specified it"
|
|
1322
1330
|
),
|
|
1323
|
-
display_offset_y:
|
|
1331
|
+
display_offset_y: z74.string().optional().describe(
|
|
1324
1332
|
"How to display the y offset for this part, usually corresponding with how the user specified it"
|
|
1325
1333
|
),
|
|
1326
1334
|
width: length,
|
|
1327
1335
|
height: length,
|
|
1328
|
-
do_not_place:
|
|
1329
|
-
subcircuit_id:
|
|
1330
|
-
pcb_group_id:
|
|
1331
|
-
position_mode:
|
|
1332
|
-
positioned_relative_to_pcb_group_id:
|
|
1333
|
-
positioned_relative_to_pcb_board_id:
|
|
1334
|
-
obstructs_within_bounds:
|
|
1336
|
+
do_not_place: z74.boolean().optional(),
|
|
1337
|
+
subcircuit_id: z74.string().optional(),
|
|
1338
|
+
pcb_group_id: z74.string().optional(),
|
|
1339
|
+
position_mode: z74.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
1340
|
+
positioned_relative_to_pcb_group_id: z74.string().optional(),
|
|
1341
|
+
positioned_relative_to_pcb_board_id: z74.string().optional(),
|
|
1342
|
+
obstructs_within_bounds: z74.boolean().default(true).describe(
|
|
1335
1343
|
"Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath"
|
|
1336
1344
|
)
|
|
1337
1345
|
}).describe("Defines a component on the PCB");
|
|
1338
1346
|
expectTypesMatch(true);
|
|
1339
1347
|
|
|
1340
1348
|
// src/pcb/pcb_hole.ts
|
|
1341
|
-
import { z as
|
|
1342
|
-
var pcb_hole_circle =
|
|
1343
|
-
type:
|
|
1349
|
+
import { z as z75 } from "zod";
|
|
1350
|
+
var pcb_hole_circle = z75.object({
|
|
1351
|
+
type: z75.literal("pcb_hole"),
|
|
1344
1352
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1345
|
-
pcb_group_id:
|
|
1346
|
-
subcircuit_id:
|
|
1347
|
-
hole_shape:
|
|
1348
|
-
hole_diameter:
|
|
1353
|
+
pcb_group_id: z75.string().optional(),
|
|
1354
|
+
subcircuit_id: z75.string().optional(),
|
|
1355
|
+
hole_shape: z75.literal("circle"),
|
|
1356
|
+
hole_diameter: z75.number(),
|
|
1349
1357
|
x: distance,
|
|
1350
1358
|
y: distance,
|
|
1351
|
-
is_covered_with_solder_mask:
|
|
1352
|
-
soldermask_margin:
|
|
1359
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1360
|
+
soldermask_margin: z75.number().optional()
|
|
1353
1361
|
});
|
|
1354
1362
|
var pcb_hole_circle_shape = pcb_hole_circle.describe(
|
|
1355
1363
|
"Defines a circular hole on the PCB"
|
|
1356
1364
|
);
|
|
1357
1365
|
expectTypesMatch(true);
|
|
1358
|
-
var pcb_hole_rect =
|
|
1359
|
-
type:
|
|
1366
|
+
var pcb_hole_rect = z75.object({
|
|
1367
|
+
type: z75.literal("pcb_hole"),
|
|
1360
1368
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1361
|
-
pcb_group_id:
|
|
1362
|
-
subcircuit_id:
|
|
1363
|
-
hole_shape:
|
|
1364
|
-
hole_width:
|
|
1365
|
-
hole_height:
|
|
1369
|
+
pcb_group_id: z75.string().optional(),
|
|
1370
|
+
subcircuit_id: z75.string().optional(),
|
|
1371
|
+
hole_shape: z75.literal("rect"),
|
|
1372
|
+
hole_width: z75.number(),
|
|
1373
|
+
hole_height: z75.number(),
|
|
1366
1374
|
x: distance,
|
|
1367
1375
|
y: distance,
|
|
1368
|
-
is_covered_with_solder_mask:
|
|
1369
|
-
soldermask_margin:
|
|
1376
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1377
|
+
soldermask_margin: z75.number().optional()
|
|
1370
1378
|
});
|
|
1371
1379
|
var pcb_hole_rect_shape = pcb_hole_rect.describe(
|
|
1372
1380
|
"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
|
|
1373
1381
|
);
|
|
1374
1382
|
expectTypesMatch(true);
|
|
1375
|
-
var pcb_hole_circle_or_square =
|
|
1376
|
-
type:
|
|
1383
|
+
var pcb_hole_circle_or_square = z75.object({
|
|
1384
|
+
type: z75.literal("pcb_hole"),
|
|
1377
1385
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1378
|
-
pcb_group_id:
|
|
1379
|
-
subcircuit_id:
|
|
1380
|
-
hole_shape:
|
|
1381
|
-
hole_diameter:
|
|
1386
|
+
pcb_group_id: z75.string().optional(),
|
|
1387
|
+
subcircuit_id: z75.string().optional(),
|
|
1388
|
+
hole_shape: z75.enum(["circle", "square"]),
|
|
1389
|
+
hole_diameter: z75.number(),
|
|
1382
1390
|
x: distance,
|
|
1383
1391
|
y: distance,
|
|
1384
|
-
is_covered_with_solder_mask:
|
|
1385
|
-
soldermask_margin:
|
|
1392
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1393
|
+
soldermask_margin: z75.number().optional()
|
|
1386
1394
|
});
|
|
1387
1395
|
var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
1388
1396
|
"Defines a circular or square hole on the PCB"
|
|
1389
1397
|
);
|
|
1390
1398
|
expectTypesMatch(true);
|
|
1391
|
-
var pcb_hole_oval =
|
|
1392
|
-
type:
|
|
1399
|
+
var pcb_hole_oval = z75.object({
|
|
1400
|
+
type: z75.literal("pcb_hole"),
|
|
1393
1401
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1394
|
-
pcb_group_id:
|
|
1395
|
-
subcircuit_id:
|
|
1396
|
-
hole_shape:
|
|
1397
|
-
hole_width:
|
|
1398
|
-
hole_height:
|
|
1402
|
+
pcb_group_id: z75.string().optional(),
|
|
1403
|
+
subcircuit_id: z75.string().optional(),
|
|
1404
|
+
hole_shape: z75.literal("oval"),
|
|
1405
|
+
hole_width: z75.number(),
|
|
1406
|
+
hole_height: z75.number(),
|
|
1399
1407
|
x: distance,
|
|
1400
1408
|
y: distance,
|
|
1401
|
-
is_covered_with_solder_mask:
|
|
1402
|
-
soldermask_margin:
|
|
1409
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1410
|
+
soldermask_margin: z75.number().optional()
|
|
1403
1411
|
});
|
|
1404
1412
|
var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
1405
1413
|
"Defines an oval hole on the PCB"
|
|
1406
1414
|
);
|
|
1407
1415
|
expectTypesMatch(true);
|
|
1408
|
-
var pcb_hole_pill =
|
|
1409
|
-
type:
|
|
1416
|
+
var pcb_hole_pill = z75.object({
|
|
1417
|
+
type: z75.literal("pcb_hole"),
|
|
1410
1418
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1411
|
-
pcb_group_id:
|
|
1412
|
-
subcircuit_id:
|
|
1413
|
-
hole_shape:
|
|
1414
|
-
hole_width:
|
|
1415
|
-
hole_height:
|
|
1419
|
+
pcb_group_id: z75.string().optional(),
|
|
1420
|
+
subcircuit_id: z75.string().optional(),
|
|
1421
|
+
hole_shape: z75.literal("pill"),
|
|
1422
|
+
hole_width: z75.number(),
|
|
1423
|
+
hole_height: z75.number(),
|
|
1416
1424
|
x: distance,
|
|
1417
1425
|
y: distance,
|
|
1418
|
-
is_covered_with_solder_mask:
|
|
1419
|
-
soldermask_margin:
|
|
1426
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1427
|
+
soldermask_margin: z75.number().optional()
|
|
1420
1428
|
});
|
|
1421
1429
|
var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
1422
1430
|
"Defines a pill-shaped hole on the PCB"
|
|
1423
1431
|
);
|
|
1424
1432
|
expectTypesMatch(true);
|
|
1425
|
-
var pcb_hole_rotated_pill =
|
|
1426
|
-
type:
|
|
1433
|
+
var pcb_hole_rotated_pill = z75.object({
|
|
1434
|
+
type: z75.literal("pcb_hole"),
|
|
1427
1435
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1428
|
-
pcb_group_id:
|
|
1429
|
-
subcircuit_id:
|
|
1430
|
-
hole_shape:
|
|
1431
|
-
hole_width:
|
|
1432
|
-
hole_height:
|
|
1436
|
+
pcb_group_id: z75.string().optional(),
|
|
1437
|
+
subcircuit_id: z75.string().optional(),
|
|
1438
|
+
hole_shape: z75.literal("rotated_pill"),
|
|
1439
|
+
hole_width: z75.number(),
|
|
1440
|
+
hole_height: z75.number(),
|
|
1433
1441
|
x: distance,
|
|
1434
1442
|
y: distance,
|
|
1435
1443
|
ccw_rotation: rotation,
|
|
1436
|
-
is_covered_with_solder_mask:
|
|
1437
|
-
soldermask_margin:
|
|
1438
|
-
});
|
|
1444
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1445
|
+
soldermask_margin: z75.number().optional()
|
|
1446
|
+
});
|
|
1439
1447
|
var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
|
|
1440
1448
|
"Defines a rotated pill-shaped hole on the PCB"
|
|
1441
1449
|
);
|
|
@@ -1443,145 +1451,145 @@ expectTypesMatch(true);
|
|
|
1443
1451
|
var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval).or(pcb_hole_pill).or(pcb_hole_rotated_pill).or(pcb_hole_circle).or(pcb_hole_rect);
|
|
1444
1452
|
|
|
1445
1453
|
// src/pcb/pcb_plated_hole.ts
|
|
1446
|
-
import { z as
|
|
1447
|
-
var pcb_plated_hole_circle =
|
|
1448
|
-
type:
|
|
1449
|
-
shape:
|
|
1450
|
-
pcb_group_id:
|
|
1451
|
-
subcircuit_id:
|
|
1452
|
-
outer_diameter:
|
|
1453
|
-
hole_diameter:
|
|
1454
|
-
is_covered_with_solder_mask:
|
|
1454
|
+
import { z as z76 } from "zod";
|
|
1455
|
+
var pcb_plated_hole_circle = z76.object({
|
|
1456
|
+
type: z76.literal("pcb_plated_hole"),
|
|
1457
|
+
shape: z76.literal("circle"),
|
|
1458
|
+
pcb_group_id: z76.string().optional(),
|
|
1459
|
+
subcircuit_id: z76.string().optional(),
|
|
1460
|
+
outer_diameter: z76.number(),
|
|
1461
|
+
hole_diameter: z76.number(),
|
|
1462
|
+
is_covered_with_solder_mask: z76.boolean().optional(),
|
|
1455
1463
|
x: distance,
|
|
1456
1464
|
y: distance,
|
|
1457
|
-
layers:
|
|
1458
|
-
port_hints:
|
|
1459
|
-
pcb_component_id:
|
|
1460
|
-
pcb_port_id:
|
|
1465
|
+
layers: z76.array(layer_ref),
|
|
1466
|
+
port_hints: z76.array(z76.string()).optional(),
|
|
1467
|
+
pcb_component_id: z76.string().optional(),
|
|
1468
|
+
pcb_port_id: z76.string().optional(),
|
|
1461
1469
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1462
|
-
soldermask_margin:
|
|
1470
|
+
soldermask_margin: z76.number().optional()
|
|
1463
1471
|
});
|
|
1464
|
-
var pcb_plated_hole_oval =
|
|
1465
|
-
type:
|
|
1466
|
-
shape:
|
|
1467
|
-
pcb_group_id:
|
|
1468
|
-
subcircuit_id:
|
|
1469
|
-
outer_width:
|
|
1470
|
-
outer_height:
|
|
1471
|
-
hole_width:
|
|
1472
|
-
hole_height:
|
|
1473
|
-
is_covered_with_solder_mask:
|
|
1472
|
+
var pcb_plated_hole_oval = z76.object({
|
|
1473
|
+
type: z76.literal("pcb_plated_hole"),
|
|
1474
|
+
shape: z76.enum(["oval", "pill"]),
|
|
1475
|
+
pcb_group_id: z76.string().optional(),
|
|
1476
|
+
subcircuit_id: z76.string().optional(),
|
|
1477
|
+
outer_width: z76.number(),
|
|
1478
|
+
outer_height: z76.number(),
|
|
1479
|
+
hole_width: z76.number(),
|
|
1480
|
+
hole_height: z76.number(),
|
|
1481
|
+
is_covered_with_solder_mask: z76.boolean().optional(),
|
|
1474
1482
|
x: distance,
|
|
1475
1483
|
y: distance,
|
|
1476
1484
|
ccw_rotation: rotation,
|
|
1477
|
-
layers:
|
|
1478
|
-
port_hints:
|
|
1479
|
-
pcb_component_id:
|
|
1480
|
-
pcb_port_id:
|
|
1485
|
+
layers: z76.array(layer_ref),
|
|
1486
|
+
port_hints: z76.array(z76.string()).optional(),
|
|
1487
|
+
pcb_component_id: z76.string().optional(),
|
|
1488
|
+
pcb_port_id: z76.string().optional(),
|
|
1481
1489
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1482
|
-
soldermask_margin:
|
|
1490
|
+
soldermask_margin: z76.number().optional()
|
|
1483
1491
|
});
|
|
1484
|
-
var pcb_circular_hole_with_rect_pad =
|
|
1485
|
-
type:
|
|
1486
|
-
shape:
|
|
1487
|
-
pcb_group_id:
|
|
1488
|
-
subcircuit_id:
|
|
1489
|
-
hole_shape:
|
|
1490
|
-
pad_shape:
|
|
1491
|
-
hole_diameter:
|
|
1492
|
-
rect_pad_width:
|
|
1493
|
-
rect_pad_height:
|
|
1494
|
-
rect_border_radius:
|
|
1492
|
+
var pcb_circular_hole_with_rect_pad = z76.object({
|
|
1493
|
+
type: z76.literal("pcb_plated_hole"),
|
|
1494
|
+
shape: z76.literal("circular_hole_with_rect_pad"),
|
|
1495
|
+
pcb_group_id: z76.string().optional(),
|
|
1496
|
+
subcircuit_id: z76.string().optional(),
|
|
1497
|
+
hole_shape: z76.literal("circle"),
|
|
1498
|
+
pad_shape: z76.literal("rect"),
|
|
1499
|
+
hole_diameter: z76.number(),
|
|
1500
|
+
rect_pad_width: z76.number(),
|
|
1501
|
+
rect_pad_height: z76.number(),
|
|
1502
|
+
rect_border_radius: z76.number().optional(),
|
|
1495
1503
|
hole_offset_x: distance.default(0),
|
|
1496
1504
|
hole_offset_y: distance.default(0),
|
|
1497
|
-
is_covered_with_solder_mask:
|
|
1505
|
+
is_covered_with_solder_mask: z76.boolean().optional(),
|
|
1498
1506
|
x: distance,
|
|
1499
1507
|
y: distance,
|
|
1500
|
-
layers:
|
|
1501
|
-
port_hints:
|
|
1502
|
-
pcb_component_id:
|
|
1503
|
-
pcb_port_id:
|
|
1508
|
+
layers: z76.array(layer_ref),
|
|
1509
|
+
port_hints: z76.array(z76.string()).optional(),
|
|
1510
|
+
pcb_component_id: z76.string().optional(),
|
|
1511
|
+
pcb_port_id: z76.string().optional(),
|
|
1504
1512
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1505
|
-
soldermask_margin:
|
|
1513
|
+
soldermask_margin: z76.number().optional()
|
|
1506
1514
|
});
|
|
1507
|
-
var pcb_pill_hole_with_rect_pad =
|
|
1508
|
-
type:
|
|
1509
|
-
shape:
|
|
1510
|
-
pcb_group_id:
|
|
1511
|
-
subcircuit_id:
|
|
1512
|
-
hole_shape:
|
|
1513
|
-
pad_shape:
|
|
1514
|
-
hole_width:
|
|
1515
|
-
hole_height:
|
|
1516
|
-
rect_pad_width:
|
|
1517
|
-
rect_pad_height:
|
|
1518
|
-
rect_border_radius:
|
|
1515
|
+
var pcb_pill_hole_with_rect_pad = z76.object({
|
|
1516
|
+
type: z76.literal("pcb_plated_hole"),
|
|
1517
|
+
shape: z76.literal("pill_hole_with_rect_pad"),
|
|
1518
|
+
pcb_group_id: z76.string().optional(),
|
|
1519
|
+
subcircuit_id: z76.string().optional(),
|
|
1520
|
+
hole_shape: z76.literal("pill"),
|
|
1521
|
+
pad_shape: z76.literal("rect"),
|
|
1522
|
+
hole_width: z76.number(),
|
|
1523
|
+
hole_height: z76.number(),
|
|
1524
|
+
rect_pad_width: z76.number(),
|
|
1525
|
+
rect_pad_height: z76.number(),
|
|
1526
|
+
rect_border_radius: z76.number().optional(),
|
|
1519
1527
|
hole_offset_x: distance.default(0),
|
|
1520
1528
|
hole_offset_y: distance.default(0),
|
|
1521
|
-
is_covered_with_solder_mask:
|
|
1529
|
+
is_covered_with_solder_mask: z76.boolean().optional(),
|
|
1522
1530
|
x: distance,
|
|
1523
1531
|
y: distance,
|
|
1524
|
-
layers:
|
|
1525
|
-
port_hints:
|
|
1526
|
-
pcb_component_id:
|
|
1527
|
-
pcb_port_id:
|
|
1532
|
+
layers: z76.array(layer_ref),
|
|
1533
|
+
port_hints: z76.array(z76.string()).optional(),
|
|
1534
|
+
pcb_component_id: z76.string().optional(),
|
|
1535
|
+
pcb_port_id: z76.string().optional(),
|
|
1528
1536
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1529
|
-
soldermask_margin:
|
|
1537
|
+
soldermask_margin: z76.number().optional()
|
|
1530
1538
|
});
|
|
1531
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
1532
|
-
type:
|
|
1533
|
-
shape:
|
|
1534
|
-
pcb_group_id:
|
|
1535
|
-
subcircuit_id:
|
|
1536
|
-
hole_shape:
|
|
1537
|
-
pad_shape:
|
|
1538
|
-
hole_width:
|
|
1539
|
-
hole_height:
|
|
1539
|
+
var pcb_rotated_pill_hole_with_rect_pad = z76.object({
|
|
1540
|
+
type: z76.literal("pcb_plated_hole"),
|
|
1541
|
+
shape: z76.literal("rotated_pill_hole_with_rect_pad"),
|
|
1542
|
+
pcb_group_id: z76.string().optional(),
|
|
1543
|
+
subcircuit_id: z76.string().optional(),
|
|
1544
|
+
hole_shape: z76.literal("rotated_pill"),
|
|
1545
|
+
pad_shape: z76.literal("rect"),
|
|
1546
|
+
hole_width: z76.number(),
|
|
1547
|
+
hole_height: z76.number(),
|
|
1540
1548
|
hole_ccw_rotation: rotation,
|
|
1541
|
-
rect_pad_width:
|
|
1542
|
-
rect_pad_height:
|
|
1543
|
-
rect_border_radius:
|
|
1549
|
+
rect_pad_width: z76.number(),
|
|
1550
|
+
rect_pad_height: z76.number(),
|
|
1551
|
+
rect_border_radius: z76.number().optional(),
|
|
1544
1552
|
rect_ccw_rotation: rotation,
|
|
1545
1553
|
hole_offset_x: distance.default(0),
|
|
1546
1554
|
hole_offset_y: distance.default(0),
|
|
1547
|
-
is_covered_with_solder_mask:
|
|
1555
|
+
is_covered_with_solder_mask: z76.boolean().optional(),
|
|
1548
1556
|
x: distance,
|
|
1549
1557
|
y: distance,
|
|
1550
|
-
layers:
|
|
1551
|
-
port_hints:
|
|
1552
|
-
pcb_component_id:
|
|
1553
|
-
pcb_port_id:
|
|
1558
|
+
layers: z76.array(layer_ref),
|
|
1559
|
+
port_hints: z76.array(z76.string()).optional(),
|
|
1560
|
+
pcb_component_id: z76.string().optional(),
|
|
1561
|
+
pcb_port_id: z76.string().optional(),
|
|
1554
1562
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1555
|
-
soldermask_margin:
|
|
1563
|
+
soldermask_margin: z76.number().optional()
|
|
1556
1564
|
});
|
|
1557
|
-
var pcb_hole_with_polygon_pad =
|
|
1558
|
-
type:
|
|
1559
|
-
shape:
|
|
1560
|
-
pcb_group_id:
|
|
1561
|
-
subcircuit_id:
|
|
1562
|
-
hole_shape:
|
|
1563
|
-
hole_diameter:
|
|
1564
|
-
hole_width:
|
|
1565
|
-
hole_height:
|
|
1566
|
-
pad_outline:
|
|
1567
|
-
|
|
1565
|
+
var pcb_hole_with_polygon_pad = z76.object({
|
|
1566
|
+
type: z76.literal("pcb_plated_hole"),
|
|
1567
|
+
shape: z76.literal("hole_with_polygon_pad"),
|
|
1568
|
+
pcb_group_id: z76.string().optional(),
|
|
1569
|
+
subcircuit_id: z76.string().optional(),
|
|
1570
|
+
hole_shape: z76.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
1571
|
+
hole_diameter: z76.number().optional(),
|
|
1572
|
+
hole_width: z76.number().optional(),
|
|
1573
|
+
hole_height: z76.number().optional(),
|
|
1574
|
+
pad_outline: z76.array(
|
|
1575
|
+
z76.object({
|
|
1568
1576
|
x: distance,
|
|
1569
1577
|
y: distance
|
|
1570
1578
|
})
|
|
1571
1579
|
).min(3),
|
|
1572
1580
|
hole_offset_x: distance.default(0),
|
|
1573
1581
|
hole_offset_y: distance.default(0),
|
|
1574
|
-
is_covered_with_solder_mask:
|
|
1582
|
+
is_covered_with_solder_mask: z76.boolean().optional(),
|
|
1575
1583
|
x: distance,
|
|
1576
1584
|
y: distance,
|
|
1577
|
-
layers:
|
|
1578
|
-
port_hints:
|
|
1579
|
-
pcb_component_id:
|
|
1580
|
-
pcb_port_id:
|
|
1585
|
+
layers: z76.array(layer_ref),
|
|
1586
|
+
port_hints: z76.array(z76.string()).optional(),
|
|
1587
|
+
pcb_component_id: z76.string().optional(),
|
|
1588
|
+
pcb_port_id: z76.string().optional(),
|
|
1581
1589
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1582
|
-
soldermask_margin:
|
|
1590
|
+
soldermask_margin: z76.number().optional()
|
|
1583
1591
|
});
|
|
1584
|
-
var pcb_plated_hole =
|
|
1592
|
+
var pcb_plated_hole = z76.union([
|
|
1585
1593
|
pcb_plated_hole_circle,
|
|
1586
1594
|
pcb_plated_hole_oval,
|
|
1587
1595
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -1599,130 +1607,130 @@ expectTypesMatch(true);
|
|
|
1599
1607
|
expectTypesMatch(true);
|
|
1600
1608
|
|
|
1601
1609
|
// src/pcb/pcb_port.ts
|
|
1602
|
-
import { z as
|
|
1603
|
-
var pcb_port =
|
|
1604
|
-
type:
|
|
1610
|
+
import { z as z77 } from "zod";
|
|
1611
|
+
var pcb_port = z77.object({
|
|
1612
|
+
type: z77.literal("pcb_port"),
|
|
1605
1613
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
1606
|
-
pcb_group_id:
|
|
1607
|
-
subcircuit_id:
|
|
1608
|
-
source_port_id:
|
|
1609
|
-
pcb_component_id:
|
|
1614
|
+
pcb_group_id: z77.string().optional(),
|
|
1615
|
+
subcircuit_id: z77.string().optional(),
|
|
1616
|
+
source_port_id: z77.string(),
|
|
1617
|
+
pcb_component_id: z77.string().optional(),
|
|
1610
1618
|
x: distance,
|
|
1611
1619
|
y: distance,
|
|
1612
|
-
layers:
|
|
1613
|
-
is_board_pinout:
|
|
1620
|
+
layers: z77.array(layer_ref),
|
|
1621
|
+
is_board_pinout: z77.boolean().optional()
|
|
1614
1622
|
}).describe("Defines a port on the PCB");
|
|
1615
1623
|
expectTypesMatch(true);
|
|
1616
1624
|
|
|
1617
1625
|
// src/pcb/pcb_smtpad.ts
|
|
1618
|
-
import { z as
|
|
1619
|
-
var pcb_smtpad_circle =
|
|
1620
|
-
type:
|
|
1621
|
-
shape:
|
|
1626
|
+
import { z as z78 } from "zod";
|
|
1627
|
+
var pcb_smtpad_circle = z78.object({
|
|
1628
|
+
type: z78.literal("pcb_smtpad"),
|
|
1629
|
+
shape: z78.literal("circle"),
|
|
1622
1630
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1623
|
-
pcb_group_id:
|
|
1624
|
-
subcircuit_id:
|
|
1631
|
+
pcb_group_id: z78.string().optional(),
|
|
1632
|
+
subcircuit_id: z78.string().optional(),
|
|
1625
1633
|
x: distance,
|
|
1626
1634
|
y: distance,
|
|
1627
|
-
radius:
|
|
1635
|
+
radius: z78.number(),
|
|
1628
1636
|
layer: layer_ref,
|
|
1629
|
-
port_hints:
|
|
1630
|
-
pcb_component_id:
|
|
1631
|
-
pcb_port_id:
|
|
1632
|
-
is_covered_with_solder_mask:
|
|
1633
|
-
soldermask_margin:
|
|
1637
|
+
port_hints: z78.array(z78.string()).optional(),
|
|
1638
|
+
pcb_component_id: z78.string().optional(),
|
|
1639
|
+
pcb_port_id: z78.string().optional(),
|
|
1640
|
+
is_covered_with_solder_mask: z78.boolean().optional(),
|
|
1641
|
+
soldermask_margin: z78.number().optional()
|
|
1634
1642
|
});
|
|
1635
|
-
var pcb_smtpad_rect =
|
|
1636
|
-
type:
|
|
1637
|
-
shape:
|
|
1643
|
+
var pcb_smtpad_rect = z78.object({
|
|
1644
|
+
type: z78.literal("pcb_smtpad"),
|
|
1645
|
+
shape: z78.literal("rect"),
|
|
1638
1646
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1639
|
-
pcb_group_id:
|
|
1640
|
-
subcircuit_id:
|
|
1647
|
+
pcb_group_id: z78.string().optional(),
|
|
1648
|
+
subcircuit_id: z78.string().optional(),
|
|
1641
1649
|
x: distance,
|
|
1642
1650
|
y: distance,
|
|
1643
|
-
width:
|
|
1644
|
-
height:
|
|
1645
|
-
rect_border_radius:
|
|
1646
|
-
corner_radius:
|
|
1651
|
+
width: z78.number(),
|
|
1652
|
+
height: z78.number(),
|
|
1653
|
+
rect_border_radius: z78.number().optional(),
|
|
1654
|
+
corner_radius: z78.number().optional(),
|
|
1647
1655
|
layer: layer_ref,
|
|
1648
|
-
port_hints:
|
|
1649
|
-
pcb_component_id:
|
|
1650
|
-
pcb_port_id:
|
|
1651
|
-
is_covered_with_solder_mask:
|
|
1652
|
-
soldermask_margin:
|
|
1656
|
+
port_hints: z78.array(z78.string()).optional(),
|
|
1657
|
+
pcb_component_id: z78.string().optional(),
|
|
1658
|
+
pcb_port_id: z78.string().optional(),
|
|
1659
|
+
is_covered_with_solder_mask: z78.boolean().optional(),
|
|
1660
|
+
soldermask_margin: z78.number().optional()
|
|
1653
1661
|
});
|
|
1654
|
-
var pcb_smtpad_rotated_rect =
|
|
1655
|
-
type:
|
|
1656
|
-
shape:
|
|
1662
|
+
var pcb_smtpad_rotated_rect = z78.object({
|
|
1663
|
+
type: z78.literal("pcb_smtpad"),
|
|
1664
|
+
shape: z78.literal("rotated_rect"),
|
|
1657
1665
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1658
|
-
pcb_group_id:
|
|
1659
|
-
subcircuit_id:
|
|
1666
|
+
pcb_group_id: z78.string().optional(),
|
|
1667
|
+
subcircuit_id: z78.string().optional(),
|
|
1660
1668
|
x: distance,
|
|
1661
1669
|
y: distance,
|
|
1662
|
-
width:
|
|
1663
|
-
height:
|
|
1664
|
-
rect_border_radius:
|
|
1665
|
-
corner_radius:
|
|
1670
|
+
width: z78.number(),
|
|
1671
|
+
height: z78.number(),
|
|
1672
|
+
rect_border_radius: z78.number().optional(),
|
|
1673
|
+
corner_radius: z78.number().optional(),
|
|
1666
1674
|
ccw_rotation: rotation,
|
|
1667
1675
|
layer: layer_ref,
|
|
1668
|
-
port_hints:
|
|
1669
|
-
pcb_component_id:
|
|
1670
|
-
pcb_port_id:
|
|
1671
|
-
is_covered_with_solder_mask:
|
|
1672
|
-
soldermask_margin:
|
|
1676
|
+
port_hints: z78.array(z78.string()).optional(),
|
|
1677
|
+
pcb_component_id: z78.string().optional(),
|
|
1678
|
+
pcb_port_id: z78.string().optional(),
|
|
1679
|
+
is_covered_with_solder_mask: z78.boolean().optional(),
|
|
1680
|
+
soldermask_margin: z78.number().optional()
|
|
1673
1681
|
});
|
|
1674
|
-
var pcb_smtpad_pill =
|
|
1675
|
-
type:
|
|
1676
|
-
shape:
|
|
1682
|
+
var pcb_smtpad_pill = z78.object({
|
|
1683
|
+
type: z78.literal("pcb_smtpad"),
|
|
1684
|
+
shape: z78.literal("pill"),
|
|
1677
1685
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1678
|
-
pcb_group_id:
|
|
1679
|
-
subcircuit_id:
|
|
1686
|
+
pcb_group_id: z78.string().optional(),
|
|
1687
|
+
subcircuit_id: z78.string().optional(),
|
|
1680
1688
|
x: distance,
|
|
1681
1689
|
y: distance,
|
|
1682
|
-
width:
|
|
1683
|
-
height:
|
|
1684
|
-
radius:
|
|
1690
|
+
width: z78.number(),
|
|
1691
|
+
height: z78.number(),
|
|
1692
|
+
radius: z78.number(),
|
|
1685
1693
|
layer: layer_ref,
|
|
1686
|
-
port_hints:
|
|
1687
|
-
pcb_component_id:
|
|
1688
|
-
pcb_port_id:
|
|
1689
|
-
is_covered_with_solder_mask:
|
|
1690
|
-
soldermask_margin:
|
|
1694
|
+
port_hints: z78.array(z78.string()).optional(),
|
|
1695
|
+
pcb_component_id: z78.string().optional(),
|
|
1696
|
+
pcb_port_id: z78.string().optional(),
|
|
1697
|
+
is_covered_with_solder_mask: z78.boolean().optional(),
|
|
1698
|
+
soldermask_margin: z78.number().optional()
|
|
1691
1699
|
});
|
|
1692
|
-
var pcb_smtpad_rotated_pill =
|
|
1693
|
-
type:
|
|
1694
|
-
shape:
|
|
1700
|
+
var pcb_smtpad_rotated_pill = z78.object({
|
|
1701
|
+
type: z78.literal("pcb_smtpad"),
|
|
1702
|
+
shape: z78.literal("rotated_pill"),
|
|
1695
1703
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1696
|
-
pcb_group_id:
|
|
1697
|
-
subcircuit_id:
|
|
1704
|
+
pcb_group_id: z78.string().optional(),
|
|
1705
|
+
subcircuit_id: z78.string().optional(),
|
|
1698
1706
|
x: distance,
|
|
1699
1707
|
y: distance,
|
|
1700
|
-
width:
|
|
1701
|
-
height:
|
|
1702
|
-
radius:
|
|
1708
|
+
width: z78.number(),
|
|
1709
|
+
height: z78.number(),
|
|
1710
|
+
radius: z78.number(),
|
|
1703
1711
|
ccw_rotation: rotation,
|
|
1704
1712
|
layer: layer_ref,
|
|
1705
|
-
port_hints:
|
|
1706
|
-
pcb_component_id:
|
|
1707
|
-
pcb_port_id:
|
|
1708
|
-
is_covered_with_solder_mask:
|
|
1709
|
-
soldermask_margin:
|
|
1713
|
+
port_hints: z78.array(z78.string()).optional(),
|
|
1714
|
+
pcb_component_id: z78.string().optional(),
|
|
1715
|
+
pcb_port_id: z78.string().optional(),
|
|
1716
|
+
is_covered_with_solder_mask: z78.boolean().optional(),
|
|
1717
|
+
soldermask_margin: z78.number().optional()
|
|
1710
1718
|
});
|
|
1711
|
-
var pcb_smtpad_polygon =
|
|
1712
|
-
type:
|
|
1713
|
-
shape:
|
|
1719
|
+
var pcb_smtpad_polygon = z78.object({
|
|
1720
|
+
type: z78.literal("pcb_smtpad"),
|
|
1721
|
+
shape: z78.literal("polygon"),
|
|
1714
1722
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1715
|
-
pcb_group_id:
|
|
1716
|
-
subcircuit_id:
|
|
1717
|
-
points:
|
|
1723
|
+
pcb_group_id: z78.string().optional(),
|
|
1724
|
+
subcircuit_id: z78.string().optional(),
|
|
1725
|
+
points: z78.array(point),
|
|
1718
1726
|
layer: layer_ref,
|
|
1719
|
-
port_hints:
|
|
1720
|
-
pcb_component_id:
|
|
1721
|
-
pcb_port_id:
|
|
1722
|
-
is_covered_with_solder_mask:
|
|
1723
|
-
soldermask_margin:
|
|
1727
|
+
port_hints: z78.array(z78.string()).optional(),
|
|
1728
|
+
pcb_component_id: z78.string().optional(),
|
|
1729
|
+
pcb_port_id: z78.string().optional(),
|
|
1730
|
+
is_covered_with_solder_mask: z78.boolean().optional(),
|
|
1731
|
+
soldermask_margin: z78.number().optional()
|
|
1724
1732
|
});
|
|
1725
|
-
var pcb_smtpad =
|
|
1733
|
+
var pcb_smtpad = z78.discriminatedUnion("shape", [
|
|
1726
1734
|
pcb_smtpad_circle,
|
|
1727
1735
|
pcb_smtpad_rect,
|
|
1728
1736
|
pcb_smtpad_rotated_rect,
|
|
@@ -1738,79 +1746,79 @@ expectTypesMatch(true);
|
|
|
1738
1746
|
expectTypesMatch(true);
|
|
1739
1747
|
|
|
1740
1748
|
// src/pcb/pcb_solder_paste.ts
|
|
1741
|
-
import { z as
|
|
1742
|
-
var pcb_solder_paste_circle =
|
|
1743
|
-
type:
|
|
1744
|
-
shape:
|
|
1749
|
+
import { z as z79 } from "zod";
|
|
1750
|
+
var pcb_solder_paste_circle = z79.object({
|
|
1751
|
+
type: z79.literal("pcb_solder_paste"),
|
|
1752
|
+
shape: z79.literal("circle"),
|
|
1745
1753
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1746
|
-
pcb_group_id:
|
|
1747
|
-
subcircuit_id:
|
|
1754
|
+
pcb_group_id: z79.string().optional(),
|
|
1755
|
+
subcircuit_id: z79.string().optional(),
|
|
1748
1756
|
x: distance,
|
|
1749
1757
|
y: distance,
|
|
1750
|
-
radius:
|
|
1758
|
+
radius: z79.number(),
|
|
1751
1759
|
layer: layer_ref,
|
|
1752
|
-
pcb_component_id:
|
|
1753
|
-
pcb_smtpad_id:
|
|
1760
|
+
pcb_component_id: z79.string().optional(),
|
|
1761
|
+
pcb_smtpad_id: z79.string().optional()
|
|
1754
1762
|
});
|
|
1755
|
-
var pcb_solder_paste_rect =
|
|
1756
|
-
type:
|
|
1757
|
-
shape:
|
|
1763
|
+
var pcb_solder_paste_rect = z79.object({
|
|
1764
|
+
type: z79.literal("pcb_solder_paste"),
|
|
1765
|
+
shape: z79.literal("rect"),
|
|
1758
1766
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1759
|
-
pcb_group_id:
|
|
1760
|
-
subcircuit_id:
|
|
1767
|
+
pcb_group_id: z79.string().optional(),
|
|
1768
|
+
subcircuit_id: z79.string().optional(),
|
|
1761
1769
|
x: distance,
|
|
1762
1770
|
y: distance,
|
|
1763
|
-
width:
|
|
1764
|
-
height:
|
|
1771
|
+
width: z79.number(),
|
|
1772
|
+
height: z79.number(),
|
|
1765
1773
|
layer: layer_ref,
|
|
1766
|
-
pcb_component_id:
|
|
1767
|
-
pcb_smtpad_id:
|
|
1774
|
+
pcb_component_id: z79.string().optional(),
|
|
1775
|
+
pcb_smtpad_id: z79.string().optional()
|
|
1768
1776
|
});
|
|
1769
|
-
var pcb_solder_paste_pill =
|
|
1770
|
-
type:
|
|
1771
|
-
shape:
|
|
1777
|
+
var pcb_solder_paste_pill = z79.object({
|
|
1778
|
+
type: z79.literal("pcb_solder_paste"),
|
|
1779
|
+
shape: z79.literal("pill"),
|
|
1772
1780
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1773
|
-
pcb_group_id:
|
|
1774
|
-
subcircuit_id:
|
|
1781
|
+
pcb_group_id: z79.string().optional(),
|
|
1782
|
+
subcircuit_id: z79.string().optional(),
|
|
1775
1783
|
x: distance,
|
|
1776
1784
|
y: distance,
|
|
1777
|
-
width:
|
|
1778
|
-
height:
|
|
1779
|
-
radius:
|
|
1785
|
+
width: z79.number(),
|
|
1786
|
+
height: z79.number(),
|
|
1787
|
+
radius: z79.number(),
|
|
1780
1788
|
layer: layer_ref,
|
|
1781
|
-
pcb_component_id:
|
|
1782
|
-
pcb_smtpad_id:
|
|
1789
|
+
pcb_component_id: z79.string().optional(),
|
|
1790
|
+
pcb_smtpad_id: z79.string().optional()
|
|
1783
1791
|
});
|
|
1784
|
-
var pcb_solder_paste_rotated_rect =
|
|
1785
|
-
type:
|
|
1786
|
-
shape:
|
|
1792
|
+
var pcb_solder_paste_rotated_rect = z79.object({
|
|
1793
|
+
type: z79.literal("pcb_solder_paste"),
|
|
1794
|
+
shape: z79.literal("rotated_rect"),
|
|
1787
1795
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1788
|
-
pcb_group_id:
|
|
1789
|
-
subcircuit_id:
|
|
1796
|
+
pcb_group_id: z79.string().optional(),
|
|
1797
|
+
subcircuit_id: z79.string().optional(),
|
|
1790
1798
|
x: distance,
|
|
1791
1799
|
y: distance,
|
|
1792
|
-
width:
|
|
1793
|
-
height:
|
|
1800
|
+
width: z79.number(),
|
|
1801
|
+
height: z79.number(),
|
|
1794
1802
|
ccw_rotation: distance,
|
|
1795
1803
|
layer: layer_ref,
|
|
1796
|
-
pcb_component_id:
|
|
1797
|
-
pcb_smtpad_id:
|
|
1804
|
+
pcb_component_id: z79.string().optional(),
|
|
1805
|
+
pcb_smtpad_id: z79.string().optional()
|
|
1798
1806
|
});
|
|
1799
|
-
var pcb_solder_paste_oval =
|
|
1800
|
-
type:
|
|
1801
|
-
shape:
|
|
1807
|
+
var pcb_solder_paste_oval = z79.object({
|
|
1808
|
+
type: z79.literal("pcb_solder_paste"),
|
|
1809
|
+
shape: z79.literal("oval"),
|
|
1802
1810
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1803
|
-
pcb_group_id:
|
|
1804
|
-
subcircuit_id:
|
|
1811
|
+
pcb_group_id: z79.string().optional(),
|
|
1812
|
+
subcircuit_id: z79.string().optional(),
|
|
1805
1813
|
x: distance,
|
|
1806
1814
|
y: distance,
|
|
1807
|
-
width:
|
|
1808
|
-
height:
|
|
1815
|
+
width: z79.number(),
|
|
1816
|
+
height: z79.number(),
|
|
1809
1817
|
layer: layer_ref,
|
|
1810
|
-
pcb_component_id:
|
|
1811
|
-
pcb_smtpad_id:
|
|
1818
|
+
pcb_component_id: z79.string().optional(),
|
|
1819
|
+
pcb_smtpad_id: z79.string().optional()
|
|
1812
1820
|
});
|
|
1813
|
-
var pcb_solder_paste =
|
|
1821
|
+
var pcb_solder_paste = z79.union([
|
|
1814
1822
|
pcb_solder_paste_circle,
|
|
1815
1823
|
pcb_solder_paste_rect,
|
|
1816
1824
|
pcb_solder_paste_pill,
|
|
@@ -1826,146 +1834,146 @@ expectTypesMatch(
|
|
|
1826
1834
|
expectTypesMatch(true);
|
|
1827
1835
|
|
|
1828
1836
|
// src/pcb/pcb_text.ts
|
|
1829
|
-
import { z as
|
|
1830
|
-
var pcb_text =
|
|
1831
|
-
type:
|
|
1837
|
+
import { z as z80 } from "zod";
|
|
1838
|
+
var pcb_text = z80.object({
|
|
1839
|
+
type: z80.literal("pcb_text"),
|
|
1832
1840
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
1833
|
-
pcb_group_id:
|
|
1834
|
-
subcircuit_id:
|
|
1835
|
-
text:
|
|
1841
|
+
pcb_group_id: z80.string().optional(),
|
|
1842
|
+
subcircuit_id: z80.string().optional(),
|
|
1843
|
+
text: z80.string(),
|
|
1836
1844
|
center: point,
|
|
1837
1845
|
layer: layer_ref,
|
|
1838
1846
|
width: length,
|
|
1839
1847
|
height: length,
|
|
1840
|
-
lines:
|
|
1848
|
+
lines: z80.number(),
|
|
1841
1849
|
// @ts-ignore
|
|
1842
|
-
align:
|
|
1850
|
+
align: z80.enum(["bottom-left"])
|
|
1843
1851
|
}).describe("Defines text on the PCB");
|
|
1844
1852
|
expectTypesMatch(true);
|
|
1845
1853
|
|
|
1846
1854
|
// src/pcb/pcb_trace.ts
|
|
1847
|
-
import { z as
|
|
1848
|
-
var pcb_trace_route_point_wire =
|
|
1849
|
-
route_type:
|
|
1855
|
+
import { z as z81 } from "zod";
|
|
1856
|
+
var pcb_trace_route_point_wire = z81.object({
|
|
1857
|
+
route_type: z81.literal("wire"),
|
|
1850
1858
|
x: distance,
|
|
1851
1859
|
y: distance,
|
|
1852
1860
|
width: distance,
|
|
1853
|
-
start_pcb_port_id:
|
|
1854
|
-
end_pcb_port_id:
|
|
1861
|
+
start_pcb_port_id: z81.string().optional(),
|
|
1862
|
+
end_pcb_port_id: z81.string().optional(),
|
|
1855
1863
|
layer: layer_ref
|
|
1856
1864
|
});
|
|
1857
|
-
var pcb_trace_route_point_via =
|
|
1858
|
-
route_type:
|
|
1865
|
+
var pcb_trace_route_point_via = z81.object({
|
|
1866
|
+
route_type: z81.literal("via"),
|
|
1859
1867
|
x: distance,
|
|
1860
1868
|
y: distance,
|
|
1861
1869
|
hole_diameter: distance.optional(),
|
|
1862
1870
|
outer_diameter: distance.optional(),
|
|
1863
|
-
from_layer:
|
|
1864
|
-
to_layer:
|
|
1871
|
+
from_layer: z81.string(),
|
|
1872
|
+
to_layer: z81.string()
|
|
1865
1873
|
});
|
|
1866
|
-
var pcb_trace_route_point =
|
|
1874
|
+
var pcb_trace_route_point = z81.union([
|
|
1867
1875
|
pcb_trace_route_point_wire,
|
|
1868
1876
|
pcb_trace_route_point_via
|
|
1869
1877
|
]);
|
|
1870
|
-
var pcb_trace =
|
|
1871
|
-
type:
|
|
1872
|
-
source_trace_id:
|
|
1873
|
-
pcb_component_id:
|
|
1878
|
+
var pcb_trace = z81.object({
|
|
1879
|
+
type: z81.literal("pcb_trace"),
|
|
1880
|
+
source_trace_id: z81.string().optional(),
|
|
1881
|
+
pcb_component_id: z81.string().optional(),
|
|
1874
1882
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
1875
|
-
pcb_group_id:
|
|
1876
|
-
subcircuit_id:
|
|
1877
|
-
route_thickness_mode:
|
|
1878
|
-
route_order_index:
|
|
1879
|
-
should_round_corners:
|
|
1880
|
-
trace_length:
|
|
1881
|
-
highlight_color:
|
|
1882
|
-
route:
|
|
1883
|
+
pcb_group_id: z81.string().optional(),
|
|
1884
|
+
subcircuit_id: z81.string().optional(),
|
|
1885
|
+
route_thickness_mode: z81.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
1886
|
+
route_order_index: z81.number().optional(),
|
|
1887
|
+
should_round_corners: z81.boolean().optional(),
|
|
1888
|
+
trace_length: z81.number().optional(),
|
|
1889
|
+
highlight_color: z81.string().optional(),
|
|
1890
|
+
route: z81.array(pcb_trace_route_point)
|
|
1883
1891
|
}).describe("Defines a trace on the PCB");
|
|
1884
1892
|
expectTypesMatch(true);
|
|
1885
1893
|
expectTypesMatch(true);
|
|
1886
1894
|
|
|
1887
1895
|
// src/pcb/pcb_trace_error.ts
|
|
1888
|
-
import { z as
|
|
1889
|
-
var pcb_trace_error =
|
|
1890
|
-
type:
|
|
1896
|
+
import { z as z82 } from "zod";
|
|
1897
|
+
var pcb_trace_error = z82.object({
|
|
1898
|
+
type: z82.literal("pcb_trace_error"),
|
|
1891
1899
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
1892
|
-
error_type:
|
|
1893
|
-
message:
|
|
1900
|
+
error_type: z82.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
1901
|
+
message: z82.string(),
|
|
1894
1902
|
center: point.optional(),
|
|
1895
|
-
pcb_trace_id:
|
|
1896
|
-
source_trace_id:
|
|
1897
|
-
pcb_component_ids:
|
|
1898
|
-
pcb_port_ids:
|
|
1899
|
-
subcircuit_id:
|
|
1903
|
+
pcb_trace_id: z82.string(),
|
|
1904
|
+
source_trace_id: z82.string(),
|
|
1905
|
+
pcb_component_ids: z82.array(z82.string()),
|
|
1906
|
+
pcb_port_ids: z82.array(z82.string()),
|
|
1907
|
+
subcircuit_id: z82.string().optional()
|
|
1900
1908
|
}).describe("Defines a trace error on the PCB");
|
|
1901
1909
|
expectTypesMatch(true);
|
|
1902
1910
|
|
|
1903
1911
|
// src/pcb/pcb_trace_missing_error.ts
|
|
1904
|
-
import { z as
|
|
1905
|
-
var pcb_trace_missing_error =
|
|
1906
|
-
type:
|
|
1912
|
+
import { z as z83 } from "zod";
|
|
1913
|
+
var pcb_trace_missing_error = z83.object({
|
|
1914
|
+
type: z83.literal("pcb_trace_missing_error"),
|
|
1907
1915
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
1908
1916
|
"pcb_trace_missing_error"
|
|
1909
1917
|
),
|
|
1910
|
-
error_type:
|
|
1911
|
-
message:
|
|
1918
|
+
error_type: z83.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
1919
|
+
message: z83.string(),
|
|
1912
1920
|
center: point.optional(),
|
|
1913
|
-
source_trace_id:
|
|
1914
|
-
pcb_component_ids:
|
|
1915
|
-
pcb_port_ids:
|
|
1916
|
-
subcircuit_id:
|
|
1921
|
+
source_trace_id: z83.string(),
|
|
1922
|
+
pcb_component_ids: z83.array(z83.string()),
|
|
1923
|
+
pcb_port_ids: z83.array(z83.string()),
|
|
1924
|
+
subcircuit_id: z83.string().optional()
|
|
1917
1925
|
}).describe(
|
|
1918
1926
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
1919
1927
|
);
|
|
1920
1928
|
expectTypesMatch(true);
|
|
1921
1929
|
|
|
1922
1930
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
1923
|
-
import { z as
|
|
1924
|
-
var pcb_port_not_matched_error =
|
|
1925
|
-
type:
|
|
1931
|
+
import { z as z84 } from "zod";
|
|
1932
|
+
var pcb_port_not_matched_error = z84.object({
|
|
1933
|
+
type: z84.literal("pcb_port_not_matched_error"),
|
|
1926
1934
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1927
|
-
error_type:
|
|
1928
|
-
message:
|
|
1929
|
-
pcb_component_ids:
|
|
1930
|
-
subcircuit_id:
|
|
1935
|
+
error_type: z84.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
1936
|
+
message: z84.string(),
|
|
1937
|
+
pcb_component_ids: z84.array(z84.string()),
|
|
1938
|
+
subcircuit_id: z84.string().optional()
|
|
1931
1939
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
1932
1940
|
expectTypesMatch(true);
|
|
1933
1941
|
|
|
1934
1942
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
1935
|
-
import { z as
|
|
1936
|
-
var pcb_port_not_connected_error =
|
|
1937
|
-
type:
|
|
1943
|
+
import { z as z85 } from "zod";
|
|
1944
|
+
var pcb_port_not_connected_error = z85.object({
|
|
1945
|
+
type: z85.literal("pcb_port_not_connected_error"),
|
|
1938
1946
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
1939
1947
|
"pcb_port_not_connected_error"
|
|
1940
1948
|
),
|
|
1941
|
-
error_type:
|
|
1942
|
-
message:
|
|
1943
|
-
pcb_port_ids:
|
|
1944
|
-
pcb_component_ids:
|
|
1945
|
-
subcircuit_id:
|
|
1949
|
+
error_type: z85.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
1950
|
+
message: z85.string(),
|
|
1951
|
+
pcb_port_ids: z85.array(z85.string()),
|
|
1952
|
+
pcb_component_ids: z85.array(z85.string()),
|
|
1953
|
+
subcircuit_id: z85.string().optional()
|
|
1946
1954
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
1947
1955
|
expectTypesMatch(
|
|
1948
1956
|
true
|
|
1949
1957
|
);
|
|
1950
1958
|
|
|
1951
1959
|
// src/pcb/pcb_net.ts
|
|
1952
|
-
import { z as
|
|
1953
|
-
var pcb_net =
|
|
1954
|
-
type:
|
|
1960
|
+
import { z as z86 } from "zod";
|
|
1961
|
+
var pcb_net = z86.object({
|
|
1962
|
+
type: z86.literal("pcb_net"),
|
|
1955
1963
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
1956
|
-
source_net_id:
|
|
1957
|
-
highlight_color:
|
|
1964
|
+
source_net_id: z86.string().optional(),
|
|
1965
|
+
highlight_color: z86.string().optional()
|
|
1958
1966
|
}).describe("Defines a net on the PCB");
|
|
1959
1967
|
expectTypesMatch(true);
|
|
1960
1968
|
|
|
1961
1969
|
// src/pcb/pcb_via.ts
|
|
1962
|
-
import { z as
|
|
1963
|
-
var pcb_via =
|
|
1964
|
-
type:
|
|
1970
|
+
import { z as z87 } from "zod";
|
|
1971
|
+
var pcb_via = z87.object({
|
|
1972
|
+
type: z87.literal("pcb_via"),
|
|
1965
1973
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
1966
|
-
pcb_group_id:
|
|
1967
|
-
subcircuit_id:
|
|
1968
|
-
subcircuit_connectivity_map_key:
|
|
1974
|
+
pcb_group_id: z87.string().optional(),
|
|
1975
|
+
subcircuit_id: z87.string().optional(),
|
|
1976
|
+
subcircuit_connectivity_map_key: z87.string().optional(),
|
|
1969
1977
|
x: distance,
|
|
1970
1978
|
y: distance,
|
|
1971
1979
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -1974,76 +1982,76 @@ var pcb_via = z86.object({
|
|
|
1974
1982
|
from_layer: layer_ref.optional(),
|
|
1975
1983
|
/** @deprecated */
|
|
1976
1984
|
to_layer: layer_ref.optional(),
|
|
1977
|
-
layers:
|
|
1978
|
-
pcb_trace_id:
|
|
1979
|
-
net_is_assignable:
|
|
1980
|
-
net_assigned:
|
|
1981
|
-
is_tented:
|
|
1985
|
+
layers: z87.array(layer_ref),
|
|
1986
|
+
pcb_trace_id: z87.string().optional(),
|
|
1987
|
+
net_is_assignable: z87.boolean().optional(),
|
|
1988
|
+
net_assigned: z87.boolean().optional(),
|
|
1989
|
+
is_tented: z87.boolean().optional()
|
|
1982
1990
|
}).describe("Defines a via on the PCB");
|
|
1983
1991
|
expectTypesMatch(true);
|
|
1984
1992
|
|
|
1985
1993
|
// src/pcb/pcb_board.ts
|
|
1986
|
-
import { z as
|
|
1987
|
-
var pcb_board =
|
|
1988
|
-
type:
|
|
1994
|
+
import { z as z88 } from "zod";
|
|
1995
|
+
var pcb_board = z88.object({
|
|
1996
|
+
type: z88.literal("pcb_board"),
|
|
1989
1997
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
1990
|
-
pcb_panel_id:
|
|
1991
|
-
is_subcircuit:
|
|
1992
|
-
subcircuit_id:
|
|
1998
|
+
pcb_panel_id: z88.string().optional(),
|
|
1999
|
+
is_subcircuit: z88.boolean().optional(),
|
|
2000
|
+
subcircuit_id: z88.string().optional(),
|
|
1993
2001
|
width: length.optional(),
|
|
1994
2002
|
height: length.optional(),
|
|
1995
2003
|
center: point,
|
|
1996
2004
|
thickness: length.optional().default(1.4),
|
|
1997
|
-
num_layers:
|
|
1998
|
-
outline:
|
|
1999
|
-
shape:
|
|
2000
|
-
material:
|
|
2005
|
+
num_layers: z88.number().optional().default(4),
|
|
2006
|
+
outline: z88.array(point).optional(),
|
|
2007
|
+
shape: z88.enum(["rect", "polygon"]).optional(),
|
|
2008
|
+
material: z88.enum(["fr4", "fr1"]).default("fr4")
|
|
2001
2009
|
}).describe("Defines the board outline of the PCB");
|
|
2002
2010
|
expectTypesMatch(true);
|
|
2003
2011
|
|
|
2004
2012
|
// src/pcb/pcb_panel.ts
|
|
2005
|
-
import { z as
|
|
2006
|
-
var pcb_panel =
|
|
2007
|
-
type:
|
|
2013
|
+
import { z as z89 } from "zod";
|
|
2014
|
+
var pcb_panel = z89.object({
|
|
2015
|
+
type: z89.literal("pcb_panel"),
|
|
2008
2016
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2009
2017
|
width: length,
|
|
2010
2018
|
height: length,
|
|
2011
2019
|
center: point,
|
|
2012
|
-
covered_with_solder_mask:
|
|
2020
|
+
covered_with_solder_mask: z89.boolean().optional().default(true)
|
|
2013
2021
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2014
2022
|
expectTypesMatch(true);
|
|
2015
2023
|
|
|
2016
2024
|
// src/pcb/pcb_placement_error.ts
|
|
2017
|
-
import { z as
|
|
2018
|
-
var pcb_placement_error =
|
|
2019
|
-
type:
|
|
2025
|
+
import { z as z90 } from "zod";
|
|
2026
|
+
var pcb_placement_error = z90.object({
|
|
2027
|
+
type: z90.literal("pcb_placement_error"),
|
|
2020
2028
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2021
|
-
error_type:
|
|
2022
|
-
message:
|
|
2023
|
-
subcircuit_id:
|
|
2029
|
+
error_type: z90.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2030
|
+
message: z90.string(),
|
|
2031
|
+
subcircuit_id: z90.string().optional()
|
|
2024
2032
|
}).describe("Defines a placement error on the PCB");
|
|
2025
2033
|
expectTypesMatch(true);
|
|
2026
2034
|
|
|
2027
2035
|
// src/pcb/pcb_trace_hint.ts
|
|
2028
|
-
import { z as
|
|
2029
|
-
var pcb_trace_hint =
|
|
2030
|
-
type:
|
|
2036
|
+
import { z as z91 } from "zod";
|
|
2037
|
+
var pcb_trace_hint = z91.object({
|
|
2038
|
+
type: z91.literal("pcb_trace_hint"),
|
|
2031
2039
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2032
|
-
pcb_port_id:
|
|
2033
|
-
pcb_component_id:
|
|
2034
|
-
route:
|
|
2035
|
-
subcircuit_id:
|
|
2040
|
+
pcb_port_id: z91.string(),
|
|
2041
|
+
pcb_component_id: z91.string(),
|
|
2042
|
+
route: z91.array(route_hint_point),
|
|
2043
|
+
subcircuit_id: z91.string().optional()
|
|
2036
2044
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2037
2045
|
expectTypesMatch(true);
|
|
2038
2046
|
|
|
2039
2047
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2040
|
-
import { z as
|
|
2041
|
-
var pcb_silkscreen_line =
|
|
2042
|
-
type:
|
|
2048
|
+
import { z as z92 } from "zod";
|
|
2049
|
+
var pcb_silkscreen_line = z92.object({
|
|
2050
|
+
type: z92.literal("pcb_silkscreen_line"),
|
|
2043
2051
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2044
|
-
pcb_component_id:
|
|
2045
|
-
pcb_group_id:
|
|
2046
|
-
subcircuit_id:
|
|
2052
|
+
pcb_component_id: z92.string(),
|
|
2053
|
+
pcb_group_id: z92.string().optional(),
|
|
2054
|
+
subcircuit_id: z92.string().optional(),
|
|
2047
2055
|
stroke_width: distance.default("0.1mm"),
|
|
2048
2056
|
x1: distance,
|
|
2049
2057
|
y1: distance,
|
|
@@ -2054,32 +2062,32 @@ var pcb_silkscreen_line = z91.object({
|
|
|
2054
2062
|
expectTypesMatch(true);
|
|
2055
2063
|
|
|
2056
2064
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2057
|
-
import { z as
|
|
2058
|
-
var pcb_silkscreen_path =
|
|
2059
|
-
type:
|
|
2065
|
+
import { z as z93 } from "zod";
|
|
2066
|
+
var pcb_silkscreen_path = z93.object({
|
|
2067
|
+
type: z93.literal("pcb_silkscreen_path"),
|
|
2060
2068
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2061
|
-
pcb_component_id:
|
|
2062
|
-
pcb_group_id:
|
|
2063
|
-
subcircuit_id:
|
|
2069
|
+
pcb_component_id: z93.string(),
|
|
2070
|
+
pcb_group_id: z93.string().optional(),
|
|
2071
|
+
subcircuit_id: z93.string().optional(),
|
|
2064
2072
|
layer: visible_layer,
|
|
2065
|
-
route:
|
|
2073
|
+
route: z93.array(point),
|
|
2066
2074
|
stroke_width: length
|
|
2067
2075
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2068
2076
|
expectTypesMatch(true);
|
|
2069
2077
|
|
|
2070
2078
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2071
|
-
import { z as
|
|
2072
|
-
var pcb_silkscreen_text =
|
|
2073
|
-
type:
|
|
2079
|
+
import { z as z94 } from "zod";
|
|
2080
|
+
var pcb_silkscreen_text = z94.object({
|
|
2081
|
+
type: z94.literal("pcb_silkscreen_text"),
|
|
2074
2082
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2075
|
-
pcb_group_id:
|
|
2076
|
-
subcircuit_id:
|
|
2077
|
-
font:
|
|
2083
|
+
pcb_group_id: z94.string().optional(),
|
|
2084
|
+
subcircuit_id: z94.string().optional(),
|
|
2085
|
+
font: z94.literal("tscircuit2024").default("tscircuit2024"),
|
|
2078
2086
|
font_size: distance.default("0.2mm"),
|
|
2079
|
-
pcb_component_id:
|
|
2080
|
-
text:
|
|
2081
|
-
is_knockout:
|
|
2082
|
-
knockout_padding:
|
|
2087
|
+
pcb_component_id: z94.string(),
|
|
2088
|
+
text: z94.string(),
|
|
2089
|
+
is_knockout: z94.boolean().default(false).optional(),
|
|
2090
|
+
knockout_padding: z94.object({
|
|
2083
2091
|
left: length,
|
|
2084
2092
|
top: length,
|
|
2085
2093
|
bottom: length,
|
|
@@ -2090,27 +2098,27 @@ var pcb_silkscreen_text = z93.object({
|
|
|
2090
2098
|
bottom: "0.2mm",
|
|
2091
2099
|
right: "0.2mm"
|
|
2092
2100
|
}).optional(),
|
|
2093
|
-
ccw_rotation:
|
|
2101
|
+
ccw_rotation: z94.number().optional(),
|
|
2094
2102
|
layer: layer_ref,
|
|
2095
|
-
is_mirrored:
|
|
2103
|
+
is_mirrored: z94.boolean().default(false).optional(),
|
|
2096
2104
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2097
2105
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2098
2106
|
}).describe("Defines silkscreen text on the PCB");
|
|
2099
2107
|
expectTypesMatch(true);
|
|
2100
2108
|
|
|
2101
2109
|
// src/pcb/pcb_copper_text.ts
|
|
2102
|
-
import { z as
|
|
2103
|
-
var pcb_copper_text =
|
|
2104
|
-
type:
|
|
2110
|
+
import { z as z95 } from "zod";
|
|
2111
|
+
var pcb_copper_text = z95.object({
|
|
2112
|
+
type: z95.literal("pcb_copper_text"),
|
|
2105
2113
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2106
|
-
pcb_group_id:
|
|
2107
|
-
subcircuit_id:
|
|
2108
|
-
font:
|
|
2114
|
+
pcb_group_id: z95.string().optional(),
|
|
2115
|
+
subcircuit_id: z95.string().optional(),
|
|
2116
|
+
font: z95.literal("tscircuit2024").default("tscircuit2024"),
|
|
2109
2117
|
font_size: distance.default("0.2mm"),
|
|
2110
|
-
pcb_component_id:
|
|
2111
|
-
text:
|
|
2112
|
-
is_knockout:
|
|
2113
|
-
knockout_padding:
|
|
2118
|
+
pcb_component_id: z95.string(),
|
|
2119
|
+
text: z95.string(),
|
|
2120
|
+
is_knockout: z95.boolean().default(false).optional(),
|
|
2121
|
+
knockout_padding: z95.object({
|
|
2114
2122
|
left: length,
|
|
2115
2123
|
top: length,
|
|
2116
2124
|
bottom: length,
|
|
@@ -2121,44 +2129,44 @@ var pcb_copper_text = z94.object({
|
|
|
2121
2129
|
bottom: "0.2mm",
|
|
2122
2130
|
right: "0.2mm"
|
|
2123
2131
|
}).optional(),
|
|
2124
|
-
ccw_rotation:
|
|
2132
|
+
ccw_rotation: z95.number().optional(),
|
|
2125
2133
|
layer: layer_ref,
|
|
2126
|
-
is_mirrored:
|
|
2134
|
+
is_mirrored: z95.boolean().default(false).optional(),
|
|
2127
2135
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2128
2136
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2129
2137
|
}).describe("Defines copper text on the PCB");
|
|
2130
2138
|
expectTypesMatch(true);
|
|
2131
2139
|
|
|
2132
2140
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2133
|
-
import { z as
|
|
2134
|
-
var pcb_silkscreen_rect =
|
|
2135
|
-
type:
|
|
2141
|
+
import { z as z96 } from "zod";
|
|
2142
|
+
var pcb_silkscreen_rect = z96.object({
|
|
2143
|
+
type: z96.literal("pcb_silkscreen_rect"),
|
|
2136
2144
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2137
|
-
pcb_component_id:
|
|
2138
|
-
pcb_group_id:
|
|
2139
|
-
subcircuit_id:
|
|
2145
|
+
pcb_component_id: z96.string(),
|
|
2146
|
+
pcb_group_id: z96.string().optional(),
|
|
2147
|
+
subcircuit_id: z96.string().optional(),
|
|
2140
2148
|
center: point,
|
|
2141
2149
|
width: length,
|
|
2142
2150
|
height: length,
|
|
2143
2151
|
layer: layer_ref,
|
|
2144
2152
|
stroke_width: length.default("1mm"),
|
|
2145
2153
|
corner_radius: length.optional(),
|
|
2146
|
-
is_filled:
|
|
2147
|
-
has_stroke:
|
|
2148
|
-
is_stroke_dashed:
|
|
2154
|
+
is_filled: z96.boolean().default(true).optional(),
|
|
2155
|
+
has_stroke: z96.boolean().optional(),
|
|
2156
|
+
is_stroke_dashed: z96.boolean().optional()
|
|
2149
2157
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2150
2158
|
expectTypesMatch(true);
|
|
2151
2159
|
|
|
2152
2160
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2153
|
-
import { z as
|
|
2154
|
-
var pcb_silkscreen_circle =
|
|
2155
|
-
type:
|
|
2161
|
+
import { z as z97 } from "zod";
|
|
2162
|
+
var pcb_silkscreen_circle = z97.object({
|
|
2163
|
+
type: z97.literal("pcb_silkscreen_circle"),
|
|
2156
2164
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2157
2165
|
"pcb_silkscreen_circle"
|
|
2158
2166
|
),
|
|
2159
|
-
pcb_component_id:
|
|
2160
|
-
pcb_group_id:
|
|
2161
|
-
subcircuit_id:
|
|
2167
|
+
pcb_component_id: z97.string(),
|
|
2168
|
+
pcb_group_id: z97.string().optional(),
|
|
2169
|
+
subcircuit_id: z97.string().optional(),
|
|
2162
2170
|
center: point,
|
|
2163
2171
|
radius: length,
|
|
2164
2172
|
layer: visible_layer,
|
|
@@ -2167,13 +2175,13 @@ var pcb_silkscreen_circle = z96.object({
|
|
|
2167
2175
|
expectTypesMatch(true);
|
|
2168
2176
|
|
|
2169
2177
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2170
|
-
import { z as
|
|
2171
|
-
var pcb_silkscreen_oval =
|
|
2172
|
-
type:
|
|
2178
|
+
import { z as z98 } from "zod";
|
|
2179
|
+
var pcb_silkscreen_oval = z98.object({
|
|
2180
|
+
type: z98.literal("pcb_silkscreen_oval"),
|
|
2173
2181
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2174
|
-
pcb_component_id:
|
|
2175
|
-
pcb_group_id:
|
|
2176
|
-
subcircuit_id:
|
|
2182
|
+
pcb_component_id: z98.string(),
|
|
2183
|
+
pcb_group_id: z98.string().optional(),
|
|
2184
|
+
subcircuit_id: z98.string().optional(),
|
|
2177
2185
|
center: point,
|
|
2178
2186
|
radius_x: distance,
|
|
2179
2187
|
radius_y: distance,
|
|
@@ -2182,257 +2190,257 @@ var pcb_silkscreen_oval = z97.object({
|
|
|
2182
2190
|
expectTypesMatch(true);
|
|
2183
2191
|
|
|
2184
2192
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2185
|
-
import { z as
|
|
2186
|
-
var pcb_fabrication_note_text =
|
|
2187
|
-
type:
|
|
2193
|
+
import { z as z99 } from "zod";
|
|
2194
|
+
var pcb_fabrication_note_text = z99.object({
|
|
2195
|
+
type: z99.literal("pcb_fabrication_note_text"),
|
|
2188
2196
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2189
2197
|
"pcb_fabrication_note_text"
|
|
2190
2198
|
),
|
|
2191
|
-
subcircuit_id:
|
|
2192
|
-
pcb_group_id:
|
|
2193
|
-
font:
|
|
2199
|
+
subcircuit_id: z99.string().optional(),
|
|
2200
|
+
pcb_group_id: z99.string().optional(),
|
|
2201
|
+
font: z99.literal("tscircuit2024").default("tscircuit2024"),
|
|
2194
2202
|
font_size: distance.default("1mm"),
|
|
2195
|
-
pcb_component_id:
|
|
2196
|
-
text:
|
|
2203
|
+
pcb_component_id: z99.string(),
|
|
2204
|
+
text: z99.string(),
|
|
2197
2205
|
layer: visible_layer,
|
|
2198
2206
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2199
|
-
anchor_alignment:
|
|
2200
|
-
color:
|
|
2207
|
+
anchor_alignment: z99.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2208
|
+
color: z99.string().optional()
|
|
2201
2209
|
}).describe(
|
|
2202
2210
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2203
2211
|
);
|
|
2204
2212
|
expectTypesMatch(true);
|
|
2205
2213
|
|
|
2206
2214
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2207
|
-
import { z as
|
|
2208
|
-
var pcb_fabrication_note_path =
|
|
2209
|
-
type:
|
|
2215
|
+
import { z as z100 } from "zod";
|
|
2216
|
+
var pcb_fabrication_note_path = z100.object({
|
|
2217
|
+
type: z100.literal("pcb_fabrication_note_path"),
|
|
2210
2218
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2211
2219
|
"pcb_fabrication_note_path"
|
|
2212
2220
|
),
|
|
2213
|
-
pcb_component_id:
|
|
2214
|
-
subcircuit_id:
|
|
2221
|
+
pcb_component_id: z100.string(),
|
|
2222
|
+
subcircuit_id: z100.string().optional(),
|
|
2215
2223
|
layer: layer_ref,
|
|
2216
|
-
route:
|
|
2224
|
+
route: z100.array(point),
|
|
2217
2225
|
stroke_width: length,
|
|
2218
|
-
color:
|
|
2226
|
+
color: z100.string().optional()
|
|
2219
2227
|
}).describe(
|
|
2220
2228
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2221
2229
|
);
|
|
2222
2230
|
expectTypesMatch(true);
|
|
2223
2231
|
|
|
2224
2232
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2225
|
-
import { z as
|
|
2226
|
-
var pcb_fabrication_note_rect =
|
|
2227
|
-
type:
|
|
2233
|
+
import { z as z101 } from "zod";
|
|
2234
|
+
var pcb_fabrication_note_rect = z101.object({
|
|
2235
|
+
type: z101.literal("pcb_fabrication_note_rect"),
|
|
2228
2236
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2229
2237
|
"pcb_fabrication_note_rect"
|
|
2230
2238
|
),
|
|
2231
|
-
pcb_component_id:
|
|
2232
|
-
pcb_group_id:
|
|
2233
|
-
subcircuit_id:
|
|
2239
|
+
pcb_component_id: z101.string(),
|
|
2240
|
+
pcb_group_id: z101.string().optional(),
|
|
2241
|
+
subcircuit_id: z101.string().optional(),
|
|
2234
2242
|
center: point,
|
|
2235
2243
|
width: length,
|
|
2236
2244
|
height: length,
|
|
2237
2245
|
layer: visible_layer,
|
|
2238
2246
|
stroke_width: length.default("0.1mm"),
|
|
2239
2247
|
corner_radius: length.optional(),
|
|
2240
|
-
is_filled:
|
|
2241
|
-
has_stroke:
|
|
2242
|
-
is_stroke_dashed:
|
|
2243
|
-
color:
|
|
2248
|
+
is_filled: z101.boolean().optional(),
|
|
2249
|
+
has_stroke: z101.boolean().optional(),
|
|
2250
|
+
is_stroke_dashed: z101.boolean().optional(),
|
|
2251
|
+
color: z101.string().optional()
|
|
2244
2252
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2245
2253
|
expectTypesMatch(true);
|
|
2246
2254
|
|
|
2247
2255
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2248
|
-
import { z as
|
|
2249
|
-
var pcb_fabrication_note_dimension =
|
|
2250
|
-
type:
|
|
2256
|
+
import { z as z102 } from "zod";
|
|
2257
|
+
var pcb_fabrication_note_dimension = z102.object({
|
|
2258
|
+
type: z102.literal("pcb_fabrication_note_dimension"),
|
|
2251
2259
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2252
2260
|
"pcb_fabrication_note_dimension"
|
|
2253
2261
|
),
|
|
2254
|
-
pcb_component_id:
|
|
2255
|
-
pcb_group_id:
|
|
2256
|
-
subcircuit_id:
|
|
2262
|
+
pcb_component_id: z102.string(),
|
|
2263
|
+
pcb_group_id: z102.string().optional(),
|
|
2264
|
+
subcircuit_id: z102.string().optional(),
|
|
2257
2265
|
layer: visible_layer,
|
|
2258
2266
|
from: point,
|
|
2259
2267
|
to: point,
|
|
2260
|
-
text:
|
|
2261
|
-
text_ccw_rotation:
|
|
2268
|
+
text: z102.string().optional(),
|
|
2269
|
+
text_ccw_rotation: z102.number().optional(),
|
|
2262
2270
|
offset: length.optional(),
|
|
2263
2271
|
offset_distance: length.optional(),
|
|
2264
|
-
offset_direction:
|
|
2265
|
-
x:
|
|
2266
|
-
y:
|
|
2272
|
+
offset_direction: z102.object({
|
|
2273
|
+
x: z102.number(),
|
|
2274
|
+
y: z102.number()
|
|
2267
2275
|
}).optional(),
|
|
2268
|
-
font:
|
|
2276
|
+
font: z102.literal("tscircuit2024").default("tscircuit2024"),
|
|
2269
2277
|
font_size: length.default("1mm"),
|
|
2270
|
-
color:
|
|
2278
|
+
color: z102.string().optional(),
|
|
2271
2279
|
arrow_size: length.default("1mm")
|
|
2272
2280
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2273
2281
|
expectTypesMatch(true);
|
|
2274
2282
|
|
|
2275
2283
|
// src/pcb/pcb_note_text.ts
|
|
2276
|
-
import { z as z102 } from "zod";
|
|
2277
|
-
var pcb_note_text = z102.object({
|
|
2278
|
-
type: z102.literal("pcb_note_text"),
|
|
2279
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2280
|
-
pcb_component_id: z102.string().optional(),
|
|
2281
|
-
pcb_group_id: z102.string().optional(),
|
|
2282
|
-
subcircuit_id: z102.string().optional(),
|
|
2283
|
-
name: z102.string().optional(),
|
|
2284
|
-
font: z102.literal("tscircuit2024").default("tscircuit2024"),
|
|
2285
|
-
font_size: distance.default("1mm"),
|
|
2286
|
-
text: z102.string().optional(),
|
|
2287
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2288
|
-
anchor_alignment: z102.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2289
|
-
color: z102.string().optional()
|
|
2290
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
2291
|
-
expectTypesMatch(true);
|
|
2292
|
-
|
|
2293
|
-
// src/pcb/pcb_note_rect.ts
|
|
2294
2284
|
import { z as z103 } from "zod";
|
|
2295
|
-
var
|
|
2296
|
-
type: z103.literal("
|
|
2297
|
-
|
|
2285
|
+
var pcb_note_text = z103.object({
|
|
2286
|
+
type: z103.literal("pcb_note_text"),
|
|
2287
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2298
2288
|
pcb_component_id: z103.string().optional(),
|
|
2299
2289
|
pcb_group_id: z103.string().optional(),
|
|
2300
2290
|
subcircuit_id: z103.string().optional(),
|
|
2301
2291
|
name: z103.string().optional(),
|
|
2292
|
+
font: z103.literal("tscircuit2024").default("tscircuit2024"),
|
|
2293
|
+
font_size: distance.default("1mm"),
|
|
2302
2294
|
text: z103.string().optional(),
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
height: length,
|
|
2306
|
-
stroke_width: length.default("0.1mm"),
|
|
2307
|
-
corner_radius: length.optional(),
|
|
2308
|
-
is_filled: z103.boolean().optional(),
|
|
2309
|
-
has_stroke: z103.boolean().optional(),
|
|
2310
|
-
is_stroke_dashed: z103.boolean().optional(),
|
|
2295
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2296
|
+
anchor_alignment: z103.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2311
2297
|
color: z103.string().optional()
|
|
2312
|
-
}).describe("Defines a
|
|
2298
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
2313
2299
|
expectTypesMatch(true);
|
|
2314
2300
|
|
|
2315
|
-
// src/pcb/
|
|
2301
|
+
// src/pcb/pcb_note_rect.ts
|
|
2316
2302
|
import { z as z104 } from "zod";
|
|
2317
|
-
var
|
|
2318
|
-
type: z104.literal("
|
|
2319
|
-
|
|
2303
|
+
var pcb_note_rect = z104.object({
|
|
2304
|
+
type: z104.literal("pcb_note_rect"),
|
|
2305
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2320
2306
|
pcb_component_id: z104.string().optional(),
|
|
2321
2307
|
pcb_group_id: z104.string().optional(),
|
|
2322
2308
|
subcircuit_id: z104.string().optional(),
|
|
2323
2309
|
name: z104.string().optional(),
|
|
2324
2310
|
text: z104.string().optional(),
|
|
2325
|
-
|
|
2311
|
+
center: point,
|
|
2312
|
+
width: length,
|
|
2313
|
+
height: length,
|
|
2326
2314
|
stroke_width: length.default("0.1mm"),
|
|
2315
|
+
corner_radius: length.optional(),
|
|
2316
|
+
is_filled: z104.boolean().optional(),
|
|
2317
|
+
has_stroke: z104.boolean().optional(),
|
|
2318
|
+
is_stroke_dashed: z104.boolean().optional(),
|
|
2327
2319
|
color: z104.string().optional()
|
|
2328
|
-
}).describe("Defines a
|
|
2320
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2329
2321
|
expectTypesMatch(true);
|
|
2330
2322
|
|
|
2331
|
-
// src/pcb/
|
|
2323
|
+
// src/pcb/pcb_note_path.ts
|
|
2332
2324
|
import { z as z105 } from "zod";
|
|
2333
|
-
var
|
|
2334
|
-
type: z105.literal("
|
|
2335
|
-
|
|
2325
|
+
var pcb_note_path = z105.object({
|
|
2326
|
+
type: z105.literal("pcb_note_path"),
|
|
2327
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2336
2328
|
pcb_component_id: z105.string().optional(),
|
|
2337
2329
|
pcb_group_id: z105.string().optional(),
|
|
2338
2330
|
subcircuit_id: z105.string().optional(),
|
|
2339
2331
|
name: z105.string().optional(),
|
|
2340
2332
|
text: z105.string().optional(),
|
|
2333
|
+
route: z105.array(point),
|
|
2334
|
+
stroke_width: length.default("0.1mm"),
|
|
2335
|
+
color: z105.string().optional()
|
|
2336
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
2337
|
+
expectTypesMatch(true);
|
|
2338
|
+
|
|
2339
|
+
// src/pcb/pcb_note_line.ts
|
|
2340
|
+
import { z as z106 } from "zod";
|
|
2341
|
+
var pcb_note_line = z106.object({
|
|
2342
|
+
type: z106.literal("pcb_note_line"),
|
|
2343
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2344
|
+
pcb_component_id: z106.string().optional(),
|
|
2345
|
+
pcb_group_id: z106.string().optional(),
|
|
2346
|
+
subcircuit_id: z106.string().optional(),
|
|
2347
|
+
name: z106.string().optional(),
|
|
2348
|
+
text: z106.string().optional(),
|
|
2341
2349
|
x1: distance,
|
|
2342
2350
|
y1: distance,
|
|
2343
2351
|
x2: distance,
|
|
2344
2352
|
y2: distance,
|
|
2345
2353
|
stroke_width: distance.default("0.1mm"),
|
|
2346
|
-
color:
|
|
2347
|
-
is_dashed:
|
|
2354
|
+
color: z106.string().optional(),
|
|
2355
|
+
is_dashed: z106.boolean().optional()
|
|
2348
2356
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2349
2357
|
expectTypesMatch(true);
|
|
2350
2358
|
|
|
2351
2359
|
// src/pcb/pcb_note_dimension.ts
|
|
2352
|
-
import { z as
|
|
2353
|
-
var pcb_note_dimension =
|
|
2354
|
-
type:
|
|
2360
|
+
import { z as z107 } from "zod";
|
|
2361
|
+
var pcb_note_dimension = z107.object({
|
|
2362
|
+
type: z107.literal("pcb_note_dimension"),
|
|
2355
2363
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2356
|
-
pcb_component_id:
|
|
2357
|
-
pcb_group_id:
|
|
2358
|
-
subcircuit_id:
|
|
2359
|
-
name:
|
|
2364
|
+
pcb_component_id: z107.string().optional(),
|
|
2365
|
+
pcb_group_id: z107.string().optional(),
|
|
2366
|
+
subcircuit_id: z107.string().optional(),
|
|
2367
|
+
name: z107.string().optional(),
|
|
2360
2368
|
from: point,
|
|
2361
2369
|
to: point,
|
|
2362
|
-
text:
|
|
2363
|
-
text_ccw_rotation:
|
|
2370
|
+
text: z107.string().optional(),
|
|
2371
|
+
text_ccw_rotation: z107.number().optional(),
|
|
2364
2372
|
offset_distance: length.optional(),
|
|
2365
|
-
offset_direction:
|
|
2366
|
-
x:
|
|
2367
|
-
y:
|
|
2373
|
+
offset_direction: z107.object({
|
|
2374
|
+
x: z107.number(),
|
|
2375
|
+
y: z107.number()
|
|
2368
2376
|
}).optional(),
|
|
2369
|
-
font:
|
|
2377
|
+
font: z107.literal("tscircuit2024").default("tscircuit2024"),
|
|
2370
2378
|
font_size: length.default("1mm"),
|
|
2371
|
-
color:
|
|
2379
|
+
color: z107.string().optional(),
|
|
2372
2380
|
arrow_size: length.default("1mm")
|
|
2373
2381
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2374
2382
|
expectTypesMatch(true);
|
|
2375
2383
|
|
|
2376
2384
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2377
|
-
import { z as
|
|
2378
|
-
var pcb_footprint_overlap_error =
|
|
2379
|
-
type:
|
|
2385
|
+
import { z as z108 } from "zod";
|
|
2386
|
+
var pcb_footprint_overlap_error = z108.object({
|
|
2387
|
+
type: z108.literal("pcb_footprint_overlap_error"),
|
|
2380
2388
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2381
|
-
error_type:
|
|
2382
|
-
message:
|
|
2383
|
-
pcb_smtpad_ids:
|
|
2384
|
-
pcb_plated_hole_ids:
|
|
2385
|
-
pcb_hole_ids:
|
|
2386
|
-
pcb_keepout_ids:
|
|
2389
|
+
error_type: z108.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
2390
|
+
message: z108.string(),
|
|
2391
|
+
pcb_smtpad_ids: z108.array(z108.string()).optional(),
|
|
2392
|
+
pcb_plated_hole_ids: z108.array(z108.string()).optional(),
|
|
2393
|
+
pcb_hole_ids: z108.array(z108.string()).optional(),
|
|
2394
|
+
pcb_keepout_ids: z108.array(z108.string()).optional()
|
|
2387
2395
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2388
2396
|
expectTypesMatch(
|
|
2389
2397
|
true
|
|
2390
2398
|
);
|
|
2391
2399
|
|
|
2392
2400
|
// src/pcb/pcb_keepout.ts
|
|
2393
|
-
import { z as
|
|
2394
|
-
var pcb_keepout =
|
|
2395
|
-
type:
|
|
2396
|
-
shape:
|
|
2397
|
-
pcb_group_id:
|
|
2398
|
-
subcircuit_id:
|
|
2401
|
+
import { z as z109 } from "zod";
|
|
2402
|
+
var pcb_keepout = z109.object({
|
|
2403
|
+
type: z109.literal("pcb_keepout"),
|
|
2404
|
+
shape: z109.literal("rect"),
|
|
2405
|
+
pcb_group_id: z109.string().optional(),
|
|
2406
|
+
subcircuit_id: z109.string().optional(),
|
|
2399
2407
|
center: point,
|
|
2400
2408
|
width: distance,
|
|
2401
2409
|
height: distance,
|
|
2402
|
-
pcb_keepout_id:
|
|
2403
|
-
layers:
|
|
2410
|
+
pcb_keepout_id: z109.string(),
|
|
2411
|
+
layers: z109.array(z109.string()),
|
|
2404
2412
|
// Specify layers where the keepout applies
|
|
2405
|
-
description:
|
|
2413
|
+
description: z109.string().optional()
|
|
2406
2414
|
// Optional description of the keepout
|
|
2407
2415
|
}).or(
|
|
2408
|
-
|
|
2409
|
-
type:
|
|
2410
|
-
shape:
|
|
2411
|
-
pcb_group_id:
|
|
2412
|
-
subcircuit_id:
|
|
2416
|
+
z109.object({
|
|
2417
|
+
type: z109.literal("pcb_keepout"),
|
|
2418
|
+
shape: z109.literal("circle"),
|
|
2419
|
+
pcb_group_id: z109.string().optional(),
|
|
2420
|
+
subcircuit_id: z109.string().optional(),
|
|
2413
2421
|
center: point,
|
|
2414
2422
|
radius: distance,
|
|
2415
|
-
pcb_keepout_id:
|
|
2416
|
-
layers:
|
|
2423
|
+
pcb_keepout_id: z109.string(),
|
|
2424
|
+
layers: z109.array(z109.string()),
|
|
2417
2425
|
// Specify layers where the keepout applies
|
|
2418
|
-
description:
|
|
2426
|
+
description: z109.string().optional()
|
|
2419
2427
|
// Optional description of the keepout
|
|
2420
2428
|
})
|
|
2421
2429
|
);
|
|
2422
2430
|
expectTypesMatch(true);
|
|
2423
2431
|
|
|
2424
2432
|
// src/pcb/pcb_cutout.ts
|
|
2425
|
-
import { z as
|
|
2426
|
-
var pcb_cutout_base =
|
|
2427
|
-
type:
|
|
2433
|
+
import { z as z110 } from "zod";
|
|
2434
|
+
var pcb_cutout_base = z110.object({
|
|
2435
|
+
type: z110.literal("pcb_cutout"),
|
|
2428
2436
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2429
|
-
pcb_group_id:
|
|
2430
|
-
subcircuit_id:
|
|
2431
|
-
pcb_board_id:
|
|
2432
|
-
pcb_panel_id:
|
|
2437
|
+
pcb_group_id: z110.string().optional(),
|
|
2438
|
+
subcircuit_id: z110.string().optional(),
|
|
2439
|
+
pcb_board_id: z110.string().optional(),
|
|
2440
|
+
pcb_panel_id: z110.string().optional()
|
|
2433
2441
|
});
|
|
2434
2442
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2435
|
-
shape:
|
|
2443
|
+
shape: z110.literal("rect"),
|
|
2436
2444
|
center: point,
|
|
2437
2445
|
width: length,
|
|
2438
2446
|
height: length,
|
|
@@ -2441,26 +2449,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2441
2449
|
});
|
|
2442
2450
|
expectTypesMatch(true);
|
|
2443
2451
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2444
|
-
shape:
|
|
2452
|
+
shape: z110.literal("circle"),
|
|
2445
2453
|
center: point,
|
|
2446
2454
|
radius: length
|
|
2447
2455
|
});
|
|
2448
2456
|
expectTypesMatch(true);
|
|
2449
2457
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2450
|
-
shape:
|
|
2451
|
-
points:
|
|
2458
|
+
shape: z110.literal("polygon"),
|
|
2459
|
+
points: z110.array(point)
|
|
2452
2460
|
});
|
|
2453
2461
|
expectTypesMatch(true);
|
|
2454
2462
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
2455
|
-
shape:
|
|
2456
|
-
route:
|
|
2463
|
+
shape: z110.literal("path"),
|
|
2464
|
+
route: z110.array(point),
|
|
2457
2465
|
slot_width: length,
|
|
2458
2466
|
slot_length: length.optional(),
|
|
2459
2467
|
space_between_slots: length.optional(),
|
|
2460
2468
|
slot_corner_radius: length.optional()
|
|
2461
2469
|
});
|
|
2462
2470
|
expectTypesMatch(true);
|
|
2463
|
-
var pcb_cutout =
|
|
2471
|
+
var pcb_cutout = z110.discriminatedUnion("shape", [
|
|
2464
2472
|
pcb_cutout_rect,
|
|
2465
2473
|
pcb_cutout_circle,
|
|
2466
2474
|
pcb_cutout_polygon,
|
|
@@ -2469,130 +2477,130 @@ var pcb_cutout = z109.discriminatedUnion("shape", [
|
|
|
2469
2477
|
expectTypesMatch(true);
|
|
2470
2478
|
|
|
2471
2479
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2472
|
-
import { z as
|
|
2473
|
-
var pcb_missing_footprint_error =
|
|
2474
|
-
type:
|
|
2480
|
+
import { z as z111 } from "zod";
|
|
2481
|
+
var pcb_missing_footprint_error = z111.object({
|
|
2482
|
+
type: z111.literal("pcb_missing_footprint_error"),
|
|
2475
2483
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2476
2484
|
"pcb_missing_footprint_error"
|
|
2477
2485
|
),
|
|
2478
|
-
pcb_group_id:
|
|
2479
|
-
subcircuit_id:
|
|
2480
|
-
error_type:
|
|
2481
|
-
source_component_id:
|
|
2482
|
-
message:
|
|
2486
|
+
pcb_group_id: z111.string().optional(),
|
|
2487
|
+
subcircuit_id: z111.string().optional(),
|
|
2488
|
+
error_type: z111.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
2489
|
+
source_component_id: z111.string(),
|
|
2490
|
+
message: z111.string()
|
|
2483
2491
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2484
2492
|
expectTypesMatch(
|
|
2485
2493
|
true
|
|
2486
2494
|
);
|
|
2487
2495
|
|
|
2488
2496
|
// src/pcb/external_footprint_load_error.ts
|
|
2489
|
-
import { z as
|
|
2490
|
-
var external_footprint_load_error =
|
|
2491
|
-
type:
|
|
2497
|
+
import { z as z112 } from "zod";
|
|
2498
|
+
var external_footprint_load_error = z112.object({
|
|
2499
|
+
type: z112.literal("external_footprint_load_error"),
|
|
2492
2500
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2493
2501
|
"external_footprint_load_error"
|
|
2494
2502
|
),
|
|
2495
|
-
pcb_component_id:
|
|
2496
|
-
source_component_id:
|
|
2497
|
-
pcb_group_id:
|
|
2498
|
-
subcircuit_id:
|
|
2499
|
-
footprinter_string:
|
|
2500
|
-
error_type:
|
|
2501
|
-
message:
|
|
2503
|
+
pcb_component_id: z112.string(),
|
|
2504
|
+
source_component_id: z112.string(),
|
|
2505
|
+
pcb_group_id: z112.string().optional(),
|
|
2506
|
+
subcircuit_id: z112.string().optional(),
|
|
2507
|
+
footprinter_string: z112.string().optional(),
|
|
2508
|
+
error_type: z112.literal("external_footprint_load_error").default("external_footprint_load_error"),
|
|
2509
|
+
message: z112.string()
|
|
2502
2510
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2503
2511
|
expectTypesMatch(true);
|
|
2504
2512
|
|
|
2505
2513
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2506
|
-
import { z as
|
|
2507
|
-
var circuit_json_footprint_load_error =
|
|
2508
|
-
type:
|
|
2514
|
+
import { z as z113 } from "zod";
|
|
2515
|
+
var circuit_json_footprint_load_error = z113.object({
|
|
2516
|
+
type: z113.literal("circuit_json_footprint_load_error"),
|
|
2509
2517
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2510
2518
|
"circuit_json_footprint_load_error"
|
|
2511
2519
|
),
|
|
2512
|
-
pcb_component_id:
|
|
2513
|
-
source_component_id:
|
|
2514
|
-
pcb_group_id:
|
|
2515
|
-
subcircuit_id:
|
|
2516
|
-
error_type:
|
|
2517
|
-
message:
|
|
2518
|
-
circuit_json:
|
|
2520
|
+
pcb_component_id: z113.string(),
|
|
2521
|
+
source_component_id: z113.string(),
|
|
2522
|
+
pcb_group_id: z113.string().optional(),
|
|
2523
|
+
subcircuit_id: z113.string().optional(),
|
|
2524
|
+
error_type: z113.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
2525
|
+
message: z113.string(),
|
|
2526
|
+
circuit_json: z113.array(z113.any()).optional()
|
|
2519
2527
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
2520
2528
|
expectTypesMatch(true);
|
|
2521
2529
|
|
|
2522
2530
|
// src/pcb/pcb_group.ts
|
|
2523
|
-
import { z as
|
|
2524
|
-
var pcb_group =
|
|
2525
|
-
type:
|
|
2531
|
+
import { z as z114 } from "zod";
|
|
2532
|
+
var pcb_group = z114.object({
|
|
2533
|
+
type: z114.literal("pcb_group"),
|
|
2526
2534
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
2527
|
-
source_group_id:
|
|
2528
|
-
is_subcircuit:
|
|
2529
|
-
subcircuit_id:
|
|
2535
|
+
source_group_id: z114.string(),
|
|
2536
|
+
is_subcircuit: z114.boolean().optional(),
|
|
2537
|
+
subcircuit_id: z114.string().optional(),
|
|
2530
2538
|
width: length.optional(),
|
|
2531
2539
|
height: length.optional(),
|
|
2532
2540
|
center: point,
|
|
2533
|
-
display_offset_x:
|
|
2541
|
+
display_offset_x: z114.string().optional().describe(
|
|
2534
2542
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
2535
2543
|
),
|
|
2536
|
-
display_offset_y:
|
|
2544
|
+
display_offset_y: z114.string().optional().describe(
|
|
2537
2545
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
2538
2546
|
),
|
|
2539
|
-
outline:
|
|
2547
|
+
outline: z114.array(point).optional(),
|
|
2540
2548
|
anchor_position: point.optional(),
|
|
2541
|
-
anchor_alignment:
|
|
2542
|
-
position_mode:
|
|
2543
|
-
positioned_relative_to_pcb_group_id:
|
|
2544
|
-
positioned_relative_to_pcb_board_id:
|
|
2545
|
-
pcb_component_ids:
|
|
2546
|
-
child_layout_mode:
|
|
2547
|
-
name:
|
|
2548
|
-
description:
|
|
2549
|
-
layout_mode:
|
|
2550
|
-
autorouter_configuration:
|
|
2549
|
+
anchor_alignment: ninePointAnchor.default("center"),
|
|
2550
|
+
position_mode: z114.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
2551
|
+
positioned_relative_to_pcb_group_id: z114.string().optional(),
|
|
2552
|
+
positioned_relative_to_pcb_board_id: z114.string().optional(),
|
|
2553
|
+
pcb_component_ids: z114.array(z114.string()),
|
|
2554
|
+
child_layout_mode: z114.enum(["packed", "none"]).optional(),
|
|
2555
|
+
name: z114.string().optional(),
|
|
2556
|
+
description: z114.string().optional(),
|
|
2557
|
+
layout_mode: z114.string().optional(),
|
|
2558
|
+
autorouter_configuration: z114.object({
|
|
2551
2559
|
trace_clearance: length
|
|
2552
2560
|
}).optional(),
|
|
2553
|
-
autorouter_used_string:
|
|
2561
|
+
autorouter_used_string: z114.string().optional()
|
|
2554
2562
|
}).describe("Defines a group of components on the PCB");
|
|
2555
2563
|
expectTypesMatch(true);
|
|
2556
2564
|
|
|
2557
2565
|
// src/pcb/pcb_autorouting_error.ts
|
|
2558
|
-
import { z as
|
|
2559
|
-
var pcb_autorouting_error =
|
|
2560
|
-
type:
|
|
2566
|
+
import { z as z115 } from "zod";
|
|
2567
|
+
var pcb_autorouting_error = z115.object({
|
|
2568
|
+
type: z115.literal("pcb_autorouting_error"),
|
|
2561
2569
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
2562
|
-
error_type:
|
|
2563
|
-
message:
|
|
2564
|
-
subcircuit_id:
|
|
2570
|
+
error_type: z115.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
2571
|
+
message: z115.string(),
|
|
2572
|
+
subcircuit_id: z115.string().optional()
|
|
2565
2573
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
2566
2574
|
expectTypesMatch(true);
|
|
2567
2575
|
|
|
2568
2576
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
2569
|
-
import { z as
|
|
2570
|
-
var pcb_manual_edit_conflict_warning =
|
|
2571
|
-
type:
|
|
2577
|
+
import { z as z116 } from "zod";
|
|
2578
|
+
var pcb_manual_edit_conflict_warning = z116.object({
|
|
2579
|
+
type: z116.literal("pcb_manual_edit_conflict_warning"),
|
|
2572
2580
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
2573
2581
|
"pcb_manual_edit_conflict_warning"
|
|
2574
2582
|
),
|
|
2575
|
-
warning_type:
|
|
2576
|
-
message:
|
|
2577
|
-
pcb_component_id:
|
|
2578
|
-
pcb_group_id:
|
|
2579
|
-
subcircuit_id:
|
|
2580
|
-
source_component_id:
|
|
2583
|
+
warning_type: z116.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
2584
|
+
message: z116.string(),
|
|
2585
|
+
pcb_component_id: z116.string(),
|
|
2586
|
+
pcb_group_id: z116.string().optional(),
|
|
2587
|
+
subcircuit_id: z116.string().optional(),
|
|
2588
|
+
source_component_id: z116.string()
|
|
2581
2589
|
}).describe(
|
|
2582
2590
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
2583
2591
|
);
|
|
2584
2592
|
expectTypesMatch(true);
|
|
2585
2593
|
|
|
2586
2594
|
// src/pcb/pcb_breakout_point.ts
|
|
2587
|
-
import { z as
|
|
2588
|
-
var pcb_breakout_point =
|
|
2589
|
-
type:
|
|
2595
|
+
import { z as z117 } from "zod";
|
|
2596
|
+
var pcb_breakout_point = z117.object({
|
|
2597
|
+
type: z117.literal("pcb_breakout_point"),
|
|
2590
2598
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
2591
|
-
pcb_group_id:
|
|
2592
|
-
subcircuit_id:
|
|
2593
|
-
source_trace_id:
|
|
2594
|
-
source_port_id:
|
|
2595
|
-
source_net_id:
|
|
2599
|
+
pcb_group_id: z117.string(),
|
|
2600
|
+
subcircuit_id: z117.string().optional(),
|
|
2601
|
+
source_trace_id: z117.string().optional(),
|
|
2602
|
+
source_port_id: z117.string().optional(),
|
|
2603
|
+
source_net_id: z117.string().optional(),
|
|
2596
2604
|
x: distance,
|
|
2597
2605
|
y: distance
|
|
2598
2606
|
}).describe(
|
|
@@ -2601,61 +2609,61 @@ var pcb_breakout_point = z116.object({
|
|
|
2601
2609
|
expectTypesMatch(true);
|
|
2602
2610
|
|
|
2603
2611
|
// src/pcb/pcb_ground_plane.ts
|
|
2604
|
-
import { z as
|
|
2605
|
-
var pcb_ground_plane =
|
|
2606
|
-
type:
|
|
2612
|
+
import { z as z118 } from "zod";
|
|
2613
|
+
var pcb_ground_plane = z118.object({
|
|
2614
|
+
type: z118.literal("pcb_ground_plane"),
|
|
2607
2615
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
2608
|
-
source_pcb_ground_plane_id:
|
|
2609
|
-
source_net_id:
|
|
2610
|
-
pcb_group_id:
|
|
2611
|
-
subcircuit_id:
|
|
2616
|
+
source_pcb_ground_plane_id: z118.string(),
|
|
2617
|
+
source_net_id: z118.string(),
|
|
2618
|
+
pcb_group_id: z118.string().optional(),
|
|
2619
|
+
subcircuit_id: z118.string().optional()
|
|
2612
2620
|
}).describe("Defines a ground plane on the PCB");
|
|
2613
2621
|
expectTypesMatch(true);
|
|
2614
2622
|
|
|
2615
2623
|
// src/pcb/pcb_ground_plane_region.ts
|
|
2616
|
-
import { z as
|
|
2617
|
-
var pcb_ground_plane_region =
|
|
2618
|
-
type:
|
|
2624
|
+
import { z as z119 } from "zod";
|
|
2625
|
+
var pcb_ground_plane_region = z119.object({
|
|
2626
|
+
type: z119.literal("pcb_ground_plane_region"),
|
|
2619
2627
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
2620
2628
|
"pcb_ground_plane_region"
|
|
2621
2629
|
),
|
|
2622
|
-
pcb_ground_plane_id:
|
|
2623
|
-
pcb_group_id:
|
|
2624
|
-
subcircuit_id:
|
|
2630
|
+
pcb_ground_plane_id: z119.string(),
|
|
2631
|
+
pcb_group_id: z119.string().optional(),
|
|
2632
|
+
subcircuit_id: z119.string().optional(),
|
|
2625
2633
|
layer: layer_ref,
|
|
2626
|
-
points:
|
|
2634
|
+
points: z119.array(point)
|
|
2627
2635
|
}).describe("Defines a polygon region of a ground plane");
|
|
2628
2636
|
expectTypesMatch(true);
|
|
2629
2637
|
|
|
2630
2638
|
// src/pcb/pcb_thermal_spoke.ts
|
|
2631
|
-
import { z as
|
|
2632
|
-
var pcb_thermal_spoke =
|
|
2633
|
-
type:
|
|
2639
|
+
import { z as z120 } from "zod";
|
|
2640
|
+
var pcb_thermal_spoke = z120.object({
|
|
2641
|
+
type: z120.literal("pcb_thermal_spoke"),
|
|
2634
2642
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
2635
|
-
pcb_ground_plane_id:
|
|
2636
|
-
shape:
|
|
2637
|
-
spoke_count:
|
|
2643
|
+
pcb_ground_plane_id: z120.string(),
|
|
2644
|
+
shape: z120.string(),
|
|
2645
|
+
spoke_count: z120.number(),
|
|
2638
2646
|
spoke_thickness: distance,
|
|
2639
2647
|
spoke_inner_diameter: distance,
|
|
2640
2648
|
spoke_outer_diameter: distance,
|
|
2641
|
-
pcb_plated_hole_id:
|
|
2642
|
-
subcircuit_id:
|
|
2649
|
+
pcb_plated_hole_id: z120.string().optional(),
|
|
2650
|
+
subcircuit_id: z120.string().optional()
|
|
2643
2651
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
2644
2652
|
expectTypesMatch(true);
|
|
2645
2653
|
|
|
2646
2654
|
// src/pcb/pcb_copper_pour.ts
|
|
2647
|
-
import { z as
|
|
2648
|
-
var pcb_copper_pour_base =
|
|
2649
|
-
type:
|
|
2655
|
+
import { z as z121 } from "zod";
|
|
2656
|
+
var pcb_copper_pour_base = z121.object({
|
|
2657
|
+
type: z121.literal("pcb_copper_pour"),
|
|
2650
2658
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
2651
|
-
pcb_group_id:
|
|
2652
|
-
subcircuit_id:
|
|
2659
|
+
pcb_group_id: z121.string().optional(),
|
|
2660
|
+
subcircuit_id: z121.string().optional(),
|
|
2653
2661
|
layer: layer_ref,
|
|
2654
|
-
source_net_id:
|
|
2655
|
-
covered_with_solder_mask:
|
|
2662
|
+
source_net_id: z121.string().optional(),
|
|
2663
|
+
covered_with_solder_mask: z121.boolean().optional().default(true)
|
|
2656
2664
|
});
|
|
2657
2665
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
2658
|
-
shape:
|
|
2666
|
+
shape: z121.literal("rect"),
|
|
2659
2667
|
center: point,
|
|
2660
2668
|
width: length,
|
|
2661
2669
|
height: length,
|
|
@@ -2663,16 +2671,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
2663
2671
|
});
|
|
2664
2672
|
expectTypesMatch(true);
|
|
2665
2673
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
2666
|
-
shape:
|
|
2674
|
+
shape: z121.literal("brep"),
|
|
2667
2675
|
brep_shape
|
|
2668
2676
|
});
|
|
2669
2677
|
expectTypesMatch(true);
|
|
2670
2678
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
2671
|
-
shape:
|
|
2672
|
-
points:
|
|
2679
|
+
shape: z121.literal("polygon"),
|
|
2680
|
+
points: z121.array(point)
|
|
2673
2681
|
});
|
|
2674
2682
|
expectTypesMatch(true);
|
|
2675
|
-
var pcb_copper_pour =
|
|
2683
|
+
var pcb_copper_pour = z121.discriminatedUnion("shape", [
|
|
2676
2684
|
pcb_copper_pour_rect,
|
|
2677
2685
|
pcb_copper_pour_brep,
|
|
2678
2686
|
pcb_copper_pour_polygon
|
|
@@ -2680,148 +2688,148 @@ var pcb_copper_pour = z120.discriminatedUnion("shape", [
|
|
|
2680
2688
|
expectTypesMatch(true);
|
|
2681
2689
|
|
|
2682
2690
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
2683
|
-
import { z as
|
|
2684
|
-
var pcb_component_outside_board_error =
|
|
2685
|
-
type:
|
|
2691
|
+
import { z as z122 } from "zod";
|
|
2692
|
+
var pcb_component_outside_board_error = z122.object({
|
|
2693
|
+
type: z122.literal("pcb_component_outside_board_error"),
|
|
2686
2694
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
2687
2695
|
"pcb_component_outside_board_error"
|
|
2688
2696
|
),
|
|
2689
|
-
error_type:
|
|
2690
|
-
message:
|
|
2691
|
-
pcb_component_id:
|
|
2692
|
-
pcb_board_id:
|
|
2697
|
+
error_type: z122.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
2698
|
+
message: z122.string(),
|
|
2699
|
+
pcb_component_id: z122.string(),
|
|
2700
|
+
pcb_board_id: z122.string(),
|
|
2693
2701
|
component_center: point,
|
|
2694
|
-
component_bounds:
|
|
2695
|
-
min_x:
|
|
2696
|
-
max_x:
|
|
2697
|
-
min_y:
|
|
2698
|
-
max_y:
|
|
2702
|
+
component_bounds: z122.object({
|
|
2703
|
+
min_x: z122.number(),
|
|
2704
|
+
max_x: z122.number(),
|
|
2705
|
+
min_y: z122.number(),
|
|
2706
|
+
max_y: z122.number()
|
|
2699
2707
|
}),
|
|
2700
|
-
subcircuit_id:
|
|
2701
|
-
source_component_id:
|
|
2708
|
+
subcircuit_id: z122.string().optional(),
|
|
2709
|
+
source_component_id: z122.string().optional()
|
|
2702
2710
|
}).describe(
|
|
2703
2711
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
2704
2712
|
);
|
|
2705
2713
|
expectTypesMatch(true);
|
|
2706
2714
|
|
|
2707
2715
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
2708
|
-
import { z as
|
|
2709
|
-
var pcb_component_invalid_layer_error =
|
|
2710
|
-
type:
|
|
2716
|
+
import { z as z123 } from "zod";
|
|
2717
|
+
var pcb_component_invalid_layer_error = z123.object({
|
|
2718
|
+
type: z123.literal("pcb_component_invalid_layer_error"),
|
|
2711
2719
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
2712
2720
|
"pcb_component_invalid_layer_error"
|
|
2713
2721
|
),
|
|
2714
|
-
error_type:
|
|
2715
|
-
message:
|
|
2716
|
-
pcb_component_id:
|
|
2717
|
-
source_component_id:
|
|
2722
|
+
error_type: z123.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
2723
|
+
message: z123.string(),
|
|
2724
|
+
pcb_component_id: z123.string().optional(),
|
|
2725
|
+
source_component_id: z123.string(),
|
|
2718
2726
|
layer: layer_ref,
|
|
2719
|
-
subcircuit_id:
|
|
2727
|
+
subcircuit_id: z123.string().optional()
|
|
2720
2728
|
}).describe(
|
|
2721
2729
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
2722
2730
|
);
|
|
2723
2731
|
expectTypesMatch(true);
|
|
2724
2732
|
|
|
2725
2733
|
// src/pcb/pcb_via_clearance_error.ts
|
|
2726
|
-
import { z as
|
|
2727
|
-
var pcb_via_clearance_error =
|
|
2728
|
-
type:
|
|
2734
|
+
import { z as z124 } from "zod";
|
|
2735
|
+
var pcb_via_clearance_error = z124.object({
|
|
2736
|
+
type: z124.literal("pcb_via_clearance_error"),
|
|
2729
2737
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2730
|
-
error_type:
|
|
2731
|
-
message:
|
|
2732
|
-
pcb_via_ids:
|
|
2738
|
+
error_type: z124.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
2739
|
+
message: z124.string(),
|
|
2740
|
+
pcb_via_ids: z124.array(z124.string()).min(2),
|
|
2733
2741
|
minimum_clearance: distance.optional(),
|
|
2734
2742
|
actual_clearance: distance.optional(),
|
|
2735
|
-
pcb_center:
|
|
2736
|
-
x:
|
|
2737
|
-
y:
|
|
2743
|
+
pcb_center: z124.object({
|
|
2744
|
+
x: z124.number().optional(),
|
|
2745
|
+
y: z124.number().optional()
|
|
2738
2746
|
}).optional(),
|
|
2739
|
-
subcircuit_id:
|
|
2747
|
+
subcircuit_id: z124.string().optional()
|
|
2740
2748
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
2741
2749
|
expectTypesMatch(true);
|
|
2742
2750
|
|
|
2743
2751
|
// src/pcb/pcb_courtyard_rect.ts
|
|
2744
|
-
import { z as
|
|
2745
|
-
var pcb_courtyard_rect =
|
|
2746
|
-
type:
|
|
2752
|
+
import { z as z125 } from "zod";
|
|
2753
|
+
var pcb_courtyard_rect = z125.object({
|
|
2754
|
+
type: z125.literal("pcb_courtyard_rect"),
|
|
2747
2755
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
2748
|
-
pcb_component_id:
|
|
2749
|
-
pcb_group_id:
|
|
2750
|
-
subcircuit_id:
|
|
2756
|
+
pcb_component_id: z125.string(),
|
|
2757
|
+
pcb_group_id: z125.string().optional(),
|
|
2758
|
+
subcircuit_id: z125.string().optional(),
|
|
2751
2759
|
center: point,
|
|
2752
2760
|
width: length,
|
|
2753
2761
|
height: length,
|
|
2754
2762
|
layer: visible_layer,
|
|
2755
|
-
color:
|
|
2763
|
+
color: z125.string().optional()
|
|
2756
2764
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
2757
2765
|
expectTypesMatch(true);
|
|
2758
2766
|
|
|
2759
2767
|
// src/pcb/pcb_courtyard_outline.ts
|
|
2760
|
-
import { z as
|
|
2761
|
-
var pcb_courtyard_outline =
|
|
2762
|
-
type:
|
|
2768
|
+
import { z as z126 } from "zod";
|
|
2769
|
+
var pcb_courtyard_outline = z126.object({
|
|
2770
|
+
type: z126.literal("pcb_courtyard_outline"),
|
|
2763
2771
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
2764
2772
|
"pcb_courtyard_outline"
|
|
2765
2773
|
),
|
|
2766
|
-
pcb_component_id:
|
|
2767
|
-
pcb_group_id:
|
|
2768
|
-
subcircuit_id:
|
|
2774
|
+
pcb_component_id: z126.string(),
|
|
2775
|
+
pcb_group_id: z126.string().optional(),
|
|
2776
|
+
subcircuit_id: z126.string().optional(),
|
|
2769
2777
|
layer: visible_layer,
|
|
2770
|
-
outline:
|
|
2778
|
+
outline: z126.array(point).min(2),
|
|
2771
2779
|
stroke_width: length.default("0.1mm"),
|
|
2772
|
-
is_closed:
|
|
2773
|
-
is_stroke_dashed:
|
|
2774
|
-
color:
|
|
2780
|
+
is_closed: z126.boolean().optional(),
|
|
2781
|
+
is_stroke_dashed: z126.boolean().optional(),
|
|
2782
|
+
color: z126.string().optional()
|
|
2775
2783
|
}).describe("Defines a courtyard outline on the PCB");
|
|
2776
2784
|
expectTypesMatch(true);
|
|
2777
2785
|
|
|
2778
2786
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
2779
|
-
import { z as
|
|
2780
|
-
var pcb_courtyard_polygon =
|
|
2781
|
-
type:
|
|
2787
|
+
import { z as z127 } from "zod";
|
|
2788
|
+
var pcb_courtyard_polygon = z127.object({
|
|
2789
|
+
type: z127.literal("pcb_courtyard_polygon"),
|
|
2782
2790
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
2783
2791
|
"pcb_courtyard_polygon"
|
|
2784
2792
|
),
|
|
2785
|
-
pcb_component_id:
|
|
2786
|
-
pcb_group_id:
|
|
2787
|
-
subcircuit_id:
|
|
2793
|
+
pcb_component_id: z127.string(),
|
|
2794
|
+
pcb_group_id: z127.string().optional(),
|
|
2795
|
+
subcircuit_id: z127.string().optional(),
|
|
2788
2796
|
layer: visible_layer,
|
|
2789
|
-
points:
|
|
2790
|
-
color:
|
|
2797
|
+
points: z127.array(point).min(3),
|
|
2798
|
+
color: z127.string().optional()
|
|
2791
2799
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
2792
2800
|
expectTypesMatch(true);
|
|
2793
2801
|
|
|
2794
2802
|
// src/cad/cad_component.ts
|
|
2795
|
-
import { z as
|
|
2796
|
-
var cad_component =
|
|
2797
|
-
type:
|
|
2798
|
-
cad_component_id:
|
|
2799
|
-
pcb_component_id:
|
|
2800
|
-
source_component_id:
|
|
2803
|
+
import { z as z128 } from "zod";
|
|
2804
|
+
var cad_component = z128.object({
|
|
2805
|
+
type: z128.literal("cad_component"),
|
|
2806
|
+
cad_component_id: z128.string(),
|
|
2807
|
+
pcb_component_id: z128.string(),
|
|
2808
|
+
source_component_id: z128.string(),
|
|
2801
2809
|
position: point3,
|
|
2802
2810
|
rotation: point3.optional(),
|
|
2803
2811
|
size: point3.optional(),
|
|
2804
2812
|
layer: layer_ref.optional(),
|
|
2805
|
-
subcircuit_id:
|
|
2813
|
+
subcircuit_id: z128.string().optional(),
|
|
2806
2814
|
// These are all ways to generate/load the 3d model
|
|
2807
|
-
footprinter_string:
|
|
2808
|
-
model_obj_url:
|
|
2809
|
-
model_stl_url:
|
|
2810
|
-
model_3mf_url:
|
|
2811
|
-
model_gltf_url:
|
|
2812
|
-
model_glb_url:
|
|
2813
|
-
model_step_url:
|
|
2814
|
-
model_wrl_url:
|
|
2815
|
-
model_unit_to_mm_scale_factor:
|
|
2816
|
-
model_jscad:
|
|
2817
|
-
show_as_translucent_model:
|
|
2815
|
+
footprinter_string: z128.string().optional(),
|
|
2816
|
+
model_obj_url: z128.string().optional(),
|
|
2817
|
+
model_stl_url: z128.string().optional(),
|
|
2818
|
+
model_3mf_url: z128.string().optional(),
|
|
2819
|
+
model_gltf_url: z128.string().optional(),
|
|
2820
|
+
model_glb_url: z128.string().optional(),
|
|
2821
|
+
model_step_url: z128.string().optional(),
|
|
2822
|
+
model_wrl_url: z128.string().optional(),
|
|
2823
|
+
model_unit_to_mm_scale_factor: z128.number().optional(),
|
|
2824
|
+
model_jscad: z128.any().optional(),
|
|
2825
|
+
show_as_translucent_model: z128.boolean().optional()
|
|
2818
2826
|
}).describe("Defines a component on the PCB");
|
|
2819
2827
|
expectTypesMatch(true);
|
|
2820
2828
|
|
|
2821
2829
|
// src/simulation/simulation_voltage_source.ts
|
|
2822
|
-
import { z as
|
|
2823
|
-
var wave_shape =
|
|
2824
|
-
var percentage =
|
|
2830
|
+
import { z as z129 } from "zod";
|
|
2831
|
+
var wave_shape = z129.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
2832
|
+
var percentage = z129.union([z129.string(), z129.number()]).transform((val) => {
|
|
2825
2833
|
if (typeof val === "string") {
|
|
2826
2834
|
if (val.endsWith("%")) {
|
|
2827
2835
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -2830,30 +2838,30 @@ var percentage = z128.union([z128.string(), z128.number()]).transform((val) => {
|
|
|
2830
2838
|
}
|
|
2831
2839
|
return val;
|
|
2832
2840
|
}).pipe(
|
|
2833
|
-
|
|
2841
|
+
z129.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
2834
2842
|
);
|
|
2835
|
-
var simulation_dc_voltage_source =
|
|
2836
|
-
type:
|
|
2843
|
+
var simulation_dc_voltage_source = z129.object({
|
|
2844
|
+
type: z129.literal("simulation_voltage_source"),
|
|
2837
2845
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2838
2846
|
"simulation_voltage_source"
|
|
2839
2847
|
),
|
|
2840
|
-
is_dc_source:
|
|
2841
|
-
positive_source_port_id:
|
|
2842
|
-
negative_source_port_id:
|
|
2843
|
-
positive_source_net_id:
|
|
2844
|
-
negative_source_net_id:
|
|
2848
|
+
is_dc_source: z129.literal(true).optional().default(true),
|
|
2849
|
+
positive_source_port_id: z129.string().optional(),
|
|
2850
|
+
negative_source_port_id: z129.string().optional(),
|
|
2851
|
+
positive_source_net_id: z129.string().optional(),
|
|
2852
|
+
negative_source_net_id: z129.string().optional(),
|
|
2845
2853
|
voltage
|
|
2846
2854
|
}).describe("Defines a DC voltage source for simulation");
|
|
2847
|
-
var simulation_ac_voltage_source =
|
|
2848
|
-
type:
|
|
2855
|
+
var simulation_ac_voltage_source = z129.object({
|
|
2856
|
+
type: z129.literal("simulation_voltage_source"),
|
|
2849
2857
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2850
2858
|
"simulation_voltage_source"
|
|
2851
2859
|
),
|
|
2852
|
-
is_dc_source:
|
|
2853
|
-
terminal1_source_port_id:
|
|
2854
|
-
terminal2_source_port_id:
|
|
2855
|
-
terminal1_source_net_id:
|
|
2856
|
-
terminal2_source_net_id:
|
|
2860
|
+
is_dc_source: z129.literal(false),
|
|
2861
|
+
terminal1_source_port_id: z129.string().optional(),
|
|
2862
|
+
terminal2_source_port_id: z129.string().optional(),
|
|
2863
|
+
terminal1_source_net_id: z129.string().optional(),
|
|
2864
|
+
terminal2_source_net_id: z129.string().optional(),
|
|
2857
2865
|
voltage: voltage.optional(),
|
|
2858
2866
|
frequency: frequency.optional(),
|
|
2859
2867
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -2861,25 +2869,25 @@ var simulation_ac_voltage_source = z128.object({
|
|
|
2861
2869
|
phase: rotation.optional(),
|
|
2862
2870
|
duty_cycle: percentage.optional()
|
|
2863
2871
|
}).describe("Defines an AC voltage source for simulation");
|
|
2864
|
-
var simulation_voltage_source =
|
|
2872
|
+
var simulation_voltage_source = z129.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
2865
2873
|
expectTypesMatch(true);
|
|
2866
2874
|
expectTypesMatch(true);
|
|
2867
2875
|
expectTypesMatch(true);
|
|
2868
2876
|
|
|
2869
2877
|
// src/simulation/simulation_experiment.ts
|
|
2870
|
-
import { z as
|
|
2871
|
-
var experiment_type =
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2878
|
+
import { z as z130 } from "zod";
|
|
2879
|
+
var experiment_type = z130.union([
|
|
2880
|
+
z130.literal("spice_dc_sweep"),
|
|
2881
|
+
z130.literal("spice_dc_operating_point"),
|
|
2882
|
+
z130.literal("spice_transient_analysis"),
|
|
2883
|
+
z130.literal("spice_ac_analysis")
|
|
2876
2884
|
]);
|
|
2877
|
-
var simulation_experiment =
|
|
2878
|
-
type:
|
|
2885
|
+
var simulation_experiment = z130.object({
|
|
2886
|
+
type: z130.literal("simulation_experiment"),
|
|
2879
2887
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
2880
2888
|
"simulation_experiment"
|
|
2881
2889
|
),
|
|
2882
|
-
name:
|
|
2890
|
+
name: z130.string(),
|
|
2883
2891
|
experiment_type,
|
|
2884
2892
|
time_per_step: duration_ms.optional(),
|
|
2885
2893
|
start_time_ms: ms.optional(),
|
|
@@ -2888,53 +2896,53 @@ var simulation_experiment = z129.object({
|
|
|
2888
2896
|
expectTypesMatch(true);
|
|
2889
2897
|
|
|
2890
2898
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
2891
|
-
import { z as
|
|
2892
|
-
var simulation_transient_voltage_graph =
|
|
2893
|
-
type:
|
|
2899
|
+
import { z as z131 } from "zod";
|
|
2900
|
+
var simulation_transient_voltage_graph = z131.object({
|
|
2901
|
+
type: z131.literal("simulation_transient_voltage_graph"),
|
|
2894
2902
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
2895
2903
|
"simulation_transient_voltage_graph"
|
|
2896
2904
|
),
|
|
2897
|
-
simulation_experiment_id:
|
|
2898
|
-
timestamps_ms:
|
|
2899
|
-
voltage_levels:
|
|
2900
|
-
source_component_id:
|
|
2901
|
-
subcircuit_connectivity_map_key:
|
|
2905
|
+
simulation_experiment_id: z131.string(),
|
|
2906
|
+
timestamps_ms: z131.array(z131.number()).optional(),
|
|
2907
|
+
voltage_levels: z131.array(z131.number()),
|
|
2908
|
+
source_component_id: z131.string().optional(),
|
|
2909
|
+
subcircuit_connectivity_map_key: z131.string().optional(),
|
|
2902
2910
|
time_per_step: duration_ms,
|
|
2903
2911
|
start_time_ms: ms,
|
|
2904
2912
|
end_time_ms: ms,
|
|
2905
|
-
name:
|
|
2906
|
-
color:
|
|
2913
|
+
name: z131.string().optional(),
|
|
2914
|
+
color: z131.string().optional()
|
|
2907
2915
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
2908
2916
|
expectTypesMatch(true);
|
|
2909
2917
|
|
|
2910
2918
|
// src/simulation/simulation_switch.ts
|
|
2911
|
-
import { z as
|
|
2912
|
-
var simulation_switch =
|
|
2913
|
-
type:
|
|
2919
|
+
import { z as z132 } from "zod";
|
|
2920
|
+
var simulation_switch = z132.object({
|
|
2921
|
+
type: z132.literal("simulation_switch"),
|
|
2914
2922
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
2915
|
-
source_component_id:
|
|
2923
|
+
source_component_id: z132.string().optional(),
|
|
2916
2924
|
closes_at: ms.optional(),
|
|
2917
2925
|
opens_at: ms.optional(),
|
|
2918
|
-
starts_closed:
|
|
2926
|
+
starts_closed: z132.boolean().optional(),
|
|
2919
2927
|
switching_frequency: frequency.optional()
|
|
2920
2928
|
}).describe("Defines a switch for simulation timing control");
|
|
2921
2929
|
expectTypesMatch(true);
|
|
2922
2930
|
|
|
2923
2931
|
// src/simulation/simulation_voltage_probe.ts
|
|
2924
|
-
import { z as
|
|
2925
|
-
var simulation_voltage_probe =
|
|
2926
|
-
type:
|
|
2932
|
+
import { z as z133 } from "zod";
|
|
2933
|
+
var simulation_voltage_probe = z133.object({
|
|
2934
|
+
type: z133.literal("simulation_voltage_probe"),
|
|
2927
2935
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
2928
2936
|
"simulation_voltage_probe"
|
|
2929
2937
|
),
|
|
2930
|
-
source_component_id:
|
|
2931
|
-
name:
|
|
2932
|
-
signal_input_source_port_id:
|
|
2933
|
-
signal_input_source_net_id:
|
|
2934
|
-
reference_input_source_port_id:
|
|
2935
|
-
reference_input_source_net_id:
|
|
2936
|
-
subcircuit_id:
|
|
2937
|
-
color:
|
|
2938
|
+
source_component_id: z133.string().optional(),
|
|
2939
|
+
name: z133.string().optional(),
|
|
2940
|
+
signal_input_source_port_id: z133.string().optional(),
|
|
2941
|
+
signal_input_source_net_id: z133.string().optional(),
|
|
2942
|
+
reference_input_source_port_id: z133.string().optional(),
|
|
2943
|
+
reference_input_source_net_id: z133.string().optional(),
|
|
2944
|
+
subcircuit_id: z133.string().optional(),
|
|
2945
|
+
color: z133.string().optional()
|
|
2938
2946
|
}).describe(
|
|
2939
2947
|
"Defines a voltage probe for simulation. If a reference input is not provided, it measures against ground. If a reference input is provided, it measures the differential voltage between two points."
|
|
2940
2948
|
).superRefine((data, ctx) => {
|
|
@@ -2944,20 +2952,20 @@ var simulation_voltage_probe = z132.object({
|
|
|
2944
2952
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
2945
2953
|
if (has_ports && has_nets) {
|
|
2946
2954
|
ctx.addIssue({
|
|
2947
|
-
code:
|
|
2955
|
+
code: z133.ZodIssueCode.custom,
|
|
2948
2956
|
message: "Cannot mix port and net connections in a differential probe."
|
|
2949
2957
|
});
|
|
2950
2958
|
} else if (has_ports) {
|
|
2951
2959
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
2952
2960
|
ctx.addIssue({
|
|
2953
|
-
code:
|
|
2961
|
+
code: z133.ZodIssueCode.custom,
|
|
2954
2962
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
2955
2963
|
});
|
|
2956
2964
|
}
|
|
2957
2965
|
} else if (has_nets) {
|
|
2958
2966
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
2959
2967
|
ctx.addIssue({
|
|
2960
|
-
code:
|
|
2968
|
+
code: z133.ZodIssueCode.custom,
|
|
2961
2969
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
2962
2970
|
});
|
|
2963
2971
|
}
|
|
@@ -2965,7 +2973,7 @@ var simulation_voltage_probe = z132.object({
|
|
|
2965
2973
|
} else {
|
|
2966
2974
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
2967
2975
|
ctx.addIssue({
|
|
2968
|
-
code:
|
|
2976
|
+
code: z133.ZodIssueCode.custom,
|
|
2969
2977
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
2970
2978
|
});
|
|
2971
2979
|
}
|
|
@@ -2974,22 +2982,22 @@ var simulation_voltage_probe = z132.object({
|
|
|
2974
2982
|
expectTypesMatch(true);
|
|
2975
2983
|
|
|
2976
2984
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
2977
|
-
import { z as
|
|
2978
|
-
var simulation_unknown_experiment_error =
|
|
2979
|
-
type:
|
|
2985
|
+
import { z as z134 } from "zod";
|
|
2986
|
+
var simulation_unknown_experiment_error = z134.object({
|
|
2987
|
+
type: z134.literal("simulation_unknown_experiment_error"),
|
|
2980
2988
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
2981
2989
|
"simulation_unknown_experiment_error"
|
|
2982
2990
|
),
|
|
2983
|
-
error_type:
|
|
2984
|
-
message:
|
|
2985
|
-
simulation_experiment_id:
|
|
2986
|
-
subcircuit_id:
|
|
2991
|
+
error_type: z134.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
2992
|
+
message: z134.string(),
|
|
2993
|
+
simulation_experiment_id: z134.string().optional(),
|
|
2994
|
+
subcircuit_id: z134.string().optional()
|
|
2987
2995
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
2988
2996
|
expectTypesMatch(true);
|
|
2989
2997
|
|
|
2990
2998
|
// src/any_circuit_element.ts
|
|
2991
|
-
import { z as
|
|
2992
|
-
var any_circuit_element =
|
|
2999
|
+
import { z as z135 } from "zod";
|
|
3000
|
+
var any_circuit_element = z135.union([
|
|
2993
3001
|
source_trace,
|
|
2994
3002
|
source_port,
|
|
2995
3003
|
source_component_internal_connection,
|
|
@@ -3266,6 +3274,7 @@ export {
|
|
|
3266
3274
|
source_simple_chip,
|
|
3267
3275
|
source_simple_crystal,
|
|
3268
3276
|
source_simple_diode,
|
|
3277
|
+
source_simple_fiducial,
|
|
3269
3278
|
source_simple_ground,
|
|
3270
3279
|
source_simple_inductor,
|
|
3271
3280
|
source_simple_led,
|