@tscircuit/props 0.0.239 → 0.0.241
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 +27 -0
- package/dist/index.d.ts +83 -4
- package/dist/index.js +86 -72
- package/dist/index.js.map +1 -1
- package/lib/components/platedhole.ts +10 -0
- package/lib/components/smtpad.ts +10 -0
- package/lib/components/via.ts +17 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,6 +52,7 @@ resistorProps.parse({ resistance: "10k" } as ResistorPropsInput)
|
|
|
52
52
|
| `<switch />` | [`SwitchProps`](#switchprops-switch) |
|
|
53
53
|
| `<testpoint />` | [`TestpointProps`](#testpointprops-testpoint) |
|
|
54
54
|
| `<transistor />` | [`TransistorProps`](#transistorprops-transistor) |
|
|
55
|
+
| `<via />` | [`ViaProps`](#viaprops-via) |
|
|
55
56
|
<!-- COMPONENT_TABLE_END -->
|
|
56
57
|
|
|
57
58
|
<!-- USAGE_EXAMPLES_START -->
|
|
@@ -133,6 +134,7 @@ export interface SubcircuitGroupProps extends BaseGroupProps {
|
|
|
133
134
|
```ts
|
|
134
135
|
export interface BatteryProps extends CommonComponentProps {
|
|
135
136
|
capacity?: number | string
|
|
137
|
+
schOrientation?: SchematicOrientation
|
|
136
138
|
}
|
|
137
139
|
```
|
|
138
140
|
|
|
@@ -196,6 +198,7 @@ export interface CapacitorProps extends CommonComponentProps {
|
|
|
196
198
|
bypassFor?: string
|
|
197
199
|
bypassTo?: string
|
|
198
200
|
maxDecouplingTraceLength?: number
|
|
201
|
+
schOrientation?: SchematicOrientation
|
|
199
202
|
connections?: Connections<CapacitorPinLabels>
|
|
200
203
|
}
|
|
201
204
|
```
|
|
@@ -279,6 +282,7 @@ export interface CrystalProps extends CommonComponentProps {
|
|
|
279
282
|
frequency: number | string
|
|
280
283
|
loadCapacitance: number | string
|
|
281
284
|
pinVariant?: PinVariant
|
|
285
|
+
schOrientation?: SchematicOrientation
|
|
282
286
|
}
|
|
283
287
|
```
|
|
284
288
|
|
|
@@ -318,6 +322,7 @@ export interface DiodeProps extends CommonComponentProps {
|
|
|
318
322
|
zener?: boolean
|
|
319
323
|
photo?: boolean
|
|
320
324
|
tvs?: boolean
|
|
325
|
+
schOrientation?: SchematicOrientation
|
|
321
326
|
}
|
|
322
327
|
```
|
|
323
328
|
|
|
@@ -364,6 +369,8 @@ export interface FuseProps extends CommonComponentProps {
|
|
|
364
369
|
*/
|
|
365
370
|
schShowRatings?: boolean
|
|
366
371
|
|
|
372
|
+
schOrientation?: SchematicOrientation
|
|
373
|
+
|
|
367
374
|
/**
|
|
368
375
|
* Connections to other components
|
|
369
376
|
*/
|
|
@@ -421,6 +428,7 @@ export interface HoleProps extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
|
421
428
|
export interface InductorProps extends CommonComponentProps {
|
|
422
429
|
inductance: number | string
|
|
423
430
|
maxCurrentRating?: number | string
|
|
431
|
+
schOrientation?: SchematicOrientation
|
|
424
432
|
}
|
|
425
433
|
```
|
|
426
434
|
|
|
@@ -609,6 +617,7 @@ export interface PinHeaderProps extends CommonComponentProps {
|
|
|
609
617
|
export interface CirclePlatedHoleProps
|
|
610
618
|
extends Omit<PcbLayoutProps, "pcbRotation" | "layer"> {
|
|
611
619
|
name?: string
|
|
620
|
+
connectsTo?: string | string[]
|
|
612
621
|
shape: "circle"
|
|
613
622
|
holeDiameter: number | string
|
|
614
623
|
outerDiameter: number | string
|
|
@@ -640,6 +649,7 @@ export interface ResistorProps extends CommonComponentProps {
|
|
|
640
649
|
pullupTo?: string
|
|
641
650
|
pulldownFor?: string
|
|
642
651
|
pulldownTo?: string
|
|
652
|
+
schOrientation?: SchematicOrientation
|
|
643
653
|
connections?: Connections<ResistorPinLabels>
|
|
644
654
|
}
|
|
645
655
|
```
|
|
@@ -664,6 +674,7 @@ export interface ResonatorProps extends CommonComponentProps {
|
|
|
664
674
|
|
|
665
675
|
```ts
|
|
666
676
|
export interface RectSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
677
|
+
name?: string
|
|
667
678
|
shape: "rect"
|
|
668
679
|
width: Distance
|
|
669
680
|
height: Distance
|
|
@@ -782,6 +793,22 @@ export interface TransistorProps extends CommonComponentProps {
|
|
|
782
793
|
|
|
783
794
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/transistor.ts)
|
|
784
795
|
|
|
796
|
+
|
|
797
|
+
### ViaProps `<via />`
|
|
798
|
+
|
|
799
|
+
```ts
|
|
800
|
+
export interface ViaProps extends CommonLayoutProps {
|
|
801
|
+
name?: string
|
|
802
|
+
fromLayer: LayerRefInput
|
|
803
|
+
toLayer: LayerRefInput
|
|
804
|
+
holeDiameter: number | string
|
|
805
|
+
outerDiameter: number | string
|
|
806
|
+
connectsTo?: string | string[]
|
|
807
|
+
}
|
|
808
|
+
```
|
|
809
|
+
|
|
810
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/via.ts)
|
|
811
|
+
|
|
785
812
|
<!-- INTERFACE_DEFINITIONS_END -->
|
|
786
813
|
|
|
787
814
|
|