@tscircuit/core 0.0.1081 → 0.0.1083
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 +5 -6
- package/dist/index.d.ts +4634 -1
- package/dist/index.js +62 -3
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -39,19 +39,18 @@ const board = new Board({
|
|
|
39
39
|
width: "10mm",
|
|
40
40
|
height: "10mm",
|
|
41
41
|
})
|
|
42
|
-
|
|
42
|
+
circuit.add(board)
|
|
43
43
|
|
|
44
44
|
const R1 = new Resistor({ resistance: "10k", footprint: "0402" })
|
|
45
|
+
const L1 = new Led({ footprint: "0402" })
|
|
45
46
|
board.add(R1)
|
|
46
|
-
|
|
47
|
-
// You can also add elements with React
|
|
48
|
-
board.add(<led footprint="0402" />)
|
|
47
|
+
board.add(L1)
|
|
49
48
|
|
|
50
49
|
const trace = new Trace({ width: "0.2mm" })
|
|
51
|
-
trace.connect(R1.output,
|
|
50
|
+
trace.connect(R1.output, L1.anode)
|
|
52
51
|
board.add(trace)
|
|
53
52
|
|
|
54
|
-
circuit.
|
|
53
|
+
circuit.getCircuitJson() // [{ type: "board", ...}, { type: "resistor", ...}, ...]
|
|
55
54
|
```
|
|
56
55
|
|
|
57
56
|
## Development
|