@tscircuit/props 0.0.591 → 0.0.592
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 +186 -101
- package/dist/index.d.ts +759 -3
- package/dist/index.js +599 -368
- package/dist/index.js.map +1 -1
- package/lib/components/analogacsweepsimulation.ts +85 -0
- package/lib/components/analogdcoperatingpointsimulation.ts +18 -0
- package/lib/components/analogdcsweepsimulation.ts +50 -0
- package/lib/components/analogsimulation.ts +22 -0
- package/lib/components/analogsweepparameter.ts +213 -0
- package/lib/components/analogtransientsimulation.ts +47 -0
- package/lib/components/currentsource.ts +6 -0
- package/lib/components/voltagesource.ts +6 -0
- package/lib/index.ts +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,107 +20,112 @@ resistorProps.parse({ resistance: "10k" } as ResistorPropsInput);
|
|
|
20
20
|
|
|
21
21
|
## Available Components
|
|
22
22
|
|
|
23
|
-
| Component
|
|
24
|
-
|
|
|
25
|
-
| `<ammeter />`
|
|
26
|
-
| `<
|
|
27
|
-
| `<
|
|
28
|
-
| `<
|
|
29
|
-
| `<
|
|
30
|
-
| `<
|
|
31
|
-
| `<
|
|
32
|
-
| `<
|
|
33
|
-
| `<
|
|
34
|
-
| `<
|
|
35
|
-
| `<
|
|
36
|
-
| `<
|
|
37
|
-
| `<
|
|
38
|
-
| `<
|
|
39
|
-
| `<
|
|
40
|
-
| `<
|
|
41
|
-
| `<
|
|
42
|
-
| `<
|
|
43
|
-
| `<
|
|
44
|
-
| `<
|
|
45
|
-
| `<
|
|
46
|
-
| `<
|
|
47
|
-
| `<
|
|
48
|
-
| `<
|
|
49
|
-
| `<
|
|
50
|
-
| `<
|
|
51
|
-
| `<
|
|
52
|
-
| `<
|
|
53
|
-
| `<
|
|
54
|
-
| `<
|
|
55
|
-
| `<
|
|
56
|
-
| `<
|
|
57
|
-
| `<
|
|
58
|
-
| `<
|
|
59
|
-
| `<
|
|
60
|
-
| `<
|
|
61
|
-
| `<
|
|
62
|
-
| `<
|
|
63
|
-
| `<
|
|
64
|
-
| `<
|
|
65
|
-
| `<
|
|
66
|
-
| `<
|
|
67
|
-
| `<
|
|
68
|
-
| `<
|
|
69
|
-
| `<
|
|
70
|
-
| `<
|
|
71
|
-
| `<
|
|
72
|
-
| `<
|
|
73
|
-
| `<
|
|
74
|
-
| `<
|
|
75
|
-
| `<
|
|
76
|
-
| `<
|
|
77
|
-
| `<
|
|
78
|
-
| `<
|
|
79
|
-
| `<
|
|
80
|
-
| `<
|
|
81
|
-
| `<
|
|
82
|
-
| `<
|
|
83
|
-
| `<
|
|
84
|
-
| `<
|
|
85
|
-
| `<
|
|
86
|
-
| `<
|
|
87
|
-
| `<
|
|
88
|
-
| `<
|
|
89
|
-
| `<
|
|
90
|
-
| `<
|
|
91
|
-
| `<
|
|
92
|
-
| `<
|
|
93
|
-
| `<
|
|
94
|
-
| `<
|
|
95
|
-
| `<
|
|
96
|
-
| `<
|
|
97
|
-
| `<
|
|
98
|
-
| `<
|
|
99
|
-
| `<
|
|
100
|
-
| `<
|
|
101
|
-
| `<
|
|
102
|
-
| `<
|
|
103
|
-
| `<
|
|
104
|
-
| `<
|
|
105
|
-
| `<
|
|
106
|
-
| `<
|
|
107
|
-
| `<
|
|
108
|
-
| `<
|
|
109
|
-
| `<
|
|
110
|
-
| `<
|
|
111
|
-
| `<
|
|
112
|
-
| `<
|
|
113
|
-
| `<
|
|
114
|
-
| `<
|
|
115
|
-
| `<
|
|
116
|
-
| `<
|
|
117
|
-
| `<
|
|
118
|
-
| `<
|
|
119
|
-
| `<
|
|
120
|
-
| `<
|
|
121
|
-
| `<
|
|
122
|
-
| `<
|
|
123
|
-
| `<
|
|
23
|
+
| Component | Props Interface |
|
|
24
|
+
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
25
|
+
| `<ammeter />` | [`AmmeterProps`](#ammeterprops-ammeter) |
|
|
26
|
+
| `<analog.acsweepsimulation />` | [`AnalogAcSweepSimulationProps`](#analogacsweepsimulationprops-analogacsweepsimulation) |
|
|
27
|
+
| `<analog.dcoperatingpointsimulation />` | [`AnalogDcOperatingPointSimulationProps`](#analogdcoperatingpointsimulationprops-analogdcoperatingpointsimulation) |
|
|
28
|
+
| `<analog.dcsweepsimulation />` | [`AnalogDcSweepSimulationProps`](#analogdcsweepsimulationprops-analogdcsweepsimulation) |
|
|
29
|
+
| `<analogsimulation />` | [`AnalogSimulationProps`](#analogsimulationprops-analogsimulation) |
|
|
30
|
+
| `<analog.sweepparameter />` | [`AnalogResistanceSweepParameterProps`](#analogresistancesweepparameterprops-analogsweepparameter) |
|
|
31
|
+
| `<analog.transientsimulation />` | [`AnalogTransientSimulationProps`](#analogtransientsimulationprops-analogtransientsimulation) |
|
|
32
|
+
| `<autoroutingphase />` | [`AutoroutingPhaseProps`](#autoroutingphaseprops-autoroutingphase) |
|
|
33
|
+
| `<battery />` | [`BatteryProps`](#batteryprops-battery) |
|
|
34
|
+
| `<board />` | [`BoardProps`](#boardprops-board) |
|
|
35
|
+
| `<breakout />` | [`BreakoutProps`](#breakoutprops-breakout) |
|
|
36
|
+
| `<breakoutpoint />` | [`BreakoutPointProps`](#breakoutpointprops-breakoutpoint) |
|
|
37
|
+
| `<cadassembly />` | [`CadAssemblyProps`](#cadassemblyprops-cadassembly) |
|
|
38
|
+
| `<cadmodel />` | [`CadModelProps`](#cadmodelprops-cadmodel) |
|
|
39
|
+
| `<capacitor />` | [`CapacitorProps`](#capacitorprops-capacitor) |
|
|
40
|
+
| `<chip />` | [`ChipProps`](#chipprops-chip) |
|
|
41
|
+
| `<connector />` | [`ConnectorProps`](#connectorprops-connector) |
|
|
42
|
+
| `<constrainedlayout />` | [`ConstrainedLayoutProps`](#constrainedlayoutprops-constrainedlayout) |
|
|
43
|
+
| `<constraint />` | [`ConstraintProps`](#constraintprops-constraint) |
|
|
44
|
+
| `<copperpour />` | [`CopperPourProps`](#copperpourprops-copperpour) |
|
|
45
|
+
| `<coppertext />` | [`CopperTextProps`](#coppertextprops-coppertext) |
|
|
46
|
+
| `<courtyardcircle />` | [`CourtyardCircleProps`](#courtyardcircleprops-courtyardcircle) |
|
|
47
|
+
| `<courtyardoutline />` | [`CourtyardOutlineProps`](#courtyardoutlineprops-courtyardoutline) |
|
|
48
|
+
| `<courtyardpill />` | [`CourtyardPillProps`](#courtyardpillprops-courtyardpill) |
|
|
49
|
+
| `<courtyardrect />` | [`CourtyardRectProps`](#courtyardrectprops-courtyardrect) |
|
|
50
|
+
| `<crystal />` | [`CrystalProps`](#crystalprops-crystal) |
|
|
51
|
+
| `<currentsource />` | [`CurrentSourceProps`](#currentsourceprops-currentsource) |
|
|
52
|
+
| `<cutout />` | [`RectCutoutProps`](#rectcutoutprops-cutout) |
|
|
53
|
+
| `<differentialpair />` | [`DifferentialPairProps`](#differentialpairprops-differentialpair) |
|
|
54
|
+
| `<diode />` | [`DiodeProps`](#diodeprops-diode) |
|
|
55
|
+
| `<drccheck />` | [`DrcCheckProps`](#drccheckprops-drccheck) |
|
|
56
|
+
| `<fabricationnotedimension />` | [`FabricationNoteDimensionProps`](#fabricationnotedimensionprops-fabricationnotedimension) |
|
|
57
|
+
| `<fabricationnotepath />` | [`FabricationNotePathProps`](#fabricationnotepathprops-fabricationnotepath) |
|
|
58
|
+
| `<fabricationnoterect />` | [`FabricationNoteRectProps`](#fabricationnoterectprops-fabricationnoterect) |
|
|
59
|
+
| `<fabricationnotetext />` | [`FabricationNoteTextProps`](#fabricationnotetextprops-fabricationnotetext) |
|
|
60
|
+
| `<fiducial />` | [`FiducialProps`](#fiducialprops-fiducial) |
|
|
61
|
+
| `<footprint />` | [`FootprintProps`](#footprintprops-footprint) |
|
|
62
|
+
| `<fuse />` | [`FuseProps`](#fuseprops-fuse) |
|
|
63
|
+
| `<group />` | [`BaseGroupProps`](#basegroupprops-group) |
|
|
64
|
+
| `<hole />` | [`CircleHoleProps`](#circleholeprops-hole) |
|
|
65
|
+
| `<inductor />` | [`InductorProps`](#inductorprops-inductor) |
|
|
66
|
+
| `<interconnect />` | [`InterconnectProps`](#interconnectprops-interconnect) |
|
|
67
|
+
| `<internalcircuit />` | [`InternalCircuitProps`](#internalcircuitprops-internalcircuit) |
|
|
68
|
+
| `<jumper />` | [`JumperProps`](#jumperprops-jumper) |
|
|
69
|
+
| `<led />` | [`LedProps`](#ledprops-led) |
|
|
70
|
+
| `<mosfet />` | [`MosfetProps`](#mosfetprops-mosfet) |
|
|
71
|
+
| `<mountedboard />` | [`MountedBoardProps`](#mountedboardprops-mountedboard) |
|
|
72
|
+
| `<net />` | [`NetProps`](#netprops-net) |
|
|
73
|
+
| `<netalias />` | [`NetAliasProps`](#netaliasprops-netalias) |
|
|
74
|
+
| `<netlabel />` | [`NetLabelProps`](#netlabelprops-netlabel) |
|
|
75
|
+
| `<opamp />` | [`OpAmpProps`](#opampprops-opamp) |
|
|
76
|
+
| `<panel />` | [`PanelProps`](#panelprops-panel) |
|
|
77
|
+
| `<pcbkeepout />` | [`PcbKeepoutProps`](#pcbkeepoutprops-pcbkeepout) |
|
|
78
|
+
| `<pcbnotedimension />` | [`PcbNoteDimensionProps`](#pcbnotedimensionprops-pcbnotedimension) |
|
|
79
|
+
| `<pcbnoteline />` | [`PcbNoteLineProps`](#pcbnotelineprops-pcbnoteline) |
|
|
80
|
+
| `<pcbnotepath />` | [`PcbNotePathProps`](#pcbnotepathprops-pcbnotepath) |
|
|
81
|
+
| `<pcbnoterect />` | [`PcbNoteRectProps`](#pcbnoterectprops-pcbnoterect) |
|
|
82
|
+
| `<pcbnotetext />` | [`PcbNoteTextProps`](#pcbnotetextprops-pcbnotetext) |
|
|
83
|
+
| `<pcbtrace />` | [`PcbTraceProps`](#pcbtraceprops-pcbtrace) |
|
|
84
|
+
| `<pinheader />` | [`PinHeaderProps`](#pinheaderprops-pinheader) |
|
|
85
|
+
| `<pinout />` | [`PinoutProps`](#pinoutprops-pinout) |
|
|
86
|
+
| `<platedhole />` | [`CirclePlatedHoleProps`](#circleplatedholeprops-platedhole) |
|
|
87
|
+
| `<port />` | [`PortProps`](#portprops-port) |
|
|
88
|
+
| `<potentiometer />` | [`PotentiometerProps`](#potentiometerprops-potentiometer) |
|
|
89
|
+
| `<powersource />` | [`PowerSourceProps`](#powersourceprops-powersource) |
|
|
90
|
+
| `<pushbutton />` | [`PushButtonProps`](#pushbuttonprops-pushbutton) |
|
|
91
|
+
| `<resistor />` | [`ResistorProps`](#resistorprops-resistor) |
|
|
92
|
+
| `<resonator />` | [`ResonatorProps`](#resonatorprops-resonator) |
|
|
93
|
+
| `<schematicarc />` | [`SchematicArcProps`](#schematicarcprops-schematicarc) |
|
|
94
|
+
| `<schematicbox />` | [`SchematicBoxProps`](#schematicboxprops-schematicbox) |
|
|
95
|
+
| `<schematiccell />` | [`SchematicCellProps`](#schematiccellprops-schematiccell) |
|
|
96
|
+
| `<schematiccircle />` | [`SchematicCircleProps`](#schematiccircleprops-schematiccircle) |
|
|
97
|
+
| `<schematicline />` | [`SchematicLineProps`](#schematiclineprops-schematicline) |
|
|
98
|
+
| `<schematicpath />` | [`SchematicPathProps`](#schematicpathprops-schematicpath) |
|
|
99
|
+
| `<schematicrect />` | [`SchematicRectProps`](#schematicrectprops-schematicrect) |
|
|
100
|
+
| `<schematicrow />` | [`SchematicRowProps`](#schematicrowprops-schematicrow) |
|
|
101
|
+
| `<schematicsection />` | [`SchematicSectionProps`](#schematicsectionprops-schematicsection) |
|
|
102
|
+
| `<schematicsheet />` | [`SchematicSheetProps`](#schematicsheetprops-schematicsheet) |
|
|
103
|
+
| `<schematicsymbol />` | [`SchematicSymbolProps`](#schematicsymbolprops-schematicsymbol) |
|
|
104
|
+
| `<schematictable />` | [`SchematicTableProps`](#schematictableprops-schematictable) |
|
|
105
|
+
| `<schematictext />` | [`SchematicTextProps`](#schematictextprops-schematictext) |
|
|
106
|
+
| `<silkscreencircle />` | [`SilkscreenCircleProps`](#silkscreencircleprops-silkscreencircle) |
|
|
107
|
+
| `<silkscreengraphic />` | [`SilkscreenGraphicProps`](#silkscreengraphicprops-silkscreengraphic) |
|
|
108
|
+
| `<silkscreenline />` | [`SilkscreenLineProps`](#silkscreenlineprops-silkscreenline) |
|
|
109
|
+
| `<silkscreenpath />` | [`SilkscreenPathProps`](#silkscreenpathprops-silkscreenpath) |
|
|
110
|
+
| `<silkscreenrect />` | [`SilkscreenRectProps`](#silkscreenrectprops-silkscreenrect) |
|
|
111
|
+
| `<silkscreentext />` | [`SilkscreenTextProps`](#silkscreentextprops-silkscreentext) |
|
|
112
|
+
| `<smtpad />` | [`RectSmtPadProps`](#rectsmtpadprops-smtpad) |
|
|
113
|
+
| `<solderjumper />` | [`SolderJumperProps`](#solderjumperprops-solderjumper) |
|
|
114
|
+
| `<solderpaste />` | [`RectSolderPasteProps`](#rectsolderpasteprops-solderpaste) |
|
|
115
|
+
| `<spicemodel />` | [`SpiceModelProps`](#spicemodelprops-spicemodel) |
|
|
116
|
+
| `<stampboard />` | [`StampboardProps`](#stampboardprops-stampboard) |
|
|
117
|
+
| `<subcircuit />` | [`SubcircuitProps`](#subcircuitprops-subcircuit) |
|
|
118
|
+
| `<subpanel />` | [`SubpanelProps`](#subpanelprops-subpanel) |
|
|
119
|
+
| `<switch />` | [`SwitchProps`](#switchprops-switch) |
|
|
120
|
+
| `<symbol />` | [`SymbolProps`](#symbolprops-symbol) |
|
|
121
|
+
| `<testpoint />` | [`TestpointProps`](#testpointprops-testpoint) |
|
|
122
|
+
| `<toolingrail />` | [`ToolingrailProps`](#toolingrailprops-toolingrail) |
|
|
123
|
+
| `<trace />` | [`TraceProps`](#traceprops-trace) |
|
|
124
|
+
| `<tracehint />` | [`TraceHintProps`](#tracehintprops-tracehint) |
|
|
125
|
+
| `<transistor />` | [`TransistorProps`](#transistorprops-transistor) |
|
|
126
|
+
| `<via />` | [`ViaProps`](#viaprops-via) |
|
|
127
|
+
| `<voltageprobe />` | [`VoltageProbeProps`](#voltageprobeprops-voltageprobe) |
|
|
128
|
+
| `<voltagesource />` | [`VoltageSourceProps`](#voltagesourceprops-voltagesource) |
|
|
124
129
|
|
|
125
130
|
<!-- COMPONENT_TABLE_END -->
|
|
126
131
|
|
|
@@ -229,6 +234,51 @@ export interface AmmeterProps<
|
|
|
229
234
|
|
|
230
235
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/ammeter.ts)
|
|
231
236
|
|
|
237
|
+
### AnalogAcSweepSimulationProps `<analog.acsweepsimulation />`
|
|
238
|
+
|
|
239
|
+
```ts
|
|
240
|
+
export interface AnalogAcSweepSimulationProps extends AnalogAnalysisSimulationBaseProps {
|
|
241
|
+
/** Frequency spacing used by the AC analysis. */
|
|
242
|
+
sweepType: "linear" | "decade" | "octave";
|
|
243
|
+
/** First positive frequency. Raw numbers are hertz. */
|
|
244
|
+
startFrequency: number | string;
|
|
245
|
+
/** Last frequency, which must be greater than startFrequency. Raw numbers are hertz. */
|
|
246
|
+
stopFrequency: number | string;
|
|
247
|
+
/** Samples per decade or octave; required for non-linear sweeps. */
|
|
248
|
+
samplesPerInterval?: number;
|
|
249
|
+
/** Total samples; required for linear sweeps. */
|
|
250
|
+
sampleCount?: number;
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/analogacsweepsimulation.ts)
|
|
255
|
+
|
|
256
|
+
### AnalogDcOperatingPointSimulationProps `<analog.dcoperatingpointsimulation />`
|
|
257
|
+
|
|
258
|
+
```ts
|
|
259
|
+
export type AnalogDcOperatingPointSimulationProps =
|
|
260
|
+
AnalogAnalysisSimulationBaseProps;
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/analogdcoperatingpointsimulation.ts)
|
|
264
|
+
|
|
265
|
+
### AnalogDcSweepSimulationProps `<analog.dcsweepsimulation />`
|
|
266
|
+
|
|
267
|
+
```ts
|
|
268
|
+
export interface AnalogDcSweepSimulationProps extends AnalogAnalysisSimulationBaseProps {
|
|
269
|
+
/** Selector for the independent voltage or current source being swept. */
|
|
270
|
+
sweepSource: string;
|
|
271
|
+
/** First source level. Raw numbers use volts or amperes according to the source. */
|
|
272
|
+
sweepStart: number | string;
|
|
273
|
+
/** Last source level. Raw numbers use volts or amperes according to the source. */
|
|
274
|
+
sweepStop: number | string;
|
|
275
|
+
/** Nonzero increment directed from sweepStart toward sweepStop. */
|
|
276
|
+
sweepStep: number | string;
|
|
277
|
+
}
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/analogdcsweepsimulation.ts)
|
|
281
|
+
|
|
232
282
|
### AnalogSimulationProps `<analogsimulation />`
|
|
233
283
|
|
|
234
284
|
```ts
|
|
@@ -246,6 +296,33 @@ export interface AnalogSimulationProps {
|
|
|
246
296
|
|
|
247
297
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/analogsimulation.ts)
|
|
248
298
|
|
|
299
|
+
### AnalogResistanceSweepParameterProps `<analog.sweepparameter />`
|
|
300
|
+
|
|
301
|
+
```ts
|
|
302
|
+
export interface AnalogResistanceSweepParameterProps extends AnalogSweepCoordinatesProps {
|
|
303
|
+
parameterType: "resistance";
|
|
304
|
+
/** Selector for the resistor whose simulation-only resistance is swept. */
|
|
305
|
+
resistorRef: string;
|
|
306
|
+
}
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/analogsweepparameter.ts)
|
|
310
|
+
|
|
311
|
+
### AnalogTransientSimulationProps `<analog.transientsimulation />`
|
|
312
|
+
|
|
313
|
+
```ts
|
|
314
|
+
export interface AnalogTransientSimulationProps extends AnalogAnalysisSimulationBaseProps {
|
|
315
|
+
/** Simulation duration. Raw numbers are milliseconds. Defaults to 10ms. */
|
|
316
|
+
duration?: number | string;
|
|
317
|
+
/** Time at which recording starts. Raw numbers are milliseconds. Defaults to 0ms. */
|
|
318
|
+
startTime?: number | string;
|
|
319
|
+
/** Maximum simulation timestep. Raw numbers are milliseconds. Defaults to 0.01ms. */
|
|
320
|
+
timePerStep?: number | string;
|
|
321
|
+
}
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/analogtransientsimulation.ts)
|
|
325
|
+
|
|
249
326
|
### AutoroutingPhaseProps `<autoroutingphase />`
|
|
250
327
|
|
|
251
328
|
```ts
|
|
@@ -601,6 +678,10 @@ export interface CurrentSourceProps<
|
|
|
601
678
|
waveShape?: WaveShape;
|
|
602
679
|
phase?: number | string;
|
|
603
680
|
dutyCycle?: number | string;
|
|
681
|
+
/** Small-signal AC magnitude. Raw numbers are amperes. */
|
|
682
|
+
acMagnitude?: number | string;
|
|
683
|
+
/** Small-signal AC phase. Raw numbers are degrees. */
|
|
684
|
+
acPhase?: number | string;
|
|
604
685
|
connections?: Connections<CurrentSourcePinLabels>;
|
|
605
686
|
}
|
|
606
687
|
```
|
|
@@ -2089,6 +2170,10 @@ export interface VoltageSourceProps<
|
|
|
2089
2170
|
fallTime?: number | string;
|
|
2090
2171
|
pulseWidth?: number | string;
|
|
2091
2172
|
period?: number | string;
|
|
2173
|
+
/** Small-signal AC magnitude. Raw numbers are volts. */
|
|
2174
|
+
acMagnitude?: number | string;
|
|
2175
|
+
/** Small-signal AC phase. Raw numbers are degrees. */
|
|
2176
|
+
acPhase?: number | string;
|
|
2092
2177
|
connections?: Connections<VoltageSourcePinLabels>;
|
|
2093
2178
|
}
|
|
2094
2179
|
```
|