@tscircuit/props 0.0.418 → 0.0.420
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 +83 -64
- package/dist/index.d.ts +794 -1
- package/dist/index.js +990 -971
- package/dist/index.js.map +1 -1
- package/lib/common/layout.ts +3 -0
- package/lib/common/schStyle.ts +17 -0
- package/lib/common/schematicSize.ts +8 -0
- package/lib/components/capacitor.ts +6 -0
- package/lib/components/resistor.ts +6 -0
- package/lib/index.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -199,8 +199,9 @@ export interface AnalogSimulationProps {
|
|
|
199
199
|
### BatteryProps `<battery />`
|
|
200
200
|
|
|
201
201
|
```ts
|
|
202
|
-
export interface BatteryProps<
|
|
203
|
-
extends
|
|
202
|
+
export interface BatteryProps<
|
|
203
|
+
PinLabel extends string = string,
|
|
204
|
+
> extends CommonComponentProps<PinLabel> {
|
|
204
205
|
capacity?: number | string;
|
|
205
206
|
voltage?: number | string;
|
|
206
207
|
standard?: "AA" | "AAA" | "9V" | "CR2032" | "18650" | "C";
|
|
@@ -213,8 +214,10 @@ export interface BatteryProps<PinLabel extends string = string>
|
|
|
213
214
|
### BoardProps `<board />`
|
|
214
215
|
|
|
215
216
|
```ts
|
|
216
|
-
export interface BoardProps
|
|
217
|
-
|
|
217
|
+
export interface BoardProps extends Omit<
|
|
218
|
+
SubcircuitGroupProps,
|
|
219
|
+
"subcircuit" | "connections"
|
|
220
|
+
> {
|
|
218
221
|
title?: string;
|
|
219
222
|
material?: "fr4" | "fr1";
|
|
220
223
|
/** Number of layers for the PCB */
|
|
@@ -247,8 +250,10 @@ export interface BoardProps
|
|
|
247
250
|
### BreakoutProps `<breakout />`
|
|
248
251
|
|
|
249
252
|
```ts
|
|
250
|
-
export interface BreakoutProps
|
|
251
|
-
|
|
253
|
+
export interface BreakoutProps extends Omit<
|
|
254
|
+
SubcircuitGroupProps,
|
|
255
|
+
"subcircuit"
|
|
256
|
+
> {
|
|
252
257
|
padding?: Distance;
|
|
253
258
|
paddingLeft?: Distance;
|
|
254
259
|
paddingRight?: Distance;
|
|
@@ -262,8 +267,10 @@ export interface BreakoutProps
|
|
|
262
267
|
### BreakoutPointProps `<breakoutpoint />`
|
|
263
268
|
|
|
264
269
|
```ts
|
|
265
|
-
export interface BreakoutPointProps
|
|
266
|
-
|
|
270
|
+
export interface BreakoutPointProps extends Omit<
|
|
271
|
+
PcbLayoutProps,
|
|
272
|
+
"pcbRotation" | "layer"
|
|
273
|
+
> {
|
|
267
274
|
connection: string;
|
|
268
275
|
}
|
|
269
276
|
```
|
|
@@ -311,8 +318,9 @@ export interface CadModelProps extends CadModelBase {
|
|
|
311
318
|
### CapacitorProps `<capacitor />`
|
|
312
319
|
|
|
313
320
|
```ts
|
|
314
|
-
export interface CapacitorProps<
|
|
315
|
-
extends
|
|
321
|
+
export interface CapacitorProps<
|
|
322
|
+
PinLabel extends string = string,
|
|
323
|
+
> extends CommonComponentProps<PinLabel> {
|
|
316
324
|
capacitance: number | string;
|
|
317
325
|
maxVoltageRating?: number | string;
|
|
318
326
|
schShowRatings?: boolean;
|
|
@@ -323,6 +331,7 @@ export interface CapacitorProps<PinLabel extends string = string>
|
|
|
323
331
|
bypassTo?: string;
|
|
324
332
|
maxDecouplingTraceLength?: number;
|
|
325
333
|
schOrientation?: SchematicOrientation;
|
|
334
|
+
schSize?: SchematicSymbolSize;
|
|
326
335
|
connections?: Connections<CapacitorPinLabels>;
|
|
327
336
|
}
|
|
328
337
|
```
|
|
@@ -464,8 +473,9 @@ export type CourtyardRectProps = z.input<typeof courtyardRectProps>;
|
|
|
464
473
|
### CrystalProps `<crystal />`
|
|
465
474
|
|
|
466
475
|
```ts
|
|
467
|
-
export interface CrystalProps<
|
|
468
|
-
extends
|
|
476
|
+
export interface CrystalProps<
|
|
477
|
+
PinLabel extends string = string,
|
|
478
|
+
> extends CommonComponentProps<PinLabel> {
|
|
469
479
|
frequency: number | string;
|
|
470
480
|
loadCapacitance: number | string;
|
|
471
481
|
manufacturerPartNumber?: string;
|
|
@@ -481,8 +491,10 @@ export interface CrystalProps<PinLabel extends string = string>
|
|
|
481
491
|
### RectCutoutProps `<cutout />`
|
|
482
492
|
|
|
483
493
|
```ts
|
|
484
|
-
export interface RectCutoutProps
|
|
485
|
-
|
|
494
|
+
export interface RectCutoutProps extends Omit<
|
|
495
|
+
PcbLayoutProps,
|
|
496
|
+
"layer" | "pcbRotation"
|
|
497
|
+
> {
|
|
486
498
|
name?: string;
|
|
487
499
|
shape: "rect";
|
|
488
500
|
width: Distance;
|
|
@@ -495,8 +507,9 @@ export interface RectCutoutProps
|
|
|
495
507
|
### DiodeProps `<diode />`
|
|
496
508
|
|
|
497
509
|
```ts
|
|
498
|
-
export interface DiodeProps<
|
|
499
|
-
extends
|
|
510
|
+
export interface DiodeProps<
|
|
511
|
+
PinLabel extends string = string,
|
|
512
|
+
> extends CommonComponentProps<PinLabel> {
|
|
500
513
|
connections?: {
|
|
501
514
|
anode?: string | string[] | readonly string[];
|
|
502
515
|
cathode?: string | string[] | readonly string[];
|
|
@@ -521,11 +534,10 @@ export interface DiodeProps<PinLabel extends string = string>
|
|
|
521
534
|
### FabricationNoteDimensionProps `<fabricationnotedimension />`
|
|
522
535
|
|
|
523
536
|
```ts
|
|
524
|
-
export interface FabricationNoteDimensionProps
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
> {
|
|
537
|
+
export interface FabricationNoteDimensionProps extends Omit<
|
|
538
|
+
PcbLayoutProps,
|
|
539
|
+
"pcbX" | "pcbY" | "pcbOffsetX" | "pcbOffsetY" | "pcbRotation"
|
|
540
|
+
> {
|
|
529
541
|
from: string | Point;
|
|
530
542
|
to: string | Point;
|
|
531
543
|
text?: string;
|
|
@@ -606,8 +618,9 @@ export interface FootprintProps {
|
|
|
606
618
|
### FuseProps `<fuse />`
|
|
607
619
|
|
|
608
620
|
```ts
|
|
609
|
-
export interface FuseProps<
|
|
610
|
-
extends
|
|
621
|
+
export interface FuseProps<
|
|
622
|
+
PinLabel extends string = string,
|
|
623
|
+
> extends CommonComponentProps<PinLabel> {
|
|
611
624
|
/**
|
|
612
625
|
* Current rating of the fuse in amperes
|
|
613
626
|
*/
|
|
@@ -783,8 +796,9 @@ export interface CircleHoleProps extends PcbLayoutProps {
|
|
|
783
796
|
### InductorProps `<inductor />`
|
|
784
797
|
|
|
785
798
|
```ts
|
|
786
|
-
export interface InductorProps<
|
|
787
|
-
extends
|
|
799
|
+
export interface InductorProps<
|
|
800
|
+
PinLabel extends string = string,
|
|
801
|
+
> extends CommonComponentProps<PinLabel> {
|
|
788
802
|
inductance: number | string;
|
|
789
803
|
maxCurrentRating?: number | string;
|
|
790
804
|
schOrientation?: SchematicOrientation;
|
|
@@ -856,8 +870,9 @@ export type LedProps = z.input<typeof ledProps>;
|
|
|
856
870
|
### MosfetProps `<mosfet />`
|
|
857
871
|
|
|
858
872
|
```ts
|
|
859
|
-
export interface MosfetProps<
|
|
860
|
-
extends
|
|
873
|
+
export interface MosfetProps<
|
|
874
|
+
PinLabel extends string = string,
|
|
875
|
+
> extends CommonComponentProps<PinLabel> {
|
|
861
876
|
channelType: "n" | "p";
|
|
862
877
|
mosfetMode: "enhancement" | "depletion";
|
|
863
878
|
}
|
|
@@ -944,11 +959,10 @@ export type PcbKeepoutProps = z.input<typeof pcbKeepoutProps>;
|
|
|
944
959
|
### PcbNoteDimensionProps `<pcbnotedimension />`
|
|
945
960
|
|
|
946
961
|
```ts
|
|
947
|
-
export interface PcbNoteDimensionProps
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
> {
|
|
962
|
+
export interface PcbNoteDimensionProps extends Omit<
|
|
963
|
+
PcbLayoutProps,
|
|
964
|
+
"pcbX" | "pcbY" | "pcbOffsetX" | "pcbOffsetY" | "pcbRotation"
|
|
965
|
+
> {
|
|
952
966
|
from: string | Point;
|
|
953
967
|
to: string | Point;
|
|
954
968
|
text?: string;
|
|
@@ -969,11 +983,10 @@ export interface PcbNoteDimensionProps
|
|
|
969
983
|
### PcbNoteLineProps `<pcbnoteline />`
|
|
970
984
|
|
|
971
985
|
```ts
|
|
972
|
-
export interface PcbNoteLineProps
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
> {
|
|
986
|
+
export interface PcbNoteLineProps extends Omit<
|
|
987
|
+
PcbLayoutProps,
|
|
988
|
+
"pcbX" | "pcbY" | "pcbOffsetX" | "pcbOffsetY" | "pcbRotation"
|
|
989
|
+
> {
|
|
977
990
|
x1: string | number;
|
|
978
991
|
y1: string | number;
|
|
979
992
|
x2: string | number;
|
|
@@ -989,11 +1002,10 @@ export interface PcbNoteLineProps
|
|
|
989
1002
|
### PcbNotePathProps `<pcbnotepath />`
|
|
990
1003
|
|
|
991
1004
|
```ts
|
|
992
|
-
export interface PcbNotePathProps
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
> {
|
|
1005
|
+
export interface PcbNotePathProps extends Omit<
|
|
1006
|
+
PcbLayoutProps,
|
|
1007
|
+
"pcbX" | "pcbY" | "pcbOffsetX" | "pcbOffsetY" | "pcbRotation"
|
|
1008
|
+
> {
|
|
997
1009
|
route: RouteHintPointInput[];
|
|
998
1010
|
strokeWidth?: string | number;
|
|
999
1011
|
color?: string;
|
|
@@ -1152,8 +1164,10 @@ export interface PinHeaderProps extends CommonComponentProps {
|
|
|
1152
1164
|
### CirclePlatedHoleProps `<platedhole />`
|
|
1153
1165
|
|
|
1154
1166
|
```ts
|
|
1155
|
-
export interface CirclePlatedHoleProps
|
|
1156
|
-
|
|
1167
|
+
export interface CirclePlatedHoleProps extends Omit<
|
|
1168
|
+
PcbLayoutProps,
|
|
1169
|
+
"pcbRotation" | "layer"
|
|
1170
|
+
> {
|
|
1157
1171
|
name?: string;
|
|
1158
1172
|
connectsTo?: string | string[];
|
|
1159
1173
|
shape: "circle";
|
|
@@ -1207,14 +1221,16 @@ export type PushButtonProps<T extends PinLabelsProp | string = string> =
|
|
|
1207
1221
|
### ResistorProps `<resistor />`
|
|
1208
1222
|
|
|
1209
1223
|
```ts
|
|
1210
|
-
export interface ResistorProps<
|
|
1211
|
-
extends
|
|
1224
|
+
export interface ResistorProps<
|
|
1225
|
+
PinLabel extends string = string,
|
|
1226
|
+
> extends CommonComponentProps<PinLabel> {
|
|
1212
1227
|
resistance: number | string;
|
|
1213
1228
|
pullupFor?: string;
|
|
1214
1229
|
pullupTo?: string;
|
|
1215
1230
|
pulldownFor?: string;
|
|
1216
1231
|
pulldownTo?: string;
|
|
1217
1232
|
schOrientation?: SchematicOrientation;
|
|
1233
|
+
schSize?: SchematicSymbolSize;
|
|
1218
1234
|
connections?: Connections<ResistorPinLabels>;
|
|
1219
1235
|
}
|
|
1220
1236
|
```
|
|
@@ -1411,8 +1427,10 @@ export interface SolderJumperProps extends JumperProps {
|
|
|
1411
1427
|
### RectSolderPasteProps `<solderpaste />`
|
|
1412
1428
|
|
|
1413
1429
|
```ts
|
|
1414
|
-
export interface RectSolderPasteProps
|
|
1415
|
-
|
|
1430
|
+
export interface RectSolderPasteProps extends Omit<
|
|
1431
|
+
PcbLayoutProps,
|
|
1432
|
+
"pcbRotation"
|
|
1433
|
+
> {
|
|
1416
1434
|
shape: "rect";
|
|
1417
1435
|
width: Distance;
|
|
1418
1436
|
height: Distance;
|
|
@@ -1538,8 +1556,9 @@ export type TraceHintProps = z.input<typeof traceHintProps>;
|
|
|
1538
1556
|
### TransistorProps `<transistor />`
|
|
1539
1557
|
|
|
1540
1558
|
```ts
|
|
1541
|
-
export interface TransistorProps<
|
|
1542
|
-
extends
|
|
1559
|
+
export interface TransistorProps<
|
|
1560
|
+
PinLabel extends string = string,
|
|
1561
|
+
> extends CommonComponentProps<PinLabel> {
|
|
1543
1562
|
type: "npn" | "pnp" | "bjt" | "jfet" | "mosfet" | "igbt";
|
|
1544
1563
|
connections?: Connections<transistorPinsLabels>;
|
|
1545
1564
|
}
|
|
@@ -1579,8 +1598,9 @@ export interface VoltageProbeProps extends Omit<CommonComponentProps, "name"> {
|
|
|
1579
1598
|
### VoltageSourceProps `<voltagesource />`
|
|
1580
1599
|
|
|
1581
1600
|
```ts
|
|
1582
|
-
export interface VoltageSourceProps<
|
|
1583
|
-
extends
|
|
1601
|
+
export interface VoltageSourceProps<
|
|
1602
|
+
PinLabel extends string = string,
|
|
1603
|
+
> extends CommonComponentProps<PinLabel> {
|
|
1584
1604
|
voltage?: number | string;
|
|
1585
1605
|
frequency?: number | string;
|
|
1586
1606
|
peakToPeakVoltage?: number | string;
|
|
@@ -1666,18 +1686,17 @@ export interface PlatformConfig {
|
|
|
1666
1686
|
### ProjectConfig
|
|
1667
1687
|
|
|
1668
1688
|
```ts
|
|
1669
|
-
export interface ProjectConfig
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
> {}
|
|
1689
|
+
export interface ProjectConfig extends Pick<
|
|
1690
|
+
PlatformConfig,
|
|
1691
|
+
| "projectName"
|
|
1692
|
+
| "projectBaseUrl"
|
|
1693
|
+
| "version"
|
|
1694
|
+
| "url"
|
|
1695
|
+
| "printBoardInformationToSilkscreen"
|
|
1696
|
+
| "includeBoardFiles"
|
|
1697
|
+
| "snapshotsDir"
|
|
1698
|
+
| "defaultSpiceEngine"
|
|
1699
|
+
> {}
|
|
1681
1700
|
```
|
|
1682
1701
|
|
|
1683
1702
|
[Source](https://github.com/tscircuit/props/blob/main/lib/projectConfig.ts)
|