@tscircuit/props 0.0.263 → 0.0.264

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