@tscircuit/circuit-json-util 0.0.52 → 0.0.54

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
@@ -62,3 +62,15 @@ const subcircuitElements = indexedSu.source_component.list({
62
62
  ```
63
63
 
64
64
  The indexed version maintains the same API as the standard version but provides significant performance improvements, especially for large circuit json arrays.
65
+
66
+ ## Repositioning PCB Components
67
+
68
+ Use `repositionPcbComponentTo` to move a component and all of its related elements to a new center:
69
+
70
+ ```ts
71
+ import { repositionPcbComponentTo } from "@tscircuit/circuit-json-util"
72
+
73
+ repositionPcbComponentTo(circuitJson, "pc1", { x: 10, y: 5 })
74
+ ```
75
+
76
+ All ports, pads and traces referencing the component are translated by the same offset.