@tscircuit/props 0.0.256 → 0.0.258

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,331 +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
- supplierPartNumbers?: SupplierPartNumbers
93
- cadModel?: CadModelProp
94
- children?: any
95
- symbolName?: string
96
- doNotPlace?: boolean
94
+ key?: any;
95
+ name: string;
96
+ supplierPartNumbers?: SupplierPartNumbers;
97
+ cadModel?: CadModelProp;
98
+ children?: any;
99
+ symbolName?: string;
100
+ doNotPlace?: boolean;
97
101
  }
98
102
  ```
99
103
 
100
104
  [Source](https://github.com/tscircuit/props/blob/main/lib/common/layout.ts)
101
105
 
102
-
103
106
  ### SubcircuitGroupProps
104
107
 
105
108
  ```ts
106
109
  export interface SubcircuitGroupProps extends BaseGroupProps {
107
- layout?: LayoutBuilder
108
- manualEdits?: ManualEditsFileInput
109
- routingDisabled?: boolean
110
- defaultTraceWidth?: Distance
111
- minTraceWidth?: Distance
112
- pcbRouteCache?: PcbRouteCache
110
+ layout?: LayoutBuilder;
111
+ manualEdits?: ManualEditsFileInput;
112
+ routingDisabled?: boolean;
113
+ defaultTraceWidth?: Distance;
114
+ minTraceWidth?: Distance;
115
+ pcbRouteCache?: PcbRouteCache;
113
116
 
114
- autorouter?: AutorouterProp
117
+ autorouter?: AutorouterProp;
115
118
 
116
119
  /**
117
120
  * If true, we'll automatically layout the schematic for this group. Must be
118
121
  * a subcircuit (currently). This is eventually going to be replaced with more
119
122
  * sophisticated layout options/modes and will be enabled by default.
120
123
  */
121
- schAutoLayoutEnabled?: boolean
124
+ schAutoLayoutEnabled?: boolean;
122
125
 
123
126
  /**
124
127
  * If true, net labels will automatically be created for complex traces
125
128
  */
126
- schTraceAutoLabelEnabled?: boolean
129
+ schTraceAutoLabelEnabled?: boolean;
127
130
 
128
- partsEngine?: PartsEngine
131
+ partsEngine?: PartsEngine;
129
132
  }
130
133
  ```
131
134
 
132
135
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/group.ts)
133
136
 
134
-
135
137
  ### BatteryProps `<battery />`
136
138
 
137
139
  ```ts
138
140
  export interface BatteryProps<PinLabel extends string = string>
139
141
  extends CommonComponentProps<PinLabel> {
140
- capacity?: number | string
141
- schOrientation?: SchematicOrientation
142
+ capacity?: number | string;
143
+ schOrientation?: SchematicOrientation;
142
144
  }
143
145
  ```
144
146
 
145
147
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/battery.ts)
146
148
 
147
-
148
149
  ### BoardProps `<board />`
149
150
 
150
151
  ```ts
151
152
  export interface BoardProps extends Omit<SubcircuitGroupProps, "subcircuit"> {
152
- width?: number | string
153
- height?: number | string
154
- outline?: Point[]
155
- outlineOffsetX?: number | string
156
- outlineOffsetY?: number | string
157
- material?: "fr4" | "fr1"
153
+ width?: number | string;
154
+ height?: number | string;
155
+ outline?: Point[];
156
+ outlineOffsetX?: number | string;
157
+ outlineOffsetY?: number | string;
158
+ material?: "fr4" | "fr1";
158
159
  }
159
160
  ```
160
161
 
161
162
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/board.ts)
162
163
 
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
-
180
179
  ### BreakoutPointProps `<breakoutpoint />`
181
180
 
182
181
  ```ts
183
182
  export interface BreakoutPointProps
184
183
  extends Omit<PcbLayoutProps, "pcbRotation" | "layer"> {
185
- connection: string
184
+ connection: string;
186
185
  }
187
186
  ```
188
187
 
189
188
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/breakoutpoint.ts)
190
189
 
191
-
192
190
  ### CapacitorProps `<capacitor />`
193
191
 
194
192
  ```ts
