@tscircuit/props 0.0.254 → 0.0.256
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 +345 -300
- package/dist/index.d.ts +579 -564
- package/dist/index.js +9 -12
- package/dist/index.js.map +1 -1
- package/lib/components/chip.ts +5 -0
- package/lib/components/jumper.ts +5 -0
- package/lib/components/pin-header.ts +6 -0
- package/package.json +1 -3
package/README.md
CHANGED
|
@@ -15,318 +15,331 @@ resistorProps.parse({ resistance: "10k" } as ResistorPropsInput);
|
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
<!-- COMPONENT_TABLE_START -->
|
|
18
|
-
|
|
19
18
|
## Available Components
|
|
20
19
|
|
|
21
|
-
| Component
|
|
22
|
-
|
|
|
23
|
-
| `<battery />`
|
|
24
|
-
| `<board />`
|
|
25
|
-
| `<breakout />`
|
|
26
|
-
| `<breakoutpoint />`
|
|
27
|
-
| `<capacitor />`
|
|
28
|
-
| `<chip />`
|
|
29
|
-
| `<connector />`
|
|
20
|
+
| Component | Props Interface |
|
|
21
|
+
| --------- | -------------- |
|
|
22
|
+
| `<battery />` | [`BatteryProps`](#batteryprops-battery) |
|
|
23
|
+
| `<board />` | [`BoardProps`](#boardprops-board) |
|
|
24
|
+
| `<breakout />` | [`BreakoutProps`](#breakoutprops-breakout) |
|
|
25
|
+
| `<breakoutpoint />` | [`BreakoutPointProps`](#breakoutpointprops-breakoutpoint) |
|
|
26
|
+
| `<capacitor />` | [`CapacitorProps`](#capacitorprops-capacitor) |
|
|
27
|
+
| `<chip />` | [`ChipProps`](#chipprops-chip) |
|
|
28
|
+
| `<connector />` | [`ConnectorProps`](#connectorprops-connector) |
|
|
30
29
|
| `<constrainedlayout />` | [`ConstrainedLayoutProps`](#constrainedlayoutprops-constrainedlayout) |
|
|
31
|
-
| `<crystal />`
|
|
32
|
-
| `<cutout />`
|
|
33
|
-
| `<diode />`
|
|
34
|
-
| `<footprint />`
|
|
35
|
-
| `<fuse />`
|
|
36
|
-
| `<group />`
|
|
37
|
-
| `<hole />`
|
|
38
|
-
| `<inductor />`
|
|
39
|
-
| `<jumper />`
|
|
40
|
-
| `<mosfet />`
|
|
41
|
-
| `<net />`
|
|
42
|
-
| `<netalias />`
|
|
43
|
-
| `<netlabel />`
|
|
44
|
-
| `<pinheader />`
|
|
45
|
-
| `<platedhole />`
|
|
46
|
-
| `<potentiometer />`
|
|
47
|
-
| `<resistor />`
|
|
48
|
-
| `<resonator />`
|
|
49
|
-
| `<schematiccell />`
|
|
50
|
-
| `<schematicrow />`
|
|
51
|
-
| `<schematictable />`
|
|
52
|
-
| `<smtpad />`
|
|
53
|
-
| `<solderjumper />`
|
|
54
|
-
| `<solderpaste />`
|
|
55
|
-
| `<stampboard />`
|
|
56
|
-
| `<switch />`
|
|
57
|
-
| `<testpoint />`
|
|
58
|
-
| `<transistor />`
|
|
59
|
-
| `<via />`
|
|
60
|
-
|
|
30
|
+
| `<crystal />` | [`CrystalProps`](#crystalprops-crystal) |
|
|
31
|
+
| `<cutout />` | [`RectCutoutProps`](#rectcutoutprops-cutout) |
|
|
32
|
+
| `<diode />` | [`DiodeProps`](#diodeprops-diode) |
|
|
33
|
+
| `<footprint />` | [`FootprintProps`](#footprintprops-footprint) |
|
|
34
|
+
| `<fuse />` | [`FuseProps`](#fuseprops-fuse) |
|
|
35
|
+
| `<group />` | [`BaseGroupProps`](#basegroupprops-group) |
|
|
36
|
+
| `<hole />` | [`HoleProps`](#holeprops-hole) |
|
|
37
|
+
| `<inductor />` | [`InductorProps`](#inductorprops-inductor) |
|
|
38
|
+
| `<jumper />` | [`JumperProps`](#jumperprops-jumper) |
|
|
39
|
+
| `<mosfet />` | [`MosfetProps`](#mosfetprops-mosfet) |
|
|
40
|
+
| `<net />` | [`NetProps`](#netprops-net) |
|
|
41
|
+
| `<netalias />` | [`NetAliasProps`](#netaliasprops-netalias) |
|
|
42
|
+
| `<netlabel />` | [`NetLabelProps`](#netlabelprops-netlabel) |
|
|
43
|
+
| `<pinheader />` | [`PinHeaderProps`](#pinheaderprops-pinheader) |
|
|
44
|
+
| `<platedhole />` | [`CirclePlatedHoleProps`](#circleplatedholeprops-platedhole) |
|
|
45
|
+
| `<potentiometer />` | [`PotentiometerProps`](#potentiometerprops-potentiometer) |
|
|
46
|
+
| `<resistor />` | [`ResistorProps`](#resistorprops-resistor) |
|
|
47
|
+
| `<resonator />` | [`ResonatorProps`](#resonatorprops-resonator) |
|
|
48
|
+
| `<schematiccell />` | [`SchematicCellProps`](#schematiccellprops-schematiccell) |
|
|
49
|
+
| `<schematicrow />` | [`SchematicRowProps`](#schematicrowprops-schematicrow) |
|
|
50
|
+
| `<schematictable />` | [`SchematicTableProps`](#schematictableprops-schematictable) |
|
|
51
|
+
| `<smtpad />` | [`RectSmtPadProps`](#rectsmtpadprops-smtpad) |
|
|
52
|
+
| `<solderjumper />` | [`SolderJumperProps`](#solderjumperprops-solderjumper) |
|
|
53
|
+
| `<solderpaste />` | [`RectSolderPasteProps`](#rectsolderpasteprops-solderpaste) |
|
|
54
|
+
| `<stampboard />` | [`StampboardProps`](#stampboardprops-stampboard) |
|
|
55
|
+
| `<switch />` | [`SwitchProps`](#switchprops-switch) |
|
|
56
|
+
| `<testpoint />` | [`TestpointProps`](#testpointprops-testpoint) |
|
|
57
|
+
| `<transistor />` | [`TransistorProps`](#transistorprops-transistor) |
|
|
58
|
+
| `<via />` | [`ViaProps`](#viaprops-via) |
|
|
61
59
|
<!-- COMPONENT_TABLE_END -->
|
|
62
60
|
|
|
63
61
|
<!-- USAGE_EXAMPLES_START -->
|
|
64
|
-
|
|
65
62
|
## Usage Examples
|
|
66
63
|
|
|
67
64
|
```tsx
|
|
68
|
-
import { resistorProps, type ResistorProps } from "@tscircuit/props"
|
|
65
|
+
import { resistorProps, type ResistorProps } from "@tscircuit/props"
|
|
69
66
|
|
|
70
67
|
// Validate component props
|
|
71
|
-
const validatedProps = resistorProps.parse({ resistance: "10k" })
|
|
68
|
+
const validatedProps = resistorProps.parse({ resistance: "10k" })
|
|
72
69
|
// { resistance: 10000 }
|
|
73
70
|
|
|
74
71
|
// Type safety
|
|
75
72
|
const myResistor: ResistorProps = {
|
|
76
73
|
name: "R1",
|
|
77
74
|
resistance: 10000,
|
|
78
|
-
footprint: "0805"
|
|
79
|
-
}
|
|
75
|
+
footprint: "0805"
|
|
76
|
+
}
|
|
80
77
|
```
|
|
81
|
-
|
|
82
78
|
<!-- USAGE_EXAMPLES_END -->
|
|
83
79
|
|
|
84
80
|
<!-- INTERFACE_DEFINITIONS_START -->
|
|
85
|
-
|
|
86
81
|
## Component Interface Definitions
|
|
87
82
|
|
|
88
83
|
Below are the TypeScript interface definitions for all component props:
|
|
89
84
|
|
|
85
|
+
|
|
90
86
|
### CommonComponentProps
|
|
91
87
|
|
|
92
88
|
```ts
|
|
93
89
|
export interface CommonComponentProps extends CommonLayoutProps {
|
|
94
|
-
key?: any
|
|
95
|
-
name: string
|
|
96
|
-
supplierPartNumbers?: SupplierPartNumbers
|
|
97
|
-
cadModel?: CadModelProp
|
|
98
|
-
children?: any
|
|
99
|
-
symbolName?: string
|
|
100
|
-
doNotPlace?: boolean
|
|
90
|
+
key?: any
|
|
91
|
+
name: string
|
|
92
|
+
supplierPartNumbers?: SupplierPartNumbers
|
|
93
|
+
cadModel?: CadModelProp
|
|
94
|
+
children?: any
|
|
95
|
+
symbolName?: string
|
|
96
|
+
doNotPlace?: boolean
|
|
101
97
|
}
|
|
102
98
|
```
|
|
103
99
|
|
|
104
100
|
[Source](https://github.com/tscircuit/props/blob/main/lib/common/layout.ts)
|
|
105
101
|
|
|
102
|
+
|
|
106
103
|
### SubcircuitGroupProps
|
|
107
104
|
|
|
108
105
|
```ts
|
|
109
106
|
export interface SubcircuitGroupProps extends BaseGroupProps {
|
|
110
|
-
layout?: LayoutBuilder
|
|
111
|
-
manualEdits?: ManualEditsFileInput
|
|
112
|
-
routingDisabled?: boolean
|
|
113
|
-
defaultTraceWidth?: Distance
|
|
114
|
-
minTraceWidth?: Distance
|
|
115
|
-
pcbRouteCache?: PcbRouteCache
|
|
107
|
+
layout?: LayoutBuilder
|
|
108
|
+
manualEdits?: ManualEditsFileInput
|
|
109
|
+
routingDisabled?: boolean
|
|
110
|
+
defaultTraceWidth?: Distance
|
|
111
|
+
minTraceWidth?: Distance
|
|
112
|
+
pcbRouteCache?: PcbRouteCache
|
|
116
113
|
|
|
117
|
-
autorouter?: AutorouterProp
|
|
114
|
+
autorouter?: AutorouterProp
|
|
118
115
|
|
|
119
116
|
/**
|
|
120
117
|
* If true, we'll automatically layout the schematic for this group. Must be
|
|
121
118
|
* a subcircuit (currently). This is eventually going to be replaced with more
|
|
122
119
|
* sophisticated layout options/modes and will be enabled by default.
|
|
123
120
|
*/
|
|
124
|
-
schAutoLayoutEnabled?: boolean
|
|
121
|
+
schAutoLayoutEnabled?: boolean
|
|
125
122
|
|
|
126
123
|
/**
|
|
127
124
|
* If true, net labels will automatically be created for complex traces
|
|
128
125
|
*/
|
|
129
|
-
schTraceAutoLabelEnabled?: boolean
|
|
126
|
+
schTraceAutoLabelEnabled?: boolean
|
|
130
127
|
|
|
131
|
-
partsEngine?: PartsEngine
|
|
128
|
+
partsEngine?: PartsEngine
|
|
132
129
|
}
|
|
133
130
|
```
|
|
134
131
|
|
|
135
132
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/group.ts)
|
|
136
133
|
|
|
134
|
+
|
|
137
135
|
### BatteryProps `<battery />`
|
|
138
136
|
|
|
139
137
|
```ts
|
|
140
138
|
export interface BatteryProps<PinLabel extends string = string>
|
|
141
139
|
extends CommonComponentProps<PinLabel> {
|
|
142
|
-
capacity?: number | string
|
|
143
|
-
schOrientation?: SchematicOrientation
|
|
140
|
+
capacity?: number | string
|
|
141
|
+
schOrientation?: SchematicOrientation
|
|
144
142
|
}
|
|
145
143
|
```
|
|
146
144
|
|
|
147
145
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/battery.ts)
|
|
148
146
|
|
|
147
|
+
|
|
149
148
|
### BoardProps `<board />`
|
|
150
149
|
|
|
151
150
|
```ts
|
|
152
151
|
export interface BoardProps extends Omit<SubcircuitGroupProps, "subcircuit"> {
|
|
153
|
-
width?: number | string
|
|
154
|
-
height?: number | string
|
|
155
|
-
outline?: Point[]
|
|
156
|
-
outlineOffsetX?: number | string
|
|
157
|
-
outlineOffsetY?: number | string
|
|
158
|
-
material?: "fr4" | "fr1"
|
|
152
|
+
width?: number | string
|
|
153
|
+
height?: number | string
|
|
154
|
+
outline?: Point[]
|
|
155
|
+
outlineOffsetX?: number | string
|
|
156
|
+
outlineOffsetY?: number | string
|
|
157
|
+
material?: "fr4" | "fr1"
|
|
159
158
|
}
|
|
160
159
|
```
|
|
161
160
|
|
|
162
161
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/board.ts)
|
|
163
162
|
|
|
163
|
+
|
|
164
164
|
### BreakoutProps `<breakout />`
|
|
165
165
|
|
|
166
166
|
```ts
|
|
167
167
|
export interface BreakoutProps
|
|
168
168
|
extends Omit<SubcircuitGroupProps, "subcircuit"> {
|
|
169
|
-
padding?: Distance
|
|
170
|
-
paddingLeft?: Distance
|
|
171
|
-
paddingRight?: Distance
|
|
172
|
-
paddingTop?: Distance
|
|
173
|
-
paddingBottom?: Distance
|
|
169
|
+
padding?: Distance
|
|
170
|
+
paddingLeft?: Distance
|
|
171
|
+
paddingRight?: Distance
|
|
172
|
+
paddingTop?: Distance
|
|
173
|
+
paddingBottom?: Distance
|
|
174
174
|
}
|
|
175
175
|
```
|
|
176
176
|
|
|
177
177
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/breakout.ts)
|
|
178
178
|
|
|
179
|
+
|
|
179
180
|
### BreakoutPointProps `<breakoutpoint />`
|
|
180
181
|
|
|
181
182
|
```ts
|
|
182
183
|
export interface BreakoutPointProps
|
|
183
184
|
extends Omit<PcbLayoutProps, "pcbRotation" | "layer"> {
|
|
184
|
-
connection: string
|
|
185
|
+
connection: string
|
|
185
186
|
}
|
|
186
187
|
```
|
|
187
188
|
|
|
188
189
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/breakoutpoint.ts)
|
|
189
190
|
|
|
191
|
+
|
|
190
192
|
### CapacitorProps `<capacitor />`
|
|
191
193
|
|
|
192
194
|
```ts
|
|
193
195
|
export interface CapacitorProps<PinLabel extends string = string>
|
|
194
196
|
extends CommonComponentProps<PinLabel> {
|
|
195
|
-
capacitance: number | string
|
|
196
|
-
maxVoltageRating?: number | string
|
|
197
|
-
schShowRatings?: boolean
|
|
198
|
-
polarized?: boolean
|
|
199
|
-
decouplingFor?: string
|
|
200
|
-
decouplingTo?: string
|
|
201
|
-
bypassFor?: string
|
|
202
|
-
bypassTo?: string
|
|
203
|
-
maxDecouplingTraceLength?: number
|
|
204
|
-
schOrientation?: SchematicOrientation
|
|
205
|
-
connections?: Connections<CapacitorPinLabels
|
|
197
|
+
capacitance: number | string
|
|
198
|
+
maxVoltageRating?: number | string
|
|
199
|
+
schShowRatings?: boolean
|
|
200
|
+
polarized?: boolean
|
|
201
|
+
decouplingFor?: string
|
|
202
|
+
decouplingTo?: string
|
|
203
|
+
bypassFor?: string
|
|
204
|
+
bypassTo?: string
|
|
205
|
+
maxDecouplingTraceLength?: number
|
|
206
|
+
schOrientation?: SchematicOrientation
|
|
207
|
+
connections?: Connections<CapacitorPinLabels>
|
|
206
208
|
}
|
|
207
209
|
```
|
|
208
210
|
|
|
209
211
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/capacitor.ts)
|
|
210
212
|
|
|
213
|
+
|
|
211
214
|
### ChipProps `<chip />`
|
|
212
215
|
|
|
213
216
|
```ts
|
|
214
217
|
export interface ChipPropsSU<PinLabel extends string = string>
|
|
215
218
|
extends CommonComponentProps<PinLabel> {
|
|
216
|
-
manufacturerPartNumber?: string
|
|
217
|
-
pinLabels?: PinLabelsProp<string, PinLabel
|
|
219
|
+
manufacturerPartNumber?: string
|
|
220
|
+
pinLabels?: PinLabelsProp<string, PinLabel>
|
|
218
221
|
/**
|
|
219
222
|
* Whether to show pin aliases in the schematic
|
|
220
223
|
*/
|
|
221
|
-
showPinAliases?: boolean
|
|
222
|
-
|
|
224
|
+
showPinAliases?: boolean
|
|
225
|
+
/**
|
|
226
|
+
* Labels for PCB pins
|
|
227
|
+
*/
|
|
228
|
+
pcbPinLabels?: Record<string, string>
|
|
229
|
+
schPinArrangement?: SchematicPortArrangement
|
|
223
230
|
/** @deprecated Use schPinArrangement instead. */
|
|
224
|
-
schPortArrangement?: SchematicPortArrangement
|
|
225
|
-
pinCompatibleVariants?: PinCompatibleVariant[]
|
|
226
|
-
schPinStyle?: SchematicPinStyle
|
|
227
|
-
schPinSpacing?: Distance
|
|
228
|
-
schWidth?: Distance
|
|
229
|
-
schHeight?: Distance
|
|
230
|
-
noSchematicRepresentation?: boolean
|
|
231
|
-
internallyConnectedPins?: string[][]
|
|
232
|
-
externallyConnectedPins?: string[][]
|
|
233
|
-
connections?: Connections<PinLabel
|
|
231
|
+
schPortArrangement?: SchematicPortArrangement
|
|
232
|
+
pinCompatibleVariants?: PinCompatibleVariant[]
|
|
233
|
+
schPinStyle?: SchematicPinStyle
|
|
234
|
+
schPinSpacing?: Distance
|
|
235
|
+
schWidth?: Distance
|
|
236
|
+
schHeight?: Distance
|
|
237
|
+
noSchematicRepresentation?: boolean
|
|
238
|
+
internallyConnectedPins?: string[][]
|
|
239
|
+
externallyConnectedPins?: string[][]
|
|
240
|
+
connections?: Connections<PinLabel>
|
|
234
241
|
}
|
|
235
242
|
```
|
|
236
243
|
|
|
237
244
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/chip.ts)
|
|
238
245
|
|
|
246
|
+
|
|
239
247
|
### ConnectorProps `<connector />`
|
|
240
248
|
|
|
241
249
|
```ts
|
|
242
250
|
export interface ConnectorProps extends CommonComponentProps {
|
|
243
|
-
manufacturerPartNumber?: string
|
|
244
|
-
pinLabels?: Record<number | string, string | string[]
|
|
245
|
-
schPinStyle?: SchematicPinStyle
|
|
246
|
-
schPinSpacing?: number | string
|
|
247
|
-
schWidth?: number | string
|
|
248
|
-
schHeight?: number | string
|
|
249
|
-
schDirection?: "left" | "right"
|
|
250
|
-
schPortArrangement?: SchematicPortArrangement
|
|
251
|
+
manufacturerPartNumber?: string
|
|
252
|
+
pinLabels?: Record<number | string, string | string[]>
|
|
253
|
+
schPinStyle?: SchematicPinStyle
|
|
254
|
+
schPinSpacing?: number | string
|
|
255
|
+
schWidth?: number | string
|
|
256
|
+
schHeight?: number | string
|
|
257
|
+
schDirection?: "left" | "right"
|
|
258
|
+
schPortArrangement?: SchematicPortArrangement
|
|
251
259
|
/**
|
|
252
260
|
* Groups of pins that are internally connected
|
|
253
261
|
* e.g., [["1","2"], ["2","3"]]
|
|
254
262
|
*/
|
|
255
|
-
internallyConnectedPins?: string[][]
|
|
263
|
+
internallyConnectedPins?: string[][]
|
|
256
264
|
/**
|
|
257
265
|
* Connector standard, e.g. usb_c, m2
|
|
258
266
|
*/
|
|
259
|
-
standard?: "usb_c" | "m2"
|
|
267
|
+
standard?: "usb_c" | "m2"
|
|
260
268
|
}
|
|
261
269
|
```
|
|
262
270
|
|
|
263
271
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/connector.ts)
|
|
264
272
|
|
|
273
|
+
|
|
265
274
|
### ConstrainedLayoutProps `<constrainedlayout />`
|
|
266
275
|
|
|
267
276
|
```ts
|
|
268
277
|
export interface ConstrainedLayoutProps {
|
|
269
|
-
name?: string
|
|
270
|
-
pcbOnly?: boolean
|
|
271
|
-
schOnly?: boolean
|
|
278
|
+
name?: string
|
|
279
|
+
pcbOnly?: boolean
|
|
280
|
+
schOnly?: boolean
|
|
272
281
|
}
|
|
273
282
|
```
|
|
274
283
|
|
|
275
284
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/constrainedlayout.ts)
|
|
276
285
|
|
|
286
|
+
|
|
277
287
|
### CrystalProps `<crystal />`
|
|
278
288
|
|
|
279
289
|
```ts
|
|
280
290
|
export interface CrystalProps<PinLabel extends string = string>
|
|
281
291
|
extends CommonComponentProps<PinLabel> {
|
|
282
|
-
frequency: number | string
|
|
283
|
-
loadCapacitance: number | string
|
|
284
|
-
pinVariant?: PinVariant
|
|
285
|
-
schOrientation?: SchematicOrientation
|
|
292
|
+
frequency: number | string
|
|
293
|
+
loadCapacitance: number | string
|
|
294
|
+
pinVariant?: PinVariant
|
|
295
|
+
schOrientation?: SchematicOrientation
|
|
286
296
|
}
|
|
287
297
|
```
|
|
288
298
|
|
|
289
299
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/crystal.ts)
|
|
290
300
|
|
|
301
|
+
|
|
291
302
|
### RectCutoutProps `<cutout />`
|
|
292
303
|
|
|
293
304
|
```ts
|
|
294
305
|
export interface RectCutoutProps
|
|
295
306
|
extends Omit<PcbLayoutProps, "layer" | "pcbRotation"> {
|
|
296
|
-
name?: string
|
|
297
|
-
shape: "rect"
|
|
298
|
-
width: Distance
|
|
299
|
-
height: Distance
|
|
307
|
+
name?: string
|
|
308
|
+
shape: "rect"
|
|
309
|
+
width: Distance
|
|
310
|
+
height: Distance
|
|
300
311
|
}
|
|
301
312
|
```
|
|
302
313
|
|
|
303
314
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/cutout.ts)
|
|
304
315
|
|
|
316
|
+
|
|
305
317
|
### DiodeProps `<diode />`
|
|
306
318
|
|
|
307
319
|
```ts
|
|
308
320
|
export interface DiodeProps<PinLabel extends string = string>
|
|
309
321
|
extends CommonComponentProps<PinLabel> {
|
|
310
322
|
connections?: {
|
|
311
|
-
anode?: string | string[] | readonly string[]
|
|
312
|
-
cathode?: string | string[] | readonly string[]
|
|
313
|
-
pin1?: string | string[] | readonly string[]
|
|
314
|
-
pin2?: string | string[] | readonly string[]
|
|
315
|
-
pos?: string | string[] | readonly string[]
|
|
316
|
-
neg?: string | string[] | readonly string[]
|
|
317
|
-
}
|
|
318
|
-
variant?: "standard" | "schottky" | "zener" | "photo" | "tvs"
|
|
319
|
-
standard?: boolean
|
|
320
|
-
schottky?: boolean
|
|
321
|
-
zener?: boolean
|
|
322
|
-
photo?: boolean
|
|
323
|
-
tvs?: boolean
|
|
324
|
-
schOrientation?: SchematicOrientation
|
|
323
|
+
anode?: string | string[] | readonly string[]
|
|
324
|
+
cathode?: string | string[] | readonly string[]
|
|
325
|
+
pin1?: string | string[] | readonly string[]
|
|
326
|
+
pin2?: string | string[] | readonly string[]
|
|
327
|
+
pos?: string | string[] | readonly string[]
|
|
328
|
+
neg?: string | string[] | readonly string[]
|
|
329
|
+
}
|
|
330
|
+
variant?: "standard" | "schottky" | "zener" | "photo" | "tvs"
|
|
331
|
+
standard?: boolean
|
|
332
|
+
schottky?: boolean
|
|
333
|
+
zener?: boolean
|
|
334
|
+
photo?: boolean
|
|
335
|
+
tvs?: boolean
|
|
336
|
+
schOrientation?: SchematicOrientation
|
|
325
337
|
}
|
|
326
338
|
```
|
|
327
339
|
|
|
328
340
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/diode.ts)
|
|
329
341
|
|
|
342
|
+
|
|
330
343
|
### FootprintProps `<footprint />`
|
|
331
344
|
|
|
332
345
|
```ts
|
|
@@ -341,12 +354,13 @@ export interface FootprintProps {
|
|
|
341
354
|
* confusion because you have a complex multi-layer footprint. Default is
|
|
342
355
|
* "top" and this is most intuitive.
|
|
343
356
|
*/
|
|
344
|
-
originalLayer?: LayerRef
|
|
357
|
+
originalLayer?: LayerRef
|
|
345
358
|
}
|
|
346
359
|
```
|
|
347
360
|
|
|
348
361
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/footprint.ts)
|
|
349
362
|
|
|
363
|
+
|
|
350
364
|
### FuseProps `<fuse />`
|
|
351
365
|
|
|
352
366
|
```ts
|
|
@@ -355,170 +369,183 @@ export interface FuseProps<PinLabel extends string = string>
|
|
|
355
369
|
/**
|
|
356
370
|
* Current rating of the fuse in amperes
|
|
357
371
|
*/
|
|
358
|
-
currentRating: number | string
|
|
372
|
+
currentRating: number | string
|
|
359
373
|
|
|
360
374
|
/**
|
|
361
375
|
* Voltage rating of the fuse
|
|
362
376
|
*/
|
|
363
|
-
voltageRating?: number | string
|
|
377
|
+
voltageRating?: number | string
|
|
364
378
|
|
|
365
379
|
/**
|
|
366
380
|
* Whether to show ratings on schematic
|
|
367
381
|
*/
|
|
368
|
-
schShowRatings?: boolean
|
|
382
|
+
schShowRatings?: boolean
|
|
369
383
|
|
|
370
|
-
schOrientation?: SchematicOrientation
|
|
384
|
+
schOrientation?: SchematicOrientation
|
|
371
385
|
|
|
372
386
|
/**
|
|
373
387
|
* Connections to other components
|
|
374
388
|
*/
|
|
375
|
-
connections?: Connections<PinLabel
|
|
389
|
+
connections?: Connections<PinLabel>
|
|
376
390
|
}
|
|
377
391
|
```
|
|
378
392
|
|
|
379
393
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/fuse.ts)
|
|
380
394
|
|
|
395
|
+
|
|
381
396
|
### BaseGroupProps
|
|
382
397
|
|
|
383
398
|
```ts
|
|
384
399
|
export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
|
|
385
|
-
name?: string
|
|
386
|
-
key?: any
|
|
387
|
-
children?: any
|
|
400
|
+
name?: string
|
|
401
|
+
key?: any
|
|
402
|
+
children?: any
|
|
388
403
|
|
|
389
404
|
/**
|
|
390
405
|
* Title to display above this group in the schematic view
|
|
391
406
|
*/
|
|
392
|
-
schTitle?: string
|
|
407
|
+
schTitle?: string
|
|
393
408
|
|
|
394
|
-
pcbWidth?: Distance
|
|
395
|
-
pcbHeight?: Distance
|
|
396
|
-
schWidth?: Distance
|
|
397
|
-
schHeight?: Distance
|
|
409
|
+
pcbWidth?: Distance
|
|
410
|
+
pcbHeight?: Distance
|
|
411
|
+
schWidth?: Distance
|
|
412
|
+
schHeight?: Distance
|
|
398
413
|
|
|
399
|
-
pcbLayout?: LayoutConfig
|
|
400
|
-
schLayout?: LayoutConfig
|
|
401
|
-
cellBorder?: Border | null
|
|
402
|
-
border?: Border | null
|
|
403
|
-
schPadding?: Distance
|
|
404
|
-
schPaddingLeft?: Distance
|
|
405
|
-
schPaddingRight?: Distance
|
|
406
|
-
schPaddingTop?: Distance
|
|
407
|
-
schPaddingBottom?: Distance
|
|
414
|
+
pcbLayout?: LayoutConfig
|
|
415
|
+
schLayout?: LayoutConfig
|
|
416
|
+
cellBorder?: Border | null
|
|
417
|
+
border?: Border | null
|
|
418
|
+
schPadding?: Distance
|
|
419
|
+
schPaddingLeft?: Distance
|
|
420
|
+
schPaddingRight?: Distance
|
|
421
|
+
schPaddingTop?: Distance
|
|
422
|
+
schPaddingBottom?: Distance
|
|
408
423
|
}
|
|
409
424
|
```
|
|
410
425
|
|
|
411
426
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/group.ts)
|
|
412
427
|
|
|
428
|
+
|
|
413
429
|
### HoleProps `<hole />`
|
|
414
430
|
|
|
415
431
|
```ts
|
|
416
432
|
export interface HoleProps extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
417
|
-
name?: string
|
|
418
|
-
diameter?: Distance
|
|
419
|
-
radius?: Distance
|
|
433
|
+
name?: string
|
|
434
|
+
diameter?: Distance
|
|
435
|
+
radius?: Distance
|
|
420
436
|
}
|
|
421
437
|
```
|
|
422
438
|
|
|
423
439
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/hole.ts)
|
|
424
440
|
|
|
441
|
+
|
|
425
442
|
### InductorProps `<inductor />`
|
|
426
443
|
|
|
427
444
|
```ts
|
|
428
445
|
export interface InductorProps<PinLabel extends string = string>
|
|
429
446
|
extends CommonComponentProps<PinLabel> {
|
|
430
|
-
inductance: number | string
|
|
431
|
-
maxCurrentRating?: number | string
|
|
432
|
-
schOrientation?: SchematicOrientation
|
|
447
|
+
inductance: number | string
|
|
448
|
+
maxCurrentRating?: number | string
|
|
449
|
+
schOrientation?: SchematicOrientation
|
|
433
450
|
}
|
|
434
451
|
```
|
|
435
452
|
|
|
436
453
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/inductor.ts)
|
|
437
454
|
|
|
455
|
+
|
|
438
456
|
### JumperProps `<jumper />`
|
|
439
457
|
|
|
440
458
|
```ts
|
|
441
459
|
export interface JumperProps extends CommonComponentProps {
|
|
442
|
-
manufacturerPartNumber?: string
|
|
443
|
-
pinLabels?: Record<number | string, string | string[]
|
|
444
|
-
schPinStyle?: SchematicPinStyle
|
|
445
|
-
schPinSpacing?: number | string
|
|
446
|
-
schWidth?: number | string
|
|
447
|
-
schHeight?: number | string
|
|
448
|
-
schDirection?: "left" | "right"
|
|
449
|
-
schPortArrangement?: SchematicPortArrangement
|
|
460
|
+
manufacturerPartNumber?: string
|
|
461
|
+
pinLabels?: Record<number | string, string | string[]>
|
|
462
|
+
schPinStyle?: SchematicPinStyle
|
|
463
|
+
schPinSpacing?: number | string
|
|
464
|
+
schWidth?: number | string
|
|
465
|
+
schHeight?: number | string
|
|
466
|
+
schDirection?: "left" | "right"
|
|
467
|
+
schPortArrangement?: SchematicPortArrangement
|
|
468
|
+
/**
|
|
469
|
+
* Labels for PCB pins
|
|
470
|
+
*/
|
|
471
|
+
pcbPinLabels?: Record<string, string>
|
|
450
472
|
/**
|
|
451
473
|
* Number of pins on the jumper (2 or 3)
|
|
452
474
|
*/
|
|
453
|
-
pinCount?: 2 | 3
|
|
475
|
+
pinCount?: 2 | 3
|
|
454
476
|
/**
|
|
455
477
|
* Groups of pins that are internally connected
|
|
456
478
|
* e.g., [["1","2"], ["2","3"]]
|
|
457
479
|
*/
|
|
458
|
-
internallyConnectedPins?: string[][]
|
|
480
|
+
internallyConnectedPins?: string[][]
|
|
459
481
|
/**
|
|
460
482
|
* Connections to other components
|
|
461
483
|
*/
|
|
462
|
-
connections?: Connections<string
|
|
484
|
+
connections?: Connections<string>
|
|
463
485
|
}
|
|
464
486
|
```
|
|
465
487
|
|
|
466
488
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/jumper.ts)
|
|
467
489
|
|
|
490
|
+
|
|
468
491
|
### MosfetProps `<mosfet />`
|
|
469
492
|
|
|
470
493
|
```ts
|
|
471
494
|
export interface MosfetProps<PinLabel extends string = string>
|
|
472
495
|
extends CommonComponentProps<PinLabel> {
|
|
473
|
-
channelType: "n" | "p"
|
|
474
|
-
mosfetMode: "enhancement" | "depletion"
|
|
496
|
+
channelType: "n" | "p"
|
|
497
|
+
mosfetMode: "enhancement" | "depletion"
|
|
475
498
|
}
|
|
476
499
|
```
|
|
477
500
|
|
|
478
501
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/mosfet.ts)
|
|
479
502
|
|
|
503
|
+
|
|
480
504
|
### NetProps `<net />`
|
|
481
505
|
|
|
482
506
|
```ts
|
|
483
507
|
export interface NetProps {
|
|
484
|
-
name: string
|
|
485
|
-
connectsTo?: string | string[]
|
|
508
|
+
name: string
|
|
509
|
+
connectsTo?: string | string[]
|
|
486
510
|
}
|
|
487
511
|
```
|
|
488
512
|
|
|
489
513
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/net.ts)
|
|
490
514
|
|
|
515
|
+
|
|
491
516
|
### NetAliasProps `<netalias />`
|
|
492
517
|
|
|
493
518
|
```ts
|
|
494
519
|
export interface NetAliasProps {
|
|
495
|
-
net?: string
|
|
496
|
-
connection?: string
|
|
497
|
-
schX?: number | string
|
|
498
|
-
schY?: number | string
|
|
499
|
-
schRotation?: number | string
|
|
500
|
-
anchorSide?: "left" | "top" | "right" | "bottom"
|
|
520
|
+
net?: string
|
|
521
|
+
connection?: string
|
|
522
|
+
schX?: number | string
|
|
523
|
+
schY?: number | string
|
|
524
|
+
schRotation?: number | string
|
|
525
|
+
anchorSide?: "left" | "top" | "right" | "bottom"
|
|
501
526
|
}
|
|
502
527
|
```
|
|
503
528
|
|
|
504
529
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/netalias.ts)
|
|
505
530
|
|
|
531
|
+
|
|
506
532
|
### NetLabelProps `<netlabel />`
|
|
507
533
|
|
|
508
534
|
```ts
|
|
509
535
|
export interface NetLabelProps {
|
|
510
|
-
net?: string
|
|
511
|
-
connection?: string
|
|
512
|
-
connectsTo?: string | string[]
|
|
513
|
-
schX?: number | string
|
|
514
|
-
schY?: number | string
|
|
515
|
-
schRotation?: number | string
|
|
516
|
-
anchorSide?: "left" | "top" | "right" | "bottom"
|
|
536
|
+
net?: string
|
|
537
|
+
connection?: string
|
|
538
|
+
connectsTo?: string | string[]
|
|
539
|
+
schX?: number | string
|
|
540
|
+
schY?: number | string
|
|
541
|
+
schRotation?: number | string
|
|
542
|
+
anchorSide?: "left" | "top" | "right" | "bottom"
|
|
517
543
|
}
|
|
518
544
|
```
|
|
519
545
|
|
|
520
546
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/netlabel.ts)
|
|
521
547
|
|
|
548
|
+
|
|
522
549
|
### PinHeaderProps `<pinheader />`
|
|
523
550
|
|
|
524
551
|
```ts
|
|
@@ -526,200 +553,214 @@ export interface PinHeaderProps extends CommonComponentProps {
|
|
|
526
553
|
/**
|
|
527
554
|
* Number of pins in the header
|
|
528
555
|
*/
|
|
529
|
-
pinCount: number
|
|
556
|
+
pinCount: number
|
|
530
557
|
|
|
531
558
|
/**
|
|
532
559
|
* Distance between pins
|
|
533
560
|
*/
|
|
534
|
-
pitch?: number | string
|
|
561
|
+
pitch?: number | string
|
|
535
562
|
|
|
536
563
|
/**
|
|
537
564
|
* Schematic facing direction
|
|
538
565
|
*/
|
|
539
|
-
schFacingDirection?: "up" | "down" | "left" | "right"
|
|
566
|
+
schFacingDirection?: "up" | "down" | "left" | "right"
|
|
540
567
|
|
|
541
568
|
/**
|
|
542
569
|
* Whether the header is male or female
|
|
543
570
|
*/
|
|
544
|
-
gender?: "male" | "female"
|
|
571
|
+
gender?: "male" | "female"
|
|
545
572
|
|
|
546
573
|
/**
|
|
547
574
|
* Whether to show pin labels in silkscreen
|
|
548
575
|
*/
|
|
549
|
-
showSilkscreenPinLabels?: boolean
|
|
576
|
+
showSilkscreenPinLabels?: boolean
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Labels for PCB pins
|
|
580
|
+
*/
|
|
581
|
+
pcbPinLabels?: Record<string, string>
|
|
550
582
|
|
|
551
583
|
/**
|
|
552
584
|
* Whether the header has two rows of pins
|
|
553
585
|
*/
|
|
554
|
-
doubleRow?: boolean
|
|
586
|
+
doubleRow?: boolean
|
|
555
587
|
|
|
556
588
|
/**
|
|
557
589
|
* Diameter of the through-hole for each pin
|
|
558
590
|
*/
|
|
559
|
-
holeDiameter?: number | string
|
|
591
|
+
holeDiameter?: number | string
|
|
560
592
|
|
|
561
593
|
/**
|
|
562
594
|
* Diameter of the plated area around each hole
|
|
563
595
|
*/
|
|
564
|
-
platedDiameter?: number | string
|
|
596
|
+
platedDiameter?: number | string
|
|
565
597
|
|
|
566
598
|
/**
|
|
567
599
|
* Labels for each pin
|
|
568
600
|
*/
|
|
569
|
-
pinLabels?: string[]
|
|
601
|
+
pinLabels?: string[]
|
|
570
602
|
|
|
571
603
|
/**
|
|
572
604
|
* Connections to other components
|
|
573
605
|
*/
|
|
574
|
-
connections?: Connections<string
|
|
606
|
+
connections?: Connections<string>
|
|
575
607
|
|
|
576
608
|
/**
|
|
577
609
|
* Direction the header is facing
|
|
578
610
|
*/
|
|
579
|
-
facingDirection?: "left" | "right"
|
|
611
|
+
facingDirection?: "left" | "right"
|
|
580
612
|
|
|
581
613
|
/**
|
|
582
614
|
* Pin arrangement in schematic view
|
|
583
615
|
*/
|
|
584
|
-
schPinArrangement?: SchematicPinArrangement
|
|
616
|
+
schPinArrangement?: SchematicPinArrangement
|
|
585
617
|
|
|
586
618
|
/**
|
|
587
619
|
* Schematic pin style (margins, etc)
|
|
588
620
|
*/
|
|
589
|
-
schPinStyle?: SchematicPinStyle
|
|
621
|
+
schPinStyle?: SchematicPinStyle
|
|
590
622
|
|
|
591
623
|
/**
|
|
592
624
|
* Schematic pin spacing
|
|
593
625
|
*/
|
|
594
|
-
schPinSpacing?: number | string
|
|
626
|
+
schPinSpacing?: number | string
|
|
595
627
|
|
|
596
628
|
/**
|
|
597
629
|
* Schematic width
|
|
598
630
|
*/
|
|
599
|
-
schWidth?: number | string
|
|
631
|
+
schWidth?: number | string
|
|
600
632
|
|
|
601
633
|
/**
|
|
602
634
|
* Schematic height
|
|
603
635
|
*/
|
|
604
|
-
schHeight?: number | string
|
|
636
|
+
schHeight?: number | string
|
|
605
637
|
}
|
|
606
638
|
```
|
|
607
639
|
|
|
608
640
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/pin-header.ts)
|
|
609
641
|
|
|
642
|
+
|
|
610
643
|
### CirclePlatedHoleProps `<platedhole />`
|
|
611
644
|
|
|
612
645
|
```ts
|
|
613
646
|
export interface CirclePlatedHoleProps
|
|
614
647
|
extends Omit<PcbLayoutProps, "pcbRotation" | "layer"> {
|
|
615
|
-
name?: string
|
|
616
|
-
connectsTo?: string | string[]
|
|
617
|
-
shape: "circle"
|
|
618
|
-
holeDiameter: number | string
|
|
619
|
-
outerDiameter: number | string
|
|
620
|
-
portHints?: PortHints
|
|
648
|
+
name?: string
|
|
649
|
+
connectsTo?: string | string[]
|
|
650
|
+
shape: "circle"
|
|
651
|
+
holeDiameter: number | string
|
|
652
|
+
outerDiameter: number | string
|
|
653
|
+
portHints?: PortHints
|
|
621
654
|
}
|
|
622
655
|
```
|
|
623
656
|
|
|
624
657
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/platedhole.ts)
|
|
625
658
|
|
|
659
|
+
|
|
626
660
|
### PotentiometerProps `<potentiometer />`
|
|
627
661
|
|
|
628
662
|
```ts
|
|
629
663
|
export interface PotentiometerProps extends CommonComponentProps {
|
|
630
|
-
maxResistance: number | string
|
|
631
|
-
pinVariant?: PotentiometerPinVariant
|
|
664
|
+
maxResistance: number | string
|
|
665
|
+
pinVariant?: PotentiometerPinVariant
|
|
632
666
|
}
|
|
633
667
|
```
|
|
634
668
|
|
|
635
669
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/potentiometer.ts)
|
|
636
670
|
|
|
671
|
+
|
|
637
672
|
### ResistorProps `<resistor />`
|
|
638
673
|
|
|
639
674
|
```ts
|
|
640
675
|
export interface ResistorProps<PinLabel extends string = string>
|
|
641
676
|
extends CommonComponentProps<PinLabel> {
|
|
642
|
-
resistance: number | string
|
|
643
|
-
pullupFor?: string
|
|
644
|
-
pullupTo?: string
|
|
645
|
-
pulldownFor?: string
|
|
646
|
-
pulldownTo?: string
|
|
647
|
-
schOrientation?: SchematicOrientation
|
|
648
|
-
connections?: Connections<ResistorPinLabels
|
|
677
|
+
resistance: number | string
|
|
678
|
+
pullupFor?: string
|
|
679
|
+
pullupTo?: string
|
|
680
|
+
pulldownFor?: string
|
|
681
|
+
pulldownTo?: string
|
|
682
|
+
schOrientation?: SchematicOrientation
|
|
683
|
+
connections?: Connections<ResistorPinLabels>
|
|
649
684
|
}
|
|
650
685
|
```
|
|
651
686
|
|
|
652
687
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/resistor.ts)
|
|
653
688
|
|
|
689
|
+
|
|
654
690
|
### ResonatorProps `<resonator />`
|
|
655
691
|
|
|
656
692
|
```ts
|
|
657
693
|
export interface ResonatorProps extends CommonComponentProps {
|
|
658
|
-
frequency: number | string
|
|
659
|
-
loadCapacitance: number | string
|
|
660
|
-
pinVariant?: ResonatorPinVariant
|
|
694
|
+
frequency: number | string
|
|
695
|
+
loadCapacitance: number | string
|
|
696
|
+
pinVariant?: ResonatorPinVariant
|
|
661
697
|
}
|
|
662
698
|
```
|
|
663
699
|
|
|
664
700
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/resonator.ts)
|
|
665
701
|
|
|
702
|
+
|
|
666
703
|
### SchematicCellProps `<schematiccell />`
|
|
667
704
|
|
|
668
705
|
```ts
|
|
669
706
|
export interface SchematicCellProps {
|
|
670
|
-
children?: string
|
|
671
|
-
horizontalAlign?: "left" | "center" | "right"
|
|
672
|
-
verticalAlign?: "top" | "middle" | "bottom"
|
|
673
|
-
fontSize?: number | string
|
|
674
|
-
rowSpan?: number
|
|
675
|
-
colSpan?: number
|
|
676
|
-
width?: number | string
|
|
707
|
+
children?: string
|
|
708
|
+
horizontalAlign?: "left" | "center" | "right"
|
|
709
|
+
verticalAlign?: "top" | "middle" | "bottom"
|
|
710
|
+
fontSize?: number | string
|
|
711
|
+
rowSpan?: number
|
|
712
|
+
colSpan?: number
|
|
713
|
+
width?: number | string
|
|
677
714
|
}
|
|
678
715
|
```
|
|
679
716
|
|
|
680
717
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/schematic-cell.ts)
|
|
681
718
|
|
|
719
|
+
|
|
682
720
|
### SchematicRowProps `<schematicrow />`
|
|
683
721
|
|
|
684
722
|
```ts
|
|
685
723
|
export interface SchematicRowProps {
|
|
686
|
-
children?: any
|
|
687
|
-
height?: number | string
|
|
724
|
+
children?: any
|
|
725
|
+
height?: number | string
|
|
688
726
|
}
|
|
689
727
|
```
|
|
690
728
|
|
|
691
729
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/schematic-row.ts)
|
|
692
730
|
|
|
731
|
+
|
|
693
732
|
### SchematicTableProps `<schematictable />`
|
|
694
733
|
|
|
695
734
|
```ts
|
|
696
735
|
export interface SchematicTableProps {
|
|
697
|
-
schX?: number | string
|
|
698
|
-
schY?: number | string
|
|
699
|
-
children?: any
|
|
700
|
-
cellPadding?: number | string
|
|
701
|
-
borderWidth?: number | string
|
|
702
|
-
anchor?: z.infer<typeof ninePointAnchor
|
|
703
|
-
fontSize?: number | string
|
|
736
|
+
schX?: number | string
|
|
737
|
+
schY?: number | string
|
|
738
|
+
children?: any
|
|
739
|
+
cellPadding?: number | string
|
|
740
|
+
borderWidth?: number | string
|
|
741
|
+
anchor?: z.infer<typeof ninePointAnchor>
|
|
742
|
+
fontSize?: number | string
|
|
704
743
|
}
|
|
705
744
|
```
|
|
706
745
|
|
|
707
746
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/schematic-table.ts)
|
|
708
747
|
|
|
748
|
+
|
|
709
749
|
### RectSmtPadProps `<smtpad />`
|
|
710
750
|
|
|
711
751
|
```ts
|
|
712
752
|
export interface RectSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
713
|
-
name?: string
|
|
714
|
-
shape: "rect"
|
|
715
|
-
width: Distance
|
|
716
|
-
height: Distance
|
|
717
|
-
portHints?: PortHints
|
|
753
|
+
name?: string
|
|
754
|
+
shape: "rect"
|
|
755
|
+
width: Distance
|
|
756
|
+
height: Distance
|
|
757
|
+
portHints?: PortHints
|
|
718
758
|
}
|
|
719
759
|
```
|
|
720
760
|
|
|
721
761
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/smtpad.ts)
|
|
722
762
|
|
|
763
|
+
|
|
723
764
|
### SolderJumperProps `<solderjumper />`
|
|
724
765
|
|
|
725
766
|
```ts
|
|
@@ -727,63 +768,67 @@ export interface SolderJumperProps extends JumperProps {
|
|
|
727
768
|
/**
|
|
728
769
|
* Pins that are bridged with solder by default
|
|
729
770
|
*/
|
|
730
|
-
bridgedPins?: string[][]
|
|
771
|
+
bridgedPins?: string[][]
|
|
731
772
|
/**
|
|
732
773
|
* If true, all pins are connected with cuttable traces
|
|
733
774
|
*/
|
|
734
|
-
bridged?: boolean
|
|
775
|
+
bridged?: boolean
|
|
735
776
|
}
|
|
736
777
|
```
|
|
737
778
|
|
|
738
779
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/solderjumper.ts)
|
|
739
780
|
|
|
781
|
+
|
|
740
782
|
### RectSolderPasteProps `<solderpaste />`
|
|
741
783
|
|
|
742
784
|
```ts
|
|
743
785
|
export interface RectSolderPasteProps
|
|
744
786
|
extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
745
|
-
shape: "rect"
|
|
746
|
-
width: Distance
|
|
747
|
-
height: Distance
|
|
787
|
+
shape: "rect"
|
|
788
|
+
width: Distance
|
|
789
|
+
height: Distance
|
|
748
790
|
}
|
|
749
791
|
```
|
|
750
792
|
|
|
751
793
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/solderpaste.ts)
|
|
752
794
|
|
|
795
|
+
|
|
753
796
|
### StampboardProps `<stampboard />`
|
|
754
797
|
|
|
755
798
|
```ts
|
|
756
799
|
export interface StampboardProps extends BoardProps {
|
|
757
|
-
leftPinCount?: number
|
|
758
|
-
rightPinCount?: number
|
|
759
|
-
topPinCount?: number
|
|
760
|
-
bottomPinCount?: number
|
|
761
|
-
leftPins?: string[]
|
|
762
|
-
rightPins?: string[]
|
|
763
|
-
topPins?: string[]
|
|
764
|
-
bottomPins?: string[]
|
|
765
|
-
pinPitch?: number | string
|
|
766
|
-
innerHoles?: boolean
|
|
800
|
+
leftPinCount?: number
|
|
801
|
+
rightPinCount?: number
|
|
802
|
+
topPinCount?: number
|
|
803
|
+
bottomPinCount?: number
|
|
804
|
+
leftPins?: string[]
|
|
805
|
+
rightPins?: string[]
|
|
806
|
+
topPins?: string[]
|
|
807
|
+
bottomPins?: string[]
|
|
808
|
+
pinPitch?: number | string
|
|
809
|
+
innerHoles?: boolean
|
|
767
810
|
}
|
|
768
811
|
```
|
|
769
812
|
|
|
770
813
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/stampboard.ts)
|
|
771
814
|
|
|
815
|
+
|
|
772
816
|
### SwitchProps `<switch />`
|
|
773
817
|
|
|
774
818
|
```ts
|
|
775
819
|
export interface SwitchProps extends CommonComponentProps {
|
|
776
|
-
type?: "spst" | "spdt" | "dpst" | "dpdt"
|
|
777
|
-
isNormallyClosed?: boolean
|
|
778
|
-
spdt?: boolean
|
|
779
|
-
spst?: boolean
|
|
780
|
-
dpst?: boolean
|
|
781
|
-
dpdt?: boolean
|
|
820
|
+
type?: "spst" | "spdt" | "dpst" | "dpdt"
|
|
821
|
+
isNormallyClosed?: boolean
|
|
822
|
+
spdt?: boolean
|
|
823
|
+
spst?: boolean
|
|
824
|
+
dpst?: boolean
|
|
825
|
+
dpdt?: boolean
|
|
782
826
|
}
|
|
783
827
|
```
|
|
784
828
|
|
|
785
829
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/switch.ts)
|
|
786
830
|
|
|
831
|
+
|
|
787
832
|
### TestpointProps `<testpoint />`
|
|
788
833
|
|
|
789
834
|
```ts
|
|
@@ -791,53 +836,55 @@ export interface TestpointProps extends CommonComponentProps {
|
|
|
791
836
|
/**
|
|
792
837
|
* The footprint variant of the testpoint either a surface pad or through-hole
|
|
793
838
|
*/
|
|
794
|
-
footprintVariant?: "pad" | "through_hole"
|
|
839
|
+
footprintVariant?: "pad" | "through_hole"
|
|
795
840
|
/**
|
|
796
841
|
* The shape of the pad if using a pad variant
|
|
797
842
|
*/
|
|
798
|
-
padShape?: "rect" | "circle"
|
|
843
|
+
padShape?: "rect" | "circle"
|
|
799
844
|
/**
|
|
800
845
|
* Diameter of the copper pad (applies to both SMD pads and plated holes)
|
|
801
846
|
*/
|
|
802
|
-
padDiameter?: number | string
|
|
847
|
+
padDiameter?: number | string
|
|
803
848
|
/**
|
|
804
849
|
* Diameter of the hole if using a through-hole testpoint
|
|
805
850
|
*/
|
|
806
|
-
holeDiameter?: number | string
|
|
851
|
+
holeDiameter?: number | string
|
|
807
852
|
/**
|
|
808
853
|
* Width of the pad when padShape is rect
|
|
809
854
|
*/
|
|
810
|
-
width?: number | string
|
|
855
|
+
width?: number | string
|
|
811
856
|
/**
|
|
812
857
|
* Height of the pad when padShape is rect
|
|
813
858
|
*/
|
|
814
|
-
height?: number | string
|
|
859
|
+
height?: number | string
|
|
815
860
|
}
|
|
816
861
|
```
|
|
817
862
|
|
|
818
863
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/testpoint.ts)
|
|
819
864
|
|
|
865
|
+
|
|
820
866
|
### TransistorProps `<transistor />`
|
|
821
867
|
|
|
822
868
|
```ts
|
|
823
869
|
export interface TransistorProps<PinLabel extends string = string>
|
|
824
870
|
extends CommonComponentProps<PinLabel> {
|
|
825
|
-
type: "npn" | "pnp" | "bjt" | "jfet" | "mosfet" | "igbt"
|
|
871
|
+
type: "npn" | "pnp" | "bjt" | "jfet" | "mosfet" | "igbt"
|
|
826
872
|
}
|
|
827
873
|
```
|
|
828
874
|
|
|
829
875
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/transistor.ts)
|
|
830
876
|
|
|
877
|
+
|
|
831
878
|
### ViaProps `<via />`
|
|
832
879
|
|
|
833
880
|
```ts
|
|
834
881
|
export interface ViaProps extends CommonLayoutProps {
|
|
835
|
-
name?: string
|
|
836
|
-
fromLayer: LayerRefInput
|
|
837
|
-
toLayer: LayerRefInput
|
|
838
|
-
holeDiameter: number | string
|
|
839
|
-
outerDiameter: number | string
|
|
840
|
-
connectsTo?: string | string[]
|
|
882
|
+
name?: string
|
|
883
|
+
fromLayer: LayerRefInput
|
|
884
|
+
toLayer: LayerRefInput
|
|
885
|
+
holeDiameter: number | string
|
|
886
|
+
outerDiameter: number | string
|
|
887
|
+
connectsTo?: string | string[]
|
|
841
888
|
}
|
|
842
889
|
```
|
|
843
890
|
|
|
@@ -846,32 +893,31 @@ export interface ViaProps extends CommonLayoutProps {
|
|
|
846
893
|
<!-- INTERFACE_DEFINITIONS_END -->
|
|
847
894
|
|
|
848
895
|
<!-- PLATFORM_CONFIG_START -->
|
|
849
|
-
|
|
850
896
|
## tscircuit Platform Configuration
|
|
851
897
|
|
|
852
898
|
### PlatformConfig
|
|
853
899
|
|
|
854
900
|
```ts
|
|
855
901
|
export interface PlatformConfig {
|
|
856
|
-
partsEngine?: PartsEngine
|
|
902
|
+
partsEngine?: PartsEngine
|
|
857
903
|
|
|
858
|
-
autorouter?: AutorouterProp
|
|
904
|
+
autorouter?: AutorouterProp
|
|
859
905
|
|
|
860
906
|
// TODO this follows a subset of the localStorage interface
|
|
861
|
-
localCacheEngine?: any
|
|
907
|
+
localCacheEngine?: any
|
|
862
908
|
|
|
863
|
-
registryApiUrl?: string
|
|
909
|
+
registryApiUrl?: string
|
|
864
910
|
|
|
865
|
-
cloudAutorouterUrl?: string
|
|
911
|
+
cloudAutorouterUrl?: string
|
|
866
912
|
|
|
867
|
-
projectName?: string
|
|
868
|
-
version?: string
|
|
869
|
-
url?: string
|
|
870
|
-
printBoardInformationToSilkscreen?: boolean
|
|
913
|
+
projectName?: string
|
|
914
|
+
version?: string
|
|
915
|
+
url?: string
|
|
916
|
+
printBoardInformationToSilkscreen?: boolean
|
|
871
917
|
|
|
872
|
-
pcbDisabled?: boolean
|
|
873
|
-
schematicDisabled?: boolean
|
|
874
|
-
partsEngineDisabled?: boolean
|
|
918
|
+
pcbDisabled?: boolean
|
|
919
|
+
schematicDisabled?: boolean
|
|
920
|
+
partsEngineDisabled?: boolean
|
|
875
921
|
|
|
876
922
|
footprintLibraryMap?: Record<
|
|
877
923
|
string,
|
|
@@ -879,13 +925,12 @@ export interface PlatformConfig {
|
|
|
879
925
|
string,
|
|
880
926
|
| any[]
|
|
881
927
|
| ((path: string) => Promise<{
|
|
882
|
-
footprintCircuitJson: any[]
|
|
928
|
+
footprintCircuitJson: any[]
|
|
883
929
|
}>)
|
|
884
930
|
>
|
|
885
|
-
|
|
931
|
+
>
|
|
886
932
|
}
|
|
887
933
|
```
|
|
888
934
|
|
|
889
935
|
[Source](https://github.com/tscircuit/props/blob/main/lib/platformConfig.ts)
|
|
890
|
-
|
|
891
936
|
<!-- PLATFORM_CONFIG_END -->
|