circuit-json 0.0.257 → 0.0.258
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 +80 -5
- package/dist/index.d.mts +586 -10
- package/dist/index.mjs +763 -699
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -116,7 +116,9 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
116
116
|
- [PcbTraceMissingError](#pcbtracemissingerror)
|
|
117
117
|
- [PcbVia](#pcbvia)
|
|
118
118
|
- [Schematic Elements](#schematic-elements)
|
|
119
|
+
- [SchematicArc](#schematicarc)
|
|
119
120
|
- [SchematicBox](#schematicbox)
|
|
121
|
+
- [SchematicCircle](#schematiccircle)
|
|
120
122
|
- [SchematicComponent](#schematiccomponent)
|
|
121
123
|
- [SchematicDebugObject](#schematicdebugobject)
|
|
122
124
|
- [SchematicError](#schematicerror)
|
|
@@ -127,6 +129,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
127
129
|
- [SchematicNetLabel](#schematicnetlabel)
|
|
128
130
|
- [SchematicPath](#schematicpath)
|
|
129
131
|
- [SchematicPort](#schematicport)
|
|
132
|
+
- [SchematicRect](#schematicrect)
|
|
130
133
|
- [SchematicTable](#schematictable)
|
|
131
134
|
- [SchematicTableCell](#schematictablecell)
|
|
132
135
|
- [SchematicText](#schematictext)
|
|
@@ -1586,6 +1589,29 @@ interface PcbVia {
|
|
|
1586
1589
|
|
|
1587
1590
|
## Schematic Elements
|
|
1588
1591
|
|
|
1592
|
+
### SchematicArc
|
|
1593
|
+
|
|
1594
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_arc.ts)
|
|
1595
|
+
|
|
1596
|
+
Draws a styled arc on the schematic
|
|
1597
|
+
|
|
1598
|
+
```typescript
|
|
1599
|
+
/** Draws a styled arc on the schematic */ interface SchematicArc {
|
|
1600
|
+
type: "schematic_arc"
|
|
1601
|
+
schematic_arc_id: string
|
|
1602
|
+
schematic_component_id: string
|
|
1603
|
+
center: Point
|
|
1604
|
+
radius: number
|
|
1605
|
+
start_angle_degrees: number
|
|
1606
|
+
end_angle_degrees: number
|
|
1607
|
+
direction: "clockwise" | "counterclockwise"
|
|
1608
|
+
stroke_width?: number | null
|
|
1609
|
+
color: string
|
|
1610
|
+
is_dashed: boolean
|
|
1611
|
+
subcircuit_id?: string
|
|
1612
|
+
}
|
|
1613
|
+
```
|
|
1614
|
+
|
|
1589
1615
|
### SchematicBox
|
|
1590
1616
|
|
|
1591
1617
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_box.ts)
|
|
@@ -1603,6 +1629,28 @@ interface SchematicBox {
|
|
|
1603
1629
|
}
|
|
1604
1630
|
```
|
|
1605
1631
|
|
|
1632
|
+
### SchematicCircle
|
|
1633
|
+
|
|
1634
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_circle.ts)
|
|
1635
|
+
|
|
1636
|
+
Draws a styled circle on the schematic
|
|
1637
|
+
|
|
1638
|
+
```typescript
|
|
1639
|
+
/** Draws a styled circle on the schematic */ interface SchematicCircle {
|
|
1640
|
+
type: "schematic_circle"
|
|
1641
|
+
schematic_circle_id: string
|
|
1642
|
+
schematic_component_id: string
|
|
1643
|
+
center: Point
|
|
1644
|
+
radius: number
|
|
1645
|
+
stroke_width?: number | null
|
|
1646
|
+
color: string
|
|
1647
|
+
is_filled: boolean
|
|
1648
|
+
fill_color?: string
|
|
1649
|
+
is_dashed: boolean
|
|
1650
|
+
subcircuit_id?: string
|
|
1651
|
+
}
|
|
1652
|
+
```
|
|
1653
|
+
|
|
1606
1654
|
### SchematicComponent
|
|
1607
1655
|
|
|
1608
1656
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_component.ts)
|
|
@@ -1752,17 +1800,20 @@ interface SchematicLayoutError {
|
|
|
1752
1800
|
|
|
1753
1801
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_line.ts)
|
|
1754
1802
|
|
|
1803
|
+
Draws a styled line on the schematic
|
|
1804
|
+
|
|
1755
1805
|
```typescript
|
|
1756
|
-
/**
|
|
1757
|
-
* to a schematic, but don't use it for drawing traces, schematic boxes or where
|
|
1758
|
-
* other schematic elements are more appropriate. */
|
|
1759
|
-
interface SchematicLine {
|
|
1806
|
+
/** Draws a styled line on the schematic */ interface SchematicLine {
|
|
1760
1807
|
type: "schematic_line"
|
|
1808
|
+
schematic_line_id: string
|
|
1761
1809
|
schematic_component_id: string
|
|
1762
1810
|
x1: number
|
|
1763
|
-
x2: number
|
|
1764
1811
|
y1: number
|
|
1812
|
+
x2: number
|
|
1765
1813
|
y2: number
|
|
1814
|
+
stroke_width?: number | null
|
|
1815
|
+
color: string
|
|
1816
|
+
is_dashed: boolean
|
|
1766
1817
|
subcircuit_id?: string
|
|
1767
1818
|
}
|
|
1768
1819
|
```
|
|
@@ -1850,6 +1901,30 @@ interface SchematicPort {
|
|
|
1850
1901
|
}
|
|
1851
1902
|
```
|
|
1852
1903
|
|
|
1904
|
+
### SchematicRect
|
|
1905
|
+
|
|
1906
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_rect.ts)
|
|
1907
|
+
|
|
1908
|
+
Draws a styled rectangle on the schematic
|
|
1909
|
+
|
|
1910
|
+
```typescript
|
|
1911
|
+
/** Draws a styled rectangle on the schematic */ interface SchematicRect {
|
|
1912
|
+
type: "schematic_rect"
|
|
1913
|
+
schematic_rect_id: string
|
|
1914
|
+
schematic_component_id: string
|
|
1915
|
+
center: Point
|
|
1916
|
+
width: number
|
|
1917
|
+
height: number
|
|
1918
|
+
rotation: number
|
|
1919
|
+
stroke_width?: number | null
|
|
1920
|
+
color: string
|
|
1921
|
+
is_filled: boolean
|
|
1922
|
+
fill_color?: string
|
|
1923
|
+
is_dashed: boolean
|
|
1924
|
+
subcircuit_id?: string
|
|
1925
|
+
}
|
|
1926
|
+
```
|
|
1927
|
+
|
|
1853
1928
|
### SchematicTable
|
|
1854
1929
|
|
|
1855
1930
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_table.ts)
|