@tscircuit/props 0.0.195 → 0.0.196
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 +114 -83
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,15 +23,16 @@ resistorProps.parse({ resistance: "10k" } as ResistorPropsInput)
|
|
|
23
23
|
| `<board />` | [`BoardProps`](#boardprops-board) |
|
|
24
24
|
| `<capacitor />` | [`CapacitorProps`](#capacitorprops-capacitor) |
|
|
25
25
|
| `<chip />` | [`ChipProps`](#chipprops-chip) |
|
|
26
|
+
| `<connector />` | [`ConnectorProps`](#connectorprops-connector) |
|
|
26
27
|
| `<constrainedlayout />` | [`ConstrainedLayoutProps`](#constrainedlayoutprops-constrainedlayout) |
|
|
27
|
-
| `<cutout />` | [`CutoutProps`](#cutoutprops-cutout) |
|
|
28
28
|
| `<crystal />` | [`CrystalProps`](#crystalprops-crystal) |
|
|
29
|
+
| `<cutout />` | [`RectCutoutProps`](#rectcutoutprops-cutout) |
|
|
29
30
|
| `<diode />` | [`DiodeProps`](#diodeprops-diode) |
|
|
30
31
|
| `<footprint />` | [`FootprintProps`](#footprintprops-footprint) |
|
|
32
|
+
| `<fuse />` | [`FuseProps`](#fuseprops-fuse) |
|
|
31
33
|
| `<group />` | [`BaseGroupProps`](#basegroupprops-group) |
|
|
32
34
|
| `<hole />` | [`HoleProps`](#holeprops-hole) |
|
|
33
35
|
| `<jumper />` | [`JumperProps`](#jumperprops-jumper) |
|
|
34
|
-
| `<connector />` | [`ConnectorProps`](#connectorprops-connector) |
|
|
35
36
|
| `<mosfet />` | [`MosfetProps`](#mosfetprops-mosfet) |
|
|
36
37
|
| `<net />` | [`NetProps`](#netprops-net) |
|
|
37
38
|
| `<netalias />` | [`NetAliasProps`](#netaliasprops-netalias) |
|
|
@@ -177,6 +178,7 @@ export interface ChipPropsSU<PinLabel extends string = string>
|
|
|
177
178
|
schPinArrangement?: SchematicPortArrangement
|
|
178
179
|
/** @deprecated Use schPinArrangement instead. */
|
|
179
180
|
schPortArrangement?: SchematicPortArrangement
|
|
181
|
+
pinCompatibleVariants?: PinCompatibleVariant[]
|
|
180
182
|
schPinStyle?: SchematicPinStyle
|
|
181
183
|
schPinSpacing?: Distance
|
|
182
184
|
schWidth?: Distance
|
|
@@ -191,72 +193,44 @@ export interface ChipPropsSU<PinLabel extends string = string>
|
|
|
191
193
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/chip.ts)
|
|
192
194
|
|
|
193
195
|
|
|
194
|
-
###
|
|
196
|
+
### ConnectorProps `<connector />`
|
|
195
197
|
|
|
196
198
|
```ts
|
|
197
|
-
export interface
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
export interface ConnectorProps extends CommonComponentProps {
|
|
200
|
+
manufacturerPartNumber?: string
|
|
201
|
+
pinLabels?: Record<number | string, string | string[]>
|
|
202
|
+
schPinStyle?: SchematicPinStyle
|
|
203
|
+
schPinSpacing?: number | string
|
|
204
|
+
schWidth?: number | string
|
|
205
|
+
schHeight?: number | string
|
|
206
|
+
schDirection?: "left" | "right"
|
|
207
|
+
schPortArrangement?: SchematicPortArrangement
|
|
208
|
+
/**
|
|
209
|
+
* Groups of pins that are internally connected (bridged)
|
|
210
|
+
* e.g., [["1","2"], ["2","3"]]
|
|
211
|
+
*/
|
|
212
|
+
internallyConnectedPins?: string[][]
|
|
213
|
+
/**
|
|
214
|
+
* Connector standard, e.g. usb_c, m2
|
|
215
|
+
*/
|
|
216
|
+
standard?: "usb_c" | "m2"
|
|
201
217
|
}
|
|
202
218
|
```
|
|
203
219
|
|
|
204
|
-
[Source](https://github.com/tscircuit/props/blob/main/lib/components/
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
### CutoutProps `<cutout />`
|
|
220
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/connector.ts)
|
|
208
221
|
|
|
209
|
-
Defines a cutout on the PCB, removing board material. It can be a rectangle, circle, or polygon.
|
|
210
222
|
|
|
211
|
-
|
|
212
|
-
```ts
|
|
213
|
-
export interface RectCutoutProps
|
|
214
|
-
extends Omit<
|
|
215
|
-
PcbLayoutProps,
|
|
216
|
-
"layer" | "pcbRotation"
|
|
217
|
-
> {
|
|
218
|
-
name?: string;
|
|
219
|
-
shape: "rect";
|
|
220
|
-
width: Distance;
|
|
221
|
-
height: Distance;
|
|
222
|
-
}
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
**Circular Cutout**
|
|
226
|
-
```ts
|
|
227
|
-
export interface CircleCutoutProps
|
|
228
|
-
extends Omit<
|
|
229
|
-
PcbLayoutProps,
|
|
230
|
-
"layer" | "pcbRotation"
|
|
231
|
-
> {
|
|
232
|
-
name?: string;
|
|
233
|
-
shape: "circle";
|
|
234
|
-
radius: Distance;
|
|
235
|
-
}
|
|
236
|
-
```
|
|
223
|
+
### ConstrainedLayoutProps `<constrainedlayout />`
|
|
237
224
|
|
|
238
|
-
**Polygon Cutout**
|
|
239
225
|
```ts
|
|
240
|
-
export interface
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
> {
|
|
245
|
-
name?: string;
|
|
246
|
-
shape: "polygon";
|
|
247
|
-
points: Point[];
|
|
226
|
+
export interface ConstrainedLayoutProps {
|
|
227
|
+
name?: string
|
|
228
|
+
pcbOnly?: boolean
|
|
229
|
+
schOnly?: boolean
|
|
248
230
|
}
|
|
249
231
|
```
|
|
250
232
|
|
|
251
|
-
|
|
252
|
-
```ts
|
|
253
|
-
export type CutoutProps =
|
|
254
|
-
| RectCutoutProps
|
|
255
|
-
| CircleCutoutProps
|
|
256
|
-
| PolygonCutoutProps;
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
[Source](https://github.com/tscircuit/props/blob/main/lib/components/cutout.ts)
|
|
233
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/constrainedlayout.ts)
|
|
260
234
|
|
|
261
235
|
|
|
262
236
|
### CrystalProps `<crystal />`
|
|
@@ -272,6 +246,21 @@ export interface CrystalProps extends CommonComponentProps {
|
|
|
272
246
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/crystal.ts)
|
|
273
247
|
|
|
274
248
|
|
|
249
|
+
### RectCutoutProps `<cutout />`
|
|
250
|
+
|
|
251
|
+
```ts
|
|
252
|
+
export interface RectCutoutProps
|
|
253
|
+
extends Omit<PcbLayoutProps, "layer" | "pcbRotation"> {
|
|
254
|
+
name?: string
|
|
255
|
+
shape: "rect"
|
|
256
|
+
width: Distance
|
|
257
|
+
height: Distance
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/cutout.ts)
|
|
262
|
+
|
|
263
|
+
|
|
275
264
|
### DiodeProps `<diode />`
|
|
276
265
|
|
|
277
266
|
```ts
|
|
@@ -317,6 +306,35 @@ export interface FootprintProps {
|
|
|
317
306
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/footprint.ts)
|
|
318
307
|
|
|
319
308
|
|
|
309
|
+
### FuseProps `<fuse />`
|
|
310
|
+
|
|
311
|
+
```ts
|
|
312
|
+
export interface FuseProps extends CommonComponentProps {
|
|
313
|
+
/**
|
|
314
|
+
* Current rating of the fuse in amperes
|
|
315
|
+
*/
|
|
316
|
+
currentRating: number | string
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Voltage rating of the fuse
|
|
320
|
+
*/
|
|
321
|
+
voltageRating?: number | string
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Whether to show ratings on schematic
|
|
325
|
+
*/
|
|
326
|
+
schShowRatings?: boolean
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Connections to other components
|
|
330
|
+
*/
|
|
331
|
+
connections?: Connections<FusePinLabels>
|
|
332
|
+
}
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/fuse.ts)
|
|
336
|
+
|
|
337
|
+
|
|
320
338
|
### BaseGroupProps
|
|
321
339
|
|
|
322
340
|
```ts
|
|
@@ -378,33 +396,6 @@ export interface JumperProps extends CommonComponentProps {
|
|
|
378
396
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/jumper.ts)
|
|
379
397
|
|
|
380
398
|
|
|
381
|
-
### ConnectorProps `<connector />`
|
|
382
|
-
|
|
383
|
-
```ts
|
|
384
|
-
export interface ConnectorProps extends CommonComponentProps {
|
|
385
|
-
manufacturerPartNumber?: string
|
|
386
|
-
pinLabels?: Record<number | string, string | string[]>
|
|
387
|
-
schPinStyle?: SchematicPinStyle
|
|
388
|
-
schPinSpacing?: number | string
|
|
389
|
-
schWidth?: number | string
|
|
390
|
-
schHeight?: number | string
|
|
391
|
-
schDirection?: "left" | "right"
|
|
392
|
-
schPortArrangement?: SchematicPortArrangement
|
|
393
|
-
/**
|
|
394
|
-
* Groups of pins that are internally connected (bridged)
|
|
395
|
-
* e.g., [["1","2"], ["2","3"]]
|
|
396
|
-
*/
|
|
397
|
-
internallyConnectedPins?: string[][]
|
|
398
|
-
/**
|
|
399
|
-
* Connector standard, e.g. usb_c, m2
|
|
400
|
-
*/
|
|
401
|
-
standard?: "usb_c" | "m2"
|
|
402
|
-
}
|
|
403
|
-
```
|
|
404
|
-
|
|
405
|
-
[Source](https://github.com/tscircuit/props/blob/main/lib/components/connector.ts)
|
|
406
|
-
|
|
407
|
-
|
|
408
399
|
### MosfetProps `<mosfet />`
|
|
409
400
|
|
|
410
401
|
```ts
|
|
@@ -496,6 +487,11 @@ export interface PinHeaderProps extends CommonComponentProps {
|
|
|
496
487
|
* Direction the header is facing
|
|
497
488
|
*/
|
|
498
489
|
facingDirection?: "left" | "right"
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Pin arrangement in schematic view
|
|
493
|
+
*/
|
|
494
|
+
schPinArrangement?: SchematicPinArrangement
|
|
499
495
|
}
|
|
500
496
|
```
|
|
501
497
|
|
|
@@ -634,3 +630,38 @@ export interface TransistorProps extends CommonComponentProps {
|
|
|
634
630
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/transistor.ts)
|
|
635
631
|
|
|
636
632
|
<!-- INTERFACE_DEFINITIONS_END -->
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
<!-- PLATFORM_CONFIG_START -->
|
|
636
|
+
## tscircuit Platform Configuration
|
|
637
|
+
|
|
638
|
+
### PlatformConfig
|
|
639
|
+
|
|
640
|
+
```ts
|
|
641
|
+
export interface PlatformConfig {
|
|
642
|
+
partsEngine?: PartsEngine
|
|
643
|
+
|
|
644
|
+
autorouter?: AutorouterProp
|
|
645
|
+
|
|
646
|
+
// TODO this follows a subset of the localStorage interface
|
|
647
|
+
localCacheEngine?: any
|
|
648
|
+
|
|
649
|
+
registryApiUrl?: string
|
|
650
|
+
|
|
651
|
+
cloudAutorouterUrl?: string
|
|
652
|
+
|
|
653
|
+
footprintLibraryMap?: Record<
|
|
654
|
+
string,
|
|
655
|
+
Record<
|
|
656
|
+
string,
|
|
657
|
+
| any[]
|
|
658
|
+
| ((path: string) => Promise<{
|
|
659
|
+
footprintCircuitJson: any[]
|
|
660
|
+
}>)
|
|
661
|
+
>
|
|
662
|
+
>
|
|
663
|
+
}
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/platformConfig.ts)
|
|
667
|
+
<!-- PLATFORM_CONFIG_END -->
|