circuit-json 0.0.521 → 0.0.522
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 +184 -0
- package/dist/index.d.mts +2748 -17
- package/dist/index.mjs +308 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -219,6 +219,8 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
219
219
|
- [SchematicTrace](#schematictrace)
|
|
220
220
|
- [SchematicVoltageProbe](#schematicvoltageprobe)
|
|
221
221
|
- [Simulation Elements](#simulation-elements)
|
|
222
|
+
- [SimulationReturnCurrentContact](#simulationreturncurrentcontact)
|
|
223
|
+
- [SimulationReturnCurrentGridJson](#simulationreturncurrentgridjson)
|
|
222
224
|
- [SimulationAcSweepCurrentGraph](#simulationacsweepcurrentgraph)
|
|
223
225
|
- [SimulationAcSweepVoltageGraph](#simulationacsweepvoltagegraph)
|
|
224
226
|
- [SimulationAnalysisResult](#simulationanalysisresult)
|
|
@@ -234,8 +236,14 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
234
236
|
- [SimulationOscilloscopeTrace](#simulationoscilloscopetrace)
|
|
235
237
|
- [SimulationParameterSweep](#simulationparametersweep)
|
|
236
238
|
- [SimulationParameterSweepCoordinate](#simulationparametersweepcoordinate)
|
|
239
|
+
- [SimulationPcbReturnCurrentField](#simulationpcbreturncurrentfield)
|
|
240
|
+
- [SimulationPcbReturnCurrentHeatmap](#simulationpcbreturncurrentheatmap)
|
|
241
|
+
- [SimulationPcbReturnCurrentMarker](#simulationpcbreturncurrentmarker)
|
|
242
|
+
- [SimulationPcbReturnCurrentResult](#simulationpcbreturncurrentresult)
|
|
243
|
+
- [SimulationReturnCurrentExcitation](#simulationreturncurrentexcitation)
|
|
237
244
|
- [SimulationSpiceSubcircuit](#simulationspicesubcircuit)
|
|
238
245
|
- [SimulationSwitch](#simulationswitch)
|
|
246
|
+
- [SimulationTerminalPort](#simulationterminalport)
|
|
239
247
|
- [SimulationTransientCurrentGraph](#simulationtransientcurrentgraph)
|
|
240
248
|
- [SimulationTransientVoltageGraph](#simulationtransientvoltagegraph)
|
|
241
249
|
- [SimulationUnknownExperimentError](#simulationunknownexperimenterror)
|
|
@@ -4134,6 +4142,53 @@ interface SchematicVoltageProbe {
|
|
|
4134
4142
|
|
|
4135
4143
|
## Simulation Elements
|
|
4136
4144
|
|
|
4145
|
+
### SimulationReturnCurrentContact
|
|
4146
|
+
|
|
4147
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_return_current_contact.ts)
|
|
4148
|
+
|
|
4149
|
+
```typescript
|
|
4150
|
+
interface SimulationReturnCurrentContactBase {
|
|
4151
|
+
x: number
|
|
4152
|
+
y: number
|
|
4153
|
+
layer: LayerRef
|
|
4154
|
+
}
|
|
4155
|
+
|
|
4156
|
+
interface SimulationReturnCurrentPortContact extends SimulationReturnCurrentContactBase {
|
|
4157
|
+
contact_type: "pcb_port"
|
|
4158
|
+
pcb_port_id: string
|
|
4159
|
+
}
|
|
4160
|
+
|
|
4161
|
+
interface SimulationReturnCurrentViaContact extends SimulationReturnCurrentContactBase {
|
|
4162
|
+
contact_type: "pcb_via"
|
|
4163
|
+
pcb_via_id: string
|
|
4164
|
+
}
|
|
4165
|
+
|
|
4166
|
+
interface SimulationReturnCurrentCopperPourContact extends SimulationReturnCurrentContactBase {
|
|
4167
|
+
contact_type: "pcb_copper_pour"
|
|
4168
|
+
pcb_copper_pour_id: string
|
|
4169
|
+
}
|
|
4170
|
+
```
|
|
4171
|
+
|
|
4172
|
+
### SimulationReturnCurrentGridJson
|
|
4173
|
+
|
|
4174
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_return_current_grid_json.ts)
|
|
4175
|
+
|
|
4176
|
+
```typescript
|
|
4177
|
+
type SimulationReturnCurrentGridJson =
|
|
4178
|
+
| {
|
|
4179
|
+
field_type: "real"
|
|
4180
|
+
sheet_current_x: (number | null)[]
|
|
4181
|
+
sheet_current_y: (number | null)[]
|
|
4182
|
+
}
|
|
4183
|
+
| {
|
|
4184
|
+
field_type: "complex_phasor"
|
|
4185
|
+
sheet_current_x_real: (number | null)[]
|
|
4186
|
+
sheet_current_x_imag: (number | null)[]
|
|
4187
|
+
sheet_current_y_real: (number | null)[]
|
|
4188
|
+
sheet_current_y_imag: (number | null)[]
|
|
4189
|
+
}
|
|
4190
|
+
```
|
|
4191
|
+
|
|
4137
4192
|
### SimulationAcSweepCurrentGraph
|
|
4138
4193
|
|
|
4139
4194
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_ac_sweep_current_graph.ts)
|
|
@@ -4483,6 +4538,122 @@ interface SimulationParameterSweepCoordinate {
|
|
|
4483
4538
|
}
|
|
4484
4539
|
```
|
|
4485
4540
|
|
|
4541
|
+
### SimulationPcbReturnCurrentField
|
|
4542
|
+
|
|
4543
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_pcb_return_current_field.ts)
|
|
4544
|
+
|
|
4545
|
+
```typescript
|
|
4546
|
+
interface SimulationPcbReturnCurrentField {
|
|
4547
|
+
type: "simulation_pcb_return_current_field"
|
|
4548
|
+
simulation_pcb_return_current_field_id: string
|
|
4549
|
+
simulation_pcb_return_current_result_id: string
|
|
4550
|
+
layer: LayerRef
|
|
4551
|
+
source_net_id: string
|
|
4552
|
+
field_type: "real" | "complex_phasor"
|
|
4553
|
+
min_x: number
|
|
4554
|
+
min_y: number
|
|
4555
|
+
columns: number
|
|
4556
|
+
rows: number
|
|
4557
|
+
cell_width: number
|
|
4558
|
+
cell_height: number
|
|
4559
|
+
copper_thickness: number
|
|
4560
|
+
data_format: "simulation_return_current_grid_json_v1"
|
|
4561
|
+
field_asset: Asset
|
|
4562
|
+
}
|
|
4563
|
+
```
|
|
4564
|
+
|
|
4565
|
+
### SimulationPcbReturnCurrentHeatmap
|
|
4566
|
+
|
|
4567
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_pcb_return_current_heatmap.ts)
|
|
4568
|
+
|
|
4569
|
+
```typescript
|
|
4570
|
+
interface SimulationPcbReturnCurrentHeatmap {
|
|
4571
|
+
type: "simulation_pcb_return_current_heatmap"
|
|
4572
|
+
simulation_pcb_return_current_heatmap_id: string
|
|
4573
|
+
simulation_pcb_return_current_result_id: string
|
|
4574
|
+
layer: LayerRef
|
|
4575
|
+
source_net_id: string
|
|
4576
|
+
min_x: number
|
|
4577
|
+
min_y: number
|
|
4578
|
+
max_x: number
|
|
4579
|
+
max_y: number
|
|
4580
|
+
image_asset: Asset
|
|
4581
|
+
}
|
|
4582
|
+
```
|
|
4583
|
+
|
|
4584
|
+
### SimulationPcbReturnCurrentMarker
|
|
4585
|
+
|
|
4586
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_pcb_return_current_marker.ts)
|
|
4587
|
+
|
|
4588
|
+
```typescript
|
|
4589
|
+
type SimulationPcbReturnCurrentMarker =
|
|
4590
|
+
| SimulationPcbReturnCurrentPortMarker
|
|
4591
|
+
| SimulationPcbReturnCurrentViaMarker
|
|
4592
|
+
|
|
4593
|
+
interface SimulationReturnCurrentMarkerBase {
|
|
4594
|
+
type: "simulation_pcb_return_current_marker"
|
|
4595
|
+
simulation_pcb_return_current_marker_id: string
|
|
4596
|
+
simulation_pcb_return_current_result_id: string
|
|
4597
|
+
role:
|
|
4598
|
+
| "signal_source"
|
|
4599
|
+
| "signal_load"
|
|
4600
|
+
| "return_source"
|
|
4601
|
+
| "return_sink"
|
|
4602
|
+
| "signal_transition"
|
|
4603
|
+
| "return_transition"
|
|
4604
|
+
label?: string
|
|
4605
|
+
label_x?: number
|
|
4606
|
+
label_y?: number
|
|
4607
|
+
}
|
|
4608
|
+
|
|
4609
|
+
interface SimulationPcbReturnCurrentPortMarker extends SimulationReturnCurrentMarkerBase {
|
|
4610
|
+
target_type: "pcb_port"
|
|
4611
|
+
pcb_port_id: string
|
|
4612
|
+
layer: LayerRef
|
|
4613
|
+
}
|
|
4614
|
+
|
|
4615
|
+
interface SimulationPcbReturnCurrentViaMarker extends SimulationReturnCurrentMarkerBase {
|
|
4616
|
+
target_type: "pcb_via"
|
|
4617
|
+
pcb_via_id: string
|
|
4618
|
+
from_layer: LayerRef
|
|
4619
|
+
to_layer: LayerRef
|
|
4620
|
+
}
|
|
4621
|
+
```
|
|
4622
|
+
|
|
4623
|
+
### SimulationPcbReturnCurrentResult
|
|
4624
|
+
|
|
4625
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_pcb_return_current_result.ts)
|
|
4626
|
+
|
|
4627
|
+
```typescript
|
|
4628
|
+
interface SimulationPcbReturnCurrentResult {
|
|
4629
|
+
type: "simulation_pcb_return_current_result"
|
|
4630
|
+
simulation_pcb_return_current_result_id: string
|
|
4631
|
+
simulation_experiment_id: string
|
|
4632
|
+
pcb_board_id: string
|
|
4633
|
+
simulation_return_current_excitation_ids: string[]
|
|
4634
|
+
frequency_hz?: number
|
|
4635
|
+
}
|
|
4636
|
+
```
|
|
4637
|
+
|
|
4638
|
+
### SimulationReturnCurrentExcitation
|
|
4639
|
+
|
|
4640
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_return_current_excitation.ts)
|
|
4641
|
+
|
|
4642
|
+
```typescript
|
|
4643
|
+
interface SimulationReturnCurrentExcitation {
|
|
4644
|
+
type: "simulation_return_current_excitation"
|
|
4645
|
+
simulation_return_current_excitation_id: string
|
|
4646
|
+
simulation_experiment_id: string
|
|
4647
|
+
pcb_trace_id: string
|
|
4648
|
+
ground_source_net_id: string
|
|
4649
|
+
current: number
|
|
4650
|
+
return_source: SimulationReturnCurrentContact
|
|
4651
|
+
return_sink: SimulationReturnCurrentContact
|
|
4652
|
+
source_port?: SimulationTerminalPort
|
|
4653
|
+
load_port?: SimulationTerminalPort
|
|
4654
|
+
}
|
|
4655
|
+
```
|
|
4656
|
+
|
|
4486
4657
|
### SimulationSpiceSubcircuit
|
|
4487
4658
|
|
|
4488
4659
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_spice_subcircuit.ts)
|
|
@@ -4522,6 +4693,19 @@ interface SimulationSwitch {
|
|
|
4522
4693
|
}
|
|
4523
4694
|
```
|
|
4524
4695
|
|
|
4696
|
+
### SimulationTerminalPort
|
|
4697
|
+
|
|
4698
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_terminal_port.ts)
|
|
4699
|
+
|
|
4700
|
+
```typescript
|
|
4701
|
+
interface SimulationTerminalPort {
|
|
4702
|
+
signal_pcb_port_id: string
|
|
4703
|
+
reference_pcb_port_id?: string
|
|
4704
|
+
reference_layer: LayerRef
|
|
4705
|
+
resistance: number
|
|
4706
|
+
}
|
|
4707
|
+
```
|
|
4708
|
+
|
|
4525
4709
|
### SimulationTransientCurrentGraph
|
|
4526
4710
|
|
|
4527
4711
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_transient_current_graph.ts)
|