@tscircuit/props 0.0.527 → 0.0.528
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 +106 -127
- package/dist/index.d.ts +1175 -1
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/lib/components/resistor.ts +55 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -234,9 +234,8 @@ export interface AutoroutingPhaseProps extends RoutingTolerances {
|
|
|
234
234
|
### BatteryProps `<battery />`
|
|
235
235
|
|
|
236
236
|
```ts
|
|
237
|
-
export interface BatteryProps<
|
|
238
|
-
|
|
239
|
-
> extends CommonComponentProps<PinLabel> {
|
|
237
|
+
export interface BatteryProps<PinLabel extends string = string>
|
|
238
|
+
extends CommonComponentProps<PinLabel> {
|
|
240
239
|
capacity?: number | string;
|
|
241
240
|
voltage?: number | string;
|
|
242
241
|
standard?: "AA" | "AAA" | "9V" | "CR2032" | "18650" | "C";
|
|
@@ -249,10 +248,8 @@ export interface BatteryProps<
|
|
|
249
248
|
### BoardProps `<board />`
|
|
250
249
|
|
|
251
250
|
```ts
|
|
252
|
-
export interface BoardProps
|
|
253
|
-
SubcircuitGroupProps,
|
|
254
|
-
"subcircuit" | "connections"
|
|
255
|
-
> {
|
|
251
|
+
export interface BoardProps
|
|
252
|
+
extends Omit<SubcircuitGroupProps, "subcircuit" | "connections"> {
|
|
256
253
|
title?: string;
|
|
257
254
|
material?: "fr4" | "fr1" | "flex";
|
|
258
255
|
/** Number of layers for the PCB */
|
|
@@ -286,10 +283,8 @@ export interface BoardProps extends Omit<
|
|
|
286
283
|
### BreakoutProps `<breakout />`
|
|
287
284
|
|
|
288
285
|
```ts
|
|
289
|
-
export interface BreakoutProps
|
|
290
|
-
SubcircuitGroupProps,
|
|
291
|
-
"subcircuit"
|
|
292
|
-
> {
|
|
286
|
+
export interface BreakoutProps
|
|
287
|
+
extends Omit<SubcircuitGroupProps, "subcircuit"> {
|
|
293
288
|
padding?: Distance;
|
|
294
289
|
paddingLeft?: Distance;
|
|
295
290
|
paddingRight?: Distance;
|
|
@@ -303,10 +298,8 @@ export interface BreakoutProps extends Omit<
|
|
|
303
298
|
### BreakoutPointProps `<breakoutpoint />`
|
|
304
299
|
|
|
305
300
|
```ts
|
|
306
|
-
export interface BreakoutPointProps
|
|
307
|
-
PcbLayoutProps,
|
|
308
|
-
"pcbRotation" | "layer"
|
|
309
|
-
> {
|
|
301
|
+
export interface BreakoutPointProps
|
|
302
|
+
extends Omit<PcbLayoutProps, "pcbRotation" | "layer"> {
|
|
310
303
|
connection: string;
|
|
311
304
|
}
|
|
312
305
|
```
|
|
@@ -358,9 +351,8 @@ export interface CadModelProps extends CadModelBase {
|
|
|
358
351
|
### CapacitorProps `<capacitor />`
|
|
359
352
|
|
|
360
353
|
```ts
|
|
361
|
-
export interface CapacitorProps<
|
|
362
|
-
|
|
363
|
-
> extends CommonComponentProps<PinLabel> {
|
|
354
|
+
export interface CapacitorProps<PinLabel extends string = string>
|
|
355
|
+
extends CommonComponentProps<PinLabel> {
|
|
364
356
|
capacitance: number | string;
|
|
365
357
|
maxVoltageRating?: number | string;
|
|
366
358
|
schShowRatings?: boolean;
|
|
@@ -521,9 +513,8 @@ export type CourtyardRectProps = z.input<typeof courtyardRectProps>;
|
|
|
521
513
|
### CrystalProps `<crystal />`
|
|
522
514
|
|
|
523
515
|
```ts
|
|
524
|
-
export interface CrystalProps<
|
|
525
|
-
|
|
526
|
-
> extends CommonComponentProps<PinLabel> {
|
|
516
|
+
export interface CrystalProps<PinLabel extends string = string>
|
|
517
|
+
extends CommonComponentProps<PinLabel> {
|
|
527
518
|
frequency: number | string;
|
|
528
519
|
loadCapacitance: number | string;
|
|
529
520
|
manufacturerPartNumber?: string;
|
|
@@ -539,9 +530,8 @@ export interface CrystalProps<
|
|
|
539
530
|
### CurrentSourceProps `<currentsource />`
|
|
540
531
|
|
|
541
532
|
```ts
|
|
542
|
-
export interface CurrentSourceProps<
|
|
543
|
-
|
|
544
|
-
> extends CommonComponentProps<PinLabel> {
|
|
533
|
+
export interface CurrentSourceProps<PinLabel extends string = string>
|
|
534
|
+
extends CommonComponentProps<PinLabel> {
|
|
545
535
|
current?: number | string;
|
|
546
536
|
frequency?: number | string;
|
|
547
537
|
peakToPeakCurrent?: number | string;
|
|
@@ -557,10 +547,8 @@ export interface CurrentSourceProps<
|
|
|
557
547
|
### RectCutoutProps `<cutout />`
|
|
558
548
|
|
|
559
549
|
```ts
|
|
560
|
-
export interface RectCutoutProps
|
|
561
|
-
PcbLayoutProps,
|
|
562
|
-
"layer" | "pcbRotation"
|
|
563
|
-
> {
|
|
550
|
+
export interface RectCutoutProps
|
|
551
|
+
extends Omit<PcbLayoutProps, "layer" | "pcbRotation"> {
|
|
564
552
|
name?: string;
|
|
565
553
|
shape: "rect";
|
|
566
554
|
width: Distance;
|
|
@@ -573,9 +561,8 @@ export interface RectCutoutProps extends Omit<
|
|
|
573
561
|
### DiodeProps `<diode />`
|
|
574
562
|
|
|
575
563
|
```ts
|
|
576
|
-
export interface DiodeProps<
|
|
577
|
-
|
|
578
|
-
> extends CommonComponentProps<PinLabel> {
|
|
564
|
+
export interface DiodeProps<PinLabel extends string = string>
|
|
565
|
+
extends CommonComponentProps<PinLabel> {
|
|
579
566
|
connections?: {
|
|
580
567
|
anode?: string | string[] | readonly string[];
|
|
581
568
|
cathode?: string | string[] | readonly string[];
|
|
@@ -600,18 +587,19 @@ export interface DiodeProps<
|
|
|
600
587
|
### FabricationNoteDimensionProps `<fabricationnotedimension />`
|
|
601
588
|
|
|
602
589
|
```ts
|
|
603
|
-
export interface FabricationNoteDimensionProps
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
590
|
+
export interface FabricationNoteDimensionProps
|
|
591
|
+
extends Omit<
|
|
592
|
+
PcbLayoutProps,
|
|
593
|
+
| "pcbLeftEdgeX"
|
|
594
|
+
| "pcbRightEdgeX"
|
|
595
|
+
| "pcbTopEdgeY"
|
|
596
|
+
| "pcbBottomEdgeY"
|
|
597
|
+
| "pcbX"
|
|
598
|
+
| "pcbY"
|
|
599
|
+
| "pcbOffsetX"
|
|
600
|
+
| "pcbOffsetY"
|
|
601
|
+
| "pcbRotation"
|
|
602
|
+
> {
|
|
615
603
|
from: string | Point;
|
|
616
604
|
to: string | Point;
|
|
617
605
|
text?: string;
|
|
@@ -712,9 +700,8 @@ export interface FootprintProps {
|
|
|
712
700
|
### FuseProps `<fuse />`
|
|
713
701
|
|
|
714
702
|
```ts
|
|
715
|
-
export interface FuseProps<
|
|
716
|
-
|
|
717
|
-
> extends CommonComponentProps<PinLabel> {
|
|
703
|
+
export interface FuseProps<PinLabel extends string = string>
|
|
704
|
+
extends CommonComponentProps<PinLabel> {
|
|
718
705
|
/**
|
|
719
706
|
* Current rating of the fuse in amperes
|
|
720
707
|
*/
|
|
@@ -892,9 +879,8 @@ export interface CircleHoleProps extends PcbLayoutProps {
|
|
|
892
879
|
### InductorProps `<inductor />`
|
|
893
880
|
|
|
894
881
|
```ts
|
|
895
|
-
export interface InductorProps<
|
|
896
|
-
|
|
897
|
-
> extends CommonComponentProps<PinLabel> {
|
|
882
|
+
export interface InductorProps<PinLabel extends string = string>
|
|
883
|
+
extends CommonComponentProps<PinLabel> {
|
|
898
884
|
inductance: number | string;
|
|
899
885
|
maxCurrentRating?: number | string;
|
|
900
886
|
schOrientation?: SchematicOrientation;
|
|
@@ -976,9 +962,8 @@ export type LedProps = z.input<typeof ledProps>;
|
|
|
976
962
|
### MosfetProps `<mosfet />`
|
|
977
963
|
|
|
978
964
|
```ts
|
|
979
|
-
export interface MosfetProps<
|
|
980
|
-
|
|
981
|
-
> extends CommonComponentProps<PinLabel> {
|
|
965
|
+
export interface MosfetProps<PinLabel extends string = string>
|
|
966
|
+
extends CommonComponentProps<PinLabel> {
|
|
982
967
|
channelType: "n" | "p";
|
|
983
968
|
mosfetMode: "enhancement" | "depletion";
|
|
984
969
|
}
|
|
@@ -990,7 +975,8 @@ export interface MosfetProps<
|
|
|
990
975
|
|
|
991
976
|
```ts
|
|
992
977
|
export interface MountedBoardProps
|
|
993
|
-
extends SubcircuitGroupProps,
|
|
978
|
+
extends SubcircuitGroupProps,
|
|
979
|
+
MountedBoardChipProps {
|
|
994
980
|
boardToBoardDistance?: Distance;
|
|
995
981
|
mountOrientation?: "faceDown" | "faceUp";
|
|
996
982
|
}
|
|
@@ -1047,9 +1033,8 @@ export interface NetLabelProps {
|
|
|
1047
1033
|
### OpAmpProps `<opamp />`
|
|
1048
1034
|
|
|
1049
1035
|
```ts
|
|
1050
|
-
export interface OpAmpProps<
|
|
1051
|
-
|
|
1052
|
-
> extends CommonComponentProps<PinLabel> {
|
|
1036
|
+
export interface OpAmpProps<PinLabel extends string = string>
|
|
1037
|
+
extends CommonComponentProps<PinLabel> {
|
|
1053
1038
|
connections?: Connections<OpAmpPinLabels>;
|
|
1054
1039
|
}
|
|
1055
1040
|
```
|
|
@@ -1059,10 +1044,8 @@ export interface OpAmpProps<
|
|
|
1059
1044
|
### PanelProps `<panel />`
|
|
1060
1045
|
|
|
1061
1046
|
```ts
|
|
1062
|
-
export interface PanelProps
|
|
1063
|
-
BaseGroupProps,
|
|
1064
|
-
"height" | "layoutMode" | "width"
|
|
1065
|
-
> {
|
|
1047
|
+
export interface PanelProps
|
|
1048
|
+
extends Omit<BaseGroupProps, "height" | "layoutMode" | "width"> {
|
|
1066
1049
|
width?: Distance;
|
|
1067
1050
|
height?: Distance;
|
|
1068
1051
|
children?: BaseGroupProps["children"];
|
|
@@ -1105,18 +1088,19 @@ export type PcbKeepoutProps = z.input<typeof pcbKeepoutProps>;
|
|
|
1105
1088
|
### PcbNoteDimensionProps `<pcbnotedimension />`
|
|
1106
1089
|
|
|
1107
1090
|
```ts
|
|
1108
|
-
export interface PcbNoteDimensionProps
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1091
|
+
export interface PcbNoteDimensionProps
|
|
1092
|
+
extends Omit<
|
|
1093
|
+
PcbLayoutProps,
|
|
1094
|
+
| "pcbLeftEdgeX"
|
|
1095
|
+
| "pcbRightEdgeX"
|
|
1096
|
+
| "pcbTopEdgeY"
|
|
1097
|
+
| "pcbBottomEdgeY"
|
|
1098
|
+
| "pcbX"
|
|
1099
|
+
| "pcbY"
|
|
1100
|
+
| "pcbOffsetX"
|
|
1101
|
+
| "pcbOffsetY"
|
|
1102
|
+
| "pcbRotation"
|
|
1103
|
+
> {
|
|
1120
1104
|
from: string | Point;
|
|
1121
1105
|
to: string | Point;
|
|
1122
1106
|
text?: string;
|
|
@@ -1137,18 +1121,19 @@ export interface PcbNoteDimensionProps extends Omit<
|
|
|
1137
1121
|
### PcbNoteLineProps `<pcbnoteline />`
|
|
1138
1122
|
|
|
1139
1123
|
```ts
|
|
1140
|
-
export interface PcbNoteLineProps
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1124
|
+
export interface PcbNoteLineProps
|
|
1125
|
+
extends Omit<
|
|
1126
|
+
PcbLayoutProps,
|
|
1127
|
+
| "pcbLeftEdgeX"
|
|
1128
|
+
| "pcbRightEdgeX"
|
|
1129
|
+
| "pcbTopEdgeY"
|
|
1130
|
+
| "pcbBottomEdgeY"
|
|
1131
|
+
| "pcbX"
|
|
1132
|
+
| "pcbY"
|
|
1133
|
+
| "pcbOffsetX"
|
|
1134
|
+
| "pcbOffsetY"
|
|
1135
|
+
| "pcbRotation"
|
|
1136
|
+
> {
|
|
1152
1137
|
x1: string | number;
|
|
1153
1138
|
y1: string | number;
|
|
1154
1139
|
x2: string | number;
|
|
@@ -1164,18 +1149,19 @@ export interface PcbNoteLineProps extends Omit<
|
|
|
1164
1149
|
### PcbNotePathProps `<pcbnotepath />`
|
|
1165
1150
|
|
|
1166
1151
|
```ts
|
|
1167
|
-
export interface PcbNotePathProps
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1152
|
+
export interface PcbNotePathProps
|
|
1153
|
+
extends Omit<
|
|
1154
|
+
PcbLayoutProps,
|
|
1155
|
+
| "pcbLeftEdgeX"
|
|
1156
|
+
| "pcbRightEdgeX"
|
|
1157
|
+
| "pcbTopEdgeY"
|
|
1158
|
+
| "pcbBottomEdgeY"
|
|
1159
|
+
| "pcbX"
|
|
1160
|
+
| "pcbY"
|
|
1161
|
+
| "pcbOffsetX"
|
|
1162
|
+
| "pcbOffsetY"
|
|
1163
|
+
| "pcbRotation"
|
|
1164
|
+
> {
|
|
1179
1165
|
route: RouteHintPointInput[];
|
|
1180
1166
|
strokeWidth?: string | number;
|
|
1181
1167
|
color?: string;
|
|
@@ -1335,10 +1321,8 @@ export interface PinHeaderProps extends CommonComponentProps {
|
|
|
1335
1321
|
### CirclePlatedHoleProps `<platedhole />`
|
|
1336
1322
|
|
|
1337
1323
|
```ts
|
|
1338
|
-
export interface CirclePlatedHoleProps
|
|
1339
|
-
PcbLayoutProps,
|
|
1340
|
-
"pcbRotation" | "layer"
|
|
1341
|
-
> {
|
|
1324
|
+
export interface CirclePlatedHoleProps
|
|
1325
|
+
extends Omit<PcbLayoutProps, "pcbRotation" | "layer"> {
|
|
1342
1326
|
name?: string;
|
|
1343
1327
|
connectsTo?: string | string[];
|
|
1344
1328
|
shape: "circle";
|
|
@@ -1364,9 +1348,8 @@ export type PortProps = z.input<typeof portProps>;
|
|
|
1364
1348
|
### PotentiometerProps `<potentiometer />`
|
|
1365
1349
|
|
|
1366
1350
|
```ts
|
|
1367
|
-
export interface PotentiometerProps<
|
|
1368
|
-
|
|
1369
|
-
> extends CommonComponentProps<PinLabel> {
|
|
1351
|
+
export interface PotentiometerProps<PinLabel extends string = string>
|
|
1352
|
+
extends CommonComponentProps<PinLabel> {
|
|
1370
1353
|
maxResistance: number | string;
|
|
1371
1354
|
pinVariant?: PotentiometerPinVariant;
|
|
1372
1355
|
connections?: Connections<PotentiometerPinLabels>;
|
|
@@ -1395,9 +1378,8 @@ export type PushButtonProps<T extends PinLabelsProp | string = string> =
|
|
|
1395
1378
|
### ResistorProps `<resistor />`
|
|
1396
1379
|
|
|
1397
1380
|
```ts
|
|
1398
|
-
export interface ResistorProps<
|
|
1399
|
-
|
|
1400
|
-
> extends CommonComponentProps<PinLabel> {
|
|
1381
|
+
export interface ResistorProps<PinLabel extends string = string>
|
|
1382
|
+
extends CommonComponentProps<PinLabel> {
|
|
1401
1383
|
resistance: number | string;
|
|
1402
1384
|
tolerance?: number | string;
|
|
1403
1385
|
pullupFor?: string;
|
|
@@ -1686,10 +1668,8 @@ export interface SolderJumperProps extends JumperProps {
|
|
|
1686
1668
|
### RectSolderPasteProps `<solderpaste />`
|
|
1687
1669
|
|
|
1688
1670
|
```ts
|
|
1689
|
-
export interface RectSolderPasteProps
|
|
1690
|
-
PcbLayoutProps,
|
|
1691
|
-
"pcbRotation"
|
|
1692
|
-
> {
|
|
1671
|
+
export interface RectSolderPasteProps
|
|
1672
|
+
extends Omit<PcbLayoutProps, "pcbRotation"> {
|
|
1693
1673
|
shape: "rect";
|
|
1694
1674
|
width: Distance;
|
|
1695
1675
|
height: Distance;
|
|
@@ -1828,9 +1808,8 @@ export type TraceHintProps = z.input<typeof traceHintProps>;
|
|
|
1828
1808
|
### TransistorProps `<transistor />`
|
|
1829
1809
|
|
|
1830
1810
|
```ts
|
|
1831
|
-
export interface TransistorProps<
|
|
1832
|
-
|
|
1833
|
-
> extends CommonComponentProps<PinLabel> {
|
|
1811
|
+
export interface TransistorProps<PinLabel extends string = string>
|
|
1812
|
+
extends CommonComponentProps<PinLabel> {
|
|
1834
1813
|
type: "npn" | "pnp" | "bjt" | "jfet" | "mosfet" | "igbt";
|
|
1835
1814
|
connections?: Connections<transistorPinsLabels>;
|
|
1836
1815
|
}
|
|
@@ -1870,9 +1849,8 @@ export interface VoltageProbeProps extends Omit<CommonComponentProps, "name"> {
|
|
|
1870
1849
|
### VoltageSourceProps `<voltagesource />`
|
|
1871
1850
|
|
|
1872
1851
|
```ts
|
|
1873
|
-
export interface VoltageSourceProps<
|
|
1874
|
-
|
|
1875
|
-
> extends CommonComponentProps<PinLabel> {
|
|
1852
|
+
export interface VoltageSourceProps<PinLabel extends string = string>
|
|
1853
|
+
extends CommonComponentProps<PinLabel> {
|
|
1876
1854
|
voltage?: number | string;
|
|
1877
1855
|
frequency?: number | string;
|
|
1878
1856
|
peakToPeakVoltage?: number | string;
|
|
@@ -1967,17 +1945,18 @@ export interface PlatformConfig {
|
|
|
1967
1945
|
### ProjectConfig
|
|
1968
1946
|
|
|
1969
1947
|
```ts
|
|
1970
|
-
export interface ProjectConfig
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1948
|
+
export interface ProjectConfig
|
|
1949
|
+
extends Pick<
|
|
1950
|
+
PlatformConfig,
|
|
1951
|
+
| "projectName"
|
|
1952
|
+
| "projectBaseUrl"
|
|
1953
|
+
| "version"
|
|
1954
|
+
| "url"
|
|
1955
|
+
| "printBoardInformationToSilkscreen"
|
|
1956
|
+
| "includeBoardFiles"
|
|
1957
|
+
| "snapshotsDir"
|
|
1958
|
+
| "defaultSpiceEngine"
|
|
1959
|
+
> {}
|
|
1981
1960
|
```
|
|
1982
1961
|
|
|
1983
1962
|
[Source](https://github.com/tscircuit/props/blob/main/lib/projectConfig.ts)
|