195
193
  export interface CapacitorProps<PinLabel extends string = string>
196
194
  extends CommonComponentProps<PinLabel> {
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>
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>;
208
206
  }
209
207
  ```
210
208
 
211
209
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/capacitor.ts)
212
210
 
213
-
214
211
  ### ChipProps `<chip />`
215
212
 
216
213
  ```ts
217
214
  export interface ChipPropsSU<PinLabel extends string = string>
218
215
  extends CommonComponentProps<PinLabel> {
219
- manufacturerPartNumber?: string
220
- pinLabels?: PinLabelsProp<string, PinLabel>
216
+ manufacturerPartNumber?: string;
217
+ pinLabels?: PinLabelsProp<string, PinLabel>;
221
218
  /**
222
219
  * Whether to show pin aliases in the schematic
223
220
  */
224
- showPinAliases?: boolean
221
+ showPinAliases?: boolean;
225
222
  /**
226
223
  * Labels for PCB pins
227
224
  */
228
- pcbPinLabels?: Record<string, string>
229
- schPinArrangement?: SchematicPortArrangement
225
+ pcbPinLabels?: Record<string, string>;
226
+ schPinArrangement?: SchematicPortArrangement;
230
227
  /** @deprecated Use schPinArrangement instead. */
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>
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>;
241
238
  }
242
239
  ```
243
240
 
244
241
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/chip.ts)
245
242
 
246
-
247
243
  ### ConnectorProps `<connector />`
248
244
 
249
245
  ```ts
250
246
  export interface ConnectorProps extends CommonComponentProps {
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
247
+ manufacturerPartNumber?: string;
248
+ pinLabels?: Record<number | string, string | string[]>;
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" | "photo" | "tvs"
331
- standard?: boolean
332
- schottky?: boolean
333
- zener?: boolean
334
- photo?: boolean
335
- tvs?: boolean
336
- 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;
337
330
  }
338
331
  ```
339
332
 
340
333
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/diode.ts)
341
334
 
342
-
343
335
  ### FootprintProps `<footprint />`
344
336
 
345
337
  ```ts
@@ -354,13 +346,12 @@ export interface FootprintProps {
354
346
  * confusion because you have a complex multi-layer footprint. Default is
355
347
  * "top" and this is most intuitive.
356
348
  */
357
- originalLayer?: LayerRef
349
+ originalLayer?: LayerRef;
358
350
  }
359
351
  ```
360
352
 
361
353
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/footprint.ts)
362
354
 
363
-
364
355
  ### FuseProps `<fuse />`
365
356
 
366
357
  ```ts
@@ -369,183 +360,174 @@ export interface FuseProps<PinLabel extends string = string>
369
360
  /**
370
361
  * Current rating of the fuse in amperes
371
362
  */
372
- currentRating: number | string
363
+ currentRating: number | string;
373
364
 
374
365
  /**
375
366
  * Voltage rating of the fuse
376
367
  */
377
- voltageRating?: number | string
368
+ voltageRating?: number | string;
378
369
 
379
370
  /**
380
371
  * Whether to show ratings on schematic
381
372
  */
382
- schShowRatings?: boolean
373
+ schShowRatings?: boolean;
383
374
 
384
- schOrientation?: SchematicOrientation
375
+ schOrientation?: SchematicOrientation;
385
376
 
386
377
  /**
387
378
  * Connections to other components
388
379
  */
389
- connections?: Connections<PinLabel>
380
+ connections?: Connections<PinLabel>;
390
381
  }
391
382
  ```
392
383
 
393
384
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/fuse.ts)
394
385
 
395
-
396
386
  ### BaseGroupProps
397
387
 
398
388
  ```ts
399
389
  export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
400
- name?: string
401
- key?: any
402
- children?: any
390
+ name?: string;
391
+ key?: any;
392
+ children?: any;
403
393
 
404
394
  /**
405
395
  * Title to display above this group in the schematic view
406
396
  */
407
- schTitle?: string
397
+ schTitle?: string;
408
398
 
