circuit-json 0.0.338 → 0.0.340

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
@@ -163,6 +163,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
163
163
  - [SchematicTrace](#schematictrace)
164
164
  - [SchematicVoltageProbe](#schematicvoltageprobe)
165
165
  - [Simulation Elements](#simulation-elements)
166
+ - [SimulationCurrentSource](#simulationcurrentsource)
166
167
  - [SimulationExperiment](#simulationexperiment)
167
168
  - [SimulationSwitch](#simulationswitch)
168
169
  - [SimulationTransientVoltageGraph](#simulationtransientvoltagegraph)
@@ -948,12 +949,17 @@ interface PcbBoard {
948
949
  subcircuit_id?: string
949
950
  width?: Length
950
951
  height?: Length
952
+ display_offset_x?: string
953
+ display_offset_y?: string
951
954
  thickness: Length
952
955
  num_layers: number
953
956
  center: Point
954
957
  outline?: Point[]
955
958
  shape?: "rect" | "polygon"
956
959
  material: "fr4" | "fr1"
960
+ anchor_position?: Point
961
+ anchor_alignment: NinePointAnchor
962
+ position_mode?: "relative_to_panel_anchor" | "none"
957
963
  }
958
964
  ```
959
965
 
@@ -2688,6 +2694,46 @@ interface SchematicVoltageProbe {
2688
2694
 
2689
2695
  ## Simulation Elements
2690
2696
 
2697
+ ### SimulationCurrentSource
2698
+
2699
+ [Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_current_source.ts)
2700
+
2701
+ ```typescript
2702
+ type SimulationCurrentSource =
2703
+ | SimulationDcCurrentSource
2704
+ | SimulationAcCurrentSource
2705
+
2706
+ /** Defines a DC current source for simulation purposes. It forces a current
2707
+ * between two source ports. */
2708
+ interface SimulationDcCurrentSource {
2709
+ type: "simulation_current_source"
2710
+ simulation_current_source_id: string
2711
+ is_dc_source: true
2712
+ positive_source_port_id?: string
2713
+ positive_source_net_id?: string
2714
+ negative_source_port_id?: string
2715
+ negative_source_net_id?: string
2716
+ current: number
2717
+ }
2718
+
2719
+ /** Defines an AC current source for simulation purposes. */
2720
+ interface SimulationAcCurrentSource {
2721
+ type: "simulation_current_source"
2722
+ simulation_current_source_id: string
2723
+ is_dc_source: false
2724
+ terminal1_source_port_id?: string
2725
+ terminal2_source_port_id?: string
2726
+ terminal1_source_net_id?: string
2727
+ terminal2_source_net_id?: string
2728
+ current?: number
2729
+ frequency?: number
2730
+ peak_to_peak_current?: number
2731
+ wave_shape?: WaveShape
2732
+ phase?: number
2733
+ duty_cycle?: number
2734
+ }
2735
+ ```
2736
+
2691
2737
  ### SimulationExperiment
2692
2738
 
2693
2739
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_experiment.ts)