circuit-json 0.0.334 → 0.0.336
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 -0
- package/dist/index.d.mts +255 -2
- package/dist/index.mjs +1304 -1289
- 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,276 +1173,282 @@ 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
|
-
|
|
1348
|
-
|
|
1353
|
+
pcb_group_id: z75.string().optional(),
|
|
1354
|
+
subcircuit_id: z75.string().optional(),
|
|
1355
|
+
pcb_component_id: z75.string().optional(),
|
|
1356
|
+
hole_shape: z75.literal("circle"),
|
|
1357
|
+
hole_diameter: z75.number(),
|
|
1349
1358
|
x: distance,
|
|
1350
1359
|
y: distance,
|
|
1351
|
-
is_covered_with_solder_mask:
|
|
1352
|
-
soldermask_margin:
|
|
1360
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1361
|
+
soldermask_margin: z75.number().optional()
|
|
1353
1362
|
});
|
|
1354
1363
|
var pcb_hole_circle_shape = pcb_hole_circle.describe(
|
|
1355
1364
|
"Defines a circular hole on the PCB"
|
|
1356
1365
|
);
|
|
1357
1366
|
expectTypesMatch(true);
|
|
1358
|
-
var pcb_hole_rect =
|
|
1359
|
-
type:
|
|
1367
|
+
var pcb_hole_rect = z75.object({
|
|
1368
|
+
type: z75.literal("pcb_hole"),
|
|
1360
1369
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1361
|
-
pcb_group_id:
|
|
1362
|
-
subcircuit_id:
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1370
|
+
pcb_group_id: z75.string().optional(),
|
|
1371
|
+
subcircuit_id: z75.string().optional(),
|
|
1372
|
+
pcb_component_id: z75.string().optional(),
|
|
1373
|
+
hole_shape: z75.literal("rect"),
|
|
1374
|
+
hole_width: z75.number(),
|
|
1375
|
+
hole_height: z75.number(),
|
|
1366
1376
|
x: distance,
|
|
1367
1377
|
y: distance,
|
|
1368
|
-
is_covered_with_solder_mask:
|
|
1369
|
-
soldermask_margin:
|
|
1378
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1379
|
+
soldermask_margin: z75.number().optional()
|
|
1370
1380
|
});
|
|
1371
1381
|
var pcb_hole_rect_shape = pcb_hole_rect.describe(
|
|
1372
1382
|
"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
|
|
1373
1383
|
);
|
|
1374
1384
|
expectTypesMatch(true);
|
|
1375
|
-
var pcb_hole_circle_or_square =
|
|
1376
|
-
type:
|
|
1385
|
+
var pcb_hole_circle_or_square = z75.object({
|
|
1386
|
+
type: z75.literal("pcb_hole"),
|
|
1377
1387
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1378
|
-
pcb_group_id:
|
|
1379
|
-
subcircuit_id:
|
|
1380
|
-
|
|
1381
|
-
|
|
1388
|
+
pcb_group_id: z75.string().optional(),
|
|
1389
|
+
subcircuit_id: z75.string().optional(),
|
|
1390
|
+
pcb_component_id: z75.string().optional(),
|
|
1391
|
+
hole_shape: z75.enum(["circle", "square"]),
|
|
1392
|
+
hole_diameter: z75.number(),
|
|
1382
1393
|
x: distance,
|
|
1383
1394
|
y: distance,
|
|
1384
|
-
is_covered_with_solder_mask:
|
|
1385
|
-
soldermask_margin:
|
|
1395
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1396
|
+
soldermask_margin: z75.number().optional()
|
|
1386
1397
|
});
|
|
1387
1398
|
var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
1388
1399
|
"Defines a circular or square hole on the PCB"
|
|
1389
1400
|
);
|
|
1390
1401
|
expectTypesMatch(true);
|
|
1391
|
-
var pcb_hole_oval =
|
|
1392
|
-
type:
|
|
1402
|
+
var pcb_hole_oval = z75.object({
|
|
1403
|
+
type: z75.literal("pcb_hole"),
|
|
1393
1404
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1394
|
-
pcb_group_id:
|
|
1395
|
-
subcircuit_id:
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1405
|
+
pcb_group_id: z75.string().optional(),
|
|
1406
|
+
subcircuit_id: z75.string().optional(),
|
|
1407
|
+
pcb_component_id: z75.string().optional(),
|
|
1408
|
+
hole_shape: z75.literal("oval"),
|
|
1409
|
+
hole_width: z75.number(),
|
|
1410
|
+
hole_height: z75.number(),
|
|
1399
1411
|
x: distance,
|
|
1400
1412
|
y: distance,
|
|
1401
|
-
is_covered_with_solder_mask:
|
|
1402
|
-
soldermask_margin:
|
|
1413
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1414
|
+
soldermask_margin: z75.number().optional()
|
|
1403
1415
|
});
|
|
1404
1416
|
var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
1405
1417
|
"Defines an oval hole on the PCB"
|
|
1406
1418
|
);
|
|
1407
1419
|
expectTypesMatch(true);
|
|
1408
|
-
var pcb_hole_pill =
|
|
1409
|
-
type:
|
|
1420
|
+
var pcb_hole_pill = z75.object({
|
|
1421
|
+
type: z75.literal("pcb_hole"),
|
|
1410
1422
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1411
|
-
pcb_group_id:
|
|
1412
|
-
subcircuit_id:
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1423
|
+
pcb_group_id: z75.string().optional(),
|
|
1424
|
+
subcircuit_id: z75.string().optional(),
|
|
1425
|
+
pcb_component_id: z75.string().optional(),
|
|
1426
|
+
hole_shape: z75.literal("pill"),
|
|
1427
|
+
hole_width: z75.number(),
|
|
1428
|
+
hole_height: z75.number(),
|
|
1416
1429
|
x: distance,
|
|
1417
1430
|
y: distance,
|
|
1418
|
-
is_covered_with_solder_mask:
|
|
1419
|
-
soldermask_margin:
|
|
1431
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1432
|
+
soldermask_margin: z75.number().optional()
|
|
1420
1433
|
});
|
|
1421
1434
|
var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
1422
1435
|
"Defines a pill-shaped hole on the PCB"
|
|
1423
1436
|
);
|
|
1424
1437
|
expectTypesMatch(true);
|
|
1425
|
-
var pcb_hole_rotated_pill =
|
|
1426
|
-
type:
|
|
1438
|
+
var pcb_hole_rotated_pill = z75.object({
|
|
1439
|
+
type: z75.literal("pcb_hole"),
|
|
1427
1440
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1428
|
-
pcb_group_id:
|
|
1429
|
-
subcircuit_id:
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1441
|
+
pcb_group_id: z75.string().optional(),
|
|
1442
|
+
subcircuit_id: z75.string().optional(),
|
|
1443
|
+
pcb_component_id: z75.string().optional(),
|
|
1444
|
+
hole_shape: z75.literal("rotated_pill"),
|
|
1445
|
+
hole_width: z75.number(),
|
|
1446
|
+
hole_height: z75.number(),
|
|
1447
|
+
x: distance,
|
|
1434
1448
|
y: distance,
|
|
1435
1449
|
ccw_rotation: rotation,
|
|
1436
|
-
is_covered_with_solder_mask:
|
|
1437
|
-
soldermask_margin:
|
|
1450
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1451
|
+
soldermask_margin: z75.number().optional()
|
|
1438
1452
|
});
|
|
1439
1453
|
var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
|
|
1440
1454
|
"Defines a rotated pill-shaped hole on the PCB"
|
|
@@ -1443,145 +1457,145 @@ expectTypesMatch(true);
|
|
|
1443
1457
|
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
1458
|
|
|
1445
1459
|
// 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:
|
|
1460
|
+
import { z as z76 } from "zod";
|
|
1461
|
+
var pcb_plated_hole_circle = z76.object({
|
|
1462
|
+
type: z76.literal("pcb_plated_hole"),
|
|
1463
|
+
shape: z76.literal("circle"),
|
|
1464
|
+
pcb_group_id: z76.string().optional(),
|
|
1465
|
+
subcircuit_id: z76.string().optional(),
|
|
1466
|
+
outer_diameter: z76.number(),
|
|
1467
|
+
hole_diameter: z76.number(),
|
|
1468
|
+
is_covered_with_solder_mask: z76.boolean().optional(),
|
|
1455
1469
|
x: distance,
|
|
1456
1470
|
y: distance,
|
|
1457
|
-
layers:
|
|
1458
|
-
port_hints:
|
|
1459
|
-
pcb_component_id:
|
|
1460
|
-
pcb_port_id:
|
|
1471
|
+
layers: z76.array(layer_ref),
|
|
1472
|
+
port_hints: z76.array(z76.string()).optional(),
|
|
1473
|
+
pcb_component_id: z76.string().optional(),
|
|
1474
|
+
pcb_port_id: z76.string().optional(),
|
|
1461
1475
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1462
|
-
soldermask_margin:
|
|
1476
|
+
soldermask_margin: z76.number().optional()
|
|
1463
1477
|
});
|
|
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:
|
|
1478
|
+
var pcb_plated_hole_oval = z76.object({
|
|
1479
|
+
type: z76.literal("pcb_plated_hole"),
|
|
1480
|
+
shape: z76.enum(["oval", "pill"]),
|
|
1481
|
+
pcb_group_id: z76.string().optional(),
|
|
1482
|
+
subcircuit_id: z76.string().optional(),
|
|
1483
|
+
outer_width: z76.number(),
|
|
1484
|
+
outer_height: z76.number(),
|
|
1485
|
+
hole_width: z76.number(),
|
|
1486
|
+
hole_height: z76.number(),
|
|
1487
|
+
is_covered_with_solder_mask: z76.boolean().optional(),
|
|
1474
1488
|
x: distance,
|
|
1475
1489
|
y: distance,
|
|
1476
1490
|
ccw_rotation: rotation,
|
|
1477
|
-
layers:
|
|
1478
|
-
port_hints:
|
|
1479
|
-
pcb_component_id:
|
|
1480
|
-
pcb_port_id:
|
|
1491
|
+
layers: z76.array(layer_ref),
|
|
1492
|
+
port_hints: z76.array(z76.string()).optional(),
|
|
1493
|
+
pcb_component_id: z76.string().optional(),
|
|
1494
|
+
pcb_port_id: z76.string().optional(),
|
|
1481
1495
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1482
|
-
soldermask_margin:
|
|
1496
|
+
soldermask_margin: z76.number().optional()
|
|
1483
1497
|
});
|
|
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:
|
|
1498
|
+
var pcb_circular_hole_with_rect_pad = z76.object({
|
|
1499
|
+
type: z76.literal("pcb_plated_hole"),
|
|
1500
|
+
shape: z76.literal("circular_hole_with_rect_pad"),
|
|
1501
|
+
pcb_group_id: z76.string().optional(),
|
|
1502
|
+
subcircuit_id: z76.string().optional(),
|
|
1503
|
+
hole_shape: z76.literal("circle"),
|
|
1504
|
+
pad_shape: z76.literal("rect"),
|
|
1505
|
+
hole_diameter: z76.number(),
|
|
1506
|
+
rect_pad_width: z76.number(),
|
|
1507
|
+
rect_pad_height: z76.number(),
|
|
1508
|
+
rect_border_radius: z76.number().optional(),
|
|
1495
1509
|
hole_offset_x: distance.default(0),
|
|
1496
1510
|
hole_offset_y: distance.default(0),
|
|
1497
|
-
is_covered_with_solder_mask:
|
|
1511
|
+
is_covered_with_solder_mask: z76.boolean().optional(),
|
|
1498
1512
|
x: distance,
|
|
1499
1513
|
y: distance,
|
|
1500
|
-
layers:
|
|
1501
|
-
port_hints:
|
|
1502
|
-
pcb_component_id:
|
|
1503
|
-
pcb_port_id:
|
|
1514
|
+
layers: z76.array(layer_ref),
|
|
1515
|
+
port_hints: z76.array(z76.string()).optional(),
|
|
1516
|
+
pcb_component_id: z76.string().optional(),
|
|
1517
|
+
pcb_port_id: z76.string().optional(),
|
|
1504
1518
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1505
|
-
soldermask_margin:
|
|
1519
|
+
soldermask_margin: z76.number().optional()
|
|
1506
1520
|
});
|
|
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:
|
|
1521
|
+
var pcb_pill_hole_with_rect_pad = z76.object({
|
|
1522
|
+
type: z76.literal("pcb_plated_hole"),
|
|
1523
|
+
shape: z76.literal("pill_hole_with_rect_pad"),
|
|
1524
|
+
pcb_group_id: z76.string().optional(),
|
|
1525
|
+
subcircuit_id: z76.string().optional(),
|
|
1526
|
+
hole_shape: z76.literal("pill"),
|
|
1527
|
+
pad_shape: z76.literal("rect"),
|
|
1528
|
+
hole_width: z76.number(),
|
|
1529
|
+
hole_height: z76.number(),
|
|
1530
|
+
rect_pad_width: z76.number(),
|
|
1531
|
+
rect_pad_height: z76.number(),
|
|
1532
|
+
rect_border_radius: z76.number().optional(),
|
|
1519
1533
|
hole_offset_x: distance.default(0),
|
|
1520
1534
|
hole_offset_y: distance.default(0),
|
|
1521
|
-
is_covered_with_solder_mask:
|
|
1535
|
+
is_covered_with_solder_mask: z76.boolean().optional(),
|
|
1522
1536
|
x: distance,
|
|
1523
1537
|
y: distance,
|
|
1524
|
-
layers:
|
|
1525
|
-
port_hints:
|
|
1526
|
-
pcb_component_id:
|
|
1527
|
-
pcb_port_id:
|
|
1538
|
+
layers: z76.array(layer_ref),
|
|
1539
|
+
port_hints: z76.array(z76.string()).optional(),
|
|
1540
|
+
pcb_component_id: z76.string().optional(),
|
|
1541
|
+
pcb_port_id: z76.string().optional(),
|
|
1528
1542
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1529
|
-
soldermask_margin:
|
|
1543
|
+
soldermask_margin: z76.number().optional()
|
|
1530
1544
|
});
|
|
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:
|
|
1545
|
+
var pcb_rotated_pill_hole_with_rect_pad = z76.object({
|
|
1546
|
+
type: z76.literal("pcb_plated_hole"),
|
|
1547
|
+
shape: z76.literal("rotated_pill_hole_with_rect_pad"),
|
|
1548
|
+
pcb_group_id: z76.string().optional(),
|
|
1549
|
+
subcircuit_id: z76.string().optional(),
|
|
1550
|
+
hole_shape: z76.literal("rotated_pill"),
|
|
1551
|
+
pad_shape: z76.literal("rect"),
|
|
1552
|
+
hole_width: z76.number(),
|
|
1553
|
+
hole_height: z76.number(),
|
|
1540
1554
|
hole_ccw_rotation: rotation,
|
|
1541
|
-
rect_pad_width:
|
|
1542
|
-
rect_pad_height:
|
|
1543
|
-
rect_border_radius:
|
|
1555
|
+
rect_pad_width: z76.number(),
|
|
1556
|
+
rect_pad_height: z76.number(),
|
|
1557
|
+
rect_border_radius: z76.number().optional(),
|
|
1544
1558
|
rect_ccw_rotation: rotation,
|
|
1545
1559
|
hole_offset_x: distance.default(0),
|
|
1546
1560
|
hole_offset_y: distance.default(0),
|
|
1547
|
-
is_covered_with_solder_mask:
|
|
1561
|
+
is_covered_with_solder_mask: z76.boolean().optional(),
|
|
1548
1562
|
x: distance,
|
|
1549
1563
|
y: distance,
|
|
1550
|
-
layers:
|
|
1551
|
-
port_hints:
|
|
1552
|
-
pcb_component_id:
|
|
1553
|
-
pcb_port_id:
|
|
1564
|
+
layers: z76.array(layer_ref),
|
|
1565
|
+
port_hints: z76.array(z76.string()).optional(),
|
|
1566
|
+
pcb_component_id: z76.string().optional(),
|
|
1567
|
+
pcb_port_id: z76.string().optional(),
|
|
1554
1568
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1555
|
-
soldermask_margin:
|
|
1569
|
+
soldermask_margin: z76.number().optional()
|
|
1556
1570
|
});
|
|
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
|
-
|
|
1571
|
+
var pcb_hole_with_polygon_pad = z76.object({
|
|
1572
|
+
type: z76.literal("pcb_plated_hole"),
|
|
1573
|
+
shape: z76.literal("hole_with_polygon_pad"),
|
|
1574
|
+
pcb_group_id: z76.string().optional(),
|
|
1575
|
+
subcircuit_id: z76.string().optional(),
|
|
1576
|
+
hole_shape: z76.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
1577
|
+
hole_diameter: z76.number().optional(),
|
|
1578
|
+
hole_width: z76.number().optional(),
|
|
1579
|
+
hole_height: z76.number().optional(),
|
|
1580
|
+
pad_outline: z76.array(
|
|
1581
|
+
z76.object({
|
|
1568
1582
|
x: distance,
|
|
1569
1583
|
y: distance
|
|
1570
1584
|
})
|
|
1571
1585
|
).min(3),
|
|
1572
1586
|
hole_offset_x: distance.default(0),
|
|
1573
1587
|
hole_offset_y: distance.default(0),
|
|
1574
|
-
is_covered_with_solder_mask:
|
|
1588
|
+
is_covered_with_solder_mask: z76.boolean().optional(),
|
|
1575
1589
|
x: distance,
|
|
1576
1590
|
y: distance,
|
|
1577
|
-
layers:
|
|
1578
|
-
port_hints:
|
|
1579
|
-
pcb_component_id:
|
|
1580
|
-
pcb_port_id:
|
|
1591
|
+
layers: z76.array(layer_ref),
|
|
1592
|
+
port_hints: z76.array(z76.string()).optional(),
|
|
1593
|
+
pcb_component_id: z76.string().optional(),
|
|
1594
|
+
pcb_port_id: z76.string().optional(),
|
|
1581
1595
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1582
|
-
soldermask_margin:
|
|
1596
|
+
soldermask_margin: z76.number().optional()
|
|
1583
1597
|
});
|
|
1584
|
-
var pcb_plated_hole =
|
|
1598
|
+
var pcb_plated_hole = z76.union([
|
|
1585
1599
|
pcb_plated_hole_circle,
|
|
1586
1600
|
pcb_plated_hole_oval,
|
|
1587
1601
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -1599,130 +1613,130 @@ expectTypesMatch(true);
|
|
|
1599
1613
|
expectTypesMatch(true);
|
|
1600
1614
|
|
|
1601
1615
|
// src/pcb/pcb_port.ts
|
|
1602
|
-
import { z as
|
|
1603
|
-
var pcb_port =
|
|
1604
|
-
type:
|
|
1616
|
+
import { z as z77 } from "zod";
|
|
1617
|
+
var pcb_port = z77.object({
|
|
1618
|
+
type: z77.literal("pcb_port"),
|
|
1605
1619
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
1606
|
-
pcb_group_id:
|
|
1607
|
-
subcircuit_id:
|
|
1608
|
-
source_port_id:
|
|
1609
|
-
pcb_component_id:
|
|
1620
|
+
pcb_group_id: z77.string().optional(),
|
|
1621
|
+
subcircuit_id: z77.string().optional(),
|
|
1622
|
+
source_port_id: z77.string(),
|
|
1623
|
+
pcb_component_id: z77.string().optional(),
|
|
1610
1624
|
x: distance,
|
|
1611
1625
|
y: distance,
|
|
1612
|
-
layers:
|
|
1613
|
-
is_board_pinout:
|
|
1626
|
+
layers: z77.array(layer_ref),
|
|
1627
|
+
is_board_pinout: z77.boolean().optional()
|
|
1614
1628
|
}).describe("Defines a port on the PCB");
|
|
1615
1629
|
expectTypesMatch(true);
|
|
1616
1630
|
|
|
1617
1631
|
// src/pcb/pcb_smtpad.ts
|
|
1618
|
-
import { z as
|
|
1619
|
-
var pcb_smtpad_circle =
|
|
1620
|
-
type:
|
|
1621
|
-
shape:
|
|
1632
|
+
import { z as z78 } from "zod";
|
|
1633
|
+
var pcb_smtpad_circle = z78.object({
|
|
1634
|
+
type: z78.literal("pcb_smtpad"),
|
|
1635
|
+
shape: z78.literal("circle"),
|
|
1622
1636
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1623
|
-
pcb_group_id:
|
|
1624
|
-
subcircuit_id:
|
|
1637
|
+
pcb_group_id: z78.string().optional(),
|
|
1638
|
+
subcircuit_id: z78.string().optional(),
|
|
1625
1639
|
x: distance,
|
|
1626
1640
|
y: distance,
|
|
1627
|
-
radius:
|
|
1641
|
+
radius: z78.number(),
|
|
1628
1642
|
layer: layer_ref,
|
|
1629
|
-
port_hints:
|
|
1630
|
-
pcb_component_id:
|
|
1631
|
-
pcb_port_id:
|
|
1632
|
-
is_covered_with_solder_mask:
|
|
1633
|
-
soldermask_margin:
|
|
1643
|
+
port_hints: z78.array(z78.string()).optional(),
|
|
1644
|
+
pcb_component_id: z78.string().optional(),
|
|
1645
|
+
pcb_port_id: z78.string().optional(),
|
|
1646
|
+
is_covered_with_solder_mask: z78.boolean().optional(),
|
|
1647
|
+
soldermask_margin: z78.number().optional()
|
|
1634
1648
|
});
|
|
1635
|
-
var pcb_smtpad_rect =
|
|
1636
|
-
type:
|
|
1637
|
-
shape:
|
|
1649
|
+
var pcb_smtpad_rect = z78.object({
|
|
1650
|
+
type: z78.literal("pcb_smtpad"),
|
|
1651
|
+
shape: z78.literal("rect"),
|
|
1638
1652
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1639
|
-
pcb_group_id:
|
|
1640
|
-
subcircuit_id:
|
|
1653
|
+
pcb_group_id: z78.string().optional(),
|
|
1654
|
+
subcircuit_id: z78.string().optional(),
|
|
1641
1655
|
x: distance,
|
|
1642
1656
|
y: distance,
|
|
1643
|
-
width:
|
|
1644
|
-
height:
|
|
1645
|
-
rect_border_radius:
|
|
1646
|
-
corner_radius:
|
|
1657
|
+
width: z78.number(),
|
|
1658
|
+
height: z78.number(),
|
|
1659
|
+
rect_border_radius: z78.number().optional(),
|
|
1660
|
+
corner_radius: z78.number().optional(),
|
|
1647
1661
|
layer: layer_ref,
|
|
1648
|
-
port_hints:
|
|
1649
|
-
pcb_component_id:
|
|
1650
|
-
pcb_port_id:
|
|
1651
|
-
is_covered_with_solder_mask:
|
|
1652
|
-
soldermask_margin:
|
|
1662
|
+
port_hints: z78.array(z78.string()).optional(),
|
|
1663
|
+
pcb_component_id: z78.string().optional(),
|
|
1664
|
+
pcb_port_id: z78.string().optional(),
|
|
1665
|
+
is_covered_with_solder_mask: z78.boolean().optional(),
|
|
1666
|
+
soldermask_margin: z78.number().optional()
|
|
1653
1667
|
});
|
|
1654
|
-
var pcb_smtpad_rotated_rect =
|
|
1655
|
-
type:
|
|
1656
|
-
shape:
|
|
1668
|
+
var pcb_smtpad_rotated_rect = z78.object({
|
|
1669
|
+
type: z78.literal("pcb_smtpad"),
|
|
1670
|
+
shape: z78.literal("rotated_rect"),
|
|
1657
1671
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1658
|
-
pcb_group_id:
|
|
1659
|
-
subcircuit_id:
|
|
1672
|
+
pcb_group_id: z78.string().optional(),
|
|
1673
|
+
subcircuit_id: z78.string().optional(),
|
|
1660
1674
|
x: distance,
|
|
1661
1675
|
y: distance,
|
|
1662
|
-
width:
|
|
1663
|
-
height:
|
|
1664
|
-
rect_border_radius:
|
|
1665
|
-
corner_radius:
|
|
1676
|
+
width: z78.number(),
|
|
1677
|
+
height: z78.number(),
|
|
1678
|
+
rect_border_radius: z78.number().optional(),
|
|
1679
|
+
corner_radius: z78.number().optional(),
|
|
1666
1680
|
ccw_rotation: rotation,
|
|
1667
1681
|
layer: layer_ref,
|
|
1668
|
-
port_hints:
|
|
1669
|
-
pcb_component_id:
|
|
1670
|
-
pcb_port_id:
|
|
1671
|
-
is_covered_with_solder_mask:
|
|
1672
|
-
soldermask_margin:
|
|
1682
|
+
port_hints: z78.array(z78.string()).optional(),
|
|
1683
|
+
pcb_component_id: z78.string().optional(),
|
|
1684
|
+
pcb_port_id: z78.string().optional(),
|
|
1685
|
+
is_covered_with_solder_mask: z78.boolean().optional(),
|
|
1686
|
+
soldermask_margin: z78.number().optional()
|
|
1673
1687
|
});
|
|
1674
|
-
var pcb_smtpad_pill =
|
|
1675
|
-
type:
|
|
1676
|
-
shape:
|
|
1688
|
+
var pcb_smtpad_pill = z78.object({
|
|
1689
|
+
type: z78.literal("pcb_smtpad"),
|
|
1690
|
+
shape: z78.literal("pill"),
|
|
1677
1691
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1678
|
-
pcb_group_id:
|
|
1679
|
-
subcircuit_id:
|
|
1692
|
+
pcb_group_id: z78.string().optional(),
|
|
1693
|
+
subcircuit_id: z78.string().optional(),
|
|
1680
1694
|
x: distance,
|
|
1681
1695
|
y: distance,
|
|
1682
|
-
width:
|
|
1683
|
-
height:
|
|
1684
|
-
radius:
|
|
1696
|
+
width: z78.number(),
|
|
1697
|
+
height: z78.number(),
|
|
1698
|
+
radius: z78.number(),
|
|
1685
1699
|
layer: layer_ref,
|
|
1686
|
-
port_hints:
|
|
1687
|
-
pcb_component_id:
|
|
1688
|
-
pcb_port_id:
|
|
1689
|
-
is_covered_with_solder_mask:
|
|
1690
|
-
soldermask_margin:
|
|
1700
|
+
port_hints: z78.array(z78.string()).optional(),
|
|
1701
|
+
pcb_component_id: z78.string().optional(),
|
|
1702
|
+
pcb_port_id: z78.string().optional(),
|
|
1703
|
+
is_covered_with_solder_mask: z78.boolean().optional(),
|
|
1704
|
+
soldermask_margin: z78.number().optional()
|
|
1691
1705
|
});
|
|
1692
|
-
var pcb_smtpad_rotated_pill =
|
|
1693
|
-
type:
|
|
1694
|
-
shape:
|
|
1706
|
+
var pcb_smtpad_rotated_pill = z78.object({
|
|
1707
|
+
type: z78.literal("pcb_smtpad"),
|
|
1708
|
+
shape: z78.literal("rotated_pill"),
|
|
1695
1709
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1696
|
-
pcb_group_id:
|
|
1697
|
-
subcircuit_id:
|
|
1710
|
+
pcb_group_id: z78.string().optional(),
|
|
1711
|
+
subcircuit_id: z78.string().optional(),
|
|
1698
1712
|
x: distance,
|
|
1699
1713
|
y: distance,
|
|
1700
|
-
width:
|
|
1701
|
-
height:
|
|
1702
|
-
radius:
|
|
1714
|
+
width: z78.number(),
|
|
1715
|
+
height: z78.number(),
|
|
1716
|
+
radius: z78.number(),
|
|
1703
1717
|
ccw_rotation: rotation,
|
|
1704
1718
|
layer: layer_ref,
|
|
1705
|
-
port_hints:
|
|
1706
|
-
pcb_component_id:
|
|
1707
|
-
pcb_port_id:
|
|
1708
|
-
is_covered_with_solder_mask:
|
|
1709
|
-
soldermask_margin:
|
|
1719
|
+
port_hints: z78.array(z78.string()).optional(),
|
|
1720
|
+
pcb_component_id: z78.string().optional(),
|
|
1721
|
+
pcb_port_id: z78.string().optional(),
|
|
1722
|
+
is_covered_with_solder_mask: z78.boolean().optional(),
|
|
1723
|
+
soldermask_margin: z78.number().optional()
|
|
1710
1724
|
});
|
|
1711
|
-
var pcb_smtpad_polygon =
|
|
1712
|
-
type:
|
|
1713
|
-
shape:
|
|
1725
|
+
var pcb_smtpad_polygon = z78.object({
|
|
1726
|
+
type: z78.literal("pcb_smtpad"),
|
|
1727
|
+
shape: z78.literal("polygon"),
|
|
1714
1728
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1715
|
-
pcb_group_id:
|
|
1716
|
-
subcircuit_id:
|
|
1717
|
-
points:
|
|
1729
|
+
pcb_group_id: z78.string().optional(),
|
|
1730
|
+
subcircuit_id: z78.string().optional(),
|
|
1731
|
+
points: z78.array(point),
|
|
1718
1732
|
layer: layer_ref,
|
|
1719
|
-
port_hints:
|
|
1720
|
-
pcb_component_id:
|
|
1721
|
-
pcb_port_id:
|
|
1722
|
-
is_covered_with_solder_mask:
|
|
1723
|
-
soldermask_margin:
|
|
1733
|
+
port_hints: z78.array(z78.string()).optional(),
|
|
1734
|
+
pcb_component_id: z78.string().optional(),
|
|
1735
|
+
pcb_port_id: z78.string().optional(),
|
|
1736
|
+
is_covered_with_solder_mask: z78.boolean().optional(),
|
|
1737
|
+
soldermask_margin: z78.number().optional()
|
|
1724
1738
|
});
|
|
1725
|
-
var pcb_smtpad =
|
|
1739
|
+
var pcb_smtpad = z78.discriminatedUnion("shape", [
|
|
1726
1740
|
pcb_smtpad_circle,
|
|
1727
1741
|
pcb_smtpad_rect,
|
|
1728
1742
|
pcb_smtpad_rotated_rect,
|
|
@@ -1738,79 +1752,79 @@ expectTypesMatch(true);
|
|
|
1738
1752
|
expectTypesMatch(true);
|
|
1739
1753
|
|
|
1740
1754
|
// src/pcb/pcb_solder_paste.ts
|
|
1741
|
-
import { z as
|
|
1742
|
-
var pcb_solder_paste_circle =
|
|
1743
|
-
type:
|
|
1744
|
-
shape:
|
|
1755
|
+
import { z as z79 } from "zod";
|
|
1756
|
+
var pcb_solder_paste_circle = z79.object({
|
|
1757
|
+
type: z79.literal("pcb_solder_paste"),
|
|
1758
|
+
shape: z79.literal("circle"),
|
|
1745
1759
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1746
|
-
pcb_group_id:
|
|
1747
|
-
subcircuit_id:
|
|
1760
|
+
pcb_group_id: z79.string().optional(),
|
|
1761
|
+
subcircuit_id: z79.string().optional(),
|
|
1748
1762
|
x: distance,
|
|
1749
1763
|
y: distance,
|
|
1750
|
-
radius:
|
|
1764
|
+
radius: z79.number(),
|
|
1751
1765
|
layer: layer_ref,
|
|
1752
|
-
pcb_component_id:
|
|
1753
|
-
pcb_smtpad_id:
|
|
1766
|
+
pcb_component_id: z79.string().optional(),
|
|
1767
|
+
pcb_smtpad_id: z79.string().optional()
|
|
1754
1768
|
});
|
|
1755
|
-
var pcb_solder_paste_rect =
|
|
1756
|
-
type:
|
|
1757
|
-
shape:
|
|
1769
|
+
var pcb_solder_paste_rect = z79.object({
|
|
1770
|
+
type: z79.literal("pcb_solder_paste"),
|
|
1771
|
+
shape: z79.literal("rect"),
|
|
1758
1772
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1759
|
-
pcb_group_id:
|
|
1760
|
-
subcircuit_id:
|
|
1773
|
+
pcb_group_id: z79.string().optional(),
|
|
1774
|
+
subcircuit_id: z79.string().optional(),
|
|
1761
1775
|
x: distance,
|
|
1762
1776
|
y: distance,
|
|
1763
|
-
width:
|
|
1764
|
-
height:
|
|
1777
|
+
width: z79.number(),
|
|
1778
|
+
height: z79.number(),
|
|
1765
1779
|
layer: layer_ref,
|
|
1766
|
-
pcb_component_id:
|
|
1767
|
-
pcb_smtpad_id:
|
|
1780
|
+
pcb_component_id: z79.string().optional(),
|
|
1781
|
+
pcb_smtpad_id: z79.string().optional()
|
|
1768
1782
|
});
|
|
1769
|
-
var pcb_solder_paste_pill =
|
|
1770
|
-
type:
|
|
1771
|
-
shape:
|
|
1783
|
+
var pcb_solder_paste_pill = z79.object({
|
|
1784
|
+
type: z79.literal("pcb_solder_paste"),
|
|
1785
|
+
shape: z79.literal("pill"),
|
|
1772
1786
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1773
|
-
pcb_group_id:
|
|
1774
|
-
subcircuit_id:
|
|
1787
|
+
pcb_group_id: z79.string().optional(),
|
|
1788
|
+
subcircuit_id: z79.string().optional(),
|
|
1775
1789
|
x: distance,
|
|
1776
1790
|
y: distance,
|
|
1777
|
-
width:
|
|
1778
|
-
height:
|
|
1779
|
-
radius:
|
|
1791
|
+
width: z79.number(),
|
|
1792
|
+
height: z79.number(),
|
|
1793
|
+
radius: z79.number(),
|
|
1780
1794
|
layer: layer_ref,
|
|
1781
|
-
pcb_component_id:
|
|
1782
|
-
pcb_smtpad_id:
|
|
1795
|
+
pcb_component_id: z79.string().optional(),
|
|
1796
|
+
pcb_smtpad_id: z79.string().optional()
|
|
1783
1797
|
});
|
|
1784
|
-
var pcb_solder_paste_rotated_rect =
|
|
1785
|
-
type:
|
|
1786
|
-
shape:
|
|
1798
|
+
var pcb_solder_paste_rotated_rect = z79.object({
|
|
1799
|
+
type: z79.literal("pcb_solder_paste"),
|
|
1800
|
+
shape: z79.literal("rotated_rect"),
|
|
1787
1801
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1788
|
-
pcb_group_id:
|
|
1789
|
-
subcircuit_id:
|
|
1802
|
+
pcb_group_id: z79.string().optional(),
|
|
1803
|
+
subcircuit_id: z79.string().optional(),
|
|
1790
1804
|
x: distance,
|
|
1791
1805
|
y: distance,
|
|
1792
|
-
width:
|
|
1793
|
-
height:
|
|
1806
|
+
width: z79.number(),
|
|
1807
|
+
height: z79.number(),
|
|
1794
1808
|
ccw_rotation: distance,
|
|
1795
1809
|
layer: layer_ref,
|
|
1796
|
-
pcb_component_id:
|
|
1797
|
-
pcb_smtpad_id:
|
|
1810
|
+
pcb_component_id: z79.string().optional(),
|
|
1811
|
+
pcb_smtpad_id: z79.string().optional()
|
|
1798
1812
|
});
|
|
1799
|
-
var pcb_solder_paste_oval =
|
|
1800
|
-
type:
|
|
1801
|
-
shape:
|
|
1813
|
+
var pcb_solder_paste_oval = z79.object({
|
|
1814
|
+
type: z79.literal("pcb_solder_paste"),
|
|
1815
|
+
shape: z79.literal("oval"),
|
|
1802
1816
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1803
|
-
pcb_group_id:
|
|
1804
|
-
subcircuit_id:
|
|
1817
|
+
pcb_group_id: z79.string().optional(),
|
|
1818
|
+
subcircuit_id: z79.string().optional(),
|
|
1805
1819
|
x: distance,
|
|
1806
1820
|
y: distance,
|
|
1807
|
-
width:
|
|
1808
|
-
height:
|
|
1821
|
+
width: z79.number(),
|
|
1822
|
+
height: z79.number(),
|
|
1809
1823
|
layer: layer_ref,
|
|
1810
|
-
pcb_component_id:
|
|
1811
|
-
pcb_smtpad_id:
|
|
1824
|
+
pcb_component_id: z79.string().optional(),
|
|
1825
|
+
pcb_smtpad_id: z79.string().optional()
|
|
1812
1826
|
});
|
|
1813
|
-
var pcb_solder_paste =
|
|
1827
|
+
var pcb_solder_paste = z79.union([
|
|
1814
1828
|
pcb_solder_paste_circle,
|
|
1815
1829
|
pcb_solder_paste_rect,
|
|
1816
1830
|
pcb_solder_paste_pill,
|
|
@@ -1826,146 +1840,146 @@ expectTypesMatch(
|
|
|
1826
1840
|
expectTypesMatch(true);
|
|
1827
1841
|
|
|
1828
1842
|
// src/pcb/pcb_text.ts
|
|
1829
|
-
import { z as
|
|
1830
|
-
var pcb_text =
|
|
1831
|
-
type:
|
|
1843
|
+
import { z as z80 } from "zod";
|
|
1844
|
+
var pcb_text = z80.object({
|
|
1845
|
+
type: z80.literal("pcb_text"),
|
|
1832
1846
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
1833
|
-
pcb_group_id:
|
|
1834
|
-
subcircuit_id:
|
|
1835
|
-
text:
|
|
1847
|
+
pcb_group_id: z80.string().optional(),
|
|
1848
|
+
subcircuit_id: z80.string().optional(),
|
|
1849
|
+
text: z80.string(),
|
|
1836
1850
|
center: point,
|
|
1837
1851
|
layer: layer_ref,
|
|
1838
1852
|
width: length,
|
|
1839
1853
|
height: length,
|
|
1840
|
-
lines:
|
|
1854
|
+
lines: z80.number(),
|
|
1841
1855
|
// @ts-ignore
|
|
1842
|
-
align:
|
|
1856
|
+
align: z80.enum(["bottom-left"])
|
|
1843
1857
|
}).describe("Defines text on the PCB");
|
|
1844
1858
|
expectTypesMatch(true);
|
|
1845
1859
|
|
|
1846
1860
|
// src/pcb/pcb_trace.ts
|
|
1847
|
-
import { z as
|
|
1848
|
-
var pcb_trace_route_point_wire =
|
|
1849
|
-
route_type:
|
|
1861
|
+
import { z as z81 } from "zod";
|
|
1862
|
+
var pcb_trace_route_point_wire = z81.object({
|
|
1863
|
+
route_type: z81.literal("wire"),
|
|
1850
1864
|
x: distance,
|
|
1851
1865
|
y: distance,
|
|
1852
1866
|
width: distance,
|
|
1853
|
-
start_pcb_port_id:
|
|
1854
|
-
end_pcb_port_id:
|
|
1867
|
+
start_pcb_port_id: z81.string().optional(),
|
|
1868
|
+
end_pcb_port_id: z81.string().optional(),
|
|
1855
1869
|
layer: layer_ref
|
|
1856
1870
|
});
|
|
1857
|
-
var pcb_trace_route_point_via =
|
|
1858
|
-
route_type:
|
|
1871
|
+
var pcb_trace_route_point_via = z81.object({
|
|
1872
|
+
route_type: z81.literal("via"),
|
|
1859
1873
|
x: distance,
|
|
1860
1874
|
y: distance,
|
|
1861
1875
|
hole_diameter: distance.optional(),
|
|
1862
1876
|
outer_diameter: distance.optional(),
|
|
1863
|
-
from_layer:
|
|
1864
|
-
to_layer:
|
|
1877
|
+
from_layer: z81.string(),
|
|
1878
|
+
to_layer: z81.string()
|
|
1865
1879
|
});
|
|
1866
|
-
var pcb_trace_route_point =
|
|
1880
|
+
var pcb_trace_route_point = z81.union([
|
|
1867
1881
|
pcb_trace_route_point_wire,
|
|
1868
1882
|
pcb_trace_route_point_via
|
|
1869
1883
|
]);
|
|
1870
|
-
var pcb_trace =
|
|
1871
|
-
type:
|
|
1872
|
-
source_trace_id:
|
|
1873
|
-
pcb_component_id:
|
|
1884
|
+
var pcb_trace = z81.object({
|
|
1885
|
+
type: z81.literal("pcb_trace"),
|
|
1886
|
+
source_trace_id: z81.string().optional(),
|
|
1887
|
+
pcb_component_id: z81.string().optional(),
|
|
1874
1888
|
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:
|
|
1889
|
+
pcb_group_id: z81.string().optional(),
|
|
1890
|
+
subcircuit_id: z81.string().optional(),
|
|
1891
|
+
route_thickness_mode: z81.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
1892
|
+
route_order_index: z81.number().optional(),
|
|
1893
|
+
should_round_corners: z81.boolean().optional(),
|
|
1894
|
+
trace_length: z81.number().optional(),
|
|
1895
|
+
highlight_color: z81.string().optional(),
|
|
1896
|
+
route: z81.array(pcb_trace_route_point)
|
|
1883
1897
|
}).describe("Defines a trace on the PCB");
|
|
1884
1898
|
expectTypesMatch(true);
|
|
1885
1899
|
expectTypesMatch(true);
|
|
1886
1900
|
|
|
1887
1901
|
// src/pcb/pcb_trace_error.ts
|
|
1888
|
-
import { z as
|
|
1889
|
-
var pcb_trace_error =
|
|
1890
|
-
type:
|
|
1902
|
+
import { z as z82 } from "zod";
|
|
1903
|
+
var pcb_trace_error = z82.object({
|
|
1904
|
+
type: z82.literal("pcb_trace_error"),
|
|
1891
1905
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
1892
|
-
error_type:
|
|
1893
|
-
message:
|
|
1906
|
+
error_type: z82.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
1907
|
+
message: z82.string(),
|
|
1894
1908
|
center: point.optional(),
|
|
1895
|
-
pcb_trace_id:
|
|
1896
|
-
source_trace_id:
|
|
1897
|
-
pcb_component_ids:
|
|
1898
|
-
pcb_port_ids:
|
|
1899
|
-
subcircuit_id:
|
|
1909
|
+
pcb_trace_id: z82.string(),
|
|
1910
|
+
source_trace_id: z82.string(),
|
|
1911
|
+
pcb_component_ids: z82.array(z82.string()),
|
|
1912
|
+
pcb_port_ids: z82.array(z82.string()),
|
|
1913
|
+
subcircuit_id: z82.string().optional()
|
|
1900
1914
|
}).describe("Defines a trace error on the PCB");
|
|
1901
1915
|
expectTypesMatch(true);
|
|
1902
1916
|
|
|
1903
1917
|
// src/pcb/pcb_trace_missing_error.ts
|
|
1904
|
-
import { z as
|
|
1905
|
-
var pcb_trace_missing_error =
|
|
1906
|
-
type:
|
|
1918
|
+
import { z as z83 } from "zod";
|
|
1919
|
+
var pcb_trace_missing_error = z83.object({
|
|
1920
|
+
type: z83.literal("pcb_trace_missing_error"),
|
|
1907
1921
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
1908
1922
|
"pcb_trace_missing_error"
|
|
1909
1923
|
),
|
|
1910
|
-
error_type:
|
|
1911
|
-
message:
|
|
1924
|
+
error_type: z83.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
1925
|
+
message: z83.string(),
|
|
1912
1926
|
center: point.optional(),
|
|
1913
|
-
source_trace_id:
|
|
1914
|
-
pcb_component_ids:
|
|
1915
|
-
pcb_port_ids:
|
|
1916
|
-
subcircuit_id:
|
|
1927
|
+
source_trace_id: z83.string(),
|
|
1928
|
+
pcb_component_ids: z83.array(z83.string()),
|
|
1929
|
+
pcb_port_ids: z83.array(z83.string()),
|
|
1930
|
+
subcircuit_id: z83.string().optional()
|
|
1917
1931
|
}).describe(
|
|
1918
1932
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
1919
1933
|
);
|
|
1920
1934
|
expectTypesMatch(true);
|
|
1921
1935
|
|
|
1922
1936
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
1923
|
-
import { z as
|
|
1924
|
-
var pcb_port_not_matched_error =
|
|
1925
|
-
type:
|
|
1937
|
+
import { z as z84 } from "zod";
|
|
1938
|
+
var pcb_port_not_matched_error = z84.object({
|
|
1939
|
+
type: z84.literal("pcb_port_not_matched_error"),
|
|
1926
1940
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1927
|
-
error_type:
|
|
1928
|
-
message:
|
|
1929
|
-
pcb_component_ids:
|
|
1930
|
-
subcircuit_id:
|
|
1941
|
+
error_type: z84.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
1942
|
+
message: z84.string(),
|
|
1943
|
+
pcb_component_ids: z84.array(z84.string()),
|
|
1944
|
+
subcircuit_id: z84.string().optional()
|
|
1931
1945
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
1932
1946
|
expectTypesMatch(true);
|
|
1933
1947
|
|
|
1934
1948
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
1935
|
-
import { z as
|
|
1936
|
-
var pcb_port_not_connected_error =
|
|
1937
|
-
type:
|
|
1949
|
+
import { z as z85 } from "zod";
|
|
1950
|
+
var pcb_port_not_connected_error = z85.object({
|
|
1951
|
+
type: z85.literal("pcb_port_not_connected_error"),
|
|
1938
1952
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
1939
1953
|
"pcb_port_not_connected_error"
|
|
1940
1954
|
),
|
|
1941
|
-
error_type:
|
|
1942
|
-
message:
|
|
1943
|
-
pcb_port_ids:
|
|
1944
|
-
pcb_component_ids:
|
|
1945
|
-
subcircuit_id:
|
|
1955
|
+
error_type: z85.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
1956
|
+
message: z85.string(),
|
|
1957
|
+
pcb_port_ids: z85.array(z85.string()),
|
|
1958
|
+
pcb_component_ids: z85.array(z85.string()),
|
|
1959
|
+
subcircuit_id: z85.string().optional()
|
|
1946
1960
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
1947
1961
|
expectTypesMatch(
|
|
1948
1962
|
true
|
|
1949
1963
|
);
|
|
1950
1964
|
|
|
1951
1965
|
// src/pcb/pcb_net.ts
|
|
1952
|
-
import { z as
|
|
1953
|
-
var pcb_net =
|
|
1954
|
-
type:
|
|
1966
|
+
import { z as z86 } from "zod";
|
|
1967
|
+
var pcb_net = z86.object({
|
|
1968
|
+
type: z86.literal("pcb_net"),
|
|
1955
1969
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
1956
|
-
source_net_id:
|
|
1957
|
-
highlight_color:
|
|
1970
|
+
source_net_id: z86.string().optional(),
|
|
1971
|
+
highlight_color: z86.string().optional()
|
|
1958
1972
|
}).describe("Defines a net on the PCB");
|
|
1959
1973
|
expectTypesMatch(true);
|
|
1960
1974
|
|
|
1961
1975
|
// src/pcb/pcb_via.ts
|
|
1962
|
-
import { z as
|
|
1963
|
-
var pcb_via =
|
|
1964
|
-
type:
|
|
1976
|
+
import { z as z87 } from "zod";
|
|
1977
|
+
var pcb_via = z87.object({
|
|
1978
|
+
type: z87.literal("pcb_via"),
|
|
1965
1979
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
1966
|
-
pcb_group_id:
|
|
1967
|
-
subcircuit_id:
|
|
1968
|
-
subcircuit_connectivity_map_key:
|
|
1980
|
+
pcb_group_id: z87.string().optional(),
|
|
1981
|
+
subcircuit_id: z87.string().optional(),
|
|
1982
|
+
subcircuit_connectivity_map_key: z87.string().optional(),
|
|
1969
1983
|
x: distance,
|
|
1970
1984
|
y: distance,
|
|
1971
1985
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -1974,76 +1988,76 @@ var pcb_via = z86.object({
|
|
|
1974
1988
|
from_layer: layer_ref.optional(),
|
|
1975
1989
|
/** @deprecated */
|
|
1976
1990
|
to_layer: layer_ref.optional(),
|
|
1977
|
-
layers:
|
|
1978
|
-
pcb_trace_id:
|
|
1979
|
-
net_is_assignable:
|
|
1980
|
-
net_assigned:
|
|
1981
|
-
is_tented:
|
|
1991
|
+
layers: z87.array(layer_ref),
|
|
1992
|
+
pcb_trace_id: z87.string().optional(),
|
|
1993
|
+
net_is_assignable: z87.boolean().optional(),
|
|
1994
|
+
net_assigned: z87.boolean().optional(),
|
|
1995
|
+
is_tented: z87.boolean().optional()
|
|
1982
1996
|
}).describe("Defines a via on the PCB");
|
|
1983
1997
|
expectTypesMatch(true);
|
|
1984
1998
|
|
|
1985
1999
|
// src/pcb/pcb_board.ts
|
|
1986
|
-
import { z as
|
|
1987
|
-
var pcb_board =
|
|
1988
|
-
type:
|
|
2000
|
+
import { z as z88 } from "zod";
|
|
2001
|
+
var pcb_board = z88.object({
|
|
2002
|
+
type: z88.literal("pcb_board"),
|
|
1989
2003
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
1990
|
-
pcb_panel_id:
|
|
1991
|
-
is_subcircuit:
|
|
1992
|
-
subcircuit_id:
|
|
2004
|
+
pcb_panel_id: z88.string().optional(),
|
|
2005
|
+
is_subcircuit: z88.boolean().optional(),
|
|
2006
|
+
subcircuit_id: z88.string().optional(),
|
|
1993
2007
|
width: length.optional(),
|
|
1994
2008
|
height: length.optional(),
|
|
1995
2009
|
center: point,
|
|
1996
2010
|
thickness: length.optional().default(1.4),
|
|
1997
|
-
num_layers:
|
|
1998
|
-
outline:
|
|
1999
|
-
shape:
|
|
2000
|
-
material:
|
|
2011
|
+
num_layers: z88.number().optional().default(4),
|
|
2012
|
+
outline: z88.array(point).optional(),
|
|
2013
|
+
shape: z88.enum(["rect", "polygon"]).optional(),
|
|
2014
|
+
material: z88.enum(["fr4", "fr1"]).default("fr4")
|
|
2001
2015
|
}).describe("Defines the board outline of the PCB");
|
|
2002
2016
|
expectTypesMatch(true);
|
|
2003
2017
|
|
|
2004
2018
|
// src/pcb/pcb_panel.ts
|
|
2005
|
-
import { z as
|
|
2006
|
-
var pcb_panel =
|
|
2007
|
-
type:
|
|
2019
|
+
import { z as z89 } from "zod";
|
|
2020
|
+
var pcb_panel = z89.object({
|
|
2021
|
+
type: z89.literal("pcb_panel"),
|
|
2008
2022
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2009
2023
|
width: length,
|
|
2010
2024
|
height: length,
|
|
2011
2025
|
center: point,
|
|
2012
|
-
covered_with_solder_mask:
|
|
2026
|
+
covered_with_solder_mask: z89.boolean().optional().default(true)
|
|
2013
2027
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2014
2028
|
expectTypesMatch(true);
|
|
2015
2029
|
|
|
2016
2030
|
// src/pcb/pcb_placement_error.ts
|
|
2017
|
-
import { z as
|
|
2018
|
-
var pcb_placement_error =
|
|
2019
|
-
type:
|
|
2031
|
+
import { z as z90 } from "zod";
|
|
2032
|
+
var pcb_placement_error = z90.object({
|
|
2033
|
+
type: z90.literal("pcb_placement_error"),
|
|
2020
2034
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2021
|
-
error_type:
|
|
2022
|
-
message:
|
|
2023
|
-
subcircuit_id:
|
|
2035
|
+
error_type: z90.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2036
|
+
message: z90.string(),
|
|
2037
|
+
subcircuit_id: z90.string().optional()
|
|
2024
2038
|
}).describe("Defines a placement error on the PCB");
|
|
2025
2039
|
expectTypesMatch(true);
|
|
2026
2040
|
|
|
2027
2041
|
// src/pcb/pcb_trace_hint.ts
|
|
2028
|
-
import { z as
|
|
2029
|
-
var pcb_trace_hint =
|
|
2030
|
-
type:
|
|
2042
|
+
import { z as z91 } from "zod";
|
|
2043
|
+
var pcb_trace_hint = z91.object({
|
|
2044
|
+
type: z91.literal("pcb_trace_hint"),
|
|
2031
2045
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2032
|
-
pcb_port_id:
|
|
2033
|
-
pcb_component_id:
|
|
2034
|
-
route:
|
|
2035
|
-
subcircuit_id:
|
|
2046
|
+
pcb_port_id: z91.string(),
|
|
2047
|
+
pcb_component_id: z91.string(),
|
|
2048
|
+
route: z91.array(route_hint_point),
|
|
2049
|
+
subcircuit_id: z91.string().optional()
|
|
2036
2050
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2037
2051
|
expectTypesMatch(true);
|
|
2038
2052
|
|
|
2039
2053
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2040
|
-
import { z as
|
|
2041
|
-
var pcb_silkscreen_line =
|
|
2042
|
-
type:
|
|
2054
|
+
import { z as z92 } from "zod";
|
|
2055
|
+
var pcb_silkscreen_line = z92.object({
|
|
2056
|
+
type: z92.literal("pcb_silkscreen_line"),
|
|
2043
2057
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2044
|
-
pcb_component_id:
|
|
2045
|
-
pcb_group_id:
|
|
2046
|
-
subcircuit_id:
|
|
2058
|
+
pcb_component_id: z92.string(),
|
|
2059
|
+
pcb_group_id: z92.string().optional(),
|
|
2060
|
+
subcircuit_id: z92.string().optional(),
|
|
2047
2061
|
stroke_width: distance.default("0.1mm"),
|
|
2048
2062
|
x1: distance,
|
|
2049
2063
|
y1: distance,
|
|
@@ -2054,32 +2068,32 @@ var pcb_silkscreen_line = z91.object({
|
|
|
2054
2068
|
expectTypesMatch(true);
|
|
2055
2069
|
|
|
2056
2070
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2057
|
-
import { z as
|
|
2058
|
-
var pcb_silkscreen_path =
|
|
2059
|
-
type:
|
|
2071
|
+
import { z as z93 } from "zod";
|
|
2072
|
+
var pcb_silkscreen_path = z93.object({
|
|
2073
|
+
type: z93.literal("pcb_silkscreen_path"),
|
|
2060
2074
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2061
|
-
pcb_component_id:
|
|
2062
|
-
pcb_group_id:
|
|
2063
|
-
subcircuit_id:
|
|
2075
|
+
pcb_component_id: z93.string(),
|
|
2076
|
+
pcb_group_id: z93.string().optional(),
|
|
2077
|
+
subcircuit_id: z93.string().optional(),
|
|
2064
2078
|
layer: visible_layer,
|
|
2065
|
-
route:
|
|
2079
|
+
route: z93.array(point),
|
|
2066
2080
|
stroke_width: length
|
|
2067
2081
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2068
2082
|
expectTypesMatch(true);
|
|
2069
2083
|
|
|
2070
2084
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2071
|
-
import { z as
|
|
2072
|
-
var pcb_silkscreen_text =
|
|
2073
|
-
type:
|
|
2085
|
+
import { z as z94 } from "zod";
|
|
2086
|
+
var pcb_silkscreen_text = z94.object({
|
|
2087
|
+
type: z94.literal("pcb_silkscreen_text"),
|
|
2074
2088
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2075
|
-
pcb_group_id:
|
|
2076
|
-
subcircuit_id:
|
|
2077
|
-
font:
|
|
2089
|
+
pcb_group_id: z94.string().optional(),
|
|
2090
|
+
subcircuit_id: z94.string().optional(),
|
|
2091
|
+
font: z94.literal("tscircuit2024").default("tscircuit2024"),
|
|
2078
2092
|
font_size: distance.default("0.2mm"),
|
|
2079
|
-
pcb_component_id:
|
|
2080
|
-
text:
|
|
2081
|
-
is_knockout:
|
|
2082
|
-
knockout_padding:
|
|
2093
|
+
pcb_component_id: z94.string(),
|
|
2094
|
+
text: z94.string(),
|
|
2095
|
+
is_knockout: z94.boolean().default(false).optional(),
|
|
2096
|
+
knockout_padding: z94.object({
|
|
2083
2097
|
left: length,
|
|
2084
2098
|
top: length,
|
|
2085
2099
|
bottom: length,
|
|
@@ -2090,27 +2104,27 @@ var pcb_silkscreen_text = z93.object({
|
|
|
2090
2104
|
bottom: "0.2mm",
|
|
2091
2105
|
right: "0.2mm"
|
|
2092
2106
|
}).optional(),
|
|
2093
|
-
ccw_rotation:
|
|
2107
|
+
ccw_rotation: z94.number().optional(),
|
|
2094
2108
|
layer: layer_ref,
|
|
2095
|
-
is_mirrored:
|
|
2109
|
+
is_mirrored: z94.boolean().default(false).optional(),
|
|
2096
2110
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2097
2111
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2098
2112
|
}).describe("Defines silkscreen text on the PCB");
|
|
2099
2113
|
expectTypesMatch(true);
|
|
2100
2114
|
|
|
2101
2115
|
// src/pcb/pcb_copper_text.ts
|
|
2102
|
-
import { z as
|
|
2103
|
-
var pcb_copper_text =
|
|
2104
|
-
type:
|
|
2116
|
+
import { z as z95 } from "zod";
|
|
2117
|
+
var pcb_copper_text = z95.object({
|
|
2118
|
+
type: z95.literal("pcb_copper_text"),
|
|
2105
2119
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2106
|
-
pcb_group_id:
|
|
2107
|
-
subcircuit_id:
|
|
2108
|
-
font:
|
|
2120
|
+
pcb_group_id: z95.string().optional(),
|
|
2121
|
+
subcircuit_id: z95.string().optional(),
|
|
2122
|
+
font: z95.literal("tscircuit2024").default("tscircuit2024"),
|
|
2109
2123
|
font_size: distance.default("0.2mm"),
|
|
2110
|
-
pcb_component_id:
|
|
2111
|
-
text:
|
|
2112
|
-
is_knockout:
|
|
2113
|
-
knockout_padding:
|
|
2124
|
+
pcb_component_id: z95.string(),
|
|
2125
|
+
text: z95.string(),
|
|
2126
|
+
is_knockout: z95.boolean().default(false).optional(),
|
|
2127
|
+
knockout_padding: z95.object({
|
|
2114
2128
|
left: length,
|
|
2115
2129
|
top: length,
|
|
2116
2130
|
bottom: length,
|
|
@@ -2121,44 +2135,44 @@ var pcb_copper_text = z94.object({
|
|
|
2121
2135
|
bottom: "0.2mm",
|
|
2122
2136
|
right: "0.2mm"
|
|
2123
2137
|
}).optional(),
|
|
2124
|
-
ccw_rotation:
|
|
2138
|
+
ccw_rotation: z95.number().optional(),
|
|
2125
2139
|
layer: layer_ref,
|
|
2126
|
-
is_mirrored:
|
|
2140
|
+
is_mirrored: z95.boolean().default(false).optional(),
|
|
2127
2141
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2128
2142
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2129
2143
|
}).describe("Defines copper text on the PCB");
|
|
2130
2144
|
expectTypesMatch(true);
|
|
2131
2145
|
|
|
2132
2146
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2133
|
-
import { z as
|
|
2134
|
-
var pcb_silkscreen_rect =
|
|
2135
|
-
type:
|
|
2147
|
+
import { z as z96 } from "zod";
|
|
2148
|
+
var pcb_silkscreen_rect = z96.object({
|
|
2149
|
+
type: z96.literal("pcb_silkscreen_rect"),
|
|
2136
2150
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2137
|
-
pcb_component_id:
|
|
2138
|
-
pcb_group_id:
|
|
2139
|
-
subcircuit_id:
|
|
2151
|
+
pcb_component_id: z96.string(),
|
|
2152
|
+
pcb_group_id: z96.string().optional(),
|
|
2153
|
+
subcircuit_id: z96.string().optional(),
|
|
2140
2154
|
center: point,
|
|
2141
2155
|
width: length,
|
|
2142
2156
|
height: length,
|
|
2143
2157
|
layer: layer_ref,
|
|
2144
2158
|
stroke_width: length.default("1mm"),
|
|
2145
2159
|
corner_radius: length.optional(),
|
|
2146
|
-
is_filled:
|
|
2147
|
-
has_stroke:
|
|
2148
|
-
is_stroke_dashed:
|
|
2160
|
+
is_filled: z96.boolean().default(true).optional(),
|
|
2161
|
+
has_stroke: z96.boolean().optional(),
|
|
2162
|
+
is_stroke_dashed: z96.boolean().optional()
|
|
2149
2163
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2150
2164
|
expectTypesMatch(true);
|
|
2151
2165
|
|
|
2152
2166
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2153
|
-
import { z as
|
|
2154
|
-
var pcb_silkscreen_circle =
|
|
2155
|
-
type:
|
|
2167
|
+
import { z as z97 } from "zod";
|
|
2168
|
+
var pcb_silkscreen_circle = z97.object({
|
|
2169
|
+
type: z97.literal("pcb_silkscreen_circle"),
|
|
2156
2170
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2157
2171
|
"pcb_silkscreen_circle"
|
|
2158
2172
|
),
|
|
2159
|
-
pcb_component_id:
|
|
2160
|
-
pcb_group_id:
|
|
2161
|
-
subcircuit_id:
|
|
2173
|
+
pcb_component_id: z97.string(),
|
|
2174
|
+
pcb_group_id: z97.string().optional(),
|
|
2175
|
+
subcircuit_id: z97.string().optional(),
|
|
2162
2176
|
center: point,
|
|
2163
2177
|
radius: length,
|
|
2164
2178
|
layer: visible_layer,
|
|
@@ -2167,13 +2181,13 @@ var pcb_silkscreen_circle = z96.object({
|
|
|
2167
2181
|
expectTypesMatch(true);
|
|
2168
2182
|
|
|
2169
2183
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2170
|
-
import { z as
|
|
2171
|
-
var pcb_silkscreen_oval =
|
|
2172
|
-
type:
|
|
2184
|
+
import { z as z98 } from "zod";
|
|
2185
|
+
var pcb_silkscreen_oval = z98.object({
|
|
2186
|
+
type: z98.literal("pcb_silkscreen_oval"),
|
|
2173
2187
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2174
|
-
pcb_component_id:
|
|
2175
|
-
pcb_group_id:
|
|
2176
|
-
subcircuit_id:
|
|
2188
|
+
pcb_component_id: z98.string(),
|
|
2189
|
+
pcb_group_id: z98.string().optional(),
|
|
2190
|
+
subcircuit_id: z98.string().optional(),
|
|
2177
2191
|
center: point,
|
|
2178
2192
|
radius_x: distance,
|
|
2179
2193
|
radius_y: distance,
|
|
@@ -2182,257 +2196,257 @@ var pcb_silkscreen_oval = z97.object({
|
|
|
2182
2196
|
expectTypesMatch(true);
|
|
2183
2197
|
|
|
2184
2198
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2185
|
-
import { z as
|
|
2186
|
-
var pcb_fabrication_note_text =
|
|
2187
|
-
type:
|
|
2199
|
+
import { z as z99 } from "zod";
|
|
2200
|
+
var pcb_fabrication_note_text = z99.object({
|
|
2201
|
+
type: z99.literal("pcb_fabrication_note_text"),
|
|
2188
2202
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2189
2203
|
"pcb_fabrication_note_text"
|
|
2190
2204
|
),
|
|
2191
|
-
subcircuit_id:
|
|
2192
|
-
pcb_group_id:
|
|
2193
|
-
font:
|
|
2205
|
+
subcircuit_id: z99.string().optional(),
|
|
2206
|
+
pcb_group_id: z99.string().optional(),
|
|
2207
|
+
font: z99.literal("tscircuit2024").default("tscircuit2024"),
|
|
2194
2208
|
font_size: distance.default("1mm"),
|
|
2195
|
-
pcb_component_id:
|
|
2196
|
-
text:
|
|
2209
|
+
pcb_component_id: z99.string(),
|
|
2210
|
+
text: z99.string(),
|
|
2197
2211
|
layer: visible_layer,
|
|
2198
2212
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2199
|
-
anchor_alignment:
|
|
2200
|
-
color:
|
|
2213
|
+
anchor_alignment: z99.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2214
|
+
color: z99.string().optional()
|
|
2201
2215
|
}).describe(
|
|
2202
2216
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2203
2217
|
);
|
|
2204
2218
|
expectTypesMatch(true);
|
|
2205
2219
|
|
|
2206
2220
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2207
|
-
import { z as
|
|
2208
|
-
var pcb_fabrication_note_path =
|
|
2209
|
-
type:
|
|
2221
|
+
import { z as z100 } from "zod";
|
|
2222
|
+
var pcb_fabrication_note_path = z100.object({
|
|
2223
|
+
type: z100.literal("pcb_fabrication_note_path"),
|
|
2210
2224
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2211
2225
|
"pcb_fabrication_note_path"
|
|
2212
2226
|
),
|
|
2213
|
-
pcb_component_id:
|
|
2214
|
-
subcircuit_id:
|
|
2227
|
+
pcb_component_id: z100.string(),
|
|
2228
|
+
subcircuit_id: z100.string().optional(),
|
|
2215
2229
|
layer: layer_ref,
|
|
2216
|
-
route:
|
|
2230
|
+
route: z100.array(point),
|
|
2217
2231
|
stroke_width: length,
|
|
2218
|
-
color:
|
|
2232
|
+
color: z100.string().optional()
|
|
2219
2233
|
}).describe(
|
|
2220
2234
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2221
2235
|
);
|
|
2222
2236
|
expectTypesMatch(true);
|
|
2223
2237
|
|
|
2224
2238
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2225
|
-
import { z as
|
|
2226
|
-
var pcb_fabrication_note_rect =
|
|
2227
|
-
type:
|
|
2239
|
+
import { z as z101 } from "zod";
|
|
2240
|
+
var pcb_fabrication_note_rect = z101.object({
|
|
2241
|
+
type: z101.literal("pcb_fabrication_note_rect"),
|
|
2228
2242
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2229
2243
|
"pcb_fabrication_note_rect"
|
|
2230
2244
|
),
|
|
2231
|
-
pcb_component_id:
|
|
2232
|
-
pcb_group_id:
|
|
2233
|
-
subcircuit_id:
|
|
2245
|
+
pcb_component_id: z101.string(),
|
|
2246
|
+
pcb_group_id: z101.string().optional(),
|
|
2247
|
+
subcircuit_id: z101.string().optional(),
|
|
2234
2248
|
center: point,
|
|
2235
2249
|
width: length,
|
|
2236
2250
|
height: length,
|
|
2237
2251
|
layer: visible_layer,
|
|
2238
2252
|
stroke_width: length.default("0.1mm"),
|
|
2239
2253
|
corner_radius: length.optional(),
|
|
2240
|
-
is_filled:
|
|
2241
|
-
has_stroke:
|
|
2242
|
-
is_stroke_dashed:
|
|
2243
|
-
color:
|
|
2254
|
+
is_filled: z101.boolean().optional(),
|
|
2255
|
+
has_stroke: z101.boolean().optional(),
|
|
2256
|
+
is_stroke_dashed: z101.boolean().optional(),
|
|
2257
|
+
color: z101.string().optional()
|
|
2244
2258
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2245
2259
|
expectTypesMatch(true);
|
|
2246
2260
|
|
|
2247
2261
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2248
|
-
import { z as
|
|
2249
|
-
var pcb_fabrication_note_dimension =
|
|
2250
|
-
type:
|
|
2262
|
+
import { z as z102 } from "zod";
|
|
2263
|
+
var pcb_fabrication_note_dimension = z102.object({
|
|
2264
|
+
type: z102.literal("pcb_fabrication_note_dimension"),
|
|
2251
2265
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2252
2266
|
"pcb_fabrication_note_dimension"
|
|
2253
2267
|
),
|
|
2254
|
-
pcb_component_id:
|
|
2255
|
-
pcb_group_id:
|
|
2256
|
-
subcircuit_id:
|
|
2268
|
+
pcb_component_id: z102.string(),
|
|
2269
|
+
pcb_group_id: z102.string().optional(),
|
|
2270
|
+
subcircuit_id: z102.string().optional(),
|
|
2257
2271
|
layer: visible_layer,
|
|
2258
2272
|
from: point,
|
|
2259
2273
|
to: point,
|
|
2260
|
-
text:
|
|
2261
|
-
text_ccw_rotation:
|
|
2274
|
+
text: z102.string().optional(),
|
|
2275
|
+
text_ccw_rotation: z102.number().optional(),
|
|
2262
2276
|
offset: length.optional(),
|
|
2263
2277
|
offset_distance: length.optional(),
|
|
2264
|
-
offset_direction:
|
|
2265
|
-
x:
|
|
2266
|
-
y:
|
|
2278
|
+
offset_direction: z102.object({
|
|
2279
|
+
x: z102.number(),
|
|
2280
|
+
y: z102.number()
|
|
2267
2281
|
}).optional(),
|
|
2268
|
-
font:
|
|
2282
|
+
font: z102.literal("tscircuit2024").default("tscircuit2024"),
|
|
2269
2283
|
font_size: length.default("1mm"),
|
|
2270
|
-
color:
|
|
2284
|
+
color: z102.string().optional(),
|
|
2271
2285
|
arrow_size: length.default("1mm")
|
|
2272
2286
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2273
2287
|
expectTypesMatch(true);
|
|
2274
2288
|
|
|
2275
2289
|
// 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
2290
|
import { z as z103 } from "zod";
|
|
2295
|
-
var
|
|
2296
|
-
type: z103.literal("
|
|
2297
|
-
|
|
2291
|
+
var pcb_note_text = z103.object({
|
|
2292
|
+
type: z103.literal("pcb_note_text"),
|
|
2293
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2298
2294
|
pcb_component_id: z103.string().optional(),
|
|
2299
2295
|
pcb_group_id: z103.string().optional(),
|
|
2300
2296
|
subcircuit_id: z103.string().optional(),
|
|
2301
2297
|
name: z103.string().optional(),
|
|
2298
|
+
font: z103.literal("tscircuit2024").default("tscircuit2024"),
|
|
2299
|
+
font_size: distance.default("1mm"),
|
|
2302
2300
|
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(),
|
|
2301
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2302
|
+
anchor_alignment: z103.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2311
2303
|
color: z103.string().optional()
|
|
2312
|
-
}).describe("Defines a
|
|
2304
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
2313
2305
|
expectTypesMatch(true);
|
|
2314
2306
|
|
|
2315
|
-
// src/pcb/
|
|
2307
|
+
// src/pcb/pcb_note_rect.ts
|
|
2316
2308
|
import { z as z104 } from "zod";
|
|
2317
|
-
var
|
|
2318
|
-
type: z104.literal("
|
|
2319
|
-
|
|
2309
|
+
var pcb_note_rect = z104.object({
|
|
2310
|
+
type: z104.literal("pcb_note_rect"),
|
|
2311
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2320
2312
|
pcb_component_id: z104.string().optional(),
|
|
2321
2313
|
pcb_group_id: z104.string().optional(),
|
|
2322
2314
|
subcircuit_id: z104.string().optional(),
|
|
2323
2315
|
name: z104.string().optional(),
|
|
2324
2316
|
text: z104.string().optional(),
|
|
2325
|
-
|
|
2317
|
+
center: point,
|
|
2318
|
+
width: length,
|
|
2319
|
+
height: length,
|
|
2326
2320
|
stroke_width: length.default("0.1mm"),
|
|
2321
|
+
corner_radius: length.optional(),
|
|
2322
|
+
is_filled: z104.boolean().optional(),
|
|
2323
|
+
has_stroke: z104.boolean().optional(),
|
|
2324
|
+
is_stroke_dashed: z104.boolean().optional(),
|
|
2327
2325
|
color: z104.string().optional()
|
|
2328
|
-
}).describe("Defines a
|
|
2326
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2329
2327
|
expectTypesMatch(true);
|
|
2330
2328
|
|
|
2331
|
-
// src/pcb/
|
|
2329
|
+
// src/pcb/pcb_note_path.ts
|
|
2332
2330
|
import { z as z105 } from "zod";
|
|
2333
|
-
var
|
|
2334
|
-
type: z105.literal("
|
|
2335
|
-
|
|
2331
|
+
var pcb_note_path = z105.object({
|
|
2332
|
+
type: z105.literal("pcb_note_path"),
|
|
2333
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2336
2334
|
pcb_component_id: z105.string().optional(),
|
|
2337
2335
|
pcb_group_id: z105.string().optional(),
|
|
2338
2336
|
subcircuit_id: z105.string().optional(),
|
|
2339
2337
|
name: z105.string().optional(),
|
|
2340
2338
|
text: z105.string().optional(),
|
|
2339
|
+
route: z105.array(point),
|
|
2340
|
+
stroke_width: length.default("0.1mm"),
|
|
2341
|
+
color: z105.string().optional()
|
|
2342
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
2343
|
+
expectTypesMatch(true);
|
|
2344
|
+
|
|
2345
|
+
// src/pcb/pcb_note_line.ts
|
|
2346
|
+
import { z as z106 } from "zod";
|
|
2347
|
+
var pcb_note_line = z106.object({
|
|
2348
|
+
type: z106.literal("pcb_note_line"),
|
|
2349
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2350
|
+
pcb_component_id: z106.string().optional(),
|
|
2351
|
+
pcb_group_id: z106.string().optional(),
|
|
2352
|
+
subcircuit_id: z106.string().optional(),
|
|
2353
|
+
name: z106.string().optional(),
|
|
2354
|
+
text: z106.string().optional(),
|
|
2341
2355
|
x1: distance,
|
|
2342
2356
|
y1: distance,
|
|
2343
2357
|
x2: distance,
|
|
2344
2358
|
y2: distance,
|
|
2345
2359
|
stroke_width: distance.default("0.1mm"),
|
|
2346
|
-
color:
|
|
2347
|
-
is_dashed:
|
|
2360
|
+
color: z106.string().optional(),
|
|
2361
|
+
is_dashed: z106.boolean().optional()
|
|
2348
2362
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2349
2363
|
expectTypesMatch(true);
|
|
2350
2364
|
|
|
2351
2365
|
// src/pcb/pcb_note_dimension.ts
|
|
2352
|
-
import { z as
|
|
2353
|
-
var pcb_note_dimension =
|
|
2354
|
-
type:
|
|
2366
|
+
import { z as z107 } from "zod";
|
|
2367
|
+
var pcb_note_dimension = z107.object({
|
|
2368
|
+
type: z107.literal("pcb_note_dimension"),
|
|
2355
2369
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2356
|
-
pcb_component_id:
|
|
2357
|
-
pcb_group_id:
|
|
2358
|
-
subcircuit_id:
|
|
2359
|
-
name:
|
|
2370
|
+
pcb_component_id: z107.string().optional(),
|
|
2371
|
+
pcb_group_id: z107.string().optional(),
|
|
2372
|
+
subcircuit_id: z107.string().optional(),
|
|
2373
|
+
name: z107.string().optional(),
|
|
2360
2374
|
from: point,
|
|
2361
2375
|
to: point,
|
|
2362
|
-
text:
|
|
2363
|
-
text_ccw_rotation:
|
|
2376
|
+
text: z107.string().optional(),
|
|
2377
|
+
text_ccw_rotation: z107.number().optional(),
|
|
2364
2378
|
offset_distance: length.optional(),
|
|
2365
|
-
offset_direction:
|
|
2366
|
-
x:
|
|
2367
|
-
y:
|
|
2379
|
+
offset_direction: z107.object({
|
|
2380
|
+
x: z107.number(),
|
|
2381
|
+
y: z107.number()
|
|
2368
2382
|
}).optional(),
|
|
2369
|
-
font:
|
|
2383
|
+
font: z107.literal("tscircuit2024").default("tscircuit2024"),
|
|
2370
2384
|
font_size: length.default("1mm"),
|
|
2371
|
-
color:
|
|
2385
|
+
color: z107.string().optional(),
|
|
2372
2386
|
arrow_size: length.default("1mm")
|
|
2373
2387
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2374
2388
|
expectTypesMatch(true);
|
|
2375
2389
|
|
|
2376
2390
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2377
|
-
import { z as
|
|
2378
|
-
var pcb_footprint_overlap_error =
|
|
2379
|
-
type:
|
|
2391
|
+
import { z as z108 } from "zod";
|
|
2392
|
+
var pcb_footprint_overlap_error = z108.object({
|
|
2393
|
+
type: z108.literal("pcb_footprint_overlap_error"),
|
|
2380
2394
|
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:
|
|
2395
|
+
error_type: z108.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
2396
|
+
message: z108.string(),
|
|
2397
|
+
pcb_smtpad_ids: z108.array(z108.string()).optional(),
|
|
2398
|
+
pcb_plated_hole_ids: z108.array(z108.string()).optional(),
|
|
2399
|
+
pcb_hole_ids: z108.array(z108.string()).optional(),
|
|
2400
|
+
pcb_keepout_ids: z108.array(z108.string()).optional()
|
|
2387
2401
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2388
2402
|
expectTypesMatch(
|
|
2389
2403
|
true
|
|
2390
2404
|
);
|
|
2391
2405
|
|
|
2392
2406
|
// src/pcb/pcb_keepout.ts
|
|
2393
|
-
import { z as
|
|
2394
|
-
var pcb_keepout =
|
|
2395
|
-
type:
|
|
2396
|
-
shape:
|
|
2397
|
-
pcb_group_id:
|
|
2398
|
-
subcircuit_id:
|
|
2407
|
+
import { z as z109 } from "zod";
|
|
2408
|
+
var pcb_keepout = z109.object({
|
|
2409
|
+
type: z109.literal("pcb_keepout"),
|
|
2410
|
+
shape: z109.literal("rect"),
|
|
2411
|
+
pcb_group_id: z109.string().optional(),
|
|
2412
|
+
subcircuit_id: z109.string().optional(),
|
|
2399
2413
|
center: point,
|
|
2400
2414
|
width: distance,
|
|
2401
2415
|
height: distance,
|
|
2402
|
-
pcb_keepout_id:
|
|
2403
|
-
layers:
|
|
2416
|
+
pcb_keepout_id: z109.string(),
|
|
2417
|
+
layers: z109.array(z109.string()),
|
|
2404
2418
|
// Specify layers where the keepout applies
|
|
2405
|
-
description:
|
|
2419
|
+
description: z109.string().optional()
|
|
2406
2420
|
// Optional description of the keepout
|
|
2407
2421
|
}).or(
|
|
2408
|
-
|
|
2409
|
-
type:
|
|
2410
|
-
shape:
|
|
2411
|
-
pcb_group_id:
|
|
2412
|
-
subcircuit_id:
|
|
2422
|
+
z109.object({
|
|
2423
|
+
type: z109.literal("pcb_keepout"),
|
|
2424
|
+
shape: z109.literal("circle"),
|
|
2425
|
+
pcb_group_id: z109.string().optional(),
|
|
2426
|
+
subcircuit_id: z109.string().optional(),
|
|
2413
2427
|
center: point,
|
|
2414
2428
|
radius: distance,
|
|
2415
|
-
pcb_keepout_id:
|
|
2416
|
-
layers:
|
|
2429
|
+
pcb_keepout_id: z109.string(),
|
|
2430
|
+
layers: z109.array(z109.string()),
|
|
2417
2431
|
// Specify layers where the keepout applies
|
|
2418
|
-
description:
|
|
2432
|
+
description: z109.string().optional()
|
|
2419
2433
|
// Optional description of the keepout
|
|
2420
2434
|
})
|
|
2421
2435
|
);
|
|
2422
2436
|
expectTypesMatch(true);
|
|
2423
2437
|
|
|
2424
2438
|
// src/pcb/pcb_cutout.ts
|
|
2425
|
-
import { z as
|
|
2426
|
-
var pcb_cutout_base =
|
|
2427
|
-
type:
|
|
2439
|
+
import { z as z110 } from "zod";
|
|
2440
|
+
var pcb_cutout_base = z110.object({
|
|
2441
|
+
type: z110.literal("pcb_cutout"),
|
|
2428
2442
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2429
|
-
pcb_group_id:
|
|
2430
|
-
subcircuit_id:
|
|
2431
|
-
pcb_board_id:
|
|
2432
|
-
pcb_panel_id:
|
|
2443
|
+
pcb_group_id: z110.string().optional(),
|
|
2444
|
+
subcircuit_id: z110.string().optional(),
|
|
2445
|
+
pcb_board_id: z110.string().optional(),
|
|
2446
|
+
pcb_panel_id: z110.string().optional()
|
|
2433
2447
|
});
|
|
2434
2448
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2435
|
-
shape:
|
|
2449
|
+
shape: z110.literal("rect"),
|
|
2436
2450
|
center: point,
|
|
2437
2451
|
width: length,
|
|
2438
2452
|
height: length,
|
|
@@ -2441,26 +2455,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2441
2455
|
});
|
|
2442
2456
|
expectTypesMatch(true);
|
|
2443
2457
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2444
|
-
shape:
|
|
2458
|
+
shape: z110.literal("circle"),
|
|
2445
2459
|
center: point,
|
|
2446
2460
|
radius: length
|
|
2447
2461
|
});
|
|
2448
2462
|
expectTypesMatch(true);
|
|
2449
2463
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2450
|
-
shape:
|
|
2451
|
-
points:
|
|
2464
|
+
shape: z110.literal("polygon"),
|
|
2465
|
+
points: z110.array(point)
|
|
2452
2466
|
});
|
|
2453
2467
|
expectTypesMatch(true);
|
|
2454
2468
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
2455
|
-
shape:
|
|
2456
|
-
route:
|
|
2469
|
+
shape: z110.literal("path"),
|
|
2470
|
+
route: z110.array(point),
|
|
2457
2471
|
slot_width: length,
|
|
2458
2472
|
slot_length: length.optional(),
|
|
2459
2473
|
space_between_slots: length.optional(),
|
|
2460
2474
|
slot_corner_radius: length.optional()
|
|
2461
2475
|
});
|
|
2462
2476
|
expectTypesMatch(true);
|
|
2463
|
-
var pcb_cutout =
|
|
2477
|
+
var pcb_cutout = z110.discriminatedUnion("shape", [
|
|
2464
2478
|
pcb_cutout_rect,
|
|
2465
2479
|
pcb_cutout_circle,
|
|
2466
2480
|
pcb_cutout_polygon,
|
|
@@ -2469,130 +2483,130 @@ var pcb_cutout = z109.discriminatedUnion("shape", [
|
|
|
2469
2483
|
expectTypesMatch(true);
|
|
2470
2484
|
|
|
2471
2485
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2472
|
-
import { z as
|
|
2473
|
-
var pcb_missing_footprint_error =
|
|
2474
|
-
type:
|
|
2486
|
+
import { z as z111 } from "zod";
|
|
2487
|
+
var pcb_missing_footprint_error = z111.object({
|
|
2488
|
+
type: z111.literal("pcb_missing_footprint_error"),
|
|
2475
2489
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2476
2490
|
"pcb_missing_footprint_error"
|
|
2477
2491
|
),
|
|
2478
|
-
pcb_group_id:
|
|
2479
|
-
subcircuit_id:
|
|
2480
|
-
error_type:
|
|
2481
|
-
source_component_id:
|
|
2482
|
-
message:
|
|
2492
|
+
pcb_group_id: z111.string().optional(),
|
|
2493
|
+
subcircuit_id: z111.string().optional(),
|
|
2494
|
+
error_type: z111.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
2495
|
+
source_component_id: z111.string(),
|
|
2496
|
+
message: z111.string()
|
|
2483
2497
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2484
2498
|
expectTypesMatch(
|
|
2485
2499
|
true
|
|
2486
2500
|
);
|
|
2487
2501
|
|
|
2488
2502
|
// src/pcb/external_footprint_load_error.ts
|
|
2489
|
-
import { z as
|
|
2490
|
-
var external_footprint_load_error =
|
|
2491
|
-
type:
|
|
2503
|
+
import { z as z112 } from "zod";
|
|
2504
|
+
var external_footprint_load_error = z112.object({
|
|
2505
|
+
type: z112.literal("external_footprint_load_error"),
|
|
2492
2506
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2493
2507
|
"external_footprint_load_error"
|
|
2494
2508
|
),
|
|
2495
|
-
pcb_component_id:
|
|
2496
|
-
source_component_id:
|
|
2497
|
-
pcb_group_id:
|
|
2498
|
-
subcircuit_id:
|
|
2499
|
-
footprinter_string:
|
|
2500
|
-
error_type:
|
|
2501
|
-
message:
|
|
2509
|
+
pcb_component_id: z112.string(),
|
|
2510
|
+
source_component_id: z112.string(),
|
|
2511
|
+
pcb_group_id: z112.string().optional(),
|
|
2512
|
+
subcircuit_id: z112.string().optional(),
|
|
2513
|
+
footprinter_string: z112.string().optional(),
|
|
2514
|
+
error_type: z112.literal("external_footprint_load_error").default("external_footprint_load_error"),
|
|
2515
|
+
message: z112.string()
|
|
2502
2516
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2503
2517
|
expectTypesMatch(true);
|
|
2504
2518
|
|
|
2505
2519
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2506
|
-
import { z as
|
|
2507
|
-
var circuit_json_footprint_load_error =
|
|
2508
|
-
type:
|
|
2520
|
+
import { z as z113 } from "zod";
|
|
2521
|
+
var circuit_json_footprint_load_error = z113.object({
|
|
2522
|
+
type: z113.literal("circuit_json_footprint_load_error"),
|
|
2509
2523
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2510
2524
|
"circuit_json_footprint_load_error"
|
|
2511
2525
|
),
|
|
2512
|
-
pcb_component_id:
|
|
2513
|
-
source_component_id:
|
|
2514
|
-
pcb_group_id:
|
|
2515
|
-
subcircuit_id:
|
|
2516
|
-
error_type:
|
|
2517
|
-
message:
|
|
2518
|
-
circuit_json:
|
|
2526
|
+
pcb_component_id: z113.string(),
|
|
2527
|
+
source_component_id: z113.string(),
|
|
2528
|
+
pcb_group_id: z113.string().optional(),
|
|
2529
|
+
subcircuit_id: z113.string().optional(),
|
|
2530
|
+
error_type: z113.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
2531
|
+
message: z113.string(),
|
|
2532
|
+
circuit_json: z113.array(z113.any()).optional()
|
|
2519
2533
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
2520
2534
|
expectTypesMatch(true);
|
|
2521
2535
|
|
|
2522
2536
|
// src/pcb/pcb_group.ts
|
|
2523
|
-
import { z as
|
|
2524
|
-
var pcb_group =
|
|
2525
|
-
type:
|
|
2537
|
+
import { z as z114 } from "zod";
|
|
2538
|
+
var pcb_group = z114.object({
|
|
2539
|
+
type: z114.literal("pcb_group"),
|
|
2526
2540
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
2527
|
-
source_group_id:
|
|
2528
|
-
is_subcircuit:
|
|
2529
|
-
subcircuit_id:
|
|
2541
|
+
source_group_id: z114.string(),
|
|
2542
|
+
is_subcircuit: z114.boolean().optional(),
|
|
2543
|
+
subcircuit_id: z114.string().optional(),
|
|
2530
2544
|
width: length.optional(),
|
|
2531
2545
|
height: length.optional(),
|
|
2532
2546
|
center: point,
|
|
2533
|
-
display_offset_x:
|
|
2547
|
+
display_offset_x: z114.string().optional().describe(
|
|
2534
2548
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
2535
2549
|
),
|
|
2536
|
-
display_offset_y:
|
|
2550
|
+
display_offset_y: z114.string().optional().describe(
|
|
2537
2551
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
2538
2552
|
),
|
|
2539
|
-
outline:
|
|
2553
|
+
outline: z114.array(point).optional(),
|
|
2540
2554
|
anchor_position: point.optional(),
|
|
2541
2555
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
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:
|
|
2556
|
+
position_mode: z114.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
2557
|
+
positioned_relative_to_pcb_group_id: z114.string().optional(),
|
|
2558
|
+
positioned_relative_to_pcb_board_id: z114.string().optional(),
|
|
2559
|
+
pcb_component_ids: z114.array(z114.string()),
|
|
2560
|
+
child_layout_mode: z114.enum(["packed", "none"]).optional(),
|
|
2561
|
+
name: z114.string().optional(),
|
|
2562
|
+
description: z114.string().optional(),
|
|
2563
|
+
layout_mode: z114.string().optional(),
|
|
2564
|
+
autorouter_configuration: z114.object({
|
|
2551
2565
|
trace_clearance: length
|
|
2552
2566
|
}).optional(),
|
|
2553
|
-
autorouter_used_string:
|
|
2567
|
+
autorouter_used_string: z114.string().optional()
|
|
2554
2568
|
}).describe("Defines a group of components on the PCB");
|
|
2555
2569
|
expectTypesMatch(true);
|
|
2556
2570
|
|
|
2557
2571
|
// src/pcb/pcb_autorouting_error.ts
|
|
2558
|
-
import { z as
|
|
2559
|
-
var pcb_autorouting_error =
|
|
2560
|
-
type:
|
|
2572
|
+
import { z as z115 } from "zod";
|
|
2573
|
+
var pcb_autorouting_error = z115.object({
|
|
2574
|
+
type: z115.literal("pcb_autorouting_error"),
|
|
2561
2575
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
2562
|
-
error_type:
|
|
2563
|
-
message:
|
|
2564
|
-
subcircuit_id:
|
|
2576
|
+
error_type: z115.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
2577
|
+
message: z115.string(),
|
|
2578
|
+
subcircuit_id: z115.string().optional()
|
|
2565
2579
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
2566
2580
|
expectTypesMatch(true);
|
|
2567
2581
|
|
|
2568
2582
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
2569
|
-
import { z as
|
|
2570
|
-
var pcb_manual_edit_conflict_warning =
|
|
2571
|
-
type:
|
|
2583
|
+
import { z as z116 } from "zod";
|
|
2584
|
+
var pcb_manual_edit_conflict_warning = z116.object({
|
|
2585
|
+
type: z116.literal("pcb_manual_edit_conflict_warning"),
|
|
2572
2586
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
2573
2587
|
"pcb_manual_edit_conflict_warning"
|
|
2574
2588
|
),
|
|
2575
|
-
warning_type:
|
|
2576
|
-
message:
|
|
2577
|
-
pcb_component_id:
|
|
2578
|
-
pcb_group_id:
|
|
2579
|
-
subcircuit_id:
|
|
2580
|
-
source_component_id:
|
|
2589
|
+
warning_type: z116.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
2590
|
+
message: z116.string(),
|
|
2591
|
+
pcb_component_id: z116.string(),
|
|
2592
|
+
pcb_group_id: z116.string().optional(),
|
|
2593
|
+
subcircuit_id: z116.string().optional(),
|
|
2594
|
+
source_component_id: z116.string()
|
|
2581
2595
|
}).describe(
|
|
2582
2596
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
2583
2597
|
);
|
|
2584
2598
|
expectTypesMatch(true);
|
|
2585
2599
|
|
|
2586
2600
|
// src/pcb/pcb_breakout_point.ts
|
|
2587
|
-
import { z as
|
|
2588
|
-
var pcb_breakout_point =
|
|
2589
|
-
type:
|
|
2601
|
+
import { z as z117 } from "zod";
|
|
2602
|
+
var pcb_breakout_point = z117.object({
|
|
2603
|
+
type: z117.literal("pcb_breakout_point"),
|
|
2590
2604
|
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:
|
|
2605
|
+
pcb_group_id: z117.string(),
|
|
2606
|
+
subcircuit_id: z117.string().optional(),
|
|
2607
|
+
source_trace_id: z117.string().optional(),
|
|
2608
|
+
source_port_id: z117.string().optional(),
|
|
2609
|
+
source_net_id: z117.string().optional(),
|
|
2596
2610
|
x: distance,
|
|
2597
2611
|
y: distance
|
|
2598
2612
|
}).describe(
|
|
@@ -2601,61 +2615,61 @@ var pcb_breakout_point = z116.object({
|
|
|
2601
2615
|
expectTypesMatch(true);
|
|
2602
2616
|
|
|
2603
2617
|
// src/pcb/pcb_ground_plane.ts
|
|
2604
|
-
import { z as
|
|
2605
|
-
var pcb_ground_plane =
|
|
2606
|
-
type:
|
|
2618
|
+
import { z as z118 } from "zod";
|
|
2619
|
+
var pcb_ground_plane = z118.object({
|
|
2620
|
+
type: z118.literal("pcb_ground_plane"),
|
|
2607
2621
|
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:
|
|
2622
|
+
source_pcb_ground_plane_id: z118.string(),
|
|
2623
|
+
source_net_id: z118.string(),
|
|
2624
|
+
pcb_group_id: z118.string().optional(),
|
|
2625
|
+
subcircuit_id: z118.string().optional()
|
|
2612
2626
|
}).describe("Defines a ground plane on the PCB");
|
|
2613
2627
|
expectTypesMatch(true);
|
|
2614
2628
|
|
|
2615
2629
|
// src/pcb/pcb_ground_plane_region.ts
|
|
2616
|
-
import { z as
|
|
2617
|
-
var pcb_ground_plane_region =
|
|
2618
|
-
type:
|
|
2630
|
+
import { z as z119 } from "zod";
|
|
2631
|
+
var pcb_ground_plane_region = z119.object({
|
|
2632
|
+
type: z119.literal("pcb_ground_plane_region"),
|
|
2619
2633
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
2620
2634
|
"pcb_ground_plane_region"
|
|
2621
2635
|
),
|
|
2622
|
-
pcb_ground_plane_id:
|
|
2623
|
-
pcb_group_id:
|
|
2624
|
-
subcircuit_id:
|
|
2636
|
+
pcb_ground_plane_id: z119.string(),
|
|
2637
|
+
pcb_group_id: z119.string().optional(),
|
|
2638
|
+
subcircuit_id: z119.string().optional(),
|
|
2625
2639
|
layer: layer_ref,
|
|
2626
|
-
points:
|
|
2640
|
+
points: z119.array(point)
|
|
2627
2641
|
}).describe("Defines a polygon region of a ground plane");
|
|
2628
2642
|
expectTypesMatch(true);
|
|
2629
2643
|
|
|
2630
2644
|
// src/pcb/pcb_thermal_spoke.ts
|
|
2631
|
-
import { z as
|
|
2632
|
-
var pcb_thermal_spoke =
|
|
2633
|
-
type:
|
|
2645
|
+
import { z as z120 } from "zod";
|
|
2646
|
+
var pcb_thermal_spoke = z120.object({
|
|
2647
|
+
type: z120.literal("pcb_thermal_spoke"),
|
|
2634
2648
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
2635
|
-
pcb_ground_plane_id:
|
|
2636
|
-
shape:
|
|
2637
|
-
spoke_count:
|
|
2649
|
+
pcb_ground_plane_id: z120.string(),
|
|
2650
|
+
shape: z120.string(),
|
|
2651
|
+
spoke_count: z120.number(),
|
|
2638
2652
|
spoke_thickness: distance,
|
|
2639
2653
|
spoke_inner_diameter: distance,
|
|
2640
2654
|
spoke_outer_diameter: distance,
|
|
2641
|
-
pcb_plated_hole_id:
|
|
2642
|
-
subcircuit_id:
|
|
2655
|
+
pcb_plated_hole_id: z120.string().optional(),
|
|
2656
|
+
subcircuit_id: z120.string().optional()
|
|
2643
2657
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
2644
2658
|
expectTypesMatch(true);
|
|
2645
2659
|
|
|
2646
2660
|
// src/pcb/pcb_copper_pour.ts
|
|
2647
|
-
import { z as
|
|
2648
|
-
var pcb_copper_pour_base =
|
|
2649
|
-
type:
|
|
2661
|
+
import { z as z121 } from "zod";
|
|
2662
|
+
var pcb_copper_pour_base = z121.object({
|
|
2663
|
+
type: z121.literal("pcb_copper_pour"),
|
|
2650
2664
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
2651
|
-
pcb_group_id:
|
|
2652
|
-
subcircuit_id:
|
|
2665
|
+
pcb_group_id: z121.string().optional(),
|
|
2666
|
+
subcircuit_id: z121.string().optional(),
|
|
2653
2667
|
layer: layer_ref,
|
|
2654
|
-
source_net_id:
|
|
2655
|
-
covered_with_solder_mask:
|
|
2668
|
+
source_net_id: z121.string().optional(),
|
|
2669
|
+
covered_with_solder_mask: z121.boolean().optional().default(true)
|
|
2656
2670
|
});
|
|
2657
2671
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
2658
|
-
shape:
|
|
2672
|
+
shape: z121.literal("rect"),
|
|
2659
2673
|
center: point,
|
|
2660
2674
|
width: length,
|
|
2661
2675
|
height: length,
|
|
@@ -2663,16 +2677,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
2663
2677
|
});
|
|
2664
2678
|
expectTypesMatch(true);
|
|
2665
2679
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
2666
|
-
shape:
|
|
2680
|
+
shape: z121.literal("brep"),
|
|
2667
2681
|
brep_shape
|
|
2668
2682
|
});
|
|
2669
2683
|
expectTypesMatch(true);
|
|
2670
2684
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
2671
|
-
shape:
|
|
2672
|
-
points:
|
|
2685
|
+
shape: z121.literal("polygon"),
|
|
2686
|
+
points: z121.array(point)
|
|
2673
2687
|
});
|
|
2674
2688
|
expectTypesMatch(true);
|
|
2675
|
-
var pcb_copper_pour =
|
|
2689
|
+
var pcb_copper_pour = z121.discriminatedUnion("shape", [
|
|
2676
2690
|
pcb_copper_pour_rect,
|
|
2677
2691
|
pcb_copper_pour_brep,
|
|
2678
2692
|
pcb_copper_pour_polygon
|
|
@@ -2680,148 +2694,148 @@ var pcb_copper_pour = z120.discriminatedUnion("shape", [
|
|
|
2680
2694
|
expectTypesMatch(true);
|
|
2681
2695
|
|
|
2682
2696
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
2683
|
-
import { z as
|
|
2684
|
-
var pcb_component_outside_board_error =
|
|
2685
|
-
type:
|
|
2697
|
+
import { z as z122 } from "zod";
|
|
2698
|
+
var pcb_component_outside_board_error = z122.object({
|
|
2699
|
+
type: z122.literal("pcb_component_outside_board_error"),
|
|
2686
2700
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
2687
2701
|
"pcb_component_outside_board_error"
|
|
2688
2702
|
),
|
|
2689
|
-
error_type:
|
|
2690
|
-
message:
|
|
2691
|
-
pcb_component_id:
|
|
2692
|
-
pcb_board_id:
|
|
2703
|
+
error_type: z122.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
2704
|
+
message: z122.string(),
|
|
2705
|
+
pcb_component_id: z122.string(),
|
|
2706
|
+
pcb_board_id: z122.string(),
|
|
2693
2707
|
component_center: point,
|
|
2694
|
-
component_bounds:
|
|
2695
|
-
min_x:
|
|
2696
|
-
max_x:
|
|
2697
|
-
min_y:
|
|
2698
|
-
max_y:
|
|
2708
|
+
component_bounds: z122.object({
|
|
2709
|
+
min_x: z122.number(),
|
|
2710
|
+
max_x: z122.number(),
|
|
2711
|
+
min_y: z122.number(),
|
|
2712
|
+
max_y: z122.number()
|
|
2699
2713
|
}),
|
|
2700
|
-
subcircuit_id:
|
|
2701
|
-
source_component_id:
|
|
2714
|
+
subcircuit_id: z122.string().optional(),
|
|
2715
|
+
source_component_id: z122.string().optional()
|
|
2702
2716
|
}).describe(
|
|
2703
2717
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
2704
2718
|
);
|
|
2705
2719
|
expectTypesMatch(true);
|
|
2706
2720
|
|
|
2707
2721
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
2708
|
-
import { z as
|
|
2709
|
-
var pcb_component_invalid_layer_error =
|
|
2710
|
-
type:
|
|
2722
|
+
import { z as z123 } from "zod";
|
|
2723
|
+
var pcb_component_invalid_layer_error = z123.object({
|
|
2724
|
+
type: z123.literal("pcb_component_invalid_layer_error"),
|
|
2711
2725
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
2712
2726
|
"pcb_component_invalid_layer_error"
|
|
2713
2727
|
),
|
|
2714
|
-
error_type:
|
|
2715
|
-
message:
|
|
2716
|
-
pcb_component_id:
|
|
2717
|
-
source_component_id:
|
|
2728
|
+
error_type: z123.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
2729
|
+
message: z123.string(),
|
|
2730
|
+
pcb_component_id: z123.string().optional(),
|
|
2731
|
+
source_component_id: z123.string(),
|
|
2718
2732
|
layer: layer_ref,
|
|
2719
|
-
subcircuit_id:
|
|
2733
|
+
subcircuit_id: z123.string().optional()
|
|
2720
2734
|
}).describe(
|
|
2721
2735
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
2722
2736
|
);
|
|
2723
2737
|
expectTypesMatch(true);
|
|
2724
2738
|
|
|
2725
2739
|
// src/pcb/pcb_via_clearance_error.ts
|
|
2726
|
-
import { z as
|
|
2727
|
-
var pcb_via_clearance_error =
|
|
2728
|
-
type:
|
|
2740
|
+
import { z as z124 } from "zod";
|
|
2741
|
+
var pcb_via_clearance_error = z124.object({
|
|
2742
|
+
type: z124.literal("pcb_via_clearance_error"),
|
|
2729
2743
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2730
|
-
error_type:
|
|
2731
|
-
message:
|
|
2732
|
-
pcb_via_ids:
|
|
2744
|
+
error_type: z124.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
2745
|
+
message: z124.string(),
|
|
2746
|
+
pcb_via_ids: z124.array(z124.string()).min(2),
|
|
2733
2747
|
minimum_clearance: distance.optional(),
|
|
2734
2748
|
actual_clearance: distance.optional(),
|
|
2735
|
-
pcb_center:
|
|
2736
|
-
x:
|
|
2737
|
-
y:
|
|
2749
|
+
pcb_center: z124.object({
|
|
2750
|
+
x: z124.number().optional(),
|
|
2751
|
+
y: z124.number().optional()
|
|
2738
2752
|
}).optional(),
|
|
2739
|
-
subcircuit_id:
|
|
2753
|
+
subcircuit_id: z124.string().optional()
|
|
2740
2754
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
2741
2755
|
expectTypesMatch(true);
|
|
2742
2756
|
|
|
2743
2757
|
// src/pcb/pcb_courtyard_rect.ts
|
|
2744
|
-
import { z as
|
|
2745
|
-
var pcb_courtyard_rect =
|
|
2746
|
-
type:
|
|
2758
|
+
import { z as z125 } from "zod";
|
|
2759
|
+
var pcb_courtyard_rect = z125.object({
|
|
2760
|
+
type: z125.literal("pcb_courtyard_rect"),
|
|
2747
2761
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
2748
|
-
pcb_component_id:
|
|
2749
|
-
pcb_group_id:
|
|
2750
|
-
subcircuit_id:
|
|
2762
|
+
pcb_component_id: z125.string(),
|
|
2763
|
+
pcb_group_id: z125.string().optional(),
|
|
2764
|
+
subcircuit_id: z125.string().optional(),
|
|
2751
2765
|
center: point,
|
|
2752
2766
|
width: length,
|
|
2753
2767
|
height: length,
|
|
2754
2768
|
layer: visible_layer,
|
|
2755
|
-
color:
|
|
2769
|
+
color: z125.string().optional()
|
|
2756
2770
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
2757
2771
|
expectTypesMatch(true);
|
|
2758
2772
|
|
|
2759
2773
|
// src/pcb/pcb_courtyard_outline.ts
|
|
2760
|
-
import { z as
|
|
2761
|
-
var pcb_courtyard_outline =
|
|
2762
|
-
type:
|
|
2774
|
+
import { z as z126 } from "zod";
|
|
2775
|
+
var pcb_courtyard_outline = z126.object({
|
|
2776
|
+
type: z126.literal("pcb_courtyard_outline"),
|
|
2763
2777
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
2764
2778
|
"pcb_courtyard_outline"
|
|
2765
2779
|
),
|
|
2766
|
-
pcb_component_id:
|
|
2767
|
-
pcb_group_id:
|
|
2768
|
-
subcircuit_id:
|
|
2780
|
+
pcb_component_id: z126.string(),
|
|
2781
|
+
pcb_group_id: z126.string().optional(),
|
|
2782
|
+
subcircuit_id: z126.string().optional(),
|
|
2769
2783
|
layer: visible_layer,
|
|
2770
|
-
outline:
|
|
2784
|
+
outline: z126.array(point).min(2),
|
|
2771
2785
|
stroke_width: length.default("0.1mm"),
|
|
2772
|
-
is_closed:
|
|
2773
|
-
is_stroke_dashed:
|
|
2774
|
-
color:
|
|
2786
|
+
is_closed: z126.boolean().optional(),
|
|
2787
|
+
is_stroke_dashed: z126.boolean().optional(),
|
|
2788
|
+
color: z126.string().optional()
|
|
2775
2789
|
}).describe("Defines a courtyard outline on the PCB");
|
|
2776
2790
|
expectTypesMatch(true);
|
|
2777
2791
|
|
|
2778
2792
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
2779
|
-
import { z as
|
|
2780
|
-
var pcb_courtyard_polygon =
|
|
2781
|
-
type:
|
|
2793
|
+
import { z as z127 } from "zod";
|
|
2794
|
+
var pcb_courtyard_polygon = z127.object({
|
|
2795
|
+
type: z127.literal("pcb_courtyard_polygon"),
|
|
2782
2796
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
2783
2797
|
"pcb_courtyard_polygon"
|
|
2784
2798
|
),
|
|
2785
|
-
pcb_component_id:
|
|
2786
|
-
pcb_group_id:
|
|
2787
|
-
subcircuit_id:
|
|
2799
|
+
pcb_component_id: z127.string(),
|
|
2800
|
+
pcb_group_id: z127.string().optional(),
|
|
2801
|
+
subcircuit_id: z127.string().optional(),
|
|
2788
2802
|
layer: visible_layer,
|
|
2789
|
-
points:
|
|
2790
|
-
color:
|
|
2803
|
+
points: z127.array(point).min(3),
|
|
2804
|
+
color: z127.string().optional()
|
|
2791
2805
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
2792
2806
|
expectTypesMatch(true);
|
|
2793
2807
|
|
|
2794
2808
|
// 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:
|
|
2809
|
+
import { z as z128 } from "zod";
|
|
2810
|
+
var cad_component = z128.object({
|
|
2811
|
+
type: z128.literal("cad_component"),
|
|
2812
|
+
cad_component_id: z128.string(),
|
|
2813
|
+
pcb_component_id: z128.string(),
|
|
2814
|
+
source_component_id: z128.string(),
|
|
2801
2815
|
position: point3,
|
|
2802
2816
|
rotation: point3.optional(),
|
|
2803
2817
|
size: point3.optional(),
|
|
2804
2818
|
layer: layer_ref.optional(),
|
|
2805
|
-
subcircuit_id:
|
|
2819
|
+
subcircuit_id: z128.string().optional(),
|
|
2806
2820
|
// 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:
|
|
2821
|
+
footprinter_string: z128.string().optional(),
|
|
2822
|
+
model_obj_url: z128.string().optional(),
|
|
2823
|
+
model_stl_url: z128.string().optional(),
|
|
2824
|
+
model_3mf_url: z128.string().optional(),
|
|
2825
|
+
model_gltf_url: z128.string().optional(),
|
|
2826
|
+
model_glb_url: z128.string().optional(),
|
|
2827
|
+
model_step_url: z128.string().optional(),
|
|
2828
|
+
model_wrl_url: z128.string().optional(),
|
|
2829
|
+
model_unit_to_mm_scale_factor: z128.number().optional(),
|
|
2830
|
+
model_jscad: z128.any().optional(),
|
|
2831
|
+
show_as_translucent_model: z128.boolean().optional()
|
|
2818
2832
|
}).describe("Defines a component on the PCB");
|
|
2819
2833
|
expectTypesMatch(true);
|
|
2820
2834
|
|
|
2821
2835
|
// src/simulation/simulation_voltage_source.ts
|
|
2822
|
-
import { z as
|
|
2823
|
-
var wave_shape =
|
|
2824
|
-
var percentage =
|
|
2836
|
+
import { z as z129 } from "zod";
|
|
2837
|
+
var wave_shape = z129.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
2838
|
+
var percentage = z129.union([z129.string(), z129.number()]).transform((val) => {
|
|
2825
2839
|
if (typeof val === "string") {
|
|
2826
2840
|
if (val.endsWith("%")) {
|
|
2827
2841
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -2830,30 +2844,30 @@ var percentage = z128.union([z128.string(), z128.number()]).transform((val) => {
|
|
|
2830
2844
|
}
|
|
2831
2845
|
return val;
|
|
2832
2846
|
}).pipe(
|
|
2833
|
-
|
|
2847
|
+
z129.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
2834
2848
|
);
|
|
2835
|
-
var simulation_dc_voltage_source =
|
|
2836
|
-
type:
|
|
2849
|
+
var simulation_dc_voltage_source = z129.object({
|
|
2850
|
+
type: z129.literal("simulation_voltage_source"),
|
|
2837
2851
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2838
2852
|
"simulation_voltage_source"
|
|
2839
2853
|
),
|
|
2840
|
-
is_dc_source:
|
|
2841
|
-
positive_source_port_id:
|
|
2842
|
-
negative_source_port_id:
|
|
2843
|
-
positive_source_net_id:
|
|
2844
|
-
negative_source_net_id:
|
|
2854
|
+
is_dc_source: z129.literal(true).optional().default(true),
|
|
2855
|
+
positive_source_port_id: z129.string().optional(),
|
|
2856
|
+
negative_source_port_id: z129.string().optional(),
|
|
2857
|
+
positive_source_net_id: z129.string().optional(),
|
|
2858
|
+
negative_source_net_id: z129.string().optional(),
|
|
2845
2859
|
voltage
|
|
2846
2860
|
}).describe("Defines a DC voltage source for simulation");
|
|
2847
|
-
var simulation_ac_voltage_source =
|
|
2848
|
-
type:
|
|
2861
|
+
var simulation_ac_voltage_source = z129.object({
|
|
2862
|
+
type: z129.literal("simulation_voltage_source"),
|
|
2849
2863
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2850
2864
|
"simulation_voltage_source"
|
|
2851
2865
|
),
|
|
2852
|
-
is_dc_source:
|
|
2853
|
-
terminal1_source_port_id:
|
|
2854
|
-
terminal2_source_port_id:
|
|
2855
|
-
terminal1_source_net_id:
|
|
2856
|
-
terminal2_source_net_id:
|
|
2866
|
+
is_dc_source: z129.literal(false),
|
|
2867
|
+
terminal1_source_port_id: z129.string().optional(),
|
|
2868
|
+
terminal2_source_port_id: z129.string().optional(),
|
|
2869
|
+
terminal1_source_net_id: z129.string().optional(),
|
|
2870
|
+
terminal2_source_net_id: z129.string().optional(),
|
|
2857
2871
|
voltage: voltage.optional(),
|
|
2858
2872
|
frequency: frequency.optional(),
|
|
2859
2873
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -2861,25 +2875,25 @@ var simulation_ac_voltage_source = z128.object({
|
|
|
2861
2875
|
phase: rotation.optional(),
|
|
2862
2876
|
duty_cycle: percentage.optional()
|
|
2863
2877
|
}).describe("Defines an AC voltage source for simulation");
|
|
2864
|
-
var simulation_voltage_source =
|
|
2878
|
+
var simulation_voltage_source = z129.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
2865
2879
|
expectTypesMatch(true);
|
|
2866
2880
|
expectTypesMatch(true);
|
|
2867
2881
|
expectTypesMatch(true);
|
|
2868
2882
|
|
|
2869
2883
|
// src/simulation/simulation_experiment.ts
|
|
2870
|
-
import { z as
|
|
2871
|
-
var experiment_type =
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2884
|
+
import { z as z130 } from "zod";
|
|
2885
|
+
var experiment_type = z130.union([
|
|
2886
|
+
z130.literal("spice_dc_sweep"),
|
|
2887
|
+
z130.literal("spice_dc_operating_point"),
|
|
2888
|
+
z130.literal("spice_transient_analysis"),
|
|
2889
|
+
z130.literal("spice_ac_analysis")
|
|
2876
2890
|
]);
|
|
2877
|
-
var simulation_experiment =
|
|
2878
|
-
type:
|
|
2891
|
+
var simulation_experiment = z130.object({
|
|
2892
|
+
type: z130.literal("simulation_experiment"),
|
|
2879
2893
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
2880
2894
|
"simulation_experiment"
|
|
2881
2895
|
),
|
|
2882
|
-
name:
|
|
2896
|
+
name: z130.string(),
|
|
2883
2897
|
experiment_type,
|
|
2884
2898
|
time_per_step: duration_ms.optional(),
|
|
2885
2899
|
start_time_ms: ms.optional(),
|
|
@@ -2888,53 +2902,53 @@ var simulation_experiment = z129.object({
|
|
|
2888
2902
|
expectTypesMatch(true);
|
|
2889
2903
|
|
|
2890
2904
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
2891
|
-
import { z as
|
|
2892
|
-
var simulation_transient_voltage_graph =
|
|
2893
|
-
type:
|
|
2905
|
+
import { z as z131 } from "zod";
|
|
2906
|
+
var simulation_transient_voltage_graph = z131.object({
|
|
2907
|
+
type: z131.literal("simulation_transient_voltage_graph"),
|
|
2894
2908
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
2895
2909
|
"simulation_transient_voltage_graph"
|
|
2896
2910
|
),
|
|
2897
|
-
simulation_experiment_id:
|
|
2898
|
-
timestamps_ms:
|
|
2899
|
-
voltage_levels:
|
|
2900
|
-
source_component_id:
|
|
2901
|
-
subcircuit_connectivity_map_key:
|
|
2911
|
+
simulation_experiment_id: z131.string(),
|
|
2912
|
+
timestamps_ms: z131.array(z131.number()).optional(),
|
|
2913
|
+
voltage_levels: z131.array(z131.number()),
|
|
2914
|
+
source_component_id: z131.string().optional(),
|
|
2915
|
+
subcircuit_connectivity_map_key: z131.string().optional(),
|
|
2902
2916
|
time_per_step: duration_ms,
|
|
2903
2917
|
start_time_ms: ms,
|
|
2904
2918
|
end_time_ms: ms,
|
|
2905
|
-
name:
|
|
2906
|
-
color:
|
|
2919
|
+
name: z131.string().optional(),
|
|
2920
|
+
color: z131.string().optional()
|
|
2907
2921
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
2908
2922
|
expectTypesMatch(true);
|
|
2909
2923
|
|
|
2910
2924
|
// src/simulation/simulation_switch.ts
|
|
2911
|
-
import { z as
|
|
2912
|
-
var simulation_switch =
|
|
2913
|
-
type:
|
|
2925
|
+
import { z as z132 } from "zod";
|
|
2926
|
+
var simulation_switch = z132.object({
|
|
2927
|
+
type: z132.literal("simulation_switch"),
|
|
2914
2928
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
2915
|
-
source_component_id:
|
|
2929
|
+
source_component_id: z132.string().optional(),
|
|
2916
2930
|
closes_at: ms.optional(),
|
|
2917
2931
|
opens_at: ms.optional(),
|
|
2918
|
-
starts_closed:
|
|
2932
|
+
starts_closed: z132.boolean().optional(),
|
|
2919
2933
|
switching_frequency: frequency.optional()
|
|
2920
2934
|
}).describe("Defines a switch for simulation timing control");
|
|
2921
2935
|
expectTypesMatch(true);
|
|
2922
2936
|
|
|
2923
2937
|
// src/simulation/simulation_voltage_probe.ts
|
|
2924
|
-
import { z as
|
|
2925
|
-
var simulation_voltage_probe =
|
|
2926
|
-
type:
|
|
2938
|
+
import { z as z133 } from "zod";
|
|
2939
|
+
var simulation_voltage_probe = z133.object({
|
|
2940
|
+
type: z133.literal("simulation_voltage_probe"),
|
|
2927
2941
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
2928
2942
|
"simulation_voltage_probe"
|
|
2929
2943
|
),
|
|
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:
|
|
2944
|
+
source_component_id: z133.string().optional(),
|
|
2945
|
+
name: z133.string().optional(),
|
|
2946
|
+
signal_input_source_port_id: z133.string().optional(),
|
|
2947
|
+
signal_input_source_net_id: z133.string().optional(),
|
|
2948
|
+
reference_input_source_port_id: z133.string().optional(),
|
|
2949
|
+
reference_input_source_net_id: z133.string().optional(),
|
|
2950
|
+
subcircuit_id: z133.string().optional(),
|
|
2951
|
+
color: z133.string().optional()
|
|
2938
2952
|
}).describe(
|
|
2939
2953
|
"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
2954
|
).superRefine((data, ctx) => {
|
|
@@ -2944,20 +2958,20 @@ var simulation_voltage_probe = z132.object({
|
|
|
2944
2958
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
2945
2959
|
if (has_ports && has_nets) {
|
|
2946
2960
|
ctx.addIssue({
|
|
2947
|
-
code:
|
|
2961
|
+
code: z133.ZodIssueCode.custom,
|
|
2948
2962
|
message: "Cannot mix port and net connections in a differential probe."
|
|
2949
2963
|
});
|
|
2950
2964
|
} else if (has_ports) {
|
|
2951
2965
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
2952
2966
|
ctx.addIssue({
|
|
2953
|
-
code:
|
|
2967
|
+
code: z133.ZodIssueCode.custom,
|
|
2954
2968
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
2955
2969
|
});
|
|
2956
2970
|
}
|
|
2957
2971
|
} else if (has_nets) {
|
|
2958
2972
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
2959
2973
|
ctx.addIssue({
|
|
2960
|
-
code:
|
|
2974
|
+
code: z133.ZodIssueCode.custom,
|
|
2961
2975
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
2962
2976
|
});
|
|
2963
2977
|
}
|
|
@@ -2965,7 +2979,7 @@ var simulation_voltage_probe = z132.object({
|
|
|
2965
2979
|
} else {
|
|
2966
2980
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
2967
2981
|
ctx.addIssue({
|
|
2968
|
-
code:
|
|
2982
|
+
code: z133.ZodIssueCode.custom,
|
|
2969
2983
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
2970
2984
|
});
|
|
2971
2985
|
}
|
|
@@ -2974,22 +2988,22 @@ var simulation_voltage_probe = z132.object({
|
|
|
2974
2988
|
expectTypesMatch(true);
|
|
2975
2989
|
|
|
2976
2990
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
2977
|
-
import { z as
|
|
2978
|
-
var simulation_unknown_experiment_error =
|
|
2979
|
-
type:
|
|
2991
|
+
import { z as z134 } from "zod";
|
|
2992
|
+
var simulation_unknown_experiment_error = z134.object({
|
|
2993
|
+
type: z134.literal("simulation_unknown_experiment_error"),
|
|
2980
2994
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
2981
2995
|
"simulation_unknown_experiment_error"
|
|
2982
2996
|
),
|
|
2983
|
-
error_type:
|
|
2984
|
-
message:
|
|
2985
|
-
simulation_experiment_id:
|
|
2986
|
-
subcircuit_id:
|
|
2997
|
+
error_type: z134.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
2998
|
+
message: z134.string(),
|
|
2999
|
+
simulation_experiment_id: z134.string().optional(),
|
|
3000
|
+
subcircuit_id: z134.string().optional()
|
|
2987
3001
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
2988
3002
|
expectTypesMatch(true);
|
|
2989
3003
|
|
|
2990
3004
|
// src/any_circuit_element.ts
|
|
2991
|
-
import { z as
|
|
2992
|
-
var any_circuit_element =
|
|
3005
|
+
import { z as z135 } from "zod";
|
|
3006
|
+
var any_circuit_element = z135.union([
|
|
2993
3007
|
source_trace,
|
|
2994
3008
|
source_port,
|
|
2995
3009
|
source_component_internal_connection,
|
|
@@ -3266,6 +3280,7 @@ export {
|
|
|
3266
3280
|
source_simple_chip,
|
|
3267
3281
|
source_simple_crystal,
|
|
3268
3282
|
source_simple_diode,
|
|
3283
|
+
source_simple_fiducial,
|
|
3269
3284
|
source_simple_ground,
|
|
3270
3285
|
source_simple_inductor,
|
|
3271
3286
|
source_simple_led,
|