409
- pcbWidth?: Distance
410
- pcbHeight?: Distance
411
- schWidth?: Distance
412
- schHeight?: Distance
399
+ pcbWidth?: Distance;
400
+ pcbHeight?: Distance;
401
+ schWidth?: Distance;
402
+ schHeight?: Distance;
413
403
 
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
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;
423
413
  }
424
414
  ```
425
415
 
426
416
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/group.ts)
427
417
 
428
-
429
418
  ### HoleProps `<hole />`
430
419
 
431
420
  ```ts
432
421
  export interface HoleProps extends Omit<PcbLayoutProps, "pcbRotation"> {
433
- name?: string
434
- diameter?: Distance
435
- radius?: Distance
422
+ name?: string;
423
+ diameter?: Distance;
424
+ radius?: Distance;
436
425
  }
437
426
  ```
438
427
 
439
428
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/hole.ts)
440
429
 
441
-
442
430
  ### InductorProps `<inductor />`
443
431
 
444
432
  ```ts
445
433
  export interface InductorProps<PinLabel extends string = string>
446
434
  extends CommonComponentProps<PinLabel> {
447
- inductance: number | string
448
- maxCurrentRating?: number | string
449
- schOrientation?: SchematicOrientation
435
+ inductance: number | string;
436
+ maxCurrentRating?: number | string;
437
+ schOrientation?: SchematicOrientation;
450
438
  }
451
439
  ```
452
440
 
453
441
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/inductor.ts)
454
442
 
455
-
456
443
  ### JumperProps `<jumper />`
457
444
 
458
445
  ```ts
459
446
  export interface JumperProps extends CommonComponentProps {
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
447
+ manufacturerPartNumber?: string;
448
+ pinLabels?: Record<number | string, string | string[]>;
449
+ schPinStyle?: SchematicPinStyle;
450
+ schPinSpacing?: number | string;
451
+ schWidth?: number | string;
452
+ schHeight?: number | string;
453
+ schDirection?: "left" | "right";
454
+ schPortArrangement?: SchematicPortArrangement;
468
455
  /**
469
456
  * Labels for PCB pins
470
457
  */
471
- pcbPinLabels?: Record<string, string>
458
+ pcbPinLabels?: Record<string, string>;
472
459
  /**
473
460
  * Number of pins on the jumper (2 or 3)
474
461
  */
475
- pinCount?: 2 | 3
462
+ pinCount?: 2 | 3;
476
463
  /**
477
464
  * Groups of pins that are internally connected
478
465
  * e.g., [["1","2"], ["2","3"]]
479
466
  */
480
- internallyConnectedPins?: string[][]
467
+ internallyConnectedPins?: string[][];
481
468
  /**
482
469
  * Connections to other components
483
470
  */
484
- connections?: Connections<string>
471
+ connections?: Connections<string>;
485
472
  }
486
473
  ```
487
474
 
488
475
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/jumper.ts)
489
476
 
490
-
491
477
  ### MosfetProps `<mosfet />`
492
478
 
493
479
  ```ts
494
480
  export interface MosfetProps<PinLabel extends string = string>
495
481
  extends CommonComponentProps<PinLabel> {
496
- channelType: "n" | "p"
497
- mosfetMode: "enhancement" | "depletion"
482
+ channelType: "n" | "p";
483
+ mosfetMode: "enhancement" | "depletion";
498
484
  }
499
485
  ```
500
486
 
501
487
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/mosfet.ts)
502
488
 
503
-
504
489
  ### NetProps `<net />`
505
490
 
506
491
  ```ts
507
492
  export interface NetProps {
508
- name: string
509
- connectsTo?: string | string[]
493
+ name: string;
494
+ connectsTo?: string | string[];
510
495
  }
511
496
  ```
512
497
 
513
498
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/net.ts)
514
499
 
515
-
516
500
  ### NetAliasProps `<netalias />`
517
501
 
518
502
  ```ts
