@tscircuit/props 0.0.276 → 0.0.277
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 +284 -283
- package/dist/index.d.ts +6 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/lib/components/crystal.ts +7 -2
- package/package.json +1 -1
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,49 @@ 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
|
+
schTitle?: string;
|
|
400
401
|
|
|
401
|
-
pcbWidth?: Distance
|
|
402
|
-
pcbHeight?: Distance
|
|
403
|
-
schWidth?: Distance
|
|
404
|
-
schHeight?: Distance
|
|
402
|
+
pcbWidth?: Distance;
|
|
403
|
+
pcbHeight?: Distance;
|
|
404
|
+
schWidth?: Distance;
|
|
405
|
+
schHeight?: Distance;
|
|
405
406
|
|
|
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
|
|
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;
|
|
415
416
|
|
|
416
417
|
/** @deprecated Use `pcbGrid` */
|
|
417
|
-
grid?: boolean
|
|
418
|
+
grid?: boolean;
|
|
418
419
|
/** @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
|
-
|
|
433
|
-
|
|
420
|
+
flex?: boolean | string;
|
|
421
|
+
|
|
422
|
+
pcbGrid?: boolean;
|
|
423
|
+
pcbGridCols?: number | string;
|
|
424
|
+
pcbGridRows?: number | string;
|
|
425
|
+
pcbGridTemplateRows?: string;
|
|
426
|
+
pcbGridTemplateColumns?: string;
|
|
427
|
+
pcbGridTemplate?: string;
|
|
428
|
+
pcbGridGap?: number | string;
|
|
429
|
+
pcbGridRowGap?: number | string;
|
|
430
|
+
pcbGridColumnGap?: number | string;
|
|
431
|
+
|
|
432
|
+
pcbFlex?: boolean | string;
|
|
433
|
+
pcbFlexGap?: number | string;
|
|
434
|
+
pcbFlexDirection?: "row" | "column";
|
|
435
|
+
pcbAlignItems?: "start" | "center" | "end" | "stretch";
|
|
434
436
|
pcbJustifyContent?:
|
|
435
437
|
| "start"
|
|
436
438
|
| "center"
|
|
@@ -438,12 +440,11 @@ export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
|
|
|
438
440
|
| "stretch"
|
|
439
441
|
| "space-between"
|
|
440
442
|
| "space-around"
|
|
441
|
-
| "space-evenly"
|
|
442
|
-
pcbFlexRow?: boolean
|
|
443
|
-
pcbFlexColumn?: boolean
|
|
444
|
-
pcbGap?: number | string
|
|
445
|
-
|
|
446
|
-
pcbPack?: boolean
|
|
443
|
+
| "space-evenly";
|
|
444
|
+
pcbFlexRow?: boolean;
|
|
445
|
+
pcbFlexColumn?: boolean;
|
|
446
|
+
pcbGap?: number | string;
|
|
447
|
+
pcbPack?: boolean;
|
|
447
448
|
}
|
|
448
449
|
```
|
|
449
450
|
|
|
@@ -453,9 +454,9 @@ export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
|
|
|
453
454
|
|
|
454
455
|
```ts
|
|
455
456
|
export interface HoleProps extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
456
|
-
name?: string
|
|
457
|
-
diameter?: Distance
|
|
458
|
-
radius?: Distance
|
|
457
|
+
name?: string;
|
|
458
|
+
diameter?: Distance;
|
|
459
|
+
radius?: Distance;
|
|
459
460
|
}
|
|
460
461
|
```
|
|
461
462
|
|
|
@@ -466,9 +467,9 @@ export interface HoleProps extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
|
466
467
|
```ts
|
|
467
468
|
export interface InductorProps<PinLabel extends string = string>
|
|
468
469
|
extends CommonComponentProps<PinLabel> {
|
|
469
|
-
inductance: number | string
|
|
470
|
-
maxCurrentRating?: number | string
|
|
471
|
-
schOrientation?: SchematicOrientation
|
|
470
|
+
inductance: number | string;
|
|
471
|
+
maxCurrentRating?: number | string;
|
|
472
|
+
schOrientation?: SchematicOrientation;
|
|
472
473
|
}
|
|
473
474
|
```
|
|
474
475
|
|
|
@@ -478,34 +479,34 @@ export interface InductorProps<PinLabel extends string = string>
|
|
|
478
479
|
|
|
479
480
|
```ts
|
|
480
481
|
export interface JumperProps extends CommonComponentProps {
|
|
481
|
-
manufacturerPartNumber?: string
|
|
482
|
+
manufacturerPartNumber?: string;
|
|
482
483
|
pinLabels?: Record<
|
|
483
484
|
number | SchematicPinLabel,
|
|
484
485
|
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
|
|
486
|
+
>;
|
|
487
|
+
schPinStyle?: SchematicPinStyle;
|
|
488
|
+
schPinSpacing?: number | string;
|
|
489
|
+
schWidth?: number | string;
|
|
490
|
+
schHeight?: number | string;
|
|
491
|
+
schDirection?: "left" | "right";
|
|
492
|
+
schPortArrangement?: SchematicPortArrangement;
|
|
492
493
|
/**
|
|
493
494
|
* Labels for PCB pins
|
|
494
495
|
*/
|
|
495
|
-
pcbPinLabels?: Record<string, string
|
|
496
|
+
pcbPinLabels?: Record<string, string>;
|
|
496
497
|
/**
|
|
497
498
|
* Number of pins on the jumper (2 or 3)
|
|
498
499
|
*/
|
|
499
|
-
pinCount?: 2 | 3
|
|
500
|
+
pinCount?: 2 | 3;
|
|
500
501
|
/**
|
|
501
502
|
* Groups of pins that are internally connected
|
|
502
503
|
* e.g., [["1","2"], ["2","3"]]
|
|
503
504
|
*/
|
|
504
|
-
internallyConnectedPins?: string[][]
|
|
505
|
+
internallyConnectedPins?: string[][];
|
|
505
506
|
/**
|
|
506
507
|
* Connections to other components
|
|
507
508
|
*/
|
|
508
|
-
connections?: Connections<string
|
|
509
|
+
connections?: Connections<string>;
|
|
509
510
|
}
|
|
510
511
|
```
|
|
511
512
|
|
|
@@ -516,8 +517,8 @@ export interface JumperProps extends CommonComponentProps {
|
|
|
516
517
|
```ts
|
|
517
518
|
export interface MosfetProps<PinLabel extends string = string>
|
|
518
519
|
extends CommonComponentProps<PinLabel> {
|
|
519
|
-
channelType: "n" | "p"
|
|
520
|
-
mosfetMode: "enhancement" | "depletion"
|
|
520
|
+
channelType: "n" | "p";
|
|
521
|
+
mosfetMode: "enhancement" | "depletion";
|
|
521
522
|
}
|
|
522
523
|
```
|
|
523
524
|
|
|
@@ -527,8 +528,8 @@ export interface MosfetProps<PinLabel extends string = string>
|
|
|
527
528
|
|
|
528
529
|
```ts
|
|
529
530
|
export interface NetProps {
|
|
530
|
-
name: string
|
|
531
|
-
connectsTo?: string | string[]
|
|
531
|
+
name: string;
|
|
532
|
+
connectsTo?: string | string[];
|
|
532
533
|
}
|
|
533
534
|
```
|
|
534
535
|
|
|
@@ -538,12 +539,12 @@ export interface NetProps {
|
|
|
538
539
|
|
|
539
540
|
```ts
|
|
540
541
|
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"
|
|
542
|
+
net?: string;
|
|
543
|
+
connection?: string;
|
|
544
|
+
schX?: number | string;
|
|
545
|
+
schY?: number | string;
|
|
546
|
+
schRotation?: number | string;
|
|
547
|
+
anchorSide?: "left" | "top" | "right" | "bottom";
|
|
547
548
|
}
|
|
548
549
|
```
|
|
549
550
|
|
|
@@ -553,13 +554,13 @@ export interface NetAliasProps {
|
|
|
553
554
|
|
|
554
555
|
```ts
|
|
555
556
|
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"
|
|
557
|
+
net?: string;
|
|
558
|
+
connection?: string;
|
|
559
|
+
connectsTo?: string | string[];
|
|
560
|
+
schX?: number | string;
|
|
561
|
+
schY?: number | string;
|
|
562
|
+
schRotation?: number | string;
|
|
563
|
+
anchorSide?: "left" | "top" | "right" | "bottom";
|
|
563
564
|
}
|
|
564
565
|
```
|
|
565
566
|
|
|
@@ -572,92 +573,92 @@ export interface PinHeaderProps extends CommonComponentProps {
|
|
|
572
573
|
/**
|
|
573
574
|
* Number of pins in the header
|
|
574
575
|
*/
|
|
575
|
-
pinCount: number
|
|
576
|
+
pinCount: number;
|
|
576
577
|
|
|
577
578
|
/**
|
|
578
579
|
* Distance between pins
|
|
579
580
|
*/
|
|
580
|
-
pitch?: number | string
|
|
581
|
+
pitch?: number | string;
|
|
581
582
|
|
|
582
583
|
/**
|
|
583
584
|
* Schematic facing direction
|
|
584
585
|
*/
|
|
585
|
-
schFacingDirection?: "up" | "down" | "left" | "right"
|
|
586
|
+
schFacingDirection?: "up" | "down" | "left" | "right";
|
|
586
587
|
|
|
587
588
|
/**
|
|
588
589
|
* Whether the header is male, female, or unpopulated
|
|
589
590
|
*/
|
|
590
|
-
gender?: "male" | "female" | "unpopulated"
|
|
591
|
+
gender?: "male" | "female" | "unpopulated";
|
|
591
592
|
|
|
592
593
|
/**
|
|
593
594
|
* Whether to show pin labels in silkscreen
|
|
594
595
|
*/
|
|
595
|
-
showSilkscreenPinLabels?: boolean
|
|
596
|
+
showSilkscreenPinLabels?: boolean;
|
|
596
597
|
|
|
597
598
|
/**
|
|
598
599
|
* Labels for PCB pins
|
|
599
600
|
*/
|
|
600
|
-
pcbPinLabels?: Record<string, string
|
|
601
|
+
pcbPinLabels?: Record<string, string>;
|
|
601
602
|
|
|
602
603
|
/**
|
|
603
604
|
* Whether the header has two rows of pins
|
|
604
605
|
*/
|
|
605
|
-
doubleRow?: boolean
|
|
606
|
+
doubleRow?: boolean;
|
|
606
607
|
|
|
607
608
|
/**
|
|
608
609
|
* If true, the header is a right-angle style connector
|
|
609
610
|
*/
|
|
610
|
-
rightAngle?: boolean
|
|
611
|
+
rightAngle?: boolean;
|
|
611
612
|
|
|
612
613
|
/**
|
|
613
614
|
* Diameter of the through-hole for each pin
|
|
614
615
|
*/
|
|
615
|
-
holeDiameter?: number | string
|
|
616
|
+
holeDiameter?: number | string;
|
|
616
617
|
|
|
617
618
|
/**
|
|
618
619
|
* Diameter of the plated area around each hole
|
|
619
620
|
*/
|
|
620
|
-
platedDiameter?: number | string
|
|
621
|
+
platedDiameter?: number | string;
|
|
621
622
|
|
|
622
623
|
/**
|
|
623
624
|
* Labels for each pin
|
|
624
625
|
*/
|
|
625
|
-
pinLabels?: SchematicPinLabel[]
|
|
626
|
+
pinLabels?: SchematicPinLabel[];
|
|
626
627
|
|
|
627
628
|
/**
|
|
628
629
|
* Connections to other components
|
|
629
630
|
*/
|
|
630
|
-
connections?: Connections<string
|
|
631
|
+
connections?: Connections<string>;
|
|
631
632
|
|
|
632
633
|
/**
|
|
633
634
|
* Direction the header is facing
|
|
634
635
|
*/
|
|
635
|
-
facingDirection?: "left" | "right"
|
|
636
|
+
facingDirection?: "left" | "right";
|
|
636
637
|
|
|
637
638
|
/**
|
|
638
639
|
* Pin arrangement in schematic view
|
|
639
640
|
*/
|
|
640
|
-
schPinArrangement?: SchematicPinArrangement
|
|
641
|
+
schPinArrangement?: SchematicPinArrangement;
|
|
641
642
|
|
|
642
643
|
/**
|
|
643
644
|
* Schematic pin style (margins, etc)
|
|
644
645
|
*/
|
|
645
|
-
schPinStyle?: SchematicPinStyle
|
|
646
|
+
schPinStyle?: SchematicPinStyle;
|
|
646
647
|
|
|
647
648
|
/**
|
|
648
649
|
* Schematic pin spacing
|
|
649
650
|
*/
|
|
650
|
-
schPinSpacing?: number | string
|
|
651
|
+
schPinSpacing?: number | string;
|
|
651
652
|
|
|
652
653
|
/**
|
|
653
654
|
* Schematic width
|
|
654
655
|
*/
|
|
655
|
-
schWidth?: number | string
|
|
656
|
+
schWidth?: number | string;
|
|
656
657
|
|
|
657
658
|
/**
|
|
658
659
|
* Schematic height
|
|
659
660
|
*/
|
|
660
|
-
schHeight?: number | string
|
|
661
|
+
schHeight?: number | string;
|
|
661
662
|
}
|
|
662
663
|
```
|
|
663
664
|
|
|
@@ -668,12 +669,12 @@ export interface PinHeaderProps extends CommonComponentProps {
|
|
|
668
669
|
```ts
|
|
669
670
|
export interface CirclePlatedHoleProps
|
|
670
671
|
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
|
|
672
|
+
name?: string;
|
|
673
|
+
connectsTo?: string | string[];
|
|
674
|
+
shape: "circle";
|
|
675
|
+
holeDiameter: number | string;
|
|
676
|
+
outerDiameter: number | string;
|
|
677
|
+
portHints?: PortHints;
|
|
677
678
|
}
|
|
678
679
|
```
|
|
679
680
|
|
|
@@ -683,8 +684,8 @@ export interface CirclePlatedHoleProps
|
|
|
683
684
|
|
|
684
685
|
```ts
|
|
685
686
|
export interface PotentiometerProps extends CommonComponentProps {
|
|
686
|
-
maxResistance: number | string
|
|
687
|
-
pinVariant?: PotentiometerPinVariant
|
|
687
|
+
maxResistance: number | string;
|
|
688
|
+
pinVariant?: PotentiometerPinVariant;
|
|
688
689
|
}
|
|
689
690
|
```
|
|
690
691
|
|
|
@@ -695,13 +696,13 @@ export interface PotentiometerProps extends CommonComponentProps {
|
|
|
695
696
|
```ts
|
|
696
697
|
export interface ResistorProps<PinLabel extends string = string>
|
|
697
698
|
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
|
|
699
|
+
resistance: number | string;
|
|
700
|
+
pullupFor?: string;
|
|
701
|
+
pullupTo?: string;
|
|
702
|
+
pulldownFor?: string;
|
|
703
|
+
pulldownTo?: string;
|
|
704
|
+
schOrientation?: SchematicOrientation;
|
|
705
|
+
connections?: Connections<ResistorPinLabels>;
|
|
705
706
|
}
|
|
706
707
|
```
|
|
707
708
|
|
|
@@ -711,9 +712,9 @@ export interface ResistorProps<PinLabel extends string = string>
|
|
|
711
712
|
|
|
712
713
|
```ts
|
|
713
714
|
export interface ResonatorProps extends CommonComponentProps {
|
|
714
|
-
frequency: number | string
|
|
715
|
-
loadCapacitance: number | string
|
|
716
|
-
pinVariant?: ResonatorPinVariant
|
|
715
|
+
frequency: number | string;
|
|
716
|
+
loadCapacitance: number | string;
|
|
717
|
+
pinVariant?: ResonatorPinVariant;
|
|
717
718
|
}
|
|
718
719
|
```
|
|
719
720
|
|
|
@@ -723,14 +724,14 @@ export interface ResonatorProps extends CommonComponentProps {
|
|
|
723
724
|
|
|
724
725
|
```ts
|
|
725
726
|
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
|
|
727
|
+
children?: string;
|
|
728
|
+
horizontalAlign?: "left" | "center" | "right";
|
|
729
|
+
verticalAlign?: "top" | "middle" | "bottom";
|
|
730
|
+
fontSize?: number | string;
|
|
731
|
+
rowSpan?: number;
|
|
732
|
+
colSpan?: number;
|
|
733
|
+
width?: number | string;
|
|
734
|
+
text?: string;
|
|
734
735
|
}
|
|
735
736
|
```
|
|
736
737
|
|
|
@@ -740,8 +741,8 @@ export interface SchematicCellProps {
|
|
|
740
741
|
|
|
741
742
|
```ts
|
|
742
743
|
export interface SchematicRowProps {
|
|
743
|
-
children?: any
|
|
744
|
-
height?: number | string
|
|
744
|
+
children?: any;
|
|
745
|
+
height?: number | string;
|
|
745
746
|
}
|
|
746
747
|
```
|
|
747
748
|
|
|
@@ -751,13 +752,13 @@ export interface SchematicRowProps {
|
|
|
751
752
|
|
|
752
753
|
```ts
|
|
753
754
|
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
|
|
755
|
+
schX?: number | string;
|
|
756
|
+
schY?: number | string;
|
|
757
|
+
children?: any;
|
|
758
|
+
cellPadding?: number | string;
|
|
759
|
+
borderWidth?: number | string;
|
|
760
|
+
anchor?: z.infer<typeof ninePointAnchor>;
|
|
761
|
+
fontSize?: number | string;
|
|
761
762
|
}
|
|
762
763
|
```
|
|
763
764
|
|
|
@@ -767,11 +768,11 @@ export interface SchematicTableProps {
|
|
|
767
768
|
|
|
768
769
|
```ts
|
|
769
770
|
export interface RectSmtPadProps extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
770
|
-
name?: string
|
|
771
|
-
shape: "rect"
|
|
772
|
-
width: Distance
|
|
773
|
-
height: Distance
|
|
774
|
-
portHints?: PortHints
|
|
771
|
+
name?: string;
|
|
772
|
+
shape: "rect";
|
|
773
|
+
width: Distance;
|
|
774
|
+
height: Distance;
|
|
775
|
+
portHints?: PortHints;
|
|
775
776
|
}
|
|
776
777
|
```
|
|
777
778
|
|
|
@@ -784,11 +785,11 @@ export interface SolderJumperProps extends JumperProps {
|
|
|
784
785
|
/**
|
|
785
786
|
* Pins that are bridged with solder by default
|
|
786
787
|
*/
|
|
787
|
-
bridgedPins?: string[][]
|
|
788
|
+
bridgedPins?: string[][];
|
|
788
789
|
/**
|
|
789
790
|
* If true, all pins are connected with cuttable traces
|
|
790
791
|
*/
|
|
791
|
-
bridged?: boolean
|
|
792
|
+
bridged?: boolean;
|
|
792
793
|
}
|
|
793
794
|
```
|
|
794
795
|
|
|
@@ -799,9 +800,9 @@ export interface SolderJumperProps extends JumperProps {
|
|
|
799
800
|
```ts
|
|
800
801
|
export interface RectSolderPasteProps
|
|
801
802
|
extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
802
|
-
shape: "rect"
|
|
803
|
-
width: Distance
|
|
804
|
-
height: Distance
|
|
803
|
+
shape: "rect";
|
|
804
|
+
width: Distance;
|
|
805
|
+
height: Distance;
|
|
805
806
|
}
|
|
806
807
|
```
|
|
807
808
|
|
|
@@ -811,16 +812,16 @@ export interface RectSolderPasteProps
|
|
|
811
812
|
|
|
812
813
|
```ts
|
|
813
814
|
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
|
|
815
|
+
leftPinCount?: number;
|
|
816
|
+
rightPinCount?: number;
|
|
817
|
+
topPinCount?: number;
|
|
818
|
+
bottomPinCount?: number;
|
|
819
|
+
leftPins?: string[];
|
|
820
|
+
rightPins?: string[];
|
|
821
|
+
topPins?: string[];
|
|
822
|
+
bottomPins?: string[];
|
|
823
|
+
pinPitch?: number | string;
|
|
824
|
+
innerHoles?: boolean;
|
|
824
825
|
}
|
|
825
826
|
```
|
|
826
827
|
|
|
@@ -830,12 +831,12 @@ export interface StampboardProps extends BoardProps {
|
|
|
830
831
|
|
|
831
832
|
```ts
|
|
832
833
|
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
|
|
834
|
+
type?: "spst" | "spdt" | "dpst" | "dpdt";
|
|
835
|
+
isNormallyClosed?: boolean;
|
|
836
|
+
spdt?: boolean;
|
|
837
|
+
spst?: boolean;
|
|
838
|
+
dpst?: boolean;
|
|
839
|
+
dpdt?: boolean;
|
|
839
840
|
}
|
|
840
841
|
```
|
|
841
842
|
|
|
@@ -848,27 +849,27 @@ export interface TestpointProps extends CommonComponentProps {
|
|
|
848
849
|
/**
|
|
849
850
|
* The footprint variant of the testpoint either a surface pad or through-hole
|
|
850
851
|
*/
|
|
851
|
-
footprintVariant?: "pad" | "through_hole"
|
|
852
|
+
footprintVariant?: "pad" | "through_hole";
|
|
852
853
|
/**
|
|
853
854
|
* The shape of the pad if using a pad variant
|
|
854
855
|
*/
|
|
855
|
-
padShape?: "rect" | "circle"
|
|
856
|
+
padShape?: "rect" | "circle";
|
|
856
857
|
/**
|
|
857
858
|
* Diameter of the copper pad (applies to both SMD pads and plated holes)
|
|
858
859
|
*/
|
|
859
|
-
padDiameter?: number | string
|
|
860
|
+
padDiameter?: number | string;
|
|
860
861
|
/**
|
|
861
862
|
* Diameter of the hole if using a through-hole testpoint
|
|
862
863
|
*/
|
|
863
|
-
holeDiameter?: number | string
|
|
864
|
+
holeDiameter?: number | string;
|
|
864
865
|
/**
|
|
865
866
|
* Width of the pad when padShape is rect
|
|
866
867
|
*/
|
|
867
|
-
width?: number | string
|
|
868
|
+
width?: number | string;
|
|
868
869
|
/**
|
|
869
870
|
* Height of the pad when padShape is rect
|
|
870
871
|
*/
|
|
871
|
-
height?: number | string
|
|
872
|
+
height?: number | string;
|
|
872
873
|
}
|
|
873
874
|
```
|
|
874
875
|
|
|
@@ -879,8 +880,8 @@ export interface TestpointProps extends CommonComponentProps {
|
|
|
879
880
|
```ts
|
|
880
881
|
export interface TransistorProps<PinLabel extends string = string>
|
|
881
882
|
extends CommonComponentProps<PinLabel> {
|
|
882
|
-
type: "npn" | "pnp" | "bjt" | "jfet" | "mosfet" | "igbt"
|
|
883
|
-
connections?: Connections<transistorPinsLabels
|
|
883
|
+
type: "npn" | "pnp" | "bjt" | "jfet" | "mosfet" | "igbt";
|
|
884
|
+
connections?: Connections<transistorPinsLabels>;
|
|
884
885
|
}
|
|
885
886
|
```
|
|
886
887
|
|
|
@@ -890,12 +891,12 @@ export interface TransistorProps<PinLabel extends string = string>
|
|
|
890
891
|
|
|
891
892
|
```ts
|
|
892
893
|
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[]
|
|
894
|
+
name?: string;
|
|
895
|
+
fromLayer: LayerRefInput;
|
|
896
|
+
toLayer: LayerRefInput;
|
|
897
|
+
holeDiameter: number | string;
|
|
898
|
+
outerDiameter: number | string;
|
|
899
|
+
connectsTo?: string | string[];
|
|
899
900
|
}
|
|
900
901
|
```
|
|
901
902
|
|
|
@@ -911,25 +912,25 @@ export interface ViaProps extends CommonLayoutProps {
|
|
|
911
912
|
|
|
912
913
|
```ts
|
|
913
914
|
export interface PlatformConfig {
|
|
914
|
-
partsEngine?: PartsEngine
|
|
915
|
+
partsEngine?: PartsEngine;
|
|
915
916
|
|
|
916
|
-
autorouter?: AutorouterProp
|
|
917
|
+
autorouter?: AutorouterProp;
|
|
917
918
|
|
|
918
919
|
// TODO this follows a subset of the localStorage interface
|
|
919
|
-
localCacheEngine?: any
|
|
920
|
+
localCacheEngine?: any;
|
|
920
921
|
|
|
921
|
-
registryApiUrl?: string
|
|
922
|
+
registryApiUrl?: string;
|
|
922
923
|
|
|
923
|
-
cloudAutorouterUrl?: string
|
|
924
|
+
cloudAutorouterUrl?: string;
|
|
924
925
|
|
|
925
|
-
projectName?: string
|
|
926
|
-
version?: string
|
|
927
|
-
url?: string
|
|
928
|
-
printBoardInformationToSilkscreen?: boolean
|
|
926
|
+
projectName?: string;
|
|
927
|
+
version?: string;
|
|
928
|
+
url?: string;
|
|
929
|
+
printBoardInformationToSilkscreen?: boolean;
|
|
929
930
|
|
|
930
|
-
pcbDisabled?: boolean
|
|
931
|
-
schematicDisabled?: boolean
|
|
932
|
-
partsEngineDisabled?: boolean
|
|
931
|
+
pcbDisabled?: boolean;
|
|
932
|
+
schematicDisabled?: boolean;
|
|
933
|
+
partsEngineDisabled?: boolean;
|
|
933
934
|
|
|
934
935
|
footprintLibraryMap?: Record<
|
|
935
936
|
string,
|
|
@@ -937,10 +938,10 @@ export interface PlatformConfig {
|
|
|
937
938
|
string,
|
|
938
939
|
| any[]
|
|
939
940
|
| ((path: string) => Promise<{
|
|
940
|
-
footprintCircuitJson: any[]
|
|
941
|
+
footprintCircuitJson: any[];
|
|
941
942
|
}>)
|
|
942
943
|
>
|
|
943
|
-
|
|
944
|
+
>;
|
|
944
945
|
}
|
|
945
946
|
```
|
|
946
947
|
|