@tscircuit/props 0.0.245 → 0.0.247
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 +22 -12
- package/dist/index.d.ts +103 -13
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/lib/common/layout.ts +6 -1
- package/lib/components/battery.ts +3 -1
- package/lib/components/capacitor.ts +2 -1
- package/lib/components/chip.ts +1 -1
- package/lib/components/crystal.ts +3 -1
- package/lib/components/diode.ts +3 -1
- package/lib/components/fuse.ts +3 -2
- package/lib/components/inductor.ts +3 -1
- package/lib/components/mosfet.ts +3 -1
- package/lib/components/net.ts +2 -0
- package/lib/components/resistor.ts +2 -1
- package/lib/components/transistor.ts +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -132,7 +132,8 @@ export interface SubcircuitGroupProps extends BaseGroupProps {
|
|
|
132
132
|
### BatteryProps `<battery />`
|
|
133
133
|
|
|
134
134
|
```ts
|
|
135
|
-
export interface BatteryProps extends
|
|
135
|
+
export interface BatteryProps<PinLabel extends string = string>
|
|
136
|
+
extends CommonComponentProps<PinLabel> {
|
|
136
137
|
capacity?: number | string
|
|
137
138
|
schOrientation?: SchematicOrientation
|
|
138
139
|
}
|
|
@@ -188,7 +189,8 @@ export interface BreakoutPointProps
|
|
|
188
189
|
### CapacitorProps `<capacitor />`
|
|
189
190
|
|
|
190
191
|
```ts
|
|
191
|
-
export interface CapacitorProps extends
|
|
192
|
+
export interface CapacitorProps<PinLabel extends string = string>
|
|
193
|
+
extends CommonComponentProps<PinLabel> {
|
|
192
194
|
capacitance: number | string
|
|
193
195
|
maxVoltageRating?: number | string
|
|
194
196
|
schShowRatings?: boolean
|
|
@@ -210,7 +212,7 @@ export interface CapacitorProps extends CommonComponentProps {
|
|
|
210
212
|
|
|
211
213
|
```ts
|
|
212
214
|
export interface ChipPropsSU<PinLabel extends string = string>
|
|
213
|
-
extends CommonComponentProps {
|
|
215
|
+
extends CommonComponentProps<PinLabel> {
|
|
214
216
|
manufacturerPartNumber?: string
|
|
215
217
|
pinLabels?: PinLabelsProp<string, PinLabel>
|
|
216
218
|
/**
|
|
@@ -278,7 +280,8 @@ export interface ConstrainedLayoutProps {
|
|
|
278
280
|
### CrystalProps `<crystal />`
|
|
279
281
|
|
|
280
282
|
```ts
|
|
281
|
-
export interface CrystalProps extends
|
|
283
|
+
export interface CrystalProps<PinLabel extends string = string>
|
|
284
|
+
extends CommonComponentProps<PinLabel> {
|
|
282
285
|
frequency: number | string
|
|
283
286
|
loadCapacitance: number | string
|
|
284
287
|
pinVariant?: PinVariant
|
|
@@ -307,7 +310,8 @@ export interface RectCutoutProps
|
|
|
307
310
|
### DiodeProps `<diode />`
|
|
308
311
|
|
|
309
312
|
```ts
|
|
310
|
-
export interface DiodeProps extends
|
|
313
|
+
export interface DiodeProps<PinLabel extends string = string>
|
|
314
|
+
extends CommonComponentProps<PinLabel> {
|
|
311
315
|
connections?: {
|
|
312
316
|
anode?: string | string[] | readonly string[]
|
|
313
317
|
cathode?: string | string[] | readonly string[]
|
|
@@ -353,7 +357,8 @@ export interface FootprintProps {
|
|
|
353
357
|
### FuseProps `<fuse />`
|
|
354
358
|
|
|
355
359
|
```ts
|
|
356
|
-
export interface FuseProps extends
|
|
360
|
+
export interface FuseProps<PinLabel extends string = string>
|
|
361
|
+
extends CommonComponentProps<PinLabel> {
|
|
357
362
|
/**
|
|
358
363
|
* Current rating of the fuse in amperes
|
|
359
364
|
*/
|
|
@@ -374,7 +379,7 @@ export interface FuseProps extends CommonComponentProps {
|
|
|
374
379
|
/**
|
|
375
380
|
* Connections to other components
|
|
376
381
|
*/
|
|
377
|
-
connections?: Connections<
|
|
382
|
+
connections?: Connections<PinLabel>
|
|
378
383
|
}
|
|
379
384
|
```
|
|
380
385
|
|
|
@@ -430,7 +435,8 @@ export interface HoleProps extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
|
430
435
|
### InductorProps `<inductor />`
|
|
431
436
|
|
|
432
437
|
```ts
|
|
433
|
-
export interface InductorProps extends
|
|
438
|
+
export interface InductorProps<PinLabel extends string = string>
|
|
439
|
+
extends CommonComponentProps<PinLabel> {
|
|
434
440
|
inductance: number | string
|
|
435
441
|
maxCurrentRating?: number | string
|
|
436
442
|
schOrientation?: SchematicOrientation
|
|
@@ -474,7 +480,8 @@ export interface JumperProps extends CommonComponentProps {
|
|
|
474
480
|
### MosfetProps `<mosfet />`
|
|
475
481
|
|
|
476
482
|
```ts
|
|
477
|
-
export interface MosfetProps extends
|
|
483
|
+
export interface MosfetProps<PinLabel extends string = string>
|
|
484
|
+
extends CommonComponentProps<PinLabel> {
|
|
478
485
|
channelType: "n" | "p"
|
|
479
486
|
mosfetMode: "enhancement" | "depletion"
|
|
480
487
|
}
|
|
@@ -488,6 +495,7 @@ export interface MosfetProps extends CommonComponentProps {
|
|
|
488
495
|
```ts
|
|
489
496
|
export interface NetProps {
|
|
490
497
|
name: string
|
|
498
|
+
connectsTo?: string | string[]
|
|
491
499
|
}
|
|
492
500
|
```
|
|
493
501
|
|
|
@@ -648,7 +656,8 @@ export interface PotentiometerProps extends CommonComponentProps {
|
|
|
648
656
|
### ResistorProps `<resistor />`
|
|
649
657
|
|
|
650
658
|
```ts
|
|
651
|
-
export interface ResistorProps extends
|
|
659
|
+
export interface ResistorProps<PinLabel extends string = string>
|
|
660
|
+
extends CommonComponentProps<PinLabel> {
|
|
652
661
|
resistance: number | string
|
|
653
662
|
pullupFor?: string
|
|
654
663
|
pullupTo?: string
|
|
@@ -699,7 +708,7 @@ export interface SolderJumperProps extends JumperProps {
|
|
|
699
708
|
*/
|
|
700
709
|
bridgedPins?: string[][]
|
|
701
710
|
/**
|
|
702
|
-
* If true, all pins are
|
|
711
|
+
* If true, all pins are connected with cuttable traces
|
|
703
712
|
*/
|
|
704
713
|
bridged?: boolean
|
|
705
714
|
}
|
|
@@ -795,7 +804,8 @@ export interface TestpointProps extends CommonComponentProps {
|
|
|
795
804
|
### TransistorProps `<transistor />`
|
|
796
805
|
|
|
797
806
|
```ts
|
|
798
|
-
export interface TransistorProps extends
|
|
807
|
+
export interface TransistorProps<PinLabel extends string = string>
|
|
808
|
+
extends CommonComponentProps<PinLabel> {
|
|
799
809
|
type: "npn" | "pnp" | "bjt" | "jfet" | "mosfet" | "igbt"
|
|
800
810
|
}
|
|
801
811
|
```
|