519
503
  export interface NetAliasProps {
520
- net?: string
521
- connection?: string
522
- schX?: number | string
523
- schY?: number | string
524
- schRotation?: number | string
525
- anchorSide?: "left" | "top" | "right" | "bottom"
504
+ net?: string;
505
+ connection?: string;
506
+ schX?: number | string;
507
+ schY?: number | string;
508
+ schRotation?: number | string;
509
+ anchorSide?: "left" | "top" | "right" | "bottom";
526
510
  }
527
511
  ```
528
512
 
529
513
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/netalias.ts)
530
514
 
531
-
532
515
  ### NetLabelProps `<netlabel />`
533
516
 
534
517
  ```ts
535
518
  export interface NetLabelProps {
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"
519
+ net?: string;
520
+ connection?: string;
521
+ connectsTo?: string | string[];
522
+ schX?: number | string;
523
+ schY?: number | string;
524
+ schRotation?: number | string;
525
+ anchorSide?: "left" | "top" | "right" | "bottom";
543
526
  }
544
527
  ```
545
528
 
546
529
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/netlabel.ts)
547
530
 
548
-
549
531
  ### PinHeaderProps `<pinheader />`
550
532
 
551
533
  ```ts
@@ -553,214 +535,206 @@ export interface PinHeaderProps extends CommonComponentProps {
553
535
  /**
554
536
  * Number of pins in the header
555
537
  */
556
- pinCount: number
538
+ pinCount: number;
557
539
 
558
540
  /**
559
541
  * Distance between pins
560
542
  */
561
- pitch?: number | string
543
+ pitch?: number | string;
562
544
 
563
545
  /**
564
546
  * Schematic facing direction
565
547
  */
566
- schFacingDirection?: "up" | "down" | "left" | "right"
548
+ schFacingDirection?: "up" | "down" | "left" | "right";
567
549
 
568
550
  /**
569
551
  * Whether the header is male or female
570
552
  */
571
- gender?: "male" | "female"
553
+ gender?: "male" | "female";
572
554
 
573
555
  /**
574
556
  * Whether to show pin labels in silkscreen
575
557
  */
576
- showSilkscreenPinLabels?: boolean
558
+ showSilkscreenPinLabels?: boolean;
577
559
 
578
560
  /**
579
561
  * Labels for PCB pins
580
562
  */
581
- pcbPinLabels?: Record<string, string>
563
+ pcbPinLabels?: Record<string, string>;
582
564
 
583
565
  /**
584
566
  * Whether the header has two rows of pins
585
567
  */
586
- doubleRow?: boolean
568
+ doubleRow?: boolean;
587
569
 
588
570
  /**
589
571
  * Diameter of the through-hole for each pin
590
572
  */
591
- holeDiameter?: number | string
573
+ holeDiameter?: number | string;
592
574
 
593
575
  /**
594
576
  * Diameter of the plated area around each hole
595
577
  */
596
- platedDiameter?: number | string
578
+ platedDiameter?: number | string;
597
579
 
598
580
  /**
599
581
  * Labels for each pin
600
582
  */
601
- pinLabels?: string[]
583
+ pinLabels?: string[];
602
584
 
603
585
  /**
604
586
  * Connections to other components
605
587
  */
606
- connections?: Connections<string>
588
+ connections?: Connections<string>;
607
589
 
608
590
  /**
609
591
  * Direction the header is facing
610
592
  */
611
- facingDirection?: "left" | "right"
593
+ facingDirection?: "left" | "right";
612
594
 
613
595
  /**
614
596
  * Pin arrangement in schematic view
615
597
  */
616
- schPinArrangement?: SchematicPinArrangement
598
+ schPinArrangement?: SchematicPinArrangement;
617
599
 
618
600
  /**
619
601
  * Schematic pin style (margins, etc)
620
602
  */
621
- schPinStyle?: SchematicPinStyle
603
+ schPinStyle?: SchematicPinStyle;
622
604
 
623
605
  /**
624
606
  * Schematic pin spacing
625
607
  */
626
- schPinSpacing?: number | string
608
+ schPinSpacing?: number | string;
627
609
 
628
610
  /**
629
611
  * Schematic width
630
612
  */
631
- schWidth?: number | string
613
+ schWidth?: number | string;
632
614
 
633
615
  /**
634
616
  * Schematic height
635
617
  */
636
- schHeight?: number | string
618
+ schHeight?: number | string;
637
619
  }
