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