@tscircuit/props 0.0.152 → 0.0.154
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +416 -1
- package/dist/index.js +232 -214
- package/dist/index.js.map +1 -1
- package/lib/components/stampboard.ts +33 -0
- package/lib/index.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -463,84 +463,101 @@ var resonatorProps = commonComponentProps.extend({
|
|
|
463
463
|
});
|
|
464
464
|
expectTypesMatch(true);
|
|
465
465
|
|
|
466
|
+
// lib/components/stampboard.ts
|
|
467
|
+
import { distance as distance9 } from "circuit-json";
|
|
468
|
+
import { z as z28 } from "zod";
|
|
469
|
+
var stampboardProps = boardProps.extend({
|
|
470
|
+
leftPinCount: z28.number().optional(),
|
|
471
|
+
rightPinCount: z28.number().optional(),
|
|
472
|
+
topPinCount: z28.number().optional(),
|
|
473
|
+
bottomPinCount: z28.number().optional(),
|
|
474
|
+
leftPins: z28.array(z28.string()).optional(),
|
|
475
|
+
rightPins: z28.array(z28.string()).optional(),
|
|
476
|
+
topPins: z28.array(z28.string()).optional(),
|
|
477
|
+
bottomPins: z28.array(z28.string()).optional(),
|
|
478
|
+
pinPitch: distance9.optional(),
|
|
479
|
+
innerHoles: z28.boolean().optional()
|
|
480
|
+
});
|
|
481
|
+
expectTypesMatch(true);
|
|
482
|
+
|
|
466
483
|
// lib/components/capacitor.ts
|
|
467
484
|
import { capacitance as capacitance3, voltage } from "circuit-json";
|
|
468
|
-
import { z as
|
|
485
|
+
import { z as z29 } from "zod";
|
|
469
486
|
var capacitorProps = commonComponentProps.extend({
|
|
470
487
|
capacitance: capacitance3,
|
|
471
488
|
maxVoltageRating: voltage.optional(),
|
|
472
|
-
schShowRatings:
|
|
473
|
-
polarized:
|
|
474
|
-
decouplingFor:
|
|
475
|
-
decouplingTo:
|
|
476
|
-
bypassFor:
|
|
477
|
-
bypassTo:
|
|
478
|
-
maxDecouplingTraceLength:
|
|
489
|
+
schShowRatings: z29.boolean().optional().default(false),
|
|
490
|
+
polarized: z29.boolean().optional().default(false),
|
|
491
|
+
decouplingFor: z29.string().optional(),
|
|
492
|
+
decouplingTo: z29.string().optional(),
|
|
493
|
+
bypassFor: z29.string().optional(),
|
|
494
|
+
bypassTo: z29.string().optional(),
|
|
495
|
+
maxDecouplingTraceLength: z29.number().optional()
|
|
479
496
|
});
|
|
480
497
|
var capacitorPins = lrPolarPins;
|
|
481
498
|
expectTypesMatch(true);
|
|
482
499
|
|
|
483
500
|
// lib/components/net.ts
|
|
484
|
-
import { z as
|
|
485
|
-
var netProps =
|
|
486
|
-
name:
|
|
501
|
+
import { z as z30 } from "zod";
|
|
502
|
+
var netProps = z30.object({
|
|
503
|
+
name: z30.string()
|
|
487
504
|
});
|
|
488
505
|
expectTypesMatch(true);
|
|
489
506
|
|
|
490
507
|
// lib/components/constrainedlayout.ts
|
|
491
|
-
import { z as
|
|
492
|
-
var constrainedLayoutProps =
|
|
493
|
-
name:
|
|
494
|
-
pcbOnly:
|
|
495
|
-
schOnly:
|
|
508
|
+
import { z as z31 } from "zod";
|
|
509
|
+
var constrainedLayoutProps = z31.object({
|
|
510
|
+
name: z31.string().optional(),
|
|
511
|
+
pcbOnly: z31.boolean().optional(),
|
|
512
|
+
schOnly: z31.boolean().optional()
|
|
496
513
|
});
|
|
497
514
|
expectTypesMatch(true);
|
|
498
515
|
|
|
499
516
|
// lib/common/distance.ts
|
|
500
517
|
import "zod";
|
|
501
|
-
import { distance as
|
|
518
|
+
import { distance as distance10, length as length2 } from "circuit-json";
|
|
502
519
|
|
|
503
520
|
// lib/components/constraint.ts
|
|
504
|
-
import { z as
|
|
505
|
-
var pcbXDistConstraintProps =
|
|
506
|
-
pcb:
|
|
507
|
-
xDist:
|
|
508
|
-
left:
|
|
509
|
-
right:
|
|
510
|
-
edgeToEdge:
|
|
511
|
-
centerToCenter:
|
|
521
|
+
import { z as z33 } from "zod";
|
|
522
|
+
var pcbXDistConstraintProps = z33.object({
|
|
523
|
+
pcb: z33.literal(true).optional(),
|
|
524
|
+
xDist: distance10,
|
|
525
|
+
left: z33.string(),
|
|
526
|
+
right: z33.string(),
|
|
527
|
+
edgeToEdge: z33.literal(true).optional(),
|
|
528
|
+
centerToCenter: z33.literal(true).optional()
|
|
512
529
|
});
|
|
513
530
|
expectTypesMatch(
|
|
514
531
|
true
|
|
515
532
|
);
|
|
516
|
-
var pcbYDistConstraintProps =
|
|
517
|
-
pcb:
|
|
518
|
-
yDist:
|
|
519
|
-
top:
|
|
520
|
-
bottom:
|
|
521
|
-
edgeToEdge:
|
|
522
|
-
centerToCenter:
|
|
533
|
+
var pcbYDistConstraintProps = z33.object({
|
|
534
|
+
pcb: z33.literal(true).optional(),
|
|
535
|
+
yDist: distance10,
|
|
536
|
+
top: z33.string(),
|
|
537
|
+
bottom: z33.string(),
|
|
538
|
+
edgeToEdge: z33.literal(true).optional(),
|
|
539
|
+
centerToCenter: z33.literal(true).optional()
|
|
523
540
|
});
|
|
524
541
|
expectTypesMatch(
|
|
525
542
|
true
|
|
526
543
|
);
|
|
527
|
-
var pcbSameYConstraintProps =
|
|
528
|
-
pcb:
|
|
529
|
-
sameY:
|
|
530
|
-
for:
|
|
544
|
+
var pcbSameYConstraintProps = z33.object({
|
|
545
|
+
pcb: z33.literal(true).optional(),
|
|
546
|
+
sameY: z33.literal(true).optional(),
|
|
547
|
+
for: z33.array(z33.string())
|
|
531
548
|
});
|
|
532
549
|
expectTypesMatch(
|
|
533
550
|
true
|
|
534
551
|
);
|
|
535
|
-
var pcbSameXConstraintProps =
|
|
536
|
-
pcb:
|
|
537
|
-
sameX:
|
|
538
|
-
for:
|
|
552
|
+
var pcbSameXConstraintProps = z33.object({
|
|
553
|
+
pcb: z33.literal(true).optional(),
|
|
554
|
+
sameX: z33.literal(true).optional(),
|
|
555
|
+
for: z33.array(z33.string())
|
|
539
556
|
});
|
|
540
557
|
expectTypesMatch(
|
|
541
558
|
true
|
|
542
559
|
);
|
|
543
|
-
var constraintProps =
|
|
560
|
+
var constraintProps = z33.union([
|
|
544
561
|
pcbXDistConstraintProps,
|
|
545
562
|
pcbYDistConstraintProps,
|
|
546
563
|
pcbSameYConstraintProps,
|
|
@@ -549,37 +566,37 @@ var constraintProps = z32.union([
|
|
|
549
566
|
expectTypesMatch(true);
|
|
550
567
|
|
|
551
568
|
// lib/components/smtpad.ts
|
|
552
|
-
import { z as
|
|
569
|
+
import { z as z34 } from "zod";
|
|
553
570
|
var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
554
|
-
shape:
|
|
555
|
-
width:
|
|
556
|
-
height:
|
|
571
|
+
shape: z34.literal("rect"),
|
|
572
|
+
width: distance10,
|
|
573
|
+
height: distance10,
|
|
557
574
|
portHints: portHints.optional()
|
|
558
575
|
});
|
|
559
576
|
expectTypesMatch(true);
|
|
560
577
|
var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
561
|
-
shape:
|
|
562
|
-
width:
|
|
563
|
-
height:
|
|
564
|
-
ccwRotation:
|
|
578
|
+
shape: z34.literal("rotated_rect"),
|
|
579
|
+
width: distance10,
|
|
580
|
+
height: distance10,
|
|
581
|
+
ccwRotation: z34.number(),
|
|
565
582
|
portHints: portHints.optional()
|
|
566
583
|
});
|
|
567
584
|
expectTypesMatch(true);
|
|
568
585
|
var circleSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
569
|
-
shape:
|
|
570
|
-
radius:
|
|
586
|
+
shape: z34.literal("circle"),
|
|
587
|
+
radius: distance10,
|
|
571
588
|
portHints: portHints.optional()
|
|
572
589
|
});
|
|
573
590
|
expectTypesMatch(true);
|
|
574
591
|
var pillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
575
|
-
shape:
|
|
576
|
-
width:
|
|
577
|
-
height:
|
|
578
|
-
radius:
|
|
592
|
+
shape: z34.literal("pill"),
|
|
593
|
+
width: distance10,
|
|
594
|
+
height: distance10,
|
|
595
|
+
radius: distance10,
|
|
579
596
|
portHints: portHints.optional()
|
|
580
597
|
});
|
|
581
598
|
expectTypesMatch(true);
|
|
582
|
-
var smtPadProps =
|
|
599
|
+
var smtPadProps = z34.union([
|
|
583
600
|
circleSmtPadProps,
|
|
584
601
|
rectSmtPadProps,
|
|
585
602
|
rotatedRectSmtPadProps,
|
|
@@ -588,30 +605,30 @@ var smtPadProps = z33.union([
|
|
|
588
605
|
expectTypesMatch(true);
|
|
589
606
|
|
|
590
607
|
// lib/components/solderpaste.ts
|
|
591
|
-
import { z as
|
|
608
|
+
import { z as z35 } from "zod";
|
|
592
609
|
var rectSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
593
|
-
shape:
|
|
594
|
-
width:
|
|
595
|
-
height:
|
|
610
|
+
shape: z35.literal("rect"),
|
|
611
|
+
width: distance10,
|
|
612
|
+
height: distance10
|
|
596
613
|
});
|
|
597
614
|
expectTypesMatch(true);
|
|
598
615
|
var circleSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
599
|
-
shape:
|
|
600
|
-
radius:
|
|
616
|
+
shape: z35.literal("circle"),
|
|
617
|
+
radius: distance10
|
|
601
618
|
});
|
|
602
619
|
expectTypesMatch(true);
|
|
603
|
-
var solderPasteProps =
|
|
620
|
+
var solderPasteProps = z35.union([
|
|
604
621
|
circleSolderPasteProps,
|
|
605
622
|
rectSolderPasteProps
|
|
606
623
|
]);
|
|
607
624
|
expectTypesMatch(true);
|
|
608
625
|
|
|
609
626
|
// lib/components/hole.ts
|
|
610
|
-
import { z as
|
|
627
|
+
import { z as z36 } from "zod";
|
|
611
628
|
var holeProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
612
|
-
name:
|
|
613
|
-
diameter:
|
|
614
|
-
radius:
|
|
629
|
+
name: z36.string().optional(),
|
|
630
|
+
diameter: distance10.optional(),
|
|
631
|
+
radius: distance10.optional()
|
|
615
632
|
}).transform((d) => ({
|
|
616
633
|
...d,
|
|
617
634
|
diameter: d.diameter ?? 2 * d.radius,
|
|
@@ -620,25 +637,25 @@ var holeProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
620
637
|
expectTypesMatch(true);
|
|
621
638
|
|
|
622
639
|
// lib/components/trace.ts
|
|
623
|
-
import { distance as
|
|
624
|
-
import { z as
|
|
625
|
-
var portRef =
|
|
626
|
-
|
|
627
|
-
|
|
640
|
+
import { distance as distance11, route_hint_point as route_hint_point3 } from "circuit-json";
|
|
641
|
+
import { z as z37 } from "zod";
|
|
642
|
+
var portRef = z37.union([
|
|
643
|
+
z37.string(),
|
|
644
|
+
z37.custom(
|
|
628
645
|
(v) => Boolean(v.getPortSelector)
|
|
629
646
|
)
|
|
630
647
|
]);
|
|
631
|
-
var baseTraceProps =
|
|
632
|
-
key:
|
|
633
|
-
thickness:
|
|
634
|
-
schematicRouteHints:
|
|
635
|
-
pcbRouteHints:
|
|
636
|
-
schDisplayLabel:
|
|
637
|
-
maxLength:
|
|
638
|
-
});
|
|
639
|
-
var traceProps =
|
|
648
|
+
var baseTraceProps = z37.object({
|
|
649
|
+
key: z37.string().optional(),
|
|
650
|
+
thickness: distance11.optional(),
|
|
651
|
+
schematicRouteHints: z37.array(point).optional(),
|
|
652
|
+
pcbRouteHints: z37.array(route_hint_point3).optional(),
|
|
653
|
+
schDisplayLabel: z37.string().optional(),
|
|
654
|
+
maxLength: distance11.optional()
|
|
655
|
+
});
|
|
656
|
+
var traceProps = z37.union([
|
|
640
657
|
baseTraceProps.extend({
|
|
641
|
-
path:
|
|
658
|
+
path: z37.array(portRef)
|
|
642
659
|
}),
|
|
643
660
|
baseTraceProps.extend({
|
|
644
661
|
from: portRef,
|
|
@@ -648,15 +665,15 @@ var traceProps = z36.union([
|
|
|
648
665
|
|
|
649
666
|
// lib/components/footprint.ts
|
|
650
667
|
import { layer_ref as layer_ref3 } from "circuit-json";
|
|
651
|
-
import { z as
|
|
652
|
-
var footprintProps =
|
|
668
|
+
import { z as z38 } from "zod";
|
|
669
|
+
var footprintProps = z38.object({
|
|
653
670
|
originalLayer: layer_ref3.default("top").optional()
|
|
654
671
|
});
|
|
655
672
|
expectTypesMatch(true);
|
|
656
673
|
|
|
657
674
|
// lib/components/battery.ts
|
|
658
|
-
import { z as
|
|
659
|
-
var capacity =
|
|
675
|
+
import { z as z39 } from "zod";
|
|
676
|
+
var capacity = z39.number().or(z39.string().endsWith("mAh")).transform((v) => {
|
|
660
677
|
if (typeof v === "string") {
|
|
661
678
|
const valString = v.replace("mAh", "");
|
|
662
679
|
const num = Number.parseFloat(valString);
|
|
@@ -674,38 +691,38 @@ var batteryPins = lrPolarPins;
|
|
|
674
691
|
expectTypesMatch(true);
|
|
675
692
|
|
|
676
693
|
// lib/components/pin-header.ts
|
|
677
|
-
import { distance as
|
|
678
|
-
import { z as
|
|
694
|
+
import { distance as distance12 } from "circuit-json";
|
|
695
|
+
import { z as z40 } from "zod";
|
|
679
696
|
var pinHeaderProps = commonComponentProps.extend({
|
|
680
|
-
pinCount:
|
|
681
|
-
pitch:
|
|
682
|
-
schFacingDirection:
|
|
683
|
-
gender:
|
|
684
|
-
showSilkscreenPinLabels:
|
|
685
|
-
doubleRow:
|
|
686
|
-
holeDiameter:
|
|
687
|
-
platedDiameter:
|
|
688
|
-
pinLabels:
|
|
689
|
-
facingDirection:
|
|
697
|
+
pinCount: z40.number(),
|
|
698
|
+
pitch: distance12.optional(),
|
|
699
|
+
schFacingDirection: z40.enum(["up", "down", "left", "right"]).optional(),
|
|
700
|
+
gender: z40.enum(["male", "female"]).optional().default("male"),
|
|
701
|
+
showSilkscreenPinLabels: z40.boolean().optional(),
|
|
702
|
+
doubleRow: z40.boolean().optional(),
|
|
703
|
+
holeDiameter: distance12.optional(),
|
|
704
|
+
platedDiameter: distance12.optional(),
|
|
705
|
+
pinLabels: z40.array(z40.string()).optional(),
|
|
706
|
+
facingDirection: z40.enum(["left", "right"]).optional()
|
|
690
707
|
});
|
|
691
708
|
expectTypesMatch(true);
|
|
692
709
|
|
|
693
710
|
// lib/components/netalias.ts
|
|
694
|
-
import { z as
|
|
711
|
+
import { z as z41 } from "zod";
|
|
695
712
|
import { rotation as rotation2 } from "circuit-json";
|
|
696
|
-
var netAliasProps =
|
|
697
|
-
net:
|
|
698
|
-
schX:
|
|
699
|
-
schY:
|
|
713
|
+
var netAliasProps = z41.object({
|
|
714
|
+
net: z41.string().optional(),
|
|
715
|
+
schX: distance10.optional(),
|
|
716
|
+
schY: distance10.optional(),
|
|
700
717
|
schRotation: rotation2.optional(),
|
|
701
|
-
anchorSide:
|
|
718
|
+
anchorSide: z41.enum(["left", "up", "right", "down"]).optional()
|
|
702
719
|
});
|
|
703
720
|
expectTypesMatch(true);
|
|
704
721
|
|
|
705
722
|
// lib/components/push-button.ts
|
|
706
|
-
import { z as
|
|
723
|
+
import { z as z42 } from "zod";
|
|
707
724
|
var pushButtonProps = commonComponentProps.extend({
|
|
708
|
-
internallyConnectedPins:
|
|
725
|
+
internallyConnectedPins: z42.array(z42.array(z42.string())).optional()
|
|
709
726
|
});
|
|
710
727
|
expectTypesMatch(true);
|
|
711
728
|
|
|
@@ -714,9 +731,9 @@ var subcircuitProps = subcircuitGroupProps;
|
|
|
714
731
|
expectTypesMatch(true);
|
|
715
732
|
|
|
716
733
|
// lib/components/transistor.ts
|
|
717
|
-
import { z as
|
|
734
|
+
import { z as z43 } from "zod";
|
|
718
735
|
var transistorProps = commonComponentProps.extend({
|
|
719
|
-
type:
|
|
736
|
+
type: z43.enum(["npn", "pnp", "bjt", "jfet", "mosfet"])
|
|
720
737
|
});
|
|
721
738
|
var transistorPins = [
|
|
722
739
|
"pin1",
|
|
@@ -729,10 +746,10 @@ var transistorPins = [
|
|
|
729
746
|
expectTypesMatch(true);
|
|
730
747
|
|
|
731
748
|
// lib/components/mosfet.ts
|
|
732
|
-
import { z as
|
|
749
|
+
import { z as z44 } from "zod";
|
|
733
750
|
var mosfetProps = commonComponentProps.extend({
|
|
734
|
-
channelType:
|
|
735
|
-
mosfetMode:
|
|
751
|
+
channelType: z44.enum(["n", "p"]),
|
|
752
|
+
mosfetMode: z44.enum(["enhancement", "depletion"])
|
|
736
753
|
});
|
|
737
754
|
var mosfetPins = [
|
|
738
755
|
"pin1",
|
|
@@ -756,21 +773,21 @@ var diodeProps = commonComponentProps.extend({});
|
|
|
756
773
|
var diodePins = lrPolarPins;
|
|
757
774
|
|
|
758
775
|
// lib/components/led.ts
|
|
759
|
-
import { z as
|
|
776
|
+
import { z as z45 } from "zod";
|
|
760
777
|
var ledProps = commonComponentProps.extend({
|
|
761
|
-
color:
|
|
778
|
+
color: z45.string().optional()
|
|
762
779
|
});
|
|
763
780
|
var ledPins = lrPolarPins;
|
|
764
781
|
|
|
765
782
|
// lib/components/switch.ts
|
|
766
|
-
import { z as
|
|
783
|
+
import { z as z46 } from "zod";
|
|
767
784
|
var switchProps = commonComponentProps.extend({
|
|
768
|
-
type:
|
|
769
|
-
isNormallyClosed:
|
|
770
|
-
spst:
|
|
771
|
-
spdt:
|
|
772
|
-
dpst:
|
|
773
|
-
dpdt:
|
|
785
|
+
type: z46.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
|
|
786
|
+
isNormallyClosed: z46.boolean().optional().default(false),
|
|
787
|
+
spst: z46.boolean().optional(),
|
|
788
|
+
spdt: z46.boolean().optional(),
|
|
789
|
+
dpst: z46.boolean().optional(),
|
|
790
|
+
dpdt: z46.boolean().optional()
|
|
774
791
|
}).transform((props) => {
|
|
775
792
|
const updatedProps = { ...props };
|
|
776
793
|
if (updatedProps.dpdt) {
|
|
@@ -802,54 +819,54 @@ expectTypesMatch(true);
|
|
|
802
819
|
|
|
803
820
|
// lib/components/fabrication-note-text.ts
|
|
804
821
|
import { length as length3 } from "circuit-json";
|
|
805
|
-
import { z as
|
|
822
|
+
import { z as z47 } from "zod";
|
|
806
823
|
var fabricationNoteTextProps = pcbLayoutProps.extend({
|
|
807
|
-
text:
|
|
808
|
-
anchorAlignment:
|
|
809
|
-
font:
|
|
824
|
+
text: z47.string(),
|
|
825
|
+
anchorAlignment: z47.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
826
|
+
font: z47.enum(["tscircuit2024"]).optional(),
|
|
810
827
|
fontSize: length3.optional(),
|
|
811
|
-
color:
|
|
828
|
+
color: z47.string().optional()
|
|
812
829
|
});
|
|
813
830
|
|
|
814
831
|
// lib/components/fabrication-note-path.ts
|
|
815
832
|
import { length as length4, route_hint_point as route_hint_point4 } from "circuit-json";
|
|
816
|
-
import { z as
|
|
833
|
+
import { z as z48 } from "zod";
|
|
817
834
|
var fabricationNotePathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
|
|
818
|
-
route:
|
|
835
|
+
route: z48.array(route_hint_point4),
|
|
819
836
|
strokeWidth: length4.optional(),
|
|
820
|
-
color:
|
|
837
|
+
color: z48.string().optional()
|
|
821
838
|
});
|
|
822
839
|
|
|
823
840
|
// lib/components/pcb-trace.ts
|
|
824
|
-
import { distance as
|
|
825
|
-
import { z as
|
|
826
|
-
var pcbTraceProps =
|
|
827
|
-
layer:
|
|
828
|
-
thickness:
|
|
829
|
-
route:
|
|
841
|
+
import { distance as distance13, route_hint_point as route_hint_point5 } from "circuit-json";
|
|
842
|
+
import { z as z49 } from "zod";
|
|
843
|
+
var pcbTraceProps = z49.object({
|
|
844
|
+
layer: z49.string().optional(),
|
|
845
|
+
thickness: distance13.optional(),
|
|
846
|
+
route: z49.array(route_hint_point5)
|
|
830
847
|
});
|
|
831
848
|
|
|
832
849
|
// lib/components/via.ts
|
|
833
|
-
import { distance as
|
|
850
|
+
import { distance as distance14, layer_ref as layer_ref4 } from "circuit-json";
|
|
834
851
|
var viaProps = commonLayoutProps.extend({
|
|
835
852
|
fromLayer: layer_ref4,
|
|
836
853
|
toLayer: layer_ref4,
|
|
837
|
-
holeDiameter:
|
|
838
|
-
outerDiameter:
|
|
854
|
+
holeDiameter: distance14,
|
|
855
|
+
outerDiameter: distance14
|
|
839
856
|
});
|
|
840
857
|
|
|
841
858
|
// lib/components/pcb-keepout.ts
|
|
842
|
-
import { distance as
|
|
843
|
-
import { z as
|
|
844
|
-
var pcbKeepoutProps =
|
|
859
|
+
import { distance as distance15 } from "circuit-json";
|
|
860
|
+
import { z as z50 } from "zod";
|
|
861
|
+
var pcbKeepoutProps = z50.union([
|
|
845
862
|
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
846
|
-
shape:
|
|
847
|
-
radius:
|
|
863
|
+
shape: z50.literal("circle"),
|
|
864
|
+
radius: distance15
|
|
848
865
|
}),
|
|
849
866
|
pcbLayoutProps.extend({
|
|
850
|
-
shape:
|
|
851
|
-
width:
|
|
852
|
-
height:
|
|
867
|
+
shape: z50.literal("rect"),
|
|
868
|
+
width: distance15,
|
|
869
|
+
height: distance15
|
|
853
870
|
})
|
|
854
871
|
]);
|
|
855
872
|
|
|
@@ -860,127 +877,127 @@ var powerSourceProps = commonComponentProps.extend({
|
|
|
860
877
|
});
|
|
861
878
|
|
|
862
879
|
// lib/components/schematic-box.ts
|
|
863
|
-
import { distance as distance15 } from "circuit-json";
|
|
864
|
-
import { z as z50 } from "zod";
|
|
865
|
-
var schematicBoxProps = z50.object({
|
|
866
|
-
schX: distance15,
|
|
867
|
-
schY: distance15,
|
|
868
|
-
width: distance15,
|
|
869
|
-
height: distance15
|
|
870
|
-
});
|
|
871
|
-
|
|
872
|
-
// lib/components/schematic-line.ts
|
|
873
880
|
import { distance as distance16 } from "circuit-json";
|
|
874
881
|
import { z as z51 } from "zod";
|
|
875
|
-
var
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
882
|
+
var schematicBoxProps = z51.object({
|
|
883
|
+
schX: distance16,
|
|
884
|
+
schY: distance16,
|
|
885
|
+
width: distance16,
|
|
886
|
+
height: distance16
|
|
880
887
|
});
|
|
881
888
|
|
|
882
|
-
// lib/components/schematic-
|
|
889
|
+
// lib/components/schematic-line.ts
|
|
883
890
|
import { distance as distance17 } from "circuit-json";
|
|
884
891
|
import { z as z52 } from "zod";
|
|
885
|
-
var
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
892
|
+
var schematicLineProps = z52.object({
|
|
893
|
+
x1: distance17,
|
|
894
|
+
y1: distance17,
|
|
895
|
+
x2: distance17,
|
|
896
|
+
y2: distance17
|
|
897
|
+
});
|
|
898
|
+
|
|
899
|
+
// lib/components/schematic-text.ts
|
|
900
|
+
import { distance as distance18 } from "circuit-json";
|
|
901
|
+
import { z as z53 } from "zod";
|
|
902
|
+
var schematicTextProps = z53.object({
|
|
903
|
+
schX: distance18,
|
|
904
|
+
schY: distance18,
|
|
905
|
+
text: z53.string()
|
|
889
906
|
});
|
|
890
907
|
|
|
891
908
|
// lib/components/schematic-path.ts
|
|
892
909
|
import { point as point5 } from "circuit-json";
|
|
893
|
-
import { z as
|
|
894
|
-
var schematicPathProps =
|
|
895
|
-
points:
|
|
896
|
-
isFilled:
|
|
897
|
-
fillColor:
|
|
910
|
+
import { z as z54 } from "zod";
|
|
911
|
+
var schematicPathProps = z54.object({
|
|
912
|
+
points: z54.array(point5),
|
|
913
|
+
isFilled: z54.boolean().optional().default(false),
|
|
914
|
+
fillColor: z54.enum(["red", "blue"]).optional()
|
|
898
915
|
});
|
|
899
916
|
|
|
900
917
|
// lib/components/silkscreen-text.ts
|
|
901
918
|
import { length as length5 } from "circuit-json";
|
|
902
|
-
import { z as
|
|
919
|
+
import { z as z55 } from "zod";
|
|
903
920
|
var silkscreenTextProps = pcbLayoutProps.extend({
|
|
904
|
-
text:
|
|
905
|
-
anchorAlignment:
|
|
906
|
-
font:
|
|
921
|
+
text: z55.string(),
|
|
922
|
+
anchorAlignment: z55.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
923
|
+
font: z55.enum(["tscircuit2024"]).optional(),
|
|
907
924
|
fontSize: length5.optional()
|
|
908
925
|
});
|
|
909
926
|
|
|
910
927
|
// lib/components/silkscreen-path.ts
|
|
911
928
|
import { length as length6, route_hint_point as route_hint_point6 } from "circuit-json";
|
|
912
|
-
import { z as
|
|
929
|
+
import { z as z56 } from "zod";
|
|
913
930
|
var silkscreenPathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
|
|
914
|
-
route:
|
|
931
|
+
route: z56.array(route_hint_point6),
|
|
915
932
|
strokeWidth: length6.optional()
|
|
916
933
|
});
|
|
917
934
|
|
|
918
935
|
// lib/components/silkscreen-line.ts
|
|
919
|
-
import { distance as
|
|
936
|
+
import { distance as distance19 } from "circuit-json";
|
|
920
937
|
var silkscreenLineProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
|
|
921
|
-
strokeWidth:
|
|
922
|
-
x1:
|
|
923
|
-
y1:
|
|
924
|
-
x2:
|
|
925
|
-
y2:
|
|
938
|
+
strokeWidth: distance19,
|
|
939
|
+
x1: distance19,
|
|
940
|
+
y1: distance19,
|
|
941
|
+
x2: distance19,
|
|
942
|
+
y2: distance19
|
|
926
943
|
});
|
|
927
944
|
|
|
928
945
|
// lib/components/silkscreen-rect.ts
|
|
929
|
-
import { distance as distance19 } from "circuit-json";
|
|
930
|
-
import { z as z56 } from "zod";
|
|
931
|
-
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
932
|
-
isFilled: z56.boolean().optional(),
|
|
933
|
-
isOutline: z56.boolean().optional(),
|
|
934
|
-
strokeWidth: distance19.optional(),
|
|
935
|
-
width: distance19,
|
|
936
|
-
height: distance19
|
|
937
|
-
});
|
|
938
|
-
|
|
939
|
-
// lib/components/silkscreen-circle.ts
|
|
940
946
|
import { distance as distance20 } from "circuit-json";
|
|
941
947
|
import { z as z57 } from "zod";
|
|
942
|
-
var
|
|
948
|
+
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
943
949
|
isFilled: z57.boolean().optional(),
|
|
944
950
|
isOutline: z57.boolean().optional(),
|
|
945
951
|
strokeWidth: distance20.optional(),
|
|
946
|
-
|
|
952
|
+
width: distance20,
|
|
953
|
+
height: distance20
|
|
947
954
|
});
|
|
948
955
|
|
|
949
|
-
// lib/components/
|
|
950
|
-
import { distance as distance21
|
|
956
|
+
// lib/components/silkscreen-circle.ts
|
|
957
|
+
import { distance as distance21 } from "circuit-json";
|
|
951
958
|
import { z as z58 } from "zod";
|
|
952
|
-
var
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
959
|
+
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
960
|
+
isFilled: z58.boolean().optional(),
|
|
961
|
+
isOutline: z58.boolean().optional(),
|
|
962
|
+
strokeWidth: distance21.optional(),
|
|
963
|
+
radius: distance21
|
|
964
|
+
});
|
|
965
|
+
|
|
966
|
+
// lib/components/trace-hint.ts
|
|
967
|
+
import { distance as distance22, layer_ref as layer_ref5, route_hint_point as route_hint_point7 } from "circuit-json";
|
|
968
|
+
import { z as z59 } from "zod";
|
|
969
|
+
var routeHintPointProps = z59.object({
|
|
970
|
+
x: distance22,
|
|
971
|
+
y: distance22,
|
|
972
|
+
via: z59.boolean().optional(),
|
|
956
973
|
toLayer: layer_ref5.optional()
|
|
957
974
|
});
|
|
958
|
-
var traceHintProps =
|
|
959
|
-
for:
|
|
975
|
+
var traceHintProps = z59.object({
|
|
976
|
+
for: z59.string().optional().describe(
|
|
960
977
|
"Selector for the port you're targeting, not required if you're inside a trace"
|
|
961
978
|
),
|
|
962
|
-
order:
|
|
979
|
+
order: z59.number().optional(),
|
|
963
980
|
offset: route_hint_point7.or(routeHintPointProps).optional(),
|
|
964
|
-
offsets:
|
|
965
|
-
traceWidth:
|
|
981
|
+
offsets: z59.array(route_hint_point7).or(z59.array(routeHintPointProps)).optional(),
|
|
982
|
+
traceWidth: z59.number().optional()
|
|
966
983
|
});
|
|
967
984
|
|
|
968
985
|
// lib/components/port.ts
|
|
969
|
-
import { z as
|
|
986
|
+
import { z as z60 } from "zod";
|
|
970
987
|
var portProps = commonLayoutProps.extend({
|
|
971
|
-
name:
|
|
972
|
-
pinNumber:
|
|
973
|
-
aliases:
|
|
988
|
+
name: z60.string(),
|
|
989
|
+
pinNumber: z60.number().optional(),
|
|
990
|
+
aliases: z60.array(z60.string()).optional(),
|
|
974
991
|
direction
|
|
975
992
|
});
|
|
976
993
|
|
|
977
994
|
// lib/platformConfig.ts
|
|
978
|
-
import { z as
|
|
979
|
-
var platformConfig =
|
|
995
|
+
import { z as z61 } from "zod";
|
|
996
|
+
var platformConfig = z61.object({
|
|
980
997
|
partsEngine: partsEngine.optional(),
|
|
981
998
|
autorouter: autorouterProp.optional(),
|
|
982
|
-
registryApiUrl:
|
|
983
|
-
cloudAutorouterUrl:
|
|
999
|
+
registryApiUrl: z61.string().optional(),
|
|
1000
|
+
cloudAutorouterUrl: z61.string().optional()
|
|
984
1001
|
});
|
|
985
1002
|
expectTypesMatch(true);
|
|
986
1003
|
export {
|
|
@@ -1083,6 +1100,7 @@ export {
|
|
|
1083
1100
|
silkscreenTextProps,
|
|
1084
1101
|
smtPadProps,
|
|
1085
1102
|
solderPasteProps,
|
|
1103
|
+
stampboardProps,
|
|
1086
1104
|
subcircuitGroupProps,
|
|
1087
1105
|
subcircuitGroupPropsWithBool,
|
|
1088
1106
|
subcircuitProps,
|