638
620
  ```
639
621
 
640
622
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/pin-header.ts)
641
623
 
642
-
643
624
  ### CirclePlatedHoleProps `<platedhole />`
644
625
 
645
626
  ```ts
646
627
  export interface CirclePlatedHoleProps
647
628
  extends Omit<PcbLayoutProps, "pcbRotation" | "layer"> {
648
- name?: string
649
- connectsTo?: string | string[]
650
- shape: "circle"
651
- holeDiameter: number | string
652
- outerDiameter: number | string
653
- portHints?: PortHints
629
+ name?: string;
630
+ connectsTo?: string | string[];
631
+ shape: "circle";
632
+ holeDiameter: number | string;
633
+ outerDiameter: number | string;
634
+ portHints?: PortHints;
654
635
  }
655
636
  ```
656
637
 
657
638
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/platedhole.ts)
658
639
 
659
-
660
640
  ### PotentiometerProps `<potentiometer />`
661
641
 
662
642
  ```ts
663
643
  export interface PotentiometerProps extends CommonComponentProps {
664
- maxResistance: number | string
665
- pinVariant?: PotentiometerPinVariant
644
+ maxResistance: number | string;
645
+ pinVariant?: PotentiometerPinVariant;
666
646
  }
667
647
  ```
668
648
 
669
649
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/potentiometer.ts)
670
650
 
671
-
672
651
  ### ResistorProps `<resistor />`
673
652
 
674
653
  ```ts
675
654
  export interface ResistorProps<PinLabel extends string = string>
676
655
  extends CommonComponentProps<PinLabel> {
677
- resistance: number | string
678
- pullupFor?: string
679
- pullupTo?: string
680
- pulldownFor?: string
681
- pulldownTo?: string
682
- schOrientation?: SchematicOrientation
683
- connections?: Connections<ResistorPinLabels>
656
+ resistance: number | string;
657
+ pullupFor?: string;
658
+ pullupTo?: string;
659
+ pulldownFor?: string;
660
+ pulldownTo?: string;
661
+ schOrientation?: SchematicOrientation;
662
+ connections?: Connections<ResistorPinLabels>;
684
663
  }
685
664
  ```
686
665
 
687
666
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/resistor.ts)
688
667
 
689
-
690
668
  ### ResonatorProps `<resonator />`
691
669
 
692
670
  ```ts
693
671
  export interface ResonatorProps extends CommonComponentProps {
694
- frequency: number | string
695
- loadCapacitance: number | string
696
- pinVariant?: ResonatorPinVariant
672
+ frequency: number | string;
673
+ loadCapacitance: number | string;
674
+ pinVariant?: ResonatorPinVariant;
697
675
  }
698
676
  ```
699
677
 
700
678
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/resonator.ts)
701
679
 
702
-
703
680
  ### SchematicCellProps `<schematiccell />`
704
681
 
705
682
  ```ts
706
683
  export interface SchematicCellProps {
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
684
+ children?: string;
685
+ horizontalAlign?: "left" | "center" | "right";
686
+ verticalAlign?: "top" | "middle" | "bottom";
687
+ fontSize?: number | string;
688
+ rowSpan?: number;
689
+ colSpan?: number;
690
+ width?: number | string;
691
+ text?: string;
714
692
  }
715
693
  ```
716
694
 
717
695
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/schematic-cell.ts)
718
696
 
719
-
720
697
  ### SchematicRowProps `<schematicrow />`
721
698
 
722
699
  ```ts
723
700
  export interface SchematicRowProps {
724
- children?: any
725
- height?: number | string
701
+ children?: any;
702
+ height?: number | string;
726
703
  }
727
704
  ```
728
705
 
729
706
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/schematic-row.ts)
730
707
 
731
-
732
708
  ### SchematicTableProps `<schematictable />`
733
709
 
734
710
  ```ts
