@tscircuit/props 0.0.276 → 0.0.278

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