@tscircuit/props 0.0.274 → 0.0.276

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,10 @@ 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
292
  }
293
293
  ```
294
294
 
@@ -299,10 +299,10 @@ export interface CrystalProps<PinLabel extends string = string>
299
299
  ```ts
300
300
  export interface RectCutoutProps
301
301
  extends Omit<PcbLayoutProps, "layer" | "pcbRotation"> {
302
- name?: string;
303
- shape: "rect";
304
- width: Distance;
305
- height: Distance;
302
+ name?: string
303
+ shape: "rect"
304
+ width: Distance
305
+ height: Distance
306
306
  }
307
307
  ```
308
308
 
@@ -314,21 +314,21 @@ export interface RectCutoutProps
314
314
  export interface DiodeProps<PinLabel extends string = string>
315
315
  extends CommonComponentProps<PinLabel> {
316
316
  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;
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
332
332
  }
333
333
  ```
334
334
 
@@ -348,7 +348,7 @@ export interface FootprintProps {
348
348
  * confusion because you have a complex multi-layer footprint. Default is
349
349
  * "top" and this is most intuitive.
350
350
  */
351
- originalLayer?: LayerRef;
351
+ originalLayer?: LayerRef
352
352
  }
353
353
  ```
354
354
 
@@ -362,24 +362,24 @@ export interface FuseProps<PinLabel extends string = string>
362
362
  /**
363
363
  * Current rating of the fuse in amperes
364
364
  */
365
- currentRating: number | string;
365
+ currentRating: number | string
366
366
 
367
367
  /**
368
368
  * Voltage rating of the fuse
369
369
  */
370
- voltageRating?: number | string;
370
+ voltageRating?: number | string
371
371
 
372
372
  /**
373
373
  * Whether to show ratings on schematic
374
374
  */
375
- schShowRatings?: boolean;
375
+ schShowRatings?: boolean
376
376
 
377
- schOrientation?: SchematicOrientation;
377
+ schOrientation?: SchematicOrientation
378
378
 
379
379
  /**
380
380
  * Connections to other components
381
381
  */
382
- connections?: Connections<PinLabel>;
382
+ connections?: Connections<PinLabel>
383
383
  }
384
384
  ```
385
385
 
@@ -389,48 +389,48 @@ export interface FuseProps<PinLabel extends string = string>
389
389
 
390
390
  ```ts
391
391
  export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
392
- name?: string;
393
- key?: any;
394
- children?: any;
392
+ name?: string
393
+ key?: any
394
+ children?: any
395
395
 
396
396
  /**
397
397
  * Title to display above this group in the schematic view
398
398
  */
399
- schTitle?: string;
399
+ schTitle?: string
400
400
 
401
- pcbWidth?: Distance;
402
- pcbHeight?: Distance;
403
- schWidth?: Distance;
404
- schHeight?: Distance;
401
+ pcbWidth?: Distance
402
+ pcbHeight?: Distance
403
+ schWidth?: Distance
404
+ schHeight?: Distance
405
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;
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
415
415
 
416
416
  /** @deprecated Use `pcbGrid` */
417
- grid?: boolean;
417
+ grid?: boolean
418
418
  /** @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";
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"
434
434
  pcbJustifyContent?:
435
435
  | "start"
436
436
  | "center"
@@ -438,10 +438,12 @@ export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
438
438
  | "stretch"
439
439
  | "space-between"
440
440
  | "space-around"
441
- | "space-evenly";
442
- pcbFlexRow?: boolean;
443
- pcbFlexColumn?: boolean;
444
- pcbGap?: number | string;
441
+ | "space-evenly"
442
+ pcbFlexRow?: boolean
443
+ pcbFlexColumn?: boolean
444
+ pcbGap?: number | string
445
+ pcbFlexGap?: number | string
446
+ pcbPack?: boolean
445
447
  }
446
448
  ```
447
449
 
@@ -451,9 +453,9 @@ export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
451
453
 
452
454
  ```ts
453
455
  export interface HoleProps extends Omit<PcbLayoutProps, "pcbRotation"> {
454
- name?: string;
455
- diameter?: Distance;
456
- radius?: Distance;
456
+ name?: string
457
+ diameter?: Distance
458
+ radius?: Distance
457
459
  }
458
460
  ```
459
461
 