735
711
  export interface SchematicTableProps {
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
712
+ schX?: number | string;
713
+ schY?: number | string;
714
+ children?: any;
715
+ cellPadding?: number | string;
716
+ borderWidth?: number | string;
717
+ anchor?: z.infer<typeof ninePointAnchor>;
718
+ fontSize?: number | string;
743
719
  }
744
720
  ```
745
721
 
746
722
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/schematic-table.ts)
747
723
 
748
-
749
724
  ### RectSmtPadProps `<smtpad />`
750
725
 
751
726
  ```ts
752
727
  export interface RectSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
753
- name?: string
754
- shape: "rect"
755
- width: Distance
756
- height: Distance
757
- portHints?: PortHints
728
+ name?: string;
729
+ shape: "rect";
730
+ width: Distance;
731
+ height: Distance;
732
+ portHints?: PortHints;
758
733
  }
759
734
  ```
760
735
 
761
736
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/smtpad.ts)
762
737
 
763
-
764
738
  ### SolderJumperProps `<solderjumper />`
765
739
 
766
740
  ```ts
@@ -768,67 +742,63 @@ export interface SolderJumperProps extends JumperProps {
768
742
  /**
769
743
  * Pins that are bridged with solder by default
770
744
  */
771
- bridgedPins?: string[][]
745
+ bridgedPins?: string[][];
772
746
  /**
773
747
  * If true, all pins are connected with cuttable traces
774
748
  */
775
- bridged?: boolean
749
+ bridged?: boolean;
776
750
  }
777
751
  ```
778
752
 
779
753
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/solderjumper.ts)
780
754
 
781
-
782
755
  ### RectSolderPasteProps `<solderpaste />`
783
756
 
784
757
  ```ts
785
758
  export interface RectSolderPasteProps
786
759
  extends Omit<PcbLayoutProps, "pcbRotation"> {
787
- shape: "rect"
788
- width: Distance
789
- height: Distance
760
+ shape: "rect";
761
+ width: Distance;
762
+ height: Distance;
790
763
  }
791
764
  ```
792
765
 
793
766
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/solderpaste.ts)
794
767
 
795
-
796
768
  ### StampboardProps `<stampboard />`
797
769
 
798
770
  ```ts
799
771
  export interface StampboardProps extends BoardProps {
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
772
+ leftPinCount?: number;
773
+ rightPinCount?: number;
774
+ topPinCount?: number;
775
+ bottomPinCount?: number;
776
+ leftPins?: string[];
777
+ rightPins?: string[];
778
+ topPins?: string[];
779
+ bottomPins?: string[];
780
+ pinPitch?: number | string;
781
+ innerHoles?: boolean;
810
782
  }
811
783
  ```
812
784
 
813
785
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/stampboard.ts)
814
786
 
815
-
816
787
  ### SwitchProps `<switch />`
817
788
 
818
789
  ```ts
819
790
  export interface SwitchProps extends CommonComponentProps {
820
- type?: "spst" | "spdt" | "dpst" | "dpdt"
821
- isNormallyClosed?: boolean
822
- spdt?: boolean
823
- spst?: boolean
824
- dpst?: boolean
825
- dpdt?: boolean
791
+ type?: "spst" | "spdt" | "dpst" | "dpdt";
792
+ isNormallyClosed?: boolean;
793
+ spdt?: boolean;
794
+ spst?: boolean;
795
+ dpst?: boolean;
796
+ dpdt?: boolean;
826
797
  }
827
798
  ```
828
799
 
829
800
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/switch.ts)
830
801
 
831
-
832
802
  ### TestpointProps `<testpoint />`
833
803
 
834
804
  ```ts
@@ -836,55 +806,53 @@ export interface TestpointProps extends CommonComponentProps {
836
806
  /**
837
807
  * The footprint variant of the testpoint either a surface pad or through-hole
838
808
  */
839
- footprintVariant?: "pad" | "through_hole"
809
+ footprintVariant?: "pad" | "through_hole";
840
810
  /**
841
811
  * The shape of the pad if using a pad variant
842
812
  */
843
- padShape?: "rect" | "circle"
813
+ padShape?: "rect" | "circle";
844
814
  /**
845
815
  * Diameter of the copper pad (applies to both SMD pads and plated holes)
846
816
  */
847
- padDiameter?: number | string
817
+ padDiameter?: number | string;
848
818
  /**
849
819
  * Diameter of the hole if using a through-hole testpoint
850
820
  */
851
- holeDiameter?: number | string
821
+ holeDiameter?: number | string;
852
822
  /**
853
823
  * Width of the pad when padShape is rect
854
824
  */
855
- width?: number | string
825
+ width?: number | string;
856
826
  /**
857
827
  * Height of the pad when padShape is rect
858
828
  */
859
- height?: number | string
829
+ height?: number | string;
860
830
  }
