@tscircuit/schematic-viewer 2.0.31 → 2.0.32

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.
@@ -1,43 +1,45 @@
1
1
  import { ControlledSchematicViewer } from "lib/components/ControlledSchematicViewer"
2
2
  import { renderToCircuitJson } from "lib/dev/render-to-circuit-json"
3
3
 
4
+ const circuitJson = renderToCircuitJson(
5
+ <board width="10mm" height="10mm" routingDisabled>
6
+ <resistor name="R1" resistance={1000} schX={-2} />
7
+ <capacitor name="C1" capacitance="1uF" schX={2} schY={2} />
8
+ <capacitor
9
+ name="C2"
10
+ schRotation={90}
11
+ capacitance="1uF"
12
+ schX={0}
13
+ schY={-4}
14
+ />
15
+ <chip
16
+ name="U1"
17
+ pinLabels={{
18
+ pin1: "D0",
19
+ pin2: "D1",
20
+ pin3: "D2",
21
+ pin4: "GND",
22
+ pin5: "D3",
23
+ pin6: "EN",
24
+ pin7: "D4",
25
+ pin8: "VCC",
26
+ }}
27
+ footprint="soic8"
28
+ schX={0}
29
+ schY={-1.5}
30
+ />
31
+
32
+ <trace from=".R1 .pin2" to=".C1 .pin1" />
33
+ <trace from=".C1 .pin2" to=".U1 .pin4" />
34
+ <trace from=".U1 .pin8" to=".C2 .pin1" />
35
+ <trace from=".C2 .pin2" to=".R1 .pin1" />
36
+ <trace from=".U1 .pin1" to=".U1 .pin5" />
37
+ </board>,
38
+ )
39
+
4
40
  export default () => (
5
41
  <ControlledSchematicViewer
6
- circuitJson={renderToCircuitJson(
7
- <board width="10mm" height="10mm">
8
- <resistor name="R1" resistance={1000} schX={-2} />
9
- <capacitor name="C1" capacitance="1uF" schX={2} schY={2} />
10
- <capacitor
11
- name="C2"
12
- schRotation={90}
13
- capacitance="1uF"
14
- schX={0}
15
- schY={-4}
16
- />
17
- <chip
18
- name="U1"
19
- pinLabels={{
20
- pin1: "D0",
21
- pin2: "D1",
22
- pin3: "D2",
23
- pin4: "GND",
24
- pin5: "D3",
25
- pin6: "EN",
26
- pin7: "D4",
27
- pin8: "VCC",
28
- }}
29
- footprint="soic8"
30
- schX={0}
31
- schY={-1.5}
32
- />
33
-
34
- <trace from=".R1 .pin2" to=".C1 .pin1" />
35
- <trace from=".C1 .pin2" to=".U1 .pin4" />
36
- <trace from=".U1 .pin8" to=".C2 .pin1" />
37
- <trace from=".C2 .pin2" to=".R1 .pin1" />
38
- <trace from=".U1 .pin1" to=".U1 .pin5" />
39
- </board>,
40
- )}
42
+ circuitJson={circuitJson}
41
43
  editingEnabled
42
44
  containerStyle={{ height: "100%" }}
43
45
  debugGrid
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/schematic-viewer",
3
- "version": "2.0.31",
3
+ "version": "2.0.32",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "scripts": {