circuit-json 0.0.256 → 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 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)
@@ -1114,6 +1117,8 @@ interface PcbHolePillWithRectPad {
1114
1117
  rect_pad_width: number
1115
1118
  rect_pad_height: number
1116
1119
  rect_border_radius?: number
1120
+ hole_offset_x: Distance
1121
+ hole_offset_y: Distance
1117
1122
  x: Distance
1118
1123
  y: Distance
1119
1124
  layers: LayerRef[]
@@ -1137,6 +1142,8 @@ interface PcbHoleRotatedPillWithRectPad {
1137
1142
  rect_pad_height: number
1138
1143
  rect_border_radius?: number
1139
1144
  rect_ccw_rotation: Rotation
1145
+ hole_offset_x: Distance
1146
+ hole_offset_y: Distance
1140
1147
  x: Distance
1141
1148
  y: Distance
1142
1149
  layers: LayerRef[]
@@ -1582,6 +1589,29 @@ interface PcbVia {
1582
1589
 
1583
1590
  ## Schematic Elements
1584
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
+
1585
1615
  ### SchematicBox
1586
1616
 
1587
1617
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_box.ts)
@@ -1599,6 +1629,28 @@ interface SchematicBox {
1599
1629
  }
1600
1630
  ```
1601
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
+
1602
1654
  ### SchematicComponent
1603
1655
 
1604
1656
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_component.ts)
@@ -1748,17 +1800,20 @@ interface SchematicLayoutError {
1748
1800
 
1749
1801
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_line.ts)
1750
1802
 
1803
+ Draws a styled line on the schematic
1804
+
1751
1805
  ```typescript
1752
- /** Defines a line on the schematic, this can be used for adding arbitrary lines
1753
- * to a schematic, but don't use it for drawing traces, schematic boxes or where
1754
- * other schematic elements are more appropriate. */
1755
- interface SchematicLine {
1806
+ /** Draws a styled line on the schematic */ interface SchematicLine {
1756
1807
  type: "schematic_line"
1808
+ schematic_line_id: string
1757
1809
  schematic_component_id: string
1758
1810
  x1: number
1759
- x2: number
1760
1811
  y1: number
1812
+ x2: number
1761
1813
  y2: number
1814
+ stroke_width?: number | null
1815
+ color: string
1816
+ is_dashed: boolean
1762
1817
  subcircuit_id?: string
1763
1818
  }
1764
1819
  ```
@@ -1846,6 +1901,30 @@ interface SchematicPort {
1846
1901
  }
1847
1902
  ```
1848
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
+
1849
1928
  ### SchematicTable
1850
1929
 
1851
1930
  [Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_table.ts)