circuit-json 0.0.437 → 0.0.438

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 CHANGED
@@ -70,6 +70,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
70
70
  - [SourcePort](#sourceport)
71
71
  - [SourceProjectMetadata](#sourceprojectmetadata)
72
72
  - [SourcePropertyIgnoredWarning](#sourcepropertyignoredwarning)
73
+ - [SourceSimpleAmmeter](#sourcesimpleammeter)
73
74
  - [SourceSimpleBattery](#sourcesimplebattery)
74
75
  - [SourceSimpleCapacitor](#sourcesimplecapacitor)
75
76
  - [SourceSimpleChip](#sourcesimplechip)
@@ -188,11 +189,14 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
188
189
  - [SchematicTrace](#schematictrace)
189
190
  - [SchematicVoltageProbe](#schematicvoltageprobe)
190
191
  - [Simulation Elements](#simulation-elements)
192
+ - [SimulationCurrentProbe](#simulationcurrentprobe)
191
193
  - [SimulationCurrentSource](#simulationcurrentsource)
192
194
  - [SimulationExperiment](#simulationexperiment)
193
195
  - [SimulationOpAmp](#simulationopamp)
196
+ - [SimulationOscilloscopeTrace](#simulationoscilloscopetrace)
194
197
  - [SimulationSpiceSubcircuit](#simulationspicesubcircuit)
195
198
  - [SimulationSwitch](#simulationswitch)
199
+ - [SimulationTransientCurrentGraph](#simulationtransientcurrentgraph)
196
200
  - [SimulationTransientVoltageGraph](#simulationtransientvoltagegraph)
197
201
  - [SimulationUnknownExperimentError](#simulationunknownexperimenterror)
198
202
  - [SimulationVoltageProbe](#simulationvoltageprobe)
@@ -737,6 +741,19 @@ interface SourcePropertyIgnoredWarning {
737
741
  }
738
742
  ```
739
743
 
744
+ ### SourceSimpleAmmeter
745
+
746
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_simple_ammeter.ts)
747
+
748
+ Defines a simple ammeter component for simulation and measurement
749
+
750
+ ```typescript
751
+ /** Defines a simple ammeter component for simulation and measurement */
752
+ interface SourceSimpleAmmeter extends SourceComponentBase {
753
+ ftype: "simple_ammeter"
754
+ }
755
+ ```
756
+
740
757
  ### SourceSimpleBattery
741
758
 
742
759
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_simple_battery.ts)
@@ -3245,6 +3262,27 @@ interface SchematicVoltageProbe {
3245
3262
 
3246
3263
  ## Simulation Elements
3247
3264
 
3265
+ ### SimulationCurrentProbe
3266
+
3267
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_current_probe.ts)
3268
+
3269
+ ```typescript
3270
+ /** Defines a current probe for simulation. It measures current flowing from the
3271
+ * positive endpoint to the negative endpoint. */
3272
+ interface SimulationCurrentProbe {
3273
+ type: "simulation_current_probe"
3274
+ simulation_current_probe_id: string
3275
+ source_component_id?: string
3276
+ name?: string
3277
+ positive_source_port_id?: string
3278
+ negative_source_port_id?: string
3279
+ positive_source_net_id?: string
3280
+ negative_source_net_id?: string
3281
+ subcircuit_id?: string
3282
+ color?: string
3283
+ }
3284
+ ```
3285
+
3248
3286
  ### SimulationCurrentSource
3249
3287
 
3250
3288
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_current_source.ts)
@@ -3329,6 +3367,34 @@ interface SimulationOpAmp {
3329
3367
  }
3330
3368
  ```
3331
3369
 
3370
+ ### SimulationOscilloscopeTrace
3371
+
3372
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_oscilloscope_trace.ts)
3373
+
3374
+ ```typescript
3375
+ /** Defines how a simulation measurement is rendered as an oscilloscope-style
3376
+ * trace. Display fields live here because they describe the relationship
3377
+ * between measurement data and a graph, not the probe itself.
3378
+ *
3379
+ * Scope display fields map measured values into display divisions using
3380
+ * display_div = display_center_offset_divs + (raw_value - display_center_value) / units_per_div.
3381
+ * Use volts_per_div for voltage traces and amps_per_div for current traces. */
3382
+ interface SimulationOscilloscopeTrace {
3383
+ type: "simulation_oscilloscope_trace"
3384
+ simulation_oscilloscope_trace_id: string
3385
+ simulation_transient_voltage_graph_id?: string
3386
+ simulation_transient_current_graph_id?: string
3387
+ simulation_voltage_probe_id?: string
3388
+ simulation_current_probe_id?: string
3389
+ display_name?: string
3390
+ color?: string
3391
+ display_center_value?: number
3392
+ display_center_offset_divs?: number
3393
+ volts_per_div?: number
3394
+ amps_per_div?: number
3395
+ }
3396
+ ```
3397
+
3332
3398
  ### SimulationSpiceSubcircuit
3333
3399
 
3334
3400
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_spice_subcircuit.ts)
@@ -3368,6 +3434,27 @@ interface SimulationSwitch {
3368
3434
  }
3369
3435
  ```
3370
3436
 
3437
+ ### SimulationTransientCurrentGraph
3438
+
3439
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_transient_current_graph.ts)
3440
+
3441
+ ```typescript
3442
+ interface SimulationTransientCurrentGraph {
3443
+ type: "simulation_transient_current_graph"
3444
+ simulation_transient_current_graph_id: string
3445
+ simulation_experiment_id: string
3446
+ timestamps_ms?: number[]
3447
+ current_levels: number[]
3448
+ source_component_id?: string
3449
+ subcircuit_connectivity_map_key?: string
3450
+ time_per_step: number
3451
+ start_time_ms: number
3452
+ end_time_ms: number
3453
+ name?: string
3454
+ color?: string
3455
+ }
3456
+ ```
3457
+
3371
3458
  ### SimulationTransientVoltageGraph
3372
3459
 
3373
3460
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_transient_voltage_graph.ts)
@@ -3425,14 +3512,6 @@ interface SimulationVoltageProbe {
3425
3512
  reference_input_source_net_id?: string
3426
3513
  subcircuit_id?: string
3427
3514
  color?: string
3428
- display_options?: SimulationVoltageProbeDisplayOptions
3429
- }
3430
-
3431
- interface SimulationVoltageProbeDisplayOptions {
3432
- label?: string
3433
- center?: number
3434
- offset_divs?: number
3435
- units_per_div?: number
3436
3515
  }
3437
3516
  ```
3438
3517