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