@@ -464,9 +466,9 @@ export interface HoleProps extends Omit<PcbLayoutProps, "pcbRotation"> {
464
466
  ```ts
465
467
  export interface InductorProps<PinLabel extends string = string>
466
468
  extends CommonComponentProps<PinLabel> {
467
- inductance: number | string;
468
- maxCurrentRating?: number | string;
469
- schOrientation?: SchematicOrientation;
469
+ inductance: number | string
470
+ maxCurrentRating?: number | string
471
+ schOrientation?: SchematicOrientation
470
472
  }
471
473
  ```
472
474
 
@@ -476,34 +478,34 @@ export interface InductorProps<PinLabel extends string = string>
476
478
 
477
479
  ```ts
478
480
  export interface JumperProps extends CommonComponentProps {
479
- manufacturerPartNumber?: string;
481
+ manufacturerPartNumber?: string
480
482
  pinLabels?: Record<
481
483
  number | SchematicPinLabel,
482
484
  SchematicPinLabel | SchematicPinLabel[]
483
- >;
484
- schPinStyle?: SchematicPinStyle;
485
- schPinSpacing?: number | string;
486
- schWidth?: number | string;
487
- schHeight?: number | string;
488
- schDirection?: "left" | "right";
489
- schPortArrangement?: SchematicPortArrangement;
485
+ >
486
+ schPinStyle?: SchematicPinStyle
487
+ schPinSpacing?: number | string
488
+ schWidth?: number | string
489
+ schHeight?: number | string
490
+ schDirection?: "left" | "right"
491
+ schPortArrangement?: SchematicPortArrangement
490
492
  /**
491
493
  * Labels for PCB pins
492
494
  */
493
- pcbPinLabels?: Record<string, string>;
495
+ pcbPinLabels?: Record<string, string>
494
496
  /**
495
497
  * Number of pins on the jumper (2 or 3)
496
498
  */
497
- pinCount?: 2 | 3;
499
+ pinCount?: 2 | 3
498
500
  /**
499
501
  * Groups of pins that are internally connected
500
502
  * e.g., [["1","2"], ["2","3"]]
501
503
  */
502
- internallyConnectedPins?: string[][];
504
+ internallyConnectedPins?: string[][]
503
505
  /**
504
506
  * Connections to other components
505
507
  */
506
- connections?: Connections<string>;
508
+ connections?: Connections<string>
507
509
  }
508
510
  ```
509
511
 
@@ -514,8 +516,8 @@ export interface JumperProps extends CommonComponentProps {
514
516
  ```ts
515
517
  export interface MosfetProps<PinLabel extends string = string>
516
518
  extends CommonComponentProps<PinLabel> {
517
- channelType: "n" | "p";
518
- mosfetMode: "enhancement" | "depletion";
519
+ channelType: "n" | "p"
520
+ mosfetMode: "enhancement" | "depletion"
519
521
  }
520
522
  ```
521
523
 
@@ -525,8 +527,8 @@ export interface MosfetProps<PinLabel extends string = string>
525
527
 
526
528
  ```ts
527
529
  export interface NetProps {
528
- name: string;
529
- connectsTo?: string | string[];
530
+ name: string
531
+ connectsTo?: string | string[]
530
532
  }
531
533
  ```
532
534
 
@@ -536,12 +538,12 @@ export interface NetProps {
536
538
 
537
539
  ```ts
538
540
  export interface NetAliasProps {
539
- net?: string;
540
- connection?: string;
541
- schX?: number | string;
542
- schY?: number | string;
543
- schRotation?: number | string;
544
- anchorSide?: "left" | "top" | "right" | "bottom";
541
+ net?: string
542
+ connection?: string
543
+ schX?: number | string
544
+ schY?: number | string
545
+ schRotation?: number | string
546
+ anchorSide?: "left" | "top" | "right" | "bottom"
545
547
  }
546
548
  ```
547
549
 
@@ -551,13 +553,13 @@ export interface NetAliasProps {
551
553
 
552
554
  ```ts
553
555
  export interface NetLabelProps {
554
- net?: string;
555
- connection?: string;
556
- connectsTo?: string | string[];
557
- schX?: number | string;
558
- schY?: number | string;
559
- schRotation?: number | string;
560
- anchorSide?: "left" | "top" | "right" | "bottom";
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"
561
563
  }
562
564
  ```
563
565
 
@@ -570,92 +572,92 @@ export interface PinHeaderProps extends CommonComponentProps {
570
572
  /**
571
573
  * Number of pins in the header
572
574
  */
573
- pinCount: number;
575
+ pinCount: number
574
576
 
575
577
  /**
576
578
  * Distance between pins
577
579
  */
578
- pitch?: number | string;
580
+ pitch?: number | string
579
581
 
580
582
  /**
581
583
  * Schematic facing direction
582
584
  */
583
- schFacingDirection?: "up" | "down" | "left" | "right";
585
+ schFacingDirection?: "up" | "down" | "left" | "right"
584
586
 
585
587
  /**
586
588
  * Whether the header is male, female, or unpopulated
587
589
  */
588
- gender?: "male" | "female" | "unpopulated";
590
+ gender?: "male" | "female" | "unpopulated"
589
591
 
590
592
  /**
591
593
  * Whether to show pin labels in silkscreen
592
594
  */
593
- showSilkscreenPinLabels?: boolean;
595
+ showSilkscreenPinLabels?: boolean
594
596
 
595
597
  /**
596
598
  * Labels for PCB pins
597
599
  */
598
- pcbPinLabels?: Record<string, string>;
600
+ pcbPinLabels?: Record<string, string>
599
601
 
600
602
  /**
601
603
  * Whether the header has two rows of pins
602
604
  */
603
- doubleRow?: boolean;
605
+ doubleRow?: boolean
604
606
 
605
607
  /**
606
608
  * If true, the header is a right-angle style connector
607
609
  */
608
- rightAngle?: boolean;
610
+ rightAngle?: boolean
609
611
 
610
612
  /**
611
613
  * Diameter of the through-hole for each pin
612
614
  */
613
- holeDiameter?: number | string;
615
+ holeDiameter?: number | string
614
616
 
615
617
  /**
616
618
  * Diameter of the plated area around each hole
617
619
  */
618
- platedDiameter?: number | string;
620
+ platedDiameter?: number | string
619
621
 
620
622
  /**
621
623
  * Labels for each pin
622
624
  */
623
- pinLabels?: SchematicPinLabel[];
625
+ pinLabels?: SchematicPinLabel[]
624
626
 
625
627
  /**
626
628
  * Connections to other components
627
629
  */
628
- connections?: Connections<string>;
630
+ connections?: Connections<string>
629
631
 
630
632
  /**
631
633
  * Direction the header is facing
632
634
  */
633
- facingDirection?: "left" | "right";
635
+ facingDirection?: "left" | "right"
634
636
 
635
637
  /**
636
638
  * Pin arrangement in schematic view
637
639
  */
638
- schPinArrangement?: SchematicPinArrangement;
640
+ schPinArrangement?: SchematicPinArrangement
639
641
 
640
642
  /**
641
643
  * Schematic pin style (margins, etc)
642
644
  */
643
- schPinStyle?: SchematicPinStyle;
645
+ schPinStyle?: SchematicPinStyle
644
646
 
645
647
  /**
646
648
  * Schematic pin spacing
647
649
  */
648
- schPinSpacing?: number | string;
650
+ schPinSpacing?: number | string
649
651
 
650
652
  /**
651
653
  * Schematic width
652
654
  */
653
- schWidth?: number | string;
655
+ schWidth?: number | string
654
656
 
655
657
  /**
656
658
  * Schematic height
657
659
  */
658
- schHeight?: number | string;
660
+ schHeight?: number | string
659
661
  }
660
662
  ```
661
663
 
@@ -666,12 +668,12 @@ export interface PinHeaderProps extends CommonComponentProps {
666
668
  ```ts
667
669
  export interface CirclePlatedHoleProps
668
670
  extends Omit<PcbLayoutProps, "pcbRotation" | "layer"> {
669
- name?: string;
670
- connectsTo?: string | string[];
671
- shape: "circle";
672
- holeDiameter: number | string;
673
- outerDiameter: number | string;
674
- portHints?: PortHints;
671
+ name?: string
672
+ connectsTo?: string | string[]
673
+ shape: "circle"
674
+ holeDiameter: number | string
675
+ outerDiameter: number | string
676
+ portHints?: PortHints
675
677
  }
676
678
  ```
677
679
 
@@ -681,8 +683,8 @@ export interface CirclePlatedHoleProps
681
683
 
682
684
  ```ts
683
685
  export interface PotentiometerProps extends CommonComponentProps {
684
- maxResistance: number | string;
685
- pinVariant?: PotentiometerPinVariant;
686
+ maxResistance: number | string
687
+ pinVariant?: PotentiometerPinVariant
686
688
  }
687
689
  ```
688
690
 
@@ -693,13 +695,13 @@ export interface PotentiometerProps extends CommonComponentProps {
693
695
  ```ts
694
696
  export interface ResistorProps<PinLabel extends string = string>
695
697
  extends CommonComponentProps<PinLabel> {
696
- resistance: number | string;
697
- pullupFor?: string;
698
- pullupTo?: string;
699
- pulldownFor?: string;
700
- pulldownTo?: string;
701
- schOrientation?: SchematicOrientation;
702
- connections?: Connections<ResistorPinLabels>;
698
+ resistance: number | string
699
+ pullupFor?: string
700
+ pullupTo?: string
701
+ pulldownFor?: string
702
+ pulldownTo?: string
703
+ schOrientation?: SchematicOrientation
704
+ connections?: Connections<ResistorPinLabels>
703
705
  }
704
706
  ```
705
707
 
@@ -709,9 +711,9 @@ export interface ResistorProps<PinLabel extends string = string>
709
711
 
710
712
  ```ts
711
713
  export interface ResonatorProps extends CommonComponentProps {
712
- frequency: number | string;
713
- loadCapacitance: number | string;
714
- pinVariant?: ResonatorPinVariant;
714
+ frequency: number | string
715
+ loadCapacitance: number | string
716
+ pinVariant?: ResonatorPinVariant
715
717
  }
716
718
  ```
717
719
 
@@ -721,14 +723,14 @@ export interface ResonatorProps extends CommonComponentProps {
721
723
 
722
724
  ```ts
723
725
  export interface SchematicCellProps {
724
- children?: string;
725
- horizontalAlign?: "left" | "center" | "right";
726
- verticalAlign?: "top" | "middle" | "bottom";
727
- fontSize?: number | string;
728
- rowSpan?: number;
729
- colSpan?: number;
730
- width?: number | string;
731
- text?: string;
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
732
734
  }
733
735
  ```
734
736
 
@@ -738,8 +740,8 @@ export interface SchematicCellProps {
738
740
 
739
741
  ```ts
740
742
  export interface SchematicRowProps {
741
- children?: any;
742
- height?: number | string;
743
+ children?: any
744
+ height?: number | string
743
745
  }
744
746
  ```
745
747
 
@@ -749,13 +751,13 @@ export interface SchematicRowProps {
749
751
 
750
752
  ```ts
751
753
  export interface SchematicTableProps {
752
- schX?: number | string;
753
- schY?: number | string;
754
- children?: any;
755
- cellPadding?: number | string;
756
- borderWidth?: number | string;
757
- anchor?: z.infer<typeof ninePointAnchor>;
758
- fontSize?: number | string;
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
759
761
  }
760
762
  ```
761
763
 
@@ -765,11 +767,11 @@ export interface SchematicTableProps {
765
767
 
766
768
  ```ts
767
769
  export interface RectSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
768
- name?: string;
769
- shape: "rect";
770
- width: Distance;
771
- height: Distance;
772
- portHints?: PortHints;
770
+ name?: string
771
+ shape: "rect"
772
+ width: Distance
773
+ height: Distance
774
+ portHints?: PortHints
773
775
  }
774
776
  ```
775
777
 
@@ -782,11 +784,11 @@ export interface SolderJumperProps extends JumperProps {
782
784
  /**
783
785
  * Pins that are bridged with solder by default
784
786
  */
785
- bridgedPins?: string[][];
787
+ bridgedPins?: string[][]
786
788
  /**
787
789
  * If true, all pins are connected with cuttable traces
788
790
  */
789
- bridged?: boolean;
791
+ bridged?: boolean
790
792
  }
791
793
  ```
792
794
 
@@ -797,9 +799,9 @@ export interface SolderJumperProps extends JumperProps {
797
799
  ```ts
798
800
  export interface RectSolderPasteProps
799
801
  extends Omit<PcbLayoutProps, "pcbRotation"> {
800
- shape: "rect";
801
- width: Distance;
802
- height: Distance;
802
+ shape: "rect"
803
+ width: Distance
804
+ height: Distance
803
805
  }
804
806
  ```
805
807
 
@@ -809,16 +811,16 @@ export interface RectSolderPasteProps
809
811
 
810
812
  ```ts
811
813
  export interface StampboardProps extends BoardProps {
812
- leftPinCount?: number;
813
- rightPinCount?: number;
814
- topPinCount?: number;
815
- bottomPinCount?: number;
816
- leftPins?: string[];
817
- rightPins?: string[];
818
- topPins?: string[];
819
- bottomPins?: string[];
820
- pinPitch?: number | string;
821
- innerHoles?: boolean;
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
822
824
  }
823
825
  ```
824
826
 
@@ -828,12 +830,12 @@ export interface StampboardProps extends BoardProps {
828
830
 
829
831
  ```ts
830
832
  export interface SwitchProps extends CommonComponentProps {
831
- type?: "spst" | "spdt" | "dpst" | "dpdt";
832
- isNormallyClosed?: boolean;
833
- spdt?: boolean;
834
- spst?: boolean;
835
- dpst?: boolean;
836
- dpdt?: boolean;
833
+ type?: "spst" | "spdt" | "dpst" | "dpdt"
834
+ isNormallyClosed?: boolean
835
+ spdt?: boolean
836
+ spst?: boolean
837
+ dpst?: boolean
838
+ dpdt?: boolean
837
839
  }
838
840
  ```
839
841
 
@@ -846,27 +848,27 @@ export interface TestpointProps extends CommonComponentProps {
846
848
  /**
847
849
  * The footprint variant of the testpoint either a surface pad or through-hole
848
850
  */
849
- footprintVariant?: "pad" | "through_hole";
851
+ footprintVariant?: "pad" | "through_hole"
850
852
  /**
851
853
  * The shape of the pad if using a pad variant
852
854
  */
853
- padShape?: "rect" | "circle";
855
+ padShape?: "rect" | "circle"
854
856
  /**
855
857
  * Diameter of the copper pad (applies to both SMD pads and plated holes)
856
858
  */
857
- padDiameter?: number | string;
859
+ padDiameter?: number | string
858
860
  /**
859
861
  * Diameter of the hole if using a through-hole testpoint
860
862
  */
861
- holeDiameter?: number | string;
863
+ holeDiameter?: number | string
862
864
  /**
863
865
  * Width of the pad when padShape is rect
864
866
  */
865
- width?: number | string;
867
+ width?: number | string
866
868
  /**
867
869
  * Height of the pad when padShape is rect
868
870
  */
869
- height?: number | string;
871
+ height?: number | string
870
872
  }
871
873
  ```
872
874
 
@@ -877,8 +879,8 @@ export interface TestpointProps extends CommonComponentProps {
877
879
  ```ts
878
880
  export interface TransistorProps<PinLabel extends string = string>
879
881
  extends CommonComponentProps<PinLabel> {
880
- type: "npn" | "pnp" | "bjt" | "jfet" | "mosfet" | "igbt";
881
- connections?: Connections<transistorPinsLabels>;
882
+ type: "npn" | "pnp" | "bjt" | "jfet" | "mosfet" | "igbt"
883
+ connections?: Connections<transistorPinsLabels>
882
884
  }
883
885
  ```
884
886
 
@@ -888,12 +890,12 @@ export interface TransistorProps<PinLabel extends string = string>
888
890
 
889
891
  ```ts
890
892
  export interface ViaProps extends CommonLayoutProps {
891
- name?: string;
892
- fromLayer: LayerRefInput;
893
- toLayer: LayerRefInput;
894
- holeDiameter: number | string;
895
- outerDiameter: number | string;
896
- connectsTo?: string | string[];
893
+ name?: string
894
+ fromLayer: LayerRefInput
895
+ toLayer: LayerRefInput
896
+ holeDiameter: number | string
897
+ outerDiameter: number | string
898
+ connectsTo?: string | string[]
897
899
  }
898
900
  ```
899
901
 
@@ -909,25 +911,25 @@ export interface ViaProps extends CommonLayoutProps {
909
911
 
910
912
  ```ts
911
913
  export interface PlatformConfig {
912
- partsEngine?: PartsEngine;
914
+ partsEngine?: PartsEngine
913
915
 
914
- autorouter?: AutorouterProp;
916
+ autorouter?: AutorouterProp
915
917
 
916
918
  // TODO this follows a subset of the localStorage interface
917
- localCacheEngine?: any;
919
+ localCacheEngine?: any
918
920
 
919
- registryApiUrl?: string;
921
+ registryApiUrl?: string
920
922
 
921
- cloudAutorouterUrl?: string;
923
+ cloudAutorouterUrl?: string
922
924
 
923
- projectName?: string;
924
- version?: string;
925
- url?: string;
926
- printBoardInformationToSilkscreen?: boolean;
925
+ projectName?: string
926
+ version?: string
927
+ url?: string
928
+ printBoardInformationToSilkscreen?: boolean
927
929
 
928
- pcbDisabled?: boolean;
929
- schematicDisabled?: boolean;
930
- partsEngineDisabled?: boolean;
930
+ pcbDisabled?: boolean
931
+ schematicDisabled?: boolean
932
+ partsEngineDisabled?: boolean
931
933
 
932
934
  footprintLibraryMap?: Record<
933
935
  string,
@@ -935,10 +937,10 @@ export interface PlatformConfig {
935
937
  string,
936
938
  | any[]
937
939
  | ((path: string) => Promise<{
938
- footprintCircuitJson: any[];
940
+ footprintCircuitJson: any[]
939
941
  }>)
940
942
  >
941
- >;
943
+ >
942
944
  }
943
945
  ```
944
946