861
831
  ```
862
832
 
863
833
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/testpoint.ts)
864
834
 
865
-
866
835
  ### TransistorProps `<transistor />`
867
836
 
868
837
  ```ts
869
838
  export interface TransistorProps<PinLabel extends string = string>
870
839
  extends CommonComponentProps<PinLabel> {
871
- type: "npn" | "pnp" | "bjt" | "jfet" | "mosfet" | "igbt"
840
+ type: "npn" | "pnp" | "bjt" | "jfet" | "mosfet" | "igbt";
872
841
  }
873
842
  ```
874
843
 
875
844
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/transistor.ts)
876
845
 
877
-
878
846
  ### ViaProps `<via />`
879
847
 
880
848
  ```ts
881
849
  export interface ViaProps extends CommonLayoutProps {
882
- name?: string
883
- fromLayer: LayerRefInput
884
- toLayer: LayerRefInput
885
- holeDiameter: number | string
886
- outerDiameter: number | string
887
- connectsTo?: string | string[]
850
+ name?: string;
851
+ fromLayer: LayerRefInput;
852
+ toLayer: LayerRefInput;
853
+ holeDiameter: number | string;
854
+ outerDiameter: number | string;
855
+ connectsTo?: string | string[];
888
856
  }
889
857
  ```
890
858
 
@@ -893,31 +861,32 @@ export interface ViaProps extends CommonLayoutProps {
893
861
  <!-- INTERFACE_DEFINITIONS_END -->
894
862
 
895
863
  <!-- PLATFORM_CONFIG_START -->
864
+
896
865
  ## tscircuit Platform Configuration
897
866
 
898
867
  ### PlatformConfig
899
868
 
900
869
  ```ts
901
870
  export interface PlatformConfig {
902
- partsEngine?: PartsEngine
871
+ partsEngine?: PartsEngine;
903
872
 
904
- autorouter?: AutorouterProp
873
+ autorouter?: AutorouterProp;
905
874
 
906
875
  // TODO this follows a subset of the localStorage interface
907
- localCacheEngine?: any
876
+ localCacheEngine?: any;
908
877
 
909
- registryApiUrl?: string
878
+ registryApiUrl?: string;
910
879
 
911
- cloudAutorouterUrl?: string
880
+ cloudAutorouterUrl?: string;
912
881
 
913
- projectName?: string
914
- version?: string
915
- url?: string
916
- printBoardInformationToSilkscreen?: boolean
882
+ projectName?: string;
883
+ version?: string;
884
+ url?: string;
885
+ printBoardInformationToSilkscreen?: boolean;
917
886
 
918
- pcbDisabled?: boolean
919
- schematicDisabled?: boolean
920
- partsEngineDisabled?: boolean
887
+ pcbDisabled?: boolean;
888
+ schematicDisabled?: boolean;
889
+ partsEngineDisabled?: boolean;
921
890
 
922
891
  footprintLibraryMap?: Record<
923
892
  string,
@@ -925,12 +894,13 @@ export interface PlatformConfig {
925
894
  string,
926
895
  | any[]
927
896
  | ((path: string) => Promise<{
928
- footprintCircuitJson: any[]
897
+ footprintCircuitJson: any[];
929
898
  }>)
930
899
  >
931
- >
900
+ >;
932
901
  }
933
902
  ```
934
903
 
935
904
  [Source](https://github.com/tscircuit/props/blob/main/lib/platformConfig.ts)
905
+
936
906
  <!-- PLATFORM_CONFIG_END -->